Sensei
Improve skills using the Ralph loop. For help, explain modes, defaults, and checks from configuration. For source bundles and installation, see distribution.
- Read the target
SKILL.md, references, tests, and repo-local instructions. Verify tooling exists before claiming it is missing. Count baseline tokens: From the Sensei checkout, pass the target repository root and a path relative to it:npm run tokens -- count --root <target-repo> <skill-path>/SKILL.md. - Score with
npm run tokens -- score --root <target-repo> <skill-path>. Separate portable-spec diagnostics from Sensei recommendations. Preserve.sensei.jsonand AGENTS.md short-description policy. A 150-character floor, 60-word target, type prefix,WHEN:, and 500-token target are heuristics, not specification requirements. - Scaffold missing tests using templates. Use realistic positive prompts and close near-misses from intended scope; negative frontmatter syntax is not required.
- Improve concise positive routing and operational instructions using examples. Keep descriptions non-empty and within 1024 characters. Preserve meaningful boundaries; evaluate them on the target host. Check portability before introducing host fields.
- Verify with the target project's test runner;
--fastskips tests but must report them as not run. GEPA mode uses optional keyword/proxy fitness, not observed host activation; follow configuration. - Check budgets with
npm run tokens -- check --root <target-repo> <skill-path>/SKILL.md. Report configured token-limit warnings separately from optional optimization suggestions. For MCP-aware skills, follow MCP integration. - Summarize changes, diagnostics, tests, token deltas, and remaining suggestions.
score --emit-proofrecords static evidence, not runtime quality or a security audit. Ask whether to commit, create an issue, or skip; do not discard edits unasked. - Repeat until the advisory target and tests pass, at most five iterations. Process batches sequentially and report failures explicitly.


