Skip to content

Feat/experience precedent#260

Merged
cukas merged 4 commits into
mainfrom
feat/experience-precedent
Jul 16, 2026
Merged

Feat/experience precedent#260
cukas merged 4 commits into
mainfrom
feat/experience-precedent

Conversation

@cukas

@cukas cukas commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

No description provided.

…arity

Two review follow-ups from the conquer falsifier round: (1) unattended
--push now refuses to land on a protected branch (main/master by default,
protectedPushBranches config override, case-insensitive, fail-closed on an
unresolvable HEAD) via isProtectedPushBranch in the forge decision core —
a conquer worktree normally sits on its own conquer/<slug> branch, so a
protected HEAD means something unexpected happened and the work stays
committed locally for a human push. (2) the REPL /conquer handler no
longer hardcodes what the CLI exposes: --gate-timeout, --max-hours and
--timeout parse through the intent layer and reach the gate spawn and
runConquer caps, mirroring the CLI defaults (1800s gate, 600s turn, no
wall cap).

⚔️ Forged by [Agon](https://github.com/KERNlang/agon)

Co-Authored-By: agon (KERN) <292465531+KERN-Agon@users.noreply.github.com>
Full-roster review (6/6 engines, 5-engine consensus on the blocker):
KERN codegen emits optional array fields as [] into DEFAULT_AGON_CONFIG,
so every real loadConfig() caller passed { protectedPushBranches: [] } and
the Array.isArray fallback never fired — main/master were NOT protected in
production. An empty or whitespace-only list now falls back to the default
['main','master']; only a non-empty override replaces it. Verified against
the real loadConfig() output. Also: CLI --timeout/--gate-timeout reject
negative values instead of propagating them to spawnWithTimeout (agy), the
REPL /conquer rejects --max-turns < 1 exactly like the CLI (minimax), and
the exact production config state is now a test case (zai).

Refuted (no change): the cqAbort cleanup claim — the handler's KERN
cleanup block generates the finally { ctx.setActiveAbort(null) }, and a
still-running background job after /focus-away is the job system's design.

⚔️ Forged by [Agon](https://github.com/KERNlang/agon)

Co-Authored-By: agon (KERN) <292465531+KERN-Agon@users.noreply.github.com>
…vidence

RAG roadmap 1b (6/6-engine cesar-mode-rag brainstorm design): when the
user's prompt resembles past orchestration runs, the matching episodes
(mode, winner, outcome, duration) are injected ahead of the Cesar turn as
an [EXPERIENCE] block framed as evidence, never authority. New KERN module
cesar/experience.kern: intent summarization (capped, control-char safe),
stopword-filtered token-set Jaccard similarity (no sidecar on the hot
path), and retrieval gated on a similarity floor AND a min-N support
threshold (default 3 qualifying episodes) so a couple of stale runs can't
steer routing. recordRun now stores a 160-char intentSummary; legacy
records without it are skipped. Injection reuses the shouldGroundInput
trigger (slash commands and trivial prompts never retrieve) and is
fail-open. Config: cesarExperience (default on), plus tunable
minSimilarity/minEpisodes/topK/window resolved 0-safe against the
DEFAULT_AGON_CONFIG codegen emission. 14 unit tests.

⚔️ Forged by [Agon](https://github.com/KERNlang/agon)

Co-Authored-By: agon (KERN) <292465531+KERN-Agon@users.noreply.github.com>
…path

Full-roster review (6/6 engines) findings, each verified: (1) codex
blocker — telemetry.json is global, so precedent from one repo could
inject its task text into another repo's turn; run records now store a
projectKey (resolved working dir) and retrieval filters on it, fail-closed
for unscoped legacy records. (2) zai/claude/kimi — the new test file
contained raw NUL/ESC bytes and diffed as binary; escaped to \u
sequences. (3) agy — the prompt is tokenized once per retrieval, not once
per episode (scoreTokenSetSimilarity). (4) agy/zai/kimi/claude — the
ledger read is cached on (mtimeMs,size) so unchanged telemetry.json is
parsed once, and append() trims to MAX_LEDGER_RUNS (2000) so the file
cannot grow unbounded. (5) kimi — tokenization is unicode-aware
(\p{L}\p{N}) so non-English prompts score. (6) codex prompt-replay:
summaries are the user's own local prompts (same trust domain); quote
normalization added for rendering hygiene. Also: buildExperienceBlock
rewritten loop-style to satisfy the kern:self-coverage var-bad-expr
ratchet (every blocker category sits exactly at its cap).

⚔️ Forged by [Agon](https://github.com/KERNlang/agon)

Co-Authored-By: agon (KERN) <292465531+KERN-Agon@users.noreply.github.com>
@cukas
cukas merged commit 0181752 into main Jul 16, 2026
2 checks passed
@cukas
cukas deleted the feat/experience-precedent branch July 16, 2026 14:19
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.

2 participants