SPB Git

Repository Public License

AGENT_RULES.md 2.8 KB

# Working rules for every contributor agent (read first)

Repository: ~/Desktop/Cluster/apple/ORIXNavigator. Product: ORIX Navigator, a native browser for macOS, iOS and iPadOS (SwiftUI + AppKit/UIKit + WKWebView). Package: Packages/NavigatorKit (one SwiftPM package, one target per module). The CLAUDE.md in the parent apple/ folder is about another project (KHAELOR): ignore it entirely.

# Hard rules

  1. Stay in your lane. Edit only the directories named in your brief. Never edit Package.swift, another module's sources, or existing files of NavigatorCore. If you need a new shared type, add a new file in Sources/NavigatorCore/ named after your module (Persistence+Repositories.swift…) and list it in your report.
  2. Read the contracts first: Sources/NavigatorCore/*.swift (models, typed ids, omnibox classifier).
  3. Swift 6 language mode, strict concurrency, zero warnings in your target. Platforms: macOS 15+, iOS 18+ (the same code must compile for both; guard platform code with #if os(macOS) / #if canImport(UIKit)). Newer APIs (Liquid Glass, OS 26+) only behind if #available with a native fallback. No private API. No third-party dependency.
  4. Disk and network never on the MainActor; storage and orchestration in actors; UI types @MainActor.
  5. Secrets only in the Keychain. Never in logs, UserDefaults, files or the repository.
  6. Code, comments, identifiers and docs in English. Comments explain constraints, not the obvious.
  7. No placeholders, no inert buttons, no fake data, no TODO left where a feature is claimed. If something cannot be done or verified, say so in your report under "Not verified" — never present it as done.

# Build and test (one build at a time, never in parallel)

text
cd Packages/NavigatorKit
swift build --disable-keychain --scratch-path build/spm-<you> --target <YourTarget>
swift test  --disable-keychain --scratch-path build/spm-<you> --filter <YourTarget>Tests

Always pass your own --scratch-path (other agents build at the same time). Use Swift Testing (import Testing). Do not start subagents. Do not boot simulators unless your brief says so. Never run pkill/killall (kill by PID only what you started). Never drive the mouse or keyboard, never bring a window to the front (open -g only): the owner is using this Mac.

# Git

Commit early and often, only your own paths: git add <your paths> && git commit -m "<Module>: …". If .git/index.lock exists, wait two seconds and retry. Never git add -A, never amend, rebase, stash or reset, never push. Other agents commit in the same working tree.

# Final report (short)

Public API summary (main types and signatures other modules will call), tests (count, pass/fail, exact command), what is not verified, any file added outside your directories, and requests for changes to shared contracts.

Files main
Menu

Theme