Skip to content

roadmap: enforce self-dogfood release gates and add session intelligence #14

Description

@2233admin

Abstract

v0.5.0 established the compiled Rust CLI as the primary execution kernel, with PowerShell retained as a recovery/compatibility surface. The next product-quality step is not another provider: it is to make the Pipeline prove its own health before release, then add first-class Agent session intelligence.

Today GitHub CI can be fully green while a fresh code-intel self-run fails its own architecture gate. That mismatch allows structural debris to accumulate behind a successful release badge and makes the final Hospital output less actionable than the underlying evidence.

Reference implementation for the session-observability surface: cosmtrek/mindwalk. We should internalize the useful contracts and workflows, not clone its entire UI or introduce a runtime dependency on it.

Core product-quality defect

Release green is not equivalent to product healthy.

Fresh evidence from the released v0.5.0 code:

  • PR CI and the post-merge main CI completed successfully.
  • A fresh normal self-run ended as process_failed with diagnosis.hospital - architecture gate failure.
  • Sentrux gate reported:
    • quality 5470 -> 5274;
    • cycles 0 -> 1;
    • complex functions 21 -> 85.
  • Sentrux check identified the circular dependency:
    • crates/code-intel-cli/src/dag_run.rs;
    • crates/code-intel-cli/src/execution_kernel.rs.
  • The published Hospital view exposed only architecture gate failure; the surgery plan was not_required and the primary target fields were empty.

This is both a gating defect and an artifact UX defect: authoritative evidence knows the failure, but CI does not enforce it and the human-facing report does not carry the actionable target forward.

Target outcome

Code Intel becomes a self-governing, model-independent Pipeline with two complementary intelligence planes:

  1. Repository intelligence — deterministic code structure, evidence, risk, governance, query, and impact.
  2. Agent session intelligence — deterministic traces of how Claude/Codex explored, changed, and verified that repository.

Models remain optional judges/consumers. Pipeline facts, release authority, trace normalization, mechanical scoring, and artifact publication remain deterministic and Pipeline-owned.

Delivery slices

v0.5.1 — Self-dogfood release integrity

  • Break the dag_run / execution_kernel circular dependency at the shared ownership boundary.
  • Add a release-blocking self-scan job against the exact candidate commit/package.
  • Require the admitted architecture verdict to pass; do not weaken or regenerate the baseline to obtain green.
  • Propagate the first failing structural rule, evidence source, target files, and remediation command into Hospital Markdown/JSON.
  • Produce a bounded surgery/govern plan whenever an actionable target exists.
  • Make release green, self-scan green, and published artifact green refer to the same snapshot identity.

v0.6.0 — Session Trace and behavior intelligence

  • Add Claude Code and Codex JSONL adapters behind one Pipeline-owned trace schema.
  • Normalize search, read, edit, command, error, verification, user-turn, compaction, and subagent events.
  • Correlate parent/subagent sessions without requiring raw provider internals downstream.
  • Bind traces to repository snapshot identity and mark missing/outside-repository paths explicitly.
  • Compute mechanical, evidence-anchored signals for scope fit, wandering, churn, post-edit verification, recovery after errors, and relevant-file coverage.
  • Keep LLM evaluation optional, sealed, attributable, cached, and stale when its trace changes.

v0.7.0 — Minimum useful viewer and comparison

  • Provide a local 2D repository map, playback timeline, file visit inspector, and agent/subagent filters.
  • Compare sessions across models, Pipeline/Skill versions, and repeated attempts on the same task.
  • Export bounded Markdown/JSON summaries suitable for GitHub PR checks.
  • Publish native macOS/Linux packages in addition to the Windows Release package.

Acceptance criteria

  • A candidate with a failing self-scan cannot publish a stable GitHub Release.
  • The self-scan uses the exact candidate snapshot/package, not an unrelated checkout or mutable baseline.
  • A Hospital failure names the first failed rule, target files, evidence provenance, and smallest rerun command.
  • The current dag_run / execution_kernel cycle is removed and a regression check prevents its return.
  • Claude and Codex fixtures normalize into the same versioned trace schema with deterministic ordering.
  • Subagent relationships, user turns, compactions, edits, errors, and verification events remain traceable to source events.
  • Behavior scores are mechanically derived and expose unknown/unsupported coverage rather than inventing certainty.
  • Raw prompts, secrets, provider-private payloads, and unrelated sessions do not enter published artifacts.
  • The viewer consumes exported schemas only; trace adapters do not depend on rendering.
  • Cross-session comparison binds task identity, repository snapshot, tool/model identity, and Pipeline version.
  • Targeted tests, full Rust tests, package smoke, self-scan, and post-merge CI all pass before release.

Non-goals for these slices

  • No Three.js/3D city, cinematic effects, or video export in the first viewer.
  • No general IDE/workbench, autonomous code modification, or automatic PR creation.
  • No third-party session adapters beyond Claude Code and Codex until the trace contract proves stable.
  • No runtime dependency on Mindwalk.
  • No new production dependency unless the existing Rust/platform stack cannot meet a measured requirement.

Implementation order

  1. Fix the self-scan cycle and actionable diagnostic propagation.
  2. Put the exact self-scan into CI and the release workflow.
  3. Define trace/event/session schemas and golden fixtures.
  4. Implement Claude and Codex adapters plus subagent correlation.
  5. Implement mechanical scoring and optional sealed judge input.
  6. Add the minimum 2D viewer and cross-session comparison.
  7. Publish cross-platform packages after the CLI and schema contracts are stable.

Review questions

  1. Does the proposed self-dogfood gate prove the exact release candidate, or can checkout/package/baseline drift still create a false green?
  2. Is the dag_run / execution_kernel cycle best removed by ownership inversion, extracting a shared request/result type, or deleting a redundant orchestration layer?
  3. Which Hospital fields must become mandatory so every structural failure is immediately actionable?
  4. Does the trace schema preserve enough source provenance for replay and review without leaking prompts or provider-private data?
  5. Which session-quality signals can be deterministic, and which must remain advisory or unknown?
  6. Are the v0.5.1, v0.6.0, and v0.7.0 boundaries independently shippable and rollback-safe?
  7. What should be deleted or deferred to prevent the viewer and adapter surface from becoming another parallel product?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions