@moretea-labs/forge 1.5.0 → 1.6.0
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/CHANGELOG.md +28 -1
- package/DESIGN.md +7 -2
- package/README.md +7 -7
- package/README.zh-CN.md +5 -3
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/assets/hooks/pre-edit-guard.sh +8 -39
- package/assets/hooks/prompt-guard.sh +2 -2
- package/assets/plugin-registry.v1.json +54 -3
- package/assets/reference-configs/hook-operations.md +1 -1
- package/assets/reference-configs/sprint-contracts.md +2 -2
- package/assets/skill-version.json +2 -2
- package/assets/templates/helpers/ensure-task-workflow.sh +2 -2
- package/assets/templates/helpers/sprint-backlog.sh +6 -6
- package/docs/architecture/current/automation-and-schedule-engine.md +9 -3
- package/docs/architecture/current/codegraph-context-provider.md +15 -3
- package/docs/architecture/current/dispatch-and-agent-strategy.md +32 -13
- package/docs/architecture/current/entity-model.md +20 -0
- package/docs/architecture/current/external-plugin-governance.md +3 -3
- package/docs/architecture/current/system-overview.md +26 -1
- package/docs/architecture/current/thin-harness-v1.md +10 -0
- package/docs/forge-chatgpt-mcp-setup.md +27 -3
- package/docs/operations/chatgpt-personal-assistant-runtime.md +12 -2
- package/docs/operations/controller-browser-plugin.md +12 -16
- package/docs/operations/features.md +1 -1
- package/docs/operations/homebrew.md +2 -2
- package/docs/public-usage-guide.md +1 -1
- package/docs/public-usage-guide.zh-CN.md +1 -1
- package/docs/tutorials/01-install-and-start.md +6 -4
- package/docs/tutorials/01-install-and-start.zh-CN.md +3 -1
- package/docs/tutorials/02-connect-chatgpt.md +8 -2
- package/docs/tutorials/02-connect-chatgpt.zh-CN.md +8 -2
- package/docs/wiki/Installation.md +1 -1
- package/docs/wiki/Quick-Start.md +1 -1
- package/package.json +1 -1
- package/scripts/check-public-docs.sh +14 -1
- package/scripts/migrate-chatgpt-automation-schedules.ts +64 -0
- package/scripts/sprint-backlog.sh +1 -1
- package/src/cli/commands/chatgpt.ts +31 -2
- package/src/cli/commands/init-hook.ts +3 -1
- package/src/cli/commands/mcp.ts +2 -0
- package/src/cli/commands/plugin.ts +36 -9
- package/src/cli/commands/runtime.ts +1 -0
- package/src/cli/commands/setup-profile.ts +49 -18
- package/src/cli/controller/context-pack.ts +158 -6
- package/src/cli/hook/prompt-guard-decision.ts +17 -18
- package/src/cli/hook/prompt-intents.ts +1 -1
- package/src/cli/local-bridge/console-assets.ts +17 -0
- package/src/cli/local-bridge/console-automations.ts +205 -23
- package/src/cli/local-bridge/console-view-models.ts +2 -0
- package/src/cli/local-bridge/facade-api.ts +2 -0
- package/src/cli/local-bridge/frontend/src/App.tsx +1 -1
- package/src/cli/local-bridge/frontend/src/features/automations/AutomationsView.tsx +143 -3
- package/src/cli/local-bridge/frontend/src/features/capabilities/CapabilitiesView.tsx +1 -1
- package/src/cli/local-bridge/frontend/src/features/overview/OverviewView.tsx +181 -3
- package/src/cli/local-bridge/frontend/src/features/repositories/RepositoriesView.tsx +1 -1
- package/src/cli/local-bridge/frontend/src/features/work/WorkView.tsx +4 -3
- package/src/cli/local-bridge/frontend/src/lib/api.ts +18 -6
- package/src/cli/local-bridge/frontend/src/shell/CommandBar.tsx +1 -1
- package/src/cli/local-bridge/frontend/src/shell/Sidebar.tsx +2 -1
- package/src/cli/local-bridge/frontend/src/styles.css +27 -11
- package/src/cli/local-bridge/frontend/src/types.ts +6 -2
- package/src/cli/local-bridge/server.ts +31 -20
- package/src/cli/local-bridge/ui-dist/app.css +1 -1
- package/src/cli/local-bridge/ui-dist/app.js +5003 -4815
- package/src/cli/mcp/auth.ts +2 -0
- package/src/cli/mcp/paths.ts +8 -2
- package/src/cli/mcp/repository-tools.ts +124 -9
- package/src/cli/mcp/server.ts +164 -19
- package/src/cli/mcp/setup.ts +9 -1
- package/src/cli/mcp/transports/http.ts +52 -2
- package/src/cli/mcp/transports/session-registry.ts +24 -0
- package/src/cli/repositories/command-classifier.ts +113 -0
- package/src/cli/repositories/safe-patch.ts +6 -4
- package/src/cli/repositories/structured-git.ts +49 -7
- package/src/cli/repository/inspector.ts +16 -3
- package/src/runtime/assistant/intent.ts +3 -3
- package/src/runtime/control-plane/execution/direct-edit-work-completion.ts +157 -2
- package/src/runtime/control-plane/execution/execution-identity.ts +65 -14
- package/src/runtime/control-plane/execution/validation.ts +15 -2
- package/src/runtime/control-plane/execution/work-terminal-cleanup.ts +32 -0
- package/src/runtime/control-plane/execution/work-validation-reconciler.ts +6 -7
- package/src/runtime/control-plane/execution/work-verification-snapshot.ts +2 -1
- package/src/runtime/control-plane/facade/capability-registry.ts +1 -1
- package/src/runtime/control-plane/facade/controller-session-store.ts +12 -13
- package/src/runtime/control-plane/facade/goal-workloop-access.ts +7 -2
- package/src/runtime/control-plane/facade/goal-workloop.ts +231 -8
- package/src/runtime/control-plane/facade/plan-contract-store.ts +32 -12
- package/src/runtime/control-plane/facade/requirement-board.ts +24 -8
- package/src/runtime/control-plane/facade/types.ts +33 -6
- package/src/runtime/control-plane/facade/work-contract-store.ts +31 -2
- package/src/runtime/control-plane/launcher/chatgpt-work-continuation.ts +375 -23
- package/src/runtime/control-plane/persistence/requirement-store.ts +15 -11
- package/src/runtime/diagnostics/mcp-timing.ts +6 -0
- package/src/runtime/execution/process-runtime/check-facade.ts +1 -10
- package/src/runtime/execution/process-runtime/check-result.ts +10 -2
- package/src/runtime/execution/process-runtime/command-facade.ts +1 -0
- package/src/runtime/execution/process-runtime/gc.ts +64 -10
- package/src/runtime/execution/process-runtime/persisted-check.ts +10 -2
- package/src/runtime/execution/process-runtime/resource-claims.ts +87 -2
- package/src/runtime/execution/process-runtime/runtime.ts +16 -1
- package/src/runtime/execution/process-runtime/store.ts +6 -0
- package/src/runtime/gateway/mcp/execution-tools.ts +27 -12
- package/src/runtime/gateway/mcp/router.ts +1 -1
- package/src/runtime/gateway/mcp/runtime-tools.ts +482 -178
- package/src/runtime/model-clients/deepseek-adapter.ts +0 -32
- package/src/runtime/plugins/browser-adapter.ts +19 -72
- package/src/runtime/plugins/browser-handoff-host.ts +6 -31
- package/src/runtime/plugins/browser-handoff.ts +0 -3
- package/src/runtime/plugins/browser-macos-bridge.ts +8 -0
- package/src/runtime/plugins/desktop-operator-registration.ts +8 -11
- package/src/runtime/plugins/external-registration.ts +84 -5
- package/src/runtime/plugins/first-party-registry.ts +2 -2
- package/src/runtime/plugins/gmail-adapter.ts +28 -2
- package/src/runtime/plugins/local-system-adapter.ts +2 -2
- package/src/runtime/plugins/plugin-management-adapter.ts +140 -0
- package/src/runtime/plugins/store.ts +107 -5
- package/src/runtime/plugins/types.ts +4 -0
- package/src/runtime/recovery/actions.ts +0 -10
- package/src/runtime/recovery/classifier.ts +0 -9
- package/src/runtime/recovery/maintenance-executor.ts +43 -11
- package/src/runtime/recovery/probe.ts +0 -1
- package/src/runtime/recovery/types.ts +0 -1
- package/src/runtime/root/package-connector-service.ts +136 -0
- package/src/runtime/root/package-runtime-service.ts +25 -12
- package/src/runtime/root/release-materialize.ts +161 -18
- package/src/runtime/root/service.ts +6 -4
- package/src/runtime/safe-tooling/index.ts +0 -1
- package/src/runtime/safe-tooling/types.ts +0 -30
- package/src/runtime/standalone-recovery/core.ts +2 -2
- package/src/runtime/workflow/schedules/browser-probe.ts +180 -0
- package/src/runtime/workflow/schedules/chatgpt-automation-migration.ts +40 -0
- package/src/runtime/workflow/schedules/engine.ts +357 -64
- package/src/runtime/workflow/schedules/types.ts +5 -0
- package/src/runtime/workflow/schedules/work-continuation.ts +100 -27
- package/bin/forge-desktop-helper.mjs +0 -204
- package/docs/operations/controller-desktop-plugin.md +0 -112
- package/src/runtime/plugins/desktop-adapter.ts +0 -374
- package/src/runtime/safe-tooling/browser-safe.ts +0 -133
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,34 @@ All notable public Forge changes are recorded here. Release entries are tied to
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## 1.6.0 - 2026-08-16
|
|
8
|
+
|
|
9
|
+
### Architecture V2 and execution governance
|
|
10
|
+
|
|
11
|
+
- Complete the V2 Direct / bounded Work / Plan execution model, including isolated Work materialization, authoritative finalization, dead-Plan recovery, duplicate-writer prevention, and safer Work validation.
|
|
12
|
+
- Decouple durable Work ownership from transient MCP transport sessions so scheduled and interactive ChatGPT execution can resume against stable controller leases and checkout identity.
|
|
13
|
+
- Add bounded impact context and CodeGraph-aware retrieval while keeping routing, semantic context, and repository authority converged on one deterministic control path.
|
|
14
|
+
|
|
15
|
+
### Performance and Runtime
|
|
16
|
+
|
|
17
|
+
- Reduce controller hot-path overhead with canonical repository-root reuse, exact-file retrieval fast paths, Runtime proxy session reuse, batched Process identity probes, narrower service claims, and read-only SQLite diagnostics.
|
|
18
|
+
- Preserve resumable Process/check execution while improving persisted-check retry idempotency, stale-process handling, worktree reconciliation, and release/runtime identity safety.
|
|
19
|
+
- Keep the stable 19-tool ChatGPT surface while moving more domain behavior behind typed capability and plugin contracts.
|
|
20
|
+
|
|
21
|
+
### Automation and plugins
|
|
22
|
+
|
|
23
|
+
- Add Forge-native ChatGPT workflows, schedules, Work-bound browser watchers, cross-session workflow attribution, and more reliable ChatGPT mode/reasoning selection.
|
|
24
|
+
- Add trusted external-plugin registration lifecycle support and official Forge Figma Bridge catalog installation; retire the bundled desktop helper in favor of the external provider boundary.
|
|
25
|
+
- Improve plugin scope/compatibility handling, browser URL behavior, image artifact delivery, Gmail Unicode subjects, and automation history/configuration surfaces.
|
|
26
|
+
|
|
27
|
+
## 1.5.1 - 2026-08-13
|
|
28
|
+
|
|
29
|
+
### ChatGPT Secure Tunnel and package setup
|
|
30
|
+
|
|
31
|
+
- Make `--tunnel auto` prefer OpenAI Secure MCP Tunnel instead of silently selecting an installed public-ingress CLI. Cloudflare, Tailscale, existing HTTPS, and deferred remote access remain explicit fallbacks.
|
|
32
|
+
- Add a package-managed loopback OAuth Gateway for ChatGPT alongside the bearer-only Canonical Runtime, and persist the local OAuth endpoint in user-level MCP configuration so Secure Tunnel never targets the internal Runtime directly.
|
|
33
|
+
- Accept modern ChatGPT `server/discover` probing with the correct legacy fallback response, detect tunnel runtimes by `tunnel_id` rather than a hard-coded alias, and prefer an existing repository Controller Home during setup reconciliation.
|
|
34
|
+
- Clarify that the ChatGPT App/connector owns application/tool identity while Secure Tunnel owns transport, document migration from Cloudflare/HTTPS, and add the supported npm update flow (`npm install -g @moretea-labs/forge@latest` then `forge setup next`).
|
|
8
35
|
|
|
9
36
|
## 1.5.0 - 2026-08-13
|
|
10
37
|
|
package/DESIGN.md
CHANGED
|
@@ -218,9 +218,14 @@ Dark, persistent and quiet. It contains Forge identity, grouped navigation, and
|
|
|
218
218
|
### Command bar
|
|
219
219
|
Each route owns a compact command bar: eyebrow, title, one-line purpose, refreshed time and route actions. `Open ChatGPT` remains globally available but visually secondary.
|
|
220
220
|
|
|
221
|
+
## Page composition rules
|
|
222
|
+
Each workspace has **one dominant information region** and at most one contextual secondary region. Pages are not collections of cards; layout, typography, aligned columns, whitespace and hairlines establish hierarchy before enclosure.
|
|
223
|
+
|
|
224
|
+
Collections use rows or tables. A selected entity uses one contextual detail pane. Configuration uses titled sections with field rows. Metrics stay inline or in compact definition rows unless direct metric comparison is the task. Normal state is visually neutral; semantic color is reserved for exceptions, attention and explicit interaction.
|
|
225
|
+
|
|
221
226
|
## Core component grammar
|
|
222
227
|
### Metric strip
|
|
223
|
-
|
|
228
|
+
Metric strips are exceptional. Use them only when comparing coarse operational facts is itself useful; never make equal metric cards the default page composition.
|
|
224
229
|
|
|
225
230
|
### Data list
|
|
226
231
|
Primary scanning surface for Work, Capabilities and Repositories. Rows use hairline separators and bounded one-line context.
|
|
@@ -236,7 +241,7 @@ Use a 7px dot plus short text. Filled badges are exceptional.
|
|
|
236
241
|
|
|
237
242
|
## Page grammar
|
|
238
243
|
### Overview
|
|
239
|
-
|
|
244
|
+
Overview is a **cross-workspace status and attention surface**, not a collection manager. Keep it single-column and lightweight: first surface a bounded, deduplicated Needs attention list across Work, Automations, Capabilities, Repositories and System; then show one compact Workspace summary row for each owning workspace. Overview does not enumerate ordinary Work, group content by repository, expose collection filters or open a detail pane. It routes the user to the owning workspace for management. Healthy state stays compact and neutral. Activity feeds require authoritative event semantics and must never be inferred from `updatedAt` or other incidental timestamps. No prompt composer, run timeline, repository portfolio, equal metric grid or decorative posture hero.
|
|
240
245
|
|
|
241
246
|
### Automations
|
|
242
247
|
Use a configuration-first table with Name, Schedule, Scope, Delivery, Status, Last and Next; filters Enabled / Paused / Attention / All; selected detail pane with exact source and Run/Pause/Resume. Never duplicate report body.
|
package/README.md
CHANGED
|
@@ -44,11 +44,11 @@ forge setup configure --controller chatgpt --tunnel auto
|
|
|
44
44
|
forge setup next
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
Setup persists progress and guides the selected path through the user-level Package Runtime, remote connectivity, controller registration, and connection verification. For ChatGPT,
|
|
47
|
+
Setup persists progress and guides the selected path through the user-level Package Runtime, remote connectivity, controller registration, and connection verification. For ChatGPT, `--tunnel auto` now means **OpenAI Secure MCP Tunnel first**: Forge keeps the Canonical Runtime private, installs a loopback OAuth Gateway for ChatGPT, and lets the official `tunnel-client` carry MCP traffic outbound to OpenAI. Cloudflare Tunnel, Tailscale Funnel, an existing HTTPS `/mcp` URL, or deferred remote access remain explicit fallbacks when Secure Tunnel is unavailable. Local Codex/Claude controllers do not need a tunnel. The ChatGPT App/connector is the application identity; Secure Tunnel is only its network transport, so switching transport does not create a second Forge tool schema.
|
|
48
48
|
|
|
49
|
-
Then follow [Install and start](docs/tutorials/01-install-and-start.md) and [Connect ChatGPT](docs/tutorials/02-connect-chatgpt.md). A repository is optional during initial setup; add one later with `forge adopt --repo /path/to/your-project`.
|
|
49
|
+
Then follow [Install and start](docs/tutorials/01-install-and-start.md) and [Connect ChatGPT](docs/tutorials/02-connect-chatgpt.md). A repository is optional during initial setup; add one later with `forge adopt --repo /path/to/your-project`. Upgrade an existing install with `npm install -g @moretea-labs/forge@latest`, verify with `forge --version`, then run `forge setup next` to reconcile newer Runtime/connector setup contracts.
|
|
50
50
|
|
|
51
|
-
For a reviewed source checkout: `git clone https://github.com/moretea-labs/forge.git && cd forge &&
|
|
51
|
+
For a reviewed source checkout: `git clone https://github.com/moretea-labs/forge.git && cd forge && bun install --frozen-lockfile && npm install -g . --omit=optional --no-audit --no-fund`.
|
|
52
52
|
|
|
53
53
|
## Built in, and extensible
|
|
54
54
|
|
|
@@ -58,7 +58,7 @@ Forge ships typed local/browser/desktop/iOS/GitHub/Gmail/Calendar/Tasks/App Stor
|
|
|
58
58
|
|
|
59
59
|
Local read/write grants are explicit and expiring; remote or destructive effects are distinguished from ordinary local work; high-impact actions require stronger confirmation. Full Access reduces repetitive prompts for normal work without removing the hard boundaries around secrets, destructive actions, and outside-workspace access. See [Security](SECURITY.md) and the [Security Model](docs/wiki/Security-Model.md).
|
|
60
60
|
|
|
61
|
-
**Docs:** [Wiki](docs/wiki/Home.md) · [Support](SUPPORT.md) · [Contributing](CONTRIBUTING.md) · [Changelog](CHANGELOG.md). Current stable release: `1.
|
|
61
|
+
**Docs:** [Wiki](docs/wiki/Home.md) · [Support](SUPPORT.md) · [Contributing](CONTRIBUTING.md) · [Changelog](CHANGELOG.md). Current stable release: `1.6.0`; stable installs use npm `latest`.
|
|
62
62
|
|
|
63
63
|
---
|
|
64
64
|
<a id="zh-cn"></a>
|
|
@@ -101,12 +101,12 @@ forge setup configure --controller chatgpt --tunnel auto
|
|
|
101
101
|
forge setup next # 按每次显示的 Next 动作继续
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
-
远程主控的 setup 会继续引导 Package Runtime
|
|
104
|
+
远程主控的 setup 会继续引导 Package Runtime、远程连接、主控配置和连接验证;对 ChatGPT,`--tunnel auto` 现在明确表示 **优先 OpenAI Secure MCP Tunnel**。Forge 保持 Canonical Runtime 私有,并安装一个仅监听 loopback 的 OAuth Gateway,再由官方 `tunnel-client` 出站连接 OpenAI。只有 Secure Tunnel 不可用时才显式选择 Cloudflare Tunnel、Tailscale Funnel、已有 HTTPS `/mcp` 或暂缓远程连接。本地 Codex/Claude 主控不需要 tunnel。ChatGPT App/connector 是应用身份,Secure Tunnel 只是网络传输层,因此切换网络不会产生另一套 Forge 工具 schema。
|
|
105
105
|
|
|
106
|
-
继续阅读[安装与启动](docs/tutorials/01-install-and-start.zh-CN.md)和[连接 ChatGPT](docs/tutorials/02-connect-chatgpt.zh-CN.md)。仓库不是首次 setup 的前置条件,需要开发能力时再运行 `forge adopt --repo /path/to/your-project
|
|
106
|
+
继续阅读[安装与启动](docs/tutorials/01-install-and-start.zh-CN.md)和[连接 ChatGPT](docs/tutorials/02-connect-chatgpt.zh-CN.md)。仓库不是首次 setup 的前置条件,需要开发能力时再运行 `forge adopt --repo /path/to/your-project`。已安装用户升级:`npm install -g @moretea-labs/forge@latest`,确认 `forge --version` 后运行 `forge setup next` 让新版 setup 自动补齐 Runtime/connector 配置。源码安装:`git clone https://github.com/moretea-labs/forge.git && cd forge && bun install --frozen-lockfile && npm install -g . --omit=optional --no-audit --no-fund`。
|
|
107
107
|
|
|
108
108
|
Forge 内置本机、Browser、Desktop、iOS、GitHub、Gmail、Calendar、Tasks、App Store Connect、Resend 等类型化能力;公开 Provider 目录还有 **Forge Desktop Operator / Forge Design / Personal Knowledge Assistant**。详见[功能清单](docs/operations/features.zh-CN.md)与[插件管理](docs/forge-plugin-management.md)。
|
|
109
109
|
|
|
110
110
|
安全上,普通本地修改、远程影响、破坏性操作、密钥和工作区外访问是不同边界;Full Access 不会取消高风险确认。详见[安全说明](SECURITY.md)和[安全模型](docs/wiki/Security-Model.md)。
|
|
111
111
|
|
|
112
|
-
**文档:** [Wiki](docs/wiki/Home.md) · [支持](SUPPORT.md) · [贡献](CONTRIBUTING.md) · [更新日志](CHANGELOG.md)。当前稳定版为 `1.
|
|
112
|
+
**文档:** [Wiki](docs/wiki/Home.md) · [支持](SUPPORT.md) · [贡献](CONTRIBUTING.md) · [更新日志](CHANGELOG.md)。当前稳定版为 `1.6.0`,稳定安装使用 npm `latest`。
|
package/README.zh-CN.md
CHANGED
|
@@ -52,15 +52,17 @@ forge setup configure --controller chatgpt --tunnel auto
|
|
|
52
52
|
forge setup next # 按每次显示的 Next 动作继续
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
`forge setup`
|
|
55
|
+
`forge setup` 会持久化进度。对 ChatGPT,`--tunnel auto` 现在明确表示 **优先 OpenAI Secure MCP Tunnel**:Forge 保持 Canonical Runtime 私有,安装一个仅监听 loopback 的 OAuth Gateway,再由官方 `tunnel-client` 通过出站连接接入 OpenAI。Secure Tunnel 不可用时,再显式选择 Cloudflare Tunnel、Tailscale Funnel、已有 HTTPS `/mcp` 或暂缓远程连接。本地主控 Codex/Claude 不需要 tunnel。ChatGPT App/connector 是应用身份,Secure Tunnel 是网络传输层;切换 tunnel 不会创建另一套 Forge 工具 schema。
|
|
56
56
|
|
|
57
57
|
接着阅读:[安装与启动](docs/tutorials/01-install-and-start.zh-CN.md) · [连接 ChatGPT](docs/tutorials/02-connect-chatgpt.zh-CN.md) · [第一个仓库任务](docs/tutorials/03-first-repository-task.zh-CN.md)。仓库不是首次 setup 的前置条件;需要时再 `forge adopt --repo /path/to/your-project`。
|
|
58
58
|
|
|
59
|
+
已安装用户升级:`npm install -g @moretea-labs/forge@latest` → `forge --version` → `forge setup next`。
|
|
60
|
+
|
|
59
61
|
从源码安装已审查 checkout:
|
|
60
62
|
|
|
61
63
|
```bash
|
|
62
64
|
git clone https://github.com/moretea-labs/forge.git && cd forge
|
|
63
|
-
|
|
65
|
+
bun install --frozen-lockfile
|
|
64
66
|
npm install -g . --omit=optional --no-audit --no-fund
|
|
65
67
|
```
|
|
66
68
|
|
|
@@ -76,4 +78,4 @@ Forge 把读取、普通本地写入、远程操作、破坏性操作、工作
|
|
|
76
78
|
|
|
77
79
|
[中文文档中心](docs/README.zh-CN.md) · [Wiki](docs/wiki/Home.md) · [SUPPORT.md](SUPPORT.md) · [CONTRIBUTING.md](CONTRIBUTING.md) · [CHANGELOG.md](CHANGELOG.md)
|
|
78
80
|
|
|
79
|
-
当前稳定版本是 `1.
|
|
81
|
+
当前稳定版本是 `1.6.0`,稳定安装使用 npm `latest`。
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Third-party notices
|
|
2
2
|
|
|
3
|
-
This inventory covers the direct runtime and development dependencies declared by `@moretea-labs/forge@1.
|
|
3
|
+
This inventory covers the direct runtime and development dependencies declared by `@moretea-labs/forge@1.6.0`.
|
|
4
4
|
|
|
5
5
|
License values come from `package-lock.json` where available. For lock entries without a license field, the declared license was verified from package metadata during release preparation. This file is informational and does not replace the license text distributed by each dependency.
|
|
6
6
|
|
|
@@ -79,17 +79,13 @@ is_workflow_surface_path() {
|
|
|
79
79
|
|
|
80
80
|
edit_plan_gate_mode() {
|
|
81
81
|
local mode="${FORGE_EDIT_PLAN_GATE:-}"
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
fi
|
|
85
|
-
printf '%s' "$mode"
|
|
82
|
+
[[ -z "$mode" ]] && mode="$(workflow_policy_get '.guards.edit_plan_gate' 'advice')"
|
|
83
|
+
[[ "$mode" == "off" ]] && printf 'off' || printf 'advice'
|
|
86
84
|
}
|
|
87
85
|
|
|
88
|
-
#
|
|
89
|
-
#
|
|
90
|
-
#
|
|
91
|
-
# off path + plan state. Modes: advice (default) | enforce | off, via
|
|
92
|
-
# FORGE_EDIT_PLAN_GATE or policy .guards.edit_plan_gate.
|
|
86
|
+
# Plan/spec lifecycle is Controller context, never write authorization. This
|
|
87
|
+
# compatibility hook may advise; real enforcement remains path/private-surface,
|
|
88
|
+
# authorization, lease and fencing boundaries.
|
|
93
89
|
run_edit_plan_gate() {
|
|
94
90
|
local mode gate_plan gate_status
|
|
95
91
|
mode="$(edit_plan_gate_mode)"
|
|
@@ -99,31 +95,13 @@ run_edit_plan_gate() {
|
|
|
99
95
|
|
|
100
96
|
if [[ ! -f "docs/spec.md" ]]; then
|
|
101
97
|
echo "[SpecGuard] Implementation edit without docs/spec.md: $FILE_PATH"
|
|
102
|
-
|
|
103
|
-
echo "[SpecGuard] Advisory: run bash scripts/new-spec.sh and capture stable product intent."
|
|
104
|
-
else
|
|
105
|
-
hook_structured_error \
|
|
106
|
-
"SpecGuard" \
|
|
107
|
-
"Implementation edit to $FILE_PATH without docs/spec.md." \
|
|
108
|
-
"Run bash scripts/new-spec.sh and capture stable product intent before implementing." \
|
|
109
|
-
"missing_artifact"
|
|
110
|
-
exit 2
|
|
111
|
-
fi
|
|
98
|
+
echo "[SpecGuard] Advisory: capture stable product intent when it materially helps this change."
|
|
112
99
|
fi
|
|
113
100
|
|
|
114
101
|
gate_plan="$(get_active_plan || true)"
|
|
115
102
|
if [[ -z "$gate_plan" || ! -f "$gate_plan" ]]; then
|
|
116
103
|
echo "[PlanStatusGuard] No active plan covers implementation edit: $FILE_PATH"
|
|
117
|
-
|
|
118
|
-
echo "[PlanStatusGuard] Advisory: capture the approved plan with bash scripts/capture-plan.sh --slug <slug> --title <title> --status Approved --execute"
|
|
119
|
-
else
|
|
120
|
-
hook_structured_error \
|
|
121
|
-
"PlanStatusGuard" \
|
|
122
|
-
"Implementation edit to $FILE_PATH without an active plan." \
|
|
123
|
-
"Capture the approved planning output with bash scripts/capture-plan.sh --slug <slug> --title <title> --status Approved --execute, or set policy .guards.edit_plan_gate to advice/off for this repo." \
|
|
124
|
-
"missing_artifact"
|
|
125
|
-
exit 2
|
|
126
|
-
fi
|
|
104
|
+
echo "[PlanStatusGuard] Advisory: use a Plan only when ChatGPT has chosen staged/dependency coordination."
|
|
127
105
|
return 0
|
|
128
106
|
fi
|
|
129
107
|
|
|
@@ -131,16 +109,7 @@ run_edit_plan_gate() {
|
|
|
131
109
|
case "$gate_status" in
|
|
132
110
|
Draft|Annotating)
|
|
133
111
|
echo "[PlanStatusGuard] Plan status is '$gate_status' in $gate_plan; implementation edit: $FILE_PATH"
|
|
134
|
-
|
|
135
|
-
echo "[PlanStatusGuard] Advisory: complete the annotation cycle and move the plan to Approved before implementation."
|
|
136
|
-
else
|
|
137
|
-
hook_structured_error \
|
|
138
|
-
"PlanStatusGuard" \
|
|
139
|
-
"Implementation edit to $FILE_PATH while plan status is $gate_status in $gate_plan." \
|
|
140
|
-
"Complete the annotation cycle and move the plan to Approved before implementation." \
|
|
141
|
-
"state_violation"
|
|
142
|
-
exit 2
|
|
143
|
-
fi
|
|
112
|
+
echo "[PlanStatusGuard] Advisory: this Plan is not execution-ready; ordinary Direct work remains independent."
|
|
144
113
|
;;
|
|
145
114
|
esac
|
|
146
115
|
}
|
|
@@ -768,7 +768,7 @@ render_prompt_guard_action() {
|
|
|
768
768
|
exit 0
|
|
769
769
|
;;
|
|
770
770
|
plan_status_no_active_block)
|
|
771
|
-
echo "[PlanStatusGuard]
|
|
771
|
+
echo "[PlanStatusGuard] Legacy advisory: no active Plan found. Ordinary implementation is not gated by Plan presence."
|
|
772
772
|
echo "[PlanStatusGuard] Capture the approved planning output with: bash scripts/capture-plan.sh --slug <slug> --title <title> --status Approved --execute"
|
|
773
773
|
echo "[PlanStatusGuard] If there is no captured planning output yet, run: bash scripts/ensure-task-workflow.sh --slug <slug> --title <title>"
|
|
774
774
|
exit 0
|
|
@@ -780,7 +780,7 @@ render_prompt_guard_action() {
|
|
|
780
780
|
exit 0
|
|
781
781
|
;;
|
|
782
782
|
plan_status_not_approved_block)
|
|
783
|
-
echo "[PlanStatusGuard]
|
|
783
|
+
echo "[PlanStatusGuard] Legacy advisory: plan status is '$plan_status' in $active_plan. This does not authorize or block ordinary implementation."
|
|
784
784
|
exit 0
|
|
785
785
|
;;
|
|
786
786
|
evidence_contract_block)
|
|
@@ -1,8 +1,59 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"plugins": [
|
|
4
|
-
{
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
{
|
|
5
|
+
"id": "desktop_operator",
|
|
6
|
+
"name": "Forge Desktop Operator",
|
|
7
|
+
"version": "0.2.1",
|
|
8
|
+
"description": "Native macOS desktop automation provider for Forge.",
|
|
9
|
+
"repository": "https://github.com/moretea-labs/forge-desktop-operator.git",
|
|
10
|
+
"ref": "v0.2.1",
|
|
11
|
+
"installer": "forge-plugin-install.mjs",
|
|
12
|
+
"providerVersion": "0.2.0",
|
|
13
|
+
"protocolVersion": "1.0",
|
|
14
|
+
"platforms": [
|
|
15
|
+
"darwin"
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"id": "design",
|
|
20
|
+
"name": "Forge Design",
|
|
21
|
+
"version": "0.3.0",
|
|
22
|
+
"description": "Repository-native deterministic design workspace and design.md provider.",
|
|
23
|
+
"repository": "https://github.com/moretea-labs/forge-design.git",
|
|
24
|
+
"ref": "v0.3.0",
|
|
25
|
+
"installer": "forge-plugin-install.mjs",
|
|
26
|
+
"platforms": [
|
|
27
|
+
"darwin",
|
|
28
|
+
"linux",
|
|
29
|
+
"win32"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "personal_knowledge",
|
|
34
|
+
"name": "Personal Knowledge Assistant",
|
|
35
|
+
"version": "0.2.1",
|
|
36
|
+
"description": "Local-first personal knowledge retrieval, memory, safe-write and analysis provider.",
|
|
37
|
+
"repository": "https://github.com/moretea-labs/personal-knowledge-assistant.git",
|
|
38
|
+
"ref": "v0.2.1",
|
|
39
|
+
"installer": "forge-plugin-install.mjs",
|
|
40
|
+
"platforms": [
|
|
41
|
+
"darwin",
|
|
42
|
+
"linux",
|
|
43
|
+
"win32"
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"id": "figma",
|
|
48
|
+
"name": "Forge Figma Bridge",
|
|
49
|
+
"version": "0.3.0",
|
|
50
|
+
"description": "Direct Figma Plugin API bridge for typed canvas inspection, editing and native review capture.",
|
|
51
|
+
"repository": "https://github.com/moretea-labs/forge-figma-bridge.git",
|
|
52
|
+
"ref": "v0.3.0",
|
|
53
|
+
"installer": "forge-plugin-install.mjs",
|
|
54
|
+
"platforms": [
|
|
55
|
+
"darwin"
|
|
56
|
+
]
|
|
57
|
+
}
|
|
7
58
|
]
|
|
8
59
|
}
|
|
@@ -18,7 +18,7 @@ Generated host adapter commands carry a 30 second timeout; long-running work bel
|
|
|
18
18
|
|
|
19
19
|
`UserPromptSubmit.default` dispatches to the active `prompt-guard.sh` resolved by the central-first hook source decision. For ordinary repos that means the packaged/user-level runtime; `.ai/hooks/prompt-guard.sh` is active only when the repo pins `"hook_source": "repo"`. The shell layer parses host prompt JSON, reads workflow files, performs capture side effects, and renders host-safe output; it pipes `{"prompt": ...}` into `forge-hook prompt-guard-decide`, which owns every prompt-text intent classifier (Unicode-aware, in `src/cli/hook/prompt-intents.ts`) plus the intent x state decision table and returns one verdict JSON line (action, intent facts, derived strings). If the engine is unreachable or predates the protocol, the prompt layer degrades to a one-shot advisory instead of guessing; there is no shell fallback decision table.
|
|
20
20
|
|
|
21
|
-
Prompt-layer plan/spec/contract
|
|
21
|
+
Prompt-layer plan/spec/contract signals are advisory context only. `PreToolUse.edit` keeps real path/scope and private-surface safety checks authoritative; Plan/spec lifecycle is never a write-authorization gate. Legacy `.guards.edit_plan_gate=enforce` or `FORGE_EDIT_PLAN_GATE=enforce` is accepted as advisory compatibility, while `off` suppresses the guidance. Done-claim compatibility gates remain separate until goal-acceptance/evidence convergence removes workflow ceremony from completion.
|
|
22
22
|
|
|
23
23
|
If you are asking "which hook file should I edit?", default to `assets/hooks/` for product changes and mirror into `.ai/hooks/` only for this self-host repo or another repo that pins `"hook_source": "repo"`; runtime pickup outside repo-pinned development happens on the next `install`/CLI upgrade because hooks resolve central-first.
|
|
24
24
|
After installing or refreshing `~/.codex/hooks.json`, open Codex Settings and mark the user-level hook config as trusted; otherwise Codex will not execute it.
|
|
@@ -79,11 +79,11 @@ Existing contracts without this block remain valid. `.ai/harness/scripts/verify-
|
|
|
79
79
|
## Review Coupling
|
|
80
80
|
|
|
81
81
|
- A contract is not truly done until the matching review file records a passing recommendation.
|
|
82
|
-
- `tasks/reviews/<plan-stem>.review.md` should be filled from
|
|
82
|
+
- `tasks/reviews/<plan-stem>.review.md` should be filled from Forge `/review` after verification and cite the contract, implementation notes, checks file, run snapshot, `## External Acceptance Advice`, and any manual observations.
|
|
83
83
|
- `tasks/notes/<plan-stem>.notes.md` captures task-local decisions and should be archived or promoted deliberately, not left as hidden long-term memory.
|
|
84
84
|
|
|
85
85
|
## Worktree Lifecycle
|
|
86
86
|
|
|
87
87
|
- When `.ai/harness/policy.json` has `worktree_strategy.auto_for_contract_tasks: true`, `.ai/harness/scripts/plan-to-todo.sh --plan <approved-plan>` starts a linked `codex/<slug>` worktree instead of mutating the primary tree.
|
|
88
88
|
- Execute the sprint in that linked worktree. The primary worktree remains a merge target and must stay clean before merge-back.
|
|
89
|
-
- After implementation, run
|
|
89
|
+
- After implementation, run Forge `/review` so the review file recommends pass, record passing `## External Acceptance Advice` from the peer reviewer or a concrete manual override, then run `.ai/harness/scripts/contract-worktree.sh finish`. The finish command gates on external acceptance before `verify-sprint.sh`, commits the branch, and fast-forwards the target branch only when the target worktree is clean.
|
|
@@ -916,8 +916,8 @@ ARCHITECTURE_INDEX_EOF
|
|
|
916
916
|
},
|
|
917
917
|
"guards": {
|
|
918
918
|
"edit_plan_gate": "advice",
|
|
919
|
-
"edit_plan_gate_modes": ["
|
|
920
|
-
"rule": "pre-edit-guard
|
|
919
|
+
"edit_plan_gate_modes": ["advice", "off"],
|
|
920
|
+
"rule": "pre-edit-guard may expose Plan/spec context, but Plan lifecycle never authorizes implementation; only real safety/resource boundaries block execution"
|
|
921
921
|
},
|
|
922
922
|
"sidecar_research": {
|
|
923
923
|
"default": true,
|
|
@@ -21,11 +21,11 @@ Usage:
|
|
|
21
21
|
|
|
22
22
|
Program-level sprint backlog helper. PRDs live in plans/prds/ as the upper
|
|
23
23
|
planning layer; sprints live in plans/sprints/ as ordered execution backlogs.
|
|
24
|
-
Each backlog row is expanded with
|
|
24
|
+
Each backlog row is expanded with /plan before the existing plan -> contract
|
|
25
25
|
-> worktree flow. tasks/todos.md stays the deferred-goal ledger.
|
|
26
26
|
|
|
27
27
|
start-task reserves the next (or named) pending backlog row and can capture a
|
|
28
|
-
thin plan seed. The coding agent must still use
|
|
28
|
+
thin plan seed. The coding agent must still use `/plan` to expand the row into
|
|
29
29
|
a decision-complete plan before code edits.
|
|
30
30
|
--sprint overrides the active-sprint marker (still confined to the sprints
|
|
31
31
|
dir), which finish back-fill uses inside worktrees where the runtime marker
|
|
@@ -218,7 +218,7 @@ render_sprint_file() {
|
|
|
218
218
|
|
|
219
219
|
Program-level sprint container. The Source PRD summary and ordered backlog
|
|
220
220
|
decompose product intent into task-contract slices; each backlog row is a
|
|
221
|
-
long-task waypoint that must be expanded with
|
|
221
|
+
long-task waypoint that must be expanded with `/plan` before code edits.
|
|
222
222
|
`tasks/todos.md` stays the deferred-goal ledger and never carries this backlog.
|
|
223
223
|
|
|
224
224
|
## PRD
|
|
@@ -740,12 +740,12 @@ Deliver backlog task \`${target_task}\` so that the acceptance line holds: ${tar
|
|
|
740
740
|
|
|
741
741
|
## Planning Expansion
|
|
742
742
|
|
|
743
|
-
Before editing code, use
|
|
743
|
+
Before editing code, use \`/plan\` to expand this sprint row into a decision-complete implementation plan. The \`/plan\` pass should read the sprint file, preserve the acceptance line, name concrete files or commands, and produce the detailed \`plans/plan-*.md\` body that drives contract execution.
|
|
744
744
|
|
|
745
745
|
## Task Breakdown
|
|
746
746
|
|
|
747
|
-
- [ ] Run
|
|
748
|
-
- [ ] Capture the approved
|
|
747
|
+
- [ ] Run \`/plan\` for backlog task \`${target_task}\` using sprint \`${sprint_file}\` and acceptance: ${target_acceptance}
|
|
748
|
+
- [ ] Capture the approved \`/plan\` output with \`scripts/capture-plan.sh --source forge-plan --source-ref sprint:${sprint_file}#${target_task}\`
|
|
749
749
|
- [ ] Verify acceptance: ${target_acceptance}
|
|
750
750
|
BODY_EOF
|
|
751
751
|
|
|
@@ -160,11 +160,17 @@ Deterministic rules are preferred for:
|
|
|
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
162
|
|
|
163
|
+
Work-bound continuation is one Schedule subtype, not the universal Schedule model. Long-lived policy belongs to the Schedule; one firing belongs to the terminal Occurrence; a Work remains a finite objective. Generic Schedules may therefore finish with `nothing_to_do`, run an explicitly allowlisted deterministic operation/check, or wake an existing finite Work. If an external Controller observes a genuinely new semantic objective, that later request returns through the normal Route Policy and Work admission path rather than turning the Schedule itself into a forever-running Work.
|
|
164
|
+
|
|
165
|
+
For external systems that do not expose a reliable event API, a Work-bound Schedule may instead use the deterministic `browser_probe` operation. The Kernel may navigate or reload one allowed browser target, extract bounded text, normalize a caller-selected projection, compute a stable fingerprint, compare it with the previous persisted observation, and detect explicitly configured login markers. It must not classify the business meaning of the page. The first observation is a silent baseline by default, unchanged observations are `nothing_to_do`, and only a changed observation (or an explicit authentication-required condition) may wake the bound external Controller.
|
|
166
|
+
|
|
163
167
|
`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
168
|
|
|
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
|
|
169
|
+
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 one of three bounded modes: `continuation` (`external_controller_wake`), `browser_watch` (`browser_probe` with change-triggered wake), or `browser_keepalive` (`browser_probe` without content-change 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.
|
|
170
|
+
|
|
171
|
+
A Work-bound Schedule is acceptance-driven, not perpetual. Before every wake **or browser probe**, 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` before touching the external browser target. An active Controller lease also suppresses a competing wake. Therefore recurring triggers are only observation/continuation policy for unfinished bounded Work, never a forever-running agent.
|
|
166
172
|
|
|
167
|
-
|
|
173
|
+
`browser_watch` persists only normalized observation metadata (fingerprint, observation time/status, and bounded diagnostics), not the extracted page body as Schedule state. Callers may provide `include_terms` and `ignore_patterns` to exclude unrelated or volatile text such as relative timestamps. `browser_keepalive` refreshes the configured browser session and checks explicit login URL/text markers; it can wake ChatGPT when re-authentication is required, but a successful refresh is not treated as a guarantee that a third-party session can never expire.
|
|
168
174
|
|
|
169
175
|
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
176
|
|
|
@@ -434,7 +440,7 @@ The purpose is to remove unhelpful automation, not merely prove it is active.
|
|
|
434
440
|
|
|
435
441
|
The runtime implements first-class `RepositorySchedule`, `ScheduleDecision` and `ScheduleOccurrence` records under `src/runtime/workflow/schedules/`. Supported triggers are interval, manual, five-field UTC cron, one-shot calendar timestamp, condition watch, repository event and dependency checkpoint.
|
|
436
442
|
|
|
437
|
-
Every due trigger uses a deterministic window or event identity. The Decision is persisted before executable work is admitted. Occurrences are indexed, Shadow Mode defaults on, one Occurrence creates at most one durable Job, and repeated trigger delivery returns the existing Occurrence.
|
|
443
|
+
Every due trigger uses a deterministic window or event identity. The Decision is persisted before executable work is admitted. Occurrences are indexed, Shadow Mode defaults on, one Occurrence creates at most one durable Job, and repeated trigger delivery returns the existing Occurrence. Work-bound continuation/browser-watch helpers remain specialized views over this same Schedule/Occurrence engine rather than a second Workflow lifecycle.
|
|
438
444
|
|
|
439
445
|
Budgets, cooldown, maximum active Occurrences, consecutive-failure circuit breaking and exponential backoff are persisted. Dirty Workspaces, release barriers, repository disablement, human-attention state and recent external/infrastructure failures suppress unattended writes. Candidate Findings deduplicate observations and require explicit human promotion before Issue creation.
|
|
440
446
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# CodeGraph Context Provider
|
|
2
2
|
|
|
3
|
-
Status:
|
|
3
|
+
Status: **Runtime Authority — impact-context convergence implemented**
|
|
4
4
|
Source baseline: `a49465096c4e2532da37ab2f9d10dca2238217ac`
|
|
5
5
|
Scope: Controller Context Plane only
|
|
6
6
|
|
|
@@ -99,12 +99,14 @@ Default is `off` to preserve current Direct performance and behavior.
|
|
|
99
99
|
|
|
100
100
|
Expected mode usage:
|
|
101
101
|
|
|
102
|
-
- ordinary Direct: `off`
|
|
102
|
+
- ordinary Direct: `off` (zero CodeGraph provider calls)
|
|
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
|
-
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.
|
|
107
|
+
When enabled, graph results augment candidate ranking and the bounded impact contract. They do not replace raw source reads. Important files selected through CodeGraph still pass through `resolveMcpPath` and `readRepositoryRange` before implementation.
|
|
108
|
+
|
|
109
|
+
After the initial structural `context` query, the Context Plane may issue bounded `file_dependencies` queries for a small number of entry-point files. Dependencies and dependents are folded into the same policy-filtered Context Pack; they are not exposed as another ChatGPT tool flow. The pack derives an `impactContext` containing primary targets, must-inspect and likely-affected files, related tests/checks, architecture contracts, coverage gaps, freshness, and confidence. These remain discovery evidence: ChatGPT is still the semantic-sufficiency authority.
|
|
108
110
|
|
|
109
111
|
Context Pack gains a bounded `structuralContext` section containing:
|
|
110
112
|
|
|
@@ -138,6 +140,16 @@ If the provider reports changed files, stale extraction, or an index built by an
|
|
|
138
140
|
|
|
139
141
|
A later typed maintenance action may perform refresh. That action is separate from planning and may write only derived `.codegraph` state, never source files.
|
|
140
142
|
|
|
143
|
+
### Isolated checkout baseline overlay
|
|
144
|
+
|
|
145
|
+
CodeGraph binds source root and `.codegraph` database root to the same `projectRoot`; the embedded API does not expose a separate read-only database path. Forge therefore does **not** copy or synchronously build an 84MB-class structural index for every managed worktree.
|
|
146
|
+
|
|
147
|
+
When structural context is requested for an isolated checkout that has no local index, the Context Plane may reuse an indexed non-worktree checkout from the same Repository Registry family as **repository-baseline structural evidence**. Current-checkout lexical/raw source remains authoritative. Forge overlays the selected checkout's current Git-changed paths on the graph candidates and reports `indexSource=repository_baseline` plus explicit coverage gaps.
|
|
148
|
+
|
|
149
|
+
The baseline is never presented as current-checkout truth. A dirty current checkout or a baseline/current HEAD mismatch marks the structural evidence stale and prevents `structural_context=required` from being satisfied. Optional structural requests may still use the graph as bounded discovery evidence while raw current-checkout reads cover changed files.
|
|
150
|
+
|
|
151
|
+
This fallback executes only when structural context was already requested. Ordinary Direct routing remains `structural_context=off`, performs zero CodeGraph provider calls, and pays no baseline lookup or structural refresh cost.
|
|
152
|
+
|
|
141
153
|
## Packaging and platform behavior
|
|
142
154
|
|
|
143
155
|
The provider locates the matching optional platform package:
|
|
@@ -10,7 +10,9 @@ The Controller owns dispatch decisions. Workers and Agents execute scoped contra
|
|
|
10
10
|
|
|
11
11
|
## 2. Work Assessment
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
The Controller commits an execution mode only after it has enough evidence to do so. An already-explicit bounded request may commit immediately; an ambiguous or architectural request starts with read-only exploration and is assessed only after that context is available. Forge does not create a Plan/Work merely to perform this exploration.
|
|
14
|
+
|
|
15
|
+
When an execution commitment is needed, the Controller assesses:
|
|
14
16
|
|
|
15
17
|
```text
|
|
16
18
|
objective clarity
|
|
@@ -39,7 +41,21 @@ verificationClass
|
|
|
39
41
|
humanBoundary
|
|
40
42
|
```
|
|
41
43
|
|
|
42
|
-
Repository search
|
|
44
|
+
Repository search, CodeGraph impact analysis, Runtime state reads, and history/evidence lookup are information-gathering steps. They are not by themselves reasons to start an Agent, create Work, or create a Plan. ChatGPT/human Controller owns semantic sufficiency and the Direct/Work/Plan choice; Forge Route/Hook compatibility code may supply mechanics, safety facts, or advice but MUST NOT become a second semantic decision authority.
|
|
45
|
+
|
|
46
|
+
### 2.1 Orthogonal routing dimensions
|
|
47
|
+
|
|
48
|
+
Forge keeps three decisions separate:
|
|
49
|
+
|
|
50
|
+
```text
|
|
51
|
+
semantic ownership = unbound | continue/extend an explicit Work | Plan/Requirement binding
|
|
52
|
+
execution depth = Direct | Process | Durable Work | Handoff
|
|
53
|
+
resource placement = visible checkout | isolated Worktree | external provider resource
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
`RouteDecision` is the sole authority for execution depth. An unrelated active Work, an existing Plan, or a checkout writer MUST NOT reinterpret an already-safe Direct operation as Durable Work. Explicit Work ownership may be attached to a Direct Edit or Process for attribution/evidence without changing its execution depth. A real checkout writer conflict changes placement or waits for a resource; it does not manufacture a semantic `parallel`/`new_goal` relation.
|
|
57
|
+
|
|
58
|
+
When `rh_work start` actually creates a Durable repository Work, the facade materializes the same-ID execution `WorkHandle` for the selected checkout/worktree and atomically claims that new Work for the authenticated initiating Controller. `work_prepare` remains a lower-level execution/compatibility primitive; a normal new Work does not require a second mechanical prepare/claim round trip before useful execution can begin.
|
|
43
59
|
|
|
44
60
|
## 3. Execution Modes
|
|
45
61
|
|
|
@@ -88,7 +104,7 @@ Quick Agent work may carry ephemeral diagnostic metadata, but Job and Run eviden
|
|
|
88
104
|
|
|
89
105
|
### 3.3 Requirement, Plan, and Work
|
|
90
106
|
|
|
91
|
-
|
|
107
|
+
Requirement, Plan, Work, and Workflow are independent durable tools rather than a mandatory graph. The Controller introduces only the minimum durable object justified by the task. A finite Work is useful when one bounded responsibility needs cross-session recovery/ownership; a Plan is useful for real staged/dependency coordination; a Requirement represents longer-lived intent; Workflow/Schedule represents recurrence. Durable state is commonly justified by one or more of:
|
|
92
108
|
|
|
93
109
|
- multiple independently verifiable objectives;
|
|
94
110
|
- dependencies or ordered migration phases;
|
|
@@ -97,25 +113,26 @@ A durable Requirement/Plan/Work graph is required when work has one or more of:
|
|
|
97
113
|
- protected or release-sensitive surfaces;
|
|
98
114
|
- cross-repository work;
|
|
99
115
|
- long-running verification or environment dependencies;
|
|
100
|
-
- schedule-driven recurrence;
|
|
101
116
|
- a need for review and recovery across multiple sessions;
|
|
102
117
|
- release or rollout coordination.
|
|
103
118
|
|
|
104
|
-
A durable Work contract is not ceremony.
|
|
119
|
+
A durable Work contract is optional, not ceremony and not a universal task wrapper. When explicitly chosen it owns a bounded recoverable responsibility and its execution attribution; Process/ExecutionJob/EditSession remain the technical execution truth. Requirement owns longer-lived user intent; ChatGPT/user review owns semantic acceptance. A Schedule/Occurrence does not require Work unless a particular occurrence needs durable responsibility.
|
|
105
120
|
|
|
106
121
|
## 4. Decision Order
|
|
107
122
|
|
|
108
|
-
The Controller
|
|
123
|
+
The Controller follows a late-commit order rather than classifying every request at ingress:
|
|
109
124
|
|
|
110
125
|
```text
|
|
111
|
-
1. Is the request
|
|
112
|
-
2.
|
|
113
|
-
3.
|
|
114
|
-
4. Does
|
|
115
|
-
5. Does
|
|
116
|
-
6.
|
|
126
|
+
1. Is the request already explicit and bounded enough to act safely?
|
|
127
|
+
2. If not, gather the minimum read-only context first.
|
|
128
|
+
3. After context is sufficient, can Direct/Process satisfy it?
|
|
129
|
+
4. Does this bounded responsibility genuinely need durable Work recovery/ownership?
|
|
130
|
+
5. Does coordination genuinely need a Plan, or recurrence a Workflow/Schedule?
|
|
131
|
+
6. Independently, do hard authorization/resource/destructive boundaries constrain execution?
|
|
117
132
|
```
|
|
118
133
|
|
|
134
|
+
Steps 1-5 are semantic Controller decisions. Step 6 and execution mechanics are Forge authority. A later hard-safety rejection may stop an unsafe action, but Forge must not force an A→B execution-mode switch merely because a Plan/Work artifact is absent.
|
|
135
|
+
|
|
119
136
|
The system MUST NOT default to Agent execution merely because an Agent is available.
|
|
120
137
|
|
|
121
138
|
## 5. Agent Roles
|
|
@@ -315,6 +332,8 @@ Use when:
|
|
|
315
332
|
|
|
316
333
|
The default `auto` placement policy chooses Workspace for one local serial writer and Worktree when concurrency exists. It MUST still honor explicit claims and dirty-state safety.
|
|
317
334
|
|
|
335
|
+
Placement is evaluated after execution depth and semantic ownership. A new durable objective may therefore create a new finite Work and select a Worktree purely because the visible checkout already has a writer; the caller does not need to classify that resource conflict as a semantic `parallel` relation first. Only a managed Worktree/branch is a disposable Work-owned resource: stopping a Work on the current checkout closes lifecycle/process ownership but never removes the repository's current checkout or branch.
|
|
336
|
+
|
|
318
337
|
## 11. Review and Continuation
|
|
319
338
|
|
|
320
339
|
After execution:
|
|
@@ -347,7 +366,7 @@ The dispatch layer MUST avoid:
|
|
|
347
366
|
|
|
348
367
|
## 13. Current Implementation
|
|
349
368
|
|
|
350
|
-
The repository implements Direct Edit,
|
|
369
|
+
The repository implements one canonical Route Policy for execution depth, Direct Edit, Process Runtime, finite Requirement/Work execution, optional Plan decomposition, runtime Agent selection, bounded Task scope, persistent Runs, Workspace/Worktree placement, and risk-adaptive verification.
|
|
351
370
|
|
|
352
371
|
The Thin Gateway keeps deterministic local commands on Direct Edit or Process Runtime paths. Agent dispatch is now an explicit external-Controller handoff; the Kernel no longer creates Execution Jobs for ordinary Agent launches. Work ownership, repository placement, and resource claims remain durable Controller state, while provider selection and model execution belong to the claimed external Controller.
|
|
353
372
|
|