Commit Graph

1 Commits

Author SHA1 Message Date
Bo ff8dd0febf chore(scripts): Phase 3/3 — generate skill-domain-map from canonical yaml (soc-zxia.3 v2) (#317)
**Replacement for #313** after Phases 0+1+2 squash-merged into main as
#308.

## What

Replaces hand-edited table sections of
`docs/reference/agentops-skill-domain-map.md` with generated output from
canonical yaml sources. Adds a golden-file CI gate that **forbids
drift**.

## Why

#308 (Phase 0+1+2) just landed:
- Phase 0 — drift detector
- Phase 1 — schema-gate frontmatter (hexagonal_role + practices
required)
- Phase 2 — BC1-BC5 in `bounded-contexts.yaml`

Phase 3 (this PR) completes the epic: the Full Skill Map table becomes
generated, not hand-edited. Drift is structurally impossible.

## Implementation

### New files
- `docs/contracts/skill-dispositions.yaml` — 78 canonical entries (skill
/ domain / hexagonal_role / disposition / rationale)
- `scripts/generate-skill-domain-map.sh` — generator + golden-file
checker (`--check` mode)

### Modified
- `docs/reference/agentops-skill-domain-map.md` — keeps hand prose; 3
table sections wrapped in `<!-- BEGIN:* -->` / `<!-- END:* -->` markers
that the generator replaces
- AGENTS.md CI table — new `validate-skill-domain-map-golden` row
- documentation-index.md — `skill-dispositions.yaml` link
- pre-push-gate.sh + validate.yml — wired into both

### Generator invariants
- Every `skills/<name>/` must have a dispositions row
- Every dispositions row's `hexagonal_role` must match SKILL.md
frontmatter
- Output deterministic (sorted alphabetically; no timestamps)

## Verification

```text
$ bash scripts/generate-skill-domain-map.sh --check
PASS — skill-domain-map.md matches generator output.

$ bash scripts/check-registry-drift.sh
PASS — no drift.

$ bash scripts/check-bounded-contexts-drift.sh
PASS — registry docs match yaml canonical.
```

All 3 drift gates green.

## Domain-tightening epic complete after this lands

End-state: `registries-drift` lesson is **structurally encoded**.
Graduates from `practice: unassigned` → `practice: accepted`.

Closes: soc-zxia.3, soc-zxia
Supersedes: #313

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-05-18 15:26:50 +00:00