update_ai_readme
Records project conventions and decisions to AI_README.md, preventing conflicts and ensuring consistent AI behavior.
Instructions
CALL THIS to record DECISIONS and CONVENTIONS.
WHEN TO CALL:
A. CONFLICT RESOLUTION — STOP IMMEDIATELY when any of these occur:
User says: "don't use X", "use Y instead", "prefer", "switch to".
During planning: user's request or your proposal differs from AI_README conventions.
During planning: user approves a plan that contradicts AI_README.
User overrides a convention mid-task (even casually, e.g. 'just use X here').
DO NOT continue planning or coding. Call update_ai_readme first, then resume.
B. ARCHITECTURAL DECISIONS (during planning/implementation):
You chose a design pattern (e.g., repository pattern, factory, singleton).
You decided on API structure (REST paths, error format, response shape).
You established naming conventions (files, functions, variables).
You created new abstractions (utilities, hooks, services, types).
You set up error handling strategy or validation approach.
You introduced a new dependency or integration pattern.
C. IMPLEMENTATION PATTERNS (after writing code):
You created a reusable pattern others should follow.
You established a file/folder structure for a new feature.
You made decisions that affect future development.
D. MISSING / UNDOCUMENTED (during get_context or code review):
AI_README is missing a convention that is ALREADY USED in 2+ existing files.
A pattern exists in code but not in AI_README — record it so future code follows it.
Do NOT record one-off choices or speculative future patterns.
RULE: If a decision will affect MORE THAN ONE FILE or FUTURE CODE → RECORD IT.
WORKFLOW:
get_context (read current conventions).
Make decision or detect conflict.
update_ai_readme (record the decision).
Continue with implementation.
Content Rules:
Extremely concise (default < 400 tokens; project may set a higher tokenBudget).
Only actionable conventions (tech, naming, patterns, infrastructure patterns, testing patterns).
NO explanations or examples
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operations | Yes | List of update operations to perform | |
| readmePath | Yes | Path to the AI_README.md file to update |