Architectural Decisions โ Patch v2.1
1. PSA Confidence โ Deterministic Rubric
Self-scoring removed. 4-dimension pass/fail rubric: goal clarity, scope completeness, success criteria, required capabilities. Any fail = block execution.
โ
Locked
2. Ledger / DB Abstraction Layer
LedgerStore interface: write / read / update. No direct DB calls outside the layer. Adapter choice (SQLite vs Postgres) pending Jixian's decision.
โ ๏ธ Pending
3. Conflict Resolution โ External Evaluator Only
Agent self-confidence removed. Resolution: Rule-based (ledger precedent) โ Evaluator arbitration (two-source rule) โ Human Decision Card.
โ
Locked
4. Brief Rewrite Loop โ Hard Cap 3
Max 3 brief rewrites per specialist. After 3rd failure: hard stop + Decision Card. Options: retry with different specialist / skip subtask / cancel task.
โ
Locked
5. Cost Model โ Rolling Tracking
Pre-flight total estimation removed. Track: tokens_used, burn_rate. Alerts: 50% โ warning, 80% โ escalation, 100% โ hard stop. Phase 1 cap: $2.00.
โ
Locked
6. Meta-Agent Cost Tracking
Meta-Agent LLM calls count toward total task budget. Shown as distinct line item on dashboard. No hidden costs anywhere in the system.
โ
Locked
7. PSA Timeout โ 24h Default
PSA notifies user immediately on clarification needed. System does NOT block after 5 min. Default timeout: 24h (configurable per task). Expired โ task marked stale.
โ
Locked
Open Items โ Blocking Phase 1 Start
DB Adapter Decision
SQLite (Phase 1โ3, migrate at Phase 4) vs Postgres from day one. LedgerStore abstraction is ready โ just need the starting adapter confirmed.
๐ค Jixian Wang
Spec Cleanup โ Manus Hallucinated Content
Some sections in the master spec were added by Manus AI from memory without being explicitly decided. Sig to identify and flag; Fable to remove/rewrite.
๐ค Sig Dug + Fable
Kickoff Prompt Update
claude_code_kickoff_prompt.md needs to reference patch_spec_v2_1 as a mandatory override doc. Currently still points to SQLite hardcoded.
๐ค Fable (after above items resolved)
Rollout Plan
1
Phase 1 โ Supervised Execution โ We are here
Max depth: 0 (no sub-agent spawning) ยท Budget cap: $2.00 ยท Manual output approval required
Goal: Verify PSA, Research Engine, basic memory tiers on simple goals.
Depth: 0
Cap: $2.00
Manual approval
Goal: Verify PSA, Research Engine, basic memory tiers on simple goals.
2
Phase 2 โ Bounded Autonomy
Full teams. 1 level of recursive sub-agent spawning. Budget cap: $10.00. User only intervenes on Critical Exceptions.
Depth: 1
Cap: $10.00
Auto-eval
3
Phase 3 โ Full Production Autonomy
Max recursion depth 3. Multiple concurrent tasks. Dynamic budgets. Dashboard monitoring active.
Depth: 3
Dynamic budget
Concurrent tasks
4
Phase 4 โ Distributed Scale
Migrate SQLite โ Postgres (LedgerStore swap). Chroma โ distributed. Dashboard flags threshold adjustments for human review.
DB migration
Scale infra