Commit graph

12 commits

Author SHA1 Message Date
Mikael Hugo
89677b7e9b sf snapshot: uncommitted changes after 110m inactivity 2026-05-08 00:17:47 +02:00
Mikael Hugo
5c32d91124 feat: promote schedule and self-feedback state to db 2026-05-07 05:34:42 +02:00
Mikael Hugo
fce0c4c781 Tier 1.1: Implement vault credential resolver for provider keys
- Add vault-credential-resolver.js: Async credential resolution with vault:// URI support
- Integration with vault-resolver.js (low-level Vault client)
- Update doctor-providers.js to detect and report vault URIs
- Synchronous doctor checks (no network I/O) with lazy async resolution
- Fail-open semantics: vault unavailable -> fall back to plaintext
- 28 tests for credential resolver (all passing)
- ADR-0078: Architecture and auth chain documentation

Features:
- vault://secret/path/to/secret#fieldname URI format
- Auth chain: VAULT_TOKEN -> ~/.vault-token -> AppRole (reserved)
- Helper functions: couldBeVaultUri, hasProviderCredentialEnvVar, resolveProviderCredential, getCredentialValue, formatCredentialInfo
- Full backward compatibility with plaintext keys and auth.json

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-07 04:59:07 +02:00
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
Mikael Hugo
9ab0b9fe63 docs: tighten legacy state fallback wording 2026-05-07 03:25:20 +02:00
Mikael Hugo
2fae96d539 docs: align runtime state and mcp boundaries 2026-05-07 03:09:55 +02:00
Mikael Hugo
f192dbfca0 docs: add ADR-076 for UOK memory integration decisions
Document the three-phase integration of SF memory system with UOK:

Phase 1: Unit outcome recording (recordUnitOutcomeInMemory)
- Records success/failure patterns with 0.9/0.5 confidence
- Fire-and-forget async, never blocks execution

Phase 2: Dispatch ranking enhancement (enhanceUnitRankingWithMemory)
- Queries memory for similar patterns
- Boosts matching candidates by up to 15% (conservative limit)
- Deterministic embeddings ensure reproducible ranking

Phase 3: Gate context enrichment (enrichGateResultWithMemory)
- Diagnostic only; never changes gate pass/fail logic
- Helps operators understand recurring issues

All memory operations gracefully degrade if DB unavailable.
56 test cases validate integration across all phases.

Relates to ADR-0075 (UOK gates), ADR-008 (SF tools).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-07 02:05:01 +02:00
Mikael Hugo
a73ea845e7 sf snapshot: uncommitted changes after 61m inactivity 2026-05-06 10:04:20 +02:00
Mikael Hugo
76b218762b fix: harden sf autonomous runtime 2026-05-06 06:02:46 +02:00
Mikael Hugo
3960e42b26 docs: align sf purpose doctrine and docs 2026-05-06 00:38:36 +02:00
Mikael Hugo
47c806d733 fix: version sf extension runtime sources 2026-05-04 23:27:20 +02:00
Mikael Hugo
ed4a4bc93a chore: commit current worktree state 2026-05-04 19:28:39 +02:00