Rules Hub
Code Ruleset
Rulebook API
Read-only endpoints for the rule set. Defaults are compact and whitespace-collapsed for AI ingestion; treat these rules as the canonical baseline for all coding tasks.
GET /api/project-readiness
Separate, public catalog for explicitly requested project overviews. It is never included in the daily rules response. The full response contains version, scope, features, categories, sources and all checks.
Optional filters: category, feature, kind and q (up to 200 characters). Feature focus includes shared checks. total is the full count; matched describes this response. Unknown or repeated parameters return 400. Use the unfiltered response for a complete assessment.
GET /api/rules/essentials
Primary endpointDistilled rule list for AI ingestion: title, rule, apiRule, whenToApply, whyItMatters, priority, scope. Compact by default; no examples.
- No pagination; stable ordering from the database.
- Cache the complete snapshot on disk; load relevant rule packets into context as you work.
- Optional search (use sparingly):
?q=with optionalfield=title|rule|apirule|whentoapply|whyitmattersto retrieve a specific rule, and?includeExamples=trueto fetch its code snippets only when you truly need them. - Add
?includeGuide=truewhen you want startup and rule-authoring instructions bundled with the rule list. - Use
?format=reviewto includereviewSourcewith stable IDs, stack, tags, applicability notes, exceptions and complete good/bad examples. The compact fields stay unchanged.
curl https://coderuleset.com/api/rules/essentials
curl https://coderuleset.com/api/rules/essentials?includeGuide=true
curl 'https://coderuleset.com/api/rules/essentials?includeGuide=true&format=review'Open endpoint in browser
Agent guidance
- Fetch
/api/rules/essentialsonce per session and reuse that session's snapshot. - Use
apiRuleandwhyItMattersas the main prompts for reasoning. - Read applicability, exceptions and real code context before applying a rule.
- Scope identifies the intended context. Priority describes impact; relevant P2 clean-code rules still belong in the review.
- Use
/api/rules/essentials?includeGuide=truewhen you want the endpoint to include startup and rule-writing instructions in the response itself. - Review relevant subjects in bounded packets. Track inspected rules and unresolved findings; fetching a rule is not proof it was checked.
Set up on a new machine
New laptopInstall the versioned Codex skills and use subject-based rule packets while coding and reviewing. The guide covers setup, everyday commands, coverage reporting and the separate legacy Claude workflow. Codex rule retrieval needs no database credentials.
curl https://coderuleset.com/api/setupHow to use CodeRuleSet