Member 2 · Traceability side of the loop AI 規格大師 · MK SPEC MASTER
mk-spec-master reads specs from Linear / JIRA / GitHub Issues / Notion / Figma / Markdown and turns them into structured scenarios you hand to any test runner. Keeps a live spec ↔ test coverage matrix, grades the specs themselves, and (v0.4+) self-reinforces over time — trend deltas, chronic-spec detection, tool-usage telemetry. The differentiator vs Kiro / Spec Kit / Jama.
mk-spec-master sits between your spec source and your test runner. It's not the editor, runner, or LLM.
Grouped by role. Each group is one layer in the spec → test → coverage → coach loop.
get_spec_source_info — Active adapter + all available. Call this first.list_specs — Filter by status / label / limit.fetch_spec — Pull a single spec by id.parse_spec — Heuristic AC extraction (en + zh-TW + zh-CN headings). Returns ac_hash.extract_scenarios — AC → scenarios with happy / edge / error classification.generate_test_plan — One-shot markdown plan ready to hand to mk-qa-master.link_test_to_spec — Record that a test verifies a spec; stores title / source / ac_hash.auto_link_tests — Scan test files for @spec: tags. Python / JS / TS / Go.get_coverage_matrix — "Which specs have no tests" in one call.get_drift_report — fresh / drifted / unknown / stranded buckets.analyze_spec_quality — Vague language, implementation-leak AC, unclear role refs.propose_spec_improvements — PM-facing markdown with concrete rewrites.get_optimization_plan — Three-layer prioritized plan: coverage + quality + drift.init_spec_knowledge — Starter spec-knowledge.md (EARS, INVEST, AC quality rules).get_spec_context — Read the methodology file; optional section filter.get_spec_history — Trend deltas current vs ~7d / ~30d across coverage / quality / drift.get_drift_signature — Chronic-spec detection: unstable / chronic_low_quality / chronic_unhashed.get_telemetry — Tool-usage log: top tools, error rate, p50/p95, dead surface. No argument values logged.Switch via the SPEC_SOURCE env var. Same tools, six different backends.
markdown_localgithub_issueslinearjiranotionfigmaOne sentence to the AI client; the tools chain automatically.
"Fetch LIN-123, extract scenarios, generate Playwright tests with mk-qa-master, run them, and update the coverage matrix."
fetch_spec → parse_spec → extract_scenarios → mk-qa-master.generate_test (×N) → link_test_to_spec (×N) → mk-qa-master.run_tests → get_coverage_matrix
"Review every in-progress spec for quality issues and give me a prioritized improvement plan."
list_specs(status='in-progress') → analyze_spec_quality → propose_spec_improvements → get_optimization_plan
"Sync the spec ↔ test index from the test source — I just renamed a bunch of files."
auto_link_tests → get_coverage_matrix
"Load the spec-knowledge methodology and tell me which source is active before we start."
get_spec_source_info → get_spec_context
Two of the most-shown outputs — both ready to paste into Slack, JIRA, or a sprint planning doc.
# Optimization plan _Coverage matrix: 23 spec(s) tracked, 4 untested._ _Spec quality: 23 spec(s) analyzed, 17 finding(s)._ _Drift: 2 drifted, 0 stranded, 5 without ac_hash._ ## 🔴 Layer 1 — Coverage gaps **Specs with zero tests** (ranked first — every business risk lives here): - `LIN-204` — Apply promo code at checkout - `LIN-211` — Refund flow ## 🟡 Layer 2 — Spec quality ### `LIN-098` — Checkout latency (score: 80/100, findings: 4) - 🟡 `ac-1`: Quantify (e.g., 'response within 200 ms') (evidence: `fast`) - 🔴 `ac-3`: Rewrite to describe what the user observes (evidence: `redis`) ## 🔵 Layer 3 — Process drift **Drifted** (spec changed since link — review affected tests): - `LIN-123` — Apply discount at checkout · 4 test(s) potentially stale
# Coverage matrix - Specs tracked: 23 - Specs shown (min_tests=0): 23 - Specs with zero tests: 4 | Spec | Title | Tests | Last status | |-----------|--------------------------------|------:|-------------| | `LIN-204` | Apply promo code at checkout | 0 | — | | `LIN-123` | Apply discount at checkout | 4 | passed |
Restart your client, then talk to the AI like you always do.
{
"mcpServers": {
"mk-spec-master": {
"command": "uvx",
"args": ["mk-spec-master"],
"env": {
"SPEC_SOURCE": "markdown_local",
"SPEC_PROJECT_ROOT": "/path/to/your/project"
}
}
}
}