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,211 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "implementation-spec-review"
|
|
3
|
+
description: "Review compact or full implementation specs for deterministic executability, proportional scope, validation coverage, safety, and zero-guess execution before coding starts."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Implementation Spec Review
|
|
7
|
+
|
|
8
|
+
Review an implementation spec before execution begins. The spec is an execution contract for a downstream coding agent. Your job is to decide whether it can be executed safely without guessing, not whether the product idea is good.
|
|
9
|
+
|
|
10
|
+
Use `../../docs/agents/confidence-rubric.md` when classifying blockers, execution risks, and optional improvements. High-confidence blockers need direct evidence from the spec, repo, issue, or trusted contract. Medium-confidence risks must name the one unresolved assumption. Low-confidence concerns are questions or verification gaps, not blockers.
|
|
11
|
+
|
|
12
|
+
Use `../../docs/agents/contract-test-ledger.md` when reviewing behavior-changing specs with contract risk.
|
|
13
|
+
|
|
14
|
+
This skill reviews three independent classifications from
|
|
15
|
+
`implementation-spec-maker`: document shape (`spec_mode`), delivery shape
|
|
16
|
+
(`implementation_size`), and consequence/uncertainty (`review_profile`). It
|
|
17
|
+
also checks the declared `expected_repositories`. Never infer one dimension
|
|
18
|
+
from another.
|
|
19
|
+
|
|
20
|
+
It supports both document shapes:
|
|
21
|
+
|
|
22
|
+
- **Compact specs:** dense single-agent specs whose exact scope, risk controls, and proof fit clearly. Compact does not mean small; a coherent medium/large or high-risk implementation may stay compact when ownership, sequencing, and validation remain deterministic. They do not need source-of-truth tables, file matrices, multi-agent contracts, or long halt sections unless a concrete ambiguity calls for them.
|
|
23
|
+
- **Full specs:** lean contracts used when compact mode cannot express concrete coordination, contract, ownership, sequencing, or validation ambiguity safely.
|
|
24
|
+
|
|
25
|
+
Do not punish a compact spec for omitting full-mode ceremony. Do not punish a full spec for using short risk-control bullets instead of large tables when the ownership and safety rules are still unambiguous. Do reject any spec, compact or full, that requires invention, hides risk, or cannot prove the intended behavior.
|
|
26
|
+
|
|
27
|
+
When used inside the spec-making loop, return blockers and author questions clearly so the parent agent can relay them. Do not contact the user directly. Do not rewrite the spec unless explicitly asked.
|
|
28
|
+
When already running as the assigned `reviewer_fast`, `reviewer_standard`, or
|
|
29
|
+
`reviewer_deep` child, review inline and never spawn a grandchild. Otherwise,
|
|
30
|
+
root must launch the reviewer selected by the shared review profile and must not
|
|
31
|
+
self-review inline.
|
|
32
|
+
|
|
33
|
+
## Review Posture
|
|
34
|
+
|
|
35
|
+
- Be strict about determinism and safety.
|
|
36
|
+
- Be proportional about format and ceremony.
|
|
37
|
+
- Prefer concrete defects with repair instructions over broad commentary, but in Full Mode return every visible evidence-backed blocker and execution risk in the assigned lenses as one batch.
|
|
38
|
+
- Treat false precision as a first-class defect: exact-looking claims must be grounded in source material, repo evidence, or trusted external sources.
|
|
39
|
+
- Separate hard blockers from execution risks and optional improvements.
|
|
40
|
+
- If the spec can be fixed by one sentence, name that sentence-level fix instead of expanding the spec.
|
|
41
|
+
|
|
42
|
+
### Scope Conservation
|
|
43
|
+
|
|
44
|
+
A review repair must not broaden approved product or operational scope. Prefer
|
|
45
|
+
deleting or narrowing an unsafe proposal before adding a mechanism. Feature
|
|
46
|
+
flags, telemetry systems, dashboards, rollout machinery, compatibility paths,
|
|
47
|
+
and generic fallbacks are scope expansion unless the source requires them or a
|
|
48
|
+
concrete evidenced failure path makes them necessary. Keep optional
|
|
49
|
+
improvements optional; do not convert them into mandatory spec work.
|
|
50
|
+
|
|
51
|
+
## Artifact Review Protocol
|
|
52
|
+
|
|
53
|
+
Act as the implementation-spec Adapter for
|
|
54
|
+
`../../docs/agents/artifact-review-loop.md`. The prompt assigns mode and lenses.
|
|
55
|
+
Return actual coverage, reuse supplied IDs, and label new candidates
|
|
56
|
+
`NEW-<LENS>-NN`; do not implement another review flow or lifecycle here.
|
|
57
|
+
|
|
58
|
+
When invoked directly outside a maker Module, default to `Full` mode, cover all
|
|
59
|
+
mandatory spec lenses, use no ledger unless one is supplied, and return only the
|
|
60
|
+
single Adapter verdict. Do not claim a Module outcome or closure state.
|
|
61
|
+
|
|
62
|
+
## Size-Aware Rules
|
|
63
|
+
|
|
64
|
+
### Compact Specs
|
|
65
|
+
|
|
66
|
+
Approve a compact spec when it has:
|
|
67
|
+
|
|
68
|
+
- exact enough targets, commands, preconditions, and validation for the current task
|
|
69
|
+
- numbered phases or a clear single phase
|
|
70
|
+
- a simple progress/reconciliation rule
|
|
71
|
+
- explicit blockers or `None`
|
|
72
|
+
- observable behavior proof
|
|
73
|
+
- no unresolved placeholders, pseudo-paths, or alternative commands
|
|
74
|
+
|
|
75
|
+
Do not require these unless the task risk demands them:
|
|
76
|
+
|
|
77
|
+
- source-of-truth map
|
|
78
|
+
- file modification matrix
|
|
79
|
+
- long halt checklist
|
|
80
|
+
- defect closure section
|
|
81
|
+
- multi-agent handoff contract
|
|
82
|
+
- mandatory dedicated review at every phase
|
|
83
|
+
|
|
84
|
+
### Lean Full Specs
|
|
85
|
+
|
|
86
|
+
Treat these as signals to check whether compact mode leaves a concrete
|
|
87
|
+
ambiguity; none selects full mode by itself:
|
|
88
|
+
|
|
89
|
+
- multi-agent execution
|
|
90
|
+
- persistence, migrations, schemas, DTOs, API contracts, or external contracts
|
|
91
|
+
- auth, secrets, permissions, payments, caching, concurrency, background jobs, shared state, or destructive operations
|
|
92
|
+
- changes across several runtime surfaces
|
|
93
|
+
- one ticket with multi-agent coordination requirements
|
|
94
|
+
- revision of an existing checklist with completed history
|
|
95
|
+
|
|
96
|
+
For these specs, the expected shape is:
|
|
97
|
+
|
|
98
|
+
- a short `Risk Controls` section naming only applicable ownership, safety, contract, concurrency/state, and forbidden-scope rules
|
|
99
|
+
- phase steps with exact targets and validation
|
|
100
|
+
- `Write Scope Summary` only when phases alone do not make the write set obvious, or when there is multi-agent work, broad runtime change, generated artifacts, or 5+ runtime files
|
|
101
|
+
- task-specific `Halt Conditions` only when the compact stop rule is insufficient
|
|
102
|
+
- `Integrator Coordination Contract` only for multi-agent execution
|
|
103
|
+
|
|
104
|
+
Missing ownership, write-scope, validation, safety, or handoff details are defects. Missing tables are not defects when the lean sections are unambiguous.
|
|
105
|
+
|
|
106
|
+
## Mandatory Review Lenses
|
|
107
|
+
|
|
108
|
+
Across a Module full-review wave, cover all of these lenses according to the
|
|
109
|
+
policy assignment, scaled to artifact risk; each reviewer owns only its
|
|
110
|
+
assigned primary lenses. A standalone direct review covers all lenses:
|
|
111
|
+
|
|
112
|
+
- **Determinism:** exact paths, symbols, commands, payloads, fixtures, and target behavior where execution depends on them.
|
|
113
|
+
- **Evidence:** exact-looking claims are supported by source material, repo context, docs, issues, or external contract proof.
|
|
114
|
+
- **Preconditions:** required services, env vars, fixtures, data state, feature flags, and prerequisites are explicit or intentionally `None`.
|
|
115
|
+
- **Sequencing:** phases are ordered safely and have exit checks.
|
|
116
|
+
- **Scope:** approved scope, out of scope, protected paths, and rejected approaches are clear enough to prevent drift.
|
|
117
|
+
- **Contract Test Ledger:** contract-heavy behavior changes map ordering, precedence, threading, runtime contract, retry/idempotency, determinism, evidence, partial failure, and cardinality risks to first tests/proofs.
|
|
118
|
+
- **Review Checkpoints and Focus:** high-risk specs use an early `$code-review` checkpoint only when the first risky slice becomes stable before later work. Otherwise the spec assigns concrete `Review Focus` lenses, targeted recipes, and bug classes to the final parallel review wave.
|
|
119
|
+
- **Final Handoff Requirements:** medium/high-risk specs require a compact final response packet covering contract implemented, risky checkpoints, invariants proved, review findings/fixes, validation, skipped checks, residual risks, and files by role.
|
|
120
|
+
- **Minimum solution and reuse:** the spec states a direct `Minimum Solution`, records `Added Complexity: None` or ties every added mechanism to a concrete invariant/failure, and removes anything that passes the deletion challenge. Prefer the fewest necessary concepts, owners, states, and integration points; line or file count is not decisive.
|
|
121
|
+
- **Deep-module fit:** using the `$codebase-design` lens, new Modules or Seams pass the deletion test, avoid one-adapter abstraction, and test through the Module Interface.
|
|
122
|
+
- **Risk Controls:** full specs include only applicable risk controls, and each control is specific enough to guide execution.
|
|
123
|
+
- **Ownership:** source-of-truth ownership is explicit when behavior/data can drift across layers. A short `Source of Truth` bullet is enough when there is only one material owner.
|
|
124
|
+
- **Validation:** checks prove observable behavior, not just compilation.
|
|
125
|
+
- **Safety:** auth, secrets, credentials, destructive operations, persistence, concurrency, retries, and shared state have explicit constraints when touched.
|
|
126
|
+
- **Multi-agent handoff:** if multi-agent, write scopes are disjoint and one integrator owns merge order and final reconciliation.
|
|
127
|
+
- **Revision integrity:** if revising, still-valid completed items are preserved and stale completed items are reopened with a note.
|
|
128
|
+
- **Completion clarity:** another agent could know when to stop, what passed, and what remains blocked.
|
|
129
|
+
|
|
130
|
+
## What To Reject Immediately
|
|
131
|
+
|
|
132
|
+
- The spec asks the executor to guess file names, symbol names, DTOs, schema details, API contracts, fixtures, or behavior.
|
|
133
|
+
- The spec contains unresolved placeholders, pseudo-paths, example rows, bracket instructions, or alternative commands presented as executable.
|
|
134
|
+
- The validation cannot prove the intended behavior.
|
|
135
|
+
- The spec changes a contract-heavy behavior but has no Contract Test Ledger, or the ledger lists invariants without a first RED test/proof or a concrete blocked reason.
|
|
136
|
+
- A high-risk spec neither defines a stable early checkpoint nor assigns the risky slice's concrete review focus to the final parallel wave.
|
|
137
|
+
- A medium/high-risk spec has no final handoff requirement, leaving the user to manually reconstruct contract proof, review status, skipped checks, or residual risk from the diff.
|
|
138
|
+
- Code changes are planned, the repo has an architecture check, and the spec omits it without a reason.
|
|
139
|
+
- Exact-looking paths, commands, or symbols are not grounded in evidence and would force the executor to trust invented precision.
|
|
140
|
+
- A multi-agent topology has overlapping write scopes, unclear integration ownership, or no merge/handoff contract.
|
|
141
|
+
- A full spec touches a real safety/contract/state risk but has no applicable `Risk Controls` entry.
|
|
142
|
+
- The spec says or implies the executor should continue despite a mismatch instead of stopping.
|
|
143
|
+
- Security-sensitive or destructive work lacks explicit safe sources, guards, or stop-before-damage constraints.
|
|
144
|
+
- The spec requires an added mechanism outside approved scope, or safe execution would depend on inventing that mechanism's need or contract.
|
|
145
|
+
|
|
146
|
+
## Common Defects
|
|
147
|
+
|
|
148
|
+
- Vague instructions like “update logic”, “handle edge cases”, “refactor if needed”, or “reuse existing code where possible” without exact targets.
|
|
149
|
+
- Validation that checks only lint/build and misses the behavior changed by the spec.
|
|
150
|
+
- A contract-heavy spec covers only a happy path and omits ordering, precedence, retry/idempotency, persistence/evidence, serialization, deterministic ordering, or cardinality invariants that are material to the touched flow.
|
|
151
|
+
- A high-risk spec defers all review to the final diff even though the first risky state/contract slice becomes stable, is independently reviewable, and will not be invalidated by lower-risk work.
|
|
152
|
+
- A medium/high-risk spec updates checklists and review gates but does not say what proof summary the executor must give the user at completion.
|
|
153
|
+
- Required env vars, fixtures, payloads, services, or app state are absent.
|
|
154
|
+
- Acceptance criteria are subjective, non-observable, or not tied to proof.
|
|
155
|
+
- Ticket specs lose issue-only requirements such as `Implementation preparation`, `External contracts`, `Verification`, `Blocked by`, live prerequisites, or rejected approaches, or absorb sibling-ticket scope.
|
|
156
|
+
- Evidence sections repeat a file inventory instead of proving determinism.
|
|
157
|
+
- `Minimum Solution` is a slogan rather than a direct path, `Added Complexity` is absent or vague, or a smaller evidence-backed path satisfies the same approved behavior, invariants, and proof.
|
|
158
|
+
- Full specs add large tables where 2-4 exact `Risk Controls` bullets would be clearer.
|
|
159
|
+
- Full specs include generic halt checklists instead of task-specific stop conditions.
|
|
160
|
+
- Full specs spread one rule across multiple files without a declared owner.
|
|
161
|
+
- Compact specs expand into a large document without added safety value.
|
|
162
|
+
|
|
163
|
+
## Defect Taxonomy
|
|
164
|
+
|
|
165
|
+
- **Blocker:** The spec is unsafe or impossible to execute as written.
|
|
166
|
+
- **Execution Risk:** The spec is executable but likely to cause drift, rework, or inconsistent implementation.
|
|
167
|
+
- **Improvement:** The spec is usable, and the suggestion would materially sharpen it.
|
|
168
|
+
|
|
169
|
+
Report blockers first. Mention improvements only when they matter.
|
|
170
|
+
|
|
171
|
+
## Decision Rules
|
|
172
|
+
|
|
173
|
+
- **Approved:** Deterministic, bounded, proportionate, and executable without guesswork.
|
|
174
|
+
- **Needs Work:** Directionally usable but has ambiguities, missing proof, weak validation, or scope/control gaps.
|
|
175
|
+
- **Rejected:** Unsafe to execute because it depends on invention, broad interpretation, overlapping ownership, missing validation, or missing safety controls.
|
|
176
|
+
|
|
177
|
+
Scores:
|
|
178
|
+
|
|
179
|
+
- `0`: missing or unsafe
|
|
180
|
+
- `1`: partially specified or weakly proven
|
|
181
|
+
- `2`: explicit and well-grounded
|
|
182
|
+
|
|
183
|
+
## Output Format
|
|
184
|
+
|
|
185
|
+
Always answer in Russian, keeping technical terms in English where appropriate. Use this exact structure:
|
|
186
|
+
|
|
187
|
+
1. `Вердикт: Approved / Needs Work / Rejected` plus one sentence with the main reason.
|
|
188
|
+
2. `Режим и покрытие: Full / Closure` with assigned lenses and evidence actually checked.
|
|
189
|
+
3. `Оценка` with short scores `Determinism / Evidence / Validation / Safety` on a 0-2 scale.
|
|
190
|
+
4. `Что уже исполнимо` with 2-4 bullets about what is concrete and safe.
|
|
191
|
+
5. `Критические дефекты спецификации` with concrete blockers, ambiguity points, and failure mechanics. Quote the exact vague phrase, missing step, or unsafe instruction when justifying a defect. If there are no blockers, say `Нет`.
|
|
192
|
+
6. `Defect Records` with the supplied stable ID or `NEW-<LENS>-NN`, class, confidence, invariant, failure, evidence, repair, affected sections, and status. If there are no defects, say `Нет`.
|
|
193
|
+
7. `Что исправить перед исполнением` with exact changes needed in the spec. If nothing is needed, say `Ничего`.
|
|
194
|
+
8. `Жесткие уточняющие вопросы` with 3-5 specific questions only if the spec cannot become deterministic without answers. If none, say `Нет`.
|
|
195
|
+
|
|
196
|
+
Keep the output short, severe, and execution-oriented.
|
|
197
|
+
|
|
198
|
+
## Anti-Overengineering Heuristic
|
|
199
|
+
|
|
200
|
+
- If a compact direct flow is enough, flag unnecessary full-mode ceremony as an improvement or execution risk.
|
|
201
|
+
- Run the whole-solution deletion challenge: if a mechanism can be removed while preserving every approved behavior, material invariant, and proof, require its removal. Do not remove a necessary mechanism merely because it adds a file, type, schema object, or boundary.
|
|
202
|
+
- If a lean full spec gives exact risk controls without tables, do not ask for tables unless prose leaves ambiguity.
|
|
203
|
+
- If a full spec has enough phase-level targets, do not ask for `Write Scope Summary` unless the write set or ownership is hard to audit.
|
|
204
|
+
- If a full spec introduces an indirect flow where a direct one satisfies all constraints, treat that as a defect.
|
|
205
|
+
- If a new abstraction exists only for cleanliness or future flexibility, return `Needs Work` and require its removal. Treat it as a blocker only when execution would be unsafe, broaden approved scope, or require invention.
|
|
206
|
+
- Treat missing or unsupported `Minimum Solution` / `Added Complexity` evidence as `Needs Work`; escalate to `Rejected` only when the added mechanism is unsafe, unapproved scope, or requires invention.
|
|
207
|
+
- If the review can make the spec safer by deleting ceremony rather than adding it, say so.
|
|
208
|
+
|
|
209
|
+
## Tone
|
|
210
|
+
|
|
211
|
+
Be direct, strict, and operational. No fluff, no architecture theater.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Implementation Spec Review"
|
|
3
|
+
short_description: "Review one implementation spec"
|
|
4
|
+
default_prompt: "Review the supplied spec through the assigned package-owned operation and return its exact JSON report."
|
|
5
|
+
policy:
|
|
6
|
+
allow_implicit_invocation: false
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: research
|
|
3
|
+
description: Research material external API, SDK, specification, service, or source-code questions using primary sources and save one cited repository artifact. Use for requested durable/delegated research or multi-source contract uncertainty; not for narrow lookups, repo-only work, bug reproduction, or specialized docs tasks.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Research
|
|
7
|
+
|
|
8
|
+
Resolve one external question into reusable evidence for downstream coding work.
|
|
9
|
+
The invoked skill authorizes one `researcher_standard` child; root owns source
|
|
10
|
+
verification, artifact integration, user communication, and later decisions.
|
|
11
|
+
|
|
12
|
+
## Route Proportionately
|
|
13
|
+
|
|
14
|
+
- Read local evidence first: manifests, lockfiles, installed source, tests,
|
|
15
|
+
configs, ADRs, and repository docs.
|
|
16
|
+
- Keep one narrow documentation lookup inline unless the user explicitly requests delegation or a durable artifact. When the lookup stays inline, use the owning specialized docs skill or tool and answer in chat without creating an artifact.
|
|
17
|
+
- Invoke this workflow when the user requests delegated reading or a saved research result, or when a material decision needs multi-source comparison, freshness checking, or external contract synthesis.
|
|
18
|
+
- Use repo exploration or bug-diagnosis skills when the owning evidence is local
|
|
19
|
+
code or runtime behavior. Research may supply one external contract input but
|
|
20
|
+
never owns bug reproduction or implementation.
|
|
21
|
+
|
|
22
|
+
## Build The Research Capsule
|
|
23
|
+
|
|
24
|
+
Before delegation, record:
|
|
25
|
+
|
|
26
|
+
- the exact question and decision it must unblock;
|
|
27
|
+
- relevant verified local context;
|
|
28
|
+
- in-scope and excluded products, versions, environments, and claims;
|
|
29
|
+
- allowed primary-source types and required freshness;
|
|
30
|
+
- the repository output path.
|
|
31
|
+
|
|
32
|
+
Use the repository's existing research-note convention. If none exists, choose
|
|
33
|
+
`docs/research/YYYY-MM-DD/HHMM-<slug>.md`.
|
|
34
|
+
|
|
35
|
+
## Delegate One Bounded Question
|
|
36
|
+
|
|
37
|
+
Launch one fresh `researcher_standard` child with the Research Capsule and no
|
|
38
|
+
inherited conclusions. The child is read-only and must return:
|
|
39
|
+
|
|
40
|
+
1. a short answer;
|
|
41
|
+
2. a claim-to-source ledger for every material fact;
|
|
42
|
+
3. source version or publication/update date when available;
|
|
43
|
+
4. conflicts, uncertainty, and missing evidence;
|
|
44
|
+
5. clearly labelled inferences for the repository decision.
|
|
45
|
+
|
|
46
|
+
While it reads, continue only independent local work. Do not make or implement
|
|
47
|
+
the blocked decision before the research returns. If the named role is
|
|
48
|
+
unavailable, perform the same bounded workflow inline and report the fallback;
|
|
49
|
+
do not substitute an unrelated code explorer or reviewer.
|
|
50
|
+
|
|
51
|
+
## Source Standard
|
|
52
|
+
|
|
53
|
+
Prefer the source that owns the claim:
|
|
54
|
+
|
|
55
|
+
1. official documentation or specifications;
|
|
56
|
+
2. first-party source code, changelogs, release notes, or issue trackers;
|
|
57
|
+
3. first-party APIs or published schemas.
|
|
58
|
+
|
|
59
|
+
Use secondary material only to discover primary sources or to expose a disputed
|
|
60
|
+
interpretation. Never promote it to authority when an owning source exists.
|
|
61
|
+
Cite the exact page or repository location that supports each material claim.
|
|
62
|
+
Separate sourced fact from inference, and state when current behavior cannot be
|
|
63
|
+
confirmed.
|
|
64
|
+
|
|
65
|
+
Use specialized source adapters when applicable: for example, `$openai-docs`
|
|
66
|
+
for OpenAI products, Context7 for precise package documentation, and site
|
|
67
|
+
parsers for extraction. Their output still must satisfy this source standard.
|
|
68
|
+
|
|
69
|
+
## Verify And Save
|
|
70
|
+
|
|
71
|
+
Root must open and verify every source behind a claim that changes architecture,
|
|
72
|
+
scope, implementation, security, cost, or compatibility. Repair unsupported or
|
|
73
|
+
overstated claims, then save exactly one Markdown artifact:
|
|
74
|
+
|
|
75
|
+
```markdown
|
|
76
|
+
# <Research question>
|
|
77
|
+
|
|
78
|
+
## Decision To Unblock
|
|
79
|
+
<decision and relevant local context>
|
|
80
|
+
|
|
81
|
+
## Short Answer
|
|
82
|
+
<concise answer>
|
|
83
|
+
|
|
84
|
+
## Findings
|
|
85
|
+
| Claim | Primary Source | Version / Date | Confidence |
|
|
86
|
+
| --- | --- | --- | --- |
|
|
87
|
+
| ... | ... | ... | ... |
|
|
88
|
+
|
|
89
|
+
## Repository Implications
|
|
90
|
+
<clearly labelled inferences and affected plans/specs/tickets>
|
|
91
|
+
|
|
92
|
+
## Conflicts And Unknowns
|
|
93
|
+
<conflicting sources, stale evidence, and unresolved questions>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Do not include credentials, private tokens, or copied secrets. Link or cite
|
|
97
|
+
sources instead of reproducing long copyrighted passages.
|
|
98
|
+
|
|
99
|
+
## Downstream Contract
|
|
100
|
+
|
|
101
|
+
- Return the saved path and the decision it now supports.
|
|
102
|
+
- Let plans, PRDs, tickets, and implementation specs cite the artifact as their
|
|
103
|
+
external Evidence Map instead of repeating the research.
|
|
104
|
+
- Re-read only claims invalidated by changed versions, dates, contracts, or
|
|
105
|
+
source conflicts.
|
|
106
|
+
- Treat the artifact as evidence, not implementation authority. Behavior-changing
|
|
107
|
+
work still follows the normal TDD, implementation, and review routes.
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: small-task-implementer
|
|
3
|
+
description: Implement small low-risk coding tasks with narrow edits and targeted validation. Use for tiny fixes, UI/copy changes, config/build corrections, simple tests, or one-module changes that do not need plans, specs, orchestration, or heavy review.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Small Task Implementer
|
|
7
|
+
|
|
8
|
+
Use this skill for fast, bounded implementation when creating a PRD and approved ticket-delivery flow would be disproportionate.
|
|
9
|
+
|
|
10
|
+
## Fit Gate
|
|
11
|
+
|
|
12
|
+
Proceed only when all are true:
|
|
13
|
+
|
|
14
|
+
- The requested behavior is clear or can be inferred from local code/tests without a product decision.
|
|
15
|
+
- The change is expected to touch one small area or a few tightly related files.
|
|
16
|
+
- There is a narrow validation path: targeted test, lint/typecheck, build check, UI proof, or direct command.
|
|
17
|
+
- The task does not require a new plan, PRD, issue breakdown, implementation spec, migration, rollout, or multi-agent orchestration.
|
|
18
|
+
|
|
19
|
+
Escalate instead of implementing when the task touches:
|
|
20
|
+
|
|
21
|
+
- state transitions, queues, retries, idempotency, background jobs, persistence, migrations, schemas, DTO/API contracts, auth, permissions, payments, caching, or shared cross-module behavior;
|
|
22
|
+
- multi-service, multi-repo, multi-agent, production/live-data, or external-contract work;
|
|
23
|
+
- unclear product intent, ambiguous scope, no credible validation path, or likely broad refactoring.
|
|
24
|
+
|
|
25
|
+
Escalation rule:
|
|
26
|
+
|
|
27
|
+
- Escalate into the single canonical delivery flow: optional `$grilling` for unresolved product decisions, then `$spec-to-tickets` for the reviewed Approval Packet, then `$tickets-orchestrator` for approved ticket delivery.
|
|
28
|
+
- For one risky behavior or technical contract, prefer one approved ticket and mark `compact spec` or `standard spec` only when the ticket plus repository evidence cannot remove execution ambiguity.
|
|
29
|
+
- For several tickets sharing one unresolved contract or validation path, make the contract-defining ticket block its consumers; merge tickets that cannot be specified or verified independently instead of creating a wave-level implementation spec.
|
|
30
|
+
- Escalate if the bug requires Bugfix Quality Gate analysis across multiple paths, states, async events, persistence, auth, cache, retries, workers, or contracts.
|
|
31
|
+
|
|
32
|
+
## Workflow
|
|
33
|
+
|
|
34
|
+
1. Inspect local context just enough to confirm fit.
|
|
35
|
+
- Read repo instructions and the smallest relevant code/test files.
|
|
36
|
+
- Check `git status --short` before editing.
|
|
37
|
+
- Preserve unrelated dirty work.
|
|
38
|
+
|
|
39
|
+
2. Write a compact contract in the working update or internal task notes:
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
Behavior:
|
|
43
|
+
Scope boundary:
|
|
44
|
+
Validation:
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
3. Implement the smallest complete change.
|
|
48
|
+
- Prefer existing patterns and owner modules.
|
|
49
|
+
- Avoid unrelated refactors, abstractions, cleanup, and compatibility paths.
|
|
50
|
+
- Before adding a helper, module, layer, or seam, apply the deletion test; keep it only if it improves current locality or leverage.
|
|
51
|
+
- Do not add pass-through modules, one-adapter seams, or tests coupled to Implementation details; escalate if no natural public test seam exists.
|
|
52
|
+
- Add or update a focused test only when behavior risk justifies it and the repo has a natural seam.
|
|
53
|
+
- For pure copy/docs/config changes, do not invent tests; run the cheapest relevant syntax/lint/check instead.
|
|
54
|
+
|
|
55
|
+
4. Run targeted validation.
|
|
56
|
+
- Use the narrowest meaningful command first.
|
|
57
|
+
- If validation is unavailable or too expensive, state the concrete reason and residual risk.
|
|
58
|
+
- Do not run full CI unless local policy or the changed surface makes it necessary.
|
|
59
|
+
|
|
60
|
+
5. Stop and escalate if implementation reveals hidden risk.
|
|
61
|
+
- Examples: shared contract drift, duplicate source of truth, missing test seam, broad file spread, concurrency, persistence, or product ambiguity.
|
|
62
|
+
- Leave a short explanation of what was discovered and which heavier flow should take over.
|
|
63
|
+
|
|
64
|
+
## Output
|
|
65
|
+
|
|
66
|
+
Final response must stay compact:
|
|
67
|
+
|
|
68
|
+
```text
|
|
69
|
+
Small Task Result
|
|
70
|
+
|
|
71
|
+
Changed:
|
|
72
|
+
- ...
|
|
73
|
+
|
|
74
|
+
Proof:
|
|
75
|
+
- ...
|
|
76
|
+
|
|
77
|
+
Skipped:
|
|
78
|
+
- none / ...
|
|
79
|
+
|
|
80
|
+
Risk:
|
|
81
|
+
- low / reason
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
If escalated, use:
|
|
85
|
+
|
|
86
|
+
```text
|
|
87
|
+
Escalated
|
|
88
|
+
|
|
89
|
+
Reason:
|
|
90
|
+
- ...
|
|
91
|
+
|
|
92
|
+
Recommended flow:
|
|
93
|
+
- Canonical ticket delivery / direct small task
|
|
94
|
+
|
|
95
|
+
Evidence:
|
|
96
|
+
- ...
|
|
97
|
+
```
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "spec-implementer"
|
|
3
|
+
description: "Executes approved specs continuously with honest checklist updates, proportional validation, opt-in Git checkpoints, and required review/signoff."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Spec Implementer
|
|
7
|
+
|
|
8
|
+
Execute an approved implementation spec. Your job is to carry out the chosen spec, keep its checklist honest, and stop at the right boundaries. Do not redesign the work unless the spec or repo reality proves a blocker.
|
|
9
|
+
|
|
10
|
+
This skill is standalone by default: it executes only an approved spec that the
|
|
11
|
+
user has chosen to run. `$tickets-orchestrator` may invoke it inline at root for
|
|
12
|
+
an accepted compact or standard ticket spec inside user-authorized orchestration;
|
|
13
|
+
that does not authorize unrelated specs or broader delivery scope.
|
|
14
|
+
|
|
15
|
+
When a spec contains a Contract Test Ledger, treat it as part of the execution contract. The shared reference is `../../docs/agents/contract-test-ledger.md`.
|
|
16
|
+
|
|
17
|
+
All implementation review checkpoints and final review gates use
|
|
18
|
+
`../../docs/agents/implementation-review-loop.md` as their caller-facing owner.
|
|
19
|
+
This skill must not create a per-slice review flow or retry loop.
|
|
20
|
+
|
|
21
|
+
## Spec Modes
|
|
22
|
+
|
|
23
|
+
- **Compact specs:** execute directly as one continuous implementation flow with lightweight phase checkpoints. `compact` describes document density, not implementation size or risk. Use review/signoff gates only when the spec, repo policy, or change risk requires them.
|
|
24
|
+
- **Full specs:** execute the same phase flow, but treat `Risk Controls`, task-specific `Halt Conditions`, and validation proof as hard constraints. Do not invent extra process just because the spec is full.
|
|
25
|
+
- **Multi-agent specs:** follow the integrator contract exactly. If write scopes are not perfectly disjoint, stop before spawning workers.
|
|
26
|
+
|
|
27
|
+
## Core Rules
|
|
28
|
+
|
|
29
|
+
1. Follow the spec literally. Do not broaden scope, add cleanup, or re-plan unless a blocker is proven.
|
|
30
|
+
2. Treat the spec checklist as the execution ledger.
|
|
31
|
+
3. Update checklist items during implementation. For compact specs, update at natural checkpoints and phase exits. For full specs, or when the spec says so, update completed leaf items immediately.
|
|
32
|
+
4. Do not save all checklist updates only for the final response.
|
|
33
|
+
5. Re-read the current phase before moving on and reconcile already-completed unchecked items.
|
|
34
|
+
6. If a step is blocked, leave it unchecked and record one short `Blocked:` note with the concrete reason.
|
|
35
|
+
7. Treat Preconditions as hard blockers. Do not start a phase until they are satisfied, explicitly not applicable, or blocked.
|
|
36
|
+
8. If the saved spec contains unresolved template text, placeholders, alternative commands, or pseudo-paths, stop and escalate.
|
|
37
|
+
9. Honor Protected Paths and Rejected Approaches exactly as written.
|
|
38
|
+
10. Apply the `$codebase-design` lens only when ownership or a public Module Interface or Seam changes. For any new private helper, run the deletion test and keep it only if it improves locality or leverage, without activating architecture workflow.
|
|
39
|
+
11. Do not add pass-through modules, one-adapter seams, or test-only helpers unless the spec explicitly approves them.
|
|
40
|
+
12. Add comments/docblocks only where the spec explicitly requires them.
|
|
41
|
+
|
|
42
|
+
## Before Editing
|
|
43
|
+
|
|
44
|
+
- Read the complete frontmatter before announcing execution strategy. Confirm the spec path, status, `spec_mode`, `implementation_size`, `review_profile`, and `expected_repositories`; infer a missing classification from evidence without rewriting the approved design.
|
|
45
|
+
- Identify whether it is compact, full, or multi-agent. Do not call a compact spec full or equate compact with small.
|
|
46
|
+
- Check required services, env vars, fixtures, repo state, and prerequisite issues.
|
|
47
|
+
- Confirm the first phase targets exist as described.
|
|
48
|
+
- Confirm validation commands are executable or explicitly not applicable.
|
|
49
|
+
- If the spec has a Contract Test Ledger, confirm each reached invariant has a first test/proof or a concrete blocked reason before implementation.
|
|
50
|
+
- If the spec has `Review Checkpoints` or `Review Focus`, keep only checkpoints whose target becomes stable before later slices. If later work will touch the same files, owners, or contracts, fold that coverage into the final parallel review instead of reviewing an unstable slice.
|
|
51
|
+
- Resolve the implementation review profile and plan mandatory final coverage before launching any reviewer. Do not manufacture an early checkpoint merely because the profile is high.
|
|
52
|
+
- Do not write `## Implementation Review State` during ordinary preflight or implementation. Immediately before the first actual reviewer launch, persist the short Review Plan and pending launch required by the Module; then update it after every usable reviewer result, repair batch, closure, waiver, or terminal outcome.
|
|
53
|
+
- If the spec has `Final Handoff Requirements`, treat them as the final response contract. For medium/high-risk specs without explicit requirements, prepare the standard Final Risk Handoff anyway.
|
|
54
|
+
- For full specs, read `Risk Controls` before editing and translate each applicable control into a concrete execution constraint.
|
|
55
|
+
- Use `Write Scope Summary` when present as an audit aid. If it is absent, rely on phase targets unless the write set is ambiguous.
|
|
56
|
+
- Stop if exact execution would require guessing.
|
|
57
|
+
|
|
58
|
+
## Git Checkpoints
|
|
59
|
+
|
|
60
|
+
Default to `none` and begin implementation without checkpoint ceremony. Mention the strategy once only when it materially affects delivery. Invoking `$spec-implementer` does not by itself authorize commits.
|
|
61
|
+
|
|
62
|
+
Choose `per-slice` only when commits are explicitly authorized by the user or approved spec, slice diffs are truly isolated, and checkpoints materially improve recovery or handoff safety. Valid reasons are:
|
|
63
|
+
|
|
64
|
+
- a multi-agent merge/handoff boundary
|
|
65
|
+
- an explicitly planned pause or continuation in another session
|
|
66
|
+
- a destructive or rollback boundary whose isolated commit is part of the approved safety plan
|
|
67
|
+
|
|
68
|
+
Use `none` for ordinary single-agent execution, including compact/high specs, overlapping slices, and continuous work in one session. Slice count, file count, or review profile alone never justifies commits.
|
|
69
|
+
|
|
70
|
+
At each checkpoint:
|
|
71
|
+
|
|
72
|
+
- require a passed exit gate and applicable slice review, then reconcile and include tracked checklist/ledger updates
|
|
73
|
+
- inspect the full diff, stage only slice-owned paths or hunks, follow `$commit` safety rules, and verify the hash
|
|
74
|
+
- treat the applicable slice review as the pre-commit gate; final review still runs at the end
|
|
75
|
+
|
|
76
|
+
If isolation later becomes unsafe, skip and record the reason. Never commit RED state, failed validation, unresolved findings, discovery-only work, or a partial slice. Never amend a checkpoint commit; put later fixes in a new commit. Never push unless explicitly requested. Report the strategy and slice-to-commit mapping, or the reason no checkpoints were created.
|
|
77
|
+
|
|
78
|
+
## Phase Workflow
|
|
79
|
+
|
|
80
|
+
For every phase:
|
|
81
|
+
|
|
82
|
+
- Confirm phase dependencies and preconditions.
|
|
83
|
+
- Execute only the steps assigned to that phase.
|
|
84
|
+
- Update the spec checklist according to its mode.
|
|
85
|
+
- Update any reached Contract Test Ledger rows as planned -> red -> green, or blocked with the missing seam/proof.
|
|
86
|
+
- Run the phase exit gate.
|
|
87
|
+
- If a `Review Checkpoint` applies after this phase, execute it through the
|
|
88
|
+
Module only when the target is settled and later slices do not invalidate its
|
|
89
|
+
files/contracts. Otherwise record that its lenses moved to final coverage and
|
|
90
|
+
continue without launching an unstable review.
|
|
91
|
+
- Reconcile unchecked items for the current phase.
|
|
92
|
+
- Re-check applicable `Risk Controls` before leaving the phase.
|
|
93
|
+
- Check whether the phase introduced shallow modules, duplicated source-of-truth logic, or tests coupled to implementation details; fix only when inside approved scope, otherwise report it.
|
|
94
|
+
- Run the repo architecture check when available, applicable, and required by the spec or repo policy.
|
|
95
|
+
- If `per-slice` applies and this phase completes an implementation slice, create and verify its checkpoint commit before continuing.
|
|
96
|
+
- Continue to the next phase only when the exit gate passes and no stop condition applies.
|
|
97
|
+
- If the phase exit gate says `User Pause: Required`, stop and wait for the user's explicit command.
|
|
98
|
+
|
|
99
|
+
## Review And Signoff
|
|
100
|
+
|
|
101
|
+
Do not run a dedicated review subagent after every phase by default. Do run one at explicit `Review Checkpoints`; these are risk gates, not optional status updates.
|
|
102
|
+
|
|
103
|
+
Before every reviewer launch, apply the Module's launch and reconciliation
|
|
104
|
+
rules to the persisted `## Implementation Review State`; do not restate or
|
|
105
|
+
replace those rules in this skill.
|
|
106
|
+
|
|
107
|
+
Require final `$code-review` coverage when any of these apply:
|
|
108
|
+
|
|
109
|
+
- the spec explicitly requires it
|
|
110
|
+
- the repo policy requires it
|
|
111
|
+
- the change is medium or large
|
|
112
|
+
- the change touches multiple runtime files or shared behavior
|
|
113
|
+
- the change touches API contracts, DTOs, schemas, persistence, auth, permissions, payments, caching, concurrency, background jobs, or shared state
|
|
114
|
+
|
|
115
|
+
When `$code-review` is required for a checkpoint or final gate, keep orchestration at root so `$code-review` can launch the profile-selected reviewer topology. Invoking `$spec-implementer` authorizes that review; if the required role is unavailable, report the gate as unavailable/blocked instead of self-certifying it.
|
|
116
|
+
|
|
117
|
+
Use one final `$code-review` wave after the implementation and validation settle.
|
|
118
|
+
For `simple` and `medium`, one reviewer covers both lenses. For `high`, launch
|
|
119
|
+
the correctness and spec/standards reviewers in parallel; the spec/standards
|
|
120
|
+
lens includes bounded cleanup. Run separate `$cleanup-review` only when the
|
|
121
|
+
user, approved source, or repo policy names a concrete evidenced reason that
|
|
122
|
+
cannot fit that lens; size or risk labels alone are insufficient. Integrate safe
|
|
123
|
+
fixes and rerun relevant validation before continuing.
|
|
124
|
+
Before launching a fresh final reviewer, reconcile the settled revision against
|
|
125
|
+
the Review Plan. Stop when an approved Full or Closure already covers every
|
|
126
|
+
mandatory final lens; otherwise run `$code-review` only for the uncovered
|
|
127
|
+
lenses. A `cleanup-only` result never substitutes for correctness or
|
|
128
|
+
spec/standards coverage.
|
|
129
|
+
|
|
130
|
+
For compact low-risk specs, final validation plus checklist reconciliation is enough unless the spec says otherwise.
|
|
131
|
+
|
|
132
|
+
Treat review feedback as mandatory remediation when it is grounded in code or the spec. If review reveals ambiguity that cannot be resolved from the spec, code, or docs, pause and ask the user.
|
|
133
|
+
|
|
134
|
+
Apply the Module's convergence and stop rules after every usable result and
|
|
135
|
+
before every new launch.
|
|
136
|
+
|
|
137
|
+
## Multi-Agent Execution
|
|
138
|
+
|
|
139
|
+
- Use multiple agents only when the spec has explicit disjoint write scopes.
|
|
140
|
+
- Keep one integrator responsible for merge sequencing, handoff checks, final validation, and checklist reconciliation.
|
|
141
|
+
- Respect exclusive write scopes, handoff artifacts, forbidden overlap, and merge order exactly as written.
|
|
142
|
+
- Never let two agents edit the same file, generated artifact, schema, source-of-truth rule, or shared contract at the same time.
|
|
143
|
+
- If the spec lacks a clear integrator contract, execute single-agent or stop and ask for clarification.
|
|
144
|
+
|
|
145
|
+
## Stop Conditions
|
|
146
|
+
|
|
147
|
+
Stop immediately and escalate if:
|
|
148
|
+
|
|
149
|
+
- a required precondition cannot be satisfied exactly
|
|
150
|
+
- a required file, symbol, command, dependency, or interface differs from the spec
|
|
151
|
+
- the saved spec contains unresolved template text or alternative commands
|
|
152
|
+
- completing the task would require touching a Protected Path or using a Rejected Approach
|
|
153
|
+
- validation cannot prove the intended behavior with available repo context
|
|
154
|
+
- implementation would require unapproved scope, abstraction, migration, compatibility logic, or cleanup
|
|
155
|
+
- a `Risk Controls` rule would be violated or is contradicted by repo reality
|
|
156
|
+
- review exposes a real ambiguity that would require guessing
|
|
157
|
+
- a user pause is required and the user has not explicitly said to proceed
|
|
158
|
+
|
|
159
|
+
## Completion Standard
|
|
160
|
+
|
|
161
|
+
Do not mark the task complete until:
|
|
162
|
+
|
|
163
|
+
- completed checklist items are checked off according to the spec mode
|
|
164
|
+
- every remaining unchecked item is blocked, intentionally unfinished, not applicable, or halted by an explicit stop condition
|
|
165
|
+
- every reached phase exit gate has passed
|
|
166
|
+
- applicable `Risk Controls` remained satisfied
|
|
167
|
+
- reached Contract Test Ledger rows are green or explicitly blocked with evidence
|
|
168
|
+
- validation commands and behavior proof have run, or skipped checks have a concrete reason
|
|
169
|
+
- required review/signoff gates have run and grounded findings are fixed or blocked with evidence
|
|
170
|
+
- the whole-spec Review Plan, review-pass history, and stable defect lifecycle remain
|
|
171
|
+
consistent with `implementation-review-loop.md`
|
|
172
|
+
- protected paths remained untouched and rejected approaches were not used
|
|
173
|
+
- required comments/docblocks were added only where the spec demanded them
|
|
174
|
+
- the chosen Git checkpoint strategy was followed, and every created or skipped checkpoint was recorded
|
|
175
|
+
- final user handoff is allowed by the spec
|
|
176
|
+
|
|
177
|
+
## Final Risk Handoff
|
|
178
|
+
|
|
179
|
+
For medium/high-risk specs, the final chat response must include a compact `Final Risk Handoff` block. Do not make the user ask for this separately, and do not replace it with a generic summary.
|
|
180
|
+
|
|
181
|
+
Include:
|
|
182
|
+
|
|
183
|
+
- **Contract implemented:** the one behavior/contract delivered, in user-facing terms.
|
|
184
|
+
- **High-risk checkpoints:** each required checkpoint, review result, fixed findings, and any stop/continue decision.
|
|
185
|
+
- **Main invariants proved:** the key Contract Test Ledger rows or equivalent proofs and their status.
|
|
186
|
+
- **Code-review findings:** high/critical findings fixed, remaining medium/low findings, or `none`.
|
|
187
|
+
- **Fixes after review:** concrete fixes made because of cleanup/code review, or `none`.
|
|
188
|
+
- **Validation:** exact commands/proofs that passed.
|
|
189
|
+
- **Skipped checks:** skipped or blocked checks with concrete reasons.
|
|
190
|
+
- **Residual risks:** accepted remaining risks or `none`.
|
|
191
|
+
- **Checkpoint commits:** slice-to-commit mapping or `none`; do not narrate hypothetical checkpoints that were never authorized or attempted.
|
|
192
|
+
- **Implementation reviews:** profile, total review passes, Full/Closure count,
|
|
193
|
+
mandatory coverage, verified defect IDs, accepted-risk IDs with authority and
|
|
194
|
+
reason, and open defect IDs.
|
|
195
|
+
- **Files by role:** state owner, orchestration, side effects, UI/projection, tests, docs/copy, as applicable.
|
|
196
|
+
|
|
197
|
+
Only create a separate report file when the spec requires it or the work is broad enough that chat would lose important evidence, such as multi-agent execution, multiple review passes with findings, skipped live checks, production validation, or handoff to another person. Otherwise keep the spec checklist/ledger as the durable artifact and the final response as the concise decision packet.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Spec Implementer"
|
|
3
|
+
short_description: "Execute approved specs with lean delivery"
|
|
4
|
+
default_prompt: "Use $spec-implementer to execute the approved spec continuously, default to no Git checkpoints, validate proportionately, and launch only stable required review gates."
|
|
5
|
+
policy:
|
|
6
|
+
allow_implicit_invocation: true
|