Intelligence layer — Phase 4 & 5

What actually shipped on top of the durable runtime (R2 lossless events, Phase-3 lineage + replay) — and, honestly, what is still gated.

Phase 4 — what shipped#

  • Lineage-aware rework detection (0.3.11). The old rework_cycles is a cwd+time heuristic. The new ?metric_key=rework_lineage counts explicit resume-chains via parent_session_id — authoritative, non-gameable. This is the deck §4 point: intelligence read from the Phase-3 durable lineage, not a stale guess.
  • Reliable active-vs-idle. session_active_ratioalready existed; v0.3's R2 lossless event store made it trustworthy (real timeline, not sampled) rather than re-implemented.
bash
# authoritative rework (resume-chains)
GET /plugins/velocity-insights/metrics?metric_key=rework_lineage
# the older heuristic, kept for contrast
GET /plugins/velocity-insights/metrics?metric_key=rework_cycles

Phase 5 — one line built, the rest honestly gated#

Deck §5 is 5 lines. Four (cross-team benchmarking, industry reports, context-capital, operational standards) structurally need multi-tenant (Phase 2, not built) + scale — implementing them now would mean inventing cross-tenant data, so they are not shipped. Exactly one line was unlocked once Phase 4 landed:

  • Agent-performance dataset export (0.3.12) — GET /plugins/velocity-insights/dataset: opt-in, owner-scoped, single-tenant export of the real Phase-4 metric snapshots + per-session Phase-3 lineage + event volume. No fabrication, no new schema. The honest seed of the slide-10 compounding data asset.

Verifying it#

Go integration tests (real Postgres, in CI) cover rework-lineage and the dataset export incl. cross-user isolation. For exploratory / the honest negative, see Agentic QA — Phase 4/5 (Claude-in-Chrome scenarios, including cic-v5-boundary which independently confirms the gated Phase-5 lines were NOT faked).