init-deep

Generates hierarchical AGENTS.md knowledge base files across complexity-scored project directories.

Updated Jun 18, 2026
One-click install
npx skills add https://github.com/hugefiver/ocmm --skill init-deep-hugefiver
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: init-deep
Source: https://github.com/hugefiver/ocmm/tree/main/plugins/deepwork/skills/init-deep
Command: npx skills add https://github.com/hugefiver/ocmm --skill init-deep-hugefiver

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Large codebases lack structured, navigable documentation for AI agents and developers, forcing repeated rediscovery of project structure, conventions, and entry points. ## Core Features & Use Cases - Hierarchical AGENTS.md Generation: Creates a root knowledge base plus subdirectory files only where complexity scoring (file count, symbol density, reference centrality) justifies them. - Concurrent Discovery: Runs bash structural analysis, LSP symbol/reference mapping, and dynamically scaled exploration agents in parallel based on project size. - Update or Regenerate Modes: Reads existing AGENTS.md files to preserve context, then updates in place or rebuilds from scratch with --create-new. - Use Case: Point it at a monorepo with multiple languages and deep nesting; it measures scale, spawns proportional exploration agents, and produces a deduplicated documentation tree with code maps and conventions. ## Quick Start Run /init-deep in your project root to analyze the codebase and generate a hierarchical AGENTS.md knowledge base.

Frequently Asked Questions about init-deep

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate AGENTS.md files for a large codebase?▼

Run /init-deep in the project root. It analyzes structure with bash metrics and LSP, scores each directory for complexity, then generates a root AGENTS.md plus subdirectory files only where scores exceed thresholds.

How does init-deep decide which directories need AGENTS.md files?▼

It applies a weighted scoring matrix covering file count, subdirectory count, code ratio, module boundaries, symbol density, export count, and reference centrality. Directories scoring above 15 always get a file; scores of 8-15 require a distinct domain.

Does init-deep overwrite existing AGENTS.md files?▼

By default it reads existing files first and updates them in place using edit operations. The --create-new flag reads all existing files to preserve context, then deletes and regenerates everything from scratch.

What happens if LSP is unavailable during analysis?▼

The skill falls back to exploration agents plus Grep, Read, and Glob evidence, and marks reference centrality as unmeasured in the code map. It does not substitute ast-grep as a baseline replacement.

How does init-deep scale exploration for big projects?▼

It measures total files, lines, directory depth, large files, monorepo packages, and language count, then spawns additional exploration agents per threshold, such as one extra agent per 100 files or per workspace package.