repo-harness 0.2.2 → 0.2.4

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 (65) hide show
  1. package/README.es.md +16 -17
  2. package/README.fr.md +17 -22
  3. package/README.ja.md +12 -14
  4. package/README.md +61 -62
  5. package/README.zh-CN.md +50 -45
  6. package/SKILL.md +49 -31
  7. package/assets/hooks/prompt-guard.sh +166 -3
  8. package/assets/initializer-question-pack.v4.json +81 -1
  9. package/assets/initializer-question-pack.v4.schema.json +36 -2
  10. package/assets/partials/04-project-structure.partial.md +10 -0
  11. package/assets/partials/06-cloudflare.partial.md +10 -5
  12. package/assets/partials-agents/07-cloudflare.partial.md +4 -5
  13. package/assets/plan-map.json +52 -7
  14. package/assets/project-structures/tanstack-start-workers.txt +51 -0
  15. package/assets/project-structures/vite-tanstack.txt +8 -1
  16. package/assets/reference-configs/agentic-development-flow.md +2 -2
  17. package/assets/reference-configs/development-protocol.md +2 -1
  18. package/assets/reference-configs/document-generation.md +1 -1
  19. package/assets/reference-configs/external-tooling.md +9 -8
  20. package/assets/reference-configs/harness-overview.md +1 -1
  21. package/assets/reference-configs/release-deploy.md +20 -2
  22. package/assets/skill-commands/manifest.json +3 -3
  23. package/assets/skill-commands/repo-harness-architecture/SKILL.md +7 -1
  24. package/assets/skill-commands/repo-harness-autoplan/SKILL.md +10 -0
  25. package/assets/skill-commands/repo-harness-capability/SKILL.md +6 -0
  26. package/assets/skill-commands/repo-harness-check/SKILL.md +18 -1
  27. package/assets/skill-commands/repo-harness-deploy/SKILL.md +6 -0
  28. package/assets/skill-commands/repo-harness-handoff/SKILL.md +6 -0
  29. package/assets/skill-commands/repo-harness-init/SKILL.md +9 -3
  30. package/assets/skill-commands/repo-harness-migrate/SKILL.md +10 -0
  31. package/assets/skill-commands/repo-harness-plan/SKILL.md +6 -0
  32. package/assets/skill-commands/repo-harness-repair/SKILL.md +6 -0
  33. package/assets/skill-commands/repo-harness-review/SKILL.md +6 -0
  34. package/assets/skill-commands/repo-harness-scaffold/SKILL.md +8 -2
  35. package/assets/skill-commands/repo-harness-ship/SKILL.md +10 -0
  36. package/assets/skill-commands/repo-harness-upgrade/SKILL.md +10 -0
  37. package/assets/templates/helpers/check-agent-tooling.sh +9 -2
  38. package/assets/templates/helpers/check-task-workflow.sh +49 -0
  39. package/assets/templates/helpers/codex-handoff-resume.sh +2 -4
  40. package/assets/templates/helpers/prepare-codex-handoff.sh +1 -1
  41. package/assets/templates/helpers/prepare-handoff.sh +6 -0
  42. package/assets/templates/tech-stack.template.md +14 -0
  43. package/docs/reference-configs/agentic-development-flow.md +2 -2
  44. package/docs/reference-configs/development-protocol.md +2 -1
  45. package/docs/reference-configs/document-generation.md +1 -1
  46. package/docs/reference-configs/external-tooling.md +9 -8
  47. package/docs/reference-configs/harness-overview.md +1 -1
  48. package/docs/reference-configs/release-deploy.md +20 -2
  49. package/package.json +2 -2
  50. package/scripts/assemble-template.ts +153 -6
  51. package/scripts/check-agent-tooling.sh +9 -2
  52. package/scripts/check-npm-release.sh +6 -1
  53. package/scripts/check-task-workflow.sh +49 -0
  54. package/scripts/codex-handoff-resume.sh +2 -4
  55. package/scripts/initializer-question-pack.ts +26 -0
  56. package/scripts/prepare-codex-handoff.sh +1 -1
  57. package/scripts/prepare-handoff.sh +6 -0
  58. package/scripts/repo-harness.sh +5 -7
  59. package/scripts/run-skill-evals.ts +51 -0
  60. package/scripts/setup-plugins.sh +40 -947
  61. package/src/cli/commands/brain-root.ts +30 -0
  62. package/src/cli/commands/global-runtime.ts +261 -54
  63. package/src/cli/commands/init.ts +1 -1
  64. package/src/cli/commands/status.ts +1 -1
  65. package/src/cli/index.ts +38 -32
package/README.es.md CHANGED
@@ -187,13 +187,11 @@ npx -y repo-harness init
187
187
  ```
188
188
 
189
189
  La npm package release line es ahora `0.2.x`; el workflow compatibility model line
190
- generado se rastrea por separado como `5.x`. `repo-harness@0.2.1` separa el
191
- bootstrap global inicial (`repo-harness init`) del refresco repo-local
192
- (`repo-harness update`), conserva el instalador global de plugin/hook
193
- (`scripts/setup-plugins.sh`), el centinela de seguridad de configuración de solo
194
- lectura (`repo-harness security scan`), el ciclo de vida draft-plan explícito de
195
- Claude/Codex y añade inicialización no bloqueante del índice CodeGraph para el
196
- routing estructural de prompts.
190
+ generado se rastrea por separado como `5.x`. `repo-harness init` es el bootstrap
191
+ global y `repo-harness update` es el refresco repo-local. `repo-harness init`
192
+ configura el CLI, los hook adapters de nivel usuario, Waza, Mermaid, el brain
193
+ root y CodeGraph MCP; el viejo camino Claude plugin `scripts/setup-plugins.sh`
194
+ queda retirado.
197
195
 
198
196
  Si trabajas desde un checkout del código fuente:
199
197
 
@@ -237,9 +235,9 @@ Aplica solo después de que el reporte del dry-run sea correcto:
237
235
  npx -y repo-harness update
238
236
  ```
239
237
 
240
- Para un proyecto o módulo nuevo, usa el command skill `repo-harness-scaffold`. Para
241
- un repositorio existente, usa `repo-harness-init`; este instala o refresca el
242
- harness y no crea el stack tecnológico de la aplicación.
238
+ Para un proyecto o módulo nuevo, usa la branch command `repo-harness-scaffold`.
239
+ Para un repositorio existente, usa `repo-harness update`; este instala o refresca
240
+ el harness y no crea el stack tecnológico de la aplicación.
243
241
 
244
242
  ### Cómo se ve el éxito
245
243
 
@@ -328,7 +326,7 @@ Guards habituales:
328
326
 
329
327
  ## Release actual
330
328
 
331
- - npm package: `repo-harness@0.2.1`
329
+ - npm package: `repo-harness@0.2.4`
332
330
  - Generated workflow compatibility: `5.2.3`
333
331
  - GitHub repository: `Ancienttwo/repo-harness`
334
332
  - Release history: [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
@@ -346,22 +344,23 @@ Guards habituales:
346
344
  - `repo-harness update` refresca las runtime pieces:
347
345
  - los `repo-harness` skill aliases
348
346
  - los global Codex/Claude hook adapters
349
- - las Waza skills: `check`, `design`, `health`, `hunt`, `learn`, `read`, `think`, `write`
350
- - sincroniza `diagram-design` si existe la source copy
347
+ - las Waza skills: `think`, `hunt`, `check`, `health`
348
+ - Mermaid
351
349
  - El resto del external tooling se mantiene advisory-only:
352
350
  - `bash scripts/check-agent-tooling.sh --host both --check-updates`
353
351
  - no configura automáticamente gstack, gbrain, CodeGraph MCP, daemon ni provider
354
352
 
355
353
  ## Action Command Skills
356
354
 
357
- Los command skill facades públicos están en `assets/skill-commands/`:
355
+ Los command facades públicos están en `assets/skill-commands/`; preservan la
356
+ compatibilidad de discovery por skills, mientras el CLI y los hooks ejecutan:
358
357
 
359
358
  - Planning / review: `repo-harness-plan`, `repo-harness-review`, `repo-harness-autoplan`
360
359
  - Repo workflow actions: `repo-harness-ship`, `repo-harness-init`, `repo-harness-migrate`, `repo-harness-upgrade`, `repo-harness-capability`, `repo-harness-architecture`, `repo-harness-handoff`, `repo-harness-deploy`, `repo-harness-repair`, `repo-harness-check`
361
- - Project creation: `repo-harness-scaffold`
360
+ - Branch project creation: `repo-harness-scaffold`
362
361
 
363
- `repo-harness-init` se usa para repositorios existentes; `repo-harness-scaffold` se
364
- usa para crear proyectos o módulos nuevos. `hooks-init`, `docs-init` y
362
+ `repo-harness update` se usa para repositorios existentes; `repo-harness-scaffold`
363
+ queda como branch command para crear proyectos o módulos nuevos. `hooks-init`, `docs-init` y
365
364
  `create-project-dirs` son pasos internos, no commands públicos.
366
365
 
367
366
  ## Maintainer Reference
package/README.fr.md CHANGED
@@ -191,18 +191,11 @@ npx -y repo-harness init
191
191
  ```
192
192
 
193
193
  La release line du package npm est désormais `0.2.x` ; la generated workflow
194
- compatibility model line est suivie séparément en `5.x`. `repo-harness@0.2.1`
195
- sépare le bootstrap global initial (`repo-harness init`) du rafraîchissement
196
- repo-local (`repo-harness update`), conserve l'installateur global de plugin/hook
197
- (`scripts/setup-plugins.sh`), la sentinelle de sécurité en lecture seule
198
- (`repo-harness security scan`), le cycle de vie draft-plan explicite de
199
- Claude/Codex, et ajoute l'initialisation non bloquante de l'index CodeGraph pour
200
- le routing structurel des prompts. Ces capacités reposent sur le CLI renommé, le
201
- bootstrap de l'adapter de hook de niveau utilisateur, les AI-native scaffold
202
- overlays, le typed prompt-guard decision engine, le nommage des task artifacts par
203
- plan-stem, les runtime aliases
204
- `REPO_HARNESS_*`, la Waza runtime skill sync, et le release gate que le maintainer
205
- utilise avant de publier sur npm.
194
+ compatibility model line est suivie séparément en `5.x`. `repo-harness init`
195
+ sert au bootstrap global et `repo-harness update` sert au rafraîchissement
196
+ repo-local. `repo-harness init` configure le CLI, les hook adapters de niveau
197
+ utilisateur, Waza, Mermaid, le brain root et CodeGraph MCP ; l'ancien chemin
198
+ Claude plugin `scripts/setup-plugins.sh` est retiré.
206
199
 
207
200
  Si vous travaillez depuis un checkout source :
208
201
 
@@ -246,9 +239,9 @@ Appliquez seulement une fois que le rapport du dry-run est correct :
246
239
  npx -y repo-harness update
247
240
  ```
248
241
 
249
- Pour un nouveau projet ou un nouveau module, utilisez la command skill
250
- `repo-harness-scaffold`. Pour un dépôt existant, utilisez `repo-harness-init` ; il
251
- installe ou rafraîchit le harness sans créer de stack applicatif.
242
+ Pour un nouveau projet ou un nouveau module, utilisez la branch command
243
+ `repo-harness-scaffold`. Pour un dépôt existant, utilisez `repo-harness update` ;
244
+ il installe ou rafraîchit le harness sans créer de stack applicatif.
252
245
 
253
246
  ### À quoi ressemble le succès
254
247
 
@@ -337,7 +330,7 @@ Guards courants :
337
330
 
338
331
  ## Release actuelle
339
332
 
340
- - npm package : `repo-harness@0.2.1`
333
+ - npm package : `repo-harness@0.2.4`
341
334
  - Generated workflow compatibility : `5.2.3`
342
335
  - GitHub repository : `Ancienttwo/repo-harness`
343
336
  - Release history : [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
@@ -355,22 +348,24 @@ Guards courants :
355
348
  - `repo-harness update` rafraîchit les runtime pieces :
356
349
  - les `repo-harness` skill aliases
357
350
  - les global Codex/Claude hook adapters
358
- - les Waza skills : `check`, `design`, `health`, `hunt`, `learn`, `read`, `think`, `write`
359
- - synchronise `diagram-design` si la source copy existe
351
+ - les Waza skills : `think`, `hunt`, `check`, `health`
352
+ - Mermaid
360
353
  - Les autres outils externes restent advisory-only :
361
354
  - `bash scripts/check-agent-tooling.sh --host both --check-updates`
362
355
  - pas de configuration automatique de gstack, gbrain, CodeGraph MCP, daemon ou provider
363
356
 
364
357
  ## Action Command Skills
365
358
 
366
- Les command skill facades publics se trouvent dans `assets/skill-commands/` :
359
+ Les command facades publics se trouvent dans `assets/skill-commands/` ; ils
360
+ préservent la découverte par skills, tandis que l'exécution appartient au CLI et
361
+ aux hooks :
367
362
 
368
363
  - Planning / review : `repo-harness-plan`, `repo-harness-review`, `repo-harness-autoplan`
369
364
  - Repo workflow actions : `repo-harness-ship`, `repo-harness-init`, `repo-harness-migrate`, `repo-harness-upgrade`, `repo-harness-capability`, `repo-harness-architecture`, `repo-harness-handoff`, `repo-harness-deploy`, `repo-harness-repair`, `repo-harness-check`
370
- - Project creation : `repo-harness-scaffold`
365
+ - Branch project creation : `repo-harness-scaffold`
371
366
 
372
- `repo-harness-init` sert aux dépôts existants ; `repo-harness-scaffold` sert à
373
- créer un nouveau projet ou module. `hooks-init`, `docs-init` et
367
+ `repo-harness update` sert aux dépôts existants ; `repo-harness-scaffold` sert de
368
+ branch command pour créer un nouveau projet ou module. `hooks-init`, `docs-init` et
374
369
  `create-project-dirs` sont des étapes internes, pas des commands publiques.
375
370
 
376
371
  ## Maintainer Reference
package/README.ja.md CHANGED
@@ -77,7 +77,7 @@ product boundary は意図的に地味です。対象リポジトリを検査し
77
77
 
78
78
  設計は 3 層に分かれます。
79
79
 
80
- 1. **ソースパッケージ層**:本リポジトリが CLI、command skill facades、templates、hook assets、
80
+ 1. **ソースパッケージ層**:本リポジトリが CLI、CLI-backed command facades、templates、hook assets、
81
81
  workflow contract、tests、release gate を所有します。
82
82
  2. **対象リポジトリ contract 層**:`repo-harness update` または migration が、`docs/spec.md`、
83
83
  `plans/`、`tasks/`、`.ai/context/`、`.ai/harness/`、helper scripts、`.ai/hooks/` といった
@@ -160,11 +160,9 @@ npx -y repo-harness init
160
160
  ```
161
161
 
162
162
  npm package の release line は現在 `0.2.x` です。生成される workflow compatibility model line は
163
- 別途 `5.x` として追跡されます。`repo-harness@0.2.1` は、初回 global bootstrap
164
- (`repo-harness init`)と repo-local refresh(`repo-harness update`)を分離し、グローバルな
165
- plugin/hook インストールスクリプト(`scripts/setup-plugins.sh`)、読み取り専用の設定セキュリティ哨兵
166
- (`repo-harness security scan`)、明示的な Claude/Codex draft-plan ライフサイクルを保ち、
167
- 構造的 prompt routing 用の非ブロッキング CodeGraph index 初期化を追加します。
163
+ 別途 `5.x` として追跡されます。`repo-harness init` global bootstrap、`repo-harness update` は
164
+ repo-local refresh です。`repo-harness init` は CLI、user-level hook adapters、Waza、Mermaid、
165
+ brain root、CodeGraph MCP を設定し、退役した `scripts/setup-plugins.sh` の Claude plugin path は使いません。
168
166
 
169
167
  ソースの checkout から作業する場合:
170
168
 
@@ -206,8 +204,8 @@ dry-run のレポートが正しいことを確認してから適用します。
206
204
  npx -y repo-harness update
207
205
  ```
208
206
 
209
- 新しいプロジェクトやモジュールには `repo-harness-scaffold` command skill を使います。既存リポジトリには
210
- `repo-harness-init` を使います。これは harness をインストールまたはリフレッシュするもので、アプリケーション
207
+ 新しいプロジェクトやモジュールには支線 command `repo-harness-scaffold` を使います。既存リポジトリには
208
+ `repo-harness update` を使います。これは harness をインストールまたはリフレッシュするもので、アプリケーション
211
209
  スタックは作成しません。
212
210
 
213
211
  ### 成功した状態
@@ -295,7 +293,7 @@ hook がブロックしたときは、まず terminal の構造化された出
295
293
 
296
294
  ## 現在の Release
297
295
 
298
- - npm package:`repo-harness@0.2.1`
296
+ - npm package:`repo-harness@0.2.4`
299
297
  - Generated workflow compatibility:`5.2.3`
300
298
  - GitHub repository:`Ancienttwo/repo-harness`
301
299
  - Release history:[`docs/CHANGELOG.md`](docs/CHANGELOG.md)
@@ -313,21 +311,21 @@ hook がブロックしたときは、まず terminal の構造化された出
313
311
  - `repo-harness update` は runtime pieces をリフレッシュします:
314
312
  - `repo-harness` skill aliases
315
313
  - global Codex/Claude hook adapters
316
- - Waza skills:`check`、`design`、`health`、`hunt`、`learn`、`read`、`think`、`write`
317
- - source copy が存在すれば `diagram-design` を同期
314
+ - Waza skills:`think`、`hunt`、`check`、`health`
315
+ - Mermaid
318
316
  - その他の外部ツールは advisory-only のままです:
319
317
  - `bash scripts/check-agent-tooling.sh --host both --check-updates`
320
318
  - gstack、gbrain、CodeGraph MCP、daemon、provider を自動設定しない
321
319
 
322
320
  ## Action Command Skills
323
321
 
324
- 公開 command skill facades は `assets/skill-commands/` にあります。
322
+ 公開 command facades は `assets/skill-commands/` にあります。host skill discovery との互換性を残しつつ、実行は CLI と hooks が担います。
325
323
 
326
324
  - Planning / review:`repo-harness-plan`、`repo-harness-review`、`repo-harness-autoplan`
327
325
  - Repo workflow actions:`repo-harness-ship`、`repo-harness-init`、`repo-harness-migrate`、`repo-harness-upgrade`、`repo-harness-capability`、`repo-harness-architecture`、`repo-harness-handoff`、`repo-harness-deploy`、`repo-harness-repair`、`repo-harness-check`
328
- - Project creation:`repo-harness-scaffold`
326
+ - Branch project creation:`repo-harness-scaffold`
329
327
 
330
- `repo-harness-init` は既存リポジトリ向け、`repo-harness-scaffold` は新しいプロジェクトやモジュールの作成向けです。
328
+ `repo-harness update` は既存リポジトリ向け、`repo-harness-scaffold` は支線 command として新しいプロジェクトやモジュールを作成します。
331
329
  `hooks-init`、`docs-init`、`create-project-dirs` は内部ステップであり、公開 commands ではありません。
332
330
 
333
331
  ## Maintainer Reference
package/README.md CHANGED
@@ -34,41 +34,30 @@ This repository now dogfoods its own tasks-first contract. It is both:
34
34
  read a 1KB capability contract or query the index instead of spending thousands of
35
35
  tokens rediscovering structure.
36
36
 
37
- ## What's New in 0.2.2
38
-
39
- - **Safer global init defaults.** `repo-harness init` now streams setup progress
40
- directly to the terminal and no longer installs the Superpowers Claude
41
- marketplace plugin by default. Use `repo-harness init --with-superpowers` only
42
- when you explicitly want that marketplace plugin.
43
- - **Global init command (`repo-harness init`).** One command bootstraps the global
44
- Claude environment: essential plugins, configurable policy hooks (worktree guard,
45
- atomic commit/pending), optional LSP plugins by project type, and four hook profiles
46
- (`standard`, `minimal`, `biome`, `biome-strict`).
47
- Run `npx -y repo-harness init`; no source checkout is required.
48
- - **Repo refresh command (`repo-harness update`).** Existing-repo install and
49
- refresh now has its own command surface, preserving the previous repo-local
50
- harness migration path while keeping `init` focused on global runtime setup.
51
- - **CodeGraph index self-heal.** When the prompt hook detects structural
52
- code-navigation intent and the repo has no `.codegraph` index, it initializes
53
- the index with the local or PATH-visible CodeGraph binary before emitting the
54
- route hint. This remains advisory: no dependency install, no heavy readiness
55
- probe, and no prompt block if CodeGraph is unavailable.
56
- - **Security sentinel (`repo-harness security scan` + `security-sentinel.sh`).** A
57
- read-only check over high-value config injection surfaces (`~/.claude/settings.json`,
58
- `~/.codex/hooks.json`, repo-local `.vscode/tasks.json`, and legacy project-level
59
- `.claude`/`.codex` adapters). It flags suspicious command patterns remote-shell
60
- pipes, base64-decode-to-exec, `osascript`, `launchctl`/`crontab` persistence, netcat,
61
- inline interpreter exec — plus unmanaged hooks and auto-run `folderOpen` tasks, and it
62
- never mutates config. The `SessionStart` sentinel fingerprints the set and re-scans
63
- only when a fingerprint changes, so there is no session-start noise. Audit on demand:
64
- `repo-harness security scan --json`.
65
- - **Claude/Codex draft-plan lifecycle.** Plan mode is explicitly two-stage: Draft vs
66
- Approved. Hooks detect plan-creation intent and track pending orchestration; a stop gate
67
- (`stop-orchestrator.sh`) requires one self-review pass before a session ends mid-plan.
68
- Capture a draft with `scripts/capture-plan.sh --slug <slug> --title <title> --status
69
- Draft`, then promote to Approved and project into execution with `--execute` or
70
- `scripts/plan-to-todo.sh --plan <plan>`. Plans become the file-backed source of truth in
71
- `plans/`.
37
+ ## What's New in 0.2.4
38
+
39
+ - **Plan consultation stays advisory.** Questions and status reports that mention
40
+ plans, workflows, hooks, `new plan`, or `方案` no longer fall into
41
+ `PlanStatusGuard` or create plan files unless they explicitly start execution.
42
+ - **Autoresearch is no longer a background hook.** The self-host-only
43
+ `autoresearch-advisory.sh` route is retired from `.ai/hooks`, generated hook
44
+ installers, and user-level adapters. Autoresearch evidence is now gathered by
45
+ an explicit agent-run workflow, not by an always-on hook.
46
+ - **Hook parity is stricter.** Self-host `.ai/hooks/` and installable
47
+ `assets/hooks/` now match without maintainer-only hook exceptions.
48
+ - **Copied hook fallback.** Installed prompt hooks now keep PlanCaptureGate
49
+ guidance working even when the copied runtime cannot reach the TypeScript
50
+ decision engine.
51
+ - **Darwin readiness gates.** Workflow checks now catch stale handoff/resume
52
+ plan references, and public action-command skills have static quality gates
53
+ for failure modes, boundaries, and high-risk checkpoints.
54
+ - **Authoritative eval evidence.** Benchmark reports now include
55
+ `full_test_count`, `dry_run_ratio`, `grader_pass_rate`, and
56
+ `effectiveness_authority`, so dry-run smoke output cannot be mistaken for
57
+ release-grade skill effectiveness proof.
58
+ - **Tooling freshness.** The self-host CodeGraph dev dependency is refreshed to
59
+ `0.9.9`, and gbrain readiness probes try `doctor --json --fast` before the
60
+ full doctor path.
72
61
 
73
62
  ## What repo-harness Does
74
63
 
@@ -91,7 +80,7 @@ workflow surfaces stay consistent.
91
80
 
92
81
  The design has three layers:
93
82
 
94
- 1. **Source package**: this repository owns the CLI, command skill facades,
83
+ 1. **Source package**: this repository owns the CLI, CLI-backed command facades,
95
84
  templates, hook assets, workflow contract, tests, and release gate.
96
85
  2. **Target repo contract**: `repo-harness update` or migration writes repo-local
97
86
  files such as `docs/spec.md`, `plans/`, `tasks/`, `.ai/context/`,
@@ -177,10 +166,11 @@ safe to adopt in a real repo.
177
166
  npx -y repo-harness init
178
167
  ```
179
168
 
180
- `init` is the first-run global bootstrap path. It runs the packaged
181
- `scripts/setup-plugins.sh`, installs global Claude plugins and hook profiles, and
182
- defaults to `--hooks standard`. Use `--hooks <profile>` or `--no-hooks` when you
183
- need a different hook profile.
169
+ `init` is the first-run global bootstrap path. It installs the current npm
170
+ package as the global CLI, refreshes repo-harness skill aliases, installs
171
+ user-level hook adapters, configures Waza runtime skills, persists a brain root
172
+ under `~/.repo-harness/config.json`, and configures CodeGraph MCP. It does not
173
+ apply repo-local workflow files to the current directory.
184
174
 
185
175
  ### Install or refresh a repo-local harness
186
176
 
@@ -194,13 +184,13 @@ repository to install or refresh workflow files, hook assets, host adapters,
194
184
  skill aliases, and repo-local verification surfaces from the current npm package.
195
185
 
196
186
  The npm package release line is now `0.2.x`; generated workflow compatibility is
197
- tracked separately as the `5.x` model line. The `0.2.2` package splits first-run
198
- global bootstrap (`repo-harness init`) from repo-local refresh
199
- (`repo-harness update`), keeps the global plugin/hook installer
200
- (`scripts/setup-plugins.sh`), the read-only config security sentinel
201
- (`repo-harness security scan`), the explicit Claude/Codex draft-plan lifecycle,
202
- adds non-blocking CodeGraph index initialization for structural prompt routing,
203
- and keeps Superpowers behind the explicit `--with-superpowers` opt-in flag.
187
+ tracked separately as the `5.x` model line. The `0.2.4` package keeps first-run
188
+ global bootstrap (`repo-harness init`) separate from repo-local refresh
189
+ (`repo-harness update`), preserves the typed global bootstrap and read-only
190
+ config security sentinel, tightens hook parity, retires the self-host
191
+ autoresearch advisory hook, prevents consultative plan/workflow prompts from
192
+ being mistaken for execution, and adds copied-hook fallback, readiness checks,
193
+ and skill-eval authority reporting.
204
194
  These sit on top of the renamed `repo-harness` CLI, user-level hook
205
195
  adapter bootstrap, AI-native scaffold overlays, the typed prompt-guard decision
206
196
  engine, plan-stem task artifact naming, `REPO_HARNESS_*` runtime aliases, Waza
@@ -250,8 +240,8 @@ Apply only after the dry-run report looks correct:
250
240
  npx -y repo-harness update
251
241
  ```
252
242
 
253
- For a new project or module, use the `repo-harness-scaffold` command skill. For
254
- an existing repo, use `repo-harness-init`; it installs or refreshes the harness
243
+ For a new project or module, use the branch command `repo-harness-scaffold`. For
244
+ an existing repo, use `repo-harness update`; it installs or refreshes the harness
255
245
  without creating an application stack.
256
246
 
257
247
  ### Success looks like this
@@ -340,7 +330,7 @@ Most common guards:
340
330
 
341
331
  ## Current Release
342
332
 
343
- - npm package: `repo-harness@0.2.2`
333
+ - npm package: `repo-harness@0.2.4`
344
334
  - Generated workflow compatibility: `5.2.3`
345
335
  - GitHub repository: `Ancienttwo/repo-harness`
346
336
  - Release history: [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
@@ -371,16 +361,17 @@ Most common guards:
371
361
  - `complex -> gstack`
372
362
  - `simple -> Waza` with Codex-first runtime copies in `~/.codex/skills`
373
363
  - `knowledge -> gbrain`
374
- - `repo-harness update` bootstraps the Codex/Claude runtime pieces needed for the
364
+ - `repo-harness init` bootstraps the Codex/Claude runtime pieces needed for the
375
365
  default workflow:
376
366
  - refreshes `repo-harness` skill aliases
377
367
  - installs global Codex/Claude hook adapters
378
- - installs Waza skills (`think`, `hunt`, `check`, `health`) through the skills CLI
379
- - installs `mermaid` into Codex/Claude skill roots through the skills CLI
368
+ - installs Waza skills (`think`, `hunt`, `check`, `health`) and Mermaid through the skills CLI
369
+ - persists the brain root in `~/.repo-harness/config.json`
370
+ - configures CodeGraph MCP for selected host agents
380
371
  - Other external tooling stays advisory-only:
381
372
  - `bash scripts/check-agent-tooling.sh --host both --check-updates`
382
373
  - Waza update checks compare upstream `tw93/Waza` `SKILL.md` hashes without running `npx skills check`
383
- - no automatic gstack, gbrain, CodeGraph MCP, daemon, or provider setup
374
+ - no automatic gstack, gbrain MCP, CodeGraph daemon, or provider setup
384
375
  - Manual distillation stays repo-local:
385
376
  - repeated corrections -> `tasks/lessons.md`
386
377
  - deep findings and hidden contracts -> `tasks/research.md`
@@ -407,17 +398,16 @@ are not all bundled product dependencies.
407
398
 
408
399
  ## Action Command Skills
409
400
 
410
- Source-owned command skill facades live in `assets/skill-commands/`. They keep
411
- the public surface action-style while sharing the same router, contract, scripts,
412
- and tests:
401
+ Source-owned command facades live in `assets/skill-commands/`. They keep host
402
+ skill discovery compatible while the CLI and hooks own execution:
413
403
 
414
404
  - Planning and review: `repo-harness-plan`, `repo-harness-review`, `repo-harness-autoplan`
415
405
  - Repo workflow actions: `repo-harness-ship`, `repo-harness-init`, `repo-harness-migrate`, `repo-harness-upgrade`, `repo-harness-capability`, `repo-harness-architecture`, `repo-harness-handoff`, `repo-harness-deploy`, `repo-harness-repair`, `repo-harness-check`
416
- - Project creation: `repo-harness-scaffold`
406
+ - Branch project creation command: `repo-harness-scaffold`
417
407
 
418
- `repo-harness-init` is for an existing repo; `repo-harness-scaffold` creates a new
419
- project or module scaffold. `hooks-init`, `docs-init`, and `create-project-dirs`
420
- are internal steps, not public commands.
408
+ `repo-harness update` is for an existing repo; `repo-harness-scaffold` creates a
409
+ new project or module scaffold as a side command. `hooks-init`, `docs-init`, and
410
+ `create-project-dirs` are internal steps, not public commands.
421
411
 
422
412
  `repo-harness-scaffold` keeps the A-K plan catalog as the project-type authority
423
413
  and adds AI-native app structure through an optional `ai_native_profile` overlay.
@@ -428,6 +418,12 @@ UI runtime, Bun/Hono gateway, shared contracts, observability, and MCP/HTTP
428
418
  sidecar rules without installing model providers or making Python, Go, Rust, or
429
419
  A2UI mandatory defaults.
430
420
 
421
+ Webapp rendering is a separate overlay. Client-only Vite remains Plan B, while
422
+ React webapps that need public SEO/SSR plus an authenticated workspace should
423
+ use Plan C: one TanStack Start + Vite app deployed as a Cloudflare Worker under
424
+ `apps/web`, with `/` SSR/prerender-capable and `/app` client-only. The scaffold
425
+ does not default to separate `apps/marketing` and `apps/web` frontend deploys.
426
+
431
427
  Use `repo-harness-capability` when the harness already exists and only selected
432
428
  capability boundaries should be added. It updates `.ai/context/capabilities.json`,
433
429
  syncs the requested local `AGENTS.md` / `CLAUDE.md` contract files, and validates
@@ -480,6 +476,9 @@ bun scripts/assemble-template.ts --target agents --plan C --name "MyProject"
480
476
  bun run benchmark:skills --dry-run
481
477
  ```
482
478
 
479
+ Dry-run benchmark output is a wiring smoke only. Release or readiness evidence
480
+ needs a non-dry-run eval with grader output.
481
+
483
482
  ### Run one eval across both Claude and Codex
484
483
 
485
484
  ```bash
@@ -534,5 +533,5 @@ bash scripts/check-task-workflow.sh --strict
534
533
  bun scripts/inspect-project-state.ts --repo . --format text
535
534
  bash scripts/migrate-project-template.sh --repo . --dry-run
536
535
  bash scripts/check-agent-tooling.sh --host both --check-updates
537
- bun run benchmark:skills --dry-run
536
+ bun run benchmark:skills --eval route-workflow-check
538
537
  ```
package/README.zh-CN.md CHANGED
@@ -23,31 +23,25 @@ repo-local workflow 的自托管样例。
23
23
  做渐进式上下文加载:一份小而稳定的 root context(约 12KB),加上只在改到对应文件时才加载的
24
24
  capability 块。agent 读一份 1KB 的 capability 合约或查索引,而不是花上千 token 重新摸清结构。
25
25
 
26
- ## 0.2.2 新特性
27
-
28
- - **更安全的全局初始化默认值。** `repo-harness init` 现在会把 setup 进度直接输出到终端,
29
- 不再默认安装 Superpowers Claude marketplace plugin。只有你明确需要它时,才使用
30
- `repo-harness init --with-superpowers`。
31
- - **全局初始化命令(`repo-harness init`)。** 一条命令引导全局 Claude 环境:essential plugins、
32
- 可配置 policy hooks(worktree guard、atomic commit/pending)、按项目类型可选的 LSP plugins,以及
33
- 四档 hook profile(`standard`、`minimal`、`biome`、`biome-strict`)。运行
34
- `npx -y repo-harness init`,不需要 clone 源码仓库。
35
- - **仓库刷新命令(`repo-harness update`)。** 已有仓库的安装/刷新入口独立成命令,继续复用
36
- repo-local harness migration 路径,同时让 `init` 专注于全局 runtime setup
37
- - **CodeGraph index 自愈。** prompt hook 检测到结构化代码导航意图、且仓库还没有 `.codegraph`
38
- index 时,会先用 repo-local PATH 上的 CodeGraph binary 初始化 index,再发路由提示。这个动作仍是
39
- advisory:不安装依赖、不跑重 readiness probe,CodeGraph 不可用时也不阻塞 prompt。
40
- - **安全哨兵(`repo-harness security scan` + `security-sentinel.sh`)。** 对高价值配置注入面做只读检查
41
- (`~/.claude/settings.json`、`~/.codex/hooks.json`、仓库本地 `.vscode/tasks.json`,以及 legacy 项目级
42
- `.claude`/`.codex` adapter)。它标记危险命令模式——远程 shell 管道、base64 解码执行、`osascript`、
43
- `launchctl`/`crontab` 持久化、netcat、内联解释器执行——以及未托管 hook 和自动运行的 `folderOpen`
44
- 任务,且绝不改写任何配置。`SessionStart` 哨兵对这组文件做指纹,只在指纹变化时才重扫,不制造
45
- session-start 噪音。按需审计:`repo-harness security scan --json`。
46
- - **Claude/Codex draft-plan 生命周期。** Plan mode 显式分两段:Draft 与 Approved。hooks 识别建 plan 的
47
- 意图并追踪 pending orchestration;stop 门(`stop-orchestrator.sh`)要求会话在 plan 未定时结束前先做
48
- 一次自审。用 `scripts/capture-plan.sh --slug <slug> --title <title> --status Draft` 落草稿,审批后改
49
- Approved 并用 `--execute` 或 `scripts/plan-to-todo.sh --plan <plan>` 投射到执行。plans/ 成为文件级
50
- 事实来源。
26
+ ## 0.2.4 新特性
27
+
28
+ - **计划咨询保持 advisory。** 提到 plans、workflow、hooks、`new plan` `方案` 的问题和状态报告,
29
+ 不再因为包含执行相关词就进入 `PlanStatusGuard` 或创建 plan 文件;只有明确开始执行时才触发执行门。
30
+ - **Autoresearch 不再是后台 hook。** 自托管专用的 `autoresearch-advisory.sh` route 已从
31
+ `.ai/hooks`、生成的 hook installer 和 user-level adapters 里退休。需要 autoresearch 证据时,
32
+ agent 显式运行实验流程,而不是靠常驻 hook 提示。
33
+ - **Hook parity 更严格。** 自托管 `.ai/hooks/` 和可安装的 `assets/hooks/` 现在必须完全一致,
34
+ 不再保留 maintainer-only hook exception。
35
+ - **复制版 hook fallback。** 已安装的 prompt hook 即使找不到 TypeScript decision
36
+ engine,也会保留 PlanCaptureGate guidance,而不是直接报 engine unavailable
37
+ - **Darwin readiness gates。** Workflow checks 现在会抓 stale handoff/resume plan
38
+ references;公共 action-command skills 也增加 failure modes、boundaries 和高风险
39
+ checkpoint 的静态质量门。
40
+ - **权威 eval evidence。** Benchmark report 现在输出 `full_test_count`、
41
+ `dry_run_ratio`、`grader_pass_rate` `effectiveness_authority`,避免把 dry-run
42
+ smoke 当成 release-grade skill effectiveness 证明。
43
+ - **Tooling freshness。** self-host CodeGraph dev dependency 刷到 `0.9.9`,gbrain
44
+ readiness 会先尝试 `doctor --json --fast`,再 fallback 到完整 doctor。
51
45
 
52
46
  ## 产品做什么
53
47
 
@@ -68,7 +62,7 @@ repo-local hooks,然后验证这些 workflow surfaces 仍然一致。
68
62
 
69
63
  整体分三层:
70
64
 
71
- 1. **源码包层**:本仓库维护 CLI、command skill facades、templates、hook assets、
65
+ 1. **源码包层**:本仓库维护 CLI、CLI-backed command facades、templates、hook assets、
72
66
  workflow contract、tests 和 release gate。
73
67
  2. **目标仓库合约层**:`repo-harness update` 或 migration 会写入 `docs/spec.md`、
74
68
  `plans/`、`tasks/`、`.ai/context/`、`.ai/harness/`、helper scripts 和
@@ -149,9 +143,10 @@ flowchart TD
149
143
  npx -y repo-harness init
150
144
  ```
151
145
 
152
- `init` 是首次全局引导入口。它运行 npm 包里自带的 `scripts/setup-plugins.sh`,
153
- 安装全局 Claude plugins hook profiles,默认等价于 `--hooks standard`。
154
- 需要不同 hook profile 时再传 `--hooks <profile>` 或 `--no-hooks`。
146
+ `init` 是首次全局引导入口。它把当前 npm 包安装成全局 CLI,刷新 repo-harness
147
+ skill aliases,安装 user-level hook adapters,配置 Waza runtime skills,把 brain
148
+ root 持久化到 `~/.repo-harness/config.json`,并配置 CodeGraph MCP。它不会把当前目录
149
+ 默认迁移成 repo-local workflow。
155
150
 
156
151
  ### 安装或刷新 repo-local harness
157
152
 
@@ -165,11 +160,12 @@ npx -y repo-harness update
165
160
  repo-local verification surfaces。
166
161
 
167
162
  npm package release line 现在是 `0.2.x`;生成的 workflow compatibility model line
168
- 单独以 `5.x` 追踪。`repo-harness@0.2.2` 把首次全局引导(`repo-harness init`)
169
- 和 repo-local 刷新(`repo-harness update`)拆开,同时保留全局 plugin/hook 安装脚本
170
- (`scripts/setup-plugins.sh`)、只读配置安全哨兵(`repo-harness security scan`)、
171
- 显式 Claude/Codex draft-plan 生命周期,新增 prompt hook 的非阻塞 CodeGraph index 初始化,
172
- 并把 Superpowers 放到显式 `--with-superpowers` opt-in 后面。这些能力叠加在改名后的 CLI、user-level hook adapter bootstrap、AI-native scaffold overlays、
163
+ 单独以 `5.x` 追踪。`repo-harness@0.2.4` 继续把首次全局引导(`repo-harness init`)
164
+ 和 repo-local 刷新(`repo-harness update`)拆开,保留 typed global bootstrap 与只读
165
+ 配置安全哨兵,同时收紧 hook parity,退休自托管 autoresearch advisory hook,避免
166
+ 计划/工作流咨询 prompt 被误判成执行请求,并增加复制版 hook fallback、readiness checks
167
+ skill-eval authority reporting。
168
+ 这些能力叠加在改名后的 CLI、user-level hook adapter bootstrap、AI-native scaffold overlays、
173
169
  typed prompt-guard decision engine、plan-stem task artifact 命名、`REPO_HARNESS_*`
174
170
  runtime aliases、Waza runtime skill sync,以及 maintainer 发布 npm 前使用的 release gate 之上。
175
171
 
@@ -213,8 +209,8 @@ dry-run 报告正确后再应用:
213
209
  npx -y repo-harness update
214
210
  ```
215
211
 
216
- 新项目或新模块使用 `repo-harness-scaffold` command skill。已有仓库使用
217
- `repo-harness-init`;它会安装或刷新 harness,不会创建应用技术栈。
212
+ 新项目或新模块使用支线 command `repo-harness-scaffold`。已有仓库使用
213
+ `repo-harness update`;它会安装或刷新 harness,不会创建应用技术栈。
218
214
 
219
215
  ### 成功长什么样
220
216
 
@@ -301,7 +297,7 @@ hook block 工作时,先看 terminal 里的结构化输出。核心字段是
301
297
 
302
298
  ## 当前 Release
303
299
 
304
- - npm package:`repo-harness@0.2.2`
300
+ - npm package:`repo-harness@0.2.4`
305
301
  - Generated workflow compatibility:`5.2.3`
306
302
  - GitHub repository:`Ancienttwo/repo-harness`
307
303
  - Release history:[`docs/CHANGELOG.md`](docs/CHANGELOG.md)
@@ -316,26 +312,35 @@ hook block 工作时,先看 terminal 里的结构化输出。核心字段是
316
312
  - `assets/workflow-contract.v1.json`
317
313
  - Generated repos 默认使用 repo-local harness flow:
318
314
  - `docs/spec.md -> plans/ -> tasks/contracts/ -> tasks/reviews/ -> .ai/context/context-map.json -> .ai/harness/*`
319
- - `repo-harness update` 会刷新 runtime pieces:
315
+ - `repo-harness init` 会刷新 runtime pieces:
320
316
  - `repo-harness` skill aliases
321
317
  - global Codex/Claude hook adapters
322
- - Waza skills:`check`、`design`、`health`、`hunt`、`learn`、`read`、`think`、`write`
323
- - 如果 source copy 存在,同步 `diagram-design`
318
+ - Waza skills:`think`、`hunt`、`check`、`health`
319
+ - 持久化 brain root `~/.repo-harness/config.json`
320
+ - 配置 CodeGraph MCP
324
321
  - 其他外部工具保持 advisory-only:
325
322
  - `bash scripts/check-agent-tooling.sh --host both --check-updates`
326
- - 不自动设置 gstack、gbrain、CodeGraph MCP、daemon 或 provider
323
+ - 不自动设置 gstack、gbrain MCP、CodeGraph daemon 或 provider
327
324
 
328
325
  ## Action Command Skills
329
326
 
330
- 公共 command skill facades 在 `assets/skill-commands/`:
327
+ 公共 command facades 在 `assets/skill-commands/`;它们保留 host skill discovery
328
+ 兼容性,真正执行由 CLI 和 hooks 负责:
331
329
 
332
330
  - Planning / review:`repo-harness-plan`、`repo-harness-review`、`repo-harness-autoplan`
333
331
  - Repo workflow actions:`repo-harness-ship`、`repo-harness-init`、`repo-harness-migrate`、`repo-harness-upgrade`、`repo-harness-capability`、`repo-harness-architecture`、`repo-harness-handoff`、`repo-harness-deploy`、`repo-harness-repair`、`repo-harness-check`
334
- - Project creation:`repo-harness-scaffold`
332
+ - 支线项目创建 command:`repo-harness-scaffold`
335
333
 
336
- `repo-harness-init` 用于已有仓库;`repo-harness-scaffold` 用于创建新项目或模块。
334
+ `repo-harness update` 用于已有仓库;`repo-harness-scaffold` 作为支线 command 创建新项目或模块。
337
335
  `hooks-init`、`docs-init` 和 `create-project-dirs` 是内部步骤,不是公共 commands。
338
336
 
337
+ `repo-harness-scaffold` 保持 A-K plan catalog 作为项目类型 authority;AI-native
338
+ 能力通过可选 `ai_native_profile` overlay 叠加。Webapp rendering 也是独立 overlay:
339
+ Plan B 保留为 client-only Vite;需要 public SEO/SSR landing 加 authenticated
340
+ workspace 的 React webapp 使用 Plan C,也就是一个部署在 Cloudflare Workers 上的
341
+ TanStack Start + Vite `apps/web`。`/` 走 SSR/prerender,`/app` 保持 client-only。
342
+ scaffold 不默认生成 `apps/marketing` + `apps/web` 两个前端部署。
343
+
339
344
  ## Maintainer Reference
340
345
 
341
346
  ### 检查本仓库 workflow contract
@@ -363,7 +368,7 @@ bash scripts/check-task-workflow.sh --strict
363
368
  bun scripts/inspect-project-state.ts --repo . --format text
364
369
  bash scripts/migrate-project-template.sh --repo . --dry-run
365
370
  bash scripts/check-agent-tooling.sh --host both --check-updates
366
- bun run benchmark:skills --dry-run
371
+ bun run benchmark:skills --eval route-workflow-check
367
372
  ```
368
373
 
369
374
  ## Key Files