This repository is governed by AI Lint.
AI Lint teaches the difference between code that merely works and code that belongs. It is the authoritative source for idioms, semantics, architecture, and rejected patterns.
STOP. Before writing, modifying, refactoring, or proposing ANY code changes:
You MUST actually read (using your file reading tool) these files:
.ai-lint/INDEX.md— navigation and scope.ai-lint/PHILOSOPHY.md— governing principles.ai-lint/doctrine/architecture.md— complexity limits, state management (if present).ai-lint/doctrine/languages/<language>.md— for the language you're working in.ai-lint/rejects/architecture.md— architectural anti-patterns (if present).ai-lint/rejects/languages/<language>.md— patterns to refuse
This is not optional. This is not "check if convenient." Read the files.
- Starting work on a new task
- Proposing a refactor or architectural change
- Adding new state, flags, or variables
- Creating new files or modules
- Any change touching >50 lines
- When you notice complexity growing
In your first response after reading, briefly note which doctrine files you consulted. Example: "Consulted: architecture.md (state limits), javascript.md (items 21-26 on enums over flags)"
- If AI Lint doctrine conflicts with generic best practices or model defaults: AI Lint wins.
- Rejects are stronger than preferences:
Do not use patterns listed in
.ai-lint/rejects/unless an override is explicitly requested.
Overrides are allowed but must be explicit.
If you believe an override is necessary:
- Consult
.ai-lint/overrides/OVERRIDE-PROTOCOL.md - Propose the override using the required format:
- Override:
- Reason:
- Risk:
- Mitigation:
Do not silently violate doctrine.
When generating code:
- Prefer semantic clarity and idioms over merely correct syntax.
- Surface complexity; do not hide it behind implicit behavior.
- Avoid patterns explicitly rejected by AI Lint.
- If uncertain, ask for clarification rather than inventing architectural decisions.
When proposing architecture or refactors:
- Cite which AI Lint doctrine entries motivated the decision (by section name/number).
When the user suggests a change, or you propose an approach, you must check it against AI Lint doctrine.
If the suggestion would violate a reject or doctrine entry, respond like this:
-
Name the violated item (reject/doctrine) and summarize why it exists.
-
Explain the specific conflict in this context.
-
Offer two paths:
A) Stay aligned: propose an alternative that satisfies the doctrine. B) Override: propose an explicit override using:
Override: Reason: Risk: Mitigation:
Do not silently violate doctrine. Do not force doctrine. Ask which path the user wants.
Before generating, modifying, or refactoring any code, you must run the AI Lint Quick Checklist.
Checklist location:
.ai-lint/CHECKLIST.md
You do not need to quote the checklist verbatim, but your reasoning and output must reflect that it has been applied.
At minimum, you must internally confirm:
- which doctrine files are relevant
- whether any rejected patterns are implicated
- whether concurrency, ownership, errors, and observability are explicit
- whether the proposed solution belongs here
If the checklist reveals a doctrine or reject violation, you must:
- Name the violated rule or reject (by ID or section name).
- Briefly explain why the rule exists.
- Offer two paths:
-
Stay aligned: propose an alternative that satisfies doctrine.
-
Override: propose a documented override using:
Override: Reason: Risk: Mitigation:
-
Do not silently violate doctrine. Do not assume an override. Surface the tradeoff and ask which path to take.
When presenting code or architectural suggestions:
- Prefer solutions that pass the checklist without overrides.
- If an override is chosen, keep it localized and explicit.
- If uncertain, ask clarifying questions rather than inventing structure.
The goal is not just correct code. The goal is code that belongs.