@chenmk/superflow 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (198) hide show
  1. package/INSTALL.en.md +106 -0
  2. package/INSTALL.md +664 -0
  3. package/LICENSE +21 -0
  4. package/README.md +142 -0
  5. package/README.zh-CN.md +117 -0
  6. package/assets/context-templates/business-rules.md +98 -0
  7. package/assets/context-templates/decisions.md +153 -0
  8. package/assets/context-templates/external-systems.md +166 -0
  9. package/assets/context-templates/incidents.md +89 -0
  10. package/assets/manifest.json +53 -0
  11. package/assets/prompts/superflow-archive.md +9 -0
  12. package/assets/prompts/superflow-clarify.md +10 -0
  13. package/assets/prompts/superflow-design.md +10 -0
  14. package/assets/prompts/superflow-docs.md +10 -0
  15. package/assets/prompts/superflow-implement.md +10 -0
  16. package/assets/prompts/superflow-pipeline.md +13 -0
  17. package/assets/prompts/superflow-verify.md +10 -0
  18. package/assets/rules/superflow-phase-guard.md +50 -0
  19. package/assets/scripts/claude-auto-backup-hook.sh +313 -0
  20. package/assets/scripts/codex-auto-backup-hook.sh +361 -0
  21. package/assets/scripts/install-sql-pre-commit.sh +44 -0
  22. package/assets/scripts/superflow-contract-hooks.sh +744 -0
  23. package/assets/scripts/superflow-delivery-check.sh +315 -0
  24. package/assets/scripts/superflow-dependency-update-hook.sh +161 -0
  25. package/assets/scripts/superflow-enforce-hook.sh +70 -0
  26. package/assets/scripts/superflow-hook-guard.sh +132 -0
  27. package/assets/scripts/superflow-integration-evidence-hook.sh +80 -0
  28. package/assets/scripts/superflow-sql-sync-hook.py +950 -0
  29. package/assets/scripts/superflow-test-report-lint.py +433 -0
  30. package/assets/scripts/superflow-verify-integration.sh +90 -0
  31. package/assets/scripts/sync-settings-json.py +52 -0
  32. package/assets/skills/api-doc-changelog/SKILL.md +193 -0
  33. package/assets/skills/openspec-apply-change/SKILL.md +156 -0
  34. package/assets/skills/openspec-archive-change/SKILL.md +114 -0
  35. package/assets/skills/openspec-explore/SKILL.md +288 -0
  36. package/assets/skills/openspec-propose/SKILL.md +110 -0
  37. package/assets/skills/superflow-archive/SKILL.md +61 -0
  38. package/assets/skills/superflow-clarify/SKILL.md +146 -0
  39. package/assets/skills/superflow-clarify/agents/openai.yaml +4 -0
  40. package/assets/skills/superflow-design/SKILL.md +83 -0
  41. package/assets/skills/superflow-design/agents/openai.yaml +4 -0
  42. package/assets/skills/superflow-docs/SKILL.md +316 -0
  43. package/assets/skills/superflow-docs/agents/openai.yaml +4 -0
  44. package/assets/skills/superflow-hotfix/SKILL.md +48 -0
  45. package/assets/skills/superflow-implement/SKILL.md +461 -0
  46. package/assets/skills/superflow-implement/agents/openai.yaml +4 -0
  47. package/assets/skills/superflow-pipeline/SKILL.md +844 -0
  48. package/assets/skills/superflow-pipeline/agents/openai.yaml +4 -0
  49. package/assets/skills/superflow-pipeline/references/api-design-template.md +431 -0
  50. package/assets/skills/superflow-pipeline/references/architecture-design-template.md +119 -0
  51. package/assets/skills/superflow-pipeline/references/batch-prompt-template.md +536 -0
  52. package/assets/skills/superflow-pipeline/references/batch-split-guide.md +140 -0
  53. package/assets/skills/superflow-pipeline/references/decision-point.md +30 -0
  54. package/assets/skills/superflow-pipeline/references/dirty-worktree.md +35 -0
  55. package/assets/skills/superflow-pipeline/references/document-templates.md +123 -0
  56. package/assets/skills/superflow-pipeline/references/feature-gated-workflow.md +124 -0
  57. package/assets/skills/superflow-pipeline/references/implementation-prompt-template.md +1056 -0
  58. package/assets/skills/superflow-pipeline/references/mock-strategy-guide.md +86 -0
  59. package/assets/skills/superflow-pipeline/references/openspec-format.md +57 -0
  60. package/assets/skills/superflow-pipeline/references/orchestration.md +639 -0
  61. package/assets/skills/superflow-pipeline/references/p0-baseline-template.md +174 -0
  62. package/assets/skills/superflow-pipeline/references/project-config.md +40 -0
  63. package/assets/skills/superflow-pipeline/references/prompt-usage-template.md +152 -0
  64. package/assets/skills/superflow-pipeline/references/quality-gate.md +299 -0
  65. package/assets/skills/superflow-pipeline/references/quality-standards.md +190 -0
  66. package/assets/skills/superflow-pipeline/references/reviewer-checklist.md +154 -0
  67. package/assets/skills/superflow-pipeline/references/sql-risk-review-checklist.md +323 -0
  68. package/assets/skills/superflow-pipeline/references/subagent-progress.md +90 -0
  69. package/assets/skills/superflow-pipeline/references/superpower-technical-design-template.md +125 -0
  70. package/assets/skills/superflow-pipeline/references/test-execution-template.md +220 -0
  71. package/assets/skills/superflow-pipeline/references/test-guide.md +30 -0
  72. package/assets/skills/superflow-pipeline/references/traceability-matrix.md +106 -0
  73. package/assets/skills/superflow-pipeline/references/validation-integrity.md +134 -0
  74. package/assets/skills/superflow-pipeline/scripts/superflow-archive.sh +178 -0
  75. package/assets/skills/superflow-pipeline/scripts/superflow-env.sh +118 -0
  76. package/assets/skills/superflow-pipeline/scripts/superflow-guard.sh +428 -0
  77. package/assets/skills/superflow-pipeline/scripts/superflow-handoff.sh +296 -0
  78. package/assets/skills/superflow-pipeline/scripts/superflow-state.sh +574 -0
  79. package/assets/skills/superflow-pipeline/scripts/superflow-status.sh +172 -0
  80. package/assets/skills/superflow-pipeline/scripts/superflow-yaml-validate.sh +138 -0
  81. package/assets/skills/superflow-table-impact-analysis/SKILL.md +77 -0
  82. package/assets/skills/superflow-tweak/SKILL.md +46 -0
  83. package/assets/skills/superflow-verify/SKILL.md +112 -0
  84. package/assets/skills-en/api-doc-changelog/SKILL.md +193 -0
  85. package/assets/skills-en/openspec-apply-change/SKILL.md +156 -0
  86. package/assets/skills-en/openspec-archive-change/SKILL.md +114 -0
  87. package/assets/skills-en/openspec-explore/SKILL.md +288 -0
  88. package/assets/skills-en/openspec-propose/SKILL.md +110 -0
  89. package/assets/skills-en/superflow-archive/SKILL.md +61 -0
  90. package/assets/skills-en/superflow-clarify/SKILL.md +146 -0
  91. package/assets/skills-en/superflow-clarify/agents/openai.yaml +4 -0
  92. package/assets/skills-en/superflow-design/SKILL.md +83 -0
  93. package/assets/skills-en/superflow-design/agents/openai.yaml +4 -0
  94. package/assets/skills-en/superflow-docs/SKILL.md +316 -0
  95. package/assets/skills-en/superflow-docs/agents/openai.yaml +4 -0
  96. package/assets/skills-en/superflow-hotfix/SKILL.md +48 -0
  97. package/assets/skills-en/superflow-implement/SKILL.md +461 -0
  98. package/assets/skills-en/superflow-implement/agents/openai.yaml +4 -0
  99. package/assets/skills-en/superflow-pipeline/SKILL.md +844 -0
  100. package/assets/skills-en/superflow-pipeline/agents/openai.yaml +4 -0
  101. package/assets/skills-en/superflow-pipeline/references/api-design-template.md +431 -0
  102. package/assets/skills-en/superflow-pipeline/references/architecture-design-template.md +119 -0
  103. package/assets/skills-en/superflow-pipeline/references/batch-prompt-template.md +536 -0
  104. package/assets/skills-en/superflow-pipeline/references/batch-split-guide.md +140 -0
  105. package/assets/skills-en/superflow-pipeline/references/decision-point.md +30 -0
  106. package/assets/skills-en/superflow-pipeline/references/dirty-worktree.md +35 -0
  107. package/assets/skills-en/superflow-pipeline/references/document-templates.md +123 -0
  108. package/assets/skills-en/superflow-pipeline/references/feature-gated-workflow.md +124 -0
  109. package/assets/skills-en/superflow-pipeline/references/implementation-prompt-template.md +1056 -0
  110. package/assets/skills-en/superflow-pipeline/references/mock-strategy-guide.md +86 -0
  111. package/assets/skills-en/superflow-pipeline/references/openspec-format.md +57 -0
  112. package/assets/skills-en/superflow-pipeline/references/orchestration.md +639 -0
  113. package/assets/skills-en/superflow-pipeline/references/p0-baseline-template.md +174 -0
  114. package/assets/skills-en/superflow-pipeline/references/project-config.md +40 -0
  115. package/assets/skills-en/superflow-pipeline/references/prompt-usage-template.md +152 -0
  116. package/assets/skills-en/superflow-pipeline/references/quality-gate.md +299 -0
  117. package/assets/skills-en/superflow-pipeline/references/quality-standards.md +190 -0
  118. package/assets/skills-en/superflow-pipeline/references/reviewer-checklist.md +154 -0
  119. package/assets/skills-en/superflow-pipeline/references/sql-risk-review-checklist.md +323 -0
  120. package/assets/skills-en/superflow-pipeline/references/subagent-progress.md +90 -0
  121. package/assets/skills-en/superflow-pipeline/references/superpower-technical-design-template.md +125 -0
  122. package/assets/skills-en/superflow-pipeline/references/test-execution-template.md +220 -0
  123. package/assets/skills-en/superflow-pipeline/references/test-guide.md +30 -0
  124. package/assets/skills-en/superflow-pipeline/references/traceability-matrix.md +106 -0
  125. package/assets/skills-en/superflow-pipeline/references/validation-integrity.md +134 -0
  126. package/assets/skills-en/superflow-pipeline/scripts/superflow-archive.sh +178 -0
  127. package/assets/skills-en/superflow-pipeline/scripts/superflow-env.sh +118 -0
  128. package/assets/skills-en/superflow-pipeline/scripts/superflow-guard.sh +428 -0
  129. package/assets/skills-en/superflow-pipeline/scripts/superflow-handoff.sh +296 -0
  130. package/assets/skills-en/superflow-pipeline/scripts/superflow-state.sh +574 -0
  131. package/assets/skills-en/superflow-pipeline/scripts/superflow-status.sh +172 -0
  132. package/assets/skills-en/superflow-pipeline/scripts/superflow-yaml-validate.sh +138 -0
  133. package/assets/skills-en/superflow-table-impact-analysis/SKILL.md +77 -0
  134. package/assets/skills-en/superflow-tweak/SKILL.md +46 -0
  135. package/assets/skills-en/superflow-verify/SKILL.md +112 -0
  136. package/dist/cli/index.js +186 -0
  137. package/dist/cli/index.js.map +1 -0
  138. package/dist/commands/archive.js +6 -0
  139. package/dist/commands/archive.js.map +1 -0
  140. package/dist/commands/clarify.js +6 -0
  141. package/dist/commands/clarify.js.map +1 -0
  142. package/dist/commands/design.js +6 -0
  143. package/dist/commands/design.js.map +1 -0
  144. package/dist/commands/docs.js +6 -0
  145. package/dist/commands/docs.js.map +1 -0
  146. package/dist/commands/doctor.js +473 -0
  147. package/dist/commands/doctor.js.map +1 -0
  148. package/dist/commands/implement.js +6 -0
  149. package/dist/commands/implement.js.map +1 -0
  150. package/dist/commands/init.js +471 -0
  151. package/dist/commands/init.js.map +1 -0
  152. package/dist/commands/pipeline.js +6 -0
  153. package/dist/commands/pipeline.js.map +1 -0
  154. package/dist/commands/scan.js +59 -0
  155. package/dist/commands/scan.js.map +1 -0
  156. package/dist/commands/status.js +173 -0
  157. package/dist/commands/status.js.map +1 -0
  158. package/dist/commands/uninstall.js +213 -0
  159. package/dist/commands/uninstall.js.map +1 -0
  160. package/dist/commands/update.js +187 -0
  161. package/dist/commands/update.js.map +1 -0
  162. package/dist/commands/verify.js +6 -0
  163. package/dist/commands/verify.js.map +1 -0
  164. package/dist/core/assets.js +27 -0
  165. package/dist/core/assets.js.map +1 -0
  166. package/dist/core/context.js +100 -0
  167. package/dist/core/context.js.map +1 -0
  168. package/dist/core/dependencies.js +146 -0
  169. package/dist/core/dependencies.js.map +1 -0
  170. package/dist/core/detect.js +71 -0
  171. package/dist/core/detect.js.map +1 -0
  172. package/dist/core/i18n.js +103 -0
  173. package/dist/core/i18n.js.map +1 -0
  174. package/dist/core/integrity.js +46 -0
  175. package/dist/core/integrity.js.map +1 -0
  176. package/dist/core/manifest.js +18 -0
  177. package/dist/core/manifest.js.map +1 -0
  178. package/dist/core/prompts.js +20 -0
  179. package/dist/core/prompts.js.map +1 -0
  180. package/dist/core/registry.js +134 -0
  181. package/dist/core/registry.js.map +1 -0
  182. package/dist/core/rules.js +17 -0
  183. package/dist/core/rules.js.map +1 -0
  184. package/dist/core/scripts.js +40 -0
  185. package/dist/core/scripts.js.map +1 -0
  186. package/dist/core/skill-check.js +31 -0
  187. package/dist/core/skill-check.js.map +1 -0
  188. package/dist/core/skills.js +56 -0
  189. package/dist/core/skills.js.map +1 -0
  190. package/dist/core/state.js +43 -0
  191. package/dist/core/state.js.map +1 -0
  192. package/dist/types.js +2 -0
  193. package/dist/types.js.map +1 -0
  194. package/dist/utils/path.js +11 -0
  195. package/dist/utils/path.js.map +1 -0
  196. package/dist/utils/shell.js +29 -0
  197. package/dist/utils/shell.js.map +1 -0
  198. package/package.json +60 -0
@@ -0,0 +1,473 @@
1
+ import { existsSync, readdirSync, readFileSync, statSync } from 'fs';
2
+ import { homedir } from 'os';
3
+ import path from 'path';
4
+ import { runCommand } from '../utils/shell.js';
5
+ import { getPlatformPaths, parseAgentSelection, parseInstallScope, resolveAgents, } from '../core/detect.js';
6
+ import { ALL_RULES, ALL_SKILLS, CODEX_PROMPTS, scriptsForAgent } from '../core/assets.js';
7
+ const VALID_STATE_FIELDS = new Set([
8
+ 'workflow',
9
+ 'phase',
10
+ 'canonical_spec',
11
+ 'context_compression',
12
+ 'design_doc',
13
+ 'technical_design',
14
+ 'plan',
15
+ 'base_ref',
16
+ 'build_mode',
17
+ 'build_pause',
18
+ 'subagent_dispatch',
19
+ 'tdd_mode',
20
+ 'review_mode',
21
+ 'isolation',
22
+ 'verify_mode',
23
+ 'auto_transition',
24
+ 'verify_result',
25
+ 'verification_report',
26
+ 'branch_status',
27
+ 'archived',
28
+ 'direct_override',
29
+ 'build_command',
30
+ 'verify_command',
31
+ 'handoff_context',
32
+ 'handoff_hash',
33
+ 'superpower_strategy',
34
+ 'implementation_prompt',
35
+ 'worktree_ports',
36
+ 'created_at',
37
+ 'verified_at',
38
+ 'updated_at',
39
+ ]);
40
+ const REQUIRED_STATE_FIELDS = [
41
+ 'workflow',
42
+ 'phase',
43
+ 'canonical_spec',
44
+ 'build_mode',
45
+ 'tdd_mode',
46
+ 'review_mode',
47
+ 'isolation',
48
+ 'verify_mode',
49
+ 'auto_transition',
50
+ 'verify_result',
51
+ 'verification_report',
52
+ 'branch_status',
53
+ 'archived',
54
+ 'handoff_context',
55
+ 'handoff_hash',
56
+ 'created_at',
57
+ 'updated_at',
58
+ ];
59
+ export async function doctorCommand(options = {}) {
60
+ if (options.json) {
61
+ const result = await collectDoctor(options);
62
+ console.log(JSON.stringify(result, null, 2));
63
+ if (result.failed)
64
+ process.exit(1);
65
+ return;
66
+ }
67
+ let failed = false;
68
+ const agents = resolveAgents(parseAgentSelection(options.agent));
69
+ const scope = parseDoctorScope(options.scope);
70
+ const projectPath = path.resolve(options.targetPath ?? process.cwd());
71
+ console.log('[CLI]');
72
+ const which = await runCommand('which', ['superflow']).catch(() => ({ code: 1, stdout: '', stderr: '' }));
73
+ if (which.code === 0) {
74
+ console.log(' ✓ superflow CLI 在 PATH');
75
+ }
76
+ else {
77
+ console.log(' ✗ superflow CLI 不在 PATH(FAIL)');
78
+ failed = true;
79
+ }
80
+ console.log('\n[第三方依赖]');
81
+ const openspec = await runCommand('which', ['openspec']).catch(() => ({ code: 1, stdout: '', stderr: '' }));
82
+ if (openspec.code === 0) {
83
+ console.log(' ✓ openspec CLI 在 PATH');
84
+ }
85
+ else {
86
+ console.log(' ✗ openspec CLI 缺失(FAIL)');
87
+ failed = true;
88
+ }
89
+ const openspecProjectChecks = collectOpenSpecProjectChecks(projectPath);
90
+ for (const check of openspecProjectChecks) {
91
+ if (check.status === 'pass') {
92
+ console.log(` ✓ ${check.check}: ${check.message}`);
93
+ }
94
+ else {
95
+ console.log(` ✗ ${check.check}: ${check.message}`);
96
+ failed = true;
97
+ }
98
+ }
99
+ for (const agent of agents) {
100
+ failed = checkAgentDependencies(agent, failed, firstInstallScope(scope), projectPath);
101
+ }
102
+ for (const currentScope of scopesForDoctor(scope)) {
103
+ for (const agent of agents) {
104
+ const platform = getPlatformPaths(agent, currentScope, projectPath);
105
+ console.log(`\n[脚本: ${platform.name}]`);
106
+ if (existsSync(platform.scriptsDir)) {
107
+ for (const hook of scriptsForAgent(agent)) {
108
+ if (existsSync(path.join(platform.scriptsDir, hook))) {
109
+ console.log(` ✓ ${hook}`);
110
+ }
111
+ else {
112
+ console.log(` ✗ ${hook} 缺失(FAIL)`);
113
+ failed = true;
114
+ }
115
+ }
116
+ failed = checkHookRegistration(platform.settingsFile, agent, failed);
117
+ }
118
+ else {
119
+ console.log(` ✗ ${platform.scriptsDir} 缺失(FAIL)`);
120
+ failed = true;
121
+ }
122
+ console.log(`\n[Skills: ${platform.name}]`);
123
+ for (const skill of ALL_SKILLS) {
124
+ if (existsSync(path.join(platform.skillsDir, skill, 'SKILL.md'))) {
125
+ console.log(` ✓ ${skill}`);
126
+ }
127
+ else {
128
+ console.log(` ✗ ${skill} 缺失(FAIL)`);
129
+ failed = true;
130
+ }
131
+ }
132
+ if (agent === 'codex') {
133
+ console.log(`\n[Prompt Alias: ${platform.name}]`);
134
+ for (const prompt of CODEX_PROMPTS) {
135
+ if (existsSync(path.join(platform.promptsDir, prompt))) {
136
+ console.log(` ✓ /${prompt.replace(/\.md$/, '')}`);
137
+ }
138
+ else {
139
+ console.log(` ✗ /${prompt.replace(/\.md$/, '')} 缺失(FAIL)`);
140
+ failed = true;
141
+ }
142
+ }
143
+ }
144
+ console.log(`\n[Rules: ${platform.name}]`);
145
+ for (const rule of ALL_RULES) {
146
+ if (existsSync(path.join(platform.rulesDir, rule))) {
147
+ console.log(` ✓ ${rule}`);
148
+ }
149
+ else {
150
+ console.log(` ✗ ${rule} 缺失(FAIL)`);
151
+ failed = true;
152
+ }
153
+ }
154
+ }
155
+ }
156
+ const stateChecks = collectSddStateChecks(projectPath);
157
+ if (stateChecks.length > 0) {
158
+ console.log('\n[SuperBridge Flow State]');
159
+ for (const check of stateChecks) {
160
+ if (check.status === 'pass') {
161
+ console.log(` ✓ ${check.check}: ${check.message}`);
162
+ }
163
+ else if (check.status === 'warn') {
164
+ console.log(` ⚠ ${check.check}: ${check.message}`);
165
+ }
166
+ else {
167
+ console.log(` ✗ ${check.check}: ${check.message}`);
168
+ failed = true;
169
+ }
170
+ }
171
+ }
172
+ console.log('');
173
+ if (failed) {
174
+ console.log('→ Exit code: 1 (FAIL)');
175
+ process.exit(1);
176
+ }
177
+ else {
178
+ console.log('→ Exit code: 0 (PASS / 仅 WARN)');
179
+ }
180
+ }
181
+ export async function collectDoctor(options = {}) {
182
+ const agents = resolveAgents(parseAgentSelection(options.agent));
183
+ const scope = parseDoctorScope(options.scope);
184
+ const scopesChecked = scopesForDoctor(scope);
185
+ const projectPath = path.resolve(options.projectPath ?? options.targetPath ?? process.cwd());
186
+ const checks = [];
187
+ const which = await runCommand('which', ['superflow']).catch(() => ({ code: 1, stdout: '', stderr: '' }));
188
+ checks.push({
189
+ check: 'superflow CLI',
190
+ status: which.code === 0 ? 'pass' : 'fail',
191
+ message: which.code === 0 ? 'available in PATH' : 'missing from PATH',
192
+ });
193
+ const openspec = await runCommand('which', ['openspec']).catch(() => ({ code: 1, stdout: '', stderr: '' }));
194
+ checks.push({
195
+ check: 'openspec CLI',
196
+ status: openspec.code === 0 ? 'pass' : 'fail',
197
+ message: openspec.code === 0 ? 'available in PATH' : 'missing from PATH',
198
+ });
199
+ checks.push(...collectOpenSpecProjectChecks(projectPath));
200
+ for (const currentScope of scopesChecked) {
201
+ for (const agent of agents) {
202
+ const platform = getPlatformPaths(agent, currentScope, projectPath);
203
+ checks.push({
204
+ check: `superpowers:${agent}`,
205
+ status: hasSuperpowers(agent) ? 'pass' : 'warn',
206
+ message: hasSuperpowers(agent) ? 'detected' : 'not detected',
207
+ });
208
+ checks.push({
209
+ check: `understand-anything:${agent}`,
210
+ status: hasUnderstand(agent) ? 'pass' : 'warn',
211
+ message: hasUnderstand(agent) ? 'detected' : 'not detected',
212
+ });
213
+ checks.push({
214
+ check: `api-doc-changelog:${agent}`,
215
+ status: existsSync(path.join(platform.skillsDir, 'api-doc-changelog', 'SKILL.md')) ? 'pass' : 'warn',
216
+ message: existsSync(path.join(platform.skillsDir, 'api-doc-changelog', 'SKILL.md')) ? 'detected' : 'missing',
217
+ });
218
+ for (const script of scriptsForAgent(agent)) {
219
+ const scriptPath = path.join(platform.scriptsDir, script);
220
+ checks.push({
221
+ check: `script:${agent}:${currentScope}:${script}`,
222
+ status: existsSync(scriptPath) ? 'pass' : 'fail',
223
+ message: scriptPath,
224
+ });
225
+ }
226
+ const hookCount = countSddHookCommands(platform.settingsFile, agent);
227
+ checks.push({
228
+ check: `hooks:${agent}:${currentScope}`,
229
+ status: hookCount >= 7 ? 'pass' : 'fail',
230
+ message: `${hookCount} command(s) registered`,
231
+ });
232
+ for (const skill of ALL_SKILLS) {
233
+ const skillPath = path.join(platform.skillsDir, skill, 'SKILL.md');
234
+ checks.push({
235
+ check: `skill:${agent}:${currentScope}:${skill}`,
236
+ status: existsSync(skillPath) ? 'pass' : 'fail',
237
+ message: skillPath,
238
+ });
239
+ }
240
+ if (agent === 'codex') {
241
+ for (const prompt of CODEX_PROMPTS) {
242
+ const promptPath = path.join(platform.promptsDir, prompt);
243
+ checks.push({
244
+ check: `prompt:${agent}:${currentScope}:${prompt}`,
245
+ status: existsSync(promptPath) ? 'pass' : 'fail',
246
+ message: promptPath,
247
+ });
248
+ }
249
+ }
250
+ for (const rule of ALL_RULES) {
251
+ const ruleFile = path.join(platform.rulesDir, rule);
252
+ checks.push({
253
+ check: `rule:${agent}:${currentScope}:${rule}`,
254
+ status: existsSync(ruleFile) ? 'pass' : 'fail',
255
+ message: ruleFile,
256
+ });
257
+ }
258
+ }
259
+ }
260
+ checks.push(...collectSddStateChecks(projectPath));
261
+ return {
262
+ agents,
263
+ scope,
264
+ scopesChecked,
265
+ projectPath,
266
+ failed: checks.some((check) => check.status === 'fail'),
267
+ checks,
268
+ };
269
+ }
270
+ function collectOpenSpecProjectChecks(projectPath) {
271
+ const changesDir = path.join(projectPath, 'openspec', 'changes');
272
+ const specsDir = path.join(projectPath, 'openspec', 'specs');
273
+ const missing = [
274
+ existsSync(changesDir) ? '' : 'openspec/changes',
275
+ existsSync(specsDir) ? '' : 'openspec/specs',
276
+ ].filter(Boolean);
277
+ return [{
278
+ check: 'openspec project',
279
+ status: missing.length > 0 ? 'fail' : 'pass',
280
+ message: missing.length > 0
281
+ ? `missing ${missing.join(', ')}; run superflow init or openspec init`
282
+ : 'openspec/changes and openspec/specs detected',
283
+ }];
284
+ }
285
+ function collectSddStateChecks(projectPath) {
286
+ const changesDir = path.join(projectPath, 'openspec', 'changes');
287
+ if (!existsSync(changesDir))
288
+ return [];
289
+ const checks = [];
290
+ for (const entry of readdirSync(changesDir).sort()) {
291
+ const changeDir = path.join(changesDir, entry);
292
+ if (!safeIsDirectory(changeDir))
293
+ continue;
294
+ const statePath = path.join(changeDir, '.sdd', 'state.yaml');
295
+ if (!existsSync(statePath))
296
+ continue;
297
+ const state = readFileSync(statePath, 'utf-8');
298
+ const keys = collectTopLevelYamlKeys(state);
299
+ const unknown = keys.filter((key) => !VALID_STATE_FIELDS.has(key));
300
+ const missing = REQUIRED_STATE_FIELDS.filter((key) => !keys.includes(key));
301
+ const invalidHash = invalidHandoffHash(state);
302
+ const problems = [
303
+ unknown.length > 0 ? `unknown field(s): ${unknown.join(', ')}` : '',
304
+ missing.length > 0 ? `missing field(s): ${missing.join(', ')}` : '',
305
+ invalidHash,
306
+ ].filter(Boolean);
307
+ checks.push({
308
+ check: `superflow-state:${entry}`,
309
+ status: problems.length > 0 ? 'fail' : 'pass',
310
+ message: problems.length > 0 ? problems.join('; ') : 'valid',
311
+ });
312
+ }
313
+ return checks;
314
+ }
315
+ function collectTopLevelYamlKeys(content) {
316
+ const keys = [];
317
+ for (const line of content.split(/\r?\n/)) {
318
+ const trimmed = line.trim();
319
+ if (!trimmed || trimmed.startsWith('#'))
320
+ continue;
321
+ if (/^\s/.test(line) || trimmed.startsWith('- '))
322
+ continue;
323
+ const match = line.match(/^['"]?([A-Za-z0-9_-]+)['"]?\s*:/);
324
+ if (match)
325
+ keys.push(match[1]);
326
+ }
327
+ return keys;
328
+ }
329
+ function invalidHandoffHash(content) {
330
+ const match = content.match(/^handoff_hash:\s*(.*)$/m);
331
+ if (!match)
332
+ return '';
333
+ const value = match[1].replace(/\s+#.*$/, '').trim();
334
+ if (!value || value === 'null')
335
+ return '';
336
+ return /^[a-f0-9]{64}$/.test(value)
337
+ ? ''
338
+ : `handoff_hash is not sha256: ${value}`;
339
+ }
340
+ function safeIsDirectory(target) {
341
+ try {
342
+ return statSync(target).isDirectory();
343
+ }
344
+ catch {
345
+ return false;
346
+ }
347
+ }
348
+ function parseDoctorScope(value) {
349
+ if (value === 'auto')
350
+ return 'auto';
351
+ return parseInstallScope(value);
352
+ }
353
+ function scopesForDoctor(scope) {
354
+ return scope === 'auto' ? ['project', 'global'] : [scope];
355
+ }
356
+ function firstInstallScope(scope) {
357
+ return scope === 'auto' ? 'global' : scope;
358
+ }
359
+ function checkAgentDependencies(agent, failed, scope, projectPath) {
360
+ const platform = getPlatformPaths(agent, scope, projectPath);
361
+ const label = agent === 'claude' ? 'Claude' : 'Codex';
362
+ if (hasSuperpowers(agent)) {
363
+ console.log(` ✓ superpowers (${label})`);
364
+ }
365
+ else {
366
+ console.log(` ⚠ superpowers 未检测到(${label},WARN)`);
367
+ }
368
+ if (hasUnderstand(agent)) {
369
+ console.log(` ✓ understand-anything (${label})`);
370
+ }
371
+ else {
372
+ console.log(` ⚠ understand-anything 未检测到(${label},WARN)`);
373
+ }
374
+ if (existsSync(path.join(platform.skillsDir, 'api-doc-changelog', 'SKILL.md'))) {
375
+ console.log(` ✓ api-doc-changelog (${label})`);
376
+ }
377
+ else {
378
+ console.log(` ⚠ api-doc-changelog 缺失(${label},WARN)`);
379
+ }
380
+ return failed;
381
+ }
382
+ function checkHookRegistration(settingsFile, agent, failed) {
383
+ if (!existsSync(settingsFile)) {
384
+ console.log(` ✗ ${settingsFile} 不存在,无法检查 hook 注册(FAIL)`);
385
+ return true;
386
+ }
387
+ const settings = JSON.parse(readFileSync(settingsFile, 'utf-8'));
388
+ const sddCommands = countSddHookCommands(settingsFile, agent, settings);
389
+ if (sddCommands >= 7) {
390
+ console.log(` ✓ ${sddCommands} workflow hook command 已注册到 ${settingsFile}`);
391
+ return failed;
392
+ }
393
+ console.log(` ✗ ${settingsFile} 只有 ${sddCommands} workflow hook command(FAIL,需要 7+)`);
394
+ return true;
395
+ }
396
+ function countSddHookCommands(settingsFile, agent, parsedSettings) {
397
+ if (!existsSync(settingsFile))
398
+ return 0;
399
+ const settings = parsedSettings ?? JSON.parse(readFileSync(settingsFile, 'utf-8'));
400
+ const hooks = settings.hooks || {};
401
+ let sddCommands = 0;
402
+ const scriptDir = agent === 'claude' ? '/scripts/' : '/hooks/';
403
+ for (const entries of Object.values(hooks)) {
404
+ if (!Array.isArray(entries))
405
+ continue;
406
+ for (const entry of entries) {
407
+ if (!entry?.hooks)
408
+ continue;
409
+ for (const h of entry.hooks) {
410
+ if (h.command?.includes(`${scriptDir}sdd-`) ||
411
+ h.command?.includes(`${scriptDir}${agent}-auto-backup`)) {
412
+ sddCommands++;
413
+ }
414
+ }
415
+ }
416
+ }
417
+ return sddCommands;
418
+ }
419
+ function hasSuperpowers(agent) {
420
+ const home = homedir();
421
+ const roots = agent === 'codex'
422
+ ? [
423
+ path.join(home, '.codex', 'plugins', 'cache'),
424
+ path.join(home, '.codex', '.tmp', 'plugins'),
425
+ ]
426
+ : [
427
+ path.join(home, '.claude', 'plugins'),
428
+ path.join(home, '.claude', 'plugins', 'cache'),
429
+ ];
430
+ return roots.some((root) => containsPathSegment(root, 'superpowers'));
431
+ }
432
+ function hasUnderstand(agent) {
433
+ const home = homedir();
434
+ const pluginSkill = path.join(home, '.understand-anything', 'repo', 'understand-anything-plugin', 'skills', 'understand', 'SKILL.md');
435
+ if (!existsSync(pluginSkill))
436
+ return false;
437
+ if (agent === 'codex') {
438
+ return existsSync(path.join(home, '.agents', 'skills', 'understand', 'SKILL.md'));
439
+ }
440
+ return existsSync(pluginSkill);
441
+ }
442
+ function containsPathSegment(root, segment) {
443
+ if (!existsSync(root))
444
+ return false;
445
+ const stack = [root];
446
+ const needle = segment.toLowerCase();
447
+ while (stack.length > 0) {
448
+ const current = stack.pop();
449
+ let entries;
450
+ try {
451
+ entries = readdirSync(current);
452
+ }
453
+ catch {
454
+ continue;
455
+ }
456
+ for (const entry of entries) {
457
+ const full = path.join(current, entry);
458
+ if (entry.toLowerCase().includes(needle))
459
+ return true;
460
+ if (stack.length < 200 && existsSync(full)) {
461
+ try {
462
+ if (statSync(full).isDirectory())
463
+ stack.push(full);
464
+ }
465
+ catch {
466
+ continue;
467
+ }
468
+ }
469
+ }
470
+ }
471
+ return false;
472
+ }
473
+ //# sourceMappingURL=doctor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doctor.js","sourceRoot":"","sources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O,CAAC,WAAW,EAAE,CAAC;IACrC,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxB,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,EAAG,CAAC;QAC7B,IAAI,OAAiB,CAAC;QACtB,IAAI,CAAC;YACH,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC;QAAC,MAAM,CAAC;YACP,SAAS;QACX,CAAC;QACD,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;YAC5B,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;YACvC,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC;gBAAE,OAAO,IAAI,CAAC;YACtD,IAAI,KAAK,CAAC,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC3C,IAAI,CAAC;oBACH,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE;wBAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACrD,CAAC;gBAAC,MAAM,CAAC;oBACP,SAAS;gBACX,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { checkSkillDeployment } from '../core/skill-check.js';
2
+ const SKILL_NAME = 'superflow-implement';
3
+ export async function implementCommand(_task, options = {}) {
4
+ checkSkillDeployment(SKILL_NAME, options);
5
+ }
6
+ //# sourceMappingURL=implement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"implement.js","sourceRoot":"","sources":["../../src/commands/implement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAA0B,MAAM,wBAAwB,CAAC;AAEtF,MAAM,UAAU,GAAG,qBAAqB,CAAC;AAEzC,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,KAAc,EACd,UAA6B,EAAE;IAE/B,oBAAoB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;AAC5C,CAAC"}