| name | reindex |
| description | Rebuilds the codebase knowledge index at docs/codebase-index.json. Scans all source files for module structure, exports, dependencies, and tech debt hotspots. Shared across all three agents.
|
| context | fork |
| agent | forja-dev |
Rebuild the codebase knowledge index.
Follow these steps:
SIGN IN:
- Run the SIGN IN checklist from your agent file
- Check if
docs/codebase-index.json exists (rebuild vs fresh build)
INDEX:
- Use
tools/codebase-indexer.py if available, otherwise perform manual indexing:
python3 tools/codebase-indexer.py --output docs/codebase-index.json
- If manual indexing is needed, scan
src/ recursively:
- For each file, extract:
- Module path (relative to project root)
- Language (from extension)
- Exported functions/classes with signatures
- Import statements (to build dependency graph)
- File size (lines of code)
- Cross-reference with
TECH_DEBT.md:
- Flag files mentioned in tech debt entries as hotspots
- Cross-reference with
docs/reviews/:
- Flag files with recent security findings
- Build the dependency graph:
- Module A imports Module B -> edge from A to B
- Identify circular dependencies
- Identify orphan modules (not imported by any other module)
VERIFY:
TIME OUT — Index Verification (DO-CONFIRM):
SIGN OUT:
6. Report index summary: file count, symbol count, dependency edge count, hotspot count
7. Note if circular dependencies were found
8. Run the SIGN OUT checklist from your agent file