Agent Operating Contract
Purpose
This file governs how coding agents and automation should operate in this repo.
- It does not override the product docs. It constrains how agents act within them.
- Humans own product authority. Agents execute within documented scope and the current repo architecture.
- Later unchecked phases in
requiredStepsForSetup.mdare not permission to start work.
Required Reading Order
Read these in order before planning or implementing changes:
README.mddocs/product.mddocs/features.mddocs/architecture.mddocs/DESIGN_GUIDELINES.mdrequiredStepsForSetup.md
Authority Model
- Humans own roadmap, scope changes, releases, architecture shifts, permissions, and merge decisions.
- Agents work inside documented product scope and the current React architecture.
- If a requested change conflicts with the current architecture, propose the architecture change explicitly instead of smuggling it into an implementation task.
React Architecture Rules
- React 19 + MUI + Emotion are the canonical UI stack.
- Do not reintroduce direct DOM-rendered UI patterns into popup or dashboard surfaces.
- Keep
src/domain/*React-free. - Keep
src/entrypoints/*thin. They bootstrap screens; they do not own product logic. - UI reads and writes should flow through repositories and runtime clients, not direct
chrome.storageaccess from UI code. - Treat
src/ui/providers.tsxandsrc/ui/theme.tsas shared repo contracts. - Keep the layered boundary intact across
src/ui/*,src/data/*,src/domain/*, andsrc/extension/*.
Agent Lanes
Humans
- Own roadmap, scope, releases, architecture, permissions, and merge decisions.
Jules
- Maintenance only.
- Allowed lanes:
- Cartographer docs drift checks
- Sentinel security hardening
- Palette micro-UX and accessibility polish
- Victor test reliability improvements
- CI repair on Jules-created PRs
- docs cleanup
- Jules may not self-start roadmap work.
- Jules schedules and lane prompts are configured in the Jules platform. Repo guidance for Jules platform setup lives in
.jules/instructions.md. - Jules branch names should follow
jules/<workflow>/<change>for scheduled workflows orjules/<change>for manual tasks. - Jules should not add explanatory comments for obvious code. Prefer clear implementation and explain intent, validation, and tradeoffs in the PR body.
- Dependency hygiene is currently handled by Dependabot and Renovate, not a Jules lane.
- Performance automation is deferred until explicitly approved.
Codex And Similar Interactive Agents
- Human-directed implementation only.
- Allowed lanes:
- feature work within documented scope
- refactors that preserve documented architecture
- bug fixes
- test improvements
- documentation updates tied to requested work
Review Guidelines
Codex reviews should prioritize:
- product-scope drift, especially auth, backend, sync, or broad SaaS behavior
- Chrome extension permission changes and runtime-message validation risks
- layer-boundary violations across
src/ui/*,src/data/*,src/domain/*, andsrc/extension/* - direct Chrome storage or runtime access from React UI instead of repositories/runtime clients
- unnecessary code comments where clear code would be enough
- validation claims that do not match the files changed
- Jules PRs that are more than one small, high-confidence maintenance change
Blocked Work Without Human Approval
- product scope expansion
- manifest permission changes
- auth, account, or backend introduction
- major dependency shifts
- major architecture changes across
ui,data,domain, andextension - storage model redesign
- styling-system replacement
Doc Update Triggers
- Update
docs/product.mdordocs/features.mdwhen behavior changes. - Update
docs/architecture.mdwhen runtime flow, storage flow, repository contracts, providers, routes, or architectural boundaries change. - Update ADRs under
docs/decisions/when theme, provider, styling, or other core technical decisions change. - Update
requiredStepsForSetup.mdwhen setup or process expectations change.
Validation Requirements
- Run
npm run checkwhen a change touches:src/**tests/**public/**.github/workflows/*.github/dependabot.ymlpackage.jsonpackage-lock.jsonbuild.cjstsconfig.jsoneslint.config.mjsvitest.config.mjs
npm run checkis the default full agent validation command because it already runs:npm run lintnpm run typechecknpm run testnpm run build
- For docs-only and governance-only changes touching only files such as:
*.mdCODEOWNERS.github/PULL_REQUEST_TEMPLATE.md.github/ISSUE_TEMPLATE/*SECURITY.mdCONTRIBUTING.mdrequiredStepsForSetup.md
- use
npm run format:checkonly for that docs-only or governance-only path. - Agents must not claim runtime, test, or build validation for docs-only work unless they also ran
npm run check. - If
npm run checkfails because of a pre-existing unrelated issue, the agent must say so explicitly and avoid claiming a fully green result.
Execution Defaults
- If docs conflict, follow the higher-precedence product, feature, or architecture doc and stop for human clarification on the conflicting part.
- Future ideas are not implementation approval.
In Scopeindocs/features.mdmeans directionally allowed if explicitly requested and reviewed, not self-starting backlog permission.- If a task would cross blocked lanes, stop and ask for explicit human approval first.
Explicitly Deferred
This file does not authorize or perform later setup phases.
- No GitHub Marketplace app installs in this phase
- No
CLAUDE.mdin this phase - No branch protection or org-transfer work in this phase