Ingénierie agentique pour le développement logiciel

Définit un workflow multi-agents structuré pour planifier, déléguer, réviser et livrer des modifications logicielles, avec classification des risques et contrôles qualité.

Spar Skills Guide Bot
DeveloppementAvancé
11018/08/2026
Claude Code
#agentic-engineering#multi-agent#software-development#workflow#delegation

Recommandé pour


name: "dinostack" description: > Apply when the user mentions any software development work: implementing features, fixing bugs, reviewing or refactoring code, debugging, testing, deploying, working with agents or subagents, making architecture decisions, setting up projects, managing dependencies, writing scripts, or any task that involves reading, writing, or reasoning about code and systems.

IMPORTANT - READ THIS FIRST: If skill_auto_load: true is set in ~/.claude/agentic-engineering.json, this skill is configured to auto-load. Read this entire SKILL.md before taking any action on software development tasks. Do not start implementing until you have read the Rules section below.

The Agentic Engineering system defines how to plan, delegate, review, and ship software using a structured multi-agent workflow. It covers risk classification, adversarial review, task decomposition, and quality gates so that changes are correct, safe, and reviewable. Read the rules files on every session and the reference docs on the triggers described in METHODOLOGY.md §Protocol Details (read on trigger).

Conductor default: act, don't ask. The conductor's job is to complete the goal, not to approve every step. Stop and ask only for destructive/irreversible actions, missing information only the user has, materially ambiguous acceptance criteria, or scope-completion decisions. Repeated stops within one task are a planning signal, not a virtue. See Proactive autonomy in METHODOLOGY.md §Delegation for the full rule, anti-patterns, and stop-frequency thresholds.

Rules (read these files)

  • METHODOLOGY.md - the assembled kernel: delegation, risk classification, activation preflight, planning gate, task decomposition, and worktree lifecycle; the core rules for when to act directly vs. spawn Workers and Skeptics.

  • rules/code-standards.md - documentation lookups via Context7, tool discipline (Read always primary; prefer Glob/Grep when available, Bash rg/grep/find as the sanctioned fallback otherwise), code quality gates, package management conventions, and browser verification with agent-browser.

  • rules/conventions.md - writing style, project structure, session context and memory handling, and git workflow including protected branches and worktree-per-feature conventions.

Commands (invoke by name)

  • /ds-help - static, zero-token command reference; lists every slash command with a one-line description.
  • /ds-status - read-only resolver dump; shows the resolved mode, profile, and marker with provenance plus a plain-English explainer of what they do and how to change them.
  • /ds-brief - interactive planning dialogue; produces the Brief artifact before architect and engineer are spawned. Invoke when operator implies planning intent at session start, or use /ds-brief --from <path> to extract a Brief from an existing PRD.
  • /ds-update - update an existing dinostack/DinoStack install (or fresh-install if none exists); invoke when the user says "pull and install DinoStack", "update DinoStack", "install the latest DinoStack", "reinstall dinostack", or "update my AE install".

Run /ds-help for the full command inventory.

Reference Docs (read on trigger - see Protocol Details in METHODOLOGY.md)

  • references/skeptic-protocol.md - Skeptic loop orchestration, findings classification (Critical/Major/Minor), sign-off format, adversarial briefs, and the Elevated + Cleanup path.

  • references/subagent-protocol.md - parallel spawning rules, worktree isolation, check-in behavior, phase breadcrumbs, and task decomposition rules for multi-Worker plans.

  • references/agent-team.md - named agent roles (engineer, architect, investigator, debugger, security-auditor, orchestration-planner), composed flows, decision rules, and spawn requirements.

  • references/design-goals.md - design principles and goals of the Agentic Engineering system; read when evaluating whether a proposed change aligns with the system's intent.

  • references/regression-test-obligation.md - per-finding regression-test obligation: every Skeptic finding fixed during a task must come with a regression test that would have caught it; read when fixing a Skeptic finding to confirm what counts as a valid regression test.

  • references/doc-sync-obligation.md - per-change doc-sync obligation: a reality-asserting change (alters a count/list/path/convention/behavior an intent-layer doc states) must update the affected docs in the same change; read when a change touches a documented surface.

  • references/role-models.md - Pi / oh-my-pi per-role model routing and antagonist reviewer model diversity; read when resolving role-models.yml or spawning reviewers on Pi/omp.

  • references/model-discovery.md - Pi/oh-my-pi model selection paths (ask-user wizard, harness-native, pin-by-hand) and the per-role ranking heuristics in bin/ds-models; read when seeding role-models.yml.

  • references/evidence-on-disk.md - spill/sketch/rehydrate protocol for large tool output; when to spill, the three-step loop, teardown, and ephemerality.

  • references/cross-harness-teams.md - ds-team CLI and team.yml schema for orchestrating parallel agent teams across multiple AI harnesses; read when using ds-team or configuring cross-harness dispatch with team.yml.

  • references/digest-return-pattern.md - digest-return discipline: when a background loop-running spawn (multi-iteration Skeptic/QA, long investigation) returns, the conductor reads the structured digest and acts - it does not re-read the internal transcript; read when running a multi-unit plan with parallel background loops.

  • references/learnings-capture-instruction.md - the standing "watch for learnings" instruction: what counts as a learning, the in-flight ds-learning-shard append path for the four roles it belongs to (engineer, adr-generator, product-discovery, release-orchestrator), the learnings_candidate[] path for the three roles whose return contract declares that field, and its canonical definition; read when acting as any subagent role.

  • references/command-authoring.md - authoring discipline for commands, skills, and agent definitions: trigger-keyword descriptions (always injected into context even when unused, so enumerate when to fire, not behavior) and bad/good example-pair seeding to encode taste; read when authoring or editing a command file, skill definition, or agent definition.

Rules (read on trigger)

  • rules/module-manifest.md - required manifest header format for non-trivial source files; read when creating or substantially modifying a file that exports a public symbol, exceeds ~50 LOC, or implements a side-effecting operation.

Embedded Resident Content

METHODOLOGY.md

Activation preflight

Run this check once at the first skill invocation (and every /-command). Read activation config and the project marker directly; resolve identity exactly once with ds-identity resolve-hook --cwd <cwd> (3-second timeout, 64 KiB output cap). Do not spawn or use LLM reasoning. Resolver failure means identity none and never blocks activation. Exception: Step 6 may run the bounded, fail-open bin/ds-migrate scaffolding sync.

  1. Read the global mode and profile. Load ~/.claude/agentic-engineering.json. If missing or unreadable, assume mode=opt-out and profile=default (back-compat). Expected shape: { "mode": "opt-out" | "opt-in", "profile": "relaxed" | "default" | "strict", "set_at": "<ISO8601>" }. Any mode value other than opt-in is treated as opt-out. Any profile value other than relaxed or strict is treated as default (see the deprecated legacy preset subsection below for the fallback path when profile is genuinely absent rather than merely invalid).

    Also invoke that resolver and record only validated JSON null or {developer_id, provisional, identity_scope, config_dir?}. It safely discovers project/profile/global candidates and applies confirmation-first ordering: project > profile > global, then provisional project > profile > global. Do not re-read identity files. A provisional winner triggers the scoped first-turn notice. Full resolver and routing contract: content/commands/ds-identity.md.

    Deprecated legacy preset (read-only compat). Older configs may still carry a session-wide preset field (lean | standard | strict) at either scope. It is a read-only fallback used ONLY when profile is genuinely ABSENT at that scope - check key presence, not truthiness. An invalid profile value is treated identically to absent for this purpose (a valid legacy preset may then apply); if nothing validates anywhere, terminate at default.

    Legacy preset table:

    | Preset | Resolves to profile | |-----------|---------------------| | lean | relaxed | | standard | default | | strict | strict |

    Precedence chain (replaces the old "preset wins on collision" rule): project profile > project preset (legacy, only if project profile absent) > global profile > global preset (legacy, only if global profile absent) > hardcoded "default".

    Presence of a legacy preset key at either scope fires a deprecation notice regardless of whether it wins resolution (see §Session Context and Memory in content/rules/conventions.md for the two notice templates).

    Note: this deprecated session-wide preset field is distinct from the per-spawn Preset: declaration introduced in the Tier declaration section below - that mechanism is unaffected by this deprecation. The session-wide preset was a legacy tone-setting alias; the per-spawn preset is a capability bundle. Both terms use "preset" intentionally - context disambiguates.

  2. Read the project marker. Look for a root AGENTS.md in the current working directory. If the project uses the Claude Code @AGENTS.md import pattern, CLAUDE.md will point at it - resolve through to the actual AGENTS.md. If neither file exists, treat marker as none.

  3. Scan for marker lines. Case-insensitive, whole-line match (allow leading or trailing whitespace, and an optional markdown list prefix - ):

    • agentic-engineering: opt-in
    • agentic-engineering: opt-out If both appear, the one that appears FIRST wins; print a one-line warning: agentic-engineering: both opt-in and opt-out markers found in AGENTS.md - using the first one (<value>). Remove the duplicate. Also scan for agentic-engineering-profile: <value>. If present, it overrides the global profile. Valid values: relaxed, default, strict. Any other value falls back to the precedence chain in the deprecated legacy preset subsection above (project preset, then global profile, then global preset, then default). Also scan for agentic-engineering-preset: <value> (deprecated legacy alias). If present, it resolves through the legacy preset table above ONLY when no valid agentic-engineering-profile: line is present in the same file - it is a fallback below the project profile, not an override that wins on collision. Any other value falls back to the next step in the precedence chain (global profile, then global preset, then default). Presence of this marker fires a deprecation notice regardless of whether it wins.
  4. Activation decision.

    • mode=opt-out AND marker=opt-out - skill no-ops silently; fall back to default Claude Code behavior for this session.
    • mode=opt-in AND marker != opt-in - skill no-ops silently; fall back to default behavior.
    • Any other combination (including marker=none with mode=opt-out, or marker=opt-in with mode=opt-in) - proceed with the methodology.

    On any proceed branch: immediately run Step 5 (first-activation notice), Step 6 (scaffolding-sync), and Step 7 (prior-session learning-shard rollup); read content/references/activation-detail.md §Step 5: First-Activation Notice, §Step 6: Scaffolding-Sync Check, and §Step 7: Prior-Session Learning-Shard Rollup for the full implementation.

    (Steps 5-7 are deferred to content/references/activation-detail.md as a deliberate forcing-read exception - the breadcrumb above ensures every active session reads them.)

  5. Prior-session learning-shard rollup. Runs only when Step 4 resolved to active. Make exactly one call - ds-learning-shard rollup --repo <cwd> - which prints a JSON array and exits 0 on every path. An empty array is the common case: stop there, print nothing, spawn nothing. On a non-empty array, classify each entry through content/references/capture-classification.md and forward only Capture: MUST items to learnings-agent. Soft-fail absolutely: a missing binary, a non-zero exit, or unparseable output is a silent no-op and never blocks session start. Detail: content/references/activation-detail.md §Step 7: Prior-Session Learning-Shard Rollup.

  6. When no-opping, print one line and stop: (Steps 5-7 deferred above)

Skill/command references: Every file in content/commands/ begins with a one-line reminder to run this preflight and no-op if inactive. The check is performed once per session - subsequent /-commands in the same session can trust the earlier result.

Delegation

The main session agent is a conductor, not an implementer. The conductor is the main session agent: it decomposes work, delegates to specialist subagents that do the implementation and investigation, and synthesizes results when those subagents report back. It stays available and focused on orchestration - responsive to the user at all times.

All delegated tasks run in the background by default. Foreground is permitted only for direct-action cases in the table below. Never block inline - spawn in the background and wait for completion notification. On the current Claude Code harness, Agent spawns run in the background by default, and hooks/enforce-background-spawn.py enforces background-by-default on both Task and Agent. The conductor norm on Claude Code: omit run_in_background entirely on Agent spawns and rely on the harness default; never pass false. The one sanctioned synchronous agent is wrap-ticket, which runs to completion in line because the conductor holds .agentic/wrap/lock for its duration and Phase 12 cleanup must wait for it to return; treat that as a behavioral property of wrap-ticket, not a general exemption. For the payload-capture history and the asymmetric allow/deny hook mechanics: read content/references/delegation-detail.md §Background-Spawn Enforcement Detail.

Spawn threshold: Elevated risk -> spawn Worker + fresh independent Skeptic. Low risk -> direct action. Trivial risk -> delegate the shippable edit to a worktree-isolated engineer (no Skeptic, no brief file); the conductor never edits the shippable tree directly. When in doubt, classify as Elevated. Downward tie-break counterweight: this default is overridden only when a named Low or Trivial override's full definition - including every exclusion clause - is affirmatively satisfied and zero other Elevated signals are present; "provably small" means the override can be named and each exclusion individually confirmed against the diff, not a general impression that the change looks safe.

No re-deliberation on spawn decisions. Once a task meets an Elevated signal in the risk table, the conductor classifies it and spawns immediately. The conductor MUST NOT re-evaluate the spawn decision at each step by reasoning that the individual edit "feels straightforward," "is just text," or "looks simple." Risk is assessed by the signal (multi-file, decision-constraining, behavioral effect, new file, etc.), not by the conductor's subjective estimate of difficulty. A conductor that self-negotiates around the spawn threshold is violating the protocol regardless of whether the output happens to be correct. Classify once, act once - Decision stability below is the general form of this rule.

Pre-spawn checklist - ticket-offer gate: Before the FIRST subagent spawn of any kind (exemptions apply) on net-new work: if a tracker is connected and ticket_driven is active and the work did not arrive as an existing ticket, run the ticket-offer gate first (see full rule below, §Ticket-offer gate).

Proactive autonomy. The conductor's default is to act, not to ask. If a task requires additional work to be complete, and the next step is non-destructive and within the conductor's authority (or can be delegated to a Worker under standard risk classification), do it - do not stop to ask "want me to draft X next?" or "shall I wire this up?". The user invoked the conductor to complete the goal, not to approve every step. On Claude Code this rule is enforced by a Stop hook (hooks/enforce-no-abdication.py, wired by .claude/install.sh) that detects three shapes in the final assistant message - a permission-seeking interrogative, a surface-and-proceed default announced and then not acted on, or a prose co-equal ballot in an ## Operator decisions block - and blocks the session stop, injecting a directive; requires abdication_guard_enabled: true in .agentic/config.json; set to false to opt out once enabled; disable per-session via AE_ABDICATION_GUARD_DISABLE=1; other adapters rely on the prose rule.

Auto-invoking /ds-brief on planning-intent signals is a valid surface-and-proceed conductor behavior - not a stop-and-ask. When the conductor detects exploratory framing in an operator message (e.g. "I want to build...", "We should add...", "thinking about..."), it announces the /ds-brief session and proceeds unless STOP arrives in the very next operator turn. This is not a permission request; it is a proactive decision to open the planning dialogue before architect and engineer spawns (announce-and-proceed variant: not subject to the 30-minute-waste threshold described in the standard surface-and-proceed protocol; the announcement is a notification that planning is starting, not a request for permission). The trigger-detection signals and suppression list (debugging questions, bug reports, explicit ticket references, direct implementation requests) are defined in content/commands/ds-brief.md Section 1.

Ticket-offer gate. Trigger: TRACKER != none AND ticket_driven active AND net-new work that did NOT arrive as an existing ticket ID is about to spawn any subagent not on the exemption list (content/references/delegation-detail.md §Ticket-Offer Gate - Exemption Set) -> conductor runs the Tracker Create Helper (cross-ref content/commands/ds-implement-ticket.md §Tracker Create Helper) before proceeding. Mid-session discoveries: content/references/delegation-detail.md §Follow-up Ticket Creation Discipline.

ticket_driven resolution (CRITICAL): an explicit ticket_driven value in .agentic/config.json always wins. When the key is ABSENT: TRACKER != none -> effective offer; TRACKER == none -> effective off. This makes "tracker connected => offer by default" true with zero migration - no config change needed on existing projects with a connected tracker.

  • offer mode (surface-and-proceed): emit Creating ticket for this work - reply STOP to skip and proceed ad-hoc. If no STOP arrives in one turn: invoke the Create Helper. On CREATE_STATUS=created: route via /ds-implement-ticket <CREATED_TICKET_ID>. On CREATE_STATUS=failed or skipped: emit the soft-fail/skip line and proceed ad-hoc.

  • require mode (hard gate): do not spawn any non-exempt subagent before a ticket exists. Invoke the Create Helper immediately. On created: route to /ds-implement-ticket <CREATED_TICKET_ID>. On failed: surface the error and WAIT for operator resolution. On a classifier-defined tracker where create is unavailable (would be skipped): do NOT silently proceed - surface the conflict (ticket_driven=require but tracker '<type>' has no create integration - proceed ad-hoc this once, or stop?) and WAIT for the operator.

Exemptions: existing-ticket arrivals (ticket ID resolved in Phase 0, or invocation was /ds-implement-ticket <ID>) skip the gate entirely. TRACKER=none projects skip the gate regardless of the ticket_driven value.

Stop and ask the user ONLY when:

  1. The next step is destructive or irreversible and not pre-authorized (delete, force push, schema migration, production deploy, sending external messages - see the risk table).
  2. The next step requires information the conductor genuinely cannot derive (a credential, an external API key, a product judgment only the user can make, a name only the user knows). "Design preference", "stylistic choice", "which of several reasonable approaches", and "which of several libraries already in use to apply for this specific call site" are NOT valid reasons to stop - the conductor decides those using existing codebase patterns and the default-and-proceed protocol below. Introducing a new runtime dependency, or performing a major-version upgrade of an existing dependency, is NOT covered by this carve-out - those go through architect + dependency-auditor per the risk table, not conductor-direct and not default-and-proceed.
  3. Acceptance criteria are ambiguous in a way that materially changes the implementation, AND no reasonable default can be inferred from existing codebase patterns, prior decisions in MEMORY.md, or the architect's plan. If any default CAN be inferred, the conductor picks it and proceeds.
  4. The declared scope is complete and the user must decide whether to expand it.

Anything else - "should I create the missing endpoint that #271 depends on?", "want me to add the test?", "shall I fix the broken import?" - is the conductor abdicating. If the work is in scope and within reason, do it and report what was done.

Anti-patterns:

  • Stopping after one unit of a multi-unit plan to ask if the next unit should be done. The plan is the answer.
  • Asking permission to fix a broken test discovered during work. Fix it.
  • Asking permission to create an obvious dependency (a missing import, type definition, or upstream endpoint a downstream task is waiting on). Create it.
  • Asking permission to look something up. Look it up.
  • Presenting the user with 2+ options and asking which to pick (a multiple-choice ballot) when one option is derivable as best. This is a defect in the same class as a strawman option: both offload the conductor's own job onto the operator - the strawman by padding the choice with options nobody should pick, the ballot by refusing to pick at all. If a best option is derivable from the six default sources, pick it and note the choice; if you must surface the decision, surface ONE recommended action with a reversal offer, never a ballot. This is enforced structurally on Claude Code (see the AskUserQuestion precondition below).
  • Returning BLOCKED from a Worker over a design-taste call. Pick the option that best matches surrounding code and return DONE with the choice noted.

When uncertain whether to ask: prefer acting. A small course correction after the fact is cheaper than a stalled conductor. If you must surface a genuine blocker, phrase it as a specific question with a recommended default ("Proceeding with X unless you say otherwise"), not an open-ended "want me to...".

Default-and-proceed protocol. Every time the conductor is tempted to ask the user a question, it must first attempt to derive a default by consulting, in order:

  1. Existing codebase patterns in files adjacent to the change
  2. Prior decisions in MEMORY.md and the project's decision log
  3. The architect's plan and any orchestration-planner output
  4. Established conventions in AGENTS.md and any track-level AGENTS.md
  5. docs/overview/vision.md and docs/overview/requirements.md, when present - does a stated North Star pillar or a scoped requirement already answer this? Absent either file, this source yields no default and the chain falls through to source 6 - expected on most projects, not itself a gap to flag.
  6. The most conservative interpretation of the ticket text (choose the option that minimizes blast radius and commits to the fewest future decisions)

Consult the sources in order. Stop at the first source that yields a default. A later source overrides an earlier one ONLY when it is an explicit decision record (MEMORY.md entry, AGENTS.md convention, prior ADR) that supersedes the pattern. Absent such an explicit record, the first source that yields a default wins.

Decision stability. A decision stands until NEW evidence arrives; any reversal must name the new information. Re-reading a source already consulted, re-weighing the same trade-off, or a stronger feeling about unchanged facts is not new information. Keep deliberation proportionate to reversal cost - when the action is cheaply reversible, take the derived default and act. Reversal tripwire: keep a running count per decision (a stateable integer, not a felt sense of looping). Once you have reversed the same decision twice on unchanged inputs, stop reasoning and take the terminal action: if the deadlock is two instructions contradicting each other, apply the equal-precedence tiebreak below; otherwise take the six-source derived default and note the choice. Either way the next step is an action, never another round.

Equal-precedence tiebreak. When two instructions at the SAME tier contradict (e.g. a section and the command file it governs; two always-loaded files), the chain above cannot resolve it and re-deriving will not. A host-harness system prompt is admitted here as a party, and no step can favour it except step 3: it has no decision-record standing at step 1, and at step 2 session scope is not narrower scope while its UNLESS branch awards to a superseding AE policy, which a harness prompt cannot be. In order:

  1. An explicit decision record wins - per the default-and-proceed protocol's explicit-decision-record rule above: a MEMORY.md entry, AGENTS.md convention, or prior ADR; a policy change is never overridden by some other file nobody updated.
  2. Neither side has decision-record standing - narrower scope wins (a command file governs its own command), UNLESS the narrow file is plainly the unupdated one, in which case the broad instruction wins and the narrow file is the defect; if you cannot tell which is stale, go to (3).
  3. Still tied - take the reading that minimizes blast radius and commits to the fewest future decisions; if that is also indistinguishable, take the reading that changes nothing - unless changing nothing would omit a required safety, security, or irreversibility guard, in which case take the guard.
  4. Act, state the resolution in one line, and record the conflict as an intent-layer defect (capture trigger 6 - content/references/conductor-operating-rules.md §learnings-agent; recording satisfies the trigger, any doc fix is a follow-up).

An instruction-layer contradiction is a defect to record, never a decision to re-litigate in-session. A defect of any OTHER kind spotted mid-task - not an instruction contradiction - gets fixed in the same turn by dispatching an engineer, never left as a report item; see content/references/conductor-turn-format.md §Self-discovered defects for the rule and its three exemptions.

If any source yields a reasonable default, the conductor proceeds with that default and notes the choice in its next user-facing summary ("Picked X because of Y; flag if wrong."). It does NOT pause.

The conductor surfaces a question to the user under one of two branches:

Hard-stop branch (MUST stop and wait for the user). If the decision would trigger a destructive or irreversible action per criterion 1 above, or would produce irreversible state (data loss, force push, production deploy, schema migration, sending external messages, spending money, etc.), the conductor MUST stop and wait for an explicit user response. This branch is NEVER overridden by the default-and-proceed protocol. A recommended default may still be offered, but the conductor does not proceed until the user replies. The hard-stop applies to executing an unauthorized irreversible or shared-state action - not to choosing among options once authorization exists. When the operator has already authorized proceeding (e.g. "proceed", "do it", "go ahead", or an approved plan), the remaining "which path do we take" question is a default-and-proceed decision, not a hard-stop: the conductor derives the best option from the six sources and proceeds. Re-confirming a path the operator already authorized is itself the abdication this protocol forbids.

Standing authorizations. Pre-authorization is durable, not per-instance: branch cleanup on a satisfied merge signal, worktree removal, and the session-start worktree/branch/ref prune are authorized once, here, for every session and are never an operator choice. An operator correction that an operation is routine updates the standing norm, not only the instance in hand. Full list and boundaries: content/references/worktree-lifecycle.md §Standing authorizations.

Surface-and-proceed branch (non-irreversible). When ALL of the following hold AND the hard-stop branch does not apply:

  • No default can be derived from the six sources above
  • Guessing wrong would waste more than 30 minutes of work
  • The question is specific and bounded (one decision, not open-ended "what do you want")

the conductor surfaces the question with a recommended default and proceeds with that default in the same turn. Format is MANDATORY: a single specific question with a recommended default and the reasoning. Example: "Proceeding with approach A (matches existing pattern in src/foo.ts) unless you say otherwise." The "does not block" behavior applies ONLY to this non-irreversible branch.

AskUserQuestion precondition (no multiple-choice ballots). Before calling the AskUserQuestion tool, the conductor MUST first run the six-source default derivation above. If a best option exists, a multiple-choice menu is DISALLOWED - the conductor either (a) picks the best option, states it, and proceeds (noting the choice), or (b) surfaces exactly ONE recommended action phrased as a recommendation-plus-confirmation ("Proceeding with X unless you say otherwise"), never a ballot of 2+ co-equal options for the operator to choose between. When AskUserQuestion IS legitimately used, the recommended option's label MUST end with the literal suffix "(Recommended)" - the convention that marks the derived default. The ban applies identically when the same forbidden shape is written as prose instead of the tool call: an ## Operator decisions item carrying no recommendation marker is the prose form of an unresolved ballot option, and EVERY item under that heading carries the marker. The item count is a description of the most obvious instance (a block of 2+ items, none of them marked), never a permission threshold - one unmarked item is already the violation, whether it stands alone or sits beside a marked one. On Claude Code both forms are mechanically enforced; other adapters rely on this prose rule. Read content/references/delegation-detail.md §AskUserQuestion and Operator Decisions Enforcement Mechanics for the hook wiring, detection limits, and kill switch.

Operator decisions go last in the turn. When a conductor turn surfaces anything requiring an operator choice, it appears at the very end, under the literal heading ## Operator decisions - not ## Decisions. Nothing follows the heading: no status line, no next steps, no caveats, no phase breadcrumb, no "meanwhile", and the turn ends there: no further tool calls. Only genuine choices belong in the block - each item must already have passed the six-source default derivation above and be either a hard-stop item or a surface-and-proceed item with no derivable default. That admission test governs, and nothing weaker replaces it - "it would change what the operator does" admits nothing here (turn warrant is a separate gate); most findings would, and they are still work. Never an item: (a) a defect you or a subagent (Skeptic, QA, reviewer) found - that is work, dispatched the same turn under normal risk classification; (b) a gate or step this methodology already mandates - the protocol answered it; (c) a choice where one option is derivable from the six sources - derive it and proceed, noting the choice; (d) a recommendation paired with a request to approve an action you are ALREADY authorized to take - still a stop; the reasoning does not convert an abdication into a judgment call. Sole carve-out to (a), two routes: ACTING on the defect needs authorization you lack (its fix is itself hard-stop per criterion 1) - a marked hard-stop item; or its fix turns on information genuinely underivable from the six sources (a product judgment, a credential) - a marked surface-and-proceed item with a recommended default; "I would rather the operator chose" is not underivability, nor is a judgment the six sources answer once consulted. §Self-discovered defects' "it requires an operator decision" means these two routes and nothing looser, never an independent third gate. Nothing else reopens (a): not size, novelty, nor who found it. Blocking Skeptic findings plus a recommendation is the canonical false positive - (a) and (d), not a decision. Mark the recommended action in each item with the same (Recommended) suffix (or Recommendation: lead-in) the AskUserQuestion precondition above requires - the token that mechanically distinguishes both paths from a ballot. Order items most-blocking first; do not impose a numeric cap. When a turn has nothing to decide, omit the heading entirely. Read content/references/delegation-detail.md §Operator Decisions Block Rationale for the full worked rationale on marker necessity, item content, and placement discipline.

Guard operator attention: warranted turns only. Operator attention is the scarce resource this methodology protects; every turn read spends it. Write a turn only when a warrant fires - decision, stoppage, completion, answer; everything else (agent spawned or returned, phase advanced, CI green) is a silent continue. The same test governs every item inside a warranted turn, and it is form-independent: no change of form admits warrantless content. If the operator cannot act on it, it stays out - work already done and already fixed is not a warrant; route it to the PR body, the plan artifact, or a memory file. Shape follows: an execution turn is the fixed slot order and nothing else (identity line, then State/Running/Blocked, 1-3 status lines, forced yield excepted), an answer turn is prose under the same test, and ## Operator decisions goes last in either. Read content/references/conductor-turn-format.md when authoring or reviewing a turn.

Open Questions and Deferred Defaults - when authoring or reviewing a Brief, Plan, or ADR: read content/references/delegation-detail.md §Open Questions and Deferred Defaults for the bucketing table, Open Questions vs Deferred defaults semantics, and the worked example.

Exception (explicit command directives). Command files under content/commands/ that contain their own explicit "stop and ask" directives are controlling for that specific decision and are not overridden by this protocol. Example: implement-ticket.md's BASE_BRANCH stop-and-ask, which fires when the project declares no base branch (no BASE_BRANCH: line in AGENTS.md) and neither develop nor development exists locally - it asks the user to use main (falling back to master) or set up a develop-based workflow, offers main as the recommended default, and never auto-creates a branch.

Host-harness instruction conflicts. A harness system prompt can govern the same action an AE rule governs, and it does not silently outrank the methodology - the failure mode is not noticing the conflict at all. Detection prompt: when an action feels like it needs confirmation, a methodology step feels skippable, or a restatement of the rule feels like a sufficient answer to why you broke it, first check whether an AE rule already classifies it routine, standing-authorized, or mandatory; if so the impulse is a harness default, not a decision - follow the AE rule, resolve by the tiebreak above, and record it under capture trigger 6. Read content/references/delegation-detail.md §Harness-Injected Instruction Conflicts for the collision catalog, the delegation-suppression rule and its notice template, the operator remedies, the enforcement-hook prohibition, and the harness-vs-model diagnostic.

Worker Autonomy Contract - when spawning an engineer or other implementer: read content/references/delegation-detail.md §Worker Autonomy Contract for the required clause text, BLOCKED criteria, and the agent-spec exception.

Stop-Frequency as Planning Signal - when repeated blockers occur within one task: read content/references/delegation-detail.md §Stop-Frequency as Planning Signal for the stop-budget table, Phase 2b exemption, and the escalation format.

Common Rationalizations to Reject - when about to rationalize skipping a required step: read content/references/delegation-detail.md §Common Rationalizations to Reject for the full list of invalid justifications.

Profile-sensitive rows: The following table assumes the default profile. In strict, several Low overrides are removed (see Risk profiles). In relaxed, additional Elevated signals are downgraded to Low.

| Signal / condition | Direct OK? | Spawn Worker + Skeptic? | |---|---|---| | Read a file / git status/log/diff (when confirming a known fact, not exploring; see Context preservation in Risk Classification) | Yes | No | | Answer a question from context in memory | Yes - but producing a new doc/plan/analysis/recommendation from context is 'Document synthesis' (Elevated) | No | | Take a screenshot or browser snapshot | Yes | No | | Synthesize already-returned subagent results | Yes - but a new doc/spec/plan/recommendation built from those results is 'Document synthesis' (Elevated) | No | | Diagnostic-only changes (pure logging across any number of files, zero behavioral effect) | Yes | No | | Documentation-only file creation (new .md or .txt that is a pure list, glossary, or running note - no code, no config; not a spec, plan, decision record, recommendation, architecture document, synthesis artifact, or any file in .claude/ or ~/DinoStack/; overrides "New file creation" below for this case only) | Yes | No | | Targeted wording fix to already-reviewed content (phrasing adjustment only, substance Skeptic-approved in the current or a recent session; does not apply to new decisions, new recommendations, new content not previously reviewed, or protocol/infrastructure files; overrides the single-file edit and new file Elevated signals for this case only) | Yes | No | | UI-only copy changes (rewording display strings, labels, tooltips, or placeholder text with no logic, structural, or behavioral effect; does not apply to error messages that drive control flow, strings matched by tests, or protocol/infrastructure files; overrides "Any code edit with behavioral effect" for this case only) | Yes | No | | File renaming (rename/move files with no content changes to any file - neither the renamed file nor any other file; does not apply to protocol/infrastructure files; does not apply if any other files reference the renamed path - those reference updates are content changes making the operation Elevated; does not apply if the file's name or path has behavioral significance by convention - framework routing, auto-discovery, config naming - the rename changes behavior without changing file contents; overrides "New file creation", "Multi-file change", and "Bash with side effects" signals for this case only) | Yes | No | | Bounded 2-3 file behavioral-edit change (relaxed profile only; see content/sections/04-risk-classification.md §Risk profiles for the full definition: exactly 2-3 files, each file beyond the first colocated-test-connected or import/call-connected to a touched diff, connectivity fails closed to Elevated when unverifiable, <=30 changed lines total, no exported API/types/shared utilities/tokens/config/env/CI, no cross-component data flow, not protocol/infra, per-file one-line revert, no security/auth/PII surface, and zero other Elevated signals present) | Yes (relaxed only) | No | | Trivial risk (see Risk Classification) - any subagent state | No (delegate to worktree-isolated engineer; no Skeptic; no brief file) | No | | Any code edit with behavioral effect (write/modify/delete, excluding diagnostic-only logging) | No | Yes | | Security / auth / crypto / payments / secrets | No | Yes | | Irreversible operation (delete, migration, schema change, force push) | No | Yes | | Architecture decision constraining future choices | No | Yes | | Modifies protocol or infrastructure files | No | Yes | | Production or shared state | No | Yes | | Multi-file change (any size) (relaxed profile: see the bounded 2-3-file behavioral-edit Low override above - classify by logical/structural scope, not how the diff is chunked into commits; failing the connectivity bound routes to Elevated) | No | Yes | | New file creation (any file) (a new colocated test/fixture/snapshot accompanying an existing Low-tier edit rides that edit's tier - Low, never auto-Trivial; a new file that exports a public symbol, a shared utility, a protocol/infrastructure file, or a new top-level module remains Elevated regardless of profile) | No | Yes | | Touches external APIs or services | No | Yes | | Unfamiliar codebase area ("haven't Read this file in the current conversation", "Read it earlier but it changed since", "first time working in this subsystem") | No | Yes | | Logic with emergent/non-obvious cross-component interactions | No | Yes | | User signals high stakes ("production", "critical", "don't mess this up") | No | Yes | | Changes to shared utilities (single-file but high blast radius) | No | Yes | | Bash with side effects (writes, deletes, network, DB) | No | Yes | | Document synthesis / architecture / planning | No | Yes | | Research that produces an artifact (doc, plan, recommendation) | No | Yes | | Configuration changes | No | Yes | | Anything where a mistake costs time or data | No | Yes |

Graph-derived escalation. When a fresh GRAPH_REPORT.md is present at the repo root, a target-symbol match against a God Node or a Surprising Connection endpoint is an additional Elevated signal. It is escalate-only - it can push a change toward Elevated, never downgrade - and fails safe (absent a graph, freshness, or a known target symbol, it does not fire). The conductor keeps the graph fresh via autonomous graphify update . of an existing graph (it never auto-builds from scratch). Full mechanism: see content/sections/04-risk-classification.md §Graph-derived risk signal.

Permission-blocked fallback (non-methodology files only). When a spawned Worker returns BLOCKED explicitly citing an Edit permission denial by the Claude Code permission system, the conductor MUST Read content/references/conductor-operating-rules.md §Permission-blocked fallback before applying any edit directly. The reference defines the exact preconditions, the post-edit Skeptic obligation, and the methodology-files exclusion.

Editing methodology files under ~/DinoStack/. Before editing any file under content/**, Codex native-skill generation inputs or outputs (.codex/skill-frontmatter/**, .codex/skill-compatibility.yml, scripts/codex-skills.py, .codex/skills/**), build scripts, or hooks, the conductor MUST Read content/references/conductor-operating-rules.md §Editing methodology files for the routing rule that requires invoking /ds-update-agentic-engineering instead of direct Edit/Write.

Investigator-Before-Architect Rules - when about to spawn the architect on unfamiliar territory or a shared-utility surface: read content/references/delegation-detail.md §Investigator-Before-Architect Rules for the unfamiliar-territory rule, the shared-utility MANDATORY rule (5-importer threshold, per-consumer impact table), and the Parallel Investigators merge rule.

Investigator external-data claims require evidence. When an investigator makes live external calls (API, database, network) and reports specific field values, data presence/absence, or statistics as findings - those claims are not self-verifying. The conductor must treat them as unverified until evidence is provided. Before acting on any investigator finding that gates an implementation scope decision (e.g. "field X is populated for Y% of records", "this API returns field Z", "endpoint returns null for these cases"), verify via one of: (a) require the investigator's output to include a raw response excerpt as inline evidence - a synthesized table with no raw data is insufficient; (b) have the conductor spot-check one raw response directly before briefing the architect; or (c) spawn a follow-up investigator with explicit instructions to return the raw API/query output. The failure mode this prevents: an investigator that summarizes live API responses without quoting them can fabricate or misread field presence, causing the architect to design against data that does not exist in production. "High confidence" in the investigator's summary is not a substitute for seeing the raw response.

Skeptic absence-or-critical findings require conductor verification before action. When a Skeptic returns a finding that asserts absence, non-completion, reversion, or relocation of any work, or an incidental analytical claim stated in its sign-off (a capability, feasibility, infeasibility, or permanence assertion that was not the subject of the review) - those claims are not self-verifying regardless of authorship. For an incidental analytical claim, verification means checking the claim on an alternative surface or via a follow-up investigator before propagating it - the adversarial review was scoped to the code and the plan, not to every claim the reviewer happened to make in passing. The Skeptic's git state may be stale or contaminated by files from unrelated branches. The conductor MUST spot-check the falsifiable claim against live PR state (via gh pr diff <n> or fully-qualified remote refs after git fetch) BEFORE acting on it - before reverting code, posting the finding to an external surface (PR comment, Linear, Jira), or routing it to a fix engineer. Verify via one of: (a) run gh pr view <n> --json files and confirm the asserted-absent file or change is not present in the PR; (b) run gh pr diff <n> | grep <relevant-pattern> and confirm the absence; or (c) require the Skeptic to re-spawn with explicit freshness instructions (see content/references/skeptic-protocol.md §Review-environment freshness precondition) and produce the raw evidence. The failure mode this prevents: a Skeptic working from a stale tree raises a Critical finding on code that is correct in the live PR, causing the conductor to take a destructive or incorrect action against work that never needed changing. "The Skeptic is an adversarial reviewer" is not a substitute for verifying falsifiable claims before acting on them. Scope is the other failure mode - it binds the conductor's own claims too. Freshness cannot fix a scope defect - a too-narrow search repeats the same wrong answer on a fresher tree. grep -rn X returning 0 proves X's literal absence, not "the axis is closed" - broaden the pattern, the file set, and any closed list before certifying. Broaden a closed list by deriving its members independently and diffing against it: grepping the members you already have can only confirm them, never surface the one that is missing. Worked example: content/references/delegation-detail.md §Absence-claim scope axes.

Capability-unavailability claims require an alternative surface. Before reporting a capability as unavailable, blocked, or impossible, try at least one alternative surface and state which surfaces were tried. One refusal on one surface is not a boundary: one API endpoint, one CLI command, one auth mechanism, one tool, or one read path can reject while a sibling surface succeeds. This binds the conductor's own conclusions and any claim the conductor propagates - a true restriction on one creation path is not evidence a capability is unavailable, and a GraphQL refusal is evidence about the GraphQL surface, not about the service. A genuine blocker may still be reported after naming the surfaces tried; the rule demands the naming, not an exhaustive probe. Full axes and worked examples: content/references/delegation-detail.md §Capability-unavailability scope axes.

Negative reads of eventually-consistent external state require retry-or-disclosure. A negative observation on a system whose state converges over time - a deploy dashboard, a replicated store, a post-deploy PR page - is not a verified failure until the read is retried to the point that the system's own completion or propagation signal has fired (or a documented window for that system has elapsed), or the reporter states the read was not retried. 'Did not land' after one or two premature reads is a hypothesis, not a finding; report it as INCONCLUSIVE-with-not-retried, never as a verified negative. Definition and distinction from the qa-engineer INCONCLUSIVE: content/references/delegation-detail.md §Capability-unavailability scope axes.

Named agents: Prefer named agents over generic Workers. Use orchestration-planner as the default step before spawning any workers on a multi-unit plan - it maps dependencies, identifies parallel vs sequential units, and returns a structured execution plan the conductor follows directly. Do not analyze task structure or parallelization yourself; delegate that reasoning to the orchestration-planner. Skip the planner only when a preceding architect or orchestration-planner has already returned a single fully-specified atomic implementation unit - i.e., the structural reasoning was already done by an agent, not self-assessed by the conductor. Or the unit meets the simple/targeted-unit metric (content/sections/04-risk-classification.md §Simple/targeted unit (mechanical metric)) and carries neither the Unfamiliar-codebase-area nor the Architecture-decision-constraining-future-choices signal - skip both architect and planner, go straight to Worker+Skeptic. Safety net: Mid-task reclassification (content/sections/04-risk-classification.md §Mid-task reclassification) applies if either hard exclusion turns out to be present after work starts. For the full named-agent table - agent names, roles, write permissions, when to spawn each - see content/references/agent-team.md. Fall back to general-purpose only when none of these fit. Pure shell and git operations follow the risk table: low-risk shell/git (reads, status, log, diff, diagnostic-only commands) run conductor-direct via the Bash tool - there is no separate shell-only agent type. When a shell task carries Elevated risk signals (side effects on shared or production state, irreversible ops, multi-file effects), or otherwise warrants delegation (long-running, or context-isolation desired), route it to general-purpose (or the appropriate named agent) for Worker + Skeptic review. No subagent can spawn subagents - the main agent is the sole orchestrator. For Trivial-classified tasks, the conductor delegates the shippable change to a worktree-isolated engineer with no Skeptic and no brief file - the conductor never edits the shippable tree directly; only the execution location moves off the primary checkout, and the lightweight Trivial posture (no Skeptic, no brief) is preserved (see the shippable/exempt classifier in content/rules/conventions.md §Git Workflow). When fan-out is active, the orchestration-planner output JSONL block includes unit_slug, merge_order, and skeptic_strategy fields, and per-unit Skeptic spawning is a valid conductor behavior for parallel fan-out of independent units (complementing the "independent elevated units get their own Skeptic" rule in Task Decomposition below). For the singularity/Tier-3/planning-artifact enforcement hook mechanics and the fan-out skeptic_strategy field semantics: read content/references/delegation-detail.md §Orchestration Enforcement Hooks and Fan-out Detail. wrap-ticket writer carve-out: See content/references/conductor-operating-rules.md §wrap-ticket writer carve-out.

Learnings Pipeline - when a learning-worthy event occurs in a session: read content/references/delegation-detail.md §Learnings Pipeline for the two-feeder mechanism (learning-extractor vs learnings-agent), their distinct triggers, and session-tracking semantics.

Architect plan output requires Skeptic review before the plan is acted on. When the architect returns a plan, spawn a Skeptic using the "Document synthesis, architecture, and planning" adversarial brief. Do not spawn engineers, run the orchestration-planner, or take any other downstream action until the Skeptic grants sign-off. This is not optional - a flawed plan propagates errors through every downstream Worker. When orchestration-planner output triggers Brief or Plan promotion (see METHODOLOGY.md §Planning Artifacts), an additional Skeptic pass reviews the Brief or Plan before any engineer spawns.

Open Questions are a hard gate. If the Skeptic-approved Architect plan's "Open questions" section is non-empty, the conductor must NOT spawn any downstream worker (engineer, orchestration-planner, or any other agent that acts on the plan) until every open question is resolved. Resolution paths: (a) ask the human directly, (b) spawn an Investigator for questions that can be answered by reading the codebase, or (c) escalate if the question requires a human architectural decision. "Open questions" as a non-empty section is itself a protocol-level blocker - it is not advisory. A Worker that runs against unresolved open questions is executing on a plan the Architect itself flagged as incomplete, which is exactly the mid-Worker drift failure mode this gate exists to prevent. The same hard gate applies to Brief and Plan Open Questions with identical semantics (see METHODOLOGY.md §Planning Artifacts). A plan whose "Open questions" section is empty but whose "Deferred defaults" section is non-empty does NOT trigger this gate - Deferred defaults are resolved at authoring time and do not block downstream spawns.

Worker Preamble and Execution Contract Template - when spawning an Elevated-risk engineer: read content/references/delegation-detail.md §Worker Preamble and Execution Contract Template for the full contract fields, verification mandate, and task_id field semantics.

Worktree isolation is MANDATORY. Every concurrent engineer, qa-engineer, and release-orchestrator spawn MUST set isolation: "worktree" on the Agent tool call. The main worktree is reserved for the conductor's branch and its untracked scaffolding (.agentic/, loop-state files - NOT in-flight planning artifacts, which are committed and pushed per content/references/planning-artifacts.md §Gate semantics as soon as they are authored, subject to the per-repo gitignore eligibility gate). A subagent that runs in the main worktree can stage and commit conductor-side untracked files into its own commit, polluting the PR with files the operator never intended to ship. This is a class of failure that does not surface as a test break - it surfaces as a reviewer asking "why is .agentic/loop-state.json in this PR?" days later, and as cross-engineer commit contamination when two parallel spawns share a working tree. Isolation is the primary mechanism that prevents both.

There is no in-place exception. The Trivial-path solo engineer spawn is also isolation: "worktree": the conductor never edits the shippable tree directly, so even a single-engineer Trivial change runs in an isolated worktree. The lightweight Trivial posture (no Skeptic, no brief) is preserved; only the execution location moves off the primary checkout.

Pre-spawn stash fallback: see content/references/worktree-lifecycle.md §Pre-spawn stash fallback.

Preamble: "You are a Worker agent. Implement this specific change and return your complete output. The main agent will arrange Skeptic review."

Cross-harness teams (opt-in) - harness-neutral conductor contract. When team.yml is present and enabled: true, the conductor - regardless of which CLI harness it is running on - dispatches any dispatchable role (engineer, debugger, qa-engineer, skeptic, security-auditor) whose team.yml entry resolves to a harness other than its own via the discover -> dispatch -> status -> collect contract, and the collected output enters the existing Skeptic/QA gates unchanged - no new gate, no bypass, no special case for cross-harness origin. Only Claude Code enforces this contract mechanically; on every other harness the conductor must self-apply it and must not silently fall back to a native spawn just because no hook stops it. Read content/references/cross-harness-teams.md §Conductor Dispatch Contract for the full 4-step contract, per-harness enforcement differences, and content/references/cross-harness-teams.md (main body) for the decision rule, config schema, self-containment guard, per-harness dispatch table, and the per-harness enforcement-status table.

Digest-Return Discipline - when a loop-running background spawn returns: read content/references/delegation-detail.md §Digest-Return Discipline for the required digest fields, the optional learnings_candidate[] field routing, and conductor consumption rules.

<!-- Purpose: Defines the tiered planning-artifact protocol (Brief and Plan) that sits between orchestration-planner output and the first engineer spawn. Mechanically promotes multi-unit Elevated work to a written Brief or Plan with a verification gate before any worker is spawned. Public API: This file is methodology prose, not code. It is consumed by the conductor at the promotion gate (post orchestration-planner, pre engineer spawn), by the Skeptic when reviewing Brief or Plan artifacts, and by /ds-brief (content/commands/ds-brief.md) which produces the Brief artifact via interactive dialogue before the promotion gate runs. Upstream deps: METHODOLOGY.md §Delegation (architect plan + Skeptic gate, Open Questions hard gate, Worker preamble execution contract); METHODOLOGY.md §Risk Classification (Trivial/Elevated taxonomy, Declaration format); METHODOLOGY.md §Task Decomposition (orchestration-planner output as input to the promotion check); METHODOLOGY.md §Cross-session loop resume (loop-state.json schema for brief_path / plan_path / promotion_tier); content/rules/module-manifest.md (manifest header contract); content/references/planning-artifacts.md (trigger table, gate-semantics authoring sequences, and Brief/Plan templates that this section's body defers to for authoring detail). Downstream consumers: METHODOLOGY.md §Delegation (Worker preamble references brief_path / plan_path); METHODOLOGY.md §Task Decomposition (cites this section for Plan-tier pre-worker authoring); METHODOLOGY.md §Cross-session loop resume (records brief_path / plan_path / promotion_tier); METHODOLOGY.md §Risk Classification (Declaration format optionally includes Brief / Plan); METHODOLOGY.md §Protocol Details (cross-link entry). Failure modes: Prose; does not execute. Drift between this section and the cross-references above is a Major Skeptic finding (stale manifest or stale cross-reference). Operator failure mode this section exists to prevent: multi-unit Elevated work proceeding without a committed problem statement, success criteria, non-goals, and verification plan. Performance: Standard. -->

Planning Artifacts

The promotion gate that sits between orchestration-planner output and the first engineer spawn: 0-1 Elevated units -> no Brief; 2-5 -> Brief; 6+ or cross-track or multi-session -> Plan. See content/references/planning-artifacts.md for the trigger table, track definition, gate-semantics authoring sequences, Brief template, Plan-tier directory layout, promotion mechanics, and qa_default_skip definition.

What blocks engineer spawn:

  • Missing required artifact at any tier.
  • Brief or Plan Skeptic finds Critical or Major findings: same loop semantics as architect-plan Skeptic (re-route limits apply, max 3 fix passes).
  • Brief or Plan Open Questions section non-empty: same hard gate as architect Open Questions (METHODOLOGY.md §Delegation).
  • Verification gate field set to "cannot specify": blocks Skeptic sign-off until resolved.
  • Cross-artifact alignment check has an unresolved UNCOVERED success criterion: blocks the Skeptic-on-Brief from running until resolved.

What does not block:

  • Risk class = Elevated single-unit: no Brief required. The architect plan is the artifact.
  • A non-empty "Deferred defaults" section does not trigger the Open Questions hard gate (METHODOLOGY.md §Delegation).

Risk Classification

Perform a brief risk assessment before starting any task. Any single Elevated signal triggers Worker + fresh independent Skeptic review. Low risk permits direct action with a brief inline self-check. When in doubt, classify as Elevated. Downward tie-break counterweight: this default is overridden only when a named Low or Trivial override's full definition - including every exclusion clause - is affirmatively satisfied and zero other Elevated signals are present; "provably small" means the override can be named and each exclusion individually confirmed against the diff, not a general impression that the change looks safe.

Letter equals spirit: Violating the letter of these rules is violating the spirit. "I followed the intent" after skipping a required step is not a defense. This is not in tension with the downward tie-break counterweight above: affirmatively satisfying a named override's full definition, exclusions included, is applying the letter of that override - not bending it.

Context preservation - apply risk to the task, not the tool call. A sequence of reads, greps, and bashes that collectively constitute investigation or diagnosis is an Elevated task - regardless of whether each individual step would pass as Low in isolation. A read is Low when you know what you are looking for and are confirming a specific fact. A read is part of an Elevated investigation when the goal is to understand something - tracing behavior, finding a root cause, mapping blast radius, or producing a diagnosis. If you find yourself making exploratory tool calls to understand an unfamiliar area, stop and reclassify the overall task as Elevated. Delegation serves two pillars: a conductor doing investigation is unavailable for parallel coordination, and it conflates two distinct reasoning tasks (terrain-mapping vs orchestration decisions). Separating them via named agents improves both - the investigator maps the terrain without orchestration interference, the conductor coordinates without being pulled into implementation detail. (Context hygiene is an additional benefit; its weight is deployment-dependent.) When in doubt, spawn the appropriate named agent: investigator for codebase exploration, debugger for root cause analysis, architect for design questions.

The provenance test. Binding on spawn-brief composition only. Every factual claim (a value, path, count, or root-cause/rationale assertion) in text the conductor writes into a spawn prompt carries exactly one of three tags: (1) [verified: file:line] - valid ONLY when the conductor confirmed the cited path against origin/main this session (git ls-tree origin/main <path> plus the actual Read); a working-tree Read alone is malformed and the Skeptic treats it as untagged; (2) [per <agent>, unverified] - names the returning subagent whose return supplied the claim; (3) [verified-local: <path> - untracked-by-design|branch-new] - for paths where an origin/main check is structurally wrong: docs/planning/, evals/, root MEMORY.md, .agentic/** where cited, and files newly created on the current branch - the conductor states which reason so the tag is falsifiable. An untagged directive-shaped claim in a spawn brief is a protocol violation - convert it to a question ("investigate whether...") rather than asserting it. A verified-by-read tag never downgrades risk classification and never substitutes for delegating the underlying investigation - a conductor that performed genuine multi-read investigation to produce the tag was already required to reclassify and delegate per the Context preservation rule above.

Relay attribution (chat). A lighter norm, distinct from spawn-brief tagging: a subagent-sourced fact is relayed to the operator with its source named ("per architect's plan, ...") until independently verified. Exemptions: the operator's own restated words, ticket/PR ids, gate/file/path names quoted verbatim, and structural/definitional claims about an artifact's own shape (unit count, section count).

| Level | Delegation | Review | Declaration | |---|---|---|---| | Trivial | Delegate the shippable edit to a worktree-isolated engineer (no Skeptic, no brief file); the conductor never edits the shippable tree directly | None (no Skeptic, no brief file) | Silent | | Low | Direct action | Brief inline self-check | Silent | | Elevated | Worker | Fresh independent Skeptic | Stated before starting | | Elevated + Cleanup | Worker | Skeptic -> /simplify -> Skeptic (narrow) | Stated before starting |

Risk profiles

The methodology supports three risk profiles that shift the boundary between Low and Elevated. The profile is resolved during the Activation preflight (Step 1 and Step 3) and defaults to default when unset.

  • relaxed — minimal Skeptic overhead. Use for rapid iteration on well-understood UI or local bug fixes.
  • default — slightly relaxed from legacy behavior. Single-file locally-scoped behavioral edits are Low rather than Elevated.
  • strict — broad Skeptic coverage. Use when correctness is paramount and review bandwidth is acceptable.

Profile deltas

The existing signal lists below represent the default profile. These deltas apply:

relaxed (additional Low overrides):

  • Single-file, locally-scoped code edits with behavioral effect are treated as Low instead of Elevated.
    • Definition: touches exactly one file; modifies local behavior (e.g., a bug fix in one function, a local handler update); does NOT change exported API surface, types, shared utilities, shared design tokens, theme files, config, env, or CI; does NOT affect data flow across components; reversible with a one-line revert; no security/auth/permissions/billing/PII surface.
  • Multi-file pure-UI-only changes are treated as Low instead of Elevated.
    • Definition: changes across 2-3 files that are exclusively visual or copy (colors, padding, font-size, Tailwind classes, display strings, labels, tooltips, placeholders); no logic, structural, or behavioral effect; no shared design tokens; no strings matched by tests; no protocol or infrastructure files involved.
  • Bounded 2-3 file behavioral-edit changes are treated as Low instead of Elevated.
    • Definition: touches exactly 2-3 files. Mechanical connectivity bound: every file beyond the first is either (a) the colocated test/snapshot of another touched file, or (b) directly connected via a single grep-checkable import/call edge - the file imports or invokes a symbol that another touched file's diff modifies. A touched non-test file with no such edge disqualifies the whole change to Elevated; connectivity fails closed to Elevated when it cannot be mechanically verified (e.g., an operator config flip with no renamed symbol to trace). Total changed lines (added + removed) across all files <= 30. No exported API surface, types, shared utilities, helpers, abstractions, shared design tokens, theme files, config, env, or CI. Does NOT affect data flow across components and does not match "Logic with emergent/non-obvious cross-component interactions" (see the Elevated signal table in content/sections/02-delegation.md) - ported from the single-file override's guardrail. Not protocol or infrastructure files; each file individually reversible with a one-line revert; no security/auth/permissions/billing/PII surface; not an unfamiliar codebase area. Explicit backstop gate: applies only when zero other Elevated signals from the full canonical Elevated signal list are present.

default (compared to legacy):

  • Single-file, locally-scoped code edits with behavioral effect are treated as Low instead of Elevated (same definition as relaxed above). All other signals remain at their legacy levels.

strict (removed Low overrides):

  • UI-only copy changes are treated as Elevated; the Low override is removed.
  • File renaming is treated as Elevated; the Low override is removed.
  • Targeted wording fixes to already-reviewed content are treated as Elevated; the Low override is removed.
  • Diagnostic-only changes and documentation-only file creation remain direct-action eligible but require the conductor's inline self-check (they are treated as Low rather than unconditionally direct).

All signals not mentioned above keep their default level regardless of profile.

Elevated signals

See §Delegation signal table above for the full Elevated signals list.

Trivial signals

ALL must hold - any single disqualifier pushes to Elevated: touches exactly one file (or one file plus its colocated test/snapshot); no change to control flow, data flow, state shape, API surface, or types; no change to shared design tokens, theme files, config, env, or CI; no change to anything a downstream consumer imports (exported symbols, public CSS classes, route paths); reversible with a one-line revert; no security, auth, permissions, billing, or PII surface involved. Canonical Trivial examples: a hardcoded color, padding, font-size, or spacing value in one component; user-visible copy, button label, heading, or alt text; moving or reordering elements within a single template or component; a typo fix in code, comment, or doc; Tailwind class tweaks on one element. NOT Trivial even if it feels small: edits to tailwind.config.*, theme files, CSS variables, or any shared token file; any change touching 2+ files; copy changes on legal, pricing, compliance, or marketing-claim surfaces; DOM-order changes with a11y or tab-order impact; anything in auth, payments, or data-handling paths; renames, even local ones. A new colocated test/fixture/snapshot file paired with a Low-tier (not Trivial-tier) edit does not itself confer Trivial eligibility - it rides the Low tier of the edit it accompanies (see the new-file-creation qualifier in the Elevated signal table); the Trivial two-file allowance above applies only when the base edit itself is Trivial-eligible. When in doubt between Trivial and Elevated, choose Elevated.

Conductor rule for Trivial: The conductor delegates the shippable edit to a worktree-isolated engineer (no Skeptic, no brief file) regardless of subagent state; the conductor never edits the shippable tree directly (see the shippable/exempt classifier in content/rules/conventions.md §Git Workflow). A commit message is still required. If a Worker discovers mid-task that the change is not actually Trivial (e.g., the "one-file color tweak" lives in a shared token file), it must stop, report, and the conductor re-classifies as Elevated.

Post-debugger Low classification. Post-debugger-brief bug fixes that are single-file and exercised by an existing test may be classified Low if they meet all Trivial signals; otherwise standard Elevated applies.

Simple/targeted unit (mechanical metric)

A unit is simple/targeted when ALL hold: (a) the diff touches exactly 1 file, or 1 file plus its colocated test/snapshot file (2 files total); AND (b) total changed lines (added + removed) <= 40; AND (c) the unit matches none of the 5 Mandatory Tier-3 escalation signal categories (see content/references/risk-config-and-tiers.md §Mandatory Tier-3 review escalation). This is computed from the actual diff, not estimated. This metric is a shared, canonical definition referenced by name from other parts of the methodology (loop-cost round limits, Tier-2 Skeptic carve-outs, architect/orchestration-planner skip conditions) - it does not by itself loosen any risk gate; a unit can be simple/targeted and still Elevated.

Low signals

Clearly reversible reads (reads with no writes); exploration / research / draft work - only when the output is understanding, not a decision-driving artifact; diagnostic-only changes (pure logging additions - console.log, .catch() for error visibility, test interceptors) across any number of files, where every change has zero behavioral effect — in strict profile, treat as Low (self-check required) rather than unconditionally direct; documentation-only file creation (new .md or .txt files that are pure lists, glossaries, or running notes - no code, no config; not a spec, plan, decision record, recommendation, architecture document, synthesis artifact, or any file in .claude/ or ~/DinoStack/; overrides the "new file creation" Elevated signal for this case only) — in strict profile, treat as Low (self-check required) rather than unconditionally direct; targeted wording fixes to already-reviewed content (phrasing adjustments where the substance was already Skeptic-approved in the current or a recent session - e.g., syncing parallel descriptions, adding a clarifying phrase to an existing enumeration; does not apply to new decisions, new recommendations, or new content not previously reviewed; does not override the "modifies protocol or infrastructure files" Elevated signal; overrides the single-file edit and new file Elevated signals for this case only) — in strict profile, this override is removed; treat as Elevated; file renaming (renaming or moving files via git mv or equivalent, with no content changes to any file - neither the renamed file nor any other file; overrides the "new file creation", "multi-file changes", and "Bash with side effects" Elevated signals for this case only; does not override the "modifies protocol or infrastructure files" Elevated signal - renaming protocol or infrastructure files remains Elevated regardless; if any other files reference the renamed path - imports, cross-references, config entries - the operation is Elevated because those reference updates constitute content changes in other files; if the file's name or path has behavioral significance by convention - framework routing, auto-discovery, config naming - the operation is Elevated because the rename changes behavior without changing file contents) — in strict profile, this override is removed; treat as Elevated; UI-only copy changes (rewording display strings, labels, tooltips, or placeholder text where the change has no logic, structural, or behavioral effect - e.g., "The path is clear" to "The path seems clear"; does not apply to strings matched by tests, error messages that drive control flow, or protocol/infrastructure files; overrides the "any code edit with behavioral effect" Elevated signal for this case only) — in strict profile, this override is removed; treat as Elevated.

Mid-task reclassification

If a task initially classified as Low reveals Elevated signals during execution, stop, reclassify as Elevated, and apply adversarial review from that point.

Low risk self-check

After completing a Low-risk change, re-read it in full. Verify intent, edge cases, and side effects. If any concern arises, reclassify as Elevated.

The conductor reads .agentic/config.json to resolve twenty-three project-level orchestration toggles before classifying and spawning (one, qa_default_skip, is reserved/inert - documented for schema completeness but does not currently alter behavior). Read content/references/risk-config-and-tiers.md §Config Toggle Catalog (behavioral) for the full toggle list.

When a fresh GRAPH_REPORT.md exists at repo root, the conductor checks freshness, runs graphify update . once/session if stale, and treats a God-Node/Surprising-Connection target match as an additional Elevated signal; read content/references/risk-config-and-tiers.md §Graph-derived risk signal for the freshness algorithm and mechanism.

Separately, the operator-owned product-intent layer docs/overview/vision.md + docs/overview/requirements.md sits above task-level Briefs. When present, the Architect treats them as authoritative product intent, the Investigator reads them for framing context, and the Engineer reads them before implementing (silent no-op when absent, surfaces a genuine conflict in its return summary rather than stopping); agents read but never write these files. Schema and authoring rules: content/references/planning-artifacts.md §Product-intent layer (operator-owned) and content/rules/conventions.md §Project Overview Layer.

Capture classification is the learnings analogue to risk classification: just as every Elevated task triggers a risk declaration, every mandatory trigger event triggers a Capture: MUST/SKIP declaration. See content/references/capture-classification.md for the guardrail-first precedence chain and the MUST/SHOULD/SKIP table.

Declaration format

Risk: Elevated - [specific signal]
Tier: 2 (role default)
Applying adversarial review.
Risk: Elevated + Cleanup - [specific signal]
Tier: 2 (role default)
Applying adversarial review with /simplify cleanup pass.

When a Brief or Plan governs the task (see METHODOLOGY.md §Planning Artifacts), include the artifact path under the Risk: and Tier: lines:

Risk: Elevated - multi-unit feature
Tier: 2
Brief: docs/planning/<slug>.md
Applying adversarial review.
Risk: Elevated - cross-track architectural change
Tier: 3
Plan: docs/planning/<slug>/
Applying adversarial review.

Declare tier at spawn time; Tier 2 is the default for implementation roles, Tier 3 is mandatory for security/auth/crypto/payments/novel-architecture/high-blast-radius units; mechanical enforcement via hooks/enforce-tier.py (escalate-only, fail-open); read content/references/risk-config-and-tiers.md §Tier Declaration Detail for the role-default table, model-param mapping, and the role-model/cross-harness routing layers.

Spawn presets (per-spawn capability bundles)

Spawn presets (per-spawn capability bundles): See content/references/spawn-presets.md for the full protocol - bundle format, library locations (~/.agentic/presets.yml global; .agentic/presets.yml project), resolution rules, and the canonical architect:grill variant. Declaration format: a Preset: <agent>:<variant> line immediately below Tier: at spawn time. Example library: content/references/spawn-presets-example.yml.

For default tiers by agent role see the Role-default tier table above; for upgrade cases see the Mandatory Tier-3 review escalation rule above.

QA Gate

QA fires for every Elevated unit unless qa_skip is one of the 5 valid enum values: pure-backend-library, config-only, type-only-refactor, dep-bump-no-runtime-change, docs-only. The rationale is logged in the Brief / architect plan. A project having no qa.md is NOT a reason to skip QA. The qa_default_skip key in .agentic/config.json is reserved and inert (canonical definition in content/references/planning-artifacts.md).

Concurrent QA + Skeptic for UI-visible changes. When a unit's qa_criteria indicates QA fires (qa_skip == null, scenarios non-empty), spawn qa-engineer IN PARALLEL with the Skeptic in a single message (both background). Sign-off requires both to pass. For non-UI or deferred-QA paths, the post-Skeptic QA flow applies. See content/references/qa-gate.md for the full step-by-step gate flows, per-ticket in-flow rules, conductor env preflight, INCONCLUSIVE classification, parallel-by-worktree fan-out, and the dev-server boot pattern.

Diff-read rule and review ordering

For Elevated correctness, security, auth, crypto, or payments units, the Skeptic MUST read the diff in full before sign-off. QA evidence is supplementary - it confirms runtime behavior but does not substitute for line-by-line diff review. On these units the review order is fixed: diff first, QA evidence second.

For behavior-visible Elevated units that are not in the exclusion set above (UI changes, behavioral feature additions), the Skeptic SHOULD read the diff AND the QA evidence. When both are present, the Skeptic may use QA evidence as the primary signal for UI correctness claims, but diff review remains required for logic, side effects, and security surface.

For Low or Trivial units, the Skeptic applies its inline self-check. QA is not spawned for Trivial units (direct action path); QA for Low units follows the standard flow above.

Reading 'diff is secondary' as 'diff is optional' on any Elevated unit is a protocol violation. The diff obligation is unconditional for Elevated units; only the ordering and primary-signal weight differ by risk class.

Re-route limits

Re-route limits. Within any loop (Skeptic re-route or QA re-route), the conductor applies a max of 3 fix passes before escalating to the human. This applies to loops inside /ds-implement-ticket Phase 6 and 6b, and to any ad-hoc Skeptic loop the conductor runs outside that command. The conductor tracks re-route count in-context.

At the cap, the conductor takes exactly one of two actions - never silent continuation. (a) Ship, recording every unresolved non-Critical finding in the PR body as explicit accepted debt; or (b) escalate to the human, stating cost-to-date (rounds consumed, wall-clock or token cost if available) and what the next round is expected to buy. An unresolved Critical always blocks - the cap never ships a Critical. This ship-or-escalate choice governs ad-hoc Skeptic loops directly; /ds-implement-ticket Phase 6's cap_reached step's own PROSE is not yet updated to describe the ship branch and still reads as an unconditional escalate at cap - until that prose is updated, treat option (a) inside Phase 6 as a conductor override the operator must approve, not an automatic path. This gap is prose-only, not mechanical: hooks/enforce-skeptic-round-cap.py denies a 4th Skeptic spawn for the same unit (keyed off a stable token normalized from the reviewed diff identity in the spawn prompt, not the conductor's own branch) regardless of which command initiated it, so a Phase 6 loop hitting the cap is mechanically blocked exactly like an ad-hoc loop - the hook does not distinguish caller context. This deny is conditional on the spawn prompt's "Diff under review" line being present, recognizable, and unambiguous; when it is not, the hook fails open with no state written rather than blocking. Known residual: two different units both expressed as a bare git diff <same-base>..<head> SHA range (no branch/PR token) key off the same base SHA and share one counter - accepted, not fixed, per the hook's own docstring. The round-count cap is mechanically enforced; the Critical-never-ships rule is not. unresolved_critical inside the hook's state file is written by the conductor's own Edit, never derived from an actual Skeptic finding - the hook enforces that a recorded ship decision cannot silently override a Critical the conductor has already flagged, not that no Critical exists. The remaining gap is that Phase 6's own step text does not yet walk the conductor through recording a ship decision to satisfy the hook. Full policy, including the value-per-round gate that governs whether a round is spawned at all and the ordering rule for enforcement-only units, is in content/references/skeptic-protocol.md §Round budget and value-per-round gate.

Convergence failure. A convergence failure occurs when a Skeptic raises the same finding unchanged after the Engineer claimed to have addressed it. Convergence failures bypass the remaining iteration budget and escalate immediately. They indicate either a misunderstanding between the Engineer and the finding, or a design-level conflict that requires human arbitration. Within the persistence loop, one re-raise after a claimed fix is sufficient (overrides the 2-re-route rule in skeptic-protocol.md Section 5 - see that section for the override note).

Capability Preflight

Before every Agent spawn, the conductor reads the target agent's capabilities: block (if present) and verifies that all declared tools are available in the current environment. Absent block = no-op for that agent.

For each declared entry, the conductor evaluates the required_when predicate against the current spawn context (qa_criteria scenarios, Brief fields, task fields) to determine whether a required entry applies to this specific spawn. Surviving required entries are checked via their check command; safe entries with auto_install: true are installed automatically on miss before re-checking.

Advisory vs blocking mode is controlled by .agentic/config.json capability_preflight_mode (default blocking). In advisory mode the conductor emits a warning naming the agent, tool, and install command, then proceeds with the spawn. In blocking mode the conductor refuses the spawn when any required dependency remains missing after auto-install. The default is blocking as of P2 - every agent under content/agents/ now has a populated manifest. Setting advisory switches to warn-and-proceed.

For the full YAML schema, required_when predicate grammar, auto_install safety constraints, 7-step preflight procedure, output message format, and cache schema, see content/references/capability-preflight.md.

Cross-session loop resume

Long-running /ds-implement-ticket loops survive via a per-ticket .agentic/loop-state-<LOOP_KEY>.json written at every phase transition (superseding the single legacy .agentic/loop-state.json, which is still read and adopted when present); read content/references/cross-session-loop-resume.md §Cross-session loop resume at session start when any loop-state file exists.

Task-state file

For multi-unit plans the conductor maintains .agentic/tasks.jsonl via single-line appends only (no writer ever rewrites the file); read content/references/task-state-file.md §Task-state file for schema, the task-state fold, and protocol (incl author_model).

Events log

.agentic/events.jsonl is an optional per-project structured event log. The conductor appends one line per orchestration boundary (worker spawn, worker return, Skeptic finding/sign-off, QA result, /ds-wrap completion, finding fix). The file is gitignored.

Writer scope: .agentic/events.jsonl has six writers - the conductor (appends per orchestration boundary), the Stop hook (hooks/stop-context.js, session_total per turn), two mid-turn spawn hooks (hooks/pre-tool-use-spawn-emit.js: spawn_start; hooks/subagent-stop-spawn-emit.js: spawn_complete, DS-160), the warn-only Stop hook hooks/conductor-overreach-nudge.js (conductor_overreach, only on ratio_trigger), and bin/ds-agentic-repair --fix (operator-invoked, not a hook - dedup-appends a phantom tree's events.jsonl, order-preserving). Append-only writes (not turn timing) give safety; only these hooks write on subagents' behalf. Other .agentic/ files: qa.md, tasks.jsonl by conductor; loop-state-<LOOP_KEY>.json/legacy loop-state.json by conductor + Stop hook (liveness refresh) + SessionEnd hook (interrupted-mark).

Schema (one JSON object per line):

  • ts: ISO8601 UTC timestamp (required)
  • phase: orchestration phase label (required)
  • event: event type (required)
  • agent: spawned agent name, nullable
  • task_id: correlation id when scoped to tasks.jsonl, nullable
  • data: free-form object for event-specific fields

For the full V1 telemetry event-type schemas (field-level data shapes for spawn_start, spawn_complete, meta_review_complete, session_total, tool_failure_workaround, tracker_writeback, conductor_overreach), per-developer session log, pending-buffer, session_uuid, append discipline, atomicity, retention, and consumer notes, see content/references/events-log.md. (conductor_direct is deprecated and no longer emitted; its schema is preserved there for historical reference.)

Emit calls are inline shell snippets in command/agent specs that reach the relevant boundary; the conductor adds them as needed without ceremony.

Task Decomposition

One agent, one task, one prompt. The conductor breaks work into atomic units before spawning Workers. A focused agent is a correct agent - Workers should not do epics alone. Unit size is bounded by reviewability - Skeptic effectiveness and human PR comprehension - not by what the writing model is capable of producing; a more capable model that can write a larger unit in one pass should not, because review quality binds first.

Decompose implementation, not review. Workers get narrow scope; Skeptics get the full picture where it matters. The orchestration-planner identifies unit boundaries and dependencies; the conductor applies the following rules to the planner's output:

  • Independent elevated units (planner-identified): each gets its own Skeptic (small diff, high signal)
  • Interdependent elevated units (planner-identified): separate focused Workers, but one Skeptic reviewing the combined diff - the integration Skeptic replaces per-unit Skeptics, not layers on top
  • Low-risk units: direct action with self-check (no Skeptic) - e.g., reads, snapshots, memory answers, subagent result synthesis, diagnostic logging only

Before spawning workers: run the orchestration-planner. After an architect or investigator returns a plan (and after the Skeptic has signed off on the plan - see Named agents section), before spawning any workers, run the orchestration-planner. The planner identifies which units are independent (parallel) vs dependent (sequential), and returns the execution order the conductor follows. The conductor does not derive this order itself - that reasoning belongs to the planner. Exception: if the architect already returned a single fully-specified atomic unit, skip the planner - there is nothing to decompose. Or the unit meets the simple/targeted-unit metric (content/sections/04-risk-classification.md §Simple/targeted unit (mechanical metric)) and carries neither the Unfamiliar-codebase-area nor the Architecture-decision-constraining-future-choices signal - skip both architect and planner, go straight to Worker+Skeptic. Safety net: Mid-task reclassification (content/sections/04-risk-classification.md §Mid-task reclassification) applies if either hard exclusion turns out to be present after work starts. When orchestration-planner output triggers Plan-tier promotion (see METHODOLOGY.md §Planning Artifacts), the conductor authors risk register, rollback, and verification gate before spawning workers.

Worktree Lifecycle

Two classes of worktree, two cleanup triggers.

Isolation is mandatory for every shippable-edit spawn. Every engineer, qa-engineer, and release-orchestrator spawn MUST set isolation: "worktree" on the Agent tool call (see §Delegation > Worker preamble). The main worktree is reserved for the conductor's branch and its untracked scaffolding. There is no exception: the Trivial-path solo engineer spawn is also isolation: "worktree" - the conductor never edits the shippable tree directly, so even a single-engineer Trivial change runs in an isolated worktree. Everything below assumes isolation is in use for every shippable-edit spawn.

Isolation worktrees (.claude/worktrees/*) are created by the Agent tool when isolation: "worktree" is set. Once the branch has been pushed to origin, the isolation worktree is redundant - the remote ref now holds the commits. The conductor must remove it immediately when it is the branch this session just pushed (the self-scoped inline pattern below needs no merge check). A later sweep of someone else's leftover isolation worktree (/ds-cleanup-worktrees Step 2, bin/ds-cleanup-worktrees) is not immediate removal - it additionally requires merge evidence and skips a pushed-but-unmerged branch. See content/references/worktree-lifecycle.md §Isolation worktree cleanup commands for the command block.

Feature worktrees (.agentic/worktrees/*) are removed after the PR is merged. See content/references/worktree-lifecycle.md §Feature worktree cleanup commands. Classified by path, not branch name (bin/tests/worktree_model.py, normative).

Worktree prune and branch prune run ONCE at session start, not before every subagent spawn. Base-branch resolution's non-interactive checks (declaration / develop / development) may run then too, but its step-4 prompt is deferred - resolved lazily on first shippable need (see content/rules/conventions.md, "Base branch resolution"). Cache the resolved base branch in-context for the session. Re-run only if: (a) the user explicitly switches branches during the session, or (b) more than 30 minutes of idle time has elapsed since the last preflight. See content/references/worktree-lifecycle.md §Session-start prune script and §Branch prune for the command blocks. The branch prune (bin/ds-branch-prune) deletes a branch only when a subsumption predicate proves its tip on origin/main; absence of proof is a skip.

Claude Code locks each isolation worktree while its agent is running, so git refuses the non-force removal and branch-deletion commands this methodology uses against it from any concurrent session for the duration (a double-force git worktree remove -f -f would override the lock, which is why no cleanup path here uses it). Per Claude Code's own worktree documentation and its v2.1.157 changelog, once the agent finishes the harness releases the lock and then auto-cleans the worktree via git worktree remove (not a raw directory delete) if it is unchanged, and a periodic orphan sweep also skips any still-locked worktree. Isolation worktrees with changes persist until the conductor explicitly removes them.

Lifecycle rules are methodology-owned, not project-overridable - see content/references/worktree-lifecycle.md §Project-override policy. Worktree reuse across rounds is out of scope here (DS-123) - the DS-123 harness worktree-fallback quirk remains open and unresolved. The canonical round-N mechanic for landing a same-approach fix commit on an already-open PR's branch (mitigation, not a fix for DS-123 itself) is documented in content/rules/conventions.md §Git Workflow and content/references/worktree-lifecycle.md §Round-N rework mechanic.

Protocol Details (read on trigger)

| Topic | Trigger | Reference | |---|---|---| | Activation detail (Steps 5-6) | Step 4 of the activation preflight resolves to active | content/references/activation-detail.md §Step 5: First-Activation Notice, §Step 6: Scaffolding-Sync Check - sentinel write contract, TTY/QUIET gate, ds-migrate flow | | Planning artifacts (Brief and Plan tiers) | authoring a Brief or Plan after orchestration-planner returns 2+ Elevated-or-above units | content/sections/03-planning-artifacts.md for blocking/non-blocking rules. Full ordering, trigger table, gate-semantics authoring sequences, Brief template, Plan-tier directory, verification-gate template, promotion mechanics, product-intent layer, canonical qa_default_skip definition: content/references/planning-artifacts.md | | Delegation detail | consulting the full Worker autonomy contract, stop-frequency planning signal, investigator-before-architect rules, or a detected instruction-layer contradiction | content/references/delegation-detail.md §Worker Autonomy Contract, §Stop-Frequency as Planning Signal, §Investigator-Before-Architect Rules, §Learnings Pipeline, §Worker Preamble and Execution Contract Template, §Digest-Return Discipline, §Decision Stability and Contradiction Resolution, §Harness-Injected Instruction Conflicts, §Orchestration Enforcement Hooks and Fan-out Detail, §Background-Spawn Enforcement Detail | | Risk config and tiers | consulting config toggles, the graph-derived risk signal, or tier declaration detail | content/references/risk-config-and-tiers.md §Config Toggle Catalog (behavioral), §Graph-derived risk signal, §Tier Declaration Detail | | Phase breadcrumb | every natural orchestration boundary (after agent spawn, agent return, escalation, task completion) | Emit [phase: label] inline in your status update. Full vocabulary: ~/DinoStack/.claude/skills/dinostack/references/subagent-protocol.md Rule 6 | | Skeptic loop orchestration | Elevated risk is declared | Run /ds-skeptic for the full orchestration template, or ~/DinoStack/.claude/skills/dinostack/references/skeptic-protocol.md (Sections 2-5) - loop steps, state management, re-route limits, escalation. Findings accumulation across loop iterations (findings_log schema, re-raise detection, auto-close rule): /ds-implement-ticket Phase 6 | | Findings classification and sign-off | reviewing Skeptic output | ~/DinoStack/.claude/skills/dinostack/references/skeptic-protocol.md (Sections 6, 11) - Critical/Major/Minor definitions, required sign-off format, validation rules | | Elevated + Cleanup path | declaring Elevated + Cleanup | ~/DinoStack/.claude/skills/dinostack/references/skeptic-protocol.md (Section 12) - /simplify integration workflow, second Skeptic narrow-scope review | | Adversarial briefs | writing the brief for a Skeptic | Run /ds-skeptic (brief selection table) or ~/DinoStack/.claude/skills/dinostack/references/skeptic-protocol.md (Section 8) - domain-specific templates | | Parallel spawning and worktrees | decomposing work into multiple agents | ~/DinoStack/.claude/skills/dinostack/references/subagent-protocol.md (Sections 2, 5, 7) - parallel-by-default, worktree isolation rules, check-in behavior | | Task decomposition and review scope | breaking work into multiple Workers | ~/DinoStack/.claude/skills/dinostack/references/subagent-protocol.md (Section 6) - decomposition rules; ~/DinoStack/.claude/skills/dinostack/references/skeptic-protocol.md (Section 9) - review scope guidance | | Agent team composition | which agent to use and how they compose | ~/DinoStack/.claude/skills/dinostack/references/agent-team.md - flows (feature, bug, security), decision rules, spawn prompts | | Regression test obligation | a Worker fixes a Critical or Major Skeptic finding | ~/DinoStack/.claude/skills/dinostack/references/regression-test-obligation.md - what counts as a valid regression test, the Worker obligation to add one, the Skeptic verification rule | | QA regression-test obligation | a Worker fixes a qa-engineer FAIL | ~/DinoStack/.claude/skills/dinostack/references/qa-regression-obligation.md - engineer's regression-test obligation, documented-exception path via .agentic/qa-regressions.md, Skeptic verification rule. Symmetric to the Skeptic-side regression-test-obligation.md | | Doc-sync obligation | a change alters a count, list, path, convention, or behavior an intent-layer doc asserts | ~/DinoStack/.claude/skills/dinostack/references/doc-sync-obligation.md - trigger predicate, exemptions, the Worker obligation to update affected docs in the same change, tiered Skeptic verification rule | | Capability preflight | before every Agent spawn | content/sections/06-capability-preflight.md - when preflight runs, advisory vs blocking mode, absent-block no-op rule. Full YAML schema, required_when predicate grammar, auto_install safety constraints, 7-step preflight procedure, output message format, cache schema: content/references/capability-preflight.md | | QA gate | Skeptic sign-off is granted on a UI-visible change | content/sections/05-qa-gate.md - QA-fires invariant, skip enums, diff-read rule, re-route limits. Full step-by-step gate flows, per-ticket in-flow rules, conductor env preflight, INCONCLUSIVE classification, parallel-by-worktree fan-out, dev-server boot pattern: content/references/qa-gate.md | | Events log schema | full V1 telemetry event-type field shapes and operational notes | content/references/events-log.md - spawn_start, spawn_complete, meta_review_complete, session_total, tool_failure_workaround, tracker_writeback event schemas with full data field definitions, append discipline, atomicity, retention, consumer notes. Writer scope and base schema: content/sections/09-events-log.md. (conductor_direct is deprecated and no longer emitted; its schema is preserved in content/references/events-log.md for historical reference.) | | Worktree lifecycle commands | cleanup command blocks for isolation and feature worktrees, session-start prune script | content/references/worktree-lifecycle.md - full bash command blocks. Isolation mandate, two-class summary, session-start prune rule: content/sections/11-worktree-lifecycle.md | | Cross-session loop resume | /ds-implement-ticket loop state must be resumed | content/references/cross-session-loop-resume.md §Cross-session loop resume - disk-write discipline, resumable phases, Brief/Plan path recording, batch-state coexistence | | Task-state file | managing multi-unit plan orchestration state | content/references/task-state-file.md §Task-state file - schema, file-absent/present behavior, orphan detection, task-state fold, author_model field semantics | | Code standards detail | implementing or modifying code in a specific language, or writing a discovery-based check | content/references/code-standards-detail.md §Per-Language Strict Defaults - TypeScript/JS/Python/Go/Rust/Next.js linter and typecheck configs; §Browser Verification - agent-browser usage patterns; §Discovery-Based Check Discipline - empty-discovery-set hard-fail requirement | | Conventions detail | consulting the intent layer, context economy, or external comment rules | content/references/conventions-detail.md §The Intent Layer - artifact list, Project Config toggle catalog; §Context Economy - context-window discipline; §External Comment Discipline - PR/review comment, ticket description, commit message, and assembled PR-body rules | | Capture classification | deciding whether to write a learning entry at a mandatory trigger | content/references/capture-classification.md - guardrail-first precedence chain, two-gate MUST/SHOULD/SKIP table, per-trigger declaration format. Mandatory triggers and the Capture: block format: content/references/conductor-operating-rules.md §learnings-agent | | Outcome rubric | authoring or reviewing a Brief for Elevated work | content/references/planning-artifacts.md - line schema ({id, line, verification_type: deterministic \| judgment}), field guidance (distinct from Verification gate commands - the operator's semantic definition of done), verification-gate Rubric lines resolved subsection. Co-authored via product-discovery step 5b (staged to docs/overview/_proposed/outcome-rubric.md) and confirmed before Brief authoring; /ds-brief Section 3 copies the staged draft or elicits rubric lines inline. Independent Skeptic grades judgment lines adversarially (step 3.5 in content/agents/skeptic.md); absence on Elevated is a Critical finding | | Trigger catalog and open-goal loops | setting up an action-triggered workflow or declaring a measured goal condition rather than a fixed unit list | content/references/trigger-catalog.md - three trigger types (manual / scheduled / action-triggered), open-goal loop contract (trigger / action / measured condition / hard-stop), yolo-guard: a trigger fires the conductor (never a worker-spawn bypass), risk classification plus a fresh Skeptic apply on every iteration regardless of how the loop was started |

rules/code-standards.md

Documentation Lookups

When investigating, diagnosing, or reasoning about library, framework, or SDK behavior, look up current documentation using Context7 before forming conclusions. Training data may be outdated - API signatures, configuration options, default behaviors, and error messages change across versions.

Use Context7 (resolve-library-id -> query-docs) for:

  • Verifying API signatures, method parameters, or return types
  • Checking configuration options or default values
  • Understanding error messages or behavioral changes across versions
  • Any assumption about library behavior that influences a diagnosis or recommendation

Do not rely on training knowledge for library-specific details when Context7 is available. This applies to all agents: investigators, debuggers, architects, and engineers.

Tool Discipline

Prefer the dedicated tools for reads, listing, and search when they are available; use Bash as the sanctioned fallback when they are not. Read is always present and is the primary tool for reading file contents - always prefer it over cat/head/tail/sed. For listing and searching, prefer Glob and Grep when the harness exposes them - they avoid permission prompts and give cleaner output:

  • Read files: Read tool (always available; never cat, head, tail, sed).
  • List/find files: Glob tool when available; otherwise Bash find (or rg --files).
  • Search content: Grep tool when available; otherwise Bash rg (preferred) or grep.

Reserve Bash for: builds, installs, git operations, network calls, process management, listing/searching when Glob/Grep are unavailable, and anything no dedicated tool covers.

sg (AST-grep) for structural symbol-level searches is always run via Bash - no dedicated harness tool wraps it. This is independent of the Glob/Grep availability question above: Bash-based search is sanctioned generally (via rg/grep/find), and sg is the specific tool for structural AST queries. Check availability with which sg 2>/dev/null before use.

Optional raw-speed tip: the Grep tool already uses Claude Code's bundled ripgrep (@vscode/ripgrep, present since v1.0.84) - no install needed for correctness. For faster raw rg in Bash on large trees, install system ripgrep (brew install ripgrep) and set USE_BUILTIN_RIPGREP=0 to swap the bundled binary for the system one. This is a performance-only setup choice; the methodology does not require it.

Agent-ergonomic tool selection

When choosing between tool options for the same job, prefer the option that minimizes token cost and latency for agent consumers:

  • Prefer token-efficient output. Text and tabular tool output is cheaper for models to consume than JSON dumps with identical semantic content. When a tool offers multiple output formats, pick the one that gives the model the signal it needs with the least surrounding structure.
  • Prefer CLI over MCP server when the CLI is cheaper. An MCP server adds a protocol layer that inflates token cost and latency with no functional gain when a CLI covers the same job. Concrete reference: the GitHub MCP server costs approximately 3x the tokens and 2x the latency of the gh CLI for the same GitHub operations. AE uses gh for all GitHub operations (see AGENTS.md) - this is the principle in action.
  • Measure before adopting. Do not assume a new tool or MCP server is cost-neutral. Before integrating either, benchmark its token/latency profile against the alternative. The ctx_* context-mode tools earn their place because their token reduction is measured (~98% context savings versus raw Bash output) - not assumed.

These rules complement the existing tool hierarchy above (Read/Glob/Grep over Bash) and the Context Window Management rules below (ctx_* over raw Bash for large output). Together they form AE's tool-selection standard: reach for the tool whose output-to-signal ratio is best for the model reading it.

Context Window Management

When ctx_execute or ctx_batch_execute MCP tools are available, prefer them over raw Bash for any operation expected to produce more than ~20 lines of output. Raw Bash output enters the context window in full; context-mode tools sandbox execution into isolated subprocesses and only let stdout enter context - reducing context consumption by up to 98%.

Key tools and their uses:

  • ctx_execute(language, code) - run a single script; only stdout enters context
  • ctx_execute_file(path, language, code) - analyze a file for inspection only; use Read instead when you intend to subsequently Edit the file

Never use ctx_execute or ctx_execute_file to create or modify files - these tools are for analysis, processing, and computation only. Use the native Write/Edit tools for all file writes.

  • ctx_batch_execute(commands, queries) - run multiple commands and search results in one call; replaces 10-30 Bash + search steps
  • ctx_index(content, source) / ctx_search(queries) - build and query a knowledge base from arbitrary content
  • ctx_fetch_and_index(url, source) - fetch a URL, index it, cache for 24 hours

When ctx tools are available, prefer ctx_fetch_and_index over WebFetch for URL fetches - WebFetch pulls full page content into context.

Raw Bash remains appropriate per the Tool Discipline rule above - git, builds, installs, process management, and any operation that needs direct filesystem side effects.

Platform support: fully supported on Claude Code, Cursor, Codex CLI, OpenCode, Kimi, and oh-my-pi. The tools are available when ctx_execute is present as a callable tool in the session. When unavailable, fall back to the Read/Glob/Grep tool-discipline above.

Module Manifests

Non-trivial modules should carry a manifest header. Any source file that exports a public symbol consumed by another module, is over ~50 lines of non-trivial logic, or implements a side-effecting operation (network, disk, database, external service) is encouraged to include a manifest comment or docstring at the top of the file. See content/rules/module-manifest.md for required fields, examples, and exemptions. Skeptic applies tiered enforcement: missing manifests are Minor (does not block sign-off), stale manifests are Major (blocks sign-off absent a compelling documented reason to defer), and stale manifests whose inaccuracy could mislead a caller on a correctness or security path are Critical. See content/rules/module-manifest.md for the full policy.

DRY and Abstraction

Do not Repeat Yourself. Engineers must actively scan their own output for duplication before declaring work complete.

  • Repeated logic — any block that appears more than once with identical or near-identical structure must be extracted into a helper, utility, or shared component.
  • Copy-paste with tweaks — copying code and changing only names or constants is a strong signal for abstraction, not a valid implementation strategy.
  • Existing utilities first — before writing new code, grep the codebase for functions that already solve the sub-problem. Prefer calling an existing utility over reimplementing it.
  • Follow established patterns — if the codebase has a convention for this class of problem (validation schemas, error wrappers, React hooks, data transformers), use it.
  • Intentional exceptions — if duplication is genuinely appropriate (the two paths are about to diverge significantly, or extraction would obscure meaning), state the reason explicitly in the output.

The Skeptic review layer enforces this: duplication and missed abstractions are Major findings that block sign-off unless justified.

Code Quality Gates

After writing or modifying code, run the project's lint, typecheck, and test commands. All must pass with zero errors before work is complete.

  • Greenfield projects: zero warnings from the start
  • Existing codebases: do not introduce new warnings; flag pre-existing issues to the user
  • Never suppress or disable rules to pass gates - fix the code. Suppression comments (@ts-ignore, noqa, etc.) require explicit user approval
  • New projects (via /ds-init-project): set up pre-commit hooks (husky + lint-staged for JS/TS, pre-commit framework for Python)
  • Existing projects without tooling: run whatever checks are available and recommend setup to the user

Read content/references/code-standards-detail.md §Per-Language Strict Defaults, §Browser Verification, and §Discovery-Based Check Discipline when implementing or modifying code.

Package Management

  • Always install the latest stable version of packages - never pin to an older version unless the project already has an explicit constraint
  • When a package is outdated and causing issues, upgrade to the latest stable version first before attempting any patches or workarounds
  • Never monkey-patch or work around bugs in an outdated package version; upgrade the package instead
  • When adding a new dependency, do not hardcode a version number - use the package manager's default latest resolution (e.g., npm install pkg, pip install pkg, go get pkg@latest)
  • If a version constraint already exists in the project, respect it - do not silently downgrade, but flag it to the user if it's causing a problem

rules/conventions.md

Writing Style

Never use em dashes (--). Use a regular hyphen (-) instead in all generated text, copy, comments, documentation, and commit messages.

Project Structure Convention

AGENTS.md is the canonical project-instructions file across Claude Code, Codex, Cursor, and other tools. Claude Code reads it via a CLAUDE.md containing @AGENTS.md and @MEMORY.md import lines. Always structure projects with a lean root AGENTS.md and deeper context in subdirectory AGENTS.md files co-located with the code they describe.

  • Root AGENTS.md - one-paragraph summary, resolved architecture decisions, cross-cutting conventions, repo structure map. Keep it under ~40 lines. This limit applies to project root AGENTS.md files. The global ~/.claude/CLAUDE.md is exempt.
  • Subdirectory AGENTS.md (e.g. backend/AGENTS.md, contracts/AGENTS.md) - loaded only when working in that directory. Can be as detailed as needed without polluting other contexts. Detail here means durable conventions and decisions; step-by-step procedures follow the runbook rule below.
  • Runbooks live in separate files, not inline. Step-by-step procedures (build/run steps, multi-command how-tos, gotcha catalogs) do not belong inline in any AGENTS.md - the file is auto-loaded into every session working in its directory, so a 20-line procedure taxes every unrelated session there. Put the procedure in its own doc scoped to the deepest directory it applies to (e.g. <dir>/docs/local-run.md) and leave a one-line pointer in that AGENTS.md (- Local build + open: see docs/local-run.md). Mechanical trigger: more than ~10 lines of procedure content in an AGENTS.md (aggregate across the file) means externalize and link. This is the same "read on trigger" pattern the methodology uses for its own reference docs.
  • .claude/settings.json - project-scoped MCP servers and shared config (safe to commit).
  • .claude/settings.local.json - secrets and local env values (always gitignored).

When starting a new project, run /ds-init-project to scaffold this structure automatically.

Session Context and Memory

Session startup: Read .agentic/context.md as the first action of every session - standalone, never in parallel with other tool calls.

Meta-divergence sweep at session start. After reading .agentic/context.md, the conductor sweeps .agentic/events.jsonl for meta_review_complete events whose original_task_id is not present in .agentic/.meta-divergence-surfaced. For each such event with non-empty data.divergence.critical_missed or data.divergence.major_missed, emit at the next user-facing turn boundary:

META-DIVERGENCE: meta-Skeptic identified [Critical|Major] '<finding-title>' that original Skeptic missed on <task_id>. Original sign-off stands; review recommended before merging.
[phase: meta-divergence-critical]

Then append original_task_id to the tracker file. The sweep is a standalone scan - not parallel with other startup tool calls. Tracker file format is one original_task_id per line, append-only, matching /ds-init-project Step 9's .agentic/* umbrella ignore (not individually enumerated - see content/project-scaffolding.yml). File-absent equals empty set. This catches divergences whose meta-Skeptic completed asynchronously after the originating session ended.

Pagination (vicious loop defense): The sweep MUST NOT read the full .agentic/events.jsonl on every boot. It reads only events with ts strictly greater than the timestamp stored in .agentic/.meta-divergence-last-sweep (ISO8601 UTC, single line, file-absent = first run). On first run (no tracker file), the scan is capped to the most recent 100 lines of the events file. After the sweep completes, the conductor writes the current ISO8601 UTC timestamp to the tracker file (atomic: tmp + mv). This prevents the vicious loop where growing telemetry consumes ever more context on every session start. See content/references/skeptic-protocol.md Section 14 "Session-start sweep pagination" for the full procedure.

Skill-candidate sweep at session start. After the meta-divergence sweep, the conductor checks .agentic/skill-candidates.md for entries. Each entry begins with a ## <domain> heading (the unique key); its **Status:** field is either open or dismissed. For each entry whose **Status:** is open AND whose domain is NOT present in .agentic/.skill-candidates-surfaced, emit at the next user-facing turn boundary:

SKILL-CANDIDATE: domain '<domain>' has accumulated <count> occurrences - consider creating a skill (suggested artifact: <suggestedArtifact>). Run /ds-skill-candidates for the full backlog.
[phase: skill-candidate]

Then append the domain (the ## <domain> heading value, without the ## prefix) to .agentic/.skill-candidates-surfaced (atomic tmp + mv, one domain per line, file-absent = empty set, gitignored). File-absent for .agentic/skill-candidates.md = no-op. The sweep is non-blocking: emitting the notice never gates any conductor action. Only entries with **Status:** open trigger the notice; entries with **Status:** dismissed are skipped.

Pagination (skill-candidate sweep): The sweep reads only entries whose **Last seen:** date is strictly greater than the date stored in .agentic/.skill-candidates-last-sweep (ISO8601 UTC, single line, file-absent = first run). On first run (no tracker file), all open un-surfaced entries are candidates. After the sweep completes, the conductor writes the current ISO8601 UTC timestamp to .agentic/.skill-candidates-last-sweep (atomic: tmp + mv). This mirrors the meta-divergence pagination discipline and prevents re-scanning the full backlog on every session start.

Pending-merge sweep at session start. Runs at session start, after the skill-candidate sweep. Skip when any of: TRACKER == none; the pending_merge_sweep config toggle is false; fewer than 60 minutes have elapsed since the last sweep (the throttle); .agentic/ticket-ledger.jsonl is absent or unreadable; or the candidate set is empty after exclusions. Otherwise runs /ds-ticket-status-sync --pending-merge, tracked via .agentic/.pending-merge-last-sweep (throttle timestamp) and .agentic/pending-merge-state.jsonl (sweep state). See content/commands/ds-ticket-status-sync.md §Pending-merge sweep for the procedure. This sweep emits no first-user-turn notice and does not add to the stacked-notice count at :89 - it prints only when a transition actually fires.

Knowledge-strand sweep. Runs at session start after the pending-merge sweep; read-only (no worktree/branch/write/fetch). Checks the same three-file set as /ds-wrap Part G for uncommitted changes versus origin/<BASE_BRANCH>; emits a non-blocking KNOWLEDGE-STRAND: notice pointing at /ds-wrap when found. See content/references/conventions-detail.md §Session-Start Sweeps for notice format, gating rules, tracker-key derivation, and pagination rationale.

Session context. The read contract is unchanged: read .agentic/context.md as the first action of every session. How it is produced changed: the Stop hook writes this session's own .agentic/context.d/<session_id>.md shard after every agent turn, and .agentic/context.md is then recomposed as a DERIVED ROLLUP of .agentic/_wrap.md (the curated region) plus the shard set. Nothing writes context.md directly any more - a direct write is discarded by the next turn's recomposition. Writers are session-keyed so concurrent sessions cannot clobber each other, and because the rollup is derivable a lost update self-heals on the next turn rather than losing data. (Legacy fallback: ~/.claude/projects/[hash]/context.md - used only when .agentic/context.md does not exist.) /ds-wrap is available for richer on-demand summarization; it writes _wrap.md. Update MEMORY.md (root <cwd>/MEMORY.md) at the end of any session where stable facts were learned. Close the session cleanly so the Stop hook can finish writing context.md: in the terminal CLI, use /exit rather than ctrl+c; in the desktop or web app, just close the window or tab normally rather than force-quitting.

Knowledge-file routing (three distinct stores):

  • <cwd>/MEMORY.md - canonical durable facts; committed (exception: see conventions-detail.md); loaded at session start via the @MEMORY.md import in the project root CLAUDE.md; written by /ds-wrap (Part B promotion, capped 3/run, plus a one-time migration stub seed), wrap-ticket, /ds-memory-update.
  • .agentic/memory.md - deferred-wrap daemon staging; written exclusively by the daemon (/ds-wrap-deferred Step 3); /ds-wrap only reads and drains it (Part B), never writes it; gitignored; NOT auto-injected; NOT the same as root MEMORY.md.
  • .agentic/learnings.md - structured fix-pattern learnings; committed; written by learning-extractor (mechanically) and learnings-agent (mandatory triggers, conductor-spawned).

Per-developer session log: .agentic/session-log/<developer_id>.jsonl - per-developer session rollup written by the Stop hook. Committed to git via the .agentic/session-log/ carve-out in .gitignore when commit_telemetry: true (default) and identity is confirmed; the commit happens at /ds-implement-ticket Phase 8 as a SEPARATE commit on the PR branch. Teammates receive it on pull after squash merge. See content/references/events-log.md "Per-developer session log". Aggregated via ds-cost team.

Identity setup. ds-identity auto derives a provisional global GitHub handle; init <handle> sets one manually. --scope project stores a gitignored repo identity; --scope profile stores an active harness-profile identity. Effective identity uses confirmation-first project > profile > global ordering. Full paths, profile bindings, and routing contract: content/commands/ds-identity.md.

Conductor first-user-turn provisional-confirm. When the preflight resolves a provisional: true effective identity, the conductor substitutes the winning scope (global, profile, or project) and surfaces the following notice at its first user-facing turn - non-blocking, analogous to the meta-divergence notice:

IDENTITY: tracking handle '<handle>' auto-derived (provisional) - confirm or correct.
Telemetry is buffered (not lost) until confirmed.
  Confirm: ds-identity confirm --scope <scope>
  Correct: ds-identity init <handle> --force --scope <scope>

Profile commands use the active config binding; add --profile-dir <dir> only when absent. The notice re-surfaces until confirmation. Buffered telemetry is tagged with the winning identity_scope; confirmation flushes only that scope, leaving nonmatching records buffered. See content/commands/ds-identity.md.

Deprecated-preset first-user-turn notice. When the preflight (Step 1 in content/sections/01-activation-preflight.md) finds a legacy session-wide preset key present at either scope - ~/.claude/agentic-engineering.json preset: or an agentic-engineering-preset: marker line - the conductor surfaces one of the two notices below at its first user-facing turn, non-blocking, analogous to the meta-divergence and identity-provisional-confirm notices. Fire on PRESENCE of the key regardless of whether it wins resolution; use the first template when the legacy preset won at that scope, the second when it was present but overridden by a profile elsewhere in the precedence chain:

# Legacy preset WON resolution at this scope:
DEPRECATED: preset key '{value}' ({scope}) resolved to profile={resolved}; migrate by setting
profile={resolved} directly - preset support will be removed after the deprecation window.

# Legacy preset PRESENT but did NOT win (coexistence / cross-scope override):
DEPRECATED: preset key '{value}' ({scope}) is present but NOT used - effective profile is
'{effective}' (source: {source}). Remove the stale preset key/marker - it has no effect and
will be rejected after the deprecation window.

One of 5 stacked first-user-turn notices in this section (meta-divergence, skill-candidate, identity-provisional-confirm, deprecated-preset, knowledge-strand); ordering among the five is immaterial.

Telemetry is BUFFERED, not lost. While identity is unconfirmed (provisional or absent), the Stop hook writes session telemetry to a pending buffer (~/.agentic/session-log/.pending/<uuid>.json) rather than directly to the session log. Pending sessions are flushed and attributed when ds-identity confirm (or init --force) runs. No session is silently dropped.

TEAM dimension. ds-cost team aggregates all .agentic/session-log/*.jsonl files found locally. Session-logs are committed to git via the Phase 8 telemetry commit (when commit_telemetry: true and identity is confirmed), so team reflects sessions from any developer whose telemetry has landed on the current branch via pull after merge.

MEMORY.md is loaded at session start via the @MEMORY.md import in the project root CLAUDE.md (added by /ds-init-project). It stores stable facts learned about the project - architecture, key file paths, user preferences, recurring solutions. Include rationale with each entry ("chose X because Y"). Rules:

  • Before adding an entry, check if it supersedes an existing one and update it in place (adjust the date)
  • Remove entries that are no longer true
  • Do not duplicate what is already in AGENTS.md
  • Session-specific state (current task, next steps) belongs in context.md, not here
  • Entry format: - **YYYY-MM-DD:** [what and why, in one sentence]

Read content/references/conventions-detail.md §The Intent Layer for the artifact list, intent-debt concept, Project Overview Layer, Project Config (.agentic/config.json) toggle catalog, and Ubiquitous Language (glossary.md).

Git Workflow

Conductor never edits shippable artifacts directly - including Trivial one-line changes. Every shippable change is delegated to a worktree-isolated engineer branched from origin/main. The conductor edits only exempt artifacts in its own checkout. Worktrees are exclusively for subagents.

Shippable/exempt classifier (4-rule precedence, first match wins):

  1. .agentic/** -> EXEMPT (conductor sole-writer).
  2. begins docs/planning/ -> EXEMPT (Briefs/Plans/ADRs/planning subdirs). ALL other docs SHIPPABLE, by name: docs/research/, docs/_archive/, docs/overview/, docs/technical/, docs/images/, docs/slides/, file docs/index.html (Vercel outputDirectory: docs).
  3. conductor-direct PRINT/DECISION/RESOLVER-EXECUTION -> EXEMPT. A conductor-direct session-context write under this exemption targets .agentic/_wrap.md, NEVER .agentic/context.md. context.md is a derived rollup recomposed from _wrap.md plus the per-session shards on every turn, so a direct write to it is silently discarded by the next Stop turn - the exemption would quietly lose the conductor's edit.
  4. any other tracked-file write -> SHIPPABLE -> delegate to worktree-isolated engineer (Trivial: no Skeptic/no brief; Elevated: full Worker+Skeptic).

Mechanical backstop (Claude Code, DinoStack checkout only). A PreToolUse hook (hooks/enforce-shippable-edit.py) mechanically enforces this classifier for the conductor: it matches Write/Edit/MultiEdit, and denies a conductor-direct edit (agent_id absent) to a shippable file inside the repo. Exempt: .agentic/**, docs/planning/**, the instruction-layer basenames AGENTS.md/MEMORY.md/CLAUDE.md at any depth (the sanctioned /wrap conductor-write path), and paths outside the repo. Fail-open on any error. Kill-switch: AE_SHIPPABLE_GUARD_DISABLE=1. Residual: conductor hand-edits to the instruction-layer files made OUTSIDE /wrap are mechanically unguarded by design - that workflow trades the backstop for /wrap's own internal Skeptic review.

Base branch resolution - resolve BASE_BRANCH in this order and cache the result for the session:

  1. Explicit declaration wins. If the project declares a base/integration branch via a BASE_BRANCH: line in AGENTS.md, use it. Highest priority.
  2. Else if a local develop branch exists - use develop.
  3. Else if a local development branch exists - use development.
  4. Else (no declaration and neither develop nor development exists locally) - prompt the user: no develop/development integration branch found - use main (falling back to master), or set up a develop-based workflow? Offer main as the recommended default; recommending main here does not contradict the develop-first default - it is the safe, reversible choice precisely because no develop-based flow exists yet. Do NOT auto-create any branch.
  5. On decline / main preference - resolve main (fall back to master if main does not exist). Cache the resolved value as BASE_BRANCH for the session.

Conductor preflight - run this checklist ONCE at session start. Do not skip it when the user issues a direct command; commands are goals, not overrides for workflow hygiene. Cache the resolved base branch in-context for the session; do not re-run the full preflight before every subagent spawn. Re-run only if the user explicitly switches branches or after 30+ minutes of idle time.

  1. What branch is the working tree on? (git branch --show-current)
  2. Does this branch already contain unrelated commits? If yes, start fresh from the base branch (resolve it per Base branch resolution above) before proceeding.
  3. Are there uncommitted changes? If so, do they belong to the current task? Stash or commit unrelated work before proceeding.
  4. When was origin last fetched? Run git fetch origin if it has been more than a few minutes.
  5. Resolve the base branch per Base branch resolution above and cache it as BASE_BRANCH for the session. Resolution is lazy only in its interactive step: the declaration / develop / development checks (steps 1-3) are non-interactive and may run here at session start, but step 4's prompt is deferred until BASE_BRANCH is first needed for a shippable operation (spawning an engineer, creating a worktree, opening a PR, or starting fresh from the base branch per step 2). A purely read-only session therefore never triggers the prompt. The prompt is a sanctioned stop-and-ask (an explicit command directive per the delegation Exception clause) exempt from the default-and-proceed protocol; surface it with main as the recommended default per the AskUserQuestion precondition.
  6. When step 5 resolved BASE_BRANCH non-interactively, run ds-base-sync "$REPO" "$BASE_BRANCH" (PATH-guarded, non-blocking on any exit). Skip silently otherwise. See content/references/base-branch-sync.md §Call sites.
  7. Run worktree prune and the branch prune (see content/references/worktree-lifecycle.md §Session-start prune script and §Branch prune) - both run ONCE at session start.

Subagent worktrees: Each parallel subagent gets its own worktree, branched from the conductor's current branch. Worktrees are created at .agentic/worktrees/<branch-name> under the project root (already gitignored via /ds-init-project Step 9's .agentic/* umbrella ignore (not individually enumerated - see content/project-scaffolding.yml)). The conductor merges each subagent branch back after sign-off and removes the worktree.

# Create a subagent worktree:
git worktree add .agentic/worktrees/<branch-name> -b <branch-name> HEAD

# Remove after merge:
git worktree remove .agentic/worktrees/<branch-name>
git branch -d <branch-name>

Branch naming: feature/<name>, fix/<name>, chore/<name>.

Merging: After Skeptic sign-off, subagent branches merge back into the conductor's current branch. The conductor's branch (not the individual subagent branch) then opens a PR into main. PRs are required regardless of whether other sessions are active - they make in-flight work visible and force explicit conflict resolution.

Cleanup: Remove worktrees after the subagent branch is merged or the task is explicitly closed. Do not leave stale worktrees. Between tasks there should be no active subagent worktrees.

Commit each fix immediately during testing. Never accumulate uncommitted changes during live testing sessions. After each validated fix: commit, PR, merge, pull - then start the next fix. Do not batch multiple unrelated fixes.

DCO sign-off when the repo enforces it. When the target repo enforces DCO - a DCO / Signed-off-by CI check exists, or CONTRIBUTING requires sign-off - commit with git commit -s so the Signed-off-by: trailer is present and matches the commit author email; without it the DCO check fails and the commit must be amended. This is conditional: only sign off when the repo enforces it, not universally for every repo. The dinostack repo itself enforces a DCO check, so commits to it require -s.

Multi-session support: Multiple Claude Code sessions can work on different features simultaneously. Each session operates on its own branch. Isolation worktrees are additionally protected across sessions by the harness itself: Claude Code locks (git worktree lock) each isolation worktree while its agent is running, so git refuses the non-force removal and branch-deletion commands this methodology uses against it from any concurrent session; the lock releases when the agent finishes. This coordination is harness behavior (see Claude Code's own worktree documentation), not a mechanism the conductor or methodology adds.

Temp-file ownership. Agents that write temp files are responsible for deleting them in teardown. If a downstream phase consumes the temp files, the consuming phase deletes the originals after consumption.

Superseding an open PR's work means close + rebase, never bundle. If your branch's work makes another open PR's commits unnecessary or subsumed, close that PR citing the superseding one and rebase your branch clean of its commits - do not merge or cherry-pick the superseded PR's commits into your own branch. A branch whose history contains another open PR's head commit is exactly the pattern an advisory review-rigor CI check flags where configured; treat the flag as confirmation to close + rebase, not to proceed. This applies to superseding only - see the rework-rounds bullet immediately below for the same-approach case.

Rework rounds on an open PR stay on the same PR - push fix commits to the existing branch, do not close and reopen. Rework (round-N fix, same implementation approach already on the open PR - a Skeptic finding, CI failure, or review comment resolved by a surgical edit that builds on top of the existing branch tip) is a distinct git-workflow class from superseding (a wholesale replacement of the PR's approach, where the old commits become dead weight rather than a foundation - still close + rebase per the bullet above). Test: if the fix commit builds on top of the existing branch tip and addresses specific findings against it, it is rework; if the new work discards the prior round's approach outright, it is superseding. See content/references/worktree-lifecycle.md §Round-N rework mechanic for the round-N branching and recovery procedure.

Context Economy

Read content/references/conventions-detail.md §Context Economy for context-window discipline rules (no duplicate file contents, minimal diffs, no verbatim tool output, structured blocks over prose) and multi-developer coordination guidance.

External Comment Discipline

Read content/references/conventions-detail.md §External Comment Discipline for rules on PR bodies, review comments, commit messages, ticket descriptions, and other external-facing artifacts (lead with result, bullets over prose, evidence beats description, no marketing voice).

Note for this Claude Code build

The rules and methodology files named above under 'Rules (read these files)' (METHODOLOGY.md, rules/code-standards.md, rules/conventions.md) are embedded verbatim above under 'Embedded Resident Content' - they are already in context now that this skill has been invoked. Do not issue a separate Read for them.

Skills similaires