Per template (singularity-forge f3d84cd11). Project-specific manifest + prompts/project.md capture: post-rename namespace com.centralcloud.oncall (io.heckel.ntfy fully gone), centrally-configured-from-server design, strict-opt-in SMS relay, greenfield (no backwards compat with upstream ntfy). Legacy docs (AGENTS.md, README.md, TESTING.md) kept; .agents/ canonical going forward. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
37 lines
1.5 KiB
Markdown
37 lines
1.5 KiB
Markdown
---
|
|
name: forge-autonomous-runtime
|
|
description: Explains SF autonomous loop, UOK gates, installed-runtime drift, and recovery paths.
|
|
user-invocable: false
|
|
model-invocable: true
|
|
side-effects: none
|
|
permission-profile: restricted
|
|
triggers:
|
|
- "*"
|
|
---
|
|
|
|
# forge-autonomous-runtime
|
|
|
|
## Context
|
|
|
|
SF's autonomous mode is governed by the Unified Operation Kernel (UOK):
|
|
|
|
1. **State reading** — UOK reads canonical project state from `.sf/sf.db`
|
|
2. **Ledger recording** — Each run is recorded in the DB-backed ledger
|
|
3. **Projection** — Runtime files under `.sf/runtime/` are generated projections
|
|
4. **Dispatch** — UOK determines the next unit of work and creates a fresh agent session
|
|
5. **Execution** — LLM executes with focused prompt and pre-inlined context
|
|
6. **Reconciliation** — UOK reconciles ledger and projections before next dispatch
|
|
|
|
## Recovery Paths
|
|
|
|
- **Crash recovery** — Lock file tracks current unit; next `/autonomous` reads surviving state
|
|
- **Stuck detection** — Loop detects stuck iterations and emits `stuck-detected` journal events
|
|
- **Health gates** — Pre-dispatch gates check state integrity before execution
|
|
- **Parity reports** — Ledger parity ensures no orphaned or missing unit records
|
|
|
|
## Rules
|
|
|
|
- Never modify `.sf/sf.db` directly — use UOK APIs
|
|
- Never trust `.sf/runtime/` files as authoritative — they are projections
|
|
- Always check `runControl` and `permissionProfile` before tool invocation
|
|
- Journal events are best-effort; absence is a failure signal
|