mk:rubric
Loads, composes and validates weighted PASS/WARN/FAIL rubrics with anchor examples. NOT for mk:evaluate.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 16
- Forks
- 3
01 前言 Front Matter
- name
- mk:rubric
- owner
- testing
- source
- local
- status
- active
- runtime
- claude-code
- version
- 1.0.0
- keywords
- [ "rubric", "graded-evaluation", "weighted-criteria", "pass-warn-fail", "anchor-examples", "calibration" ]
- criticality
- medium
- description
- Loads, composes and validates weighted PASS/WARN/FAIL rubrics with anchor examples. NOT for mk:evaluate.
- when_to_use
- A grader needs a rubric preset loaded or a new one checked for balance.
- allowed-tools
- [ "Bash", "Read", "Grep", "Glob" ]
- argument-hint
- [list | load <name> | compose <preset> | validate]
- preamble-tier
- 3
- user-invocable
- true
02 资源文件 18
- 参考文档references/calibration-guide.md6.3 KB
- 参考文档references/rubric-rules.md4.1 KB
- 参考文档rubrics/calibration-set/README.md3.0 KB
- 参考文档rubrics/code-quality.md2.7 KB
- 参考文档rubrics/composition-presets/backend-api.md1.1 KB
- 参考文档rubrics/composition-presets/cli-tool.md1.7 KB
- 参考文档rubrics/composition-presets/frontend-app.md3.0 KB
- 参考文档rubrics/composition-presets/fullstack-product.md1.9 KB
- 参考文档rubrics/craft.md3.0 KB
- 参考文档rubrics/design-quality.md3.2 KB
- 参考文档rubrics/functionality.md2.6 KB
- 参考文档rubrics/originality.md3.2 KB
- 参考文档rubrics/product-depth.md2.6 KB
- 参考文档rubrics/RUBRICS_INDEX.md4.3 KB
- 参考文档rubrics/schema.md3.7 KB
- 参考文档rubrics/ux-usability.md2.8 KB
- 脚本scripts/load-rubric.sh5.2 KB
- 脚本scripts/validate-rubric.sh6.7 KB
03 SKILL.md 正文
Rubric Library API
Discovery, composition, and validation for the rubric library at rubrics/.
Path convention: Commands below assume cwd is
$CLAUDE_PROJECT_DIR(project root). Prefix paths with"$CLAUDE_PROJECT_DIR/"when invoking from subdirectories.
Consumed by
evaluatoragent +mk:evaluateskill (Phase 3, shipped 260408). The dedicatedevaluatorsubagent (.claude/agents/evaluator.md) drives the running build via active verification and grades it against rubrics composed from this library. Themk:evaluateskill (.claude/skills/evaluate/) is the orchestration shell. This skill (mk:rubric) remains independently invokable via/mk:rubric <subcommand>for manual rubric inspection, validation, or composition outside the evaluator workflow.
When to Use
Activate when:
- User runs
/mk:rubric [subcommand] - An evaluator subagent needs to load rubrics for grading
- Sprint-contract negotiation references a rubric by path
- CI validates rubric schema conformance after edits
Subcommands
| Subcommand | Purpose | Output |
|---|---|---|
list |
List all available rubrics + presets | Table: name, weight_default, applies_to |
load <name> |
Load a single rubric and emit prompt-ready fragment | Markdown block ready to inject into evaluator prompt |
compose <preset> |
Load a composition preset and return all member rubrics + weights | Composed prompt fragment with weight table |
validate [path] |
Validate one rubric (or all if no path) against schema.md | PASS / FAIL with diagnostics |
validate --preset [path] |
Validate composition preset (weights sum to 1.0 ±0.01) | PASS / FAIL |
Usage Examples
# List all rubrics
${CLAUDE_SKILL_DIR}/scripts/load-rubric.sh --list
# Load one rubric for the evaluator
${CLAUDE_SKILL_DIR}/scripts/load-rubric.sh design-quality
# Compose a preset (returns all member rubrics + weight table)
${CLAUDE_SKILL_DIR}/scripts/load-rubric.sh --preset frontend-app
# Validate every rubric file in the library
${CLAUDE_SKILL_DIR}/scripts/validate-rubric.sh
Output Schema
load <name> output
## Rubric: {name} (weight: {weight_default}, hard_fail: {threshold})
{Intent paragraph}
### Criteria
{bullets}
### Grading
{table}
### Anti-patterns
{bullets}
### Few-Shot Examples
{PASS + FAIL examples, balanced — section name matches schema.md and the actual rubric files}
compose <preset> output
## Composition: {preset-name}
| Rubric | Weight | Hard-Fail Threshold |
|---|---|---|
| ... | ... | ... |
(All member rubrics inlined below)
Schema
Rubrics MUST conform to rubrics/schema.md. The validator enforces:
- Required frontmatter fields (
name,version,weight_default,applies_to,hard_fail_threshold) - Required sections in order
- ≥1 PASS + ≥1 FAIL anchor example, balanced (±1)
- File ≤200 lines
Composition presets MUST have all weights summing to 1.0 ±0.01.
Calibration
Few-shot anchor examples MUST be added per the rules in references/calibration-guide.md:
- Balanced PASS/FAIL counts (positive bias mitigation)
- Randomized presentation order (position bias mitigation)
- Drawn from real prior reviews where possible (synthetic examples only as backup)
Gotchas
- Adding a new rubric: drop a
.mdfile intorubrics/, runvalidate-rubric.sh, register weight in any preset that should include it. - Weight drift: if you change a rubric's
weight_default, all presets that reference it must be re-checked for sum=1.0. - Anti-patterns are FIXED: they trigger FAIL regardless of the surrounding criteria. Don't add subjective ones.
- Don't load all rubrics: the evaluator should load only the relevant preset, not the whole library — context efficiency.
References
| File | Purpose |
|---|---|
scripts/load-rubric.sh |
Load + emit prompt fragment for one rubric or preset |
scripts/validate-rubric.sh |
Schema conformance + weight-sum validator |
references/calibration-guide.md |
How to add few-shot examples (balanced + randomized) |
rubrics/schema.md |
Canonical rubric format specification |
../../agents/evaluator.md |
The agent that consumes composed rubrics during behavioral active verification (Phase 3, shipped) |
../mk:evaluate/SKILL.md |
The orchestration shell that drives the evaluator + invokes this skill via compose <preset> (Phase 3, shipped) |
Start
For interactive use, run scripts/load-rubric.sh --list to discover available rubrics.
For evaluator-internal use, the evaluator agent (via mk:evaluate) loads compose <preset> automatically based on the target type detected by mk:evaluate/scripts/run-evaluator.sh. Sprint-contract-based filtering is gated until Phase 4 ships (step-01 of mk:evaluate stub-guards on the contract_schema_version: marker).
04 同仓库更多 Skills
mk-worktree
Manages git worktrees for parallel agent isolation: creates parallel/{name}-{timestamp} branches, merges with conflict detection. NOT for user feature branches (use git worktree directly).
mk-workflow-orchestrator
Auto-invoked 7-phase workflow for complex-feature intent; fasttrack mode for pre-approved specs. NOT for explicit single tasks (mk:cook), green-field builds (mk:autobuild), or simple fixes (mk:fix).
mk-web-to-markdown
Fetch a URL and return clean markdown, for arbitrary external pages (blog, RFC, GitHub issue, vendor doc) not covered by mk:docs-finder. Static-only by default; opt-in JS rendering available.
mk-vulnerability-scanner
Vulnerability analysis: OWASP Top 10, current threat landscape, supply chain security, attack surface mapping, risk prioritization. Use for security audits. NOT for STRIDE/CSO infra audits (mk:cso).
mk-vue
Vue 3 authoring/review: components, composables, reactivity, Pinia, Pinia Colada, file routing, forms. Composition API + script setup. Auto-activates on .vue files. Deep review: mk:vue-best-practices.
mk-vue-testing-best-practices
Vue 3 testing best-practices review: Vitest + Vue Test Utils for components, composables, Pinia, Router, async/Suspense, forms, a11y, plus Playwright E2E strategy. Advisory only.