Rules for feature UI agents (in addition to docs/AGENT_RULES.md)
- Read
docs/AGENT_RULES.md, thendocs/EXTENDING.mdin full (the extension contract),docs/DESIGN.md, and look at the reference mockups inDesignSystem/reference/and the real screens indocs/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. - 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 throughFeatureRegistryin<X>Feature.register(in:). Do not editNavigatorUI, engines,Package.swift,project.ymlor 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 newSources/NavigatorCore/Feature<X>+Services.swift. - 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. - 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.
- Private (ephemeral) windows: write nothing to disk, index nothing, sync nothing (
window.isEphemeral). - Strings:
L("…")/T("…")literals with English + fr-CA in your target'sLocalizable.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. - 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. - Launch arguments: every screen must be reachable with
-ORIXShow <id>/-ORIXRun <command-id>for screenshots. - 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>andswift test --disable-keychain --scratch-path build/spm-<you> --filter "Feature<X>Tests|NavigatorFeaturesTests".- App:
ORIX_BUILD_NAME=<you> scripts/build.sh macthenORIX_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 buildfromPackages/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 withscripts/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).
- Tests (Swift Testing): view-model/logic tests with an in-memory database and the fixture server from
TestSupportwhere a real page is needed; every command you register executed by a test; ephemeral-window no-write test for anything you persist. - 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.