Skip to content

Feat/narration fold#178

Merged
cukas merged 3 commits into
mainfrom
feat/narration-fold
Jun 8, 2026
Merged

Feat/narration fold#178
cukas merged 3 commits into
mainfrom
feat/narration-fold

Conversation

@cukas

@cukas cukas commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

No description provided.

cukas and others added 3 commits June 8, 2026 17:41
Black-box --print agents (agy/Antigravity) dump their whole agentic
transcript ("I will read X... let me check Y...") as one engine-block,
a wall of text. Structured engines (claude stream-json) don't, because
their tool calls become discrete islands. This adds an engine-agnostic
fold so any verbose/black-box engine renders cleanly.

Narration fold (design validated by a 6-engine agon brainstorm, 6/6):
- blocks/narration-fold.kern: precision-biased classifier (unknown =
  substance), structural-first, substance-tail anchored. foldNarration
  (commit-time) + foldNarrationLines (live streaming). Bounded raw ring.
- Folds at commit (signals/output.kern) and live (StreamingView), shown
  as "N reasoning steps folded / /raw" in both the live EngineBlock and
  the committed Static row renderer (app-rendering.kern).
- /raw [n] reprints the untouched original (Static rows can't expand).
- config narrationFold = off|safe|aggressive (default safe).

Render fixes (from agon review):
- segmentsEqual: compare table alignments (no stale columns).
- useShallowSegmentDirty: commit ref in useEffect, not during render.
- contextualizeSlicedMarkdown: cleaned-prefix-only fence parity (drops
  the raw/cleaned mix and the O(n) rawPrefix per frame).

2228 tests green (+16 new).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Stop registering session worktrees in activeWorktrees exit-cleanup registry;
  agon worktree new no longer deletes the worktree it just created on exit.
- Scope worktreePruneOrphaned to ephemeral roots only
  (.agon/agent-worktrees, speculate-worktrees, runs, goals), explicitly
  excluding persistent session worktrees under ~/.agon/worktrees.
- Capture repoDirs before mutating activeWorktrees during cleanup so
  git worktree prune runs for every affected repo.
- Respect other SIGTERM listeners the same way SIGINT already does.
- Add tests for worktreePruneAll and session-worktree preservation.

Review: codex, claude, minimax
Fixes: agon goal/forge/worktree prune automatic cleanup of stale worktrees
- Remove stale engine count and version from hero SVGs
- Add 100% KERN and Glicko-2 badges to README
- Fix global -> globalThis in git.kern (kern-guard undefined-reference)
- Minor integration test and narration-fold test fixes
@cukas cukas merged commit 291af9d into main Jun 8, 2026
2 checks passed
@cukas cukas deleted the feat/narration-fold branch June 8, 2026 17:05
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