repo-harness 0.4.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.es.md +11 -10
- package/README.fr.md +11 -11
- package/README.ja.md +10 -10
- package/README.md +113 -50
- package/README.zh-CN.md +71 -44
- package/assets/hooks/anti-simplification.sh +4 -22
- package/assets/hooks/first-principles-guard.sh +72 -0
- package/assets/hooks/post-edit-guard.sh +4 -2
- package/assets/hooks/stop-orchestrator.sh +32 -1
- package/assets/reference-configs/external-tooling.md +9 -2
- package/assets/reference-configs/global-working-rules.md +18 -1
- package/assets/reference-configs/handoff-protocol.md +8 -7
- package/assets/reference-configs/harness-overview.md +19 -0
- package/assets/reference-configs/hook-operations.md +12 -2
- package/assets/skill-commands/repo-harness-init/SKILL.md +4 -4
- package/assets/skill-version.json +10 -2
- package/assets/templates/contract.template.md +1 -1
- package/assets/templates/helpers/check-skill-version.ts +3 -1
- package/assets/templates/helpers/check-task-workflow.sh +43 -3
- package/assets/templates/helpers/ensure-task-workflow.sh +4 -1
- package/assets/templates/helpers/workflow-contract.ts +12 -1
- package/assets/workflow-contract.v1.json +56 -47
- package/docs/images/image.png +0 -0
- package/package.json +1 -2
- package/scripts/architecture-event.ts +0 -0
- package/scripts/assemble-template.ts +0 -0
- package/scripts/capability-config.ts +0 -0
- package/scripts/capability-resolver.ts +0 -0
- package/scripts/check-npm-release.sh +3 -0
- package/scripts/check-skill-version.ts +3 -1
- package/scripts/check-task-workflow.sh +43 -3
- package/scripts/contract-run.ts +0 -0
- package/scripts/create-project-dirs.sh +2 -11
- package/scripts/ensure-task-workflow.sh +4 -1
- package/scripts/factor-lab-check.sh +0 -0
- package/scripts/factor-lab-new.sh +0 -0
- package/scripts/factor-lab-promote.sh +0 -0
- package/scripts/factor-lab-reject.sh +0 -0
- package/scripts/hook-dispatch-diet-report.ts +0 -0
- package/scripts/init-project.sh +2 -11
- package/scripts/initializer-question-pack.ts +0 -0
- package/scripts/lib/project-init-lib.sh +239 -73
- package/scripts/loop-engine-cutover-gate.ts +0 -0
- package/scripts/migrate-project-template.sh +17 -4
- package/scripts/route-nl-vs-ts-eval.ts +0 -0
- package/scripts/run-skill-evals.ts +0 -0
- package/scripts/run-skill-hook.ts +0 -0
- package/scripts/workflow-contract.ts +12 -1
- package/src/cli/commands/docs.ts +103 -0
- package/src/cli/commands/doctor.ts +74 -1
- package/src/cli/commands/global-runtime.ts +10 -5
- package/src/cli/commands/init-hook.ts +630 -0
- package/src/cli/commands/init.ts +58 -1
- package/src/cli/commands/run.ts +23 -0
- package/src/cli/commands/status.ts +1 -1
- package/src/cli/hook/runtime.ts +1 -1
- package/src/cli/index.ts +175 -16
- package/src/cli/repo-adoption/reclaim-runtime.ts +682 -0
- package/src/cli/runtime/helper-runner.ts +169 -0
- package/docs/reference-configs/AGENTS.md +0 -13
- package/docs/reference-configs/CLAUDE.md +0 -13
- package/docs/reference-configs/agentic-development-flow.md +0 -84
- package/docs/reference-configs/ai-workflows.md +0 -14
- package/docs/reference-configs/changelog-versioning.md +0 -13
- package/docs/reference-configs/coding-standards.md +0 -14
- package/docs/reference-configs/development-protocol.md +0 -21
- package/docs/reference-configs/document-generation.md +0 -37
- package/docs/reference-configs/evaluator-rubric.md +0 -19
- package/docs/reference-configs/external-tooling.md +0 -329
- package/docs/reference-configs/git-strategy.md +0 -14
- package/docs/reference-configs/global-working-rules.md +0 -47
- package/docs/reference-configs/handoff-protocol.md +0 -40
- package/docs/reference-configs/harness-overview.md +0 -76
- package/docs/reference-configs/heartbeat-triage.md +0 -57
- package/docs/reference-configs/hook-operations.md +0 -86
- package/docs/reference-configs/loop-engine-cutover-gate.md +0 -39
- package/docs/reference-configs/loop-engine-nl-decision-table.md +0 -137
- package/docs/reference-configs/release-deploy.md +0 -40
- package/docs/reference-configs/spa-day-protocol.md +0 -14
- package/docs/reference-configs/sprint-contracts.md +0 -65
- package/docs/reference-configs/workflow-orchestration.md +0 -14
package/README.es.md
CHANGED
|
@@ -42,7 +42,7 @@ repo-local que él mismo genera para los proyectos downstream.
|
|
|
42
42
|
opcionales según el tipo de proyecto y cuatro hook profiles (`standard`,
|
|
43
43
|
`minimal`, `biome`, `biome-strict`). Ejecuta
|
|
44
44
|
`npx -y repo-harness init`; no necesitas clonar el repositorio fuente.
|
|
45
|
-
- **Comando de
|
|
45
|
+
- **Comando de adopción del repo (`repo-harness adopt`).** La instalación y el
|
|
46
46
|
refresco de repos existentes tienen su propia superficie de comando, manteniendo
|
|
47
47
|
la ruta de migración repo-local anterior mientras `init` queda dedicado al
|
|
48
48
|
runtime global.
|
|
@@ -100,7 +100,7 @@ En conjunto hay tres capas:
|
|
|
100
100
|
1. **Capa del paquete fuente**: este repositorio mantiene la CLI, los command
|
|
101
101
|
skill facades, los templates, los hook assets, el workflow contract, los tests
|
|
102
102
|
y el release gate.
|
|
103
|
-
2. **Capa del contract del repositorio objetivo**: `repo-harness
|
|
103
|
+
2. **Capa del contract del repositorio objetivo**: `repo-harness adopt` o la
|
|
104
104
|
migración escribe `docs/spec.md`, `plans/`, `tasks/`, `.ai/context/`,
|
|
105
105
|
`.ai/harness/`, helper scripts y `.ai/hooks/`.
|
|
106
106
|
3. **Capa del host adapter**: el `~/.claude/settings.json` y el
|
|
@@ -208,7 +208,8 @@ npx -y repo-harness init
|
|
|
208
208
|
|
|
209
209
|
La npm package release line y el generated workflow stamp usan ahora la misma
|
|
210
210
|
línea `0.4.x`. `repo-harness init` es el bootstrap
|
|
211
|
-
global
|
|
211
|
+
global, `repo-harness update` es el refresco user-level y `repo-harness adopt`
|
|
212
|
+
es el refresco repo-local. `repo-harness init`
|
|
212
213
|
configura el CLI, los hook adapters de nivel usuario, Waza, Mermaid, el brain
|
|
213
214
|
root y CodeGraph MCP; el viejo camino Claude plugin `scripts/setup-plugins.sh`
|
|
214
215
|
queda retirado.
|
|
@@ -245,17 +246,17 @@ elimina `scripts/sync-codex-installed-copies.sh`.
|
|
|
245
246
|
En un repositorio existente, ejecuta desde el repo root:
|
|
246
247
|
|
|
247
248
|
```bash
|
|
248
|
-
npx -y repo-harness
|
|
249
|
+
npx -y repo-harness adopt --dry-run
|
|
249
250
|
```
|
|
250
251
|
|
|
251
252
|
Aplica solo después de que el reporte del dry-run sea correcto:
|
|
252
253
|
|
|
253
254
|
```bash
|
|
254
|
-
npx -y repo-harness
|
|
255
|
+
npx -y repo-harness adopt
|
|
255
256
|
```
|
|
256
257
|
|
|
257
258
|
Para un proyecto o módulo nuevo, usa la branch command `repo-harness-scaffold`.
|
|
258
|
-
Para un repositorio existente, usa `repo-harness
|
|
259
|
+
Para un repositorio existente, usa `repo-harness adopt`; este instala o refresca
|
|
259
260
|
el harness y no crea el stack tecnológico de la aplicación.
|
|
260
261
|
|
|
261
262
|
### Cómo se ve el éxito
|
|
@@ -345,8 +346,8 @@ Guards habituales:
|
|
|
345
346
|
|
|
346
347
|
## Release actual
|
|
347
348
|
|
|
348
|
-
- npm package: `repo-harness@0.
|
|
349
|
-
- Generated workflow stamp: `repo-harness@0.
|
|
349
|
+
- npm package: `repo-harness@0.5.0`
|
|
350
|
+
- Generated workflow stamp: `repo-harness@0.5.0+template@0.5.0`
|
|
350
351
|
- GitHub repository: `Ancienttwo/repo-harness`
|
|
351
352
|
- Release history: [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
|
|
352
353
|
|
|
@@ -360,7 +361,7 @@ Guards habituales:
|
|
|
360
361
|
- `assets/workflow-contract.v1.json`
|
|
361
362
|
- Los generated repos usan por defecto el repo-local harness flow:
|
|
362
363
|
- `docs/spec.md -> plans/ -> tasks/contracts/ -> tasks/reviews/ -> .ai/context/context-map.json -> .ai/harness/*`
|
|
363
|
-
- `repo-harness update` refresca las runtime pieces:
|
|
364
|
+
- `repo-harness update` refresca las runtime pieces de usuario:
|
|
364
365
|
- los `repo-harness` skill aliases
|
|
365
366
|
- los global Codex/Claude hook adapters
|
|
366
367
|
- las Waza skills: `think`, `hunt`, `check`, `health`
|
|
@@ -393,7 +394,7 @@ compatibilidad de discovery por skills, mientras el CLI y los hooks ejecutan:
|
|
|
393
394
|
- 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`
|
|
394
395
|
- Branch project creation: `repo-harness-scaffold`
|
|
395
396
|
|
|
396
|
-
`repo-harness
|
|
397
|
+
`repo-harness adopt` se usa para repositorios existentes; `repo-harness-scaffold`
|
|
397
398
|
queda como branch command para crear proyectos o módulos nuevos. `hooks-init`, `docs-init` y
|
|
398
399
|
`create-project-dirs` son pasos internos, no commands públicos.
|
|
399
400
|
|
package/README.fr.md
CHANGED
|
@@ -42,7 +42,7 @@ workflow repo-local qu'il génère lui-même pour les projets en aval.
|
|
|
42
42
|
optionnels selon le type de projet, et quatre hook profiles (`standard`,
|
|
43
43
|
`minimal`, `biome`, `biome-strict`). Exécutez
|
|
44
44
|
`npx -y repo-harness init` ; aucun clone du dépôt source n'est nécessaire.
|
|
45
|
-
- **Commande
|
|
45
|
+
- **Commande d'adoption du dépôt (`repo-harness adopt`).** L'installation
|
|
46
46
|
et le rafraîchissement des dépôts existants ont leur propre surface de commande,
|
|
47
47
|
tout en conservant l'ancien chemin de migration repo-local et en gardant `init`
|
|
48
48
|
dédié au runtime global.
|
|
@@ -102,7 +102,7 @@ L'ensemble se découpe en trois couches :
|
|
|
102
102
|
1. **Couche package source** : ce dépôt maintient le CLI, les command skill
|
|
103
103
|
facades, les templates, les hook assets, le workflow contract, les tests et le
|
|
104
104
|
release gate.
|
|
105
|
-
2. **Couche contrat du dépôt cible** : `repo-harness
|
|
105
|
+
2. **Couche contrat du dépôt cible** : `repo-harness adopt` ou une migration écrit
|
|
106
106
|
`docs/spec.md`, `plans/`, `tasks/`, `.ai/context/`, `.ai/harness/`, les helper
|
|
107
107
|
scripts et `.ai/hooks/`.
|
|
108
108
|
3. **Couche host adapter** : les `~/.claude/settings.json` et `~/.codex/hooks.json`
|
|
@@ -213,8 +213,8 @@ npx -y repo-harness init
|
|
|
213
213
|
|
|
214
214
|
La release line du package npm et le generated workflow stamp utilisent
|
|
215
215
|
désormais la même ligne `0.4.x`. `repo-harness init`
|
|
216
|
-
sert au bootstrap global
|
|
217
|
-
repo-local. `repo-harness init` configure le CLI, les hook adapters de niveau
|
|
216
|
+
sert au bootstrap global, `repo-harness update` au rafraîchissement
|
|
217
|
+
user-level, et `repo-harness adopt` au rafraîchissement repo-local. `repo-harness init` configure le CLI, les hook adapters de niveau
|
|
218
218
|
utilisateur, Waza, Mermaid, le brain root et CodeGraph MCP ; l'ancien chemin
|
|
219
219
|
Claude plugin `scripts/setup-plugins.sh` est retiré.
|
|
220
220
|
|
|
@@ -250,17 +250,17 @@ sont supprimés par `scripts/sync-codex-installed-copies.sh`.
|
|
|
250
250
|
Pour un dépôt existant, exécutez depuis le repo root :
|
|
251
251
|
|
|
252
252
|
```bash
|
|
253
|
-
npx -y repo-harness
|
|
253
|
+
npx -y repo-harness adopt --dry-run
|
|
254
254
|
```
|
|
255
255
|
|
|
256
256
|
Appliquez seulement une fois que le rapport du dry-run est correct :
|
|
257
257
|
|
|
258
258
|
```bash
|
|
259
|
-
npx -y repo-harness
|
|
259
|
+
npx -y repo-harness adopt
|
|
260
260
|
```
|
|
261
261
|
|
|
262
262
|
Pour un nouveau projet ou un nouveau module, utilisez la branch command
|
|
263
|
-
`repo-harness-scaffold`. Pour un dépôt existant, utilisez `repo-harness
|
|
263
|
+
`repo-harness-scaffold`. Pour un dépôt existant, utilisez `repo-harness adopt` ;
|
|
264
264
|
il installe ou rafraîchit le harness sans créer de stack applicatif.
|
|
265
265
|
|
|
266
266
|
### À quoi ressemble le succès
|
|
@@ -350,8 +350,8 @@ Guards courants :
|
|
|
350
350
|
|
|
351
351
|
## Release actuelle
|
|
352
352
|
|
|
353
|
-
- npm package : `repo-harness@0.
|
|
354
|
-
- Generated workflow stamp : `repo-harness@0.
|
|
353
|
+
- npm package : `repo-harness@0.5.0`
|
|
354
|
+
- Generated workflow stamp : `repo-harness@0.5.0+template@0.5.0`
|
|
355
355
|
- GitHub repository : `Ancienttwo/repo-harness`
|
|
356
356
|
- Release history : [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
|
|
357
357
|
|
|
@@ -365,7 +365,7 @@ Guards courants :
|
|
|
365
365
|
- `assets/workflow-contract.v1.json`
|
|
366
366
|
- Les generated repos utilisent par défaut le repo-local harness flow :
|
|
367
367
|
- `docs/spec.md -> plans/ -> tasks/contracts/ -> tasks/reviews/ -> .ai/context/context-map.json -> .ai/harness/*`
|
|
368
|
-
- `repo-harness update` rafraîchit les runtime pieces :
|
|
368
|
+
- `repo-harness update` rafraîchit les runtime pieces utilisateur :
|
|
369
369
|
- les `repo-harness` skill aliases
|
|
370
370
|
- les global Codex/Claude hook adapters
|
|
371
371
|
- les Waza skills : `think`, `hunt`, `check`, `health`
|
|
@@ -399,7 +399,7 @@ aux hooks :
|
|
|
399
399
|
- 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`
|
|
400
400
|
- Branch project creation : `repo-harness-scaffold`
|
|
401
401
|
|
|
402
|
-
`repo-harness
|
|
402
|
+
`repo-harness adopt` sert aux dépôts existants ; `repo-harness-scaffold` sert de
|
|
403
403
|
branch command pour créer un nouveau projet ou module. `hooks-init`, `docs-init` et
|
|
404
404
|
`create-project-dirs` sont des étapes internes, pas des commands publiques.
|
|
405
405
|
|
package/README.ja.md
CHANGED
|
@@ -34,7 +34,7 @@ skill runtime を提供します。
|
|
|
34
34
|
commit/pending)、プロジェクト種別ごとのオプション LSP plugins、そして 4 段階の hook profile
|
|
35
35
|
(`standard`、`minimal`、`biome`、`biome-strict`)を扱います。
|
|
36
36
|
実行は `npx -y repo-harness init`。source checkout は不要です。
|
|
37
|
-
- **Repo
|
|
37
|
+
- **Repo adoption コマンド(`repo-harness adopt`)。** 既存 repo の install / refresh は
|
|
38
38
|
独立した command surface になり、従来の repo-local migration path を保ちながら
|
|
39
39
|
`init` は global runtime setup に集中します。
|
|
40
40
|
- **CodeGraph index の自己修復。** prompt hook が構造的な code-navigation intent を検出し、
|
|
@@ -79,7 +79,7 @@ product boundary は意図的に地味です。対象リポジトリを検査し
|
|
|
79
79
|
|
|
80
80
|
1. **ソースパッケージ層**:本リポジトリが CLI、CLI-backed command facades、templates、hook assets、
|
|
81
81
|
workflow contract、tests、release gate を所有します。
|
|
82
|
-
2. **対象リポジトリ contract 層**:`repo-harness
|
|
82
|
+
2. **対象リポジトリ contract 層**:`repo-harness adopt` または migration が、`docs/spec.md`、
|
|
83
83
|
`plans/`、`tasks/`、`.ai/context/`、`.ai/harness/`、helper scripts、`.ai/hooks/` といった
|
|
84
84
|
repo-local ファイルを書き込みます。
|
|
85
85
|
3. **Host adapter 層**:user-level の `~/.claude/settings.json` と `~/.codex/hooks.json` が
|
|
@@ -180,7 +180,7 @@ npx -y repo-harness init
|
|
|
180
180
|
|
|
181
181
|
npm package と generated workflow stamp は現在同じ `0.4.x` release line を使います。
|
|
182
182
|
`repo-harness init` は global bootstrap、`repo-harness update` は
|
|
183
|
-
repo-local refresh です。`repo-harness init` は CLI、user-level hook adapters、Waza、Mermaid、
|
|
183
|
+
user-level refresh、`repo-harness adopt` は repo-local refresh です。`repo-harness init` は CLI、user-level hook adapters、Waza、Mermaid、
|
|
184
184
|
brain root、CodeGraph MCP を設定し、退役した `scripts/setup-plugins.sh` の Claude plugin path は使いません。
|
|
185
185
|
|
|
186
186
|
ソースの checkout から作業する場合:
|
|
@@ -214,17 +214,17 @@ symlink に裏打ちされた runtime entrypoint です。退役した `repo-har
|
|
|
214
214
|
既存リポジトリでは repo root から実行します。
|
|
215
215
|
|
|
216
216
|
```bash
|
|
217
|
-
npx -y repo-harness
|
|
217
|
+
npx -y repo-harness adopt --dry-run
|
|
218
218
|
```
|
|
219
219
|
|
|
220
220
|
dry-run のレポートが正しいことを確認してから適用します。
|
|
221
221
|
|
|
222
222
|
```bash
|
|
223
|
-
npx -y repo-harness
|
|
223
|
+
npx -y repo-harness adopt
|
|
224
224
|
```
|
|
225
225
|
|
|
226
226
|
新しいプロジェクトやモジュールには支線 command `repo-harness-scaffold` を使います。既存リポジトリには
|
|
227
|
-
`repo-harness
|
|
227
|
+
`repo-harness adopt` を使います。これは harness をインストールまたはリフレッシュするもので、アプリケーション
|
|
228
228
|
スタックは作成しません。
|
|
229
229
|
|
|
230
230
|
### 成功した状態
|
|
@@ -312,8 +312,8 @@ hook がブロックしたときは、まず terminal の構造化された出
|
|
|
312
312
|
|
|
313
313
|
## 現在の Release
|
|
314
314
|
|
|
315
|
-
- npm package:`repo-harness@0.
|
|
316
|
-
- Generated workflow stamp:`repo-harness@0.
|
|
315
|
+
- npm package:`repo-harness@0.5.0`
|
|
316
|
+
- Generated workflow stamp:`repo-harness@0.5.0+template@0.5.0`
|
|
317
317
|
- GitHub repository:`Ancienttwo/repo-harness`
|
|
318
318
|
- Release history:[`docs/CHANGELOG.md`](docs/CHANGELOG.md)
|
|
319
319
|
|
|
@@ -327,7 +327,7 @@ hook がブロックしたときは、まず terminal の構造化された出
|
|
|
327
327
|
- `assets/workflow-contract.v1.json`
|
|
328
328
|
- Generated repos はデフォルトで repo-local harness flow を使います:
|
|
329
329
|
- `docs/spec.md -> plans/ -> tasks/contracts/ -> tasks/reviews/ -> .ai/context/context-map.json -> .ai/harness/*`
|
|
330
|
-
- `repo-harness update` は runtime pieces をリフレッシュします:
|
|
330
|
+
- `repo-harness update` は user-level runtime pieces をリフレッシュします:
|
|
331
331
|
- `repo-harness` skill aliases
|
|
332
332
|
- global Codex/Claude hook adapters
|
|
333
333
|
- Waza skills:`think`、`hunt`、`check`、`health`
|
|
@@ -358,7 +358,7 @@ knowledge sync、handoff retrieval の workflow 設計に影響を与えてい
|
|
|
358
358
|
- 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`
|
|
359
359
|
- Branch project creation:`repo-harness-scaffold`
|
|
360
360
|
|
|
361
|
-
`repo-harness
|
|
361
|
+
`repo-harness adopt` は既存リポジトリ向け、`repo-harness-scaffold` は支線 command として新しいプロジェクトやモジュールを作成します。
|
|
362
362
|
`hooks-init`、`docs-init`、`create-project-dirs` は内部ステップであり、公開 commands ではありません。
|
|
363
363
|
|
|
364
364
|
## Maintainer Reference
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# repo-harness
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
|
-
<img src="docs/images/
|
|
4
|
+
<img src="docs/images/image.png" alt="One next button joining Claude and Codex under repo-harness workflow rules" width="760">
|
|
5
5
|
</p>
|
|
6
6
|
|
|
7
7
|
Repo-local agentic development harness CLI and skill runtime for Claude/Codex
|
|
@@ -34,20 +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
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
-
|
|
50
|
-
|
|
37
|
+
In an adopted repo, the surface area is intentionally small:
|
|
38
|
+
|
|
39
|
+
| Surface | Purpose |
|
|
40
|
+
| --- | --- |
|
|
41
|
+
| `docs/spec.md` and `docs/reference-configs/` | Shared standards and stable product intent that every agent session can read. |
|
|
42
|
+
| `plans/`, `plans/prds/`, and `plans/sprints/` | Decision-complete work packages before implementation starts. |
|
|
43
|
+
| `tasks/contracts/`, `tasks/reviews/`, and `.ai/harness/checks/` | Scope, verification, and review evidence for proving the work is done. |
|
|
44
|
+
| `.ai/harness/handoff/` and `tasks/current.md` | Session journal and resumable status, derived from workflow artifacts instead of chat memory. |
|
|
45
|
+
|
|
46
|
+
## What's New in 0.5.0
|
|
47
|
+
|
|
48
|
+
- **Clean command boundary.** `repo-harness update` now refreshes only the
|
|
49
|
+
user-level CLI/runtime surface, while `repo-harness adopt` owns repo-local
|
|
50
|
+
workflow install, refresh, and migration.
|
|
51
|
+
- **Package-dispatched helper runtime.** Generated `scripts/*` wrappers can
|
|
52
|
+
delegate through `repo-harness run <helper>`, so adopted repos do not need to
|
|
53
|
+
vendor every helper implementation when the installed package already owns it.
|
|
54
|
+
- **Eight managed hook routes.** The README now documents the exact hook route
|
|
55
|
+
matrix that Claude and Codex adapters install: session context, edit guards,
|
|
56
|
+
delegated-agent routing, post-edit and post-bash observers, always-on trace,
|
|
57
|
+
prompt routing, and stop closeout.
|
|
58
|
+
- **Release-ready install examples.** The first-run and refresh commands now
|
|
59
|
+
show the split between machine bootstrap, user-level updates, read-only setup
|
|
60
|
+
audit, and repo-local adoption.
|
|
51
61
|
|
|
52
62
|
## What repo-harness Does
|
|
53
63
|
|
|
@@ -72,7 +82,7 @@ The design has three layers:
|
|
|
72
82
|
|
|
73
83
|
1. **Source package**: this repository owns the CLI, CLI-backed command facades,
|
|
74
84
|
templates, hook assets, workflow contract, tests, and release gate.
|
|
75
|
-
2. **Target repo contract**: `repo-harness
|
|
85
|
+
2. **Target repo contract**: `repo-harness adopt` or migration writes repo-local
|
|
76
86
|
files such as `docs/spec.md`, `plans/`, `tasks/`, `.ai/context/`,
|
|
77
87
|
`.ai/harness/`, helper scripts, and `.ai/hooks/`.
|
|
78
88
|
3. **Host adapters**: user-level `~/.claude/settings.json` and
|
|
@@ -200,9 +210,11 @@ concrete sprint instead of reinterpreting the original chat.
|
|
|
200
210
|
## First 5 Minutes
|
|
201
211
|
|
|
202
212
|
This is the fastest path for an AI tooling owner evaluating whether the workflow is
|
|
203
|
-
safe to adopt in a real repo.
|
|
213
|
+
safe to adopt in a real repo. It separates the machine-level runtime bootstrap
|
|
214
|
+
from the repo-local contract install, so a dry run can show exactly what will
|
|
215
|
+
change before anything is applied.
|
|
204
216
|
|
|
205
|
-
###
|
|
217
|
+
### 1. Bootstrap the host runtime once
|
|
206
218
|
|
|
207
219
|
```bash
|
|
208
220
|
npx -y repo-harness init
|
|
@@ -214,27 +226,53 @@ user-level hook adapters, configures Waza runtime skills, persists a brain root
|
|
|
214
226
|
under `~/.repo-harness/config.json`, and configures CodeGraph MCP. It does not
|
|
215
227
|
apply repo-local workflow files to the current directory.
|
|
216
228
|
|
|
217
|
-
|
|
229
|
+
For an Agent-owned, read-only bootstrap audit, run `npx -y repo-harness setup
|
|
230
|
+
check --json` or add `--check-updates` for version advisories. `setup check` is
|
|
231
|
+
not a runtime hook: it does not write user-level files, install updates, or
|
|
232
|
+
register adapters. It emits `agent_actions` with the reason, risk, target files,
|
|
233
|
+
optional command, and verification surface for the Agent to execute deliberately.
|
|
234
|
+
`repo-harness init-hook` remains a compatibility alias.
|
|
235
|
+
|
|
236
|
+
### Install and refresh examples
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
# First machine bootstrap: global CLI, skills, host adapters, Waza, brain, CodeGraph.
|
|
240
|
+
npx -y repo-harness init
|
|
241
|
+
|
|
242
|
+
# Refresh user-level CLI/runtime pieces after a package update.
|
|
243
|
+
repo-harness update
|
|
244
|
+
|
|
245
|
+
# Ask for read-only repair guidance without writing files.
|
|
246
|
+
repo-harness update --check
|
|
247
|
+
|
|
248
|
+
# Refresh repo-local workflow files in an adopted repository.
|
|
249
|
+
repo-harness adopt --repo /path/to/repo
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
### 2. Preview the repo-local contract
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
npx -y repo-harness adopt --dry-run
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
Run the dry run from the target repository root. It reports the specs, task
|
|
259
|
+
state, helper runtime, hook adapter target, and verification files that would be
|
|
260
|
+
created or refreshed. It should not create an application stack; existing repos
|
|
261
|
+
use `repo-harness adopt`, while new projects or modules use
|
|
262
|
+
`repo-harness-scaffold`.
|
|
263
|
+
|
|
264
|
+
### 3. Apply, then prove the workflow
|
|
218
265
|
|
|
219
266
|
```bash
|
|
220
|
-
npx -y repo-harness
|
|
221
|
-
|
|
267
|
+
npx -y repo-harness adopt
|
|
268
|
+
bash scripts/check-task-workflow.sh --strict
|
|
269
|
+
bun test
|
|
222
270
|
```
|
|
223
271
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
The npm package and generated workflow stamp now share the `0.4.x` release line.
|
|
229
|
-
The `0.4.2` package keeps first-run
|
|
230
|
-
global bootstrap (`repo-harness init`) separate from repo-local refresh
|
|
231
|
-
(`repo-harness update`) while adding the PRD-to-Sprint planning hierarchy,
|
|
232
|
-
isolated generated-project helper runtime, subagent return-channel guard, and
|
|
233
|
-
release-path alignment on top of the `0.4.0` loop-engine surfaces.
|
|
234
|
-
These sit on top of the renamed `repo-harness` CLI, user-level hook
|
|
235
|
-
adapter bootstrap, AI-native scaffold overlays, the typed prompt-guard decision
|
|
236
|
-
engine, plan-stem task artifact naming, `REPO_HARNESS_*` runtime aliases, Waza
|
|
237
|
-
runtime skill sync, and the maintainer release gate.
|
|
272
|
+
After apply, the repo should have a reviewable file-backed contract rather than
|
|
273
|
+
tool-specific chat setup. Agents should be able to find the stable intent in
|
|
274
|
+
`docs/spec.md`, execution state in `plans/` and `tasks/`, and resume state in
|
|
275
|
+
`.ai/harness/handoff/`.
|
|
238
276
|
|
|
239
277
|
Only maintainers editing the package need a source checkout:
|
|
240
278
|
|
|
@@ -269,17 +307,17 @@ Claude/Codex paths are symlink-backed runtime entrypoints. Only
|
|
|
269
307
|
For an existing repo, run from the repo root:
|
|
270
308
|
|
|
271
309
|
```bash
|
|
272
|
-
npx -y repo-harness
|
|
310
|
+
npx -y repo-harness adopt --dry-run
|
|
273
311
|
```
|
|
274
312
|
|
|
275
313
|
Apply only after the dry-run report looks correct:
|
|
276
314
|
|
|
277
315
|
```bash
|
|
278
|
-
npx -y repo-harness
|
|
316
|
+
npx -y repo-harness adopt
|
|
279
317
|
```
|
|
280
318
|
|
|
281
319
|
For a new project or module, use the branch command `repo-harness-scaffold`. For
|
|
282
|
-
an existing repo, use `repo-harness
|
|
320
|
+
an existing repo, use `repo-harness adopt`; it installs or refreshes the harness
|
|
283
321
|
without creating an application stack.
|
|
284
322
|
|
|
285
323
|
### Success looks like this
|
|
@@ -293,13 +331,6 @@ The command should end with `=== Migration Report ===` and summarize:
|
|
|
293
331
|
- `Helper runtime:` to show `.ai/harness/scripts/*` implementations and `scripts/*` compatibility wrappers after apply
|
|
294
332
|
- `--- External Tooling ---` to show default gstack/Waza/gbrain routing plus advisory install/update hints
|
|
295
333
|
|
|
296
|
-
### Next two commands
|
|
297
|
-
|
|
298
|
-
```bash
|
|
299
|
-
bash scripts/check-task-workflow.sh --strict
|
|
300
|
-
bun test
|
|
301
|
-
```
|
|
302
|
-
|
|
303
334
|
If the dry-run output looks wrong, stop there and inspect
|
|
304
335
|
[`docs/reference-configs/hook-operations.md`](docs/reference-configs/hook-operations.md)
|
|
305
336
|
before applying anything.
|
|
@@ -312,7 +343,22 @@ before applying anything.
|
|
|
312
343
|
- Repo-local `.claude/settings.json` and `.codex/hooks.json` hook adapters are legacy project-level config and should be retired during migration.
|
|
313
344
|
- Codex must mark `~/.codex/hooks.json` as trusted in Codex Settings before those hooks run.
|
|
314
345
|
- Debug in this order: user-level adapter config -> `repo-harness-hook` (or fallback `repo-harness hook`) -> route registry -> `.ai/hooks/*`.
|
|
315
|
-
- If `repo-harness-hook` reports `.ai/hooks` drift, refresh the repo-local copy with `repo-harness
|
|
346
|
+
- If `repo-harness-hook` reports `.ai/hooks` drift, refresh the repo-local copy with `repo-harness adopt --repo <root>`.
|
|
347
|
+
|
|
348
|
+
The installed adapter owns eight managed hook routes. The route tuple
|
|
349
|
+
`event + routeId + matcher` is the stable contract; script names are the current
|
|
350
|
+
implementation under `assets/hooks/` or a repo-pinned `.ai/hooks/` copy.
|
|
351
|
+
|
|
352
|
+
| Route | Matcher | Scripts | Function |
|
|
353
|
+
| --- | --- | --- | --- |
|
|
354
|
+
| `SessionStart.default` | all sessions | `session-start-context.sh`, `security-sentinel.sh` | Injects prior handoff, sprint status, and read-only config-security findings before work starts. |
|
|
355
|
+
| `PreToolUse.edit` | `Edit|Write` | `worktree-guard.sh`, `pre-edit-guard.sh` | Enforces worktree policy and plan/contract readiness before implementation edits. |
|
|
356
|
+
| `PreToolUse.subagent` | `Task|Agent|SendUserMessage` | `subagent-return-channel-guard.sh` | Keeps delegated work returning through the parent session instead of leaking completion claims. |
|
|
357
|
+
| `PostToolUse.edit` | `Edit|Write` | `post-edit-guard.sh` | Records edit traces, refreshes handoff/task status, and queues architecture drift when controlled files change. |
|
|
358
|
+
| `PostToolUse.bash` | `Bash` | `post-bash.sh` | Observes command results and captures verification evidence without replacing the command runner. |
|
|
359
|
+
| `PostToolUse.always` | all tools | `post-tool-observer.sh` | Provides low-noise always-on trace and runtime observation; stale pinned copies soft-skip with a refresh hint. |
|
|
360
|
+
| `UserPromptSubmit.default` | all prompts | `prompt-guard.sh` | Classifies prompt intent, routes planning/check/hunt hints, and renders host-safe workflow guidance. |
|
|
361
|
+
| `Stop.default` | session stop | `stop-orchestrator.sh` | Finalizes handoff and guards against ending with unresolved draft-plan or completion evidence gaps. |
|
|
316
362
|
|
|
317
363
|
`SessionStart` resolves hooks central-first, then runs two ordered scripts before
|
|
318
364
|
work begins:
|
|
@@ -381,8 +427,8 @@ Most common guards:
|
|
|
381
427
|
|
|
382
428
|
## Current Release
|
|
383
429
|
|
|
384
|
-
- npm package: `repo-harness@0.
|
|
385
|
-
- Generated workflow stamp: `repo-harness@0.
|
|
430
|
+
- npm package: `repo-harness@0.5.0`
|
|
431
|
+
- Generated workflow stamp: `repo-harness@0.5.0+template@0.5.0`
|
|
386
432
|
- GitHub repository: `Ancienttwo/repo-harness`
|
|
387
433
|
- Release history: [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
|
|
388
434
|
|
|
@@ -471,7 +517,7 @@ skill discovery compatible while the CLI and hooks own execution:
|
|
|
471
517
|
- 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`
|
|
472
518
|
- Branch project creation command: `repo-harness-scaffold`
|
|
473
519
|
|
|
474
|
-
`repo-harness
|
|
520
|
+
`repo-harness adopt` is for an existing repo; `repo-harness-scaffold` creates a
|
|
475
521
|
new project or module scaffold as a side command. `hooks-init`, `docs-init`, and
|
|
476
522
|
`create-project-dirs` are internal steps, not public commands.
|
|
477
523
|
|
|
@@ -527,6 +573,22 @@ bun scripts/inspect-project-state.ts --repo . --format text
|
|
|
527
573
|
bash scripts/migrate-project-template.sh --repo . --dry-run
|
|
528
574
|
```
|
|
529
575
|
|
|
576
|
+
### Runtime reference docs
|
|
577
|
+
|
|
578
|
+
Generic repo-harness runtime/reference docs live in the installed package under
|
|
579
|
+
`assets/reference-configs/` and are resolved through the CLI:
|
|
580
|
+
|
|
581
|
+
```bash
|
|
582
|
+
repo-harness docs list
|
|
583
|
+
repo-harness docs path harness-overview
|
|
584
|
+
repo-harness docs show harness-overview
|
|
585
|
+
```
|
|
586
|
+
|
|
587
|
+
Generated and migrated repos still keep `docs/reference-configs/*.md`, but
|
|
588
|
+
those files are deterministic pointer stubs. Repo-local workflow state,
|
|
589
|
+
policy, checks, runs, handoff packets, context maps, and helper snapshots stay
|
|
590
|
+
under `.ai/`.
|
|
591
|
+
|
|
530
592
|
### Explicit template assembly
|
|
531
593
|
|
|
532
594
|
```bash
|
|
@@ -556,8 +618,9 @@ bun run benchmark:skills --eval repair-agents-task-sync
|
|
|
556
618
|
- Plan mapping: `assets/plan-map.json`
|
|
557
619
|
- Question-pack: `assets/initializer-question-pack.v4.json`
|
|
558
620
|
- Shared hooks: `assets/hooks/`
|
|
621
|
+
- Runtime reference docs: `assets/reference-configs/` via `repo-harness docs`
|
|
559
622
|
- Workflow contract: `assets/workflow-contract.v1.json`
|
|
560
|
-
-
|
|
623
|
+
- Source repo reference docs: `docs/reference-configs/*.md`
|
|
561
624
|
- Template assembler: `scripts/assemble-template.ts`
|
|
562
625
|
- Question inference helper: `scripts/initializer-question-pack.ts`
|
|
563
626
|
- State inspector: `scripts/inspect-project-state.ts`
|