<!-- SHREY-JUNIOR:FILE-START CLAUDE.md -->
# Claude Repo Routing

Use `.agent/project.yaml` and `.agent/context/*` as the repo-local source of truth generated by Shrey Junior.
Profile: `product-build`
Execution mode: `assisted`

Prefer this lightweight guidance file over invasive repo-local runtime config in v2.

Authority order:

1. existing trusted repo authority files already in the repo
2. promoted canonical docs explicitly referenced by those files
3. generated Shrey Junior overlays
4. `.agent/context/*`
5. fallback templates

Before medium/high complexity work or resuming a prior phase:

1. read the existing repo authority files and any promoted canonical docs they reference
2. read `.agent/project.yaml`
3. read `.agent/checks.yaml`
4. read `.agent/state/current-phase.json` when present
5. read the latest handoff and latest reconcile result when present
6. read `.agent/context/architecture.md`
7. read `.agent/context/conventions.md`
8. read `.agent/tasks/` packets when present

Do not rely on machine-local `.claude/*` files as portable authority unless the repo explicitly routes to them.

Workflow rules:

- trivial work may stay direct when it is local, low-risk, and does not affect contracts, auth, security, release behavior, or multiple files
- use `run` for non-trivial single-owner work that needs repo-aware framing
- use `fanout` for guarded or complex work that benefits from planner / implementer / reviewer / tester separation
- use `dispatch`, `collect`, and `reconcile` when simultaneous small-role work is useful and outputs must be compared explicitly
- require `checkpoint` and `handoff` when Claude is taking over after another tool or handing work back
- consult `push-check` before recommending push on non-trivial or guarded work
- consult `release-check` or `phase-close` when closing a phase or approaching release readiness

Gate behavior:

- if policy or reconcile state is blocked, treat it as a mandatory gate rather than advisory noise
- if authority files disagree, stop and warn instead of proceeding confidently
- if promoted canonical docs exist, surface them early instead of restarting context from scratch

Specialists and MCP:

- prefer specialist-aware routing when the task clearly maps to python, QA, security, docs, refactor, or push/release work
- MCP usage follows policy, capability, trust, profile, specialist, and approval rules; do not call MCP tools opportunistically
<!-- SHREY-JUNIOR:FILE-END CLAUDE.md -->
