mirror of
https://github.com/boshu2/agentops.git
synced 2026-09-14 15:08:13 +08:00
f55cbb3dcd
## What Adds \`scripts/check-registry-drift.sh\` — a drift detector for the hand-maintained DDD/hex registry docs. Detects three classes of drift: 1. **Count drift** — narrative + audit-table + Gherkin scenario counts vs actual \`skills/\` directory count 2. **Membership drift** — every skill listed in the Full Skill Map exists in \`skills/\` and vice versa 3. **Role drift** — \`hexagonal_role\` column in the map matches each \`SKILL.md\` frontmatter ## Why Encodes the \`registries-drift\` lesson from session 2026-05-17: > Hand-maintained inventory docs drift silently. Three axis owners (DDD vocab, Hex frontmatter, Gherkin features) must be generated or schema-gated; never hand-edited maps. Pre-PR state (detected by the new script): | Doc | Declared | Actual | |---|---|---| | \`agentops-skill-domain-map.md\` narrative | 77 skills | 78 | | \`agentops-skill-domain-map.md\` audit table | 78 | 78 ✓ | | \`agentops-domain-evolution-bdd.md\` Gherkin | 77 skills | 78 | | \`skills/expert-council/SKILL.md\` | no \`hexagonal_role\` | declared \`domain\` in map | All four reconciled in this PR; final check is PASS. ## Implementation ### \`scripts/check-registry-drift.sh\` - Modes: \`--check\` (default), \`--fix-counts\` (auto-update inline narrative counts), \`--json\` (machine-readable report) - Returns exit 1 on FAIL, 0 on PASS/WARN - Runtime: < 1s - Dep: PyYAML (already required for context-map generator) ### Wired into: - \`scripts/pre-push-gate.sh\` — always-runs section (drift can be introduced by any skill add/rename/remove) - \`.github/workflows/validate.yml\` — new \`validate-registry-drift\` job + added to \`summary\` job's \`needs\` (so it gates merges) ### Reconciliation - 77 → 78 in 2 doc locations (via \`--fix-counts\`) - \`hexagonal_role: domain\` added to expert-council frontmatter (consistent with council, which it aliases to) - documentation-index.md count updated + annotation added ### Codex parity \`skills-codex/expert-council/.agentops-generated.json\` source_hash auto-updated. \`generated_hash\` unchanged → codex artifact is byte-identical, no regen required. \`bash scripts/check-codex-parity-drift.sh\` returns PASS. ## Acceptance - [x] \`scripts/check-registry-drift.sh\` exists, runs in < 1s - [x] Detects count/membership/role drift; current state PASSES after reconciliation - [x] Wired into pre-push-gate.sh — confirmed gate runs (\`registry drift: ok\`) - [x] Wired into validate.yml summary needs list - [x] Linked from documentation-index.md - [x] Lands via PR (governed by branch protection — dogfoods discipline) Closes-scenario: drift-detector-encoded Bounded-context: scripts/ + CI gates Evidence: scripts/check-registry-drift.sh, validate-registry-drift job, PASS verdict Closes: soc-ry4a 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude <noreply@anthropic.com>