Task
Update the codebase graph to reflect recent changes.
$ARGUMENTS
Protocol
- Run
git log --oneline -10to gauge how many commits since last update, thengit diff HEAD~N..HEAD --statwhere N covers all unreviewed commits (default to 5 if unsure) - For significantly changed files, read them to understand the new structure
- Read the current
.claude/scratchpad/librarian/codebase_graph.md - Update the codebase graph with:
- New modules, classes, or functions
- Changed interfaces or data shapes
- Removed or renamed components
- Updated import chains or dependencies
Required Output
- Update
.claude/scratchpad/librarian/codebase_graph.mdin place - Write a scratchpad entry to
.claude/scratchpad/librarian/YYYY-MM-DD.mddocumenting what changed
Convention Discovery (Self-Assemblage)
While updating the codebase graph, also scan for emergent conventions that may warrant formalization:
- Repeated patterns: New coding patterns used 3+ times across different files without a matching rule in
.claude/rules/. Examples: consistent error handling patterns, import ordering conventions, data validation idioms. - Import conventions: Import patterns that appear consistently — e.g., always importing from SRAI before h3, or always using
StudyAreaPathsfor path construction. - Naming conventions: Consistent naming patterns emerging in new code that aren't documented anywhere.
When a candidate convention is identified, note it in the librarian scratchpad as:
Candidate Convention: [pattern description]
- Seen in: [file1, file2, file3]
- Current rule: none / partial match in [rule file]
- Recommendation: formalize as rule / monitor / too early to tell
This is how the rule system grows organically — conventions emerge from practice, get noticed by the librarian, and are formalized only after proving their value across multiple sessions.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.