Add plugin-quality rule manifest (SSOT) + validator (M0) - #100
Open
canvas-investigator[bot] wants to merge 1 commit into
Open
Add plugin-quality rule manifest (SSOT) + validator (M0)#100canvas-investigator[bot] wants to merge 1 commit into
canvas-investigator[bot] wants to merge 1 commit into
Conversation
|
Rebased |
canvas-sisyphus
Bot
force-pushed
the
plugin-quality-m0-rule-manifest
branch
from
September 1, 2026 01:24
97f8cc8 to
2cd6dcd
Compare
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.
KOALA-6917
🧵 Aaryan Shah cc @aaryanxshah
M0 of the Studio/CPA plugin-quality program: the single-source-of-truth (SSOT) rule manifest, its validator, and a CI check. This milestone records the taxonomy and validates it — it does not change lint behavior or author skills (detector code-generation is M4; skills are M2).
What's here
canvas-plugin-assistant/quality/rules.yaml— SSOT, 12 rules. Schema:rule_id, title, axis, severity, stages[], delivery, always_on, detector{type,pattern}, teach_ref, fix, runtime_signal.canvas-plugin-assistant/quality/validate_rules.py— manifest validator (importable + CLI).tests/canvas-plugin-assistant/quality/test_validate_rules.py— 24 tripwire tests; 100% branch coverage of the validator..github/workflows/quality-rules.yml— runs the validator + tests on every PR/push.### Skillsfixed 8 → 11 (addscustom-data-patterns,fhir-api-client-development,instance-analyze); the validator now guards this list against future drift.pyyamladded to thedevdependency group.Rules (12)
blockseverity on the three patient-safety holes (SEC-XSS-001,SEC-AUTH-TRUE-001,SEC-PHI-LLM-001); the restnudge.always_on: trueon the three core one-liners (PERF-UNBOUNDED-001,SEC-AUTH-TRUE-001,SEC-PHI-LLM-001). Axes: performance ×5, security ×4, memory ×1, correctness ×1.teach_refs to the not-yet-authoredllm-integration/memoryskills are forward-refs (recorded now; skills land in M2).Validator checks
Unique
rule_ids; all required fields; enum values; everyregexdetector compiles;teach_refresolves to an existing-or-forward-ref skill; skill→manifest cross-check (arule_idcited in a SKILL.md must exist in the manifest); README### Skills==skills/on disk.Decisions recorded
teach_refs reference; a generated lint artifact is vendored intocanvas-pluginsin M4 (keepscanvas validate's hot path free of a YAML parse). Both repos are public, sorules.yamlis kept public-safe (generic OWASP-standard patterns, no customer detail).Cross-check semantics
skill→manifest must resolve; manifest→skill existing-or-forward-ref; section anchors recorded but not validated in M0. To be tightened in M2 with a machine-readable
rules:front-matter list + anchor validation.Verification
uv run python canvas-plugin-assistant/quality/validate_rules.py→OK: 12 rules validated. 24 tests pass at 100% branch coverage. Red→green proven: injecting a duplicaterule_id(or a README skill mismatch) exits 1 with the specific error; the real manifest exits 0.Follow-ups (not in this PR)
llm-integration+memoryskills; tighten the cross-check (machine-readablerules:front-matter + anchor validation).astblock rules (SEC-AUTH-TRUE-001,SEC-PHI-LLM-001) can't run on a half-written file, so they belong at checkpoint/publish time (the fail-closed backstop), not as per-edit push nudges — design the generator accordingly.Attribution: Aaryan + Claude.
Generated by the Investigator