@jakkrichm/create-nexus-devflow 2.2.1 → 2.5.0

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.
Files changed (61) hide show
  1. package/dist/bin/create-nexus-devflow.js +9 -1
  2. package/dist/bin/create-nexus-devflow.js.map +1 -1
  3. package/dist/lib/command-catalog.js +1 -1
  4. package/dist/lib/command-catalog.js.map +1 -1
  5. package/dist/lib/dashboard-page.d.ts +1 -1
  6. package/dist/lib/dashboard-page.js +42 -20
  7. package/dist/lib/dashboard-page.js.map +1 -1
  8. package/dist/lib/dashboard-snapshot.js +16 -12
  9. package/dist/lib/dashboard-snapshot.js.map +1 -1
  10. package/dist/lib/dashboard.js +10 -1
  11. package/dist/lib/dashboard.js.map +1 -1
  12. package/dist/lib/doctor.js +1 -1
  13. package/dist/lib/gatekeeper.d.ts +8 -0
  14. package/dist/lib/gatekeeper.js +15 -3
  15. package/dist/lib/gatekeeper.js.map +1 -1
  16. package/dist/lib/git-status.d.ts +10 -2
  17. package/dist/lib/git-status.js +57 -29
  18. package/dist/lib/git-status.js.map +1 -1
  19. package/dist/lib/swarm-orchestrator.d.ts +4 -1
  20. package/dist/lib/swarm-orchestrator.js +2 -2
  21. package/dist/lib/swarm-orchestrator.js.map +1 -1
  22. package/dist/lib/version-check.js +1 -1
  23. package/dist/lib/workflow-state.js +19 -32
  24. package/dist/lib/workflow-state.js.map +1 -1
  25. package/package.json +1 -1
  26. package/template/.agents/skills/check/SKILL.md +19 -11
  27. package/template/.agents/skills/complete/SKILL.md +47 -36
  28. package/template/.agents/skills/debug/SKILL.md +4 -8
  29. package/template/.agents/skills/devflow/SKILL.md +51 -79
  30. package/template/.agents/skills/feature/SKILL.md +8 -4
  31. package/template/.agents/skills/implement/SKILL.md +12 -8
  32. package/template/.claude/skills/check/SKILL.md +19 -11
  33. package/template/.claude/skills/complete/SKILL.md +47 -36
  34. package/template/.claude/skills/debug/SKILL.md +4 -8
  35. package/template/.claude/skills/devflow/SKILL.md +51 -79
  36. package/template/.claude/skills/feature/SKILL.md +8 -4
  37. package/template/.claude/skills/implement/SKILL.md +12 -8
  38. package/template/AGENTS.md +21 -30
  39. package/template/devflow/build-plan.md +19 -0
  40. package/template/devflow/context/ai-interaction.md +54 -39
  41. package/template/devflow/context/coding-standards.md +17 -6
  42. package/template/devflow/context/findings.md +8 -11
  43. package/template/devflow/context/glossary.md +31 -0
  44. package/template/devflow/reference/build-plan-template.md +65 -0
  45. package/template/devflow/reference/feature-spec-template.md +110 -0
  46. package/template/devflow/reference/project-plan-template.md +128 -0
  47. package/template/devflow/reference/running-id-contract.md +12 -11
  48. package/template/.agents/skills/10-define/SKILL.md +0 -54
  49. package/template/.agents/skills/20-spec/SKILL.md +0 -155
  50. package/template/.agents/skills/30-plan/SKILL.md +0 -220
  51. package/template/.agents/skills/40-execute/SKILL.md +0 -161
  52. package/template/.agents/skills/50-verify/SKILL.md +0 -55
  53. package/template/.agents/skills/60-report/SKILL.md +0 -57
  54. package/template/.agents/skills/70-deliver/SKILL.md +0 -72
  55. package/template/.claude/skills/10-define/SKILL.md +0 -54
  56. package/template/.claude/skills/20-spec/SKILL.md +0 -155
  57. package/template/.claude/skills/30-plan/SKILL.md +0 -220
  58. package/template/.claude/skills/40-execute/SKILL.md +0 -161
  59. package/template/.claude/skills/50-verify/SKILL.md +0 -55
  60. package/template/.claude/skills/60-report/SKILL.md +0 -57
  61. package/template/.claude/skills/70-deliver/SKILL.md +0 -72
@@ -1,57 +0,0 @@
1
- ---
2
- name: 60-report
3
- description: "[devflow][D] Report stage in DevFlow 2.0 - produce standardized markdown summary report with retrospective lessons learned."
4
- argument-hint: "{running-id or workspace path}"
5
- ---
6
-
7
- # Phase 60: Report
8
-
9
- $ARGUMENTS
10
-
11
- Produce the final human-friendly summary of the full running flow in Markdown (`60-report.md`) with retrospective lessons learned, findings summary, and release digest.
12
-
13
- ## Usage
14
-
15
- ```text
16
- 60-report {running-id or workspace path}
17
- ```
18
-
19
- ## Markdown-First Contract
20
-
21
- Write the primary stage artifact to:
22
-
23
- ```text
24
- devflow/context/current-run/60-report.md
25
- ```
26
-
27
- > [!IMPORTANT]
28
- > **No Auto-Generated HTML**: ห้ามสร้างไฟล์ `60-report.html` แบบอัตโนมัติในขั้นตอนนี้! ระบบจะสร้างเฉพาะ `60-report.md` เท่านั้น หากต้องการดู HTML Report ให้เรียกคำสั่งแยก: `/report:html`
29
-
30
- ## Process
31
-
32
- ### 1. Gather Full Run Context & Verification Evidence
33
- Read all relevant stage artifacts:
34
- - `10-define.md`
35
- - `20-spec.md`
36
- - `30-plan.md`
37
- - `40-execute.md`
38
- - `50-verify.md`
39
-
40
- ### 2. Retrospective Lessons Learned & Gotchas (Insight Extraction)
41
- Extract durable insights from the completed run:
42
- - **Reusable Patterns**: Design choices or implementations that future runs should mirror.
43
- - **Gotchas & Pitfalls**: Unforeseen issues or quirks encountered during execution.
44
- - **Unresolved Follow-ups**: Route any residual out-of-scope ideas to `devflow/ideas.md`.
45
-
46
- ### 3. Produce Standardized Report (`60-report.md`)
47
- Structure the report in **Thai (`th`)**:
48
- 1. **Executive Summary**: ปัญหาและแนวทางแก้ไข
49
- 2. **Delivery Scope**: รายการฟีเจอร์และคอมโพเนนต์ที่ส่งมอบ
50
- 3. **Verification Evidence Snapshot**: ผลการทดสอบทุก Lane
51
- 4. **Retrospective & Lessons Learned**: บทเรียนและข้อควรระวัง
52
- 5. **Manual Try Guide**: ขั้นตอนสำหรับมนุษย์ทดสอบระบบ
53
-
54
- ## Next Workflow Recommendation
55
-
56
- - **Primary**: `70-deliver {ID}`
57
- - **Optional Standalone HTML**: `/report:html`
@@ -1,72 +0,0 @@
1
- ---
2
- name: 70-deliver
3
- description: "[devflow][D] Deliver stage in DevFlow 2.0 - package verified work for delivery, archive run to categorized history, git merge, PR, or deployment."
4
- argument-hint: "{running-id or workspace path}"
5
- ---
6
-
7
- # Phase 70: Deliver
8
-
9
- $ARGUMENTS
10
-
11
- Package approved work for delivery after the report stage has captured the final verified story. Archives the active run from `devflow/context/current-run/` to `devflow/history/{features|fixes|rollbacks}/{xxx-slug}/`, updates `HISTORY.md` and `CHANGELOG.md`, executes pre-flight smoke checks, performs conventional git commit & merge, and closes the run.
12
-
13
- ## Usage
14
-
15
- ```text
16
- 70-deliver {id or workspace path}
17
- ```
18
-
19
- ## Markdown-First Contract
20
-
21
- Write the primary stage artifact to:
22
-
23
- ```text
24
- devflow/context/current-run/70-deliver.md
25
- ```
26
-
27
- ## Process & Quality Gates
28
-
29
- ### 0. Step 0 Safety Pass & Findings Ledger Gate
30
-
31
- Before packaging, merging, or delivering:
32
-
33
- 1. **Findings Ledger Blockers**:
34
- - Inspect `devflow/context/findings.md`.
35
- - No Finding of severity `P0` or `P1` in `open` or `fixed` status is permitted.
36
- - `fixed` still blocks release until reviewed and closed in `50-verify`.
37
- 2. **Pre-flight & Deployment Smoke Validation**:
38
- - Verify environment variables and configuration parameters.
39
- - Run production build or package smoke check (`npm run build` or `npm run test:package`).
40
- - Validate that clean state exists with no untracked experimental files.
41
- 3. **2-Stage Approval Separation**:
42
- - Consent to merge into `main` is strictly separate from consent to `git push` to remote or deploy.
43
-
44
- ### 1. Changelog & SemVer Version Bump
45
-
46
- 1. Calculate next version according to **Semantic Versioning (SemVer)**:
47
- - `Major`: Breaking architectural changes, removed public APIs
48
- - `Minor`: New backward-compatible features added
49
- - `Patch`: Bug fixes, optimizations, documentation
50
- 2. Append new release entry to `CHANGELOG.md` in [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) format (`Added`, `Changed`, `Fixed`, `Removed`, `Security`).
51
-
52
- ### 2. Conventional Commit & Git Merge
53
-
54
- 1. Stage all release and tracking files.
55
- 2. Commit with conventional format: `chore(release): release {version}` or `feat({scope}): {summary}`.
56
- 3. Squash-merge to base branch (`main`) with explicit user approval.
57
-
58
- ### 3. Archive Run Folder to Categorized History
59
-
60
- 1. Determine Category (`features`, `fixes`, `rollbacks`).
61
- 2. Move directory `devflow/context/current-run/` ➔ `devflow/history/{category}/{xxx-slug}/`.
62
- 3. Clean resolved findings (`closed`, `accepted`, `invalid`) from `devflow/context/findings.md` and append to the release notes.
63
- 4. Append entry to `devflow/history/HISTORY.md` linking to `history/{category}/{xxx-slug}/60-report.md`.
64
-
65
- ### 4. Update Workspace State
66
-
67
- Set `devflow/context/current-stage.md` to:
68
- - `Active Discovery ID`: `None`
69
- - `Active Running ID`: `None (Idle)`
70
- - `Current Stage`: `Idle (Ready for new run)`
71
- - `Last Completed Run`: `{ID} ({YYYY-MM-DD})`
72
- - `Last Updated`: `{YYYY-MM-DD}`
@@ -1,54 +0,0 @@
1
- ---
2
- name: 10-define
3
- description: "[devflow][D] Define stage in DevFlow 2.0 - turn an approved discovery into a bounded delivery run in context/current-run with stable scope."
4
- argument-hint: "{approved discovery-id, discovery path, running-id, or run path}"
5
- ---
6
-
7
- # Phase 10: Define
8
-
9
- $ARGUMENTS
10
-
11
- Convert an approved `Proceed` discovery into a bounded delivery run. Checks the Single Active Run Guardrail, allocates a sequential ID without prefix (`xxx-slug`), and writes `devflow/context/current-run/10-define.md`.
12
-
13
- ## Usage
14
-
15
- ```text
16
- 10-define {discovery-id or discovery path}
17
- 10-define {id or run path}
18
- ```
19
-
20
- ## Markdown-First Contract
21
-
22
- For the active delivery run, write:
23
-
24
- ```text
25
- devflow/context/current-run/10-define.md
26
- ```
27
-
28
- using:
29
-
30
- ```text
31
- .agent/resources/schemas/define.template.md
32
- ```
33
-
34
- ## Process & Quality Gates
35
-
36
- ### 1. Single Active Run Guardrail (One Thing at a Time)
37
- 1. Inspect `devflow/context/current-stage.md`, `devflow/context/current-feature.md`, and `devflow/context/current-run/`.
38
- 2. If an active uncompleted run exists:
39
- - **HALT and reject opening a new define stage**.
40
- - Warn the user to complete or close the active run with `/complete` or `70-deliver` first.
41
-
42
- ### 2. Validate The Discovery Gate
43
- Require:
44
- - `Decision: Proceed`
45
- - `Approval Status: Approved`
46
- - A resolvable Discovery ID and `discovery.md` (or legacy `00-explore.md`)
47
-
48
- ### 3. Allocate Sequential ID
49
- - Inspect `devflow/history/HISTORY.md` and allocate sequential ID without prefix (e.g. `022-{slug}`).
50
- - Create directory `devflow/context/current-run/` if it does not exist.
51
- - Write `devflow/context/current-run/10-define.md`.
52
- - Update `devflow/context/current-stage.md`:
53
- - `Active Running ID`: `{ID}`
54
- - `Current Stage`: `10-define (Completed -> Ready for 20-spec)`
@@ -1,155 +0,0 @@
1
- ---
2
- name: 20-spec
3
- description: "[devflow][D] Spec stage in DevFlow 2.0 - write the formal markdown-first specification from a stable definition."
4
- argument-hint: "{running-id or workspace path}"
5
- ---
6
-
7
- # Phase 20: Spec
8
-
9
- $ARGUMENTS
10
-
11
- Turn the defined work into a specification that is concrete enough for planning and explicit enough to serve as the delivery contract.
12
-
13
- ## Usage
14
-
15
- ```text
16
- 20-spec {running-id or workspace path}
17
- ```
18
-
19
- Use this when:
20
-
21
- - the goal and scope are stable
22
- - the team needs testable or reviewable requirements
23
- - planning should not start until the contract is explicit
24
-
25
- ## Markdown-First Contract
26
-
27
- Write the primary stage artifact to:
28
-
29
- ```text
30
- devflow/runs/{ID}-{slug}20-spec.md
31
- ```
32
-
33
- using:
34
-
35
- ```text
36
- .agent/resources/schemas/spec.template.md
37
- ```
38
-
39
- Before writing `20-spec.md`, read `artifact_language` from `spec.template.md` and produce the artifact in that language.
40
-
41
- ## Required Section Content
42
-
43
- Before completing any generated artifact:
44
-
45
- - preserve every heading required by the selected template
46
- - write concrete information under every heading
47
- - when no information exists or the section does not apply, write exactly `-`
48
- - never leave a heading immediately followed by another heading with no body content
49
- - remove template placeholders from the final artifact
50
- - do not invent facts merely to avoid using `-`
51
- - re-read the saved artifact and verify every heading satisfies this rule
52
-
53
- ## Process
54
-
55
- ### Loop Contract
56
-
57
- Run specification as a contract-hardening loop, not as a prose expansion of the definition.
58
-
59
- - **Intent**: produce requirements and acceptance criteria that are concrete enough for planning and review.
60
- - **Context**: read the run's `10-define.md`, follow its `source_discovery` link when original framing matters, and read relevant research, hard constraints, and domain or codebase decisions that shape this run's delivery contract.
61
- - **Action**: write requirements, acceptance criteria, constraints, and out-of-scope items, then inspect whether each requirement is testable and unambiguous.
62
- - **Observation**: use concrete evidence such as ambiguous wording, unchecked assumptions, edge cases, missing acceptance criteria, conflicting constraints, and implementation details that are not true constraints.
63
- - **Adjustment**: if facts are missing, route to `Research`; if requirements need stress-testing, use `grill-with-docs`; if module or interface boundaries affect the contract, use `codebase-design`; if scope is unstable or still contains multiple independently deliverable contracts, return to `10-define` and split the run before continuing.
64
- - **Stop Condition**: stop when every requirement has checkable acceptance criteria, hard constraints are explicit, out-of-scope items are visible, and `30-plan` can break the work down without inventing intent.
65
- - **Handoff**: `20-spec.md` must tell `30-plan` what must be delivered, how success will be checked, what constraints cannot move, and what is intentionally excluded.
66
-
67
- ### 1. Read Definition Artifacts
68
-
69
- Read:
70
-
71
- - `10-define.md`
72
- - the shared `00-explore.md` referenced by `source_discovery` when the original framing still matters
73
- - research notes if they impose real constraints
74
-
75
- ### 2. Write The Specification
76
-
77
- Define:
78
-
79
- - core requirements
80
- - acceptance criteria
81
- - hard constraints
82
- - explicit out-of-scope items
83
-
84
- The spec should be strong enough that planning can break it into executable units without guessing intent.
85
-
86
- ### 3. Handle Missing Certainty
87
-
88
- If the spec cannot be written confidently:
89
-
90
- - call `Research` when facts are missing
91
- - use `grill-with-docs` when requirements, acceptance criteria, constraints, or out-of-scope items need to be stress-tested against scenarios and domain language
92
- - use `codebase-design` when requirements imply module boundaries, interface contracts, seams, or testability constraints
93
- - record assumptions explicitly when they are unavoidable
94
-
95
- Do not hide uncertainty inside vague requirement text.
96
-
97
- Do not combine sibling Running IDs into one spec. If this run still contains multiple independent acceptance, release, ownership, or context boundaries, stop and return to `10-define {running_id}` for an explicit split.
98
-
99
- ### 4. Finalize `20-spec.md`
100
-
101
- - preserve the template headings
102
- - follow the `artifact_language` configured in `spec.template.md`
103
- - replace all placeholders
104
- - keep implementation details out unless they are true constraints
105
- - make sure the acceptance criteria can actually be checked
106
-
107
- ### 5. Manual Review Soft Gate
108
-
109
- Before recommending `30-plan`, check whether the delivery contract has been human-reviewed.
110
- If `Approval Status` is not approved yet:
111
-
112
- - warn that planning may drift if the spec is still under review
113
- - recommend review of requirements, exclusions, and acceptance criteria first
114
- - keep `30-plan` as a soft recommendation only
115
-
116
- ## Output
117
-
118
- Report:
119
-
120
- - core requirements
121
- - acceptance criteria
122
- - hard constraints
123
- - out-of-scope items
124
- - manual review warnings when the contract is still pending
125
- - recommended next step
126
-
127
- ## Relationship To DevFlow 2.0
128
-
129
- - Classification: Mainline workflow
130
- - Previous state: `10-define`
131
- - Next state: `30-plan` when the contract is implementation-ready
132
- - Common companion commands: `PRD`, `Spec-Research`, `Competitor`, `Spec-Orchestrate` when product or integration context is still incomplete; support skills: `grill-with-docs`, `domain-modeling`, and `codebase-design` when the spec depends on precise domain language, durable decisions, or module/interface constraints
133
-
134
- ## Sources
135
-
136
- - `AGENTS.md`
137
- - `docs/workspace-artifacts.md`
138
- - `.agent/resources/schemas/spec.template.md`
139
- - Related commands: `10-define`, `PRD`, `Spec-Research`, `Competitor`, `Spec-Orchestrate`, `30-plan`
140
-
141
- ## Next Workflow Recommendation
142
-
143
- - **Primary**: `30-plan`
144
- - **Why**: The specification is now concrete enough to break into executable work.
145
- - **Alternatives**:
146
- - `Research` - choose this when the spec still depends on missing facts.
147
- - `grill-with-docs` - choose this when the spec is readable but not yet tough enough to plan from.
148
- - `codebase-design` - choose this when interface shape or testability constraints must be settled before planning.
149
- - `10-define` - choose this when the scope itself is still unstable.
150
-
151
- ## Nexus Event
152
-
153
- - Use `Research` when a requirement, rule, or integration constraint still lacks evidence.
154
- - Use `Spec-Research`, `Competitor`, or `PRD` when the contract needs stronger external, product, or market framing before planning.
155
- - Use `grill-with-docs` when available if clarification could materially change acceptance criteria, edge cases, exclusions, or rules.
@@ -1,220 +0,0 @@
1
- ---
2
- name: 30-plan
3
- description: "[devflow][D] Plan stage in DevFlow 2.0 - transform 20-spec.md into an executable task breakdown with test decisions."
4
- ---
5
- # Phase 30: Plan Implementation
6
-
7
- **Strict mode: planning only. Do not edit source code in this phase.**
8
-
9
- Create a codebase-informed implementation plan using `30-plan.md` as the primary artifact in DevFlow 2.0.
10
-
11
- ## Usage
12
-
13
- ```text
14
- 30-plan {ID}
15
- ```
16
-
17
- ## Markdown-First Contract
18
-
19
- Use `30-plan.md` as the main planning artifact.
20
-
21
- Use controlled task-engine commands when plan status or subtask tracking must be synchronized:
22
-
23
- Record complexity, context, phases, subtasks, and validation notes directly in the stage markdown files for this running ID. Treat `30-plan.md` as the source of truth.
24
-
25
- **MANDATORY RULE:** If you create temporary script files (e.g. `.ps1`, `.sh`) to execute multiple compatibility commands in batch, save them inside the task workspace, never in the central `scripts/` directory.
26
-
27
- ## Required Section Content
28
-
29
- Before completing any generated artifact:
30
-
31
- - preserve every heading required by the selected template
32
- - write concrete information under every heading
33
- - when no information exists or the section does not apply, write exactly `-`
34
- - never leave a heading immediately followed by another heading with no body content
35
- - remove template placeholders from the final artifact
36
- - do not invent facts merely to avoid using `-`
37
- - re-read the saved artifact and verify every heading satisfies this rule
38
-
39
- ## Process
40
-
41
- ### Loop Contract
42
-
43
- Run planning as an evidence loop, not as a one-shot outline.
44
-
45
- - **Intent**: produce a plan that lets implementation proceed without guessing scope, files, risks, or verification.
46
- - **Context**: read the spec, prior stage artifacts, relevant code/docs, existing commands, and any research that constrains execution.
47
- - **Action**: draft the smallest useful plan, then inspect whether every phase has files, dependencies, risks, verification, and a test decision.
48
- - **Observation**: use concrete evidence such as file paths, existing patterns, package scripts, validation commands, and unresolved assumptions.
49
- - **Adjustment**: if evidence is missing, search/read more, recommend `Research` or `Agent codebase-explorer`, split the work, or route back to `20-spec` when the contract is not plan-ready.
50
- - **Stop Condition**: stop only when phases are ordered, subtasks are scoped, verification is explicit, test decisions are recorded, and any blockers are visible.
51
- - **Handoff**: `30-plan.md` must give `40-execute` enough context to select one scoped unit and execute it without inventing intent.
52
-
53
- ### 1. Read Task Artifacts
54
-
55
- Read:
56
-
57
- - `devflow/runs/{ID}-*20-spec.md`
58
- - `10-define.md` and the shared `00-explore.md` referenced by `source_discovery` when they help clarify intent
59
-
60
- ### 2. Assess Complexity
61
-
62
- Use the old planning discipline:
63
-
64
- - `simple`: 1 phase, 1-3 subtasks
65
- - `standard`: multiple ordered phases with clear verification
66
- - `complex`: deeper codebase exploration, possibly specialist help
67
-
68
- If architecture or data flow is still unclear, recommend `Research` or `Agent codebase-explorer` before pretending the plan is stable.
69
- If domain terms, boundaries, or hard-to-reverse design choices are still questionable, use `grill-with-docs` before locking the plan.
70
- Use `codebase-design` when phases depend on seam placement or module interfaces. Use `tdd` when behavior-change subtasks need red-green-refactor test cases.
71
-
72
- ### 3. Explore Codebase Patterns
73
-
74
- Use fast searches (`rg`, file reads) to find:
75
-
76
- - similar implementations
77
- - entry points
78
- - config and test commands
79
- - files likely to change
80
- - patterns that implementation should mirror
81
-
82
- Record important findings in `30-plan.md`. Use legacy context updates only when compatibility tooling still needs them.
83
-
84
- ### 4. Build The Plan
85
-
86
- Use the old planner discipline, but keep `30-plan.md` as the main contract:
87
-
88
- - record the planning loop evidence: context read, observations, adjustments made, stop condition, and handoff notes
89
- - add phases in dependency order
90
- - add subtasks that are small, verifiable units
91
- - include explicit files to modify or create
92
- - include patterns to follow
93
- - include verification command or manual check
94
- - include a test decision for every subtask
95
- - record assumptions, scope boundaries, and risks explicitly
96
-
97
- Each subtask should answer:
98
-
99
- - what to change
100
- - where to change it
101
- - which pattern to follow
102
- - how to verify it
103
- - whether automated tests are required, manual, or not required
104
-
105
- ### 4.1 Test Decision Gate
106
-
107
- **STRICT MANDATE (กฎเหล็ก Unit Test)**: สำหรับทุก subtask ที่มีการเพิ่ม แก้ไข หรือเปลี่ยนแปลงการทำงานของโค้ด (Behavior Change) **ต้องระบุเป็น `Required` เสมอ** ห้ามละเว้นเด็ดขาด ยกเว้นงานประเภทเอกสารหรือแก้ไข Configuration เท่านั้น
108
-
109
- For every subtask, decide one of:
110
-
111
- - `Required`: automated tests must be created or updated (Mandatory for all behavior changes)
112
- - `Manual/Command Only`: verification is non-test but still explicit (Only for configuration/infrastructure tasks)
113
- - `Not Required`: no new automated test is needed because there is no meaningful behavior surface (Only for documentation/comments)
114
-
115
- Record:
116
-
117
- - reason
118
- - planned cases when tests are required (using AAA pattern: Arrange-Act-Assert)
119
- - verification command or manual check
120
- - expected result
121
-
122
- Do not use "too simple" as the only reason for skipping tests.
123
-
124
- ### 5. Create Human-Readable Plan
125
-
126
- Create `30-plan.md` in the task workspace and base its structure on:
127
-
128
- ```text
129
- .agent/resources/schemas/plan.template.md
130
- ```
131
-
132
- Before writing `30-plan.md`, read `artifact_language` from `plan.template.md` and produce the artifact in that language.
133
-
134
- Before reporting completion:
135
-
136
- Review `{plan_md_path}` against `plan.template.md`, keep the required headings, and remove placeholder text before completion.
137
-
138
- Replace every placeholder with concrete phases, files, commands, dependencies, and verification evidence.
139
- Follow the `artifact_language` configured in `plan.template.md` for all plan narrative text.
140
-
141
- Create the checklist directory when detailed execution tracking is needed:
142
-
143
- ```text
144
- devflow/runs/{ID}-*/checklists/
145
- ```
146
-
147
- Seed at least:
148
-
149
- - `implementation-checklist.md`
150
- - `verification-checklist.md`
151
-
152
- Use the schema templates under `.agent/resources/schemas/` and turn approved phases/subtasks into live markdown checklist items using task markers such as `- [ ]`, `- [/]`, `- [!]`, and `- [-]` so humans can follow the run without reading the full planning narrative.
153
-
154
- ### 6. Validate And Close Planning
155
-
156
- Run:
157
-
158
- Run `npm run validate` after changing the framework, templates, or shared references. For task work, manually verify that `30-plan.md` still matches the required template contract.
159
-
160
- If validation fails, repair only what is necessary and keep `30-plan.md` aligned with the corrected state.
161
-
162
- ### 7. Manual Review Soft Gate
163
-
164
- Before recommending `40-execute`, check whether the plan still shows pending review.
165
- If `Approval Status` is still pending or major dependencies remain unresolved:
166
-
167
- - warn that implementation should wait for review
168
- - recommend human confirmation of sequencing, scope, and verification strategy
169
- - keep `40-execute` as a soft recommendation only
170
-
171
- ## Output Checklist
172
-
173
- - complexity is clear
174
- - loop evidence is recorded: intent, context, observation, adjustment, stop condition, and handoff
175
- - phases are ordered by dependency
176
- - every subtask is scoped and verifiable
177
- - every subtask has a test decision
178
- - `30-plan.md` is written and reviewable
179
- - validation passes
180
- - manual review warning is explicit when approval is still pending
181
- - next command is ready
182
-
183
- ## Relationship To DevFlow 2.0
184
-
185
- - Classification: Mainline workflow
186
- - Previous state: `20-spec`
187
- - Next state: `40-execute` when execution steps and verification are clear
188
- - Common companion commands: `Research` or `Agent` when architecture, data flow, or external constraints still need investigation; support skills: `grill-with-docs`, `domain-modeling`, `codebase-design`, `tdd`, and `to-issues` for final design stress-testing, durable terminology capture, test planning, and issue packaging
189
-
190
- ## Sources
191
-
192
- - `AGENTS.md`
193
- - `docs/workspace-artifacts.md`
194
- - `.agent/resources/schemas/plan.template.md`
195
- - Related commands: `20-spec`, `Research`, `Agent`, `40-execute`
196
-
197
- ## Next Workflow Recommendation
198
-
199
- - **Primary**: `40-execute {ID}`
200
- - **Why**: Approved planning is the gate before implementation in DevFlow 2.0.
201
- - **Alternatives**:
202
- - `Research` - choose this when the plan still depends on missing evidence.
203
- - `Agent codebase-explorer devflow/runs/{ID}-*/` - choose this when architecture or data flow is unclear.
204
- - `grill-with-docs` - choose this when plan assumptions or design boundaries need one last adversarial pass.
205
- - `codebase-design` - choose this when a plan needs clearer seams, interfaces, or test surfaces.
206
- - `20-spec {ID}` - choose this when the spec itself is not strong enough for planning.
207
-
208
- ## Nexus Event
209
-
210
- - Use `Research` when architecture, sequencing, or rollout decisions still depend on missing evidence.
211
- - Use `Agent codebase-explorer` or another specialist lane when the codebase shape or integration boundary is still unclear.
212
- - Use `grill-with-docs` when available if a short clarification pass could materially change sequencing, dependency order, rollout risk, or verification strategy.
213
-
214
- ## Wiki Update Recommendation
215
-
216
- - **Needed**: `yes` when planning records a reusable architecture decision, project pattern, or context-loading lesson.
217
- - **Scope**: `project` unless the planning lesson changes DevFlow framework behavior.
218
- - **Reason**: Plans often discover stable patterns that future sessions should reuse.
219
- - **Suggested Command**: `Wiki project ingest devflow/runs/{ID}-*30-plan.md`
220
-