II.
Page JSON
Structured · livepage:docs-harness-features-backlog-implementation-recommendations
Implementation Recommendations json
Inspect the normalized record payload exactly as the atlas UI reads it.
{
"id": "page:docs-harness-features-backlog-implementation-recommendations",
"_kind": "Page",
"_file": "wiki/docs/harness-features-backlog/implementation-recommendations.md",
"_cluster": "wiki",
"attributes": {
"nodeKind": "Page",
"sourcePath": "docs/harness-features-backlog/implementation-recommendations.md",
"sourceKind": "repo-docs",
"title": "Implementation Recommendations",
"displayName": "Implementation Recommendations",
"slug": "docs/harness-features-backlog/implementation-recommendations",
"articlePath": "wiki/docs/harness-features-backlog/implementation-recommendations.md",
"article": "\n# Implementation Recommendations\n\nPhased implementation plan for the 147 babysitter-native gaps. All recommendations are framed from the orchestration platform perspective.\n\n> **Note**: This document groups gaps by implementation affinity (what makes sense to build together). The [Roadmap](./roadmap.md) groups by dependency ordering (what must be built first). The two use different sequencing -- consult the roadmap for prerequisite chains.\n\n## Phase 1: Foundation (Weeks 1-4)\n\n### 1.1 Prompt Strata Model (GAP-PROMPT-001)\n\n**Objective**: Separate prompt assembly into cache-friendly strata.\n\n**Implementation**:\n1. Define `PromptStratum` type in `packages/babysitter-sdk/src/prompts/`\n2. Tag each prompt section with `stable`, `runtime`, or `turnLocal`\n3. Compose prompts stratum-by-stratum with clear boundaries\n4. Add `--show-strata` flag to `instructions:*` commands\n\n**Acceptance Criteria**:\n- [ ] All prompt sections tagged with stratum\n- [ ] Prompt assembly preserves stratum ordering\n- [ ] `instructions:babysit-skill --show-strata` shows stratum boundaries\n\n### 1.2 Governance Policy Layer (GAP-SEC-001)\n\n**Objective**: Centralized policy evaluation for security governance.\n\n**Implementation**:\n1. Create `packages/babysitter-sdk/src/governance/` module\n2. Define `PolicyRule` type with evaluation logic\n3. Evaluate policies at effect dispatch in `processContext.ts`\n4. Log policy decisions to structured JSONL\n\n**Acceptance Criteria**:\n- [ ] `PolicyEngine` evaluates rules at effect dispatch\n- [ ] Policy decisions logged to `~/.a5c/logs/`\n- [ ] Existing breakpoint rules integrated as policy source\n\n### 1.3 JSON API Foundation (GAP-JSON-001 + GAP-JSON-002)\n\n**Objective**: Programmatic JSON API for run and effect lifecycle.\n\n**Implementation**:\n1. Extract CLI command logic into importable API functions\n2. Define JSON request/response protocol for runs and effects\n3. Expose via MCP tools and direct import\n4. Support both sync and async patterns\n\n**Acceptance Criteria**:\n- [ ] Run creation, iteration, and status via JSON API\n- [ ] Effect dispatch and result posting via JSON API\n- [ ] API usable from Node.js without shell invocation\n\n### 1.4 Streaming Output Capture (GAP-SUBOBS-001)\n\n**Objective**: Real-time output from harness invocations.\n\n**Implementation**:\n1. Pipe stdout/stderr from child processes in `invokeHarness()`\n2. Stream events to observer dashboard\n3. Store streaming output in task artifacts\n\n**Acceptance Criteria**:\n- [ ] Real-time output visible during harness invocation\n- [ ] Observer dashboard shows live output per task\n\n### 1.5 Capability-Based Routing (GAP-HADAPT-001)\n\n**Objective**: Route tasks to harnesses by capability.\n\n**Implementation**:\n1. Define capability declarations per harness adapter\n2. Add required capabilities to task definitions\n3. Implement matching in routing logic\n\n**Acceptance Criteria**:\n- [ ] Harnesses declare capabilities (code-gen, search, edit, etc.)\n- [ ] Tasks matched to capable harnesses\n- [ ] Fallback to default when no match\n\n### 1.6 Session-to-Run Model (GAP-SESSION-001)\n\n**Objective**: Sessions contain multiple runs.\n\n**Implementation**:\n1. Extend session schema to track multiple runIds\n2. Add `session:list-runs` command\n3. Preserve session context across run boundaries\n\n**Acceptance Criteria**:\n- [ ] Sessions track multiple run IDs\n- [ ] Session state persists across runs\n\n### 1.7 Run Health + Status (GAP-STATE-008 + GAP-UX-005 + GAP-UX-006 + GAP-OBS-001)\n\n**Objective**: Health scoring and unified status view.\n\n**Implementation**:\n1. Define `RunHealthScore` from journal analysis\n2. Enhance `run:status` with `--rich` flag\n3. Add `task:list --grouped` for organized pending work\n4. Integrate health into `harness:doctor`\n\n**Acceptance Criteria**:\n- [ ] Health score computed from journal\n- [ ] `run:status --rich` shows unified view\n- [ ] `task:list --grouped` organizes by kind\n\n### 1.8 Parallel Execution (GAP-PAR-001 + GAP-PAR-009)\n\n**Objective**: Concurrent effect execution using scheduler hints.\n\n**Implementation**:\n1. Read scheduler hints in babysit skill\n2. Execute same-group effects concurrently\n3. Implement sleep strategy for sleepUntilEpochMs\n\n**Acceptance Criteria**:\n- [ ] Parallel-grouped effects execute concurrently\n- [ ] Sleep effects deferred until epoch passes\n\n### 1.9 Tool Quick Wins (GAP-TOOLS-035 + GAP-TOOLS-033 + GAP-TOOLS-038 + GAP-TOOLS-007)\n\nZero-dependency tool improvements: grep output modes, runtime config tool, ask tool alignment, JS/TS REPL.\n\n---\n\n## Phase 2: Core Infrastructure (Weeks 5-12)\n\n### 2.1 Prompt Caching + Cache-Aware Assembly (GAP-PERF-001 + GAP-PERF-005)\n\nBuild on strata model for cache optimization. Stable strata cached between iterations.\n\n### 2.2 Trust, Manifests, and Provenance (GAP-SEC-002 + GAP-SEC-003 + GAP-ECO-001 + GAP-ECO-002)\n\nUnified plugin manifest with trust classification and provenance tracking.\n\n### 2.3 Feature Registry + Compatibility (GAP-ECO-003 + GAP-ECO-004)\n\nCentral feature management with plugin compatibility checking.\n\n### 2.4 Harness Selection + Routing (GAP-AGENT-008 + GAP-HADAPT-002 + GAP-HADAPT-003 + GAP-HADAPT-004)\n\nModel selection per task, cost-based routing, and fallback chains.\n\n### 2.5 Session Infrastructure (GAP-SESSION-002 + GAP-SESSION-004 + GAP-STATE-001 + GAP-STATE-003)\n\nRich session state, cost budgets, memory extraction, and session persistence.\n\n### 2.6 JSON APIs (GAP-JSON-003 + GAP-JSON-004 + GAP-JSON-005)\n\nBreakpoint API, session API, and event streaming.\n\n### 2.7 Subagent Visibility (GAP-SUBOBS-002 + GAP-SUBOBS-003)\n\nProgress tracking and per-subagent cost tracking.\n\n### 2.8 Host Contract + Streaming (GAP-REMOTE-007 + GAP-PERF-004 + GAP-PERF-008)\n\nFormal host contract, streaming rendering, and structured continuity.\n\n### 2.9 Process Composition (GAP-PROC-001 + GAP-PROC-002 + GAP-PROC-004)\n\nProcess chaining, nesting, and parameter schemas.\n\n### 2.10 Breakpoint Workflows (GAP-BRK-001 + GAP-BRK-002 + GAP-OBS-NEW-001)\n\nApproval chains, external delegation, and webhook alerts.\n\n### 2.11 User Experience (GAP-USER-001 + GAP-USER-006 + GAP-USER-012 + GAP-USER-017)\n\nOperator command layer, cost tracking, plan mode, and plugin management.\n\n### 2.12 Security + Observability (GAP-SEC-005 + GAP-OBS-004 + GAP-PROMPT-002 + GAP-PROMPT-005)\n\nApproval postures, policy trail, capability projection, and continuity overlays.\n\n### 2.13 Async + Cross-Run (GAP-PAR-002 + GAP-AGENT-005 + GAP-AGENT-006)\n\nAsync effect execution, cross-run communication, and state sharing.\n\n### 2.14 Smart Routing Engine (GAP-ROUTE-001)\n\nCentralized routing considering capabilities, cost, model, and health. Large effort -- start framework in Phase 2, complete in Phase 3.\n\n### 2.15 MCP Integration (GAP-TOOLS-025 + GAP-MCPC-001 + GAP-MCPC-002 + GAP-MCPC-003 + GAP-MCPC-004)\n\nMCP tool discovery/invocation, channel inbound/outbound messaging, channel permission relay, MCP server management UI.\n\n### 2.16 Tool Infrastructure (GAP-TOOLS-014 + GAP-TOOLS-018 + GAP-TOOLS-030 + GAP-TOOLS-036)\n\nProgrammatic task CRUD, structured planning phase, effect cancellation, bash background execution.\n\n### 2.17 Rich Rendering Foundation (GAP-UX-001 + GAP-UX-001a + GAP-UX-001c + GAP-UX-001e + GAP-UX-001f)\n\nRich rendering engine, effect tree visualization, permission/breakpoint approval UI, progress/status line, streaming output panels.\n\n### 2.18 Prompt Enrichment (GAP-PROMPT-008 + GAP-PROMPT-009 + GAP-PROMPT-010)\n\nCoding philosophy prompt section, tool preference rules, safety/reversibility prompt framework. Build on PROMPT-001 strata model.\n\n---\n\n## Phase 3: Advanced Capabilities (Weeks 13-24)\n\n### 3.1 Session Compaction (GAP-PERF-002)\nMulti-strategy session compaction with auto-compact triggers.\n\n### 3.2 Sub-Harness Isolation (GAP-AGENT-001 + GAP-AGENT-003)\nIsolated child runs, coordinator process pattern, fan-out/fan-in.\n\n### 3.3 Multi-Harness Parallelism (GAP-PAR-003 + GAP-PAR-010)\nNamed effect groups, fork-join patterns, multi-harness concurrent dispatch.\n\n### 3.4 Daemon Mode (GAP-REMOTE-001)\nBackground service with file watcher and trigger activation.\n\n### 3.5 Observability Suite (GAP-OBS-002 through GAP-OBS-008)\nPhase timeline, prompt observability, context introspection, audit export, progress summarization.\n\n### 3.6 UX Improvements (GAP-UX-007 through GAP-UX-014)\nRich breakpoints, resume dashboard, failure triage, command discoverability, mode selection.\n\n### 3.7 Security + Privacy (GAP-SEC-004 + GAP-SEC-007)\nGeneral sandbox toggle and privacy settings.\n\n### 3.8 Process + Effect Advanced (GAP-PROC-003 + GAP-ROUTE-002 + GAP-ROUTE-003)\nProcess versioning, effect priority, and cross-run caching.\n\n### 3.9 Subagent Advanced (GAP-SUBOBS-004 + GAP-SUBOBS-005 + GAP-HADAPT-005)\nHealth monitoring, dashboard drill-down, circuit breaker.\n\n### 3.10 Session + Run (GAP-SESSION-003 + GAP-RUN-001 + GAP-RUN-003)\nSession templates, run comparison, run forking.\n\n### 3.11 Observer + Profile (GAP-OBS-NEW-002 + GAP-PROF-001)\nObserver API and profile-driven auto-configuration.\n\n### 3.12 Delegation + Templates (GAP-AGENT-004 + GAP-AGENT-007)\nBuilt-in process templates and delegation policy layer.\n\n### 3.13 Parallelization Polish (GAP-PAR-005 + GAP-PAR-006)\nParallel file operations and streaming parallelism.\n\n### 3.14 Prompt Advanced (GAP-PROMPT-003 + GAP-PROMPT-004 + GAP-PROMPT-006 + GAP-PROMPT-011 + GAP-PROMPT-012)\nPersonality overlays, prompt inspection, instructions hook, output efficiency rules, git safety protocol prompt.\n\n### 3.15 Tool Advanced (GAP-TOOLS-008 + GAP-TOOLS-012 + GAP-TOOLS-017 + GAP-TOOLS-023 + GAP-TOOLS-026 + GAP-TOOLS-027 + GAP-TOOLS-029 + GAP-TOOLS-031 + GAP-TOOLS-032 + GAP-TOOLS-034)\nWeb search, LSP integration, git worktree isolation, workflow composition, structured user interaction, skill discovery, structured output, MCP resource browsing, MCP authentication, dynamic tool discovery.\n\n### 3.16 Rich Rendering Polish (GAP-UX-001b + GAP-UX-001d)\nStructured diff rendering and message type rendering.\n\n---\n\n## Phase 4: Extended Platform (Weeks 25-40)\n\n### 4.1 Remote Infrastructure (GAP-REMOTE-004 + GAP-REMOTE-006 + GAP-REMOTE-008 + GAP-REMOTE-009)\nCron triggers, MCP client, streaming protocol, host-mediated interaction.\n\n### 4.2 State + Memory (GAP-STATE-002 + GAP-STATE-006)\nMemory consolidation and session rewind.\n\n### 4.3 Analytics + Config (GAP-OBS-006 + GAP-ECO-005 + GAP-SEC-006)\nAnalytics pipeline, config layering, OAuth integration.\n\n### 4.4 Performance Polish (GAP-PERF-006 + GAP-PERF-007 + GAP-PROMPT-007)\nIncremental streaming, aggressive parallelism, compression families.\n\n### 4.5 Lifecycle Polish (GAP-BRK-003 + GAP-RUN-002)\nBreakpoint analytics and run archival.\n\n### 4.6 Tool Polish (GAP-TOOLS-020 + GAP-TOOLS-021 + GAP-TOOLS-028 + GAP-TOOLS-037)\nScheduled orchestration triggers, external event triggers, sleep/delay enhancement, fetch content processing.\n\n---\n\n## Phase 5: Aspirational (Weeks 41+)\n\n### 5.1 Remote Sessions (GAP-REMOTE-003)\nWebSocket-based remote session transport.\n\n### 5.2 Session Collaboration (GAP-SESSION-005)\nSession sharing and collaborative orchestration.\n\n---\n\n## Dependencies Graph (Critical Path)\n\n```\nPhase 1 Foundation:\n GAP-PROMPT-001 --> Phase 2: GAP-PERF-001, GAP-PERF-005\n GAP-SEC-001 --> Phase 2: GAP-SEC-002, GAP-OBS-004\n GAP-HADAPT-001 --> Phase 2: GAP-HADAPT-002, GAP-ROUTE-001\n GAP-SESSION-001 --> Phase 2: GAP-SESSION-002, GAP-STATE-003\n GAP-JSON-001 --> Phase 2: GAP-JSON-003, GAP-JSON-005\n GAP-SUBOBS-001 --> Phase 2: GAP-SUBOBS-002, GAP-SUBOBS-003\n\nPhase 2 --> Phase 3:\n GAP-PERF-001 --> GAP-PERF-002 (compaction)\n GAP-AGENT-008 --> GAP-AGENT-001 (sub-harness)\n GAP-ROUTE-001 --> GAP-AGENT-003 (coordinator)\n GAP-PAR-002 --> GAP-PAR-003 (multi-harness)\n\nPhase 3 --> Phase 4:\n GAP-REMOTE-007 --> GAP-REMOTE-008 --> GAP-REMOTE-003\n```\n\n## Effort Estimates\n\n| Phase | Gaps | Weeks | Team Size |\n|-------|------|-------|-----------|\n| Phase 1 | 17 | 4 | 2-3 developers |\n| Phase 2 | 59 | 10 | 3-4 developers |\n| Phase 3 | 51 | 14 | 3-4 developers |\n| Phase 4 | 18 | 16 | 2 developers |\n| Phase 5 | 2 | Open-ended | As needed |\n| **Total** | **147** | | |\n",
"documents": []
},
"outgoingEdges": [],
"incomingEdges": [
{
"from": "page:docs-harness-features-backlog",
"to": "page:docs-harness-features-backlog-implementation-recommendations",
"kind": "contains_page"
}
]
}