singularity-forge/src
Mikael Hugo 5a57549591 feat(headless): autonomous mode auto-drains self-feedback triage queue first
Before this change, `sf headless autonomous` only dispatched units for
the active milestone — never touched .sf/self-feedback.jsonl. The
existing `sf headless triage --apply` was a manual operator path
required for self-feedback to become actionable work. Defeats the
"SF self-heals" thesis: 146 entries can sit in the queue indefinitely
while the autonomous loop happily cranks on M005.

Now: at autonomous startup (not on resume, not on initial bootstrap)
SF calls handleTriage({ apply: true, max: 5 }) to drain the top-5
candidates from the triage queue before entering the dispatch loop.
The bound at max=5 keeps the upfront cost bounded; remaining items
process on the next session_start.

The comment on the existing triage handler in headless.ts:917-921
explicitly acknowledged the gap — autonomous-loop followUp delivery
was broken (sf-mp4rxkwb-l4baga). Wiring the deterministic triage
path BEFORE the dispatch loop closes that gap.

Opt-out: pass --skip-triage on the autonomous command (e.g. when
debugging a specific milestone without backlog churn).

Triage failures are non-fatal — they log a warning and the
autonomous loop continues with its existing milestone dispatch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 19:01:50 +02:00
..
resources feat(benchmark-selector): phase 2 — quota-aware routing weight 2026-05-16 18:09:33 +02:00
tests fix(headless): remove legacy v1 fallback path 2026-05-15 20:12:00 +02:00
web
app-paths.ts
bundled-extension-paths.ts
bundled-resource-path.ts
claude-cli-check.ts
cli-key.ts feat(cli): add sf key subcommand for auth.json management 2026-05-15 16:37:04 +02:00
cli-logs.ts
cli-stats.ts
cli-status.ts
cli-web-branch.ts sf snapshot: uncommitted changes after 33m inactivity 2026-05-16 17:00:13 +02:00
cli.ts feat(catalog/quota): global model catalog, benchmark coverage audit, provider quota visibility 2026-05-16 17:37:20 +02:00
env.ts
errors.ts
extension-discovery.ts
extension-registry.ts
headless-answers.ts
headless-context.ts
headless-events.ts
headless-feedback.ts feat(self-feedback): purpose_anchor on entries (ADR-0000 restoration, v71) 2026-05-15 18:51:52 +02:00
headless-import-backlog.ts
headless-mark-state.ts feat(memory): add debug logging to memory extraction pipeline 2026-05-15 16:09:36 +02:00
headless-query.ts feat(headless): surface memory auth pause 2026-05-15 18:16:08 +02:00
headless-reflect.ts
headless-status.ts fix(headless): bypass rpc for status 2026-05-15 17:32:21 +02:00
headless-triage.ts feat(prompts): add v2 migration regression tests + fix template variable drift 2026-05-15 19:46:13 +02:00
headless-types.ts
headless-ui.ts
headless-uok-status.ts
headless-usage.ts feat(catalog/quota): global model catalog, benchmark coverage audit, provider quota visibility 2026-05-16 17:37:20 +02:00
headless.ts feat(headless): autonomous mode auto-drains self-feedback triage queue first 2026-05-16 19:01:50 +02:00
help-text.ts feat(self-feedback): purpose_anchor on entries (ADR-0000 restoration, v71) 2026-05-15 18:51:52 +02:00
interactive-session-lock.ts
loader.ts
logger.ts
logo.ts
models-resolver.ts
onboarding.ts
pi-migration.ts
project-sessions.ts
provider-migrations.ts
remote-questions-config.ts
resource-loader.ts
rtk.ts
security-overrides.ts
startup-model-validation.ts
startup-timings.ts
tool-bootstrap.ts
traces.ts
update-check.ts
update-cmd.ts
web-mode.ts
welcome-screen.ts
wizard.ts
worktree-cli.ts
worktree-name-gen.ts