Init Deep
Initializes a hierarchical AGENTS.md knowledge base for a project.
Install
npx skills add code-yeongyu/oh-my-openagent --skill init-deep -g -a claude-code -y- Repository
- code-yeongyu/oh-my-openagent70.6k
- Category
- AI and agents
- Updated
- 3d ago
- License
- See repository
- Context cost
- Mediumabout 3,000 tokens
- Runs scripts
- No, instructions only
What it does
Initializes a hierarchical AGENTS.md knowledge base for a project. Use when a repo needs its structure, commands, and conventions documented for agents.
/init-deep
Generate hierarchical AGENTS.md files: root + complexity-scored subdirectories, produced by a size-formula-driven dag map-reduce (quick scanners -> unspecified-high writers) so the main session's context stays flat at any repo size.
Usage
/init-deep # Update mode: modify existing + create new where warranted
/init-deep --create-new # Read existing → remove all → regenerate from scratch
/init-deep --max-depth=2 # Limit directory depth (default: 3)
Workflow (High-Level)
- Size & route (main session) - ONE eval cell measures the repo and computes the node formula.
- Map (dag) -
quickscanner nodes extract per-chunk facts into bounded file reports. - Reduce (dag) -
unspecified-highwriter nodes own disjoint subtrees: score, write AGENTS.md files, emit digests. - Root & verify (dag) - one node writes root AGENTS.md from digests only; one node verifies every file.
- Snapshot & mode (main session) - snapshot contract unchanged.
todo init the five phases; start/done each transition in real time.
</critical>
Phase 1: Size & Route
Measure and compute in ONE eval cell - code, not mental arithmetic:
# Measure (tracked files minus vendored/generated: node_modules, .git, dist,
# build, out, vendor, target, coverage, lockfiles, minified and binary files)
S = total source bytes after exclusions
per_dir = source bytes per directory # bin-packing input
depth = max directory depth # respect --max-depth (default 3)
existing = every AGENTS.md / CLAUDE.md path # read the ROOT one now

