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