@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
@@ -1,94 +1,57 @@
1
1
  # Agentic Development Flow
2
2
 
3
- Use this reference when choosing the daily agentic development mode. Keep the
4
- root prompt concise; this file owns the detailed routing.
5
-
6
- ## Skill Routing
7
-
8
- | Work type | Default route | Output |
9
- |-----------|---------------|--------|
10
- | Product discovery, demand reality, "is this worth building" | gstack `office-hours` | Product direction or design doc before engineering planning |
11
- | Complex engineering plan, architecture lock-in, cross-module refactor | gstack `plan-eng-review` | Approved execution plan with architecture, data flow, edge cases, and tests |
12
- | UI/UX or design-system plan | gstack `plan-design-review` | Design critique and plan fixes before implementation |
13
- | Small or medium feature/fix plan | Waza `/think` | Concise approved plan, then implementation on request |
14
- | Bug, regression, error, crash, failing test | Waza `/hunt` | Root cause sentence with evidence before any fix |
15
- | Implemented diff, pre-merge, release follow-through | Waza `/check` | Review findings, safe fixes, verification, and shipment state |
16
- | Architecture diagram or system-flow diagram | Markdown Mermaid first, `mermaid` for human HTML | Semantic Mermaid in architecture docs plus optional rendered HTML grounded in repo context |
17
-
18
- ## forge Command Surface
19
-
20
- Use these CLI-backed command facades when the work is about installing,
21
- migrating, repairing, or verifying this repo-local harness:
22
-
23
- | Work type | Command | Boundary |
24
- |-----------|---------|----------|
25
- | Decision-complete harness plan | `forge-plan` | Plans only; no repo mutation by default |
26
- | Review an existing harness plan | `forge-review` | Product, engineering, design, and DevEx review dimensions |
27
- | Automatic workflow pipeline | `forge-autoplan` | Plan -> two self-review passes -> implementation -> `/check` -> `forge-ship` |
28
- | Ship finished work | `forge-ship` | Validates finished worktrees, pushes branches, and creates PRs by default |
29
- | Add harness to an existing repo | `forge-init` | Uses inspector and migration engine; does not create an app stack |
30
- | Create a new app or module scaffold | `forge-scaffold` | Uses plan catalog A-K, then attaches the harness |
31
- | Convert legacy workflow surfaces | `forge-migrate` | Archives or preserves user-authored legacy docs |
32
- | Refresh an installed harness | `forge-upgrade` | Runs manifest-owned upgrade actions only |
33
- | Add selected capability boundaries | `forge-capability` | Updates capability registry and local contracts without full init/migrate/upgrade |
34
- | Resolve architecture docs or diagrams | `forge-architecture` | Handles architecture drift requests without full harness refresh |
35
- | Prepare or resume handoff | `forge-handoff` | Refreshes Codex handoff packets without running full checks |
36
- | Check deploy and ops config | `forge-deploy` | Read-only deploy/_ops readiness check without publishing |
37
- | Fix broken current harness behavior | `forge-repair` | Task sync, hook routing, handoff, context, policy, or helper drift |
38
- | Verify readiness | `forge-check` | Workflow gates, task sync, inspector, migration dry-run, and readiness yellow flags |
39
- | Generate an upper-layer PRD | `forge-prd` | `$geju` direction pass, Claude-first `claude -p --model opus` drafting, Codex fallback only when needed, PRD in `plans/prds/*.prd.md` |
40
- | Plan and run a program-level sprint | `forge-sprint` | Upper-layer PRD in `plans/prds/`, sprint backlog in `plans/sprints/`; each row expands through `$think` before plan -> contract -> worktree |
41
- | Prepare a bounded native goal session | `forge-goal` / `forge:goal` | Codex/Claude `/goal` prompt from detailed PRD or Sprint artifacts; stops to request those documents when missing |
42
- | Configure GPT Pro local bridge | `forge-gptpro-setup` / `forge:gptpro_setup` | Separates `gptpro_browser` local ChatGPT Web browser/session consults from `gptpro_mcp` ChatGPT Connector MCP sidecar setup; preserves auth, tunnel, and API-billing boundaries |
43
- | Consult GPT Pro through browser session | `forge-gptpro` / `forge:gptpro` | Uses `gptpro consult/read/continue/open` wording while mapping to `browser-consult`, `browser-session`, `browser-followup`, and `browser-open` engine commands |
44
-
45
- `hooks-init`, `docs-init`, and `create-project-dirs` are not public commands.
46
- They are implementation steps behind `init`, `scaffold`, `migrate`, and
47
- `upgrade`.
48
-
49
- ## Due Diligence Levels
50
-
51
- P1/P2/P3 is the shared due-diligence protocol underneath the routing.
52
-
53
- - `P1_GLOBAL_ARCHITECTURE`: identify real boundaries, entrypoints, owners, authoritative files, dependencies, and out-of-scope areas.
54
- - `P2_DATA_FLOW_TRACE`: walk one concrete route through requests, UI events, jobs, config, messages, or database values to the final output.
55
- - `P3_DESIGN_DECISION`: explain why the current shape exists, which invariant must stay true, and why the chosen change is the smallest coherent one.
56
-
57
- For small tasks, keep P1/P2/P3 internal and report only the result. For
58
- `plan-eng-review`, `/hunt`, risky refactors, deployments, auth/payment/data
59
- work, or shared contracts, report the P1/P2/P3 evidence explicitly.
3
+ Forge owns the workflow contract. External host skills may improve reasoning quality, but they are never required for correctness or lifecycle progress.
4
+
5
+ ## Primary Modes
6
+
7
+ | Work type | Forge route | Optional enhancement |
8
+ |---|---|---|
9
+ | Understood bounded edit | `/direct` | none required |
10
+ | Plan-only or architecture decision | `/plan` | gstack `plan-eng-review` / `plan-design-review`, Waza `/think` |
11
+ | Bug, regression, failing test, tooling failure | `/debug` | Waza `/hunt` |
12
+ | Diff, acceptance, pre-merge review | `/review` | Waza `/check`, peer `codex-review` / `claude-review` |
13
+ | Release readiness and publication | `/release` | provider-specific release tooling |
14
+ | Concurrency, load, performance, scale verification | `/scale` | benchmark-specific tooling |
15
+ | Product discovery | `/plan` | gstack `office-hours` |
16
+
17
+ Missing external skills must degrade only the named enhancement. Hooks may suggest Forge modes, but must not route correctness through a third-party skill.
18
+
19
+ ## Public CLI Boundary
20
+
21
+ The user-facing CLI is intentionally smaller than the implementation surface:
22
+
23
+ - install/configure: `forge install`, `forge update`, `forge setup`, `forge uninstall`;
24
+ - repository/runtime: `forge adopt`, `forge repo`, `forge runtime`, `forge recovery`;
25
+ - integrations: `forge plugin`, `forge chatgpt`, `forge mcp`, `forge tools`;
26
+ - diagnostics/docs: `forge status`, `forge doctor`, `forge security`, `forge docs`.
27
+
28
+ Host-dispatch and compatibility machinery such as `hook`, `run`, legacy `controller`, migration helpers, brain sync, and capability-context internals may remain callable for managed workflows but are not normal top-level product entrypoints.
29
+
30
+ ## Due Diligence
31
+
32
+ P1/P2/P3 remains the shared reasoning protocol:
33
+
34
+ - `P1_GLOBAL_ARCHITECTURE`: identify real boundaries, entrypoints, owners, authoritative state, dependencies, and out-of-scope areas.
35
+ - `P2_DATA_FLOW_TRACE`: walk one concrete request/event/job/config/data path to the final output.
36
+ - `P3_DESIGN_DECISION`: state the invariant, why the current shape exists, and why the proposed change is the smallest coherent one.
37
+
38
+ For small work keep this internal. For architecture, debugging, risky refactors, deployment, auth/payment/data, or shared contracts, persist the relevant evidence.
60
39
 
61
40
  ## Daily Flow
62
41
 
63
- | Agent reads first | Human reviews first |
64
- |-----------|---------|
65
- | Current user prompt and referenced files | Human Review Card in `tasks/reviews/<task>.review.md` |
66
- | `AGENTS.md` / `CLAUDE.md` and active plan | Changed files and active contract scope |
67
- | Active contract, notes, latest checks, and handoff | Latest trace/checks, residual risk, rollback |
68
- | `tasks/current.md` only for orientation | External acceptance or manual override |
69
-
70
- 1. Route the request by intent before reading broadly.
71
- 2. Read the repo-local contract first: `AGENTS.md` or `CLAUDE.md`, `tasks/todos.md`, `tasks/lessons.md`, and `.ai/harness/policy.json`.
72
- 3. Use the selected skill or mode to produce either an approved plan, a root cause, or a review verdict.
73
- 4. When Codex Plan mode, Waza `/think`, or `forge-plan` produces a decision-complete plan, capture it into `plans/` with `.ai/harness/scripts/capture-plan.sh --slug <slug> --title <title>` and the plan text on stdin.
74
- 5. Approved plans must include `## Evidence Contract` with state/progress path, verification evidence, evaluator rubric, stop condition, and rollback surface before execution. `capture-plan.sh` supplies this contract for captured planning output.
75
- 6. Convert approved plans to execution scaffolding with `.ai/harness/scripts/plan-to-todo.sh --plan <plan>`; if approval is already explicit, use `.ai/harness/scripts/capture-plan.sh --status Approved --execute ...`. The plan's own `## Task Breakdown` remains the execution checklist; `tasks/todos.md` remains a deferred-goal ledger. Contract-level plans are projected into a linked `codex/<slug>` worktree when the policy enables it.
76
- 7. For Sprint execution, treat each row in `plans/sprints/*.sprint.md` as a long-task waypoint. Use `$think` to expand the row into a decision-complete `plans/plan-*.md` before coding; do not treat the sprint row itself as an implementation plan.
77
- 8. Use `.ai/harness/scripts/refresh-current-status.sh` for an explicit `tasks/current.md` preview or `--write` snapshot. In non-target worktrees, `git show <target>:tasks/current.md` reads the mainline snapshot, but it never replaces source artifacts.
78
- 9. After substantive changes, run project checks and record evidence in `tasks/`. For contract worktrees, run Waza `/check`, start host-aware external acceptance in parallel, fill the review artifact from both verdicts, then use `forge-ship` for default PR closeout. It calls `.ai/harness/scripts/contract-worktree.sh finish --no-merge`, pushes the `codex/<slug>` branch, and opens a draft PR. Use `forge-ship --local-merge` only when an explicit maintainer workflow wants the older fast-forward merge and cleanup path.
79
-
80
- ## Passive Plan Capture
81
-
82
- - Codex Plan mode and Waza `/think` do not need the user to remember `new-sprint` or `plan-to-todo`.
83
- - The agent should capture decision-complete planning output with `.ai/harness/scripts/capture-plan.sh`; the script sets `.ai/harness/active-plan`, writes `.ai/harness/active-worktree`, mirrors `.claude/.active-plan`, and writes a timestamped `plans/plan-*.md` artifact.
84
- - Planning capture is allowed before implementation. Contract, review, notes, and worktree artifacts are generated only after explicit implementation approval; `tasks/todos.md` is not a duplicate of plan tasks.
85
- - Current-status capture is separate from planning capture: `tasks/current.md` is regenerated from artifacts for orientation, not edited as a plan or task list.
42
+ 1. Read the current user request and current Canonical Runtime state first.
43
+ 2. Use `/direct`, `/plan`, `/debug`, `/review`, `/release`, or `/scale` according to intent.
44
+ 3. Use `rh_context`; request CodeGraph structural context when callers, dependencies, or impact matter.
45
+ 4. If a decision-complete plan is useful, capture it into `plans/` as a durable business/engineering artifact. It is not a second Runtime lifecycle authority.
46
+ 5. Execute bounded work through Forge repository/Process/Work primitives and collect verification evidence.
47
+ 6. Use `/review` plus focused checks before closeout. Optional peer or Waza reviews may add evidence but may not become the only pass condition.
48
+ 7. `.ai/harness/session/continuation.md` and `.ai/harness/session/resume.md` are ignored, rebuildable host-session caches only. They never override SQLite/Runtime state, Git source, current user input, or recorded evidence.
49
+ 8. A decision that actually requires ChatGPT/user judgement is a Runtime `HandoffItem` surfaced through `rh_inbox`; do not encode it as a session-cache file.
86
50
 
87
51
  ## Boundaries
88
52
 
89
- - Do not route large architecture decisions through Waza `/think` by default.
90
- - Do not use gstack plan review for routine local edits where `/think` or direct execution is enough.
91
- - Hooks may emit advisory Waza `/check` and `/health` route hints on prompt submit. Review/release prompts emit a host-aware `[ExternalAcceptance]` prompt telling the main agent to run the peer reviewer in parallel and paste `## External Acceptance Advice` into the review file; done/finish gates block only on that recorded evidence. Hooks must not mutate files or auto-run peer CLIs based on semantic intent. `[CrossReview]` remains a lightweight debug/spec/test advisory. Plan capture is an agent action after a planning mode produces a concrete plan.
92
- - Keep `office-hours` for product-demand shaping; use `plan-eng-review` when engineering execution needs to be locked.
93
- - Treat subagent and parallel-agent execution as a main-agent decision based on task breadth, context impact, raw-log volume, and callable tools. Do not ask the user for spawn confirmation; if no runner is callable or spawning is not worth the context cost, complete the same P1/P2/P3 trace in the main thread and persist evidence-backed conclusions in `docs/researches/`.
94
- - Do not turn `tasks/current.md` into a hand-written kanban or memo. Use plans, workstreams, notes, reviews, checks, and handoff files as the authoritative surfaces.
53
+ - Do not create a new workflow entity because an old RepoHarness skill once had a command for it.
54
+ - Do not auto-install Waza, gstack, gbrain, or other unrelated third-party skills during ordinary execution.
55
+ - Do not treat session continuation files, `tasks/current.md`, or generated projections as mutable lifecycle authorities.
56
+ - Do not make an Agent process, browser session, hook, or external skill the owner of long-running work. Forge owns durable state; external models provide reasoning and implementation work.
57
+ - Keep compatibility readers isolated and read-only. New writes target the current Forge authority only.
@@ -1,56 +1,23 @@
1
1
  # External Tooling
2
2
 
3
- Generated repos route external tooling by host/runtime shape. Task-level
4
- skill routing lives in `docs/reference-configs/agentic-development-flow.md`.
5
-
6
- - `gstack` supplies `office-hours`, `plan-eng-review`, and `plan-design-review`
7
- - `Waza` supplies `/think`, `/hunt`, and `/check` for daily small/medium work
8
- - Codex automation requires `health`, `check`, and `mermaid` from `~/.codex/skills`
9
- - `gbrain` supports knowledge capture, repo sync, and handoff retrieval
10
- - `CodeGraph` is required agent readiness for code navigation and impact tracing
11
-
12
- Waza is Codex-first in this contract. `~/.codex/skills` is the Codex runtime
13
- source, while `~/.agents/skills` is only the skills CLI staging/cache path used
14
- to receive upstream `tw93/Waza` updates before syncing verified copies into
15
- Codex.
16
-
17
- `forge install` is allowed to bootstrap the workflow-owned global runtime
18
- in one pass: the `forge` CLI, forge runtime aliases, user-level
19
- Codex/Claude hook adapters, Waza (`think`, `hunt`, `check`, `health`), brain
20
- root persistence, Mermaid, and CodeGraph CLI/MCP configuration.
21
- `forge init` remains the explicit legacy bootstrap command for existing Forge automation, while `forge setup open/next/close` is the preferred first-run workflow. Neither path may silently install unrelated toolchains or Claude marketplace plugins.
22
-
23
- `forge uninstall` removes forge managed Codex/Claude hook
24
- adapters. It intentionally does not uninstall Waza, Mermaid, CodeGraph, gbrain,
25
- brain config, package-manager globals, or user-authored sibling hook entries.
26
-
27
- `forge update` refreshes only the CLI and forge-owned user-level
28
- runtime by default. Third-party tooling and CodeGraph registration stay
29
- readiness findings from `forge setup check` unless the update command is
30
- run with an explicit opt-in such as `--with-external-skills` or
31
- `--configure-codegraph`.
32
-
33
- The cross-review skills are **harness-owned and self-contained** — their source
34
- lives in `assets/skills/<skill>/` and they wrap the peer CLI (`codex exec` /
35
- `claude -p`) in a read-only sandbox with no gstack dependency, so installing them
36
- is a workflow-owned runtime concern, not an unrelated toolchain. They install
37
- host-aware during `forge install`/`init` and explicit external-skill refreshes:
38
- `codex-review` only into `~/.claude/skills` (a Claude session asking
39
- Codex for an independent review) and `claude-review` only into `~/.codex/skills`
40
- (a Codex session asking Claude). When gstack is present, its `/codex` and
41
- `gstack-claude` skills are a more featureful superset; the harness skills are the
42
- zero-dependency baseline that always ships with `init` and the peer acceptance
43
- gate surface for `## External Acceptance Advice`.
44
-
45
- The review scope is the current reviewable diff, not just committed branch
46
- history: branch diff against the default base, staged changes, unstaged tracked
47
- changes, and untracked files are all in scope. A timeout or missing peer CLI is
48
- reported as unavailable review evidence, not as a pass.
49
-
50
- The Codex automation profile is a runtime reference, not a vendored copy. It
51
- requires Waza `health`, Waza `check`, and the standalone `mermaid` skill to
52
- exist under `~/.codex/skills`; the skill bodies stay owned by their original
53
- installations.
3
+ Forge core correctness does not depend on third-party host skills. The default workflow is owned by Forge `/direct`, `/plan`, `/debug`, `/review`, `/release`, and `/scale`, plus Runtime repository/process/context primitives.
4
+
5
+ Optional enhancements:
6
+
7
+ - `gstack`: product discovery and deeper engineering/design-plan review;
8
+ - `Waza`: optional `/think`, `/hunt`, `/check`, `/health` host skills;
9
+ - `gbrain`: optional knowledge tooling;
10
+ - `Mermaid` host skill: optional rendered diagrams; Markdown Mermaid remains sufficient;
11
+ - Forge peer-review helpers (`codex-review`, `claude-review`): optional cross-model acceptance evidence;
12
+ - CodeGraph host MCP/CLI: optional direct host integration. Forge's own `rh_context` structural backend uses the bundled CodeGraph runtime when available.
13
+
14
+ `forge install` installs the Forge CLI/runtime and managed host adapters. It does **not** install Waza, Mermaid, or cross-review skills unless `--with-external-skills` is explicitly supplied. `forge setup` is the guided readiness workflow; `forge setup check` is the one-shot read-only report.
15
+
16
+ `forge uninstall` removes Forge-managed Codex/Claude hook adapters only. It does not remove unrelated third-party tooling or user-authored sibling configuration.
17
+
18
+ `forge update` refreshes Forge-owned user-level runtime by default. Third-party skill updates remain explicit opt-in work.
19
+
20
+ External tools are never lifecycle authorities. Missing or stale optional tooling may reduce the named enhancement, but must not block ordinary Forge planning, debugging, review, or execution.
54
21
 
55
22
  ## Detect Safely
56
23
 
@@ -153,16 +120,9 @@ create Agent repair/update actions or change the setup readiness result.
153
120
 
154
121
  ### CodeGraph
155
122
 
156
- `CodeGraph` is required readiness for agent code navigation. It speeds up
157
- Codex and Claude exploration for indexed TypeScript and other supported languages, but it
158
- does not replace `.ai/context/capabilities.json`, workflow checks, tests,
159
- architecture drift events, or shell-script review.
123
+ `CodeGraph` has two integration levels. Forge-internal structural retrieval is provided through `rh_context` and the bundled CodeGraph runtime when available. A global `codegraph` CLI or host MCP entry is optional and exists only for direct Codex/Claude use. Neither replaces workflow checks, tests, architecture evidence, or raw source reads.
160
124
 
161
- This self-host repo vendors CodeGraph as a dev dependency so `bun install`
162
- materializes `node_modules/.bin/codegraph`; its source-only
163
- `scripts/ensure-codegraph.sh` can manage the local index. Generated downstream
164
- repos keep the global MCP installer default and should use the `codegraph`
165
- command directly unless local policy explicitly opts into vendoring.
125
+ Forge packages a CodeGraph runtime for its own structural context provider and can ensure the repository index without requiring a user-global CLI. `forge tools configure codegraph` remains an explicit optional host integration.
166
126
 
167
127
  ### Runtime Ownership Boundary
168
128
 
@@ -214,7 +174,7 @@ bun add -g @colbymchenry/codegraph && forge tools configure codegraph --target c
214
174
 
215
175
  This delegates host-specific MCP config to CodeGraph's target adapters for
216
176
  Codex and Claude, so do not run CodeGraph setup automatically from
217
- `forge init`, `migrate`, or `upgrade`. Restart Codex after the installer
177
+ `forge install`, `forge adopt`, or explicit tooling configuration. Restart Codex after the installer
218
178
  finishes so the MCP server is discovered; Claude Code should pick up its config
219
179
  according to its own settings reload behavior. If a launch environment still
220
180
  cannot find `codegraph`, an authorized agent should diagnose `PATH` and the
@@ -1,18 +1,22 @@
1
- # Handoff Protocol
1
+ # Session Continuation Protocol
2
2
 
3
- Handoffs make long-running work resumable without trusting chat history.
3
+ This compatibility document describes **host-session recovery only**. It does not define Forge's Runtime `HandoffItem` lifecycle.
4
4
 
5
- ## When Handoff Is Required
5
+ A session continuation snapshot lets a fresh Codex/Claude session recover bounded context without trusting chat history or auto-compact. It is ignored, rebuildable cache state under `.ai/harness/session/`.
6
6
 
7
- - Verification fails and the work is not resolved in-session
8
- - The active sprint changes
9
- - The session is ending
10
- - The user or agent needs a durable checkpoint before switching sessions or worktrees
7
+ ## When A Session Snapshot Is Useful
11
8
 
12
- ## Required Sections
9
+ - a host session is ending or approaching context limits;
10
+ - verification is incomplete and a fresh model session will continue the same bounded work;
11
+ - the active source plan/slice changes and a concise recovery snapshot is useful;
12
+ - the agent switches worktrees or host sessions.
13
+
14
+ A decision that actually requires ChatGPT/user judgement, authorization, or durable attention must be represented as a Runtime `HandoffItem` and surfaced through `rh_inbox`; writing Markdown does not create or resolve that handoff.
15
+
16
+ ## Snapshot Sections
13
17
 
14
18
  - Goal
15
- - Decisions
19
+ - Decisions already evidenced by current source/runtime state
16
20
  - Files touched
17
21
  - Commands run
18
22
  - Checks
@@ -23,16 +27,17 @@ Handoffs make long-running work resumable without trusting chat history.
23
27
 
24
28
  ## Restore Flow
25
29
 
26
- 1. Start a fresh Codex session instead of relying on auto-compact or `codex resume` when the old session is near the limit.
27
- 2. If the current user message lists files under `# Files mentioned by the user`, references `pasted-text.txt`, or includes an explicit attachment/file path, read those current-input files before repo recovery artifacts.
28
- 3. Read source artifacts first: active plan, active contract, review file, latest checks trace, and any user-mentioned files.
29
- 4. Read `.ai/harness/handoff/resume.md`.
30
- 5. Read `.ai/harness/handoff/current.md`.
31
- 6. Read `tasks/current.md` as an orientation snapshot only; in a non-target worktree, compare it with `git show <target>:tasks/current.md`.
32
- 7. Resume from the exact next step.
30
+ 1. Read the current user message first.
31
+ 2. Read Canonical Runtime state for the active Repository/Requirement/Plan/Work when available.
32
+ 3. Read authoritative source artifacts and current Git/check evidence.
33
+ 4. Read `.ai/harness/session/resume.md` and `.ai/harness/session/continuation.md` only as bounded recovery context.
34
+ 5. Treat `tasks/current.md` and other generated ledgers as orientation projections only.
35
+ 6. Resume from the verified next step; if state disagrees, Runtime/current user input/source/evidence wins over the session cache.
33
36
 
34
- ## Source Of Truth
37
+ ## Authority
35
38
 
36
- - Markdown, JSON, and JSONL files remain the canonical handoff surface.
37
- - SQLite, Codex thread state, and chat history are read models only.
38
- - `tasks/current.md` is a tracked derived snapshot. It helps branch/worktree orientation, but stale or surprising state must be checked against plans, workstreams, handoff, and checks.
39
+ - Migrated Requirement/Plan/Work lifecycle state is owned by the Canonical Runtime control plane as defined in `docs/architecture/current/control-plane-authority-inventory.md`.
40
+ - Git owns source code and accepted source artifacts; evidence records own their recorded observations.
41
+ - `.ai/harness/session/*` is non-authoritative and rebuildable.
42
+ - Runtime `HandoffItem`/`rh_inbox` is the durable decision/attention handoff surface.
43
+ - Browser login/CAPTCHA foreground handoff is a separate human-interaction-plane concept.
@@ -13,7 +13,7 @@ or refreshes a repo. The harness gives agents three durable surfaces:
13
13
  - **Task contracts**: `plans/`, `tasks/contracts/`, `tasks/reviews/`, and
14
14
  `.ai/harness/checks/` turn a request into scoped implementation work with
15
15
  evidence-backed completion.
16
- - **Session journal**: `.ai/harness/handoff/`, `tasks/current.md`, and
16
+ - **Session cache**: `.ai/harness/session/`, `tasks/current.md`, and
17
17
  `.ai/harness/events.jsonl` let a new agent session resume from repo state
18
18
  without treating chat history as authority.
19
19
 
@@ -25,7 +25,7 @@ with the project.
25
25
 
26
26
  - **Planner** updates `docs/spec.md`, researches constraints, and writes or approves `plans/plan-*.md`.
27
27
  - **Generator** implements only against the active sprint contract and the plan's `## Task Breakdown`, leaving `tasks/todos.md` as a deferred-goal ledger, and records task-local implementation judgments in `tasks/notes/<plan-stem>.notes.md`.
28
- - **Evaluator** runs Waza `/check`, then writes `tasks/reviews/<plan-stem>.review.md` using fresh evidence from `.ai/harness/checks/latest.json` and `.ai/harness/runs/*.json`.
28
+ - **Evaluator** runs Forge `/review`, then writes `tasks/reviews/<plan-stem>.review.md` using fresh evidence from `.ai/harness/checks/latest.json` and `.ai/harness/runs/*.json`.
29
29
 
30
30
  ## State Flow
31
31
 
@@ -44,8 +44,8 @@ with the project.
44
44
  13. `.ai/context/context-map.json` indexes stable root context and discoverable capability context derived from the registry.
45
45
  14. `documentation` inside `.ai/harness/policy.json` keeps generated docs minimal and moves optional docs to agent-created, evidence-backed output.
46
46
  15. `lsp_profiles` inside policy and context-map files select tooling hints per capability.
47
- 16. `worktree_strategy` inside policy tells agents when to isolate contract-level work in `codex/<slug>` worktrees, start execution through `.ai/harness/scripts/contract-worktree.sh start --plan <plan>`, and finish with Waza `/check` plus `.ai/harness/scripts/contract-worktree.sh finish`.
48
- 17. `.ai/harness/handoff/current.md` preserves resumable state across sessions.
47
+ 16. `worktree_strategy` inside policy tells agents when to isolate contract-level work in `codex/<slug>` worktrees, start execution through `.ai/harness/scripts/contract-worktree.sh start --plan <plan>`, and finish with Forge `/review` plus `.ai/harness/scripts/contract-worktree.sh finish`.
48
+ 17. `.ai/harness/session/continuation.md` preserves resumable state across sessions.
49
49
  18. `.ai/harness/events.jsonl` and `.ai/harness/runs/*.json` retain lightweight execution traces.
50
50
 
51
51
  ## Session Boundaries
@@ -53,8 +53,8 @@ with the project.
53
53
  - Exploration and planning are allowed before a contract exists.
54
54
  - Before implementation, the plan and contract should both expose a concrete workflow inventory so the agent does not rediscover or guess active artifacts.
55
55
  - Implementation should prefer `docs/spec.md`, an approved plan, and an active sprint contract.
56
- - Claiming completion should include contract verification evidence, a run snapshot, implementation notes, and a passing Waza `/check` review artifact.
57
- - Stopping a session should refresh `.ai/harness/handoff/current.md` for easier resume; while pending planning orchestration is open, Stop may block once to force a plan completeness self-review before execution.
56
+ - Claiming completion should include contract verification evidence, a run snapshot, implementation notes, and a passing Forge `/review` artifact.
57
+ - Stopping a session should refresh `.ai/harness/session/continuation.md` for easier resume; while pending planning orchestration is open, Stop may block once to force a plan completeness self-review before execution.
58
58
  - Refresh `tasks/current.md` with `.ai/harness/scripts/refresh-current-status.sh --write --reason <reason>` only at explicit lifecycle boundaries or as a deliberate maintainer action; ordinary hooks should not dirty tracked files.
59
59
  - In non-target worktrees, read the target branch snapshot with `git show <target>:tasks/current.md` and verify stale or surprising state against the source artifacts before acting.
60
60
  - Use `docs/reference-configs/agentic-development-flow.md` for skill routing and `docs/reference-configs/external-tooling.md` for install/update commands.
@@ -118,7 +118,7 @@ Maintainer-facing detail on how the initializer and runtime defaults are wired.
118
118
  - Question-pack source of truth: `assets/initializer-question-pack.v4.json`.
119
119
  - Generated repos default to the repo-local harness flow: `docs/spec.md -> plans/ -> tasks/contracts/ -> tasks/reviews/ -> .ai/context/context-map.json -> .ai/harness/*`.
120
120
  - Generated and self-hosted repos install `.ai/harness/workflow-contract.json` and `.ai/harness/policy.json`.
121
- - Generated and migrated repos default `external_tooling` to: `complex -> gstack`; `simple -> Waza` with Codex-first runtime copies in `~/.codex/skills`; `knowledge -> gbrain`.
122
- - `forge install` bootstraps the Codex/Claude runtime pieces for the default workflow: refreshes `forge` skill aliases, installs global Codex/Claude hook adapters, installs Waza skills (`think`, `hunt`, `check`, `health`) and Mermaid through the skills CLI, persists the brain root in `~/.forge/config.json`, and configures CodeGraph MCP for selected host agents. `forge init` remains the explicit legacy bootstrap command for existing Forge automation; `forge setup open/next/close` is the preferred first-run workflow.
121
+ - Generated and migrated repos route primarily through Forge modes; gstack, Waza, gbrain, and Mermaid are optional host enhancements only.
122
+ - `forge install` bootstraps Forge-owned CLI/runtime and global Codex/Claude hook adapters. Third-party Waza/Mermaid/cross-review skills require explicit `--with-external-skills`; host CodeGraph MCP configuration is optional because Forge structural retrieval uses its bundled backend. `forge setup open/next/close` is the preferred guided first-run workflow.
123
123
  - Other external tooling stays advisory-only: `bash scripts/check-agent-tooling.sh --host both --check-updates`; Waza update checks compare upstream `tw93/Waza` `SKILL.md` hashes without running `npx skills check`; no automatic gstack, gbrain MCP, CodeGraph daemon, or provider setup.
124
124
  - Manual distillation stays repo-local: repeated corrections -> `tasks/lessons.md`; deep findings and hidden contracts -> topic-scoped `docs/researches/*.md`; sprint verification evidence -> `tasks/reviews/*.review.md`; durable capability progress -> `tasks/workstreams/`; release history -> `docs/CHANGELOG.md`.
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "1.5.0",
3
- "templateVersion": "1.5.0",
2
+ "version": "1.5.1",
3
+ "templateVersion": "1.5.1",
4
4
  "skillName": "forge",
5
5
  "contractId": "tasks-first-harness-v1",
6
6
  "compatibility": {
@@ -283,7 +283,6 @@ fi
283
283
  plan_key="$(basename "$plan_file" .md)"
284
284
  rm -f ".claude/.plan-state/${plan_key}.todo.md.bak"
285
285
  rm -f ".claude/.plan-state/${plan_key}.task-state.json.bak"
286
- rm -f ".claude/.plan-state/${plan_key}.task-handoff.md.bak"
287
286
 
288
287
  if [[ -x "scripts/refresh-current-status.sh" ]]; then
289
288
  bash "scripts/refresh-current-status.sh" --clear --write --reason "archive-workflow" || true
@@ -103,7 +103,7 @@ extract_task_breakdown() {
103
103
  slug=""
104
104
  title=""
105
105
  status="Draft"
106
- source_name="codex-plan-or-waza-think"
106
+ source_name="host-plan-or-forge-plan"
107
107
  route="planning"
108
108
  orchestration_kind="host-plan"
109
109
  source_ref=""
@@ -296,13 +296,13 @@ See captured planning output.
296
296
  ## Handoff
297
297
 
298
298
  - Checks file: \`.ai/harness/checks/latest.json\`
299
- - Session handoff: \`.ai/harness/handoff/current.md\`
299
+ - Session continuation: \`.ai/harness/session/continuation.md\`
300
300
 
301
301
  ## Evidence Contract
302
302
 
303
303
  - **State/progress path**: \`${plan_file}\` task breakdown, \`tasks/todos.md\` deferred-goal ledger, \`tasks/contracts/${artifact_stem}.contract.md\`, \`tasks/reviews/${artifact_stem}.review.md\`, and \`tasks/notes/${artifact_stem}.notes.md\`
304
304
  - **Verification evidence**: \`.ai/harness/checks/latest.json\`, \`.ai/harness/runs/\`, and the commands named in the captured planning output
305
- - **Evaluator rubric**: \`tasks/reviews/${artifact_stem}.review.md\` must record a passing Waza /check style recommendation
305
+ - **Evaluator rubric**: \`tasks/reviews/${artifact_stem}.review.md\` must record a passing Forge /review style recommendation
306
306
  - **Stop condition**: all task breakdown items are complete, sprint verification passes, and the review recommends pass
307
307
  - **Rollback surface**: before execution remove \`${plan_file}\`; after execution revert branch \`codex/${slug}\` or the generated task artifacts
308
308
 
@@ -724,8 +724,8 @@ helper_compat_dir="$(policy_get '.harness.helper_compat_dir' 'scripts')"
724
724
  helper_source="$(policy_get '.harness.helper_source' 'package')"
725
725
  context_map_file="$(policy_get '.context.map_file' '.ai/context/context-map.json')"
726
726
  brain_manifest_file="$(policy_get '.information_lifecycle.external_knowledge.manifest_file' '.ai/harness/brain-manifest.json')"
727
- handoff_file="$(policy_get '.harness.handoff_file' '.ai/harness/handoff/current.md')"
728
- resume_file="$(policy_get '.handoff_resume.resume_packet_file' '.ai/harness/handoff/resume.md')"
727
+ handoff_file="$(policy_get '.session.continuation_file' '.ai/harness/session/continuation.md')"
728
+ resume_file="$(policy_get '.session.resume_file' '.ai/harness/session/resume.md')"
729
729
  sprints_dir="$(policy_get '.sprints.dir' 'plans/sprints')"
730
730
  sprint_marker_file="$(policy_get '.sprints.active_marker_file' '.ai/harness/sprint/active-sprint')"
731
731
  legacy_sprints_dir="tasks/sprints"
@@ -200,8 +200,8 @@ latest_global_handoff() {
200
200
  find "$codex_home/handoffs" -maxdepth 1 -type f -name 'handoff-*.md' 2>/dev/null | sort | tail -1
201
201
  }
202
202
 
203
- resume_file="$(safe_repo_file "$(policy_get '.handoff_resume.resume_packet_file' '.ai/harness/handoff/resume.md')" '.ai/harness/handoff/resume.md' '.ai/harness/')"
204
- repo_handoff="$(safe_repo_file "$(policy_get '.harness.handoff_file' '.ai/harness/handoff/current.md')" '.ai/harness/handoff/current.md' '.ai/harness/')"
203
+ resume_file="$(safe_repo_file "$(policy_get '.session.resume_file' '.ai/harness/session/resume.md')" '.ai/harness/session/resume.md' '.ai/harness/')"
204
+ repo_handoff="$(safe_repo_file "$(policy_get '.session.continuation_file' '.ai/harness/session/continuation.md')" '.ai/harness/session/continuation.md' '.ai/harness/')"
205
205
  checks_file="$(safe_repo_file "$(policy_get '.harness.checks_file' '.ai/harness/checks/latest.json')" '.ai/harness/checks/latest.json' '.ai/harness/')"
206
206
  research_dir="$(safe_repo_file "$(policy_get '.tasks.research_dir' 'docs/researches')" 'docs/researches' 'docs/researches')"
207
207
  todo_file="$(safe_repo_file "$(policy_get '.tasks.todo_file' 'tasks/todos.md')" 'tasks/todos.md' 'tasks/')"
@@ -222,7 +222,7 @@ cat > "$resume_file" <<EOF_RESUME
222
222
 
223
223
  ## Resume Prompt
224
224
 
225
- You are starting a fresh Codex session for an existing long-running task. Do not rely on prior chat history or Codex auto-compact. First read the source artifacts listed below, then continue from the exact next step in the repo handoff.
225
+ You are starting a fresh Codex session for an existing long-running task. Do not rely on prior chat history or Codex auto-compact. First read the current user input and Canonical Runtime state when available, then source/evidence artifacts, and use the session continuation cache only to recover the exact next step.
226
226
 
227
227
  Current prompt files first:
228
228
  - If the current user message lists files under \`# Files mentioned by the user\`, references \`pasted-text.txt\`, or includes an explicit attachment/file path, read those current-input files before the repo recovery artifacts below.
@@ -243,7 +243,7 @@ Conditional first reads:
243
243
  - Global handoff: ${global_handoff:-(none)}
244
244
 
245
245
  Execution rules:
246
- - Treat filesystem artifacts as the source of truth.
246
+ - Treat Canonical Runtime lifecycle state as authoritative for migrated Requirement/Plan/Work state; treat Git source/evidence as authoritative in their own domains and session Markdown as rebuildable cache only.
247
247
  - Decide in the main agent whether to use subagents, parallel sidecars, sidecar \`codex exec --json\`, or a bounded main-thread trace for broad research/log scans based on context impact and callable tools; do not ask the user for spawn confirmation.
248
248
  - Keep deep research conclusions in \`${research_dir}/\`, not only in chat.
249
249
  - Do not run \`/compact\` as the primary recovery path.
@@ -251,7 +251,7 @@ Execution rules:
251
251
 
252
252
  ## Source Artifacts
253
253
 
254
- - Repo handoff: ${repo_handoff}
254
+ - Session continuation: ${repo_handoff}
255
255
  - Resume packet: ${resume_file}
256
256
  - Checks: ${checks_file}
257
257
  - Todo: ${todo_file}