Skip to content

PDX-508 Tier 6: canonical Validation Rule Registry + MCP resource#216

Merged
mrdailey99 merged 1 commit into
developfrom
feature/PDX-508-validation-rule-registry
Jun 4, 2026
Merged

PDX-508 Tier 6: canonical Validation Rule Registry + MCP resource#216
mrdailey99 merged 1 commit into
developfrom
feature/PDX-508-validation-rule-registry

Conversation

@mrdailey99
Copy link
Copy Markdown
Collaborator

PDX-508 Tier 6 — canonical Validation Rule Registry + MCP resource

The final PDX-508 slice: a single canonical registry of every validation rule across both layers, exposed to AI clients as an MCP resource.

What's included

  • docs/VALIDATION_RULE_REGISTRY.md — generated registry of 201 rules (23 Layer-1 structural + 178 Layer-2 best-practice). For each: id, severity, weight, what it checks, and whether it gates is_valid. The gating column encodes the PDX-509 model: a critical best-practice violation is bridged to is_valid unless a Layer-1 check owns the concept; major/minor/info never gate.
  • scripts/build-validation-rule-registry.cjs — generates the doc from provar_best_practices_rules.json + the hand-coded Layer-1 list, so the registry stays regenerable and accurate. Re-run after any rule change.
  • provar://docs/validation-rules MCP resource — serves the registry so a client can answer "why did provar_testcase_validate return this issue / mark this invalid vs needs_improvement?" The doc is copied into the bundle at build time (mirrors provar://docs/step-reference).
  • Drift guard — a unit test asserts every best-practice rule appears in the registry and spot-checks the gating column (bridged critical → Yes; Layer-1-owned critical → No; major → No).

Verification

  • Full suite green (1461), smoke 60/60, lint clean (incl. the script-name check on the new .cjs).

This completes PDX-508 (Tiers 1–6).

🤖 Generated with Claude Code

…urce

Req: PDX-508 Tier 6 — provide a single canonical registry of every validation
rule across both layers (Layer-1 structural validity + Layer-2 best practices),
and expose it to AI clients as an MCP resource, so a client can see what each
rule checks, its severity/weight, and — post-PDX-509 — whether it gates is_valid.
Fix: Add scripts/build-validation-rule-registry.cjs which generates
docs/VALIDATION_RULE_REGISTRY.md from provar_best_practices_rules.json plus the
hand-coded Layer-1 rules (23 Layer-1 + 178 Layer-2 = 201 rules), computing the
"Gates is_valid?" column from the bridge model (critical bridged unless Layer-1
owns the concept; major/minor/info never gate). Register the
provar://docs/validation-rules MCP resource serving the generated doc, wire the
doc into the compile copy + bundle, document it in docs/mcp.md, and add a unit
test that guards the registry against drift and verifies the gating column.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 4, 2026

Quality Orchestrator

🟢 LOW · 2 / 100 · All changed files have mapped tests.


🧪 Tests to Run · Running 1 of 56 tests

  • unit/mcp/server.test.ts
▶ Run command
npx vitest run \
  unit/mcp/server.test.ts

⚡ quality-orchestrator  ·  /qo stub <file>  ·  qo analyze-local

@mrdailey99 mrdailey99 merged commit 56ac78e into develop Jun 4, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant