maestro-flow 0.4.15 → 0.4.16

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 (90) hide show
  1. package/.agents/skills/maestro/SKILL.md +17 -17
  2. package/.agents/skills/maestro-plan/SKILL.md +10 -9
  3. package/.agents/skills/maestro-ralph/SKILL.md +21 -17
  4. package/.agents/skills/maestro-ralph-execute/SKILL.md +54 -71
  5. package/.agents/skills/manage-knowledge-audit/SKILL.md +90 -0
  6. package/.agy/skills/maestro/SKILL.md +17 -17
  7. package/.agy/skills/maestro-plan/SKILL.md +10 -9
  8. package/.agy/skills/maestro-ralph/SKILL.md +21 -17
  9. package/.agy/skills/maestro-ralph-execute/SKILL.md +54 -71
  10. package/.agy/skills/manage-knowledge-audit/SKILL.md +90 -0
  11. package/.claude/commands/maestro-plan.md +10 -9
  12. package/.claude/commands/maestro-ralph-execute.md +54 -71
  13. package/.claude/commands/maestro-ralph.md +21 -17
  14. package/.claude/commands/maestro.md +17 -17
  15. package/.claude/commands/manage-knowledge-audit.md +88 -0
  16. package/dist/src/cli.js +1 -0
  17. package/dist/src/cli.js.map +1 -1
  18. package/dist/src/commands/font-guide.d.ts +13 -0
  19. package/dist/src/commands/font-guide.d.ts.map +1 -0
  20. package/dist/src/commands/font-guide.js +114 -0
  21. package/dist/src/commands/font-guide.js.map +1 -0
  22. package/dist/src/commands/install.d.ts.map +1 -1
  23. package/dist/src/commands/install.js +5 -0
  24. package/dist/src/commands/install.js.map +1 -1
  25. package/dist/src/commands/ralph.d.ts +6 -0
  26. package/dist/src/commands/ralph.d.ts.map +1 -0
  27. package/dist/src/commands/ralph.js +133 -0
  28. package/dist/src/commands/ralph.js.map +1 -0
  29. package/dist/src/core/manifest.d.ts +2 -0
  30. package/dist/src/core/manifest.d.ts.map +1 -1
  31. package/dist/src/core/manifest.js.map +1 -1
  32. package/dist/src/hooks/statusline.d.ts.map +1 -1
  33. package/dist/src/hooks/statusline.js +189 -81
  34. package/dist/src/hooks/statusline.js.map +1 -1
  35. package/dist/src/ralph/cmd-check.d.ts +9 -0
  36. package/dist/src/ralph/cmd-check.d.ts.map +1 -0
  37. package/dist/src/ralph/cmd-check.js +53 -0
  38. package/dist/src/ralph/cmd-check.js.map +1 -0
  39. package/dist/src/ralph/cmd-complete.d.ts +10 -0
  40. package/dist/src/ralph/cmd-complete.d.ts.map +1 -0
  41. package/dist/src/ralph/cmd-complete.js +91 -0
  42. package/dist/src/ralph/cmd-complete.js.map +1 -0
  43. package/dist/src/ralph/cmd-next.d.ts +5 -0
  44. package/dist/src/ralph/cmd-next.d.ts.map +1 -0
  45. package/dist/src/ralph/cmd-next.js +158 -0
  46. package/dist/src/ralph/cmd-next.js.map +1 -0
  47. package/dist/src/ralph/cmd-session.d.ts +5 -0
  48. package/dist/src/ralph/cmd-session.d.ts.map +1 -0
  49. package/dist/src/ralph/cmd-session.js +52 -0
  50. package/dist/src/ralph/cmd-session.js.map +1 -0
  51. package/dist/src/ralph/cmd-skills.d.ts +6 -0
  52. package/dist/src/ralph/cmd-skills.d.ts.map +1 -0
  53. package/dist/src/ralph/cmd-skills.js +55 -0
  54. package/dist/src/ralph/cmd-skills.js.map +1 -0
  55. package/dist/src/ralph/skill-resolver.d.ts +40 -0
  56. package/dist/src/ralph/skill-resolver.d.ts.map +1 -0
  57. package/dist/src/ralph/skill-resolver.js +162 -0
  58. package/dist/src/ralph/skill-resolver.js.map +1 -0
  59. package/dist/src/ralph/skill-scanner.d.ts +15 -0
  60. package/dist/src/ralph/skill-scanner.d.ts.map +1 -0
  61. package/dist/src/ralph/skill-scanner.js +122 -0
  62. package/dist/src/ralph/skill-scanner.js.map +1 -0
  63. package/dist/src/ralph/status-checker.d.ts +7 -0
  64. package/dist/src/ralph/status-checker.d.ts.map +1 -0
  65. package/dist/src/ralph/status-checker.js +139 -0
  66. package/dist/src/ralph/status-checker.js.map +1 -0
  67. package/dist/src/ralph/status-schema.d.ts +94 -0
  68. package/dist/src/ralph/status-schema.d.ts.map +1 -0
  69. package/dist/src/ralph/status-schema.js +9 -0
  70. package/dist/src/ralph/status-schema.js.map +1 -0
  71. package/dist/src/ralph/status-store.d.ts +20 -0
  72. package/dist/src/ralph/status-store.d.ts.map +1 -0
  73. package/dist/src/ralph/status-store.js +70 -0
  74. package/dist/src/ralph/status-store.js.map +1 -0
  75. package/dist/src/tui/install-ui/ExecutionView.d.ts.map +1 -1
  76. package/dist/src/tui/install-ui/ExecutionView.js +1 -0
  77. package/dist/src/tui/install-ui/ExecutionView.js.map +1 -1
  78. package/dist/src/tui/install-ui/InstallExecution.d.ts.map +1 -1
  79. package/dist/src/tui/install-ui/InstallExecution.js +2 -0
  80. package/dist/src/tui/install-ui/InstallExecution.js.map +1 -1
  81. package/dist/src/tui/install-ui/InstallFlow.d.ts.map +1 -1
  82. package/dist/src/tui/install-ui/InstallFlow.js +28 -14
  83. package/dist/src/tui/install-ui/InstallFlow.js.map +1 -1
  84. package/dist/src/tui/install-ui/InstallResult.d.ts.map +1 -1
  85. package/dist/src/tui/install-ui/InstallResult.js +1 -1
  86. package/dist/src/tui/install-ui/InstallResult.js.map +1 -1
  87. package/dist/src/utils/update-notices.js +12 -0
  88. package/dist/src/utils/update-notices.js.map +1 -1
  89. package/package.json +1 -1
  90. package/workflows/knowledge-audit.md +358 -0
@@ -34,24 +34,24 @@ Also read `session.auto_mode` from status.json — if true, treat as `-y`.
34
34
  | Kind | Identifier | Execution | Flow after |
35
35
  |------|-----------|-----------|------------|
36
36
  | decision step | `step.decision` 非空 | `Skill("maestro-ralph")` | Execution ends here |
37
- | 执行 step | `step.decision == null` | `Read({file_path: step.command_path})` + 内联解释执行 | Self-invoke next |
37
+ | 执行 step | `step.decision == null` | `Bash("maestro ralph next")` 内联按其 stdout 执行 → `Bash("maestro ralph complete N --status ...")` | Self-invoke next |
38
38
 
39
39
  HARD RULES:
40
- - 执行 step:通过 `Read({command_path})` 把命令 .md 加载进当前会话,再按内容执行
41
- - **必须遵循 `<required_reading>` / `<deferred_reading>` 标签**:命令 .md 通常采用"入口 + workflow"形式,主体逻辑放在 workflow 文件中并通过 `<required_reading>` 引用;缺失 required_reading 视为加载失败
42
- - decision step:A_EXEC_DECISION 通过 `Skill({ skill: "maestro-ralph" })` handoff ralph 评估
43
- - `command_path` ralph A_BUILD_STEPS 写入 status.json(缺失 报错 E002)
44
- - 每个 step 必须产出 `--- COMPLETION STATUS ---` 块,否则视为 NEEDS_RETRY
40
+ - 执行 step:**统一通过 `maestro ralph next` CLI 加载**。CLI 负责读 command_path、解析 `<required_reading>` + `<deferred_reading>`、拼接 prompt、写 `step.load.*` + `active_step_index` + `step.status="running"`。不要再在会话里手动 Read + 解析 required_reading
41
+ - decision step:A_EXEC_DECISION 通过 `Skill({ skill: "maestro-ralph" })` handoff ralph 评估(不走 CLI)
42
+ - `command_path` ralph A_BUILD_STEPS 写入 status.json(缺失 → ralph next 返回 E006/E007 并拒绝执行)
43
+ - 每个 step 结束必须调用 `maestro ralph complete N --status <S>` 或 `maestro ralph retry N`。STATUS 4 个合法值:`DONE | DONE_WITH_CONCERNS | NEEDS_RETRY | BLOCKED`(**`NEEDS_CONTEXT` 已废除**,context 容量由 harness 自动压缩处理)
45
44
  </context>
46
45
 
47
46
  <invariants>
48
- 1. **执行 = Read + inline**通过 Read 读取 `step.command_path`,按其指令在当前 session 内执行
49
- 2. **Required reading must be loaded**命令 .md 中的 `<required_reading>` 引用的所有文件必须立即 Read;缺一 视为加载失败,pause session(E007
50
- 3. **Deferred reading recorded only** — `<deferred_reading>` 列出的文件路径需记录,执行过程按需 Read;不在加载阶段读取
51
- 4. **Skill loaded confirmation** 所有 required_reading 加载完成后必须输出一行确认:`✓ skill {step.skill} 加载完成 (required: N, deferred: M)`
52
- 5. **必须显式 completion confirmation** — 每个 step 完成时需有 `STATUS: DONE` 且写入 `step.completion_confirmed = true`
47
+ 1. **执行 = `ralph next` + inline + `ralph complete`** `maestro ralph next` 拿到 skill 内容,按 stdout 内联执行
48
+ 2. **Required reading CLI 负责**`ralph next` 自动展开 + 加载 `<required_reading>` 引用的所有文件,缺失退出码 1(E007),不写 active_step_index,不进入执行
49
+ 3. **Deferred reading recorded only** — `<deferred_reading>` 路径由 CLI 记录到 `step.load.deferred_files`,执行阶段按需 Read
50
+ 4. **一致性取代锁**同一 session 同时最多一个 step `active_step_index`;CLI 校验失败直接退出码 3,不静默推进
51
+ 5. **Completion 通过 CLI 调用** — 每个 step 末尾调 `maestro ralph complete N --status <S>` 或 `maestro ralph retry N`,由 CLI 写 `completion_*` + `active_step_index`
53
52
  6. **Self-invocation chain** — 持续直到全部 `completion_confirmed` 或 paused
54
- 7. **status.json 每步骤后写盘** — resume-safe
53
+ 7. **status.json 每步骤后由 CLI 原子写盘** — resume-safe
54
+ 8. **STATUS 枚举受限** — 仅 `DONE | DONE_WITH_CONCERNS | NEEDS_RETRY | BLOCKED`;`NEEDS_CONTEXT` 已废除
55
55
  </invariants>
56
56
 
57
57
  <state_machine>
@@ -78,11 +78,12 @@ S_RESOLVE_ARGS:
78
78
 
79
79
  S_EXECUTE:
80
80
  → END WHEN: step.decision != null DO: A_EXEC_DECISION
81
- → S_POST_EXEC WHEN: step.decision == null + success DO: A_EXEC_STEP
82
- → S_HANDLE_FAIL WHEN: step.decision == null + failure DO: A_EXEC_STEP
81
+ → S_POST_EXEC WHEN: step.decision == null + ralph complete invoked with DONE|DONE_WITH_CONCERNS DO: A_EXEC_STEP
82
+ → S_HANDLE_FAIL WHEN: step.decision == null + ralph next exit≠0 OR ralph complete with NEEDS_RETRY|BLOCKED DO: A_EXEC_STEP
83
83
 
84
84
  S_POST_EXEC:
85
- → S_LOCATE DO: A_MARK_COMPLETE + Skill("maestro-ralph-execute")
85
+ → S_LOCATE DO: Bash("maestro ralph complete ...") + Skill("maestro-ralph-execute")
86
+ NOTE: CLI 已写完 completion_*, status, active_step_index;无需额外写盘
86
87
 
87
88
  S_HANDLE_FAIL:
88
89
  → S_LOCATE WHEN: auto + not retried DO: A_RETRY
@@ -105,8 +106,8 @@ S_FALLBACK:
105
106
 
106
107
  1. If session_id provided → load `.workflow/.maestro/{session_id}/status.json`
107
108
  2. Else: scan `.workflow/.maestro/*/status.json`, filter `status == "running"`, sort DESC, take first
108
- 3. Extract: session_id, source, steps[], current_step, phase, milestone, intent, auto_mode, context, cli_tool
109
- 4. Find first step with `status == "pending"` next step
109
+ 3. Extract: session_id, source, steps[], phase, milestone, intent, auto_mode, context, cli_tool, active_step_index
110
+ 4. **不在此处选 pending step**——pending 选择由 `maestro ralph next` CLI 内部完成;A_LOCATE_SESSION 只确认 session 存在且 running,由 A_EXEC_STEP 调 CLI 推进
110
111
 
111
112
  ### A_RESOLVE_ARGS
112
113
 
@@ -154,54 +155,35 @@ Write enriched args back to status.json.
154
155
 
155
156
  ### A_EXEC_STEP
156
157
 
157
- 1. Validate `step.command_path != null`;否则 raise E002,pause session
158
- 2. Mark step running, write status.json
159
- 3. Display: `[{index}/{total}] {step.skill} [{step.command_scope}]`
160
- 4. `Read({ file_path: step.command_path })` — 把命令 .md 全文加载进当前会话
161
- 5. **解析 reading 标签**("入口 + workflow"形式核心步骤):
162
- - 抽取 frontmatter `argument-hint` / `allowed-tools`
163
- - 抽取 `<required_reading>` 块的所有 `@path` 引用 → 立刻 `Read({ file_path: <expanded path> })` 加载(`~/` / `@~/` 展开为用户主目录);任一文件缺失或读取失败 → raise E007,pause session
164
- - 抽取 `<deferred_reading>` 块的所有路径 仅记录到 `step.deferred_reads = [...]`,执行阶段按需 Read
165
- - 抽取 `<purpose>/<context>/<state_machine>/<execution>/<actions>` 等指令块
166
- 6. **加载完成确认**:required_reading 全部成功 Read 后,输出一行:
167
- ```
168
- skill {step.skill} 加载完成 (required: {N}, deferred: {M})
169
- ```
170
- 其中 N = required_reading 引用数,M = deferred_reading 路径数(缺省块按 0 计)
171
- 7. 计算 `effective_args`:`step.args` + (`auto ? " -y" : ""`)
172
- 8. 按读到的指令在本会话中**内联执行**:调用允许的工具完成命令所规定的工作;执行过程中如触发 deferred_reading 引用的资源 → 按需 Read
173
- 9. 执行结束:要求最后一段必须包含 `--- COMPLETION STATUS ---` 块(见 A_MARK_COMPLETE)
174
- 10. Return success / failure
175
-
176
- ### A_MARK_COMPLETE
177
-
178
- 1. 从 step 输出中提取 `--- COMPLETION STATUS ---` 块(required)
179
- 2. 解析并写入:
180
- - `STATUS: DONE` → `step.status = "completed"`, `step.completion_confirmed = true`, `step.completion_status = "DONE"`
181
- - `STATUS: DONE_WITH_CONCERNS` → `step.status = "completed"`, `step.completion_confirmed = true`, `step.completion_status = "DONE_WITH_CONCERNS"`, `step.concerns = <CONCERNS>`
182
- - `STATUS: NEEDS_RETRY` → `step.status = "pending"`, `step.retried = true`, `step.completion_confirmed = false`, → S_HANDLE_FAIL
183
- - `STATUS: BLOCKED` / `NEEDS_CONTEXT` → `session.status = "paused"`, `step.completion_status` 记录原因, `step.completion_confirmed = false`
184
- - 缺失 `--- COMPLETION STATUS ---` 块 → 视为 NEEDS_RETRY(不允许 heuristic fallback)
185
- 3. 写入 `step.completion_evidence`(artifact 路径 / 关键输出节选)
186
- 4. 扫描输出抓取 context 信号:`PHASE: N` → session.phase;`scratch_dir: path` → context.scratch_dir;`BLP-xxx` → context.blueprint_session_id
187
- 5. `step.completed_at = now`,写 status.json
188
- 6. **Sub-goal evidence 校验**(task_decomposition 存在时):若 `step.goal_ref` 对应子目标的 `lifecycle` 覆盖当前 stage 且 evidence artifact 已生成 → 暂不直接置 done,仍交由 post-goal-audit 决策;仅在 step 显式确认时更新 `task_decomposition[*].completion_confirmed = false` 占位(保持 pending)
189
- 7. Display: `[{index}/{total}] ✓ {step.skill} completed (confirmed)`
158
+ 1. **Load** `Bash("maestro ralph next")`
159
+ - 退出码 0 stdout 内联执行
160
+ - 退出码 2 交给 S_LOCATE
161
+ - 退出码 3 active_step_index 已被占用
162
+ - 退出码 1 pause session
163
+ 2. **Inline execution** stdout 执行;deferred_reading 按需 Read
164
+ 3. **Complete**:
165
+ - `Bash("maestro ralph complete N --status DONE [--evidence <path>]")`
166
+ - `Bash("maestro ralph complete N --status DONE_WITH_CONCERNS --concerns \"...\"")`
167
+ - `Bash("maestro ralph retry N")`
168
+ - `Bash("maestro ralph complete N --status BLOCKED --reason \"...\"")`
169
+ 4. **Propagate context signals** — 关键信号 (`PHASE: N` / `scratch_dir: path` / `BLP-xxx`) 写入 `status.json.context`
170
+
171
+ 完成后 S_LOCATE 触发 `Skill({ skill: "maestro-ralph-execute" })` 自调用。
190
172
 
191
173
  ### A_RETRY
192
174
 
193
- 1. `step.retried = true`, `step.status = "pending"`, `step.error = null`, `step.completion_confirmed = false`
194
- 2. Write status.json
175
+ 1. `Bash("maestro ralph retry N")` — CLI 设 `step.retried = true`, `step.status = "pending"`, `step.completion_confirmed = false`, `active_step_index`
176
+ 2. Display: `[{index}/{total}] ↻ {step.skill} retry`
195
177
 
196
178
  ### A_SKIP_STEP
197
179
 
198
- 1. `step.status = "skipped"`, `step.completion_confirmed = false`
199
- 2. Write status.json
180
+ 跳过执行 step — 手动编辑 `status.json`:将该 step `status` 设为 `"skipped"`,`completion_confirmed` 设为 `false`,并清 `active_step_index`(若指向此 step)。
181
+ (不提供 CLI 子命令;跳过是非常规操作,避免自动化误用。)
200
182
 
201
183
  ### A_PAUSE_SESSION
202
184
 
203
- 1. `session.status = "paused"`, write status.json
204
- 2. Display: `[{index}/{total}] ✗ {step.skill} 失败,会话已暂停。/maestro-ralph continue 恢复。`
185
+ 通常由 `ralph complete N --status BLOCKED --reason "..."` 触发,CLI 已写 `session.status = "paused"`。手动 pause 场景下直接编辑 status.json
186
+ Display: `[{index}/{total}] ✗ {step.skill} 失败,会话已暂停。/maestro-ralph continue 恢复。`
205
187
 
206
188
  ### A_COMPLETE_SESSION
207
189
 
@@ -236,29 +218,30 @@ Write enriched args back to status.json.
236
218
  | Code | Severity | Description | Recovery |
237
219
  |------|----------|-------------|----------|
238
220
  | E001 | error | No running session found | Suggest /maestro or /maestro-ralph |
239
- | E002 | error | step.command_path missing for 执行 step | Pause, ask ralph to rebuild step |
240
- | E003 | error | status.json corrupt | Show path, manual check |
241
- | E005 | error | COMPLETION STATUS block missing | Trigger NEEDS_RETRY |
242
- | E007 | error | required_reading file 缺失或读取失败 | List missing paths, pause session |
221
+ | E006 | error | command_path missing/unreachable for 执行 step | `ralph next` 拒绝;编辑 status.json 或重 build |
222
+ | E007 | error | required_reading 引用文件缺失 | `ralph next` 拒绝;CLI stderr 列出缺失路径 |
223
+ | E008 | error | `ralph complete` idx active_step_index | 编辑 status.json 修正一致性 |
224
+ | E009 | error | `ralph complete` step.status ≠ running | 重复 complete 或非法跳跃;编辑 status.json |
225
+ | E010 | error | status.json schema 损坏 | `ralph check` 显示具体损坏字段 |
243
226
  | W001 | warning | Step completed with concerns | Log and continue |
244
- | W002 | warning | command .md `<required_reading>` 标签 | 直接执行 .md 主体,跳过加载阶段 |
227
+ | W005 | warning | active_step_index 指向已 completed step | `ralph next` 自动清理后继续 |
228
+ | W007 | warning | step.skill ≠ command .md frontmatter.name | 提示但不阻塞 |
245
229
 
246
230
  ### Success Criteria
247
231
 
248
232
  - [ ] Session discovery covers maestro-* and ralph-*
249
233
  - [ ] `-y` parsed from args 或 session.auto_mode;auto=true 时透传 `-y` 到 skill args
250
234
  - [ ] Placeholders resolved;per-skill enrichment 正确
251
- - [ ] Decision 节点(`step.decision != null`)Skill("maestro-ralph") handoff
252
- - [ ] 执行 step 通过 Read({step.command_path}) 内联执行
253
- - [ ] 执行 step Read 后必须解析并加载 `<required_reading>` 引用的文件;缺失 E007 pause
254
- - [ ] `<deferred_reading>` 仅记录路径到 `step.deferred_reads`,执行阶段按需 Read
255
- - [ ] required_reading 加载完成后输出 `✓ skill {name} 加载完成 (required: N, deferred: M)`
256
- - [ ] 每个 step 强制 `--- COMPLETION STATUS ---`;缺失 NEEDS_RETRY
257
- - [ ] step.completion_confirmed = true 仅在 STATUS: DONE/DONE_WITH_CONCERNS 时设置
258
- - [ ] step.completion_evidence 记录 artifact path / 输出节选
259
- - [ ] Context signals 传播 status.json
235
+ - [ ] Decision 节点(`step.decision != null`)走 Skill("maestro-ralph") handoff(**不调 ralph next CLI**)
236
+ - [ ] 执行 step 通过 `Bash("maestro ralph next")` 加载;CLI 返回拼好的 prompt + completion 协议
237
+ - [ ] required_reading CLI 自动加载并拼入 prompt;缺失CLI 退出码 1,pause session
238
+ - [ ] `<deferred_reading>` CLI 记录到 `step.load.deferred_files`,执行阶段按需 Read
239
+ - [ ] 每个 step 末尾必须调 `maestro ralph complete N --status <S>` 或 `maestro ralph retry N`
240
+ - [ ] STATUS 枚举仅 `DONE | DONE_WITH_CONCERNS | NEEDS_RETRY | BLOCKED`;CLI 拒绝 `NEEDS_CONTEXT`
241
+ - [ ] active_step_index 一致性由 CLI 维护;E008/E009 直接退出,不静默推进
242
+ - [ ] step.completion_evidence 通过 `--evidence` 传入并记录
243
+ - [ ] Context signals 由执行 step 显式写回 status.json.context(非 ralph-execute 内嵌扫描)
260
244
  - [ ] Auto mode: retry 一次后 pause;interactive 提供 retry/skip/abort
261
245
  - [ ] 自调用持续到全部 completion_confirmed 或 paused
262
- - [ ] A_COMPLETE_SESSION 校验全部 step confirmed + sub-goal all_done
263
246
 
264
247
  </appendix>
@@ -26,7 +26,7 @@ Entry points:
26
26
  Initial decomposition (S_DECOMPOSE): boundary-clarified via ≤3 questions for broad intents (重构/全面/迁移/重写). 写入 status.json 的 `boundary_contract` / `execution_criteria` / `task_decomposition`,附 `/goal` prompt。
27
27
 
28
28
  Step kinds:
29
- - **执行 step**: ralph-execute `Read({command_path})` 命令 .md,按内容内联执行
29
+ - **执行 step**: ralph-execute `Bash("maestro ralph next")` 加载 command .md + required_reading 全文,按 stdout 内联执行
30
30
  - **decision step**: `step.decision` 字段非空;回 ralph 评估(CLI 只读分析)
31
31
 
32
32
  Key difference from maestro coordinator:
@@ -44,9 +44,9 @@ Mutual invocation with `/maestro-ralph-execute` forms a self-perpetuating work l
44
44
  │ writes status.json
45
45
  │ emits /goal prompt
46
46
 
47
- ralph-execute ◀─┐ 执行 step → Read(command_path) inline
47
+ ralph-execute ◀─┐ 执行 step → `maestro ralph next` + inline + `ralph complete`
48
48
  │ │ decision step → Skill("maestro-ralph")
49
- └─────────┘ writes step.completion_confirmed
49
+ └─────────┘ CLI writes step.completion_confirmed
50
50
  loop until all completion_confirmed | paused
51
51
  ```
52
52
  </purpose>
@@ -71,11 +71,11 @@ Remaining → intent
71
71
  1. **Ralph never executes steps** — only creates sessions and evaluates decisions
72
72
  2. **Handoff via Skill("maestro-ralph-execute")** — 创建 session 后始终自动 handoff;decision 评估后始终 handoff
73
73
  3. **Decision delegates read-only** — `maestro delegate --role analyze --mode analysis`
74
- 4. **执行 step 通过 Read 命令 .md 内联执行**
74
+ 4. **执行 step 通过 `maestro ralph next` CLI 加载并内联执行**(详见 invariant 8)
75
75
  5. **status.json 是唯一真源** — 不生成 markdown 清单或侧文件
76
- 6. **每个 step 必须 `completion_confirmed: true`** — 基于 `--- COMPLETION STATUS ---` `STATUS: DONE`;缺失则视为未完成
77
- 7. **command_path 在 A_BUILD_STEPS 解析** — 全局优先 `~/.claude/commands/{name}.md`,fallback 项目 `.claude/commands/{name}.md`,写入 status.json
78
- 8. **执行 step 加载契约** — ralph-execute `command_path` 后,必须解析并加载该命令 `<required_reading>` 引用的所有文件("入口 + workflow"形式的核心),并把 `<deferred_reading>` 路径记录到 `step.deferred_reads`;加载完成后输出 `✓ skill {name} 加载完成`。ralph build 阶段只解析路径,不读 .md 内容
76
+ 6. **每个 step 必须 `completion_confirmed: true`** — `maestro ralph complete N --status DONE`(或 DONE_WITH_CONCERNS)写入;CLI 是唯一合法写入路径
77
+ 7. **command_path 在 A_BUILD_STEPS 解析** — 通过 `maestro ralph skills --json --quiet` 预校验(project 覆盖 global),命中即写绝对路径到 status.json;未命中标 `command_scope = "missing"`
78
+ 8. **执行 step 加载契约** — 由 `maestro ralph next` CLI 在执行期完成:解析 frontmatter + `<required_reading>` + `<deferred_reading>`,自动读取 required 文件全文并拼入 prompt;缺失 required 退出码 1(E007),pause session。ralph build 阶段只通过 `maestro ralph skills` 校验路径存在性,不读 .md 内容
79
79
  9. **Decomposition is outcome-oriented** — sub-goals 为可观测交付,禁止 lifecycle 复刻;`/goal` 用户绑定,ralph 输出提示词后继续 handoff,用户可在执行过程中随时输入 `/goal`
80
80
  10. **planning_mode governs arg granularity** — `unified` → skill args 无 `{phase}`;`independent` → 含 `{phase}`
81
81
  11. **task_decomposition 驱动 steps[] 动态生长** — `post-goal-audit` 按 unmet 子目标插入 scoped mini-loop;字段可选/累加,既有字段不删不改
@@ -397,7 +397,7 @@ Generate steps from `session.lifecycle_position` to `milestone-complete`.
397
397
  | goal-audit | *(decision-only)* | *(same)* | `post-goal-audit` | all (only if decomposed) |
398
398
  | milestone-complete | `maestro-milestone-complete` | *(same)* | `post-milestone` | all |
399
399
 
400
- > 所有执行 stage 统一通过 Read .md 内联执行;decision 节点单独作为独立 step 插入(见规则 4)。
400
+ > 所有执行 stage 统一通过 `maestro ralph next` CLI 加载 + 内联执行;decision 节点单独作为独立 step 插入(见规则 4)。
401
401
 
402
402
  **Build rules (按顺序应用):**
403
403
 
@@ -412,11 +412,12 @@ Generate steps from `session.lifecycle_position` to `milestone-complete`.
412
412
  8. **占位符**:independent 保留 `{phase}` `{intent}`;unified 不带 `{phase}`
413
413
  9. **command_path 解析**(每个执行 step,decision 节点跳过):
414
414
  - 取 skill 名(args 前的第一个 token)
415
- - 全局优先:`~/.claude/commands/{name}.md` 存在 `command_scope = "global"`
416
- - Fallback:`.claude/commands/{name}.md` 存在 → `command_scope = "project"`
417
- - 两者都缺`command_scope = "missing"`, `command_path = null`,A_CREATE_SESSION 报错 E006
418
- - **不在 build 阶段读取 .md 内容**;`<required_reading>` / `<deferred_reading>` 解析与加载由 ralph-execute A_EXEC_STEP 负责(保持入口/工作流分离)
419
- 10. **每个 step 初始化** `completion_confirmed: false`, `completion_status: null`, `completion_evidence: null`, `deferred_reads: []`
415
+ - **预校验通过 `Bash("maestro ralph skills --json --quiet")`** 一次性拉取所有可用 commands + skills(global + project,project 覆盖 global),匹配 skill 名得到:
416
+ - 命中 commands → `command_scope = "global" | "project"`,`command_path = <绝对路径>`
417
+ - 命中 skills 同上(type=skill)
418
+ - 未命中 `command_scope = "missing"`, `command_path = null`,A_CREATE_SESSION 报错 E006
419
+ - **不在 build 阶段读取 .md 内容**;`<required_reading>` / `<deferred_reading>` 解析与加载由 `maestro ralph next` CLI 在执行期完成
420
+ 10. **每个 step 初始化** `completion_confirmed: false`, `completion_status: null`, `completion_evidence: null`, `deferred_reads: []`, `load: null`(由 `ralph next` 写入)
420
421
  11. **scope_verdict gating**(仅当 chain 起点 = `analyze-macro`):
421
422
  - `scope_verdict ∈ {medium, small}` → 跳过 `roadmap` + `analyze` 两 stage;`plan` 选 standalone 列(`--from analyze:{analyze_macro_id}`),不带 `{phase}`
422
423
  - `scope_verdict == large` → 保留 `roadmap` + `analyze`;`plan` 选 phase 列(`{phase}`)
@@ -595,6 +596,8 @@ Runs only when `task_decomposition` present.
595
596
  {
596
597
  "session_id": "ralph-{YYYYMMDD-HHmmss}",
597
598
  "source": "ralph", "status": "running",
599
+ "ralph_protocol_version": "1", // CLI-driven; absent/0 → legacy inline ralph-execute
600
+ "active_step_index": null, // CLI-managed; only one step held at a time
598
601
  "intent": "", "lifecycle_position": "",
599
602
  "phase": null, "phase_is_new": false,
600
603
  "milestone": "", // D-007 反查结果,禁止读 current_milestone
@@ -617,7 +620,7 @@ Runs only when `task_decomposition` present.
617
620
  "retry_count": 0, // decision 节点专用
618
621
  "max_retries": 2, // decision 节点专用
619
622
  "command_scope": "global|project|missing|null", // 执行 step;decision 节点固定 null
620
- "command_path": "~/.claude/commands/{name}.md | .claude/commands/{name}.md | null",
623
+ "command_path": "<absolute path resolved by `maestro ralph skills --json --quiet`> | null",
621
624
  "milestone_id": null, // D-007 反查注入;仅含 {phase} 占位符的 step 有
622
625
  "source_artifact_ref": null, // "analyze:ANL-xxx" | "blueprint:BLP-xxx" | null
623
626
  "status": "pending|running|completed|skipped|failed",
@@ -626,7 +629,8 @@ Runs only when `task_decomposition` present.
626
629
  "completion_status": null,
627
630
  "completion_evidence": null,
628
631
  "completed_at": null,
629
- "deferred_reads": [] // 由 ralph-execute A_EXEC_STEP 解析 .md 时填充
632
+ "deferred_reads": [], // 由 ralph next CLI 解析 .md 时填充
633
+ "load": null // { loaded_at, required_files[], deferred_files[], resolve_version } —— 由 ralph next 写入
630
634
  }],
631
635
  "waves": [], "current_step": 0,
632
636
 
@@ -747,8 +751,8 @@ decision:post-goal-audit {retry+1}
747
751
  - [ ] quality_mode 由 A_DETERMINE_QUALITY_MODE 决定,过滤 build steps
748
752
  - [ ] Decomposition: broad intent ≤3 question clarify;narrow auto-derive
749
753
  - [ ] status.json 唯一真源:boundary_contract + execution_criteria + task_decomposition;无外部清单
750
- - [ ] 执行 step 含 `command_scope` + `command_path`(全局优先 fallback 项目);decision step 通过 `step.decision` 字段标识
751
- - [ ] Ralph build 阶段只解析路径,不读 .md 内容;`<required_reading>` 加载由 ralph-execute A_EXEC_STEP 完成
754
+ - [ ] 执行 step 含 `command_scope` + `command_path`(通过 `maestro ralph skills --json --quiet` 预校验,project 覆盖 global);decision step 通过 `step.decision` 字段标识
755
+ - [ ] Ralph build 阶段只通过 `ralph skills` 校验路径存在性,不读 .md 内容;`<required_reading>` 加载由 `maestro ralph next` CLI 完成
752
756
  - [ ] 每个 step 含 `completion_confirmed` + `completion_status` + `completion_evidence` + `deferred_reads`(初始 false/null/[])
753
757
  - [ ] 每个 sub-goal 含 `completion_confirmed`(初始 false)
754
758
  - [ ] post-goal-audit decision 仅在 decomposed 时插入,位于 milestone-complete 之前
@@ -49,11 +49,11 @@ $ARGUMENTS — user intent text, or special keywords.
49
49
  3. **Auto flag pass-through** — 仅当用户传入 `-y` 时透传 `-y` 到 skill args
50
50
  4. **Decomposition contract shared with maestro-ralph** — broad/lifecycle intents run S_DECOMPOSE producing the SAME additive block (`boundary_contract`, `execution_criteria`, `task_decomposition`)。Reference maestro-ralph `A_DECOMPOSE_TASKS`
51
51
  5. **status.json 唯一真源** — 不生成 `goal-checklist.md` 或外部清单
52
- 6. **执行步骤统一 Read .md 内联**chain 内每个执行 step 解析 `command_scope`/`command_path`(全局优先 `~/.claude/commands/{name}.md`,fallback 项目),由 ralph-execute `Read({command_path})` 内联执行;CLI 仅在 decision 节点做只读分析
53
- 7. **Topology awareness** — chain catalog 含 brainstorm / blueprint / analyze-macro(text) / analyze(numeric phase) / roadmap / plan(三路径) / execute / verify / ...;scope_verdict 路由由 ralph 在 `post-analyze-scope` 决定
54
- 8. **D-007 milestone 反查** — 数字 phase 步骤的 `milestone_id` 由 `state.json.milestones[].phase_slugs` 反查得出
55
- 9. **每个 step 必须 `completion_confirmed: true`** — 基于 `--- COMPLETION STATUS ---` `STATUS: DONE`
56
- 10. **schema 向后兼容** 新增字段全部可选;既有字段名不删不改
52
+ 6. **执行步骤统一通过 `maestro ralph next` 加载** — `command_scope`/`command_path` `maestro ralph skills --json --quiet` 预校验(project 覆盖 global);decision 节点不走 CLI,走 `Skill("maestro-ralph")` handoff
53
+ 7. **Topology awareness** — chain catalog 含 brainstorm / blueprint / analyze-macro / analyze / roadmap / plan(三路径) / execute / verify / ...;scope_verdict ralph 在 `post-analyze-scope` 决定
54
+ 8. **D-007 milestone 反查** — 数字 phase `milestone_id` 由 `state.json.milestones[].phase_slugs` 反查
55
+ 9. **每个 step 必须 `completion_confirmed: true`** — `maestro ralph complete N --status DONE|DONE_WITH_CONCERNS` 写入
56
+ 10. **schema**`ralph_protocol_version: "1"` 标记 CLI-driven session;新增字段全部可选
57
57
  </invariants>
58
58
 
59
59
  <state_machine>
@@ -139,7 +139,7 @@ S_FALLBACK:
139
139
  - 数字 phase 上下文 → `analyze {phase}` → `plan {phase}` → `execute {phase}` → `verify {phase}` → quality pipeline
140
140
  - 已有 analyze artifact 想直达执行 → `plan --from analyze:{ANL_ID}` → execute → verify
141
141
  - 已有 blueprint artifact → `plan --from blueprint:{BLP_ID}` → execute → verify
142
- 4. 执行 step 解析 `command_scope` + `command_path`(全局优先 fallback 项目);写入 `step.stage` / `step.scope` / `step.source_artifact_ref`(如 `--from` 注入时)。decision 节点通过 `step.decision` 字段标识
142
+ 4. 执行 step:`Bash("maestro ralph skills --json --quiet")` 预校验 skill 名,命中写绝对路径到 `command_path`,未命中标 `missing`;同时写 `step.stage` / `step.scope` / `step.source_artifact_ref`。decision 节点不解析 command_path
143
143
 
144
144
  ### A_CLARIFY
145
145
 
@@ -169,30 +169,28 @@ S_FALLBACK:
169
169
  ```json
170
170
  {
171
171
  "session_id", "source": "maestro", "intent", "task_type", "chain_name",
172
+ "ralph_protocol_version": "1", "active_step_index": null,
172
173
  "phase", "phase_is_new": false, "milestone": "",
173
174
  "scope_verdict": null, "analyze_macro_id": null, "blueprint_id": null,
174
- "auto_mode": false, "cli_tool": "claude", // cli_tool: decision 节点 delegate 评估时的 CLI 工具
175
+ "auto_mode": false, "cli_tool": "claude",
175
176
  "context": { "scratch_dir": null, "plan_dir": null, "analysis_dir": null,
176
177
  "brainstorm_dir": null, "blueprint_dir": null, "issue_id": null },
177
178
  "steps": [{
178
- "index": 0,
179
- "skill": "", "args": "",
180
- "stage": "", "scope": null,
181
- "decision": null, // 非 null → decision 节点;null → 执行节点
182
- "command_scope": "global|project|missing|null",
183
- "command_path": "~/.claude/commands/{name}.md | .claude/commands/{name}.md | null",
179
+ "index": 0, "skill": "", "args": "",
180
+ "stage": "", "scope": null, "decision": null,
181
+ "command_scope": "global|project|missing|null", "command_path": "<abs> | null",
184
182
  "milestone_id": null, "source_artifact_ref": null,
185
183
  "status": "pending", "goal_ref": null,
186
184
  "completion_confirmed": false, "completion_status": null,
187
- "completion_evidence": null, "completed_at": null
185
+ "completion_evidence": null, "completed_at": null,
186
+ "deferred_reads": [], "load": null
188
187
  }],
189
188
  "waves": [], "current_step": 0, "status": "running",
190
189
  "boundary_contract": {}, "execution_criteria": [],
191
190
  "task_decomposition": [], "task_decomposition_all_done": false
192
191
  }
193
192
  ```
194
- Decomposition 字段仅在 A_DECOMPOSE_TASKS 产出时写入(additive)
195
- 3. Validate: 所有 step 的 `command_scope != "missing"`;否则 raise E005 列出缺失 skill
193
+ 3. Validate: 所有 step 的 `command_scope != "missing"`,否则 raise E005 列出缺失 skill
196
194
  4. Initialize tracking via `TodoWrite`
197
195
  5. If `--super`: read `maestro-super.md`, follow it completely
198
196
 
@@ -226,7 +224,9 @@ S_FALLBACK:
226
224
  - [ ] status.json 唯一真源;无 markdown 清单;post-goal-audit 节点在 decomposed 时追加;/goal 提示词以 status.json 为判据
227
225
  - [ ] Chain selected and confirmed (or auto-confirmed)
228
226
  - [ ] Session dir created with status.json before execution; decomposition fields additive-only
229
- - [ ] 执行 step 含 `command_scope` + `command_path` + `completion_confirmed` 字段;decision step 通过 `step.decision` 字段标识
227
+ - [ ] 执行 step 含 `command_scope` + `command_path` + `completion_confirmed`;decision step `step.decision` 标识
228
+ - [ ] `command_scope`/`command_path` 由 `maestro ralph skills --json --quiet` 预校验(project 覆盖 global)
229
+ - [ ] Session schema 含 `ralph_protocol_version: "1"` + `active_step_index: null` + step.load 占位
230
230
  - [ ] 用户传入 `-y` 时透传到 skill args
231
231
  - [ ] All chains dispatched via maestro-ralph-execute
232
232
  - [ ] Low-complexity intents routed to maestro-quick
@@ -0,0 +1,88 @@
1
+ ---
2
+ name: manage-knowledge-audit
3
+ description: Audit and prune knowledge across spec / knowhow / artifact stores
4
+ argument-hint: "--scope <spec|knowhow|artifact|all> [--level P0|P1|P2] [--timeline T1..T6] [--since YYYY-MM-DD] [--milestone <name>] [--include-archive] [--interactive] [--mark|--delete|--purge] [--dry-run] [--report]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - Bash
10
+ - Glob
11
+ - Grep
12
+ - Agent
13
+ - AskUserQuestion
14
+ ---
15
+ <purpose>
16
+ 对称于 `manage-harvest`(写入入口)的知识淘汰入口。harvest 负责把 artifact 抽取为 spec/wiki/issue;audit 负责审查这三大存储中已积累的条目,识别矛盾、失效、老化、孤儿,并通过 keep/deprecate/delete 三态决策清理。
17
+
18
+ 覆盖 8 大场景类、28 子场景(显性/隐性矛盾、失效老化、元数据质量、Maestro 特化、时间线产物 T1-T6、knowhow 漂移、artifact 残留),定义见 workflow knowledge-audit.md。
19
+
20
+ **闭环**:harvest 写入 → audit 审查 → 三态淘汰;与 `harvest --prune`(物理 GC)互补:audit 做语义层判定,且删除未抽取的 artifact 前反向触发 harvest 抢救。
21
+ </purpose>
22
+
23
+ <required_reading>
24
+ @~/.maestro/workflows/knowledge-audit.md
25
+ </required_reading>
26
+
27
+ <deferred_reading>
28
+ - @~/.maestro/workflows/harvest.md (audit 检测的 artifact 是 harvest 的产物源)
29
+ - @~/.maestro/workflows/specs-add.md (deprecate 操作所需的 `<spec-entry>` 变形)
30
+ </deferred_reading>
31
+
32
+ <context>
33
+ Arguments: $ARGUMENTS
34
+
35
+ **Scope(必选):** `spec` | `knowhow` | `artifact` | `all`
36
+
37
+ **删除策略**默认 `--interactive`(三态面板逐项决策);非交互模式 `--mark`(仅打标)/ `--delete`(软删到 `.trash/`)/ `--purge`(物理擦除,仅 artifact 且需双重确认)。
38
+
39
+ Flag 全集、scope 对应的扫描路径、Stage 步骤、检测算法定义在 workflow knowledge-audit.md。
40
+ </context>
41
+
42
+ <execution>
43
+ Follow `~/.maestro/workflows/knowledge-audit.md` Stages 1-8 in order.
44
+
45
+ **Key invariants:**
46
+ 1. **Backup before mutate** — Stage 6 必须把待变更文件打包到 `.workflow/.trash/knowledge-audit-{timestamp}/`,备份失败禁止 Stage 7。
47
+ 2. **Deprecate over delete** — 文本存储(spec/knowhow)首选注入 `status="deprecated"` 保留历史;只有 artifact 物理残留才走 delete/purge。
48
+ 3. **Purge requires double confirmation** — `--purge` 仅作用于 artifact scope,且 Stage 5 必须显式 `[y/N]` 二次确认 + 输入 artifact id。
49
+ 4. **Rescue before delete** — 删除未抽取的 artifact 前(`harvest-log.jsonl` 无记录),强制提示 "是否先 `/manage-harvest`?"。
50
+
51
+ Scope 路径、8 类检测算法、三态决策面板、报告 schema 定义在 workflow knowledge-audit.md。
52
+
53
+ **Next-step routing on completion:**
54
+ - 复审淘汰记录 → `.workflow/.knowledge-audit/audit-report-{date}.md`
55
+ - 抢救未抽取 artifact → `/manage-harvest <artifact-id>`
56
+ - 验证 spec 现状 → `/spec-load --role implement`
57
+ - 周期巡检 → 每 milestone 结束跑 `--scope all --report`
58
+ </execution>
59
+
60
+ <error_codes>
61
+ | Code | Severity | Condition | Recovery |
62
+ |------|----------|-----------|----------|
63
+ | E001 | error | `.workflow/` 未初始化 | 先跑 `/maestro-init` |
64
+ | E002 | error | `--scope` 缺失或非法 | 提供 spec/knowhow/artifact/all |
65
+ | E003 | error | `--purge` 与 `--dry-run` 同用 | 二选一 |
66
+ | E004 | error | `--purge` 作用于非 artifact 范围 | purge 仅支持 artifact scope |
67
+ | E005 | error | 备份失败(`.trash/` 写入异常) | 检查磁盘空间与权限,重试 |
68
+ | W001 | warning | 检出冲突但用户选择 keep | 记入 report,不阻断 |
69
+ | W002 | warning | 待删 artifact 无 harvest-log 记录 | 提示先跑 manage-harvest |
70
+ | W003 | warning | 循环 supersedes 链 | 自动断环或交互选保留节点 |
71
+ | W004 | warning | 检测耗时 >120s(大规模 spec 库) | 建议加 `--scope` 收敛或 `--since` 增量 |
72
+ | W005 | warning | LLM detector 不可用 | 降级到正则+图算法子集,跳过 B/G 类语义场景 |
73
+ </error_codes>
74
+
75
+ <success_criteria>
76
+ - [ ] Scope 正确解析,互斥标志校验通过
77
+ - [ ] 三存储按 scope 加载完成,构建出统一 finding 池
78
+ - [ ] Stage 3 时间线索引建立(mtime ↔ session/milestone 状态)
79
+ - [ ] Stage 4 按 P0/P1/P2 输出 finding 列表
80
+ - [ ] 如非 `--report`:用户对每项做出三态决策
81
+ - [ ] 未 harvest 的 artifact 删除前触发抢救确认
82
+ - [ ] Stage 6 backup tarball 生成于 `.workflow/.trash/`
83
+ - [ ] `deprecate` 通过元数据注入完成(spec/knowhow 文件未被物理删除)
84
+ - [ ] `delete` 移动至 `.trash/`,索引同步更新
85
+ - [ ] `purge` 仅在双重确认通过后执行
86
+ - [ ] `audit-report-{date}.md` + `audit-log.jsonl` 写入完成
87
+ - [ ] 摘要展示三存储变更计数与下一步路由
88
+ </success_criteria>
package/dist/src/cli.js CHANGED
@@ -36,6 +36,7 @@ const commandLoaders = {
36
36
  wiki: async () => (await import('./commands/wiki.js')).registerWikiCommand,
37
37
  hooks: async () => (await import('./commands/hooks.js')).registerHooksCommand,
38
38
  coordinate: async () => (await import('./commands/coordinate.js')).registerCoordinateCommand,
39
+ ralph: async () => (await import('./commands/ralph.js')).registerRalphCommand,
39
40
  launcher: async () => (await import('./commands/launcher.js')).registerLauncherCommand,
40
41
  delegate: async () => (await import('./commands/delegate.js')).registerDelegateCommand,
41
42
  'agent-msg': async () => (await import('./commands/msg.js')).registerMsgCommand,
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;AAC/B,iEAAiE;AACjE,OAAO,CAAC,IAAI,GAAG,UAAU,KAAa,EAAE,GAAG,IAAe;IACxD,IAAI,KAAK,KAAK,SAAS,IAAK,IAAI,CAAC,CAAC,CAAuB,EAAE,IAAI,KAAK,qBAAqB,EAAE,CAAC;QAC1F,OAAO,KAAK,CAAC;IACf,CAAC;IACD,6CAA6C;IAC7C,OAAO,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,CAAC;AACjD,CAAC,CAAC;AAEF,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,OAAO,GAAG,IAAI,OAAO,E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CACxF,CAAC;AAEF,8DAA8D;AAC9D,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACnC,MAAM,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;AAE5D,IAAI,gBAAgB,IAAI,gBAAgB,IAAI,cAAc,EAAE,CAAC;IAC3D,yCAAyC;IACzC,MAAM,QAAQ,GAAG,MAAM,cAAc,CAAC,gBAAgB,CAAC,EAAE,CAAC;IAC1D,QAAQ,CAAC,OAAO,CAAC,CAAC;AACpB,CAAC;KAAM,CAAC;IACN,0EAA0E;IAC1E,4EAA4E;IAC5E,4EAA4E;IAC5E,MAAM,IAAI,GAAG,IAAI,GAAG,EAAwB,CAAC;IAC7C,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,CAAC;QACnD,MAAM,QAAQ,GAAG,MAAM,MAAM,EAAE,CAAC;QAChC,IAAI,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC;YAAE,SAAS;QACjC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACnB,QAAQ,CAAC,OAAO,CAAC,CAAC;IACpB,CAAC;AACH,CAAC;AAED,MAAM,OAAO,CAAC,UAAU,EAAE,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { Command } from 'commander';
2
+ interface PlatformGuide {
3
+ os: 'linux' | 'darwin' | 'win32' | 'unknown';
4
+ detected: boolean | null;
5
+ lines: string[];
6
+ }
7
+ export declare function getNerdFontGuide(font?: string): PlatformGuide;
8
+ /** Print the font guide to stderr (matches install command output style). */
9
+ export declare function printNerdFontGuide(font?: string): void;
10
+ /** Register `maestro install fonts` standalone subcommand. */
11
+ export declare function registerFontsSubcommand(install: Command): void;
12
+ export {};
13
+ //# sourceMappingURL=font-guide.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"font-guide.d.ts","sourceRoot":"","sources":["../../../src/commands/font-guide.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQzC,UAAU,aAAa;IACrB,EAAE,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;IAC7C,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAC;IACzB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAiBD,wBAAgB,gBAAgB,CAAC,IAAI,GAAE,MAAqB,GAAG,aAAa,CAqD3E;AAED,6EAA6E;AAC7E,wBAAgB,kBAAkB,CAAC,IAAI,GAAE,MAAqB,GAAG,IAAI,CAqBpE;AAED,8DAA8D;AAC9D,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAQ9D"}