- Bun >= 1.3.0
cd Ritsu/runtime
bun install# Build
bun run build
# Test (70 files, 479 tests)
bun run test
# Test single file
bun run test -- tests/policy/engine.test.ts
# Run tests from src/tests/ (newer modules)
bun test src/tests/contract-verification.test.ts
# Lint
bun run lint
# Type check
bunx tsc --noEmitRitsu/
skills/ 8 SKILL.md instruction files, one per slash command
rules/ Policy definitions (anti-patterns, guardrails)
_shared/ MCP tool schemas, JSON Schema, shared protocols
runtime/
src/
handlers/ 24 MCP tool handlers
policy/ 11 detectors + import graph + blast radius
orchestration/ Preflight, diff-inspect, multi-agent, architecture
cli/ CLI subcommands (doctor, report, violations, etc.)
tests/ Unit tests (vitest)
AGENTS.md Project baseline (generated by /r-init)
CLAUDE.md AI onboarding guide
- Positive rules: Write "use const" not "don't use let" — positive rules halve violations
- Skill vs Rule vs Script:
- Needs AI judgment →
skills/<stage>/SKILL.md - Deterministic output →
runtime/src/(handler or CLI) - Always-on guardrail →
rules/anti-patterns.yaml
- Needs AI judgment →
- Add
wrong/right/storyexamples when adding new anti-patterns - New features need tests — verify with
bun run testbefore PR
feat:new featurefix:bug fixdocs:documentationchore:maintenancerefactor:code restructuretest:test additions/fixes
- Create directory in
skills/<name>/ - Provide
SKILL.mdwith YAML frontmatter (name, version, tags) - Add structured Gotchas table at the bottom
- Follow
_shared/skill-common-steps.mdprotocol
- Update version in
package.jsonandruntime/package.json - Update
AGENTS.mdritsu-version field - Add entry to
CHANGELOG.md - Tag the release:
git tag v8.x.x - Push:
git push && git push --tags
Be respectful and professional in all interactions.