@wooojin/forgen 0.6.8 → 0.6.9

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 (221) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/CHANGELOG.md +17 -0
  3. package/README.ja.md +15 -10
  4. package/README.ko.md +15 -10
  5. package/README.md +19 -14
  6. package/README.zh.md +13 -8
  7. package/dist/checks/dangerous-response-pattern.d.ts +2 -1
  8. package/dist/checks/dangerous-response-pattern.js +27 -3
  9. package/dist/cli.js +133 -17
  10. package/dist/core/auto-compound-runner.js +502 -397
  11. package/dist/core/block-cli.js +7 -3
  12. package/dist/core/compound-consent.d.ts +18 -0
  13. package/dist/core/compound-consent.js +101 -6
  14. package/dist/core/compound-sweep-cli.d.ts +16 -0
  15. package/dist/core/compound-sweep-cli.js +67 -5
  16. package/dist/core/config-hooks.js +28 -10
  17. package/dist/core/correction-signals.d.ts +9 -0
  18. package/dist/core/correction-signals.js +37 -0
  19. package/dist/core/dev-cli.d.ts +1 -2
  20. package/dist/core/dev-cli.js +9 -28
  21. package/dist/core/doctor-verify.d.ts +35 -0
  22. package/dist/core/doctor-verify.js +502 -0
  23. package/dist/core/doctor.d.ts +4 -6
  24. package/dist/core/doctor.js +103 -184
  25. package/dist/core/explain-cli.js +8 -0
  26. package/dist/core/extraction-haiku.d.ts +64 -0
  27. package/dist/core/extraction-haiku.js +208 -0
  28. package/dist/core/extraction-queue.d.ts +68 -0
  29. package/dist/core/extraction-queue.js +300 -0
  30. package/dist/core/flow-status.d.ts +93 -0
  31. package/dist/core/flow-status.js +368 -0
  32. package/dist/core/harness.js +14 -42
  33. package/dist/core/inspect-cli.js +37 -13
  34. package/dist/core/lifecycle-classifier.d.ts +5 -1
  35. package/dist/core/lifecycle-classifier.js +13 -2
  36. package/dist/core/migrate-cli.d.ts +1 -1
  37. package/dist/core/migrate-cli.js +11 -11
  38. package/dist/core/migrate-tenetx.d.ts +1 -1
  39. package/dist/core/migrate-tenetx.js +2 -2
  40. package/dist/core/node-engine.d.ts +3 -0
  41. package/dist/core/node-engine.js +8 -0
  42. package/dist/core/observability-store.d.ts +15 -0
  43. package/dist/core/observability-store.js +73 -0
  44. package/dist/core/paths.d.ts +2 -0
  45. package/dist/core/paths.js +2 -0
  46. package/dist/core/rendered-rules-manifest.d.ts +7 -1
  47. package/dist/core/rendered-rules-manifest.js +45 -1
  48. package/dist/core/session-store.d.ts +13 -11
  49. package/dist/core/session-store.js +103 -119
  50. package/dist/core/settings-injector.d.ts +5 -2
  51. package/dist/core/settings-injector.js +21 -88
  52. package/dist/core/spawn.d.ts +9 -1
  53. package/dist/core/spawn.js +33 -33
  54. package/dist/core/stats-cli.d.ts +7 -0
  55. package/dist/core/stats-cli.js +66 -93
  56. package/dist/core/status-cli.d.ts +1 -1
  57. package/dist/core/status-cli.js +23 -4
  58. package/dist/core/statusline-cli.js +5 -0
  59. package/dist/core/statusline-install.d.ts +10 -2
  60. package/dist/core/statusline-install.js +27 -4
  61. package/dist/core/transcript-summary.d.ts +84 -9
  62. package/dist/core/transcript-summary.js +283 -49
  63. package/dist/core/uninstall.d.ts +4 -0
  64. package/dist/core/uninstall.js +68 -36
  65. package/dist/core/v1-bootstrap.d.ts +1 -1
  66. package/dist/core/v1-bootstrap.js +38 -9
  67. package/dist/engine/acted-on-evidence.d.ts +8 -0
  68. package/dist/engine/acted-on-evidence.js +38 -0
  69. package/dist/engine/block-judge.d.ts +3 -1
  70. package/dist/engine/block-judge.js +4 -3
  71. package/dist/engine/compound-cli.d.ts +26 -2
  72. package/dist/engine/compound-cli.js +143 -19
  73. package/dist/engine/compound-lifecycle.d.ts +36 -2
  74. package/dist/engine/compound-lifecycle.js +131 -11
  75. package/dist/engine/compound-loop.d.ts +4 -0
  76. package/dist/engine/compound-loop.js +93 -18
  77. package/dist/engine/correction-cluster-runner.d.ts +11 -1
  78. package/dist/engine/correction-cluster-runner.js +39 -15
  79. package/dist/engine/correction-clustering.d.ts +11 -0
  80. package/dist/engine/correction-clustering.js +20 -3
  81. package/dist/engine/lifecycle/lifecycle-cli.js +10 -3
  82. package/dist/engine/lifecycle/meta-reclassifier.d.ts +9 -0
  83. package/dist/engine/lifecycle/meta-reclassifier.js +15 -3
  84. package/dist/engine/lifecycle/orchestrator.js +3 -2
  85. package/dist/engine/lifecycle/signals.d.ts +19 -1
  86. package/dist/engine/lifecycle/signals.js +61 -2
  87. package/dist/engine/lifecycle/trigger-t1-correction.d.ts +1 -1
  88. package/dist/engine/lifecycle/trigger-t1-correction.js +9 -28
  89. package/dist/engine/lifecycle/trigger-t5-conflict.d.ts +8 -0
  90. package/dist/engine/lifecycle/trigger-t5-conflict.js +60 -2
  91. package/dist/engine/roi-demotion.d.ts +11 -0
  92. package/dist/engine/roi-demotion.js +50 -8
  93. package/dist/engine/rule-detectability.d.ts +39 -0
  94. package/dist/engine/rule-detectability.js +66 -0
  95. package/dist/engine/rule-project-cli.d.ts +25 -0
  96. package/dist/engine/rule-project-cli.js +148 -0
  97. package/dist/engine/rule-recovery-cli.d.ts +21 -0
  98. package/dist/engine/rule-recovery-cli.js +265 -0
  99. package/dist/engine/rule-toggle-cli.d.ts +14 -2
  100. package/dist/engine/rule-toggle-cli.js +94 -6
  101. package/dist/engine/skill-promoter.d.ts +14 -8
  102. package/dist/engine/skill-promoter.js +57 -85
  103. package/dist/engine/solution-format.d.ts +26 -1
  104. package/dist/engine/solution-format.js +65 -3
  105. package/dist/engine/solution-habit.d.ts +1 -0
  106. package/dist/engine/solution-habit.js +22 -0
  107. package/dist/engine/solution-index.d.ts +5 -0
  108. package/dist/engine/solution-index.js +32 -0
  109. package/dist/engine/solution-matcher-eval.js +4 -4
  110. package/dist/engine/solution-matcher.js +15 -13
  111. package/dist/engine/solution-scope.d.ts +11 -0
  112. package/dist/engine/solution-scope.js +19 -0
  113. package/dist/engine/solution-writer.d.ts +3 -1
  114. package/dist/engine/solution-writer.js +3 -2
  115. package/dist/engine/term-normalizer.js +49 -0
  116. package/dist/fgx.js +1 -1
  117. package/dist/forge/cli.js +51 -8
  118. package/dist/forge/evidence-processor.js +6 -0
  119. package/dist/hooks/context-guard.d.ts +0 -22
  120. package/dist/hooks/context-guard.js +22 -55
  121. package/dist/hooks/context-usage.d.ts +21 -0
  122. package/dist/hooks/context-usage.js +103 -0
  123. package/dist/hooks/dangerous-patterns.json +1 -16
  124. package/dist/hooks/db-guard.d.ts +1 -1
  125. package/dist/hooks/db-guard.js +21 -30
  126. package/dist/hooks/hook-config.d.ts +2 -0
  127. package/dist/hooks/hook-config.js +5 -1
  128. package/dist/hooks/hooks-generator.d.ts +4 -0
  129. package/dist/hooks/hooks-generator.js +10 -4
  130. package/dist/hooks/permission-handler.js +23 -3
  131. package/dist/hooks/post-tool-use.js +14 -10
  132. package/dist/hooks/pre-tool-use.d.ts +17 -3
  133. package/dist/hooks/pre-tool-use.js +143 -30
  134. package/dist/hooks/rate-limiter.js +12 -7
  135. package/dist/hooks/secret-filter.js +15 -4
  136. package/dist/hooks/session-end.d.ts +2 -2
  137. package/dist/hooks/session-end.js +13 -7
  138. package/dist/hooks/session-recovery.js +79 -50
  139. package/dist/hooks/shared/command-analyzer.d.ts +45 -0
  140. package/dist/hooks/shared/command-analyzer.js +972 -0
  141. package/dist/hooks/shared/command-parser.d.ts +5 -29
  142. package/dist/hooks/shared/command-parser.js +65 -35
  143. package/dist/hooks/shared/commit-guard.d.ts +15 -0
  144. package/dist/hooks/shared/commit-guard.js +176 -0
  145. package/dist/hooks/shared/hook-response.d.ts +6 -0
  146. package/dist/hooks/shared/hook-response.js +12 -0
  147. package/dist/hooks/shared/hook-timing.js +9 -3
  148. package/dist/hooks/shared/injection-caps.d.ts +32 -2
  149. package/dist/hooks/shared/injection-caps.js +73 -2
  150. package/dist/hooks/shared/is-main.d.ts +8 -0
  151. package/dist/hooks/shared/is-main.js +20 -0
  152. package/dist/hooks/shared/tool-response.d.ts +6 -0
  153. package/dist/hooks/shared/tool-response.js +30 -0
  154. package/dist/hooks/slop-detector.js +6 -3
  155. package/dist/hooks/solution-injector.d.ts +23 -0
  156. package/dist/hooks/solution-injector.js +102 -101
  157. package/dist/hooks/stop-guard.d.ts +11 -1
  158. package/dist/hooks/stop-guard.js +28 -11
  159. package/dist/hooks/subagent-stop-guard.js +2 -1
  160. package/dist/hooks/subagent-tracker.js +2 -1
  161. package/dist/host/capabilities-codex.js +1 -0
  162. package/dist/host/claude-shim.d.ts +24 -0
  163. package/dist/host/claude-shim.js +68 -0
  164. package/dist/host/codex-hook-shim.d.ts +3 -1
  165. package/dist/host/codex-hook-shim.js +7 -5
  166. package/dist/host/codex-notify.js +1 -1
  167. package/dist/host/codex-rules-context.d.ts +6 -4
  168. package/dist/host/codex-rules-context.js +11 -24
  169. package/dist/host/exec-host.d.ts +5 -1
  170. package/dist/host/exec-host.js +15 -4
  171. package/dist/host/install-claude.d.ts +47 -14
  172. package/dist/host/install-claude.js +302 -155
  173. package/dist/host/install-codex.d.ts +20 -0
  174. package/dist/host/install-codex.js +32 -1
  175. package/dist/host/install-opencode.d.ts +3 -1
  176. package/dist/host/install-opencode.js +6 -3
  177. package/dist/host/install-orchestrator.js +14 -1
  178. package/dist/host/opencode/translate.d.ts +1 -1
  179. package/dist/host/opencode/translate.js +5 -3
  180. package/dist/host/projection.d.ts +9 -1
  181. package/dist/host/projection.js +19 -2
  182. package/dist/mcp/server.js +5 -0
  183. package/dist/mcp/solution-reader.d.ts +5 -5
  184. package/dist/mcp/solution-reader.js +13 -35
  185. package/dist/mcp/tools.js +18 -1
  186. package/dist/renderer/inspect-renderer.js +4 -2
  187. package/dist/renderer/render-report.d.ts +22 -0
  188. package/dist/renderer/render-report.js +29 -0
  189. package/dist/renderer/rule-renderer.d.ts +28 -2
  190. package/dist/renderer/rule-renderer.js +91 -76
  191. package/dist/store/evidence-store.js +34 -6
  192. package/dist/store/rule-lifecycle.d.ts +3 -1
  193. package/dist/store/rule-lifecycle.js +10 -0
  194. package/dist/store/rule-scope.d.ts +7 -0
  195. package/dist/store/rule-scope.js +54 -0
  196. package/dist/store/rule-store.d.ts +29 -3
  197. package/dist/store/rule-store.js +110 -26
  198. package/dist/store/types.d.ts +22 -2
  199. package/dist/way/cli.d.ts +1 -0
  200. package/dist/way/cli.js +313 -0
  201. package/dist/way/compile.d.ts +22 -0
  202. package/dist/way/compile.js +408 -0
  203. package/dist/way/conflict.d.ts +2 -0
  204. package/dist/way/conflict.js +18 -0
  205. package/dist/way/draft.d.ts +43 -0
  206. package/dist/way/draft.js +335 -0
  207. package/dist/way/extract.d.ts +17 -0
  208. package/dist/way/extract.js +172 -0
  209. package/dist/way/io.d.ts +79 -0
  210. package/dist/way/io.js +425 -0
  211. package/dist/way/similar.d.ts +2 -0
  212. package/dist/way/similar.js +30 -0
  213. package/dist/way/types.d.ts +98 -0
  214. package/dist/way/types.js +2 -0
  215. package/package.json +1 -1
  216. package/plugin.json +1 -1
  217. package/scripts/postinstall.js +76 -899
  218. package/dist/core/health-cli.d.ts +0 -25
  219. package/dist/core/health-cli.js +0 -90
  220. package/dist/host/parity-harness.d.ts +0 -70
  221. package/dist/host/parity-harness.js +0 -287
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://claude.ai/schemas/claude-plugin.json",
3
3
  "name": "forgen",
4
- "version": "0.6.8",
4
+ "version": "0.6.9",
5
5
  "description": "Claude Code harness — the more you use Claude, the better it gets",
6
6
  "author": {
7
7
  "name": "jang-ujin",
package/CHANGELOG.md CHANGED
@@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.6.9] — 2026-11-05 — 실사용 신뢰성 재정비
11
+
12
+ ### Added
13
+ - **`forgen rule recover`.** 예전 버전에서 활성 룰로 남지 못한 내 교정을 찾아 골라서 복구한다. 업그레이드 때 건수를 안내한다.
14
+ - **`forgen way draft skill|workflow "<주제>"`.** 주제와 관련된 룰·솔루션·교정 원문을 모아 격리된 Haiku 중첩 호출로 SKILL.md(또는 호스트 중립 단계 체크리스트) 초안을 쓴다. 미리보기가 기본, `--out` 일 때만 파일. 근거 항목 id 는 옆 파일(SOURCES.md), 전송 전 비밀 마스킹·`<private>` 제외, Haiku 불가 시 관련 항목 묶음을 사유와 함께 출력.
15
+
16
+ ### Fixed
17
+ - **교정 승급.** 모델이 넘긴 세션 ID 가 실제와 달라도 prefer-from-now·avoid-this 교정이 영구 룰이 된다. 세션 시작에서도 승급해 12시간 정리로 사라지지 않는다. 프로젝트가 다른 같은 교정이 합쳐질 때 범위를 잃지 않는다.
18
+ - 업그레이드 시 이미 등록된 sweep cron 을 shim 경유로 갱신한다(일정·옵션 유지). 옛 라인은 패키지 경로를 직접 가리켰다.
19
+ - 룰 본문에 없는 증거 파일 게이트(옛 분류기 산물)를 평가하지 않는다. 모든 완료 보고가 막히던 원인.
20
+ - **컨텍스트 거짓 경고.** context-guard 가 프롬프트 글자 수 120K 를 "컨텍스트 20%"로 보고 모델에게 "지금 즉시 /compact, 작업을 마무리하지 말고"를 주입하던 것을 없앴다. 이제 statusline 페이로드·transcript usage 의 창 대비 비율이 70% 이상일 때만 사용자에게 보이는 안내를 내고, 모르면 아무것도 하지 않는다.
21
+ - **동의어 사전 과적합.** 측정 픽스처에 맞춘 낱말(막혔는지·내려받·목객체·json.parse·presign 등)과 넓은 계열(access·permission·limit·rate·store·변경 등)을 뺐다. 보류(holdout) 세트 tests/fixtures/recall-holdout.json 추가.
22
+ - **acted_on.** 2글자 한글 태그, camelCase/snake_case 표기, 팩·프로젝트 솔루션을 인식. 신호가 약한 기간(전체 acted_on 3건 미만)에는 lifecycle 이 주입된 솔루션을 전부 cold 로 분류하지 않는다.
23
+ - **`retag --apply`** 는 `updated` 를 바꾸지 않고 본문에 없는 수동 태그를 보존하며 적용 전 스냅샷을 만든다. **`habits --apply`** 는 `extractedBy: auto` 표식이 있는 것만 옮기고 기존 behavior 를 덮어쓰지 않으며 스냅샷과 되돌리기 명령을 보여 준다.
24
+ - **reopen.** 이름만 같고 내용이 다르면 복귀시키지 않고 새 추출을 보존한다. verified/mature 등급 유지, 사유 미상 은퇴는 negative 증거 초기화, 팩·프로젝트 솔루션 포함.
25
+ - **게이트 분포.** matched 이벤트의 5분 중복 제거와 별도로 `gate_verdicts` 에 프롬프트마다 기록해 분포를 센다.
26
+
10
27
  ## [0.6.8] — 2026-10-07 — mock 룰 표 행 오탐 수정
11
28
 
12
29
  ### Fixed
package/README.ja.md CHANGED
@@ -172,7 +172,7 @@ Claude が `correction-record` MCP ツールを呼び出します。修正は、
172
172
 
173
173
  **Always on(決定論的、egress 0):** 明示的な修正は恒久ルールに昇格し、ほぼ重複する修正はクラスタリングされて強化され、蓄積されたエビデンスからファセットが微調整されます。時間ベースの `compound sweep` バックストップ(オプションで cron)が、長いセッションや中断されたセッションでもその学習が失われないようにします。
174
174
 
175
- **Opt-in(`forgen compound consent on`):** バックグラウンドの Haiku パスがセッション transcript の*redaction 済みサマリー*を読み、再利用可能なソリューション、行動観察、そして上記の柔らかい修正を抽出します。これは**デフォルト off** です — あなたがオンにしない限り、forgen はあなたの会話をどこにも送信せず、送信前に secret / `<private>` 範囲は除去されます。`forgen doctor` が常に現在の状態を表示します。
175
+ **デフォルト ON(`forgen compound consent off` で無効化):** バックグラウンドの Haiku パスがセッション transcript の*サマリー*(あなたの発言とアシスタントの返答。返答にはアシスタントが読んだファイル内容の一部が含まれることがあります)を読み、再利用可能なソリューション、行動観察、そして上記の柔らかい修正を抽出します。送信前に secret はマスクされ `<private>` 範囲は除外され、送信先は自分のアカウントの Claude Haiku のみです。`ANTHROPIC_API_KEY` が設定されている場合はその API アカウントに課金されます。最初のセッションで一度だけ通知が表示され、`forgen status`・`forgen doctor` が現在の状態と本日の呼び出し数を表示します。
176
176
 
177
177
  修正が継続的に現在のパックと異なる方向を指している場合、3セッション後にミスマッチ検出がトリガーされ、パック変更を提案します。
178
178
 
@@ -222,7 +222,7 @@ forgen のホームはデフォルト `~/.forgen` ですが、プロセス毎に
222
222
  ```bash
223
223
  # クリーンな隔離ホーム — 実 ~/.forgen は触らない
224
224
  FORGEN_HOME=/tmp/forgen-clean forgen init # starter-pack 15件を自動配置
225
- FORGEN_HOME=/tmp/forgen-clean forgen stats # 隔離ホームの統計のみ表示
225
+ FORGEN_HOME=/tmp/forgen-clean forgen status # 隔離ホームの統計のみ表示
226
226
  FORGEN_HOME=/tmp/forgen-clean claude -p "…" # フックが env を継承 → ログ隔離
227
227
  ```
228
228
 
@@ -243,7 +243,7 @@ env を使ってください。ホスト環境 (macOS/Linux ワークステー
243
243
 
244
244
  ### マイグレーション
245
245
 
246
- `forgen migrate implicit-feedback` — pre-v0.4.1 ログの `category` フィールド
246
+ `forgen dev migrate implicit-feedback` — pre-v0.4.1 ログの `category` フィールド
247
247
  バックフィル。冪等 (idempotent) — 複数回実行しても安全。
248
248
 
249
249
  ---
@@ -309,7 +309,7 @@ env を使ってください。ホスト環境 (macOS/Linux ワークステー
309
309
  v |
310
310
  +------------------+ |
311
311
  | セッション終了 | corrections -> rules (常時, egress 0) |
312
- | | transcript 抽出: opt-in (Haiku) |
312
+ | | transcript 抽出: デフォルト ON (Haiku) |
313
313
  +--------+---------+ |
314
314
  | |
315
315
  v |
@@ -509,7 +509,7 @@ forgen --resume # 前回のセッションを再開
509
509
  ### パーソナライゼーション
510
510
 
511
511
  ```bash
512
- forgen onboarding # 4問オンボーディングを実行
512
+ forgen forge --onboarding # 4問オンボーディングを実行
513
513
  forgen forge --profile # 現在のプロファイルを表示
514
514
  forgen forge --reset soft # プロファイルをリセット (soft / learning / full)
515
515
  forgen forge --export # プロファイルをエクスポート
@@ -518,14 +518,14 @@ forgen forge --export # プロファイルをエクスポート
518
518
  ### 状態確認
519
519
 
520
520
  ```bash
521
- forgen stats # 1画面 Trust Layer ダッシュボード (ルール・修正・block 7日)
522
- forgen last-block # 直近のブロックイベント詳細
521
+ forgen status # 1画面 Trust Layer ダッシュボード (ルール・修正・block 7日)
522
+ forgen status --blocks # 直近のブロックイベント詳細
523
523
  forgen inspect profile # 4軸プロファイル + パック + ファセット
524
524
  forgen inspect rules # アクティブ/抑制されたルール
525
525
  forgen inspect corrections # 修正履歴 (alias: evidence)
526
526
  forgen inspect session # 現在のセッション状態
527
527
  forgen inspect violations # 最近のブロック記録 (--last N)
528
- forgen me # パーソナルダッシュボード(inspect profile のショートカット)
528
+ forgen status --profile # パーソナルダッシュボード(inspect profile のショートカット)
529
529
  ```
530
530
 
531
531
  ### ルール管理
@@ -564,8 +564,13 @@ forgen compound --lifecycle # 昇格/降格チェックを実行
564
564
  forgen compound --verify <名前> # 手動で verified に昇格
565
565
  forgen compound export # 知識を tar.gz でエクスポート
566
566
  forgen compound import <パス> # 知識アーカイブをインポート
567
- forgen skill promote <名前> # 検証済みソリューションをスキルに昇格
567
+ forgen skill promote <名前> # 検証済みソリューションを標準 SKILL.md に昇格 (--install → ~/.claude/skills)
568
568
  forgen skill list # 昇格されたスキルの一覧
569
+ forgen way # 自分のやり方を1画面で (自分の言葉 vs 推論、強制 vs 助言)
570
+ forgen way export --target agents-md # AGENTS.md | claude-rules | skill | system-prompt | gemini | cursor | workflow | json へ出力 (プレビュー、--out <dir> で書き込み)
571
+ forgen way import way.json --apply # 編集内容をルールに反映
572
+ forgen way collect-memory # Claude メモリ feedback_*.md をルール候補として読む
573
+ forgen way draft skill "<トピック>" # トピックに関連するルール・ソリューション・訂正原文から SKILL.md の下書きを作成 (`workflow`: ホスト中立チェックリスト)。隔離した Haiku 呼び出し、既定はプレビュー、--out <dir> で書き込み (根拠ファイル付き)、Haiku 不可なら関連項目の束を出力
569
574
  ```
570
575
 
571
576
  ### システム
@@ -573,7 +578,7 @@ forgen skill list # 昇格されたスキルの一覧
573
578
  ```bash
574
579
  forgen init # プロジェクトを初期化
575
580
  forgen doctor # システム診断(10カテゴリ + ハーネス成熟度)
576
- forgen dashboard # 知識概要(6セクション)
581
+ forgen status --overview # 知識概要(6セクション)
577
582
  forgen config hooks # フック状態 + コンテキストバジェットを確認
578
583
  forgen config hooks --regenerate # フックを再生成
579
584
  forgen mcp list # インストール済み MCP サーバーを一覧
package/README.ko.md CHANGED
@@ -132,7 +132,7 @@ Claude가 `correction-record` MCP 도구를 호출합니다. 교정은 축 분
132
132
 
133
133
  **Always on (결정론적, egress 0):** 명시적 교정은 영구 규칙으로 승급되고, 거의 중복인 교정은 클러스터링되어 강화되며, 축적된 evidence로 facet이 미세 조정됩니다. 시간 기반 `compound sweep` backstop(선택적으로 cron)이 길거나 중단된 세션에서도 그 학습이 유실되지 않게 보장합니다.
134
134
 
135
- **Opt-in (`forgen compound consent on`):** 백그라운드 Haiku 패스가 세션 transcript의 *redaction된 요약*을 읽어 재사용 가능한 솔루션, 행동 관찰, 그리고 위의 완곡한 교정을 추출합니다. 이것은 **기본 off** 입니다 — 당신이 켜지 않는 한 forgen은 당신의 대화를 어디로도 보내지 않으며, 전송 전에 secret / `<private>` 범위는 제거됩니다. `forgen doctor` 가 항상 현재 상태를 보여줍니다.
135
+ **기본 ON (`forgen compound consent off` 로 끔):** 백그라운드 Haiku 패스가 세션 transcript의 *요약*(내 발화와 어시스턴트 발화 — 어시스턴트가 읽은 파일 내용의 일부가 섞일 수 있음)을 읽어 재사용 가능한 솔루션, 행동 관찰, 그리고 위의 완곡한 교정을 추출합니다. 전송 전에 비밀키는 마스킹하고 `<private>` 범위는 제외하며, 내 계정의 Claude Haiku 로만 보냅니다. `ANTHROPIC_API_KEY` 가 설정돼 있으면 그 API 계정으로 과금됩니다. 첫 세션에 안내가 한 번 나오고, `forgen status`·`forgen doctor` 가 현재 상태와 오늘 호출 수를 보여줍니다.
136
136
 
137
137
  교정이 지속적으로 현재 팩과 다른 방향을 가리키면, 3세션 후 mismatch 감지가 트리거되어 팩 변경을 추천합니다.
138
138
 
@@ -182,7 +182,7 @@ forgen 홈은 기본 `~/.forgen` 이지만 프로세스별 override 가능:
182
182
  ```bash
183
183
  # 깨끗한 격리 홈 — 실제 ~/.forgen 은 건드리지 않음
184
184
  FORGEN_HOME=/tmp/forgen-clean forgen init # starter-pack 15개 자동 배포
185
- FORGEN_HOME=/tmp/forgen-clean forgen stats # 격리 홈의 통계만 표시
185
+ FORGEN_HOME=/tmp/forgen-clean forgen status # 격리 홈의 통계만 표시
186
186
  FORGEN_HOME=/tmp/forgen-clean claude -p "…" # 훅이 env 상속 → 격리된 로그
187
187
  ```
188
188
 
@@ -203,7 +203,7 @@ Linux 컨테이너에서 `~/.claude.json` 만 마운트하면 refresh 토큰이
203
203
 
204
204
  ### 마이그레이션
205
205
 
206
- `forgen migrate implicit-feedback` — pre-v0.4.1 로그의 `category` 필드 백필.
206
+ `forgen dev migrate implicit-feedback` — pre-v0.4.1 로그의 `category` 필드 백필.
207
207
  멱등(idempotent) — 여러 번 실행 안전.
208
208
 
209
209
  ---
@@ -269,7 +269,7 @@ Linux 컨테이너에서 `~/.claude.json` 만 마운트하면 refresh 토큰이
269
269
  v |
270
270
  +------------------+ |
271
271
  | 세션 종료 | corrections -> rules (항상, egress 0) |
272
- | | transcript 추출: opt-in (Haiku) |
272
+ | | transcript 추출: 기본 ON (Haiku) |
273
273
  +--------+---------+ |
274
274
  | |
275
275
  v |
@@ -494,7 +494,7 @@ forgen --resume # 이전 세션 이어서
494
494
  ### 개인화
495
495
 
496
496
  ```bash
497
- forgen onboarding # 4문항 온보딩 실행
497
+ forgen forge --onboarding # 4문항 온보딩 실행
498
498
  forgen forge --profile # 현재 프로필 확인
499
499
  forgen forge --reset soft # 프로필 초기화 (soft / learning / full)
500
500
  forgen forge --export # 프로필 내보내기
@@ -503,14 +503,14 @@ forgen forge --export # 프로필 내보내기
503
503
  ### 상태 확인
504
504
 
505
505
  ```bash
506
- forgen stats # 한 화면 Trust Layer 대시보드 (규칙·교정·block 7일)
507
- forgen last-block # 가장 최근 block 이벤트와 rule 상세
506
+ forgen status # 한 화면 Trust Layer 대시보드 (규칙·교정·block 7일)
507
+ forgen status --blocks # 가장 최근 block 이벤트와 rule 상세
508
508
  forgen inspect profile # 4축 프로필 + 팩 + facet
509
509
  forgen inspect rules # 활성/비활성 규칙
510
510
  forgen inspect corrections # 교정 기록 (alias: evidence)
511
511
  forgen inspect session # 현재 세션 상태
512
512
  forgen inspect violations # 최근 block 기록 (--last N)
513
- forgen me # 개인 대시보드 (inspect profile 단축키)
513
+ forgen status --profile # 개인 대시보드 (inspect profile 단축키)
514
514
  ```
515
515
 
516
516
  ### 규칙 관리
@@ -549,8 +549,13 @@ forgen compound --lifecycle # 승격/강등 검사 실행
549
549
  forgen compound --verify <이름> # 수동으로 verified 승격
550
550
  forgen compound export # 지식을 tar.gz로 내보내기
551
551
  forgen compound import <경로> # 지식 아카이브 가져오기
552
- forgen skill promote <이름> # 검증된 솔루션을 스킬로 승격
552
+ forgen skill promote <이름> # 검증된 솔루션을 표준 SKILL.md 로 승격 (--install → ~/.claude/skills)
553
553
  forgen skill list # 승격된 스킬 목록
554
+ forgen way # 내 방식을 한 화면에 (내가 말한 규칙 vs 추론, 강제 vs 자문)
555
+ forgen way export --target agents-md # AGENTS.md | claude-rules | skill | system-prompt | gemini | cursor | workflow | json 으로 내보내기 (미리보기, --out <dir> 로 쓰기)
556
+ forgen way import way.json --apply # 고친 내용을 룰에 반영
557
+ forgen way collect-memory # Claude 메모리 feedback_*.md 를 룰 후보로 읽기
558
+ forgen way draft skill "<주제>" # 주제와 관련된 룰·솔루션·교정 원문으로 SKILL.md 초안 작성 (`workflow`: 호스트 중립 체크리스트). 격리된 Haiku 호출, 미리보기 기본, --out <dir> 로 쓰면 근거 파일이 옆에 생김, Haiku 불가 시 관련 항목 묶음 출력
554
559
  ```
555
560
 
556
561
  ### 시스템
@@ -558,7 +563,7 @@ forgen skill list # 승격된 스킬 목록
558
563
  ```bash
559
564
  forgen init # 프로젝트 초기화
560
565
  forgen doctor # 시스템 진단 (10개 항목 + 하네스 성숙도)
561
- forgen dashboard # 지식 현황 대시보드 (6개 섹션)
566
+ forgen status --overview # 지식 현황 대시보드 (6개 섹션)
562
567
  forgen config hooks # 훅 상태 + 컨텍스트 예산 확인
563
568
  forgen config hooks --regenerate # 훅 재생성
564
569
  forgen mcp list # 설치된 MCP 서버 목록
package/README.md CHANGED
@@ -225,7 +225,7 @@ Softer corrections you never explicitly flag ("음… 이렇게 최소로만 짜
225
225
 
226
226
  **Always on (deterministic, zero egress):** your explicit corrections promote to permanent rules; near-duplicate corrections cluster and strengthen; facets micro-adjust from accumulated evidence; a time-based `compound sweep` backstop (optionally on cron) makes sure long or interrupted sessions don't lose that learning.
227
227
 
228
- **Opt-in (`forgen compound consent on`):** a background Haiku pass reads a *redacted summary* of the session transcript to extract reusable solutions, behavioral observations, and the softer corrections above. This is **off by default** — forgen does not send your conversations anywhere unless you turn it on, and secrets / `<private>` ranges are stripped before anything is sent. `forgen doctor` always shows the current state.
228
+ **On by default (`forgen compound consent off` to disable):** a background Haiku pass reads a *redacted summary* of the session transcript — your messages and the assistant's replies (replies can include fragments of files the assistant read) — to extract reusable solutions, behavioral observations, and the softer corrections above. Secrets are masked and `<private>` ranges are excluded before anything is sent; it goes only to the Claude Haiku on your own account. If `ANTHROPIC_API_KEY` is set, those calls are billed to that API account. A one-time notice appears in your first session; `forgen status` and `forgen doctor` always show the current state and today's call count.
229
229
 
230
230
  If your corrections consistently point away from your current pack, mismatch detection triggers after 3 sessions and recommends a pack change.
231
231
 
@@ -273,7 +273,7 @@ forgen doctor --quick
273
273
 
274
274
  > **Vendor dependency:** Forgen wraps Claude Code and Codex CLI symmetrically (Claude is the behavior reference; Codex extends with equivalence). Upstream API/CLI changes may affect behavior. Tested with Claude Code 1.0.x / 2.1.x and Codex 0.x.
275
275
 
276
- > **Upgrading from v0.4.x?** Run `forgen install claude` (or `codex` / `both`) after upgrading — v0.4.3+ requires explicit host registration. Then run `forgen migrate tenetx --dry-run` to preview and reclaim legacy global rule sprawl (v0.5.0 moved ALL rule injection to project scope — stale `~/.claude/rules/forge-*.md` from older versions should be reclaimed; see CHANGELOG). Finally `forgen doctor --quick` to verify.
276
+ > **Upgrading from v0.4.x?** Run `forgen install claude` (or `codex` / `both`) after upgrading — v0.4.3+ requires explicit host registration. Then run `forgen dev migrate tenetx --dry-run` to preview and reclaim legacy global rule sprawl (v0.5.0 moved ALL rule injection to project scope — stale `~/.claude/rules/forge-*.md` from older versions should be reclaimed; see CHANGELOG). Finally `forgen doctor --quick` to verify.
277
277
 
278
278
  ### Try your first block
279
279
 
@@ -306,7 +306,7 @@ Forgen's home directory is `~/.forgen` by default, but can be overridden per-pro
306
306
  ```bash
307
307
  # Fresh isolated home — does NOT touch your real ~/.forgen
308
308
  FORGEN_HOME=/tmp/forgen-clean forgen init # provisions 15-solution starter pack
309
- FORGEN_HOME=/tmp/forgen-clean forgen stats # shows stats from the isolated home
309
+ FORGEN_HOME=/tmp/forgen-clean forgen status # shows stats from the isolated home
310
310
  FORGEN_HOME=/tmp/forgen-clean claude -p "..." # hooks inherit the env → isolated logs
311
311
  ```
312
312
 
@@ -328,7 +328,7 @@ needed.
328
328
 
329
329
  ### Migrations
330
330
 
331
- `forgen migrate implicit-feedback` backfills the `category` field on pre-v0.4.1
331
+ `forgen dev migrate implicit-feedback` backfills the `category` field on pre-v0.4.1
332
332
  entries in `~/.forgen/state/implicit-feedback.jsonl`. Idempotent — safe to re-run.
333
333
 
334
334
  ---
@@ -394,7 +394,7 @@ entries in `~/.forgen/state/implicit-feedback.jsonl`. Idempotent — safe to re-
394
394
  v |
395
395
  +------------------+ |
396
396
  | Session Ends | corrections -> rules (always, egress 0) |
397
- | | transcript extract: opt-in (Haiku) |
397
+ | | transcript extract: default on (Haiku) |
398
398
  +--------+---------+ |
399
399
  | |
400
400
  v |
@@ -689,7 +689,7 @@ forgen --resume # Resume previous session
689
689
  ### Personalization
690
690
 
691
691
  ```bash
692
- forgen onboarding # Run 4-question onboarding
692
+ forgen forge --onboarding # Run 4-question onboarding
693
693
  forgen forge --profile # View current profile
694
694
  forgen forge --reset soft # Reset profile (soft / learning / full)
695
695
  forgen forge --export # Export profile
@@ -698,16 +698,16 @@ forgen forge --export # Export profile
698
698
  ### Inspection
699
699
 
700
700
  ```bash
701
- forgen stats # Trust-layer dashboard (rules, corrections, blocks 7d, assist today, philosophy)
702
- forgen recall [--limit N] [--show]
701
+ forgen status # Trust-layer dashboard (rules, corrections, blocks 7d, assist today, philosophy)
702
+ forgen status --compound [--limit N] [--show]
703
703
  # Recent compound recalls surfaced to Claude (with body preview)
704
- forgen last-block # Most recent block event with rule detail
704
+ forgen status --blocks # Most recent block event with rule detail
705
705
  forgen inspect profile # 4-axis profile with packs and facets
706
706
  forgen inspect rules # Active and suppressed rules
707
707
  forgen inspect corrections # Correction history (alias: evidence)
708
708
  forgen inspect session # Current session state
709
709
  forgen inspect violations # Recent block events (--last N)
710
- forgen me # Personal dashboard (shortcut for inspect profile)
710
+ forgen status --profile # Personal dashboard (shortcut for inspect profile)
711
711
  ```
712
712
 
713
713
  ### Rule management
@@ -746,20 +746,25 @@ forgen compound --lifecycle # Run promotion/demotion check
746
746
  forgen compound --verify <name> # Manually promote to verified
747
747
  forgen compound export # Export knowledge as tar.gz
748
748
  forgen compound import <path> # Import knowledge archive
749
- forgen skill promote <name> # Promote a verified solution to a skill
749
+ forgen skill promote <name> # Promote a verified solution to a standard SKILL.md (--install → ~/.claude/skills)
750
750
  forgen skill list # List promoted skills
751
+ forgen way # Your way of working on one screen (rules you said vs inferred, enforced vs advisory)
752
+ forgen way export --target agents-md # Export to AGENTS.md | claude-rules | skill | system-prompt | gemini | cursor | workflow | json (preview; --out <dir> to write)
753
+ forgen way import way.json --apply # Round-trip your edits back into rules
754
+ forgen way collect-memory # Read Claude memory feedback_*.md as rule candidates
755
+ forgen way draft skill "<topic>" # Draft a SKILL.md (or `workflow`: host-neutral checklist) from related rules/solutions/corrections with an isolated Haiku call (preview; --out <dir> writes it + a sources file; falls back to a plain bundle when Haiku is unavailable)
751
756
  ```
752
757
 
753
758
  ### System
754
759
 
755
760
  ```bash
756
761
  forgen init # Initialize project (+ 15 starter-pack solutions)
757
- forgen migrate [implicit-feedback|evidence-host|tenetx|all]
762
+ forgen dev migrate [implicit-feedback|evidence-host|tenetx|all]
758
763
  # One-shot migrations (idempotent). tenetx: reclaim
759
764
  # legacy global rules (--dry-run/--yes/--apply-settings)
760
- forgen doctor # Forgen-specific diagnostics (plugin cache, hooks, state, parity, gates — env health: native /doctor)
765
+ forgen doctor # Forgen-specific diagnostics (shim → hook/MCP/statusLine real execution, data files, state, gates — env health: native /doctor)
761
766
  forgen doctor --prune-state # Daily hygiene: state GC + T4 rule decay (90d idle → retire)
762
- forgen dashboard # Knowledge overview (6 sections)
767
+ forgen status --overview # Knowledge overview (6 sections)
763
768
  forgen config hooks # View hook status + context budget
764
769
  forgen config hooks --regenerate # Regenerate hooks
765
770
  forgen mcp list # List installed MCP servers
package/README.zh.md CHANGED
@@ -172,7 +172,7 @@ Claude 调用 `correction-record` MCP 工具。纠正作为结构化证据存储
172
172
 
173
173
  **Always on(确定性,egress 0):** 你的明确纠正晋升为永久规则; 近乎重复的纠正被聚类并强化; facet 基于累积证据微调; 一个基于时间的 `compound sweep` 兜底机制(可选择挂到 cron)确保漫长或被中断的会话不会丢失这些学习。
174
174
 
175
- **Opt-in(`forgen compound consent on`):** 后台的 Haiku 通道读取会话 transcript 的*脱敏(redacted)摘要*,提取可复用的解决方案、行为观察,以及上述柔性纠正。它**默认关闭** —— 除非你开启,否则 forgen 不会把你的对话发送到任何地方,且在发送前会剥离 secret / `<private>` 区间。`forgen doctor` 始终显示当前状态。
175
+ **默认开启(用 `forgen compound consent off` 关闭):** 后台的 Haiku 通道读取会话 transcript 的*摘要*(你的发言和助手的回复;回复中可能包含助手所读文件内容的片段),提取可复用的解决方案、行为观察,以及上述柔性纠正。发送前会屏蔽 secret 并排除 `<private>` 区间,且只发送到你自己账户的 Claude Haiku。若设置了 `ANTHROPIC_API_KEY`,这些调用会计入该 API 账户。首次会话会显示一次通知;`forgen status` 和 `forgen doctor` 始终显示当前状态和今日调用次数。
176
176
 
177
177
  如果你的纠正持续指向与当前 pack 不同的方向,3个会话后触发不匹配检测,推荐更换 pack。
178
178
 
@@ -278,7 +278,7 @@ forgen config default-host codex # 设置持久默认主机
278
278
  v |
279
279
  +------------------+ |
280
280
  | 会话结束 | corrections -> rules (始终, egress 0) |
281
- | | transcript 提取: opt-in (Haiku) |
281
+ | | transcript 提取: 默认开启 (Haiku) |
282
282
  +--------+---------+ |
283
283
  | |
284
284
  v |
@@ -478,7 +478,7 @@ forgen --resume # 恢复上一个会话
478
478
  ### 个性化
479
479
 
480
480
  ```bash
481
- forgen onboarding # 运行4题引导问卷
481
+ forgen forge --onboarding # 运行4题引导问卷
482
482
  forgen forge --profile # 查看当前档案
483
483
  forgen forge --reset soft # 重置档案 (soft / learning / full)
484
484
  forgen forge --export # 导出档案
@@ -487,14 +487,14 @@ forgen forge --export # 导出档案
487
487
  ### 状态查看
488
488
 
489
489
  ```bash
490
- forgen stats # 单屏 Trust Layer 仪表盘 (规则·纠正·block 7天)
491
- forgen last-block # 最近一次拦截事件详情
490
+ forgen status # 单屏 Trust Layer 仪表盘 (规则·纠正·block 7天)
491
+ forgen status --blocks # 最近一次拦截事件详情
492
492
  forgen inspect profile # 4轴档案 + pack + facet
493
493
  forgen inspect rules # 活跃/抑制的规则
494
494
  forgen inspect corrections # 纠正历史 (alias: evidence)
495
495
  forgen inspect session # 当前会话状态
496
496
  forgen inspect violations # 最近的拦截记录 (--last N)
497
- forgen me # 个人仪表盘(inspect profile 的快捷方式)
497
+ forgen status --profile # 个人仪表盘(inspect profile 的快捷方式)
498
498
  ```
499
499
 
500
500
  ### 规则管理
@@ -533,8 +533,13 @@ forgen compound --lifecycle # 运行晋升/降级检查
533
533
  forgen compound --verify <名称> # 手动晋升为 verified
534
534
  forgen compound export # 将知识导出为 tar.gz
535
535
  forgen compound import <路径> # 导入知识归档
536
- forgen skill promote <名称> # 将已验证的解决方案晋升为技能
536
+ forgen skill promote <名称> # 将已验证的解决方案晋升为标准 SKILL.md (--install → ~/.claude/skills)
537
537
  forgen skill list # 列出已晋升的技能
538
+ forgen way # 一屏查看你的工作方式 (你说过的规则 vs 推断, 强制 vs 建议)
539
+ forgen way export --target agents-md # 导出为 AGENTS.md | claude-rules | skill | system-prompt | gemini | cursor | workflow | json (预览, --out <dir> 写入)
540
+ forgen way import way.json --apply # 将你的修改写回规则
541
+ forgen way collect-memory # 读取 Claude 记忆 feedback_*.md 作为规则候选
542
+ forgen way draft skill "<主题>" # 用与主题相关的规则·方案·纠正原文起草 SKILL.md (`workflow`: 与宿主无关的清单)。隔离的 Haiku 调用, 默认预览, --out <dir> 写入 (旁边生成依据文件), Haiku 不可用时输出相关条目合集
538
543
  ```
539
544
 
540
545
  ### 系统
@@ -542,7 +547,7 @@ forgen skill list # 列出已晋升的技能
542
547
  ```bash
543
548
  forgen init # 初始化项目
544
549
  forgen doctor # 系统诊断(10个类别 + 引擎成熟度)
545
- forgen dashboard # 知识概览(6个板块)
550
+ forgen status --overview # 知识概览(6个板块)
546
551
  forgen config hooks # 查看钩子状态 + 上下文预算
547
552
  forgen config hooks --regenerate # 重新生成钩子
548
553
  forgen mcp list # 列出已安装的 MCP 服务器
@@ -26,7 +26,8 @@ export interface DangerousResultMatch {
26
26
  matched?: string;
27
27
  reason: string;
28
28
  }
29
- /** 응답 텍스트가 파괴적 명령 패턴을 포함하는지 검사. */
29
+ export declare function extractSuggestedCommands(text: string): string;
30
+ /** 제안된 명령에 파괴적 명령 패턴이 있는지 검사. */
30
31
  export declare function checkDangerousResponsePattern(opts: {
31
32
  text: string;
32
33
  }): DangerousResultMatch;
@@ -23,7 +23,7 @@
23
23
  */
24
24
  import { compileSafeRegex, safeRegexTest } from '../hooks/shared/safe-regex.js';
25
25
  /**
26
- * 응답 텍스트에서 검사할 파괴적 명령 패턴.
26
+ * 응답이 제안한 명령에서 검사할 파괴적 명령 패턴.
27
27
  * dist/hooks/dangerous-patterns.json (PreToolUse 용) 와 별도 — 응답 텍스트
28
28
  * 분석에 적합한 더 넓은 패턴 (find -exec rm 같은 우회 포함).
29
29
  */
@@ -44,9 +44,33 @@ const RESPONSE_PATTERNS = [
44
44
  { pattern: '\\bcurl\\b[^\\n]{0,60}\\|\\s*(?:ba)?sh\\b', description: 'curl | sh (원격 코드 실행)', flags: 'i' },
45
45
  { pattern: '\\bwget\\b[^\\n]{0,60}\\|\\s*(?:ba)?sh\\b', description: 'wget | sh (원격 코드 실행)', flags: 'i' },
46
46
  ];
47
- /** 응답 텍스트가 파괴적 명령 패턴을 포함하는지 검사. */
47
+ /**
48
+ * 사용자가 그대로 실행할 수 있게 제안한 명령 부분: 코드 펜스 안과 `$ `·`# ` 프롬프트 줄.
49
+ * 그 밖의 줄은 실행을 권유하는 문장일 때만 포함한다. 설명·금지 속 언급은 제외한다. 실제 실행은 PreToolUse 가 막으므로, 언급을 막으면 안전 효과 없이
50
+ * "이런 명령은 위험하다"는 정상 답변까지 차단한다. 이 가드의 대상은 사용자가 복사해 실행할 제안이다.
51
+ */
52
+ const RUN_CUE = /\b(run|execute|try|use|alternative)\b|대안|실행(하세요|해\s*주세요|하시면|해\s*보세요|하면)|입력(하세요|하면)|치세요|돌리(세요|면)/i;
53
+ const NOT_A_SUGGESTION = /금지|안\s*됩|안\s*돼|않|하지\s*마|위험|차단(됩|합|했)|막(힙|습|았|혀)|날아|사라|오탐|예시|never|don'?t|do not|avoid|unsafe|dangerous/i;
54
+ export function extractSuggestedCommands(text) {
55
+ const out = [];
56
+ let inFence = false;
57
+ for (const line of text.split('\n')) {
58
+ if (/^\s*(```|~~~)/.test(line)) {
59
+ inFence = !inFence;
60
+ continue;
61
+ }
62
+ if (inFence)
63
+ out.push(line);
64
+ else if (/^\s*[$#]\s+\S/.test(line) && !/^\s*#\s+[^a-z/.~]/i.test(line))
65
+ out.push(line.replace(/^\s*[$#]\s+/, ''));
66
+ else if (RUN_CUE.test(line) && !NOT_A_SUGGESTION.test(line))
67
+ out.push(line);
68
+ }
69
+ return out.join('\n');
70
+ }
71
+ /** 제안된 명령에 파괴적 명령 패턴이 있는지 검사. */
48
72
  export function checkDangerousResponsePattern(opts) {
49
- const text = opts.text ?? '';
73
+ const text = extractSuggestedCommands(opts.text ?? '');
50
74
  if (!text.trim())
51
75
  return { block: false, reason: '' };
52
76
  for (const p of RESPONSE_PATTERNS) {