SPB Git

Repository Public License

FEATURE_AGENT_RULES.md 4.0 KB 43 lines markdown

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

Theme