Skip to content

Feat/task memory evidence pipeline - #64

Merged
AnzoBenjamin merged 5 commits into
mainfrom
feat/task-memory-evidence-pipeline
Aug 29, 2026
Merged

Feat/task memory evidence pipeline#64
AnzoBenjamin merged 5 commits into
mainfrom
feat/task-memory-evidence-pipeline

Conversation

@AnzoBenjamin

@AnzoBenjamin AnzoBenjamin commented Aug 28, 2026

Copy link
Copy Markdown
Owner

This change is Reviewable

Unify CLI harness visual language around a shared HarnessBox primitive (single border, BORDER_CHARS, theme tokens) and migrate PlanBox/GateStateBox onto it.

Add typed ContentBlocks and boxed renderers for completion-summary, memory, context, info, doctor, index-status and plan-status; wire handleFinish and command-registry to emit typed blocks instead of pipe-joined text and route all new types through SingleBlock.

Harden message-history persistence with journal/lock/retry fixes, replace deep-equal checks with shallow reference equality, add safe surrogate-aware tail slicing and hash-based dedup, and expand boxed renderer and command tests.

Add harness-ui overhaul session docs (SPEC/PLAN/STATUS).
The Tier 2 decision about the reviewer loop had no evidence behind it: per-round gate events were emitted but never persisted. common/src/util/gate-telemetry.ts and packages/agent-runtime/src/orchestration/gate-telemetry-sink.ts now append base2.gate events to a gitignored .openbuff/ JSONL sink so the next round of gate tuning is measured rather than judged.

Give the reviewer a real channel for cosmetic observations: code-reviewer declares an optional additive advisories output field, and the gate persists advisories/advisoryCount on the durable review receipt and displays a bounded, control-character-stripped list in the <gate-state> block as well as on the reviewer-blocker/repair and security/specialist pass paths. With that channel in place, T1.2(a) resolves the LOOKS_GOOD prompt contradiction that previously forced every nit to travel as a finding.

T1.4d embedder guide fallback: base2's on-demand guide pointers name agents/guides/*.md paths that no publish pipeline ships, so outside this repo the relocated sections were simply lost. The six section bodies move to common/src/constants/prompt-sections.ts (re-exported unchanged from agents/base2/quality-prompt-section.ts) and each pointer gains an ON_DEMAND_GUIDE_FALLBACK_* placeholder whose provider re-inlines only the bodies whose guide is missing under the caller's workspace root.

Recovery mirrors the mode exclusions rather than restoring everything: plan mode omits git-discipline and recovers the plan-clause broad-audit body, and every recovered block is recorded in the shared context-budget ledger so an embedder's accounting sees the largest block this path adds.
The pre-push hook runs guard:memory-drift, which flagged common/knowledge.md as stale relative to common/src/ after 61032fe added three new modules under common/. Document them so the guard passes and the package knowledge stays accurate.

common/src/util/gate-telemetry.ts: the append-only JSONL gate-telemetry sink, its never-throws/best-effort contract, sink-owned truncation fields, and one-generation rotation.

common/src/util/guides.ts: the on-demand guide fallback - FALLBACK_GUIDES as the single path table, the empty-root guard, and per-pointer clause-keyed recovery.

common/src/constants/prompt-sections.ts: now owns the six relocated advisory prompt-section bodies, re-exported unchanged from agents/base2/quality-prompt-section.ts, with gateAwarenessSection deliberately not moved.

Also refreshes the knowledge-refresh dateline.
@vercel

vercel Bot commented Aug 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openbuff Ready Ready Preview, v0 Aug 29, 2026 5:41am

/plans scanned the filesystem twice and re-read .agents/ACTIVE_SESSION for the same report, and silently dropped the Active session line when the pointer named a session it does not list. It now scans once, reads the pointer at most once, and surfaces a stale-pointer note in both the text report and the rendered box.

setPlanUse validated a resolved directory that could disagree with the bare slug it wrote, so targets like src/foo left a pointer at the nonexistent .agents/sessions/foo. The slug is now derived from a required single-segment .agents/sessions/<slug> match, and artifact-less directories are rejected before any write so the pointer can only name a session /plans lists.

Row formatting, the sessions-dir prefix, artifact presence checks, and the pointer write move into plan-artifacts.ts so the box and the text report cannot drift, and the redundant kind field is dropped from PlanStatusContentBlock.

Also repairs three failing suites: /plan-status and /plans pass legacy text to getSystemMessage so block-only system messages keep a text fallback, plan-status-box asserts HTML-escaped output, and plan-box mocks the Button module instead of invoking a memo component outside a React render.
The sync-agent-config guard in check:ci-local step D treats every backticked repo-relative path in cli/knowledge.md as a file that must exist on disk, but .agents/ACTIVE_SESSION is created at runtime by /plan-use and is never committed, so the pre-push hook failed. Name the pointer file without a backticked path so the guard passes while the documented behavior stays the same.
@AnzoBenjamin
AnzoBenjamin merged commit 2996e0c into main Aug 29, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant