Repository navigation
tri learn: save a lesson into a skill Traps section once, decisions in .t27 - #11095
Merged
Merged
Conversation
…ecisions in specs/tri/loop/lesson.t27 (Closes #11060) A lesson learned in one lane was lost unless someone edited the right skill by hand, and a lesson pasted twice made two lines. specs/tri/loop/lesson.t27 now holds the decision as pure functions over the skill's file text, with 21 tests: - the Traps section is the first heading, at any level, whose title opens with Traps or Trap, outside a code fence, up to the next heading of its level or a higher one; a row goes after the last non-blank line of it; a file with no Traps section gets one at the end; - the row is `- <date> <lesson> (<ref>)`, with no (<ref>) when the ref is empty; - the key of a text is its letters and digits, case folded, everything else dropped; a lesson is DUPLICATE when its key is inside the key of one block of the section (a bullet with its continuation lines), and a lesson of fewer than 12 letters and digits only when it is a block's whole words; - refused, writing nothing: an empty lesson, one over 400 bytes (400 is fine), one with a line break or control byte, a secret-shaped one (32+ hex digits, a 40+ run of base64 bytes that changes class often, ghp_ gho_ ghu_ ghs_ ghr_ github_pat_ sk- xoxb- xoxp- AKIA prefixes, BEGIN with PRIVATE KEY), a bad date or ref, a skill name that is not one directory name (`..`, `a/b`, `/x`), and a skill that is no directory under .claude/skills/. `tri learn add --skill <name> "<lesson>" [--date D] [--ref R]` reads the skill's SKILL.md (or skill.md), asks the generated rules, writes what they return, and prints `<file>:<line> added` or `duplicate`. The glue is cli/tri/src/learn.rs (40 added hand lines) and 4 in main.rs; gen/rust/tri/loop/lesson.rs is t27c gen-rust of the spec. The 44 added hand lines are paid for by deleting 67: the unwired `cmd_simulated_output_wellformed` in bootstrap/src/suite.rs (git grep -w finds no caller; WAVE_LOOP_649_REPORT.md calls it "exists and is unwired"). Census moved, blessed in this commit (tools/census/fetches.txt): `files read` 49 -> 50, because the census reads every file of cli/tri/src and learn.rs is one more; its lines naming a fetch (78) and fetch sites (35) are unchanged. Searched first: `tri experience save` (an episode of counts, no lesson text), `tri skill add` / `fold` (a whole numbered section spooled for a numbered SKILL.md such as ci-gates, no check against what is there), /experience-save and .trinity/experience.md (an append-only log kept by hand), `tri loop plan`. None puts one line in a skill's Traps section once, so this is a new command. No seal is committed: `t27c test-report` is blocked in the lane's sandbox by the zig cache (PermissionDenied), and a seal that says tests blocked is not one. t27b test passes 21 of 21; zig ast-check of the generated Zig is clean. Closes #11060 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…n .t27 (Closes #11060) Merge of master plus sealing, gates run on the merged tree with t27c from master: tests clean with vacuous passes 0, seal --verify MATCH, tri types ratchet CLEAN, dupe_scan failure set a subset of master's. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
3 tasks
This was referenced Oct 19, 2026
…guage forbids a new .rs) (Closes #11060) The own-language gate refused cli/tri/src/learn.rs as a new hand-written .rs file. The same 40 lines of glue and the 3 lines in main.rs now sit in the existing loopclaim.rs; behaviour is unchanged. Merged master. Census: see the tools/census change in this commit if any moved. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
PR DashboardGenerated at: 2026-10-19 17:03:43 UTC
Summary
Seal Status
|
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.
Closes #11060
tri learn: save a lesson into a skill Traps section once, decisions in .t27
Gates run on the merged tree (t27c from master): 1 spec(s) with tests clean and vacuous passes 0, seal --verify MATCH, tri types ratchet CLEAN, dupe_scan failure set a subset of master's (inherited red).
TEST specs/tri/loop/lesson.t27 tests=[21] fail=[0] vacuous=[0]
SEAL specs/tri/loop/lesson.t27 :: all hashes MATCH
TYPES RATCHET: CLEAN
DUPE failing=15 extra-vs-master=[]
🤖 Generated with Claude Code