Skip to content

tri learn: save a lesson into a skill Traps section once, decisions in .t27 - #11095

Merged
gHashTag merged 4 commits into
masterfrom
lane/tri-learn-11060
Oct 19, 2026
Merged

gHashTag merged 4 commits into
masterfrom
lane/tri-learn-11060

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

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

claude and others added 2 commits October 19, 2026 23:17
…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>
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-19 16:32:33 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 42
PRs with All Checks Green 8
READY 2
FAILING 42
PENDING 0
NO CHECKS YET 0

These columns do not partition: 2 + 42 + 0 + 0 = 44, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=57b91bb96334 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

claude and others added 2 commits October 19, 2026 23:59
…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>
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-19 17:03:43 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 48
PRs with All Checks Green 2
READY 2
FAILING 48
PENDING 0
NO CHECKS YET 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=e34e1b174c96 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@gHashTag
gHashTag merged commit fe17653 into master Oct 19, 2026
34 of 38 checks passed
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.

tri learn: save a lesson into a skill's Traps section once, in .t27

2 participants