with one click
init-deep
Generate and maintain hierarchical AGENTS.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Generate and maintain hierarchical AGENTS.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
์ฌ์ฉ์์ ๋ง์ฐํ ์์ด๋์ด๋ฅผ ํ ์ง๋ฌธ์ฉ ์ธํฐ๋ทฐํด์ ์คํ ๊ฐ๋ฅํ MVP ์คํ์ผ๋ก ๋ง๋ ๋ค
Socratic deep interview with mathematical ambiguity gating before explicit execution approval
Consensus planning entrypoint that auto-gates vague team/ultragoal requests before execution
Multi-worker GJC tmux team orchestration
Create and execute durable repo-native multi-goal plans over GJC goal mode artifacts.
QA the omo Codex Light edition (lazycodex / packages/omo-codex) itself, in strict isolation so ONLY our plugin is exercised, never the user's real ~/.codex. The first-party method drives the real `codex app-server` against an isolated CODEX_HOME plus a LOCAL mock model (no real API call), and proves a plugin hook fired by asserting hook/started + hook/completed notifications. Also: isolated install verification, per-component hook probes, a tmux TUI smoke, and runtime log observation (RUST_LOG / logs SQLite / /debug-config). Ships tested helper scripts each with a --self-test. Use whenever someone changes anything under packages/omo-codex or wants to QA, smoke-test, verify, or debug the Codex plugin, its hooks/components, the installer/config.toml, the app-server flow, or the Codex TUI. Triggers: codex qa, qa codex, codex-qa, test codex plugin, verify codex hook, codex app-server, lazycodex qa, isolated CODEX_HOME, prove codex hook fired, codex tui test.
| name | init-deep |
| description | Generate and maintain hierarchical AGENTS. |
Create or update a project-wide AGENTS.md hierarchy with smarter scoring, tighter deduping, and more reliable discovery.
md files with complexity-scored subdirectories and strict deduplication. Use when asked to create, refresh, or improve AGENTS.md documentation, project knowledge bases, or directory-level agent guides; supports update or clean-regenerate workflows for codebases.
/init-deep # Update mode: preserve + refresh + add missing
/init-deep --create-new # Remove existing AGENTS.md and regenerate
/init-deep --max-depth=3 # Default depth cap
Update mode (default):
<!-- MANUAL START --> ... <!-- MANUAL END --><!-- KEEP --> single-line markers.Create-new mode:
AGENTS.md.bak.<YYYYMMDD> before regen.Run fast inventory commands; prefer rg for lists.
# Existing AGENTS/CLAUDE docs
rg --files -g 'AGENTS.md' -g 'CLAUDE.md'
# Directory depth distribution (ignore common build/venv dirs)
find . -type d -not -path '*/.*' \
-not -path '*/node_modules/*' -not -path '*/.venv/*' -not -path '*/venv/*' \
-not -path '*/dist/*' -not -path '*/build/*' | awk -F/ '{print NF-1}' | sort -n | uniq -c
# Files per directory (top 40)
find . -type f -not -path '*/.*' \
-not -path '*/node_modules/*' -not -path '*/.venv/*' -not -path '*/venv/*' \
-not -path '*/dist/*' -not -path '*/build/*' | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn | head -40
Optional: skim for explicit warnings.
rg -n "DO NOT|NEVER|DEPRECATED|MUST NOT|BREAKING" .
Use a weighted score to decide which directories need their own AGENTS.md.
Score =
Decision Rules
Boundary signals to treat as strong indicators:
pyproject.toml, package.json, go.mod, Cargo.toml__init__.py or index.ts in a folder with many filestests/, scripts/, docs/, data/ rootsNegative signals (lower priority):
node_modules, dist, build, .venv, venvcoverage, .pytest_cache)# PROJECT KNOWLEDGE BASE
**Generated:** {TIMESTAMP}
## OVERVIEW
{what it is + core stack + unique constraints}
## STRUCTURE
{tree of key dirs with short purpose lines}
## WHERE TO LOOK
| Task | Location | Notes |
## CONVENTIONS
{only deviations from normal patterns}
## ANTI-PATTERNS
{explicit "do not" and risky behaviors}
## COMMANDS
{dev/test/build/lint}
## RELATED AGENTS
{links to each subdirectory AGENTS.md}
Suggested footer section:
## RELATED AGENTS
- Parent: ../AGENTS.md
- Children: ./subdir/AGENTS.md
Dedup rules
Automated dedup
scripts/dedup_agents.py to detect and remove repeated lines between parent/child pairs.# Dry run
python scripts/dedup_agents.py --root .
# Apply changes
python scripts/dedup_agents.py --root . --apply
Quality gates
node_modules, dist, build, or virtualenvs.Optional duplicate scan (parent-child overlap):
python - <<'PY'
from pathlib import Path
import difflib
files = [p for p in Path('.').rglob('AGENTS.md')]
files = [p for p in files if 'node_modules' not in p.parts and 'dist' not in p.parts and 'build' not in p.parts]
for child in files:
parent = child.parent.parent / 'AGENTS.md'
if parent.exists():
c = child.read_text().splitlines()
p = parent.read_text().splitlines()
overlap = sum(1 for line in c if line in p and line.strip())
if overlap > 10:
print(f'High overlap: {child} ({overlap} lines)')
PY
=== init-deep Complete ===
Mode: {update | create-new}
Files:
โ ./AGENTS.md (root, {N} lines)
โ ./path/AGENTS.md ({N} lines)
Dirs Analyzed: {N}
AGENTS.md Created: {N}
AGENTS.md Updated: {N}
Skipped (low score): {N}