singularity-forge/docs
Mikael Hugo 082526c0e4 docs(sf): finish PDD v2 propagation into Purpose Gate, requesting/receiving review
Tail-end of the PDD v2 work (Assumptions field + safety/liveness split +
machine-executable Evidence). Three documents that still referenced v1's
4-field Purpose Gate are updated to the full 8-field PDD packet:

- docs/SPEC_FIRST_TDD.md — Purpose Gate now lists all 8 fields with the
  Assumptions and Failure-boundary additions inline.
- skills/requesting-code-review — replaces "Purpose & Consumer" section with
  "PDD packet (all 8 fields)" restated verbatim from .sf/active/{unit-id}/pdd.md.
  Falsifier and Scope-defence sections clarified vs Failure-boundary and
  Non-goals to remove overlap.
- skills/receiving-code-review — Purpose Gate criterion updated to demand
  the full PDD packet with machine-executable Evidence, not just
  Purpose/Consumer/Value-at-risk.

PDD packet (inline):
- Purpose: every artefact that references "Purpose Gate" agrees on the same
  8-field definition; reviewers and reviewees read the same packet.
- Consumer: spec-first-tdd, requesting-code-review, receiving-code-review.
- Contract: all three documents list the same 8 fields with the same
  Assumptions / safety+liveness / machine-executable-Evidence wording.
- Evidence: grep confirms PDD packet references in all three; typecheck:extensions exits 0.
- Non-goals: no edits to the PDD skill itself (already v2); no edits to other
  skills referencing v1 Purpose Gate beyond these three (they don't exist).
- Invariants: existing review-loop sections preserved; only Purpose-Gate-
  related sections rewritten.
- Assumptions: PDD v2 SKILL.md is the canonical source of field definitions;
  these three documents are projections of it.
2026-05-02 03:20:06 +02:00
..
design-docs ADR-021: versioned documents + automatic upgrade via records-keeper 2026-05-02 00:18:16 +02:00
dev ADR-021: versioned documents + automatic upgrade via records-keeper 2026-05-02 00:18:16 +02:00
exec-plans feat: SF strengthening + ADR-020 wire architecture (Phases 1-2) 2026-05-02 00:03:34 +02:00
generated fix: stabilize sf auto and subagent routing 2026-04-30 21:55:17 +02:00
product-specs feat: introduce repo-vcs skill and add JSDoc annotations across core modules 2026-05-01 21:36:32 +02:00
records chore(sf): autonomous sweep — judgment-log/knowledge-compounding/tacit-knowledge tests + PDD v2 research record 2026-05-02 02:50:44 +02:00
references fix: stabilize sf auto and subagent routing 2026-04-30 21:55:17 +02:00
user-docs feat: stabilize autonomous workflow system 2026-05-01 20:18:50 +02:00
zh-CN Rename GSD→SF: complete rebrand from fork origin 2026-04-15 18:33:47 +02:00
DESIGN.md feat: implement ADR-001 gitignore split and fill placeholder docs 2026-05-01 22:32:28 +02:00
FRONTEND.md fix: stabilize sf auto and subagent routing 2026-04-30 21:55:17 +02:00
PLANS.md feat: implement ADR-001 gitignore split and fill placeholder docs 2026-05-01 22:32:28 +02:00
PRODUCT_SENSE.md feat: implement ADR-001 gitignore split and fill placeholder docs 2026-05-01 22:32:28 +02:00
QUALITY_SCORE.md feat: implement ADR-001 gitignore split and fill placeholder docs 2026-05-01 22:32:28 +02:00
README.md feat: stabilize autonomous workflow system 2026-05-01 20:18:50 +02:00
RECORDS_KEEPER.md fix: stabilize sf auto and subagent routing 2026-04-30 21:55:17 +02:00
RELIABILITY.md feat: implement ADR-001 gitignore split and fill placeholder docs 2026-05-01 22:32:28 +02:00
SECURITY.md feat: implement ADR-001 gitignore split and fill placeholder docs 2026-05-01 22:32:28 +02:00
SPEC_FIRST_TDD.md docs(sf): finish PDD v2 propagation into Purpose Gate, requesting/receiving review 2026-05-02 03:20:06 +02:00

SF Documentation

Welcome to the SF documentation. This covers everything from getting started to advanced configuration, autonomous-mode internals, and extending SF with the Pi SDK.

User Documentation

Guides for installing, configuring, and using SF day-to-day. Located in user-docs/.

Simplified Chinese translation: zh-CN/.

Guide Description
Getting Started Installation, first run, and basic usage
Autonomous Mode How autonomous execution works — the state machine, crash recovery, and steering
Commands Reference All commands, keyboard shortcuts, and CLI flags
Remote Questions Discord and Slack integration for headless auto-mode
Configuration Preferences, model selection, git settings, and token profiles
Provider Setup Step-by-step setup for OpenRouter, Ollama, LM Studio, vLLM, and all supported providers
Custom Models Advanced model configuration — models.json schema, compat flags, overrides
Token Optimization Token profiles, context compression, complexity routing, and adaptive learning (v2.17)
Dynamic Model Routing Complexity-based model selection, cost tables, escalation, and budget pressure (v2.19)
Captures & Triage Fire-and-forget thought capture during auto-mode with automated triage (v2.19)
Workflow Visualizer Interactive TUI overlay for progress, dependencies, metrics, and timeline (v2.19)
Cost Management Budget ceilings, cost tracking, projections, and enforcement modes
Git Strategy Worktree isolation, branching model, and merge behavior
Parallel Orchestration Run multiple milestones simultaneously with worker isolation and coordination
Working in Teams Unique milestone IDs, .gitignore setup, and shared planning artifacts
Skills Bundled skills, skill discovery, and custom skill authoring
Migration from v1 Migrating .planning directories from the original SF
Troubleshooting Common issues, /sf doctor (real-time visibility v2.40), /sf forensics (full debugger v2.40), and recovery procedures
Web Interface Browser-based project management with sf --web (v2.41)
VS Code Extension Chat participant, sidebar dashboard, and RPC integration for VS Code

Architecture & Internals

Design documents, ADRs, and internal references. Located in dev/.

Guide Description
Architecture Overview System design, extension model, state-on-disk, and dispatch pipeline
Native Engine Rust N-API modules for performance-critical operations
ADR-001: Branchless Worktree Architecture Decision record for the v2.14 git architecture
ADR-003: Pipeline Simplification Research merged into planning, mechanical completion (v2.30)
ADR-004: Capability-Aware Model Routing Extend routing from tier/cost selection to task-capability matching
ADR-007: Model Catalog Split Separate model metadata from routing logic for extensibility
ADR-008: SF Tools over MCP Native tools over MCP for provider parity
ADR-008: Implementation Plan Implementation plan for ADR-008
Context Optimization Opportunities Analysis of context window usage and optimization strategies
File System Map Complete file system reference
CI/CD Pipeline Continuous integration and deployment pipeline
Frontier Techniques Advanced techniques and research
PRD: Branchless Worktree Product requirements for branchless worktree architecture
Agent Knowledge Index Index of agent knowledge resources

Pi SDK Documentation

Guides for the underlying Pi SDK that SF is built on. Located in dev/.

Guide Description
What is Pi Core concepts — modes, agent loop, sessions, tools, providers
Extending Pi Building extensions — tools, commands, UI, events, state
Context & Hooks Context pipeline, hook reference, inter-extension communication
Pi UI / TUI Terminal UI components, theming, keyboard input, rendering

Research

Guide Description
Building Coding Agents Research notes on agent design — decomposition, context engineering, cost/quality tradeoffs
Proposals Feature proposals and workflow definitions
Superpowers Plans and specs for superpower features