singularity-forge/todo.md
Mikael Hugo 48dbb175c0 feat(prefs): migrate canonical preferences file from PREFERENCES.md to preferences.yaml
New installations create .sf/preferences.yaml (pure YAML, no frontmatter
markers) and ~/.sf/preferences.yaml. Existing .md files are read as fallbacks
with no migration required for current users.

Changes:
- preferences.js: add yaml path getters, load chain tries .yaml first, add
  parsePreferencesYaml() for direct YAML parse without frontmatter extraction
- templates/preferences.yaml: new canonical template (pure YAML with comment
  header pointing to preferences-reference.md)
- gitignore.js: ensurePreferences() creates preferences.yaml; simplified by
  removing scaffold-versioning dependency
- init-wizard.js: buildPreferencesFile() produces pure YAML, writes preferences.yaml
- commands-prefs-wizard.js: savePreferencesFile() helper handles .yaml vs .md;
  ensurePreferencesFile uses yaml template for yaml paths
- preferences-template-upgrade.js: yaml files get raw YAML on upgrade
- planning-depth.js: returns {path, isYaml}, handles both formats
- deep-project-setup-policy.js: isWorkflowPrefsCaptured() tries all 3 paths
- detection.js: preferences.yaml added to all detection checks
- auto-worktree.js: canonical=yaml, LEGACY_PREFERENCES_FILES=["PREFERENCES.md","preferences.md"]
- auto-bootstrap-context.js: preferences.yaml before PREFERENCES.md in list
- guided-flow.js / worktree-root.js: existence checks include preferences.yaml
- User-visible strings / comments updated throughout

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-10 21:05:10 +02:00

3.7 KiB

TODO

Unimplemented items consolidated from root *.md files. Source file noted for each item.


Critical / Correctness

  • Port fix(security): harden project-controlled surfaces — env isolation + transport cleanup done; gsd-2 trust/dedup hunks (server.ts, mcp-client/index.ts) not applicable (packages absent) (BUILD_PLAN.md Tier 0.5 #2)
  • Port agent-session/agent-end transition fixes — _sessionSwitchInFlight guard + sessionSwitchGeneration pattern implemented in auto/resolve.js + run-unit.js (BUILD_PLAN.md Tier 0.5 #7-10)
  • Cloudflare Workers AI provider — CLOUDFLARE_API_KEY/CLOUDFLARE_ACCOUNT_ID (pi-mono PR #3851) (BUILD_PLAN.md Tier 0 #8)

Architecture / Design Gaps

  • Schema reconciliation: update SPEC.md to 3-table model (milestones/slices/tasks vs single units) (BUILD_PLAN.md Tier 1.3)
  • Persistent agents v1 command surface — /sf agent run|reset|delete|inspect (BUILD_PLAN.md Tier 2.1)
  • Intent chapters (chapter_open/chapter_close — crash-resume context) (BUILD_PLAN.md Tier 2.3)
  • PhaseReview 3-pass review (establish-context → parallel chunked → synthesis) (BUILD_PLAN.md Tier 2.4)
  • last_error cap to 4 KB head+tail; full payload to file (BUILD_PLAN.md Tier 2.6)
  • Port workflow state machine hardening (gsd-2 f2377eedd, b9a1c6743, 153fb328a, 381ccdef5, 371b2eb31) (BUILD_PLAN.md Tier 0.5 #13, UPSTREAM_CHERRY_PICK_CANDIDATES.md Cluster F)
  • Port fix(claude-code-cli): persist Always Allow for non-Bash tools (gsd-2 a88baeae9) (BUILD_PLAN.md Tier 0.5 #11)

Medium Priority / Quality

  • Replace isHeavyModelId() name-matching heuristic with capability-based check (PRODUCTION_AUDIT_GRADE.md #9, PRODUCTION_AUDIT.md 3.3)
  • Add version field to task frontmatter and mode state (schema versioning) (PRODUCTION_AUDIT_GRADE.md #8)
  • Integration tests for full remote steering pipeline (PRODUCTION_AUDIT.md Long Term #10)
  • Log frontmatterErrors in sf-db.js instead of silently dropping validation errors (PRODUCTION_AUDIT.md 3.1)
  • Search provider registry refactor — consolidate provider list across files into SearchProviderRegistry (BUILD_PLAN.md Tier 1+)
  • Update ARCHITECTURE.md self-evolution section (triage pipeline IS active; injection IS automatic now) (ARCHITECTURE.md)
  • Add Mermaid state machine diagram to ARCHITECTURE.md (ARCHITECTURE.md)
  • Symlinked packages/resources/skills/sessions dedup (pi-mono PR #3818) (BUILD_PLAN.md Tier 0 #6)

Long-term / Deferred

  • Singularity Knowledge + Agent Platform (Go re-platform, ~12 weeks) (BUILD_PLAN.md Tier 1+)
  • sf-worker SSH host (Go, wish + xpty, ~3 weeks) (BUILD_PLAN.md Tier 4)
  • Charm TUI client (sf-tui in Go, ~12-16 weeks) (BUILD_PLAN.md Tier 1+)
  • Flight recorder (x/vcr, ~3 weeks) (BUILD_PLAN.md Tier 1+)
  • Full swarm chat for subagent tool (Option C, depends on persistent-agent layer) (BUILD_PLAN.md Tier 1+)
  • Caveman input-side prompt compression (rewrite execute-task/plan-slice prompts) (BUILD_PLAN.md Tier 1+)
  • Runtime input preprocessor (terse_prompts: true dispatch transform, ~3-4 days) (BUILD_PLAN.md Tier 1+)
  • Judge calibration + eval runner service (Go/Charm, ~2-3 weeks post SM) (BUILD_PLAN.md Tier 1+)
  • M009 promote-only adoption review — create sf schedule entry (2 weeks after M009 close) (BACKLOG.md)
  • Establish pi-mono SDK sync cadence (recurring check schedule) (BUILD_PLAN.md Tier 1+)
  • scripts/port-from-gsd2.sh automation script (UPSTREAM_PORT_GUIDE.md)
  • TypeScript migration for UOK modules (kernel.js, etc.) (PRODUCTION_AUDIT_COMPLETE.md, PRODUCTION_AUDIT_GRADE.md)