Skip to content

feat(deepinit): add manifest-based incremental deepinit tool#1720

Merged
Yeachan-Heo merged 2 commits intoYeachan-Heo:devfrom
anduinnn:feat/deepinit-incremental-manifest-1719
Mar 17, 2026
Merged

feat(deepinit): add manifest-based incremental deepinit tool#1720
Yeachan-Heo merged 2 commits intoYeachan-Heo:devfrom
anduinnn:feat/deepinit-incremental-manifest-1719

Conversation

@anduinnn
Copy link
Contributor

Summary

  • Add deepinit_manifest MCP tool with 3 actions: diff, save, check
  • Tracks directory file lists so subsequent /deepinit runs only regenerate AGENTS.md for changed directories (~90% token savings)
  • Security hardening: symlink containment, inode loop detection, depth/count limits
  • 44 test cases covering all actions, edge cases, and security scenarios

Changes

  • src/tools/deepinit-manifest.ts — Core tool implementation (scan, diff, load, save, check)
  • src/tools/__tests__/deepinit-manifest.test.ts — 44 test cases
  • src/mcp/omc-tools-server.ts — Tool registration with DEEPINIT category
  • src/constants/names.ts — DEEPINIT tool category constant
  • src/lib/worktree-paths.ts — DEEPINIT_MANIFEST path constant

Test plan

  • All 44 unit tests passing (npx vitest run src/tools/__tests__/deepinit-manifest.test.ts)
  • tsc --noEmit clean
  • Manual verification: run deepinit_manifest with action=check, action=save, action=diff

Closes #1719

…-Heo#1719)

Add `deepinit_manifest` MCP tool that tracks directory file lists so
subsequent /deepinit runs only regenerate AGENTS.md for directories
whose structure has actually changed (~90% token savings).

- New tool with 3 actions: diff, save, check
- Deterministic directory scanning with sorted file lists
- Ancestor cascading: parent dirs auto-marked modified on child changes
- Security hardening: symlink containment, inode loop detection,
  MAX_DEPTH=50, MAX_DIRECTORIES=10000
- O(n+m) Set-based diff comparison
- Registered in omc-tools-server with DEEPINIT category
- 44 test cases covering all actions, edge cases, and security scenarios

Closes Yeachan-Heo#1719
@Yeachan-Heo
Copy link
Owner

CI failed — omc-tools-server.test.ts expects 41 tools but got 42. You added a new tool but didn't update the tool count assertions.

Please update src/__tests__/omc-tools-server.test.ts:

  • omcToolNamesshould export expected tools total: change expected count from 41 to 42
  • getOmcToolNames → update the expected counts in the filter tests accordingly (should return all tools, filter out LSP, filter out AST, filter out python_repl, filter out skills)

After fixing, push to the same branch and CI should pass.


[repo owner's gaebal-gajae (clawdbot) 🦞]

Bump hardcoded tool counts in omc-tools-server.test.ts by 1 to
account for the newly added deepinit_manifest tool.
@Yeachan-Heo Yeachan-Heo merged commit 7d730b0 into Yeachan-Heo:dev Mar 17, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants