ai-workflow-init 2.0.0 → 3.0.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.
@@ -1,22 +1,31 @@
1
- Compare current implementation against planning and implementation notes.
2
-
3
- ## Workflow Alignment
4
- - Provide brief status updates (1–3 sentences) before/after important actions.
5
- - Provide a high-signal summary at completion highlighting key mismatches and next steps.
6
-
7
- 1) Ask me for:
8
- - Feature name (if not provided)
9
- - Then locate docs by feature name:
10
- - Planning: `docs/ai/planning/feature-{name}.md`
11
- - Implementation (optional): `docs/ai/implementation/feature-{name}.md`
12
-
13
- 2) Validation Scope (no inference):
14
- - Verify code follows the acceptance criteria from the planning doc
15
- - Verify code matches the steps/changes in the implementation notes (when present)
16
- - Do NOT invent or infer alternative logic beyond what the docs specify
17
-
18
- 3) Output
19
- - List concrete mismatches between code and docs
20
- - List missing pieces the docs require but code lacks
21
- - Short actionable next steps
22
-
1
+ ---
2
+ name: check-implementation
3
+ description: Validates implementation against planning doc.
4
+ ---
5
+
6
+ Compare current implementation against planning doc.
7
+
8
+ ## Workflow Alignment
9
+
10
+ - Provide brief status updates (1–3 sentences) before/after important actions.
11
+ - Provide a high-signal summary at completion highlighting key mismatches and next steps.
12
+
13
+ 1. Ask me for:
14
+
15
+ - Feature name (if not provided)
16
+ - Then locate planning doc by feature name:
17
+ - Planning: `docs/ai/planning/feature-{name}.md`
18
+
19
+ 2. Validation Scope (no inference):
20
+
21
+ - Verify code follows the acceptance criteria from the planning doc
22
+ - Verify code matches the steps/changes in the implementation plan phases
23
+ - Check that completed tasks (marked `[x]`) have corresponding code changes
24
+ - Do NOT invent or infer alternative logic beyond what the docs specify
25
+
26
+ 3. Output
27
+
28
+ - List concrete mismatches between code and planning doc
29
+ - List missing pieces the planning doc requires but code lacks
30
+ - List tasks marked complete `[x]` but code not implemented
31
+ - Short actionable next steps
@@ -1,132 +1,136 @@
1
- ## Goal
2
-
3
- Generate a planning doc at `docs/ai/planning/feature-{name}.md` using the template, with minimal, actionable content aligned to the 4-phase workflow. Also initialize the implementation doc at `docs/ai/implementation/feature-{name}.md` based on the implementation template.
4
-
5
- ## Workflow Alignment
6
-
7
- - Provide brief status updates (1–3 sentences) before/after important actions.
8
- - For medium/large tasks, create todos (≤14 words, verb-led). Keep only one `in_progress` item.
9
- - Update todos immediately after progress; mark completed upon finish.
10
-
11
- ## Step 1: Clarify Scope (Focused Q&A Guidelines)
12
-
13
- Purpose: the agent MUST generate a short, numbered Q&A for the user to clarify scope; keep it relevant, avoid off-topic, and do not build a static question bank.
14
-
15
- Principles:
16
-
17
- - Quickly classify context: a) Micro-UI, b) Page/Flow, c) Service/API/Data, d) Cross-cutting.
18
- - Ask only what is missing to produce Goal, Tasks, Risks, and DoD. Keep to 3–7 questions.
19
- - Do not re-ask what the user already stated; if ambiguous, confirm briefly (yes/no or single choice).
20
- - Keep each question short and single-purpose; avoid multi-part questions.
21
- - Answers may be a/b/c or free text; the agent is not required to present fixed option lists.
22
-
23
- Output format for Q&A:
24
-
25
- - Number questions sequentially starting at 1 (e.g., "1.", "2.").
26
- - Under each question, provide 2–4 suggested options labeled with lowercase letters + ")" (e.g., "a)", "b)").
27
- - Keep options short (≤7 words) and add an "other" when useful.
28
- - Example:
29
- 1. UI library?
30
- a) TailwindCSS b) Bootstrap c) SCSS d) Other
31
-
32
- Scope checklist to cover (ask only missing items, based on context):
33
-
34
- 1. Problem & Users: the core problem and target user groups.
35
- 2. In-scope vs Out-of-scope: what is included and excluded (e.g., MVP, no i18n, no payments).
36
- 3. Acceptance Criteria (GWT): 2–3 key Given–When–Then scenarios.
37
- 4. Constraints & Dependencies: technical constraints, libraries, real API vs mock, deadlines, external deps.
38
- 5. Risks & Assumptions: known risks and key assumptions.
39
- 6. Tasks Overview: 3–7 high-level work items.
40
- 7. Definition of Done: completion criteria (build/test/docs/review).
41
-
42
- Adaptive behavior:
43
-
44
- - Always reduce questions to what is necessary; once Goal/Tasks/Risks/DoD can be written, stop asking.
45
- - Prioritize clarifying scope and acceptance criteria before implementation details.
46
- - If the user already specified items (framework, API/Mock, deadlines, etc.), confirm briefly only.
47
-
48
- Then collect inputs (after Q&A):
49
-
50
- - Feature name (kebab-case, e.g., `user-authentication`)
51
- - Short goal and scope
52
- - High-level tasks overview (3–7 items)
53
- - Definition of Done (build/test/review/docs)
54
-
55
- ## Step 2: Load Templates
56
-
57
- **Before creating docs, read the following files:**
58
-
59
- - `docs/ai/planning/feature-template.md` - Template structure to follow
60
- - `docs/ai/implementation/feature-template.md` - Template structure to follow for the implementation doc
61
-
62
- This template defines the required structure and format. Use it as the baseline for creating the planning doc.
63
-
64
- ## Step 3: Draft the Plan (auto-generate)
65
-
66
- Using the Q&A results and templates, immediately generate the plan without asking for confirmation.
67
-
68
- Auto-name feature:
69
-
70
- - Derive `feature-{name}` from user prompt + Q&A (kebab-case, concise, specific).
71
- - Example: "Login Page (HTML/CSS)" → `feature-login-page`.
72
- - If a file with the same name already exists, append a numeric suffix: `feature-{name}-2`, `feature-{name}-3`, ...
73
-
74
- ### 3a: Generate Planning Doc
75
-
76
- Produce a Markdown doc following `docs/ai/planning/feature-template.md`:
77
-
78
- - Match sections from template
79
- - Fill in content from Q&A inputs
80
- - Ensure all required sections are present
81
-
82
- ### 3b: Generate Implementation Doc with Phases
83
-
84
- Before creating implementation doc, read `docs/ai/implementation/feature-template.md` to understand phase structure.
85
-
86
- **Estimate phase scope**:
87
- - Count total tasks from planning doc
88
- - If tasks ≤ 5: use single phase named "Core Implementation"
89
- - If tasks 6–12: suggest 2–3 phases (group by feature area or dependency order)
90
- - If tasks > 12: suggest 3–5 phases; prioritize logical grouping
91
-
92
- **For each phase, generate**:
93
- - Phase name (descriptive, e.g., "Database Schema Setup", "API Endpoints", "UI Components")
94
- - Tasks list: `[ ] [ACTION] path/to/file Summary`
95
- - Pseudo-code outline (show logic structure, not real code):
96
- ```
97
- Pseudo-code:
98
- - [Step 1]: what will be done
99
- - [Step 2]: validation or check
100
- - [Step 3]: data storage/return
101
- ```
102
-
103
- **Pseudo-code guidelines**:
104
- - Keep to 3–5 lines per task
105
- - Show inputs, key logic, outputs
106
- - Use natural language, not actual syntax
107
- - Example for "Create user endpoint":
108
- ```
109
- Pseudo-code:
110
- - Parse username + password from request
111
- - Validate password strength
112
- - Hash password with bcrypt
113
- - Store user in database
114
- - Return success + user ID
115
- ```
116
-
117
- Create the following files automatically:
118
-
119
- - `docs/ai/planning/feature-{name}.md` - Use structure from `feature-template.md`
120
- - `docs/ai/implementation/feature-{name}.md` - Use phase structure with pseudo-code per task
121
-
122
- Notify the user when done with summary: "Created plan with X phases: Phase 1 (name), Phase 2 (name), ..."
123
-
124
- ## Step 4: Next Actions
125
-
126
- Suggest running `execute-plan` to begin task execution. Implementation work will be driven from `docs/ai/implementation/feature-{name}.md` as the task source.
127
- Note: Test documentation will be created separately using the `writing-test` command.
128
-
129
- ## Notes
130
-
131
- - This command creates the planning doc and initializes the implementation doc; it does not modify unrelated existing files.
132
- - Idempotent: safe to re-run; auto-appends numeric suffix if files exist.
1
+ ---
2
+ name: create-plan
3
+ description: Generates a feature planning doc with implementation details.
4
+ ---
5
+
6
+ ## Goal
7
+
8
+ Generate a single planning doc at `docs/ai/planning/feature-{name}.md` using the template, with goal, acceptance criteria, risks, and detailed implementation phases with pseudo-code.
9
+
10
+ ## Workflow Alignment
11
+
12
+ - Provide brief status updates (1–3 sentences) before/after important actions.
13
+ - For medium/large tasks, create todos (≤14 words, verb-led). Keep only one `in_progress` item.
14
+ - Update todos immediately after progress; mark completed upon finish.
15
+
16
+ ## Step 1: Clarify Scope (Focused Q&A Guidelines)
17
+
18
+ Purpose: the agent MUST generate a short, numbered Q&A for the user to clarify scope; keep it relevant, avoid off-topic, and do not build a static question bank.
19
+
20
+ Principles:
21
+
22
+ - Quickly classify context: a) Micro-UI, b) Page/Flow, c) Service/API/Data, d) Cross-cutting.
23
+ - Ask only what is missing to produce Goal, Tasks, Risks, and DoD. Keep to 3–7 questions.
24
+ - Do not re-ask what the user already stated; if ambiguous, confirm briefly (yes/no or single choice).
25
+ - Keep each question short and single-purpose; avoid multi-part questions.
26
+ - Answers may be a/b/c or free text; the agent is not required to present fixed option lists.
27
+
28
+ Output format for Q&A:
29
+
30
+ - Number questions sequentially starting at 1 (e.g., "1.", "2.").
31
+ - Under each question, provide 2–4 suggested options labeled with lowercase letters + ")" (e.g., "a)", "b)").
32
+ - Keep options short (≤7 words) and add an "other" when useful.
33
+ - Example:
34
+ 1. UI library?
35
+ a) TailwindCSS b) Bootstrap c) SCSS d) Other
36
+
37
+ Scope checklist to cover (ask only missing items, based on context):
38
+
39
+ 1. Problem & Users: the core problem and target user groups.
40
+ 2. In-scope vs Out-of-scope: what is included and excluded (e.g., MVP, no i18n, no payments).
41
+ 3. Acceptance Criteria (GWT): 2–3 key Given–When–Then scenarios.
42
+ 4. Constraints & Dependencies: technical constraints, libraries, real API vs mock, deadlines, external deps.
43
+ 5. Risks & Assumptions: known risks and key assumptions.
44
+ 6. Tasks Overview: 3–7 high-level work items.
45
+ 7. Definition of Done: completion criteria (build/test/docs/review).
46
+
47
+ Adaptive behavior:
48
+
49
+ - Always reduce questions to what is necessary; once Goal/Tasks/Risks/DoD can be written, stop asking.
50
+ - Prioritize clarifying scope and acceptance criteria before implementation details.
51
+ - If the user already specified items (framework, API/Mock, deadlines, etc.), confirm briefly only.
52
+
53
+ Then collect inputs (after Q&A):
54
+
55
+ - Feature name (kebab-case, e.g., `user-authentication`)
56
+ - Short goal and scope
57
+ - High-level tasks overview (3–7 items)
58
+ - Definition of Done (build/test/review/docs)
59
+
60
+ ## Step 2: Load Template
61
+
62
+ **Before creating the plan doc, read the following file:**
63
+
64
+ - `docs/ai/planning/feature-template.md` - Template structure to follow
65
+
66
+ This template defines the required structure and format. Use it as the baseline for creating the planning doc.
67
+
68
+ ## Step 3: Draft the Plan (auto-generate)
69
+
70
+ Using the Q&A results and template, immediately generate the plan without asking for confirmation.
71
+
72
+ Auto-name feature:
73
+
74
+ - Derive `feature-{name}` from user prompt + Q&A (kebab-case, concise, specific).
75
+ - Example: "Login Page (HTML/CSS)" → `feature-login-page`.
76
+ - If a file with the same name already exists, append a numeric suffix: `feature-{name}-2`, `feature-{name}-3`, ...
77
+
78
+ ### Generate Single Planning Doc
79
+
80
+ Produce a Markdown doc following `docs/ai/planning/feature-template.md` with all 5 sections:
81
+
82
+ 1. **Goal & Acceptance Criteria**: Brief goal + Given-When-Then scenarios
83
+ 2. **Risks & Assumptions**: Known risks and key assumptions
84
+ 3. **Definition of Done**: Build/test/review/docs checklist
85
+ 4. **Implementation Plan**:
86
+ - Summary: Brief description of solution approach (1-3 sentences)
87
+ - Phases: Detailed tasks with pseudo-code
88
+ 5. **Follow-ups**: TODOs or deferred work
89
+
90
+ **Estimate phase scope**:
91
+ - Count total tasks from Q&A
92
+ - If tasks ≤ 5: use single phase named "Core Implementation"
93
+ - If tasks 6–12: suggest 2–3 phases (group by feature area or dependency order)
94
+ - If tasks > 12: suggest 3–5 phases; prioritize logical grouping
95
+
96
+ **For each phase, generate**:
97
+ - Phase name (descriptive, e.g., "Database Schema Setup", "API Endpoints", "UI Components")
98
+ - Tasks list: `[ ] [ACTION] path/to/file Summary`
99
+ - Pseudo-code outline (show logic structure, not real code):
100
+ ```
101
+ Pseudo-code:
102
+ - [Step 1]: what will be done
103
+ - [Step 2]: validation or check
104
+ - [Step 3]: data storage/return
105
+ ```
106
+
107
+ **Pseudo-code guidelines**:
108
+ - Keep to 3–5 lines per task
109
+ - Show inputs, key logic, outputs
110
+ - Use natural language, not actual syntax
111
+ - Example for "Create user endpoint":
112
+ ```
113
+ Pseudo-code:
114
+ - Parse username + password from request
115
+ - Validate password strength
116
+ - Hash password with bcrypt
117
+ - Store user in database
118
+ - Return success + user ID
119
+ ```
120
+
121
+ Create the file automatically:
122
+
123
+ - `docs/ai/planning/feature-{name}.md` - Use complete structure from `feature-template.md`
124
+
125
+ Notify the user when done with summary: "Created plan with X phases: Phase 1 (name), Phase 2 (name), ..."
126
+
127
+ ## Step 4: Next Actions
128
+
129
+ Suggest running `execute-plan` to begin task execution. Implementation work will be driven from `docs/ai/planning/feature-{name}.md` as the task source.
130
+
131
+ Note: Test documentation will be created separately using the `writing-test` command.
132
+
133
+ ## Notes
134
+
135
+ - This command creates a single planning doc with both overview and implementation details.
136
+ - Idempotent: safe to re-run; auto-appends numeric suffix if files exist.
@@ -1,156 +1,141 @@
1
- ## Goal
2
-
3
- Execute the feature plan by implementing tasks from the implementation doc and persisting notes to docs.
4
-
5
- ## Workflow Alignment
6
-
7
- - Provide brief status updates (1–3 sentences) before each operation.
8
- - For medium/large tasks, create todos (≤14 words, verb-led). Keep only one `in_progress` item.
9
- - Update todos immediately after progress; mark completed upon finish.
10
- - Perform edits via file editing tools, not by printing code for copy-paste.
11
-
12
- ### Prerequisites
13
-
14
- - Feature name (kebab-case, e.g., `user-authentication`)
15
- - Implementation doc exists: `docs/ai/implementation/feature-{name}.md`
16
- - Planning doc exists: `docs/ai/planning/feature-{name}.md` (reference only; tasks are driven by implementation doc)
17
-
18
- ## Step 1: Gather Context
19
-
20
- - Ask for feature name if not provided (must be kebab-case).
21
- - Load implementation doc: `docs/ai/implementation/feature-{name}.md`.
22
- - **Load template:** Read `docs/ai/implementation/feature-template.md` to understand required structure.
23
-
24
- ### 1a: Phase Progress Detection
25
-
26
- If implementation doc exists, scan for phase markers (`### Phase X:`):
27
-
28
- - **Count total phases** in the document
29
- - **Detect last completed phase**: Find the highest phase where ALL tasks (checkbox `[x]`) are marked complete
30
- - **Detect current phase**: Find the first phase with incomplete tasks (`[ ]` marks)
31
- - **Show summary to user**:
32
-
33
- ```
34
- Found 3 phases.
35
- - Phase 1 (Database Setup): Complete [x]
36
- - Phase 2 (API Endpoints): In Progress [2/4 tasks done]
37
- - Phase 3 (Frontend): Not Started
38
-
39
- Resuming Phase 2...
40
- ```
41
-
42
- If no phases detected (old format):
43
-
44
- - Treat entire "Changes" section as single phase (backward compatible)
45
-
46
- ## Step 2: Build Task Queue
47
-
48
- - Parse tasks (checkboxes `[ ]`, `[x]`) from **current phase only** (from phase detection in Step 1a):
49
- - Primary source: Tasks under `### Phase X:` with `[ ] [ACTION] ...` entries (incomplete only).
50
- - For `[MODIFIED]` files, parse sub-bullets representing distinct logic items with line ranges.
51
- - **Skip completed phases** entirely (do not re-execute)
52
- - Build prioritized task queue (top-to-bottom unless dependencies block).
53
- - Identify blocked tasks and note reasons.
54
-
55
- Note: Do not include Follow-ups section unless explicitly in current phase.
56
-
57
- ## Step 3: Implement Iteratively (per task)
58
-
59
- For each task in queue:
60
-
61
- 1. **Status update**: Brief note (1–3 sentences) on what will be done.
62
- 2. Plan minimal change set:
63
- - Identify files/regions to modify
64
- - Map changes to acceptance criteria from plan (reference if needed)
65
- 3. Implement changes:
66
- - Write/edit code according to the implementation doc entries (`[ACTION]` items)
67
- - Keep changes minimal and incremental
68
- - Avoid speculative changes beyond implementation scope
69
- 4. Quick validation:
70
- - Run build/compile if available
71
- - Run fast unit/smoke tests if available
72
- - Fix immediate issues before proceeding
73
- 5. Persist notes to implementation doc:
74
- - File: `docs/ai/implementation/feature-{name}.md`
75
- - Update the relevant `[ ]` entry to `[x]` when completed
76
- - For `MODIFIED` files with sub-bullets, mark each completed sub-bullet `[x]`
77
- - Include line ranges and concise summaries as per template
78
- 6. Update implementation doc:
79
- - Mark completed tasks `[x]` with brief notes
80
- - Mark blocked tasks with reason
81
- - Do not mirror completion state in the planning doc
82
-
83
- ## Step 4: Implementation Doc Structure
84
-
85
- **Before creating the implementation doc, ensure you have read:**
86
-
87
- - `docs/ai/implementation/feature-template.md` - Template structure to follow
88
-
89
- If creating implementation doc for the first task (should already exist from create-plan):
90
-
91
- - Use the structure from `feature-template.md` exactly
92
- - Ensure these sections exist:
93
- - `# Implementation Notes: {Feature Name}`
94
- - `## Summary` - Brief description of overall approach
95
- - `## Changes` Use `[ ] [ACTION] ...` format with allowed actions ADDED | MODIFIED | DELETED | RENAMED
96
- - For MODIFIED, use sub-bullets with line ranges and per-logic summaries
97
- - `## Edge Cases` - List of handled edge cases
98
- - `## Follow-ups` - TODOs or deferred work
99
- - `## Execution Discipline`
100
-
101
- ## Step 5: Quality Checks
102
-
103
- After completing Step 4 for each task batch:
104
-
105
- - Detect available tools from project config (e.g., `package.json`, `pyproject.toml`, `go.mod`, `Cargo.toml`, build files) and run the appropriate non-interactive checks.
106
- - Linting on changed files (prefer non-interactive):
107
- - JavaScript/TypeScript: `npx eslint .` or `pnpm eslint .` (add `--max-warnings=0` if desired)
108
- - Python: `ruff .` or `flake8 .`
109
- - Go: `golangci-lint run` or `go vet ./...`
110
- - Rust: `cargo clippy -- -D warnings`
111
- - Java: `./gradlew check` or `mvn -q -DskipTests=false -Dspotbugs.failOnError=true verify`
112
- - Scope to changed files when possible for speed
113
- - Type checks (non-emitting where applicable):
114
- - TypeScript: `npx tsc --noEmit`
115
- - Python: `mypy .` (if configured) or `pyright` if present
116
- - Go/Rust/Java: rely on compiler/type system via build step
117
- - Parallelize lint and type-check when safe; fix issues (up to 3 attempts) before proceeding.
118
-
119
- ## Step 6: Phase Completion Check (NEW)
120
-
121
- After completing all tasks in current phase:
122
-
123
- 1. **Mark phase complete** in implementation doc (optional visual marker)
124
- 2. **Check remaining phases**:
125
- - If more incomplete phases exist:
126
- ```
127
- Phase 2 complete!
128
- Ready for Phase 3 (Frontend)?
129
- Run: /execute-plan
130
- ```
131
- - If this is final phase:
132
- ```
133
- All phases complete!
134
- Ready for code review?
135
- Run: /code-review
136
- ```
137
-
138
- ## Step 7: Next Actions
139
-
140
- After all phases complete:
141
-
142
- - Suggest running `code-review` to verify against standards
143
- - Suggest running `writing-test` if edge cases need coverage
144
- - Suggest running `check-implementation` to validate alignment with implementation entries
145
-
146
- If phases remain:
147
-
148
- - User runs `/execute-plan` again; Phase detection (Step 1a) will resume correctly
149
-
150
- ## Notes
151
-
152
- - Keep code changes minimal and focused on implementation tasks
153
- - Document all changes in the implementation doc; use checkboxes to track progress
154
- - Avoid implementing features not in the implementation doc scope
155
- - Modifies source code per implementation scope; updates `docs/ai/implementation/feature-{name}.md`. Does not modify unrelated files.
156
- - Idempotent: safe to re-run; updates checkboxes deterministically.
1
+ ---
2
+ name: execute-plan
3
+ description: Executes the planning doc tasks, edits code, and persists notes.
4
+ ---
5
+
6
+ ## Goal
7
+
8
+ Execute the feature plan by implementing tasks from the planning doc and updating task checkboxes as work progresses.
9
+
10
+ ## Workflow Alignment
11
+
12
+ - Provide brief status updates (1–3 sentences) before each operation.
13
+ - For medium/large tasks, create todos (≤14 words, verb-led). Keep only one `in_progress` item.
14
+ - Update todos immediately after progress; mark completed upon finish.
15
+ - Perform edits via file editing tools, not by printing code for copy-paste.
16
+
17
+ ### Prerequisites
18
+
19
+ - Feature name (kebab-case, e.g., `user-authentication`)
20
+ - Planning doc exists: `docs/ai/planning/feature-{name}.md`
21
+
22
+ ## Step 1: Gather Context
23
+
24
+ - Ask for feature name if not provided (must be kebab-case).
25
+ - Load planning doc: `docs/ai/planning/feature-{name}.md`.
26
+ - **Load template:** Read `docs/ai/planning/feature-template.md` to understand required structure.
27
+
28
+ ### 1a: Phase Progress Detection
29
+
30
+ If planning doc exists, scan for phase markers (`### Phase X:`):
31
+
32
+ - **Count total phases** in the document
33
+ - **Detect last completed phase**: Find the highest phase where ALL tasks (checkbox `[x]`) are marked complete
34
+ - **Detect current phase**: Find the first phase with incomplete tasks (`[ ]` marks)
35
+ - **Show summary to user**:
36
+
37
+ ```
38
+ Found 3 phases.
39
+ - Phase 1 (Database Setup): Complete [x]
40
+ - Phase 2 (API Endpoints): In Progress [2/4 tasks done]
41
+ - Phase 3 (Frontend): Not Started
42
+
43
+ Resuming Phase 2...
44
+ ```
45
+
46
+ If no phases detected (old format):
47
+
48
+ - Treat entire "Implementation Plan" section as single phase (backward compatible)
49
+
50
+ ## Step 2: Build Task Queue
51
+
52
+ - Parse tasks (checkboxes `[ ]`, `[x]`) from **current phase only** (from phase detection in Step 1a):
53
+ - Primary source: Tasks under `### Phase X:` with `[ ] [ACTION] ...` entries (incomplete only).
54
+ - For `[MODIFIED]` files, parse sub-bullets representing distinct logic items with line ranges.
55
+ - **Skip completed phases** entirely (do not re-execute)
56
+ - Build prioritized task queue (top-to-bottom unless dependencies block).
57
+ - Identify blocked tasks and note reasons.
58
+
59
+ Note: Do not include Follow-ups section unless explicitly in current phase.
60
+
61
+ ## Step 3: Implement Iteratively (per task)
62
+
63
+ For each task in queue:
64
+
65
+ 1. **Status update**: Brief note (1–3 sentences) on what will be done.
66
+ 2. Plan minimal change set:
67
+ - Identify files/regions to modify
68
+ - Map changes to acceptance criteria from plan (reference if needed)
69
+ 3. Implement changes:
70
+ - Write/edit code according to the planning doc entries (`[ACTION]` items)
71
+ - Keep changes minimal and incremental
72
+ - Avoid speculative changes beyond implementation scope
73
+ 4. Quick validation:
74
+ - Run build/compile if available
75
+ - Run fast unit/smoke tests if available
76
+ - Fix immediate issues before proceeding
77
+ 5. Persist notes to planning doc:
78
+ - File: `docs/ai/planning/feature-{name}.md`
79
+ - Update the relevant `[ ]` entry to `[x]` when completed
80
+ - For `MODIFIED` files with sub-bullets, mark each completed sub-bullet `[x]`
81
+ - Include line ranges and concise summaries as per template
82
+ 6. Update planning doc:
83
+ - Mark completed tasks `[x]` with brief notes
84
+ - Mark blocked tasks with reason
85
+
86
+ ## Step 4: Quality Checks
87
+
88
+ After completing each task batch:
89
+
90
+ - Detect available tools from project config (e.g., `package.json`, `pyproject.toml`, `go.mod`, `Cargo.toml`, build files) and run the appropriate non-interactive checks.
91
+ - Linting on changed files (prefer non-interactive):
92
+ - JavaScript/TypeScript: `npx eslint .` or `pnpm eslint .` (add `--max-warnings=0` if desired)
93
+ - Python: `ruff .` or `flake8 .`
94
+ - Go: `golangci-lint run` or `go vet ./...`
95
+ - Rust: `cargo clippy -- -D warnings`
96
+ - Java: `./gradlew check` or `mvn -q -DskipTests=false -Dspotbugs.failOnError=true verify`
97
+ - Scope to changed files when possible for speed
98
+ - Type checks (non-emitting where applicable):
99
+ - TypeScript: `npx tsc --noEmit`
100
+ - Python: `mypy .` (if configured) or `pyright` if present
101
+ - Go/Rust/Java: rely on compiler/type system via build step
102
+ - Parallelize lint and type-check when safe; fix issues (up to 3 attempts) before proceeding.
103
+
104
+ ## Step 5: Phase Completion Check
105
+
106
+ After completing all tasks in current phase:
107
+
108
+ 1. **Mark phase complete** in planning doc (optional visual marker)
109
+ 2. **Check remaining phases**:
110
+ - If more incomplete phases exist:
111
+ ```
112
+ Phase 2 complete!
113
+ Ready for Phase 3 (Frontend)?
114
+ Run: /execute-plan
115
+ ```
116
+ - If this is final phase:
117
+ ```
118
+ ✓ All phases complete!
119
+ Ready for code review?
120
+ Run: /code-review
121
+ ```
122
+
123
+ ## Step 6: Next Actions
124
+
125
+ After all phases complete:
126
+
127
+ - Suggest running `code-review` to verify against standards
128
+ - Suggest running `writing-test` if edge cases need coverage
129
+ - Suggest running `check-implementation` to validate alignment with planning entries
130
+
131
+ If phases remain:
132
+
133
+ - User runs `/execute-plan` again; Phase detection (Step 1a) will resume correctly
134
+
135
+ ## Notes
136
+
137
+ - Keep code changes minimal and focused on planning tasks
138
+ - Document all changes by updating checkboxes in the planning doc
139
+ - Avoid implementing features not in the planning doc scope
140
+ - Modifies source code per planning scope; updates `docs/ai/planning/feature-{name}.md`. Does not modify unrelated files.
141
+ - Idempotent: safe to re-run; updates checkboxes deterministically.
@@ -1,3 +1,8 @@
1
+ ---
2
+ name: modify-plan
3
+ description: Modify plan and code after implementation; support revert or apply new approach.
4
+ ---
5
+
1
6
  ## Goal
2
7
 
3
8
  Modify a feature plan after partial/full implementation. Support reverting to a previous git state or applying new requirement changes with both code and documentation sync.
@@ -6,13 +11,12 @@ Modify a feature plan after partial/full implementation. Support reverting to a
6
11
 
7
12
  - Feature name (kebab-case, e.g., `user-authentication`)
8
13
  - Planning doc exists: `docs/ai/planning/feature-{name}.md`
9
- - Implementation doc exists: `docs/ai/implementation/feature-{name}.md`
10
14
  - Git repo initialized (for tracking code state)
11
15
 
12
16
  ## Workflow Alignment
13
17
 
14
18
  - Provide brief status updates (1–3 sentences) before/after important actions.
15
- - Update both planning and implementation docs when making changes.
19
+ - Update planning doc when making changes.
16
20
  - Do NOT auto-commit; user reviews all changes before pushing.
17
21
 
18
22
  ## Step 1: Load Current State
@@ -21,8 +25,7 @@ Ask for feature name (must be kebab-case).
21
25
 
22
26
  Load and summarize:
23
27
 
24
- 1. **Planning doc**: Current goal, scope, tasks overview
25
- 2. **Implementation doc**: Current phases, completion status, files affected
28
+ 1. **Planning doc**: Current goal, scope, implementation phases, completion status
26
29
 
27
30
  Display summary:
28
31
 
@@ -46,31 +49,35 @@ Total files touched: 4
46
49
  Ask user what's changing:
47
50
 
48
51
  **1. Type of modification:**
49
- a) Modify goal/scope (entire plan changes)
50
- b) Modify specific phase(s) (tactical change)
51
- c) Revert to previous approach (manual revert)
52
- d) Other (describe)
52
+ a) Modify goal/scope (entire plan changes)
53
+ b) Modify specific phase(s) (tactical change)
54
+ c) Revert to previous approach (git reset)
55
+ d) Other (describe)
53
56
 
54
57
  **2a. If modifying goal/scope:**
55
- - What's the new goal/scope?
56
- - How does it impact existing tasks?
58
+
59
+ - What's the new goal/scope?
60
+ - How does it impact existing tasks?
57
61
 
58
62
  **2b. If modifying specific phase(s):**
59
- - Which phase(s)? (list by name)
60
- - What requirement/approach is changing?
63
+
64
+ - Which phase(s)? (list by name)
65
+ - What requirement/approach is changing?
61
66
 
62
67
  **2c. If reverting approach:**
63
- - Which phase to revert?
64
- - Or revert all code changes after phase X?
68
+
69
+ - Show last 5 commits; ask which to revert to
70
+ - Or reset to specific phase (revert all code changes after phase X)?
65
71
 
66
72
  ## Step 3: Apply Changes
67
73
 
68
- ### Option A: Revert to Previous Approach (Manual)
74
+ ### Option A: Revert to Previous Git State
69
75
 
70
76
  If user selects revert:
71
77
 
72
78
  1. **Identify affected files & changes**:
73
- - Parse implementation doc; list all files modified in affected phase(s)
79
+
80
+ - Parse planning doc; list all files modified in affected phase(s)
74
81
  - Show file list that needs reverting:
75
82
  ```
76
83
  Files to revert (manual):
@@ -80,15 +87,19 @@ If user selects revert:
80
87
  ```
81
88
 
82
89
  2. **Manual revert guidance**:
90
+
83
91
  - For MODIFIED files: show current state vs. target state (code snippets/line ranges)
84
92
  - For DELETED files: ask user to delete manually
85
93
  - Ask: "Ready to manually revert these files?"
86
94
 
87
95
  3. **If user confirms**:
96
+
88
97
  - User manually reverts files (copy-paste old code back, undo in IDE, etc.)
89
- - Update implementation doc:
98
+ - Update planning doc:
99
+
90
100
  - Mark affected phases/tasks `[ ]` (reset to pending)
91
101
  - Add "Modification History" entry:
102
+
92
103
  ```
93
104
  ## Modification History
94
105
 
@@ -106,9 +117,12 @@ If user selects revert:
106
117
  If user selects new approach:
107
118
 
108
119
  1. **Update planning doc**:
120
+
109
121
  - Modify goal/scope section if changed
110
122
  - Update affected task(s) with new approach
123
+ - Update pseudo-code to match new approach
111
124
  - Add "Modification History" section:
125
+
112
126
  ```
113
127
  ## Modification History
114
128
 
@@ -119,12 +133,13 @@ If user selects new approach:
119
133
  - **Affected phases**: Phase X, Y
120
134
  ```
121
135
 
122
- 2. **Update implementation doc**:
136
+ 2. **Update implementation phases**:
137
+
123
138
  - For affected phases:
124
139
  - Modify pseudo-code to match new approach
125
140
  - Reset incomplete tasks `[ ]` (if approach changed significantly)
126
141
  - Keep completed tasks as-is (do not re-implement)
127
- - Update "Changes" section with new structure (files/logic outline)
142
+ - Update "Implementation Plan" section with new structure (files/logic outline)
128
143
 
129
144
  3. **Show git impact**:
130
145
  - Highlight files that may need re-editing
@@ -135,26 +150,29 @@ If user selects new approach:
135
150
  Before finalizing, show:
136
151
 
137
152
  1. **Updated planning doc** snippet (modified sections)
138
- 2. **Updated implementation doc** snippet (phase changes, pseudo-code)
139
- 3. **Files affected** (files that will be changed)
153
+ 2. **Git state** (files that will be changed)
140
154
 
141
- Ask: **"Apply changes and update docs?"** (yes/no)
155
+ Ask: **"Apply changes and update doc?"** (yes/no)
142
156
 
143
157
  If **yes**:
144
- - Save updated docs
145
- - If revert: User manually reverts files (code state updated)
146
- - If new approach: docs updated; ready for re-implementation
158
+
159
+ - Save updated planning doc
160
+ - If revert: `git status` shows reverted files (unstaged)
161
+ - If new approach: doc updated; code changes staged for review
147
162
 
148
163
  If **no**:
149
- - Rollback changes to docs
164
+
165
+ - Rollback changes to doc
150
166
  - Discard any temporary changes
151
167
 
152
168
  ## Step 5: Next Actions
153
169
 
154
170
  **After manual revert**:
171
+
155
172
  - "Docs updated. Affected tasks reset to `[ ]`. Run `/execute-plan` to re-implement Phase X with new approach."
156
173
 
157
174
  **After apply new approach**:
175
+
158
176
  - If only pseudo-code/docs changed (no code revert needed): "Continue current phase with `/execute-plan`."
159
177
  - If code changes needed (revert old approach + implement new): "Manually update code files first, then run `/execute-plan`."
160
178
  - "When done, run `/code-review` to validate standards."
@@ -163,7 +181,7 @@ If **no**:
163
181
 
164
182
  - **Manual revert**: User manually reverts code files (no git reset); AI guides the process
165
183
  - **Multi-feature safe**: Works when implementing multiple features simultaneously (selective revert possible)
166
- - **Backward compatible**: Works with both phase-based and non-phase-based implementation docs
184
+ - **Backward compatible**: Works with both phase-based and non-phase-based planning docs
167
185
  - **Audit trail**: "Modification History" section preserves decision rationale and affected files
168
186
  - **Idempotent**: Safe to re-run; modification history accumulates
169
187
  - **Safe defaults**: Asks confirmation before any changes; user always has final say
@@ -176,12 +194,12 @@ Agent: Load state, show summary
176
194
 
177
195
  User: Revert Phase 2 (API Endpoints) - use different auth approach
178
196
  Agent: Identify affected files (src/api/users.ts, src/api/auth.ts)
179
- Show current state vs. target state (pseudo-code + old implementation)
180
- Ask: Ready to manually revert these files?
197
+ Show current state vs. target state (pseudo-code + old implementation)
198
+ Ask: Ready to manually revert these files?
181
199
 
182
200
  User: Yes, I'll manually revert
183
201
  Agent: (User manually copies old code back or undoes changes in IDE)
184
- Update implementation doc:
202
+ Update planning doc:
185
203
  - Mark Phase 2 tasks [ ] (reset)
186
204
  - Add Modification History: Phase 2 reverted, reason: better auth strategy
187
205
 
package/cli.js CHANGED
@@ -75,9 +75,9 @@ function cloneDocsAI(source, dest) {
75
75
  run(`npx degit ${source} ${tempDir} --force`);
76
76
 
77
77
  // Xử lý từng subfolder
78
- const subfolders = ["implementation", "planning", "testing"];
78
+ const subfolders = ["planning", "testing"];
79
79
 
80
- // Xử lý folders: implementation, planning, testing
80
+ // Xử lý folders: planning, testing
81
81
  for (const subfolder of subfolders) {
82
82
  const tempSubfolder = path.join(tempDir, subfolder);
83
83
  const destSubfolder = path.join(dest, subfolder);
@@ -203,6 +203,7 @@ async function main() {
203
203
  }
204
204
  step("🚚 Downloading Cursor agent commands (.cursor/commands)...");
205
205
  run(`npx degit ${REPO}/.cursor/commands .cursor/commands --force`);
206
+
206
207
  }
207
208
 
208
209
  // Clone GitHub Copilot prompts (luôn ghi đè)
@@ -212,6 +213,7 @@ async function main() {
212
213
  }
213
214
  step("🚚 Downloading GitHub Copilot prompts (.github/prompts)...");
214
215
  run(`npx degit ${REPO}/.github/prompts .github/prompts --force`);
216
+
215
217
  }
216
218
 
217
219
  // Clone Claude Code commands (luôn ghi đè)
@@ -221,6 +223,27 @@ async function main() {
221
223
  }
222
224
  step("🚚 Downloading Claude Code commands (.claude/commands)...");
223
225
  run(`npx degit ${REPO}/.claude/commands .claude/commands --force`);
226
+
227
+ // Download CLAUDE.md (context memory) - only if not exists
228
+ step("🚚 Downloading Claude Code context memory (.claude/CLAUDE.md)...");
229
+ const claudeMdPath = ".claude/CLAUDE.md";
230
+ if (existsSync(claudeMdPath)) {
231
+ console.log(`⏭️ Skipping (already exists): ${claudeMdPath}`);
232
+ } else {
233
+ try {
234
+ run(`curl -fsSL ${RAW_BASE}/.claude/CLAUDE.md -o ${claudeMdPath}`);
235
+ } catch (_) {
236
+ run(`wget -qO ${claudeMdPath} ${RAW_BASE}/.claude/CLAUDE.md`);
237
+ }
238
+ }
239
+
240
+ // Download hooks.json (always overwrite to get latest)
241
+ step("🚚 Downloading Claude Code hooks (.claude/hooks.json)...");
242
+ try {
243
+ run(`curl -fsSL ${RAW_BASE}/.claude/hooks.json -o .claude/hooks.json`);
244
+ } catch (_) {
245
+ run(`wget -qO .claude/hooks.json ${RAW_BASE}/.claude/hooks.json`);
246
+ }
224
247
  }
225
248
 
226
249
  // Clone Cursor prompts (luôn ghi đè)
@@ -7,26 +7,42 @@ description: Feature planning docs and workflow guidelines
7
7
  # Planning Documentation
8
8
 
9
9
  ## Purpose
10
- This directory contains planning documents for individual features. Each feature follows a structured planning process before implementation.
10
+ This directory contains planning documents for individual features. Each feature plan includes both high-level goals and detailed implementation steps in a single file.
11
11
 
12
12
  ## Feature Planning Workflow
13
13
 
14
14
  ### Creating a Feature Plan
15
15
  Use the `create-plan` command to generate a new feature plan:
16
- - Command: `.cursor/commands/create-plan.md`
16
+ - Command: Available in `.cursor/commands/`, `.claude/commands/`, or `.github/prompts/`
17
17
  - Output: `docs/ai/planning/feature-{name}.md`
18
18
  - Template: `docs/ai/planning/feature-template.md`
19
19
 
20
20
  ### Feature Plan Structure
21
- Each feature plan follows the template structure:
22
- - **Goal**: Objectives, scope, acceptance criteria (Given-When-Then format)
23
- - **Tasks**: Checklist of high-level work items (3–7 tasks)
24
- - **Risks/Assumptions**: Key risks and assumptions
25
- - **Metrics / Definition of Done**: Completion criteria (build/test/review/docs)
26
-
27
- ### From Plan to Execution (Todos)
28
- - After the plan is written, generate an execution todo checklist from the plan.
29
- - Do not start Implementation until the todo list exists and is agreed.
21
+ Each feature plan follows the template structure with 5 sections:
22
+
23
+ 1. **Goal & Acceptance Criteria**: Objectives, scope, and Given-When-Then format
24
+ 2. **Risks & Assumptions**: Key risks and assumptions to be aware of
25
+ 3. **Definition of Done**: Completion criteria (build/test/review/docs)
26
+ 4. **Implementation Plan**:
27
+ - Summary of solution approach
28
+ - Phases with detailed tasks and pseudo-code
29
+ 5. **Follow-ups**: TODOs or deferred work
30
+
31
+ ### What Makes a Good Plan?
32
+ A good plan helps both humans and AI agents understand:
33
+ - **For humans**: What problem we're solving, why, and how
34
+ - **For AI agents**: Exactly what files to change, what logic to implement, and in what order
35
+
36
+ The plan should be:
37
+ - Clear enough for a different AI agent to execute independently
38
+ - Detailed enough with pseudo-code to guide implementation
39
+ - Concise enough to avoid information overload
40
+
41
+ ### From Plan to Execution
42
+ - After the plan is written, use the `execute-plan` command to begin implementation
43
+ - The AI agent will read the plan and implement tasks phase by phase
44
+ - Tasks are tracked with checkboxes `[ ]` → `[x]` as they complete
45
+ - Do not start coding until the plan is reviewed and agreed upon
30
46
 
31
47
  ### Feature Plan Naming Convention
32
48
  - Format: `feature-{name}.md` (kebab-case)
@@ -37,7 +53,6 @@ Each feature plan follows the template structure:
37
53
  See `feature-template.md` for the exact structure required for feature plans.
38
54
 
39
55
  ## Related Documentation
40
- - Implementation notes: `../implementation/`
41
56
  - Test plans: `../testing/`
42
57
  - Project standards: `../project/`
43
58
 
@@ -2,29 +2,68 @@
2
2
 
3
3
  Note: All content in this document must be written in English.
4
4
 
5
- ## Goal
6
- - Objectives, scope, acceptance criteria (Given-When-Then)
5
+ ## 1. Goal & Acceptance Criteria
6
+
7
+ ### Goal
8
+ - [Brief description: what problem this solves and why it matters]
7
9
 
8
10
  ### Acceptance Criteria (Given/When/Then)
9
- - Given ...
10
- - When ...
11
- - Then ...
11
+ - Given [context or initial state]
12
+ - When [action or event occurs]
13
+ - Then [expected result or outcome]
14
+
15
+ ## 2. Risks & Assumptions
16
+
17
+ ### Risks
18
+ - [Potential issues, blockers, or unknowns]
19
+
20
+ ### Assumptions
21
+ - [What we assume is true for this plan to work]
22
+
23
+ ## 3. Definition of Done
24
+ - [ ] Build passes (linter, type checks, compile)
25
+ - [ ] Tests added and passing
26
+ - [ ] Code reviewed and approved
27
+ - [ ] Documentation updated
28
+
29
+ ---
30
+
31
+ ## 4. Implementation Plan
32
+
33
+ ### Summary
34
+ [Brief description of the solution approach in 1-3 sentences]
35
+
36
+ ### Phase 1: [Phase Name]
37
+
38
+ - [ ] [ACTION] path/to/file — Summary of change
39
+ ```
40
+ Pseudo-code:
41
+ - Step 1: describe what will be done
42
+ - Step 2: validation or key logic
43
+ - Step 3: output or return value
44
+ ```
12
45
 
13
- ## Tasks (overview)
14
- - [ ] Task 1
15
- - [ ] Task 2
16
- - [ ] Task 3
46
+ - [ ] [ACTION] path/to/file — Summary of change
47
+ ```
48
+ Pseudo-code:
49
+ - ...
50
+ ```
17
51
 
18
- ## Risks/Assumptions
19
- - Key risks / assumptions
52
+ ### Phase 2: [Phase Name]
20
53
 
21
- ## Observability
22
- - Logging requirements:
23
- - Metrics/telemetry:
54
+ - [ ] [ACTION] path/to/file — Summary of change
55
+ ```
56
+ Pseudo-code:
57
+ - ...
58
+ ```
24
59
 
25
- ## Metrics / Definition of Done
26
- - Build green, tests added, review passed, docs updated
60
+ Notes:
61
+ - ACTION must be one of: ADDED | MODIFIED | DELETED | RENAMED
62
+ - For MODIFIED files, use sub-bullets for each distinct logic change and include line ranges
63
+ - Pseudo-code shows logic structure and key steps, not actual implementation code
64
+ - Each phase groups related tasks; phases execute sequentially
65
+ - Use only one phase for small features (≤ 5 tasks); use multiple phases for larger features
27
66
 
28
- ## Execution Checklist (Todo)
29
- - Before starting implementation, generate a todo checklist from this plan.
30
- - Do not start coding until the todo list exists and is agreed.
67
+ ## 5. Follow-ups
68
+ - [ ] [TODO item or deferred work]
69
+ - [ ] [Future improvements]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-workflow-init",
3
- "version": "2.0.0",
3
+ "version": "3.0.0",
4
4
  "description": "Initialize AI workflow docs & commands into any repo with one command",
5
5
  "bin": {
6
6
  "ai-workflow-init": "./cli.js"
@@ -1,51 +0,0 @@
1
- ---
2
- phase: implementation
3
- title: Implementation Documentation
4
- description: Feature implementation notes and tracking
5
- ---
6
-
7
- # Implementation Documentation
8
-
9
- ## Purpose
10
- This directory contains implementation notes for individual features. These docs track what code was written, why, and how it aligns with the plan.
11
-
12
- ## Implementation Documentation Workflow
13
-
14
- ### Creating Implementation Notes
15
- Implementation notes are created automatically during `execute-plan`:
16
- - Command: `.cursor/commands/execute-plan.md`
17
- - Output: `docs/ai/implementation/feature-{name}.md`
18
- - Template: `docs/ai/implementation/feature-template.md`
19
-
20
- ### Implementation Doc Structure
21
- Each implementation doc follows the template structure:
22
- - **Summary**: Brief description of overall solution approach
23
- - **Changes**: Per-task entries with:
24
- - File paths and line ranges
25
- - Approach/pattern used
26
- - Brief description of changes
27
- - **Edge Cases**: List of handled edge cases
28
- - **Follow-ups**: TODOs or deferred work
29
-
30
- ### Purpose
31
- Implementation docs serve as:
32
- - **Audit trail**: What code was written for this feature
33
- - **Review reference**: For code-review and check-implementation commands
34
- - **Refactor guide**: Understanding what was done for future improvements
35
-
36
- ### Execution Discipline
37
- - Provide a short status update before each meaningful action (1–3 sentences).
38
- - Perform edits via file editing tools; avoid printing large code for copy-paste.
39
- - After each batch of edits, run linter/type/build on changed files; auto-fix issues (up to 3 attempts) before requesting review.
40
-
41
- ## Template Reference
42
- See `feature-template.md` for the exact structure required for implementation notes.
43
-
44
- ## Related Documentation
45
- - Planning docs: `../planning/`
46
- - Test plans: `../testing/`
47
- - Project standards: `../project/`
48
-
49
- ---
50
-
51
- **Note**: For general implementation patterns and best practices, refer to `../project/CODE_CONVENTIONS.md` and `../project/PROJECT_STRUCTURE.md`.
@@ -1,53 +0,0 @@
1
- # Implementation Notes: {Feature Name}
2
-
3
- Note: All content in this document must be written in English.
4
-
5
- ## Summary
6
-
7
- - Short description of the solution approach
8
-
9
- ## Changes
10
-
11
- ### Phase 1: [Phase Name]
12
-
13
- - [ ] [ACTION] path/to/file (lines: x–y) — Summary of change
14
- ```
15
- Pseudo-code:
16
- - function/logic outline
17
- - key variables/state
18
- ```
19
- - [ ] [ACTION] path/to/file (lines: a–b) — Summary of change
20
- ```
21
- Pseudo-code:
22
- - logic structure
23
- ```
24
-
25
- ### Phase 2: [Phase Name]
26
-
27
- - [ ] [ACTION] path/to/file — Summary of change
28
- ```
29
- Pseudo-code:
30
- - ...
31
- ```
32
-
33
- Notes:
34
-
35
- - ACTION must be one of: ADDED | MODIFIED | DELETED | RENAMED
36
- - For MODIFIED files, use sub-bullets for each distinct logic change and include line ranges.
37
- - Pseudo-code shows logic structure and key steps, not actual implementation code.
38
- - Each phase groups related tasks; phases execute sequentially.
39
- - Use only one phase for small features (≤ 5 tasks); use multiple phases for larger features.
40
-
41
- ## Edge Cases
42
-
43
- - List of handled edge cases
44
-
45
- ## Follow-ups
46
-
47
- - TODOs or deferred work
48
-
49
- ## Execution Discipline
50
-
51
- - Before each edit, provide a short status update describing the next action (1–3 sentences).
52
- - Perform edits via file editing tools; avoid printing large code blocks for copy-paste.
53
- - After each batch of edits, run linter/type/build on changed files; auto-fix issues (up to 3 attempts) before requesting review.