@moretea-labs/forge 1.5.0-rc.1 → 1.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 (264) hide show
  1. package/AGENTS.md +9 -11
  2. package/CHANGELOG.md +27 -1
  3. package/CLAUDE.md +8 -10
  4. package/DESIGN.md +278 -0
  5. package/README.md +70 -90
  6. package/README.zh-CN.md +52 -55
  7. package/SKILL.md +8 -11
  8. package/THIRD_PARTY_NOTICES.md +9 -3
  9. package/assets/branding/README.md +4 -2
  10. package/assets/hooks/lib/workflow-state.sh +19 -18
  11. package/assets/hooks/post-edit-guard.sh +6 -75
  12. package/assets/hooks/prompt-guard.sh +24 -12
  13. package/assets/hooks/session-start-context.sh +17 -17
  14. package/assets/hooks/stop-orchestrator.sh +2 -2
  15. package/assets/partials/04-project-structure.partial.md +6 -6
  16. package/assets/partials/05-workflow.partial.md +6 -6
  17. package/assets/partials/07-footer.partial.md +1 -1
  18. package/assets/partials/08-orchestration.partial.md +2 -2
  19. package/assets/partials-agents/02-operating-mode.partial.md +5 -5
  20. package/assets/partials-agents/03-orchestration.partial.md +3 -3
  21. package/assets/partials-agents/04-task-protocol.partial.md +3 -3
  22. package/assets/partials-agents/08-deep-docs.partial.md +1 -1
  23. package/assets/reference-configs/agentic-development-flow.md +49 -86
  24. package/assets/reference-configs/external-tooling.md +21 -61
  25. package/assets/reference-configs/handoff-protocol.md +25 -20
  26. package/assets/reference-configs/harness-overview.md +8 -8
  27. package/assets/skill-version.json +2 -2
  28. package/assets/templates/helpers/archive-workflow.sh +0 -1
  29. package/assets/templates/helpers/capture-plan.sh +3 -3
  30. package/assets/templates/helpers/check-task-workflow.sh +2 -2
  31. package/assets/templates/helpers/codex-handoff-resume.sh +5 -5
  32. package/assets/templates/helpers/ensure-task-workflow.sh +37 -35
  33. package/assets/templates/helpers/new-plan.sh +1 -1
  34. package/assets/templates/helpers/plan-to-todo.sh +2 -2
  35. package/assets/templates/helpers/prepare-codex-handoff.sh +2 -2
  36. package/assets/templates/helpers/prepare-handoff.sh +9 -9
  37. package/assets/templates/helpers/refresh-current-status.sh +2 -2
  38. package/assets/templates/helpers/ship-worktrees.sh +1 -1
  39. package/assets/templates/helpers/sprint-backlog.sh +1 -1
  40. package/assets/templates/helpers/verify-sprint.sh +7 -7
  41. package/assets/templates/helpers/workstream-sync.sh +1 -1
  42. package/assets/templates/plan.template.md +1 -1
  43. package/assets/workflow-contract.v1.json +6 -3
  44. package/docs/architecture/current/README.md +10 -9
  45. package/docs/architecture/current/approved-target-architecture.zh-CN.md +2 -2
  46. package/docs/architecture/current/architecture-invariants.md +2 -2
  47. package/docs/architecture/current/automation-and-schedule-engine.md +15 -15
  48. package/docs/architecture/current/codegraph-context-provider.md +2 -2
  49. package/docs/architecture/current/control-plane-authority-inventory.md +12 -0
  50. package/docs/architecture/current/dispatch-and-agent-strategy.md +11 -11
  51. package/docs/architecture/current/entity-model.md +0 -27
  52. package/docs/architecture/current/failure-recovery.md +0 -24
  53. package/docs/architecture/current/governance.md +1 -1
  54. package/docs/architecture/current/implementation-status.md +1 -1
  55. package/docs/architecture/current/legacy-governance.md +58 -0
  56. package/docs/architecture/current/multi-repository-execution.md +1 -1
  57. package/docs/architecture/current/peer-supercontroller-runtime.md +1 -1
  58. package/docs/architecture/current/personal-assistant-plugin-baseline.md +4 -5
  59. package/docs/architecture/current/scheduler-and-resource-claims.md +0 -10
  60. package/docs/architecture/current/target-requirements-traceability.md +2 -2
  61. package/docs/architecture/current/thin-harness-governance-policy.md +1 -1
  62. package/docs/architecture/current/thin-harness-v1.md +9 -11
  63. package/docs/architecture/domains/runtime-harness.md +1 -1
  64. package/docs/forge-autonomous-goal-loop.md +3 -1
  65. package/docs/forge-chatgpt-mcp-setup.md +67 -176
  66. package/docs/images/forge-banner-cn.svg +26 -1
  67. package/docs/images/forge-banner.svg +26 -1
  68. package/docs/operations/features.md +1 -1
  69. package/docs/operations/homebrew.md +3 -3
  70. package/docs/operations/mcp-tool-exposure.md +5 -5
  71. package/docs/operations/platform-support.md +45 -37
  72. package/docs/operations/platform-support.zh-CN.md +40 -38
  73. package/docs/operations/releasing.md +3 -3
  74. package/docs/operations/releasing.zh-CN.md +3 -3
  75. package/docs/operations/troubleshooting.md +11 -6
  76. package/docs/operations/troubleshooting.zh-CN.md +11 -6
  77. package/docs/public-usage-guide.md +28 -21
  78. package/docs/public-usage-guide.zh-CN.md +28 -21
  79. package/docs/tutorials/01-install-and-start.md +58 -35
  80. package/docs/tutorials/01-install-and-start.zh-CN.md +58 -35
  81. package/docs/tutorials/02-connect-chatgpt.md +118 -46
  82. package/docs/tutorials/02-connect-chatgpt.zh-CN.md +119 -45
  83. package/docs/wiki/Architecture.md +1 -1
  84. package/docs/wiki/Installation.md +2 -2
  85. package/docs/wiki/Quick-Start.md +1 -1
  86. package/docs/wiki/Work-Lifecycle.md +1 -1
  87. package/install.ps1 +4 -5
  88. package/install.sh +4 -6
  89. package/package.json +15 -5
  90. package/scripts/archive-workflow.sh +0 -1
  91. package/scripts/benchmark-thin-harness-mcp-e2e.ts +27 -14
  92. package/scripts/build-controller-ui.ts +28 -0
  93. package/scripts/capture-plan.sh +4 -4
  94. package/scripts/check-agent-tooling.sh +12 -1
  95. package/scripts/check-platform-support.mjs +2 -2
  96. package/scripts/check-public-docs.sh +16 -5
  97. package/scripts/check-release-readiness.sh +5 -11
  98. package/scripts/check-runtime-architecture.mjs +14 -22
  99. package/scripts/check-tarball-install-smoke.sh +3 -2
  100. package/scripts/check-task-workflow.sh +2 -2
  101. package/scripts/codex-handoff-resume.sh +5 -5
  102. package/scripts/create-project-dirs.sh +3 -3
  103. package/scripts/ensure-task-workflow.sh +45 -35
  104. package/scripts/init-project.sh +4 -4
  105. package/scripts/install-desktop-operator-registration.ts +2 -2
  106. package/scripts/lib/project-init-lib.sh +46 -44
  107. package/scripts/migrate-project-template.sh +7 -4
  108. package/scripts/new-plan.sh +1 -1
  109. package/scripts/plan-to-todo.sh +2 -2
  110. package/scripts/prepare-codex-handoff.sh +2 -2
  111. package/scripts/prepare-handoff.sh +9 -9
  112. package/scripts/refresh-current-status.sh +2 -2
  113. package/scripts/setup-plugins.sh +3 -3
  114. package/scripts/ship-worktrees.sh +1 -1
  115. package/scripts/sprint-backlog.sh +5 -5
  116. package/scripts/sync-codex-installed-copies.sh +2 -3
  117. package/scripts/verify-sprint.sh +7 -7
  118. package/scripts/workstream-sync.sh +1 -1
  119. package/src/cli/chatgpt-browser/bridge-extension.ts +1 -1
  120. package/src/cli/chatgpt-browser/bridge-provider.ts +29 -0
  121. package/src/cli/chatgpt-browser/file-policy.ts +3 -1
  122. package/src/cli/commands/chatgpt.ts +51 -0
  123. package/src/cli/commands/doctor.ts +1 -1
  124. package/src/cli/commands/init-hook.ts +213 -70
  125. package/src/cli/commands/init.ts +5 -6
  126. package/src/cli/commands/mcp.ts +31 -5
  127. package/src/cli/commands/runtime.ts +61 -8
  128. package/src/cli/commands/setup-profile.ts +472 -0
  129. package/src/cli/controller/check-runner.ts +20 -3
  130. package/src/cli/controller/codex-continuation.ts +4 -7
  131. package/src/cli/controller/context-pack.ts +118 -14
  132. package/src/cli/controller/operational-plan.ts +4 -4
  133. package/src/cli/controller/task-ledger.ts +10 -10
  134. package/src/cli/controller/work-mode.ts +6 -13
  135. package/src/cli/index.ts +14 -35
  136. package/src/cli/local-bridge/connector-freshness.ts +1 -1
  137. package/src/cli/local-bridge/console-assets.ts +17 -0
  138. package/src/cli/local-bridge/console-automations.ts +160 -0
  139. package/src/cli/local-bridge/dashboard.ts +8 -1303
  140. package/src/cli/local-bridge/facade-api.ts +16 -7
  141. package/src/cli/local-bridge/frontend/src/App.tsx +10 -0
  142. package/src/cli/local-bridge/frontend/src/components/Button.tsx +1 -0
  143. package/src/cli/local-bridge/frontend/src/components/DetailPane.tsx +3 -0
  144. package/src/cli/local-bridge/frontend/src/components/SearchField.tsx +1 -0
  145. package/src/cli/local-bridge/frontend/src/components/SectionHeader.tsx +1 -0
  146. package/src/cli/local-bridge/frontend/src/components/Segmented.tsx +1 -0
  147. package/src/cli/local-bridge/frontend/src/components/StatusText.tsx +3 -0
  148. package/src/cli/local-bridge/frontend/src/design/icons.tsx +11 -0
  149. package/src/cli/local-bridge/frontend/src/design/tokens.css +8 -0
  150. package/src/cli/local-bridge/frontend/src/features/automations/AutomationsView.tsx +3 -0
  151. package/src/cli/local-bridge/frontend/src/features/capabilities/CapabilitiesView.tsx +4 -0
  152. package/src/cli/local-bridge/frontend/src/features/overview/OverviewView.tsx +3 -0
  153. package/src/cli/local-bridge/frontend/src/features/repositories/RepositoriesView.tsx +2 -0
  154. package/src/cli/local-bridge/frontend/src/features/settings/SettingsView.tsx +2 -0
  155. package/src/cli/local-bridge/frontend/src/features/system/SystemView.tsx +2 -0
  156. package/src/cli/local-bridge/frontend/src/features/work/WorkView.tsx +3 -0
  157. package/src/cli/local-bridge/frontend/src/lib/api.ts +23 -0
  158. package/src/cli/local-bridge/frontend/src/lib/format.ts +4 -0
  159. package/src/cli/local-bridge/frontend/src/lib/routes.ts +7 -0
  160. package/src/cli/local-bridge/frontend/src/main.tsx +1 -0
  161. package/src/cli/local-bridge/frontend/src/shell/AppShell.tsx +1 -0
  162. package/src/cli/local-bridge/frontend/src/shell/CommandBar.tsx +2 -0
  163. package/src/cli/local-bridge/frontend/src/shell/Sidebar.tsx +3 -0
  164. package/src/cli/local-bridge/frontend/src/styles.css +12 -0
  165. package/src/cli/local-bridge/frontend/src/types.ts +14 -0
  166. package/src/cli/local-bridge/frontend/src/vite-env.d.ts +1 -0
  167. package/src/cli/local-bridge/frontend/vite.config.ts +27 -0
  168. package/src/cli/local-bridge/server.ts +45 -0
  169. package/src/cli/local-bridge/ui-dist/app.css +1 -0
  170. package/src/cli/local-bridge/ui-dist/app.js +11094 -0
  171. package/src/cli/mcp/auth.ts +2 -0
  172. package/src/cli/mcp/instructions.ts +3 -3
  173. package/src/cli/mcp/legacy-tool-service.ts +27 -23
  174. package/src/cli/mcp/multi-repository.ts +2 -0
  175. package/src/cli/mcp/policy.ts +7 -5
  176. package/src/cli/mcp/repository-tools.ts +53 -14
  177. package/src/cli/mcp/server.ts +5 -10
  178. package/src/cli/mcp/setup.ts +220 -276
  179. package/src/cli/mcp/tool-capability-cache.ts +1 -1
  180. package/src/cli/mcp/toolset-names.ts +1 -1
  181. package/src/cli/mcp/toolset.ts +0 -1
  182. package/src/cli/mcp/transports/http.ts +51 -4
  183. package/src/cli/repositories/branch-name-policy.ts +0 -7
  184. package/src/cli/repositories/controller-home.ts +110 -3
  185. package/src/cli/repositories/safe-patch.ts +1 -1
  186. package/src/cli/repositories/selected-path-actions.ts +26 -24
  187. package/src/core/adoption/gitignore-plan.ts +2 -3
  188. package/src/core/adoption/plan.ts +4 -1
  189. package/src/runtime/control-plane/execution/edit-validation-coordinator.ts +556 -0
  190. package/src/runtime/control-plane/execution/work-handle-store.ts +128 -1
  191. package/src/runtime/control-plane/execution/work-validation-reconciler.ts +277 -0
  192. package/src/runtime/control-plane/execution/work-verification-snapshot.ts +169 -0
  193. package/src/runtime/control-plane/facade/capability-registry.ts +0 -10
  194. package/src/runtime/control-plane/facade/handoff-inbox-store.ts +44 -25
  195. package/src/runtime/control-plane/facade/suggested-actions.ts +7 -1
  196. package/src/runtime/control-plane/facade/types.ts +0 -1
  197. package/src/runtime/control-plane/global-scheduler/scheduler.ts +30 -8
  198. package/src/runtime/control-plane/launcher/chatgpt-work-binding-store.ts +114 -0
  199. package/src/runtime/control-plane/launcher/chatgpt-work-continuation.ts +175 -0
  200. package/src/runtime/control-plane/launcher/launch-reservation-store.ts +161 -0
  201. package/src/runtime/control-plane/launcher/provider-mcp-bootstrap.ts +64 -0
  202. package/src/runtime/control-plane/launcher/thin-launcher.ts +117 -24
  203. package/src/runtime/control-plane/routing/route-policy.ts +14 -14
  204. package/src/runtime/control-plane/runtime-cleanup.ts +0 -1
  205. package/src/runtime/evidence/event-ledger.ts +1 -1
  206. package/src/runtime/{workflow/campaigns/workspace.ts → execution/managed-workspace.ts} +41 -43
  207. package/src/runtime/execution/process-runtime/check-facade.ts +6 -0
  208. package/src/runtime/execution/process-runtime/check-result.ts +45 -0
  209. package/src/runtime/execution/process-runtime/check-runner-sidecar.ts +42 -16
  210. package/src/runtime/execution/process-runtime/command-facade.ts +4 -2
  211. package/src/runtime/execution/process-runtime/gc.ts +1 -1
  212. package/src/runtime/execution/process-runtime/index.ts +3 -0
  213. package/src/runtime/execution/process-runtime/interactive-admission.ts +14 -5
  214. package/src/runtime/execution/process-runtime/persisted-check.ts +285 -0
  215. package/src/runtime/execution/process-runtime/resource-claims.ts +30 -0
  216. package/src/runtime/execution/process-runtime/runtime.ts +18 -1
  217. package/src/runtime/execution/process-runtime/store.ts +1 -19
  218. package/src/runtime/execution/process-runtime/types.ts +4 -0
  219. package/src/runtime/execution/thin-harness/execution-router.ts +0 -1
  220. package/src/runtime/execution/thin-harness/fast-executor.ts +1 -1
  221. package/src/runtime/execution/thin-harness/lightweight-lanes.ts +1 -2
  222. package/src/runtime/execution/thin-harness/types.ts +0 -1
  223. package/src/runtime/execution/workers/executor.ts +1 -1
  224. package/src/runtime/gateway/mcp/execution-tools.ts +1 -1
  225. package/src/runtime/gateway/mcp/persisted-check-process.ts +3 -255
  226. package/src/runtime/gateway/mcp/process-tools.ts +16 -3
  227. package/src/runtime/gateway/mcp/resource-policy.ts +0 -9
  228. package/src/runtime/gateway/mcp/router.ts +117 -182
  229. package/src/runtime/gateway/mcp/runtime-tools.ts +331 -409
  230. package/src/runtime/gateway/mcp/work-validation-reconciler.ts +1 -219
  231. package/src/runtime/plugins/browser-adapter.ts +5 -0
  232. package/src/runtime/plugins/desktop-operator-registration.ts +1 -1
  233. package/src/runtime/plugins/store.ts +14 -6
  234. package/src/runtime/plugins/types.ts +1 -1
  235. package/src/runtime/projections/materialized-view.ts +1 -23
  236. package/src/runtime/recovery/maintenance-executor.ts +9 -0
  237. package/src/runtime/resources/ownership.ts +0 -1
  238. package/src/runtime/root/gateway-adapter.ts +2 -0
  239. package/src/runtime/root/mcp-transport.ts +10 -2
  240. package/src/runtime/root/package-connector-service.ts +136 -0
  241. package/src/runtime/root/package-runtime-release.ts +161 -0
  242. package/src/runtime/root/package-runtime-service.ts +185 -0
  243. package/src/runtime/root/release-materialize.ts +19 -0
  244. package/src/runtime/root/runtime.ts +2 -1
  245. package/src/runtime/root/scheduler.ts +5 -0
  246. package/src/runtime/root/service.ts +18 -5
  247. package/src/runtime/standalone-recovery/core.ts +65 -16
  248. package/src/runtime/workflow/findings/store.ts +145 -106
  249. package/src/runtime/workflow/findings/types.ts +22 -0
  250. package/src/runtime/workflow/schedules/engine.ts +132 -2
  251. package/src/runtime/workflow/schedules/pending-activation.ts +139 -0
  252. package/src/runtime/workflow/schedules/work-continuation.ts +218 -0
  253. package/docs/CHANGELOG.md +0 -978
  254. package/docs/README.zh-CN.md +0 -58
  255. package/scripts/smoke-chatgpt-supervised-automation.ts +0 -208
  256. package/src/cli/commands/controller.ts +0 -680
  257. package/src/runtime/workflow/campaigns/cleanup.ts +0 -263
  258. package/src/runtime/workflow/campaigns/engine.ts +0 -112
  259. package/src/runtime/workflow/campaigns/normalize.ts +0 -100
  260. package/src/runtime/workflow/campaigns/review.ts +0 -315
  261. package/src/runtime/workflow/campaigns/store.ts +0 -526
  262. package/src/runtime/workflow/campaigns/supervisor.ts +0 -112
  263. package/src/runtime/workflow/campaigns/types.ts +0 -290
  264. /package/src/runtime/{workflow/campaigns → execution}/workspace-agent.ts +0 -0
@@ -342,7 +342,7 @@ Complete this inventory before implementation. If any line is unknown, keep the
342
342
  ## Handoff
343
343
 
344
344
  - Checks file: `.ai/harness/checks/latest.json`
345
- - Session handoff: `.ai/harness/handoff/current.md`
345
+ - Session continuation: `.ai/harness/session/continuation.md`
346
346
 
347
347
  ## Evidence Contract
348
348
 
@@ -489,7 +489,7 @@ CONTRACT_TEMPLATE_EOF
489
489
 
490
490
  ## Verification Evidence
491
491
 
492
- - Waza /check run:
492
+ - Forge /review run:
493
493
  - Commands run:
494
494
  - Manual checks:
495
495
  - Supporting artifacts:
@@ -625,7 +625,7 @@ CURRENT_STATUS_EOF
625
625
  }
626
626
 
627
627
  ensure_auxiliary_files() {
628
- mkdir -p plans plans/archive plans/prds plans/sprints tasks/issues tasks/archive tasks/contracts tasks/reviews tasks/notes tasks/workstreams docs/architecture/domains docs/architecture/modules docs/architecture/requests docs/architecture/snapshots docs/architecture/diagrams scripts .ai/context .ai/harness/checks .ai/harness/handoff .ai/harness/scripts .ai/harness/failures .ai/harness/security .ai/harness/planning .ai/harness/architecture .ai/harness/worktrees .ai/harness/runs .ai/harness/jobs .ai/harness/local-jobs .ai/harness/controller .ai/harness/edit-sessions
628
+ mkdir -p plans plans/archive plans/prds plans/sprints tasks/issues tasks/archive tasks/contracts tasks/reviews tasks/notes tasks/workstreams docs/architecture/domains docs/architecture/modules docs/architecture/requests docs/architecture/snapshots docs/architecture/diagrams scripts .ai/context .ai/harness/checks .ai/harness/session .ai/harness/controller/packets .ai/harness/projections .ai/harness/transfers .ai/harness/scripts .ai/harness/failures .ai/harness/security .ai/harness/planning .ai/harness/architecture .ai/harness/worktrees .ai/harness/runs .ai/harness/jobs .ai/harness/local-jobs .ai/harness/controller .ai/harness/edit-sessions
629
629
 
630
630
  if [[ ! -f "docs/spec.md" ]]; then
631
631
  cat > docs/spec.md <<'SPEC_EOF'
@@ -669,16 +669,16 @@ RESEARCH_README_EOF
669
669
  echo "{}" > ".ai/harness/checks/latest.json"
670
670
  fi
671
671
 
672
- if [[ ! -f ".ai/harness/handoff/current.md" ]]; then
673
- cat > ".ai/harness/handoff/current.md" <<'HANDOFF_EOF'
674
- # Harness Handoff
672
+ if [[ ! -f ".ai/harness/session/continuation.md" ]]; then
673
+ cat > ".ai/harness/session/continuation.md" <<'HANDOFF_EOF'
674
+ # Forge Session Continuation Snapshot
675
675
 
676
676
  > **Reason**: bootstrap
677
677
  HANDOFF_EOF
678
678
  fi
679
679
 
680
- if [[ ! -f ".ai/harness/handoff/resume.md" ]]; then
681
- cat > ".ai/harness/handoff/resume.md" <<'RESUME_EOF'
680
+ if [[ ! -f ".ai/harness/session/resume.md" ]]; then
681
+ cat > ".ai/harness/session/resume.md" <<'RESUME_EOF'
682
682
  # Codex Resume Packet
683
683
 
684
684
  > **Reason**: bootstrap
@@ -833,7 +833,6 @@ ARCHITECTURE_INDEX_EOF
833
833
  "harness": {
834
834
  "policy_file": ".ai/harness/policy.json",
835
835
  "checks_file": ".ai/harness/checks/latest.json",
836
- "handoff_file": ".ai/harness/handoff/current.md",
837
836
  "failure_log_file": ".ai/harness/failures/latest.jsonl",
838
837
  "events_file": ".ai/harness/events.jsonl",
839
838
  "architecture_events_file": ".ai/harness/architecture/events.jsonl",
@@ -899,19 +898,21 @@ ARCHITECTURE_INDEX_EOF
899
898
  "sync_rule": "only explicitly opted-in repo-to-brain manifest entries may be written to the default brain vault; pointer-only externalized stubs remain check-only"
900
899
  }
901
900
  },
902
- "handoff_resume": {
903
- "resume_packet_file": ".ai/harness/handoff/resume.md",
904
- "global_handoff_dir": "~/.codex/handoffs",
905
- "auto_start_new_session": false
901
+ "session": {
902
+ "continuation_file": ".ai/harness/session/continuation.md",
903
+ "resume_file": ".ai/harness/session/resume.md",
904
+ "global_resume_dir": "~/.codex/handoffs",
905
+ "auto_start_new_session": false,
906
+ "authority": "rebuildable-host-session-cache-only"
906
907
  },
907
908
  "plan_capture": {
908
909
  "script": "scripts/capture-plan.sh",
909
- "sources": ["codex-plan-mode", "waza-think", "forge-plan"],
910
+ "sources": ["host-plan-mode", "forge-plan"],
910
911
  "rule": "Codex Plan mode and Waza think planning should capture decision-complete plans into plans/plan-*.md; implementation approval then projects the active approved plan through scripts/plan-to-todo.sh"
911
912
  },
912
913
  "planning": {
913
914
  "pending_orchestration_file": ".ai/harness/planning/pending.json",
914
- "source_of_truth": "transient host planning bridge only; plans/ and .ai/harness/active-plan remain authoritative"
915
+ "source_of_truth": "transient host planning bridge only; captured plans are source artifacts, while migrated Runtime Plan/Work lifecycle state is authoritative in the Canonical Runtime"
915
916
  },
916
917
  "guards": {
917
918
  "edit_plan_gate": "advice",
@@ -956,7 +957,7 @@ ARCHITECTURE_INDEX_EOF
956
957
  "existing_changes_unrelated_but_would_block_review",
957
958
  "task_requires_clean_validation_surface"
958
959
  ],
959
- "validation_route": "waza:check",
960
+ "validation_route": "forge:/review",
960
961
  "merge_back": {
961
962
  "target": "main",
962
963
  "requires_clean_check": true,
@@ -995,17 +996,18 @@ ARCHITECTURE_INDEX_EOF
995
996
  },
996
997
  "external_tooling": {
997
998
  "routing": {
998
- "complex": "gstack",
999
- "simple": "waza",
1000
- "knowledge": "gbrain"
999
+ "primary": "forge",
1000
+ "optional_complex_helper": "gstack",
1001
+ "optional_daily_helper": "waza",
1002
+ "optional_knowledge_helper": "gbrain"
1001
1003
  },
1002
1004
  "hosts": [
1003
1005
  "claude-code",
1004
1006
  "codex"
1005
1007
  ],
1006
- "mode": "agent-readiness-required",
1008
+ "mode": "optional-enhancements",
1007
1009
  "detection": "init-migrate",
1008
- "readiness_gate": "scripts/check-agent-tooling.sh --host codex --strict-readiness",
1010
+ "readiness_report": "scripts/check-agent-tooling.sh --host codex",
1009
1011
  "waza": {
1010
1012
  "source_repo": "tw93/Waza",
1011
1013
  "source_url": "https://github.com/tw93/Waza.git",
@@ -1017,14 +1019,14 @@ ARCHITECTURE_INDEX_EOF
1017
1019
  "host_drift_policy": "report-per-host-version-staging-and-upstream-drift"
1018
1020
  },
1019
1021
  "codex_automation_profile": {
1020
- "required_skills": ["health", "check", "mermaid"],
1021
- "optional_skills": [],
1022
- "mode": "codex-runtime-reference",
1022
+ "required_skills": [],
1023
+ "optional_skills": ["health", "check", "mermaid"],
1024
+ "mode": "optional-codex-runtime-reference",
1023
1025
  "source": "~/.codex/skills",
1024
1026
  "routes": {
1025
- "workflow_health": "waza:health",
1026
- "review_gate": "waza:check",
1027
- "architecture_diagram": "mermaid"
1027
+ "workflow_health_optional": "waza:health",
1028
+ "review_helper_optional": "waza:check",
1029
+ "architecture_diagram_optional": "mermaid"
1028
1030
  },
1029
1031
  "vendoring_policy": "do-not-vendor-skill-body"
1030
1032
  },
@@ -1045,7 +1047,7 @@ ARCHITECTURE_INDEX_EOF
1045
1047
  "codex_config_path": "~/.codex/config.toml",
1046
1048
  "claude_config_path": "~/.claude.json",
1047
1049
  "index_dir": ".codegraph",
1048
- "readiness": "required-for-agent-code-navigation",
1050
+ "readiness": "forge-bundled-backend; host-mcp-optional",
1049
1051
  "hook_policy": "do-not-block-hooks",
1050
1052
  "install_command": "bun add -g @colbymchenry/codegraph && forge tools configure codegraph --target codex --location global",
1051
1053
  "project_init_command": "codegraph init -i .",
@@ -1055,16 +1057,16 @@ ARCHITECTURE_INDEX_EOF
1055
1057
  },
1056
1058
  "agentic_development": {
1057
1059
  "routing": {
1058
- "product_discovery": "gstack:office-hours",
1059
- "complex_engineering_plan": "gstack:plan-eng-review",
1060
- "design_plan": "gstack:plan-design-review",
1061
- "small_or_medium_plan": "waza:think",
1062
- "bug_or_regression": "waza:hunt",
1063
- "post_implementation_review": "waza:check"
1060
+ "direct": "forge:/direct",
1061
+ "plan": "forge:/plan",
1062
+ "debug": "forge:/debug",
1063
+ "review": "forge:/review",
1064
+ "release": "forge:/release",
1065
+ "scale": "forge:/scale"
1064
1066
  },
1065
1067
  "due_diligence": {
1066
1068
  "levels": ["P1_GLOBAL_ARCHITECTURE", "P2_DATA_FLOW_TRACE", "P3_DESIGN_DECISION"],
1067
- "explicit_report_required_for": ["plan-eng-review", "hunt", "risky_refactor", "deployment", "auth_payment_data", "shared_contract"]
1069
+ "explicit_report_required_for": ["architecture", "debug", "risky_refactor", "deployment", "auth_payment_data", "shared_contract"]
1068
1070
  }
1069
1071
  },
1070
1072
  "enforcement": {
@@ -135,7 +135,7 @@ Complete this inventory before implementation. If any line is unknown, keep the
135
135
  ## Handoff
136
136
 
137
137
  - Checks file: `.ai/harness/checks/latest.json`
138
- - Session handoff: `.ai/harness/handoff/current.md`
138
+ - Session continuation: `.ai/harness/session/continuation.md`
139
139
 
140
140
  ## Evidence Contract
141
141
 
@@ -607,7 +607,7 @@ mkdir -p tasks/notes
607
607
  mkdir -p .claude
608
608
  mkdir -p .ai/context
609
609
  mkdir -p .ai/harness/checks
610
- mkdir -p .ai/harness/handoff
610
+ mkdir -p .ai/harness/session .ai/harness/controller/packets .ai/harness/projections .ai/harness/transfers
611
611
  mkdir -p .ai/harness/failures
612
612
  mkdir -p .ai/harness/planning
613
613
  mkdir -p .ai/harness/runs
@@ -713,7 +713,7 @@ else
713
713
 
714
714
  ## Verification Evidence
715
715
 
716
- - Waza /check run:
716
+ - Forge /review run:
717
717
  - Commands run:
718
718
  - Manual checks:
719
719
  - Supporting artifacts:
@@ -52,8 +52,8 @@ fi
52
52
  codex_home="${CODEX_HOME:-$HOME/.codex}"
53
53
  global_dir="$codex_home/handoffs"
54
54
  global_file="$global_dir/handoff-$(date '+%y%m%d').md"
55
- repo_handoff=".ai/harness/handoff/current.md"
56
- resume_file=".ai/harness/handoff/resume.md"
55
+ repo_handoff=".ai/harness/session/continuation.md"
56
+ resume_file=".ai/harness/session/resume.md"
57
57
 
58
58
  mkdir -p "$global_dir"
59
59
 
@@ -45,13 +45,13 @@ if [[ -f ".ai/hooks/lib/workflow-state.sh" ]]; then
45
45
  echo "Active plan: $(get_active_plan || printf '(none)')"
46
46
  echo "Active contract: $(workflow_active_contract || printf '(none)')"
47
47
  echo "Review file: $(workflow_active_review || printf '(none)')"
48
- echo "Handoff: $(workflow_handoff_file)"
48
+ echo "Handoff: $(workflow_session_continuation_file)"
49
49
  echo "Resume packet: $(workflow_resume_packet_file)"
50
50
  echo "Checks: $(workflow_checks_file)"
51
51
  exit 0
52
52
  fi
53
- workflow_write_handoff "$reason"
54
- echo "Updated $(workflow_handoff_file)"
53
+ workflow_write_session_continuation "$reason"
54
+ echo "Updated $(workflow_session_continuation_file)"
55
55
  if [[ "${FORGE_SKIP_RESUME_REFRESH:-0}" != "1" && -f "scripts/codex-handoff-resume.sh" ]]; then
56
56
  bash scripts/codex-handoff-resume.sh --cwd "$(pwd -P)" --reason "$reason" >/dev/null
57
57
  fi
@@ -62,20 +62,20 @@ if [[ "$mode" == "status" ]]; then
62
62
  echo "Active plan: (none)"
63
63
  echo "Active contract: (none)"
64
64
  echo "Review file: (none)"
65
- echo "Handoff: .ai/harness/handoff/current.md"
66
- echo "Resume packet: .ai/harness/handoff/resume.md"
65
+ echo "Handoff: .ai/harness/session/continuation.md"
66
+ echo "Resume packet: .ai/harness/session/resume.md"
67
67
  echo "Checks: .ai/harness/checks/latest.json"
68
68
  exit 0
69
69
  fi
70
70
 
71
- mkdir -p .ai/harness/handoff
72
- cat > .ai/harness/handoff/current.md <<EOF_HANDOFF
73
- # Harness Handoff
71
+ mkdir -p .ai/harness/session .ai/harness/controller/packets .ai/harness/projections .ai/harness/transfers
72
+ cat > .ai/harness/session/continuation.md <<EOF_HANDOFF
73
+ # Forge Session Continuation Snapshot
74
74
 
75
75
  > **Generated**: $(date '+%Y-%m-%d %H:%M:%S')
76
76
  > **Reason**: ${reason}
77
77
  EOF_HANDOFF
78
- echo "Updated .ai/harness/handoff/current.md"
78
+ echo "Updated .ai/harness/session/continuation.md"
79
79
  if [[ "${FORGE_SKIP_RESUME_REFRESH:-0}" != "1" && -f "scripts/codex-handoff-resume.sh" ]]; then
80
80
  bash scripts/codex-handoff-resume.sh --cwd "$(pwd -P)" --reason "$reason" >/dev/null
81
81
  fi
@@ -214,7 +214,7 @@ next_plan_task() {
214
214
 
215
215
  handoff_next_step() {
216
216
  local handoff_file
217
- handoff_file="$(json_get '.harness.handoff_file' '.ai/harness/handoff/current.md')"
217
+ handoff_file="$(json_get '.session.continuation_file' '.ai/harness/session/continuation.md')"
218
218
  [[ -f "$handoff_file" ]] || { printf '(none)'; return 0; }
219
219
  awk '
220
220
  /^## Exact Next Step[[:space:]]*$/ { in_section = 1; next }
@@ -451,7 +451,7 @@ $(git_status_files)
451
451
  - Sprints: \`$(json_get '.sprints.dir' 'plans/sprints')/*.sprint.md\`
452
452
  - Active sprint marker: \`.ai/harness/sprint/active-sprint\`
453
453
  - Workstreams: \`tasks/workstreams/**/*.md\`
454
- - Handoff: \`.ai/harness/handoff/current.md\`
454
+ - Handoff: \`.ai/harness/session/continuation.md\`
455
455
  - Checks: \`.ai/harness/checks/latest.json\`
456
456
  EOF_STATUS
457
457
  }
@@ -308,7 +308,7 @@ pr_body_for_branch() {
308
308
  Automated forge ship for \`${branch}\`.
309
309
 
310
310
  Checks:
311
- - Waza /check review artifact recommends pass.
311
+ - Forge /review review artifact recommends pass.
312
312
  - External acceptance is recorded in the sprint review.
313
313
  - \`bash scripts/verify-sprint.sh\` passed before \`contract-worktree.sh finish --no-merge\`.
314
314
 
@@ -745,7 +745,7 @@ Before editing code, use \`\$think\` to expand this sprint row into a decision-c
745
745
  ## Task Breakdown
746
746
 
747
747
  - [ ] Run \`\$think\` for backlog task \`${target_task}\` using sprint \`${sprint_file}\` and acceptance: ${target_acceptance}
748
- - [ ] Capture the approved \`\$think\` output with \`scripts/capture-plan.sh --source waza-think --source-ref sprint:${sprint_file}#${target_task}\`
748
+ - [ ] Capture the approved Forge \`/plan\` output with \`scripts/capture-plan.sh --source forge-plan --source-ref sprint:${sprint_file}#${target_task}\`
749
749
  - [ ] Verify acceptance: ${target_acceptance}
750
750
  BODY_EOF
751
751
 
@@ -366,7 +366,7 @@ contract_command="bash scripts/verify-contract.sh --contract $contract_file --st
366
366
  if [[ -f "scripts/sync-brain-docs.sh" && -f ".ai/harness/brain-manifest.json" ]]; then
367
367
  bash scripts/sync-brain-docs.sh --all >/dev/null || true
368
368
  fi
369
- if [[ -f "scripts/prepare-codex-handoff.sh" && ( -f ".ai/harness/handoff/current.md" || -f ".ai/harness/handoff/resume.md" ) ]]; then
369
+ if [[ -f "scripts/prepare-codex-handoff.sh" && ( -f ".ai/harness/session/continuation.md" || -f ".ai/harness/session/resume.md" ) ]]; then
370
370
  bash scripts/prepare-codex-handoff.sh --reason "forge-verify-sprint" >/dev/null || true
371
371
  fi
372
372
  set +e
@@ -473,8 +473,8 @@ else
473
473
  fi
474
474
  handoff_current_exists=false
475
475
  handoff_resume_exists=false
476
- [[ -f ".ai/harness/handoff/current.md" ]] && handoff_current_exists=true
477
- [[ -f ".ai/harness/handoff/resume.md" ]] && handoff_resume_exists=true
476
+ [[ -f ".ai/harness/session/continuation.md" ]] && handoff_current_exists=true
477
+ [[ -f ".ai/harness/session/resume.md" ]] && handoff_resume_exists=true
478
478
 
479
479
  if command -v jq >/dev/null 2>&1 && jq -e . "$contract_report" >/dev/null 2>&1; then
480
480
  jq -n \
@@ -543,8 +543,8 @@ if command -v jq >/dev/null 2>&1 && jq -e . "$contract_report" >/dev/null 2>&1;
543
543
  {name: "allowed_paths", status: ($allowed_paths_check.status // "unavailable")}
544
544
  ],
545
545
  handoffs: [
546
- {file: ".ai/harness/handoff/current.md", exists: $handoff_current_exists},
547
- {file: ".ai/harness/handoff/resume.md", exists: $handoff_resume_exists}
546
+ {file: ".ai/harness/session/continuation.md", exists: $handoff_current_exists},
547
+ {file: ".ai/harness/session/resume.md", exists: $handoff_resume_exists}
548
548
  ],
549
549
  files_changed: $files_changed,
550
550
  allowed_paths_check: $allowed_paths_check,
@@ -622,8 +622,8 @@ else
622
622
  {"name": "allowed_paths", "status": "$(json_escape "$allowed_paths_status")"}
623
623
  ],
624
624
  "handoffs": [
625
- {"file": ".ai/harness/handoff/current.md", "exists": $handoff_current_exists},
626
- {"file": ".ai/harness/handoff/resume.md", "exists": $handoff_resume_exists}
625
+ {"file": ".ai/harness/session/continuation.md", "exists": $handoff_current_exists},
626
+ {"file": ".ai/harness/session/resume.md", "exists": $handoff_resume_exists}
627
627
  ],
628
628
  "files_changed": [],
629
629
  "allowed_paths_check": {
@@ -235,7 +235,7 @@ if [[ ! -f "$workstream_file" ]]; then
235
235
  > **Architecture Module**: \`${architecture_module}\`
236
236
  > **Source Plan**: ${source_plan}
237
237
  > **Current Slice**: ${current_slice}
238
- > **Last Handoff**: \`.ai/harness/handoff/current.md\`
238
+ > **Last Handoff**: \`.ai/harness/session/continuation.md\`
239
239
  > **Architecture Request**: ${request_file}
240
240
 
241
241
  ## Purpose
@@ -60,7 +60,7 @@ Complete this inventory before implementation. If any line is unknown, keep the
60
60
  ## Handoff
61
61
 
62
62
  - Checks file: `.ai/harness/checks/latest.json`
63
- - Session handoff: `.ai/harness/handoff/current.md`
63
+ - Session continuation: `.ai/harness/session/continuation.md`
64
64
 
65
65
  ## Evidence Contract
66
66
 
@@ -151,7 +151,10 @@
151
151
  ".ai/harness",
152
152
  ".ai/harness/checks",
153
153
  ".ai/harness/failures",
154
- ".ai/harness/handoff",
154
+ ".ai/harness/session",
155
+ ".ai/harness/controller/packets",
156
+ ".ai/harness/projections",
157
+ ".ai/harness/transfers",
155
158
  ".ai/harness/security",
156
159
  ".ai/harness/planning",
157
160
  ".ai/harness/architecture",
@@ -256,8 +259,8 @@
256
259
  ".ai/harness/events.jsonl",
257
260
  ".ai/harness/archive/",
258
261
  ".ai/harness/failures/latest.jsonl",
259
- ".ai/harness/handoff/current.md",
260
- ".ai/harness/handoff/resume.md",
262
+ ".ai/harness/session/continuation.md",
263
+ ".ai/harness/session/resume.md",
261
264
  ".ai/harness/capability-context/",
262
265
  ".ai/harness/security/.gitkeep",
263
266
  ".ai/harness/planning/",
@@ -73,7 +73,9 @@ Read the architecture in this order:
73
73
  18. `session-aware-execution-and-authorization.md` — Session Context, Work Handle, Goal delegation, and resumable approval boundaries.
74
74
  19. `runtime-health-and-resource-lifecycle.md` — shared health evaluation, projection freshness, capability status, attention/history, and bounded ownership-aware cleanup.
75
75
  20. `runtime-architecture-simplification.md` — canonical single Runtime lifecycle, release and recovery boundary.
76
- 21. `human-interaction-plane.md` — foreground provider sessions, durable human handoff, profile fencing, and safe resumption.
76
+ 21. `human-interaction-plane.md` — foreground provider sessions, bounded human-interaction handoff, profile fencing, and safe resumption.
77
+ 22. `control-plane-authority-inventory.md` — single-writer persistence families and frozen legacy writers.
78
+ 23. `legacy-governance.md` — RepoHarness inheritance, session-continuation boundary, CLI governance, and deletion rules.
77
79
 
78
80
 
79
81
  ## Architecture Layers
@@ -85,7 +87,7 @@ The approved top-level layers are:
85
87
  | Thin Gateway | Authentication, validation, routing, compact reads, durable command acceptance | Long execution, Agent lifetime, heavy checks |
86
88
  | Global Control Plane | Repository registry, global quotas, portfolio scheduling | Repository-local workflow mutation |
87
89
  | Per-Repository Actor | Repository-local ordering, claims, conflict decisions, integration and release coordination | Cross-repository global locks |
88
- | Workflow Plane | Issue, Task, Schedule, Occurrence intent and dependency state | Process lifetime and raw logs |
90
+ | Workflow Plane | Requirement, PlanStep, Work, Schedule, Occurrence intent and dependency state | Process lifetime and raw logs |
89
91
  | Durable Execution Plane | Job acceptance, dispatch, Run attempts, commands, checks, workers | Product acceptance decisions |
90
92
  | Workspace Plane | Workspace/worktree allocation, Git integration, resource leases | Business intent |
91
93
  | Evidence Plane | Diffs, checks, logs, artifacts, verification and release evidence | Scheduling policy |
@@ -93,14 +95,13 @@ The approved top-level layers are:
93
95
 
94
96
  ## Source-of-Truth Rules
95
97
 
96
- - Issue and Task files own durable work intent.
97
- - Jobs own asynchronous system-operation state.
98
- - Runs own individual Agent execution attempts.
98
+ - Migrated Requirement, ExecutionPlan/PlanStep, Work, dependency, receipt, validation, and approval lifecycle state is single-writer state in `<durable-controller-home>/control-plane.sqlite` as defined by `control-plane-authority-inventory.md`.
99
+ - Git owns source code and accepted source artifacts such as specs, design notes, and captured plans; those artifacts are not a second lifecycle writer after migration.
100
+ - Jobs own asynchronous system-operation state and Runs own individual Agent execution attempts.
99
101
  - Edit Sessions own transactional direct modifications.
100
- - Verification records own exact-revision completion evidence.
101
- - Event logs own audit history.
102
- - Atomic snapshots and indexes are projections optimized for reads and recovery.
103
- - The controller task ledger projection (`.ai/harness/controller/task-ledger.json` and `.ai/harness/handoff/controller-current.md`) is a compact recovery/read model derived from durable Issue, Task, Run, and worklog state; its `status` field is a deterministic continuation hint for controller recovery, not a competing mutable task source.
102
+ - Verification records own exact-revision completion evidence; event logs own audit history.
103
+ - Atomic snapshots, indexes, task-ledger files, historical Issue/Task aliases, `tasks/current.md`, and `.ai/harness/session/*` are projections or compatibility/session caches only.
104
+ - The legacy controller task-ledger projection is read-only after control-plane cutover and cannot mutate Requirement/Plan/Work state.
104
105
  - The controller context pack is a transient Projection Plane read model for scoped code investigation. It may return live Git metadata, validation hints, ranked candidate files, and bounded raw snippets, but it must not become source-of-truth for implementation decisions or replace exact source, diff, and validation review.
105
106
  - Chat history, UI state, worker self-reports, and in-memory maps are never durable truth.
106
107
 
@@ -162,7 +162,7 @@ src/cli/agent-jobs/*
162
162
 
163
163
  Repo Actor 负责:
164
164
 
165
- 当前仓库的 Issue/Task 状态
165
+ 当前仓库的 Requirement/Work 状态
166
166
  任务依赖
167
167
  资源占用
168
168
  工作区写入权
@@ -1462,7 +1462,7 @@ Push/Publish
1462
1462
  1. Resolve Repository
1463
1463
  2. Read compact snapshot
1464
1464
  3. Classify work mode
1465
- 4. Create or select Issue/Task
1465
+ 4. Create or select Requirement/Work
1466
1466
  5. Declare scope and resources
1467
1467
  6. Persist requestId
1468
1468
  7. Repo Actor schedules work
@@ -267,7 +267,7 @@ A valid outcome may be `nothing_to_do`.
267
267
 
268
268
  **Current Implementation — MUST**
269
269
 
270
- Automated triage may create a Candidate Finding. It may create or update a formal Issue/Task only when evidence and configured policy justify it.
270
+ Automated triage may create a Candidate Finding. It may promote a formal Requirement/Work only when evidence and configured policy justify it; legacy Issue/Task records are read-only after control-plane cutover.
271
271
 
272
272
  The same semantic problem must deduplicate across occurrences. “The Agent suggests an optimization” is not sufficient evidence by itself.
273
273
 
@@ -289,7 +289,7 @@ Versioned design documents cannot override the current set.
289
289
 
290
290
  **Current Implementation — MUST**
291
291
 
292
- A capability may be labeled implemented only when a repository path and an executable check support the claim. Future gaps or regressions must be linked to an Issue/Task or ADR rather than hidden by documentation wording. The completed migration record is not permission to weaken a boundary without updating code, tests and the current architecture set.
292
+ A capability may be labeled implemented only when a repository path and an executable check support the claim. Future gaps or regressions must be linked to a Requirement/Work item or ADR rather than hidden by documentation wording. The completed migration record is not permission to weaken a boundary without updating code, tests and the current architecture set.
293
293
 
294
294
  ## Invariant 26 — Runtime Source Identity Is Controller-Scoped
295
295
 
@@ -120,7 +120,7 @@ Triage inputs should be bounded:
120
120
  ```text
121
121
  repository health
122
122
  active Jobs and Runs
123
- current Issue/Task queue
123
+ current Requirement/Work queue
124
124
  recent failed checks
125
125
  recent accepted work
126
126
  Git summary and dirty ownership
@@ -158,7 +158,17 @@ Deterministic rules are preferred for:
158
158
  - release gate status;
159
159
  - repository disabled/frozen state.
160
160
 
161
- An Agent may assist when semantic analysis is required, such as grouping related failures or proposing a bounded improvement. Its output remains a proposal evaluated by deterministic policy.
161
+ Semantic analysis remains external-controller-owned. Forge does not invent the next product or code decision inside the Schedule Engine. A Schedule may use the deterministic `external_controller_wake` action to resume an already bounded Work through Thin Launcher. The wake operation only transports the persisted Work/Handoff context to an external Controller; it does not interpret the model response inside the Kernel.
162
+
163
+ `external_controller_wake` accepts a `work_id`, `controller_type`, and optional launcher/session metadata. For ChatGPT, Thin Launcher prefers a saved Forge browser session (`browser_session_id`), then an explicit `https://chatgpt.com/...` conversation URL, then a new browser consult. Codex/Claude remain external CLI controllers. If the Work already has an active Controller lease, the Occurrence is a deterministic no-op rather than spawning a competing controller.
164
+
165
+ The stable ChatGPT tool surface manages this policy through `rh_work` rather than exposing another Schedule tool. `rh_work.schedule_create/list/get/pause/resume/trigger` binds only an existing non-terminal Work to `external_controller_wake`; callers cannot use the facade to schedule an arbitrary MCP or repository operation. Creation is idempotent by a stable schedule request identity, defaults to `shadow_mode=true`, limits active occurrences to one, and carries explicit failure/cooldown/daily-budget/backoff policy.
166
+
167
+ A Work continuation Schedule is acceptance-driven, not perpetual. Before every wake, Forge re-reads the bound Work. A missing Work pauses the Schedule; a terminal Work (`completed`, `cancelled`, or another terminal Work state) deterministically disables the Schedule and returns `nothing_to_do`. An active Controller lease also returns `nothing_to_do`. Therefore the recurring trigger is only a wake policy for unfinished bounded Work, never a forever-running agent.
168
+
169
+ Thin Launcher does not pre-claim Controller ownership. It records a short Controller-Home launch reservation (configured with `launch_reservation_ms`) only to fence duplicate spawns while the provider starts. The external provider must connect to Forge MCP and call `rh_work continue` with its authenticated transport identity; that authenticated principal/session becomes the Work owner. This separation prevents the scheduler from impersonating ChatGPT/Codex/Claude and preserves the Controller-session identity fence. Detached CLI providers also use their non-interactive execution contracts (`codex ... exec` and `claude --print`) instead of launching interactive TUIs with ignored stdio.
170
+
171
+ For Codex, Thin Launcher injects the currently ready Canonical Runtime MCP endpoint per invocation instead of mutating `~/.codex/config.toml`. The Runtime bearer token is passed only through the child environment (`FORGE_RUNTIME_MCP_TOKEN`); the temporary Codex MCP configuration references that environment variable and sends non-secret forwarded principal/session headers derived from the launch reservation. This makes a scheduled Codex self-contained while keeping authentication material out of argv, logs, and durable provider config. CLI providers without a safe Forge MCP bootstrap must fail closed rather than launch detached work that cannot report ownership/evidence back to Runtime.
162
172
 
163
173
  ## 9. Candidate Finding Governance
164
174
 
@@ -324,7 +334,7 @@ Notify on:
324
334
  - human review requirement;
325
335
  - release readiness;
326
336
  - budget exhaustion that changes expected outcome;
327
- - newly promoted Issue/Task.
337
+ - newly promoted Requirement/Work.
328
338
 
329
339
  Do not notify repeatedly for unchanged no-op or unchanged blocker state.
330
340
 
@@ -438,16 +448,6 @@ Schedules may perform bounded repository work but cannot push, merge, publish, d
438
448
 
439
449
  New mutation Schedules begin in Shadow Mode until their decisions are reviewed. This is an operational rollout rule, not an implementation gap.
440
450
 
441
- ## 26. ChatGPT-Supervised Campaigns
442
-
443
- Campaigns complement Schedules. A Schedule answers *when should a bounded occurrence run*; a Campaign answers *how should a multi-step goal progress across many bounded Jobs and review checkpoints*.
444
-
445
- Campaign reconciliation is event-driven and restart-safe. It uses short per-Campaign mutations, deterministic child request IDs, persisted retry timestamps, bounded parallelism, and the existing global scheduler/resource-claim system. It does not hold locks while ChatGPT, Codex, browser automation, or a human is working.
446
-
447
- A failed task blocks only descendants in the Campaign DAG. Independent tasks remain dispatchable. Pull-mode Supervisor waiting creates no periodic write loop. Agent operations force worktree isolation while preserving the executor's normal engineering and Computer Use capabilities.
448
-
449
- Campaigns stop at `ready_for_human_acceptance`; remote merge, publish, deploy, and release authority remain outside the autonomous loop.
450
-
451
- ### Campaign workspace hierarchy
451
+ ### Deferred activation across a natural Runtime restart
452
452
 
453
- A supervised Campaign defaults to a deterministic long-lived feature worktree. Its checkout identity is persisted on the Campaign and copied to every child ExecutionJob. Agent Runs may create short-lived task worktrees, but their automatic integration target is the Campaign checkout, never the repository's unrelated active checkout. Human acceptance does not merge or remove the Campaign worktree.
453
+ A continuation Schedule may be deliberately created with `shadowMode=true` while the currently running immutable Runtime predates the Controller-wake implementation required by that Schedule. Forge can persist a one-time pending continuation activation marker in Controller Home. Old Runtime releases do not read this marker. The first naturally restarted Runtime containing the pending-activation implementation consumes the marker before starting its sole Scheduler, verifies that the Schedule is still enabled and still targets the same `external_controller_wake` Work, flips only `shadowMode` to `false`, and removes the marker. If the Schedule was explicitly disabled in the meantime, the marker is cancelled instead. This preserves one Scheduler authority and avoids introducing a second cron/LaunchAgent or forcing a rollout solely to enable continuation.
@@ -13,7 +13,7 @@ The missing capability is not another top-level MCP tool. It is a Context Plane
13
13
  ## Constraints
14
14
 
15
15
  1. The default workflow remains unchanged. No explicit mode directive still uses the existing automatic Direct-first routing.
16
- 2. `-plan`, `-debug`, and `-campaign` are opt-in routing instructions. CodeGraph must not add latency to ordinary Direct edits by default.
16
+ 2. `-plan` and `-debug` are opt-in routing instructions. CodeGraph must not add latency to ordinary Direct edits by default.
17
17
  3. Forge continues to support Node.js `>=20.10.0`.
18
18
  4. CodeGraph's embedded SDK requires Node.js `>=22.5` to open its SQLite database through `node:sqlite`.
19
19
  5. CodeGraph's CLI/MCP server uses its own bundled runtime and may auto-sync the index. Planning must not silently mutate source files or silently refresh derived indexes.
@@ -102,7 +102,7 @@ Expected mode usage:
102
102
  - ordinary Direct: `off`
103
103
  - explicit `-debug`: `auto`
104
104
  - explicit `-plan`: `required` when a CodeGraph index is present; otherwise return a clear degraded-plan warning and use bounded text search
105
- - Campaign planning/review: `auto` or `required` depending on the campaign contract
105
+ - Goal/Plan planning and review: `auto` or `required` when structural evidence materially improves the decision
106
106
 
107
107
  When enabled, graph results augment candidate ranking. They do not replace raw source reads. Important files selected through CodeGraph still pass through `resolveMcpPath` and `readRepositoryRange` before implementation.
108
108
 
@@ -80,3 +80,15 @@ The final cutover tests prove:
80
80
  Any later non-critical compatibility residue is recorded as a
81
81
  MaintenanceFinding. It does not reopen a completed Requirement unless the user
82
82
  outcome itself regresses.
83
+
84
+ ## Session continuation versus HandoffItem
85
+
86
+ The frozen `handoff artifact writes` rule refers to lifecycle/decision handoff state. Current hooks may write only the ignored, rebuildable host-session cache under `.ai/harness/session/`; those files are projections for fresh-session context and are never control-plane writers.
87
+
88
+ A decision requiring ChatGPT or user judgement is represented by Runtime `HandoffItem` and surfaced through `rh_inbox`. Session Markdown cannot create, acknowledge, resolve, dismiss, supersede, or expire a `HandoffItem`.
89
+
90
+ `HandoffItem` persistence intentionally remains Controller-owned JSON at `Controller Home/repositories/<repoId>/handoff-inbox/index.json`, written atomically under the repository handoff-inbox lock. It is the sole authority for the attention/decision inbox. It is not moved into the Requirement/Plan/Work SQLite tables merely for storage uniformity: those tables own transactional delivery lifecycle, while the inbox owns bounded human/controller judgement points. Runtime restart recovery reopens this Controller Home record; repo-local session, projection, controller-packet, and transfer files are never replayed into it.
91
+
92
+ Repo-local recovery artifacts now have disjoint namespaces: `.ai/harness/session/` for rebuildable host-session context, `.ai/harness/controller/packets/` for bounded external-controller packets, `.ai/harness/projections/` for read-only compatibility/status views, and `.ai/harness/transfers/` for patch-transfer artifacts. The generic `.ai/harness/handoff/` namespace is retired.
93
+
94
+ See `docs/architecture/current/legacy-governance.md` for the RepoHarness-to-Forge disposition rules.