SPB Git

Repository Public License

FEATURE_AGENT_RULES.md 4.0 KB

# Rules for feature UI agents (in addition to docs/AGENT_RULES.md)

  1. Read docs/AGENT_RULES.md, then docs/EXTENDING.md in full (the extension contract), docs/DESIGN.md, and look at the reference mockups in DesignSystem/reference/ and the real screens in docs/screenshots/0.2/. Your screens must be indistinguishable in quality and style from them: Lunar Glass, LunarDesign components and tokens only (no ad-hoc colours, fonts or radii), every theme, light and dark.
  2. You own only Packages/NavigatorKit/Sources/Feature<X>/, Tests/Feature<X>Tests/, docs/screenshots/0.3/<x>/ and the docs named in your brief. You plug into the shell only through FeatureRegistry in <X>Feature.register(in:). Do not edit NavigatorUI, engines, Package.swift, project.yml or other features. If the extension API lacks something, do not work around it by editing the shell: finish everything else, and list the precise request in your report. A shared protocol between features goes in a new Sources/NavigatorCore/Feature<X>+Services.swift.
  3. Engines already exist and are tested; read their docs (docs/*.md) and public API and use them — do not re-implement engine logic in the UI.
  4. No inert control, no placeholder screen, no fake data, no result that did not come from a real execution. A screen you cannot finish is left out and reported, not stubbed.
  5. Private (ephemeral) windows: write nothing to disk, index nothing, sync nothing (window.isEphemeral).
  6. Strings: L("…") / T("…") literals with English + fr-CA in your target's Localizable.xcstrings (tests enforce it). Accessibility: label, value, hint and identifier on every control; keyboard reachable on Mac; Dynamic Type; honour Reduce Motion / Reduce Transparency / Increase Contrast through LunarDesign; never colour alone.
  7. Commands: every user action of your feature is a NavigatorCommand (stable id, title, category, keywords, sensible shortcut that collides with nothing), placed in menus where it belongs. The product target is 100 useful commands overall, each executable and tested — contribute real ones, never filler.
  8. Launch arguments: every screen must be reachable with -ORIXShow <id> / -ORIXRun <command-id> for screenshots.
  9. Build and verify (one build at a time; your derived-data name is given in your brief):
    • cd Packages/NavigatorKit && swift build --disable-keychain --scratch-path build/spm-<you> --target Feature<X> and swift test --disable-keychain --scratch-path build/spm-<you> --filter "Feature<X>Tests|NavigatorFeaturesTests".
    • App: ORIX_BUILD_NAME=<you> scripts/build.sh mac then ORIX_BUILD_NAME=<you> scripts/shot.sh mac <name> -- <args> (background launch, capture by window id — never activate the app, never touch mouse or keyboard). Two other feature agents are editing their own targets at the same time: if the app build fails in their target, wait a minute and retry; never fix their code.
    • iOS: your target must compile for iOS (xcodebuild -scheme Feature<X> -destination 'generic/platform=iOS' -derivedDataPath build/dd-<you>-ios build from Packages/NavigatorKit). At the very end only, boot ONE simulator ("ORIXNavigator iPhone"; if it is already booted by someone else, wait), take the iPhone screenshots listed in your brief with scripts/shot.sh ios, and shut it down.
    • Look at every screenshot you take (Read tool) and iterate until it is polished. Save the final ones under docs/screenshots/0.3/<x>/ (PNG, downscaled to at most 1600 px wide to keep the repository small).
  10. Tests (Swift Testing): view-model/logic tests with an in-memory database and the fixture server from TestSupport where a real page is needed; every command you register executed by a test; ephemeral-window no-write test for anything you persist.
  11. Commit often, only your paths. Final report: what is implemented, what you saw on screen (paths), tests (count, command), command ids you registered, what is not verified, and extension API requests.
Files main
Menu

Theme