@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.
- package/AGENTS.md +9 -11
- package/CHANGELOG.md +27 -1
- package/CLAUDE.md +8 -10
- package/DESIGN.md +278 -0
- package/README.md +70 -90
- package/README.zh-CN.md +52 -55
- package/SKILL.md +8 -11
- package/THIRD_PARTY_NOTICES.md +9 -3
- package/assets/branding/README.md +4 -2
- package/assets/hooks/lib/workflow-state.sh +19 -18
- package/assets/hooks/post-edit-guard.sh +6 -75
- package/assets/hooks/prompt-guard.sh +24 -12
- package/assets/hooks/session-start-context.sh +17 -17
- package/assets/hooks/stop-orchestrator.sh +2 -2
- package/assets/partials/04-project-structure.partial.md +6 -6
- package/assets/partials/05-workflow.partial.md +6 -6
- package/assets/partials/07-footer.partial.md +1 -1
- package/assets/partials/08-orchestration.partial.md +2 -2
- package/assets/partials-agents/02-operating-mode.partial.md +5 -5
- package/assets/partials-agents/03-orchestration.partial.md +3 -3
- package/assets/partials-agents/04-task-protocol.partial.md +3 -3
- package/assets/partials-agents/08-deep-docs.partial.md +1 -1
- package/assets/reference-configs/agentic-development-flow.md +49 -86
- package/assets/reference-configs/external-tooling.md +21 -61
- package/assets/reference-configs/handoff-protocol.md +25 -20
- package/assets/reference-configs/harness-overview.md +8 -8
- package/assets/skill-version.json +2 -2
- package/assets/templates/helpers/archive-workflow.sh +0 -1
- package/assets/templates/helpers/capture-plan.sh +3 -3
- package/assets/templates/helpers/check-task-workflow.sh +2 -2
- package/assets/templates/helpers/codex-handoff-resume.sh +5 -5
- package/assets/templates/helpers/ensure-task-workflow.sh +37 -35
- package/assets/templates/helpers/new-plan.sh +1 -1
- package/assets/templates/helpers/plan-to-todo.sh +2 -2
- package/assets/templates/helpers/prepare-codex-handoff.sh +2 -2
- package/assets/templates/helpers/prepare-handoff.sh +9 -9
- package/assets/templates/helpers/refresh-current-status.sh +2 -2
- package/assets/templates/helpers/ship-worktrees.sh +1 -1
- package/assets/templates/helpers/sprint-backlog.sh +1 -1
- package/assets/templates/helpers/verify-sprint.sh +7 -7
- package/assets/templates/helpers/workstream-sync.sh +1 -1
- package/assets/templates/plan.template.md +1 -1
- package/assets/workflow-contract.v1.json +6 -3
- package/docs/architecture/current/README.md +10 -9
- package/docs/architecture/current/approved-target-architecture.zh-CN.md +2 -2
- package/docs/architecture/current/architecture-invariants.md +2 -2
- package/docs/architecture/current/automation-and-schedule-engine.md +15 -15
- package/docs/architecture/current/codegraph-context-provider.md +2 -2
- package/docs/architecture/current/control-plane-authority-inventory.md +12 -0
- package/docs/architecture/current/dispatch-and-agent-strategy.md +11 -11
- package/docs/architecture/current/entity-model.md +0 -27
- package/docs/architecture/current/failure-recovery.md +0 -24
- package/docs/architecture/current/governance.md +1 -1
- package/docs/architecture/current/implementation-status.md +1 -1
- package/docs/architecture/current/legacy-governance.md +58 -0
- package/docs/architecture/current/multi-repository-execution.md +1 -1
- package/docs/architecture/current/peer-supercontroller-runtime.md +1 -1
- package/docs/architecture/current/personal-assistant-plugin-baseline.md +4 -5
- package/docs/architecture/current/scheduler-and-resource-claims.md +0 -10
- package/docs/architecture/current/target-requirements-traceability.md +2 -2
- package/docs/architecture/current/thin-harness-governance-policy.md +1 -1
- package/docs/architecture/current/thin-harness-v1.md +9 -11
- package/docs/architecture/domains/runtime-harness.md +1 -1
- package/docs/forge-autonomous-goal-loop.md +3 -1
- package/docs/forge-chatgpt-mcp-setup.md +67 -176
- package/docs/images/forge-banner-cn.svg +26 -1
- package/docs/images/forge-banner.svg +26 -1
- package/docs/operations/features.md +1 -1
- package/docs/operations/homebrew.md +3 -3
- package/docs/operations/mcp-tool-exposure.md +5 -5
- package/docs/operations/platform-support.md +45 -37
- package/docs/operations/platform-support.zh-CN.md +40 -38
- package/docs/operations/releasing.md +3 -3
- package/docs/operations/releasing.zh-CN.md +3 -3
- package/docs/operations/troubleshooting.md +11 -6
- package/docs/operations/troubleshooting.zh-CN.md +11 -6
- package/docs/public-usage-guide.md +28 -21
- package/docs/public-usage-guide.zh-CN.md +28 -21
- package/docs/tutorials/01-install-and-start.md +58 -35
- package/docs/tutorials/01-install-and-start.zh-CN.md +58 -35
- package/docs/tutorials/02-connect-chatgpt.md +118 -46
- package/docs/tutorials/02-connect-chatgpt.zh-CN.md +119 -45
- package/docs/wiki/Architecture.md +1 -1
- package/docs/wiki/Installation.md +2 -2
- package/docs/wiki/Quick-Start.md +1 -1
- package/docs/wiki/Work-Lifecycle.md +1 -1
- package/install.ps1 +4 -5
- package/install.sh +4 -6
- package/package.json +15 -5
- package/scripts/archive-workflow.sh +0 -1
- package/scripts/benchmark-thin-harness-mcp-e2e.ts +27 -14
- package/scripts/build-controller-ui.ts +28 -0
- package/scripts/capture-plan.sh +4 -4
- package/scripts/check-agent-tooling.sh +12 -1
- package/scripts/check-platform-support.mjs +2 -2
- package/scripts/check-public-docs.sh +16 -5
- package/scripts/check-release-readiness.sh +5 -11
- package/scripts/check-runtime-architecture.mjs +14 -22
- package/scripts/check-tarball-install-smoke.sh +3 -2
- package/scripts/check-task-workflow.sh +2 -2
- package/scripts/codex-handoff-resume.sh +5 -5
- package/scripts/create-project-dirs.sh +3 -3
- package/scripts/ensure-task-workflow.sh +45 -35
- package/scripts/init-project.sh +4 -4
- package/scripts/install-desktop-operator-registration.ts +2 -2
- package/scripts/lib/project-init-lib.sh +46 -44
- package/scripts/migrate-project-template.sh +7 -4
- package/scripts/new-plan.sh +1 -1
- package/scripts/plan-to-todo.sh +2 -2
- package/scripts/prepare-codex-handoff.sh +2 -2
- package/scripts/prepare-handoff.sh +9 -9
- package/scripts/refresh-current-status.sh +2 -2
- package/scripts/setup-plugins.sh +3 -3
- package/scripts/ship-worktrees.sh +1 -1
- package/scripts/sprint-backlog.sh +5 -5
- package/scripts/sync-codex-installed-copies.sh +2 -3
- package/scripts/verify-sprint.sh +7 -7
- package/scripts/workstream-sync.sh +1 -1
- package/src/cli/chatgpt-browser/bridge-extension.ts +1 -1
- package/src/cli/chatgpt-browser/bridge-provider.ts +29 -0
- package/src/cli/chatgpt-browser/file-policy.ts +3 -1
- package/src/cli/commands/chatgpt.ts +51 -0
- package/src/cli/commands/doctor.ts +1 -1
- package/src/cli/commands/init-hook.ts +213 -70
- package/src/cli/commands/init.ts +5 -6
- package/src/cli/commands/mcp.ts +31 -5
- package/src/cli/commands/runtime.ts +61 -8
- package/src/cli/commands/setup-profile.ts +472 -0
- package/src/cli/controller/check-runner.ts +20 -3
- package/src/cli/controller/codex-continuation.ts +4 -7
- package/src/cli/controller/context-pack.ts +118 -14
- package/src/cli/controller/operational-plan.ts +4 -4
- package/src/cli/controller/task-ledger.ts +10 -10
- package/src/cli/controller/work-mode.ts +6 -13
- package/src/cli/index.ts +14 -35
- package/src/cli/local-bridge/connector-freshness.ts +1 -1
- package/src/cli/local-bridge/console-assets.ts +17 -0
- package/src/cli/local-bridge/console-automations.ts +160 -0
- package/src/cli/local-bridge/dashboard.ts +8 -1303
- package/src/cli/local-bridge/facade-api.ts +16 -7
- package/src/cli/local-bridge/frontend/src/App.tsx +10 -0
- package/src/cli/local-bridge/frontend/src/components/Button.tsx +1 -0
- package/src/cli/local-bridge/frontend/src/components/DetailPane.tsx +3 -0
- package/src/cli/local-bridge/frontend/src/components/SearchField.tsx +1 -0
- package/src/cli/local-bridge/frontend/src/components/SectionHeader.tsx +1 -0
- package/src/cli/local-bridge/frontend/src/components/Segmented.tsx +1 -0
- package/src/cli/local-bridge/frontend/src/components/StatusText.tsx +3 -0
- package/src/cli/local-bridge/frontend/src/design/icons.tsx +11 -0
- package/src/cli/local-bridge/frontend/src/design/tokens.css +8 -0
- package/src/cli/local-bridge/frontend/src/features/automations/AutomationsView.tsx +3 -0
- package/src/cli/local-bridge/frontend/src/features/capabilities/CapabilitiesView.tsx +4 -0
- package/src/cli/local-bridge/frontend/src/features/overview/OverviewView.tsx +3 -0
- package/src/cli/local-bridge/frontend/src/features/repositories/RepositoriesView.tsx +2 -0
- package/src/cli/local-bridge/frontend/src/features/settings/SettingsView.tsx +2 -0
- package/src/cli/local-bridge/frontend/src/features/system/SystemView.tsx +2 -0
- package/src/cli/local-bridge/frontend/src/features/work/WorkView.tsx +3 -0
- package/src/cli/local-bridge/frontend/src/lib/api.ts +23 -0
- package/src/cli/local-bridge/frontend/src/lib/format.ts +4 -0
- package/src/cli/local-bridge/frontend/src/lib/routes.ts +7 -0
- package/src/cli/local-bridge/frontend/src/main.tsx +1 -0
- package/src/cli/local-bridge/frontend/src/shell/AppShell.tsx +1 -0
- package/src/cli/local-bridge/frontend/src/shell/CommandBar.tsx +2 -0
- package/src/cli/local-bridge/frontend/src/shell/Sidebar.tsx +3 -0
- package/src/cli/local-bridge/frontend/src/styles.css +12 -0
- package/src/cli/local-bridge/frontend/src/types.ts +14 -0
- package/src/cli/local-bridge/frontend/src/vite-env.d.ts +1 -0
- package/src/cli/local-bridge/frontend/vite.config.ts +27 -0
- package/src/cli/local-bridge/server.ts +45 -0
- package/src/cli/local-bridge/ui-dist/app.css +1 -0
- package/src/cli/local-bridge/ui-dist/app.js +11094 -0
- package/src/cli/mcp/auth.ts +2 -0
- package/src/cli/mcp/instructions.ts +3 -3
- package/src/cli/mcp/legacy-tool-service.ts +27 -23
- package/src/cli/mcp/multi-repository.ts +2 -0
- package/src/cli/mcp/policy.ts +7 -5
- package/src/cli/mcp/repository-tools.ts +53 -14
- package/src/cli/mcp/server.ts +5 -10
- package/src/cli/mcp/setup.ts +220 -276
- package/src/cli/mcp/tool-capability-cache.ts +1 -1
- package/src/cli/mcp/toolset-names.ts +1 -1
- package/src/cli/mcp/toolset.ts +0 -1
- package/src/cli/mcp/transports/http.ts +51 -4
- package/src/cli/repositories/branch-name-policy.ts +0 -7
- package/src/cli/repositories/controller-home.ts +110 -3
- package/src/cli/repositories/safe-patch.ts +1 -1
- package/src/cli/repositories/selected-path-actions.ts +26 -24
- package/src/core/adoption/gitignore-plan.ts +2 -3
- package/src/core/adoption/plan.ts +4 -1
- package/src/runtime/control-plane/execution/edit-validation-coordinator.ts +556 -0
- package/src/runtime/control-plane/execution/work-handle-store.ts +128 -1
- package/src/runtime/control-plane/execution/work-validation-reconciler.ts +277 -0
- package/src/runtime/control-plane/execution/work-verification-snapshot.ts +169 -0
- package/src/runtime/control-plane/facade/capability-registry.ts +0 -10
- package/src/runtime/control-plane/facade/handoff-inbox-store.ts +44 -25
- package/src/runtime/control-plane/facade/suggested-actions.ts +7 -1
- package/src/runtime/control-plane/facade/types.ts +0 -1
- package/src/runtime/control-plane/global-scheduler/scheduler.ts +30 -8
- package/src/runtime/control-plane/launcher/chatgpt-work-binding-store.ts +114 -0
- package/src/runtime/control-plane/launcher/chatgpt-work-continuation.ts +175 -0
- package/src/runtime/control-plane/launcher/launch-reservation-store.ts +161 -0
- package/src/runtime/control-plane/launcher/provider-mcp-bootstrap.ts +64 -0
- package/src/runtime/control-plane/launcher/thin-launcher.ts +117 -24
- package/src/runtime/control-plane/routing/route-policy.ts +14 -14
- package/src/runtime/control-plane/runtime-cleanup.ts +0 -1
- package/src/runtime/evidence/event-ledger.ts +1 -1
- package/src/runtime/{workflow/campaigns/workspace.ts → execution/managed-workspace.ts} +41 -43
- package/src/runtime/execution/process-runtime/check-facade.ts +6 -0
- package/src/runtime/execution/process-runtime/check-result.ts +45 -0
- package/src/runtime/execution/process-runtime/check-runner-sidecar.ts +42 -16
- package/src/runtime/execution/process-runtime/command-facade.ts +4 -2
- package/src/runtime/execution/process-runtime/gc.ts +1 -1
- package/src/runtime/execution/process-runtime/index.ts +3 -0
- package/src/runtime/execution/process-runtime/interactive-admission.ts +14 -5
- package/src/runtime/execution/process-runtime/persisted-check.ts +285 -0
- package/src/runtime/execution/process-runtime/resource-claims.ts +30 -0
- package/src/runtime/execution/process-runtime/runtime.ts +18 -1
- package/src/runtime/execution/process-runtime/store.ts +1 -19
- package/src/runtime/execution/process-runtime/types.ts +4 -0
- package/src/runtime/execution/thin-harness/execution-router.ts +0 -1
- package/src/runtime/execution/thin-harness/fast-executor.ts +1 -1
- package/src/runtime/execution/thin-harness/lightweight-lanes.ts +1 -2
- package/src/runtime/execution/thin-harness/types.ts +0 -1
- package/src/runtime/execution/workers/executor.ts +1 -1
- package/src/runtime/gateway/mcp/execution-tools.ts +1 -1
- package/src/runtime/gateway/mcp/persisted-check-process.ts +3 -255
- package/src/runtime/gateway/mcp/process-tools.ts +16 -3
- package/src/runtime/gateway/mcp/resource-policy.ts +0 -9
- package/src/runtime/gateway/mcp/router.ts +117 -182
- package/src/runtime/gateway/mcp/runtime-tools.ts +331 -409
- package/src/runtime/gateway/mcp/work-validation-reconciler.ts +1 -219
- package/src/runtime/plugins/browser-adapter.ts +5 -0
- package/src/runtime/plugins/desktop-operator-registration.ts +1 -1
- package/src/runtime/plugins/store.ts +14 -6
- package/src/runtime/plugins/types.ts +1 -1
- package/src/runtime/projections/materialized-view.ts +1 -23
- package/src/runtime/recovery/maintenance-executor.ts +9 -0
- package/src/runtime/resources/ownership.ts +0 -1
- package/src/runtime/root/gateway-adapter.ts +2 -0
- package/src/runtime/root/mcp-transport.ts +10 -2
- package/src/runtime/root/package-connector-service.ts +136 -0
- package/src/runtime/root/package-runtime-release.ts +161 -0
- package/src/runtime/root/package-runtime-service.ts +185 -0
- package/src/runtime/root/release-materialize.ts +19 -0
- package/src/runtime/root/runtime.ts +2 -1
- package/src/runtime/root/scheduler.ts +5 -0
- package/src/runtime/root/service.ts +18 -5
- package/src/runtime/standalone-recovery/core.ts +65 -16
- package/src/runtime/workflow/findings/store.ts +145 -106
- package/src/runtime/workflow/findings/types.ts +22 -0
- package/src/runtime/workflow/schedules/engine.ts +132 -2
- package/src/runtime/workflow/schedules/pending-activation.ts +139 -0
- package/src/runtime/workflow/schedules/work-continuation.ts +218 -0
- package/docs/CHANGELOG.md +0 -978
- package/docs/README.zh-CN.md +0 -58
- package/scripts/smoke-chatgpt-supervised-automation.ts +0 -208
- package/src/cli/commands/controller.ts +0 -680
- package/src/runtime/workflow/campaigns/cleanup.ts +0 -263
- package/src/runtime/workflow/campaigns/engine.ts +0 -112
- package/src/runtime/workflow/campaigns/normalize.ts +0 -100
- package/src/runtime/workflow/campaigns/review.ts +0 -315
- package/src/runtime/workflow/campaigns/store.ts +0 -526
- package/src/runtime/workflow/campaigns/supervisor.ts +0 -112
- package/src/runtime/workflow/campaigns/types.ts +0 -290
- /package/src/runtime/{workflow/campaigns → execution}/workspace-agent.ts +0 -0
|
@@ -1,94 +1,57 @@
|
|
|
1
1
|
# Agentic Development Flow
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
|
11
|
-
|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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
|
|
90
|
-
- Do not
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
-
-
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
- `
|
|
8
|
-
-
|
|
9
|
-
- `gbrain
|
|
10
|
-
- `
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
-
#
|
|
1
|
+
# Session Continuation Protocol
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This compatibility document describes **host-session recovery only**. It does not define Forge's Runtime `HandoffItem` lifecycle.
|
|
4
4
|
|
|
5
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
27
|
-
2.
|
|
28
|
-
3. Read source artifacts
|
|
29
|
-
4. Read `.ai/harness/
|
|
30
|
-
5.
|
|
31
|
-
6.
|
|
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
|
-
##
|
|
37
|
+
## Authority
|
|
35
38
|
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
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
|
|
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
|
|
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
|
|
48
|
-
17. `.ai/harness/
|
|
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
|
|
57
|
-
- Stopping a session should refresh `.ai/harness/
|
|
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
|
|
122
|
-
- `forge install` bootstraps
|
|
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`.
|
|
@@ -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="
|
|
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
|
|
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
|
|
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 '.
|
|
728
|
-
resume_file="$(policy_get '.
|
|
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 '.
|
|
204
|
-
repo_handoff="$(safe_repo_file "$(policy_get '.
|
|
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
|
|
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
|
|
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
|
-
-
|
|
254
|
+
- Session continuation: ${repo_handoff}
|
|
255
255
|
- Resume packet: ${resume_file}
|
|
256
256
|
- Checks: ${checks_file}
|
|
257
257
|
- Todo: ${todo_file}
|