feat(deepinit): add manifest-based incremental deepinit tool#1720
Merged
Yeachan-Heo merged 2 commits intoYeachan-Heo:devfrom Mar 17, 2026
Merged
Conversation
…-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
Owner
|
CI failed — Please update
After fixing, push to the same branch and CI should pass. — |
Bump hardcoded tool counts in omc-tools-server.test.ts by 1 to account for the newly added deepinit_manifest tool.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
deepinit_manifestMCP tool with 3 actions:diff,save,check/deepinitruns only regenerate AGENTS.md for changed directories (~90% token savings)Changes
src/tools/deepinit-manifest.ts— Core tool implementation (scan, diff, load, save, check)src/tools/__tests__/deepinit-manifest.test.ts— 44 test casessrc/mcp/omc-tools-server.ts— Tool registration with DEEPINIT categorysrc/constants/names.ts— DEEPINIT tool category constantsrc/lib/worktree-paths.ts— DEEPINIT_MANIFEST path constantTest plan
npx vitest run src/tools/__tests__/deepinit-manifest.test.ts)tsc --noEmitcleandeepinit_manifestwith action=check, action=save, action=diffCloses #1719