repo-harness 0.5.0 → 0.5.1

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 (37) hide show
  1. package/README.es.md +67 -14
  2. package/README.fr.md +69 -14
  3. package/README.ja.md +62 -10
  4. package/README.md +78 -17
  5. package/README.zh-CN.md +73 -13
  6. package/SKILL.md +1 -0
  7. package/assets/hooks/session-start-context.sh +130 -0
  8. package/assets/reference-configs/agentic-development-flow.md +2 -1
  9. package/assets/reference-configs/external-tooling.md +29 -2
  10. package/assets/reference-configs/sprint-contracts.md +4 -0
  11. package/assets/skill-commands/manifest.json +9 -2
  12. package/assets/skill-commands/repo-harness-goal/SKILL.md +51 -0
  13. package/assets/skill-commands/repo-harness-prd/SKILL.md +15 -6
  14. package/assets/skill-version.json +6 -2
  15. package/assets/templates/helpers/check-agent-tooling.sh +114 -4
  16. package/assets/templates/helpers/ensure-task-workflow.sh +1 -1
  17. package/assets/templates/helpers/verify-contract.sh +12 -4
  18. package/install.ps1 +53 -0
  19. package/install.sh +71 -0
  20. package/package.json +5 -2
  21. package/scripts/check-agent-tooling.sh +114 -4
  22. package/scripts/check-ci.sh +36 -0
  23. package/scripts/check-npm-release.sh +1 -17
  24. package/scripts/ensure-task-workflow.sh +1 -1
  25. package/scripts/lib/project-init-lib.sh +1 -1
  26. package/scripts/migrate-project-template.sh +31 -30
  27. package/scripts/sync-codex-installed-copies.sh +23 -7
  28. package/scripts/verify-contract.sh +12 -4
  29. package/src/cli/commands/doctor.ts +29 -6
  30. package/src/cli/commands/global-runtime.ts +2 -2
  31. package/src/cli/commands/init-hook.ts +59 -0
  32. package/src/cli/commands/init.ts +44 -34
  33. package/src/cli/commands/security.ts +2 -2
  34. package/src/cli/commands/status.ts +13 -1
  35. package/src/cli/hook/runtime.ts +1 -1
  36. package/src/cli/index.ts +2 -2
  37. package/src/cli/installer/managed-entries.ts +1 -1
package/README.es.md CHANGED
@@ -1,17 +1,26 @@
1
1
  # repo-harness
2
2
 
3
- Repo-local agentic development harness CLI y skill runtime para workflows de
4
- Claude/Codex.
3
+ `repo-harness` convierte las sesiones de programación con Claude/Codex en un
4
+ workflow repo-local repetible. Incluye un CLI y hooks de skill/runtime que
5
+ escriben contexto, planes, handoffs, checks y evidencias de review dentro del
6
+ proyecto, para que la siguiente sesión de agente continúe desde archivos y no
7
+ desde el historial de chat.
8
+
9
+ Úsalo para:
10
+
11
+ - adoptar un repositorio existente con un contrato de agente tasks-first
12
+ - mantener Claude y Codex alineados sobre los mismos planes, checks, handoffs y
13
+ límites de contexto
14
+ - gastar menos tokens redescubriendo estructura gracias a CodeGraph y la carga
15
+ progresiva de contexto
16
+
17
+ Entrega al agente un PRD o Sprint completo; después, tu bucle es solo review and
18
+ `next`, o iniciar `/goal` y quedar AFK.
5
19
 
6
20
  [English](README.md) | [简体中文](README.zh-CN.md) | [日本語](README.ja.md) | [Français](README.fr.md) | [Español](README.es.md)
7
21
 
8
22
  Dirección del repositorio: `https://github.com/Ancienttwo/repo-harness`
9
23
 
10
- `repo-harness` es un harness de workflow que aterriza el proceso de programación
11
- con IA en archivos del repositorio. Es a la vez el repositorio fuente de la CLI
12
- `repo-harness` y de su skill runtime, y el ejemplo autoalojado del workflow
13
- repo-local que él mismo genera para los proyectos downstream.
14
-
15
24
  ## Por qué usar repo-harness
16
25
 
17
26
  - **El estado de la sesión vive en archivos, no en el historial de chat.** Las
@@ -200,16 +209,41 @@ retoma contra un sprint concreto en vez de reinterpretar el chat original.
200
209
  Esta es la ruta más rápida para evaluar si un repositorio real es apto para
201
210
  adoptar este workflow.
202
211
 
203
- ### Instalar o refrescar el runtime local
212
+ ### Instalar el CLI
213
+
214
+ La ruta por defecto no requiere Node.js: el instalador usa Bun como runtime. Si
215
+ Bun no existe, instala Bun primero y después instala el CLI `repo-harness`.
216
+
217
+ ```bash
218
+ # macOS / Linux
219
+ curl -fsSL https://raw.githubusercontent.com/Ancienttwo/repo-harness/main/install.sh | sh
220
+
221
+ # Windows (PowerShell)
222
+ irm https://raw.githubusercontent.com/Ancienttwo/repo-harness/main/install.ps1 | iex
223
+ ```
224
+
225
+ <details>
226
+ <summary>¿Ya tienes Bun o Node? Usa gestores de paquetes</summary>
204
227
 
205
228
  ```bash
229
+ # Bun
230
+ bun add -g repo-harness
231
+ repo-harness init
232
+
233
+ # Node/npm, con Bun ya en PATH porque el CLI corre sobre Bun
206
234
  npx -y repo-harness init
207
235
  ```
208
236
 
209
- La npm package release line y el generated workflow stamp usan ahora la misma
210
- línea `0.4.x`. `repo-harness init` es el bootstrap
211
- global, `repo-harness update` es el refresco user-level y `repo-harness adopt`
212
- es el refresco repo-local. `repo-harness init`
237
+ </details>
238
+
239
+ ### Bootstrap del runtime del host
240
+
241
+ ```bash
242
+ repo-harness init
243
+ ```
244
+
245
+ `repo-harness init` es el bootstrap global, `repo-harness update` es el refresco
246
+ user-level y `repo-harness adopt` es el refresco repo-local. `repo-harness init`
213
247
  configura el CLI, los hook adapters de nivel usuario, Waza, Mermaid, el brain
214
248
  root y CodeGraph MCP; el viejo camino Claude plugin `scripts/setup-plugins.sh`
215
249
  queda retirado.
@@ -346,8 +380,8 @@ Guards habituales:
346
380
 
347
381
  ## Release actual
348
382
 
349
- - npm package: `repo-harness@0.5.0`
350
- - Generated workflow stamp: `repo-harness@0.5.0+template@0.5.0`
383
+ - npm package: `repo-harness@0.5.1`
384
+ - Generated workflow stamp: `repo-harness@0.5.1+template@0.5.1`
351
385
  - GitHub repository: `Ancienttwo/repo-harness`
352
386
  - Release history: [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
353
387
 
@@ -391,9 +425,28 @@ Los command facades públicos están en `assets/skill-commands/`; preservan la
391
425
  compatibilidad de discovery por skills, mientras el CLI y los hooks ejecutan:
392
426
 
393
427
  - Planning / review: `repo-harness-plan`, `repo-harness-review`, `repo-harness-autoplan`
428
+ - Product planning layer: `repo-harness-prd` (activa `$geju`, luego usa drafting Claude-first con `claude -p --model opus`; Codex queda solo como fallback)
429
+ - Sprint program layer: `repo-harness-sprint` (convierte un PRD en un backlog ordenado bajo `plans/sprints/`)
430
+ - Goal session layer: `repo-harness-goal` / `repo-harness:goal` (prepara prompts `/goal` de Codex/Claude desde un PRD o Sprint detallado; si falta el documento, lo pide primero)
394
431
  - 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`
395
432
  - Branch project creation: `repo-harness-scaffold`
396
433
 
434
+ La cadena de planning está separada por capas:
435
+
436
+ ```text
437
+ idea -> repo-harness-prd -> repo-harness-sprint from-prd -> repo-harness-goal
438
+ ```
439
+
440
+ Usa `repo-harness-prd` cuando la fuente todavía es una idea de producto: primero
441
+ ejecuta un direction pass con `$geju`, luego pide a Claude vía `claude -p --model opus` que
442
+ redacte el PRD, con Codex solo como fallback. Usa
443
+ `repo-harness-sprint from-prd <plans/prds/*.prd.md>` para convertir un PRD
444
+ aprobado en un Sprint backlog ordenado con acceptance lines verificables por
445
+ máquina. Usa `repo-harness-goal` solo cuando ya exista un PRD o Sprint detallado;
446
+ prepara un prompt `/goal` acotado para Codex/Claude y mantiene el PRD/Sprint como
447
+ source of truth. Si falta ese documento, el goal command debe pedirlo antes de
448
+ empezar implementación desde el chat.
449
+
397
450
  `repo-harness adopt` se usa para repositorios existentes; `repo-harness-scaffold`
398
451
  queda como branch command para crear proyectos o módulos nuevos. `hooks-init`, `docs-init` y
399
452
  `create-project-dirs` son pasos internos, no commands públicos.
package/README.fr.md CHANGED
@@ -1,17 +1,26 @@
1
1
  # repo-harness
2
2
 
3
- Harness CLI de développement agentique repo-local et skill runtime pour les
4
- workflows Claude/Codex.
3
+ `repo-harness` transforme les sessions de code Claude/Codex en workflow
4
+ repo-local répétable. Il fournit un CLI et des hooks skill/runtime qui écrivent
5
+ le contexte, les plans, les handoffs, les checks et les preuves de review dans le
6
+ projet, afin que la session d'agent suivante reprenne depuis les fichiers plutôt
7
+ que depuis l'historique de chat.
8
+
9
+ Utilisez-le pour :
10
+
11
+ - adopter un dépôt existant avec un contrat d'agent tasks-first
12
+ - garder Claude et Codex alignés sur les mêmes plans, checks, handoffs et limites
13
+ de contexte
14
+ - dépenser moins de tokens à redécouvrir la structure grâce à CodeGraph et au
15
+ chargement progressif du contexte
16
+
17
+ Donnez à l'agent un PRD ou Sprint complet ; ensuite, votre boucle se limite à
18
+ review and `next`, ou à lancer `/goal` puis passer AFK.
5
19
 
6
20
  [English](README.md) | [简体中文](README.zh-CN.md) | [日本語](README.ja.md) | [Français](README.fr.md) | [Español](README.es.md)
7
21
 
8
22
  Adresse du dépôt : `https://github.com/Ancienttwo/repo-harness`
9
23
 
10
- `repo-harness` est un harness de workflow qui matérialise le processus de
11
- programmation par IA dans les fichiers du dépôt. C'est à la fois le dépôt source
12
- du CLI `repo-harness` et de son skill runtime, et un exemple auto-hébergé du
13
- workflow repo-local qu'il génère lui-même pour les projets en aval.
14
-
15
24
  ## Pourquoi utiliser repo-harness
16
25
 
17
26
  - **L'état de session vit dans les fichiers, pas dans l'historique de chat.** Des
@@ -205,16 +214,43 @@ initial.
205
214
  C'est le chemin le plus rapide pour évaluer si un dépôt réel se prête à l'adoption
206
215
  de ce workflow.
207
216
 
208
- ### Installer ou rafraîchir le runtime local
217
+ ### Installer le CLI
218
+
219
+ Le chemin par défaut ne demande pas Node.js : l'installateur utilise Bun comme
220
+ runtime. Si Bun est absent, il installe Bun d'abord, puis installe le CLI
221
+ `repo-harness`.
222
+
223
+ ```bash
224
+ # macOS / Linux
225
+ curl -fsSL https://raw.githubusercontent.com/Ancienttwo/repo-harness/main/install.sh | sh
226
+
227
+ # Windows (PowerShell)
228
+ irm https://raw.githubusercontent.com/Ancienttwo/repo-harness/main/install.ps1 | iex
229
+ ```
230
+
231
+ <details>
232
+ <summary>Vous avez déjà Bun ou Node ? Utilisez les gestionnaires de packages</summary>
209
233
 
210
234
  ```bash
235
+ # Bun
236
+ bun add -g repo-harness
237
+ repo-harness init
238
+
239
+ # Node/npm, avec Bun déjà sur PATH car le CLI s'exécute sur Bun
211
240
  npx -y repo-harness init
212
241
  ```
213
242
 
214
- La release line du package npm et le generated workflow stamp utilisent
215
- désormais la même ligne `0.4.x`. `repo-harness init`
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
243
+ </details>
244
+
245
+ ### Bootstrap du runtime hôte
246
+
247
+ ```bash
248
+ repo-harness init
249
+ ```
250
+
251
+ `repo-harness init` sert au bootstrap global, `repo-harness update` au
252
+ rafraîchissement user-level, et `repo-harness adopt` au rafraîchissement
253
+ repo-local. `repo-harness init` configure le CLI, les hook adapters de niveau
218
254
  utilisateur, Waza, Mermaid, le brain root et CodeGraph MCP ; l'ancien chemin
219
255
  Claude plugin `scripts/setup-plugins.sh` est retiré.
220
256
 
@@ -350,8 +386,8 @@ Guards courants :
350
386
 
351
387
  ## Release actuelle
352
388
 
353
- - npm package : `repo-harness@0.5.0`
354
- - Generated workflow stamp : `repo-harness@0.5.0+template@0.5.0`
389
+ - npm package : `repo-harness@0.5.1`
390
+ - Generated workflow stamp : `repo-harness@0.5.1+template@0.5.1`
355
391
  - GitHub repository : `Ancienttwo/repo-harness`
356
392
  - Release history : [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
357
393
 
@@ -396,9 +432,28 @@ préservent la découverte par skills, tandis que l'exécution appartient au CLI
396
432
  aux hooks :
397
433
 
398
434
  - Planning / review : `repo-harness-plan`, `repo-harness-review`, `repo-harness-autoplan`
435
+ - Product planning layer : `repo-harness-prd` (active `$geju`, puis rédige en Claude-first avec `claude -p --model opus` ; Codex ne sert que de fallback)
436
+ - Sprint program layer : `repo-harness-sprint` (transforme un PRD en backlog ordonné dans `plans/sprints/`)
437
+ - Goal session layer : `repo-harness-goal` / `repo-harness:goal` (prépare des prompts `/goal` Codex/Claude depuis un PRD ou Sprint détaillé ; si le document manque, il le demande d'abord)
399
438
  - 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
439
  - Branch project creation : `repo-harness-scaffold`
401
440
 
441
+ La chaîne de planning est volontairement découpée en couches :
442
+
443
+ ```text
444
+ idea -> repo-harness-prd -> repo-harness-sprint from-prd -> repo-harness-goal
445
+ ```
446
+
447
+ Utilisez `repo-harness-prd` quand la source est encore une idée produit : il
448
+ lance d'abord un direction pass `$geju`, puis demande à Claude via `claude -p --model opus`
449
+ de rédiger le PRD, avec Codex seulement en fallback. Utilisez
450
+ `repo-harness-sprint from-prd <plans/prds/*.prd.md>` pour transformer
451
+ un PRD approuvé en Sprint backlog ordonné avec des lignes d'acceptance
452
+ vérifiables par machine. Utilisez `repo-harness-goal` seulement lorsqu'un PRD ou
453
+ Sprint détaillé existe déjà ; il prépare un prompt `/goal` borné pour
454
+ Codex/Claude et garde le PRD/Sprint comme source of truth. Si ce document manque,
455
+ le goal command doit le demander avant de lancer une implémentation depuis le chat.
456
+
402
457
  `repo-harness adopt` sert aux dépôts existants ; `repo-harness-scaffold` sert de
403
458
  branch command pour créer un nouveau projet ou module. `hooks-init`, `docs-init` et
404
459
  `create-project-dirs` sont des étapes internes, pas des commands publiques.
package/README.ja.md CHANGED
@@ -1,16 +1,23 @@
1
1
  # repo-harness
2
2
 
3
- Claude/Codex workflow 向けに、repo-local な agentic development harness の CLI と
4
- skill runtime を提供します。
3
+ `repo-harness` は、Claude/Codex のコーディング session を、繰り返し使える
4
+ repo-local workflow に変えます。CLI と skill/runtime hooks によって、context、plan、
5
+ handoff、check、review evidence をプロジェクト内のファイルへ書き戻し、次の agent session が
6
+ chat memory ではなくファイルから続きに入れるようにします。
7
+
8
+ 主な用途:
9
+
10
+ - 既存リポジトリへ tasks-first agent contract を導入する
11
+ - Claude と Codex を同じ plan、check、handoff、context boundary に揃える
12
+ - CodeGraph と段階的な context loading により、構造を再発見するための token 消費を減らす
13
+
14
+ Agent に完全な PRD または Sprint を渡せば、あとは review and `next` だけで進めるか、
15
+ `/goal` を開始して AFK できます。
5
16
 
6
17
  [English](README.md) | [简体中文](README.zh-CN.md) | [日本語](README.ja.md) | [Français](README.fr.md) | [Español](README.es.md)
7
18
 
8
19
  リポジトリ:`https://github.com/Ancienttwo/repo-harness`
9
20
 
10
- `repo-harness` は、AI 開発フローをリポジトリ内のファイルへ落とし込む workflow harness です。
11
- `repo-harness` CLI と skill runtime のソースリポジトリであると同時に、下流プロジェクト向けに
12
- 自身が生成する repo-local workflow を、自分自身に適用したセルフホスト例でもあります。
13
-
14
21
  ## なぜ repo-harness を使うのか
15
22
 
16
23
  - **セッションの状態はファイルに残り、チャット履歴には残らない。** 別々の agent
@@ -172,13 +179,39 @@ PRD Sprint が durable source of truth となり、Codex Goal mode は元の cha
172
179
 
173
180
  実際のリポジトリがこの workflow を導入するのに適しているかを評価する、最速の経路です。
174
181
 
175
- ### ローカル runtime をインストールまたはリフレッシュする
182
+ ### CLI をインストールする
183
+
184
+ 既定の経路では Node.js は不要です。installer は Bun を runtime として使います。
185
+ Bun が見つからない場合は、先に Bun をインストールしてから `repo-harness` CLI をインストールします。
186
+
187
+ ```bash
188
+ # macOS / Linux
189
+ curl -fsSL https://raw.githubusercontent.com/Ancienttwo/repo-harness/main/install.sh | sh
190
+
191
+ # Windows (PowerShell)
192
+ irm https://raw.githubusercontent.com/Ancienttwo/repo-harness/main/install.ps1 | iex
193
+ ```
194
+
195
+ <details>
196
+ <summary>Bun または Node がすでにある場合は package manager も使えます</summary>
176
197
 
177
198
  ```bash
199
+ # Bun
200
+ bun add -g repo-harness
201
+ repo-harness init
202
+
203
+ # Node/npm。CLI runtime は Bun なので、Bun が PATH 上に必要です。
178
204
  npx -y repo-harness init
179
205
  ```
180
206
 
181
- npm package と generated workflow stamp は現在同じ `0.4.x` release line を使います。
207
+ </details>
208
+
209
+ ### host runtime を bootstrap する
210
+
211
+ ```bash
212
+ repo-harness init
213
+ ```
214
+
182
215
  `repo-harness init` は global bootstrap、`repo-harness update` は
183
216
  user-level refresh、`repo-harness adopt` は repo-local refresh です。`repo-harness init` は CLI、user-level hook adapters、Waza、Mermaid、
184
217
  brain root、CodeGraph MCP を設定し、退役した `scripts/setup-plugins.sh` の Claude plugin path は使いません。
@@ -312,8 +345,8 @@ hook がブロックしたときは、まず terminal の構造化された出
312
345
 
313
346
  ## 現在の Release
314
347
 
315
- - npm package:`repo-harness@0.5.0`
316
- - Generated workflow stamp:`repo-harness@0.5.0+template@0.5.0`
348
+ - npm package:`repo-harness@0.5.1`
349
+ - Generated workflow stamp:`repo-harness@0.5.1+template@0.5.1`
317
350
  - GitHub repository:`Ancienttwo/repo-harness`
318
351
  - Release history:[`docs/CHANGELOG.md`](docs/CHANGELOG.md)
319
352
 
@@ -355,9 +388,28 @@ knowledge sync、handoff retrieval の workflow 設計に影響を与えてい
355
388
  公開 command facades は `assets/skill-commands/` にあります。host skill discovery との互換性を残しつつ、実行は CLI と hooks が担います。
356
389
 
357
390
  - Planning / review:`repo-harness-plan`、`repo-harness-review`、`repo-harness-autoplan`
391
+ - Product planning layer:`repo-harness-prd`(先に `$geju` を有効化し、Claude-first の `claude -p --model opus` で PRD を起草する。Codex は fallback のみ)
392
+ - Sprint program layer:`repo-harness-sprint`(PRD を `plans/sprints/` の順序付き backlog に分解する)
393
+ - Goal session layer:`repo-harness-goal` / `repo-harness:goal`(詳細な PRD または Sprint artifact から Codex/Claude の `/goal` prompt を準備する。文書がなければ先に要求する)
358
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`
359
395
  - Branch project creation:`repo-harness-scaffold`
360
396
 
397
+ planning chain は意図的に層を分けています。
398
+
399
+ ```text
400
+ idea -> repo-harness-prd -> repo-harness-sprint from-prd -> repo-harness-goal
401
+ ```
402
+
403
+ 入力がまだプロダクトアイデアなら `repo-harness-prd` を使います。まず `$geju` の
404
+ direction pass を行い、その後 Claude に `claude -p --model opus` で PRD を起草させます。Codex は
405
+ Claude が使えない、または失敗した場合だけ fallback です。承認済み PRD を
406
+ machine-checkable acceptance line 付きの順序付き Sprint backlog にするには
407
+ `repo-harness-sprint from-prd <plans/prds/*.prd.md>` を使います。
408
+ `repo-harness-goal` は詳細な PRD または Sprint artifact がある場合だけ使い、
409
+ Codex/Claude 向けの bounded `/goal` prompt を準備し、PRD/Sprint を source of truth
410
+ として維持します。その文書がない場合、goal command はチャット文脈から実装を始めず、
411
+ 先に文書を要求しなければなりません。
412
+
361
413
  `repo-harness adopt` は既存リポジトリ向け、`repo-harness-scaffold` は支線 command として新しいプロジェクトやモジュールを作成します。
362
414
  `hooks-init`、`docs-init`、`create-project-dirs` は内部ステップであり、公開 commands ではありません。
363
415
 
package/README.md CHANGED
@@ -4,18 +4,25 @@
4
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
- Repo-local agentic development harness CLI and skill runtime for Claude/Codex
8
- workflows. The npm package and primary command are now `repo-harness`.
9
- The legacy `repo-harness-skill` and `project-initializer` install paths are
10
- retired and removed by installed-copy sync.
11
- Repository: `https://github.com/Ancienttwo/repo-harness`
7
+ `repo-harness` turns Claude/Codex coding sessions into a repeatable repo-local
8
+ workflow. It ships a CLI plus skill/runtime hooks that write context, plans,
9
+ handoffs, checks, and review evidence back into the project, so the next agent
10
+ session can continue from files instead of chat memory.
12
11
 
13
- [English](README.md) | [简体中文](README.zh-CN.md) | [日本語](README.ja.md) | [Français](README.fr.md) | [Español](README.es.md)
12
+ Use it to:
13
+
14
+ - adopt an existing repo with a tasks-first agent contract
15
+ - keep Claude and Codex aligned on the same plans, checks, handoffs, and context
16
+ boundaries
17
+ - spend fewer tokens rediscovering structure by using CodeGraph and progressive
18
+ context loading
19
+
20
+ Give the agent a complete PRD or Sprint; after that, your loop is just review
21
+ and `next`, or start `/goal` and go AFK.
14
22
 
15
- This repository now dogfoods its own tasks-first contract. It is both:
23
+ Repository: `https://github.com/Ancienttwo/repo-harness`
16
24
 
17
- - the source repo for the `repo-harness` CLI and `repo-harness` skill runtime
18
- - a self-hosted example of the repo-local workflow it generates for other projects
25
+ [English](README.md) | [简体中文](README.zh-CN.md) | [日本語](README.ja.md) | [Français](README.fr.md) | [Español](README.es.md)
19
26
 
20
27
  ## Why repo-harness
21
28
 
@@ -214,12 +221,39 @@ safe to adopt in a real repo. It separates the machine-level runtime bootstrap
214
221
  from the repo-local contract install, so a dry run can show exactly what will
215
222
  change before anything is applied.
216
223
 
217
- ### 1. Bootstrap the host runtime once
224
+ ### 1. Install the CLI
225
+
226
+ No Node.js required for the default path: the installer uses Bun as the runtime.
227
+ If Bun is missing, it installs Bun first, then installs the `repo-harness` CLI.
218
228
 
219
229
  ```bash
230
+ # macOS / Linux
231
+ curl -fsSL https://raw.githubusercontent.com/Ancienttwo/repo-harness/main/install.sh | sh
232
+
233
+ # Windows (PowerShell)
234
+ irm https://raw.githubusercontent.com/Ancienttwo/repo-harness/main/install.ps1 | iex
235
+ ```
236
+
237
+ <details>
238
+ <summary>Already have Bun or Node? Use package managers instead</summary>
239
+
240
+ ```bash
241
+ # Bun
242
+ bun add -g repo-harness
243
+ repo-harness init
244
+
245
+ # Node/npm, with Bun already on PATH because the CLI runs on Bun
220
246
  npx -y repo-harness init
221
247
  ```
222
248
 
249
+ </details>
250
+
251
+ ### 2. Bootstrap the host runtime once
252
+
253
+ ```bash
254
+ repo-harness init
255
+ ```
256
+
223
257
  `init` is the first-run global bootstrap path. It installs the current npm
224
258
  package as the global CLI, refreshes repo-harness skill aliases, installs
225
259
  user-level hook adapters, configures Waza runtime skills, persists a brain root
@@ -236,8 +270,8 @@ optional command, and verification surface for the Agent to execute deliberately
236
270
  ### Install and refresh examples
237
271
 
238
272
  ```bash
239
- # First machine bootstrap: global CLI, skills, host adapters, Waza, brain, CodeGraph.
240
- npx -y repo-harness init
273
+ # First machine bootstrap after installing the CLI: skills, host adapters, Waza, brain, CodeGraph.
274
+ repo-harness init
241
275
 
242
276
  # Refresh user-level CLI/runtime pieces after a package update.
243
277
  repo-harness update
@@ -249,7 +283,7 @@ repo-harness update --check
249
283
  repo-harness adopt --repo /path/to/repo
250
284
  ```
251
285
 
252
- ### 2. Preview the repo-local contract
286
+ ### 3. Preview the repo-local contract
253
287
 
254
288
  ```bash
255
289
  npx -y repo-harness adopt --dry-run
@@ -261,7 +295,7 @@ created or refreshed. It should not create an application stack; existing repos
261
295
  use `repo-harness adopt`, while new projects or modules use
262
296
  `repo-harness-scaffold`.
263
297
 
264
- ### 3. Apply, then prove the workflow
298
+ ### 4. Apply, then prove the workflow
265
299
 
266
300
  ```bash
267
301
  npx -y repo-harness adopt
@@ -427,8 +461,8 @@ Most common guards:
427
461
 
428
462
  ## Current Release
429
463
 
430
- - npm package: `repo-harness@0.5.0`
431
- - Generated workflow stamp: `repo-harness@0.5.0+template@0.5.0`
464
+ - npm package: `repo-harness@0.5.1`
465
+ - Generated workflow stamp: `repo-harness@0.5.1+template@0.5.1`
432
466
  - GitHub repository: `Ancienttwo/repo-harness`
433
467
  - Release history: [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
434
468
 
@@ -512,11 +546,28 @@ Source-owned command facades live in `assets/skill-commands/`. They keep host
512
546
  skill discovery compatible while the CLI and hooks own execution:
513
547
 
514
548
  - Planning and review: `repo-harness-plan`, `repo-harness-review`, `repo-harness-autoplan`
515
- - Product planning layer: `repo-harness-prd` (upper-layer PRDs in `plans/prds/`, evidence-marked unknowns, sprint-consumable sections)
549
+ - Product planning layer: `repo-harness-prd` (activates `$geju`, then uses Claude-first `claude -p --model opus` drafting with Codex fallback to write upper-layer PRDs in `plans/prds/`)
516
550
  - Sprint program layer: `repo-harness-sprint` (ordered sprint backlogs in `plans/sprints/`, each row expanded with `$think` before the contract flow)
551
+ - Goal session layer: `repo-harness-goal` / `repo-harness:goal` (prepares Codex/Claude `/goal` prompts from detailed PRD or Sprint artifacts and asks for those docs when missing)
517
552
  - 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`
518
553
  - Branch project creation command: `repo-harness-scaffold`
519
554
 
555
+ The planning chain is intentionally layered:
556
+
557
+ ```text
558
+ idea -> repo-harness-prd -> repo-harness-sprint from-prd -> repo-harness-goal
559
+ ```
560
+
561
+ Use `repo-harness-prd` when the source is still a product idea; it first runs a
562
+ `$geju` direction pass, then asks Claude via `claude -p --model opus` to draft the PRD, with
563
+ Codex only as fallback. Use
564
+ `repo-harness-sprint from-prd <plans/prds/*.prd.md>` to turn an approved PRD into
565
+ an ordered Sprint backlog with machine-checkable acceptance lines. Use
566
+ `repo-harness-goal` only after a detailed PRD or Sprint artifact exists; it
567
+ prepares a bounded Codex/Claude `/goal` prompt and keeps the PRD/Sprint as the
568
+ source of truth. If that document is missing, the goal command must ask for it
569
+ instead of starting implementation from chat context.
570
+
520
571
  `repo-harness adopt` is for an existing repo; `repo-harness-scaffold` creates a
521
572
  new project or module scaffold as a side command. `hooks-init`, `docs-init`, and
522
573
  `create-project-dirs` are internal steps, not public commands.
@@ -653,8 +704,18 @@ Configured in `assets/initializer-question-pack.v4.json` and consumed by `script
653
704
 
654
705
  ## Verification
655
706
 
707
+ Use the single CI-equivalent gate for release review:
708
+
709
+ ```bash
710
+ bun run check:ci
711
+ ```
712
+
713
+ The gate expands to the owned checks below; `bun run check:release` adds only the npm unpublished-version preflight before delegating to the same gate.
714
+
656
715
  ```bash
657
716
  bun test
717
+ bash scripts/check-deploy-sql-order.sh
718
+ bash scripts/check-architecture-sync.sh
658
719
  bash scripts/check-task-sync.sh
659
720
  bash scripts/check-task-workflow.sh --strict
660
721
  bun scripts/inspect-project-state.ts --repo . --format text
package/README.zh-CN.md CHANGED
@@ -1,16 +1,23 @@
1
1
  # repo-harness
2
2
 
3
- Repo-local agentic development harness CLI and skill runtime for Claude/Codex
4
- workflows.
3
+ `repo-harness` Claude/Codex AI 编程会话变成可复用、可恢复、可检查的
4
+ repo-local workflow。它提供 CLI 和 skill/runtime hooks,把上下文、计划、
5
+ handoff、检查结果和 review evidence 写回项目文件,让下一个 agent 会话可以从文件继续,
6
+ 而不是依赖聊天记录。
7
+
8
+ 它主要解决三件事:
9
+
10
+ - 用 tasks-first agent contract 快速接入已有仓库。
11
+ - 让 Claude 和 Codex 共享同一套计划、检查、handoff 和上下文边界。
12
+ - 用 CodeGraph 和渐进式 context loading 减少重复摸仓库结构的 token 消耗。
13
+
14
+ 你只需要把完整 PRD/Sprint 发给 Agent;之后的工作就是 review and `next`,
15
+ 或者启动 `/goal` 后 AFK。
5
16
 
6
17
  [English](README.md) | [简体中文](README.zh-CN.md) | [日本語](README.ja.md) | [Français](README.fr.md) | [Español](README.es.md)
7
18
 
8
19
  仓库地址:`https://github.com/Ancienttwo/repo-harness`
9
20
 
10
- `repo-harness` 是一个把 AI 编程流程落到仓库文件里的工作流 harness。它既是
11
- `repo-harness` CLI 和 skill runtime 的源码仓库,也是它自己生成给下游项目的
12
- repo-local workflow 的自托管样例。
13
-
14
21
  ## 为什么用 repo-harness
15
22
 
16
23
  - **会话状态落在文件里,不在聊天记录里。** 不同 agent 会话——Claude、Codex、现在或之后——
@@ -178,12 +185,39 @@ source of truth,Codex Goal mode 只围绕具体 sprint 恢复和推进,而
178
185
  bootstrap 和 repo-local contract install 分开,所以 dry-run 能先展示会改什么,
179
186
  再决定是否应用。
180
187
 
181
- ### 1. 先做一次 host runtime bootstrap
188
+ ### 1. 安装 CLI
189
+
190
+ 默认路径不需要 Node.js:installer 使用 Bun 作为 runtime。如果机器上没有 Bun,
191
+ 它会先安装 Bun,再安装 `repo-harness` CLI。
192
+
193
+ ```bash
194
+ # macOS / Linux
195
+ curl -fsSL https://raw.githubusercontent.com/Ancienttwo/repo-harness/main/install.sh | sh
196
+
197
+ # Windows (PowerShell)
198
+ irm https://raw.githubusercontent.com/Ancienttwo/repo-harness/main/install.ps1 | iex
199
+ ```
200
+
201
+ <details>
202
+ <summary>已经有 Bun 或 Node?可以改用包管理器</summary>
182
203
 
183
204
  ```bash
205
+ # Bun
206
+ bun add -g repo-harness
207
+ repo-harness init
208
+
209
+ # Node/npm;仍要求 Bun 已在 PATH 上,因为 CLI runtime 是 Bun
184
210
  npx -y repo-harness init
185
211
  ```
186
212
 
213
+ </details>
214
+
215
+ ### 2. 先做一次 host runtime bootstrap
216
+
217
+ ```bash
218
+ repo-harness init
219
+ ```
220
+
187
221
  `init` 是首次全局引导入口。它把当前 npm 包安装成全局 CLI,刷新 repo-harness
188
222
  skill aliases,安装 user-level hook adapters,配置 Waza runtime skills,把 brain
189
223
  root 持久化到 `~/.repo-harness/config.json`,并配置 CodeGraph MCP。它不会把当前目录
@@ -198,8 +232,8 @@ targets、可选 command 和 verification 的 `agent_actions`,由 Agent 再显
198
232
  ### 安装和刷新例子
199
233
 
200
234
  ```bash
201
- # 首次机器级 bootstrap:global CLI、skills、host adapters、Waza、brain、CodeGraph。
202
- npx -y repo-harness init
235
+ # 安装 CLI 后做首次机器级 bootstrap:skills、host adapters、Waza、brain、CodeGraph。
236
+ repo-harness init
203
237
 
204
238
  # 包更新后刷新 user-level CLI/runtime。
205
239
  repo-harness update
@@ -211,7 +245,7 @@ repo-harness update --check
211
245
  repo-harness adopt --repo /path/to/repo
212
246
  ```
213
247
 
214
- ### 2. 预览 repo-local contract
248
+ ### 3. 预览 repo-local contract
215
249
 
216
250
  ```bash
217
251
  npx -y repo-harness adopt --dry-run
@@ -221,7 +255,7 @@ npx -y repo-harness adopt --dry-run
221
255
  helper runtime、hook adapter target 和 verification files。它不会创建应用技术栈;
222
256
  已有仓库走 `repo-harness adopt`,新项目或新模块走 `repo-harness-scaffold`。
223
257
 
224
- ### 3. 应用后验证 workflow
258
+ ### 4. 应用后验证 workflow
225
259
 
226
260
  ```bash
227
261
  npx -y repo-harness adopt
@@ -360,8 +394,8 @@ hook block 工作时,先看 terminal 里的结构化输出。核心字段是
360
394
 
361
395
  ## 当前 Release
362
396
 
363
- - npm package:`repo-harness@0.5.0`
364
- - Generated workflow stamp:`repo-harness@0.5.0+template@0.5.0`
397
+ - npm package:`repo-harness@0.5.1`
398
+ - Generated workflow stamp:`repo-harness@0.5.1+template@0.5.1`
365
399
  - GitHub repository:`Ancienttwo/repo-harness`
366
400
  - Release history:[`docs/CHANGELOG.md`](docs/CHANGELOG.md)
367
401
 
@@ -415,9 +449,25 @@ Co-authored-by: codex <codex@openai.com>
415
449
  兼容性,真正执行由 CLI 和 hooks 负责:
416
450
 
417
451
  - Planning / review:`repo-harness-plan`、`repo-harness-review`、`repo-harness-autoplan`
452
+ - Product planning layer:`repo-harness-prd`(先激活 `$geju` 做格局判断,再优先用 Claude `claude -p --model opus` 起草 PRD;Codex 只做 fallback)
453
+ - Sprint program layer:`repo-harness-sprint`(把 PRD 拆成 `plans/sprints/` 里的有序 backlog)
454
+ - Goal session layer:`repo-harness-goal` / `repo-harness:goal`(从详细 PRD 或 Sprint 文档准备 Codex/Claude `/goal` prompt;缺文档时先要求补文档)
418
455
  - 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`
419
456
  - 支线项目创建 command:`repo-harness-scaffold`
420
457
 
458
+ 规划链路按层推进:
459
+
460
+ ```text
461
+ idea -> repo-harness-prd -> repo-harness-sprint from-prd -> repo-harness-goal
462
+ ```
463
+
464
+ `repo-harness-prd` 处理产品想法:先跑 `$geju` direction pass,再用 Claude `claude -p --model opus`
465
+ 起草 PRD,Codex 只在 Claude 不可用或失败时 fallback。`repo-harness-sprint from-prd <plans/prds/*.prd.md>`
466
+ 把已批准 PRD 拆成带 machine-checkable acceptance 的 Sprint backlog;
467
+ `repo-harness-goal` 只在已有详细 PRD 或 Sprint artifact 后使用,用它生成有边界的
468
+ Codex/Claude `/goal` prompt,并把 PRD/Sprint 保持为 source of truth。缺少这份文档时,
469
+ goal command 必须先要求补文档,而不是从聊天上下文直接开工。
470
+
421
471
  `repo-harness adopt` 用于已有仓库;`repo-harness-scaffold` 作为支线 command 创建新项目或模块。
422
472
  `hooks-init`、`docs-init` 和 `create-project-dirs` 是内部步骤,不是公共 commands。
423
473
 
@@ -448,8 +498,18 @@ bun scripts/assemble-template.ts --target agents --plan C --name "MyProject"
448
498
 
449
499
  ### Verification
450
500
 
501
+ 发布前 review 使用唯一 CI-equivalent gate:
502
+
503
+ ```bash
504
+ bun run check:ci
505
+ ```
506
+
507
+ 这个 gate 展开为下面这些 repo-owned checks;`bun run check:release` 只是在委托同一个 gate 前增加 npm 版本未发布检查。
508
+
451
509
  ```bash
452
510
  bun test
511
+ bash scripts/check-deploy-sql-order.sh
512
+ bash scripts/check-architecture-sync.sh
453
513
  bash scripts/check-task-sync.sh
454
514
  bash scripts/check-task-workflow.sh --strict
455
515
  bun scripts/inspect-project-state.ts --repo . --format text