refactor(modes): collapse to Ask/Build; YOLO is a flag not a mode

- Remove 'plan' preset — ask covers discussion + planning, build covers execution
- Shift+Tab now cycles Ask ↔ Build (two stops, no awkward middle)
- YOLO (Ctrl+Y) forces Build mode if in Ask, then slams autonomous+deep+unrestricted
- Notify message shows 'switched to Build' when YOLO triggers a mode change
- YOLO off restores the pre-YOLO mode as before

Flow: Ask (user drives) → Build (SF drives) → Ctrl+Y (full send, no stops)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Mikael Hugo 2026-05-09 19:53:22 +02:00
parent fc60de80f5
commit 0712577f85
2 changed files with 9 additions and 19 deletions

View file

@ -102,23 +102,15 @@ export function resolveWorkMode(value) {
export const SF_MODE_PRESETS = Object.freeze({
ask: {
label: "Ask",
description: "Explore, understand, and discuss — SF stays conversational",
description: "Explore, discuss, and plan — user is driving, SF assists",
workMode: "chat",
runControl: "manual",
modelMode: "fast",
permissionProfile: "normal",
},
plan: {
label: "Plan",
description: "Think through structure and approach before acting",
workMode: "plan",
runControl: "assisted",
modelMode: "smart",
permissionProfile: "normal",
},
build: {
label: "Build",
description: "Execute autonomously — SF biases toward action, no permission prompts",
description: "SF executes autonomously — user steps back, no permission prompts",
workMode: "build",
runControl: "autonomous",
modelMode: "smart",

View file

@ -32,7 +32,7 @@ export default function steerableAutonomousExtension(api) {
// Handle key events - Shift+Tab and Ctrl+Y
api.registerShortcut("shift+tab", {
description:
"Cycle mode (Ask → Plan → Build) or open steerable panel during autonomous",
"Cycle mode (Ask Build) or open steerable panel during autonomous",
handler: async (event, ctx) => {
if (isAutonomousActive) {
// During autonomous execution: toggle steering panel
@ -81,21 +81,19 @@ export default function steerableAutonomousExtension(api) {
handler: async (event, ctx) => {
const session = getAutoSession();
// Toggle full-autonomy preset in AutoSession (handles mode slam + restore)
const wasAsk = session.getMode().workMode !== "build";
const enabled = session.toggleYolo();
// Also toggle settingsManager for safe-git prompt bypass
if (ctx.settingsManager && ctx.settingsManager.toggleYOLO) {
ctx.settingsManager.toggleYOLO();
}
if (enabled) {
ctx.ui.notify(
"🚀 YOLO ON — build · autonomous · deep · unrestricted · no git prompts",
"success",
);
const msg = wasAsk
? "🚀 YOLO — switched to Build · autonomous · deep · unrestricted"
: "🚀 YOLO — autonomous · deep · unrestricted · no git prompts";
ctx.ui.notify(msg, "success");
} else {
ctx.ui.notify(
"YOLO OFF — mode restored",
"info",
);
ctx.ui.notify("YOLO OFF — mode restored", "info");
}
},
});