@laitszkin/apollo-toolkit 5.0.3 → 5.0.5

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.
@@ -17,33 +17,46 @@ Execution methodology (task breakdown, coordination routing) belongs to the `pla
17
17
 
18
18
  - SPEC.md follows the template format strictly
19
19
  - SPEC.md includes: clear business goal, scope (In/Out), BDD behaviors, error and edge cases, clarification questions
20
+ - SPEC.md References section cites key code file paths affected by the requirements
20
21
  - High-uncertainty requirements are marked with Uncertainty Level and reflected in Clarification Questions
21
- - For non-greenfield repos: subagent repo research is complete, and every requirement's boundary is calibrated against the actual code
22
- - Single spec generated at `docs/plans/<YYYY-MM-DD>/<spec_name>/SPEC.md` or batch spec generated at `docs/plans/<YYYY-MM-DD>/<batch-name>/<spec_name>/SPEC.md`.
22
+ - For non-greenfield repos: `apltk codegraph` survey completed, subagent repo research complete, and every requirement's boundary calibrated against the actual code
23
+ - Single spec generated at `docs/plans/<YYYY-MM-DD>/<spec_name>/SPEC.md` or batch spec generated at `docs/plans/<YYYY-MM-DD>/<batch-name>/<spec_name>/SPEC.md`
23
24
 
24
25
  ## Workflow
25
26
 
26
- ### 1. Understand Requirements and Research the Repo
27
+ ### 1. Survey the Repo with CodeGraph
27
28
 
28
- Analyze the user's requirements from the PROPOSAL.md.
29
+ Before reading requirements, use `apltk codegraph` to deeply understand the repo.
30
+
31
+ **Greenfield repo (no existing code)**: Skip this step. Proceed to Step 2.
32
+
33
+ **Non-greenfield repo**:
34
+
35
+ 1. Run `apltk codegraph survey --json` to get entry points, function clusters, and cross-boundary edges across the project
36
+ 2. Use `apltk codegraph list-apis` to review API directory — function names, file paths, callers — in modules potentially affected by the requirements
37
+ 3. Use `apltk codegraph explore` or `apltk codegraph search` to dig into specific areas of interest
29
38
 
30
- **Greenfield repo (no existing code)**: Skip repo research. Proceed to Step 2.
39
+ Consult `references/codegraph.md` for detailed flags.
40
+
41
+ **Purpose of this step**: Establish code-level understanding of module boundaries, existing APIs, and data structures BEFORE reading requirements. This ensures every BDD requirement is scoped correctly against real code.
42
+
43
+ ### 2. Read PROPOSAL.md and Understand Requirements
44
+
45
+ Analyze the user's requirements from the PROPOSAL.md.
31
46
 
32
- **Non-greenfield repo**: Research the repo to ensure SPEC.md aligns with actual code.
47
+ **Bridge from Step 1**: Compare codegraph findings against PROPOSAL.md. If the actual code contradicts or constrains what PROPOSAL.md describes, note these calibrations explicitly — they represent the core value the spec skill adds over simple template filling.
33
48
 
34
- Research method:
35
- - Dispatch multiple subagents in parallel to deeply investigate:
36
- - Affected modules and their responsibility boundaries
37
- - Existing data structures and persistence patterns
38
- - Existing API contracts and call relationships
39
- - Existing features that overlap or conflict with the requirements
40
- - Document findings for the next step
49
+ For complex repos, dispatch multiple subagents in parallel to deeply investigate:
50
+ - Affected modules and their responsibility boundaries
51
+ - Existing data structures and persistence patterns
52
+ - Existing API contracts and call relationships
53
+ - Existing features that overlap or conflict with the requirements
41
54
 
42
- **Bridge to Step 2**: Compare research findings against PROPOSAL.md. If the actual code contradicts or constrains what PROPOSAL.md describes, adjust the requirement boundaries accordingly. Note these calibrations explicitly — they represent the core value the spec skill adds over simple template filling.
55
+ Document findings for the next step.
43
56
 
44
- ### 2. Refine, Combine, Split Requirements into BDD
57
+ ### 3. Refine, Combine, Split Requirements into BDD
45
58
 
46
- Transform requirements into clearly-bounded BDD business requirements (GIVEN/WHEN/THEN). Use your research findings from Step 1 to correctly scope each requirement.
59
+ Transform requirements into clearly-bounded BDD business requirements (GIVEN/WHEN/THEN). Use your codegraph findings from Step 1 and research from Step 2 to correctly scope each requirement.
47
60
 
48
61
  Process:
49
62
  - **Refine**: Convert vague descriptions into precise BDD behavior statements
@@ -78,7 +91,7 @@ Define:
78
91
 
79
92
  If a requirement remains unclear after research and it affects scope definition, record it and wait for the user's answer before proceeding.
80
93
 
81
- ### 3. Generate SPEC.md
94
+ ### 4. Generate SPEC.md
82
95
 
83
96
  Generate SPEC.md using the template at `assets/templates/SPEC.md`.
84
97
 
@@ -91,12 +104,12 @@ Generate SPEC.md using the template at `assets/templates/SPEC.md`.
91
104
 
92
105
  2. Fill in each section of the generated template:
93
106
  - **Goal** → One sentence from the PROPOSAL.md's Problem Statement and your research context. State the business goal, not the implementation.
94
- - **Scope (In/Out)** → Directly from Step 2. Be precise: ambiguous boundaries cause scope creep.
95
- - **Functional Behaviors** → One BDD block per requirement from Step 2.
107
+ - **Scope (In/Out)** → Directly from Step 3. Be precise: ambiguous boundaries cause scope creep.
108
+ - **Functional Behaviors** → One BDD block per requirement from Step 3.
96
109
  - **Uncertainty Level** → Per requirement, mark Known or Exploratory.
97
- - **Error and Edge Cases** → List specific cases. Free-form list; no fixed categories needed in the template (the five categories from Step 2 guide your thinking, not the output format).
110
+ - **Error and Edge Cases** → List specific cases. Free-form list; no fixed categories needed in the template (the five categories from Step 3 guide your thinking, not the output format).
98
111
  - **Clarification Questions** → List questions for the user. Must be populated when any requirement is Exploratory. Omit only if all requirements are fully clear.
99
- - **References** → List important project context files the LLM will need (e.g., `CLAUDE.md`, `AGENTS.md`, `resources/project-architecture/**`), plus official docs and related code files for traceability.
112
+ - **References** → Cite key code file paths affected by the requirements, plus project context files and official docs. The code file paths serve as traceability anchors linking requirements to actual code.
100
113
 
101
114
  **BDD writing guidelines**:
102
115
  - **GIVEN** states the precondition and actor role
@@ -108,22 +121,24 @@ Generate SPEC.md using the template at `assets/templates/SPEC.md`.
108
121
 
109
122
  3. If creating a batch spec, repeat the template-filling process for each group of requirements, producing one SPEC.md per group.
110
123
 
111
- ### 4. Pre-delivery Self-Review
124
+ ### 5. Pre-delivery Verification
112
125
 
113
126
  Before delivering, verify all of the following. Fix any issues found before proceeding.
114
127
 
115
128
  - **BDD verifiability**: Every requirement has a clear verification condition — THEN is observable and specific, not vague or qualitative
116
129
  - **Scope clarity**: In Scope and Out of Scope are unambiguous and do not overlap
117
- - **Error case completeness**: All five categories from Step 2 are substantively covered (individual cases, not category names)
130
+ - **Error case completeness**: All five categories from Step 3 are substantively covered (individual cases, not category names)
118
131
  - **Uncertainty reflected**: High-uncertainty requirements are marked Exploratory AND mentioned in Clarification Questions
119
132
  - **Internal consistency**: No contradictions or overlaps between requirements
133
+ - **Code traceability**: References section cites specific code file paths that each requirement maps to
134
+ - **CodeGraph data used**: Boundary scoping decisions reference codegraph findings (what exists vs what needs to be built)
120
135
 
121
136
  Only deliver SPEC.md to the user after passing self-review.
122
137
 
123
138
  ## Examples
124
139
 
125
- - "Build a web-based Texas Hold'em game" → Research existing code → 4 BDD items (deal, bet, judge, chips). ≤5, single SPEC.md.
126
- - "Rewrite the user system: register, login, permissions, password reset, 2FA, session management" → Research existing auth code → 6 BDD items. >5, batch spec: Auth spec (register, login, password reset — 3 items) and Security spec (permissions, 2FA, sessions — 3 items).
140
+ - "Build a web-based Texas Hold'em game" → CodeGraph survey to check for existing game engine → 4 BDD items (deal, bet, judge, chips). ≤5, single SPEC.md. → References cite game engine code paths
141
+ - "Rewrite the user system: register, login, permissions, password reset, 2FA, session management" → CodeGraph survey of existing auth modules → 6 BDD items. >5, batch spec: Auth spec (register, login, password reset — 3 items) and Security spec (permissions, 2FA, sessions — 3 items). → References cite auth module code paths
127
142
 
128
143
  ## References
129
144
 
@@ -44,7 +44,9 @@
44
44
 
45
45
  ## References
46
46
 
47
+ - **Key code file paths** (affected by this spec):
48
+ - [File path — e.g., `src/auth/login.ts`]
47
49
  - Official docs:
48
50
  - [Link or document]
49
- - Related code files:
50
- - [File path]
51
+ - Related project context files:
52
+ - [File path — e.g., `CLAUDE.md`, `AGENTS.md`]