aiblueprint-cli 1.4.23 → 1.4.25

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 (108) hide show
  1. package/claude-code-config/skills/git-commit/SKILL.md +42 -0
  2. package/claude-code-config/{commands/git/create-pr.md → skills/git-create-pr/SKILL.md} +12 -18
  3. package/claude-code-config/skills/git-fix-pr-comments/SKILL.md +51 -0
  4. package/claude-code-config/skills/git-merge/SKILL.md +68 -0
  5. package/claude-code-config/skills/{claude-memory → meta-claude-memory}/SKILL.md +7 -2
  6. package/claude-code-config/skills/meta-claude-memory/references/rules-directory-guide.md +298 -0
  7. package/claude-code-config/skills/meta-prompt-creator/SKILL.md +285 -0
  8. package/claude-code-config/skills/meta-prompt-creator/references/anthropic-best-practices.md +126 -0
  9. package/claude-code-config/skills/meta-prompt-creator/references/anti-patterns.md +57 -0
  10. package/claude-code-config/skills/meta-prompt-creator/references/clarity-principles.md +54 -0
  11. package/claude-code-config/skills/meta-prompt-creator/references/context-management.md +389 -0
  12. package/claude-code-config/skills/meta-prompt-creator/references/few-shot-patterns.md +47 -0
  13. package/claude-code-config/skills/meta-prompt-creator/references/openai-best-practices.md +50 -0
  14. package/claude-code-config/skills/meta-prompt-creator/references/prompt-templates.md +110 -0
  15. package/claude-code-config/skills/meta-prompt-creator/references/reasoning-techniques.md +52 -0
  16. package/claude-code-config/skills/meta-prompt-creator/references/system-prompt-patterns.md +48 -0
  17. package/claude-code-config/skills/meta-prompt-creator/references/xml-structure.md +36 -0
  18. package/claude-code-config/skills/meta-skill-creator/LICENSE.txt +202 -0
  19. package/claude-code-config/skills/meta-skill-creator/SKILL.md +421 -0
  20. package/claude-code-config/skills/meta-skill-creator/package.json +5 -0
  21. package/claude-code-config/skills/meta-skill-creator/references/output-patterns.md +82 -0
  22. package/claude-code-config/skills/meta-skill-creator/references/progressive-disclosure-patterns.md +374 -0
  23. package/claude-code-config/skills/meta-skill-creator/references/prompting-integration.md +363 -0
  24. package/claude-code-config/skills/meta-skill-creator/references/real-world-examples.md +513 -0
  25. package/claude-code-config/skills/meta-skill-creator/references/script-patterns.md +385 -0
  26. package/claude-code-config/skills/meta-skill-creator/references/workflows.md +28 -0
  27. package/claude-code-config/skills/meta-skill-creator/references/xml-tag-guide.md +606 -0
  28. package/claude-code-config/skills/meta-skill-creator/scripts/init-skill.ts +214 -0
  29. package/claude-code-config/skills/meta-skill-creator/scripts/package-skill.ts +146 -0
  30. package/claude-code-config/skills/meta-skill-creator/scripts/validate.ts +138 -0
  31. package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/SKILL.md +41 -15
  32. package/claude-code-config/skills/{setup-ralph → ralph-loop}/steps/step-00-init.md +2 -3
  33. package/claude-code-config/skills/utils-fix-errors/SKILL.md +61 -0
  34. package/claude-code-config/skills/utils-fix-grammar/SKILL.md +59 -0
  35. package/claude-code-config/skills/utils-oneshot/SKILL.md +56 -0
  36. package/claude-code-config/skills/workflow-apex/SKILL.md +303 -0
  37. package/claude-code-config/skills/workflow-apex/scripts/setup-templates.sh +134 -0
  38. package/claude-code-config/skills/workflow-apex/scripts/update-progress.sh +80 -0
  39. package/claude-code-config/skills/workflow-apex/steps/step-00-init.md +288 -0
  40. package/claude-code-config/skills/workflow-apex/steps/step-00b-branch.md +126 -0
  41. package/claude-code-config/skills/workflow-apex/steps/step-00b-economy.md +244 -0
  42. package/claude-code-config/skills/workflow-apex/steps/step-00b-interactive.md +153 -0
  43. package/claude-code-config/skills/workflow-apex/steps/step-01-analyze.md +361 -0
  44. package/claude-code-config/skills/workflow-apex/steps/step-02-plan.md +264 -0
  45. package/claude-code-config/skills/workflow-apex/steps/step-03-execute.md +239 -0
  46. package/claude-code-config/skills/workflow-apex/steps/step-04-validate.md +264 -0
  47. package/claude-code-config/skills/workflow-apex/steps/step-05-examine.md +294 -0
  48. package/claude-code-config/skills/workflow-apex/steps/step-06-resolve.md +237 -0
  49. package/claude-code-config/skills/workflow-apex/steps/step-07-tests.md +250 -0
  50. package/claude-code-config/skills/workflow-apex/steps/step-08-run-tests.md +308 -0
  51. package/claude-code-config/skills/workflow-apex/steps/step-09-finish.md +193 -0
  52. package/claude-code-config/skills/workflow-apex/templates/00-context.md +51 -0
  53. package/claude-code-config/skills/workflow-apex/templates/01-analyze.md +10 -0
  54. package/claude-code-config/skills/workflow-apex/templates/02-plan.md +10 -0
  55. package/claude-code-config/skills/workflow-apex/templates/03-execute.md +10 -0
  56. package/claude-code-config/skills/workflow-apex/templates/04-validate.md +10 -0
  57. package/claude-code-config/skills/workflow-apex/templates/05-examine.md +10 -0
  58. package/claude-code-config/skills/workflow-apex/templates/06-resolve.md +10 -0
  59. package/claude-code-config/skills/workflow-apex/templates/07-tests.md +10 -0
  60. package/claude-code-config/skills/workflow-apex/templates/08-run-tests.md +10 -0
  61. package/claude-code-config/skills/workflow-apex/templates/09-finish.md +10 -0
  62. package/claude-code-config/skills/workflow-apex/templates/README.md +195 -0
  63. package/claude-code-config/skills/workflow-apex/templates/step-complete.md +7 -0
  64. package/claude-code-config/skills/workflow-apex-free/SKILL.md +261 -0
  65. package/claude-code-config/skills/workflow-apex-free/scripts/setup-templates.sh +100 -0
  66. package/claude-code-config/skills/workflow-apex-free/scripts/update-progress.sh +80 -0
  67. package/claude-code-config/skills/workflow-apex-free/steps/step-00-init.md +267 -0
  68. package/claude-code-config/skills/workflow-apex-free/steps/step-00b-branch.md +126 -0
  69. package/claude-code-config/skills/workflow-apex-free/steps/step-00b-economy.md +244 -0
  70. package/claude-code-config/skills/workflow-apex-free/steps/step-00b-interactive.md +153 -0
  71. package/claude-code-config/skills/workflow-apex-free/steps/step-01-analyze.md +361 -0
  72. package/claude-code-config/skills/workflow-apex-free/steps/step-02-plan.md +264 -0
  73. package/claude-code-config/skills/workflow-apex-free/steps/step-03-execute.md +239 -0
  74. package/claude-code-config/skills/workflow-apex-free/steps/step-04-validate.md +251 -0
  75. package/claude-code-config/skills/workflow-apex-free/templates/00-context.md +43 -0
  76. package/claude-code-config/skills/workflow-apex-free/templates/01-analyze.md +10 -0
  77. package/claude-code-config/skills/workflow-apex-free/templates/02-plan.md +10 -0
  78. package/claude-code-config/skills/workflow-apex-free/templates/03-execute.md +10 -0
  79. package/claude-code-config/skills/workflow-apex-free/templates/04-validate.md +10 -0
  80. package/claude-code-config/skills/workflow-apex-free/templates/README.md +176 -0
  81. package/claude-code-config/skills/workflow-apex-free/templates/step-complete.md +7 -0
  82. package/dist/cli.js +146 -9
  83. package/package.json +1 -1
  84. package/claude-code-config/commands/explore.md +0 -90
  85. package/claude-code-config/commands/git/commit.md +0 -60
  86. package/claude-code-config/commands/git/fix-pr-comments.md +0 -59
  87. package/claude-code-config/commands/oneshot.md +0 -57
  88. package/claude-code-config/skills/create-slash-commands/SKILL.md +0 -1110
  89. package/claude-code-config/skills/create-slash-commands/references/arguments.md +0 -273
  90. package/claude-code-config/skills/create-slash-commands/references/patterns.md +0 -947
  91. package/claude-code-config/skills/create-slash-commands/references/prompt-examples.md +0 -656
  92. package/claude-code-config/skills/create-slash-commands/references/tool-restrictions.md +0 -389
  93. /package/claude-code-config/skills/{claude-memory → meta-claude-memory}/references/comprehensive-example.md +0 -0
  94. /package/claude-code-config/skills/{claude-memory → meta-claude-memory}/references/project-patterns.md +0 -0
  95. /package/claude-code-config/skills/{claude-memory → meta-claude-memory}/references/prompting-techniques.md +0 -0
  96. /package/claude-code-config/skills/{claude-memory → meta-claude-memory}/references/section-templates.md +0 -0
  97. /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/context-management.md +0 -0
  98. /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/debugging-agents.md +0 -0
  99. /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/error-handling-and-recovery.md +0 -0
  100. /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/evaluation-and-testing.md +0 -0
  101. /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/orchestration-patterns.md +0 -0
  102. /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/subagents.md +0 -0
  103. /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/writing-subagent-prompts.md +0 -0
  104. /package/claude-code-config/skills/{setup-ralph → ralph-loop}/SKILL.md +0 -0
  105. /package/claude-code-config/skills/{setup-ralph → ralph-loop}/scripts/setup.sh +0 -0
  106. /package/claude-code-config/skills/{setup-ralph → ralph-loop}/steps/step-01-interactive-prd.md +0 -0
  107. /package/claude-code-config/skills/{setup-ralph → ralph-loop}/steps/step-02-create-stories.md +0 -0
  108. /package/claude-code-config/skills/{setup-ralph → ralph-loop}/steps/step-03-finish.md +0 -0
@@ -0,0 +1,251 @@
1
+ ---
2
+ name: step-04-validate
3
+ description: Self-check - run tests, verify AC, audit implementation quality, complete workflow
4
+ prev_step: steps/step-03-execute.md
5
+ next_step: null
6
+ ---
7
+
8
+ # Step 4: Validate (Self-Check)
9
+
10
+ ## MANDATORY EXECUTION RULES (READ FIRST):
11
+
12
+ - 🛑 NEVER claim checks pass when they don't
13
+ - 🛑 NEVER skip any validation step
14
+ - ✅ ALWAYS run typecheck, lint, and tests
15
+ - ✅ ALWAYS verify each acceptance criterion
16
+ - ✅ ALWAYS fix failures before proceeding
17
+ - 📋 YOU ARE A VALIDATOR, not an implementer
18
+ - 💬 FOCUS on "Does it work correctly?"
19
+ - 🚫 FORBIDDEN to proceed with failing checks
20
+
21
+ ## EXECUTION PROTOCOLS:
22
+
23
+ - 🎯 Run all validation commands
24
+ - 💾 Log results to output (if save_mode)
25
+ - 📖 Check each AC against implementation
26
+ - 🚫 FORBIDDEN to mark complete with failures
27
+
28
+ ## CONTEXT BOUNDARIES:
29
+
30
+ - Implementation from step-03 is complete
31
+ - Tests may or may not pass yet
32
+ - Type errors may exist
33
+ - Focus is on verification, not new implementation
34
+
35
+ ## YOUR TASK:
36
+
37
+ Validate the implementation by running checks, verifying acceptance criteria, and ensuring quality.
38
+
39
+ ---
40
+
41
+ <available_state>
42
+ From previous steps:
43
+
44
+ | Variable | Description |
45
+ |----------|-------------|
46
+ | `{task_description}` | What was implemented |
47
+ | `{task_id}` | Kebab-case identifier |
48
+ | `{acceptance_criteria}` | Success criteria |
49
+ | `{auto_mode}` | Skip confirmations |
50
+ | `{save_mode}` | Save outputs to files |
51
+ | `{economy_mode}` | No subagents mode |
52
+ | `{output_dir}` | Path to output (if save_mode) |
53
+ | Implementation | Completed in step-03 |
54
+ </available_state>
55
+
56
+ ---
57
+
58
+ ## EXECUTION SEQUENCE:
59
+
60
+ ### 1. Initialize Save Output (if save_mode)
61
+
62
+ **If `{save_mode}` = true:**
63
+
64
+ ```bash
65
+ bash {skill_dir}/scripts/update-progress.sh "{task_id}" "04" "validate" "in_progress"
66
+ ```
67
+
68
+ Append results to `{output_dir}/04-validate.md` as you work.
69
+
70
+ ### 2. Discover Available Commands
71
+
72
+ Check `package.json` for exact command names:
73
+ ```bash
74
+ cat package.json | grep -A 20 '"scripts"'
75
+ ```
76
+
77
+ Look for: `typecheck`, `lint`, `test`, `build`, `format`
78
+
79
+ ### 3. Run Validation Suite
80
+
81
+ **3.1 Typecheck**
82
+ ```bash
83
+ pnpm run typecheck # or npm run typecheck
84
+ ```
85
+
86
+ **MUST PASS.** If fails:
87
+ 1. Read error messages
88
+ 2. Fix type issues
89
+ 3. Re-run until passing
90
+
91
+ **3.2 Lint**
92
+ ```bash
93
+ pnpm run lint
94
+ ```
95
+
96
+ **MUST PASS.** If fails:
97
+ 1. Try auto-fix: `pnpm run lint --fix`
98
+ 2. Manually fix remaining
99
+ 3. Re-run until passing
100
+
101
+ **3.3 Tests**
102
+ ```bash
103
+ pnpm run test -- --filter={affected-area}
104
+ ```
105
+
106
+ **MUST PASS.** If fails:
107
+ 1. Identify failing test
108
+ 2. Determine if code bug or test bug
109
+ 3. Fix the root cause
110
+ 4. Re-run until passing
111
+
112
+ **If `{save_mode}` = true:** Log each result
113
+
114
+ ### 4. Self-Audit Checklist
115
+
116
+ Verify each item:
117
+
118
+ **Tasks Complete:**
119
+ - [ ] All todos from step-03 marked complete
120
+ - [ ] No tasks skipped without reason
121
+ - [ ] Any blocked tasks have explanation
122
+
123
+ **Tests Passing:**
124
+ - [ ] All existing tests pass
125
+ - [ ] New tests written for new functionality
126
+ - [ ] No skipped tests without reason
127
+
128
+ **Acceptance Criteria:**
129
+ - [ ] Each AC demonstrably met
130
+ - [ ] Can explain how implementation satisfies AC
131
+ - [ ] Edge cases considered
132
+
133
+ **Patterns Followed:**
134
+ - [ ] Code follows existing patterns
135
+ - [ ] Error handling consistent
136
+ - [ ] Naming conventions match
137
+
138
+ ### 5. Format Code
139
+
140
+ If format command available:
141
+ ```bash
142
+ pnpm run format
143
+ ```
144
+
145
+ ### 6. Final Verification
146
+
147
+ Re-run all checks:
148
+ ```bash
149
+ pnpm run typecheck && pnpm run lint
150
+ ```
151
+
152
+ Both MUST pass.
153
+
154
+ ### 7. Present Validation Results
155
+
156
+ ```
157
+ **Validation Complete**
158
+
159
+ **Typecheck:** ✓ Passed
160
+ **Lint:** ✓ Passed
161
+ **Tests:** ✓ {X}/{X} passing
162
+ **Format:** ✓ Applied
163
+
164
+ **Acceptance Criteria:**
165
+ - [✓] AC1: Verified by [how]
166
+ - [✓] AC2: Verified by [how]
167
+
168
+ **Files Modified:** {list}
169
+
170
+ **Summary:** All checks passing, ready for next step.
171
+ ```
172
+
173
+ ### 8. Complete Workflow
174
+
175
+ **Show final summary:**
176
+
177
+ ```
178
+ ✅ APEX Workflow Complete
179
+
180
+ **Task:** {task_description}
181
+ **Task ID:** {task_id}
182
+
183
+ **Validation Results:**
184
+ - Typecheck: ✓ Passed
185
+ - Lint: ✓ Passed
186
+ - Tests: ✓ Passed
187
+
188
+ **Acceptance Criteria:**
189
+ - [✓] AC1: Verified
190
+ - [✓] AC2: Verified
191
+
192
+ **Files Modified:** {list}
193
+
194
+ 🎉 Implementation complete and validated!
195
+ ```
196
+
197
+ ### 9. Complete Save Output (if save_mode)
198
+
199
+ **If `{save_mode}` = true:**
200
+
201
+ Append to `{output_dir}/04-validate.md`:
202
+ ```markdown
203
+ ---
204
+ ## Step Complete
205
+ **Status:** ✓ Complete
206
+ **Typecheck:** ✓
207
+ **Lint:** ✓
208
+ **Tests:** ✓
209
+ **Workflow:** Complete
210
+ **Timestamp:** {ISO timestamp}
211
+ ```
212
+
213
+ Run: `bash {skill_dir}/scripts/update-progress.sh "{task_id}" "04" "validate" "complete"`
214
+
215
+ ---
216
+
217
+ ## SUCCESS METRICS:
218
+
219
+ ✅ Typecheck passes
220
+ ✅ Lint passes
221
+ ✅ All tests pass
222
+ ✅ All AC verified
223
+ ✅ Code formatted
224
+ ✅ User informed of status
225
+ ✅ Workflow completed
226
+
227
+ ## FAILURE MODES:
228
+
229
+ ❌ Claiming checks pass when they don't
230
+ ❌ Not running all validation commands
231
+ ❌ Skipping tests for modified code
232
+ ❌ Missing AC verification
233
+ ❌ Proceeding with failures
234
+
235
+ ## VALIDATION PROTOCOLS:
236
+
237
+ - Run EVERY validation command
238
+ - Fix failures IMMEDIATELY
239
+ - Don't proceed until all green
240
+ - Verify EACH acceptance criterion
241
+ - Document all results
242
+
243
+ ---
244
+
245
+ ## WORKFLOW COMPLETE
246
+
247
+ This is the final step. After validation passes, the APEX workflow is complete.
248
+
249
+ <critical>
250
+ Remember: NEVER claim completion with failing checks - fix everything first!
251
+ </critical>
@@ -0,0 +1,43 @@
1
+ # APEX Task: {{task_id}}
2
+
3
+ **Created:** {{timestamp}}
4
+ **Task:** {{task_description}}
5
+
6
+ ---
7
+
8
+ ## Configuration
9
+
10
+ | Flag | Value |
11
+ |------|-------|
12
+ | Auto mode (`-a`) | {{auto_mode}} |
13
+ | Save mode (`-s`) | {{save_mode}} |
14
+ | Economy mode (`-e`) | {{economy_mode}} |
15
+ | Branch mode (`-b`) | {{branch_mode}} |
16
+ | Interactive mode (`-i`) | {{interactive_mode}} |
17
+ | Branch name | {{branch_name}} |
18
+
19
+ ---
20
+
21
+ ## User Request
22
+
23
+ ```
24
+ {{original_input}}
25
+ ```
26
+
27
+ ---
28
+
29
+ ## Acceptance Criteria
30
+
31
+ _To be defined in step-01-analyze.md_
32
+
33
+ ---
34
+
35
+ ## Progress
36
+
37
+ | Step | Status | Timestamp |
38
+ |------|--------|-----------|
39
+ | 00-init | ⏸ Pending | |
40
+ | 01-analyze | ⏸ Pending | |
41
+ | 02-plan | ⏸ Pending | |
42
+ | 03-execute | ⏸ Pending | |
43
+ | 04-validate | ⏸ Pending | |
@@ -0,0 +1,10 @@
1
+ # Step 01: Analyze
2
+
3
+ **Task:** {{task_description}}
4
+ **Started:** {{timestamp}}
5
+
6
+ ---
7
+
8
+ ## Context Discovery
9
+
10
+ _Findings will be appended here as exploration progresses..._
@@ -0,0 +1,10 @@
1
+ # Step 02: Plan
2
+
3
+ **Task:** {{task_description}}
4
+ **Started:** {{timestamp}}
5
+
6
+ ---
7
+
8
+ ## Planning Progress
9
+
10
+ _Implementation plan will be written here..._
@@ -0,0 +1,10 @@
1
+ # Step 03: Execute
2
+
3
+ **Task:** {{task_description}}
4
+ **Started:** {{timestamp}}
5
+
6
+ ---
7
+
8
+ ## Implementation Log
9
+
10
+ _Changes will be logged here as implementation progresses..._
@@ -0,0 +1,10 @@
1
+ # Step 04: Validate
2
+
3
+ **Task:** {{task_description}}
4
+ **Started:** {{timestamp}}
5
+
6
+ ---
7
+
8
+ ## Validation Progress
9
+
10
+ _Validation results will be appended here..._
@@ -0,0 +1,176 @@
1
+ # APEX Template System
2
+
3
+ ## Overview
4
+
5
+ This directory contains template files used to initialize APEX workflow outputs when save mode (`-s`) is enabled. This template system significantly reduces token usage by moving repetitive content out of step files.
6
+
7
+ ## Template Files
8
+
9
+ | Template | Purpose | Created When |
10
+ |----------|---------|--------------|
11
+ | `00-context.md` | Workflow configuration and progress tracking | Always (if save_mode) |
12
+ | `01-analyze.md` | Analysis findings | Always (if save_mode) |
13
+ | `02-plan.md` | Implementation plan | Always (if save_mode) |
14
+ | `03-execute.md` | Implementation log | Always (if save_mode) |
15
+ | `04-validate.md` | Validation results and workflow completion | Always (if save_mode) |
16
+ | `step-complete.md` | Completion marker template | Referenced in steps |
17
+
18
+ ## Template Variables
19
+
20
+ Templates use `{{variable}}` syntax for placeholders:
21
+
22
+ | Variable | Description | Example |
23
+ |----------|-------------|---------|
24
+ | `{{task_id}}` | Kebab-case task identifier | `01-add-auth-middleware` |
25
+ | `{{task_description}}` | Plain text task description | `add authentication middleware` |
26
+ | `{{timestamp}}` | ISO 8601 timestamp | `2026-01-12T10:30:00Z` |
27
+ | `{{auto_mode}}` | Auto mode flag | `true` or `false` |
28
+ | `{{save_mode}}` | Save mode flag | `true` or `false` |
29
+ | `{{economy_mode}}` | Economy mode flag | `true` or `false` |
30
+ | `{{branch_mode}}` | Branch mode flag | `true` or `false` |
31
+ | `{{interactive_mode}}` | Interactive mode flag | `true` or `false` |
32
+ | `{{branch_name}}` | Git branch name | `feature/add-auth` |
33
+ | `{{original_input}}` | Raw user input | `/apex -a -s add auth` |
34
+
35
+ ## Setup Script
36
+
37
+ ### `setup-templates.sh`
38
+
39
+ Initializes all template files in the output directory with variables replaced.
40
+
41
+ **Usage:**
42
+ ```bash
43
+ bash scripts/setup-templates.sh \
44
+ "feature_name" \
45
+ "task_description" \
46
+ "auto_mode" \
47
+ "save_mode" \
48
+ "economy_mode" \
49
+ "branch_mode" \
50
+ "interactive_mode" \
51
+ "branch_name" \
52
+ "original_input"
53
+ ```
54
+
55
+ **Output:**
56
+ ```
57
+ .claude/output/apex/01-add-auth-middleware/
58
+ ├── 00-context.md # Always created
59
+ ├── 01-analyze.md # Always created
60
+ ├── 02-plan.md # Always created
61
+ ├── 03-execute.md # Always created
62
+ └── 04-validate.md # Always created
63
+ ```
64
+
65
+ ## Progress Update Script
66
+
67
+ ### `update-progress.sh`
68
+
69
+ Updates the progress table in `00-context.md` without manual markdown editing.
70
+
71
+ **Usage:**
72
+ ```bash
73
+ bash scripts/update-progress.sh <task_id> <step_number> <step_name> <status>
74
+ ```
75
+
76
+ **Examples:**
77
+ ```bash
78
+ # Mark step 01 as in progress
79
+ bash scripts/update-progress.sh "01-add-auth" "01" "analyze" "in_progress"
80
+
81
+ # Mark step 01 as complete
82
+ bash scripts/update-progress.sh "01-add-auth" "01" "analyze" "complete"
83
+
84
+ # Mark step 02 as in progress
85
+ bash scripts/update-progress.sh "01-add-auth" "02" "plan" "in_progress"
86
+ ```
87
+
88
+ **Status Values:**
89
+ - `in_progress` → `⏳ In Progress`
90
+ - `complete` → `✓ Complete`
91
+
92
+ ## Token Savings
93
+
94
+ ### Before Optimization
95
+
96
+ Each step file contained full template content inline:
97
+
98
+ ```markdown
99
+ ### 1. Initialize Save Output (if save_mode)
100
+
101
+ **If `{save_mode}` = true:**
102
+
103
+ Create `{output_dir}/01-analyze.md`:
104
+ ```markdown
105
+ # Step 01: Analyze
106
+
107
+ **Task:** {task_description}
108
+ **Started:** {ISO timestamp}
109
+
110
+ ---
111
+
112
+ ## Context Discovery
113
+ ```
114
+
115
+ Update `00-context.md` progress:
116
+ ```markdown
117
+ | 01-analyze | ⏳ In Progress | {timestamp} |
118
+ ```
119
+ ```
120
+
121
+ **Token cost per step:** ~200 tokens × 5 steps = ~1,000 tokens
122
+
123
+ ### After Optimization
124
+
125
+ Step files now reference templates and scripts:
126
+
127
+ ```markdown
128
+ ### 1. Initialize Save Output (if save_mode)
129
+
130
+ **If `{save_mode}` = true:**
131
+
132
+ The file `{output_dir}/01-analyze.md` has already been created by the setup script.
133
+
134
+ Update progress:
135
+ ```bash
136
+ bash {skill_dir}/scripts/update-progress.sh "{task_id}" "01" "analyze" "in_progress"
137
+ ```
138
+
139
+ Append your findings to `01-analyze.md` as you work.
140
+ ```
141
+
142
+ **Token cost per step:** ~50 tokens × 5 steps = ~250 tokens
143
+
144
+ **Total savings:** ~750 tokens per workflow execution (75% reduction)
145
+
146
+ ## How It Works
147
+
148
+ 1. **Initialization (step-00-init.md):**
149
+ - Runs `setup-templates.sh` once at workflow start
150
+ - Creates all template files with variables replaced
151
+ - Output directory is ready with pre-initialized files
152
+
153
+ 2. **Each Step:**
154
+ - Runs `update-progress.sh` to mark step as "in_progress"
155
+ - Appends findings/logs to the pre-created step file
156
+ - Runs `update-progress.sh` again to mark step as "complete"
157
+
158
+ 3. **Benefits:**
159
+ - AI doesn't need to hold template content in context
160
+ - Consistent formatting across all workflows
161
+ - Easy to update templates without editing step files
162
+ - Scripts handle the tedious markdown updates
163
+
164
+ ## Updating Templates
165
+
166
+ To modify template content:
167
+
168
+ 1. Edit the template file in `templates/`
169
+ 2. Changes apply to all future workflows automatically
170
+ 3. No need to update step files
171
+
172
+ ## Maintenance
173
+
174
+ - Templates are stateless (no workflow-specific logic)
175
+ - Scripts are idempotent (safe to run multiple times)
176
+ - Variables use `{{var}}` syntax to avoid conflicts with markdown
@@ -0,0 +1,7 @@
1
+ ---
2
+
3
+ ## Step Complete
4
+
5
+ **Status:** ✓ Complete
6
+ **Next:** {{next_step}}
7
+ **Timestamp:** {{timestamp}}