# Dag Deepen

> Architecture-deepening scan as a DAG: deterministic git-hotspot discovery picks the highest-friction modules, one agent leaf per hotspot concurrently hunts shallow modules (deletion test, deep-interface sketches), a synthesis leaf dedups cross-hotspot repetition and ranks by leverage, HTML report of candidates. Trigger: improve architecture / 找重构机会 / deepen modules / architecture report / dag-dee…

- **Type:** Skill
- **Install:** `agentstack add skill-abysscn-oh-my-dag-dag-deepen`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [AbyssCN](https://agentstack.voostack.com/s/abysscn)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [AbyssCN](https://github.com/AbyssCN)
- **Source:** https://github.com/AbyssCN/oh-my-dag/tree/main/skills/dag-deepen

## Install

```sh
agentstack add skill-abysscn-oh-my-dag-dag-deepen
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# /dag-deepen — architecture-deepening candidate scan

Engine-shaped port of Matt Pocock's improve-codebase-architecture: instead of one agent
wandering the repo, a **deterministic hotspot pass** (git touch frequency over recent
commits, zero LLM) picks the modules where friction actually lives, then a **fleet of
agent leaves scans them concurrently** — each hunting shallow modules with the deletion
test — and a synthesis leaf merges cross-hotspot duplication (the same logic hand-rolled
in N places = one shared-util candidate, the global win a single scan can't see) and
ranks by leverage. Output: an HTML report of before/after interface sketches.

## Usage

```bash
bun run scripts/dag-deepen.ts [] \
  [--commits N]    # commits scanned for hotspot discovery (default 200)
  [--hotspots K]   # top-K hotspot modules to scan (default 6)
  [--model M]      # leaf model (default OMD_LEAF_MODEL → deepseek:deepseek-v4-flash)
  [--out path]     # report path (default $TMPDIR/omd-deepen-.html)
```

Name a direction to skip repo-wide ranking: `bun run scripts/dag-deepen.ts "src/harness/plan"`.
Report lands in `$TMPDIR/omd-deepen-.html` (Tailwind + Mermaid cards, one per candidate:
files / friction / deletion-test verdict / before-after / strength).

## Discipline

- **Hotspot-first is YAGNI for architecture**: only recently-touched modules get scanned —
  friction you aren't paying is friction you don't refactor. Widen with `--commits`, don't
  tour the whole repo.
- **Candidates are inputs to `/grill`, not conclusions**: every run ends by telling you to
  grill the chosen candidate before touching code. dag-deepen never edits files, never
  opens a PR.
- **Vocabulary lives in `/codebase-design`** (shallow module / deletion test / deep
  interface / leverage / locality): the scan prompts inject that single source — read it
  there, don't re-derive it here.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [AbyssCN](https://github.com/AbyssCN)
- **Source:** [AbyssCN/oh-my-dag](https://github.com/AbyssCN/oh-my-dag)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-abysscn-oh-my-dag-dag-deepen
- Seller: https://agentstack.voostack.com/s/abysscn
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
