@laitszkin/apollo-toolkit 3.9.5 → 3.9.6

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
@@ -2,6 +2,23 @@
2
2
 
3
3
  All notable changes to this repository are documented in this file.
4
4
 
5
+ ## [Unreleased]
6
+
7
+ ### Added
8
+
9
+ ### Changed
10
+
11
+ ### Fixed
12
+
13
+ ## [v3.9.6] - 2026-05-09
14
+
15
+ ### Changed
16
+
17
+ - `generate-spec`: refocus `design.md`/`contract.md` templates as coarse `INT-###`/`EXT-###` guiding context above `tasks.md` (avoid mirroring runnable checklist rows); tighten SKILL/README/agent prompt layering; clarify `tasks.md` notes accordingly.
18
+ - `implement-specs`: treat `tasks.md` as the authoritative runnable queue; read `design`/`contract` as constraints/anchors; align execution standards copy.
19
+ - `implement-specs-with-subagents`: remove fixed four-subagent ceiling and stagger-only pacing language; generalize parallel phase examples and agent prompt.
20
+ - Root `README.md`: simplify `implement-specs-with-subagents` compatibility blurb.
21
+
5
22
  ## [v3.7.0] - 2026-04-29
6
23
 
7
24
  ### Added
@@ -29,11 +46,6 @@ All notable changes to this repository are documented in this file.
29
46
  - Simplify `maintain-project-constraints` to produce `AGENTS.md`/`CLAUDE.md` with exactly three sections: Common Development Commands, Project Business Goals, and Project Documentation Index
30
47
  - Update `archive-specs` to delegate documentation generation to the refactored `align-project-documents` and constraint-file refresh to `maintain-project-constraints`; replace flat-category reference templates with the new three-category structure
31
48
 
32
- ## [Unreleased]
33
-
34
- ### Added
35
- - (None yet)
36
-
37
49
  ## [v3.9.5] - 2026-05-08
38
50
 
39
51
  ### Changed
package/README.md CHANGED
@@ -200,7 +200,7 @@ The install commands below were checked with the Skills CLI unless otherwise not
200
200
  Compatibility note:
201
201
 
202
202
  - `generate-spec` is a local skill used by `develop-new-features` and `enhance-existing-features`, and it can produce either a single spec set under `docs/plans/{YYYY-MM-DD}/{change_name}/` or a coordinated parallel batch under `docs/plans/{YYYY-MM-DD}/{batch_name}/{change_name}/` with shared `coordination.md`.
203
- - `implement-specs-with-subagents` coordinates one `implement-specs-with-worktree` subagent per spec directory for approved multi-spec batches, with staggered launches and a maximum of four active implementation subagents.
203
+ - `implement-specs-with-subagents` coordinates one `implement-specs-with-worktree` subagent per spec directory for approved multi-spec batches.
204
204
  - `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.
205
205
  - `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.
206
206
  - `read-github-issue` uses GitHub CLI (`gh`) directly for remote issue discovery and inspection, so it does not add any extra skill dependency.
@@ -12,7 +12,7 @@ A shared planning skill for feature work. It centralizes creation and maintenanc
12
12
  - Backfills task and checklist status after implementation and testing.
13
13
  - Keeps requirement, task, and test coverage mapping traceable.
14
14
  - Uses `test-case-strategy` to choose test levels, define meaningful oracles, and add focused unit drift checks to atomic implementation tasks.
15
- - Standardizes external dependency contracts in `contract.md` and architecture/design deltas in `design.md`.
15
+ - Standardizes **`design.md` / `contract.md` as high-level context** (architecture + external truth, `INT-###`/`EXT-###` anchors)—**`tasks.md` remains the sole file-level execution queue** implementing that context.
16
16
 
17
17
  ## Repository layout
18
18
 
@@ -95,8 +95,8 @@ docs/plans/<today>/membership-cutover/
95
95
  - `spec.md`: use BDD keywords `GIVEN / WHEN / THEN / AND / Requirements`.
96
96
  - `tasks.md`: use `## **Task N: ...**` and atomic implementation queue items with allowed scope, output, completion condition, verification hook, and unit drift check.
97
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`.
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.
99
- - `design.md`: record the architecture/design delta in the standard format, including affected modules, flow, invariants, tradeoffs, and validation plan.
98
+ - `contract.md`: cite-backed **facts/limits/security** + **`EXT-###` anchors** (coarser than **`tasks.md`**); **no parallel checklist**—task rows may cite `EXT-###` when useful.
99
+ - `design.md`: architecture + coarse **`INT-###` ordering/coupling hints** for **authoring** **`tasks.md`**; **no file-level checkbox mirror**; vendor detail belongs in **`contract.md`**.
100
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
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.
102
102
  - If clarification responses change the plan, update the docs and obtain approval again before coding.
@@ -33,7 +33,7 @@ description: >-
33
33
 
34
34
  - **Evidence**: Official docs when externally constrained; record cites in `spec.md` / `contract.md`.
35
35
  - **Execution**: Scaffold → fill templates in place → clarification loop → approval gate → (later) backfill after implementation.
36
- - **Quality**: Synchronized artifacts; applicable template sections only; realistic checklist vs boilerplate (add/remove by risk); finalized docs read as an approved plan, not a fully checked starter; `contract.md` standardized records or honest `None` with reason.
36
+ - **Quality**: Synchronized artifacts; **`tasks.md`** is unique runnable granularity; **`design.md`/`contract.md`** constrain and orient without mirroring checklist rows—**`TBD`/honest `None`** when facts missing.
37
37
  - **Output**: `docs/plans/{YYYY-MM-DD}/{change_name}/` or `docs/plans/{YYYY-MM-DD}/{batch_name}/{change_name}/`; batch root `coordination.md` when intentionally parallel; `preparation.md` only when prerequisite batch work is required first.
38
38
 
39
39
  ## Workflow
@@ -60,7 +60,7 @@ apltk create-specs "<feature_name>" --change-name <kebab-case> --output-dir "$WO
60
60
 
61
61
  Multi-spec parallel batch: add `--batch-name <kebab-case>` and `--with-coordination`. **Only** if parallel safety needs prior shared work: add `--with-preparation`.
62
62
 
63
- Always materialize: `spec.md`, `tasks.md`, `checklist.md`, `contract.md`, `design.md` from `references/templates/`. Add `coordination.md` / `preparation.md` at batch root only when flags require. Save under `docs/plans/{YYYY-MM-DD}/...`. After generation, fill in place **without** removing template headings unless truly N/A (document reason). Run a **template-drift pass** before approval: sections present, placeholders removed or justified.
63
+ Always materialize: `spec.md`, `tasks.md`, `checklist.md`, `contract.md`, `design.md` from `references/templates/`. Add `coordination.md` / `preparation.md` at batch root only when flags require. Save under `docs/plans/{YYYY-MM-DD}/...`. After generation, fill in place **without** stripping section headings unless truly N/A (document inline); drop unused repeatable blocks (extra component or dependency stubs). Run a **template-drift pass** before approval: required fields covered, placeholders removed or justified.
64
64
  - **Pause →** List the **module names** (≤3) this spec set will touch; if more, where is my **split plan**?
65
65
  - **Pause →** For every shared file two specs might touch, where is the **named** resolution in `coordination.md` or why is `preparation.md` required instead?
66
66
  - **Pause →** Did I run `apltk create-specs` from the **skill** context so template paths resolve correctly?
@@ -68,15 +68,16 @@ Always materialize: `spec.md`, `tasks.md`, `checklist.md`, `contract.md`, `desig
68
68
  ### 3) Author content (fill templates)
69
69
 
70
70
  - **`spec.md`**: Concrete scope; BDD (`GIVEN` / `WHEN` / `THEN` / `AND` / `Requirements`); testable requirements; boundaries, auth, failure, idempotency/concurrency/integrity where relevant; doc references; `3-5` clarification questions or `None`.
71
- - **`tasks.md`**: `## **Task N: [Title]**` with Purpose, Requirements, Scope, Out of scope; atomic `- N [ ]` lines obeying the triple requirement above; split tasks that exceed three files / multiple behavior slices / undocumented decisions; integrate `test-case-strategy` for test IDs and drift checks for non-trivial logic.
72
- - **`contract.md`**: One record per material external dependency (source, surface, I/O, limits, security, failures); else `None` + short reason—**no** fabricated deps.
73
- - **`design.md`**: Delta vs baseline; modules, responsibilities, flow, state, risks; cross-ref requirement IDs; parallel batch: pointer to `coordination.md`, assumptions for safe concurrency, **no** duplicating batch rules; with `preparation.md`, assume prep **done**—**do not** duplicate prep tasks.
71
+ - **`tasks.md`**: `## **Task N: [Title]**` with Purpose, Requirements, Scope, Out of scope; atomic `- N [ ]` triple (path · change · verify). **Derive sequencing and decomposition from** **`spec.md` + `design.md` + `contract.md`**; **`tasks.md` stays the only enumerated runnable checklist**. Optionally cite **`INT-###` / `EXT-###`** on rows an anchor constrains—and **keep design/contract coarser**, never a second copy of checklist lines. Integrate `test-case-strategy` for drift checks where needed.
72
+ - **`contract.md`**: Cite-backed **external facts / limits / failure semantics / security**, plus **`EXT-###`** integration **anchors** (typically fewer rows than **`tasks.md` items)—**constraints and anti-hallucination context**, **not** a parallel implementation runbook (`TBD` instead of guesses; **`Dependencies` → None** when genuinely no externals).
73
+ - **`design.md`**: **High-level architectural context for composing `tasks.md`**—baseline/target shape, boundaries, modules, **`INT-###`** coarse coupling/order hints (`task` granularity lives only in **`tasks.md`**). No file-level chores; batches defer ownership grids to **`coordination.md`**; **`preparation.md`** assumed done—don't replay prep execution here.
74
74
  - **`coordination.md`** (batch root, parallel only): **Business Goals** (outcome, member specs, parallel readiness, exclusions, blockers → `preparation.md` or list); **Design Principles** (baseline, shared invariants, compat, cleanup—high level); **Spec Boundaries** → **Ownership Map** (allowed/forbidden touchpoints per spec) and **Collisions & Integration** (shared-file rules, freeze owners, merge order, checkpoints, re-coordination trigger)—**every** collision candidate **MUST** have a named resolution.
75
75
  - **`preparation.md`** (batch root, only if required): Preparation Goal (why, no core business logic, dependents, start condition); **Task P[N]** like `tasks.md` (atomic triple items); **Validation**; **Handoff** (assumptions, must-not-change, if prep changes later). Strip duplicate prep from member specs.
76
76
  - **`checklist.md`**: `- [ ]` adapted to scope; map behaviors to requirement/test IDs via `test-case-strategy`; behavior lines `[CL-xx]: … — R?.? → [Test IDs] — Result: …`; property-based logic **required** unless `N/A` + reason; honest execution/completion records—**no** checking unused examples or unchosen options.
77
77
  - **Pause →** Pick one **random** `tasks.md` checkbox: does it still fail the triple rule (target, change, verify)—if yes, rewrite now?
78
78
  - **Pause →** Does every **R** requirement ID I care about appear in `tasks.md` or `checklist.md` with a test or explicit `N/A`?
79
- - **Pause →** For parallel batches, does `design.md` **avoid** duplicating what `coordination.md` already owns?
79
+ - **Pause →** Do **`design.md` / `contract.md`** stay **coarser than `tasks.md`** (no mirrored checkbox choreography / file paths)—yet still constrain ordering and forbidden hallucinations?
80
+ - **Pause →** For parallel batches, does `design.md` **avoid** duplicating batch ownership grids already locked in **`coordination.md`**?
80
81
 
81
82
  ### 4) Clarifications and approval
82
83
 
@@ -93,8 +94,8 @@ When implementation exists: mark `tasks.md`; sync `checklist.md` outcomes/`N/A`;
93
94
  ## Sample hints
94
95
 
95
96
  - **`tasks.md` line — bad**: `- [ ] Add tests` → **reject** (no path, change, verifier).
96
- - **`tasks.md` line — ok**:
97
- `- [ ] src/auth/scope.rs — add deny-by-default matcher for unknown scopes · Verify: cargo test scope::defaults`
97
+ - **`tasks.md` line — ok (with ledger wiring)**:
98
+ `- [ ] 2 src/api/handlers/oauth.rs — implement handler path for POST /oauth/token satisfying INT-003, INT-004 · EXT-001 client config loaded from env per contract · Verify: cargo test oauth::handlers::token_exchange`
98
99
  - **Batch scaffold** (three member specs): `WORKSPACE_ROOT=... apltk create-specs "OAuth batch" --change-name oauth-api --batch-name oauth-may-batch --with-coordination --output-dir "$WORKSPACE_ROOT/docs/plans"` (then repeat or use generator rules for additional `change-name` dirs as your tooling permits).
99
100
  - **`checklist.md` behavior row sketch**: `[CL-01]: invalid token rejected — R2.1 → TU-Scope-01,TU-Scope-02 — Result: pending`
100
101
  - **Split-trigger**: change touches `src/auth/*`, `src/cli/*`, `src/db/*`, `infra/terraform/*` (four modules) ⇒ **minimum two spec sets**, not one.
@@ -1,4 +1,6 @@
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 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."
4
+ default_prompt: >-
5
+ 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, minimal non-business preparation.md; treat references/templates/*.md as binding format; member specs assume preparation finished—do not duplicate preparation tasks; surface collisions early and resolve ownership via coordination.md; fill BDD in spec.md; integrate $test-case-strategy into tasks/checklists.
6
+ **Critical layering:** design.md + contract.md are higher-level guiding context only (architecture + cite-backed external truth; coarse INT-### / EXT-### anchors). tasks.md MUST be the ONLY enumerated runnable queue with path-level edits and verification hooks—derive tasks FROM spec + design + contract WITHOUT mirroring checklist rows into design/contract; optionally cite INT/EXT on task lines for traceability—never duplicate task choreography inside design.md or contract.md.
@@ -4,62 +4,69 @@
4
4
  - Feature: [Feature Name]
5
5
  - Change Name: [change_name]
6
6
 
7
- ## Purpose
8
- [Describe why external dependency contracts matter for this change.]
9
-
10
- ## Usage Rule
11
- - Write one dependency record per external library, framework, SDK, API, CLI, platform service, or hosted system that materially constrains implementation.
12
- - If no external dependency materially affects the change, write `None` under `## Dependency Records` and briefly explain why this document is not needed for the current scope.
13
- - Every claim in this file must be backed by the official documentation or the verified upstream source actually used during planning.
14
-
15
- ## Dependency Records
16
-
17
- ### Dependency 1: [Dependency Name]
18
- - Type: [library / framework / SDK / API / CLI / hosted service / platform]
19
- - Version / Scope: [exact version, major line, API version, or `Not fixed`]
20
- - Official Source: [link]
21
- - Why It Matters: [what this dependency is responsible for in the change]
22
- - Invocation Surface:
23
- - Entry points: [package import / endpoint / command / webhook / queue topic]
24
- - Call pattern: [sync / async / streaming / webhook / batch / polling]
25
- - Required inputs: [auth, headers, env vars, config keys, payload fields]
26
- - Expected outputs: [return shape, side effects, emitted events, persisted state]
27
- - Constraints:
28
- - Supported behavior: [documented supported modes relevant to this change]
29
- - Limits: [rate limits, payload limits, timeout, ordering, pagination, size, quota]
30
- - Compatibility: [runtime / platform / version / region / account constraints]
31
- - Security / access: [auth model, scopes, permissions, secret handling]
32
- - Failure Contract:
33
- - Error modes: [documented errors, degraded states, retries, eventual consistency]
34
- - Caller obligations: [retry rules, idempotency keys, backoff, validation, cleanup]
35
- - Forbidden assumptions: [what the implementation must not assume]
36
- - Verification Plan:
37
- - Spec mapping: [R?.?]
38
- - Design mapping: [section in `design.md`]
39
- - Planned coverage: [UT / PBT / IT / E2E / mock scenario IDs]
40
- - Evidence notes: [specific doc section or source snippet summary]
41
-
42
- ### Dependency 2: [Dependency Name]
43
- - Type: [library / framework / SDK / API / CLI / hosted service / platform]
44
- - Version / Scope: [exact version, major line, API version, or `Not fixed`]
45
- - Official Source: [link]
46
- - Why It Matters: [what this dependency is responsible for in the change]
47
- - Invocation Surface:
48
- - Entry points: [package import / endpoint / command / webhook / queue topic]
49
- - Call pattern: [sync / async / streaming / webhook / batch / polling]
50
- - Required inputs: [auth, headers, env vars, config keys, payload fields]
51
- - Expected outputs: [return shape, side effects, emitted events, persisted state]
52
- - Constraints:
53
- - Supported behavior: [documented supported modes relevant to this change]
54
- - Limits: [rate limits, payload limits, timeout, ordering, pagination, size, quota]
55
- - Compatibility: [runtime / platform / version / region / account constraints]
56
- - Security / access: [auth model, scopes, permissions, secret handling]
57
- - Failure Contract:
58
- - Error modes: [documented errors, degraded states, retries, eventual consistency]
59
- - Caller obligations: [retry rules, idempotency keys, backoff, validation, cleanup]
60
- - Forbidden assumptions: [what the implementation must not assume]
61
- - Verification Plan:
62
- - Spec mapping: [R?.?]
63
- - Design mapping: [section in `design.md`]
64
- - Planned coverage: [UT / PBT / IT / E2E / mock scenario IDs]
65
- - Evidence notes: [specific doc section or source snippet summary]
7
+ > **Purpose:** **High-level external-dependency context for `tasks.md`**: cite-backed facts, limits, failures, security—so integrations are not hallucinated. **Not** a runnable checklist; **`tasks.md` executes** wiring (files, calls, mocks, tests). Internal coupling intent stays in **`design.md`** (`INT-###`).
8
+ >
9
+ > **Anti-duplication:** Do not enumerate per-file edits, checkbox steps, or copy task ordering. **`EXT-###`** are **constraints / anchors** that task rows may cite.
10
+ >
11
+ > **Undocumented gaps:** **`TBD`** + clarification—never invent payloads, endpoints, or semantics.
12
+
13
+ ## Scope
14
+
15
+ - **External deps in this doc:** [`0` \| ≥1]
16
+ - **`0`:** under **Dependencies** write **`None.`** plus one line (what “no deps” excludes for coders).
17
+
18
+ ## Dependencies
19
+
20
+ If **external dep count is 0:** keep **only**:
21
+
22
+ **None.** [one line — e.g. no network SDKs/APIs beyond stdlib/process]
23
+
24
+ **Delete everything** from “### \[Dependency name]” downward.
25
+
26
+ If **≥1 dependency:** delete the `None.` block above; copy one `### [Dependency name]` section per dependency.
27
+
28
+ ### [Dependency name]
29
+
30
+ #### Evidence
31
+
32
+ | Primary docs URL(s) | Sections / anchors used |
33
+ | ------------------------------- | ----------------------- |
34
+ | […] | [] |
35
+
36
+ **Version revision assumed:** [pinned \| line \| `Not fixed` — how pinning lands in **`tasks.md`**]
37
+
38
+ #### Facts we rely on (must be citeable)
39
+
40
+ | Fact / capability needed | Doc location |
41
+ | ------------------------ | ------------ |
42
+ | […] | [] |
43
+
44
+ #### Limits & failures (coding obligations)
45
+
46
+ | Category | Doc fact | Meaning while executing **`tasks.md`** |
47
+ | -------- | --------- | ---------------------------------------- |
48
+ | Quotas · size · timeout · paging | […] | [backoff / batching — policy level] |
49
+ | Errors / degraded modes | […] | [map-to-app policy—not file paths unless standard] |
50
+
51
+ #### Security & secrets (policy level)
52
+
53
+ | Concern | Constraint |
54
+ | ----------------- | ---------- |
55
+ | Auth / scopes | […] |
56
+ | Secret keys (names)| [] |
57
+
58
+ #### Integration anchors (`EXT-###`)
59
+
60
+ **Grain:** Boundary truth + obligations—**fewer anchors than typical task rows**. Multiple checkboxes often satisfy one anchor.
61
+
62
+ | ID | What we integrate at this boundary *(doc-named surface)* | Non‑negotiables (handling, retries, idempotency *per doc*) | Forbidden assumptions |
63
+ | --------- | ---------------------------------------------------------- | ----------------------------------------------------------- | --------------------- |
64
+ | `EXT-001` | [endpoint · SDK symbol · topic **verbatim-ish** from doc] | […] | […] |
65
+
66
+ **Doc-level ordering constraint (if any):** [e.g. token before resource call—or `None`]
67
+
68
+ #### Trace hooks (no task parroting)
69
+
70
+ - Spec IDs covered: [R?.?]
71
+ - Related **`design.md`** module keys / `INT-###`: [optional]
72
+ - **Unknown / `TBD`:** [list or `None`]
@@ -4,65 +4,80 @@
4
4
  - Feature: [Feature Name]
5
5
  - Change Name: [change_name]
6
6
 
7
- ## Design Goal
8
- [Describe the architecture/design objective for this spec change.]
9
-
10
- ## Change Summary
11
- - Requested change: [one sentence]
12
- - Existing baseline: [current architecture or behavior relevant to the change]
13
- - Proposed design delta: [what will change structurally]
14
-
15
- ## Scope Mapping
16
- - Spec requirements covered: [R?.?]
17
- - Affected modules: [module/file/service list]
18
- - External contracts involved: [dependency names from `contract.md`, or `None`]
19
- - Coordination reference: [`../coordination.md` or `None`]
20
- - Parallel implementation assumption: [why this spec can be implemented concurrently, or `None` for single-spec work]
21
-
22
- ## Current Architecture
23
- [Describe the relevant current components, data flow, control flow, and boundaries.]
24
-
25
- ## Proposed Architecture
26
- [Describe the new or updated structure, ownership boundaries, and interaction flow.]
27
-
28
- ## Component Changes
29
-
30
- ### Component 1: [Name]
31
- - Responsibility: [what this component owns after the change]
32
- - Inputs: [events, params, payloads, config]
33
- - Outputs: [return values, writes, emitted events, calls]
34
- - Dependencies: [internal modules and external contracts]
35
- - Invariants: [business or technical rules that must hold]
36
-
37
- ### Component 2: [Name]
38
- - Responsibility: [what this component owns after the change]
39
- - Inputs: [events, params, payloads, config]
40
- - Outputs: [return values, writes, emitted events, calls]
41
- - Dependencies: [internal modules and external contracts]
42
- - Invariants: [business or technical rules that must hold]
43
-
44
- ## Sequence / Control Flow
45
- 1. [Step 1]
46
- 2. [Step 2]
47
- 3. [Step 3]
48
-
49
- ## Data / State Impact
50
- - Created or updated data: [schemas, fields, caches, files, queues, config]
51
- - Consistency rules: [ordering, transactionality, idempotency, deduplication]
52
- - Migration / rollout needs: [if none, write `None`]
53
-
54
- ## Risk and Tradeoffs
55
- - Key risks: [failure, concurrency, authorization, partial-write, dependency risk]
56
- - Rejected alternatives: [alternative + why it was not chosen]
57
- - Operational constraints: [performance, quota, observability, deployment coupling]
58
- - Cross-spec collision notes: [known shared-file/shared-contract collision avoided by ownership rules, or `None`]
59
-
60
- ## Validation Plan
61
- - Tests: [UT / PBT / IT / E2E / adversarial]
62
- - Contract checks: [how `contract.md` constraints will be validated]
63
- - Rollback / fallback: [how to contain or reverse impact]
64
-
65
- ## Open Questions
66
- [Write `None` if the design is settled.]
67
- - [Question 1]
68
- - [Question 2]
7
+ > **Purpose:** **High-level architectural context for `tasks.md`**—structure, coupling, sequencing intent—not a second implementation list. Requirement intent stays in `spec.md`; **documented vendor truth** stays in **`contract.md`**. **`tasks.md` owns** every runnable step (paths, edits, verifies).
8
+ >
9
+ > **Do not duplicate `tasks.md`:** no checkbox-style chores, no per-file implementation lines, no verifiers—the executable queue exists only under **`tasks.md`**. Optional **`INT-###`** labels are **coarse anchors** that task rows cite for traceability.
10
+ >
11
+ > **Audience:** Humans/agents authoring **`tasks.md`**, and implementers needing **mental model before** ticking task boxes—not a standalone execution script.
12
+
13
+ ## Traceability
14
+
15
+ | | |
16
+ | --------------------------- | ---------------------------------------------------------------------------- |
17
+ | Requirement IDs | [R?.?] |
18
+ | In-scope modules (≤3) | [paths / services] |
19
+ | External systems touched | [names only—full truth in **`contract.md`**, or `None`] |
20
+ | Batch coordination | [`../coordination.md` or `None`] |
21
+
22
+ ## Target vs baseline
23
+
24
+ | | Baseline (today) | Target (after this change) |
25
+ | --------------------- | ---------------- | --------------------------- |
26
+ | Structure / ownership | […] | […] |
27
+
28
+ ## Boundaries
29
+
30
+ - Entry surface(s): [HTTP · CLI · job · subscriber · FFI — whichever applies]
31
+ - Trust boundary crossed: [`None` / brief]
32
+ - Outside → inside (one line): `[Actor]` `[our entry]` → `[…]` (vendor touchpoints **`contract.md` only`)
33
+
34
+ ## Modules (nouns only)
35
+
36
+ | Module key | Responsibility (one sentence) | Owned artifacts (types, tables, queues) |
37
+ | ---------- | ---------------------------- | ---------------------------------------- |
38
+ | `[key]` | […] | [none / list] |
39
+
40
+ ---
41
+
42
+ ## Interaction anchors (`INT-###`)
43
+
44
+ **Grain:** **Above `tasks.md`**. One anchor ≈ a **meaningful handshake** between module keys—not one checkbox. Several task lines may realize a single `INT-###`.
45
+
46
+ | ID | Intent (when this coupling matters) | Caller → Callee | Coupling kind (route pattern · RPC · event · sync call—**name/pattern**, not file path) | Information / state crossing (summary) | Failure / propagation expectation (summary) |
47
+ | --------- | ------------------------------------ | --------------- | ---------------------------------------------------------------------------------------- | -------------------------------------- | ------------------------------------------- |
48
+ | `INT-001` | […] | `A` → `B` | […] | […] | […] |
49
+
50
+ **Ordering / concurrency (design-level):** [parallelism rules, critical sections, or `None`—still no file-level steps]
51
+
52
+ ## Requirement linkage (coarse ordering)
53
+
54
+ Maps **which `R` clusters** depend on **which anchor order**. **`tasks.md` decomposes** into concrete steps.
55
+
56
+ ### [Scenario / `R?.?` cluster]
57
+
58
+ - Anchor order hint: `INT-…` `INT-…`
59
+ - Narrative glue (≤3 bullets): [why this order; what must not reorder]
60
+
61
+ [`None` if one anchor suffices—say so]
62
+
63
+ ## Data & persistence (design-level)
64
+
65
+ | Resource | Typical readers/writers (module keys) | Consistency expectation (ordering, idempotency) |
66
+ | ----------------------------- | ------------------------------------- | ------------------------------------------------ |
67
+ | [store · schema · queue …] | […] | […] |
68
+
69
+ ## Invariants (system-level)
70
+
71
+ | Invariant | What breaks it architecturally | Symptoms if violated |
72
+ | --------- | ---------------------------------------- | -------------------- |
73
+ | […] | [coupling mistake / wrong owner / …] | […] |
74
+
75
+ ## Tradeoffs inherited by implementation
76
+
77
+ | Decision | Rejected alternative | Locks in (for **`tasks.md`**) |
78
+ | -------- | -------------------- | ---------------------------- |
79
+ | […] | […] | […] |
80
+
81
+ ## Batch-only
82
+
83
+ [`None` \| single line: responsibilities **not** in this spec → see **`coordination.md`**]
@@ -30,6 +30,8 @@ Out of scope: [files/modules/behaviors this task must not change]
30
30
  - Verify: [focused command/check/manual inspection; drift check ref if applicable]
31
31
 
32
32
  ## Notes
33
+ - **Layering:** **`design.md`** / **`contract.md`** are **guiding context** only (architecture + external truth). **`tasks.md` is the sole numbered, file-level execution queue**—do not expect design/contract to re-list its checkboxes.
34
+ - When drafting, derive task order and scope from **`spec.md`** + **`design.md`** + **`contract.md`**; optionally cite **`INT-###` / `EXT-###`** on rows those anchors constrain.
33
35
  - Task order reflects implementation sequence.
34
36
  - Every task must map back to `spec.md` requirement IDs.
35
37
  - Treat `tasks.md` as an implementation queue, not a summary.
@@ -15,7 +15,8 @@ description: >-
15
15
 
16
16
  ## Non-negotiables
17
17
 
18
- - **MUST** read and understand the full in-scope planning set and the parent `coordination.md` when its path applies, **before** editing product code or tests for this spec. Read for meaning in this order: **`spec.md`** (requirements / intent), **`design.md`** (system design / boundaries), **`contract.md`** (external dependencies and interfaces), **`checklist.md`** (wrap-up, acceptance, and closing obligations), then treat **`tasks.md`** as the ordered implementation checklist. **MUST NOT** start coding until that read pass is complete for the current in-scope directory.
18
+ - **MUST** read and understand the full in-scope planning set and the parent `coordination.md` when its path applies, **before** editing product code or tests for this spec. Read for meaning in this order: **`spec.md`** (requirements / intent), **`design.md`** (high-level architecture + coarse `INT-###` anchors—**guidance for structuring work**), **`contract.md`** (cite-backed external facts/constraints + `EXT-###` anchors), **`checklist.md`**, then treat **`tasks.md`** as **the authoritative ordered runnable checklist**. **MUST NOT** start coding until that read pass is complete for the current in-scope directory.
19
+ - **MUST** execute **every** **`tasks.md`** line in listed order—the **executable source of truth** for what to ship. **`design.md` / `contract.md`** **inform** decomposition and forbid contradictions (**`INT-###` / `EXT-###`** when present are **constraints/anchors referenced from tasks**, not a second queue). **MUST NOT** silently wire alternate module flows or vendor surfaces that conflict with approved **`design`** / **`contract`**; resolve conflicts via **`generate-spec`** / explicit approved plan edits first.
19
20
  - **MUST** when multiple spec directories apply to one request, follow parent **`coordination.md`** merge / sequencing guidance (or the user’s explicit order if coordination is absent or defers to them) and **complete** one directory end-to-end—**all** of its `tasks.md` lines **and** **all** of its `checklist.md` wrap-up / acceptance work—**before** starting implementation work in the next directory. **MUST NOT** interleave partial implementation across sibling specs.
20
21
  - **MUST NOT** create a branch, switch branches, or add or use a `git worktree` for this work unless the user explicitly changes the request in the same conversation.
21
22
  - **`tasks.md` completeness (hard stop)**: **MUST** execute **every** actionable item listed in the in-scope `tasks.md` for this request—**no exceptions** for perceived size, duration, file count, refactor depth, or session length. **MUST NOT** stop early, “defer” unchecked tasks while claiming the spec is done, collapse multiple task lines into a partial summary, or substitute narrative progress for completing a remaining line. If a line is truly impossible under written contracts, **MUST** stop with evidence and **MUST NOT** treat the implementation pass as complete until the plan is amended through the governing planning workflow (`generate-spec` / user-approved update) and the revised `tasks.md` is then fully satisfied.
@@ -29,7 +30,7 @@ description: >-
29
30
  ## Standards (summary)
30
31
 
31
32
  - **Evidence**: Same as Non-negotiables: no coding until the spec set is fully read; no guessed plan paths.
32
- - **Execution**: Current checkout only; implement and test against the approved **`spec.md` / `design.md` / `contract.md`** and **`tasks.md`** lines—no parallel branch or worktree (unless the user rescopes to another skill).
33
+ - **Execution**: Current checkout only; **`tasks.md`** defines runnable order and file targets; **`spec`/`design`/`contract`** constrain meaning and forbid contradictory wiring—implement and test until obligations are met—no parallel branch or worktree (unless the user rescopes to another skill).
33
34
  - **Quality**: **All** `tasks.md` lines **and** **all** `checklist.md` wrap-up / acceptance obligations for this scope satisfied (see Non-negotiables—workload is not an excuse); tests and checklist verifications executed as required; docs reflect reality; no scope creep into sibling specs.
34
35
  - **Output**: Current branch contains a clean, reviewable implementation of this spec only.
35
36
 
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  name: implement-specs-with-subagents
3
3
  description: >-
4
- Coordinator-only workflow for multispec batches: ingest `coordination.md`/`preparation.md`, run prerequisite work yourself, derive topological phases, launch ≤4 staggered **`implement-specs-with-worktree`** workers (one `{change}` each; **full** `tasks.md` + **full** `checklist.md` wrap-up—no partial handoff), **`merge-changes-from-local-branches`** after every phase succeeds, ledger every branch/test/merge—not for solo specs unless user explicitly insists on delegation overload. **Multi-phase: do not declare done until every non-blocked spec is merged across all phases** (or pipeline stopped on explicit blocker).
4
+ Coordinator-only workflow for multispec batches: ingest `coordination.md`/`preparation.md`, run prerequisite work yourself, derive topological phases, launch **`implement-specs-with-worktree`** workers (one `{change}` each; **full** `tasks.md` + **full** `checklist.md` wrap-up—no partial handoff), **`merge-changes-from-local-branches`** after every phase succeeds, ledger every branch/test/merge—not for solo specs unless user explicitly insists on delegation overload. **Multi-phase: do not declare done until every non-blocked spec is merged across all phases** (or pipeline stopped on explicit blocker).
5
5
  Wrong tool for one directory without parallel mandate—pick **`implement-specs-with-worktree`** / **`implement-specs`** depending on isolation. Publication/versioning stays outside this orchestration layer unless another skill attaches.
6
- Ledger sample: `oauth-scope | phase=1 | merged | npm test ✅`. Burst-launching four agents simultaneously—disallowed pacing required…
6
+ Ledger sample: `oauth-scope | phase=1 | merged | npm test ✅`.
7
7
  ---
8
8
 
9
9
  # Implement Specs with Subagents (Multi-Phase)
@@ -22,7 +22,6 @@ description: >-
22
22
  - **MUST** complete, verify, and **finalize** documented shared preparation on the integration branch **through `commit-and-push`** before any implementation subagent starts when `preparation.md` exists or specs mandate pre-work; the coordinating agent **MUST NOT** delegate that preparation. Subagents **MUST NOT** start until this branch is clean at the preparation commit (or there is no required preparation).
23
23
  - **MUST** build a directed dependency graph from `coordination.md` plus each spec’s `spec.md` / `design.md` (edges: *provider spec must merge before consumer spec*). **MUST** partition specs into phases by topological **layers**: Phase 1 = specs with **no** in-batch prerequisites; for *k* ≥ 2, Phase *k* = specs whose in-batch prerequisites all appear in phases before *k*. **MUST NOT** start phase *k* until phase *k − 1* is fully merged into the integration branch (or you have an explicit user override). If the graph has a cycle, **MUST** stop and report it.
24
24
  - **MUST** assign **exactly one** spec directory per implementation subagent; **MUST NOT** assign multiple directories to one implementation subagent.
25
- - **MUST** cap **active** implementation subagents at **four**; **MUST** start them **one at a time** with confirmation each is running before the next start; **MUST** back off on rate limits (no burst launches). Four is a ceiling, not a quota.
26
25
  - **`tasks.md` + `checklist.md` completeness (hard stop)**: Every implementation subagent **MUST** finish **all** actionable items in its assigned directory’s `tasks.md` **and** **all** `checklist.md` wrap-up, acceptance, verification, and closing obligations before reporting success—**no** partial completion, **no** “good enough” stops for large batches, **no** deferrals disguised as done. The coordinating agent **MUST NOT** merge a phase branch, advance the ledger to **`merged`**, or treat a spec as complete while **any** in-scope `tasks.md` line **or** checklist-defined closing item remains undone unless the batch is explicitly **`blocked`** with documented user/contract halt. **MUST** repeat this mandate in **every** subagent envelope so workers cannot interpret scope loosely.
27
26
  - **MUST** give each subagent only task-local context (repo root, exact spec path, `coordination.md` path if relevant, instruction to run `implement-specs-with-worktree`, explicit **`tasks.md` full-completion** and **`checklist.md` wrap-up full-completion** requirements, baseline commit when preparation exists, requirement to read the full bundle before edits, worktree isolation, tests, backfill, local commit, and reporting branch/worktree/commit/tests/blockers). **MUST NOT** leak unrelated reasoning or other subagents’ private diffs unless resolving a concrete conflict.
28
27
  - After each phase: **MUST** merge every **completed** spec branch from that phase into the integration branch via `merge-changes-from-local-branches` before starting the next phase; **MUST** resolve conflicts using spec contracts as the correctness tie-breaker; **MUST** record merge result in the ledger; if merge is blocked, **MUST** stop the pipeline and report.
@@ -56,8 +55,8 @@ description: >-
56
55
  - **Pause →** Is there **exactly one** spec directory per queued subagent—never two in one prompt?
57
56
  - **Pause →** What will I **repeat** in every subagent envelope so they cannot “improvise” the wrong skill or wrong path?
58
57
 
59
- 5. **Run phase *k*** — Start ≤4 subagents sequentially with task-local payloads (see Non-negotiables). Monitor ledger; pause new launches on shared blockers; on conflicting edits to shared files, resolve ownership using `coordination.md` before more launches; if one spec fails and others depend on it, **MUST NOT** start those dependents until resolved; batch-wide planning failure ⇒ stop all scheduling.
60
- - **Pause →** How many subagents are **active** right now vs the cap of four; did I start the last one only **after** the previous was confirmed running?
58
+ 5. **Run phase *k*** — Launch subagents for each spec in the phase with task-local payloads (see Non-negotiables). Monitor ledger; pause new launches on shared blockers; on conflicting edits to shared files, resolve ownership using `coordination.md` before more launches; if one spec fails and others depend on it, **MUST NOT** start those dependents until resolved; batch-wide planning failure ⇒ stop all scheduling.
59
+ - **Pause →** Does every active subagent have a **distinct** spec directory assignment—no duplicate or overlapping paths?
61
60
  - **Pause →** Did two running subagents report **overlapping** paths; if yes, did I stop launching until ownership is clear?
62
61
 
63
62
  6. **Merge phase *k*** — When every item in phase *k* is **done or explicitly blocked**, merge **each successful** branch via `merge-changes-from-local-branches`; rerun critical tests if your standards say so; update ledger. Merge failure ⇒ **stop** before phase *k+1*. **“Done”** here **requires** full `tasks.md` completion **and** full `checklist.md` wrap-up / acceptance per Non-negotiables—not merely a subagent “looks finished” report.
@@ -78,9 +77,9 @@ description: >-
78
77
 
79
78
  ## Sample hints (subagent scheduling)
80
79
 
81
- - **Parallel batch (four independent specs)** — The batch contains **four** member directories and `coordination.md` allows parallel implementation with **no** in-batch prerequisites. Treat them as **one phase**: assign **exactly one** spec per subagent, start up to **four** **`implement-specs-with-worktree`** workers **staggered** (never burst—Non-negotiables), each finishing **all** of its directory’s **`tasks.md`** and **`checklist.md`** before reporting success; when **every** branch in the phase is green, run **`merge-changes-from-local-branches`** to bring **all four** into the integration branch **before** declaring the batch done or starting a follow-on phase.
80
+ - **Parallel batch (independent specs)** — The batch has multiple member directories and `coordination.md` allows parallel implementation with **no** in-batch prerequisites. Treat them as **one phase**: assign **exactly one** spec per subagent, launch one **`implement-specs-with-worktree`** worker per spec, each finishing **all** of its directory’s **`tasks.md`** and **`checklist.md`** before reporting success; when **every** branch in the phase is green, run **`merge-changes-from-local-branches`** to bring **every** member into the integration branch **before** declaring the batch done or starting a follow-on phase.
82
81
 
83
- - **Preparation plus A → {B, C}** — Specs **A**, **B**, and **C** share a batch with **`preparation.md`**; `coordination.md` / design shows **B** and **C** depend on merged work from **A**. Coordinating agent: (1) complete **preparation** on the integration branch and **`commit-and-push`** (push only if the user asked); (2) **Phase 1**: launch **one** subagent for **A** only; **`merge-changes-from-local-branches`** for **A** when it passes; (3) **Phase 2**: launch **two** subagents for **B** and **C** from the branch that already contains **A**’s merge, still staggering starts; (4) merge **B** and **C** when both finish. **MUST NOT** start **B** or **C** until **A** is merged into the baseline they branch from.
82
+ - **Preparation plus A → {B, C}** — Specs **A**, **B**, and **C** share a batch with **`preparation.md`**; `coordination.md` / design shows **B** and **C** depend on merged work from **A**. Coordinating agent: (1) complete **preparation** on the integration branch and **`commit-and-push`** (push only if the user asked); (2) **Phase 1**: launch **one** subagent for **A** only; **`merge-changes-from-local-branches`** for **A** when it passes; (3) **Phase 2**: launch **two** subagents for **B** and **C** from the branch that already contains **A**’s merge; (4) merge **B** and **C** when both finish. **MUST NOT** start **B** or **C** until **A** is merged into the baseline they branch from.
84
83
 
85
84
  - **Ledger reminder** — One row per spec remains mandatory (`phase`, `depends-on`, branch/worktree, `merged` / `blocked`, tests); see Non-negotiables for full fields.
86
85
 
@@ -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, 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."
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, 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.9.5",
3
+ "version": "3.9.6",
4
4
  "description": "Apollo Toolkit npm installer for managed skill copying across Codex, OpenClaw, and Trae.",
5
5
  "license": "MIT",
6
6
  "author": "LaiTszKin",