speccore 1.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.
Files changed (196) hide show
  1. package/README.en.md +401 -0
  2. package/README.md +401 -0
  3. package/bin/speccore +2 -0
  4. package/dist/cli.d.ts +2 -0
  5. package/dist/cli.d.ts.map +1 -0
  6. package/dist/cli.js +450 -0
  7. package/dist/cli.js.map +1 -0
  8. package/dist/commands/archive.d.ts +10 -0
  9. package/dist/commands/archive.d.ts.map +1 -0
  10. package/dist/commands/archive.js +138 -0
  11. package/dist/commands/archive.js.map +1 -0
  12. package/dist/commands/audit.d.ts +10 -0
  13. package/dist/commands/audit.d.ts.map +1 -0
  14. package/dist/commands/audit.js +278 -0
  15. package/dist/commands/audit.js.map +1 -0
  16. package/dist/commands/baseline.d.ts +13 -0
  17. package/dist/commands/baseline.d.ts.map +1 -0
  18. package/dist/commands/baseline.js +227 -0
  19. package/dist/commands/baseline.js.map +1 -0
  20. package/dist/commands/bugfix.d.ts +13 -0
  21. package/dist/commands/bugfix.d.ts.map +1 -0
  22. package/dist/commands/bugfix.js +181 -0
  23. package/dist/commands/bugfix.js.map +1 -0
  24. package/dist/commands/change.d.ts +14 -0
  25. package/dist/commands/change.d.ts.map +1 -0
  26. package/dist/commands/change.js +150 -0
  27. package/dist/commands/change.js.map +1 -0
  28. package/dist/commands/config.d.ts +7 -0
  29. package/dist/commands/config.d.ts.map +1 -0
  30. package/dist/commands/config.js +110 -0
  31. package/dist/commands/config.js.map +1 -0
  32. package/dist/commands/dashboard.d.ts +9 -0
  33. package/dist/commands/dashboard.d.ts.map +1 -0
  34. package/dist/commands/dashboard.js +209 -0
  35. package/dist/commands/dashboard.js.map +1 -0
  36. package/dist/commands/demo.d.ts +10 -0
  37. package/dist/commands/demo.d.ts.map +1 -0
  38. package/dist/commands/demo.js +151 -0
  39. package/dist/commands/demo.js.map +1 -0
  40. package/dist/commands/execute.d.ts +18 -0
  41. package/dist/commands/execute.d.ts.map +1 -0
  42. package/dist/commands/execute.js +127 -0
  43. package/dist/commands/execute.js.map +1 -0
  44. package/dist/commands/global-status.d.ts +9 -0
  45. package/dist/commands/global-status.d.ts.map +1 -0
  46. package/dist/commands/global-status.js +135 -0
  47. package/dist/commands/global-status.js.map +1 -0
  48. package/dist/commands/goal.d.ts +15 -0
  49. package/dist/commands/goal.d.ts.map +1 -0
  50. package/dist/commands/goal.js +282 -0
  51. package/dist/commands/goal.js.map +1 -0
  52. package/dist/commands/handover.d.ts +11 -0
  53. package/dist/commands/handover.d.ts.map +1 -0
  54. package/dist/commands/handover.js +169 -0
  55. package/dist/commands/handover.js.map +1 -0
  56. package/dist/commands/health.d.ts +7 -0
  57. package/dist/commands/health.d.ts.map +1 -0
  58. package/dist/commands/health.js +80 -0
  59. package/dist/commands/health.js.map +1 -0
  60. package/dist/commands/help.d.ts +10 -0
  61. package/dist/commands/help.d.ts.map +1 -0
  62. package/dist/commands/help.js +93 -0
  63. package/dist/commands/help.js.map +1 -0
  64. package/dist/commands/history.d.ts +9 -0
  65. package/dist/commands/history.d.ts.map +1 -0
  66. package/dist/commands/history.js +87 -0
  67. package/dist/commands/history.js.map +1 -0
  68. package/dist/commands/impact.d.ts +12 -0
  69. package/dist/commands/impact.d.ts.map +1 -0
  70. package/dist/commands/impact.js +238 -0
  71. package/dist/commands/impact.js.map +1 -0
  72. package/dist/commands/import.d.ts +15 -0
  73. package/dist/commands/import.d.ts.map +1 -0
  74. package/dist/commands/import.js +366 -0
  75. package/dist/commands/import.js.map +1 -0
  76. package/dist/commands/init.d.ts +6 -0
  77. package/dist/commands/init.d.ts.map +1 -0
  78. package/dist/commands/init.js +564 -0
  79. package/dist/commands/init.js.map +1 -0
  80. package/dist/commands/iteration/create.d.ts +7 -0
  81. package/dist/commands/iteration/create.d.ts.map +1 -0
  82. package/dist/commands/iteration/create.js +141 -0
  83. package/dist/commands/iteration/create.js.map +1 -0
  84. package/dist/commands/iteration/split.d.ts +9 -0
  85. package/dist/commands/iteration/split.d.ts.map +1 -0
  86. package/dist/commands/iteration/split.js +165 -0
  87. package/dist/commands/iteration/split.js.map +1 -0
  88. package/dist/commands/iteration-from-global.d.ts +11 -0
  89. package/dist/commands/iteration-from-global.d.ts.map +1 -0
  90. package/dist/commands/iteration-from-global.js +294 -0
  91. package/dist/commands/iteration-from-global.js.map +1 -0
  92. package/dist/commands/plan.d.ts +12 -0
  93. package/dist/commands/plan.d.ts.map +1 -0
  94. package/dist/commands/plan.js +126 -0
  95. package/dist/commands/plan.js.map +1 -0
  96. package/dist/commands/progress.d.ts +10 -0
  97. package/dist/commands/progress.d.ts.map +1 -0
  98. package/dist/commands/progress.js +89 -0
  99. package/dist/commands/progress.js.map +1 -0
  100. package/dist/commands/rename.d.ts +14 -0
  101. package/dist/commands/rename.d.ts.map +1 -0
  102. package/dist/commands/rename.js +298 -0
  103. package/dist/commands/rename.js.map +1 -0
  104. package/dist/commands/report.d.ts +10 -0
  105. package/dist/commands/report.d.ts.map +1 -0
  106. package/dist/commands/report.js +124 -0
  107. package/dist/commands/report.js.map +1 -0
  108. package/dist/commands/research.d.ts +14 -0
  109. package/dist/commands/research.d.ts.map +1 -0
  110. package/dist/commands/research.js +181 -0
  111. package/dist/commands/research.js.map +1 -0
  112. package/dist/commands/retro.d.ts +10 -0
  113. package/dist/commands/retro.d.ts.map +1 -0
  114. package/dist/commands/retro.js +130 -0
  115. package/dist/commands/retro.js.map +1 -0
  116. package/dist/commands/spec.d.ts +8 -0
  117. package/dist/commands/spec.d.ts.map +1 -0
  118. package/dist/commands/spec.js +155 -0
  119. package/dist/commands/spec.js.map +1 -0
  120. package/dist/commands/status.d.ts +7 -0
  121. package/dist/commands/status.d.ts.map +1 -0
  122. package/dist/commands/status.js +48 -0
  123. package/dist/commands/status.js.map +1 -0
  124. package/dist/commands/sync-global.d.ts +13 -0
  125. package/dist/commands/sync-global.d.ts.map +1 -0
  126. package/dist/commands/sync-global.js +218 -0
  127. package/dist/commands/sync-global.js.map +1 -0
  128. package/dist/commands/sync.d.ts +13 -0
  129. package/dist/commands/sync.d.ts.map +1 -0
  130. package/dist/commands/sync.js +170 -0
  131. package/dist/commands/sync.js.map +1 -0
  132. package/dist/commands/task/new.d.ts +13 -0
  133. package/dist/commands/task/new.d.ts.map +1 -0
  134. package/dist/commands/task/new.js +195 -0
  135. package/dist/commands/task/new.js.map +1 -0
  136. package/dist/commands/template-add.d.ts +12 -0
  137. package/dist/commands/template-add.d.ts.map +1 -0
  138. package/dist/commands/template-add.js +65 -0
  139. package/dist/commands/template-add.js.map +1 -0
  140. package/dist/commands/validate.d.ts +10 -0
  141. package/dist/commands/validate.d.ts.map +1 -0
  142. package/dist/commands/validate.js +37 -0
  143. package/dist/commands/validate.js.map +1 -0
  144. package/dist/commands/welcome.d.ts +9 -0
  145. package/dist/commands/welcome.d.ts.map +1 -0
  146. package/dist/commands/welcome.js +166 -0
  147. package/dist/commands/welcome.js.map +1 -0
  148. package/dist/core/context.d.ts +31 -0
  149. package/dist/core/context.d.ts.map +1 -0
  150. package/dist/core/context.js +145 -0
  151. package/dist/core/context.js.map +1 -0
  152. package/dist/core/global-layer.d.ts +124 -0
  153. package/dist/core/global-layer.d.ts.map +1 -0
  154. package/dist/core/global-layer.js +456 -0
  155. package/dist/core/global-layer.js.map +1 -0
  156. package/dist/core/index.d.ts +8 -0
  157. package/dist/core/index.d.ts.map +1 -0
  158. package/dist/core/index.js +24 -0
  159. package/dist/core/index.js.map +1 -0
  160. package/dist/core/intent-recognition.d.ts +48 -0
  161. package/dist/core/intent-recognition.d.ts.map +1 -0
  162. package/dist/core/intent-recognition.js +485 -0
  163. package/dist/core/intent-recognition.js.map +1 -0
  164. package/dist/core/state.d.ts +26 -0
  165. package/dist/core/state.d.ts.map +1 -0
  166. package/dist/core/state.js +187 -0
  167. package/dist/core/state.js.map +1 -0
  168. package/dist/core/template-engine.d.ts +28 -0
  169. package/dist/core/template-engine.d.ts.map +1 -0
  170. package/dist/core/template-engine.js +57 -0
  171. package/dist/core/template-engine.js.map +1 -0
  172. package/dist/core/validator.d.ts +26 -0
  173. package/dist/core/validator.d.ts.map +1 -0
  174. package/dist/core/validator.js +246 -0
  175. package/dist/core/validator.js.map +1 -0
  176. package/dist/core/yaml-parser.d.ts +25 -0
  177. package/dist/core/yaml-parser.d.ts.map +1 -0
  178. package/dist/core/yaml-parser.js +113 -0
  179. package/dist/core/yaml-parser.js.map +1 -0
  180. package/dist/index.d.ts +2 -0
  181. package/dist/index.d.ts.map +1 -0
  182. package/dist/index.js +18 -0
  183. package/dist/index.js.map +1 -0
  184. package/dist/utils/file.d.ts +29 -0
  185. package/dist/utils/file.d.ts.map +1 -0
  186. package/dist/utils/file.js +126 -0
  187. package/dist/utils/file.js.map +1 -0
  188. package/dist/utils/git.d.ts +25 -0
  189. package/dist/utils/git.d.ts.map +1 -0
  190. package/dist/utils/git.js +77 -0
  191. package/dist/utils/git.js.map +1 -0
  192. package/dist/utils/logger.d.ts +41 -0
  193. package/dist/utils/logger.d.ts.map +1 -0
  194. package/dist/utils/logger.js +184 -0
  195. package/dist/utils/logger.js.map +1 -0
  196. package/package.json +49 -0
package/dist/cli.js ADDED
@@ -0,0 +1,450 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const commander_1 = require("commander");
4
+ const package_json_1 = require("../package.json");
5
+ const init_1 = require("./commands/init");
6
+ const import_1 = require("./commands/import");
7
+ const validate_1 = require("./commands/validate");
8
+ const archive_1 = require("./commands/archive");
9
+ const progress_1 = require("./commands/progress");
10
+ const status_1 = require("./commands/status");
11
+ const health_1 = require("./commands/health");
12
+ const report_1 = require("./commands/report");
13
+ const config_1 = require("./commands/config");
14
+ const create_1 = require("./commands/iteration/create");
15
+ const split_1 = require("./commands/iteration/split");
16
+ const new_1 = require("./commands/task/new");
17
+ const plan_1 = require("./commands/plan");
18
+ const execute_1 = require("./commands/execute");
19
+ // 新增命令
20
+ const spec_1 = require("./commands/spec");
21
+ const goal_1 = require("./commands/goal");
22
+ const bugfix_1 = require("./commands/bugfix");
23
+ const research_1 = require("./commands/research");
24
+ const change_1 = require("./commands/change");
25
+ const sync_1 = require("./commands/sync");
26
+ const handover_1 = require("./commands/handover");
27
+ const retro_1 = require("./commands/retro");
28
+ const template_add_1 = require("./commands/template-add");
29
+ const help_1 = require("./commands/help");
30
+ const demo_1 = require("./commands/demo");
31
+ const welcome_1 = require("./commands/welcome");
32
+ // 全量层命令
33
+ const iteration_from_global_1 = require("./commands/iteration-from-global");
34
+ const sync_global_1 = require("./commands/sync-global");
35
+ const global_status_1 = require("./commands/global-status");
36
+ const history_1 = require("./commands/history");
37
+ // P0/P1/P2 新增命令
38
+ const impact_1 = require("./commands/impact");
39
+ const baseline_1 = require("./commands/baseline");
40
+ const dashboard_1 = require("./commands/dashboard");
41
+ const audit_1 = require("./commands/audit");
42
+ // rename 命令
43
+ const rename_1 = require("./commands/rename");
44
+ commander_1.program
45
+ .name('speccore')
46
+ .description('SpecCore - Code by Spec, Not by Vibe.')
47
+ .version(package_json_1.version, '-v, --version', 'Display current version');
48
+ // ================================================================
49
+ // 🔍 智能入口
50
+ // ================================================================
51
+ commander_1.program
52
+ .command('spec [input...]')
53
+ .description('Smart entry: natural language intent recognition')
54
+ .action((input) => (0, spec_1.specCommand)(input.join(' '), {}));
55
+ // ================================================================
56
+ // 👋 引导与体验
57
+ // ================================================================
58
+ commander_1.program
59
+ .command('welcome')
60
+ .alias('wc')
61
+ .description('First-time setup guide (interactive)')
62
+ .option('--force', 'Force re-initialization')
63
+ .action(welcome_1.welcomeCommand);
64
+ commander_1.program
65
+ .command('demo')
66
+ .alias('dm')
67
+ .description('Quick experience demo (5 min)')
68
+ .option('--project <key>', 'Demo project type: book, todo, blog', 'book')
69
+ .option('--list', 'List available demo projects')
70
+ .action(demo_1.demoCommand);
71
+ // ================================================================
72
+ // 🏗️ 初始化与导入
73
+ // ================================================================
74
+ commander_1.program
75
+ .command('init')
76
+ .alias('in')
77
+ .description('Initialize SpecCore in current project')
78
+ .option('--mode <mode>', 'Initialization mode: fresh or migration', 'fresh')
79
+ .option('--force', 'Force overwrite existing configuration')
80
+ .action(init_1.initCommand);
81
+ commander_1.program
82
+ .command('import')
83
+ .alias('imp')
84
+ .description('Import project into global layer (multi-project support)')
85
+ .option('--source <source>', 'Source type: code, prd, prototype, all', 'all')
86
+ .option('--path <path>', 'Project source path', './')
87
+ .option('--url <url>', 'Prototype URL')
88
+ .option('--iteration <iteration>', 'Target iteration name')
89
+ .option('--project <name>', 'Project name for global layer import')
90
+ .option('--type <type>', 'Project type: backend, web, h5, miniapp', 'backend')
91
+ .option('--force', 'Force overwrite')
92
+ .action(import_1.importCommand);
93
+ // ================================================================
94
+ // 📋 期次管理
95
+ // ================================================================
96
+ const iterationCmd = commander_1.program
97
+ .command('iteration')
98
+ .alias('it')
99
+ .description('Iteration management commands');
100
+ iterationCmd
101
+ .command('create')
102
+ .alias('cr')
103
+ .description('Create a new iteration')
104
+ .option('-n, --name <name>', 'Iteration name (required)')
105
+ .option('--from <date>', 'Start date', new Date().toISOString().split('T')[0])
106
+ .option('--to <date>', 'End date')
107
+ .action(create_1.iterationCreateCommand);
108
+ iterationCmd
109
+ .command('split')
110
+ .alias('sp')
111
+ .description('Split requirements into tasks')
112
+ .option('-f, --file <file>', 'Requirement file path', '00-需求文档/REQUIREMENT.md')
113
+ .option('-i, --iteration <iteration>', 'Target iteration')
114
+ .option('--sections <sections>', 'Specific sections to split')
115
+ .option('--target <target>', 'Merge into existing task')
116
+ .option('--dry-run', 'Preview without creating')
117
+ .action(split_1.iterationSplitCommand);
118
+ // ================================================================
119
+ // 📝 任务管理
120
+ // ================================================================
121
+ const taskCmd = commander_1.program
122
+ .command('task')
123
+ .alias('tk')
124
+ .description('Task management commands');
125
+ taskCmd
126
+ .command('new')
127
+ .alias('add')
128
+ .description('Create a new atomic task')
129
+ .option('-n, --name <name>', 'Task name (required)')
130
+ .option('-t, --type <type>', 'Task type: feature, bugfix, research, optimization, migration, document', 'feature')
131
+ .option('--id <id>', 'Task ID (auto-generated if omitted)')
132
+ .option('-d, --desc <desc>', 'Task description')
133
+ .option('--file <file>', 'Requirement file path')
134
+ .option('--sections <sections>', 'Sections to extract from file')
135
+ .option('--backend-only', 'Create backend only')
136
+ .option('--frontend-only', 'Create frontend only')
137
+ .option('-i, --iteration <iteration>', 'Target iteration')
138
+ .action(new_1.taskNewCommand);
139
+ // 完整需求交付
140
+ commander_1.program
141
+ .command('goal')
142
+ .alias('gl')
143
+ .description('Complete requirement delivery (from requirement to code)')
144
+ .option('-n, --name <name>', 'Feature name')
145
+ .option('-d, --desc <desc>', 'Feature description')
146
+ .option('-t, --type <type>', 'Task type', 'feature')
147
+ .option('--id <id>', 'Task ID')
148
+ .option('-i, --iteration <iteration>', 'Target iteration')
149
+ .option('--backend-only', 'Backend only')
150
+ .option('--frontend-only', 'Frontend only')
151
+ .action(goal_1.goalCommand);
152
+ // Bug 修复
153
+ commander_1.program
154
+ .command('bugfix')
155
+ .alias('bf')
156
+ .description('Quick bug fix: create fix task + impact analysis')
157
+ .option('-n, --name <name>', 'Bug name')
158
+ .option('-d, --desc <desc>', 'Bug description')
159
+ .option('--id <id>', 'Task ID')
160
+ .option('-i, --iteration <iteration>', 'Target iteration')
161
+ .option('--affected-task <task>', 'Affected task for regression')
162
+ .action(bugfix_1.bugfixCommand);
163
+ // 技术调研
164
+ commander_1.program
165
+ .command('research')
166
+ .alias('rs')
167
+ .description('Technical research: evaluate solutions and compare options')
168
+ .option('-n, --name <name>', 'Research topic')
169
+ .option('-d, --desc <desc>', 'Research description')
170
+ .option('-t, --topic <topic>', 'Research topic (alias for --name)')
171
+ .option('--options <options>', 'Comparison options (comma-separated)')
172
+ .option('--id <id>', 'Task ID')
173
+ .option('-i, --iteration <iteration>', 'Target iteration')
174
+ .action(research_1.researchCommand);
175
+ // ================================================================
176
+ // ⚡ 执行与调度
177
+ // ================================================================
178
+ commander_1.program
179
+ .command('plan')
180
+ .alias('pl')
181
+ .description('Generate execution plan based on task dependencies')
182
+ .option('-i, --iteration <iteration>', 'Target iteration')
183
+ .option('-t, --team <count>', 'Team member count', '3')
184
+ .option('-a, --assign <members>', 'Assign to specific members (comma-separated)')
185
+ .option('--task <task>', 'Analyze specific task')
186
+ .option('--type <type>', 'Filter by task type')
187
+ .option('--priority <priority>', 'Filter by priority')
188
+ .option('--mode <mode>', 'Plan mode: auto, claim, parallel', 'auto')
189
+ .option('--dry-run', 'Preview without saving')
190
+ .action(plan_1.planCommand);
191
+ commander_1.program
192
+ .command('execute')
193
+ .alias('ex')
194
+ .description('Execute tasks based on filters')
195
+ .option('--all', 'Execute all pending tasks')
196
+ .option('-a, --assignee <assignee>', 'Filter by assignee')
197
+ .option('-t, --task <task>', 'Execute specific task')
198
+ .option('--type <type>', 'Filter by task type')
199
+ .option('--priority <priority>', 'Filter by priority')
200
+ .option('--status <status>', 'Filter by status')
201
+ .option('--backend', 'Backend tasks only')
202
+ .option('--frontend', 'Frontend tasks only')
203
+ .option('--interactive', 'Interactive selection')
204
+ .option('--dry-run', 'Preview execution plan')
205
+ .option('--resume', 'Resume from last interruption')
206
+ .option('--parallel <count>', 'Parallel execution count', '1')
207
+ .option('-i, --iteration <iteration>', 'Target iteration')
208
+ .option('--force', 'Skip preview and execute directly')
209
+ .action(execute_1.executeCommand);
210
+ // ================================================================
211
+ // 🔄 变更管理
212
+ // ================================================================
213
+ commander_1.program
214
+ .command('change')
215
+ .alias('ch')
216
+ .description('Requirement change: update linked spec files automatically')
217
+ .option('-t, --task <task>', 'Target task')
218
+ .option('-d, --desc <desc>', 'Change description (required)')
219
+ .option('--global', 'Global layer change (CONSTITUTION.md)')
220
+ .option('-i, --iteration <iteration>', 'Target iteration')
221
+ .option('--dry-run', 'Preview impact without modifying')
222
+ .option('--force', 'Skip preview and apply directly')
223
+ .action(change_1.changeCommand);
224
+ commander_1.program
225
+ .command('sync')
226
+ .alias('sy')
227
+ .description('Reverse sync: detect code-spec differences and update')
228
+ .option('-t, --task <task>', 'Target task')
229
+ .option('-i, --iteration <iteration>', 'Target iteration')
230
+ .option('--auto', 'Auto-apply sync without confirmation')
231
+ .option('--dry-run', 'Preview differences without modifying')
232
+ .option('--force', 'Skip preview')
233
+ .action(sync_1.syncCommand);
234
+ // ================================================================
235
+ // ✅ 审查与验证
236
+ // ================================================================
237
+ commander_1.program
238
+ .command('validate')
239
+ .alias('vl')
240
+ .description('Validate Spec compliance and integrity')
241
+ .option('-i, --iteration <iteration>', 'Target iteration')
242
+ .option('-t, --task <task>', 'Validate specific task')
243
+ .option('--type <type>', 'Filter by task type')
244
+ .option('--fix', 'Auto-fix issues where possible')
245
+ .option('--strict', 'Strict validation mode')
246
+ .option('--format <format>', 'Output format: text, json', 'text')
247
+ .action(validate_1.validateCommand);
248
+ // ================================================================
249
+ // 📊 进度与状态
250
+ // ================================================================
251
+ commander_1.program
252
+ .command('progress')
253
+ .alias('pg')
254
+ .description('Display project progress overview')
255
+ .option('-i, --iteration <iteration>', 'Target iteration')
256
+ .option('-a, --assignee <assignee>', 'Filter by assignee')
257
+ .option('--type <type>', 'Filter by task type')
258
+ .option('--task <task>', 'Show specific task progress')
259
+ .option('--detail', 'Show detailed progress')
260
+ .option('--format <format>', 'Output format: text, json, csv', 'text')
261
+ .action(progress_1.progressCommand);
262
+ commander_1.program
263
+ .command('status')
264
+ .alias('st')
265
+ .description('Display current project status')
266
+ .option('-i, --iteration <iteration>', 'Target iteration')
267
+ .option('-a, --assignee <assignee>', 'Filter by assignee')
268
+ .option('--type <type>', 'Filter by task type')
269
+ .action(status_1.statusCommand);
270
+ commander_1.program
271
+ .command('health')
272
+ .alias('hl')
273
+ .description('Generate project health report')
274
+ .option('-i, --iteration <iteration>', 'Target iteration')
275
+ .option('--format <format>', 'Output format: text, json', 'text')
276
+ .option('--trend', 'Include trend comparison')
277
+ .action(health_1.healthCommand);
278
+ // ================================================================
279
+ // 📦 归档与交接
280
+ // ================================================================
281
+ commander_1.program
282
+ .command('archive')
283
+ .alias('ar')
284
+ .description('Archive completed tasks')
285
+ .option('-t, --task <task>', 'Archive specific task')
286
+ .option('--all', 'Archive all completed tasks')
287
+ .option('-i, --iteration <iteration>', 'Archive entire iteration')
288
+ .option('--list', 'List archived tasks')
289
+ .option('--restore <task>', 'Restore archived task')
290
+ .option('--force', 'Skip preview and archive directly')
291
+ .action(archive_1.archiveCommand);
292
+ commander_1.program
293
+ .command('handover')
294
+ .alias('ho')
295
+ .description('Generate handover documentation for current iteration')
296
+ .option('-i, --iteration <iteration>', 'Target iteration')
297
+ .option('-o, --output <path>', 'Output file path')
298
+ .option('--format <format>', 'Output format: md', 'md')
299
+ .action(handover_1.handoverCommand);
300
+ commander_1.program
301
+ .command('retro')
302
+ .alias('rt')
303
+ .description('Iteration retrospective: summarize experience and improvements')
304
+ .option('-i, --iteration <iteration>', 'Target iteration')
305
+ .option('-o, --output <path>', 'Output file path')
306
+ .action(retro_1.retroCommand);
307
+ // ================================================================
308
+ // ⚙️ 配置与工具
309
+ // ================================================================
310
+ commander_1.program
311
+ .command('config')
312
+ .alias('cf')
313
+ .description('Manage SpecCore configuration')
314
+ .option('--get <key>', 'Get configuration value')
315
+ .option('--set <key=value>', 'Set configuration value')
316
+ .option('--reset', 'Reset to default configuration')
317
+ .action(config_1.configCommand);
318
+ commander_1.program
319
+ .command('report')
320
+ .alias('rp')
321
+ .description('Generate project report')
322
+ .option('-i, --iteration <iteration>', 'Target iteration')
323
+ .option('--format <format>', 'Output format: markdown, html, json', 'markdown')
324
+ .option('-o, --output <path>', 'Output file path')
325
+ .option('--team', 'Include team analysis')
326
+ .option('--risk', 'Include risk analysis')
327
+ .option('--trend', 'Include trend comparison')
328
+ .action(report_1.reportCommand);
329
+ commander_1.program
330
+ .command('template-add')
331
+ .alias('ta')
332
+ .description('Add code generation template from existing code')
333
+ .option('-n, --name <name>', 'Template name (required)')
334
+ .option('-t, --type <type>', 'Template type: crud, auth, export, report', 'crud')
335
+ .option('-f, --files <files>', 'Code file paths (comma-separated, required)')
336
+ .option('-d, --desc <desc>', 'Template description')
337
+ .action(template_add_1.templateAddCommand);
338
+ // ================================================================
339
+ // 📖 帮助
340
+ // ================================================================
341
+ commander_1.program
342
+ .command('help')
343
+ .alias('h')
344
+ .description('Display command help and search')
345
+ .option('--command <command>', 'Show detailed help for specific command')
346
+ .option('--search <keyword>', 'Search commands by keyword')
347
+ .action(help_1.helpCommand);
348
+ // ================================================================
349
+ // 🌐 全量层命令
350
+ // ================================================================
351
+ commander_1.program
352
+ .command('iteration-from-global')
353
+ .alias('ifg')
354
+ .description('Generate iteration from global layer requirements')
355
+ .option('--reqs <reqs>', 'Requirement IDs (comma-separated, required)')
356
+ .option('--name <name>', 'Iteration name (required)')
357
+ .option('--force', 'Force overwrite existing iteration')
358
+ .action(iteration_from_global_1.iterationFromGlobalCommand);
359
+ commander_1.program
360
+ .command('sync-global')
361
+ .alias('sg')
362
+ .description('Bidirectional sync between iteration and global layer')
363
+ .option('-i, --iteration <iteration>', 'Target iteration')
364
+ .option('--direction <direction>', 'Sync direction: to_global, from_global', 'to_global')
365
+ .option('--auto', 'Auto-apply without confirmation')
366
+ .option('--dry-run', 'Preview changes without applying')
367
+ .option('--force', 'Skip preview and execute')
368
+ .action(sync_global_1.syncGlobalCommand);
369
+ commander_1.program
370
+ .command('global-status')
371
+ .alias('gs')
372
+ .description('View global layer status: all projects, requirements, architecture')
373
+ .option('--project <name>', 'Filter by project name')
374
+ .action(global_status_1.globalStatusCommand);
375
+ commander_1.program
376
+ .command('history')
377
+ .alias('hs')
378
+ .description('View requirement change history')
379
+ .option('--req <id>', 'Requirement ID (e.g., REQ-001)')
380
+ .action(history_1.historyCommand);
381
+ // ================================================================
382
+ // 🔗 P0/P1/P2 新增命令
383
+ // ================================================================
384
+ commander_1.program
385
+ .command('impact')
386
+ .alias('if')
387
+ .description('Intelligent impact analysis: analyze upstream/downstream effects of changes')
388
+ .option('--req <id>', 'Requirement ID (e.g., REQ-001)')
389
+ .option('--task <id>', 'Task ID (e.g., Task-001)')
390
+ .option('--depth <n>', 'Trace depth (default: 3)', '3')
391
+ .option('--output <format>', 'Output format: report, graph', 'report')
392
+ .action(impact_1.impactCommand);
393
+ commander_1.program
394
+ .command('baseline')
395
+ .alias('bl')
396
+ .description('Version baseline: create snapshots, compare, list, and rollback')
397
+ .option('--name <name>', 'Baseline name')
398
+ .option('--list', 'List all baselines')
399
+ .option('--compare <name>', 'Compare current state with baseline')
400
+ .option('--restore <name>', 'Restore to baseline')
401
+ .option('--req <id>', 'Requirement ID for rollback')
402
+ .action(baseline_1.baselineCommand);
403
+ commander_1.program
404
+ .command('dashboard')
405
+ .alias('db')
406
+ .description('Generate visual dashboard (HTML + Chart.js)')
407
+ .option('-o, --output <path>', 'Output file path', './speccore-dashboard.html')
408
+ .action(dashboard_1.dashboardCommand);
409
+ commander_1.program
410
+ .command('audit')
411
+ .alias('ad')
412
+ .description('AI-powered audit: detect duplicates, ambiguity, and orphaned requirements')
413
+ .option('--fix', 'Auto-fix fixable issues')
414
+ .option('--detail', 'Show detailed analysis')
415
+ .action(audit_1.auditCommand);
416
+ // 重命名
417
+ commander_1.program
418
+ .command('rename')
419
+ .alias('rn')
420
+ .description('Rename iteration or task, auto-update all references')
421
+ .option('--target <name>', 'Current name (required for single rename)')
422
+ .option('--new-name <name>', 'New name (required for single rename)')
423
+ .option('--batch', 'Batch rename mode')
424
+ .option('--pattern <pattern>', 'Batch pattern to match')
425
+ .option('--replacement <replacement>', 'Batch replacement string')
426
+ .option('--force', 'Skip preview and execute')
427
+ .action(rename_1.renameCommand);
428
+ // ================================================================
429
+ // 快捷别名(顶层别名)
430
+ // ================================================================
431
+ // 为常用命令提供顶层快捷访问
432
+ commander_1.program
433
+ .command('nt')
434
+ .description('[Alias] speccore task new')
435
+ .option('-n, --name <name>', 'Task name')
436
+ .option('-t, --type <type>', 'Task type', 'feature')
437
+ .option('-d, --desc <desc>', 'Task description')
438
+ .option('-i, --iteration <iteration>', 'Target iteration')
439
+ .action(new_1.taskNewCommand);
440
+ commander_1.program
441
+ .command('rv')
442
+ .description('[Alias] speccore validate')
443
+ .option('-i, --iteration <iteration>', 'Target iteration')
444
+ .option('-t, --task <task>', 'Validate specific task')
445
+ .option('--strict', 'Strict mode')
446
+ .option('--fix', 'Auto-fix')
447
+ .action(validate_1.validateCommand);
448
+ // Parse arguments
449
+ commander_1.program.parse();
450
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;AAAA,yCAAoC;AACpC,kDAA0C;AAC1C,0CAA8C;AAC9C,8CAAkD;AAClD,kDAAsD;AACtD,gDAAoD;AACpD,kDAAsD;AACtD,8CAAkD;AAClD,8CAAkD;AAClD,8CAAkD;AAClD,8CAAkD;AAClD,wDAAqE;AACrE,sDAAmE;AACnE,6CAAqD;AACrD,0CAA8C;AAC9C,gDAAoD;AACpD,OAAO;AACP,0CAA8C;AAC9C,0CAA8C;AAC9C,8CAAkD;AAClD,kDAAsD;AACtD,8CAAkD;AAClD,0CAA8C;AAC9C,kDAAsD;AACtD,4CAAgD;AAChD,0DAA6D;AAC7D,0CAA8C;AAC9C,0CAA8C;AAC9C,gDAAoD;AACpD,QAAQ;AACR,4EAA8E;AAC9E,wDAA2D;AAC3D,4DAA+D;AAC/D,gDAAoD;AACpD,gBAAgB;AAChB,8CAAkD;AAClD,kDAAsD;AACtD,oDAAwD;AACxD,4CAAgD;AAChD,YAAY;AACZ,8CAAkD;AAElD,mBAAO;KACJ,IAAI,CAAC,UAAU,CAAC;KAChB,WAAW,CAAC,uCAAuC,CAAC;KACpD,OAAO,CAAC,sBAAO,EAAE,eAAe,EAAE,yBAAyB,CAAC,CAAC;AAEhE,mEAAmE;AACnE,UAAU;AACV,mEAAmE;AACnE,mBAAO;KACJ,OAAO,CAAC,iBAAiB,CAAC;KAC1B,WAAW,CAAC,kDAAkD,CAAC;KAC/D,MAAM,CAAC,CAAC,KAAe,EAAE,EAA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AAC,IAAI,CAAC;KACb,WAAW,CAAC,2BAA2B,CAAC;KACxC,MAAM,CAAC,6BAA6B,EAAE,kBAAkB,CAAC;KACzD,MAAM,CAAC,mBAAmB,EAAE,wBAAwB,CAAC;KACrD,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC;KACjC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC;KAC3B,MAAM,CAAC,0BAAe,CAAC,CAAC;AAE3B,kBAAkB;AAClB,mBAAO,CAAC,KAAK,EAAE,CAAC"}
@@ -0,0 +1,10 @@
1
+ export interface ArchiveOptions {
2
+ task?: string;
3
+ all?: boolean;
4
+ iteration?: string;
5
+ list?: boolean;
6
+ restore?: string;
7
+ force?: boolean;
8
+ }
9
+ export declare function archiveCommand(options: ArchiveOptions): Promise<void>;
10
+ //# sourceMappingURL=archive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"archive.d.ts","sourceRoot":"","sources":["../../src/commands/archive.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,wBAAsB,cAAc,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAqD3E"}
@@ -0,0 +1,138 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.archiveCommand = archiveCommand;
37
+ const fs_extra_1 = require("fs-extra");
38
+ const path_1 = require("path");
39
+ const logger_1 = require("../utils/logger");
40
+ const context_1 = require("../core/context");
41
+ async function archiveCommand(options) {
42
+ const spinner = new logger_1.Spinner('Archiving tasks');
43
+ spinner.start();
44
+ try {
45
+ if (options.list) {
46
+ await listArchived();
47
+ spinner.stop('Archived tasks listed');
48
+ return;
49
+ }
50
+ if (options.restore) {
51
+ await restoreTask(options.restore, options.iteration);
52
+ spinner.stop(`Task restored: ${options.restore}`);
53
+ return;
54
+ }
55
+ const iteration = await (0, context_1.getDefaultIteration)(options.iteration);
56
+ if (!iteration) {
57
+ spinner.fail('No active iteration found. Please specify --iteration or create one first.');
58
+ return;
59
+ }
60
+ const iterationDir = `期次-${iteration}`;
61
+ const archiveDir = (0, path_1.join)(iterationDir, 'archived');
62
+ await (0, fs_extra_1.ensureDir)(archiveDir);
63
+ if (options.all) {
64
+ // Archive all completed tasks
65
+ const { readdir } = await Promise.resolve().then(() => __importStar(require('fs-extra')));
66
+ const entries = await readdir(iterationDir, { withFileTypes: true });
67
+ const tasks = entries
68
+ .filter(e => e.isDirectory() && e.name.startsWith('Task-'))
69
+ .map(e => e.name);
70
+ for (const task of tasks) {
71
+ await archiveTask(iterationDir, task, archiveDir);
72
+ }
73
+ spinner.stop(`Archived ${tasks.length} tasks`);
74
+ }
75
+ else if (options.task) {
76
+ await archiveTask(iterationDir, options.task, archiveDir);
77
+ spinner.stop(`Archived: ${options.task}`);
78
+ }
79
+ else {
80
+ spinner.fail('Please specify --task or --all');
81
+ }
82
+ // Update context
83
+ await (0, context_1.updateContext)({ lastUpdated: new Date().toISOString() });
84
+ }
85
+ catch (error) {
86
+ spinner.fail(`Archive failed: ${error}`);
87
+ throw error;
88
+ }
89
+ }
90
+ async function archiveTask(iterationDir, taskId, archiveDir) {
91
+ const taskPath = (0, path_1.join)(iterationDir, taskId);
92
+ const targetPath = (0, path_1.join)(archiveDir, taskId);
93
+ if (!(await (0, fs_extra_1.pathExists)(taskPath))) {
94
+ logger_1.logger.warn(`Task not found: ${taskId}`);
95
+ return;
96
+ }
97
+ if (await (0, fs_extra_1.pathExists)(targetPath)) {
98
+ logger_1.logger.warn(`Task already archived: ${taskId}`);
99
+ return;
100
+ }
101
+ await (0, fs_extra_1.move)(taskPath, targetPath);
102
+ logger_1.logger.info(` Archived: ${taskId}`);
103
+ }
104
+ async function restoreTask(taskId, iteration) {
105
+ const iter = await (0, context_1.getDefaultIteration)(iteration);
106
+ if (!iter) {
107
+ throw new Error('No iteration specified');
108
+ }
109
+ const iterationDir = `期次-${iter}`;
110
+ const archiveDir = (0, path_1.join)(iterationDir, 'archived');
111
+ const archivedPath = (0, path_1.join)(archiveDir, taskId);
112
+ const targetPath = (0, path_1.join)(iterationDir, taskId);
113
+ if (!(await (0, fs_extra_1.pathExists)(archivedPath))) {
114
+ throw new Error(`Archived task not found: ${taskId}`);
115
+ }
116
+ await (0, fs_extra_1.move)(archivedPath, targetPath);
117
+ logger_1.logger.info(`Restored: ${taskId}`);
118
+ }
119
+ async function listArchived() {
120
+ const { readdir } = await Promise.resolve().then(() => __importStar(require('fs-extra')));
121
+ const entries = await readdir('.', { withFileTypes: true });
122
+ const iterations = entries
123
+ .filter(e => e.isDirectory() && e.name.startsWith('期次-'))
124
+ .map(e => e.name);
125
+ for (const iteration of iterations) {
126
+ const archiveDir = (0, path_1.join)(iteration, 'archived');
127
+ if (await (0, fs_extra_1.pathExists)(archiveDir)) {
128
+ const tasks = await readdir(archiveDir);
129
+ if (tasks.length > 0) {
130
+ logger_1.logger.info(`${iteration}:`);
131
+ for (const task of tasks) {
132
+ logger_1.logger.info(` ${task}`);
133
+ }
134
+ }
135
+ }
136
+ }
137
+ }
138
+ //# sourceMappingURL=archive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"archive.js","sourceRoot":"","sources":["../../src/commands/archive.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,wCAqDC;AAnED,uCAAgE;AAChE,+BAA4B;AAC5B,4CAAkD;AAClD,6CAAqE;AAW9D,KAAK,UAAU,cAAc,CAAC,OAAuB;IAC1D,MAAM,OAAO,GAAG,IAAI,gBAAO,CAAC,iBAAiB,CAAC,CAAC;IAC/C,OAAO,CAAC,KAAK,EAAE,CAAC;IAEhB,IAAI,CAAC;QACH,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;YACjB,MAAM,YAAY,EAAE,CAAC;YACrB,OAAO,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;YACtC,OAAO;QACT,CAAC;QAED,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;YACpB,MAAM,WAAW,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;YACtD,OAAO,CAAC,IAAI,CAAC,kBAAkB,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;YAClD,OAAO;QACT,CAAC;QAED,MAAM,SAAS,GAAG,MAAM,IAAA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GAAG,SAAS,GAAG,CAAC,CAAC;gBAC7B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;oBACzB,eAAM,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;gBAC3B,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * audit - AI 智能审计命令
3
+ * 扫描全量层发现重复需求、歧义描述、潜在冲突、孤立需求
4
+ */
5
+ export interface AuditOptions {
6
+ fix?: boolean;
7
+ detail?: boolean;
8
+ }
9
+ export declare function auditCommand(options: AuditOptions): Promise<void>;
10
+ //# sourceMappingURL=audit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/commands/audit.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,MAAM,WAAW,YAAY;IAC3B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAWD,wBAAsB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA0DvE"}