2.9 KiB
2.9 KiB
UOK Droid Accounting Integration
Purpose
Capture the useful Droid mission-accounting patterns as SF-native UOK contracts without importing Droid's model configuration, file-first state model, or mission runtime shape.
Adopted Value
- Role-based model policy: durable intent is
autoplus symbolic constraints, never concrete provider/model IDs. - Model route evidence: runtime-selected provider/model is recorded as evidence after SF's existing auto selector runs.
- Secret-safe model route snapshots: reproducibility metadata is retained while API keys, headers, and tokens are redacted.
- Typed progress events: stable machine event names such as
unit_selected,model_auto_resolved,unit_completed, andunit_blocked. - Structured unit handoff: closeout fields for changed files, tests, commands, failures, leftover work, verification status, and fulfilled assertions.
- Assertion coverage: compare required validation assertions with fulfilled handoff assertions.
- Worker lineage: track worker session IDs, current/completed/failed session IDs, and lifecycle events.
- Tool command registry: worker-visible command allowlists are explicit; Droid-style
servicesis treated only as a legacy daemon-service alias.
Live Now
model_auto_resolved,unit_selected,unit_completed, andunit_blockedprogress events are emitted into the existing journal stream alongside legacy events.model-auto-resolvedUOK audit payloads include secret-safe route snapshots.- UOK outcome memory recording uses the real
createMemory({ ... })API and records source unit metadata. - Focused tests cover the projection/accounting helpers and the UOK memory integration.
Deliberately Deferred
- No DB migration yet. These are projections and contracts until real query/recovery needs prove first-class rows are worth it.
- No hard closeout gate yet.
assessAssertionCoverage()exists, but completion semantics should change only with a focused gate test. - No context-pack renderer yet.
buildWorkerContextPackProjection()is a shape builder, not the prompt renderer. - No command enforcement yet.
normalizeToolCommandRegistry()constrains advertised tools/commands; execution enforcement must wire through existing permission/run-control paths. - No new model router. SF's existing auto model selector remains the only route resolver.
Next Integration Order
- Persist worker lineage from real dispatch lifecycle events.
- Add assertion coverage as a closeout gate before marking a unit complete.
- Render worker context packs from existing SF DB/runtime state.
- Feed the tool command registry into worker prompts.
- Promote selected projection fields into SQLite only after dashboards/recovery flows need durable queries.
Stop Rule
Do not add more schema helpers for this Droid accounting thread until an existing SF runtime path needs a concrete caller. The next work should be integration into existing UOK dispatch, closeout, prompt, or recovery flows.