You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tri learn: save a lesson into a skill's Traps section once, in .t27 #11060
Part of the night-loop epic. A lesson learned in one lane (a sandbox trap, a gate shape, a measured number) is lost unless someone edits the right skill by hand. tri already has experience commands; the gap is saving a lesson into the right skill section, once, without duplicates.
Goal
tri learn add --skill <name> "<lesson>" appends one lesson to that skill's Traps section if no equivalent lesson is there, and prints the file and line; the decision is made in .t27.
Requirements
FR-001: The author MUST first search for what exists (tri experience, /experience-save, .trinity/experience.md, specs/tri/) and MUST extend an existing command instead of adding a second one if it can take the same job; the PR body MUST state what was found.
FR-002: The decisions MUST live in a .t27 spec with tests: the normalised key of a lesson (case, spaces and punctuation folded), duplicate detection against the existing lines of the section, the row format (- <date> <lesson> (<ref>)), refusal of an empty lesson, of a lesson longer than 400 bytes and of a lesson that contains a secret-shaped token.
FR-003: The command MUST write only inside the named skill's file and MUST refuse a skill name that is not a directory under .claude/skills/; a second run with the same lesson MUST change nothing and print duplicate.
FR-004: Hand-written Rust MUST stay under the glue caps and net zero or negative.
Scenarios
Given a skill with a Traps section, when tri learn add runs with a new lesson, then one line is added and its position is printed.
Given the same lesson again, then nothing changes and the output says duplicate.
Given a lesson that looks like a token, then it is refused and nothing is written.
Boundary
specs/tri/loop/lesson.t27
cli/tri/src/main.rs
.trinity/seals/tri_loop_lesson.json
gen/rust/tri/loop/lesson.rs
Success Criteria
t27c test-report specs/tri/loop/lesson.t27 passes with at least 10 tests and vacuous passes 0.
t27c seal --verify specs/tri/loop/lesson.t27 exits 0.
Running tri learn add twice with the same lesson on a temp copy of a skill changes the file 1 time.
Activity
tri learn: save a lesson into a skill Traps section once, decisions i…
tri learn: the glue lives in loopclaim.rs, not in a new file (own-lan…
Merge master into the tri learn branch (Closes #11060)
tri learn: save a lesson into a skill Traps section once, decisions i…