repo-harness 0.5.1 → 0.5.2
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 +136 -41
- package/README.fr.md +136 -43
- package/README.ja.md +136 -32
- package/README.md +15 -17
- package/README.zh-CN.md +119 -14
- package/assets/hooks/session-start-context.sh +1 -1
- package/assets/skill-version.json +6 -2
- package/assets/skills/claude-review/SKILL.md +114 -4
- package/assets/templates/helpers/check-agent-tooling.sh +15 -1
- package/package.json +1 -1
- package/scripts/check-agent-tooling.sh +15 -1
- package/scripts/create-project-dirs.sh +9 -0
- package/scripts/init-project.sh +9 -0
- package/scripts/lib/project-init-lib.sh +23 -0
- package/scripts/migrate-project-template.sh +62 -2
- package/src/cli/commands/doctor.ts +3 -2
- package/src/cli/commands/init.ts +25 -1
- package/src/cli/commands/security.ts +146 -3
package/README.es.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# repo-harness
|
|
2
2
|
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="docs/images/image.png" alt="One next button joining Claude and Codex under repo-harness workflow rules" width="760">
|
|
5
|
+
</p>
|
|
6
|
+
|
|
3
7
|
`repo-harness` convierte las sesiones de programación con Claude/Codex en un
|
|
4
8
|
workflow repo-local repetible. Incluye un CLI y hooks de skill/runtime que
|
|
5
9
|
escriben contexto, planes, handoffs, checks y evidencias de review dentro del
|
|
@@ -43,43 +47,21 @@ Dirección del repositorio: `https://github.com/Ancienttwo/repo-harness`
|
|
|
43
47
|
1KB o consulta el índice, en vez de gastar miles de tokens redescubriendo la
|
|
44
48
|
estructura.
|
|
45
49
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
- **
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
Sigue siendo advisory: no instala dependencias, no ejecuta el readiness probe
|
|
62
|
-
pesado y no bloquea el prompt si CodeGraph no está disponible.
|
|
63
|
-
- **Centinela de seguridad (`repo-harness security scan` + `security-sentinel.sh`).**
|
|
64
|
-
Una verificación de solo lectura sobre las superficies de inyección de
|
|
65
|
-
configuración de alto valor (`~/.claude/settings.json`, `~/.codex/hooks.json`,
|
|
66
|
-
el `.vscode/tasks.json` repo-local y los adapters legacy a nivel de proyecto
|
|
67
|
-
`.claude`/`.codex`). Marca patrones de comando sospechosos —pipes de remote
|
|
68
|
-
shell, base64-decode-to-exec, `osascript`, persistencia con
|
|
69
|
-
`launchctl`/`crontab`, netcat, ejecución inline de intérpretes—, además de
|
|
70
|
-
hooks no gestionados y tareas `folderOpen` de ejecución automática, y nunca
|
|
71
|
-
modifica ninguna configuración. El centinela de `SessionStart` toma una huella
|
|
72
|
-
de este conjunto y solo reescanea cuando la huella cambia, para no generar
|
|
73
|
-
ruido en el session-start. Auditoría bajo demanda:
|
|
74
|
-
`repo-harness security scan --json`.
|
|
75
|
-
- **Ciclo de vida draft-plan de Claude/Codex.** El Plan mode tiene explícitamente
|
|
76
|
-
dos etapas: Draft y Approved. Los hooks reconocen la intención de crear un plan
|
|
77
|
-
y rastrean la pending orchestration; un stop gate (`stop-orchestrator.sh`) exige
|
|
78
|
-
que la sesión haga una pasada de autorevisión antes de terminar con el plan sin
|
|
79
|
-
definir. Captura un borrador con `scripts/capture-plan.sh --slug <slug> --title
|
|
80
|
-
<title> --status Draft`, después promociónalo a Approved y proyéctalo a
|
|
81
|
-
ejecución con `--execute` o `scripts/plan-to-todo.sh --plan <plan>`. Los plans
|
|
82
|
-
se convierten en la fuente de verdad a nivel de archivo en `plans/`.
|
|
50
|
+
En un repositorio adoptado, la superficie se mantiene pequeña:
|
|
51
|
+
|
|
52
|
+
| Surface | Propósito |
|
|
53
|
+
| --- | --- |
|
|
54
|
+
| `docs/spec.md` y `docs/reference-configs/` | Estándares compartidos e intención de producto estable que cada sesión de agente puede leer. |
|
|
55
|
+
| `plans/`, `plans/prds/` y `plans/sprints/` | Work packages decision-complete antes de empezar la implementación. |
|
|
56
|
+
| `tasks/contracts/`, `tasks/reviews/` y `.ai/harness/checks/` | Scope, verificación y evidencia de review para probar que el trabajo terminó. |
|
|
57
|
+
| `.ai/harness/handoff/` y `tasks/current.md` | Session journal y estado resumible, derivados de workflow artifacts en vez de chat memory. |
|
|
58
|
+
|
|
59
|
+
## Novedades en 0.5.2
|
|
60
|
+
|
|
61
|
+
- **Tooling advisories más silenciosos.** Los update checks de SessionStart usan por defecto un timestamp cache semanal, para que los avisos de Waza y CodeGraph no aparezcan en cada sesión.
|
|
62
|
+
- **Safety hooks locales revisados.** `repo-harness security scan` separa active findings y reviewed exceptions; los hooks user-level warning-only necesitan exact command match, y los comandos de alto riesgo siguen activos.
|
|
63
|
+
- **Setup checks más limpios.** `repo-harness setup check --check-updates` trata el skip de DB de gbrain fast-mode como readiness aceptado, pero mantiene visibles los warnings reales de gbrain.
|
|
64
|
+
- **Cross-review más resistente.** El skill bundled `claude-review` puede recuperar resultados print-mode con stdout vacío desde los transcripts de sesión de Claude Code.
|
|
83
65
|
|
|
84
66
|
## Qué hace el producto
|
|
85
67
|
|
|
@@ -301,7 +283,7 @@ El comando debería terminar imprimiendo `=== Migration Report ===`, e incluir:
|
|
|
301
283
|
- `Host hook config target: user-level ~/.claude/settings.json and ~/.codex/hooks.json`: dónde está la capa del adapter
|
|
302
284
|
- `Host hook adapters are user-level:`: recordatorio de instalar los global adapters y de confiar en `~/.codex/hooks.json`
|
|
303
285
|
- `Workflow migration:`: el plan de creación o refresco de las repo-local harness surfaces
|
|
304
|
-
- `Helper
|
|
286
|
+
- `Helper runtime:`: la cadena de herramientas operativa que obtendrás tras aplicar
|
|
305
287
|
- `--- External Tooling ---`: el routing de gstack/Waza/gbrain más las advisory de instalación/actualización
|
|
306
288
|
|
|
307
289
|
### Los dos comandos siguientes
|
|
@@ -323,6 +305,22 @@ Si la salida del dry-run no es correcta, detente aquí primero y lee
|
|
|
323
305
|
- Codex debe confiar en `~/.codex/hooks.json` en sus Settings para que los hooks se ejecuten.
|
|
324
306
|
- Orden de depuración: user-level adapter config -> `repo-harness-hook` o el fallback `repo-harness hook` -> route registry -> `.ai/hooks/*`.
|
|
325
307
|
|
|
308
|
+
|
|
309
|
+
The installed adapter owns eight managed hook routes. The route tuple
|
|
310
|
+
`event + routeId + matcher` is the stable contract; script names are the current
|
|
311
|
+
implementation under `assets/hooks/` or a repo-pinned `.ai/hooks/` copy.
|
|
312
|
+
|
|
313
|
+
| Route | Matcher | Scripts | Function |
|
|
314
|
+
| --- | --- | --- | --- |
|
|
315
|
+
| `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. |
|
|
316
|
+
| `PreToolUse.edit` | `Edit|Write` | `worktree-guard.sh`, `pre-edit-guard.sh` | Enforces worktree policy and plan/contract readiness before implementation edits. |
|
|
317
|
+
| `PreToolUse.subagent` | `Task|Agent|SendUserMessage` | `subagent-return-channel-guard.sh` | Keeps delegated work returning through the parent session instead of leaking completion claims. |
|
|
318
|
+
| `PostToolUse.edit` | `Edit|Write` | `post-edit-guard.sh` | Records edit traces, refreshes handoff/task status, and queues architecture drift when controlled files change. |
|
|
319
|
+
| `PostToolUse.bash` | `Bash` | `post-bash.sh` | Observes command results and captures verification evidence without replacing the command runner. |
|
|
320
|
+
| `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. |
|
|
321
|
+
| `UserPromptSubmit.default` | all prompts | `prompt-guard.sh` | Classifies prompt intent, routes planning/check/hunt hints, and renders host-safe workflow guidance. |
|
|
322
|
+
| `Stop.default` | session stop | `stop-orchestrator.sh` | Finalizes handoff and guards against ending with unresolved draft-plan or completion evidence gaps. |
|
|
323
|
+
|
|
326
324
|
`SessionStart` ejecuta dos scripts ordenados antes de empezar el trabajo:
|
|
327
325
|
|
|
328
326
|
```mermaid
|
|
@@ -380,8 +378,8 @@ Guards habituales:
|
|
|
380
378
|
|
|
381
379
|
## Release actual
|
|
382
380
|
|
|
383
|
-
- npm package: `repo-harness@0.5.
|
|
384
|
-
- Generated workflow stamp: `repo-harness@0.5.
|
|
381
|
+
- npm package: `repo-harness@0.5.2`
|
|
382
|
+
- Generated workflow stamp: `repo-harness@0.5.2+template@0.5.2`
|
|
385
383
|
- GitHub repository: `Ancienttwo/repo-harness`
|
|
386
384
|
- Release history: [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
|
|
387
385
|
|
|
@@ -393,6 +391,13 @@ Guards habituales:
|
|
|
393
391
|
- `scripts/inspect-project-state.ts`
|
|
394
392
|
- `scripts/migrate-workflow-docs.ts`
|
|
395
393
|
- `assets/workflow-contract.v1.json`
|
|
394
|
+
- Runtime mode is configurable with template vars:
|
|
395
|
+
- `{{RUNTIME_MODE}}`
|
|
396
|
+
- `{{RUNTIME_PROFILE}}`
|
|
397
|
+
- `{{RECOVERY_PROFILE}}`
|
|
398
|
+
- `{{STATE_PROFILE}}`
|
|
399
|
+
- Question-pack source of truth is in:
|
|
400
|
+
- `assets/initializer-question-pack.v4.json`
|
|
396
401
|
- Los generated repos usan por defecto el repo-local harness flow:
|
|
397
402
|
- `docs/spec.md -> plans/ -> tasks/contracts/ -> tasks/reviews/ -> .ai/context/context-map.json -> .ai/harness/*`
|
|
398
403
|
- `repo-harness update` refresca las runtime pieces de usuario:
|
|
@@ -419,6 +424,17 @@ Gracias a [Garry Tan](https://x.com/garrytan), autor de gstack y gbrain. Ambos
|
|
|
419
424
|
influyeron en el workflow de product discovery, plan/design review, release
|
|
420
425
|
documentation, knowledge sync y handoff retrieval.
|
|
421
426
|
|
|
427
|
+
|
|
428
|
+
### Atribución de contribuidor en GitHub
|
|
429
|
+
|
|
430
|
+
Cuando Codex contribuya materialmente a un commit, usa el trailer co-author estándar de GitHub al final del commit message:
|
|
431
|
+
|
|
432
|
+
```text
|
|
433
|
+
Co-authored-by: codex <codex@openai.com>
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
Mantén esta atribución opt-in y visible por commit. No la incorpores en scripts de commit ni hooks downstream de repo-harness salvo que ese repo adopte explícitamente la misma política.
|
|
437
|
+
|
|
422
438
|
## Action Command Skills
|
|
423
439
|
|
|
424
440
|
Los command facades públicos están en `assets/skill-commands/`; preservan la
|
|
@@ -462,6 +478,23 @@ bun scripts/inspect-project-state.ts --repo . --format text
|
|
|
462
478
|
bash scripts/migrate-project-template.sh --repo . --dry-run
|
|
463
479
|
```
|
|
464
480
|
|
|
481
|
+
|
|
482
|
+
### Runtime reference docs
|
|
483
|
+
|
|
484
|
+
Generic repo-harness runtime/reference docs live in the installed package under
|
|
485
|
+
`assets/reference-configs/` and are resolved through the CLI:
|
|
486
|
+
|
|
487
|
+
```bash
|
|
488
|
+
repo-harness docs list
|
|
489
|
+
repo-harness docs path harness-overview
|
|
490
|
+
repo-harness docs show harness-overview
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
Generated and migrated repos still keep `docs/reference-configs/*.md`, but
|
|
494
|
+
those files are deterministic pointer stubs. Repo-local workflow state,
|
|
495
|
+
policy, checks, runs, handoff packets, context maps, and helper snapshots stay
|
|
496
|
+
under `.ai/`.
|
|
497
|
+
|
|
465
498
|
### Template assembly
|
|
466
499
|
|
|
467
500
|
```bash
|
|
@@ -478,7 +511,23 @@ bash scripts/check-task-workflow.sh --strict
|
|
|
478
511
|
bun scripts/inspect-project-state.ts --repo . --format text
|
|
479
512
|
bash scripts/migrate-project-template.sh --repo . --dry-run
|
|
480
513
|
bash scripts/check-agent-tooling.sh --host both --check-updates
|
|
481
|
-
bun run benchmark:skills --
|
|
514
|
+
bun run benchmark:skills --eval route-workflow-check
|
|
515
|
+
```
|
|
516
|
+
|
|
517
|
+
|
|
518
|
+
### Local benchmark skeleton
|
|
519
|
+
|
|
520
|
+
```bash
|
|
521
|
+
bun run benchmark:skills --eval route-workflow-check
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
Eval output is the release/readiness evidence path; dry-run benchmark wiring is only a smoke and is not skill-effectiveness evidence.
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
### Run one eval across both Claude and Codex
|
|
528
|
+
|
|
529
|
+
```bash
|
|
530
|
+
bun run benchmark:skills --eval repair-agents-task-sync
|
|
482
531
|
```
|
|
483
532
|
|
|
484
533
|
## Key Files
|
|
@@ -488,8 +537,54 @@ bun run benchmark:skills --dry-run
|
|
|
488
537
|
- Plan mapping: `assets/plan-map.json`
|
|
489
538
|
- Question-pack: `assets/initializer-question-pack.v4.json`
|
|
490
539
|
- Shared hooks: `assets/hooks/`
|
|
540
|
+
- Runtime reference docs: `assets/reference-configs/` via `repo-harness docs`
|
|
491
541
|
- Workflow contract: `assets/workflow-contract.v1.json`
|
|
492
542
|
- Hook operations reference: `docs/reference-configs/hook-operations.md`
|
|
493
543
|
- Template assembler: `scripts/assemble-template.ts`
|
|
494
544
|
- State inspector: `scripts/inspect-project-state.ts`
|
|
545
|
+
- External tooling detector: `scripts/check-agent-tooling.sh`
|
|
546
|
+
- Scaffolding scripts:
|
|
547
|
+
- `scripts/init-project.sh`
|
|
548
|
+
- `scripts/create-project-dirs.sh`
|
|
495
549
|
- Legacy-doc migrator: `scripts/migrate-workflow-docs.ts`
|
|
550
|
+
|
|
551
|
+
## Generated vs Self-Hosted Hook Parity
|
|
552
|
+
|
|
553
|
+
- El comportamiento downstream de hooks lo define la salida generada desde `assets/hooks/` y `assets/reference-configs/`.
|
|
554
|
+
- Este repo dogfoodea el mismo contract, pero el comportamiento self-host no se sincroniza mágicamente con los generated repos; cada cambio debe actualizar explícitamente ambas superficies cuando aplique.
|
|
555
|
+
- Todo cambio de hook debe indicar si afecta a `self-host`, `generated` o `both`.
|
|
556
|
+
|
|
557
|
+
## Package Manager Defaults
|
|
558
|
+
|
|
559
|
+
- Prioridad general por defecto: `bun > pnpm > npm`
|
|
560
|
+
- **Plan G/H** (Python-centric) usa **`uv`** como primary package manager por defecto.
|
|
561
|
+
|
|
562
|
+
## Runtime Profiles
|
|
563
|
+
|
|
564
|
+
- `Plan-only (recommended)` (default)
|
|
565
|
+
- `Plan + Permissionless`
|
|
566
|
+
- `Standard (ask before each action)`
|
|
567
|
+
|
|
568
|
+
Se configura en `assets/initializer-question-pack.v4.json` y lo consume `scripts/initializer-question-pack.ts`.
|
|
569
|
+
|
|
570
|
+
## Verification
|
|
571
|
+
|
|
572
|
+
Para release review usa el gate único equivalente a CI:
|
|
573
|
+
|
|
574
|
+
```bash
|
|
575
|
+
bun run check:ci
|
|
576
|
+
```
|
|
577
|
+
|
|
578
|
+
Ese gate se expande a los checks propios del repo; `bun run check:release` solo añade el preflight de npm unpublished-version antes de delegar al mismo gate.
|
|
579
|
+
|
|
580
|
+
```bash
|
|
581
|
+
bun test
|
|
582
|
+
bash scripts/check-deploy-sql-order.sh
|
|
583
|
+
bash scripts/check-architecture-sync.sh
|
|
584
|
+
bash scripts/check-task-sync.sh
|
|
585
|
+
bash scripts/check-task-workflow.sh --strict
|
|
586
|
+
bun scripts/inspect-project-state.ts --repo . --format text
|
|
587
|
+
bash scripts/migrate-project-template.sh --repo . --dry-run
|
|
588
|
+
bash scripts/check-agent-tooling.sh --host both --check-updates
|
|
589
|
+
bun run benchmark:skills --eval route-workflow-check
|
|
590
|
+
```
|
package/README.fr.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# repo-harness
|
|
2
2
|
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="docs/images/image.png" alt="One next button joining Claude and Codex under repo-harness workflow rules" width="760">
|
|
5
|
+
</p>
|
|
6
|
+
|
|
3
7
|
`repo-harness` transforme les sessions de code Claude/Codex en workflow
|
|
4
8
|
repo-local répétable. Il fournit un CLI et des hooks skill/runtime qui écrivent
|
|
5
9
|
le contexte, les plans, les handoffs, les checks et les preuves de review dans le
|
|
@@ -43,45 +47,21 @@ Adresse du dépôt : `https://github.com/Ancienttwo/repo-harness`
|
|
|
43
47
|
1 Ko ou interroge l'index, au lieu de dépenser des milliers de tokens à
|
|
44
48
|
redécouvrir la structure.
|
|
45
49
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
- **
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
dans PATH avant d'émettre l'indication de route. Cela reste advisory : pas
|
|
62
|
-
d'installation de dépendances, pas de readiness probe lourd, et pas de blocage
|
|
63
|
-
du prompt si CodeGraph est indisponible.
|
|
64
|
-
- **Sentinelle de sécurité (`repo-harness security scan` +
|
|
65
|
-
`security-sentinel.sh`).** Une vérification en lecture seule sur les surfaces
|
|
66
|
-
d'injection de configuration à forte valeur (`~/.claude/settings.json`,
|
|
67
|
-
`~/.codex/hooks.json`, le `.vscode/tasks.json` repo-local, ainsi que les adapter
|
|
68
|
-
legacy de niveau projet `.claude`/`.codex`). Elle signale les motifs de commandes
|
|
69
|
-
dangereux — pipes vers un remote shell, base64 décodé puis exécuté, `osascript`,
|
|
70
|
-
persistance via `launchctl`/`crontab`, netcat, exécution d'interpréteur inline —
|
|
71
|
-
ainsi que les hooks non gérés et les tâches `folderOpen` auto-exécutées, et elle
|
|
72
|
-
ne réécrit jamais aucune configuration. La sentinelle `SessionStart` calcule une
|
|
73
|
-
empreinte de cet ensemble de fichiers et ne rescanne que lorsque l'empreinte
|
|
74
|
-
change, sans produire de bruit au démarrage de session. Audit à la demande :
|
|
75
|
-
`repo-harness security scan --json`.
|
|
76
|
-
- **Cycle de vie draft-plan Claude/Codex.** Le Plan mode se divise explicitement en
|
|
77
|
-
deux étapes : Draft et Approved. Les hooks détectent l'intention de créer un plan
|
|
78
|
-
et suivent le pending orchestration ; le stop gate (`stop-orchestrator.sh`) exige
|
|
79
|
-
que la session fasse une passe d'auto-review avant de se terminer alors qu'un plan
|
|
80
|
-
n'est pas finalisé. Capturez un brouillon avec
|
|
81
|
-
`scripts/capture-plan.sh --slug <slug> --title <title> --status Draft`, puis
|
|
82
|
-
passez en Approved après validation et projetez-le dans l'exécution avec
|
|
83
|
-
`--execute` ou `scripts/plan-to-todo.sh --plan <plan>`. plans/ devient la source
|
|
84
|
-
de vérité au niveau fichier.
|
|
50
|
+
Dans un dépôt adopté, la surface à comprendre reste volontairement réduite :
|
|
51
|
+
|
|
52
|
+
| Surface | Rôle |
|
|
53
|
+
| --- | --- |
|
|
54
|
+
| `docs/spec.md` et `docs/reference-configs/` | Standards partagés et intention produit stable lisibles par chaque session d'agent. |
|
|
55
|
+
| `plans/`, `plans/prds/` et `plans/sprints/` | Work packages decision-complete avant le début de l'implémentation. |
|
|
56
|
+
| `tasks/contracts/`, `tasks/reviews/` et `.ai/harness/checks/` | Scope, vérification et preuves de review pour démontrer que le travail est terminé. |
|
|
57
|
+
| `.ai/harness/handoff/` et `tasks/current.md` | Session journal et état resumable dérivés des workflow artifacts plutôt que de la chat memory. |
|
|
58
|
+
|
|
59
|
+
## Nouveautés de la 0.5.2
|
|
60
|
+
|
|
61
|
+
- **Tooling advisories plus calmes.** Les checks update de SessionStart utilisent désormais un cache timestamp d'une semaine par défaut, afin que les advisories Waza et CodeGraph restent utiles sans apparaître à chaque session.
|
|
62
|
+
- **Safety hooks locaux reviewés.** `repo-harness security scan` sépare les active findings des reviewed exceptions, avec exact command match pour les hooks user-level warning-only ; les commandes à haut risque restent actives.
|
|
63
|
+
- **Setup checks plus propres.** `repo-harness setup check --check-updates` traite le skip DB de gbrain fast-mode comme un état readiness accepté, tout en gardant les vrais warnings gbrain visibles.
|
|
64
|
+
- **Cross-review plus robuste.** Le skill bundled `claude-review` peut récupérer les résultats print-mode à stdout vide depuis les transcripts de session Claude Code.
|
|
85
65
|
|
|
86
66
|
## Ce que fait le produit
|
|
87
67
|
|
|
@@ -307,7 +287,7 @@ La commande doit se terminer par `=== Migration Report ===` et inclure :
|
|
|
307
287
|
- `Host hook config target: user-level ~/.claude/settings.json and ~/.codex/hooks.json` : où se trouve la couche adapter
|
|
308
288
|
- `Host hook adapters are user-level:` : rappel d'installer les global adapters, et de faire confiance à `~/.codex/hooks.json`
|
|
309
289
|
- `Workflow migration:` : le plan de création ou de rafraîchissement des repo-local harness surfaces
|
|
310
|
-
- `Helper
|
|
290
|
+
- `Helper runtime:` : la chaîne d'outils opérationnels obtenue après application
|
|
311
291
|
- `--- External Tooling ---` : le routing gstack/Waza/gbrain ainsi que les conseils d'installation/mise à jour advisory
|
|
312
292
|
|
|
313
293
|
### Les deux commandes à lancer ensuite
|
|
@@ -329,6 +309,22 @@ Si la sortie du dry-run est incorrecte, arrêtez-vous ici et lisez
|
|
|
329
309
|
- Codex doit faire confiance à `~/.codex/hooks.json` dans Settings pour que les hooks s'exécutent.
|
|
330
310
|
- Ordre de débogage : user-level adapter config -> `repo-harness-hook` ou fallback `repo-harness hook` -> route registry -> `.ai/hooks/*`.
|
|
331
311
|
|
|
312
|
+
|
|
313
|
+
The installed adapter owns eight managed hook routes. The route tuple
|
|
314
|
+
`event + routeId + matcher` is the stable contract; script names are the current
|
|
315
|
+
implementation under `assets/hooks/` or a repo-pinned `.ai/hooks/` copy.
|
|
316
|
+
|
|
317
|
+
| Route | Matcher | Scripts | Function |
|
|
318
|
+
| --- | --- | --- | --- |
|
|
319
|
+
| `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. |
|
|
320
|
+
| `PreToolUse.edit` | `Edit|Write` | `worktree-guard.sh`, `pre-edit-guard.sh` | Enforces worktree policy and plan/contract readiness before implementation edits. |
|
|
321
|
+
| `PreToolUse.subagent` | `Task|Agent|SendUserMessage` | `subagent-return-channel-guard.sh` | Keeps delegated work returning through the parent session instead of leaking completion claims. |
|
|
322
|
+
| `PostToolUse.edit` | `Edit|Write` | `post-edit-guard.sh` | Records edit traces, refreshes handoff/task status, and queues architecture drift when controlled files change. |
|
|
323
|
+
| `PostToolUse.bash` | `Bash` | `post-bash.sh` | Observes command results and captures verification evidence without replacing the command runner. |
|
|
324
|
+
| `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. |
|
|
325
|
+
| `UserPromptSubmit.default` | all prompts | `prompt-guard.sh` | Classifies prompt intent, routes planning/check/hunt hints, and renders host-safe workflow guidance. |
|
|
326
|
+
| `Stop.default` | session stop | `stop-orchestrator.sh` | Finalizes handoff and guards against ending with unresolved draft-plan or completion evidence gaps. |
|
|
327
|
+
|
|
332
328
|
`SessionStart` exécute deux scripts ordonnés avant le début du travail :
|
|
333
329
|
|
|
334
330
|
```mermaid
|
|
@@ -386,8 +382,8 @@ Guards courants :
|
|
|
386
382
|
|
|
387
383
|
## Release actuelle
|
|
388
384
|
|
|
389
|
-
- npm package : `repo-harness@0.5.
|
|
390
|
-
- Generated workflow stamp : `repo-harness@0.5.
|
|
385
|
+
- npm package : `repo-harness@0.5.2`
|
|
386
|
+
- Generated workflow stamp : `repo-harness@0.5.2+template@0.5.2`
|
|
391
387
|
- GitHub repository : `Ancienttwo/repo-harness`
|
|
392
388
|
- Release history : [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
|
|
393
389
|
|
|
@@ -399,6 +395,13 @@ Guards courants :
|
|
|
399
395
|
- `scripts/inspect-project-state.ts`
|
|
400
396
|
- `scripts/migrate-workflow-docs.ts`
|
|
401
397
|
- `assets/workflow-contract.v1.json`
|
|
398
|
+
- Runtime mode is configurable with template vars:
|
|
399
|
+
- `{{RUNTIME_MODE}}`
|
|
400
|
+
- `{{RUNTIME_PROFILE}}`
|
|
401
|
+
- `{{RECOVERY_PROFILE}}`
|
|
402
|
+
- `{{STATE_PROFILE}}`
|
|
403
|
+
- Question-pack source of truth is in:
|
|
404
|
+
- `assets/initializer-question-pack.v4.json`
|
|
402
405
|
- Les generated repos utilisent par défaut le repo-local harness flow :
|
|
403
406
|
- `docs/spec.md -> plans/ -> tasks/contracts/ -> tasks/reviews/ -> .ai/context/context-map.json -> .ai/harness/*`
|
|
404
407
|
- `repo-harness update` rafraîchit les runtime pieces utilisateur :
|
|
@@ -425,6 +428,17 @@ Merci à [Garry Tan](https://x.com/garrytan), auteur de gstack et gbrain. Ils on
|
|
|
425
428
|
influencé le workflow de product discovery, plan/design review, release
|
|
426
429
|
documentation, knowledge sync et handoff retrieval.
|
|
427
430
|
|
|
431
|
+
|
|
432
|
+
### Attribution GitHub des contributeurs
|
|
433
|
+
|
|
434
|
+
Lorsque Codex contribue matériellement à un commit, utilisez le trailer co-author standard de GitHub à la fin du commit message :
|
|
435
|
+
|
|
436
|
+
```text
|
|
437
|
+
Co-authored-by: codex <codex@openai.com>
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
Gardez cette attribution opt-in et visible commit par commit. Ne l'intégrez pas aux scripts de commit ni aux hooks repo-harness downstream sauf si ce dépôt adopte explicitement la même politique.
|
|
441
|
+
|
|
428
442
|
## Action Command Skills
|
|
429
443
|
|
|
430
444
|
Les command facades publics se trouvent dans `assets/skill-commands/` ; ils
|
|
@@ -469,6 +483,23 @@ bun scripts/inspect-project-state.ts --repo . --format text
|
|
|
469
483
|
bash scripts/migrate-project-template.sh --repo . --dry-run
|
|
470
484
|
```
|
|
471
485
|
|
|
486
|
+
|
|
487
|
+
### Runtime reference docs
|
|
488
|
+
|
|
489
|
+
Generic repo-harness runtime/reference docs live in the installed package under
|
|
490
|
+
`assets/reference-configs/` and are resolved through the CLI:
|
|
491
|
+
|
|
492
|
+
```bash
|
|
493
|
+
repo-harness docs list
|
|
494
|
+
repo-harness docs path harness-overview
|
|
495
|
+
repo-harness docs show harness-overview
|
|
496
|
+
```
|
|
497
|
+
|
|
498
|
+
Generated and migrated repos still keep `docs/reference-configs/*.md`, but
|
|
499
|
+
those files are deterministic pointer stubs. Repo-local workflow state,
|
|
500
|
+
policy, checks, runs, handoff packets, context maps, and helper snapshots stay
|
|
501
|
+
under `.ai/`.
|
|
502
|
+
|
|
472
503
|
### Template assembly
|
|
473
504
|
|
|
474
505
|
```bash
|
|
@@ -485,7 +516,23 @@ bash scripts/check-task-workflow.sh --strict
|
|
|
485
516
|
bun scripts/inspect-project-state.ts --repo . --format text
|
|
486
517
|
bash scripts/migrate-project-template.sh --repo . --dry-run
|
|
487
518
|
bash scripts/check-agent-tooling.sh --host both --check-updates
|
|
488
|
-
bun run benchmark:skills --
|
|
519
|
+
bun run benchmark:skills --eval route-workflow-check
|
|
520
|
+
```
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
### Local benchmark skeleton
|
|
524
|
+
|
|
525
|
+
```bash
|
|
526
|
+
bun run benchmark:skills --eval route-workflow-check
|
|
527
|
+
```
|
|
528
|
+
|
|
529
|
+
Eval output is the release/readiness evidence path; dry-run benchmark wiring is only a smoke and is not skill-effectiveness evidence.
|
|
530
|
+
|
|
531
|
+
|
|
532
|
+
### Run one eval across both Claude and Codex
|
|
533
|
+
|
|
534
|
+
```bash
|
|
535
|
+
bun run benchmark:skills --eval repair-agents-task-sync
|
|
489
536
|
```
|
|
490
537
|
|
|
491
538
|
## Key Files
|
|
@@ -495,8 +542,54 @@ bun run benchmark:skills --dry-run
|
|
|
495
542
|
- Plan mapping : `assets/plan-map.json`
|
|
496
543
|
- Question-pack : `assets/initializer-question-pack.v4.json`
|
|
497
544
|
- Shared hooks : `assets/hooks/`
|
|
545
|
+
- Runtime reference docs: `assets/reference-configs/` via `repo-harness docs`
|
|
498
546
|
- Workflow contract : `assets/workflow-contract.v1.json`
|
|
499
547
|
- Hook operations reference : `docs/reference-configs/hook-operations.md`
|
|
500
548
|
- Template assembler : `scripts/assemble-template.ts`
|
|
501
549
|
- State inspector : `scripts/inspect-project-state.ts`
|
|
550
|
+
- External tooling detector: `scripts/check-agent-tooling.sh`
|
|
551
|
+
- Scaffolding scripts:
|
|
552
|
+
- `scripts/init-project.sh`
|
|
553
|
+
- `scripts/create-project-dirs.sh`
|
|
502
554
|
- Legacy-doc migrator : `scripts/migrate-workflow-docs.ts`
|
|
555
|
+
|
|
556
|
+
## Generated vs Self-Hosted Hook Parity
|
|
557
|
+
|
|
558
|
+
- Le comportement downstream des hooks est défini par la sortie générée depuis `assets/hooks/` et `assets/reference-configs/`.
|
|
559
|
+
- Ce repo dogfoode le même contract, mais le comportement self-host ne se synchronise pas magiquement avec les generated repos ; un changement doit mettre à jour explicitement les deux surfaces lorsque nécessaire.
|
|
560
|
+
- Chaque changement de hook doit dire s'il affecte `self-host`, `generated` ou `both`.
|
|
561
|
+
|
|
562
|
+
## Package Manager Defaults
|
|
563
|
+
|
|
564
|
+
- Priorité générale par défaut : `bun > pnpm > npm`
|
|
565
|
+
- **Plan G/H** (Python-centric) utilise **`uv`** comme primary package manager par défaut.
|
|
566
|
+
|
|
567
|
+
## Runtime Profiles
|
|
568
|
+
|
|
569
|
+
- `Plan-only (recommended)` (default)
|
|
570
|
+
- `Plan + Permissionless`
|
|
571
|
+
- `Standard (ask before each action)`
|
|
572
|
+
|
|
573
|
+
Configuré dans `assets/initializer-question-pack.v4.json` et consommé par `scripts/initializer-question-pack.ts`.
|
|
574
|
+
|
|
575
|
+
## Verification
|
|
576
|
+
|
|
577
|
+
Pour la release review, utilisez le gate unique équivalent CI :
|
|
578
|
+
|
|
579
|
+
```bash
|
|
580
|
+
bun run check:ci
|
|
581
|
+
```
|
|
582
|
+
|
|
583
|
+
Ce gate se développe vers les checks possédés par le repo ; `bun run check:release` ajoute seulement le preflight npm unpublished-version avant de déléguer au même gate.
|
|
584
|
+
|
|
585
|
+
```bash
|
|
586
|
+
bun test
|
|
587
|
+
bash scripts/check-deploy-sql-order.sh
|
|
588
|
+
bash scripts/check-architecture-sync.sh
|
|
589
|
+
bash scripts/check-task-sync.sh
|
|
590
|
+
bash scripts/check-task-workflow.sh --strict
|
|
591
|
+
bun scripts/inspect-project-state.ts --repo . --format text
|
|
592
|
+
bash scripts/migrate-project-template.sh --repo . --dry-run
|
|
593
|
+
bash scripts/check-agent-tooling.sh --host both --check-updates
|
|
594
|
+
bun run benchmark:skills --eval route-workflow-check
|
|
595
|
+
```
|