Agentic AI Atlasby a5c.ai
OverviewWikiGraphFor AgentsEdgesSearchWorkspace
/
GitHubDocsDiscord
iiRecord
Agentic AI Atlas · Phase 2 Codebase Audit -- Adversarial Corrections
page:docs-genty-features-backlog-updated-phase2-correctionsa5c.ai
Search record views/
Record · tabs

Available views

II.Record viewspp. 1 - 1
overviewarticlejsongraph
II.
Page JSON

page:docs-genty-features-backlog-updated-phase2-corrections

Structured · live

Phase 2 Codebase Audit -- Adversarial Corrections json

Inspect the normalized record payload exactly as the atlas UI reads it.

File · wiki/docs/genty-features-backlog-updated/phase2-corrections.mdCluster · wiki
Record JSON
{
  "id": "page:docs-genty-features-backlog-updated-phase2-corrections",
  "_kind": "Page",
  "_file": "wiki/docs/genty-features-backlog-updated/phase2-corrections.md",
  "_cluster": "wiki",
  "attributes": {
    "nodeKind": "Page",
    "sourcePath": "docs/genty-features-backlog-updated/phase2-corrections.md",
    "sourceKind": "repo-docs",
    "title": "Phase 2 Codebase Audit -- Adversarial Corrections",
    "displayName": "Phase 2 Codebase Audit -- Adversarial Corrections",
    "slug": "docs/genty-features-backlog-updated/phase2-corrections",
    "articlePath": "wiki/docs/genty-features-backlog-updated/phase2-corrections.md",
    "article": "\n# Phase 2 Codebase Audit -- Adversarial Corrections\n\nDate: 2026-06-04\n\n## Summary\n\nThe Phase 2 audit upgraded many gaps from Missing/Partial to IMPLEMENTED. This adversarial review verifies those claims by reading the actual source code, checking whether modules are integrated into real code paths, and comparing against the Phase 1 Target State descriptions.\n\n**Verdict:** The code modules exist and are real, substantive implementations -- not stubs. However, several IMPLEMENTED claims overstate the integration level. The modules are written but not wired into the orchestration loop, or they satisfy only the data-structure/algorithm aspect of the target state while missing critical runtime integration.\n\n---\n\n## 1. CHALLENGE: IMPLEMENTED Claims (Originally Missing)\n\n### GAP-REMOTE-007: Host Contract Layer -- DOWNGRADE to PARTIALLY_IMPLEMENTED\n\n**Target State:** \"HostContract interface with startRun, getStatus, postEffect, subscribe methods. Implementation over existing CLI commands. Exposed via MCP server and HTTP.\"\n\n**What exists:** `packages/genty/platform/src/harness/hostContract.ts` defines `HostCapabilityManifest`, `resolveHostCapabilities()`, `validateHostContract()`, and `buildManifestFromDiscovery()`.\n\n**Problem:** The file is a type-definition and validation utility. It defines what a host CAN do, but does NOT implement the `startRun`, `getStatus`, `postEffect`, `subscribe` methods described in the target state. More critically, **this module is not imported by any other file** -- zero consumers. The HostContract is not exposed via MCP server or HTTP. This is a schema-only implementation without runtime integration.\n\n### GAP-OBS-NEW-001: Webhook and Alert System -- DOWNGRADE to PARTIALLY_IMPLEMENTED\n\n**Target State:** \"Webhook configuration per event type... Built-in integrations: Slack, PagerDuty, email. Custom webhook support. Alert throttling and deduplication.\"\n\n**What exists:** `packages/genty/platform/src/observability/webhooks.ts` provides `WebhookRegistration`, `registerWebhook()`, `filterRegistrations()`, `evaluateAlertLevel()`, `buildWebhookEvent()`.\n\n**Problem:** The module is pure functions for registry management and alert level computation. It has no HTTP delivery logic (no `fetch()` call to actually send webhooks). No built-in Slack/PagerDuty/email integrations. No alert throttling or deduplication. Only imported by index.ts barrel and a test file. The target state requires actual webhook delivery, which is absent.\n\n### GAP-STATE-001: Long-Term Memory Extraction -- DOWNGRADE to PARTIALLY_IMPLEMENTED\n\n**Target State:** \"Memory extraction from completed runs into ~/.a5c/memory/. Memories indexed by project, topic, and recency. Extracted memories injected into new run prompts as context.\"\n\n**What exists:** `packages/genty/platform/src/session/memoryExtraction.ts` provides `extractMemoriesFromSession()`, `persistMemories()`, `queryMemories()`, `pruneMemories()` with file-based storage.\n\n**Problem:** Memory extraction and persistence are implemented. However, the critical part of the target state -- \"Extracted memories injected into new run prompts as context\" -- is NOT implemented. No prompt section renders long-term memories (grep for `longTermMemory` or `renderMemory` in the prompts module returns zero results). Memories are stored but never used during prompt assembly.\n\n### GAP-HADAPT-004: Harness Fallback Chains -- Status: IMPLEMENTED (confirmed)\n\n**Target State:** \"Configurable fallback chains per task kind. If primary harness fails, retry with next harness in chain.\"\n\n**What exists:** `packages/genty/platform/src/harness/fallbackChains.ts` provides `createFallbackChain()` and `resolveFallbackHarness()`. It IS imported by `createRun/utils.ts`, meaning it is wired into the run creation path.\n\n**Verdict:** Correctly marked IMPLEMENTED. The module is clean, has proper deduplication and exhaustion detection, and is used in production code paths.\n\n### GAP-AGENT-007: Delegation Policy Layer -- Status: IMPLEMENTED (confirmed)\n\n**Target State:** \"Delegation policies define capability subsets per role... Enforced via agentic tool filtering.\"\n\n**What exists:** Full governance engine with `createPolicyEngine()`, policy categories (A/B/C/D tiers), sandbox policy, posture bridge, and permission events. The governance bridge is imported by `hookDecisionEffects.ts` in the orchestration path.\n\n**Verdict:** Correctly marked IMPLEMENTED. The governance engine evaluates rules at effect dispatch time through the orchestration pipeline.\n\n### GAP-AGENT-008: Harness Selection Policies -- Status: IMPLEMENTED (confirmed)\n\n**Target State:** \"Harness selection policies that consider task kind, capability requirements, model preference, cost constraints, and harness availability/health.\"\n\n**What exists:** `selectionPolicies.ts` with 4 named policies, `capabilityRouter.ts` with scoring. Both are imported by `createRun/utils.ts`.\n\n**Verdict:** Correctly marked IMPLEMENTED.\n\n### GAP-BRK-001: Breakpoint Approval Chains -- Status: IMPLEMENTED (confirmed)\n\n**Target State:** \"Multi-level approval chains per breakpoint type. Configurable escalation timeouts.\"\n\n**What exists:** Full `approvalChains.ts` with `ApprovalChainDefinition`, `evaluateApprovalChain()`, quorum logic, escalation paths. Imported by `createRun/orchestration/effects.ts`.\n\n**Verdict:** Correctly marked IMPLEMENTED. Wired into orchestration.\n\n### GAP-BRK-002: Breakpoint Delegation to External Systems -- Status: IMPLEMENTED (confirmed)\n\n**Target State:** \"Breakpoint routing to external systems via webhook. Async approval with configurable timeout.\"\n\n**What exists:** `delegation.ts` with `delegateBreakpoint()`, `sendDelegationWebhook()` (actual `fetch()` calls), timeout handling, rule matching.\n\n**Verdict:** Correctly marked IMPLEMENTED. This module actually sends HTTP requests and handles timeouts, unlike the webhook module.\n\n### GAP-MCPC-003: Channel Permission Relay -- DOWNGRADE to PARTIALLY_IMPLEMENTED\n\n**Target State:** \"Breakpoint prompts routed to configured channels. Channel responses race against local interaction. First approval wins. Security: channel-based approval requires explicit opt-in per breakpoint tag/expert level.\"\n\n**What exists:** `permissionRelay.ts` provides `ChannelPermissionRelay` class with `relay()`, `handleResponse()`, racing claim pattern, and security config with `terminalOnlyTags`.\n\n**Problem:** The relay, claim racing, and security config are implemented. However, this module is only exported through an index barrel -- no evidence of it being wired into the actual breakpoint resolution flow (the orchestration loop's breakpoint handling). The racing pattern exists in the module but is not connected to the CLI's local interaction flow.\n\n### GAP-JSON-002: JSON Effect Dispatch and Response Protocol -- Status: IMPLEMENTED (confirmed)\n\n**Target State:** \"JSON protocol for effect dispatch: request effect, receive pending notification, post result.\"\n\n**What exists:** Full API in `packages/genty/platform/src/api/effects.ts` with `apiListEffects`, `apiShowEffect`, `apiCancelEffect`, `apiBatchCommitEffects`. All return `ApiResult` envelopes.\n\n**Verdict:** Correctly marked IMPLEMENTED.\n\n### GAP-JSON-003: JSON Breakpoint Interaction API -- Status: IMPLEMENTED (confirmed)\n\n**Target State:** \"JSON API for breakpoint interaction: list pending breakpoints, get breakpoint context, post approval/rejection with feedback.\"\n\n**What exists:** Full API in `breakpoints.ts` with all listed operations plus auto-approval rule management. Fires `on-permission-denied` hook on rejection.\n\n**Verdict:** Correctly marked IMPLEMENTED.\n\n### GAP-REMOTE-001: Daemon Mode -- Status: IMPLEMENTED (confirmed)\n\n**Target State:** \"System service with start/stop/status lifecycle. File change watcher. Trigger-based activation.\"\n\n**What exists:** Full daemon in `packages/genty/platform/src/daemon/`: `lifecycle.ts` (start/stop/status with PID management), `timerScheduler.ts` (cron), `webhookListener.ts`, `fileWatcher.ts`. Imported by CLI `daemon.ts` command.\n\n**Verdict:** Correctly marked IMPLEMENTED. This is one of the most complete implementations.\n\n### GAP-REMOTE-003: Remote Sessions (WebSocket) -- DOWNGRADE to PARTIALLY_IMPLEMENTED\n\n**Target State:** \"WebSocket transport for MCP server. Session multiplexing for concurrent remote users. Authentication and authorization. Run directory synchronization for remote execution.\"\n\n**What exists:** `packages/genty/platform/src/mcp/transport/websocket.ts` provides `createWebSocketTransport` with `WebSocketConnectionTransport`, session management, Bearer token auth, ping/pong, rate limiting. Imported by CLI `mcpServe.ts`.\n\n**Problem:** WebSocket transport, session multiplexing, and authentication are implemented. However, \"Run directory synchronization for remote execution\" is NOT implemented. The transport only carries MCP messages; it does not sync run directories to remote machines. This is a meaningful gap for the \"remote execution\" aspect of the target state.\n\n### GAP-PROC-002: Process Nesting and Sub-Process Invocation -- Status: IMPLEMENTED (confirmed)\n\n**Target State:** \"ctx.subprocess() effect that invokes a child process. Child process inherits parent context. Results returned to parent as effect result.\"\n\n**What exists:** `packages/babysitter-sdk/src/runtime/intrinsics/subprocess.ts` provides `runSubprocessIntrinsic` with `SubprocessInvocation` type including `processPath`, `exportName`, `processId`, `prompt`, `inputs`, `inputSchema`, `outputSchema`, `harness`, `model`, `maxIterations`, `shareSession`. Imported by `processContext.ts` -- wired into the context object.\n\n**Verdict:** Correctly marked IMPLEMENTED. The ctx.subprocess() intrinsic is fully available.\n\n### GAP-SESSION-004: Session-Level Cost Tracking -- Status: IMPLEMENTED (confirmed)\n\n**Target State:** \"Session-level cost aggregation across all runs. Configurable session budgets. Alerts at budget thresholds (50%, 80%, 100%). Auto-pause when budget exceeded.\"\n\n**What exists:** `packages/genty/platform/src/session/cost.ts` with `SessionBudget`, cost summaries, threshold alerts. Imported by `orchestration/effects.ts` -- wired into the orchestration loop.\n\n**Verdict:** Correctly marked IMPLEMENTED. Integration into the orchestration loop is confirmed.\n\n### GAP-PERF-005: Cache-Aware Prompt Assembly -- Status: IMPLEMENTED (confirmed)\n\n**Target State:** \"Prompt sections tagged with volatility levels and sorted by stability. Cache-break detection.\"\n\n**What exists:** `strata.ts` provides `PART_STRATA_MAP` with 30+ parts classified by stratum and volatility score. `composeByStrataWithMeta` returns per-stratum checksums for cache-break detection.\n\n**Verdict:** Correctly marked IMPLEMENTED.\n\n---\n\n## 2. CHALLENGE: NOT_STARTED Claims\n\n### GAP-RUN-001: Run Comparison and Diffing -- Confirmed NOT_STARTED\nNo `compareRuns`, `diffRuns`, or `run:diff` implementation found in packages.\n\n### GAP-RUN-002: Run Archival and Restore -- Confirmed NOT_STARTED\nNo `archiveRun`, `restoreRun` implementation. Only cleanup exists.\n\n### GAP-RUN-003: Run Forking and Branching -- Confirmed NOT_STARTED\nNo `forkRun` or journal fork-from-point capability.\n\n### GAP-SEC-006: OAuth Integration -- Confirmed NOT_STARTED\nNo OAuth flow in the SDK or platform. OAuth code exists in `packages/adapters/tasks/src/auth/` but that is for GitHub OAuth for the adapters task runner, not for MCP server authentication.\n\n### GAP-OBS-008: Agent Progress Summarization -- Confirmed NOT_STARTED\nNo progress summarization module found.\n\n### GAP-TOOLS-007: JS/TS REPL Tool -- Confirmed NOT_STARTED\nNo `js_repl` or `node_repl` tool in agentic tools.\n\n### GAP-TOOLS-012: LSP Integration -- Confirmed NOT_STARTED\nNo LSP client module in the codebase (only atlas graph documentation references).\n\n### GAP-TOOLS-017: Git Worktree Isolation -- Confirmed NOT_STARTED\nNo worktree manager for parallel effects. Worktree references exist in adapters (hooks, gateway) for existing session workspace management, but not for parallel effect execution isolation.\n\n### GAP-SESSION-003: Session Templates and Presets -- Confirmed NOT_STARTED\nNo `SessionTemplate` type or `.a5c/session-templates/` directory.\n\n### GAP-BRK-003: Breakpoint Analytics and SLA Tracking -- Confirmed NOT_STARTED\nNo breakpoint analytics or SLA tracking implementation.\n\n**Verdict:** All 10 NOT_STARTED claims are correctly assessed.\n\n---\n\n## 3. EVIDENCE QUALITY: PARTIALLY_IMPLEMENTED Verification\n\n### GAP-PERF-002: Session Compaction -- Accurate\nEvidence states compaction settings exist but no multiple strategies or auto-compact triggers. `piWrapper/compaction.ts` and `session/continuityState.ts` confirm the \"what exists\" description. The gap about missing auto-compact triggers is real.\n\n### GAP-OBS-005: Context Introspection -- Accurate\nEvidence states token analysis exists post-hoc but no real-time dashboard integration. `tokensStats.ts` and session cost tracking confirm this. No dashboard rendering exists.\n\n### GAP-PROMPT-006: Instructions Loaded Hook -- Accurate\nEvidence states hook exists in adapters layer but not in SDK. Confirmed: `InstructionsLoaded` is adapter-specific (Claude Code codecs), not a generalized SDK hook type.\n\n### GAP-PAR-001: Concurrent Effect Execution -- Accurate\nEvidence states `concurrentExecution.ts` and `asyncEffects.ts` exist but concurrent harness invocations not wired. Confirmed: the modules are utility/helper functions, not integrated into the orchestration loop for true concurrent dispatch.\n\n### GAP-SUBOBS-002: Subagent Progress Tracking -- Accurate\nEvidence states `backgroundTracker.ts` tracks state but no percentage/ETA. Confirmed: only status tracking (running/completed/error/timed_out), no progress bars or estimation.\n\n### GAP-UX-001c: Permission and Breakpoint Approval UI -- Accurate\nEvidence states `askUserQuestion.ts` provides prompts but no Ink-based component. Confirmed: readline-based interaction, no React/Ink rendering.\n\n### GAP-ECO-003: Plugin Trust, Provenance, and Blocklist -- Accurate\nEvidence states sandbox permissions exist but no blocklist or provenance tracking. Confirmed: `sandbox.ts` has permission types, but no `PluginBlocklist` or `PluginProvenance` types.\n\n### GAP-ROUTE-002: Effect Priority and Scheduling -- Accurate\nEvidence states parallel strategies exist but no priority queue. Confirmed: `parallelStrategies.ts` has strategy patterns (all-or-nothing, best-effort, etc.) but no priority-based scheduling.\n\n### GAP-HADAPT-003: Cost-Based Routing Policies -- Accurate\nEvidence states cost-optimized policy exists but automatic model downgrade not wired. Confirmed: `selectionPolicies.ts` has the policy, `session/cost.ts` has budgets, but they are not connected for automatic downgrade on budget approach.\n\n### GAP-TOOLS-026: Structured User Interaction from Within Effects -- Accurate\nEvidence states `AskUserQuestion` tool supports structured mode but no `ctx.ask()` intrinsic. Confirmed: interaction exists at the tool level in agentic tools, not as a process context intrinsic.\n\n**Verdict:** All 10 PARTIALLY_IMPLEMENTED descriptions are accurate.\n\n---\n\n## 4. RENAME AWARENESS: Path References\n\nAll evidence paths in phase2-codebase-audit.json reference current paths (`packages/genty/platform/src/...` and `packages/babysitter-sdk/src/...`). No stale references to old paths like `packages/babysitter-sdk/src/harness/` where the code has moved to `packages/genty/platform/src/harness/`. One minor note: `packages/babysitter-sdk/src/harness/types.ts` is still referenced for `HarnessCapability` -- this appears to still be valid as the SDK has its own harness types that the platform imports.\n\n---\n\n## Status Change Summary\n\n| Gap ID | Current Status | New Status | Reason |\n|--------|---------------|------------|--------|\n| GAP-REMOTE-007 | IMPLEMENTED | PARTIALLY_IMPLEMENTED | Type definitions only, zero consumers, no startRun/getStatus/postEffect methods |\n| GAP-OBS-NEW-001 | IMPLEMENTED | PARTIALLY_IMPLEMENTED | Pure functions only, no HTTP delivery, no Slack/PagerDuty integrations |\n| GAP-STATE-001 | IMPLEMENTED | PARTIALLY_IMPLEMENTED | Memory extraction works, but memories never injected into prompts |\n| GAP-MCPC-003 | IMPLEMENTED | PARTIALLY_IMPLEMENTED | Racing pattern exists but not wired into actual breakpoint resolution flow |\n| GAP-REMOTE-003 | IMPLEMENTED | PARTIALLY_IMPLEMENTED | WebSocket transport works, but no run directory synchronization for remote execution |\n\n**Net impact:** 5 downgrades from IMPLEMENTED to PARTIALLY_IMPLEMENTED.\n- Corrected count: 69 IMPLEMENTED, 49 PARTIALLY_IMPLEMENTED, 29 NOT_STARTED (147 total gaps).\n- The original Phase 1 had 95 Missing, 52 Partial. The corrected audit now shows meaningful improvement but more honestly: 69 fully implemented (vs 74 claimed), with 5 items that have code modules but lack critical integration or runtime wiring.\n",
    "documents": []
  },
  "outgoingEdges": [],
  "incomingEdges": [
    {
      "from": "page:docs-genty-features-backlog-updated",
      "to": "page:docs-genty-features-backlog-updated-phase2-corrections",
      "kind": "contains_page"
    }
  ]
}

Shortcuts

Back to overview
Open graph tab