PDX-508 Tier 6: canonical Validation Rule Registry + MCP resource#216
Merged
Merged
Conversation
…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.
Quality Orchestrator🟢 LOW · 🧪 Tests to Run · Running 1 of 56 tests
▶ Run commandnpx vitest run \
unit/mcp/server.test.ts⚡ quality-orchestrator · |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 gatesis_valid. The gating column encodes the PDX-509 model: acriticalbest-practice violation is bridged tois_validunless a Layer-1 check owns the concept;major/minor/infonever gate.scripts/build-validation-rule-registry.cjs— generates the doc fromprovar_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-rulesMCP resource — serves the registry so a client can answer "why didprovar_testcase_validatereturn this issue / mark thisinvalidvsneeds_improvement?" The doc is copied into the bundle at build time (mirrorsprovar://docs/step-reference).Verification
.cjs).This completes PDX-508 (Tiers 1–6).
🤖 Generated with Claude Code