src/holds the rule Markdown; keep one guideline per file and maintain order insrc/SUMMARY.md.style.mdis the generated handbook—recreate it after edits instead of touching it directly.style-for-agents.mdis also generated: each rule file ends with a one-line<!-- agent: ... -->comment, whichtools/gen-style-for-agents.shcollects inSUMMARY.mdorder. Every new rule must include one.bin/is reserved for build artifacts such asstitchmd; avoid checking in ad-hoc binaries.
make allinstallsstitchmdwhen needed and regeneratesstyle.mdandstyle-for-agents.mdfrom the curated sources.make lintreruns the generators in diff mode so you can catch mismatches before CI does.go install go.abhg.dev/stitchmd@latestrefreshes the toolchain manually; thanks toGOBIN, the binary lands inbin/.
- Write new content in Markdown with level-1 headings for rule titles, short paragraphs, and explicit
BadvsGoodexamples. - Mirror the direct tone already used in
src/, keep code blocks gofmt-formatted, and favour active voice over hedging. - Use inline backticks for filenames, packages, and commands; reserve HTML tables for side-by-side comparisons as the guide currently does.
- Treat
make lintas the required regression check; it fails wheneverstyle.mdorstyle-for-agents.mdandsrc/drift apart. - After large edits (new sections or renames), open the rebuilt
style.mdto ensure navigation and anchors produced bySUMMARY.mdstill read correctly.
- Use the Conventional Commit prefixes already present (
feat:,chore:,docs:) and keep each commit focused on one rule or tooling change. - Commit the regenerated
style.mdalongside the source edits so reviewers see the rendered effect and CI stays green. - In pull requests, summarise the impacted sections, mention tooling updates, and link supporting issues; add screenshots only when you tweak rendered tables.
- When adding a guideline, place the file in
src/, register it insrc/SUMMARY.md, then runmake all. - For quick copy edits, adjust the relevant
src/*.mdfile, rebuild, and reviewgit diffto confirm only intentional text changed.