From statsclaw
Defines Markdown artifact handoff protocol for two-pipeline (code/test/simulation) architecture in multi-agent workflows, enforcing naming, paths, and isolation via leader mediation.
npx claudepluginhub statsclaw/statsclaw --plugin statsclawThis skill uses the workspace's default tool permissions.
This protocol governs how work products pass between teammates, mediated by leader, in the two-pipeline architecture.
Enforces two-pipeline isolation protocol in multi-agent workflows: worktree (filesystem-level) for writers and information barriers between builder, tester, simulator pipelines for independent verification.
Orchestrates multi-AI pipeline: spawns specialist analysts (technical, UX/domain, security, performance, architecture), manages tasks with blockedBy dependencies, loops Plan-Review-Implement until Codex approval.
Orchestrates adversarial plan-implement-review pipeline by spawning role-specific agents with separate contexts. Run after /brainstorm, /repo-eval, /repo-health, or /doc-health.
Share bugs, ideas, or general feedback.
This protocol governs how work products pass between teammates, mediated by leader, in the two-pipeline architecture.
Teammates never talk to each other directly. Every handoff flows through leader:
upstream teammate → output artifact → leader reads → leader dispatches downstream → downstream reads artifact
Downstream teammates MUST reuse upstream artifacts. They MUST NOT re-discover or re-derive information that an upstream teammate already produced.
Pipeline isolation principle: Leader MUST enforce that code pipeline artifacts never reach the test pipeline, and vice versa. Only reviewer (the convergence point) sees both sides.
ALL artifacts passed between agents MUST use the .md (Markdown) file extension. This is a hard requirement, not a style preference. Markdown ensures artifacts are human-readable, diff-friendly, and renderable on GitHub.
Rules:
.md file: spec.md, test-spec.md, sim-spec.md, implementation.md, simulation.md, audit.md, review.md, docs.md, shipper.md, comprehension.md, ARCHITECTURE.md, mailbox.md, credentials.md, status.md, request.md, impact.md.md files: log-entry.md (with a <!-- filename: YYYY-MM-DD-slug.md --> header for workspace runs/ naming).md files.txt, .json, .yaml, .html)Each teammate produces specific output artifacts per run stage:
| Teammate | Artifact(s) | Path | Pipeline |
|---|---|---|---|
| planner | comprehension.md | .repos/workspace/<repo-name>/runs/<request-id>/comprehension.md | Comprehension record |
| planner | spec.md | .repos/workspace/<repo-name>/runs/<request-id>/spec.md | → Code Pipeline |
| planner | test-spec.md | .repos/workspace/<repo-name>/runs/<request-id>/test-spec.md | → Test Pipeline |
| planner | sim-spec.md | .repos/workspace/<repo-name>/runs/<request-id>/sim-spec.md | → Simulation Pipeline (workflows 11, 12) |
| builder | implementation.md | .repos/workspace/<repo-name>/runs/<request-id>/implementation.md | Code Pipeline output |
| simulator | simulation.md | .repos/workspace/<repo-name>/runs/<request-id>/simulation.md | Simulation Pipeline output (workflows 11, 12) |
| tester | audit.md | .repos/workspace/<repo-name>/runs/<request-id>/audit.md | Test Pipeline output |
| scriber | ARCHITECTURE.md | <target-repo>/ARCHITECTURE.md + .repos/workspace/<repo-name>/runs/<request-id>/ARCHITECTURE.md | Architecture (mandatory; target repo root is primary, run dir copy for reviewer) |
| scriber | log-entry.md | .repos/workspace/<repo-name>/runs/<request-id>/log-entry.md | Log entry with process record (mandatory; synced to workspace runs/ by shipper) |
| scriber | docs.md | .repos/workspace/<repo-name>/runs/<request-id>/docs.md | Documentation changes (synced to workspace <repo-name>/docs.md by shipper) |
| reviewer | review.md | .repos/workspace/<repo-name>/runs/<request-id>/review.md | Convergence output |
| shipper | shipper.md | .repos/workspace/<repo-name>/runs/<request-id>/shipper.md | Externalization output |
Every output artifact MUST include these two sections:
A concise description of what the teammate did, what files were changed or examined, and any notable decisions made.
A clear status indicator:
| Teammate | Possible Verdicts |
|---|---|
| planner | SPEC_READY — comprehension verified, all specs produced (spec.md, test-spec.md, and sim-spec.md for simulation workflows) |
| builder | IMPLEMENTED — code and unit tests written |
| simulator | SIMULATED — DGP and harness written, smoke run clean |
| tester | PASS — all validation checks green |
| scriber (recording mode) | DOCUMENTED — recording artifacts produced |
| scriber (implementer mode) | IMPLEMENTED + DOCUMENTED — docs written and recorded |
| reviewer | PASS / PASS WITH NOTE — safe to ship |
| shipper | SHIPPED — pushed, PR created |
planner
├── spec.md ──────────→ builder (code pipeline)
│ │
│ └── implementation.md
│ │
└── test-spec.md ─────→ tester (test pipeline) │
│ │
└── audit.md │
│ │
▼ ▼
scriber (recording)
reads ALL artifacts from both pipelines
produces: ARCHITECTURE.md (target repo root + run dir), log-entry.md, docs.md (run dir → workspace)
│
▼
reviewer (convergence)
│
▼
shipper
planner
└── spec.md ──────────→ scriber (implementer + scriber)
│
├── documentation changes
├── implementation.md
├── ARCHITECTURE.md (target repo root + run dir), log-entry.md, docs.md (run dir → workspace)
│
▼
reviewer (convergence)
│
▼
shipper
planner
├── spec.md ──────────→ builder (code pipeline) — workflow 11 only
│ │
│ └── implementation.md
│ │
├── test-spec.md ─────→ tester (test pipeline) │
│ │ │
│ └── audit.md │
│ │ │
└── sim-spec.md ──────→ simulator (simulation pipeline)
│ │
└── simulation.md │
│ │
▼ ▼
scriber (recording)
reads ALL artifacts from all pipelines
produces: ARCHITECTURE.md, log-entry.md, docs.md
│
▼
reviewer (convergence)
│
▼
shipper
Key properties:
spec.md is used in docs-only; test-spec.md is unused; simulation workflows use all three: spec.md, test-spec.md, sim-spec.md)Planner → Builder (Code Pipeline)
spec.md, request.md, impact.md, mailbox.mdtest-spec.mdPlanner → Tester (Test Pipeline)
test-spec.md, request.md, impact.md, mailbox.mdspec.mdPlanner → Simulator (Simulation Pipeline) — workflows 11, 12 only
sim-spec.md, request.md, impact.md, mailbox.mdspec.md, test-spec.mdBuilder + Tester (+ Simulator) → Scriber (Recording)
comprehension.md, spec.md, test-spec.md, implementation.md, audit.md, request.md, impact.md, mailbox.md. For simulation workflows: also sim-spec.md and simulation.md.Planner → Scriber (Implementer + Scriber)
spec.md, request.md, impact.md, mailbox.md, comprehension.mdspec.md as the implementer (replaces builder). Implements documentation AND produces recording artifacts.→ Reviewer (Convergence)
spec.md, test-spec.md, implementation.md, audit.md, ARCHITECTURE.md, docs.md, request.md, impact.md, mailbox.md, comprehension.md. For simulation workflows: also sim-spec.md and simulation.md.Reviewer → Shipper
review.md, credentials.md, implementation.md, audit.mdAfter each teammate returns, leader MUST:
HOLD, BLOCK, or STOP, do NOT dispatch the next downstream teammate.HOLD_REQUEST or INTERFACE_CHANGE messages.status.md to reflect the completed stage.spec.md exists (and test-spec.md for code workflows, and sim-spec.md for simulation workflows)spec.md). After builder completes and merges back, dispatch tester (with only test-spec.md) to validate the merged code.spec.md; give simulator only sim-spec.md. After both complete and merge back, dispatch tester (with only test-spec.md) to validate all merged code.sim-spec.md). After simulator completes and merges back, dispatch tester (with only test-spec.md). No builder.spec.md (as implementer). After scriber completes, dispatch reviewer directly.implementation.md (if builder was dispatched), simulation.md (if simulator was dispatched), and audit.mdThree signals, three owners, three responses. They never overlap.
Owner: planner, builder, scriber. Status: HOLD.
mailbox.md (HOLD_REQUEST messages).AskUserQuestion.Owner: tester (exclusively). Status: BLOCKED.
audit.md to identify the failure and routing (builder, planner, or scriber).Agent tool with the failure description from audit.md.
test-spec.md itself.Owner: reviewer (exclusively). Status: STOPPED.
review.md to identify the concern and routing.test-spec.md to builder or spec.md to tester. This breaks the adversarial verification model.BLOCK or STOP verdict. This violates the safety protocol.