@ydtb/specsmd 0.1.22

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 (143) hide show
  1. package/README.md +322 -0
  2. package/bin/cli.js +21 -0
  3. package/flows/aidlc/README.md +372 -0
  4. package/flows/aidlc/agents/construction-agent.md +80 -0
  5. package/flows/aidlc/agents/inception-agent.md +97 -0
  6. package/flows/aidlc/agents/master-agent.md +61 -0
  7. package/flows/aidlc/agents/operations-agent.md +89 -0
  8. package/flows/aidlc/commands/construction-agent.md +67 -0
  9. package/flows/aidlc/commands/inception-agent.md +59 -0
  10. package/flows/aidlc/commands/master-agent.md +51 -0
  11. package/flows/aidlc/commands/operations-agent.md +81 -0
  12. package/flows/aidlc/context-config.yaml +67 -0
  13. package/flows/aidlc/memory-bank.yaml +105 -0
  14. package/flows/aidlc/quick-start.md +322 -0
  15. package/flows/aidlc/scripts/artifact-validator.cjs +594 -0
  16. package/flows/aidlc/scripts/bolt-complete.cjs +606 -0
  17. package/flows/aidlc/scripts/status-integrity.cjs +598 -0
  18. package/flows/aidlc/skills/construction/bolt-list.md +163 -0
  19. package/flows/aidlc/skills/construction/bolt-replan.md +345 -0
  20. package/flows/aidlc/skills/construction/bolt-start.md +442 -0
  21. package/flows/aidlc/skills/construction/bolt-status.md +185 -0
  22. package/flows/aidlc/skills/construction/navigator.md +196 -0
  23. package/flows/aidlc/skills/construction/prototype-apply.md +311 -0
  24. package/flows/aidlc/skills/inception/bolt-plan.md +372 -0
  25. package/flows/aidlc/skills/inception/context.md +171 -0
  26. package/flows/aidlc/skills/inception/intent-create.md +211 -0
  27. package/flows/aidlc/skills/inception/intent-list.md +124 -0
  28. package/flows/aidlc/skills/inception/navigator.md +207 -0
  29. package/flows/aidlc/skills/inception/requirements.md +227 -0
  30. package/flows/aidlc/skills/inception/review.md +248 -0
  31. package/flows/aidlc/skills/inception/story-create.md +304 -0
  32. package/flows/aidlc/skills/inception/units.md +278 -0
  33. package/flows/aidlc/skills/inception/vibe-to-spec.md +410 -0
  34. package/flows/aidlc/skills/master/analyze-context.md +239 -0
  35. package/flows/aidlc/skills/master/answer-question.md +141 -0
  36. package/flows/aidlc/skills/master/explain-flow.md +158 -0
  37. package/flows/aidlc/skills/master/project-init.md +281 -0
  38. package/flows/aidlc/skills/master/route-request.md +126 -0
  39. package/flows/aidlc/skills/operations/build.md +237 -0
  40. package/flows/aidlc/skills/operations/deploy.md +259 -0
  41. package/flows/aidlc/skills/operations/monitor.md +265 -0
  42. package/flows/aidlc/skills/operations/navigator.md +209 -0
  43. package/flows/aidlc/skills/operations/verify.md +224 -0
  44. package/flows/aidlc/templates/construction/bolt-template.md +226 -0
  45. package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt/adr-template.md +49 -0
  46. package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt/ddd-01-domain-model-template.md +55 -0
  47. package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt/ddd-02-technical-design-template.md +67 -0
  48. package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt/ddd-03-test-report-template.md +62 -0
  49. package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt.md +590 -0
  50. package/flows/aidlc/templates/construction/bolt-types/simple-construction-bolt.md +347 -0
  51. package/flows/aidlc/templates/construction/bolt-types/spike-bolt.md +240 -0
  52. package/flows/aidlc/templates/construction/construction-log-template.md +129 -0
  53. package/flows/aidlc/templates/construction/standards/coding-standards.md +29 -0
  54. package/flows/aidlc/templates/construction/standards/system-architecture.md +22 -0
  55. package/flows/aidlc/templates/construction/standards/tech-stack.md +19 -0
  56. package/flows/aidlc/templates/inception/inception-log-template.md +134 -0
  57. package/flows/aidlc/templates/inception/project/README.md +55 -0
  58. package/flows/aidlc/templates/inception/requirements-template.md +144 -0
  59. package/flows/aidlc/templates/inception/stories-template.md +38 -0
  60. package/flows/aidlc/templates/inception/story-template.md +147 -0
  61. package/flows/aidlc/templates/inception/system-context-template.md +29 -0
  62. package/flows/aidlc/templates/inception/unit-brief-template.md +177 -0
  63. package/flows/aidlc/templates/inception/units-template.md +52 -0
  64. package/flows/aidlc/templates/standards/catalog.yaml +345 -0
  65. package/flows/aidlc/templates/standards/coding-standards.guide.md +553 -0
  66. package/flows/aidlc/templates/standards/data-stack.guide.md +162 -0
  67. package/flows/aidlc/templates/standards/decision-index-template.md +32 -0
  68. package/flows/aidlc/templates/standards/tech-stack.guide.md +280 -0
  69. package/flows/fire/README.md +19 -0
  70. package/flows/fire/agents/builder/agent.md +254 -0
  71. package/flows/fire/agents/builder/skills/code-review/SKILL.md +257 -0
  72. package/flows/fire/agents/builder/skills/code-review/references/auto-fix-rules.md +218 -0
  73. package/flows/fire/agents/builder/skills/code-review/references/review-categories.md +154 -0
  74. package/flows/fire/agents/builder/skills/code-review/templates/review-report.md.hbs +120 -0
  75. package/flows/fire/agents/builder/skills/commit-changes/SKILL.md +232 -0
  76. package/flows/fire/agents/builder/skills/commit-changes/scripts/commit-changes.cjs +447 -0
  77. package/flows/fire/agents/builder/skills/run-execute/SKILL.md +700 -0
  78. package/flows/fire/agents/builder/skills/run-execute/scripts/complete-run.cjs +748 -0
  79. package/flows/fire/agents/builder/skills/run-execute/scripts/init-run.cjs +457 -0
  80. package/flows/fire/agents/builder/skills/run-execute/scripts/update-phase.cjs +239 -0
  81. package/flows/fire/agents/builder/skills/run-execute/templates/plan.md.hbs +61 -0
  82. package/flows/fire/agents/builder/skills/run-execute/templates/test-report.md.hbs +81 -0
  83. package/flows/fire/agents/builder/skills/run-plan/SKILL.md +366 -0
  84. package/flows/fire/agents/builder/skills/run-status/SKILL.md +96 -0
  85. package/flows/fire/agents/builder/skills/walkthrough-generate/SKILL.md +181 -0
  86. package/flows/fire/agents/builder/skills/walkthrough-generate/templates/walkthrough.md.hbs +108 -0
  87. package/flows/fire/agents/orchestrator/agent.md +144 -0
  88. package/flows/fire/agents/orchestrator/skills/project-init/SKILL.md +226 -0
  89. package/flows/fire/agents/orchestrator/skills/project-init/templates/coding-standards.md.hbs +149 -0
  90. package/flows/fire/agents/orchestrator/skills/project-init/templates/constitution.md.hbs +43 -0
  91. package/flows/fire/agents/orchestrator/skills/project-init/templates/system-architecture.md.hbs +101 -0
  92. package/flows/fire/agents/orchestrator/skills/project-init/templates/tech-stack.md.hbs +136 -0
  93. package/flows/fire/agents/orchestrator/skills/project-init/templates/testing-standards.md.hbs +94 -0
  94. package/flows/fire/agents/orchestrator/skills/route/SKILL.md +146 -0
  95. package/flows/fire/agents/orchestrator/skills/status/SKILL.md +696 -0
  96. package/flows/fire/agents/planner/agent.md +143 -0
  97. package/flows/fire/agents/planner/skills/design-doc-generate/SKILL.md +156 -0
  98. package/flows/fire/agents/planner/skills/design-doc-generate/templates/design.md.hbs +124 -0
  99. package/flows/fire/agents/planner/skills/intent-capture/SKILL.md +125 -0
  100. package/flows/fire/agents/planner/skills/intent-capture/templates/brief.md.hbs +40 -0
  101. package/flows/fire/agents/planner/skills/work-item-decompose/SKILL.md +166 -0
  102. package/flows/fire/agents/planner/skills/work-item-decompose/templates/work-item.md.hbs +40 -0
  103. package/flows/fire/commands/fire-builder.md +56 -0
  104. package/flows/fire/commands/fire-planner.md +48 -0
  105. package/flows/fire/commands/fire.md +46 -0
  106. package/flows/fire/memory-bank.yaml +240 -0
  107. package/flows/fire/quick-start.md +146 -0
  108. package/flows/simple/README.md +190 -0
  109. package/flows/simple/agents/agent.md +404 -0
  110. package/flows/simple/commands/agent.md +60 -0
  111. package/flows/simple/context-config.yaml +34 -0
  112. package/flows/simple/memory-bank.yaml +66 -0
  113. package/flows/simple/quick-start.md +231 -0
  114. package/flows/simple/skills/design.md +96 -0
  115. package/flows/simple/skills/execute.md +190 -0
  116. package/flows/simple/skills/requirements.md +94 -0
  117. package/flows/simple/skills/tasks.md +136 -0
  118. package/flows/simple/templates/design-template.md +138 -0
  119. package/flows/simple/templates/requirements-template.md +85 -0
  120. package/flows/simple/templates/tasks-template.md +104 -0
  121. package/lib/InstallerFactory.js +36 -0
  122. package/lib/analytics/env-detector.js +92 -0
  123. package/lib/analytics/index.js +22 -0
  124. package/lib/analytics/machine-id.js +33 -0
  125. package/lib/analytics/tracker.js +232 -0
  126. package/lib/cli-utils.js +342 -0
  127. package/lib/constants.js +44 -0
  128. package/lib/installer.js +406 -0
  129. package/lib/installers/AntigravityInstaller.js +22 -0
  130. package/lib/installers/ClaudeInstaller.js +85 -0
  131. package/lib/installers/ClineInstaller.js +21 -0
  132. package/lib/installers/CodexInstaller.js +21 -0
  133. package/lib/installers/CopilotInstaller.js +113 -0
  134. package/lib/installers/CursorInstaller.js +63 -0
  135. package/lib/installers/GeminiInstaller.js +75 -0
  136. package/lib/installers/KiroInstaller.js +77 -0
  137. package/lib/installers/OpenCodeInstaller.js +30 -0
  138. package/lib/installers/RooInstaller.js +22 -0
  139. package/lib/installers/ToolInstaller.js +76 -0
  140. package/lib/installers/WindsurfInstaller.js +22 -0
  141. package/lib/markdown-validator.ts +175 -0
  142. package/lib/yaml-validator.ts +99 -0
  143. package/package.json +69 -0
@@ -0,0 +1,120 @@
1
+ # Code Review Report
2
+
3
+ **Run**: {{run_id}}
4
+ **Intent**: {{intent_id}}
5
+ **Reviewed**: {{timestamp}}
6
+ **Files Reviewed**: {{files_count}}
7
+
8
+ ---
9
+
10
+ ## Summary
11
+
12
+ | Category | Auto-Fixed | Applied | Skipped |
13
+ |----------|------------|---------|---------|
14
+ | Code Quality | {{quality.auto_fixed}} | {{quality.applied}} | {{quality.skipped}} |
15
+ | Security | {{security.auto_fixed}} | {{security.applied}} | {{security.skipped}} |
16
+ | Architecture | {{architecture.auto_fixed}} | {{architecture.applied}} | {{architecture.skipped}} |
17
+ | Testing | {{testing.auto_fixed}} | {{testing.applied}} | {{testing.skipped}} |
18
+ | **Total** | **{{totals.auto_fixed}}** | **{{totals.applied}}** | **{{totals.skipped}}** |
19
+
20
+ **Tests Status**: {{#if tests_passing}}Passing{{else}}Failed{{/if}}
21
+
22
+ ---
23
+
24
+ ## Files Reviewed
25
+
26
+ {{#each files_reviewed}}
27
+ - `{{path}}` ({{type}})
28
+ {{/each}}
29
+
30
+ ---
31
+
32
+ ## Auto-Fixed Issues
33
+
34
+ {{#if auto_fixed}}
35
+ These issues were automatically fixed (mechanical, non-semantic changes):
36
+
37
+ {{#each auto_fixed}}
38
+ ### {{add @index 1}}. [{{category}}] {{title}}
39
+
40
+ - **File**: `{{file}}:{{line}}`
41
+ - **Description**: {{description}}
42
+ - **Diff**:
43
+
44
+ ```diff
45
+ {{diff}}
46
+ ```
47
+
48
+ {{/each}}
49
+ {{else}}
50
+ No auto-fixes applied.
51
+ {{/if}}
52
+
53
+ ---
54
+
55
+ ## Applied Suggestions
56
+
57
+ {{#if applied}}
58
+ These suggestions were approved and applied:
59
+
60
+ {{#each applied}}
61
+ ### {{add @index 1}}. [{{category}}] {{title}}
62
+
63
+ - **File**: `{{file}}:{{line}}`
64
+ - **Description**: {{description}}
65
+ - **Rationale**: {{rationale}}
66
+ - **Risk Level**: {{risk}}
67
+ - **Approved**: {{approved_at}}
68
+ - **Diff**:
69
+
70
+ ```diff
71
+ {{diff}}
72
+ ```
73
+
74
+ {{/each}}
75
+ {{else}}
76
+ No suggestions were applied.
77
+ {{/if}}
78
+
79
+ ---
80
+
81
+ ## Skipped Suggestions
82
+
83
+ {{#if skipped}}
84
+ These suggestions were identified but not applied:
85
+
86
+ {{#each skipped}}
87
+ ### {{add @index 1}}. [{{category}}] {{title}}
88
+
89
+ - **File**: `{{file}}:{{line}}`
90
+ - **Description**: {{description}}
91
+ - **Rationale**: {{rationale}}
92
+ - **Risk Level**: {{risk}}
93
+ - **Reason Skipped**: {{skip_reason}}
94
+
95
+ {{/each}}
96
+ {{else}}
97
+ No suggestions were skipped.
98
+ {{/if}}
99
+
100
+ ---
101
+
102
+ ## Project Tooling Used
103
+
104
+ {{#if linters_used}}
105
+ The following project linters were detected and used:
106
+
107
+ {{#each linters_used}}
108
+ - **{{name}}**: {{config_file}}
109
+ {{/each}}
110
+ {{else}}
111
+ No project linters detected. Used built-in review rules.
112
+ {{/if}}
113
+
114
+ ---
115
+
116
+ ## Standards Referenced
117
+
118
+ {{#each standards_loaded}}
119
+ - `{{path}}`
120
+ {{/each}}
@@ -0,0 +1,232 @@
1
+ ---
2
+ name: commit-changes
3
+ description: Commit changes to git after code review completes. Called ONCE PER WORK ITEM for atomic git traceability.
4
+ version: 1.0.0
5
+ ---
6
+
7
+ <objective>
8
+ Commit changes to git after code review completes.
9
+ Generate conventional commit messages based on work item context.
10
+ Stage only files created/modified during the current work item.
11
+ <critical>Called AFTER EACH work item completes (not once per run) for atomic git history.</critical>
12
+ </objective>
13
+
14
+ <triggers>
15
+ - Invoked by run-execute after code review completes (Step 6c)
16
+ - Receives: files_created, files_modified, run_id, work_item_id, intent_id, work_item_title
17
+ </triggers>
18
+
19
+ <degrees_of_freedom>
20
+ - **COMMIT_MESSAGE**: LOW — Follow conventional commits, derive from work item
21
+ - **STAGING**: LOW — Only stage files tracked in current run
22
+ - **ERROR HANDLING**: MEDIUM — Skip commit if git unavailable, log warning
23
+ </degrees_of_freedom>
24
+
25
+ <llm critical="true">
26
+ <mandate>ALWAYS use conventional commit format (type: description)</mandate>
27
+ <mandate>ONLY stage files from files_created and files_modified lists</mandate>
28
+ <mandate>ALWAYS include .specs-fire/state.yaml and work item status files with code commits</mandate>
29
+ <mandate>NEVER commit .specs-fire/runs/ artifacts (auto-generated, can be large)</mandate>
30
+ <mandate>INCLUDE work item ID and run ID in commit body for traceability</mandate>
31
+ <mandate>SKIP commit gracefully if git is not initialized</mandate>
32
+ <mandate>DERIVE commit type from work item (feat/fix/refactor/chore/test/docs)</mandate>
33
+ </llm>
34
+
35
+ <input_context>
36
+ The skill receives from run-execute:
37
+
38
+ ```yaml
39
+ files_created:
40
+ - path: src/auth/login.ts
41
+ purpose: Login endpoint handler
42
+ - path: src/auth/login.test.ts
43
+ purpose: Unit tests for login
44
+
45
+ files_modified:
46
+ - path: src/routes/index.ts
47
+ changes: Added login route
48
+
49
+ run_id: run-001
50
+ work_item_id: login-endpoint
51
+ work_item_title: Implement login endpoint
52
+ intent_id: user-auth
53
+ ```
54
+
55
+ </input_context>
56
+
57
+ <flow>
58
+ <step n="1" title="Check Git Availability">
59
+ <action>Check if .git directory exists in project root</action>
60
+ <action>Check if git command is available</action>
61
+
62
+ <check if="git not available or not initialized">
63
+ <output>
64
+ Git not initialized or unavailable. Skipping commit.
65
+ Run: git init to enable automatic commits.
66
+ </output>
67
+ <return>
68
+ {
69
+ "success": false,
70
+ "skipped": true,
71
+ "reason": "git_not_initialized"
72
+ }
73
+ </return>
74
+ </check>
75
+ </step>
76
+
77
+ <step n="2" title="Filter Files for Commit">
78
+ <action>Combine files_created and files_modified into candidate list</action>
79
+ <action>EXCLUDE any files under .specs-fire/ (those are documentation, not code)</action>
80
+ <action>EXCLUDE any files that don't exist (sanity check)</action>
81
+
82
+ <check if="no files to commit after filtering">
83
+ <output>No code changes to commit (only .specs-fire artifacts).</output>
84
+ <return>
85
+ {
86
+ "success": false,
87
+ "skipped": true,
88
+ "reason": "no_code_changes"
89
+ }
90
+ </return>
91
+ </check>
92
+ </step>
93
+
94
+ <step n="3" title="Generate Conventional Commit Message">
95
+ <action>Determine commit type based on work item:</action>
96
+ <type_determination>
97
+ <pattern if="work item contains 'new', 'add', 'create'">feat</pattern>
98
+ <pattern if="work item contains 'fix', 'bug', 'repair'">fix</pattern>
99
+ <pattern if="work item contains 'test', 'testing'">test</pattern>
100
+ <pattern if="work item contains 'doc', 'document', 'readme'">docs</pattern>
101
+ <pattern if="work item contains 'refactor', 'cleanup'">refactor</pattern>
102
+ <pattern>chore (fallback)</pattern>
103
+ </type_determination>
104
+
105
+ <action>Generate commit subject from work_item_title</action>
106
+ <action>Build commit body with:</action>
107
+ <substep>Work item ID and title</substep>
108
+ <substep>Run ID for traceability</substep>
109
+ <substep>File count summary</substep>
110
+
111
+ <commit_message_format>
112
+ {type}({scope}): {subject}
113
+
114
+ Work Item: {work_item_id} - {work_item_title}
115
+ Run: {run_id}
116
+
117
+ {files_count} file(s) changed
118
+ </commit_message_format>
119
+ </step>
120
+
121
+ <step n="4" title="Stage Files">
122
+ <action>Stage each file using git add:</action>
123
+ <code>git add -- {file_path}</code>
124
+
125
+ <check if="git add fails for any file">
126
+ <output>Warning: Failed to stage {file_path}. Continuing...</output>
127
+ </check>
128
+
129
+ <action>Verify staged files with git status</action>
130
+ </step>
131
+
132
+ <step n="5" title="Create Commit">
133
+ <action>Create commit with generated message:</action>
134
+ <code>git commit -m "{commit_message}"</code>
135
+
136
+ <check if="commit fails">
137
+ <check if="error is 'nothing to commit'">
138
+ <output>No changes to commit (files may not have changed).</output>
139
+ <return>
140
+ {
141
+ "success": false,
142
+ "skipped": true,
143
+ "reason": "nothing_to_commit"
144
+ }
145
+ </return>
146
+ </check>
147
+
148
+ <check if="error is pre-commit hook failure">
149
+ <output>Pre-commit hook failed. Commit skipped.</output>
150
+ <output>Fix issues and commit manually, or skip hooks with --no-verify</output>
151
+ <return>
152
+ {
153
+ "success": false,
154
+ "skipped": true,
155
+ "reason": "pre_commit_hook_failed"
156
+ }
157
+ </return>
158
+ </check>
159
+
160
+ <error>Commit failed with unexpected error.</error>
161
+ </check>
162
+
163
+ <action>Get commit hash from output</action>
164
+ <code>git rev-parse --short HEAD</code>
165
+ </step>
166
+
167
+ <step n="6" title="Return Result">
168
+ <output>
169
+ Changes committed successfully.
170
+ Commit: {commit_hash}
171
+ Type: {type}
172
+ Files: {count}
173
+ </output>
174
+
175
+ <return_to_parent>
176
+ {
177
+ "success": true,
178
+ "committed": true,
179
+ "commit_hash": "{short_hash}",
180
+ "commit_type": "{type}",
181
+ "files_count": {count},
182
+ "run_id": "{run_id}"
183
+ }
184
+ </return_to_parent>
185
+ </step>
186
+ </flow>
187
+
188
+ <output_artifact>
189
+ Creates a git commit containing:
190
+ - Only files from the current run (excluding .specs-fire/)
191
+ - Conventional commit message with run ID reference
192
+ </output_artifact>
193
+
194
+ <scripts>
195
+ | Script | Purpose | Usage |
196
+ |--------|---------|-------|
197
+ | `scripts/commit-changes.cjs` | Perform git commit with conventional message | `node scripts/commit-changes.cjs <rootPath> <runId> [options]` |
198
+
199
+ <script name="commit-changes.cjs">
200
+ ```bash
201
+ node scripts/commit-changes.cjs /project run-001 \
202
+ --files-created='[{"path":"...","purpose":"..."}]' \
203
+ --files-modified='[{"path":"...","changes":"..."}]' \
204
+ --work-item-id=wi-1 \
205
+ --work-item-title="Login endpoint" \
206
+ --intent-id=user-auth
207
+ ```
208
+
209
+ <output_format>
210
+ ```json
211
+ {
212
+ "success": true,
213
+ "committed": true,
214
+ "commit_hash": "abc1234",
215
+ "commit_type": "feat",
216
+ "files_count": 3,
217
+ "run_id": "run-001"
218
+ }
219
+ ```
220
+ </output_format>
221
+
222
+ <skipped_output>
223
+ ```json
224
+ {
225
+ "success": false,
226
+ "skipped": true,
227
+ "reason": "git_not_initialized"
228
+ }
229
+ ```
230
+ </skipped_output>
231
+ </script>
232
+ </scripts>