singularity-forge/docs
Mikael Hugo 87aa04cf05 Tier 1.3: Add spec/runtime/evidence schema separation (v32)
Implements the 3-table normalization model for milestone, slice, and task entities:

- 9 new tables: {milestone,slice,task}_{specs,evidence} + runtime tables
- milestone_specs: immutable record of intent (vision, goals, risks, proof strategy)
- slice_specs: immutable slice-level intent
- task_specs: immutable task verification criteria
- {entity}_evidence: append-only audit trail with timestamps and phase metadata
- Indices on evidence tables for efficient chronological queries

Key improvements:
- Spec immutability: Write-once specs preserve original intent
- Audit trail: Evidence chain enables data archaeology and decision history
- Query efficiency: Each table contains only relevant columns
- Re-planning clarity: Multiple spec versions can exist for same entity ID
- Forensic capability: Timestamp + phase metadata on evidence rows

Migration:
- Schema version bumped to 32
- Migration runs on first open of existing databases
- No data loss; existing milestone/slice/task rows preserved
- Creates spec and evidence tables from existing columns (future work)

This is Phase 1 of Tier 1.3 implementation (schema definition + basic setup).
Phases 2-5 (migration, data layer updates, tool updates, tests) follow in next PRs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-07 04:20:32 +02:00
..
adr Tier 1.3: Add spec/runtime/evidence schema separation (v32) 2026-05-07 04:20:32 +02:00
design-docs docs: align sf purpose doctrine and docs 2026-05-06 00:38:36 +02:00
dev docs: align schedule and package state wording 2026-05-07 03:36:56 +02:00
exec-plans docs: align runtime state and mcp boundaries 2026-05-07 03:09:55 +02:00
generated feat: implement 3 quick wins for SF self-evolution 2026-05-06 22:01:37 +02:00
plans docs: promote sf state guidance 2026-05-07 03:59:38 +02:00
product-specs feat: implement 3 quick wins for SF self-evolution 2026-05-06 22:01:37 +02:00
records refactor: rename workflow tool boundary 2026-05-07 03:45:41 +02:00
references feat: implement 3 quick wins for SF self-evolution 2026-05-06 22:01:37 +02:00
specs docs: align schedule and package state wording 2026-05-07 03:36:56 +02:00
user-docs docs: remove stale direct db and mcp guidance 2026-05-07 03:33:14 +02:00
DESIGN.md feat: implement ADR-001 gitignore split and fill placeholder docs 2026-05-01 22:32:28 +02:00
ENV.md docs: tighten legacy state fallback wording 2026-05-07 03:25:20 +02:00
FRONTEND.md feat: implement 3 quick wins for SF self-evolution 2026-05-06 22:01:37 +02:00
PLANS.md docs: align sf purpose doctrine and docs 2026-05-06 00:38:36 +02:00
PRODUCT_SENSE.md docs: align sf purpose doctrine and docs 2026-05-06 00:38:36 +02:00
QUALITY_SCORE.md sf snapshot: uncommitted changes after 93m inactivity 2026-05-06 11:37:27 +02:00
README.md docs: align sf purpose doctrine and docs 2026-05-06 00:38:36 +02:00
RECORDS_KEEPER.md feat: implement 3 quick wins for SF self-evolution 2026-05-06 22:01:37 +02:00
RELIABILITY.md fix: make autonomous mode canonical 2026-05-05 15:42:10 +02:00
SECURITY.md docs: align sf purpose doctrine and docs 2026-05-06 00:38:36 +02:00
SPEC_FIRST_TDD.md docs: align sf purpose doctrine and docs 2026-05-06 00:38:36 +02:00
TEST-COVERAGE-PLAN.md Update test coverage plan: Phase 3 complete 2026-05-07 01:01:47 +02:00

SF Documentation

Welcome to the SF documentation. SF is a purpose-to-software compiler: it turns bounded intent into PDD contracts, researches missing context, writes failing tests or executable evidence first, implements the smallest satisfying change, and records verification. See ADR-0000 and Spec-First TDD before changing product behavior.

This index 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/.

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 autonomous-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
ADR-0000: Purpose-to-Software Compiler Foundational architecture decision for SF's product contract
Spec-First TDD Purpose gate, PDD fields, and test-first change method
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
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

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