一键导入
milens-eval
Evaluation & Quality Gate — plan, implement, verify scope, review risk, run tests, check coverage, and pass/fail
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Evaluation & Quality Gate — plan, implement, verify scope, review risk, run tests, check coverage, and pass/fail
用 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-eval |
| description | Evaluation & Quality Gate — plan, implement, verify scope, review risk, run tests, check coverage, and pass/fail |
A structured quality gate for feature development: plan tests, implement changes, verify scope, review risks, run impacted tests, check coverage gaps, and produce a pass/fail verdict.
| Tool | Purpose |
|---|---|
mcp_milens_test_plan | Generate test strategy before implementation |
mcp_milens_detect_changes | Verify only expected files changed after implementation |
mcp_milens_review_pr | Risk assessment of the changes |
mcp_milens_test_impact | Identify and run affected test files |
mcp_milens_test_coverage_gaps | Verify no new untested critical symbols introduced |
CRITICAL: All milens MCP tool calls MUST include the
repoparameter set to the absolute path of the workspace root.
Before writing code, plan the test strategy.
mcp_milens_test_plan({name: "<symbolName>", repo: "<workspaceRoot>"})
This provides:
Review the plan to ensure it covers:
Write the actual code changes. This is the implementation phase:
console.log, no commented-out code, no debug artifactsVerify the scope of changes matches expectations.
mcp_milens_detect_changes({repo: "<workspaceRoot>"})
Check:
Assess the quality and risk of the changes.
mcp_milens_review_pr({repo: "<workspaceRoot>"})
Focus on:
Identify and run all affected tests.
mcp_milens_test_impact({repo: "<workspaceRoot>"})
This returns the list of test files impacted by the changes. Run them all:
Verify no new untested critical symbols were introduced.
mcp_milens_test_coverage_gaps({repo: "<workspaceRoot>", limit: 20})
Review the output:
Apply the pass/fail criteria (see Quality Gate section below) and produce a verdict:
PASSED:
CONDITIONAL PASS:
FAILED:
"evaluate the feature branch for the new rate limiter"
Step 1 — Test plan:
mcp_milens_test_plan({name: "RateLimiter", repo: "/home/user/project"})
Output:
Test Plan for RateLimiter:
Mock strategy: stub Redis client, stub clock
Tests:
1. allows requests within limit
2. blocks requests exceeding limit
3. resets counter after window expires
4. handles Redis connection failure gracefully
Affected: src/__tests__/middleware.test.ts (new)
Step 2 — Implement rate limiter class and tests.
Step 3 — Detect changes:
mcp_milens_detect_changes({repo: "/home/user/project"})
Output:
Changed files:
src/middleware/rateLimiter.ts [new]
src/__tests__/middleware.test.ts [new]
src/middleware/index.ts [modified] — barrel export
3 files — all expected.
Step 4 — Review risk:
mcp_milens_review_pr({repo: "/home/user/project"})
Output:
Affected symbols:
RateLimiter [class] MEDIUM — 2 callers, 4 tests
applyRateLimit [function] LOW — 0 callers (internal helper)
No CRITICAL findings. 1 LOW suggestion: add JSDoc to RateLimiter class.
Step 5 — Test impact:
mcp_milens_test_impact({repo: "/home/user/project"})
Output:
Affected test files:
src/__tests__/middleware.test.ts (new)
Run tests: npm test -- middleware.test.ts — all 4 pass.
Step 6 — Coverage gaps:
mcp_milens_test_coverage_gaps({repo: "/home/user/project", limit: 20})
Output: No new HIGH-risk symbols introduced. 3 pre-existing LOW/medium gaps unrelated to this change.
Step 7 — Verdict: PASSED.
package-lock.json change you didn't intend, something went wrong. Investigate every unexpected file.| Criteria | Pass | Fail |
|---|---|---|
| Test plan exists | Test plan generated with ≥3 scenarios | No test plan or < 3 scenarios |
| Change scope | detect_changes shows only expected files | Unexpected files in diff (unless harmless) |
| Review risk | No CRITICAL findings | Unresolved CRITICAL findings |
| Test execution | All test_impact files pass | Any test file fails |
| Coverage gaps | No new HIGH-risk symbols without tests | New HIGH-risk symbol has 0 test coverage |
| Gate verdict | PASSED or CONDITIONAL PASS (with documented remediation) | FAILED — must fix and re-run evaluation |