Convert a review guide
This guide turns an existing review checklist, style guide or AGENTS.md section into Lore rules. The work is mostly judgment, so it suits an AI agent with the writing-lore skill, checked by you.
-
Give your agent the skill. Copy
skills/writing-lore/from the Lore repository into your project's.claude/skills/, or into~/.claude/skills/for every project. Other agents can readSKILL.mddirectly. -
Point it at the guide. Ask the agent to convert one document, such as
docs/checkout-review.md. The skill covers which instructions belong in Lore, which belong in a lint rule or a skill, and how to choose when each rule applies. -
Keep the source. Save a copy of the guide as converted beside the rules, such as
docs/converted/checkout-review.md, and ask for a<source>on each rule naming its section in that copy. The original loses those sections in step 6, and a source pointing at a removed section failslore auditwithsource-missing. -
Check the rules parse. Run
npx @mattstack/lore checkon any change. Excluded entries print on stderr with an error name, such asunknown-category; fix each one. -
Try them on real changes. Run
npx @mattstack/lore check <commit>on a few past commits the guide was written for. A rule that never shows up on a change it should catch has a scope or condition that is too narrow. -
Cut the prose. Remove the converted sections from the original guide, or replace them with a pointer to the Lore files, so the rules live in one place.
Next steps
- Writing rules: what makes a rule clear on its own.
- Lore or a skill: deciding where an instruction belongs.
- Run lore check from an agent: have the agent check its own changes against the new rules.