You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds "fsd" as a third ExecutionMode alongside "manual" and "autopilot".
FSD runs the autopilot loop with all safeguard checks disabled (no-progress,
resume-cap, same-action-repeat) for maximum throughput. Includes end-to-end
implementation: backend types, route validation, autopilot loop skip logic,
frontend UI toggle (3-way cycle), PauseBanner FSD labels, and comprehensive
tests for all changed components.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CLAUDE.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -94,6 +94,7 @@ Full lists: [`docs/CODING-GOTCHAS.md`](docs/CODING-GOTCHAS.md), [`docs/TESTING-G
94
94
-**In-memory queue vs SQLite**: `workspaceQueues`/`workspacePendingTasks` are in-memory only.
95
95
-**Autopilot runs inside workspace queue**: `runAutopilotLoop` is wrapped in `enqueueBlueprintTask` at call sites. Inside the loop, use `executeNodeDirect` (not `executeNode`) to avoid nested enqueue deadlock. `resumeNodeSession()` requires an `executionId` — look up latest execution with a session via `getExecutionsForNode()`.
96
96
-**BlueprintStatus vs MacroNodeStatus naming**: `BlueprintStatus` uses `"draft"/"approved"`, `MacroNodeStatus` uses `"pending"/"queued"/"running"/"done"/"failed"/"blocked"/"skipped"` (notably `"running"` not `"in_progress"`).
97
+
-**ExecutionMode values**: `"manual" | "autopilot" | "fsd"`. The `isAutopilotMode()` helper in `plan-routes.ts` groups `"autopilot"` and `"fsd"` together — switching between them does NOT trigger `switchingToAutopilot` (no re-enqueue). FSD skips all safeguard checks in the autopilot loop (`skipSafeguards = isFsd`).
97
98
-**AI operations in plan-operations.ts**: `enrichNodeInternal`, `reevaluateNodeInternal`, `splitNodeInternal`, `smartDepsInternal`, `reevaluateAllInternal` are extracted from route handlers. Both `plan-routes.ts` and `autopilot.ts` call these directly. `runWithRelatedSessionDetection` helper also lives here.
98
99
-**Autopilot pause/resume flow**: When resuming from a safeguard pause, `PauseBanner.handleResume` must clear `pauseReason` and set `status: "running"` (both via API and optimistically in local state). `runAutopilotLoop` also clears `pauseReason` on start. The PUT endpoint's `switchingToAutopilot` only fires when `executionMode` changes FROM non-autopilot, so re-entering autopilot from a paused-autopilot state uses `runAllNodes` instead.
99
100
-**Circular dependency: autopilot ↔ plan-executor**: `autopilot.ts` imports from `plan-executor.ts`. If `plan-executor.ts` needs to call autopilot (e.g. recovery), use dynamic `import("./autopilot.js")` to avoid circular import.
@@ -682,17 +683,12 @@ export function buildAutopilotPrompt(
682
683
memorySections+=`\n## Blueprint Memory (your notes from earlier iterations)\n${memory.blueprint}\n`;
683
684
}
684
685
685
-
return`You are the Autopilot agent for a software blueprint. Your goal is to drive this blueprint to completion by choosing the best next action at each step.
686
-
687
-
## Current Blueprint State
688
-
${JSON.stringify(state,null,2)}
689
-
690
-
## Iteration ${iteration} of ${maxIterations}
691
-
${memorySections}
692
-
## Available Tools
693
-
${TOOL_DESCRIPTIONS}
694
-
695
-
## Recommended Workflow Rhythm
686
+
constworkflowSection=fsdMode
687
+
? `## FSD Mode (Full Speed Drive)
688
+
You are running in FSD mode — no safeguards, no throttling. Execute as fast and efficiently as possible.
689
+
Focus on running nodes to completion. Skip enrichment and coordination overhead unless absolutely necessary.
690
+
Don't hesitate to run nodes back-to-back. Maximize throughput.`
691
+
: `## Recommended Workflow Rhythm
696
692
Don't just run nodes back-to-back. Follow this quality-aware pattern:
697
693
698
694
1. **Before running a node**: If its description is short or vague, use enrich_node first to improve the prompt.
@@ -701,9 +697,15 @@ Don't just run nodes back-to-back. Follow this quality-aware pattern:
701
697
4. **When suggestions accumulate**: Review them — create_node for real issues, batch_mark_suggestions_used for minor/addressed ones.
702
698
5. **When multiple roles are enabled and a design decision is ambiguous**: Use convene(topic, roleIds) to get multi-perspective input.
703
699
704
-
A good rhythm: enrich → run → triage suggestions → repeat. Not every node needs all steps, but never do 5+ run_node calls in a row without a coordinate or suggestion triage in between.
700
+
A good rhythm: enrich → run → triage suggestions → repeat. Not every node needs all steps, but never do 5+ run_node calls in a row without a coordinate or suggestion triage in between.`;
705
701
706
-
## Guidelines
702
+
constguidelinesSection=fsdMode
703
+
? `## Guidelines
704
+
- Execute nodes in dependency order. Don't run a node whose dependencies aren't done.
705
+
- If a node failed, try resume with feedback or skip it — don't get stuck on any single node.
706
+
- When all nodes are done, call complete().
707
+
- You have ${remaining} iterations left.`
708
+
: `## Guidelines
707
709
- Execute nodes in dependency order. Don't run a node whose dependencies aren't done.
708
710
- If a node failed, analyze the error. Consider: resume with feedback, split it, modify its description/prompt, or skip it if non-critical.
709
711
- If a node seems too complex (long description >500 chars, many dependencies), consider split_node first.
@@ -713,7 +715,21 @@ A good rhythm: enrich → run → triage suggestions → repeat. Not every node
713
715
- If warning insights exist, consider addressing them when convenient but don't block progress.
714
716
- If you're stuck or need a human decision (architectural choice, ambiguous requirement, external dependency), use pause(reason).
715
717
- You have ${remaining} iterations left. Balance quality (coordinate, enrich, suggestion triage) with progress (run_node).
716
-
- When all nodes are done: review any remaining unused suggestions. Use batch_mark_suggestions_used for ones not worth acting on. Use create_node for actionable ones. Then call complete().
718
+
- When all nodes are done: review any remaining unused suggestions. Use batch_mark_suggestions_used for ones not worth acting on. Use create_node for actionable ones. Then call complete().`;
719
+
720
+
return`You are the Autopilot agent for a software blueprint. Your goal is to drive this blueprint to completion by choosing the best next action at each step.
0 commit comments