본문으로 건너뛰기
Skillpedia
문서화70k · #3121

init-deep

하는 일

이 도구는 프로젝트 문서를 AGENTS.md라는 파일로 정리합니다. 폴더 안의 폴더처럼 계층 구조를 만들어 AI가 프로젝트를 더 잘 이해하도록 합니다.

사용하는 경우

  • ✓새 프로젝트를 시작하고 AI가 구조를 이해하기를 원할 때.
  • ✓프로젝트가 커져서 문서를 정리해야 할 때.
  • ✓AI가 문서를 최신 상태로 유지하도록 돕게 하려는 경우.

스킬 링크

https://github.com/code-yeongyu/oh-my-openagent/blob/dev/packages/omo-senpi/skills/init-deep/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/code-yeongyu/oh-my-openagent/blob/dev/packages/omo-senpi/skills/init-deep/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“제 프로젝트 문서를 루트에서 시작해 필요하면 하위 폴더를 만들어 AGENTS.md 파일로 정리해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

도구는 먼저 프로젝트의 규모를 측정하고 나누는 방법을 정합니다. 그다음 각 부분의 정보를 모으고, 마지막으로 AGENTS.md 파일을 작성해 AI가 프로젝트를 명확하고 정돈된 시각으로 보도록 합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

/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)

  1. Size & route (main session) - ONE eval cell measures the repo and computes the node formula.
  2. Map (dag) - quick scanner nodes extract per-chunk facts into bounded file reports.
  3. Reduce (dag) - unspecified-high writer nodes own disjoint subtrees: score, write AGENTS.md files, emit digests.
  4. Root & verify (dag) - one node writes root AGENTS.md from digests only; one node verifies every file.
  5. Snapshot & mode (main session) - snapshot contract unchanged.
<critical> **THE ALWAYS-REDUCE RULE.** The main session NEVER reads chunk reports or raw node outputs - only the verify node's verdict and, when a repair needs it, one digest. Context protection is structural (bounded fan-in at every stage), never a runtime "how much context is left" guess.

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

# Formula
CHUNK   = 400 * 1024          # ~100k tokens of source; a quick worker's usable window
                              # is ~150k over its fallback chain - leave room for its
                              # prompt and report
N_quick = ceil(S / CHUNK)     # bin-pack WHOLE directories into chunks; a directory
                              # larger than one chunk splits at its children
N_high  = ceil(N_quick / 12)  # one reducer absorbs ~12 reports (~60k tokens) and
                              # still has room to spot-check real code

Route:

  • **N_quick < 4** -> inline path below; a dag costs more than it saves.
  • N_quick > task.dag.max_nodes_per_run (default 64) -> raise the knob in omo config, or run one chained dag per top-level directory (multi-run composition, mass-ulw skill).
  • Otherwise -> dag path: emit CHUNKS = [{id, dirs, bytes}], assign each writer a directory SUBTREE (disjoint - no two writers own the same directory), and mkdir -p .omo/init-deep/reports .omo/init-deep/digests.

--create-new: read every existing AGENTS.md FIRST (still-true facts survive as scanner input), then delete all, then regenerate.

Inline path (N_quick < 4)

Small repo - skip the dag. Fire 2-4 parallel explore agents (structure, entry points, conventions, anti-patterns), for example:

task(subagent_type="explore", run_in_background=true, prompt="Project structure: map real layout via ast-grep structural search (sg/ast_grep MCP) + rg --files -> REPORT deviations from standard patterns")

Run the LSP/ast-grep code map yourself (lsp_symbols outlines + workspace inventory, lsp_find_references on top exports, ast-grep import/call shapes; when neither resolves, mark centrality unmeasured). Then score with the matrix below and write every file per the templates yourself. Phase 5 applies unchanged.


Phase 2: Map Wave - quick Scanners (dag)

Build and start the run in one eval JS cell with the dag SDK (OMO_DAG_SDK_ROOT); wave doctrine, the node prompt contract, and the failure playbook come from the mass-ulw skill's references/planning.md. One scanner node per chunk, category: "quick", no load_skills - scanners stay lean and their prompt is a rigid numbered extraction template. Quick workers extract; they never judge and never write AGENTS.md:

TASK: Extract knowledge-base facts for chunk <id> (<dirs>) of <repo-root>.
Steps, in order:
1. Inventory each directory in scope: file count, LOC, languages, entry files.

…
자주 묻는 질문

AGENTS.md 파일이란 무엇인가요?

AI가 프로젝트의 구조, 명령, 관례를 이해하도록 돕는 문서 파일입니다.

‘계층적’이란 무엇을 뜻하나요?

문서가 폴더와 하위 폴더처럼 단계로 정리되어 탐색하고 이해하기 쉽다는 뜻입니다.

정리의 깊이를 조절할 수 있나요?

네, 하위 폴더의 깊이 한도를 정해서 지나치게 복잡한 구조가 되지 않도록 할 수 있습니다.

상세 정보

작성자의 원본 설명

Initializes a hierarchical AGENTS.md knowledge base for a project. Use when a repo needs its structure, commands, and conventions documented for agents.

repo: code-yeongyu/oh-my-openagent

인기도

GitHub 스타
70k
순위
#3121
라이선스
NOASSERTION
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬