@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
- "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"
910
+ "sources": ["host-plan-mode", "forge-plan"],
911
+ "rule": "Forge /plan or host planning mode may capture decision-complete source plans into plans/plan-*.md; migrated lifecycle execution remains owned by Runtime Plan/Work state"
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_small_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-enhancement",
1007
1009
  "detection": "init-migrate",
1008
- "readiness_gate": "scripts/check-agent-tooling.sh --host codex --strict-readiness",
1010
+ "readiness_gate": "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
+ "required_skills": [],
1023
+ "optional_skills": ["health", "check", "mermaid"],
1022
1024
  "mode": "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": "forge:/debug",
1028
+ "review_gate": "forge:/review",
1029
+ "architecture_diagram": "mermaid-if-installed"
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": "optional-global-cli-mcp; bundled-rh-context-backend-is-runtime-owned",
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,24 @@ 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
+ "small_bounded_change": "forge:/direct",
1061
+ "planning": "forge:/plan",
1062
+ "bug_or_regression": "forge:/debug",
1063
+ "post_implementation_review": "forge:/review",
1064
+ "release": "forge:/release",
1065
+ "scale": "forge:/scale"
1066
+ },
1067
+ "optional_enhancements": {
1068
+ "direct": "forge:/direct",
1069
+ "plan": "forge:/plan",
1070
+ "debug": "forge:/debug",
1071
+ "review": "forge:/review",
1072
+ "release": "forge:/release",
1073
+ "scale": "forge:/scale"
1064
1074
  },
1065
1075
  "due_diligence": {
1066
1076
  "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"]
1077
+ "explicit_report_required_for": ["forge:/plan", "forge:/debug", "risky_refactor", "deployment", "auth_payment_data", "shared_contract"]
1068
1078
  }
1069
1079
  },
1070
1080
  "enforcement": {
@@ -213,7 +213,7 @@ create_structure() {
213
213
  mkdir -p plans/archive
214
214
  mkdir -p .ai/context
215
215
  mkdir -p .ai/harness/checks
216
- mkdir -p .ai/harness/handoff
216
+ mkdir -p .ai/harness/session .ai/harness/controller/packets .ai/harness/projections .ai/harness/transfers
217
217
  mkdir -p .ai/harness/failures
218
218
  mkdir -p .ai/harness/runs
219
219
  mkdir -p .claude/templates
@@ -325,8 +325,8 @@ EOF
325
325
  # - .ai/harness/checks/latest.json
326
326
  # - .ai/harness/events.jsonl
327
327
  # - .ai/harness/architecture/events.jsonl
328
- # - .ai/harness/handoff/current.md
329
- # - .ai/harness/handoff/resume.md
328
+ # - .ai/harness/session/continuation.md
329
+ # - .ai/harness/session/resume.md
330
330
  # - .ai/harness/failures/latest.jsonl
331
331
  # - .ai/harness/security/.gitkeep
332
332
  # - .ai/harness/worktrees/.gitkeep
@@ -493,7 +493,7 @@ main() {
493
493
  echo " 1. cd $PROJECT_NAME"
494
494
  echo " 2. Copy .env.example to .env and configure"
495
495
  echo " 3. Run: $PKG_MANAGER run dev"
496
- echo " 4. Use Codex Plan mode or Waza /think, then capture it with: bash scripts/capture-plan.sh --slug first-feature --title \"First Feature\""
496
+ echo " 4. Use Codex Plan mode or Forge /plan, then capture it with: bash scripts/capture-plan.sh --slug first-feature --title \"First Feature\""
497
497
  echo " 5. After approval, run: bash scripts/plan-to-todo.sh --plan <active-plan>"
498
498
  echo ""
499
499
  pi_print_external_tooling_report "$PWD" "apply" "$SCRIPT_DIR/check-agent-tooling.sh"
@@ -13,7 +13,7 @@ function argument(name: string): string | undefined {
13
13
  }
14
14
 
15
15
  function usage(): never {
16
- throw new Error('Usage: bun scripts/install-desktop-operator-registration.ts --controller-home <path> [--socket <absolute-path>] [--launch-agent-label <label>] [--expected-program-contains <identity>] [--version 0.1.0] [--protocol 1.0] [--expected-revision N] [--disabled]');
16
+ throw new Error('Usage: bun scripts/install-desktop-operator-registration.ts --controller-home <path> [--socket <absolute-path>] [--launch-agent-label <label>] [--expected-program-contains <identity>] [--version 0.2.1] [--protocol 1.0] [--expected-revision N] [--disabled]');
17
17
  }
18
18
 
19
19
  const controllerHome = argument('--controller-home') ?? process.env.FORGE_CONTROLLER_HOME?.trim();
@@ -35,7 +35,7 @@ const registration = installExternalPluginRegistration(
35
35
  socketPath,
36
36
  launchAgentLabel,
37
37
  expectedProgramContains,
38
- pluginVersion: argument('--version') ?? '0.1.0',
38
+ pluginVersion: argument('--version') ?? '0.2.1',
39
39
  protocolVersion: argument('--protocol') ?? '1.0',
40
40
  enabled: !process.argv.includes('--disabled'),
41
41
  }),
@@ -36,7 +36,6 @@ PI_DEFAULT_RUNTIME_ENTRIES=$(cat <<'EOF_RUNTIME'
36
36
  .claude/.trace.jsonl
37
37
  .claude/.session-handoff.md
38
38
  .claude/.task-state.json
39
- .claude/.task-handoff.md
40
39
  .claude/.codegraph-state/
41
40
  .claude/*.tmp
42
41
  .claude/*.bak
@@ -48,8 +47,8 @@ tasks/.current.md.tmp.*
48
47
  .ai/harness/events.jsonl
49
48
  .ai/harness/archive/
50
49
  .ai/harness/failures/latest.jsonl
51
- .ai/harness/handoff/current.md
52
- .ai/harness/handoff/resume.md
50
+ .ai/harness/session/continuation.md
51
+ .ai/harness/session/resume.md
53
52
  .ai/harness/capability-context/
54
53
  .ai/harness/security/*
55
54
  !.ai/harness/security/.gitkeep
@@ -203,7 +202,7 @@ Complete this inventory before implementation. If any line is unknown, keep the
203
202
  ## Handoff
204
203
 
205
204
  - Checks file: `.ai/harness/checks/latest.json`
206
- - Session handoff: `.ai/harness/handoff/current.md`
205
+ - Session continuation: `.ai/harness/session/continuation.md`
207
206
 
208
207
  ## Evidence Contract
209
208
 
@@ -346,7 +345,7 @@ PI_TEMPLATE_REVIEW=$(cat <<'EOF_TEMPLATE_REVIEW'
346
345
 
347
346
  ## Verification Evidence
348
347
 
349
- - Waza /check run:
348
+ - Forge /review run:
350
349
  - Commands run:
351
350
  - Manual checks:
352
351
  - Supporting artifacts:
@@ -1311,15 +1310,13 @@ pi_external_tooling_gbrain_mcp() {
1311
1310
 
1312
1311
  pi_external_tooling_defaults_summary() {
1313
1312
  cat <<'EOF_EXTERNAL_TOOLING_DEFAULTS'
1314
- - Policy defaults: routing complex->gstack, simple->waza, knowledge->gbrain
1313
+ - Primary routing: Forge /direct, /plan, /debug, /review, /release, /scale
1315
1314
  - Hosts: claude-code, codex
1316
- - Mode: agent-readiness-required
1317
- - Detection: init-migrate
1318
- - Waza: Codex-first, managed skills think/hunt/check/health, stage upstream in ~/.agents/skills, sync verified copies into ~/.codex/skills
1319
- - Codex automation profile: required health/check/mermaid from ~/.codex/skills; do not vendor skill bodies
1320
- - gbrain MCP: candidate-disabled
1321
- - CodeGraph: required agent code-navigation readiness tool, target-aware MCP configure by explicit user command or authorized agent action, per-repo ignored .codegraph/ index; generated repos do not add it as a package dependency unless local policy opts in
1322
- - Auto-actions: never install, upgrade, serve, sync, or enable MCP automatically
1315
+ - Mode: optional-enhancements
1316
+ - Detection: setup/readiness only
1317
+ - Waza/gstack/gbrain/Mermaid: optional host enhancements; never required for Forge correctness
1318
+ - CodeGraph: Forge bundled structural backend; global CLI/MCP is optional host integration
1319
+ - Auto-actions: never install, upgrade, serve, sync, or enable unrelated third-party tooling automatically
1323
1320
  EOF_EXTERNAL_TOOLING_DEFAULTS
1324
1321
  }
1325
1322
 
@@ -1936,7 +1933,6 @@ pi_write_harness_policy() {
1936
1933
  "harness": {
1937
1934
  "policy_file": ".ai/harness/policy.json",
1938
1935
  "checks_file": ".ai/harness/checks/latest.json",
1939
- "handoff_file": ".ai/harness/handoff/current.md",
1940
1936
  "failure_log_file": ".ai/harness/failures/latest.jsonl",
1941
1937
  "events_file": ".ai/harness/events.jsonl",
1942
1938
  "architecture_events_file": ".ai/harness/architecture/events.jsonl",
@@ -2003,19 +1999,21 @@ pi_write_harness_policy() {
2003
1999
  "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"
2004
2000
  }
2005
2001
  },
2006
- "handoff_resume": {
2007
- "resume_packet_file": ".ai/harness/handoff/resume.md",
2008
- "global_handoff_dir": "~/.codex/handoffs",
2009
- "auto_start_new_session": false
2002
+ "session": {
2003
+ "continuation_file": ".ai/harness/session/continuation.md",
2004
+ "resume_file": ".ai/harness/session/resume.md",
2005
+ "global_resume_dir": "~/.codex/handoffs",
2006
+ "auto_start_new_session": false,
2007
+ "authority": "rebuildable-host-session-cache-only"
2010
2008
  },
2011
2009
  "plan_capture": {
2012
2010
  "script": "scripts/capture-plan.sh",
2013
- "sources": ["codex-plan-mode", "waza-think", "forge-plan", "forge-sprint"],
2014
- "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; sprint backlog rows are long-task waypoints and should be expanded with \$think before capture/execution"
2011
+ "sources": ["host-plan-mode", "forge-plan", "forge-sprint"],
2012
+ "rule": "Forge /plan or host planning mode may capture decision-complete source plans into plans/plan-*.md; migrated lifecycle execution remains owned by Runtime Plan/Work state"
2015
2013
  },
2016
2014
  "planning": {
2017
2015
  "pending_orchestration_file": ".ai/harness/planning/pending.json",
2018
- "source_of_truth": "transient host planning bridge only; plans/ and .ai/harness/active-plan remain authoritative"
2016
+ "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"
2019
2017
  },
2020
2018
  "guards": {
2021
2019
  "edit_plan_gate": "advice",
@@ -2060,7 +2058,7 @@ pi_write_harness_policy() {
2060
2058
  "existing_changes_unrelated_but_would_block_review",
2061
2059
  "task_requires_clean_validation_surface"
2062
2060
  ],
2063
- "validation_route": "waza:check",
2061
+ "validation_route": "forge:/review",
2064
2062
  "merge_back": {
2065
2063
  "target": "main",
2066
2064
  "requires_clean_check": true,
@@ -2099,14 +2097,15 @@ pi_write_harness_policy() {
2099
2097
  },
2100
2098
  "external_tooling": {
2101
2099
  "routing": {
2102
- "complex": "gstack",
2103
- "simple": "waza",
2104
- "knowledge": "gbrain"
2100
+ "primary": "forge",
2101
+ "optional_complex_helper": "gstack",
2102
+ "optional_daily_helper": "waza",
2103
+ "optional_knowledge_helper": "gbrain"
2105
2104
  },
2106
2105
  "hosts": $(pi_external_tooling_hosts_json),
2107
- "mode": "agent-readiness-required",
2106
+ "mode": "optional-enhancements",
2108
2107
  "detection": "init-migrate",
2109
- "readiness_gate": "forge run check-agent-tooling --host codex --strict-readiness",
2108
+ "readiness_report": "forge run check-agent-tooling --host codex",
2110
2109
  "waza": {
2111
2110
  "source_repo": "tw93/Waza",
2112
2111
  "source_url": "https://github.com/tw93/Waza.git",
@@ -2118,14 +2117,14 @@ pi_write_harness_policy() {
2118
2117
  "host_drift_policy": "report-per-host-version-staging-and-upstream-drift"
2119
2118
  },
2120
2119
  "codex_automation_profile": {
2121
- "required_skills": ["health", "check", "mermaid"],
2122
- "optional_skills": [],
2123
- "mode": "codex-runtime-reference",
2120
+ "required_skills": [],
2121
+ "optional_skills": ["health", "check", "mermaid"],
2122
+ "mode": "optional-codex-runtime-reference",
2124
2123
  "source": "~/.codex/skills",
2125
2124
  "routes": {
2126
- "workflow_health": "waza:health",
2127
- "review_gate": "waza:check",
2128
- "architecture_diagram": "mermaid"
2125
+ "workflow_health_optional": "waza:health",
2126
+ "review_helper_optional": "waza:check",
2127
+ "architecture_diagram_optional": "mermaid"
2129
2128
  },
2130
2129
  "vendoring_policy": "do-not-vendor-skill-body"
2131
2130
  },
@@ -2146,7 +2145,7 @@ pi_write_harness_policy() {
2146
2145
  "codex_config_path": "~/.codex/config.toml",
2147
2146
  "claude_config_path": "~/.claude.json",
2148
2147
  "index_dir": ".codegraph",
2149
- "readiness": "required-for-agent-code-navigation",
2148
+ "readiness": "forge-bundled-backend; host-mcp-optional",
2150
2149
  "hook_policy": "do-not-block-hooks",
2151
2150
  "install_command": "bun add -g @colbymchenry/codegraph && forge tools configure codegraph --target codex --location global",
2152
2151
  "project_init_command": "codegraph init -i .",
@@ -2156,16 +2155,16 @@ pi_write_harness_policy() {
2156
2155
  },
2157
2156
  "agentic_development": {
2158
2157
  "routing": {
2159
- "product_discovery": "gstack:office-hours",
2160
- "complex_engineering_plan": "gstack:plan-eng-review",
2161
- "design_plan": "gstack:plan-design-review",
2162
- "small_or_medium_plan": "waza:think",
2163
- "bug_or_regression": "waza:hunt",
2164
- "post_implementation_review": "waza:check"
2158
+ "direct": "forge:/direct",
2159
+ "plan": "forge:/plan",
2160
+ "debug": "forge:/debug",
2161
+ "review": "forge:/review",
2162
+ "release": "forge:/release",
2163
+ "scale": "forge:/scale"
2165
2164
  },
2166
2165
  "due_diligence": {
2167
2166
  "levels": ["P1_GLOBAL_ARCHITECTURE", "P2_DATA_FLOW_TRACE", "P3_DESIGN_DECISION"],
2168
- "explicit_report_required_for": ["plan-eng-review", "hunt", "risky_refactor", "deployment", "auth_payment_data", "shared_contract"]
2167
+ "explicit_report_required_for": ["architecture", "debug", "risky_refactor", "deployment", "auth_payment_data", "shared_contract"]
2169
2168
  }
2170
2169
  },
2171
2170
  "enforcement": {
@@ -2400,7 +2399,10 @@ pi_ensure_harness_state_surface() {
2400
2399
  "$target_dir/tasks/workstreams" \
2401
2400
  "$target_dir/.ai/context" \
2402
2401
  "$target_dir/.ai/harness/checks" \
2403
- "$target_dir/.ai/harness/handoff" \
2402
+ "$target_dir/.ai/harness/session" \
2403
+ "$target_dir/.ai/harness/controller/packets" \
2404
+ "$target_dir/.ai/harness/projections" \
2405
+ "$target_dir/.ai/harness/transfers" \
2404
2406
  "$target_dir/.ai/harness/scripts" \
2405
2407
  "$target_dir/.ai/harness/failures" \
2406
2408
  "$target_dir/.ai/harness/security" \
@@ -2419,8 +2421,8 @@ pi_ensure_harness_state_surface() {
2419
2421
  "$target_dir/.ai/harness/runs"
2420
2422
 
2421
2423
  [[ -f "$target_dir/.ai/harness/checks/latest.json" ]] || printf "{}\n" > "$target_dir/.ai/harness/checks/latest.json"
2422
- [[ -f "$target_dir/.ai/harness/handoff/current.md" ]] || printf "# Harness Handoff\n\n> **Reason**: bootstrap\n" > "$target_dir/.ai/harness/handoff/current.md"
2423
- [[ -f "$target_dir/.ai/harness/handoff/resume.md" ]] || printf "# Codex Resume Packet\n\n> **Reason**: bootstrap\n" > "$target_dir/.ai/harness/handoff/resume.md"
2424
+ [[ -f "$target_dir/.ai/harness/session/continuation.md" ]] || printf "# Forge Session Continuation Snapshot\n\n> **Reason**: bootstrap\n" > "$target_dir/.ai/harness/session/continuation.md"
2425
+ [[ -f "$target_dir/.ai/harness/session/resume.md" ]] || printf "# Codex Resume Packet\n\n> **Reason**: bootstrap\n" > "$target_dir/.ai/harness/session/resume.md"
2424
2426
  [[ -f "$target_dir/.ai/context/capability-source-map.json" ]] || printf '{\n "version": 1,\n "capabilities": {}\n}\n' > "$target_dir/.ai/context/capability-source-map.json"
2425
2427
  [[ -f "$target_dir/.ai/harness/events.jsonl" ]] || : > "$target_dir/.ai/harness/events.jsonl"
2426
2428
  [[ -f "$target_dir/.ai/harness/architecture/events.jsonl" ]] || : > "$target_dir/.ai/harness/architecture/events.jsonl"
@@ -8,8 +8,8 @@
8
8
  # - Harness state: .ai/harness/checks/latest.json, .ai/harness/policy.json,
9
9
  # .ai/harness/brain-manifest.json,
10
10
  # .ai/harness/events.jsonl, .ai/harness/architecture/events.jsonl,
11
- # .ai/harness/handoff/current.md,
12
- # .ai/harness/handoff/resume.md,
11
+ # .ai/harness/session/continuation.md,
12
+ # .ai/harness/session/resume.md,
13
13
  # .ai/harness/failures/latest.jsonl, .ai/harness/security/.gitkeep,
14
14
  # .ai/harness/worktrees/.gitkeep, .ai/harness/runs/.gitkeep
15
15
  #
@@ -607,7 +607,10 @@ create_task_files_if_missing() {
607
607
  "$repo/docs/architecture/diagrams" \
608
608
  "$repo/.ai/context" \
609
609
  "$repo/.ai/harness/checks" \
610
- "$repo/.ai/harness/handoff" \
610
+ "$repo/.ai/harness/session" \
611
+ "$repo/.ai/harness/controller/packets" \
612
+ "$repo/.ai/harness/projections" \
613
+ "$repo/.ai/harness/transfers" \
611
614
  "$repo/.ai/harness/failures" \
612
615
  "$repo/.ai/harness/architecture" \
613
616
  "$repo/.ai/harness/runs" \
@@ -1011,7 +1014,7 @@ migrate_workflow() {
1011
1014
  run_or_echo mkdir -p "$repo/tasks/workstreams"
1012
1015
  run_or_echo mkdir -p "$repo/docs/reference-configs"
1013
1016
  run_or_echo mkdir -p "$repo/.ai/harness/checks"
1014
- run_or_echo mkdir -p "$repo/.ai/harness/handoff"
1017
+ run_or_echo mkdir -p "$repo/.ai/harness/session" "$repo/.ai/harness/controller/packets" "$repo/.ai/harness/projections" "$repo/.ai/harness/transfers"
1015
1018
  migrate_active_plan_marker "$repo"
1016
1019
 
1017
1020
  install_templates "$repo"
@@ -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
  }
@@ -32,12 +32,12 @@ while [[ $# -gt 0 ]]; do
32
32
  done
33
33
 
34
34
  if command -v forge >/dev/null 2>&1; then
35
- exec forge init "${args[@]}"
35
+ exec forge install "${args[@]}"
36
36
  fi
37
37
 
38
38
  if command -v bun >/dev/null 2>&1; then
39
- exec bun "$ROOT_DIR/src/cli/index.ts" init "${args[@]}"
39
+ exec bun "$ROOT_DIR/src/cli/index.ts" install "${args[@]}"
40
40
  fi
41
41
 
42
- echo "[setup-plugins] forge or bun is required to run the modern init path." >&2
42
+ echo "[setup-plugins] forge or bun is required to run the modern install path." >&2
43
43
  exit 1
@@ -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
 
@@ -25,7 +25,7 @@ Each backlog row is expanded with $think before the existing plan -> contract
25
25
  -> worktree flow. tasks/todos.md stays the deferred-goal ledger.
26
26
 
27
27
  start-task reserves the next (or named) pending backlog row and can capture a
28
- thin plan seed. The coding agent must still use `$think` to expand the row into
28
+ thin plan seed. The coding agent must still use `/plan` to expand the row into
29
29
  a decision-complete plan before code edits.
30
30
  --sprint overrides the active-sprint marker (still confined to the sprints
31
31
  dir), which finish back-fill uses inside worktrees where the runtime marker
@@ -218,7 +218,7 @@ render_sprint_file() {
218
218
 
219
219
  Program-level sprint container. The Source PRD summary and ordered backlog
220
220
  decompose product intent into task-contract slices; each backlog row is a
221
- long-task waypoint that must be expanded with `$think` before code edits.
221
+ long-task waypoint that must be expanded with `/plan` before code edits.
222
222
  `tasks/todos.md` stays the deferred-goal ledger and never carries this backlog.
223
223
 
224
224
  ## PRD
@@ -740,12 +740,12 @@ Deliver backlog task \`${target_task}\` so that the acceptance line holds: ${tar
740
740
 
741
741
  ## Planning Expansion
742
742
 
743
- Before editing code, use \`\$think\` to expand this sprint row into a decision-complete implementation plan. The \`\$think\` pass should read the sprint file, preserve the acceptance line, name concrete files or commands, and produce the detailed \`plans/plan-*.md\` body that drives contract execution.
743
+ Before editing code, use \`/plan\` to expand this sprint row into a decision-complete implementation plan. The \`/plan\` pass should read the sprint file, preserve the acceptance line, name concrete files or commands, and produce the detailed \`plans/plan-*.md\` body that drives contract execution.
744
744
 
745
745
  ## Task Breakdown
746
746
 
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}\`
747
+ - [ ] Run \`/plan\` for backlog task \`${target_task}\` using sprint \`${sprint_file}\` and acceptance: ${target_acceptance}
748
+ - [ ] Capture the approved \`/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