ai-spec-dev 0.33.0 → 0.35.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 (50) hide show
  1. package/.claude/commands/add-lesson.md +34 -0
  2. package/.claude/commands/check-layers.md +65 -0
  3. package/.claude/commands/installed-deps.md +35 -0
  4. package/.claude/commands/recall-lessons.md +40 -0
  5. package/.claude/commands/scan-singletons.md +45 -0
  6. package/.claude/commands/verify-imports.md +48 -0
  7. package/.claude/settings.local.json +11 -1
  8. package/README.md +531 -213
  9. package/RELEASE_LOG.md +305 -0
  10. package/cli/commands/create.ts +1233 -0
  11. package/cli/commands/dashboard.ts +62 -0
  12. package/cli/commands/init.ts +45 -8
  13. package/cli/commands/mock.ts +175 -0
  14. package/cli/commands/scan.ts +99 -0
  15. package/cli/commands/types.ts +69 -0
  16. package/cli/commands/vcr.ts +70 -0
  17. package/cli/index.ts +34 -2517
  18. package/core/combined-generator.ts +13 -3
  19. package/core/dashboard-generator.ts +340 -0
  20. package/core/design-dialogue.ts +124 -0
  21. package/core/dsl-feedback.ts +34 -4
  22. package/core/error-feedback.ts +46 -2
  23. package/core/project-index.ts +301 -0
  24. package/core/reviewer.ts +84 -6
  25. package/core/run-logger.ts +109 -3
  26. package/core/run-trend.ts +24 -4
  27. package/core/self-evaluator.ts +39 -11
  28. package/core/spec-generator.ts +14 -8
  29. package/core/task-generator.ts +17 -0
  30. package/core/types-generator.ts +219 -0
  31. package/core/vcr.ts +210 -0
  32. package/dist/cli/index.js +7297 -5640
  33. package/dist/cli/index.js.map +1 -1
  34. package/dist/cli/index.mjs +8728 -7071
  35. package/dist/cli/index.mjs.map +1 -1
  36. package/dist/index.d.mts +19 -5
  37. package/dist/index.d.ts +19 -5
  38. package/dist/index.js +420 -224
  39. package/dist/index.js.map +1 -1
  40. package/dist/index.mjs +418 -224
  41. package/dist/index.mjs.map +1 -1
  42. package/docs-assets/purpose/architecture-overview.svg +64 -0
  43. package/docs-assets/purpose/create-pipeline.svg +113 -0
  44. package/docs-assets/purpose/task-layering.svg +74 -0
  45. package/package.json +1 -1
  46. package/prompts/codegen.prompt.ts +97 -9
  47. package/prompts/design.prompt.ts +59 -0
  48. package/prompts/spec.prompt.ts +8 -1
  49. package/prompts/tasks.prompt.ts +27 -2
  50. package/purpose.md +600 -174
package/RELEASE_LOG.md CHANGED
@@ -1,5 +1,231 @@
1
1
  # Release Log
2
2
 
3
+ <details open>
4
+ <summary>中文</summary>
5
+
6
+ ---
7
+
8
+ ## [Unreleased] 2026-04-01 — P1 Task 验证步骤 + P2 设计方案对话
9
+
10
+ ### 新增 / 增强
11
+
12
+ **Feature 1 — Task verificationSteps(`core/task-generator.ts`、`prompts/tasks.prompt.ts`、`core/combined-generator.ts`)**
13
+
14
+ 受 Superpowers writing-plans 启发,每个 Task 新增 `verificationSteps` 字段,要求具体可执行的验证命令 + 预期结果,防止"works correctly"式模糊验收标准。
15
+
16
+ - `SpecTask` 新增 `verificationSteps: string[]`,语义为"the how to verify"(区别于 `acceptanceCriteria` 的"the what")
17
+ - `tasksSystemPrompt` 新增 verificationSteps 规则段:每条步骤必须是具体命令 + 可观察预期结果,给出 Good/Bad 示例,要求 2-5 条/task,backend 必须含 HTTP 检查,frontend 必须含 UI render + state 检查
18
+ - `combined-generator.ts` 的内联 tasks instruction 同步更新,包含 `verificationSteps` 字段定义
19
+ - `printTasks` 每个 task 输出前 2 条 verificationSteps(灰色),超过 2 条显示 "+ N more"
20
+
21
+ **Feature 2 — Design Options Dialogue(`core/design-dialogue.ts`、`prompts/design.prompt.ts`、`cli/commands/create.ts`)**
22
+
23
+ 受 Superpowers brainstorming 启发,在 Spec 生成前新增 Step 1.5:AI 提出 2-3 个架构方案供用户选择,选定方案作为约束注入 spec prompt,防止 Spec 生成完后才发现方向不对。
24
+
25
+ - `prompts/design.prompt.ts` — `designOptionsSystemPrompt`:每个方案含 Approach / Trade-offs(2-3条)/ Best when,保持简短(≤2分钟阅读),附 Recommended 建议
26
+ - `core/design-dialogue.ts` — `DesignDialogue` 类:提案展示 → 用户选择(Option A/B/C / Blend / Skip)→ Blend 模式让 AI 融合多方案;解析 AI 输出的方案标签,提取选定方案全文(最多 400 字符)注入 spec
27
+ - `create.ts` Step 1.5:在 context load 完成后、spec gen 前运行;`--fast` / `--auto` / `--vcr-replay` 自动跳过;`architectureDecision` 传入 `generateSpecWithTasks` 和 `SpecGenerator.generateSpec`
28
+ - `combined-generator.ts` / `spec-generator.ts` 均新增 `architectureDecision?: string` 参数,以 `=== Architecture Decision ===` 段注入 prompt
29
+
30
+ ---
31
+
32
+ ## [Unreleased] 2026-04-01 — Pass 0 Spec Compliance Check + 项目索引 + 抗幻觉 Skills
33
+
34
+ ### 新增 / 增强
35
+
36
+ **Feature 1 — Pass 0 Spec Compliance Check(`prompts/codegen.prompt.ts`、`core/reviewer.ts`、`core/self-evaluator.ts`)**
37
+
38
+ 受 Superpowers 工作流启发,在现有 3-pass review 前新增专用的 Spec 合规性检查 Pass 0。
39
+
40
+ - `specComplianceSystemPrompt` — 穷举式审计:从 Spec 中提取所有需求(endpoints、models、business rules、auth、error cases、side effects),逐条标 ✅ / ⚠️ / ❌,输出 `ComplianceScore: X/10` + Blockers 列表
41
+ - `Pass 1 架构 Review` 去除原有"是否覆盖所有需求"条款,Pass 0 已处理,Pass 1 聚焦层分离 / 契约设计 / 安全姿态
42
+ - Pass 1 prompt 注入 Pass 0 合规报告作为上下文,避免重复发现
43
+ - `extractComplianceScore` / `extractMissingCount` 公开导出,供下游消费
44
+ - `create.ts` 在 `stageEnd("review")` 后即时打印合规分 + 缺失需求数
45
+ - `SelfEvalResult` 新增 `complianceScore` 字段;harnessScore 权重更新:当 compliance + review 均可用时,compliance 0.30 · dsl 0.25 · compile 0.20 · review 0.25
46
+ - `printSelfEval` 输出新增 `Compliance: X/10` 行,低于 6 显示红色 ⚠
47
+ - Review History 记录新增 `complianceScore` 字段
48
+
49
+ **Feature 2 — 项目索引 `ai-spec scan`(`core/project-index.ts`、`cli/commands/scan.ts`)**
50
+
51
+ - `core/project-index.ts` — 扫描根目录下所有子项目(识别 `package.json` / `go.mod` / `Cargo.toml` / `pom.xml` 等 manifest),持久化到 `.ai-spec-index.json`
52
+ - 增量逻辑:新项目 → 添加 `firstSeen`;已有项目 → 更新 `techStack / hasConstitution / lastSeen`;目录消失 → 标记 `missing:true`(不删除记录)
53
+ - Git Worktree 过滤:`.git` 为文件(非目录)时跳过,防止 ai-spec 生成的 worktree 被误识别为项目
54
+ - `ai-spec scan` — 扫描并输出变更摘要(added / updated / unchanged / missing)
55
+ - `ai-spec scan --list` — 不重新扫描,直接展示当前 index
56
+ - `ai-spec init --global` 联动:优先读取 index,对每个活跃项目提取 type / techStack / constitution §1-§6 前 2000 字符,作为全局宪法生成的多项目上下文;无 index 时 fallback 并提示先 `scan`
57
+
58
+ **Feature 3 — 抗幻觉 Skill 文件(`.claude/commands/`)**
59
+
60
+ 从 ai-spec 现有抗幻觉设计中提炼 5 个可复用 Claude Code slash command skill,供团队共享:
61
+
62
+ - `/scan-singletons` — 扫描项目所有单例 config 文件(i18n / constants / routes / store-index),输出"只能修改、绝不重建"清单
63
+ - `/add-lesson` — 将 review 发现写入宪法 §9,含去重(前 60 字符比对)+ 分类(bug/security/pattern/perf/convention)+ 时间戳
64
+ - `/installed-deps` — 列出 `package.json` 所有依赖作为 codegen 白名单,附检测常用替代品歧义提示
65
+ - `/recall-lessons` — 读取 §9,按与当前任务的相关度(High/Medium/Low)筛选并展示历史教训
66
+ - `/verify-imports` — 验证文件中所有 import 路径(alias 解析 + 相对路径 + 包名白名单),输出 broken imports 及修复建议
67
+
68
+ ---
69
+
70
+ ## [Unreleased] 2026-04-01 — VCR 录制回放 + 异步 §9 + Approval Gate 增强
71
+
72
+ ### 新增 / 增强
73
+
74
+ **Feature 1 — VCR 录制 & 零成本回放(`core/vcr.ts`、`cli/commands/vcr.ts`、`cli/commands/create.ts`)**
75
+
76
+ 受 Claude Code VCR token 计数测试模式启发,将所有 AI 响应录制成 JSON 快照,供离线无 API 调用地回放。
77
+
78
+ - `VcrRecordingProvider` — 透明包装任意 `AIProvider`,拦截每次 `generate()` 并记录 `(index, promptPreview, callHash, response, providerName, modelName, ts, durationMs)`;`save()` 支持合并 spec + codegen 两个 recorder 并按时间戳排序
79
+ - `VcrReplayProvider` — 按序返回预录响应,入参 prompt 被忽略;录制耗尽时抛出明确错误
80
+ - 快照存储在 `.ai-spec-vcr/{runId}.json`,与 RunLog 使用相同 `runId`,可交叉查询
81
+ - `ai-spec vcr list` — 列出所有录制(runId、AI 调用数、provider/model、录制日期)
82
+ - `ai-spec vcr show <runId>` — 逐条展示每次 AI 调用的 promptPreview + callHash + 耗时
83
+ - CLI 选项:`--vcr-record`(当次运行录制)、`--vcr-replay <runId>`(零 API 调用回放)
84
+ - 实现 fire-and-await 模式:spec 和 codegen 两个 provider 分别包装,运行结束后统一 merge 保存
85
+
86
+ **Enhancement 1 — §9 知识积累改为异步 fire-and-await(`cli/commands/create.ts`)**
87
+
88
+ 原来 `await accumulateReviewKnowledge(...)` 阻塞在 Loop 2 结构性反馈之前,拉长了关键路径。
89
+
90
+ - 将调用改为立即启动、在 `runLogger.finish()` 前 `await`(fire-and-await 模式)
91
+ - Loop 2 交互式结构分析不再等待 §9 写入,用户体验更流畅
92
+ - 错误通过 `.catch()` 打印 `⚠ §9 accumulation failed: ...`,不影响主流程
93
+
94
+ **Enhancement 2 — Approval Gate DSL 范围预估(`cli/commands/create.ts`)**
95
+
96
+ 原来 Approval Gate 只显示行数和字数,用户难以判断代码生成规模。
97
+
98
+ - 新增 `estimateFromSpec(spec)` 内联逻辑(正则,无 AI 调用):从 spec 文本统计 HTTP 端点数(`GET/POST/PUT/PATCH/DELETE /`)和数据模型数(`## Model`、`**Xxx**:`)
99
+ - Approval Gate 增加 `Est. DSL scope : ~N endpoint(s), ~M model(s) → ~K files` 预估行
100
+ - 让用户在点击 Proceed 前对代码生成规模有量化感知
101
+
102
+ ---
103
+
104
+ ## [Unreleased] 2026-04-01 — Pipeline 可靠性强化(二):JSONL 崩溃恢复 + 熔断 + Token Budget
105
+
106
+ ### 功能增强
107
+
108
+ **Enhancement 1 — RunLog JSONL Append-Only Shadow(`core/run-logger.ts`、`core/run-trend.ts`)**
109
+
110
+ 原有 `RunLogger.flush()` 是异步 fire-and-forget 的全量 JSON 重写,进程崩溃时当次 RunLog 全丢。
111
+
112
+ - 新增 `appendJsonlLine(filePath, record)` — 用 `fs.appendFileSync` 同步追加,保证每条记录落盘后才继续执行
113
+ - `RunLogger` 构造时立即写 `header` 行到 `{runId}.jsonl`;每个 `push()`、`stageFail()`、`setPromptHash()`、`setHarnessScore()`、`fileWritten()`、`finish()` 均追加对应类型的 JSONL 行(`header` / `entry` / `error` / `file` / `meta` / `footer`)
114
+ - 原有 `.json` 全量文件保留不变(消费者 `trend`、`dashboard`、`logs` 无需改动)
115
+ - 新增 `reconstructRunLogFromJsonl(path)` — 从 JSONL 行逐条重建 `RunLog`,供崩溃恢复使用
116
+ - `loadRunLogs()` 新增孤儿 `.jsonl` 恢复路径:扫描到没有对应 `.json` 的 `.jsonl` 文件时,自动重建并纳入返回结果
117
+
118
+ **Enhancement 2 — ErrorFeedback 无进展熔断(`core/error-feedback.ts`)**
119
+
120
+ 原有修复循环没有"进展检测",即使每次修复后错误数未减少,仍会消耗完所有 `maxCycles`。
121
+
122
+ - 新增 `prevErrorCount` 跟踪上一轮的错误数量
123
+ - 每次 fix 后重新检查:若 `allErrors.length >= prevErrorCount`(错误数未减少),立即中止并打印 `⚠ Auto-fix made no progress` 提示,不再浪费额外 AI 调用
124
+ - 参考:Claude Code `MAX_CONSECUTIVE_AUTOCOMPACT_FAILURES = 3` 防止 compact 死循环的同类设计
125
+
126
+ **Enhancement 3 — Command Output + File Content Token Budget(`core/error-feedback.ts`)**
127
+
128
+ - 新增 `MAX_COMMAND_OUTPUT_CHARS = 50_000`(约 10K tokens):`runCommand` 返回的 stderr/stdout 超过此限时截断,防止巨型构建输出撑满 AI context
129
+ - 新增 `MAX_FIX_FILE_CHARS = 60_000`(约 12K tokens):`attemptFix` 中发给 AI 的 `existingContent` 超过此限时截断并附加提示,AI 仍可通过错误行号定位问题
130
+ - 参考:Claude Code `applyToolResultBudget(toolResult, maxTokens)` 工具输出预算设计
131
+
132
+ ---
133
+
134
+ ## [Unreleased] 2026-04-01 — Pipeline 可靠性强化:结构化 Review Findings + §9 知识闭环
135
+
136
+ ### 功能增强
137
+
138
+ **Enhancement 1 — Loop 2 结构性发现:正则 → 结构化 JSON(`prompts/codegen.prompt.ts`、`core/dsl-feedback.ts`)**
139
+
140
+ 原有 `extractStructuralFindings` 用正则解析 AI 生成的 review 自然语言,格式漂移会导致静默漏报,且只覆盖硬编码的 4 种关键词。
141
+
142
+ - `reviewArchitectureSystemPrompt` Pass 1 格式末尾新增 `## 🔍 结构性发现 JSON` 段,要求 AI 强制输出 `{"structuralFindings": [...]}` JSON block(即使无发现也输出空数组),category 枚举与原有一致:`auth_design` / `api_contract` / `model_design` / `layer_violation` / `other_design`
143
+ - `extractStructuralFindings` 改为**优先解析 JSON block**:从 Pass 1 文本提取 ` ```json{...}``` `,parse `structuralFindings` 数组并做类型守卫过滤;解析失败或旧格式 review 才 fallback 到原有正则逻辑(向后兼容)
144
+ - 结果:Loop 2 发现的问题不再受限于关键词列表,任何被 Pass 1 明确指出的设计问题都会进入反馈环
145
+
146
+ **Enhancement 2 — §9 知识积累真正形成双向闭环(`prompts/spec.prompt.ts`、`core/reviewer.ts`)**
147
+
148
+ 原有实现的两个断层:
149
+ 1. constitution 虽然注入到 spec 生成 prompt,但 `specPrompt` 没有明确指令让 AI 去应用 §9 教训
150
+ 2. Reviewer 三 Pass 完全不读 constitution,无法检验新代码是否重蹈 §9 记录的问题
151
+
152
+ 修复:
153
+ - `specPrompt` 末尾新增 CRITICAL 指令:如果 constitution 含 §9,spec 生成前必须逐条审阅教训;对直接相关的教训,在 §8 实施要点末尾追加「⚠ 基于历史教训:[简述规避方式]」
154
+ - `reviewer.ts` 新增 `loadAccumulatedLessons(projectRoot)` — 读取 constitution 中 §9 段落(`## 9. 积累教训` 到下一 `## \d` 或 EOF);注入到 Pass 1 arch review prompt(`=== §9 历史积累教训 ===`),让 reviewer 能交叉检验新代码是否复现已知问题,发现则写入 JSON findings 块触发 Loop 2
155
+
156
+ **两个闭环现在都真正贯通:**
157
+ ```
158
+ Review → §9 写入 constitution
159
+
160
+ 下次 create spec 时 → spec 生成读取 §9 → 设计时规避
161
+
162
+ Review Pass 1 读取 §9 → 检验代码是否复现 → 若复现触发 Loop 2 修正 DSL
163
+ ```
164
+
165
+ ---
166
+
167
+ ## [Unreleased] 2026-03-31 — 文档同步:README / purpose / RELEASE_LOG
168
+
169
+ ### 文档更新
170
+
171
+ - README 首页主流程同步到最新架构:
172
+ - 补入 **DSL Gap Feedback**
173
+ - 补入 **Review→DSL Loop**
174
+ - 明确 `logs` / `trend` / `dashboard` 消费 Harness Self-Eval 的 RunLog 数据
175
+ - 补充 DSL 的下游产物说明(`types` / `export` / `mock` / workspace 契约注入)
176
+ - purpose 文档升级到 **v0.34.0** 口径:
177
+ - 版本记录速览补入 v0.32.0 / v0.33.0 / v0.34.0
178
+ - 新增“两条 Pipeline 反馈环”章节
179
+ - 新增“DSL 的多出口价值:类型、Dashboard 与可观测性”章节
180
+ - 完整功能矩阵扩展到 `types`、`logs`、`trend`、`dashboard`
181
+ - purpose 的 Mermaid 流程图已切换为 **SVG 图片 + 折叠纯文本备用版**,方便在不支持 Mermaid 的文档平台中阅读
182
+ - RELEASE_LOG 新增当前文档同步记录,保证产品叙事与代码实现保持一致
183
+
184
+ ---
185
+
186
+ ## [0.34.0] 2026-03-31 — Harness Dashboard + TypeScript 类型生成
187
+
188
+ ### 新增内容
189
+
190
+ **Feature 1 — `ai-spec dashboard`(`core/dashboard-generator.ts`、`cli/commands/dashboard.ts`)**
191
+
192
+ - 基于现有 `.ai-spec-logs/` RunLog 数据,一键生成静态 HTML Harness Dashboard
193
+ - 包含:
194
+ - Overview 统计(总运行数 / 平均分 / 编译通过率)
195
+ - Score Trend 折线图(SVG,最近 30 次有评分运行)
196
+ - Prompt 版本对比表(avg / best / worst,当前版本高亮)
197
+ - 近 10 次运行历史(带评分条形)
198
+ - 阶段耗时柱状图(平均 ms,前 8 阶段)
199
+ - Top 5 错误频次统计
200
+ - 零外部依赖(纯 inline CSS + SVG)
201
+ - `--open` 选项:生成后自动打开浏览器
202
+
203
+ ```bash
204
+ ai-spec dashboard # 生成 .ai-spec/dashboard.html
205
+ ai-spec dashboard --open # 生成后自动在浏览器打开
206
+ ai-spec dashboard --last 20 # 只分析最近 20 次运行
207
+ ai-spec dashboard --output ./report.html
208
+ ```
209
+
210
+ ---
211
+
212
+ **Feature 2 — `ai-spec types`(`core/types-generator.ts`、`cli/commands/types.ts`)**
213
+
214
+ - DSL → TypeScript 类型文件,前端可直接 import,无需手写
215
+ - 生成内容:
216
+ - 所有 `models` → `export interface ModelName { ... }`(含可选/必填、类型映射)
217
+ - 所有 `endpoints.request.body/query/params` → `export interface PostXxxRequest { ... }`
218
+ - `export const API_ENDPOINTS = { ... } as const`(含 method / path / auth)
219
+ - 前端 `components[].props` → `export interface ComponentNameProps { ... }`
220
+ - 类型映射:`String→string`,`Int/Float→number`,`Boolean→boolean`,`DateTime→string`,`PascalCase→该 interface 引用`
221
+
222
+ ```bash
223
+ ai-spec types # 生成 .ai-spec/<feature>.types.ts
224
+ ai-spec types --stdout # 打印到 stdout(适合管道)
225
+ ai-spec types --output src/types/api.ts
226
+ ai-spec types --no-endpoint-map # 不生成 API_ENDPOINTS 常量
227
+ ```
228
+
3
229
  ---
4
230
 
5
231
  ## [0.33.0] 2026-03-30 — Pipeline 反馈环:DSL Gap Loop + Review→DSL Loop
@@ -74,6 +300,13 @@ Spec → DSL 提取
74
300
 
75
301
  ---
76
302
 
303
+ **内部重构(2026-03-31)— CLI 命令拆分**
304
+
305
+ - `cli/index.ts` 从 2533 行拆分为 42 行入口 + 13 个独立命令文件(`cli/commands/*.ts`)+ 共享工具层(`cli/utils.ts`)
306
+ - 无任何用户可见功能变化,编译输出与重构前等价
307
+
308
+ ---
309
+
77
310
  ## [0.32.0] 2026-03-30 — Harness 数据闭环:`trend` / `logs` 命令 + DSL Coverage 细化评分
78
311
 
79
312
  ### 新增内容
@@ -2285,3 +2518,75 @@ Spec + Tasks 通过单次 AI 调用完成(`core/combined-generator.ts`),
2285
2518
  - `ai-spec review`:独立代码审查命令
2286
2519
  - 支持 `claude-code` / `api` / `plan` 三种代码生成模式
2287
2520
  - 项目上下文自动扫描(package.json / Prisma schema / 路由文件)
2521
+
2522
+ </details>
2523
+
2524
+ <details>
2525
+ <summary>English</summary>
2526
+
2527
+ # Release Log
2528
+
2529
+ This section provides an English companion view for the detailed Chinese changelog above. It keeps the same chronological direction while summarizing each version at a higher level for bilingual reading.
2530
+
2531
+ ## Version Summary
2532
+
2533
+ - **Unreleased** — Synced README, purpose, and RELEASE_LOG to reflect the latest pipeline, feedback loops, SVG diagrams, and observability narrative.
2534
+ - **0.34.0** — Added a static Harness Dashboard and DSL-to-TypeScript type generation.
2535
+ - **0.33.0** — Introduced two pipeline feedback loops: DSL Gap Loop and Review→DSL Loop.
2536
+ - **0.32.0** — Closed the harness data loop with `trend`, `logs`, and more detailed DSL coverage scoring.
2537
+ - **0.31.0** — Introduced the Harness Engineer layer with `promptHash` and inline self-evaluation during `create`.
2538
+ - **0.30.0** — Improved error-fix dependency ordering and multiline import awareness for frontend context extraction.
2539
+ - **0.29.0** — Performed a broad hardening pass across RunLogger instrumentation, update snapshots, score trend output, and dead-code cleanup.
2540
+ - **0.28.0** — Upgraded review from 2-pass to 3-pass by adding impact assessment and code complexity analysis.
2541
+ - **0.27.0** — Added industrial reliability foundations: provider robustness, snapshot restore, and structured RunLog / RunId support.
2542
+ - **0.26.0** — Fixed stability issues in multi-repo review, parallel batch tolerance, and corrupted tasks JSON recovery.
2543
+ - **0.25.0** — Repaired context extraction for HTTP imports, pagination examples, and false crash detection.
2544
+ - **0.24.0** — Fixed lesson counting, `export default`, `impliesRegistration`, and dependency topological sorting issues.
2545
+ - **0.23.0** — Eliminated a filename hallucination bug by correcting `index.vue` generation toward the actual component name.
2546
+ - **0.22.0** — Strengthened frontend three-layer separation by introducing a `view` layer and fixing API→Store naming hallucinations.
2547
+ - **0.21.0** — Fixed store behavior contract extraction, including `fetchTasks` vs `fetchTaskList` hallucination issues.
2548
+ - **0.20.0** — Added one-command mock integration with `--serve` and `--restore`.
2549
+ - **0.19.0** — Rewrote error parsing, completed behavior contract extraction, and fixed Auto Gate behavior.
2550
+ - **0.18.0** — Added `ai-spec learn`, behavior contract injection, and made Approval Gate a hard gate.
2551
+ - **0.17.0** — Injected the full constitution into generation, improved export caching, and added constitution length warnings.
2552
+ - **0.16.0** — Added spec quality pre-assessment, layered code review, and TDD mode.
2553
+ - **0.15.0** — Added parallel task execution for tasks within the same dependency layer.
2554
+ - **0.14.5** — Added extraction and injection of real frontend pagination patterns.
2555
+ - **0.14.4** — Improved frontend output reliability with route index auto-registration and cross-task function-name consistency.
2556
+ - **0.14.3** — Added the welcome screen.
2557
+ - **0.14.2** — Added Java / Maven / Gradle project context awareness.
2558
+ - **0.14.1** — Fixed a critical bug where non-Node repos incorrectly generated TypeScript-oriented output.
2559
+ - **0.14.0** — Unified frontend framework detection and injected frontend context explicitly in task mode.
2560
+ - **0.13.9** — Added component reuse awareness.
2561
+ - **0.13.8** — Fixed store HTTP hallucinations and HTTP client import hallucinations.
2562
+ - **0.13.6** — Fixed layout hallucinations and route registration reliability.
2563
+ - **0.13.5** — Fixed frontend codegen hallucinations and route convention issues.
2564
+ - **0.13.4** — Fixed MiMo `max_tokens` truncation.
2565
+ - **0.13.3** — Fixed DSL validation false positives.
2566
+ - **0.13.2** — Added API key persistence.
2567
+ - **0.13.1** — Auto-skipped worktree for frontend generation and fixed related bugs.
2568
+ - **0.13.0** — Strengthened context awareness and error-feedback behavior.
2569
+ - **0.12.2** — Added PHP / Lumen backend support.
2570
+ - **0.12.1** — Restored MiMo v2 Pro support.
2571
+ - **0.12.0** — Added constitution consolidation with `ai-spec init --consolidate`.
2572
+ - **0.11.0** — Delivered three high-priority additions: incremental update, OpenAPI export, and multi-language codegen prompts.
2573
+ - **0.10.0** — Added Mock Server support and expanded multi-language backend support.
2574
+ - **0.9.0** — Fixed frontend DSL extraction, decomposition context, and codegen injection precision.
2575
+ - **0.8.0** — Enhanced frontend support and added shared global constitutions across projects.
2576
+ - **0.7.0** — Introduced Phase 4 multi-repo workspace orchestration.
2577
+ - **0.6.0** — Introduced Phase 3 test generation, error feedback, and lesson accumulation.
2578
+ - **0.5.0** — Introduced Phase 2 DSL transformation, schema handling, and validation.
2579
+ - **0.4.0** — Introduced Phase 1 industrial pipeline infrastructure.
2580
+ - **0.3.0** — Added project constitution support, task decomposition, and RTK integration.
2581
+ - **0.2.0** — Added multi-provider support and interactive model switching.
2582
+ - **0.1.0** — Initial release with Spec generation, Git worktree isolation, code generation, review, and basic project context scanning.
2583
+
2584
+ ## Evolution Themes
2585
+
2586
+ - **Pipeline structure** — The project evolved from prompt-driven generation into a staged, restartable engineering pipeline.
2587
+ - **Project grounding** — Context extraction, constitutions, DSL, and behavior contracts reduce repository-specific hallucinations.
2588
+ - **Quality loops** — Testing, error feedback, review passes, lesson accumulation, and harness scoring create feedback channels after generation.
2589
+ - **Workspace orchestration** — Multi-repo features extend the system from single-repo coding to contract-aware cross-stack delivery.
2590
+ - **Harness observability** — `promptHash`, `harnessScore`, `logs`, `trend`, and `dashboard` turn runs into measurable engineering data.
2591
+
2592
+ </details>