一键导入
milens-plan
Implementation Planning — research codebase, analyze impact, plan tests, and produce a structured implementation plan
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Implementation Planning — research codebase, analyze impact, plan tests, and produce a structured implementation plan
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Code intelligence for the adapters area — symbols, dependencies, and entry points
Code intelligence for the analyzer area — symbols, dependencies, and entry points
Code intelligence for the apps area — symbols, dependencies, and entry points
Code intelligence for the docs area — symbols, dependencies, and entry points
Code intelligence MCP tools — symbol search, text grep, impact analysis, dependency graph
Code intelligence for the orchestrator area — symbols, dependencies, and entry points
| name | milens-plan |
| description | Implementation Planning — research codebase, analyze impact, plan tests, and produce a structured implementation plan |
Research the codebase end-to-end before writing code: understand structure, trace execution, assess blast radius, plan tests, and produce a structured plan following the ECC Planner specification.
| Tool | Purpose |
|---|---|
mcp_milens_codebase_summary | High-level project overview (languages, file count, domain count) |
mcp_milens_domains | Module clusters showing logical groupings |
mcp_milens_routes | API endpoints inventory with handler mappings |
mcp_milens_smart_context | Intent-aware symbol analysis (edit intent) |
mcp_milens_edit_check | Pre-edit safety: callers, export status, re-export chains, warnings |
mcp_milens_trace | Execution flow from entrypoints to target |
mcp_milens_impact | Blast radius: what breaks if target changes |
mcp_milens_test_plan | Mock strategy + test scenarios for a symbol |
mcp_milens_test_coverage_gaps | Related untested symbols |
CRITICAL: All milens MCP tool calls MUST include the
repoparameter set to the absolute path of the workspace root.
Understand the codebase at a high level.
mcp_milens_codebase_summary({repo: "<workspaceRoot>"})
Captures: languages, file counts, total symbols, top-level domains, entry points.
Map module clusters to understand logical groupings.
mcp_milens_domains({repo: "<workspaceRoot>"})
Shows which files form cohesive modules based on the dependency graph. Helps identify:
If the project is a web service, inventory the endpoints.
mcp_milens_routes({repo: "<workspaceRoot>"})
Useful when the change touches:
Zoom in on the specific symbol to change.
mcp_milens_smart_context({name: "<symbolName>", intent: "edit", repo: "<workspaceRoot>"})
The edit intent returns: callers, export status, and immediate blast radius — only what matters for editing.
Run edit_check for pre-edit warnings.
mcp_milens_edit_check({name: "<symbolName>", repo: "<workspaceRoot>"})
This returns:
Trace how the target gets called at runtime.
mcp_milens_trace({name: "<symbolName>", direction: "to", repo: "<workspaceRoot>"})
Shows the call chains from entrypoints down to this symbol. Critical for understanding:
Assess the full impact of the proposed change.
mcp_milens_impact({target: "<symbolName>", depth: 3, repo: "<workspaceRoot>"})
Shows all symbols that break if the target changes, up to the specified depth.
Plan the testing approach.
mcp_milens_test_plan({name: "<symbolName>", repo: "<workspaceRoot>"})
Covers:
Check for related symbols that lack test coverage.
mcp_milens_test_coverage_gaps({repo: "<workspaceRoot>", limit: 10})
If neighboring symbols are untested, consider adding tests as part of the change.
Consolidate all findings into a structured plan:
"plan a change to add rate limiting to the login handler"
Step 1:
mcp_milens_codebase_summary({repo: "/home/user/project"})
Output: TypeScript project, 120 files, 850 symbols, 5 domains (auth, routes, db, utils, config).
Step 2:
mcp_milens_domains({repo: "/home/user/project"})
Output: auth domain contains login handler, token manager, session store.
Step 4:
mcp_milens_smart_context({name: "loginHandler", intent: "edit", repo: "/home/user/project"})
Output: 3 callers (Express route, rate limiter middleware, integration test), no re-exports.
Step 5:
mcp_milens_edit_check({name: "loginHandler", repo: "/home/user/project"})
Output: 3 callers, exported, no re-export chains, WARNING: exported function — changing signature is a breaking change.
Step 6:
mcp_milens_trace({name: "loginHandler", direction: "to", repo: "/home/user/project"})
Output: Chain: Express router → authMiddleware → loginHandler → tokenService.sign()
Step 7:
mcp_milens_impact({target: "loginHandler", depth: 3, repo: "/home/user/project"})
Output: Depth-1: 3 dependents (route, integration test, auth docs). Depth-2: 8 dependents. Depth-3: 14 dependents. No STOP threshold breached.
Step 8:
mcp_milens_test_plan({name: "loginHandler", repo: "/home/user/project"})
Output: Mock tokenService, userStore. 4 test scenarios: valid login, invalid password, rate limit exceeded, database failure.
Step 10 — Plan produced (see plan format above).
impact catches what intuition misses.edit intent for smart_context when planning edits — it omits irrelevant detail and focuses on callers and blast radius.| Criteria | Pass | Fail |
|---|---|---|
| Codebase overview | All 3 overview tools succeed (summary, domains, routes) | Any tool fails or returns empty |
| Target analysis | smart_context + edit_check both run | Either tool skipped for the target symbol |
| Impact assessment | impact at depth 3 completed, dependents counted | Impact not run or depth < 3 |
| Blast radius check | < 5 depth-1 dependents OR user warned and confirmed | > 5 depth-1 dependents without user confirmation |
| Test plan | test_plan covers happy path, edge cases, and errors | Less than 3 scenarios in the plan |
| Implementation plan | All 7 sections of the plan filled | Missing sections or incomplete analysis |