From 82d629c3ee4ddd830da0717ec506de890657a2e8 Mon Sep 17 00:00:00 2001 From: Mikael Hugo Date: Mon, 11 May 2026 23:45:24 +0200 Subject: [PATCH] feat(.agents): add autonomous mode; clarify yolo is a flag not a mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add modes/autonomous.md — third SF mode (ask/build/autonomous). Describes UOK dispatch loop, bash 120s timeout, fresh-context-per-unit, recovery/runaway-guard, and when to use vs Build. - Add autonomous to enabled.modes in manifest.yaml. - Update policies/yolo.yaml description: YOLO is a flag on Build or Autonomous, not a mode, not a Shift+Tab stop. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .agents/manifest.yaml | 1 + .agents/modes/autonomous.md | 67 +++++++++++++++++++++++++++++++++++++ .agents/policies/yolo.yaml | 8 +++-- 3 files changed, 73 insertions(+), 3 deletions(-) create mode 100644 .agents/modes/autonomous.md diff --git a/.agents/manifest.yaml b/.agents/manifest.yaml index c11ac037e..d858f294d 100644 --- a/.agents/manifest.yaml +++ b/.agents/manifest.yaml @@ -14,6 +14,7 @@ enabled: modes: - ask - build + - autonomous policies: - default-safe - yolo diff --git a/.agents/modes/autonomous.md b/.agents/modes/autonomous.md new file mode 100644 index 000000000..aa65d5895 --- /dev/null +++ b/.agents/modes/autonomous.md @@ -0,0 +1,67 @@ +--- +id: autonomous +title: Autonomous +policy: default-safe +enableSkills: + - forge-autonomous-runtime +disableSkills: [] +includeSnippets: + - style + - principles + - non-goals +toolIntent: + allow: + - read + - search + - web_fetch + - write + - exec_command + - git_commit + deny: + - git_push_force + - rm_rf + - drop_table +--- + +# Autonomous Mode + +Long-horizon unattended execution. SF drives the full UOK dispatch +loop: milestone → slice → task → commit, without human confirmation +per unit. The deterministic controller (not the LLM) reads `sf.db` +and decides what to dispatch next. + +**Entry points:** + +- `sf run --autonomous` (CLI) +- `sf headless next` / `sf headless autonomous` (machine surface) +- TUI: enable via `/autonomous` or the autonomous panel + +**Differences from Build:** + +- No per-unit human confirmation gate. +- Each task unit gets a **fresh agent context** — no accumulated state + between units. +- Budget limits enforced: turn cap and token cap per unit. +- The 120 s bash default timeout is critical here — without it a + single hanging command consumes the entire autonomous run budget. +- Bash tool has a 120 s default timeout (configurable via + `settings.json → bash.defaultTimeoutSeconds`). +- Recovery and runaway-guard are active; stuck units are retried or + abandoned automatically. + +**What does NOT change in this mode:** + +- Path deny rules and redactions from the active policy still apply. +- Secrets are never written to commits or logs. +- Destructive operations (`rm -rf`, `git push --force`, `drop_table`) + are still denied. + +**When to use:** + +Use autonomous mode when the milestone/slice plan is stable, tests are +present, and the work is low-blast-radius. Use Build mode when you +want to review changes interactively or the task is novel/risky. + +The YOLO flag (`Ctrl+Y` / `/mode yolo`) can be layered on top of +Build or Autonomous to drop the remaining confirmation gates entirely. +It is a flag — not a mode — and does not appear as a Shift+Tab stop. diff --git a/.agents/policies/yolo.yaml b/.agents/policies/yolo.yaml index de42e80d6..cd61b552b 100644 --- a/.agents/policies/yolo.yaml +++ b/.agents/policies/yolo.yaml @@ -1,8 +1,10 @@ id: yolo description: >- - Confirmation-free build mode. Use deliberately — destructive - operations execute without prompting. Still respects path denies - and redactions; only the confirmation gate is removed. + Confirmation-free policy applied when the YOLO flag is active + (Ctrl+Y / /mode yolo). YOLO is a flag layered on top of Build or + Autonomous — it is NOT a mode and does not appear as a Shift+Tab + stop. Destructive operations execute without prompting. Path denies + and redactions still apply. capabilities: filesystem: