Immediate Action Items — Week of 4/1-4/7
Quick reference for resuming work after session recovery.
✅ Pre-Work Complete
- Session docs synthesized into docs/reference
- Gap analysis catalogued (P0-P2 + risksection)
- Current capabilities inventory done
- Implementation roadmap drafted
- Success metrics defined
🚀 This Week: Phase 2A Execution
Monday 4/1
- Review SESSION_SYNTHESIS_20260401.md and PLATFORM_GAP_ANALYSIS_20260401.md
- Decide on Module Semantics Hardening phases (A/B/C approval)
- Decide on Graph Schema Coherence approach (in-place vs new migrations)
- Assign owners:
- Owner 1: Gap 1 (Closed Loops) + Gap 2 (Tool Contracts)
- Owner 2: Gap 4 (Observability) + Gap 3 (Agent-Safe Primitives)
Tuesday-Wednesday 4/2-4/3: Gap 1 — Closed Feedback Loops ✅
Goal: Make step observer and step history queryable
-
Create
ExecutionSteptype (Zod schema)interface ExecutionStep { stepId: string; index: number; toolName: string; inputs: Record<string, unknown>; outputs: Record<string, unknown>; durationMs: number; statusCode: number; emittedAt: ISO8601; } -
Extend
modules.query_stateresponse to includepreviousSteps: ExecutionStep[] -
Add in-memory step cache to bootstrap-runtime (step cache per traceId)
-
Add test: agent calls query_state, gets empty steps; calls tool; calls query_state again, gets step history (4 tests passing)
Thursday 4/4: Gap 2 — Declarative Tool Contracts ✅
Goal: Add preconditions/postconditions metadata to tools
-
Create package skeleton:
packages/tool-contracts/src/ contracts.ts -- all interfaces + evaluators + dependency graph index.ts -- public exports contracts.test.ts -- 14 tests -
Define interfaces:
PreconditionPredicate(can evaluate: context → boolean)PostconditionPredicate(can evaluate: context → boolean)SemanticType(8 types: ltree-path, resource-id, module-ref, uuid, semver, file-path, json-object, unknown)DeclaredToolContract(input, output, pre, post, deps, capabilities, resourceLimits)ToolDependencyGraph(cycle detection + unregistered dep validation)
-
Add to modules.compile (deferred to Friday 4/5):
preconditions: [ { predicate: "input.moduleRef exists", errorCode: "MODULE_NOT_FOUND" } ] postconditions: [ { predicate: "output.bundleSummary validates", errorCode: "INVALID_BUNDLE" } ] dependencies: ["modules.validate"] -
Add test: 14 tests covering all contract enforcement scenarios
Friday 4/5: Integration + Planning
- Wire
@savvi-studio/tool-contractsinto studio-mcp modules.compile handler - Run existing tests (studio-mcp, graph-module-engine) — 76 passing as of 4/4
- Plan Phase 2B (Observability) for next week
- Documentation: update SESSION_SYNTHESIS_20260401.md with decision log
📋 Success Checklist for End of Week
Before moving to Phase 2B (Observability), verify:
- Step observer captures and returns execution steps
- query_state includes previousSteps in response
- Tool contracts preconditions/postconditions defined
- Tool dependencies graph queryable
- All new tests passing (18 new tests)
- No regressions in existing tests (76 total passing)
- Decision log updated in SESSION_SYNTHESIS (Friday)
📚 Reference Documents
Synthesis:
- SESSION_SYNTHESIS_20260401.md — Full context recovery
- PLATFORM_GAP_ANALYSIS_20260401.md — Gap inventory + roadmap
Session Archives (for details):
phase1-studio-mcp-completion.md— Observation tools statusai-first-platform-gap-analysis.md— Detailed P0 gapsmcp-architecture-deep-dive.md— Tool map (9 tools)plan.md— Module semantics hardening phases
Codebase Guides:
🔧 Terminal Commands
# View failing tests
pnpm run test --workspace-root
# Run studio-mcp tests
pnpm -C packages/studio-mcp test
# Run graph-module-engine tests
pnpm -C packages/graph-module-engine test
# Check codegen
pnpm run codegen
# Run CI audit
pnpm -C packages/graph-module-model audit:layers
# Watch-mode development (studio-mcp)
pnpm -C packages/studio-mcp dev
⚠️ Known Blockers / Risks
-
Existing test failures (not caused by session work):
packages/graph-module-compile/tests/policy-handles.test.ts— codegen prefix mismatchpackages/graph-module-engine/tests/manifest-collection.test.ts— namespace conflict- See phase1-studio-mcp-completion.md for full list
-
Decision pending: Graph Schema Coherence approach
- Option A: In-place edits to migration 301-311
- Option B: New forward migrations
- Recommend: Option A (lowest risk)
-
Permission model complexity: Current 4-level bitmask (1/3/7/15) vs planned 16-bit design
- For now: continue with 4-level
- Long-term: plan migration to 16-bit
Document Created: 2026-04-01 Next Update: Friday 4/5 (end of week 1)