@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
|
@@ -172,85 +172,16 @@ esac
|
|
|
172
172
|
|
|
173
173
|
active_plan="$(get_active_plan || true)"
|
|
174
174
|
if [[ "$FILE_PATH" == "tasks/todos.md" && -z "$active_plan" ]] && grep -Eq '^> \*\*Status\*\*:[[:space:]]*Backlog[[:space:]]*$' tasks/todos.md; then
|
|
175
|
-
rm -f "$(workflow_task_state_file)"
|
|
176
|
-
echo "[
|
|
175
|
+
rm -f "$(workflow_task_state_file)"
|
|
176
|
+
echo "[SessionContinuation] Deferred-goal ledger updated; no active execution state was created."
|
|
177
177
|
exit 0
|
|
178
178
|
fi
|
|
179
179
|
|
|
180
|
-
mkdir -p .claude
|
|
181
|
-
|
|
182
|
-
STATE_FILE="$(workflow_task_state_file)"
|
|
183
|
-
HANDOFF_FILE=".claude/.task-handoff.md"
|
|
184
|
-
|
|
185
180
|
if [[ "$FILE_PATH" == "tasks/todos.md" ]] && [[ -f "tasks/todos.md" ]] && ! grep -Eq '^> \*\*Status\*\*:[[:space:]]*Backlog[[:space:]]*$' tasks/todos.md; then
|
|
186
|
-
workflow_sync_task_state_from_todo "tasks/todos.md" "$
|
|
187
|
-
fi
|
|
188
|
-
|
|
189
|
-
task_state="$(workflow_plan_task_state "$active_plan")"
|
|
190
|
-
IFS=$'\t' read -r total_tasks done_tasks next_pending <<< "$task_state"
|
|
191
|
-
done_tasks="${done_tasks:-0}"
|
|
192
|
-
total_tasks="${total_tasks:-0}"
|
|
193
|
-
next_pending="${next_pending:-"(none)"}"
|
|
194
|
-
|
|
195
|
-
next_action="$(workflow_next_action)"
|
|
196
|
-
next_stage="$(printf '%s\n' "$next_action" | cut -f1)"
|
|
197
|
-
next_command="$(printf '%s\n' "$next_action" | cut -f2)"
|
|
198
|
-
next_message="$(printf '%s\n' "$next_action" | cut -f3-)"
|
|
199
|
-
[[ "${next_command:-}" == "-" ]] && next_command=""
|
|
200
|
-
next_stage="${next_stage:-none}"
|
|
201
|
-
next_message="${next_message:-(none)}"
|
|
202
|
-
|
|
203
|
-
diff_stat="$(git diff --shortstat HEAD 2>/dev/null | tr -d '\n')"
|
|
204
|
-
diff_stat="${diff_stat:-no uncommitted diff against HEAD}"
|
|
205
|
-
|
|
206
|
-
if [[ -z "$active_plan" ]]; then
|
|
207
|
-
active_plan="(none)"
|
|
208
|
-
fi
|
|
209
|
-
|
|
210
|
-
plan_status="(unknown)"
|
|
211
|
-
if [[ "$active_plan" != "(none)" && -f "$active_plan" ]]; then
|
|
212
|
-
plan_status="$(awk '/^\> \*\*Status\*\*:/ {sub(/^.*\> \*\*Status\*\*: */, ""); gsub(/\r/, ""); print; exit}' "$active_plan" | xargs)"
|
|
213
|
-
plan_status="${plan_status:-(unknown)}"
|
|
181
|
+
workflow_sync_task_state_from_todo "tasks/todos.md" "$(workflow_task_state_file)"
|
|
214
182
|
fi
|
|
215
183
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
cat > "$HANDOFF_FILE" <<EOF_HANDOFF
|
|
220
|
-
# Task Handoff Summary
|
|
221
|
-
|
|
222
|
-
> **Generated**: $(date '+%Y-%m-%d %H:%M:%S')
|
|
223
|
-
> **Progress**: ${done_tasks}/${total_tasks}
|
|
224
|
-
> **Active Plan**: ${active_plan}
|
|
225
|
-
|
|
226
|
-
## Plan Status
|
|
227
|
-
|
|
228
|
-
- ${plan_status}
|
|
229
|
-
|
|
230
|
-
## Current Task
|
|
231
|
-
|
|
232
|
-
- ${next_pending}
|
|
233
|
-
|
|
234
|
-
## Next Actions
|
|
235
|
-
|
|
236
|
-
- Stage: ${next_stage}
|
|
237
|
-
- Action: ${next_message}
|
|
238
|
-
- Command: ${next_command:-(none)}
|
|
239
|
-
|
|
240
|
-
## Key Artifacts
|
|
241
|
-
|
|
242
|
-
\`\`\`
|
|
243
|
-
${changed_files}
|
|
244
|
-
\`\`\`
|
|
245
|
-
|
|
246
|
-
## Working Tree Snapshot
|
|
247
|
-
|
|
248
|
-
- ${diff_stat}
|
|
249
|
-
EOF_HANDOFF
|
|
250
|
-
|
|
251
|
-
echo "[TaskHandoff] Workflow next action is ${next_stage}. Wrote ${HANDOFF_FILE}."
|
|
252
|
-
|
|
253
|
-
workflow_write_handoff "task-progress" || true
|
|
254
|
-
if [[ -f "$(workflow_handoff_file)" ]]; then
|
|
255
|
-
echo "[HarnessHandoff] Refreshed $(workflow_handoff_file)."
|
|
184
|
+
workflow_write_session_continuation "task-progress" || true
|
|
185
|
+
if [[ -f "$(workflow_session_continuation_file)" ]]; then
|
|
186
|
+
echo "[SessionContinuation] Refreshed non-authoritative session cache $(workflow_session_continuation_file)."
|
|
256
187
|
fi
|
|
@@ -557,11 +557,24 @@ emit_agentic_packaging_hint() {
|
|
|
557
557
|
}
|
|
558
558
|
|
|
559
559
|
resolve_codegraph_bin() {
|
|
560
|
+
local common_git_dir canonical_root candidate
|
|
560
561
|
if [[ -x "node_modules/.bin/codegraph" ]]; then
|
|
561
562
|
printf '%s\n' "node_modules/.bin/codegraph"
|
|
562
563
|
return 0
|
|
563
564
|
fi
|
|
564
565
|
|
|
566
|
+
# Linked worktrees normally reuse the canonical checkout's dependency tree.
|
|
567
|
+
# Resolve it before falling back to a user-global CodeGraph installation.
|
|
568
|
+
common_git_dir="$(git rev-parse --path-format=absolute --git-common-dir 2>/dev/null || true)"
|
|
569
|
+
if [[ -n "$common_git_dir" ]]; then
|
|
570
|
+
canonical_root="$(dirname "$common_git_dir")"
|
|
571
|
+
candidate="$canonical_root/node_modules/.bin/codegraph"
|
|
572
|
+
if [[ -x "$candidate" ]]; then
|
|
573
|
+
printf '%s\n' "$candidate"
|
|
574
|
+
return 0
|
|
575
|
+
fi
|
|
576
|
+
fi
|
|
577
|
+
|
|
565
578
|
command -v codegraph 2>/dev/null || return 1
|
|
566
579
|
}
|
|
567
580
|
|
|
@@ -625,25 +638,24 @@ emit_codegraph_route_hint() {
|
|
|
625
638
|
fi
|
|
626
639
|
}
|
|
627
640
|
|
|
628
|
-
|
|
641
|
+
emit_forge_route_hint() {
|
|
629
642
|
if pg_fact AGENTIC_PACKAGING; then
|
|
630
643
|
return
|
|
631
644
|
fi
|
|
632
645
|
|
|
633
646
|
if pg_fact THINK_PLAN_START; then
|
|
634
|
-
echo "[
|
|
647
|
+
echo "[ForgeRoute] Planning intent detected. Use /plan for plan-only work; optional external skills may refine the plan when installed."
|
|
635
648
|
return
|
|
636
649
|
fi
|
|
637
650
|
|
|
638
|
-
# /health
|
|
639
|
-
# condition lives in the TypeScript classifier); reviews fall to /check.
|
|
651
|
+
# Workflow/tooling health problems route through Forge /debug; reviews route through /review.
|
|
640
652
|
if pg_fact HEALTH_ROUTE; then
|
|
641
|
-
echo "[
|
|
653
|
+
echo "[ForgeRoute] Agent workflow/tooling issue detected. Use /debug to diagnose before mutation."
|
|
642
654
|
return
|
|
643
655
|
fi
|
|
644
656
|
|
|
645
657
|
if pg_fact REVIEW_RELEASE; then
|
|
646
|
-
echo "[
|
|
658
|
+
echo "[ForgeRoute] Review/release intent detected. Use /review first; use /release only after review evidence is clear."
|
|
647
659
|
emit_external_acceptance_prompt review
|
|
648
660
|
emit_cross_review_hint merge
|
|
649
661
|
fi
|
|
@@ -689,7 +701,7 @@ emit_external_acceptance_prompt() {
|
|
|
689
701
|
review_file="$(workflow_active_review || true)"
|
|
690
702
|
checks_file="$(workflow_checks_file)"
|
|
691
703
|
|
|
692
|
-
echo "[ExternalAcceptance] Review/release intent detected. Start peer acceptance in parallel with local /
|
|
704
|
+
echo "[ExternalAcceptance] Review/release intent detected. Start peer acceptance in parallel with local /review and focused checks."
|
|
693
705
|
echo "[ExternalAcceptance] Mode: $mode"
|
|
694
706
|
echo "[ExternalAcceptance] Current active plan: ${active_plan_local:-"(none)"}"
|
|
695
707
|
echo "[ExternalAcceptance] Current contract: ${contract_file_local:-"(none)"}"
|
|
@@ -699,7 +711,7 @@ emit_external_acceptance_prompt() {
|
|
|
699
711
|
echo "[ExternalAcceptance] Diff scope for peer: branch diff against target, staged diff, unstaged diff, and untracked files."
|
|
700
712
|
cat <<EOF_EXTERNAL_ACCEPTANCE
|
|
701
713
|
[ExternalAcceptance] Prompt to send with $command:
|
|
702
|
-
Review the current sprint for acceptance only. Do not run /
|
|
714
|
+
Review the current sprint for acceptance only. Do not run Forge /review or local checks. Do not edit files. Do not write files. Inspect the diff scope, contract, review evidence, and checks evidence, then return only a Markdown block that can be pasted into ${review_file:-tasks/reviews/<slug>.review.md}.
|
|
703
715
|
|
|
704
716
|
## External Acceptance Advice
|
|
705
717
|
> **External Acceptance**: pass
|
|
@@ -752,7 +764,7 @@ render_prompt_guard_action() {
|
|
|
752
764
|
echo "[PlanCaptureGate] Approval detected before an active plan artifact exists."
|
|
753
765
|
echo "[PlanCaptureGate] Let the agent run the approved-plan capture path now:"
|
|
754
766
|
echo " git status --short --branch -uall"
|
|
755
|
-
echo " printf '%s\n' '<approved plan body>' | bash scripts/capture-plan.sh --slug <slug> --title <title> --status Approved --source
|
|
767
|
+
echo " printf '%s\n' '<approved plan body>' | bash scripts/capture-plan.sh --slug <slug> --title <title> --status Approved --source forge-plan --route planning --execute"
|
|
756
768
|
exit 0
|
|
757
769
|
;;
|
|
758
770
|
plan_status_no_active_block)
|
|
@@ -880,7 +892,7 @@ if [[ "$PG_ENGINE_STATE" != "ok" ]]; then
|
|
|
880
892
|
fi
|
|
881
893
|
|
|
882
894
|
emit_agentic_packaging_hint
|
|
883
|
-
|
|
895
|
+
emit_forge_route_hint
|
|
884
896
|
emit_codegraph_route_hint
|
|
885
897
|
emit_pending_orchestration_discussion
|
|
886
898
|
|
|
@@ -956,7 +968,7 @@ if [ "$done_intent" -eq 1 ]; then
|
|
|
956
968
|
hook_structured_error \
|
|
957
969
|
"ReviewGuard" \
|
|
958
970
|
"Done intent detected without a sprint review artifact." \
|
|
959
|
-
"Run
|
|
971
|
+
"Run Forge /review after verification and record the evaluator recommendation in tasks/reviews/<slug>.review.md before marking work done." \
|
|
960
972
|
"quality_gate"
|
|
961
973
|
exit 2
|
|
962
974
|
fi
|
|
@@ -966,7 +978,7 @@ if [ "$done_intent" -eq 1 ]; then
|
|
|
966
978
|
hook_structured_error \
|
|
967
979
|
"ReviewGuard" \
|
|
968
980
|
"Sprint review is missing a passing recommendation." \
|
|
969
|
-
"Run
|
|
981
|
+
"Run Forge /review with fresh verification evidence and record a pass recommendation before marking work done." \
|
|
970
982
|
"quality_gate"
|
|
971
983
|
exit 2
|
|
972
984
|
fi
|
|
@@ -56,18 +56,18 @@ file_mtime() {
|
|
|
56
56
|
stat -c '%Y' "$file" 2>/dev/null
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
local
|
|
59
|
+
resume_current_for_continuation() {
|
|
60
|
+
local continuation_file resume_mtime continuation_mtime
|
|
61
61
|
resume_available || return 1
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
[[ -f "$
|
|
63
|
+
continuation_file="$(workflow_session_continuation_file)"
|
|
64
|
+
[[ -f "$continuation_file" ]] || return 0
|
|
65
65
|
|
|
66
66
|
resume_mtime="$(file_mtime "$resume_file" || true)"
|
|
67
|
-
|
|
68
|
-
[[ -n "$resume_mtime" && -n "$
|
|
67
|
+
continuation_mtime="$(file_mtime "$continuation_file" || true)"
|
|
68
|
+
[[ -n "$resume_mtime" && -n "$continuation_mtime" ]] || return 0
|
|
69
69
|
|
|
70
|
-
[[ "$resume_mtime" -ge "$
|
|
70
|
+
[[ "$resume_mtime" -ge "$continuation_mtime" ]]
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
active_plan_exists() {
|
|
@@ -246,11 +246,11 @@ tooling_update_advisory_context() {
|
|
|
246
246
|
fi
|
|
247
247
|
}
|
|
248
248
|
|
|
249
|
-
|
|
249
|
+
continuation_section_has_signal() {
|
|
250
250
|
local header="$1"
|
|
251
|
-
local
|
|
252
|
-
|
|
253
|
-
[[ -f "$
|
|
251
|
+
local continuation_file
|
|
252
|
+
continuation_file="$(workflow_session_continuation_file)"
|
|
253
|
+
[[ -f "$continuation_file" ]] || return 1
|
|
254
254
|
|
|
255
255
|
awk -v header="$header" '
|
|
256
256
|
$0 == header { in_section = 1; next }
|
|
@@ -265,7 +265,7 @@ handoff_section_has_signal() {
|
|
|
265
265
|
found = 1
|
|
266
266
|
}
|
|
267
267
|
END { exit found ? 0 : 1 }
|
|
268
|
-
' "$
|
|
268
|
+
' "$continuation_file"
|
|
269
269
|
}
|
|
270
270
|
|
|
271
271
|
capability_context_pending() {
|
|
@@ -489,8 +489,8 @@ active_sprint_context() {
|
|
|
489
489
|
|
|
490
490
|
- Sprint: \`${sprint_file}\` status=${status:-unknown} backlog=${progress}
|
|
491
491
|
- Next sprint task: ${next_task}
|
|
492
|
-
- Rule: a Sprint is a long-task container. Use
|
|
493
|
-
- Entrypoint: inspect with \`${sprint_script} next\`; after
|
|
492
|
+
- Rule: a Sprint is a long-task container. Use \`/plan\` to expand the next sprint task into a detailed \`plans/plan-*.md\`, then run the existing plan -> contract -> worktree flow. \`tasks/todos.md\` stays the deferred-goal ledger.
|
|
493
|
+
- Entrypoint: inspect with \`${sprint_script} next\`; after \`/plan\` produces an approved plan, capture it with \`${capture_script} --source forge-plan --source-ref sprint:${sprint_file}#${next_task}\`.
|
|
494
494
|
EOF_CONTEXT
|
|
495
495
|
}
|
|
496
496
|
|
|
@@ -503,11 +503,11 @@ EOF_CONTEXT
|
|
|
503
503
|
}
|
|
504
504
|
|
|
505
505
|
context=""
|
|
506
|
-
if
|
|
506
|
+
if resume_current_for_continuation; then
|
|
507
507
|
if active_plan_exists \
|
|
508
508
|
|| active_todo_exists \
|
|
509
|
-
||
|
|
510
|
-
||
|
|
509
|
+
|| continuation_section_has_signal "## Blockers" \
|
|
510
|
+
|| continuation_section_has_signal "## Changed Files"; then
|
|
511
511
|
context="$(awk 'length(total) < 12000 { total = total $0 "\n" } END { printf "%s", total }' "$resume_file")"
|
|
512
512
|
fi
|
|
513
513
|
fi
|
|
@@ -132,8 +132,8 @@ emit_stop_block_json() {
|
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
refresh_handoff() {
|
|
135
|
-
|
|
136
|
-
echo "[
|
|
135
|
+
workflow_write_session_continuation "session-stop"
|
|
136
|
+
echo "[SessionContinuation] Refreshed $(workflow_session_continuation_file)." >&2
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
should_run_plan_completeness_gate() {
|
|
@@ -40,17 +40,17 @@
|
|
|
40
40
|
- Commit explicitly after green checks; no automatic checkpoint hook in the shared preset.
|
|
41
41
|
- Keep stable product truth in `docs/spec.md`.
|
|
42
42
|
- Keep sprint done definitions in `tasks/contracts/`, `tasks/reviews/`, and task-local implementation notes in `tasks/notes/`.
|
|
43
|
-
- Keep resumable state in `.ai/harness/
|
|
43
|
+
- Keep resumable state in `.ai/harness/session/continuation.md`.
|
|
44
44
|
- Treat `_ref/` as an occasional ignored external reference checkout cache; read or refresh it for comparison, but keep it out of commits and cite repo+commit/tag+path in `tasks/notes/` or `docs/researches/` when it influences a decision.
|
|
45
45
|
- Treat `deploy/` as the trackable deployment and operations surface for runbooks, submission materials, release checklists, helper scripts, ordered SQL files under `deploy/sql/`, and env examples.
|
|
46
46
|
- Treat `_ops/` as ignored local operations state for secrets, real env files, provider state, artifacts, logs, and scratch files; do not commit or agent-edit `_ops/*`.
|
|
47
|
-
- Treat contract-level execution as worktree-first: `.ai/harness/scripts/plan-to-todo.sh --plan <approved-plan>` starts a linked `codex/<slug>` worktree when policy enables it, and `.ai/harness/scripts/contract-worktree.sh finish` merges back only after
|
|
48
|
-
- Capture decision-complete Codex Plan mode,
|
|
49
|
-
- Route product discovery to gstack `office-hours`, complex engineering plans to gstack `plan-eng-review`, design plans to gstack `plan-design-review`, and daily small/medium planning, bug hunts, and checks to
|
|
47
|
+
- Treat contract-level execution as worktree-first: `.ai/harness/scripts/plan-to-todo.sh --plan <approved-plan>` starts a linked `codex/<slug>` worktree when policy enables it, and `.ai/harness/scripts/contract-worktree.sh finish` merges back only after Forge `/review` and sprint verification pass.
|
|
48
|
+
- Capture decision-complete Codex Plan mode, Forge `/plan`, or `forge-plan` outputs with `.ai/harness/scripts/capture-plan.sh --slug <slug> --title <title>` so planning becomes a `plans/` artifact before implementation.
|
|
49
|
+
- Route product discovery to gstack `office-hours`, complex engineering plans to gstack `plan-eng-review`, design plans to gstack `plan-design-review`, and daily small/medium planning, bug hunts, and checks to Forge `/plan`, `/hunt`, and `/check`.
|
|
50
50
|
- Route knowledge sync and handoff retrieval to `gbrain`.
|
|
51
51
|
- Register valuable repo-authored docs in `.ai/harness/brain-manifest.json` with `sync.direction=repo-to-brain`; `.ai/harness/scripts/sync-brain-docs.sh` and the PostEdit hook mirror only those explicit entries into the default brain vault.
|
|
52
52
|
- Codex automation profile is runtime-referenced, not vendored: required skills are `health`, `check`, and `mermaid` from `~/.codex/skills`.
|
|
53
53
|
- CodeGraph is required agent readiness for code navigation; keep `.codegraph/` ignored and use it for P1/P2 discovery, not hook correctness.
|
|
54
|
-
- Treat
|
|
54
|
+
- Treat third-party host skills as optional. Their installation state must not change Forge workflow correctness.
|
|
55
55
|
- Use `docs/reference-configs/agentic-development-flow.md` for routing details and `docs/reference-configs/external-tooling.md` plus `bash .ai/harness/scripts/check-agent-tooling.sh --host both --check-updates` for environment checks.
|
|
56
|
-
- If repo state conflicts with the task, use an isolated `codex/<task-slug>` worktree, validate with
|
|
56
|
+
- If repo state conflicts with the task, use an isolated `codex/<task-slug>` worktree, validate with Forge `/review`, and merge back to `main` without unrelated dirty changes.
|
|
@@ -22,7 +22,7 @@ PLAN_LOOP:
|
|
|
22
22
|
NOTES_DIR: tasks/notes/
|
|
23
23
|
POLICY_FILE: .ai/harness/policy.json
|
|
24
24
|
CHECKS_FILE: .ai/harness/checks/latest.json
|
|
25
|
-
HANDOFF_FILE: .ai/harness/
|
|
25
|
+
HANDOFF_FILE: .ai/harness/session/continuation.md
|
|
26
26
|
EVENTS_FILE: .ai/harness/events.jsonl
|
|
27
27
|
RUNS_DIR: .ai/harness/runs/
|
|
28
28
|
LESSONS_FILE: tasks/lessons.md
|
|
@@ -30,7 +30,7 @@ PLAN_LOOP:
|
|
|
30
30
|
ANNOTATION_GUARD: do not implement until plan Status is "Approved"
|
|
31
31
|
CONTRACT_GUARD: do not mark done until contract exit criteria pass and review recommends pass
|
|
32
32
|
EXECUTION_CONTEXT: contract-level work starts in a linked codex/<slug> worktree when policy enables it; primary worktree warning by default; enforce via .claude/.require-worktree
|
|
33
|
-
CONTRACT_WORKTREE_FINISH: run
|
|
33
|
+
CONTRACT_WORKTREE_FINISH: run Forge /review, fill the review artifact from that verdict, then .ai/harness/scripts/contract-worktree.sh finish
|
|
34
34
|
COMMIT_POLICY: explicit commits after green checks; no automatic checkpoint hook
|
|
35
35
|
```
|
|
36
36
|
|
|
@@ -39,12 +39,12 @@ PLAN_LOOP:
|
|
|
39
39
|
- Product discovery, early demand shaping, or "is this worth building" -> gstack `office-hours`.
|
|
40
40
|
- Complex engineering plans, architecture lock-in, or cross-module refactors -> gstack `plan-eng-review`.
|
|
41
41
|
- UI/UX or design-system plans -> gstack `plan-design-review`.
|
|
42
|
-
- Small or medium feature plans ->
|
|
43
|
-
- Bugs, regressions, crashes, errors, or failing tests ->
|
|
44
|
-
- Implemented diffs, pre-merge checks, or release follow-through ->
|
|
42
|
+
- Small or medium feature plans -> Forge `/plan`.
|
|
43
|
+
- Bugs, regressions, crashes, errors, or failing tests -> Forge `/debug`.
|
|
44
|
+
- Implemented diffs, pre-merge checks, or release follow-through -> Forge `/review`.
|
|
45
45
|
- Architecture diagrams or system-flow diagrams -> Markdown Mermaid first, `mermaid` for optional human HTML.
|
|
46
46
|
- Use P1/P2/P3 as the shared due-diligence protocol; report it explicitly for `plan-eng-review`, `/hunt`, risky refactors, deployments, auth/payment/data work, and shared contracts.
|
|
47
|
-
- Hooks may emit advisory
|
|
47
|
+
- Hooks may emit advisory Forge `/review` and `/health` route hints, but must not auto-run skills or vendor skill bodies.
|
|
48
48
|
|
|
49
49
|
### Task Management Protocol
|
|
50
50
|
|
|
@@ -6,7 +6,7 @@ CLAUDE.md is a routing card. Keep context minimal and load only what the current
|
|
|
6
6
|
|
|
7
7
|
- `docs/spec.md`: stable product truth
|
|
8
8
|
- `tasks/todos.md`: deferred-goal ledger (tradeoff + revisit trigger); the active checklist lives in the plan's `## Task Breakdown`
|
|
9
|
-
- `.ai/harness/
|
|
9
|
+
- `.ai/harness/session/continuation.md`: resumable cross-session state
|
|
10
10
|
|
|
11
11
|
### Load On Demand
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
### 3. Plan Node Default
|
|
15
15
|
- Enter plan mode for non-trivial tasks.
|
|
16
16
|
- If no stable product truth exists, run `bash .ai/harness/scripts/new-spec.sh`.
|
|
17
|
-
- When Codex Plan mode or
|
|
17
|
+
- When Codex Plan mode or Forge `/plan` reaches a decision-complete plan, capture it with `bash .ai/harness/scripts/capture-plan.sh --slug <slug> --title <title>` and the plan text on stdin.
|
|
18
18
|
- If no captured active execution plan exists, run `bash .ai/harness/scripts/new-plan.sh --slug <slug> --title <title>` or capture a finished planning note with `bash .ai/harness/scripts/capture-plan.sh`.
|
|
19
19
|
- If the user asks for a Sprint backlog, run `bash .ai/harness/scripts/new-sprint.sh --slug <slug> --title <title>`; it writes `plans/sprints/*.sprint.md`, not `plans/plan-*.md`.
|
|
20
20
|
- When the user approves implementation, run `bash .ai/harness/scripts/plan-to-todo.sh --plan <active-plan>` or capture the approved plan with `--status Approved --execute`; this creates contract/review/notes scaffolding and leaves plan tasks in `## Task Breakdown`.
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
### 6b. Contract Verification
|
|
37
37
|
- Define per-sprint contract files in `tasks/contracts/`.
|
|
38
38
|
- Verify contract exit criteria before claiming completion.
|
|
39
|
-
- Require
|
|
39
|
+
- Require Forge `/review` to produce the matching evaluator review before any done/completed response.
|
|
40
40
|
- Use `.ai/harness/scripts/verify-contract.sh --contract tasks/contracts/{plan-stem}.contract.md --strict`.
|
|
41
41
|
|
|
42
42
|
### 7. Balanced Elegance
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
- Evaluator verdicts: `tasks/reviews/`.
|
|
16
16
|
- Implementation notes: `tasks/notes/`.
|
|
17
17
|
- Structured checks: `.ai/harness/checks/latest.json`.
|
|
18
|
-
- Session
|
|
18
|
+
- Session continuation: `.ai/harness/session/continuation.md`.
|
|
19
19
|
- Harness policy: `.ai/harness/policy.json`.
|
|
20
20
|
- Context map: `.ai/context/context-map.json`.
|
|
21
21
|
- Lessons contract: `tasks/lessons.md`.
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
- External reference cache: `_ref/` is an occasional ignored external checkout cache, read/refresh-only comparison material, and must stay out of commits; decisions based on it must cite repo+commit/tag+path in notes or research.
|
|
29
29
|
- Deployment operations workspace: `deploy/` is commit-ready for runbooks, submission materials, release checklists, helper scripts, ordered SQL files under `deploy/sql/`, and env examples.
|
|
30
30
|
- Local operations state: `_ops/` is ignored and private for secrets, real env files, provider state, artifacts, logs, and scratch files; do not commit or agent-edit `_ops/*`.
|
|
31
|
-
- Agentic skill routing: product discovery -> gstack `office-hours`; complex engineering plans -> gstack `plan-eng-review`; design plans -> gstack `plan-design-review`; daily small/medium planning, bug hunts, and checks ->
|
|
31
|
+
- Agentic skill routing: product discovery -> gstack `office-hours`; complex engineering plans -> gstack `plan-eng-review`; design plans -> gstack `plan-design-review`; daily small/medium planning, bug hunts, and checks -> Forge `/plan`, `/hunt`, `/check`.
|
|
32
32
|
- Knowledge sync and handoff retrieval -> `gbrain`.
|
|
33
33
|
- Codex automation profile: required `health`, `check`, and `mermaid` from `~/.codex/skills`; do not vendor skill bodies.
|
|
34
34
|
- CodeGraph readiness: required for agent code navigation; keep `.codegraph/` ignored and use `codegraph sync/context/query/callers/callees/impact` for P1/P2 discovery.
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
- Environment check: `bash .ai/harness/scripts/check-agent-tooling.sh --host both --check-updates`.
|
|
38
38
|
- After substantive repo changes, run `bash .ai/harness/scripts/check-task-sync.sh` and `bash .ai/harness/scripts/check-task-workflow.sh --strict`.
|
|
39
39
|
- Primary worktree warns by default; enforce via `.claude/.require-worktree`.
|
|
40
|
-
- Contract-level execution is worktree-first: `.ai/harness/scripts/plan-to-todo.sh --plan <approved-plan>` starts a linked `codex/<slug>` worktree when policy enables it, and `.ai/harness/scripts/contract-worktree.sh finish` merges back only after
|
|
41
|
-
- After Codex Plan mode,
|
|
42
|
-
- If repo state conflicts with the task, use an isolated `codex/<task-slug>` worktree, validate with
|
|
40
|
+
- Contract-level execution is worktree-first: `.ai/harness/scripts/plan-to-todo.sh --plan <approved-plan>` starts a linked `codex/<slug>` worktree when policy enables it, and `.ai/harness/scripts/contract-worktree.sh finish` merges back only after Forge `/review` and sprint verification pass.
|
|
41
|
+
- After Codex Plan mode, Forge `/plan`, or `forge-plan` produces a decision-complete plan, capture it with `.ai/harness/scripts/capture-plan.sh --slug <slug> --title <title>`; if implementation is already approved, capture with `--status Approved --execute` or run `.ai/harness/scripts/plan-to-todo.sh --plan <active-plan>`.
|
|
42
|
+
- If repo state conflicts with the task, use an isolated `codex/<task-slug>` worktree, validate with Forge `/review`, and merge back to `main` without unrelated dirty changes.
|
|
43
43
|
|
|
44
44
|
---
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
### 3. Plan Node Default
|
|
13
13
|
- Enter plan mode for non-trivial tasks.
|
|
14
14
|
- If `docs/spec.md` is missing, run `bash .ai/harness/scripts/new-spec.sh` first.
|
|
15
|
-
- Capture decision-complete Codex Plan mode or
|
|
15
|
+
- Capture decision-complete Codex Plan mode or Forge `/plan` output with `bash .ai/harness/scripts/capture-plan.sh --slug <slug> --title <title>`; if no captured active execution plan exists, use `new-plan.sh`; after approval, run `plan-to-todo.sh` or capture with `--status Approved --execute`.
|
|
16
16
|
- Use `new-sprint.sh` only for Sprint backlogs; it writes `plans/sprints/*.sprint.md`, while PRDs stay in `plans/prds/`.
|
|
17
17
|
- Keep active checklist items in the active plan's `## Task Breakdown`; record only deferred goals in `tasks/todos.md`.
|
|
18
18
|
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
### 4b. Durable Handoff
|
|
25
25
|
- Treat auto-compact as an unreliable fallback.
|
|
26
|
-
- Before switching sessions or worktrees, refresh `.ai/harness/
|
|
26
|
+
- Before switching sessions or worktrees, refresh `.ai/harness/session/continuation.md` and `.ai/harness/session/resume.md`, then resume from the filesystem artifacts.
|
|
27
27
|
|
|
28
28
|
### 5. Self-Improvement Loop
|
|
29
29
|
- After correction, append prevention rule to `tasks/lessons.md`.
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
### 6b. Contract Verification
|
|
35
35
|
- Use task contracts in `tasks/contracts/` as completion gates.
|
|
36
36
|
- Use implementation notes in `tasks/notes/` for task-local decisions that should not automatically become memory.
|
|
37
|
-
- Validate exit criteria and the
|
|
37
|
+
- Validate exit criteria and the Forge `/review` review recommendation before any done/completed response.
|
|
38
38
|
|
|
39
39
|
### 7. Balanced Elegance
|
|
40
40
|
- Redesign hacky non-trivial fixes before shipping.
|
|
@@ -10,7 +10,7 @@ TASK_SOURCES:
|
|
|
10
10
|
- tasks/notes/
|
|
11
11
|
- tasks/lessons.md
|
|
12
12
|
- .ai/harness/checks/latest.json
|
|
13
|
-
- .ai/harness/
|
|
13
|
+
- .ai/harness/session/continuation.md
|
|
14
14
|
- plans/
|
|
15
15
|
|
|
16
16
|
PHASES: research -> spec -> plan -> contract -> implement -> verify -> check -> review -> handoff
|
|
@@ -30,7 +30,7 @@ RULES:
|
|
|
30
30
|
- Process annotation notes before implementing
|
|
31
31
|
- Project approved plans with .ai/harness/scripts/plan-to-todo.sh; the execution checklist stays in the plan ## Task Breakdown
|
|
32
32
|
- Define task contracts in tasks/contracts/{plan-stem}.contract.md
|
|
33
|
-
- Fill tasks/reviews/{plan-stem}.review.md from
|
|
33
|
+
- Fill tasks/reviews/{plan-stem}.review.md from Forge /review after verification
|
|
34
34
|
- Record only non-obvious implementation decisions, deviations, tradeoffs, and open questions in tasks/notes/{plan-stem}.notes.md
|
|
35
35
|
- Verify contracts before claiming completion
|
|
36
36
|
- Require review pass before claiming completion
|
|
@@ -44,7 +44,7 @@ RULES:
|
|
|
44
44
|
- Treat `.ai/hooks/` as the shared automation entrypoint when repo scripts reference hook-backed workflow checks
|
|
45
45
|
- Treat user-level `~/.claude/settings.json` and `~/.codex/hooks.json` as host adapters; do not add repo-local project hook adapters unless explicitly migrating legacy config
|
|
46
46
|
- For Codex sessions, treat `bash .ai/harness/scripts/check-task-sync.sh` and `bash .ai/harness/scripts/check-task-workflow.sh --strict` as required repo-local checks
|
|
47
|
-
- Before ending a session, refresh `.ai/harness/
|
|
47
|
+
- Before ending a session, refresh `.ai/harness/session/continuation.md` when the task state changed
|
|
48
48
|
- Update `tasks/workstreams/` only when durable capability progress changes
|
|
49
49
|
- Archive completed/abandoned plans and todos with metadata
|
|
50
50
|
{{#IF FACTOR_FACTORY_ENABLED}}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
### Always Read First
|
|
4
4
|
- `docs/spec.md`: stable product truth
|
|
5
5
|
- `tasks/todos.md`: deferred-goal ledger only
|
|
6
|
-
- `.ai/harness/
|
|
6
|
+
- `.ai/harness/session/continuation.md`: resumable session state
|
|
7
7
|
- `.ai/harness/policy.json`: machine-readable workflow contract
|
|
8
8
|
|
|
9
9
|
### Load On Demand
|