Commit graph

23 commits

Author SHA1 Message Date
Mikael Hugo
b5893d1c28 Make SF direct command surface baseline 2026-05-08 01:34:07 +02:00
Mikael Hugo
6fc054e7c3 sf snapshot: uncommitted changes after 49m inactivity 2026-05-08 01:07:24 +02:00
Mikael Hugo
89677b7e9b sf snapshot: uncommitted changes after 110m inactivity 2026-05-08 00:17:47 +02:00
Mikael Hugo
ca431e7e78 Tier 2.5 Phase 5-6: Documentation and integration tests
Added comprehensive documentation and end-to-end test suite for turn_status:

Phase 5 Documentation:
- Added 'turn_status Marker System' section to preferences-reference.md
- Explains three states (complete/blocked/giving_up)
- Covers why, how, and best practices
- Includes doctor check integration docs

Phase 6 Integration Tests:
- Created turn-status-integration.test.ts (34 tests)
- Tests end-to-end signal pipeline (extraction→resolution→action)
- Tests marker placement, format, case-insensitivity
- Tests multi-block agent output (code, JSON, tool output)
- Tests error handling and edge cases
- Tests signal resolution semantics
- Tests validation and introspection functions
- Tests doctor check integration
- Tests real-world scenarios (research, execute, complete slices)
- Tests cross-cutting concerns (idempotency, side effects)

Test Coverage:
- End-to-end signal pipeline: 6 tests
- Marker placement and format: 5 tests
- Multi-block agent output: 3 tests
- Error handling and edge cases: 5 tests
- Signal resolution semantics: 6 tests
- Validation and introspection: 5 tests
- Doctor check integration: 2 tests
- Real-world scenarios: 3 tests
- Cross-cutting concerns: 3 tests

Results:
- 31 turn-status-parser tests passing (existing)
- 34 turn-status-integration tests passing (new)
- Total: 65/65 passing
- Core build: ✓ passing
- No regressions

Tier 2.5 Complete:
- Phase 1: Markers in prompts ✓
- Phase 2: Parser + extraction ✓
- Phase 4: Doctor check ✓
- Phase 5: Documentation ✓
- Phase 6: Integration tests ✓
- Phase 3: Signal transitions (blocked—pending harness context)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-07 04:04:45 +02:00
Mikael Hugo
a2a44f8d15 feat: implement Tier 1.1 Vault secret resolver
- Create vault-resolver.js: URI parser, auth chain (env → file → AppRole), in-memory caching
- Add resolveConfigValueAsync() to pi-coding-agent for lazy vault URI resolution
- Integrate vault credential resolution into auth-storage credential loading path
- Add doctor check (checkVaultHealth) for vault setup validation at startup
- Document vault setup, auth methods, examples, troubleshooting in preferences-reference.md
- Add comprehensive test suite (18 tests) for vault URI parsing, auth, caching, fallback

Auth Chain:
1. VAULT_TOKEN env var (simplest for local dev)
2. ~/.vault-token file (recommended for local dev)
3. VAULT_ROLE_ID + VAULT_SECRET_ID env vars (AppRole for CI/CD)

Fail-open behavior: If vault unavailable, falls back to plaintext URIs to allow continued operation.

URI Format: vault://secret/path/to/secret#fieldname
Example: ANTHROPIC_API_KEY=vault://secret/anthropic/prod#api_key

Tests: parseVaultUri, isVaultUri, resolveSecret, caching, edge cases all passing (18/18).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-07 02:39:51 +02:00
Mikael Hugo
be971f8abc feat: Tier 1.4 config schema alignment - add 10 execution timeouts and limits
Add comprehensive support for execution resource limits and timeout configuration.

New Config Keys (10 total):
- context_compact_at: Token threshold for compacting context snapshots
- context_hard_limit: Absolute context hard limit (fail if exceeded)
- unit_timeout: Single unit execution timeout (seconds)
- unit_timeout_by_phase: Phase-specific timeout overrides
- max_agents_by_phase: Max parallel agents per phase
- turn_input_required: Require explicit user input before continuing
- worktree_mode: Worktree management (none/auto/manual)
- tool_abort_grace: Grace period before forcefully aborting tools (ms)
- max_turns_per_attempt: Max turns per unit before retry
- hot_cache_turns: Recent turns to keep in fast memory

Implementation:
1. preferences-types.js: Added all 10 keys to KNOWN_PREFERENCE_KEYS
2. preferences-validation.js: Full validation with constraints
3. preferences.js: 10 getter functions with mode-based defaults
4. doctor-config-checks.js: Startup validation checks
5. doctor.js: Integrated checks into diagnostic pipeline
6. preferences-reference.md: Comprehensive documentation

Doctor Checks (9 diagnostic rules):
- context_compact_at > context_hard_limit detection
- Invalid worktree_mode detection
- Context/timeout/agent range warnings
- Auto-fix support for fixable errors

Mode Defaults:
- solo: conservative (20k compact, 35k hard)
- team: collaborative (25k compact, 40k hard)

BUILD_PLAN Tier 1.4 milestone: COMPLETE.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-07 02:30:41 +02:00
Mikael Hugo
adf28d69b4 feat: run solver eval from autonomous lifecycle 2026-05-06 04:02:40 +02:00
Mikael Hugo
34140fff38 fix: raise autonomous solver iteration budget 2026-05-06 03:29:05 +02:00
Mikael Hugo
152da756a1 sf snapshot: uncommitted changes after 61m inactivity 2026-05-06 03:25:43 +02:00
Mikael Hugo
46db1e95ef refactor: remove legacy autonomous aliases 2026-05-05 18:47:50 +02:00
Mikael Hugo
4c98cb8c33 fix: make autonomous mode canonical 2026-05-05 15:42:10 +02:00
Mikael Hugo
3af4185b20 fix: make sift the codebase indexer 2026-05-05 14:27:03 +02:00
Mikael Hugo
61485c5bef fix(sf): remove legacy completion tool aliases 2026-05-02 17:51:38 +02:00
Mikael Hugo
12538bbfa3 sf snapshot: pre-dispatch, uncommitted changes after 32m inactivity 2026-05-02 11:25:51 +02:00
Mikael Hugo
62d430ab23 Add provider smoke benchmark and headless updates 2026-04-30 10:19:18 +02:00
Mikael Hugo
cd69e85608 Harden SF model routing and harness contracts 2026-04-30 07:41:24 +02:00
Mikael Hugo
a45f873124 chore: snapshot WIP before resuming M004/S03 auto
84 files spanning provider capabilities, model routing, headless
runtime, sf auto subsystems, gitbook docs, and test coverage. Snapshotted
so headless auto can resume M004 (Production Readiness) S03
(Verification Gate Validation) on a clean tree.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 06:31:19 +02:00
Mikael Hugo
f98a1e360e batch: codex-rescue session output (multiple in-flight tasks)
Combined output of multiple parallel codex-rescue runs that produced
working-tree edits but didn't commit. Tasks contributing:

- prefs: per-provider model allow-list (provider_model_allow) — manual
- TUI scroll + unresponsive (a7884d1a / bt3fpn4y2)
- planningMeeting required (aa09e904 / br127l763)
- Logs UX 4-pack (a5c65314 / btcplhu7f)
- Gate auto-resolve + completion nudge (ae4c8b64 / bw1w1fjkp)
- sf_task_complete atomic + retry (a7a079b4 / b20cy5owv)
- Multi-model meeting + minimax M2.7 + draft promotion (a756faac / task-moifjknd-lwjc98)
- Per-role slice prompts (a94c3e1a)
- Per-role vision-meeting prompts (afd165a0 / task-moifple5-lcwtjl)
- Schema sweep (ac994b1e / task-moifq7pu-83coqz)
- Flow audit (ad26ecfd / bttj4vrqm)

Typecheck passes. Tests not run as a full suite — spot-check after merge.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: OpenAI Codex <noreply@openai.com>
2026-04-28 11:52:42 +02:00
Mikael Hugo
8e827147c9 feat(code-intelligence): add sift indexer backend alongside project-rag
Generalize the code-intelligence hook to support multiple indexer
backends, with sift (rupurt/sift) as a new option next to the existing
project-rag MCP server. Backend is selected via CodebaseMapPreferences.

- code-intelligence.ts: new abstraction + sift backend (detect, resolve,
  status, context-block contribution)
- preferences-types.ts: codebaseIndexer field (project-rag | sift | none)
- preferences-validation.ts: validate the new field
- bootstrap/system-context.ts, commands-codebase.ts: dispatch on backend
- tests/code-intelligence.test.ts: sift detection/resolution/status tests
  (19 pass, 0 fail)

project-rag path unchanged and continues to work.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-28 05:05:26 +02:00
Mikael Hugo
e2147c0694 sf snapshot: pre-dispatch, uncommitted changes after 43m inactivity 2026-04-25 06:34:49 +02:00
Mikael Hugo
7b6c9dd099 sf snapshot: pre-dispatch, uncommitted changes after 4703m inactivity 2026-04-25 05:51:29 +02:00
ace-pm
b29c12d5e5 refactor(native): rename gsd_parser.rs to forge_parser.rs
Final rebrand: rename remaining Rust source file to complete the gsd → forge
transition. All parser references already use forge_parser after earlier commits.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 14:58:21 +02:00
ace-pm
35dc87ef53 chore: sync workspace state after rebrand
- Rebrand commits already in history (gsd → forge)
- Sync pre-existing doc, docker, and CI config updates
- All rebrand artifacts verified in place:
  * Native crates: forge-engine, forge-ast, forge-grep
  * Log prefixes: [forge] across 22+ files
  * Binary: ~/bin/sf-run
  * Workspace scopes: @sf-run/*, @singularity-forge/*
  * Nix flake: Rust toolchain ready

System ready for: nix develop && bun run build:native

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 14:54:20 +02:00