Follow feature-dev-aidd:aidd-core for output contract and DocOps.
Loop discipline
- Read order: loop pack -> review pack (if any) -> fix_plan.json when verdict=REVISE -> rolling context pack.
- Excerpt-first: do not read full PRD/plan/tasklist/spec when the loop pack excerpt covers Goal/DoD/Boundaries/Expected paths/Size budget/Tests/Acceptance.
- No questions in loop-mode; record blockers/handoff instead.
- REVISE: reuse the same scope, follow fix_plan.json, and do not widen boundaries.
- Scope guard: out-of-scope -> WARN + handoff; forbidden -> BLOCKED. Never expand boundaries yourself.
- Tests: follow loop pack or reviewer policy; do not invent new test requirements.
- No large logs/diffs in chat; link to
aidd/reports/**. - Block policy:
strictfail-fast on any blocked step;ralphuses policy matrix v2 (hard_block|recoverable_retry|warn_continue) with bounded retries for recoverable reasons. - For recoverable blocked retries, emit observability fields:
recoverable_blocked,recovery_path,retry_attempt.
Preload matrix v2
- Roles:
implementer,reviewer,qa. - This skill must not be preloaded for other subagents.
Canonical shared Python entrypoints
python3 ${CLAUDE_PLUGIN_ROOT}/skills/aidd-loop/runtime/loop_pack.pypython3 ${CLAUDE_PLUGIN_ROOT}/skills/aidd-loop/runtime/loop_step.pypython3 ${CLAUDE_PLUGIN_ROOT}/skills/aidd-loop/runtime/loop_run.pypython3 ${CLAUDE_PLUGIN_ROOT}/skills/aidd-loop/runtime/preflight_result_validate.pypython3 ${CLAUDE_PLUGIN_ROOT}/skills/aidd-loop/runtime/output_contract.py- Preflight preparation is stage-chain-internal and not an operator command.
Command contracts
python3 ${CLAUDE_PLUGIN_ROOT}/skills/aidd-loop/runtime/loop_pack.py
- When to run: before loop stage execution to assemble bounded evidence input.
- Inputs: ticket/scope context and available stage artifacts (
readmap,review pack, context pack). - Outputs: deterministic loop pack summary for implement/review/qa orchestration.
- Failure mode: non-zero exit when required upstream artifacts are missing or malformed.
- Next action: repair missing prerequisites and rerun pack generation.
python3 ${CLAUDE_PLUGIN_ROOT}/skills/aidd-loop/runtime/loop_run.py
- When to run: stage-chain-orchestrated loop execution for bounded stage retries.
- Inputs: loop mode/profile, ticket/scope context, and stage-specific payloads.
- Outputs: loop execution status with deterministic retry/blocked metadata.
- Failure mode: non-zero exit on invalid loop payload, policy violation, or unrecoverable blocked condition.
- Next action: apply fix plan or handoff policy action, then rerun with unchanged scope.
Additional resources
- Loop stage-chain reference: reference.md (when: stage-chain path/fallback behavior needs clarification; why: confirm canonical chain and bounded recovery policy).
- Loop pack template source: templates/loop-pack.template.md (when: loop pack format is unclear; why: confirm canonical sections seeded by init/runtime).