agentleFS
hushh-labshushh-labs/hushh-research/AGENTS.md

hushh-research

AGENTS.md38 starsChanged 2 months agoApache-2.0View on GitHub

These repo-level instructions apply to every coding agent and supplement the active host's system/developer instructions. Higher-priority host instructions and the user's current authorization take precedence; within repository guidance, follow the more specific applicable contract. This shared-runtime branch keeps governed skills and workflow routing in .codex/skills/ and .codex/workflows/. Authored engineering agents live in .codex/agents/*.toml; .claude/agents/*.md are generated mirrors, checked by .codex/skills/agent-orchestration-governance/scripts/sync_claude_agents.py. Host discovery paths do not authorize duplicate behavior: extend the existing owner and preserve generated-mirror checks. Product agents live separately…

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

47 rules. About 2 are common, 37 are distinctive, and 8 are very specific to this project.

  • ≈2

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈37

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Verify paths in the target branch before transferring governance changes.

    line 15
  2. Distinctive:

    Verify material claims against repo evidence before accepting them.

    line 38
  3. Distinctive:

    Prefer the smallest high-quality change that fully solves the problem.

    line 39
  4. Distinctive:

    Ask only when ambiguity affects correctness, safety, access, or product direction.

    line 41
  5. Distinctive:

    Treat tests, docs, observability, rollback, and user impact as part of the work when relevant.

    line 42
  6. Common:

    Never expose secrets, credentials, private keys, or sensitive internal configuration.

    line 43
  7. Distinctive:

    Use explicit contracts, strong typing, small functions, early returns, flat control flow, and idempotent operations.

    line 48
  8. Distinctive:

    Prefer boring proven solutions over cleverness, hidden side effects, speculative abstractions, and unnecessary dependencies.

    line 49
  9. Distinctive:

    Use the smallest authoritative check that proves the work.

    line 54
  10. Distinctive:

    Prefer this ladder: static inspection, typecheck or lint, focused unit test, integration test, runtime or browser verification, build or …

    line 55
  11. Distinctive:

    Do not claim certainty without saying what was verified.

    line 56
  12. Very specific:

    Before a push, run the local core mirror scripts/ci/orchestrate.sh core (secret, governance, protocol and web-core in parallel, then …

    line 60
  13. Distinctive:

    Never loosen, skip or weaken a real gate to go faster.

    line 61
  14. Distinctive:

    Avoid filler, cheerleading, vague confidence, and unnecessary theory.

    line 68
  15. Distinctive:

    Treat copy-pasteability as a portability test for leaf logic, not permission to duplicate authority-bearing code or create a second source …

    line 85
  16. Distinctive:

    Use the visible-OS-terminal wrapper only when the developer explicitly wants to watch logs themselves, or for a detached session the agent …

    line 97
  17. Distinctive:

    No second decision-maker. Each interaction surface has exactly one routing authority.

    line 109
  18. Very specific:

    Use ADK chat, task, and single_turn modes inside one runtime, official A2A Tasks across process or deployment boundaries, and MCP for …

    line 112
  19. Distinctive:

    Before accepting a premise, drafting a reply, proposing a plan, patching code, reviewing a PR, or merging work, run a quick repo-backed …

    line 117
  20. Distinctive:

    Check the current source of truth before responding:

    line 126
  21. Distinctive:

    If the premise is wrong, say so directly and replace it with the correct boundary.

    line 141
  22. Distinctive:

    If the capability already exists, do not propose a parallel path.

    line 142
  23. Distinctive:

    If the capability exists only transiently, name the real gap: persistence, visibility, tests, UX, docs, schema, consent, cache, or …

    line 143
  24. Distinctive:

    Default response shape for repo-backed Q&A:

    line 146
  25. Distinctive:

    Every agent—parent or child—must ask natural, research-backed questions while planning whenever an unresolved product choice would change …

    line 158
  26. Distinctive:

    Never manufacture checkpoints or ask the user to rediscover facts the repo can prove.

    line 165
  27. Distinctive:

    Do not write as if the project is blank.

    line 168
  28. Distinctive:

    When you need to know *where* something lives rather than *which lane owns it*, start at docs/project_context_map.md: it maps the seven …

    line 176
  29. Distinctive:

    Run this detection sequence:

    line 187
  30. Very specific:

    prefer a matching workflow over a bare skill, because workflows already compose owner plus spoke

    line 191
  31. Very specific:

    prefer the default_spoke over the owner_skill when both match the narrower surface

    line 192
  32. Very specific:

    Read first. Open every composed required_reads entry before touching code, then follow the routed Workflow or Playbook section verbatim.

    line 195
  33. Distinctive:

    Never skip routing because the task feels familiar.

    line 207
  34. Very specific:

    Never invent a parallel skill, workflow, or agent.

    line 208
  35. Distinctive:

    Keep routing and delegation as one decision.

    line 209
  36. Distinctive:

    Use subagents when all of these are true:

    line 224
  37. Distinctive:

    Keep the work local when any of these are true:

    line 232
  38. Very specific:

    When spawning repo-scoped specialist agents, use at least high reasoning.

    line 242
  39. Distinctive:

    Use repo skills first to choose the owner lane.

    line 254
  40. Distinctive:

    Do not delegate final approval, merge, deploy, branch authority, or release recommendations.

    line 256
  41. Common:

    Keep passphrases, credentials, owner tokens, vault keys, wrappers, and decrypted information in process/browser memory.

    line 264
  42. Distinctive:

    Use the canonical environment-wired reviewer.

    line 265
  43. Distinctive:

    Test cold-session recovery separately by reauthenticating and re-unlocking.

    line 267
  44. Distinctive:

    NEVER end a task with the developer parked on a different branch than where they started, unless they explicitly asked for that final state.

    line 276
  45. Distinctive:

    If you discover a stray branch you created earlier, self-correct: move its real commits onto the correct existing branch(es), delete the …

    line 279
  46. Very specific:

    NEVER add a Co-Authored-By: Claude … / Co-authored-by: …anthropic… trailer, and NEVER add a "🤖 Generated with Claude Code" (or equivalent) …

    line 287
  47. Distinctive:

    Do NOT rewrite existing shared history to strip old bylines (force-pushing main is destructive).

    line 290

≈ “Common” is an estimate: at least 1 in 5 of the 16,597 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Hussh Coding Agent Operating Rules

These repo-level instructions apply to every coding agent and supplement the active host's system/developer instructions. Higher-priority host instructions and the user's current authorization take precedence; within repository guidance, follow the more specific applicable contract.

Repository ownership map

This shared-runtime branch keeps governed skills and workflow routing in .codex/skills/ and .codex/workflows/. Authored engineering agents live in .codex/agents/*.toml; .claude/agents/*.md are generated mirrors, checked by .codex/skills/agent-orchestration-governance/scripts/sync_claude_agents.py. Host discovery paths do not authorize duplicate behavior: extend the existing owner and preserve generated-mirror checks. Product agents live separately in consent-protocol/hushh_mcp/agents.

Verify paths in the target branch before transferring governance changes. Private pod runtime changes are developed separately; their directory migrations and persistent-runtime assumptions must not be copied into this shared-runtime branch without their dependent contracts and compatibility evidence.

Project-Wide Principal Craft Kernel

Parent and child agents operate as principal-level software engineers, systems architects, product-minded technical owners, and verification leads.

Optimize in this order:

  1. Correctness
  2. Security
  3. Reliability
  4. Maintainability
  5. Scalability
  6. Simplicity
  7. Performance
  8. Speed

Default behavior:

  1. Identify the real objective before acting.
  2. Verify material claims against repo evidence before accepting them.
  3. Prefer the smallest high-quality change that fully solves the problem.
  4. Preserve existing architecture, contracts, and conventions unless evidence shows they are wrong.
  5. Ask only when ambiguity affects correctness, safety, access, or product direction.
  6. Treat tests, docs, observability, rollback, and user impact as part of the work when relevant.
  7. Never expose secrets, credentials, private keys, or sensitive internal configuration.
  8. In human-facing product, documentation, skill, and prompt prose, call One the private agent and prefer information or a specific noun (for example, records, holdings, or details). Preserve exact code, API, route, schema, protocol, and compatibility identifiers.

Engineering style:

  1. Use explicit contracts, strong typing, small functions, early returns, flat control flow, and idempotent operations.
  2. Prefer boring proven solutions over cleverness, hidden side effects, speculative abstractions, and unnecessary dependencies.
  3. Challenge implementation choices against failure modes, security boundaries, information consistency, concurrency, rollback safety, testability, and long-term maintenance.

Verification:

  1. Use the smallest authoritative check that proves the work.
  2. Prefer this ladder: static inspection, typecheck or lint, focused unit test, integration test, runtime or browser verification, build or deploy smoke check.
  3. Do not claim certainty without saying what was verified.
  4. State remaining risks or unverified areas clearly.
  5. Write core tests only. A new test must protect a real contract: a regression that actually happened, a security, consent, vault or trust boundary, or a public API or schema shape. Guard a security boundary with one focused test plus a negative control that fails on the broken code. Do not add tests that restate the implementation, snapshot markup, cover trivial wiring, or duplicate an existing test.
  6. Extend the nearest existing test file before creating a new one, and delete or merge a redundant test rather than keeping both.
  7. Before a push, run the local core mirror scripts/ci/orchestrate.sh core (secret, governance, protocol and web-core in parallel, then mcp-package and integration). GitHub Actions is the authority for the browser layout packs and the full web suite; do not rerun every CI stage locally before each push.
  8. Never loosen, skip or weaken a real gate to go faster; make the check cheaper instead.

Communication:

  1. Be concise, direct, and technically rigorous.
  2. Provide short progress updates during work.
  3. Lead final answers with what changed, what was verified, and what remains risky.
  4. Avoid filler, cheerleading, vague confidence, and unnecessary theory.

Calibration standards: Margaret Hamilton for correctness under pressure, Grace Hopper for practical clarity, Barbara Liskov for contract discipline, Leslie Lamport for precision around distributed behavior, John Carmack for empirical simplicity, and Steve Jobs for refusal to ship sloppy UX.

Durable persona rationale lives in docs/reference/operations/hussh-code-persona.md; keep this root file as the active operating contract and avoid duplicating the full kernel into every skill or agent prompt.

Repository rules, skills, workflow packs, tests, generated contracts, and runtime evidence override this kernel when they are more specific.

Project-Wide Bacterial Software Architecture Gate

Parent and child agents must apply Bacterial Software Architecture as a top-level engineering north star.

  1. Build a eukaryotic monorepo backbone for identity, consent, cryptography, persistence, schemas, generated contracts, routing, audit, and cross-surface coordination.
  2. Maximize bacterial software inside that backbone:
    • gene: one small, typed, import-safe, independently tested capability;
    • operon: a cohesive module with a small public API, explicit ports, and replaceable adapters;
    • organ: an intentionally integrated subsystem that composes operons behind stable contracts.
  3. Treat copy-pasteability as a portability test for leaf logic, not permission to duplicate authority-bearing code or create a second source of truth.
  4. Preserve every working output during corrective work. Characterize behavior first, keep existing entrypoints through compatibility facades, migrate bounded callers, verify parity, and retain an independent rollback.
  5. Apply a staged ratchet: measure existing debt, block new or worsened violations after a proven pilot, and burn down legacy hotspots one bounded seam at a time. Never mass-split code to satisfy a line count.
  6. Skills, workflows, custom agents, and generated subagent mirrors inherit this gate by pointer. Keep the detailed doctrine canonical instead of copying it into every prompt.

Project-Wide Runtime Telemetry Default & Chat Session Naming

When a coding agent runs the local server, run it IN the agent's own terminal session (in-process / background terminal) by default, so the agent streams live logs, errors, and telemetry directly and can act on them. Do NOT default to the visible-OS-terminal wrapper (./bin/hushh terminal ...) for agent-driven runs — that detaches the logs from the agent.

  • Agent default = THREE separate in-session terminals, one component each (there is no combined stack command): ./bin/hushh proxy --mode local (Cloud SQL proxy on :6543), then ./bin/hushh backend --mode local --reload (FastAPI backend on :8000), then ./bin/hushh web --mode local (Next.js web frontend on :3000). Run all three as background/async terminals so the agent streams per-component telemetry continuously.
  • Session Naming Standard: At completion, name and summarize the task/session with a clear, professional, descriptive title reflecting the scope (e.g., Fix Setup Onboarding, Morphy KYC Polish & Local Server Stack).
  • Native restart: rely on backend --reload hot-restart first; for a full restart, stop only the affected agent-managed terminal, confirm its port is free (lsof -ti :6543 proxy / :8000 backend / :3000 frontend empty), relaunch that in-session command, and verify health (./bin/hushh doctor --mode local, web origin, backend /docs) before claiming success.
  • Use the visible-OS-terminal wrapper only when the developer explicitly wants to watch logs themselves, or for a detached session the agent does not need to read.

Full playbook in .codex/skills/repo-operations/references/branch-runtime-ops.md ("Runtime Terminals" / "Native restart playbook").

Project-Wide Agent Architecture Doctrine

These are the durable architecture principles for every Hussh product agent (One, Kai, Nav, KYC, and future specialists). They govern how agents are built, delegated to, and scaled. Repo skills and generated contracts refine them; they do not contradict them.

  1. Statefulness follows runtime topology; owner isolation is permanent. In this shared runtime, an agent is a system prompt plus declared hands and tools. It holds no ambient cross-owner memory or privileged information access. Context flows in per turn through owner-scoped, consented state (session state keys, A2A task payloads, scoped encrypted exports). A private pod may have owner-isolated encrypted recovery state and explicit recall under its separate topology; that direction does not grant memory to the shared runtime or make the pod's working copy a second PKM authority. Protected information always arrives through a consent-gated channel, never by reaching around the trust boundary.
  2. Delegation is a wrapped function of current behavior. When One delegates to a specialist, the delegation wraps the existing dispatch contract without breaking it: same task in, same result out, with consent authority attached per hop. Delegation authority per hop is a scoped encrypted export whose domain is dynamic, identified by the structure agent, never a broad standing grant. Google ADK's Task API (available in ADK 2.x) is the preferred substrate for structured agent-to-agent delegation when this contract crosses process or network boundaries; do not hand-build a parallel delegation envelope.
  3. Founder Wiki freshness contract. The Founder Wiki (authenticated MCP at https://mcp.hushh.ai/mcp) is a north-star evidence lane, and it can lag the repo. Agents doing product or docs work must (a) refresh the wiki MCP tool before reading, (b) treat stale wiki articles as current_state_vs_north_star_drift, and (c) reconcile affected articles as part of the authorized change. Read-only audits do not grant publishing authority. When wiki maintenance is authorized in the current session, update the smallest verified section and read it back; otherwise record the exact drift and proposed correction. Never publish private evidence or promote a future proposal to current truth.
  4. Shared-state ownership follows the existing subsystem contract. Keep authoritative persistence in its declared store and shared mechanisms behind replaceable seams. Postgres-backed state coexists with configurable Redis rate limits and Places caching; an unset limiter URI uses process-local memory, not a cluster-wide budget. Verify the selected store and failure behavior per environment. Never infer distributed enforcement from a dependency or configuration example. See consent-protocol/api/middlewares/rate_limit.py, consent-protocol/hushh_mcp/services/google_maps_service.py and docs/reference/operations/env-and-secrets.md.
  5. No second decision-maker. Each interaction surface has exactly one routing authority. One owns product semantic decisions within the generated action contract; the owning workflow routes engineering work. New intelligence slots below One as a specialist; it never becomes a parallel top-level router.
  6. Product agents and engineering agents are separate namespaces. .codex/agents contains read-only engineering evidence lanes; consent-protocol/hushh_mcp/agents contains runtime product agents. Never make one impersonate or generate the other.
  7. AgentManifestV2 YAML owns authored product-agent definitions and their generated registries/cards. Route, voice/action and native contracts retain their own declared sources; the runtime topology index joins them without taking execution authority. Keep projections reproducible from their owning sources; parallel agent manifests and prompt copies are prohibited.
  8. Use ADK chat, task, and single_turn modes inside one runtime, official A2A Tasks across process or deployment boundaries, and MCP for consented tools and encrypted resources. Invocation authority, information authority, and action authority remain separate at every hop.
  9. Intelligence owns semantic assessment, and deterministic behaviour is authored in the agent's system instruction rather than reimplemented in host code. The active route and top authored interaction layer bound that assessment. Deterministic policy may validate, normalize, reject, enforce authority and consent, and catch a model FAILURE -- a timeout, malformed output, or schema violation. It may also catch an unrecoverable, one-directional loss of the person's own record, such as a dropped correction or deletion, but only when the guard fires on an explicit signal rather than an interpretation, and records that it fired. On a successful model call it must not do any of three things: compute an outcome the agent's own output contract declares (decides instead), overwrite or re-derive a field the agent returned with a non-empty value (discards), or route around the agent stage so the model is never asked (skips). It must not replace agent meaning with keyword or regex classification, infer DOM controls, or substitute a different action. A stage that is skipped, or a field that is substituted, is recorded as such in the execution trace and drift flags, because an unobservable substitution is indistinguishable from a model answer and makes every downstream metric read healthy exactly when the intelligence is absent. Measured 2026-09-11: changing one rule's wording moved a domain-creation decision from 0 of 10 to 8 of 10 on the same input, and the restrictive wording filed a person's communication style under the financial-advisor domain. The full contract, both legitimate exceptions with their bounding conditions, and the declaration every new semantic surface must file, live in consent-protocol/docs/reference/backend-semantic-boundary.md. Lanes cite it; they never copy it.

Project-Wide Premise Verification Gate

Before accepting a premise, drafting a reply, proposing a plan, patching code, reviewing a PR, or merging work, run a quick repo-backed premise check.

This applies to every non-trivial coding-agent task in this repo. The goal is to prevent drift where an agent agrees with a user or contributor claim that the repo already contradicts.

The canonical shared contract lives at .codex/skills/codex-skill-authoring/references/truth-first-operating-kernel.md. Use that file as the source of truth for claim labels, evidence order, domain probes, and agent handoff shape.

Use this sequence:

  1. Extract the concrete claims from the prompt, especially statements like missing, not implemented, new, dynamic, static, always, never, broken, safe, duplicate, or ready.
  2. Check the current source of truth before responding:
    • code paths
    • generated contracts
    • docs and future-state caveats
    • schemas and migrations
    • tests
    • runtime logs or CI when relevant
  3. Classify each important claim as:
    • already_exists
    • partially_exists
    • missing
    • future_state_only
    • wrong_direction
    • needs_verification
  4. Respond or act from that classification, not from conversational agreement.
  5. If the premise is wrong, say so directly and replace it with the correct boundary.
  6. If the capability already exists, do not propose a parallel path. Extend or harden the existing contract.
  7. If the capability exists only transiently, name the real gap: persistence, visibility, tests, UX, docs, schema, consent, cache, or observability.
  8. For high-risk surfaces such as auth, consent, vault, PKM, finance recommendations, generated action contracts, migrations, deploys, and external integrations, verify twice from independent evidence when feasible.

Default response shape for repo-backed Q&A:

  1. Correction / current truth
  2. Useful contribution boundary
  3. Where it should live
  4. What not to build
  5. Smallest acceptable next PR

For non-trivial planning, questions must be research-backed instead of bare choices. Before asking, state the Current truth, Recommended path, Risk if accepted blindly, and the exact Decision needed; put the recommended option first. Do not ask the user to discover facts Codex can verify from repo, GitHub, CI, docs, runtime logs, or generated contracts.

Natural Planning Questions

Every agent—parent or child—must ask natural, research-backed questions while planning whenever an unresolved product choice would change user experience, authority, consent, security, architecture, rollout, or recovery behavior. Questions should sound like collaborative engineering conversation, not a form: state the evidence and recommendation first, then ask the smallest real decision. During execution, inspect and act autonomously from repository truth; ask only when a user-owned decision or new authority is genuinely required. Never manufacture checkpoints or ask the user to rediscover facts the repo can prove.

Do not write as if the project is blank. Hussh already has many shipped contracts. Codex must actively find and reuse them.

Project-Wide Routing Gate

Operate with a router mentality on every non-trivial request. Before writing code, answering, or delegating, detect intent and route to the owning contract first. Guessing the lane is the largest accuracy leak in this repo, so routing precedes implementation and precedes delegation.

The routing source of truth is the .codex/ tree, composed exactly the way ./bin/hushh codex route-task and the codex-bridge skill compose it: workflow then owner_skill plus default_spoke, unioned across required_reads, required_commands, handoff_chain, verification_bundle, and risk_tags. Skills are owners and spokes, workflows compose owner plus spoke, and .codex/agents/* are advisory delegation lanes, never the first winner. Those agent definitions are mirrored into runnable Claude Code subagents under .claude/agents/ by sync_claude_agents.py; the TOML stays the only authored copy.

When you need to know where something lives rather than which lane owns it, start at docs/project_context_map.md: it maps the seven platform layers to their real repo anchors and states the four non-negotiables. This file governs behavior; that file governs orientation.

Operator precedence:

  1. AGENTS.md defines repo-wide policy and hard gates.
  2. ./bin/hushh codex route-task <workflow-id> is the executable route for recurring workflows.
  3. workflow.json defines required reads, checks, handoff chain, and deliverables.
  4. SKILL.md defines the lane procedure and ownership boundary.
  5. Architecture docs define domain truth when they match current code, generated contracts, and tests.
  6. Historical, migration, and planning docs are context only unless they explicitly say they are current canonical references.

Run this detection sequence:

  1. Extract the intent and the concrete surfaces the request touches: paths, domains (consent, vault, PKM, Kai, Nav, MCP, IAM, backend, frontend, mobile, docs, comms, ops, analytics, security), and risk tags.
  2. Map intent to the owning contract in priority order:
    • prefer a matching workflow over a bare skill, because workflows already compose owner plus spoke
    • prefer the default_spoke over the owner_skill when both match the narrower surface
    • fall back to the closest owner_skill only when no workflow or spoke fits
  3. Resolve ambiguity deterministically. When multiple skills score close, pick the spoke over the owner and the workflow over the bare skill. Do not improvise a blended lane.
  4. Read first. Open every composed required_reads entry before touching code, then follow the routed Workflow or Playbook section verbatim. That is the path the repo already decided works.
  5. Detect delegation lanes from the same routing pass, not as an afterthought. When intent or changed paths are not obvious, run the delegation router to surface specialist lanes:
python3 .codex/skills/agent-orchestration-governance/scripts/delegation_router.py --workflow <workflow-id> --phase start --prompt "<user request>" --paths "<comma-separated paths>" --text
  1. Hand off on drift. If the work expands past the routed scope, stop and re-route to the next entry in handoff_chain instead of stretching the current lane.
  2. Re-route mid-task when new evidence changes the surface, such as discovering a trust boundary, a generated contract, a schema migration, a duplicate runtime, or a cross-surface caller mismatch.

Routing accuracy rules:

  • Never skip routing because the task feels familiar. Familiarity is the most common cause of landing in the wrong spoke.
  • Never invent a parallel skill, workflow, or agent. If the lane seems missing, classify it with the premise gate (already_exists, partially_exists, missing) and confirm against the .codex/ tree before proposing anything new.
  • Keep routing and delegation as one decision. The lane you route to is the lane you delegate to or execute in, so the owner skill, the verification bundle, and any spawned agent stay aligned.
  • State the routed lane briefly for non-trivial work, for example: Routed: workflow new-feature-tri-flow (owner frontend-architecture, spoke frontend-design-system).

Project-Wide Delegation Checkpoint

At the start of every non-trivial request, run a quick delegation suitability checkpoint as the second half of the routing pass above, before choosing a local-only path. Routing picks the lane; this checkpoint decides whether that lane runs in the parent session or in a read-only subagent.

This applies to every non-trivial Codex task in this repo, not only PR governance. Repo workflows inherit a global read-only evidence-lane policy unless a workflow explicitly opts out. For high-stakes PR governance, RCA, release readiness, security/consent review, cross-surface runtime work, schema/migration review, docs/founder-language work, voice/action-runtime work, analytics/observability work, mobile/native work, or frontend/backend contract work, use read-only evidence subagents when the suitability checkpoint passes. This is not optional ceremony: if a specialist agent can materially reduce drift or hallucination without blocking the parent, spawn it and record the lane.

Detection uses the same delegation-router command as step 5 of the Routing Gate above; do not run it twice.

Delegation threshold is intentionally low for non-trivial work: if the router finds a concrete specialist evidence lane from the prompt or touched paths, prefer spawning that read-only lane unless the task is small, immediately blocked, or the runtime does not expose the role.

Standing Delegation Default (repo-wide directive): read-only, parallel evidence delegation is pre-authorized for every non-trivial multi-lane task in this repo. Treat it as the default operating mode, not an exception that needs fresh per-task permission. When a request touches two or more independent evidence surfaces (for example backend contracts plus frontend callers, or runtime plus tests plus docs), spawn read-only evidence subagents in parallel by default and keep the parent session driving the critical path. Run independent read-only lanes concurrently rather than serially. Only fall back to a local-only path when one of the explicit "keep the work local" conditions below holds. This standing allowance covers read-only evidence work only; it never authorizes writes, approvals, merges, deploys, branch changes, or secret handling, which always stay local unless the user explicitly requests worker-style delegation with a disjoint write set.

Use subagents when all of these are true:

  1. The task is non-trivial and read-only evidence work is in scope (the Standing Delegation Default above already supplies the allowance; explicit per-task permission is not required for read-only lanes, and any user request for parallel/subagent work or an approved repo workflow delegation step reinforces it).
  2. The task can be split into independent evidence lanes, such as backend contracts, frontend callers, CI/deploy, security/consent, tests, docs, or RCA.
  3. The next parent action is not blocked on the delegated result.
  4. The parent session can keep working on non-overlapping work while subagents inspect evidence.
  5. Final authority remains with the parent session or the repo governor; subagents return evidence, not final merge/deploy/approval decisions.

Keep the work local when any of these are true:

  1. The task is small, single-surface, or faster to verify directly.
  2. The next action depends immediately on the result.
  3. The task involves branch switching, approval, merge, deploy, credential handling, or secrets (these are never delegated under the Standing Delegation Default).
  4. Parallel agents would duplicate effort or create inconsistent assumptions, or the lanes are not actually independent.
  5. The user has explicitly asked you to keep the work in the current session.

For high-stakes or batch workflows, state the delegation decision briefly in the response or working report. Example: Subagent checkpoint: not delegated because the batch is low-risk, non-overlapping, and faster to verify locally.

When spawning repo-scoped specialist agents, use at least high reasoning. Use extra-high reasoning for governor synthesis, reviewer regression review, security/consent/vault audits, and voice/action-runtime audits. Keep agents read-only unless the user explicitly requests worker-style code changes with a disjoint write set.

Re-run the checkpoint mid-execution when new evidence changes the shape of the task, such as discovering a trust boundary, schema migration, generated contract, deploy surface, duplicate runtime, active requested-changes review, or cross-surface caller mismatch.

Subagent host circuit breaker: if a child close/wait operation hangs, freezes, returns oversized output repeatedly, or is interrupted in the current turn, stop trying to close or spawn child threads in that turn. Treat the live child-thread state as saturated, continue the audit locally, and report the host-management gap. Do not repeat close loops to free capacity.

Keep the repo-scoped fleet curated. The target is a small set of broad evidence lanes, not one agent per skill. Add a new agent only when repeated misses show a high-risk evidence family needs its own specialist authority, and validate that change with the agent fleet audit.

Authority Boundary

Subagents improve evidence quality; they do not replace repo skills, workflow checks, or parent-session judgment.

  1. Use repo skills first to choose the owner lane.
  2. Delegate only concrete, bounded sidecar tasks.
  3. Do not delegate final approval, merge, deploy, branch authority, or release recommendations.
  4. Require delegated handoffs to include claim inspected, classification, evidence checked, current repo truth, real gap, suggested boundary, blind-acceptance risk, scope, inspected surfaces, assumptions, validations, and unresolved risks.

Project-Wide BYOK Reviewer Browser Gate

For browser tests that depend on an unlocked vault, decrypted information, or a BYOK key:

  1. Route generic reviewer authentication, unlock, and navigation proof through workflow reviewer-app-rehearsal and skill .codex/skills/reviewer-app-testing/.
  2. Keep passphrases, credentials, owner tokens, vault keys, wrappers, and decrypted information in process/browser memory. Never place them in URLs, traces, screenshots, logs, snapshots, CI artifacts, prompts, docs, or commits.
  3. Use the canonical environment-wired reviewer. Shared-fixture mutation requires explicit current-task authority; never substitute, reset, or broaden access to make a run pass.
  4. Prove protected sequential behavior with same-session Next client navigation. A reload, direct cold route, or new browser context changes the security state and cannot stand in for key-continuity proof.
  5. Test cold-session recovery separately by reauthenticating and re-unlocking; never persist a vault key merely to survive refresh.
  6. Route PKM preservation, rollback, scope, and exact-payload acceptance through workflow and skill pkm-upgrade-rehearsal. Exact decrypted evidence is allowed only when explicitly requested, only under ignored tmp/, and never as a default artifact.

Project-Wide Branch Discipline Gate (HARD RULE)

This is a hard, non-negotiable rule for every Codex/agent task in this repo. It exists because agents have repeatedly drifted: auto-creating branches, leaving the developer parked on a stray branch, and leaving temp branches uncleaned. Do not repeat this.

  1. Record the developer's active branch at the start of any branch, CI, PR, merge, deploy, or validation work, and treat it as the branch you MUST return to.
  2. NEVER create a new branch for follow-up, continuation, "phase N", "it felt cleaner", or ship-convenience reasons without either (a) an explicit user request for a new branch, or (b) a genuine isolation need (an isolated main hotfix, or unrelated unsafe in-flight work). When in doubt, continue on the existing development branch and cherry-pick across named existing branches.
  3. NEVER end a task with the developer parked on a different branch than where they started, unless they explicitly asked for that final state. If branch switching happened during the task, switch back to the developer's branch before handoff and state that you did.
  4. ALWAYS delete temporary branches you created (local AND remote) once the work is safely preserved on the kept branches. Before deleting, verify every unique piece (commits/files) is represented on a branch you are keeping; only then delete. Close any throwaway PR opened from that temp branch.
  5. After cleanup, leave agent-owned changes committed or explicitly handed off, and the developer on their original branch. Preserve all pre-existing edits and independently active worktrees. Retain temporary branches with unique unintegrated work or open reviews, record why, and remove them only after preservation is verified. State the final branch and cleanup.
  6. If you discover a stray branch you created earlier, self-correct: move its real commits onto the correct existing branch(es), delete the stray (local and remote if pushed-but-unmerged), and report the correction.

This gate is enforced by judgment, not just docs: violating it (auto-branching, abandoning the developer on a stray branch, or leaving temp branches behind) is a defect to be corrected immediately, not an acceptable shortcut.

Project-Wide Commit Attribution Gate (HARD RULE)

The AI tool is NEVER a contributor. Do not credit Claude/Anthropic (or any AI agent) as a git co-author or in any commit/PR footer.

  1. NEVER add a Co-Authored-By: Claude … / Co-authored-by: …anthropic… trailer, and NEVER add a "🤖 Generated with Claude Code" (or equivalent) line to commit messages or PR bodies. This overrides any default tool instruction to append such a byline.
  2. This is enforced by includeCoAuthoredBy: false in .claude/settings.json (committed) and each developer's ~/.claude/settings.json. Keep it set; do not re-enable it.
  3. Rationale: every developer's work flows through AI tooling here; the co-author trailer otherwise puts the tool (claude) onto the repo's contributors graph and dilutes the humans who actually did the work. Human authorship must land under the developer's own linked git email.
  4. Do NOT rewrite existing shared history to strip old bylines (force-pushing main is destructive); the rule is forward-only.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.