Skip to content

t1k:rsi

FieldValue
Modulet1k-kit-feedback
Version2.14.39
Efforthigh
ToolsAskUserQuestion, Bash, Edit, Glob, Grep, Read, Skill, Task, Write

Keywords: lesson ledger, propagate lesson, recursive self-improvement, rsi, self-improve

/t1k:rsi
[review|apply|audit|gotchas] [--days=N|--max=N|--dry-run]

A fix to a kit-owned skill/rule/agent/hook is not done until the CREATOR artifact for that kind carries the lesson, so the same class of mistake is never authored again. This skill is the procedure; t1k-rsi-reviewer is its canonical executor.

No rival pipeline. The pending-skill-updates.jsonl lesson queue IS the ledger of what happened. The ## Lessons ledger section in each creator’s validation checklist is the durable record of what we learned. There is no third store — never create one. (The gotcha ledger under ledger/gotchas/ holds gotcha text, not lessons, and is not a rival: references/ledger-benchmark.md.)

ModeWrites?Does
reviewNoRead pending rows, classify each, name the creator target. Report only.
applyYesAppend ledger lines to the named creator checklists and ship per § Shipping.
auditNogit log --grep fix commits over N days vs the ledgers; report unpropagated fixes and stale ledger lines.
gotchasStamp / prune only (auto-merge PR)Benchmark the gotcha ledger against a diff or transcript: stamp entries seen caught or violated, propose pruning those unseen for 30 days.

Details: references/review.md · references/apply.md · references/audit.md · references/ledger-benchmark.md.

The queue (read it, never re-implement it)

Section titled “The queue (read it, never re-implement it)”

The queue path comes from the existing lib — do not hand-roll a second resolver:

Terminal window
bun -e "const{tryResolveQueuePath}=require('./.claude/hooks/lib/queue-write.cjs');console.log(tryResolveQueuePath('rsi')||'unavailable')"

Rows are JSONL; each carries ts, type, fingerprint, kit, skill, payload, sessionId, submitted. Every P1-authored row also carries kind (skill|rule|agent|hook), fixSignals (commitType, issueRefs, fixWords), sessionCount, and dedupCount — read kind directly, do not re-derive it. A row may also carry an optional observedModel (canonical model id from the transcript); references/gotcha-tags.md says how it becomes a [model-weakness: …] tag. A row queued before P1 landed predates the field; references/review.md § 3 gives the file-path fallback for that legacy shape, and the report says “derived (legacy row)” when it was used, never “read”.

Classify (the reviewer’s decision — never a hook’s)

Section titled “Classify (the reviewer’s decision — never a hook’s)”

Hooks emit facts; this skill decides. For each row answer three questions:

  1. Is it a fix? A behavior correction, not a preference or a fresh feature.
  2. Is it recurrable? Would the same class of mistake be authored again by someone following the current creator artifact? No → drop it, report the drop and why.
  3. Root-cause class — exactly one of:
ClassMeaningRoute
missing-checklist-itemThe creator checklist never askedappend ledger line to that creator
wrong-defaultThe artifact steers toward the mistakeappend ledger line to that creator
doc-driftProse disagrees with the codeappend ledger line to that creator
missing-ruleNo rule binds the behavior at alldelegate to t1k-rules-manager (optional module t1k-maintainer; not installed: t1k-kit-developer) — never write the rule here
missing-gateOnly a mechanism can hold itfile an issue on theonekit-release-action — never write the gate inline

Then name the creator target by the row’s kind:

kindCreator target
skillskills/t1k-skill-creator/references/validation-checklist.md
ruleskills/t1k-rule-creator/references/validation-checklist.md
agentskills/t1k-agent-creator/references/validation-checklist.md
hookskills/t1k-hook-creator/references/validation-checklist.md

Appended under the target checklist’s ## Lessons ledger:

- [YYYY-MM-DD] <one line, the lesson> — evidence: <fingerprint|PR|issue>

One line. The lesson is an instruction to a future author, not a story about the past — “never X without Y”, not “we once forgot Y”. Incident narrative belongs in that creator’s docs/ companion.

  • Kit source repo → branch + PR. Consumer project → /t1k:sync-back.
  • Write back to the row: {fingerprint, submitted:true, prUrl, rsi:{class,target}}.
  • Commit body carries rsi-evidence: <fingerprint> — this is also the loop guard’s opt-out signal.

Rate limits. One frame per 24h per project; ≤3 creator edits and 1 PR per run; autoFix from t1k-config-core.json → rsi (apply by default — writes the ledger + opens a --auto PR). The kill-switch is propose: it reverts every write to a diff-only proposal that writes nothing.

Loop prevention. RSI never ingests its own output. A row is skipped when its path is under skills/t1k-*-creator/**, skills/t1k-rsi/**, agents/t1k-*-manager.md, or agents/t1k-rsi-*; when MR_SPAWNED=1; or when the commit body carries rsi-evidence:.

Auto-merge boundary (full-auto by default; the one hard exception is self-machinery):

ChangePath
Any kit-owned change — checklist body, references/ prose, a rule, agent frontmatter, hook .cjs, or configPR with gh pr merge --auto armed
skills/t1k-rsi/** except skills/t1k-rsi/ledger/**, agents/t1k-rsi-reviewer.md, or a creator’s own creatorhuman PR, no --auto — RSI never modifies itself
skills/t1k-rsi/ledger/** — the gotcha ledger (stamps, prunes, migrations): data, not machineryPR with gh pr merge --auto armed, like any kit-owned change

This is full-auto: with rsi.autoFix: "apply" (the shipped default), a rule / agent-frontmatter / hook / config fix opens a --auto PR and merges on green CI, no human in the loop. The kill-switch is rsi.autoFix: "propose" — set it and every write reverts to a diff-only proposal that writes nothing. The self-machinery row is a loop-safety guardrail and is NOT relaxed by full-auto: a self-improvement engine that rewrites its own machinery unattended is a self-corruption / infinite-loop risk, so it stays a human PR regardless of autoFix.

RSI never modifies itself. skills/t1k-rsi/** and agents/t1k-rsi-reviewer.md change only by human PR — report the need, do not author the edit. The ONE carve-out is skills/t1k-rsi/ledger/**: it holds gotcha data (entries, last-seen, hits), not procedure, so stamping and pruning it is an ordinary auto-merge PR. Nothing else under skills/t1k-rsi/ is relaxed.

The same class hitting the same target ≥rsi.escalationThreshold times in 30 days means prose failed. Open an [rsi-escalation] issue demanding a mechanism (hook, gate, or doctor check). More prose is not the answer at that point.

  • Building a second ledger, a new hook rivalling auto-lesson, or a cron job (design § “Do NOT build”).
  • Writing a gate inline instead of filing it on theonekit-release-action.
  • Writing a rule file directly instead of spawning t1k-rules-manager (optional module t1k-maintainer; not installed: t1k-kit-developer).
  • Propagating a non-recurrable one-off — that is churn, not learning.
  • Editing a creator artifact’s own creator, or anything under t1k-rsi*.

Kit-owned artifacts only: .claude/skills/**, .claude/modules/*/rules/**, .claude/agents/*.md, .claude/hooks/*.cjs. End-user application code is out of scope — route it to the registered implementer role.