@laitszkin/apollo-toolkit 3.6.2 → 3.6.4

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 CHANGED
@@ -7,6 +7,16 @@ All notable changes to this repository are documented in this file.
7
7
  ### Added
8
8
  - (None yet)
9
9
 
10
+ ## [v3.6.4] - 2026-04-29
11
+
12
+ ### Changed
13
+ - Simplify `generate-spec` tasks.md template with compact per-item format (inline file/change/outcome + Verify field), and strengthen SKILL.md §4 to require exact file path, modification, and verification step for every task item
14
+
15
+ ## [v3.6.3] - 2026-04-28
16
+
17
+ ### Changed
18
+ - Extend `implement-specs-with-subagents` with multi-phase execution: analyse spec dependencies from `coordination.md`, build phased delegation plans via topological sort, execute phases sequentially with parallel subagents per phase, and merge completed spec branches back via `merge-changes-from-local-branches` between phases.
19
+
10
20
  ## [v3.6.2] - 2026-04-28
11
21
 
12
22
  ### Changed
@@ -86,16 +86,19 @@ Own the shared planning-doc lifecycle for feature work so other skills can reuse
86
86
 
87
87
  ### 4) Fill `tasks.md`
88
88
 
89
- - Use `## **Task N: [Task Title]**` for each main task.
90
- - Describe each task's purpose and the related requirement IDs.
89
+ - Use `## **Task N: [Task Title]**` for each main task with `Purpose`, `Requirements`, `Scope`, and `Out of scope` guardrails.
91
90
  - Use `- N. [ ]` for atomic task items; use `- N.x [ ]` only when a task must be split into additional atomic subtasks.
92
91
  - Treat `tasks.md` as an implementation queue, not a high-level summary.
93
- - Make each checkbox atomic: one verb, one responsibility, one concrete output, and one verification hook.
94
- - For every task, include allowed scope, out-of-scope guardrails, requirement/design/contract inputs, expected output, completion condition, and verification hook.
92
+ - **Every checkbox must specify three things: (a) the exact file path or function, (b) the specific modification to make, and (c) a concrete verification step.** These three are mandatory — no item may omit any of them.
93
+ - Per-item format (compact template):
94
+ - `[file/function]` — `[specific modification; expected outcome]`
95
+ - `- Verify:` — focused command, test reference, or manual inspection
96
+ - Do not add extra sub-fields beyond what the template provides; put all change detail in the inline description.
97
+ - Make each checkbox atomic: one verb, one file/function, one change outcome, and one verification hook.
95
98
  - If one task needs more than three files, more than one behavior slice, or an implementation decision not already captured in `design.md` or `contract.md`, split it before approval.
96
99
  - Use `$test-case-strategy` to define test IDs and unit drift checks for non-trivial local logic before implementation starts.
97
100
  - Include explicit tasks for testing, mocks/fakes, regression coverage, and adversarial or edge-case hardening when relevant.
98
- - Do not write vague tasks such as `Implement integration`, `Add tests`, or `Update docs`; replace them with task-local outputs, test IDs, and verification commands.
101
+ - Vague items such as `Implement integration`, `Add tests`, or `Update docs` are forbidden; replace them with specific file paths, concrete changes, and executable verification commands.
99
102
 
100
103
  ### 5) Fill `contract.md`
101
104
 
@@ -7,59 +7,36 @@
7
7
 
8
8
  Purpose: [one sentence describing the narrow outcome]
9
9
  Requirements: [R1.x]
10
- Allowed scope: [files/modules/functions this task may touch]
10
+ Scope: [files/modules/functions this task may touch]
11
11
  Out of scope: [files/modules/behaviors this task must not change]
12
12
 
13
- - 1. [ ] [Main task item]
14
- - Input: [requirement/design/contract evidence]
15
- - Touches: [specific file/function/module]
16
- - Output: [specific code/doc/test artifact]
17
- - Done when: [observable completion condition]
18
- - Verify with: [focused command/check/manual inspection]
19
- - Unit drift check: [UT-xx target unit; expected result/assertion, or N/A with reason]
20
- - Do not: [explicit implementation-drift guardrail]
13
+ - 1. [ ] **[file/function]** **[specific modification to make; expected outcome]**
14
+ - Verify: [focused command/check/manual inspection; drift check ref if applicable]
15
+
16
+ - 2. [ ] **[file/function]** — **[specific modification to make; expected outcome]**
17
+ - Verify: [focused command/check/manual inspection; drift check ref if applicable]
21
18
 
22
19
  ## **Task 2: [Task Title]**
23
20
 
24
21
  Purpose: [one sentence describing the narrow outcome]
25
22
  Requirements: [R2.x]
26
- Allowed scope: [files/modules/functions this task may touch]
23
+ Scope: [files/modules/functions this task may touch]
27
24
  Out of scope: [files/modules/behaviors this task must not change]
28
25
 
29
- - 2. [ ] [Main task item]
30
- - Input: [requirement/design/contract evidence]
31
- - Touches: [specific file/function/module]
32
- - Output: [specific code/doc/test artifact]
33
- - Done when: [observable completion condition]
34
- - Verify with: [focused command/check/manual inspection]
35
- - Unit drift check: [UT-xx target unit; expected result/assertion, or N/A with reason]
36
- - Do not: [explicit implementation-drift guardrail]
37
-
38
- ## **Task 3: [Task Title]**
39
-
40
- Purpose: [one sentence describing the narrow outcome]
41
- Requirements: [R3.x]
42
- Allowed scope: [files/modules/functions this task may touch]
43
- Out of scope: [files/modules/behaviors this task must not change]
26
+ - 1. [ ] **[file/function]** **[specific modification to make; expected outcome]**
27
+ - Verify: [focused command/check/manual inspection; drift check ref if applicable]
44
28
 
45
- - 3. [ ] [Main task item]
46
- - Input: [requirement/design/contract evidence]
47
- - Touches: [specific file/function/module]
48
- - Output: [specific code/doc/test artifact]
49
- - Done when: [observable completion condition]
50
- - Verify with: [focused command/check/manual inspection]
51
- - Unit drift check: [UT-xx target unit; expected result/assertion, or N/A with reason]
52
- - Do not: [explicit implementation-drift guardrail]
29
+ - 2. [ ] **[file/function]** **[specific modification to make; expected outcome]**
30
+ - Verify: [focused command/check/manual inspection; drift check ref if applicable]
53
31
 
54
32
  ## Notes
55
- - Task order should reflect actual implementation sequence.
56
- - Every main task must map back to `spec.md` requirement IDs.
57
- - Treat `tasks.md` as an implementation queue, not a high-level work summary.
58
- - Each checkbox must be atomic: one verb, one responsibility, one concrete output, and one verification hook.
59
- - Split any task that needs more than three files, more than one behavior slice, or a design decision not already captured in `design.md` or `contract.md`.
60
- - Use `$test-case-strategy` to define test IDs and unit drift checks before implementation.
61
- - Include explicit tasks for required test coverage (unit, regression, property-based, integration/E2E as applicable), mock scenario setup, and adversarial/edge-case hardening.
62
- - Do not write vague tasks such as `Implement integration`, `Add tests`, or `Update docs`; replace them with task-local outputs, test IDs, and verification commands.
63
- - For batch specs, tasks must never include "wait for Spec X to land first" as a prerequisite; if such a dependency appears, re-slice the plan or move the coordination rule into `coordination.md`.
64
- - After execution, the agent must update each checkbox (`[x]` for done, `[ ]` for not done).
65
- - Remove all placeholder guidance text in square brackets after filling.
33
+ - Task order reflects implementation sequence.
34
+ - Every task must map back to `spec.md` requirement IDs.
35
+ - Treat `tasks.md` as an implementation queue, not a summary.
36
+ - Each item must include the exact file path (or function/module), the specific change, and a concrete verification step — vague items are forbidden.
37
+ - Each checkbox is atomic: one verb, one file/function, one change outcome, one verification hook.
38
+ - Use `N.x [ ]` for sub-items only when a parent item needs further breakdown.
39
+ - Split tasks that exceed 3 files or span multiple behavior slices.
40
+ - Use `$test-case-strategy` for drift checks before implementation.
41
+ - After execution, update `[x]` for done, `[ ]` for pending.
42
+ - Remove all `[...]` placeholder text after filling.
@@ -3,33 +3,38 @@ name: implement-specs-with-subagents
3
3
  description: >-
4
4
  Coordinate parallel implementation of multiple approved spec sets by assigning
5
5
  each `docs/plans/.../<change_name>/` spec directory to a separate subagent that
6
- uses `implement-specs-with-worktree`. Use when a user asks to implement a
7
- multi-spec batch with subagents, parallel agents, delegated agents, or isolated
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.
6
+ uses `implement-specs-with-worktree`. Supports multi-phase execution for
7
+ interdependent specs: analyse dependencies, implement base specs first, merge
8
+ back via `merge-changes-from-local-branches`, then implement dependent specs,
9
+ and finally submit with commit, push, and patch version bump. Use when a user
10
+ asks to implement a multi-spec batch with subagents, parallel agents, delegated
11
+ agents, or isolated workers while completing any explicitly documented shared
12
+ prerequisite work before delegation, keeping at most four implementation
13
+ subagents active at once, staggering starts to avoid rate-limit bursts,
14
+ preserving independent subagent contexts, and using the user's requested model
15
+ when specified.
12
16
  ---
13
17
 
14
- # Implement Specs with Subagents
18
+ # Implement Specs with Subagents (Multi-Phase)
15
19
 
16
20
  ## Dependencies
17
21
 
18
22
  - Required: `implement-specs-with-worktree` for each delegated spec implementation.
23
+ - Required: `merge-changes-from-local-branches` for merging worktree branches back between phases.
19
24
  - Conditional: `generate-spec` if the batch needs clarification before implementation; `review-change-set` if the user asks for an integration review after subagents finish.
20
25
  - Optional: none.
21
26
  - Fallback: If the environment cannot start independent subagents, report that limitation and fall back only if the user explicitly approves serial `implement-specs-with-worktree` execution.
22
27
 
23
28
  ## Standards
24
29
 
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.
30
+ - 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 or dependency notes before starting subagents.
31
+ - Execution: Complete and commit explicitly documented prerequisite preparation on the working branch before delegation. Analyse spec dependencies from `coordination.md` and spec docs to build a multi-phase plan. For each phase, 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. After each phase completes, use `merge-changes-from-local-branches` to merge all phase branches back before launching the next phase.
27
32
  - 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.
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.
33
+ - Output: Return a concise implementation ledger covering each spec, its subagent result, worktree branch, commit or blocker, verification run, and the merge outcome.
29
34
 
30
35
  ## Goal
31
36
 
32
- Coordinate a multi-spec implementation batch safely by delegating each approved spec set to an isolated subagent-backed worktree implementation.
37
+ Coordinate a multi-spec implementation batch safely by delegating each approved spec set to an isolated subagent-backed worktree implementation, handling interdependent specs through phased execution.
33
38
 
34
39
  ## Workflow
35
40
 
@@ -61,15 +66,37 @@ Coordinate a multi-spec implementation batch safely by delegating each approved
61
66
  - Do not start implementation subagents until the preparation commit exists and the working branch is clean.
62
67
  - If preparation cannot be completed or verified, stop and report the blocker instead of launching subagents.
63
68
 
64
- ### 2) Build a delegation plan
69
+ ### 2) Analyse spec dependencies
65
70
 
66
- - Create one queue item per spec directory.
71
+ - Read each in-scope spec's `spec.md` and `design.md` to identify explicit references to other in-scope specs.
72
+ - Read `coordination.md` for any documented dependency ordering between specs (e.g. "spec A must be implemented before spec B").
73
+ - For each spec dependency found, determine which specs are **base specs** (depended upon by others) and which are **dependent specs** (depend on base specs).
74
+ - If a spec both depends on others and is depended upon, it belongs to its own middle phase.
75
+ - If no dependencies exist between any specs, all specs can run in a single parallel phase.
76
+ - Build a dependency graph and record it in the ledger:
77
+ - spec path
78
+ - phase number (starting from 1)
79
+ - depends-on (list of spec paths)
80
+ - depended-by (list of spec paths)
81
+ - If the dependency graph contains a cycle, stop and report the cycle instead of proceeding.
82
+
83
+ ### 3) Build a multi-phase delegation plan
84
+
85
+ - Group specs into ordered phases based on the dependency graph (topological sort order):
86
+ - **Phase 1**: Base specs with no in-batch dependencies (depended upon by others).
87
+ - **Phase N**: Specs whose dependencies are all satisfied by earlier phases.
88
+ - **Final Phase**: Specs with no dependents (leaf specs).
89
+ - Each phase must have all its dependencies satisfied by earlier phases before it can start.
90
+ - Within each phase, specs are independent and can run in parallel.
91
+ - Create one queue item per spec directory per phase.
67
92
  - Assign one subagent to one spec only; never ask one subagent to implement multiple spec directories.
68
93
  - Keep a visible ledger with:
69
94
  - spec path
95
+ - phase number
96
+ - depends-on
70
97
  - intended branch/worktree name if known
71
98
  - assigned subagent
72
- - status
99
+ - status (pending / in-progress / merged / blocked)
73
100
  - commit
74
101
  - tests
75
102
  - blockers
@@ -79,7 +106,11 @@ Coordinate a multi-spec implementation batch safely by delegating each approved
79
106
  - If the user does not specify a model, let subagents use the same model or default model policy as the coordinating agent.
80
107
  - If the environment does not expose model selection, state that the requested model cannot be enforced and continue only when the platform's default subagent model is acceptable.
81
108
 
82
- ### 3) Launch subagents gradually
109
+ ### 4) Execute phases sequentially
110
+
111
+ For each phase in order (Phase 1, Phase 2, ... Final Phase):
112
+
113
+ #### 4.1) Launch subagents for this phase
83
114
 
84
115
  - Maintain a maximum of four active implementation subagents at any time.
85
116
  - Start subagents independently and one at a time.
@@ -87,7 +118,7 @@ Coordinate a multi-spec implementation batch safely by delegating each approved
87
118
  - If a start fails due to throttling, rate limits, capacity, or platform pressure, wait before retrying and do not start additional subagents during the cooldown.
88
119
  - Prefer steady scheduling over maximum burst parallelism; four is the ceiling, not a target that must always be filled.
89
120
 
90
- ### 4) Give each subagent independent context
121
+ #### 4.2) Give each subagent independent context
91
122
 
92
123
  For each subagent, provide only task-local instructions:
93
124
 
@@ -105,31 +136,40 @@ For each subagent, provide only task-local instructions:
105
136
 
106
137
  Do not pass the coordinating agent's full reasoning, unrelated sibling specs, or other subagents' private work unless a concrete coordination conflict requires it.
107
138
 
108
- ### 5) Monitor and coordinate
139
+ #### 4.3) Monitor and coordinate
109
140
 
110
141
  - While subagents run, track completions and blockers in the ledger.
111
142
  - When one subagent finishes, record its branch, worktree path, commit, verification results, and changed ownership boundaries.
112
- - Start the next queued spec only when the active count drops below four and no shared blocker is unresolved.
143
+ - Start the next queued spec for this phase only when the active count drops below four and no shared blocker is unresolved.
113
144
  - If two subagents report overlapping edits to a shared file or contract, pause new launches, inspect the conflict against `coordination.md`, and resolve the ownership question before continuing.
114
- - If a subagent fails for a spec-local issue, keep other independent subagents running, but do not launch additional work that depends on the failed scope.
145
+ - If a subagent fails for a spec-local issue, keep other independent subagents in the same phase running, but do not launch additional work that depends on the failed scope.
115
146
  - If failures indicate a batch-wide planning defect, stop scheduling new subagents and report the defect.
147
+ - If all specs in the current phase are completed (or blocked), proceed to the merge step.
116
148
 
117
- ### 6) Finish the batch report
149
+ #### 4.4) Merge phase branches back
118
150
 
119
- - Do not merge branches, archive specs, push, or release unless the user explicitly requests that follow-up.
120
- - Summarize every spec outcome from the ledger.
121
- - Distinguish completed local commits from blocked or partial specs.
122
- - Report any integration review, merge order, or post-merge validation required by `coordination.md`.
151
+ - After all subagents in the current phase complete, use `merge-changes-from-local-branches` to merge each completed spec's worktree branch back into the current working branch.
152
+ - For each successful spec in the phase:
153
+ - Identify the branch name from the ledger.
154
+ - Merge the branch using `merge-changes-from-local-branches`.
155
+ - Resolve any merge conflicts that arise, prioritising correctness from the spec contracts.
156
+ - Verify the working branch is clean and tests still pass after merging.
157
+ - Record the merge outcome in the ledger (success / conflicts / blockers).
158
+ - If a merge fails and cannot be resolved, stop and report the merge blocker before proceeding to the next phase.
159
+ - Once merged, the current working branch now includes all changes from this phase, making them available as a baseline for dependent specs in later phases.
123
160
 
124
161
  ## Working Rules
125
162
 
126
163
  - One spec directory maps to one implementation subagent.
127
164
  - Explicitly documented prerequisite preparation is completed, verified, and committed by the coordinating agent before any implementation subagent starts.
128
- - Maximum active implementation subagents: four.
165
+ - Spec dependencies are analysed before delegation to determine phase ordering.
166
+ - Phases execute sequentially; within a phase, specs are independent and run in parallel.
167
+ - Maximum active implementation subagents per phase: four.
129
168
  - Subagents must be started gradually, not all at once.
130
169
  - Every subagent must have independent context scoped to its assigned spec.
131
170
  - Every implementation subagent must use `implement-specs-with-worktree`.
132
- - The coordinating agent owns scheduling, ledger tracking, and conflict escalation; implementation subagents own their assigned worktree commits.
171
+ - After each phase, `merge-changes-from-local-branches` merges all completed spec branches back into the working branch.
172
+ - The coordinating agent owns scheduling, ledger tracking, dependency analysis, inter-phase merging, and conflict escalation; implementation subagents own their assigned worktree commits.
133
173
  - The coordinating agent owns shared prerequisite commits; implementation subagents must not redo or overlap that preparation unless the preparation commit is missing or invalid.
134
174
  - User-specified subagent model choices should be honored when supported; otherwise inherit the coordinating agent's model/default model policy.
135
175
  - Do not use this skill for a single spec unless the user explicitly wants subagent delegation.
@@ -137,6 +177,8 @@ Do not pass the coordinating agent's full reasoning, unrelated sibling specs, or
137
177
  ## References
138
178
 
139
179
  - `implement-specs-with-worktree`: required per-spec worktree implementation workflow.
180
+ - `merge-changes-from-local-branches`: required for merging worktree branches back between phases.
140
181
  - `generate-spec`: clarification and planning repair workflow when a batch is not ready for parallel implementation.
141
182
  - `preparation.md`: optional batch-level prerequisite plan that must be completed before parallel subagent work starts.
142
- - `review-change-set`: optional post-implementation review workflow before merge or submission.
183
+ - `coordination.md`: batch-level coordination plan that may contain dependency ordering information.
184
+ - `review-change-set`: optional post-implementation review workflow before final 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 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."
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, analyse spec dependencies to build a multi-phase plan, for each phase 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, after each phase use $merge-changes-from-local-branches to merge completed spec branches back into the working branch before launching the next phase, honor any requested model when supported, and track each branch, commit, test result, and blocker."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@laitszkin/apollo-toolkit",
3
- "version": "3.6.2",
3
+ "version": "3.6.4",
4
4
  "description": "Apollo Toolkit npm installer for managed skill copying across Codex, OpenClaw, and Trae.",
5
5
  "license": "MIT",
6
6
  "author": "LaiTszKin",