repo-harness 0.6.0 → 0.7.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 (82) hide show
  1. package/.agents/skills/repo-harness-chatgpt-browser/SKILL.md +106 -0
  2. package/README.es.md +13 -13
  3. package/README.fr.md +13 -14
  4. package/README.ja.md +8 -7
  5. package/README.md +106 -18
  6. package/README.zh-CN.md +36 -12
  7. package/SKILL.md +2 -0
  8. package/assets/hooks/lib/workflow-state.sh +83 -13
  9. package/assets/hooks/post-bash.sh +3 -6
  10. package/assets/reference-configs/agentic-development-flow.md +9 -0
  11. package/assets/reference-configs/document-generation.md +1 -0
  12. package/assets/reference-configs/handoff-protocol.md +5 -7
  13. package/assets/reference-configs/harness-overview.md +13 -0
  14. package/assets/reference-configs/sprint-contracts.md +26 -6
  15. package/assets/skill-commands/manifest.json +14 -0
  16. package/assets/skill-commands/repo-harness-goal/SKILL.md +1 -1
  17. package/assets/skill-commands/repo-harness-gptpro/SKILL.md +52 -0
  18. package/assets/skill-commands/repo-harness-gptpro-setup/SKILL.md +50 -0
  19. package/assets/skill-version.json +10 -2
  20. package/assets/templates/contract.template.md +15 -4
  21. package/assets/templates/helpers/archive-workflow.sh +2 -2
  22. package/assets/templates/helpers/capture-plan.sh +2 -2
  23. package/assets/templates/helpers/check-task-workflow.sh +161 -2
  24. package/assets/templates/helpers/contract-run.ts +71 -8
  25. package/assets/templates/helpers/contract-worktree.sh +5 -9
  26. package/assets/templates/helpers/ensure-task-workflow.sh +28 -6
  27. package/assets/templates/helpers/harness-trace-grade.sh +150 -0
  28. package/assets/templates/helpers/new-plan.sh +2 -2
  29. package/assets/templates/helpers/plan-to-todo.sh +45 -4
  30. package/assets/templates/helpers/prepare-handoff.sh +51 -4
  31. package/assets/templates/helpers/sprint-backlog.sh +8 -2
  32. package/assets/templates/helpers/verify-contract.sh +90 -13
  33. package/assets/templates/helpers/verify-sprint.sh +496 -14
  34. package/assets/templates/plan.template.md +2 -2
  35. package/assets/templates/review.template.md +13 -1
  36. package/assets/workflow-contract.v1.json +2 -0
  37. package/docs/images/repo-harness-gptpro-cn.png +0 -0
  38. package/docs/images/repo-harness-gptpro.png +0 -0
  39. package/docs/repo-harness-chatgpt-browser-engine.md +184 -0
  40. package/package.json +10 -2
  41. package/scripts/archive-workflow.sh +2 -2
  42. package/scripts/capture-plan.sh +2 -2
  43. package/scripts/check-ci.sh +35 -1
  44. package/scripts/check-release-published.sh +51 -0
  45. package/scripts/check-tarball-install-smoke.sh +58 -0
  46. package/scripts/check-task-workflow.sh +161 -2
  47. package/scripts/contract-run.ts +71 -8
  48. package/scripts/contract-worktree.sh +5 -9
  49. package/scripts/ensure-task-workflow.sh +28 -6
  50. package/scripts/harness-trace-grade.sh +150 -0
  51. package/scripts/lib/project-init-lib.sh +30 -8
  52. package/scripts/new-plan.sh +2 -2
  53. package/scripts/plan-to-todo.sh +45 -4
  54. package/scripts/prepare-handoff.sh +51 -4
  55. package/scripts/sprint-backlog.sh +8 -2
  56. package/scripts/verify-contract.sh +90 -13
  57. package/scripts/verify-sprint.sh +496 -14
  58. package/src/cli/chatgpt-browser/engine.ts +182 -0
  59. package/src/cli/chatgpt-browser/file-policy.ts +158 -0
  60. package/src/cli/chatgpt-browser/native-provider.ts +378 -0
  61. package/src/cli/chatgpt-browser/oracle-provider.ts +108 -0
  62. package/src/cli/chatgpt-browser/prompt-assembler.ts +29 -0
  63. package/src/cli/chatgpt-browser/session-store.ts +294 -0
  64. package/src/cli/chatgpt-browser/types.ts +159 -0
  65. package/src/cli/commands/chatgpt.ts +309 -0
  66. package/src/cli/commands/mcp.ts +244 -0
  67. package/src/cli/index.ts +24 -1
  68. package/src/cli/mcp/audit.ts +32 -0
  69. package/src/cli/mcp/auth.ts +106 -0
  70. package/src/cli/mcp/instructions.ts +9 -0
  71. package/src/cli/mcp/oauth.ts +214 -0
  72. package/src/cli/mcp/paths.ts +115 -0
  73. package/src/cli/mcp/policy.ts +127 -0
  74. package/src/cli/mcp/redaction.ts +53 -0
  75. package/src/cli/mcp/repo.ts +24 -0
  76. package/src/cli/mcp/server.ts +87 -0
  77. package/src/cli/mcp/setup.ts +681 -0
  78. package/src/cli/mcp/tools.ts +995 -0
  79. package/src/cli/mcp/transports/http.ts +372 -0
  80. package/src/cli/mcp/transports/stdio.ts +8 -0
  81. package/src/cli/mcp/types.ts +34 -0
  82. package/src/effects/fs-transaction.ts +287 -12
@@ -0,0 +1,106 @@
1
+ ---
2
+ name: repo-harness-chatgpt-browser
3
+ description: Use when the user wants Codex to consult their logged-in ChatGPT Web session through repo-harness browser engine for planning, architecture review, PRD critique, or Codex goal generation.
4
+ ---
5
+
6
+ # repo-harness ChatGPT Browser
7
+
8
+ Use this skill when the user asks to consult ChatGPT Web, GPT Pro, browser GPT, or a logged-in ChatGPT account through repo-harness.
9
+
10
+ ## Rules
11
+
12
+ 1. This uses the user's logged-in ChatGPT Web browser session, not the OpenAI API.
13
+ 2. Do not ask for or handle passwords, SSO secrets, 2FA codes, cookies, browser storage, or tokens.
14
+ 3. Before a non-dry-run consult, state that it may create or continue a real ChatGPT Web conversation.
15
+ 4. Prefer dry-run first when files are involved:
16
+
17
+ ```bash
18
+ repo-harness chatgpt browser-consult --repo . --dry-run --prompt "<prompt>" --file <path>
19
+ ```
20
+
21
+ 5. For readiness, run:
22
+
23
+ ```bash
24
+ repo-harness chatgpt browser-doctor --repo .
25
+ ```
26
+
27
+ 6. Use browser consult for planning, review, critique, and goal generation. Do not use it as the executor for code edits.
28
+ 7. Save useful results into repo-harness artifacts with repo-relative `--write-output` paths such as:
29
+
30
+ ```text
31
+ .ai/harness/handoff/chatgpt-review.md
32
+ .ai/harness/handoff/codex-goal.md
33
+ plans/prds/*.prd.md
34
+ plans/sprints/*.sprint.md
35
+ ```
36
+
37
+ 8. If login, captcha, workspace picker, or SSO is required, stop and ask the user to complete it in the browser.
38
+ 9. Do not enable remote CDP unless the user explicitly asked for remote browser control and the security boundary is documented.
39
+ 10. For MCP usage, require the server to be started with:
40
+
41
+ ```bash
42
+ repo-harness mcp serve --repo . --enable-chatgpt-browser
43
+ ```
44
+
45
+ 11. Do not rely on provider stdout `Artifact:` / `Output:` paths being imported. Browser engine session records save prompt, transcript, output, metadata, and trusted provider IDs; ordinary stdout paths are ignored.
46
+ 12. Native provider uses the current ChatGPT Web model selection. Do not pass `--model` or `--thinking` with `--provider native`; use Oracle when model selection is required.
47
+
48
+ ## Common Commands
49
+
50
+ Dry-run consult:
51
+
52
+ ```bash
53
+ repo-harness chatgpt browser-consult \
54
+ --repo . \
55
+ --dry-run \
56
+ --prompt "Review this sprint and return execution risks." \
57
+ --file plans/sprints/example.sprint.md
58
+ ```
59
+
60
+ Oracle provider consult:
61
+
62
+ ```bash
63
+ repo-harness chatgpt browser-consult \
64
+ --repo . \
65
+ --provider oracle \
66
+ --prompt "Review this PRD and return risks plus a smallest next step." \
67
+ --file plans/prds/example.prd.md \
68
+ --write-output .ai/harness/handoff/chatgpt-review.md
69
+ ```
70
+
71
+ Native provider spike:
72
+
73
+ ```bash
74
+ repo-harness chatgpt browser-doctor --repo . --provider native
75
+ repo-harness chatgpt browser-consult \
76
+ --repo . \
77
+ --provider native \
78
+ --browser-channel chrome \
79
+ --keep-browser \
80
+ --prompt "Reply exactly OK"
81
+ ```
82
+
83
+ Use native provider only when the user is ready for a visible ChatGPT Web run. If login is required, keep the browser open and have the user complete login manually; do not request or handle credentials.
84
+
85
+ Read the result:
86
+
87
+ ```bash
88
+ repo-harness chatgpt browser-list --repo .
89
+ repo-harness chatgpt browser-session --repo . <sessionId>
90
+ repo-harness chatgpt browser-open --repo . <sessionId>
91
+ ```
92
+
93
+ Continue from a saved session:
94
+
95
+ ```bash
96
+ repo-harness chatgpt browser-followup \
97
+ --repo . \
98
+ --session <sessionId> \
99
+ --prompt "Challenge the previous result and return the smallest next step."
100
+ ```
101
+
102
+ Plan cleanup before deleting local session records:
103
+
104
+ ```bash
105
+ repo-harness chatgpt browser-cleanup --repo . --status dry_run --limit 20
106
+ ```
package/README.es.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # repo-harness
2
2
 
3
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">
4
+ <img src="docs/images/repo-harness-gptpro.png" alt="repo-harness architecture and ChatGPT Pro local planner workflow diagram" width="960">
5
5
  </p>
6
6
 
7
7
  `repo-harness` convierte las sesiones de programación con Claude/Codex en un
@@ -56,17 +56,17 @@ En un repositorio adoptado, la superficie se mantiene pequeña:
56
56
  | `tasks/contracts/`, `tasks/reviews/` y `.ai/harness/checks/` | Scope, verificación y evidencia de review para probar que el trabajo terminó. |
57
57
  | `.ai/harness/handoff/` y `tasks/current.md` | Session journal y estado resumible, derivados de workflow artifacts en vez de chat memory. |
58
58
 
59
- ## Novedades en 0.6.0
59
+ ## Novedades en 0.7.1
60
60
 
61
- - **Transactional adoption plans.** `repo-harness adopt --dry-run --json` ahora
62
- emite un operation plan protocol v1 con IDs estables, summary, content hashes
63
- y rollback metadata.
64
- - **Bootstrap files gestionados por el manifest.** Los templates iniciales
65
- `docs/spec.md`, `tasks/todos.md`, `tasks/current.md` y `tasks/lessons.md`
66
- ahora salen del workflow contract manifest, no de strings locales del planner.
67
- - **Apply TypeScript experimental.** `repo-harness adopt --experimental-ts-apply`
68
- puede aplicar el safe operation subset con atomic writes, target locks,
69
- backups y preflight rejection para boundaries self-host no soportadas.
61
+ - **ChatGPT browser engine.** `repo-harness chatgpt browser-*` crea sesiones
62
+ ChatGPT Web repo-locales con archivos revisados por policy, sin usar OpenAI API.
63
+ - **MCP browser tools opt-in.** `repo-harness mcp serve
64
+ --enable-chatgpt-browser` expone consult/read/list/continue/open; por defecto
65
+ estos tools siguen desactivados.
66
+ - **Oracle y native providers.** El engine incluye un Oracle browser wrapper y
67
+ un spike native vía Chrome instalado + CDP local.
68
+ - **Hosted CI y release smoke.** El repo añade un GitHub CI gate y un tarball
69
+ install smoke que arranca los binarios empaquetados de `repo-harness`.
70
70
 
71
71
  ## Qué hace el producto
72
72
 
@@ -383,8 +383,8 @@ Guards habituales:
383
383
 
384
384
  ## Release actual
385
385
 
386
- - npm package: `repo-harness@0.6.0`
387
- - Generated workflow stamp: `repo-harness@0.6.0+template@0.6.0`
386
+ - npm package: `repo-harness@0.7.1`
387
+ - Generated workflow stamp: `repo-harness@0.7.1+template@0.7.1`
388
388
  - GitHub repository: `Ancienttwo/repo-harness`
389
389
  - Release history: [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
390
390
 
package/README.fr.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # repo-harness
2
2
 
3
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">
4
+ <img src="docs/images/repo-harness-gptpro.png" alt="repo-harness architecture and ChatGPT Pro local planner workflow diagram" width="960">
5
5
  </p>
6
6
 
7
7
  `repo-harness` transforme les sessions de code Claude/Codex en workflow
@@ -56,18 +56,17 @@ Dans un dépôt adopté, la surface à comprendre reste volontairement réduite
56
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
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
58
 
59
- ## Nouveautés de la 0.6.0
59
+ ## Nouveautés de la 0.7.1
60
60
 
61
- - **Transactional adoption plans.** `repo-harness adopt --dry-run --json` émet
62
- maintenant un operation plan protocol v1 avec IDs stables, summary, content
63
- hashes et rollback metadata.
64
- - **Bootstrap files gérés par le manifest.** Les templates initiaux
65
- `docs/spec.md`, `tasks/todos.md`, `tasks/current.md` et `tasks/lessons.md`
66
- viennent désormais du workflow contract manifest plutôt que de strings locales
67
- au planner.
68
- - **Apply TypeScript expérimental.** `repo-harness adopt --experimental-ts-apply`
69
- peut appliquer le safe operation subset avec atomic writes, target locks,
70
- backups et preflight rejection des boundaries self-host non prises en charge.
61
+ - **ChatGPT browser engine.** `repo-harness chatgpt browser-*` crée des sessions
62
+ ChatGPT Web repo-locales avec des fichiers contrôlés par policy, sans OpenAI API.
63
+ - **MCP browser tools opt-in.** `repo-harness mcp serve
64
+ --enable-chatgpt-browser` expose consult/read/list/continue/open, désactivés
65
+ par défaut.
66
+ - **Oracle et native providers.** Le moteur inclut un Oracle browser wrapper et
67
+ un spike native via Chrome installé et CDP local.
68
+ - **Hosted CI et release smoke.** Le dépôt ajoute un GitHub CI gate et un
69
+ tarball install smoke qui démarre les binaires packagés `repo-harness`.
71
70
 
72
71
  ## Ce que fait le produit
73
72
 
@@ -388,8 +387,8 @@ Guards courants :
388
387
 
389
388
  ## Release actuelle
390
389
 
391
- - npm package : `repo-harness@0.6.0`
392
- - Generated workflow stamp : `repo-harness@0.6.0+template@0.6.0`
390
+ - npm package : `repo-harness@0.7.1`
391
+ - Generated workflow stamp : `repo-harness@0.7.1+template@0.7.1`
393
392
  - GitHub repository : `Ancienttwo/repo-harness`
394
393
  - Release history : [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
395
394
 
package/README.ja.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # repo-harness
2
2
 
3
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">
4
+ <img src="docs/images/repo-harness-gptpro.png" alt="repo-harness architecture and ChatGPT Pro local planner workflow diagram" width="960">
5
5
  </p>
6
6
 
7
7
  `repo-harness` は、Claude/Codex のコーディング session を、繰り返し使える
@@ -47,11 +47,12 @@ Agent に完全な PRD または Sprint を渡せば、あとは review and `nex
47
47
  | `tasks/contracts/`, `tasks/reviews/`, `.ai/harness/checks/` | 作業完了を証明する scope、verification、review evidence。 |
48
48
  | `.ai/harness/handoff/` と `tasks/current.md` | chat memory ではなく workflow artifacts から派生する session journal と resumable status。 |
49
49
 
50
- ## 0.6.0 の新機能
50
+ ## 0.7.1 の新機能
51
51
 
52
- - **Transactional adoption plans。** `repo-harness adopt --dry-run --json` は、安定した ID、summary、content hash、rollback metadata を含む protocol v1 operation plan を出力します。
53
- - **Manifest-owned bootstrap files。** 初期 `docs/spec.md`、`tasks/todos.md`、`tasks/current.md`、`tasks/lessons.md` templates は、planner-local strings ではなく workflow contract manifest から来るようになりました。
54
- - **Experimental TypeScript apply。** `repo-harness adopt --experimental-ts-apply` は、atomic writes、target locks、backups、unsupported self-host boundary の preflight rejection を使って safe operation subset を適用できます。
52
+ - **ChatGPT browser engine。** `repo-harness chatgpt browser-*` は、OpenAI API を使わず、policy-checked な repo-local ChatGPT Web consult session を作れます。
53
+ - **Opt-in MCP browser tools。** `repo-harness mcp serve --enable-chatgpt-browser` のときだけ consult/read/list/continue/open tools を公開し、デフォルトでは無効です。
54
+ - **Oracle and native providers。** Oracle browser wrapper と、installed Chrome + local CDP を使う native spike を含みます。
55
+ - **Hosted CI and release smoke。** GitHub CI gate と、packaged `repo-harness` binaries を起動する tarball install smoke を追加しました。
55
56
 
56
57
  ## repo-harness は何をするか
57
58
 
@@ -351,8 +352,8 @@ hook がブロックしたときは、まず terminal の構造化された出
351
352
 
352
353
  ## 現在の Release
353
354
 
354
- - npm package:`repo-harness@0.6.0`
355
- - Generated workflow stamp:`repo-harness@0.6.0+template@0.6.0`
355
+ - npm package:`repo-harness@0.7.1`
356
+ - Generated workflow stamp:`repo-harness@0.7.1+template@0.7.1`
356
357
  - GitHub repository:`Ancienttwo/repo-harness`
357
358
  - Release history:[`docs/CHANGELOG.md`](docs/CHANGELOG.md)
358
359
 
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # repo-harness
2
2
 
3
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">
4
+ <img src="docs/images/repo-harness-gptpro.png" alt="repo-harness architecture and ChatGPT Pro local planner workflow diagram" width="960">
5
5
  </p>
6
6
 
7
7
  `repo-harness` turns Claude/Codex coding sessions into a repeatable repo-local
@@ -50,17 +50,42 @@ In an adopted repo, the surface area is intentionally small:
50
50
  | `tasks/contracts/`, `tasks/reviews/`, and `.ai/harness/checks/` | Scope, verification, and review evidence for proving the work is done. |
51
51
  | `.ai/harness/handoff/` and `tasks/current.md` | Session journal and resumable status, derived from workflow artifacts instead of chat memory. |
52
52
 
53
- ## What's New in 0.6.0
53
+ ## Human Review Path
54
54
 
55
- - **Transactional adoption plans.** `repo-harness adopt --dry-run --json` now
56
- emits a protocol v1 operation plan with stable IDs, summaries, content hashes,
57
- and rollback metadata.
58
- - **Manifest-owned bootstrap files.** The initial `docs/spec.md`,
59
- `tasks/todos.md`, `tasks/current.md`, and `tasks/lessons.md` templates now
60
- come from the workflow contract manifest instead of planner-local strings.
61
- - **Experimental TypeScript apply.** `repo-harness adopt --experimental-ts-apply`
62
- can apply the safe operation subset with atomic writes, target locks, backups,
63
- and preflight rejection for unsupported self-host boundaries.
55
+ Start with `tasks/reviews/<task>.review.md`. The `## Human Review Card` is the
56
+ one-screen decision surface: verdict, change type, intended vs actual files,
57
+ commands passed, external acceptance, residual risk, reviewer action, and
58
+ rollback. Then inspect the active contract, latest trace in
59
+ `.ai/harness/checks/latest.json`, and the changed files. Accept only when the
60
+ review recommends pass, the card verdict is pass, and external acceptance is
61
+ pass, `not_required`, or an explicit manual override.
62
+
63
+ ## Agent Tracking Path
64
+
65
+ Agents read source artifacts before derived summaries:
66
+
67
+ | Agent reads first | Human reviews first |
68
+ | --- | --- |
69
+ | Current user prompt and referenced files | `tasks/reviews/<task>.review.md` Human Review Card |
70
+ | `AGENTS.md` / `CLAUDE.md` | Changed files and diff |
71
+ | Active plan in `.ai/harness/active-plan` | Active contract allowed paths and exit criteria |
72
+ | Active contract in `tasks/contracts/` | `.ai/harness/checks/latest.json` and run trace |
73
+ | Latest handoff in `.ai/harness/handoff/` | Residual risks and rollback |
74
+
75
+ `tasks/current.md` is only an orientation snapshot. If it disagrees with the
76
+ active plan, contract, review, checks, or handoff, the source artifacts win.
77
+
78
+ ## What's New in 0.7.1
79
+
80
+ - **GPT Pro setup path.** `repo-harness:gptpro_setup` guides
81
+ `gptpro_browser` browser/session setup and `gptpro_mcp` ChatGPT Connector MCP
82
+ setup while keeping ChatGPT Pro separate from API quota.
83
+ - **GPT Pro consult path.** `repo-harness:gptpro` presents `gptpro
84
+ consult/read/continue/open` language over the existing ChatGPT Web browser
85
+ session engine.
86
+ - **Trace-safe PostBash checks.** PostBash advisory metadata now writes to
87
+ `.ai/harness/checks/post-bash-latest.json`, leaving `latest.json` reserved for
88
+ authoritative `repo-harness-run-trace.v1` evidence.
64
89
 
65
90
  ## What repo-harness Does
66
91
 
@@ -74,11 +99,71 @@ target repository so Claude, Codex, and humans can agree on:
74
99
  - which checks and review evidence prove the work is done
75
100
  - how hooks should warn, block, trace, and hand off work across sessions
76
101
 
77
- It is not an agent gateway, product runtime, database service, or MCP server.
78
102
  The product boundary is deliberately boring: inspect a repo, install or refresh
79
103
  workflow files, route host events through repo-local hooks, and verify that the
80
104
  workflow surfaces stay consistent.
81
105
 
106
+ As an optional sidecar, `repo-harness mcp` exposes only workflow artifacts to
107
+ MCP clients. ChatGPT can use it as a planner/reviewer to read state and move an
108
+ idea through PRD, checklist Sprint, and Codex goal handoff artifacts; it does
109
+ not get source-code write access, arbitrary shell execution, or a default Codex
110
+ runner. Codex remains the executor. The generated manual setup guide lives at
111
+ `docs/repo-harness-chatgpt-mcp-setup.md`, and the local CLI handoff is
112
+ `repo-harness mcp prepare-goal --prd <prd> --sprint <sprint>`.
113
+
114
+ ### MCP Connector Quickstart
115
+
116
+ Use the MCP sidecar when you want ChatGPT to plan against the real repo state
117
+ and Codex to execute the resulting file-backed Sprint.
118
+
119
+ ```bash
120
+ repo-harness mcp setup chatgpt --repo .
121
+ repo-harness mcp serve --repo . --transport http --host 127.0.0.1 --port 8765 --profile planner
122
+ ```
123
+
124
+ Expose that local server through an HTTPS tunnel and create a ChatGPT Connector
125
+ with the `/mcp` URL. The generated guide is written to:
126
+
127
+ ```text
128
+ docs/repo-harness-chatgpt-mcp-setup.md
129
+ ```
130
+
131
+ The human workflow is:
132
+
133
+ 1. ChatGPT reads repo-harness workflow files through MCP.
134
+ 2. ChatGPT writes a PRD with `write_prd_from_idea`.
135
+ 3. ChatGPT writes a checklist Sprint with `write_checklist_sprint`.
136
+ 4. ChatGPT prepares `.ai/harness/handoff/codex-goal.md` with `prepare_codex_goal_from_sprint`.
137
+ 5. Codex runs the host-native `/goal` prompt and stages each completed Sprint phase.
138
+
139
+ Local fallback for the last handoff step:
140
+
141
+ ```bash
142
+ repo-harness mcp prepare-goal --repo . --prd plans/prds/<feature>.prd.md --sprint plans/sprints/<feature>.sprint.md
143
+ ```
144
+
145
+ The agent-facing Skill is installed at:
146
+
147
+ ```text
148
+ .agents/skills/repo-harness-chatgpt-bridge/SKILL.md
149
+ ```
150
+
151
+ That Skill tells Codex how to consume ChatGPT-produced PRD/Sprint/Goal artifacts
152
+ without granting ChatGPT source-code writes or shell execution.
153
+
154
+ Dev Mode can opt into local agent execution through MCP. This is off by default.
155
+ When the user enables the `orchestrator` profile with the dev runner setting,
156
+ ChatGPT can call `run_agent_goal`, which reads only
157
+ `.ai/harness/handoff/codex-goal.md` and runs the fixed handoff through an
158
+ allowed local CLI such as `codex exec` or `claude -p`.
159
+
160
+ ```bash
161
+ repo-harness mcp serve --repo . --transport http --profile orchestrator --enable-dev-runner --dev-runner-agents codex
162
+ ```
163
+
164
+ This setting is for local Developer Mode only. It is timeout-bounded, audited,
165
+ and not arbitrary shell.
166
+
82
167
  ## How It Works
83
168
 
84
169
  The design has three layers:
@@ -90,10 +175,11 @@ The design has three layers:
90
175
  `.ai/harness/`, helper scripts, and `.ai/hooks/`.
91
176
  3. **Host adapters**: user-level `~/.claude/settings.json` and
92
177
  `~/.codex/hooks.json` route Claude/Codex events into `repo-harness-hook`.
93
- The hook entrypoint exits silently for non-opt-in repos. For opted-in repos,
94
- it resolves hooks central-first through the packaged install or
95
- `~/.repo-harness/hooks/`, with repo policy able to pin self-host development
96
- back to `.ai/hooks/*`.
178
+
179
+ The hook entrypoint exits silently for non-opt-in repos. For opted-in repos,
180
+ it resolves hooks central-first through the packaged install or
181
+ `~/.repo-harness/hooks/`, with repo policy able to pin self-host development
182
+ back to `.ai/hooks/*`.
97
183
 
98
184
  For `UserPromptSubmit`, the public adapter contract stays
99
185
  `repo-harness-hook UserPromptSubmit --route default`. The CLI route registry
@@ -464,8 +550,8 @@ Most common guards:
464
550
 
465
551
  ## Current Release
466
552
 
467
- - npm package: `repo-harness@0.6.0`
468
- - Generated workflow stamp: `repo-harness@0.6.0+template@0.6.0`
553
+ - npm package: `repo-harness@0.7.1`
554
+ - Generated workflow stamp: `repo-harness@0.7.1+template@0.7.1`
469
555
  - GitHub repository: `Ancienttwo/repo-harness`
470
556
  - Release history: [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
471
557
 
@@ -552,6 +638,8 @@ skill discovery compatible while the CLI and hooks own execution:
552
638
  - 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/`)
553
639
  - Sprint program layer: `repo-harness-sprint` (ordered sprint backlogs in `plans/sprints/`, each row expanded with `$think` before the contract flow)
554
640
  - 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)
641
+ - GPT Pro local setup layer: `repo-harness-gptpro-setup` / `repo-harness:gptpro_setup` (guides `gptpro_browser` browser/session setup and `gptpro_mcp` ChatGPT Connector MCP setup while keeping ChatGPT Pro separate from API quota)
642
+ - GPT Pro consult layer: `repo-harness-gptpro` / `repo-harness:gptpro` (uses `gptpro consult/read/continue/open` language while mapping to the local ChatGPT Web browser session engine)
555
643
  - 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`
556
644
  - Branch project creation command: `repo-harness-scaffold`
557
645
 
package/README.zh-CN.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # repo-harness
2
2
 
3
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">
4
+ <img src="docs/images/repo-harness-gptpro-cn.png" alt="repo-harness x GPT Pro 本地 Planner Agent 推广图" width="960">
5
5
  </p>
6
6
 
7
7
  `repo-harness` 把 Claude/Codex 的 AI 编程会话变成可复用、可恢复、可检查的
@@ -43,16 +43,40 @@ handoff、检查结果和 review evidence 写回项目文件,让下一个 agen
43
43
  | `tasks/contracts/`、`tasks/reviews/`、`.ai/harness/checks/` | 证明完成所需的 scope、verification 和 review evidence。 |
44
44
  | `.ai/harness/handoff/` 和 `tasks/current.md` | session journal 与可恢复状态,从 workflow artifacts 派生,而不是依赖聊天记忆。 |
45
45
 
46
- ## 0.6.0 新特性
46
+ ## Human Review Path
47
47
 
48
- - **事务型 adoption plan。** `repo-harness adopt --dry-run --json` 现在输出
49
- protocol v1 operation plan,包含稳定 ID、summary、content hash 和 rollback metadata。
50
- - **Manifest-owned bootstrap 文件。** 初始 `docs/spec.md`、`tasks/todos.md`、
51
- `tasks/current.md`、`tasks/lessons.md` 模板改由 workflow contract manifest 管理,
52
- 不再放在 planner 本地字符串里。
53
- - **实验性 TypeScript apply。** `repo-harness adopt --experimental-ts-apply`
54
- 可以执行 safe operation subset,并使用 atomic write、target lock、backup 和
55
- unsupported self-host boundary preflight。
48
+ 先读 `tasks/reviews/<task>.review.md`。`## Human Review Card` 是一屏决策面:
49
+ verdict、change type、预期/实际改动文件、已通过命令、external acceptance、
50
+ 残余风险、reviewer action 和 rollback。然后检查 active contract、
51
+ `.ai/harness/checks/latest.json` 里的 latest trace,以及实际 diff。只有当 review
52
+ recommend pass、card verdict 为 pass,且 external acceptance 为 pass、not_required
53
+ 或明确 manual override 时,才进入 closeout。
54
+
55
+ ## Agent Tracking Path
56
+
57
+ Agent 先读 source artifacts,再读派生摘要:
58
+
59
+ | Agent reads first | Human reviews first |
60
+ | --- | --- |
61
+ | 当前用户 prompt 和引用文件 | `tasks/reviews/<task>.review.md` 的 Human Review Card |
62
+ | `AGENTS.md` / `CLAUDE.md` | changed files 和 diff |
63
+ | `.ai/harness/active-plan` 指向的 active plan | active contract 的 allowed paths 和 exit criteria |
64
+ | `tasks/contracts/` 下的 active contract | `.ai/harness/checks/latest.json` 和 run trace |
65
+ | `.ai/harness/handoff/` 下的 latest handoff | 残余风险和 rollback |
66
+
67
+ `tasks/current.md` 只是 orientation snapshot。如果它和 active plan、contract、
68
+ review、checks 或 handoff 冲突,以 source artifacts 为准。
69
+
70
+ ## 0.7.1 新特性
71
+
72
+ - **ChatGPT browser engine。** `repo-harness chatgpt browser-*` 可以用
73
+ policy-checked 文件输入创建 repo-local ChatGPT Web consult session,不走 OpenAI API。
74
+ - **Opt-in MCP browser tools。** `repo-harness mcp serve
75
+ --enable-chatgpt-browser` 才会暴露 consult/read/list/continue/open 工具,默认关闭。
76
+ - **Oracle 和 native provider。** Browser engine 支持 Oracle browser wrapper,
77
+ 也支持基于本机已安装 Chrome CDP 的 logged-in ChatGPT Web spike。
78
+ - **Hosted CI 和 release smoke。** 仓库新增 GitHub CI gate,并用 tarball install
79
+ smoke 验证 packaged `repo-harness` binaries 能启动。
56
80
 
57
81
  ## 产品做什么
58
82
 
@@ -418,8 +442,8 @@ hook block 工作时,先看 terminal 里的结构化输出。核心字段是
418
442
 
419
443
  ## 当前 Release
420
444
 
421
- - npm package:`repo-harness@0.6.0`
422
- - Generated workflow stamp:`repo-harness@0.6.0+template@0.6.0`
445
+ - npm package:`repo-harness@0.7.1`
446
+ - Generated workflow stamp:`repo-harness@0.7.1+template@0.7.1`
423
447
  - GitHub repository:`Ancienttwo/repo-harness`
424
448
  - Release history:[`docs/CHANGELOG.md`](docs/CHANGELOG.md)
425
449
 
package/SKILL.md CHANGED
@@ -145,6 +145,8 @@ contract files:
145
145
  - `repo-harness-prd`: generate an upper-layer PRD in `plans/prds/`
146
146
  - `repo-harness-sprint`: plan a sprint backlog in `plans/sprints/` from a PRD or source spec, then expand each row with `$think` before the task-contract flow
147
147
  - `repo-harness-goal` / `repo-harness:goal`: prepare a Codex/Claude `/goal` prompt from detailed PRD or Sprint artifacts; request those documents before starting when missing
148
+ - `repo-harness-gptpro-setup` / `repo-harness:gptpro_setup`: guide `gptpro_browser` ChatGPT Web browser/session setup and `gptpro_mcp` ChatGPT Connector MCP setup without treating GPT Pro as API quota
149
+ - `repo-harness-gptpro` / `repo-harness:gptpro`: consult or continue GPT Pro through the local ChatGPT Web browser/session bridge while presenting `gptpro consult/read/continue/open` wording over the underlying `browser-*` engine commands
148
150
 
149
151
  Internal steps such as `hooks-init`, `docs-init`, and `create-project-dirs` are
150
152
  not public commands. They stay behind `init`, `scaffold`, `migrate`, and