@laitszkin/apollo-toolkit 3.5.0 → 3.6.1
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/AGENTS.md +2 -1
- package/CHANGELOG.md +17 -0
- package/README.md +2 -0
- package/analyse-app-logs/scripts/__pycache__/filter_logs_by_time.cpython-312.pyc +0 -0
- package/analyse-app-logs/scripts/__pycache__/log_cli_utils.cpython-312.pyc +0 -0
- package/analyse-app-logs/scripts/__pycache__/search_logs.cpython-312.pyc +0 -0
- package/docs-to-voice/scripts/__pycache__/docs_to_voice.cpython-312.pyc +0 -0
- package/generate-spec/README.md +19 -3
- package/generate-spec/SKILL.md +34 -9
- package/generate-spec/agents/openai.yaml +1 -1
- package/generate-spec/references/templates/coordination.md +2 -11
- package/generate-spec/references/templates/preparation.md +69 -0
- package/generate-spec/scripts/__pycache__/create-specscpython-312.pyc +0 -0
- package/generate-spec/scripts/create-specs +34 -1
- package/generate-spec/tests/test_create_specs.py +35 -1
- package/implement-specs-with-subagents/SKILL.md +26 -6
- package/implement-specs-with-subagents/agents/openai.yaml +1 -1
- package/implement-specs-with-worktree/SKILL.md +10 -6
- package/katex/scripts/__pycache__/render_katex.cpython-312.pyc +0 -0
- package/merge-changes-from-local-branches/SKILL.md +9 -19
- package/open-github-issue/scripts/__pycache__/open_github_issue.cpython-312.pyc +0 -0
- package/package.json +1 -1
- package/read-github-issue/scripts/__pycache__/find_issues.cpython-312.pyc +0 -0
- package/read-github-issue/scripts/__pycache__/read_issue.cpython-312.pyc +0 -0
- package/resolve-review-comments/scripts/__pycache__/review_threads.cpython-312.pyc +0 -0
- package/review-spec-related-changes/LICENSE +21 -0
- package/review-spec-related-changes/README.md +53 -0
- package/review-spec-related-changes/SKILL.md +110 -0
- package/review-spec-related-changes/agents/openai.yaml +4 -0
- package/text-to-short-video/scripts/__pycache__/enforce_video_aspect_ratio.cpython-312.pyc +0 -0
package/AGENTS.md
CHANGED
|
@@ -26,7 +26,7 @@ This repository enables users to install and run a curated set of reusable agent
|
|
|
26
26
|
- Users can choose between symlink mode (auto-update via git pull) and copy mode (stable snapshot) with `--symlink` / `--copy` flags.
|
|
27
27
|
- Users can run bundled helper tools through `apltk tools` and direct `apltk <tool>` commands for selected packaged skill scripts.
|
|
28
28
|
- Users can design and implement new features through a spec-first workflow.
|
|
29
|
-
- Users can generate shared feature planning artifacts for approval-gated workflows, including parallel multi-spec batches coordinated through
|
|
29
|
+
- Users can generate shared feature planning artifacts for approval-gated workflows, including parallel multi-spec batches coordinated through `coordination.md` and, only when needed, minimal non-business prerequisite work in `preparation.md`.
|
|
30
30
|
- Users can convert text or documents into audio files with subtitle timelines.
|
|
31
31
|
- Users can turn lecture slides, past papers, and answer books into mock exams, worked solutions, study notes, or graded PDFs with KaTeX-rendered math.
|
|
32
32
|
- Users can extend existing features in a brownfield codebase with required tests and approvals.
|
|
@@ -52,6 +52,7 @@ This repository enables users to install and run a curated set of reusable agent
|
|
|
52
52
|
- Users can record multi-account spending and balance changes in monthly Excel ledgers with summary analytics and charts.
|
|
53
53
|
- Users can recover missing or archived `docs/plans/...` spec sets from issue context, git history, and repository evidence before continuing feature work.
|
|
54
54
|
- Users can review the current git change set from an unbiased reviewer perspective to find abstraction opportunities and simplification candidates.
|
|
55
|
+
- Users can review recent or user-specified spec-backed changes against the governing planning documents, treating unmet business goals as the most severe findings before secondary edge-case, security, and code-review checks.
|
|
55
56
|
- Users can process GitHub pull request review comments and resolve addressed threads.
|
|
56
57
|
- Users can perform repository-wide code reviews and publish confirmed findings as GitHub issues.
|
|
57
58
|
- Users can schedule a bounded project runtime window, stop it automatically, and analyze module health from captured logs.
|
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,23 @@ All notable changes to this repository are documented in this file.
|
|
|
7
7
|
### Added
|
|
8
8
|
- (None yet)
|
|
9
9
|
|
|
10
|
+
## [v3.6.1] - 2026-04-28
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- Add an optional `generate-spec` `preparation.md` template and `apltk create-specs --with-preparation` support for minimal non-business prerequisite work before parallel spec implementation.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
- Tighten `implement-specs-with-subagents` so the coordinating agent completes and commits documented prerequisite preparation before launching implementation subagents.
|
|
17
|
+
- Keep `coordination.md` focused on ownership and collision rules by removing preparation-task fields from its template.
|
|
18
|
+
|
|
19
|
+
## [v3.6.0] - 2026-04-28
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
- Add `review-spec-related-changes`, a spec-compliance review skill that checks recent or named planning documents against implementation evidence and treats unmet business goals as the most severe findings before secondary edge-case, security, and code-review checks.
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
- Remove the post-merge code-review gate from `merge-changes-from-local-branches` so spec-related review now lives in the dedicated `review-spec-related-changes` skill.
|
|
26
|
+
|
|
10
27
|
## [v3.5.0] - 2026-04-28
|
|
11
28
|
|
|
12
29
|
### Added
|
package/README.md
CHANGED
|
@@ -45,6 +45,7 @@ A curated skill catalog for Codex, OpenClaw, Trae, Agents, and Claude Code with
|
|
|
45
45
|
- resolve-review-comments
|
|
46
46
|
- review-change-set
|
|
47
47
|
- review-codebases
|
|
48
|
+
- review-spec-related-changes
|
|
48
49
|
- scheduled-runtime-health-check
|
|
49
50
|
- shadow-api-model-research
|
|
50
51
|
- solana-development
|
|
@@ -202,6 +203,7 @@ Compatibility note:
|
|
|
202
203
|
- `recover-missing-plan` is a local skill used by `enhance-existing-features` and `ship-github-issue-fix` when a referenced `docs/plans/...` spec set is missing or archived.
|
|
203
204
|
- `maintain-skill-catalog` can conditionally use `find-skills`, but its install source is not verified in this repository, so it is intentionally omitted from the table.
|
|
204
205
|
- `read-github-issue` uses GitHub CLI (`gh`) directly for remote issue discovery and inspection, so it does not add any extra skill dependency.
|
|
206
|
+
- `review-spec-related-changes` is a local skill that depends on `review-change-set`, `discover-edge-cases`, and `harden-app-security` for secondary code-practice checks after business-goal completion is reviewed against the governing specs.
|
|
205
207
|
|
|
206
208
|
## Release publishing
|
|
207
209
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/generate-spec/README.md
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
# generate-spec
|
|
2
2
|
|
|
3
|
-
A shared planning skill for feature work. It centralizes creation and maintenance of `spec.md`, `tasks.md`, `checklist.md`, `contract.md`, `design.md`, and when needed `coordination.md` so other skills can reuse one consistent approval-gated spec workflow with risk-driven test planning from `test-case-strategy`.
|
|
3
|
+
A shared planning skill for feature work. It centralizes creation and maintenance of `spec.md`, `tasks.md`, `checklist.md`, `contract.md`, `design.md`, and when needed shared `coordination.md` or `preparation.md` so other skills can reuse one consistent approval-gated spec workflow with risk-driven test planning from `test-case-strategy`.
|
|
4
4
|
|
|
5
5
|
## Core capabilities
|
|
6
6
|
|
|
7
7
|
- Generates single-spec plans under `docs/plans/{YYYY-MM-DD}/{change_name}/`.
|
|
8
8
|
- Generates multi-spec parallel batches under `docs/plans/{YYYY-MM-DD}/{batch_name}/{change_name}/` with a shared `coordination.md`, while keeping every batch spec independently completable and safe to implement concurrently.
|
|
9
|
+
- Optionally generates a batch-level `preparation.md` only when minimal non-business prerequisite work must land before specs can be implemented in parallel.
|
|
9
10
|
- Uses shared templates so spec-first and brownfield workflows follow the same planning structure.
|
|
10
11
|
- Requires clarification handling and explicit user approval before implementation starts.
|
|
11
12
|
- Backfills task and checklist status after implementation and testing.
|
|
@@ -29,7 +30,8 @@ A shared planning skill for feature work. It centralizes creation and maintenanc
|
|
|
29
30
|
│ ├── checklist.md
|
|
30
31
|
│ ├── contract.md
|
|
31
32
|
│ ├── design.md
|
|
32
|
-
│
|
|
33
|
+
│ ├── coordination.md
|
|
34
|
+
│ └── preparation.md
|
|
33
35
|
└── scripts/
|
|
34
36
|
└── create-specs
|
|
35
37
|
```
|
|
@@ -64,6 +66,19 @@ apltk create-specs "Membership write path" \
|
|
|
64
66
|
--output-dir "$WORKSPACE_ROOT/docs/plans"
|
|
65
67
|
```
|
|
66
68
|
|
|
69
|
+
Parallel batch with prerequisite preparation:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
apltk create-specs "Membership write path" \
|
|
73
|
+
--change-name membership-write-path \
|
|
74
|
+
--batch-name membership-cutover \
|
|
75
|
+
--with-coordination \
|
|
76
|
+
--with-preparation \
|
|
77
|
+
--output-dir "$WORKSPACE_ROOT/docs/plans"
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Use `--with-preparation` only when shared prerequisite work is required before parallel implementation. That file must stay minimal and must not contain core business logic, target user behavior, or member-spec implementation tasks.
|
|
81
|
+
|
|
67
82
|
```text
|
|
68
83
|
docs/plans/<today>/membership-cutover/
|
|
69
84
|
├── coordination.md
|
|
@@ -82,7 +97,8 @@ docs/plans/<today>/membership-cutover/
|
|
|
82
97
|
- `checklist.md`: use `- [ ]` only, adapt items to real scope, record actual results, and map behavior risks to test IDs plus oracles selected through `test-case-strategy`.
|
|
83
98
|
- `contract.md`: when external dependencies materially shape the change, record their official-source-backed invocation surface, constraints, and caller obligations in the standard dependency-record format.
|
|
84
99
|
- `design.md`: record the architecture/design delta in the standard format, including affected modules, flow, invariants, tradeoffs, and validation plan.
|
|
85
|
-
- `coordination.md`: for multi-spec batches only, record
|
|
100
|
+
- `coordination.md`: for multi-spec batches only, record ownership boundaries, replacement direction, file ownership guardrails, known collision candidates, pre-agreed edit rules for shared surfaces, shared API/schema freeze or additive-only rules, compatibility-shim retention rules, merge order, and cross-spec integration checkpoints, but never use it to make one spec depend on another spec's implementation before it can be completed.
|
|
101
|
+
- `preparation.md`: optional batch-level prerequisite plan used only when specs cannot be made parallel-safe without prior shared work; keep it tasks-like, minimal, verified, and free of core business logic or target outcomes.
|
|
86
102
|
- If clarification responses change the plan, update the docs and obtain approval again before coding.
|
|
87
103
|
|
|
88
104
|
## Notes
|
package/generate-spec/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: generate-spec
|
|
3
|
-
description: Generate and maintain shared feature planning artifacts (`spec.md`, `tasks.md`, `checklist.md`, `contract.md`, `design.md`, and when needed `coordination.md`) from standard templates with clarification tracking, approval gating, unit drift-check planning, and post-implementation backfill. Use when a workflow needs specs before coding, or when another skill needs to create/update planning docs under `docs/plans/{YYYY-MM-DD}/...`.
|
|
3
|
+
description: Generate and maintain shared feature planning artifacts (`spec.md`, `tasks.md`, `checklist.md`, `contract.md`, `design.md`, and when needed shared `coordination.md` or `preparation.md`) from standard templates with clarification tracking, approval gating, unit drift-check planning, and post-implementation backfill. Use when a workflow needs specs before coding, or when another skill needs to create/update planning docs under `docs/plans/{YYYY-MM-DD}/...`.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Generate Spec
|
|
@@ -15,9 +15,9 @@ description: Generate and maintain shared feature planning artifacts (`spec.md`,
|
|
|
15
15
|
## Standards
|
|
16
16
|
|
|
17
17
|
- Evidence: Review the relevant code, configs, and authoritative docs before filling requirements or test plans; when external dependencies, libraries, frameworks, APIs, or platforms are involved, checking their official documentation is mandatory during spec creation.
|
|
18
|
-
- Execution: Generate the planning files from this skill's current templates first, keep each spec set tightly scoped, split broader work into multiple independent spec sets when needed, ensure every batch spec is independently completable and truly parallel-implementable without depending on another spec set to land first, surface shared-file or shared-contract collision risks during planning, resolve those coordination rules before implementation starts, complete
|
|
19
|
-
- Quality: Keep `spec.md`, `tasks.md`, `checklist.md`, `contract.md`,
|
|
20
|
-
- Output: Store planning artifacts under `docs/plans/{YYYY-MM-DD}/{change_name}/` for single-spec work, or `docs/plans/{YYYY-MM-DD}/{batch_name}/{change_name}/` plus `coordination.md` for multi-spec parallel work
|
|
18
|
+
- Execution: Generate the planning files from this skill's current templates first, keep each spec set tightly scoped, split broader work into multiple independent spec sets when needed, ensure every batch spec is independently completable and truly parallel-implementable without depending on another spec set to land first, surface shared-file or shared-contract collision risks during planning, resolve those coordination rules before implementation starts, add `preparation.md` only when the specs cannot be made parallel-safe without prior shared work, keep that preparation minimal and free of core business logic or target outcomes, complete plans with traceable requirements and risks, handle clarification updates, then wait for explicit approval before implementation.
|
|
19
|
+
- Quality: Keep `spec.md`, `tasks.md`, `checklist.md`, `contract.md`, `design.md`, and any shared batch docs synchronized, use `test-case-strategy` to map each planned test to a concrete risk or requirement, preserve the actual headings and field structure from this skill's templates, and tailor the templates so only applicable items remain active.
|
|
20
|
+
- Output: Store planning artifacts under `docs/plans/{YYYY-MM-DD}/{change_name}/` for single-spec work, or `docs/plans/{YYYY-MM-DD}/{batch_name}/{change_name}/` plus shared `coordination.md` for multi-spec parallel work. Add shared `preparation.md` at the batch root only when prerequisite work must land before member specs can run in parallel, and keep individual specs concise, executable, non-overlapping with that preparation, and easy to update.
|
|
21
21
|
|
|
22
22
|
## Goal
|
|
23
23
|
|
|
@@ -48,15 +48,20 @@ Own the shared planning-doc lifecycle for feature work so other skills can reuse
|
|
|
48
48
|
- Instead, split the work into multiple spec sets, each independently valid and each covering no more than three modules.
|
|
49
49
|
- Define those spec sets so they do not conflict with each other and do not require another spec set to land first in order to be approved or implemented safely.
|
|
50
50
|
- For batch generation, treat cross-spec implementation dependency as a planning bug: if Spec B cannot be completed safely until Spec A lands, they should be one spec set or be re-sliced so each spec has its own self-contained outcome.
|
|
51
|
-
-
|
|
51
|
+
- Use `preparation.md`, not individual spec files, when the only safe way to parallelize a batch is to land shared prerequisite work before any spec starts.
|
|
52
|
+
- Keep `preparation.md` as small as possible: it may define enabling scaffolds, shared test fixtures, naming/contract stubs, mechanical migrations, or non-business compatibility surfaces, but it must not implement core business logic, the target user behavior, or any member spec's actual outcome.
|
|
53
|
+
- If the required pre-work would change business behavior, implement target logic, or satisfy a meaningful requirement by itself, re-slice it into one or more normal spec sets instead of placing it in `preparation.md`.
|
|
54
|
+
- Allow shared preparation only when it is completed before parallel implementation begins; do not hide required pre-work inside one member spec while other specs depend on it.
|
|
52
55
|
- Treat any unresolved shared-file collision, overlapping ownership, or incompatible contract change across spec sets as a planning bug to resolve before approval, not an implementation-time surprise.
|
|
53
|
-
- If two candidate spec sets would still need to edit the same non-additive surface, either merge them into one spec set
|
|
56
|
+
- If two candidate spec sets would still need to edit the same non-additive surface, either merge them into one spec set, record a concrete ownership split plus additive-only rule that makes parallel work safe, or move the shared pre-work into `preparation.md` when the pre-work can be completed once before all specs.
|
|
54
57
|
- Use:
|
|
55
58
|
- `WORKSPACE_ROOT=<target_project_root>`
|
|
56
59
|
- `apltk create-specs "<feature_name>" --change-name <kebab-case> --output-dir "$WORKSPACE_ROOT/docs/plans"`
|
|
57
60
|
- For parallel multi-spec generation, also use:
|
|
58
61
|
- `--batch-name <kebab-case-batch-name>`
|
|
59
62
|
- `--with-coordination`
|
|
63
|
+
- If and only if multiple spec sets cannot be made parallel-safe without prior shared work, also use:
|
|
64
|
+
- `--with-preparation`
|
|
60
65
|
- Always generate:
|
|
61
66
|
- `references/templates/spec.md`
|
|
62
67
|
- `references/templates/tasks.md`
|
|
@@ -64,6 +69,7 @@ Own the shared planning-doc lifecycle for feature work so other skills can reuse
|
|
|
64
69
|
- `references/templates/contract.md`
|
|
65
70
|
- `references/templates/design.md`
|
|
66
71
|
- Generate `references/templates/coordination.md` at the batch root when multiple spec sets are intentionally created for parallel implementation.
|
|
72
|
+
- Generate `references/templates/preparation.md` at the batch root only when required prerequisite work must be completed before member specs can be parallel-implemented.
|
|
67
73
|
- Save files under `docs/plans/{YYYY-MM-DD}/{change_name}/` or `docs/plans/{YYYY-MM-DD}/{batch_name}/{change_name}/`.
|
|
68
74
|
- After generation, fill the files in place without renaming, removing, or collapsing template headings unless a heading is explicitly template-only and not applicable to the real scope.
|
|
69
75
|
- Before approval, compare the drafted files against the current template headings and required fields; fix any drift caused by following older project examples.
|
|
@@ -105,6 +111,7 @@ Own the shared planning-doc lifecycle for feature work so other skills can reuse
|
|
|
105
111
|
- Cross-reference relevant requirement IDs from `spec.md` and any external dependency records from `contract.md`.
|
|
106
112
|
- Make architecture boundaries, invariants, and rollback/fallback expectations explicit when they matter to safe implementation.
|
|
107
113
|
- When the spec belongs to a parallel batch, add a short reference to the parent `coordination.md`, state the exact assumptions that let this spec be implemented in parallel, and keep `design.md` focused on the single-spec delta rather than duplicating cross-spec ownership rules.
|
|
114
|
+
- When the batch uses `preparation.md`, write each spec's implementation guidance as if the preparation has already been completed and committed; do not duplicate preparation tasks, verification, or shared setup in member specs.
|
|
108
115
|
|
|
109
116
|
### 6.5) Fill `coordination.md` for parallel multi-spec batches
|
|
110
117
|
|
|
@@ -112,8 +119,8 @@ Own the shared planning-doc lifecycle for feature work so other skills can reuse
|
|
|
112
119
|
- Place it at `docs/plans/{YYYY-MM-DD}/{batch_name}/coordination.md`.
|
|
113
120
|
- Use it as the batch-level source of truth for shared preparation, ownership boundaries, merge order, and cross-spec constraints.
|
|
114
121
|
- Record explicitly that each spec set must remain independently completable and must not rely on another spec set's code changes, unfinished tasks, or merge order to achieve its own approved outcome.
|
|
115
|
-
- Record shared fields, shared contracts, or shared data-shape
|
|
116
|
-
- Record whether the batch is ready for parallel implementation now; if not,
|
|
122
|
+
- Record shared fields, shared contracts, or shared data-shape assumptions that multiple spec sets must align on.
|
|
123
|
+
- Record whether the batch is ready for parallel implementation now; if not, point to `preparation.md` for executable prerequisite work or list coordination decisions that must still be settled.
|
|
117
124
|
- When one spec set replaces or removes legacy behavior, state that direction explicitly so all worktrees implement toward the same target rather than preserving the old behavior accidentally.
|
|
118
125
|
- Capture which spec set may touch which modules, which files require coordination, and whether any landing order or cutover sequence must be respected.
|
|
119
126
|
- Treat `coordination.md` as a merge-conflict prevention contract, not just a planning summary.
|
|
@@ -125,6 +132,20 @@ Own the shared planning-doc lifecycle for feature work so other skills can reuse
|
|
|
125
132
|
- If the batch still needs a recommended merge order, make that order operationally convenient rather than functionally required for any single spec to work correctly.
|
|
126
133
|
- Keep single-spec concerns in that spec's own `design.md`; reserve `coordination.md` for batch-wide rules only.
|
|
127
134
|
|
|
135
|
+
### 6.6) Fill `preparation.md` only for prerequisite work
|
|
136
|
+
|
|
137
|
+
- Create `preparation.md` only when multiple spec sets cannot be implemented safely in parallel until shared prerequisite work is completed first.
|
|
138
|
+
- Place it at `docs/plans/{YYYY-MM-DD}/{batch_name}/preparation.md`.
|
|
139
|
+
- Treat it as a pre-parallel implementation queue for the coordinating/main agent, not as another member spec.
|
|
140
|
+
- Write it in a tasks-like style with atomic preparation items, explicit outputs, completion conditions, and verification hooks.
|
|
141
|
+
- Include only the smallest shared prerequisite work that every affected spec can assume after it lands.
|
|
142
|
+
- Exclude core business logic, target business outcomes, user-visible behavior changes, and member-spec implementation guidance; those belong in normal spec files.
|
|
143
|
+
- Include relevant validation work for the preparation itself.
|
|
144
|
+
- Do not include member-spec implementation tasks in `preparation.md`.
|
|
145
|
+
- Remove overlapping instructions from member specs; specs must reference the prepared baseline as an assumption instead of repeating the setup tasks.
|
|
146
|
+
- If the required work is large enough to become its own product behavior slice, or if it carries core business logic, re-slice the batch instead of hiding that slice in `preparation.md`.
|
|
147
|
+
- If the batch can be made parallel-safe through ownership rules, additive-only constraints, or re-slicing, do not create `preparation.md`.
|
|
148
|
+
|
|
128
149
|
### 7) Fill `checklist.md`
|
|
129
150
|
|
|
130
151
|
- Use checkbox format `- [ ]` for checklist items, except structured placeholder fields that are intentionally left for later fill-in.
|
|
@@ -153,6 +174,7 @@ Own the shared planning-doc lifecycle for feature work so other skills can reuse
|
|
|
153
174
|
- Update `contract.md` when the final dependency usage, obligations, or verified constraints differ from the planning draft.
|
|
154
175
|
- Update `design.md` when the approved architecture changes during implementation, and record the final chosen design rather than leaving stale placeholders.
|
|
155
176
|
- Update `coordination.md` when shared ownership, replacement sequencing, or cross-spec preparation changed during implementation or merge planning.
|
|
177
|
+
- Update `preparation.md` when prerequisite work was completed, verified, skipped with an approved reason, or changed during implementation.
|
|
156
178
|
- Only mark checklist items complete when the work actually happened or the recorded decision actually applies.
|
|
157
179
|
- Do not check off unused examples, placeholder rows, or non-selected decision options.
|
|
158
180
|
- If different flows use different test strategies, preserve separate decision records in the final checklist instead of merging them into a misleading single summary.
|
|
@@ -167,8 +189,10 @@ Own the shared planning-doc lifecycle for feature work so other skills can reuse
|
|
|
167
189
|
- Never allow one spec set to cover more than three modules.
|
|
168
190
|
- When a request exceeds that scope, split it into independent, non-conflicting, non-dependent spec sets before approval.
|
|
169
191
|
- For batch specs, independence is mandatory: each spec must describe a complete slice that can be implemented, tested, reviewed, and merged without waiting for another spec in the same batch.
|
|
170
|
-
- For batch specs, parallel readiness is also mandatory: each spec must be safe to implement concurrently, with shared-file collisions and ownership rules settled in `coordination.md` before coding begins.
|
|
192
|
+
- For batch specs, parallel readiness is also mandatory: each spec must be safe to implement concurrently after any approved `preparation.md` work is completed, with shared-file collisions and ownership rules settled in `coordination.md` before coding begins.
|
|
193
|
+
- Use `preparation.md` sparingly: it is allowed only for explicit, minimal, non-business pre-parallel shared work, not for normal cross-spec coordination or member-spec implementation.
|
|
171
194
|
- When multiple spec sets are created for one batch, keep their shared implementation direction in one `coordination.md` instead of duplicating cross-spec rules in every `design.md`.
|
|
195
|
+
- When `preparation.md` exists, every member spec must avoid duplicating its tasks and must state its implementation assumptions against the post-preparation baseline.
|
|
172
196
|
- For parallel worktree batches, make `coordination.md` specific enough that another engineer can tell which files they may edit, which shared contracts are frozen or additive-only, which shims must remain in place, and what combined behaviors need verification after merge.
|
|
173
197
|
- Prefer realistic coverage over boilerplate: add or remove checklist items based on actual risk.
|
|
174
198
|
- When external dependencies materially shape the change, `contract.md` is required and must capture the official-source-backed contract in the standardized record format.
|
|
@@ -191,3 +215,4 @@ Own the shared planning-doc lifecycle for feature work so other skills can reuse
|
|
|
191
215
|
- `references/templates/contract.md`: external dependency contract template.
|
|
192
216
|
- `references/templates/design.md`: architecture/design delta template.
|
|
193
217
|
- `references/templates/coordination.md`: parallel batch coordination template.
|
|
218
|
+
- `references/templates/preparation.md`: optional pre-parallel prerequisite work template.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
interface:
|
|
2
2
|
display_name: "generate-spec"
|
|
3
3
|
short_description: "Generate shared feature spec, task, and checklist docs before coding"
|
|
4
|
-
default_prompt: "Use $generate-spec to create or update single-spec plans under docs/plans/<date>/<change_name>/ or parallel batches under docs/plans/<date>/<batch_name>/<change_name>/ with
|
|
4
|
+
default_prompt: "Use $generate-spec to create or update single-spec plans under docs/plans/<date>/<change_name>/ or parallel batches under docs/plans/<date>/<batch_name>/<change_name>/ with shared coordination.md and, only when specs cannot be parallel-safe without prior shared work, a minimal non-business preparation.md; treat this skill's current references/templates/*.md files as the binding format even when older project specs use different layouts, ensure member specs assume preparation is already complete and do not duplicate its tasks, surface shared-file or shared-contract collision risks during planning, settle ownership and additive-only rules in coordination.md before implementation starts, fill BDD requirements, use $test-case-strategy for risk-driven test planning and unit drift checks, make tasks.md an atomic implementation queue with concrete outputs and verification hooks, document external dependency contracts in contract.md when they materially constrain the change, write the architecture/design delta in design.md, process clarification updates, and wait for explicit approval before implementation."
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
## Parallel Readiness Gate
|
|
10
10
|
- Ready for parallel implementation now: [Yes / No]
|
|
11
11
|
- Blocking coordination items before coding: [None / list concrete ownership or contract decisions that must be settled first]
|
|
12
|
+
- Preparation document required before parallel work: [No / Yes, see `preparation.md`]
|
|
12
13
|
- Re-coordination trigger: [what kind of new overlap or contract change forces the batch to stop and re-align]
|
|
13
14
|
|
|
14
15
|
## Batch Scope
|
|
@@ -22,15 +23,7 @@
|
|
|
22
23
|
- Shared constraints: [runtime, rollout, compatibility, or ownership constraints]
|
|
23
24
|
- Shared invariants: [rules every spec set must preserve]
|
|
24
25
|
|
|
25
|
-
##
|
|
26
|
-
|
|
27
|
-
### Shared Fields / Contracts
|
|
28
|
-
- Shared fields to introduce or reuse: [field / config / API shape / event schema]
|
|
29
|
-
- Canonical source of truth: [which module or data owner defines them]
|
|
30
|
-
- Required preparation before implementation: [migration, adapter, stub, flag, fallback, fixture]
|
|
31
|
-
- Additive-only rule during batch: [what may be added safely without breaking parallel work, or `None`]
|
|
32
|
-
|
|
33
|
-
### Replacement / Legacy Direction
|
|
26
|
+
## Replacement / Legacy Direction
|
|
34
27
|
- Legacy behavior being replaced: [feature / flow / module / endpoint / UI]
|
|
35
28
|
- Required implementation direction: [replace in place / shadow then cut over / adapter bridge / phased removal]
|
|
36
29
|
- Compatibility window: [None / temporary coexistence period]
|
|
@@ -42,14 +35,12 @@
|
|
|
42
35
|
- Primary concern: [what this spec owns]
|
|
43
36
|
- Allowed touch points: [files/modules it may change]
|
|
44
37
|
- Must not change: [files/modules owned by another spec unless explicitly coordinated]
|
|
45
|
-
- Depends on shared preparation: [None / specific shared item above that already exists or can be completed within this spec]
|
|
46
38
|
- Cross-spec implementation dependency: [None; if not None, re-slice the batch]
|
|
47
39
|
|
|
48
40
|
### Spec Set 2: [spec-name-2]
|
|
49
41
|
- Primary concern: [what this spec owns]
|
|
50
42
|
- Allowed touch points: [files/modules it may change]
|
|
51
43
|
- Must not change: [files/modules owned by another spec unless explicitly coordinated]
|
|
52
|
-
- Depends on shared preparation: [None / specific shared item above that already exists or can be completed within this spec]
|
|
53
44
|
- Cross-spec implementation dependency: [None; if not None, re-slice the batch]
|
|
54
45
|
|
|
55
46
|
## Conflict Boundaries
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Preparation: [Feature Name]
|
|
2
|
+
|
|
3
|
+
- Date: [YYYY-MM-DD]
|
|
4
|
+
- Batch: [batch_name]
|
|
5
|
+
|
|
6
|
+
## Preparation Goal
|
|
7
|
+
[Describe the smallest shared prerequisite state that must exist before member specs can be implemented in parallel. This must not implement core business logic or deliver the batch target outcome.]
|
|
8
|
+
|
|
9
|
+
## Use Condition
|
|
10
|
+
- Why this file exists: [explain why the batch cannot be safely parallelized without this prerequisite work]
|
|
11
|
+
- Minimality rule: [why this is the smallest viable prerequisite, not a member-spec implementation slice]
|
|
12
|
+
- Core business boundary: [state `No core business logic or target outcome is implemented here`; if that is false, re-slice the specs instead]
|
|
13
|
+
- Specs that rely on this preparation: [[spec-name-1], [spec-name-2]]
|
|
14
|
+
- Parallel implementation starts after: [commit / verification / approval condition]
|
|
15
|
+
- Out of scope: [member-spec implementation work that must remain in the individual spec files]
|
|
16
|
+
|
|
17
|
+
## Prepared Baseline
|
|
18
|
+
- Current baseline before preparation: [current state]
|
|
19
|
+
- Required baseline after preparation: [state all member specs may assume]
|
|
20
|
+
- Shared files or contracts prepared here: [files/modules/API/schema/config/test fixtures]
|
|
21
|
+
- Member specs must not repeat: [tasks/edits/verification covered by this file]
|
|
22
|
+
- Core business behavior changed here: [No; if yes, this file is being misused]
|
|
23
|
+
|
|
24
|
+
## Preparation Tasks
|
|
25
|
+
|
|
26
|
+
### **Task P1: [Preparation Task Title]**
|
|
27
|
+
- Purpose: [why this minimal non-business prerequisite is required before parallel work]
|
|
28
|
+
- Affected specs: [[spec-name-1], [spec-name-2]]
|
|
29
|
+
- Allowed scope: [files/modules this preparation task may touch]
|
|
30
|
+
- Out-of-scope guardrails: [core business logic, target outcome, and member-spec behavior that must stay out of preparation]
|
|
31
|
+
- Inputs: [coordination/design/contract/official-doc evidence]
|
|
32
|
+
- Expected output: [concrete prepared artifact or code/doc state]
|
|
33
|
+
- Completion condition: [observable state that proves the task is done]
|
|
34
|
+
- Verification hook: [command/check/review step]
|
|
35
|
+
- Unit drift check: [UT-xx target unit; expected result/assertion, or N/A with reason]
|
|
36
|
+
- P1. [ ] [Atomic preparation action with one concrete output]
|
|
37
|
+
- P1. [ ] [Atomic verification or regression action]
|
|
38
|
+
|
|
39
|
+
### **Task P2: [Preparation Task Title]**
|
|
40
|
+
- Purpose: [why this minimal non-business prerequisite is required before parallel work]
|
|
41
|
+
- Affected specs: [[spec-name-1], [spec-name-2]]
|
|
42
|
+
- Allowed scope: [files/modules this preparation task may touch]
|
|
43
|
+
- Out-of-scope guardrails: [core business logic, target outcome, and member-spec behavior that must stay out of preparation]
|
|
44
|
+
- Inputs: [coordination/design/contract/official-doc evidence]
|
|
45
|
+
- Expected output: [concrete prepared artifact or code/doc state]
|
|
46
|
+
- Completion condition: [observable state that proves the task is done]
|
|
47
|
+
- Verification hook: [command/check/review step]
|
|
48
|
+
- Unit drift check: [UT-xx target unit; expected result/assertion, or N/A with reason]
|
|
49
|
+
- P2. [ ] [Atomic preparation action with one concrete output]
|
|
50
|
+
- P2. [ ] [Atomic verification or regression action]
|
|
51
|
+
|
|
52
|
+
## Validation Plan
|
|
53
|
+
- Required verification before subagents start: [commands/checks]
|
|
54
|
+
- Expected results/assertions: [what proves the prepared baseline is usable]
|
|
55
|
+
- Regression risks covered: [risk IDs or behavior slices]
|
|
56
|
+
- Verification owner: [main/coordinating agent]
|
|
57
|
+
|
|
58
|
+
## Handoff Contract For Member Specs
|
|
59
|
+
- Preparation commit required before subagents start: [Yes]
|
|
60
|
+
- Member specs assume: [prepared baseline assumptions]
|
|
61
|
+
- Member specs must not change: [prepared surfaces that are now frozen/additive-only]
|
|
62
|
+
- Member specs own all business behavior: [Yes]
|
|
63
|
+
- If preparation changes later: [stop condition and re-coordination rule]
|
|
64
|
+
|
|
65
|
+
## Completion Record
|
|
66
|
+
- Preparation status: [Not started / In progress / Complete / Blocked / N/A]
|
|
67
|
+
- Preparation commit: [commit hash or `None yet`]
|
|
68
|
+
- Verification executed: [commands/checks/results]
|
|
69
|
+
- Remaining blockers before parallel implementation: [None / list]
|
|
Binary file
|
|
@@ -14,6 +14,7 @@ TEMPLATE_FILENAMES = (
|
|
|
14
14
|
"design.md",
|
|
15
15
|
)
|
|
16
16
|
COORDINATION_TEMPLATE = "coordination.md"
|
|
17
|
+
PREPARATION_TEMPLATE = "preparation.md"
|
|
17
18
|
PLACEHOLDERS = ("[Feature Name]", "[功能名稱]")
|
|
18
19
|
|
|
19
20
|
|
|
@@ -49,7 +50,8 @@ def main() -> int:
|
|
|
49
50
|
"Create planning docs (spec.md, tasks.md, checklist.md, contract.md, design.md) "
|
|
50
51
|
"from templates with folder format docs/plans/{date}/{change_name} "
|
|
51
52
|
"or docs/plans/{date}/{batch_name}/{change_name}, including coordination "
|
|
52
|
-
"templates for
|
|
53
|
+
"and optional preparation templates for batch specs that need shared "
|
|
54
|
+
"pre-work before parallel implementation."
|
|
53
55
|
),
|
|
54
56
|
)
|
|
55
57
|
parser.add_argument("feature_name", help="Display name used in generated documents")
|
|
@@ -78,6 +80,15 @@ def main() -> int:
|
|
|
78
80
|
"for up-front ownership and collision coordination."
|
|
79
81
|
),
|
|
80
82
|
)
|
|
83
|
+
parser.add_argument(
|
|
84
|
+
"--with-preparation",
|
|
85
|
+
action="store_true",
|
|
86
|
+
help=(
|
|
87
|
+
"When used with --batch-name, also create or update "
|
|
88
|
+
"docs/plans/{date}/{batch_name}/preparation.md from the shared template "
|
|
89
|
+
"for prerequisite work that must be completed before parallel implementation."
|
|
90
|
+
),
|
|
91
|
+
)
|
|
81
92
|
parser.add_argument(
|
|
82
93
|
"--output-dir",
|
|
83
94
|
default="docs/plans",
|
|
@@ -110,6 +121,8 @@ def main() -> int:
|
|
|
110
121
|
batch_name = args.batch_name.strip() if args.batch_name else None
|
|
111
122
|
if args.with_coordination and not batch_name:
|
|
112
123
|
raise SystemExit("--with-coordination requires --batch-name")
|
|
124
|
+
if args.with_preparation and not batch_name:
|
|
125
|
+
raise SystemExit("--with-preparation requires --batch-name")
|
|
113
126
|
|
|
114
127
|
template_dir = Path(args.template_dir).expanduser().resolve()
|
|
115
128
|
if not template_dir.exists() or not template_dir.is_dir():
|
|
@@ -120,6 +133,8 @@ def main() -> int:
|
|
|
120
133
|
]
|
|
121
134
|
if args.with_coordination and not (template_dir / COORDINATION_TEMPLATE).exists():
|
|
122
135
|
missing_templates.append(COORDINATION_TEMPLATE)
|
|
136
|
+
if args.with_preparation and not (template_dir / PREPARATION_TEMPLATE).exists():
|
|
137
|
+
missing_templates.append(PREPARATION_TEMPLATE)
|
|
123
138
|
if missing_templates:
|
|
124
139
|
missing = ", ".join(missing_templates)
|
|
125
140
|
raise SystemExit(f"Missing template files in {template_dir}: {missing}")
|
|
@@ -134,6 +149,9 @@ def main() -> int:
|
|
|
134
149
|
coordination_path = (
|
|
135
150
|
batch_root / COORDINATION_TEMPLATE if args.with_coordination and batch_root else None
|
|
136
151
|
)
|
|
152
|
+
preparation_path = (
|
|
153
|
+
batch_root / PREPARATION_TEMPLATE if args.with_preparation and batch_root else None
|
|
154
|
+
)
|
|
137
155
|
existing_files = [path for path in output_paths if path.exists()]
|
|
138
156
|
if existing_files and not args.force:
|
|
139
157
|
existing = ", ".join(str(path) for path in existing_files)
|
|
@@ -171,10 +189,25 @@ def main() -> int:
|
|
|
171
189
|
encoding="utf-8",
|
|
172
190
|
)
|
|
173
191
|
|
|
192
|
+
if preparation_path and (args.force or not preparation_path.exists()):
|
|
193
|
+
preparation_template = template_dir / PREPARATION_TEMPLATE
|
|
194
|
+
preparation_path.write_text(
|
|
195
|
+
_render(
|
|
196
|
+
content=preparation_template.read_text(encoding="utf-8"),
|
|
197
|
+
today=today,
|
|
198
|
+
feature_name=feature_name,
|
|
199
|
+
change_name=change_name,
|
|
200
|
+
batch_name=batch_name,
|
|
201
|
+
),
|
|
202
|
+
encoding="utf-8",
|
|
203
|
+
)
|
|
204
|
+
|
|
174
205
|
for output_path in output_paths:
|
|
175
206
|
print(output_path)
|
|
176
207
|
if coordination_path:
|
|
177
208
|
print(coordination_path)
|
|
209
|
+
if preparation_path:
|
|
210
|
+
print(preparation_path)
|
|
178
211
|
return 0
|
|
179
212
|
|
|
180
213
|
|
|
@@ -64,7 +64,7 @@ class CreateSpecsTests(unittest.TestCase):
|
|
|
64
64
|
self.assertIn("batch-safe-planner", rendered)
|
|
65
65
|
self.assertIn("parallel-batch", rendered)
|
|
66
66
|
|
|
67
|
-
def
|
|
67
|
+
def test_main_creates_spec_files_and_shared_batch_files(self) -> None:
|
|
68
68
|
with tempfile.TemporaryDirectory() as temp_dir:
|
|
69
69
|
root = Path(temp_dir)
|
|
70
70
|
template_dir = root / "templates"
|
|
@@ -80,6 +80,10 @@ class CreateSpecsTests(unittest.TestCase):
|
|
|
80
80
|
"coordination [YYYY-MM-DD] [Feature Name] [change_name] [batch_name]\n",
|
|
81
81
|
encoding="utf-8",
|
|
82
82
|
)
|
|
83
|
+
(template_dir / MODULE.PREPARATION_TEMPLATE).write_text(
|
|
84
|
+
"preparation [YYYY-MM-DD] [Feature Name] [change_name] [batch_name]\n",
|
|
85
|
+
encoding="utf-8",
|
|
86
|
+
)
|
|
83
87
|
|
|
84
88
|
argv = [
|
|
85
89
|
"create-specs",
|
|
@@ -87,6 +91,7 @@ class CreateSpecsTests(unittest.TestCase):
|
|
|
87
91
|
"--batch-name",
|
|
88
92
|
"parallel-batch",
|
|
89
93
|
"--with-coordination",
|
|
94
|
+
"--with-preparation",
|
|
90
95
|
"--output-dir",
|
|
91
96
|
str(output_dir),
|
|
92
97
|
"--template-dir",
|
|
@@ -110,6 +115,35 @@ class CreateSpecsTests(unittest.TestCase):
|
|
|
110
115
|
coordination = output_dir / "2026-04-18" / "parallel-batch" / "coordination.md"
|
|
111
116
|
self.assertTrue(coordination.is_file())
|
|
112
117
|
self.assertIn(str(coordination), stdout.getvalue())
|
|
118
|
+
preparation = output_dir / "2026-04-18" / "parallel-batch" / "preparation.md"
|
|
119
|
+
self.assertTrue(preparation.is_file())
|
|
120
|
+
self.assertIn("preparation", preparation.read_text(encoding="utf-8"))
|
|
121
|
+
self.assertIn(str(preparation), stdout.getvalue())
|
|
122
|
+
|
|
123
|
+
def test_main_requires_batch_name_for_preparation_file(self) -> None:
|
|
124
|
+
with tempfile.TemporaryDirectory() as temp_dir:
|
|
125
|
+
template_dir = Path(temp_dir) / "templates"
|
|
126
|
+
template_dir.mkdir(parents=True)
|
|
127
|
+
for name in MODULE.TEMPLATE_FILENAMES:
|
|
128
|
+
(template_dir / name).write_text("template\n", encoding="utf-8")
|
|
129
|
+
(template_dir / MODULE.PREPARATION_TEMPLATE).write_text(
|
|
130
|
+
"preparation\n",
|
|
131
|
+
encoding="utf-8",
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
argv = [
|
|
135
|
+
"create-specs",
|
|
136
|
+
"My Feature",
|
|
137
|
+
"--with-preparation",
|
|
138
|
+
"--template-dir",
|
|
139
|
+
str(template_dir),
|
|
140
|
+
]
|
|
141
|
+
|
|
142
|
+
with patch.object(sys, "argv", argv):
|
|
143
|
+
with self.assertRaises(SystemExit) as context:
|
|
144
|
+
MODULE.main()
|
|
145
|
+
|
|
146
|
+
self.assertIn("--with-preparation requires --batch-name", str(context.exception))
|
|
113
147
|
|
|
114
148
|
def test_main_rejects_existing_files_without_force(self) -> None:
|
|
115
149
|
with tempfile.TemporaryDirectory() as temp_dir:
|
|
@@ -5,9 +5,10 @@ description: >-
|
|
|
5
5
|
each `docs/plans/.../<change_name>/` spec directory to a separate subagent that
|
|
6
6
|
uses `implement-specs-with-worktree`. Use when a user asks to implement a
|
|
7
7
|
multi-spec batch with subagents, parallel agents, delegated agents, or isolated
|
|
8
|
-
workers while
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
workers while completing any explicitly documented shared prerequisite work
|
|
9
|
+
before delegation, keeping at most four implementation subagents active at
|
|
10
|
+
once, staggering starts to avoid rate-limit bursts, preserving independent
|
|
11
|
+
subagent contexts, and using the user's requested model when specified.
|
|
11
12
|
---
|
|
12
13
|
|
|
13
14
|
# Implement Specs with Subagents
|
|
@@ -21,9 +22,9 @@ description: >-
|
|
|
21
22
|
|
|
22
23
|
## Standards
|
|
23
24
|
|
|
24
|
-
- Evidence: Read the batch-level `coordination.md` when present, enumerate the exact spec directories to implement,
|
|
25
|
-
- Execution:
|
|
26
|
-
- Quality: Preserve spec ownership boundaries, avoid duplicate delegation for the same spec, track branch/worktree/commit/test outcomes for every subagent, and pause new launches when a shared blocker, collision, or rate-limit pressure appears.
|
|
25
|
+
- Evidence: Read the batch-level `coordination.md` and `preparation.md` when present, enumerate the exact spec directories to implement, verify each delegated spec has the required planning files, and identify any explicit prerequisite notes before starting subagents.
|
|
26
|
+
- Execution: Complete and commit explicitly documented prerequisite preparation on the working branch before delegation, then assign exactly one implementation subagent per spec directory, keep no more than four implementation subagents active at the same time, start subagents one at a time rather than in a burst, give each subagent an independent task-local context, and instruct every subagent to use `implement-specs-with-worktree` for its assigned spec.
|
|
27
|
+
- Quality: Preserve spec ownership boundaries, avoid duplicate delegation for the same spec, ensure subagents branch from a baseline that includes prerequisite commits, track branch/worktree/commit/test outcomes for every subagent, and pause new launches when a shared blocker, collision, or rate-limit pressure appears.
|
|
27
28
|
- Output: Return a concise implementation ledger covering each spec, its subagent result, worktree branch, commit or blocker, verification run, and any integration follow-up needed.
|
|
28
29
|
|
|
29
30
|
## Goal
|
|
@@ -36,6 +37,7 @@ Coordinate a multi-spec implementation batch safely by delegating each approved
|
|
|
36
37
|
|
|
37
38
|
- Locate the requested batch under `docs/plans/{YYYY-MM-DD}/{batch_name}/`.
|
|
38
39
|
- Read `coordination.md` first when it exists.
|
|
40
|
+
- Read `preparation.md` when it exists.
|
|
39
41
|
- Enumerate only the spec directories that are in scope for this request.
|
|
40
42
|
- For each spec directory, verify the presence of:
|
|
41
43
|
- `spec.md`
|
|
@@ -45,6 +47,19 @@ Coordinate a multi-spec implementation batch safely by delegating each approved
|
|
|
45
47
|
- `design.md`
|
|
46
48
|
- Do not delegate archived, sibling, or approximate specs unless the user explicitly includes them.
|
|
47
49
|
- If `coordination.md` says the batch is not ready for parallel implementation, stop and report the blocking coordination item instead of spawning subagents.
|
|
50
|
+
- If `preparation.md` exists, or if the in-scope spec documents explicitly state that prerequisite work must be completed before parallel implementation, treat that preparation as blocking before subagent launch.
|
|
51
|
+
|
|
52
|
+
### 1.5) Complete documented prerequisite preparation
|
|
53
|
+
|
|
54
|
+
- Use this step only when `preparation.md` exists or the specs clearly annotate required pre-work.
|
|
55
|
+
- The coordinating agent owns the prerequisite work; do not delegate it to implementation subagents.
|
|
56
|
+
- Read the preparation tasks, expected outputs, and verification hooks before editing.
|
|
57
|
+
- Complete only the shared prerequisite scope that all specs must assume before parallel work starts.
|
|
58
|
+
- Run the verification commands or checks listed for the preparation.
|
|
59
|
+
- Commit the preparation to the working branch that future implementation worktrees or subagents will use as their base.
|
|
60
|
+
- Record the preparation commit in the ledger.
|
|
61
|
+
- Do not start implementation subagents until the preparation commit exists and the working branch is clean.
|
|
62
|
+
- If preparation cannot be completed or verified, stop and report the blocker instead of launching subagents.
|
|
48
63
|
|
|
49
64
|
### 2) Build a delegation plan
|
|
50
65
|
|
|
@@ -58,6 +73,7 @@ Coordinate a multi-spec implementation batch safely by delegating each approved
|
|
|
58
73
|
- commit
|
|
59
74
|
- tests
|
|
60
75
|
- blockers
|
|
76
|
+
- If preparation was completed, include the preparation commit that all subagents must treat as their base.
|
|
61
77
|
- Determine the model policy before launch:
|
|
62
78
|
- If the user specifies a model, use that model for the implementation subagents when the environment supports model selection.
|
|
63
79
|
- If the user does not specify a model, let subagents use the same model or default model policy as the coordinating agent.
|
|
@@ -79,6 +95,7 @@ For each subagent, provide only task-local instructions:
|
|
|
79
95
|
- Exact spec directory path.
|
|
80
96
|
- Parent `coordination.md` path when present.
|
|
81
97
|
- Requirement to use `implement-specs-with-worktree`.
|
|
98
|
+
- Requirement to base work on the committed prerequisite-preparation branch state when preparation was performed.
|
|
82
99
|
- Requirement to read the full spec bundle before editing.
|
|
83
100
|
- Requirement to implement inside its own isolated worktree.
|
|
84
101
|
- Requirement to run relevant tests.
|
|
@@ -107,11 +124,13 @@ Do not pass the coordinating agent's full reasoning, unrelated sibling specs, or
|
|
|
107
124
|
## Working Rules
|
|
108
125
|
|
|
109
126
|
- One spec directory maps to one implementation subagent.
|
|
127
|
+
- Explicitly documented prerequisite preparation is completed, verified, and committed by the coordinating agent before any implementation subagent starts.
|
|
110
128
|
- Maximum active implementation subagents: four.
|
|
111
129
|
- Subagents must be started gradually, not all at once.
|
|
112
130
|
- Every subagent must have independent context scoped to its assigned spec.
|
|
113
131
|
- Every implementation subagent must use `implement-specs-with-worktree`.
|
|
114
132
|
- The coordinating agent owns scheduling, ledger tracking, and conflict escalation; implementation subagents own their assigned worktree commits.
|
|
133
|
+
- The coordinating agent owns shared prerequisite commits; implementation subagents must not redo or overlap that preparation unless the preparation commit is missing or invalid.
|
|
115
134
|
- User-specified subagent model choices should be honored when supported; otherwise inherit the coordinating agent's model/default model policy.
|
|
116
135
|
- Do not use this skill for a single spec unless the user explicitly wants subagent delegation.
|
|
117
136
|
|
|
@@ -119,4 +138,5 @@ Do not pass the coordinating agent's full reasoning, unrelated sibling specs, or
|
|
|
119
138
|
|
|
120
139
|
- `implement-specs-with-worktree`: required per-spec worktree implementation workflow.
|
|
121
140
|
- `generate-spec`: clarification and planning repair workflow when a batch is not ready for parallel implementation.
|
|
141
|
+
- `preparation.md`: optional batch-level prerequisite plan that must be completed before parallel subagent work starts.
|
|
122
142
|
- `review-change-set`: optional post-implementation review workflow before merge or submission.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
interface:
|
|
2
2
|
display_name: "Implement Specs with Subagents"
|
|
3
3
|
short_description: "Coordinate parallel spec worktree implementations"
|
|
4
|
-
default_prompt: "Use $implement-specs-with-subagents to assign each approved docs/plans spec directory to one independent subagent that uses $implement-specs-with-worktree, launch at most four implementation subagents at once with staggered starts, honor any requested model when supported, track each branch, commit, test result, and blocker, and report the batch ledger without merging or pushing unless explicitly requested."
|
|
4
|
+
default_prompt: "Use $implement-specs-with-subagents to read coordination.md and any preparation.md first, complete and commit explicitly documented prerequisite preparation on the working branch before delegation, then assign each approved docs/plans spec directory to one independent subagent that uses $implement-specs-with-worktree, launch at most four implementation subagents at once with staggered starts, honor any requested model when supported, track each branch, commit, test result, and blocker, and report the batch ledger without merging or pushing unless explicitly requested."
|
|
@@ -3,9 +3,9 @@ name: implement-specs-with-worktree
|
|
|
3
3
|
description: >-
|
|
4
4
|
Read a specs planning set (spec.md, tasks.md, checklist.md, contract.md, design.md)
|
|
5
5
|
from `docs/plans/{YYYY-MM-DD}/{change_name}/` or `docs/plans/{YYYY-MM-DD}/{batch_name}/{change_name}/`
|
|
6
|
-
plus parent `coordination.md` when present, and implement
|
|
7
|
-
within an isolated git worktree, with every code, test, and
|
|
8
|
-
inside that worktree rather than the parent checkout. Use when the user asks
|
|
6
|
+
plus parent `coordination.md` and `preparation.md` when present, and implement
|
|
7
|
+
the approved tasks within an isolated git worktree, with every code, test, and
|
|
8
|
+
spec edit made inside that worktree rather than the parent checkout. Use when the user asks
|
|
9
9
|
to implement from an existing spec set, execute a spec plan, or work on a
|
|
10
10
|
feature branch without affecting the parent working tree. If not already in a
|
|
11
11
|
worktree, create a new worktree with a spec-named branch from the same parent
|
|
@@ -24,7 +24,7 @@ description: >-
|
|
|
24
24
|
|
|
25
25
|
## Standards
|
|
26
26
|
|
|
27
|
-
- Evidence: Read and understand the complete specs set before starting implementation, identify the authoritative parent branch that the worktree should inherit from, verify whether the requested scope is already implemented on that parent branch or current main working tree, and when the requested plan path is missing from the current worktree verify where the authoritative copy actually lives before substituting any nearby spec.
|
|
27
|
+
- Evidence: Read and understand the complete specs set before starting implementation, including parent `coordination.md` and `preparation.md` when present, identify the authoritative parent branch that the worktree should inherit from, verify whether the requested scope is already implemented on that parent branch or current main working tree, and when the requested plan path is missing from the current worktree verify where the authoritative copy actually lives before substituting any nearby spec.
|
|
28
28
|
- Execution: Create or use an isolated worktree for implementation only when the requested spec still needs work, sync the exact approved plan set into that worktree when it is missing there, create the worktree branch from the same parent branch as the worktree base, use the spec-set name as the canonical branch/worktree name, inspect sibling worktrees for the same batch before editing shared files when parallel implementations may already be active, prefer direct `git` ref checks over brittle shell inference when deciding whether a branch or worktree already exists, and commit to a local branch when done. Do not edit product files from the parent checkout; every implementation, test, and spec backfill change must happen inside the active worktree directory after verifying `git rev-parse --show-toplevel` and `pwd` point at the same worktree root.
|
|
29
29
|
- Quality: Complete all planned tasks, run relevant tests, backfill the spec documents with actual completion status, avoid dragging unrelated sibling specs into the worktree just because they share a batch directory, inspect overlapping runtime/config/shared touch points before diverging from another active sibling worktree in the same batch, revert unrelated formatter-only noise outside the spec-owned scope before committing, if branch/worktree creation reports ambiguous state re-check the actual git refs and worktree list before retrying, and when using targeted Rust `cargo test` selectors remember Cargo accepts only one positional test filter so each distinct selector needs its own confirmed command.
|
|
30
30
|
- Output: Keep the worktree branch clean with only the intended implementation commits.
|
|
@@ -45,14 +45,15 @@ Implement approved spec planning sets in an isolated git worktree, ensuring the
|
|
|
45
45
|
- prefer the exact matching plan directory from the repository's authoritative branch or main working tree over archived, approximate, or sibling plan directories
|
|
46
46
|
- if the plan lives under a batch directory, sync only the requested spec directory plus the shared `coordination.md` that governs it
|
|
47
47
|
- do not copy neighboring sibling spec directories into the worktree unless the user explicitly expanded scope
|
|
48
|
-
- When the plan sits under a batch directory, also read the sibling `coordination.md` before implementation.
|
|
48
|
+
- When the plan sits under a batch directory, also read the sibling `coordination.md` and `preparation.md` before implementation when those files exist.
|
|
49
49
|
- Read all five spec files:
|
|
50
50
|
- `spec.md` — requirements and BDD behaviors
|
|
51
51
|
- `tasks.md` — task breakdown
|
|
52
52
|
- `checklist.md` — behavior-to-test alignment and completion tracking
|
|
53
53
|
- `contract.md` — API/interface contracts
|
|
54
54
|
- `design.md` — design decisions and architecture notes
|
|
55
|
-
- If `coordination.md` exists in the parent batch directory, read it as the shared source of truth for ownership boundaries,
|
|
55
|
+
- If `coordination.md` exists in the parent batch directory, read it as the shared source of truth for ownership boundaries, replacement direction, merge order, and cross-spec integration checkpoints.
|
|
56
|
+
- If `preparation.md` exists in the parent batch directory, treat it as the already-completed prerequisite baseline for this spec; do not redo its tasks inside the member spec unless the preparation commit is missing or the document says the prerequisite remains blocked.
|
|
56
57
|
- Understand the scope, requirements, and planned tasks before proceeding.
|
|
57
58
|
|
|
58
59
|
### 2) Check current worktree state
|
|
@@ -106,6 +107,7 @@ Use branch naming from `references/branch-naming.md`.
|
|
|
106
107
|
- Explore the existing codebase relevant to the planned tasks.
|
|
107
108
|
- Verify latest authoritative docs for involved stacks/integrations.
|
|
108
109
|
- When `coordination.md` exists, respect its shared-field preparation, legacy-replacement direction, and allowed touch-point boundaries before editing.
|
|
110
|
+
- When `preparation.md` exists, implement against its prepared baseline assumptions and avoid duplicating preparation tasks in the member spec.
|
|
109
111
|
- Implement each task in `tasks.md` systematically.
|
|
110
112
|
- When `coordination.md` defines file ownership guardrails, additive-only shared-contract rules, or compatibility-shim retention requirements, treat them as blocking execution constraints rather than optional guidance.
|
|
111
113
|
- For each implemented change, add appropriate tests:
|
|
@@ -128,6 +130,7 @@ After implementation and testing:
|
|
|
128
130
|
- Mark completed tasks in `tasks.md`.
|
|
129
131
|
- Update `checklist.md` with test execution results, N/A reasons, and any scope adjustments.
|
|
130
132
|
- If the shared implementation direction changed, update the parent `coordination.md` as well before finishing.
|
|
133
|
+
- If preparation assumptions changed or were found missing, update `preparation.md` or stop for re-coordination instead of silently moving prerequisite work into the member spec.
|
|
131
134
|
- Do not mark unused template examples or non-applicable items as complete.
|
|
132
135
|
|
|
133
136
|
### 6) Commit changes
|
|
@@ -158,6 +161,7 @@ After implementation and testing:
|
|
|
158
161
|
- Complete all planned tasks before committing; do not stop with partial work.
|
|
159
162
|
- Treat the specs as the source of truth for scope — do not deviate without user approval.
|
|
160
163
|
- When `coordination.md` exists, treat it as the source of truth for batch-level ownership and cutover direction.
|
|
164
|
+
- When `preparation.md` exists, treat it as a prerequisite baseline owned outside the member spec; do not duplicate or alter its tasks unless explicitly requested.
|
|
161
165
|
- Never remove a shared shim, rename a shared field, or rewrite a shared file outside the ownership map unless `coordination.md` explicitly allows that change or the user approves a coordination update first.
|
|
162
166
|
- Revert formatter-only edits outside the owned spec scope before the final commit so the worktree stays reviewable and merge-safe.
|
|
163
167
|
- Follow the testing standards from `enhance-existing-features` and `develop-new-features`.
|
|
Binary file
|
|
@@ -5,21 +5,18 @@ description: >-
|
|
|
5
5
|
into the current local branch. When conflicts arise, auto-resolve them by
|
|
6
6
|
keeping correct functionality (preferring the more recent change on the same
|
|
7
7
|
line, or the change that preserves working behavior). After merge verification,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
pushes on that same local branch. Use when the user asks to consolidate local
|
|
14
|
-
branch work, merge named branches into the current branch, or prepare the
|
|
15
|
-
current branch for integration.
|
|
8
|
+
run `archive-specs` so completed plan sets are archived and durable project
|
|
9
|
+
docs are synchronized, then hand the current branch state to `commit-and-push`
|
|
10
|
+
so the final submit workflow commits and pushes on that same local branch.
|
|
11
|
+
Use when the user asks to consolidate local branch work, merge named branches
|
|
12
|
+
into the current branch, or prepare the current branch for integration.
|
|
16
13
|
---
|
|
17
14
|
|
|
18
15
|
# Merge Changes from Local Branches
|
|
19
16
|
|
|
20
17
|
## Dependencies
|
|
21
18
|
|
|
22
|
-
- Required: `
|
|
19
|
+
- Required: `archive-specs` to archive completed plan sets and synchronize durable project docs after merge verification, and `commit-and-push` for the final current-branch submission flow.
|
|
23
20
|
- Conditional: none.
|
|
24
21
|
- Optional: none.
|
|
25
22
|
- Fallback: If git operations fail, stop and report the error.
|
|
@@ -27,7 +24,7 @@ description: >-
|
|
|
27
24
|
## Standards
|
|
28
25
|
|
|
29
26
|
- Evidence: Inspect the original current branch, local branches, branch-name matches provided by the user or active spec names, actual conflicting files, and any active batch-spec `coordination.md` merge-order guidance before deciding what to merge.
|
|
30
|
-
- Execution: Merge only the relevant named branches back into the original current branch, read any active batch-spec `coordination.md` and honor its documented merge order when present, resolve conflicts by reading both sides and editing the merged result to preserve shipped behavior, verify the merged state,
|
|
27
|
+
- Execution: Merge only the relevant named branches back into the original current branch, read any active batch-spec `coordination.md` and honor its documented merge order when present, resolve conflicts by reading both sides and editing the merged result to preserve shipped behavior, verify the merged state, delete each successfully merged source branch and its detached worktree only after the merged result is confirmed, run `archive-specs` after merge verification so completed plan sets are archived and durable docs are synchronized, then hand the final current-branch state to `commit-and-push` so changelog/readiness/commit/push work happens through the shared submission workflow on the same branch.
|
|
31
28
|
- Quality: Never use blanket timestamp rules or default `-X ours/theirs` conflict resolution as the primary merge strategy, never infer in-scope branches from ancestry heuristics when branch names already define the target set, and do not declare success until the final current-branch state has been checked, verified, and cleared for post-merge archival/doc-sync work.
|
|
32
29
|
- Output: Produce a clean current branch with all relevant named-branch changes integrated and ready for the shared submit workflow.
|
|
33
30
|
|
|
@@ -118,16 +115,9 @@ For each in-scope named branch:
|
|
|
118
115
|
```
|
|
119
116
|
- If verification fails, fix the merged state on the current branch before proceeding.
|
|
120
117
|
|
|
121
|
-
### 4.5) Review the merged change set before submission
|
|
122
|
-
|
|
123
|
-
- After merge verification passes, invoke `review-change-set` on the merged current branch.
|
|
124
|
-
- Compare the merged code against the active spec documents and any relevant `docs/plans/` artifacts that governed the merge.
|
|
125
|
-
- Do not proceed to archival or submission until the review returns no actionable findings and the merged state is confirmed to match the spec documents.
|
|
126
|
-
- If review finds a problem or spec mismatch, fix the current branch, rerun verification, and review again before continuing.
|
|
127
|
-
|
|
128
118
|
### 5) Archive completed specs and sync durable project docs
|
|
129
119
|
|
|
130
|
-
- After all in-scope merges succeed
|
|
120
|
+
- After all in-scope merges succeed and the current-branch state has been verified, invoke `archive-specs`.
|
|
131
121
|
- Let `archive-specs` convert and archive any completed `docs/plans/...` spec sets that now reflect the delivered outcome.
|
|
132
122
|
- Let `archive-specs` synchronize durable project docs and `AGENTS.md` when the merged result changed operator workflows, repository guidance, or user-visible behavior.
|
|
133
123
|
- Do not proceed to the final submission commit while required archival or documentation updates remain unfinished.
|
|
@@ -150,7 +140,7 @@ For each in-scope named branch:
|
|
|
150
140
|
- the currently checked-out branch
|
|
151
141
|
- branches that were skipped, failed to merge, or still need manual follow-up
|
|
152
142
|
- If `git branch -d` refuses deletion because the branch is not actually merged, stop and report the branch instead of forcing deletion with `-D`.
|
|
153
|
-
- Once merge verification
|
|
143
|
+
- Once merge verification and archival/doc synchronization pass, invoke `commit-and-push` for the original current branch so the final submission flow owns:
|
|
154
144
|
- `CHANGELOG.md` readiness
|
|
155
145
|
- the final commit creation on the original current branch
|
|
156
146
|
- the user-requested push on that same branch
|
|
Binary file
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 LaiTszKin
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# review-spec-related-changes
|
|
2
|
+
|
|
3
|
+
`review-spec-related-changes` reviews implementation changes against recent or user-specified planning documents.
|
|
4
|
+
|
|
5
|
+
## What this skill does
|
|
6
|
+
|
|
7
|
+
This skill:
|
|
8
|
+
|
|
9
|
+
1. Resolves the governing `docs/plans/...` spec scope from user input or recent repository changes.
|
|
10
|
+
2. Checks whether each business goal and acceptance criterion is actually implemented.
|
|
11
|
+
3. Treats unmet business goals as the most severe review findings.
|
|
12
|
+
4. Runs secondary code-practice review through `review-change-set`, `discover-edge-cases`, and `harden-app-security` for code-affecting scopes.
|
|
13
|
+
5. Reports business-goal gaps separately from edge-case, security, and maintainability findings.
|
|
14
|
+
|
|
15
|
+
## When to use
|
|
16
|
+
|
|
17
|
+
Use this skill when the task asks you to:
|
|
18
|
+
|
|
19
|
+
- review whether recent spec-backed implementation work is complete,
|
|
20
|
+
- compare current changes against a named spec directory,
|
|
21
|
+
- check whether delivered code satisfies `spec.md`, `tasks.md`, `checklist.md`, `contract.md`, or `design.md`,
|
|
22
|
+
- perform a final spec-compliance review before archive, submission, PR, or release work.
|
|
23
|
+
|
|
24
|
+
## Core principles
|
|
25
|
+
|
|
26
|
+
- Business-goal completion is reviewed first.
|
|
27
|
+
- Missing required behavior is more severe than ordinary code-practice issues.
|
|
28
|
+
- Secondary edge-case, security, and code-review findings remain clearly separated.
|
|
29
|
+
- Findings must cite concrete spec and code evidence.
|
|
30
|
+
|
|
31
|
+
## Example
|
|
32
|
+
|
|
33
|
+
Prompt example:
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
Use $review-spec-related-changes to review the changes related to docs/plans/2026-04-28/order-routing.
|
|
37
|
+
List any business goals that were not fully achieved, then run edge-case, security, and code-review checks on the related code.
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Expected behavior:
|
|
41
|
+
|
|
42
|
+
- the named spec set is read before judging the code,
|
|
43
|
+
- business-goal gaps are listed first and treated as highest severity,
|
|
44
|
+
- secondary review skills are invoked for the same implementation scope,
|
|
45
|
+
- the final report separates spec-compliance findings from edge-case, security, and code-review findings.
|
|
46
|
+
|
|
47
|
+
## References
|
|
48
|
+
|
|
49
|
+
- [`SKILL.md`](./SKILL.md) - full workflow and execution rules.
|
|
50
|
+
|
|
51
|
+
## License
|
|
52
|
+
|
|
53
|
+
MIT
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review-spec-related-changes
|
|
3
|
+
description: Review recent or user-specified spec-related changes against the governing `docs/plans/...` spec documents, treat unmet business goals as the most severe findings, and then run code-practice cross-checks through `review-change-set`, `discover-edge-cases`, and `harden-app-security`. Use when users ask whether implemented work actually satisfies a spec, wants a spec compliance review, or asks to review changes related to recent or named planning documents.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Review Spec Related Changes
|
|
7
|
+
|
|
8
|
+
## Dependencies
|
|
9
|
+
|
|
10
|
+
- Required: `review-change-set`, `discover-edge-cases`, and `harden-app-security` for code-affecting spec-related changes.
|
|
11
|
+
- Conditional: none.
|
|
12
|
+
- Optional: none.
|
|
13
|
+
- Fallback: If any required review dependency is unavailable for a code-affecting scope, stop and report the missing dependency instead of returning a partial pass.
|
|
14
|
+
|
|
15
|
+
## Standards
|
|
16
|
+
|
|
17
|
+
- Evidence: Read the governing spec documents, the related git changes, and the minimum implementation context before deciding whether the business goal was met.
|
|
18
|
+
- Execution: Resolve the spec scope first, review business-goal completion before any secondary code-practice review, then run the required review skills on the same implementation scope.
|
|
19
|
+
- Quality: Treat unmet or partially met business goals as the highest-severity findings, keep secondary edge-case/security/code-review findings outside the business-goal verdict, and avoid speculative issues that are not backed by code or spec evidence.
|
|
20
|
+
- Output: Return a prioritized issue list with business-goal gaps first, followed by edge-case, security, and code-review findings, each tied to specific spec and code evidence.
|
|
21
|
+
|
|
22
|
+
## Goal
|
|
23
|
+
|
|
24
|
+
Determine whether the implementation actually satisfies the relevant planning documents, then separately assess whether the related code is safe, robust, and maintainable.
|
|
25
|
+
|
|
26
|
+
## Scope Resolution
|
|
27
|
+
|
|
28
|
+
### User-specified spec documents
|
|
29
|
+
|
|
30
|
+
- If the user names a spec directory or file, read every governing document in that spec set, including `spec.md`, `tasks.md`, `checklist.md`, `contract.md`, `design.md`, and batch-level `coordination.md` when present.
|
|
31
|
+
- Treat the named spec documents as the authoritative business goal unless the repository contains a newer superseding plan that the user explicitly referenced.
|
|
32
|
+
- Map the spec to implementation changes using task entries, owned files, git diff paths, branch names, commit messages, and code references from the spec.
|
|
33
|
+
|
|
34
|
+
### Recent spec-related changes
|
|
35
|
+
|
|
36
|
+
- If the user asks for recent spec-related review without naming a spec, inspect the current git state first:
|
|
37
|
+
```bash
|
|
38
|
+
git status -sb
|
|
39
|
+
git diff --name-only
|
|
40
|
+
git diff --cached --name-only
|
|
41
|
+
```
|
|
42
|
+
- Look for changed or recently touched planning documents under `docs/plans/`, `docs/archive/plans/`, or the repository's documented planning location.
|
|
43
|
+
- If no planning document changed, inspect recent commits and active plan directories to identify the most recent spec set that plausibly governs the current implementation.
|
|
44
|
+
- If multiple candidate spec sets remain plausible and cannot be separated by changed files or branch names, stop and report the ambiguity instead of guessing.
|
|
45
|
+
|
|
46
|
+
## Workflow
|
|
47
|
+
|
|
48
|
+
### 1) Build the spec baseline
|
|
49
|
+
|
|
50
|
+
- Read the governing spec documents end-to-end.
|
|
51
|
+
- Extract the concrete business goals, acceptance criteria, non-goals, deferred work, and explicit verification requirements.
|
|
52
|
+
- Build a compact checklist of claims that can be proven or disproven from code, tests, docs, or command output.
|
|
53
|
+
- Keep business goals separate from implementation-quality expectations. A clean implementation does not compensate for an unmet business requirement.
|
|
54
|
+
|
|
55
|
+
### 2) Map implementation evidence
|
|
56
|
+
|
|
57
|
+
- Read the related diff, staged changes, commits, or changed files that correspond to the spec scope.
|
|
58
|
+
- Follow the minimum dependency chain needed to understand whether the behavior is actually implemented.
|
|
59
|
+
- Run or inspect the verification commands named by the spec when they are available and safe to run.
|
|
60
|
+
- Mark each business goal as:
|
|
61
|
+
- `Met`: direct implementation and verification evidence exists.
|
|
62
|
+
- `Partially met`: some required behavior exists, but an acceptance criterion, integration path, or verification proof is missing.
|
|
63
|
+
- `Not met`: implementation evidence is absent or contradicts the spec.
|
|
64
|
+
- `Deferred/N/A`: the spec explicitly excludes or defers the item.
|
|
65
|
+
|
|
66
|
+
### 3) Review business-goal completion first
|
|
67
|
+
|
|
68
|
+
- Report every `Not met` and `Partially met` business goal before secondary review findings.
|
|
69
|
+
- Assign the highest severity to business-goal failures because they mean the delivered change does not satisfy the requested work.
|
|
70
|
+
- Include exact spec evidence and code evidence for each gap.
|
|
71
|
+
- Do not continue into archival, submission, or release recommendations while business-goal failures remain unresolved.
|
|
72
|
+
|
|
73
|
+
### 4) Run secondary code-practice reviews
|
|
74
|
+
|
|
75
|
+
After the business-goal pass is complete, invoke the required review skills on the same code-affecting scope:
|
|
76
|
+
|
|
77
|
+
- Use `review-change-set` to identify architecture, abstraction, and simplification findings in the related diff.
|
|
78
|
+
- Use `discover-edge-cases` to identify reproducible boundary, failure-path, state, and observability risks.
|
|
79
|
+
- Use `harden-app-security` to identify reproducible vulnerabilities and adversarial trust-boundary failures.
|
|
80
|
+
|
|
81
|
+
Keep these findings separate from the business-goal verdict unless the issue also prevents a required acceptance criterion from being satisfied.
|
|
82
|
+
|
|
83
|
+
### 5) Produce the final review
|
|
84
|
+
|
|
85
|
+
Return findings in this order:
|
|
86
|
+
|
|
87
|
+
1. Business-goal failures
|
|
88
|
+
- Severity: always highest for unmet or partially met required goals.
|
|
89
|
+
- Include spec evidence, implementation evidence, and the missing acceptance criterion.
|
|
90
|
+
2. Edge-case findings
|
|
91
|
+
- Include reproduction or concrete trigger evidence.
|
|
92
|
+
3. Security findings
|
|
93
|
+
- Include exploit path, protected asset, and reproducibility evidence.
|
|
94
|
+
4. Code-review findings
|
|
95
|
+
- Include architecture, abstraction, simplification, or maintainability evidence.
|
|
96
|
+
5. Passing evidence
|
|
97
|
+
- Summarize the business goals that were confirmed met.
|
|
98
|
+
6. Residual uncertainty
|
|
99
|
+
- List unverified checks, commands not run, ambiguous spec mappings, or external dependencies that could not be proven.
|
|
100
|
+
|
|
101
|
+
If no actionable issue is found, state that no business-goal, edge-case, security, or code-review findings were identified, and still list the spec documents and verification evidence reviewed.
|
|
102
|
+
|
|
103
|
+
## Working Rules
|
|
104
|
+
|
|
105
|
+
- Do not edit code, tests, or specs during this review.
|
|
106
|
+
- Do not archive specs, commit, push, tag, or release from this skill.
|
|
107
|
+
- Do not let secondary code quality findings bury business-goal failures.
|
|
108
|
+
- Do not treat checked tasks as proof by themselves; verify the implementation.
|
|
109
|
+
- Do not infer success from author intent, branch names, or prior conversation context unless the repository evidence supports it.
|
|
110
|
+
- Prefer fewer confirmed findings over broad speculative feedback.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Review Spec Related Changes"
|
|
3
|
+
short_description: "Review spec-backed changes for business-goal completion and secondary code-practice risks"
|
|
4
|
+
default_prompt: "Use $review-spec-related-changes to resolve the recent or user-specified spec documents, verify each business goal and acceptance criterion against the related implementation evidence, treat unmet business goals as the most severe findings, and then run $review-change-set, $discover-edge-cases, and $harden-app-security on the same code-affecting scope for secondary code-practice review."
|