codex-orchestrator 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/README.md +12 -9
- package/dist/src/index.d.ts +10 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +5 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/v2/acceptance-proof.d.ts +3 -0
- package/dist/src/v2/acceptance-proof.d.ts.map +1 -1
- package/dist/src/v2/acceptance-proof.js +2 -8
- package/dist/src/v2/acceptance-proof.js.map +1 -1
- package/dist/src/v2/adapters/gh-issue-adapter.d.ts +5 -3
- package/dist/src/v2/adapters/gh-issue-adapter.d.ts.map +1 -1
- package/dist/src/v2/adapters/gh-issue-adapter.js +63 -7
- package/dist/src/v2/adapters/gh-issue-adapter.js.map +1 -1
- package/dist/src/v2/adapters/issues.d.ts +16 -2
- package/dist/src/v2/adapters/issues.d.ts.map +1 -1
- package/dist/src/v2/adapters/issues.js +15 -5
- package/dist/src/v2/adapters/issues.js.map +1 -1
- package/dist/src/v2/adapters/mission-coordinator-lock.d.ts +1 -0
- package/dist/src/v2/adapters/mission-coordinator-lock.d.ts.map +1 -1
- package/dist/src/v2/adapters/mission-coordinator-lock.js +5 -1
- package/dist/src/v2/adapters/mission-coordinator-lock.js.map +1 -1
- package/dist/src/v2/candidate-cli.d.ts +4 -0
- package/dist/src/v2/candidate-cli.d.ts.map +1 -1
- package/dist/src/v2/candidate-cli.js +26 -11
- package/dist/src/v2/candidate-cli.js.map +1 -1
- package/dist/src/v2/cli-contract.d.ts +1 -1
- package/dist/src/v2/cli-contract.d.ts.map +1 -1
- package/dist/src/v2/cli-contract.js +10 -0
- package/dist/src/v2/cli-contract.js.map +1 -1
- package/dist/src/v2/code-review-report.d.ts +66 -0
- package/dist/src/v2/code-review-report.d.ts.map +1 -0
- package/dist/src/v2/code-review-report.js +259 -0
- package/dist/src/v2/code-review-report.js.map +1 -0
- package/dist/src/v2/codex-process.d.ts +8 -1
- package/dist/src/v2/codex-process.d.ts.map +1 -1
- package/dist/src/v2/codex-process.js +11 -0
- package/dist/src/v2/codex-process.js.map +1 -1
- package/dist/src/v2/config.d.ts +2 -1
- package/dist/src/v2/config.d.ts.map +1 -1
- package/dist/src/v2/config.js +8 -3
- package/dist/src/v2/config.js.map +1 -1
- package/dist/src/v2/contained-report-operation.d.ts +100 -0
- package/dist/src/v2/contained-report-operation.d.ts.map +1 -0
- package/dist/src/v2/contained-report-operation.js +200 -0
- package/dist/src/v2/contained-report-operation.js.map +1 -0
- package/dist/src/v2/containment.d.ts +6 -0
- package/dist/src/v2/containment.d.ts.map +1 -1
- package/dist/src/v2/containment.js +40 -1
- package/dist/src/v2/containment.js.map +1 -1
- package/dist/src/v2/direct-delivery.d.ts +101 -0
- package/dist/src/v2/direct-delivery.d.ts.map +1 -0
- package/dist/src/v2/direct-delivery.js +547 -0
- package/dist/src/v2/direct-delivery.js.map +1 -0
- package/dist/src/v2/immutable-workflow-publisher.d.ts +40 -0
- package/dist/src/v2/immutable-workflow-publisher.d.ts.map +1 -0
- package/dist/src/v2/immutable-workflow-publisher.js +218 -0
- package/dist/src/v2/immutable-workflow-publisher.js.map +1 -0
- package/dist/src/v2/implementation-reviewer.d.ts +81 -0
- package/dist/src/v2/implementation-reviewer.d.ts.map +1 -0
- package/dist/src/v2/implementation-reviewer.js +157 -0
- package/dist/src/v2/implementation-reviewer.js.map +1 -0
- package/dist/src/v2/owner-control-lock.d.ts +41 -0
- package/dist/src/v2/owner-control-lock.d.ts.map +1 -0
- package/dist/src/v2/owner-control-lock.js +174 -0
- package/dist/src/v2/owner-control-lock.js.map +1 -0
- package/dist/src/v2/route-continuations.d.ts +32 -0
- package/dist/src/v2/route-continuations.d.ts.map +1 -0
- package/dist/src/v2/route-continuations.js +2 -0
- package/dist/src/v2/route-continuations.js.map +1 -0
- package/dist/src/v2/route-coordinator.d.ts +77 -0
- package/dist/src/v2/route-coordinator.d.ts.map +1 -0
- package/dist/src/v2/route-coordinator.js +370 -0
- package/dist/src/v2/route-coordinator.js.map +1 -0
- package/dist/src/v2/route-decision.d.ts +129 -0
- package/dist/src/v2/route-decision.d.ts.map +1 -0
- package/dist/src/v2/route-decision.js +400 -0
- package/dist/src/v2/route-decision.js.map +1 -0
- package/dist/src/v2/run-issue.d.ts +63 -2
- package/dist/src/v2/run-issue.d.ts.map +1 -1
- package/dist/src/v2/run-issue.js +906 -91
- package/dist/src/v2/run-issue.js.map +1 -1
- package/dist/src/v2/run-store.d.ts +25 -1
- package/dist/src/v2/run-store.d.ts.map +1 -1
- package/dist/src/v2/run-store.js +143 -3
- package/dist/src/v2/run-store.js.map +1 -1
- package/dist/src/v2/runtime-assets.d.ts +15 -13
- package/dist/src/v2/runtime-assets.d.ts.map +1 -1
- package/dist/src/v2/runtime-assets.js +263 -416
- package/dist/src/v2/runtime-assets.js.map +1 -1
- package/dist/src/v2/runtime.d.ts +14 -6
- package/dist/src/v2/runtime.d.ts.map +1 -1
- package/dist/src/v2/runtime.js +478 -56
- package/dist/src/v2/runtime.js.map +1 -1
- package/dist/src/v2/setup-cli.d.ts.map +1 -1
- package/dist/src/v2/setup-cli.js +1 -0
- package/dist/src/v2/setup-cli.js.map +1 -1
- package/dist/src/v2/setup-runtime.d.ts.map +1 -1
- package/dist/src/v2/setup-runtime.js +20 -72
- package/dist/src/v2/setup-runtime.js.map +1 -1
- package/dist/src/v2/setup.d.ts +4 -1
- package/dist/src/v2/setup.d.ts.map +1 -1
- package/dist/src/v2/setup.js +104 -1
- package/dist/src/v2/setup.js.map +1 -1
- package/dist/src/v2/spec-coordinator.d.ts +85 -0
- package/dist/src/v2/spec-coordinator.d.ts.map +1 -0
- package/dist/src/v2/spec-coordinator.js +88 -0
- package/dist/src/v2/spec-coordinator.js.map +1 -0
- package/dist/src/v2/spec-delivery.d.ts +143 -0
- package/dist/src/v2/spec-delivery.d.ts.map +1 -0
- package/dist/src/v2/spec-delivery.js +401 -0
- package/dist/src/v2/spec-delivery.js.map +1 -0
- package/dist/src/v2/triage-route.d.ts +68 -0
- package/dist/src/v2/triage-route.d.ts.map +1 -0
- package/dist/src/v2/triage-route.js +223 -0
- package/dist/src/v2/triage-route.js.map +1 -0
- package/dist/src/v2/waiting-human-coordinator.d.ts +49 -0
- package/dist/src/v2/waiting-human-coordinator.d.ts.map +1 -0
- package/dist/src/v2/waiting-human-coordinator.js +509 -0
- package/dist/src/v2/waiting-human-coordinator.js.map +1 -0
- package/dist/src/v2/waiting-human.d.ts +143 -0
- package/dist/src/v2/waiting-human.d.ts.map +1 -0
- package/dist/src/v2/waiting-human.js +408 -0
- package/dist/src/v2/waiting-human.js.map +1 -0
- package/dist/src/v2/workflow-assets.d.ts +90 -0
- package/dist/src/v2/workflow-assets.d.ts.map +1 -0
- package/dist/src/v2/workflow-assets.js +554 -0
- package/dist/src/v2/workflow-assets.js.map +1 -0
- package/docs/deep-dive.md +15 -8
- package/internal-workflow/docs/agents/artifact-review-loop.md +267 -0
- package/internal-workflow/docs/agents/bug-workflow-routing.md +24 -0
- package/internal-workflow/docs/agents/coding-skill-routing.md +203 -0
- package/internal-workflow/docs/agents/confidence-rubric.md +65 -0
- package/internal-workflow/docs/agents/contract-test-ledger.md +60 -0
- package/internal-workflow/docs/agents/implementation-review-loop.md +302 -0
- package/internal-workflow/docs/agents/review-gates.md +49 -0
- package/internal-workflow/docs/agents/review-protocol.md +170 -0
- package/internal-workflow/docs/agents/tool-usage.md +88 -0
- package/internal-workflow/manifest.json +1 -0
- package/internal-workflow/operations/acceptance-proof/SKILL.md +3 -0
- package/internal-workflow/operations/ambiguity-review/SKILL.md +3 -0
- package/internal-workflow/operations/cleanup-review/SKILL.md +3 -0
- package/internal-workflow/operations/code-review/SKILL.md +3 -0
- package/internal-workflow/operations/implementation/SKILL.md +3 -0
- package/internal-workflow/operations/spec-author/SKILL.md +3 -0
- package/internal-workflow/operations/spec-implementation/SKILL.md +3 -0
- package/internal-workflow/operations/spec-review/SKILL.md +3 -0
- package/internal-workflow/operations/triage/SKILL.md +3 -0
- package/internal-workflow/profiles/analyst_deep.toml +9 -0
- package/internal-workflow/profiles/implementer_deep.toml +9 -0
- package/internal-workflow/profiles/implementer_standard.toml +9 -0
- package/internal-workflow/profiles/proof_agent.toml +8 -0
- package/internal-workflow/profiles/researcher_standard.toml +9 -0
- package/internal-workflow/profiles/reviewer_deep.toml +9 -0
- package/internal-workflow/profiles/reviewer_fast.toml +9 -0
- package/internal-workflow/profiles/reviewer_standard.toml +9 -0
- package/internal-workflow/schemas/ambiguity-review-v1.json +1 -0
- package/internal-workflow/schemas/code-review-v1.json +1 -0
- package/internal-workflow/schemas/implementation-report-v1.json +1 -0
- package/internal-workflow/schemas/proof-report-v1.json +1 -0
- package/internal-workflow/schemas/spec-author-v1.json +1 -0
- package/internal-workflow/schemas/spec-review-v1.json +30 -0
- package/internal-workflow/schemas/triage-route-v1.json +1 -0
- package/internal-workflow/skills/acceptance-proof/agents/openai.yaml +6 -0
- package/internal-workflow/skills/agent-auto/agents/openai.yaml +6 -0
- package/internal-workflow/skills/cleanup-review/SKILL.md +84 -0
- package/internal-workflow/skills/cleanup-review/agents/openai.yaml +6 -0
- package/internal-workflow/skills/code-review/SKILL.md +257 -0
- package/internal-workflow/skills/code-review/agents/openai.yaml +4 -0
- package/internal-workflow/skills/code-review/references/bug-classes.md +56 -0
- package/internal-workflow/skills/code-review/references/framework-lenses.md +34 -0
- package/internal-workflow/skills/code-review/references/targeted-recipes.md +49 -0
- package/internal-workflow/skills/codebase-design/DEEPENING.md +35 -0
- package/internal-workflow/skills/codebase-design/DESIGN-IT-TWICE.md +50 -0
- package/internal-workflow/skills/codebase-design/SKILL.md +82 -0
- package/internal-workflow/skills/codebase-design/agents/openai.yaml +6 -0
- package/internal-workflow/skills/diagnosing-bugs/SKILL.md +138 -0
- package/internal-workflow/skills/diagnosing-bugs/agents/openai.yaml +6 -0
- package/internal-workflow/skills/diagnosing-bugs/scripts/hitl-loop.template.sh +41 -0
- package/internal-workflow/skills/implementation-spec-maker/SKILL.md +93 -0
- package/internal-workflow/skills/implementation-spec-maker/agents/openai.yaml +6 -0
- package/internal-workflow/skills/implementation-spec-maker/references/source-modes.md +31 -0
- package/internal-workflow/skills/implementation-spec-maker/references/spec-template.md +146 -0
- package/internal-workflow/skills/implementation-spec-review/SKILL.md +211 -0
- package/internal-workflow/skills/implementation-spec-review/agents/openai.yaml +6 -0
- package/internal-workflow/skills/research/SKILL.md +107 -0
- package/internal-workflow/skills/research/agents/openai.yaml +6 -0
- package/internal-workflow/skills/small-task-implementer/SKILL.md +97 -0
- package/internal-workflow/skills/small-task-implementer/agents/openai.yaml +6 -0
- package/internal-workflow/skills/spec-implementer/SKILL.md +197 -0
- package/internal-workflow/skills/spec-implementer/agents/openai.yaml +6 -0
- package/internal-workflow/skills/tdd/SKILL.md +59 -0
- package/internal-workflow/skills/tdd/agents/openai.yaml +6 -0
- package/internal-workflow/skills/tdd/interface-design.md +31 -0
- package/internal-workflow/skills/tdd/mocking.md +59 -0
- package/internal-workflow/skills/tdd/refactoring.md +10 -0
- package/internal-workflow/skills/tdd/tests.md +77 -0
- package/internal-workflow/skills/triage/AGENT-BRIEF.md +192 -0
- package/internal-workflow/skills/triage/OUT-OF-SCOPE.md +101 -0
- package/internal-workflow/skills/triage/SKILL.md +134 -0
- package/internal-workflow/skills/triage/agents/openai.yaml +6 -0
- package/internal-workflow/skills/ui-evidence-proof/SKILL.md +123 -0
- package/internal-workflow/skills/ui-evidence-proof/agents/openai.yaml +6 -0
- package/package.json +6 -3
- /package/{internal-skills → internal-workflow/skills}/acceptance-proof/SKILL.md +0 -0
- /package/{internal-skills → internal-workflow/skills}/acceptance-proof/references/android.md +0 -0
- /package/{internal-skills → internal-workflow/skills}/acceptance-proof/references/browser.md +0 -0
- /package/{internal-skills → internal-workflow/skills}/acceptance-proof/references/ios.md +0 -0
- /package/{internal-skills → internal-workflow/skills}/acceptance-proof/tools/android-lease.mjs +0 -0
- /package/{internal-skills → internal-workflow/skills}/acceptance-proof/tools/ios-lease.mjs +0 -0
- /package/{internal-skills → internal-workflow/skills}/agent-auto/SKILL.md +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-assets.js","sourceRoot":"","sources":["../../../src/v2/workflow-assets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,IAAI,EAEJ,SAAS,GACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAElE,OAAO,EAAE,wBAAwB,EAAqC,MAAM,mCAAmC,CAAC;AAEhH,MAAM,gBAAgB,GAAG,6CAA6C,CAAC;AACvE,MAAM,YAAY,GAAG,yCAAyC,CAAC;AAC/D,MAAM,aAAa,GAAG,wCAAwC,CAAC;AAC/D,MAAM,MAAM,GAAG,iBAAiB,CAAC;AACjC,MAAM,IAAI,GAAG,wEAAwE,CAAC;AACtF,MAAM,eAAe,GAAG;IACtB,kBAAkB,EAAE,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,iBAAiB,EAAE,iBAAiB;IACvG,2BAA2B,EAAE,4BAA4B,EAAE,UAAU,EAAE,wBAAwB;IAC/F,kBAAkB,EAAE,KAAK,EAAE,QAAQ,EAAE,mBAAmB;CACzD,CAAC;AACF,MAAM,iBAAiB,GAAG;IACxB,cAAc,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,aAAa,EAAE,qBAAqB;IAChG,eAAe,EAAE,eAAe,EAAE,mBAAmB;CACtD,CAAC;AACF,MAAM,mBAAmB,GAAG;IAC1B,kBAAkB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AAI,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3I,SAAS,GAAG,CAAC,KAAa,IAAY,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAChG,SAAS,MAAM,CAAC,KAAc,EAAE,IAAY,IAAa,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAK,KAA+B,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC;AAChK,SAAS,SAAS,KAAa,MAAM,GAAG,GAAG,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,IAAI,GAAG,KAAK,SAAS;IAAE,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC"}
|
package/docs/deep-dive.md
CHANGED
|
@@ -6,6 +6,8 @@ The package bin is `dist/src/v2/candidate-cli.js`; `candidate-cli` is only the h
|
|
|
6
6
|
|
|
7
7
|
The runtime is split into a policy core under `src/v2/` and a small package-owned adapter closure under `src/v2/adapters/`. No earlier runner implementation is shipped or executed.
|
|
8
8
|
|
|
9
|
+
`internal-workflow/manifest.json` is the sole workflow inventory. Release-time sync imports an explicit skill/profile/doc closure and assigns each operation one entrypoint, schema, profile, file closure, and authority policy. At runtime the Runner verifies the full package tree, publishes one immutable generation with a no-replace receipt, pins that receipt in the run record, and creates operation-scoped attempt snapshots only from the pin. Package updates and conflicting user skills cannot change an active run.
|
|
10
|
+
|
|
9
11
|
## Trust boundary
|
|
10
12
|
|
|
11
13
|
The Runner is trusted. It owns:
|
|
@@ -23,7 +25,7 @@ This boundary prevents prompt content or repository code from receiving external
|
|
|
23
25
|
|
|
24
26
|
## Configuration
|
|
25
27
|
|
|
26
|
-
`.codex-orchestrator/config.json` is an exact, versioned contract. Unknown keys and removed policy surfaces are rejected. It names one GitHub repository,
|
|
28
|
+
`.codex-orchestrator/config.json` is an exact, versioned contract. Unknown keys and removed policy surfaces are rejected. It names one GitHub repository, five labels (`auto`, `running`, `blocked`, `review`, `waitingHuman`), one branch template, a serial polling interval, five implementation cycles, one Codex command contract, finite checks, one proof artifact directory, and deny lists.
|
|
27
29
|
|
|
28
30
|
The committed config contains policy, never live run state or credentials. Durable runtime state is stored beneath the configured state directory and the Runner's private home.
|
|
29
31
|
|
|
@@ -34,13 +36,14 @@ Direct runs and daemon-discovered runs call the same lifecycle:
|
|
|
34
36
|
1. Snapshot issue and repository identity.
|
|
35
37
|
2. Verify authorization and acquire fenced ownership.
|
|
36
38
|
3. Create or reconcile the issue worktree.
|
|
37
|
-
4.
|
|
38
|
-
5.
|
|
39
|
-
6.
|
|
40
|
-
7.
|
|
41
|
-
8. Run
|
|
42
|
-
9.
|
|
43
|
-
10.
|
|
39
|
+
4. Persist a reviewed route. An `awaiting-user` route publishes one durable question, freezes only a current WRITE+ answer, restores running labels, and reruns triage in the same Run before implementation.
|
|
40
|
+
5. Run one implementation attempt and validate its structured report.
|
|
41
|
+
6. Inspect all tracked, staged, unstaged, untracked, and ignored denied-path changes.
|
|
42
|
+
7. Commit the validated implementation candidate locally.
|
|
43
|
+
8. Run configured checks and create a nominal `CheckedChange` bound to exact Git and content hashes.
|
|
44
|
+
9. Run Acceptance Proof against that binding.
|
|
45
|
+
10. Publish with durable intents and postcondition reconciliation.
|
|
46
|
+
11. Persist and return one typed terminal or resumable result.
|
|
44
47
|
|
|
45
48
|
Implementation findings return to the same worktree for at most five cycles. A malformed report gets one report-only repair; a clean transport disconnect gets one separate transport retry. Neither budget silently becomes another implementation cycle.
|
|
46
49
|
|
|
@@ -50,6 +53,8 @@ Every external or non-idempotent operation uses intent-before-effect and confirm
|
|
|
50
53
|
|
|
51
54
|
Atomic files use write, flush, rename, and directory synchronization where supported. Locks and leases carry fencing tokens and process/boot identity. Unknown ownership or inability to prove process-group absence is a safe halt, not permission to continue.
|
|
52
55
|
|
|
56
|
+
Workflow generation and attempt publication use hard-link claims, recovery chains, sealed file evidence, and ready receipts. Existing content is reused only after full path, mode, owner, size, and hash verification; active pre-generation V1 state fails closed while terminal V1 history remains readable.
|
|
57
|
+
|
|
53
58
|
## Checks and publication
|
|
54
59
|
|
|
55
60
|
Checks are configured finite commands executed by the Runner. Arbitrary agent-proposed shell commands do not become Runner authority. A check result is bound into `CheckedChange`; any later Git, index, tracked-content, untracked-content, worktree, or check-policy drift invalidates proof.
|
|
@@ -77,6 +82,8 @@ Command output and static inspection may remain local and include machine paths.
|
|
|
77
82
|
|
|
78
83
|
`setup` creates or verifies V2 config. `--prepare-labels` performs only the requested GitHub label preparation. `doctor` and `status` are read-only inspections.
|
|
79
84
|
|
|
85
|
+
Exact Config V1 is upgraded atomically by `setup configure` only after the shared run-owner fence and remote running claims are proven absent. Operational commands return `migration-required` until that upgrade completes.
|
|
86
|
+
|
|
80
87
|
Recognized earlier config is parsed only by the bounded cutover reader. `setup --fresh` acquires both ownership fences, proves no active old claims, saves immutable backup evidence, and publishes V2 config last. The old runtime never executes as part of this process.
|
|
81
88
|
|
|
82
89
|
## Live validation
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
# Artifact Review Loop
|
|
2
|
+
|
|
3
|
+
Use this policy whenever `plans-maker` or `implementation-spec-maker` reviews an
|
|
4
|
+
artifact. This target-specific Module owns artifact preflight, review-risk
|
|
5
|
+
classification, scope conservation, reviewer topology, and artifact outcome
|
|
6
|
+
mapping. It applies [`review-protocol.md`](review-protocol.md) for context
|
|
7
|
+
transfer, Full/Closure mechanics, defect lifecycle, no-progress, and the common
|
|
8
|
+
result envelope.
|
|
9
|
+
|
|
10
|
+
The Module sits at the Seam between artifact-authoring skills and the existing
|
|
11
|
+
`plan-review` and `implementation-spec-review` Adapters. Callers provide an
|
|
12
|
+
artifact and source authority; they do not reproduce either Module.
|
|
13
|
+
|
|
14
|
+
## Interface
|
|
15
|
+
|
|
16
|
+
Conceptually, callers use one operation:
|
|
17
|
+
|
|
18
|
+
```text
|
|
19
|
+
review_artifact(
|
|
20
|
+
artifact_kind,
|
|
21
|
+
artifact_path,
|
|
22
|
+
source_references,
|
|
23
|
+
approved_decisions,
|
|
24
|
+
risk_profile = auto
|
|
25
|
+
) -> review_outcome
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
`review_outcome` contains:
|
|
29
|
+
|
|
30
|
+
- `outcome`: `Approved | Blocked | Waived`
|
|
31
|
+
- `adapter_verdict`: `Approved | Needs Work | Rejected | Not run`
|
|
32
|
+
- `risk_profile`: `simple | medium | high`
|
|
33
|
+
- `risk_reasons`: evidence-backed classification signals
|
|
34
|
+
- `review_passes`, `full_reviews`, `closure_reviews`, and `fresh_sessions`
|
|
35
|
+
- mandatory-lens coverage
|
|
36
|
+
- the Defect Ledger, including every unresolved blocker or execution risk
|
|
37
|
+
|
|
38
|
+
The caller may explicitly raise the risk profile. It must not lower an
|
|
39
|
+
evidence-backed profile or override a hard escalator.
|
|
40
|
+
|
|
41
|
+
Reviewer Adapters themselves return only `Approved`, `Needs Work`, or
|
|
42
|
+
`Rejected`. `Blocked` is a Module-level terminal outcome produced by preflight
|
|
43
|
+
or a convergence stop rule; it is never invented by an individual reviewer.
|
|
44
|
+
`Waived` is also Module-level and requires an explicit user instruction to skip
|
|
45
|
+
remaining artifact review. Preserve the latest Adapter verdict when reviews
|
|
46
|
+
already ran; use `Not run` only when no reviewer ran.
|
|
47
|
+
|
|
48
|
+
## Preflight And Risk Classification
|
|
49
|
+
|
|
50
|
+
Run preflight before the first reviewer. Confirm source authority, approved
|
|
51
|
+
scope, user decisions, external contracts, and the current artifact revision.
|
|
52
|
+
Unknown product decisions or missing mandatory evidence block before review and
|
|
53
|
+
do not start a reviewer.
|
|
54
|
+
|
|
55
|
+
A useful preflight-blocked artifact may be saved with zero reviews. Record the
|
|
56
|
+
Module outcome as `Blocked`, `Review Passes: 0`, and the exact blocking
|
|
57
|
+
unknown; do not invent an Adapter verdict for a reviewer that never ran.
|
|
58
|
+
|
|
59
|
+
Classify risk by the consequence and uncertainty of being wrong, not by file
|
|
60
|
+
count or estimated implementation effort.
|
|
61
|
+
|
|
62
|
+
### Hard Escalators
|
|
63
|
+
|
|
64
|
+
`high` requires a sensitive mechanism, an evidence-backed material consequence,
|
|
65
|
+
and at least one uncertainty amplifier: competing or unclear ownership, a
|
|
66
|
+
cross-trust-boundary effect, non-local rollback/recovery, an unproven external
|
|
67
|
+
contract, or proof that cannot isolate the material failure. A sensitive
|
|
68
|
+
mechanism with one proven owner, a local pattern, bounded rollback, and direct
|
|
69
|
+
proof remains a standard signal rather than a hard escalator.
|
|
70
|
+
|
|
71
|
+
| Sensitive mechanism | Material consequence required for `high` |
|
|
72
|
+
| --- | --- |
|
|
73
|
+
| Durable data, transaction, migration, schema | Corruption/loss, irreversible reinterpretation, or non-trivial rollback/backfill |
|
|
74
|
+
| Concurrency, ordering, queue, retry, idempotency, shared state | Duplicate external effect, cross-worker invariant violation, corrupt/false durable state |
|
|
75
|
+
| Auth, secrets, permissions, payments, destructive writes | Access/secret leak, incorrect money movement, or user/production data destruction |
|
|
76
|
+
| Background processing or multiple writers | Ambiguous recovery ownership or competing source-of-truth ownership |
|
|
77
|
+
| Unknown external contract, multi-agent integration, rollout | Safety-critical/irreversible failure or any material consequence above |
|
|
78
|
+
|
|
79
|
+
### Standard Signals
|
|
80
|
+
|
|
81
|
+
Without a hard escalator, count: user-visible behavior; multiple Modules/runtime
|
|
82
|
+
surfaces; shared Interface/DTO/event/serialization changes; non-trivial
|
|
83
|
+
error/fallback/timeout/recovery; a known external contract; or a narrow sensitive
|
|
84
|
+
mechanism retained inside one proven owner and local pattern.
|
|
85
|
+
|
|
86
|
+
Use this deterministic mapping:
|
|
87
|
+
|
|
88
|
+
| Profile | Classification |
|
|
89
|
+
| --- | --- |
|
|
90
|
+
| `simple` | No hard escalator and 0-2 standard signals |
|
|
91
|
+
| `medium` | No hard escalator and 3-5 standard signals |
|
|
92
|
+
| `high` | Any hard escalator or 6+ standard signals |
|
|
93
|
+
|
|
94
|
+
File count is never decisive: one trust-boundary line can be `high`, while a
|
|
95
|
+
broad mechanical rename can remain `simple` or `medium`.
|
|
96
|
+
|
|
97
|
+
Record the decision in the artifact:
|
|
98
|
+
|
|
99
|
+
```yaml
|
|
100
|
+
review_profile: simple | medium | high
|
|
101
|
+
review_reasons:
|
|
102
|
+
- "<signal>: <source or repo evidence>"
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Scope Conservation
|
|
106
|
+
|
|
107
|
+
Review profile controls review depth, not artifact size or solution breadth.
|
|
108
|
+
Risk may require stronger proof or more independent review, but it does not
|
|
109
|
+
authorize extra product behavior, runtime layers, or operational machinery.
|
|
110
|
+
|
|
111
|
+
Each review repair must preserve the approved scope. When it resolves the
|
|
112
|
+
failure, delete or narrow the proposal before adding a mechanism. Do not add
|
|
113
|
+
feature flags, telemetry systems, dashboards, rollout machinery, compatibility
|
|
114
|
+
paths, generic fallbacks, or other operational features unless the source
|
|
115
|
+
explicitly requires them or a concrete evidenced failure path makes them
|
|
116
|
+
necessary. Optional improvements remain optional and outside the artifact
|
|
117
|
+
unless the source authority or user explicitly approves them.
|
|
118
|
+
|
|
119
|
+
If review discovers a higher-risk signal, escalate immediately. Keep completed
|
|
120
|
+
review passes in the audit trail; do not discard valid coverage or automatically
|
|
121
|
+
restart the loop. A user decision within approved scope also does not reset the
|
|
122
|
+
defect history. A genuinely new product scope starts a new artifact revision
|
|
123
|
+
only when the root explicitly says so and reports the previous outcome.
|
|
124
|
+
|
|
125
|
+
When escalation to `high` occurs after reviews have started, do not pretend the
|
|
126
|
+
initial full reviews were parallel. Preserve completed coverage, assign it to
|
|
127
|
+
the matching high-risk lens set, and run only the missing full lens review. Then
|
|
128
|
+
use affected-lens Closure for repaired defects.
|
|
129
|
+
|
|
130
|
+
## Review Capsule
|
|
131
|
+
|
|
132
|
+
Use the protocol capsule with these artifact fields:
|
|
133
|
+
|
|
134
|
+
- the unanswered artifact question and any prior coverage it invalidates
|
|
135
|
+
- current saved artifact content and artifact kind
|
|
136
|
+
- approved scope, out of scope, and Decision Snapshot
|
|
137
|
+
- source-authority paths or URLs
|
|
138
|
+
- Evidence Index entries of `claim -> file:symbol`, artifact section, or trusted
|
|
139
|
+
URL
|
|
140
|
+
|
|
141
|
+
For Closure, map artifact sections into the protocol Revision Map.
|
|
142
|
+
|
|
143
|
+
## Review Modes
|
|
144
|
+
|
|
145
|
+
Use protocol Full and Closure without redefining them. Artifact Closure maps
|
|
146
|
+
`affected_targets` to changed sections and source contracts. A substantive
|
|
147
|
+
artifact rewrite requires a new Full pass only when existing mandatory-lens
|
|
148
|
+
coverage is no longer valid.
|
|
149
|
+
|
|
150
|
+
## Risk-Aware Topology
|
|
151
|
+
|
|
152
|
+
`simple` uses one `reviewer_fast` session, `medium` uses one
|
|
153
|
+
`reviewer_standard` session, and `high` uses two independent `reviewer_deep`
|
|
154
|
+
sessions with disjoint primary lenses. Root always launches these children and
|
|
155
|
+
never executes the Adapter as self-review. The Adapter runs inline only inside
|
|
156
|
+
the already assigned reviewer child because children cannot spawn grandchildren.
|
|
157
|
+
Both high-profile full reviews are required for approval. Review counts are
|
|
158
|
+
audit and performance metrics, never terminal limits.
|
|
159
|
+
|
|
160
|
+
### Simple And Medium
|
|
161
|
+
|
|
162
|
+
Use one profile-selected reviewer lineage and one Full pass. After each
|
|
163
|
+
consolidated repair batch, use protocol Closure until its lenses are clear or
|
|
164
|
+
protocol no-progress/stop rules apply.
|
|
165
|
+
|
|
166
|
+
Default initial sessions: 1. Default full reviews: 1.
|
|
167
|
+
|
|
168
|
+
### High
|
|
169
|
+
|
|
170
|
+
When `high` is known at preflight, split primary lenses exactly as follows:
|
|
171
|
+
|
|
172
|
+
- **Architecture/Execution:** source authority, scope, determinism, evidence,
|
|
173
|
+
preconditions, architecture and ownership, sequencing/slices, reuse and
|
|
174
|
+
simplicity, validation, and handoff.
|
|
175
|
+
- **Failure/Contracts:** state transitions, concurrency and ordering,
|
|
176
|
+
persistence, retry/idempotency, external/runtime contracts, auth/security,
|
|
177
|
+
destructive behavior, partial failure/recovery, and Contract Test Ledger.
|
|
178
|
+
|
|
179
|
+
Each reviewer owns its assigned primary lenses. It may report a concrete
|
|
180
|
+
cross-lens defect, but it does not repeat the other reviewer's broad discovery.
|
|
181
|
+
Root aggregates both results and verifies that their combined coverage includes
|
|
182
|
+
all mandatory lenses and cross-lens defects before approval.
|
|
183
|
+
|
|
184
|
+
1. Reviewer A performs a full Architecture/Execution review.
|
|
185
|
+
2. Reviewer B performs a full Failure/Contracts review in parallel with review
|
|
186
|
+
1. The two briefs have disjoint primary lenses and both reviewers remain
|
|
187
|
+
independent.
|
|
188
|
+
3. After one consolidated repair batch, apply protocol Closure only to affected
|
|
189
|
+
A/B lineages, in parallel when both are affected.
|
|
190
|
+
4. Stop when both lens sets are clear on the same settled revision or protocol
|
|
191
|
+
stop/no-progress rules apply.
|
|
192
|
+
|
|
193
|
+
Default initial sessions: 2. Default full reviews: 2. Closure sessions rotate by
|
|
194
|
+
protocol; another Full requires invalidated mandatory-lens coverage.
|
|
195
|
+
|
|
196
|
+
Root owns launches, aggregation, repairs, and final decisions. Parallel launch
|
|
197
|
+
must preserve and close every fulfilled handle even after partial failure.
|
|
198
|
+
|
|
199
|
+
## Defect Ledger
|
|
200
|
+
|
|
201
|
+
Use the canonical protocol ledger. Artifact locations are stored in
|
|
202
|
+
`affected_targets` as sections or source contracts. Artifact proof-contract gaps
|
|
203
|
+
always use `repair-now` and reopen artifact review; they cannot use
|
|
204
|
+
`planned-final-verification`.
|
|
205
|
+
|
|
206
|
+
## Convergence And Stop Rules
|
|
207
|
+
|
|
208
|
+
Apply protocol repair, no-progress, stop, and waiver semantics first. Return
|
|
209
|
+
`Approved` only when all of these artifact conditions also hold:
|
|
210
|
+
|
|
211
|
+
- the verdict applies to the current saved artifact content
|
|
212
|
+
- source authority and approved scope still match the artifact
|
|
213
|
+
|
|
214
|
+
Persist mandatory-lens coverage with the outcome. Any substantive edit after
|
|
215
|
+
approval invalidates `Approved` until the saved artifact passes the applicable
|
|
216
|
+
Module path again. Updating only lifecycle and review-result metadata does not
|
|
217
|
+
invalidate approval.
|
|
218
|
+
|
|
219
|
+
Map protocol `stopped` to `Blocked`. Artifact-specific blockers also include:
|
|
220
|
+
|
|
221
|
+
- a defect repeatedly reopens and exposes a source-of-truth or repair-design
|
|
222
|
+
conflict that root cannot resolve from current evidence
|
|
223
|
+
- the next repair needs a product, scope, ownership, or risky trade-off decision
|
|
224
|
+
- the artifact did not change after `Needs Work` or `Rejected`
|
|
225
|
+
|
|
226
|
+
Map protocol `waived` to `Waived` only when preflight is complete and no known
|
|
227
|
+
blocker or unaccepted execution risk is open, blocked, or fixed-but-unverified.
|
|
228
|
+
Otherwise record the waiver and return `Blocked`. Preserve `Adapter Verdict: Not
|
|
229
|
+
run` or the last real Adapter verdict.
|
|
230
|
+
|
|
231
|
+
Map terminal outcomes to artifact status without guesswork:
|
|
232
|
+
|
|
233
|
+
- `Approved`: plan may be `ready-for-approval` or user-approved; spec may be
|
|
234
|
+
`ready`.
|
|
235
|
+
- `Blocked`: plan/spec status is `blocked`.
|
|
236
|
+
- `Waived`: plan/spec may be ready under the eligible mapped waiver; keep it
|
|
237
|
+
visible in metadata and the final response.
|
|
238
|
+
|
|
239
|
+
`Needs Work` and `Rejected` remain Adapter verdicts, never durable Module
|
|
240
|
+
outcomes.
|
|
241
|
+
|
|
242
|
+
Skipping further artifact review never implicitly skips implementation
|
|
243
|
+
checkpoints, cleanup review, final code review, tests, or runtime validation.
|
|
244
|
+
Those are separate contracts and require their own explicit waiver when policy
|
|
245
|
+
allows one.
|
|
246
|
+
|
|
247
|
+
## Required Outcome Summary
|
|
248
|
+
|
|
249
|
+
Use the protocol result envelope and add:
|
|
250
|
+
|
|
251
|
+
```text
|
|
252
|
+
Review Profile: <simple | medium | high>
|
|
253
|
+
Review Outcome: <Approved | Blocked | Waived>
|
|
254
|
+
Adapter Verdict: <Approved | Needs Work | Rejected | Not run>
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
For performance evaluation, also retain per-review mode, start/end timestamps,
|
|
258
|
+
and tool-call count when the runtime exposes them. Compare wall-clock time and
|
|
259
|
+
token/tool usage separately.
|
|
260
|
+
|
|
261
|
+
## Contract Test Ledger
|
|
262
|
+
|
|
263
|
+
| Invariant | Risk It Prevents | First Test / Proof | Status |
|
|
264
|
+
| --- | --- | --- | --- |
|
|
265
|
+
| Risk classification requires a material consequence for hard escalation; narrow use of a sensitive mechanism remains a standard signal. | Simple stateful work is over-reviewed or genuinely dangerous work is under-reviewed. | Manual eval scenario 10 | planned |
|
|
266
|
+
| High-risk work uses two parallel Full lineages while protocol owns affected-lens Closure and session rotation. | Follow-up restarts Full review, retains stale context, or loses mandatory-lens coverage. | Manual eval scenarios 10-11 | green |
|
|
267
|
+
| Substantive edits invalidate approval while lifecycle-only edits do not. | A changed plan/spec is executed under stale approval. | Review-state inspection | green |
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Bug Workflow Routing
|
|
2
|
+
|
|
3
|
+
Use the bug skills by user intent and feedback-loop quality:
|
|
4
|
+
|
|
5
|
+
- `bug-root-cause-explainer`: diagnosis-only. Use when the user asks why, wants root cause, options, or no edits. Stop before implementation.
|
|
6
|
+
- `diagnosing-bugs`: feedback-loop builder. Use when the bug is hard, flaky, unclear, performance-related, or cannot be proven with a tight red/green signal.
|
|
7
|
+
- `code-debugger`: implementation. Use when the user asks to fix, chose a fix path, or the bug is obvious and reproducible.
|
|
8
|
+
|
|
9
|
+
Handoffs:
|
|
10
|
+
|
|
11
|
+
- Explainer -> Diagnosing Bugs when root cause cannot be proven without a reliable loop.
|
|
12
|
+
- Explainer -> Code Debugger after the user chooses a fix path.
|
|
13
|
+
- Code Debugger -> Diagnosing Bugs when implementation discovers the bug is unclear, flaky, or lacks a red-capable signal.
|
|
14
|
+
- Diagnosing Bugs -> original intent: return diagnosis to the explainer path, or apply the fix through Code Debugger.
|
|
15
|
+
|
|
16
|
+
Inside an active user-authorized implementation/TDD flow, keep a reviewer repair
|
|
17
|
+
in that same TDD activation only when the defect is high-confidence,
|
|
18
|
+
source-required, inside the approved behavior/Seam, and has bounded trigger,
|
|
19
|
+
cause, and repair. Group related cases by protected invariant before one
|
|
20
|
+
consolidated repair batch. New product intent, a new Seam, or a risky trade-off
|
|
21
|
+
stops for user approval. A separately authorized fix with no active flow, or an
|
|
22
|
+
ambiguous reproduction/cause/repair, still routes through `code-debugger`.
|
|
23
|
+
|
|
24
|
+
Do not collapse diagnosis-only, feedback-loop construction, and implementation into one response unless the user explicitly asked for that full flow.
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
# Coding Skill Routing
|
|
2
|
+
|
|
3
|
+
Global coding skills own reusable engineering process. Local repo skills and docs own repository-specific facts.
|
|
4
|
+
|
|
5
|
+
The single personal-skill root is `../../skills` for root
|
|
6
|
+
agents and subagents in every repository. Invocation policy lives in each
|
|
7
|
+
skill's `agents/openai.yaml`; do not encode a second policy in `SKILL.md`
|
|
8
|
+
frontmatter or copy global workflow skills into repositories.
|
|
9
|
+
|
|
10
|
+
Use this routing policy before adding more instructions to a global skill.
|
|
11
|
+
|
|
12
|
+
## Ownership
|
|
13
|
+
|
|
14
|
+
Global skills own reusable process:
|
|
15
|
+
|
|
16
|
+
- planning, external research, diagnosis, implementation, review, cleanup,
|
|
17
|
+
smoke-test, and commit workflows
|
|
18
|
+
- reusable gates such as TDD, contract test ledger, confidence handling, evidence standards, and review order
|
|
19
|
+
- deterministic fact collection that does not encode product knowledge
|
|
20
|
+
- progressive references for framework-agnostic or broadly reusable guidance
|
|
21
|
+
|
|
22
|
+
Local repo skills and docs own repository facts:
|
|
23
|
+
|
|
24
|
+
- package manager and project commands
|
|
25
|
+
- domain language, product behavior, fixtures, and smoke scenarios
|
|
26
|
+
- environment variables, credential sources, service topology, and deployment assumptions
|
|
27
|
+
- local architecture decisions, ADRs, and repo-specific validation rules
|
|
28
|
+
|
|
29
|
+
Do not move those local facts into a global skill.
|
|
30
|
+
|
|
31
|
+
## Execution Modes
|
|
32
|
+
|
|
33
|
+
- **Inline:** root performs non-review work. This is the default for small and ordinary authoring or implementation work.
|
|
34
|
+
- **Delegate:** use one named custom agent when independent review or deeper isolated analysis is required.
|
|
35
|
+
- **Parallel:** use multiple agents only for independent tracks with disjoint responsibilities.
|
|
36
|
+
|
|
37
|
+
Automatic routing never authorizes automatic spawning. Spawn only when the user, an invoked skill, or applicable repo instructions authorize delegation. Root owns decisions, integration, user communication, and the critical path.
|
|
38
|
+
|
|
39
|
+
Root must never perform review inline. Every review gate launches the reviewer
|
|
40
|
+
role selected by the review profile. Because `agents.max_depth = 1`, a review
|
|
41
|
+
Adapter executes inline only after it is already inside that assigned reviewer
|
|
42
|
+
child; this is child execution, not root self-review.
|
|
43
|
+
|
|
44
|
+
## Platform UI QA Routing
|
|
45
|
+
|
|
46
|
+
Load the platform QA skill first; use `$flutter-attach-session` only as the
|
|
47
|
+
runtime ownership and reload/restart layer. Detailed safety rules live in
|
|
48
|
+
[`tool-usage.md`](tool-usage.md).
|
|
49
|
+
|
|
50
|
+
- Android: `$flutter-android-debug` plus
|
|
51
|
+
`test-android-apps:android-emulator-qa`.
|
|
52
|
+
- iOS: `$flutter-ios-debug`.
|
|
53
|
+
- Live, IDE-owned, machine-owned, or ambiguous runtimes are user-owned. UI
|
|
54
|
+
inspection alone never authorizes replacement, termination, install, or launch.
|
|
55
|
+
|
|
56
|
+
## Named Agent Profiles
|
|
57
|
+
|
|
58
|
+
| Role | Contract |
|
|
59
|
+
| --- | --- |
|
|
60
|
+
| `explorer_quick` | Mechanical inventory of files, symbols, usages, tests, and registrations |
|
|
61
|
+
| `explorer_fast` | Bounded cross-module execution tracing with file:symbol evidence |
|
|
62
|
+
| `analyst_deep` | Read-only architecture, causal, contract, and root-cause synthesis |
|
|
63
|
+
| `researcher_standard` | Read-only external primary-source research with claim-level citations |
|
|
64
|
+
| `reviewer_fast` | Fast independent review for `simple` profiles |
|
|
65
|
+
| `reviewer_standard` | Independent review for `medium` profiles |
|
|
66
|
+
| `reviewer_deep` | Deep independent review for `high` profiles and security |
|
|
67
|
+
| `implementer_standard` | Write-capable worker for one approved bounded ticket slice |
|
|
68
|
+
| `implementer_deep` | Write-capable worker for a rare isolated slice with material technical uncertainty |
|
|
69
|
+
|
|
70
|
+
The role files in `agents/*.toml` own model, effort, nickname, and instructions.
|
|
71
|
+
Skills request exact role names and never override model or effort. Artifact and
|
|
72
|
+
implementation review Modules own Full/Closure topology; Approval Packet review
|
|
73
|
+
owns its axis split. Analysis routing remains independent of review profile.
|
|
74
|
+
|
|
75
|
+
## Routing Table
|
|
76
|
+
|
|
77
|
+
| Skill or workflow | Default mode | Named-agent routing |
|
|
78
|
+
| --- | --- | --- |
|
|
79
|
+
| `$grilling` | Root owns the interactive session | Optional `explorer_fast` for bounded evidence and `analyst_deep` for proven ambiguity; children never conduct the user dialogue |
|
|
80
|
+
| `$codebase-design` | Bounded reference lens for a named Module Interface or Seam; never a standalone scan, mutation, or implementation workflow | None for bounded reference use; Design It Twice runs 3+ isolated `analyst_deep` children in parallel for a selected consequential candidate, with any inline fallback labelled non-independent |
|
|
81
|
+
| `$research` | Root prepares the Research Capsule, verifies decision-driving claims, and saves one artifact | One `researcher_standard`; root may use the documented inline fallback when the role is unavailable |
|
|
82
|
+
| `$plans-maker` | Explicit-only root-authored Architecture RFC | Profile-selected reviewer topology from `artifact-review-loop.md`; optional `analyst_deep` only for unresolved architecture |
|
|
83
|
+
| `$plan-review` | Inline only inside the assigned reviewer child | Root launches the profile-selected reviewer |
|
|
84
|
+
| `$implementation-spec-maker` | Root authors inline | Profile-selected reviewer topology from `artifact-review-loop.md`; optional `analyst_deep` only for proven ambiguity |
|
|
85
|
+
| `$implementation-spec-review` | Inline only inside the assigned reviewer child | Root launches the profile-selected reviewer |
|
|
86
|
+
| `$to-spec` | Root authors a human-readable PRD inline; combined flow keeps it in context until final publication | Standalone reviewed PRD uses `$tickets-breakdown-review` PRD-only mode |
|
|
87
|
+
| `$to-tickets` | Root drafts the ticket graph, obtains one approval, and publishes generated children directly in final AFK/HITL states | One direct low-risk ticket skips independent review; other packets use `$tickets-breakdown-review` |
|
|
88
|
+
| `$tickets-breakdown-review` | Root prepares and aggregates only when the caller's review gate applies | One profile-selected child covers both axes by default; two `reviewer_deep` children only when both axes are independently high-risk; PRD-only uses one child |
|
|
89
|
+
| `$triage` | Root verifies raw incoming issues or configured external PRs and prepares durable briefs | No implementation worker; never post-processes generated `$to-tickets` children |
|
|
90
|
+
| `$small-task-implementer` | Always inline after Fit Gate | None by default |
|
|
91
|
+
| `$spec-implementer` | Inline for compact and normal specs | Profile-selected reviewers at required checkpoints; parallel workers only for an explicit multi-agent spec |
|
|
92
|
+
| `$tdd` | Inline in the active implementation flow | Never spawns its own agent |
|
|
93
|
+
| `$code-debugger` | Inline for reproduced, bounded bugs | `analyst_deep` only while causal or contract ambiguity remains unresolved |
|
|
94
|
+
| `$bug-root-cause-explainer` | Root coordinates read-only diagnosis | Optional `explorer_fast`; `analyst_deep` for ambiguous causal synthesis |
|
|
95
|
+
| `$diagnosing-bugs` | Root owns the feedback loop | Optional `explorer_fast`; no implementation worker |
|
|
96
|
+
| `$code-review` | Root prepares and aggregates | One reviewer for `simple`/`medium`; two disjoint `reviewer_deep` tracks for `high` |
|
|
97
|
+
| `$cleanup-review` | Root prepares and integrates | One profile-selected reviewer child |
|
|
98
|
+
| `$security-best-practices` | Root coordinates explicit security review | One `reviewer_deep` |
|
|
99
|
+
| `$improve-codebase-architecture` | Inline for bounded analysis | `analyst_deep` only for broad or ambiguous architecture |
|
|
100
|
+
| `$commit` | Inline | No agent unless another policy already requires review |
|
|
101
|
+
| `$tickets-orchestrator` | Root owns ticket graph, user decisions, integration, and delivery | One ready ticket stays root-owned; launch at most two independent disjoint implementers; prepare later tickets only after blockers settle; reuse issue authority or route through maker/spec Modules |
|
|
102
|
+
| `$smoke-test-orchestrator` | Inline unless the scenario explicitly requires workers | Follow the scenario's disjoint ownership contract |
|
|
103
|
+
|
|
104
|
+
## Artifact Review Loop
|
|
105
|
+
|
|
106
|
+
Plan and implementation-spec authoring use
|
|
107
|
+
[`artifact-review-loop.md`](artifact-review-loop.md) as the single review Module.
|
|
108
|
+
It owns artifact risk, scope conservation, reviewer topology, and outcome
|
|
109
|
+
mapping while applying [`review-protocol.md`](review-protocol.md) for common
|
|
110
|
+
review mechanics. Maker skills supply authority and repairs; review Adapters
|
|
111
|
+
supply artifact-specific lenses and output.
|
|
112
|
+
|
|
113
|
+
## Implementation Review Loop
|
|
114
|
+
|
|
115
|
+
Approved implementation-spec execution uses
|
|
116
|
+
[`implementation-review-loop.md`](implementation-review-loop.md) as the single
|
|
117
|
+
review Module. It owns approved-spec authority, durable state, whole-spec
|
|
118
|
+
topology, validation reuse, gate ordering, final coverage, and audit epochs while
|
|
119
|
+
applying [`review-protocol.md`](review-protocol.md). `spec-implementer`, review
|
|
120
|
+
Adapters, repo policy, and specs may define lenses and applicability but never
|
|
121
|
+
another review protocol or retry loop.
|
|
122
|
+
|
|
123
|
+
`$tickets-orchestrator` is an outer delivery caller. Each ticket selects
|
|
124
|
+
`direct`, `compact spec`, or `standard spec`. Direct tickets keep the `$tdd` and
|
|
125
|
+
repo-review flow without manufacturing Implementation Review State. For each
|
|
126
|
+
compact/standard ticket, root invokes `$implementation-spec-maker` and then
|
|
127
|
+
`$spec-implementer`; the orchestrator must not reproduce either review Module
|
|
128
|
+
or combine approved tickets into a wave-level implementation spec.
|
|
129
|
+
|
|
130
|
+
## External Research Preflight
|
|
131
|
+
|
|
132
|
+
Read local evidence before searching externally. Keep one narrow documentation
|
|
133
|
+
lookup inline with the owning specialized docs skill or tool unless the user
|
|
134
|
+
explicitly requests delegation or a durable artifact. Invoke `$research` for
|
|
135
|
+
either explicit request, or when a material coding decision requires
|
|
136
|
+
multi-source comparison, freshness checking, or external contract synthesis.
|
|
137
|
+
|
|
138
|
+
`$research` authorizes one `researcher_standard` child. Root supplies a bounded
|
|
139
|
+
Research Capsule, verifies every claim that drives architecture, scope,
|
|
140
|
+
implementation, security, cost, or compatibility, and saves one artifact under
|
|
141
|
+
the repository convention or `docs/research/YYYY-MM-DD/HHMM-<slug>.md`.
|
|
142
|
+
Research is evidence, not implementation authority. Downstream plans, PRDs,
|
|
143
|
+
tickets, and specs cite the artifact; behavior-changing work still follows the
|
|
144
|
+
normal TDD, implementation, and review routes.
|
|
145
|
+
|
|
146
|
+
## Precedence
|
|
147
|
+
|
|
148
|
+
1. If the user asks not to edit code, use diagnosis or review skills and stop before implementation.
|
|
149
|
+
2. If the user asks to fix, implement, or build, apply `$tdd` before planning or editing.
|
|
150
|
+
3. If a bug is hard, flaky, or performance-related, use `$diagnosing-bugs` to build a feedback loop before fixing.
|
|
151
|
+
4. If a fix path has already been approved, use `$code-debugger` to implement and verify it.
|
|
152
|
+
5. Run one final `$code-review` wave with bounded cleanup in its spec/standards lens. High-risk work uses two disjoint reviewers in parallel. Run separate `$cleanup-review` only for an explicit concrete evidenced reason that cannot fit that lens; size or risk alone is insufficient.
|
|
153
|
+
|
|
154
|
+
Reviewer repairs inside an active authorized implementation/TDD flow follow
|
|
155
|
+
[`bug-workflow-routing.md`](bug-workflow-routing.md) and do not automatically
|
|
156
|
+
start `code-debugger`; standalone or ambiguous fixes retain the normal route.
|
|
157
|
+
|
|
158
|
+
## Local Fact Rule
|
|
159
|
+
|
|
160
|
+
When a global skill needs a repo fact, it should read local evidence first: `AGENTS.md`, `CONTEXT.md`, ADRs, package manifests, lockfiles, existing tests, scripts, and local skill docs. If the fact is not present, say it is not confirmed instead of inventing it.
|
|
161
|
+
|
|
162
|
+
## Availability, Depth, And Fallback
|
|
163
|
+
|
|
164
|
+
- Request the exact role name and always start it without inherited conversation; put the necessary verified context in a self-contained brief because full-history forks can inherit the parent profile.
|
|
165
|
+
- `agents.max_depth = 1`: children never spawn grandchildren. Root directly owns mandatory reviewer and worker launches.
|
|
166
|
+
- After collecting a child's result, root must close it in a finally-equivalent path. Parallel launch must preserve every fulfilled handle (use `allSettled` or equivalent), then close partial launches after timeout, cancellation, or error so completed agents do not consume `max_threads` slots.
|
|
167
|
+
- If a required reviewer role is unavailable, do not silently substitute a generic child, inherit root settings, or self-review inline. Report the gate as unavailable or blocked. Non-review skills may keep their explicit inline fallback rules.
|
|
168
|
+
- Never override a named role's model or effort at spawn time. Change and revalidate the role file instead.
|
|
169
|
+
|
|
170
|
+
## Broad Exploration Delegation
|
|
171
|
+
|
|
172
|
+
Route discovery by required output:
|
|
173
|
+
|
|
174
|
+
| Need | Route |
|
|
175
|
+
| --- | --- |
|
|
176
|
+
| Known path or one narrow execution path | Root reads inline |
|
|
177
|
+
| Mechanical inventory or large diff/log scan | `explorer_quick` |
|
|
178
|
+
| Bounded cross-module execution trace | `explorer_fast` |
|
|
179
|
+
| Material external docs/API/spec question | `$research` with `researcher_standard` |
|
|
180
|
+
| Ambiguous architecture, root cause, or contract synthesis | `analyst_deep` |
|
|
181
|
+
|
|
182
|
+
Give each child one **Discovery Capsule**: question, known entrypoint, scope,
|
|
183
|
+
excluded areas, and expected `answer -> execution path -> file:symbol evidence ->
|
|
184
|
+
uncertainty`. Stop when the question is answered or missing evidence is proven.
|
|
185
|
+
Use at most two explorer children, only for disjoint questions, and reuse the
|
|
186
|
+
same child for follow-up instead of restarting discovery.
|
|
187
|
+
|
|
188
|
+
Root verifies evidence that drives edits and keeps a compact **Evidence Map**
|
|
189
|
+
for reuse by plan, spec, and implementation. Re-read only entries invalidated by
|
|
190
|
+
changed files, contracts, or external sources. `analyst_deep` remains a final
|
|
191
|
+
synthesis escalation, not a substitute for evidence collection.
|
|
192
|
+
|
|
193
|
+
## Contract Test Ledger Rule
|
|
194
|
+
|
|
195
|
+
Use [`contract-test-ledger.md`](contract-test-ledger.md) for behavior-changing
|
|
196
|
+
tasks with contract risk. It maps each invariant to the first failing test or
|
|
197
|
+
observable proof before implementation.
|
|
198
|
+
|
|
199
|
+
## Progressive Disclosure Rule
|
|
200
|
+
|
|
201
|
+
Keep main skill files focused on routing, workflow, safety, and output. Load
|
|
202
|
+
long checklists, framework lenses, recipes, examples, and rubrics from references
|
|
203
|
+
only when their trigger applies.
|