Extract lessons candidates from trace artifacts#4
Merged
Conversation
First consumer of the trace artifact: bean-lessons reads .bean/runs/*.json and writes a ranked lessons-candidates report to .bean/lessons.json (+ optional --markdown). Read-only and deterministic — no LLM, no network, no mutation of claims/prompts/skills/memory. It proposes, never applies. This is NOT cross-task learning. Five candidate kinds: recurring_residual (normalized, >=2 runs), high_pivot (pivot_count >= 2), budget_exceeded, blocker_code_frequency (ranked, no threshold), verifier_failure. Ranked by count desc, kind asc, signal asc; evidence sorted by run_id. Exit codes: 0 candidates found; 2 none/empty corpus (report still written); 3 invalid corpus or write failure (fail closed). - rs/src/bin/bean-lessons.rs (auto-discovered binary). - schemas/lessons.schema.json (additionalProperties:false, top + per-candidate). - skills/bean/references/lessons.md (docs + scope boundary). - test/fixtures/traces/ sample corpus + conformance (ranking, determinism, empty->2, malformed->3). - install.sh + release.yml ship the fifth binary. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…ease checklist - Fail closed on a partial/copied corpus: validate every trace has the required trace/v0 keys (and that run_id/status are non-empty strings, pivot_count an integer, blocker_codes/ verifier_verdicts/residuals arrays) before summarizing. Missing fields -> exit 3, not silent empty-default candidates. Conformance adds a "missing required fields -> exit 3" case. - README: "four binaries" -> "five"; add bean-lessons to the runtime list + install line. - release.yml smoke now runs --help on all five binaries (verified each supports it); tarball already ships bean-lessons. - lessons.schema.json: generated_at documented as INTEGER epoch-ms (not ISO-8601). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
bean-lessons: reads.bean/runs/*.jsonand writes a ranked lessons-candidates report to.bean/lessons.json(+ optional--markdown).recurring_residual,high_pivot,budget_exceeded,blocker_code_frequency,verifier_failure.schemas/lessons.schema.json,skills/bean/references/lessons.md, and a deterministic fixture corpus undertest/fixtures/traces/.install.sh+ release tarballs ship the fifth binary.Scope
Read-only and deterministic — no LLM, no network, no mutation of claims, prompts, skills, or memory. It proposes, never applies. This is not cross-task learning; turning candidates into harness changes is a separate, later decision.
Behavior
0candidates found ·2none/empty corpus (report still written) ·3invalid corpus or write failure (fail closed).countdesc →kindasc →signalasc; evidence sorted byrun_id; deterministic modulogenerated_at.Validation
npm testnode test/conformance.mjs(adds 5 bean-lessons checks: ranking, determinism, empty→2, malformed→3, foreign-schema→3)cargo fmt --check --manifest-path rs/Cargo.toml🤖 Generated with Claude Code