Validate that the k8s-controller-analyzer tool and the k8s.controller-* assessment skills are in sync — every checklist item has a corresponding extractor, and every extractor maps to a checklist item.
Validate that the k8s-controller-analyzer Go tool and the k8s.controller-* assessment skills are consistent. Every skill checklist item should have a corresponding analyzer fact kind and extractor, and every extractor rule ID should map to a checklist item in a skill.
$ARGUMENTS is ignored. This skill always operates on the plugin repository itself.Read all of the following files before performing any checks:
references/analyzer-output-schema.md — normative analyzer JSON input contract for skillstools/k8s-controller-analyzer/EXTRACTORS.md — the living contract between rules and extractorstools/k8s-controller-analyzer/pkg/extractor/consts.go — all rule ID and fact kind constantstools/k8s-controller-analyzer/pkg/extractor/types.go — all data types for extracted factstools/k8s-controller-analyzer/pkg/output/json.go — analyzer report envelope and schema versionskills/k8s.controller-architecture/SKILL.md — architecture assessment checklist and fact-to-checklist mappingskills/k8s.controller-api/SKILL.md — API conventions assessment checklist and fact-to-checklist mappingskills/k8s.controller-production-readiness/SKILL.md — production readiness assessment checklist and fact-to-checklist mappingskills/k8s.controller-assessment/SKILL.md — orchestrator flow and analyzer fan-out contractPerform each check in order. For each check, report pass, finding, or not-observed.
For every rule ID constant defined in consts.go:
EXTRACTORS.mdFinding: a rule ID exists in code but is not documented in EXTRACTORS.md or not referenced by any skill.
For every checklist item in each skill SKILL.md (e.g., 1a, 2b, 3c):
consts.gotypes.goFinding: a checklist item has no fact mapping, or references a fact kind that doesn't exist in the analyzer.
For every fact kind constant in consts.go:
types.goFinding: a fact kind is defined but orphaned — not used by any extractor or skill.
For every row in EXTRACTORS.md:
consts.gopkg/extractor/types.goFinding: EXTRACTORS.md references a rule, file, or field that doesn't exist.
For each leaf skill (architecture, api, production-readiness):
## Static Analyzer section MUST existreferences/analyzer-output-schema.md as the analyzer input contract--skill flag value## gopls Verification Protocol section MUST exist## Deterministic Procedure MUST reference the analyzer as step 2Finding: a skill is missing the analyzer integration sections or references the wrong skill flag.
For the orchestrator skill (k8s.controller-assessment):
references/analyzer-output-schema.md as the analyzer input contractFinding: the orchestrator skill does not accurately describe the shared analyzer-input contract.
For each YAML fact kind (rbac_manifest, crd_manifest, webhook_manifest, deployment_manifest, networkpolicy_manifest):
yaml_*.go extractor file MUST exist under pkg/extractor/Finding: a YAML extractor exists but no skill references it, or a skill references a YAML fact that has no extractor.
For each valid --skill value (architecture, api, production-readiness):
manifest.go MUST produce categories matching the skill's expected evidence categories<plugin-root>/scripts/k8s-controller-analyzer.sh tools/k8s-controller-analyzer/testdata/simple-operator --skill <skill> --format jsonmanifest section with count > 0 and a 12-character hashFinding: manifest builder produces empty or malformed output for a valid skill.
Use references/analyzer-output-schema.md as the canonical analyzer-input reference and verify:
pkg/output/json.go (schema_version, repo_path, extracted_at, optional manifest, facts)rules, kind, file, line, and datarules is always an array in schema v3reconciles.{group,version,kind}rbac_manifest primary, rbac_markers secondary)Finding: the shared analyzer schema reference is stale or contradicts the actual analyzer output contract.
# Analyzer ↔ Skill Sync Report
## Summary
| Check | Status |
|-------|--------|
| Rule ID coverage | pass/finding |
| Checklist item coverage | pass/finding |
| Fact kind coverage | pass/finding |
| EXTRACTORS.md consistency | pass/finding |
| Skill analyzer sections | pass/finding |
| YAML extractor coverage | pass/finding |
| Manifest builder coverage | pass/finding |
| Analyzer schema contract consistency | pass/finding |
## Findings
For each finding:
- **Check**: which check failed
- **What**: what is missing or inconsistent
- **Where**: file paths and line references
- **Fix**: concrete action to resolve
## Recommendations
If any checks produce findings, list the recommended changes in priority order:
1. Missing extractors (add code)
2. Missing skill mappings (update SKILL.md)
3. Stale analyzer schema references (update `references/analyzer-output-schema.md` and affected skills)
4. Stale EXTRACTORS.md rows (update documentation)
5. Orphaned constants (remove dead code)