Codify Learnings¶
The codify command is the mechanism for explicitly teaching the system. While the system learns automatically from work sessions, codify allows you to inject specific rules, architectural decisions, or preferences directly into the Knowledge Base.
Usage¶
Arguments¶
FEEDBACK: A string containing the rule, pattern, or lesson you want the system to learn.
Options¶
--source/-s: Tag the source of this learning. Common tags:manual: Direct input (default)pull_request: From a PR commentretro: From a retrospective meetingincident: From a post-incident review
Examples¶
1. Architectural Rules¶
Future Effect: Agents will verify this in review and implement it in work.
2. Contextual Preferences¶
3. Deprecations¶
How It Works¶
- Analysis: The
FeedbackCodifieragent analyzes your natural language input. - Structuring: It converts it into a structured Learning object:
- Context: When does this apply? (e.g., "Python files", "API Layer").
- Action: What should be done? (e.g., "Use httpx").
- Rationale: Why? (Inferred from input or added by agent).
- Storage: Saves the JSON learning to
.knowledge/. - Indexing: Updates
AI.md(human-readable summary) and internal indexes.
Best Practices¶
- Be Specific: "Make code better" is hard to enforce. "Limit functions to 50 lines" is enforceable.
- Include "Why": The system understands rationale. "Use X because Y" is more powerful than just "Use X".