Langsung ke konten
Skillpedia
Dokumentasi70k Β· #3121

init-deep

Fungsinya

Alat ini menata dokumentasi proyek Anda ke dalam file-file bernama AGENTS.md. Alat ini membuat struktur bertingkat, seperti folder di dalam folder, agar kecerdasan buatan dapat memahami proyek dengan lebih baik.

Kapan dipakai

  • βœ“Saat Anda memulai proyek baru dan ingin AI memahami strukturnya.
  • βœ“Saat proyek makin besar dan dokumentasinya perlu ditata ulang.
  • βœ“Saat Anda ingin AI membantu menjaga dokumentasi tetap terbarui.

Link skill

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

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/code-yeongyu/oh-my-openagent/blob/dev/packages/omo-senpi/skills/init-deep/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œAtur dokumentasi proyek saya ke dalam file AGENTS.md, mulai dari root dan buat subfolder sesuai kebutuhan.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Alat ini pertama-tama mengukur ukuran proyek Anda dan memutuskan cara membaginya. Setelah itu, alat ini mengumpulkan informasi dari setiap bagian dan akhirnya menulis file AGENTS.md, sehingga AI selalu memiliki gambaran proyek yang jelas dan terorganisir.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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.

…
Pertanyaan umum

Apa itu file AGENTS.md?

Itu adalah file dokumentasi yang membantu kecerdasan buatan memahami struktur, perintah, dan konvensi sebuah proyek.

Apa arti 'hierarchical'?

Artinya, dokumentasi diatur dalam beberapa tingkatan, seperti folder dan subfolder, agar lebih mudah dinavigasi dan dipahami.

Bisakah saya mengatur kedalaman struktur folder?

Bisa, Anda dapat menetapkan batas kedalaman subfolder agar strukturnya tidak menjadi terlalu rumit.

Detail

Deskripsi asli dari pembuat

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

Popularitas

Bintang GitHub
70k
Peringkat
#3121
Lisensi
NOASSERTION
Diperbarui
15/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa