Skip to content

feat(skills): heal --strict checks skill-dispositions coverage (ag-cw2y item 1)#609

Merged
boshu2 merged 1 commit into
mainfrom
feat/ag-cw2y-dispositions-heal-check
May 29, 2026
Merged

feat(skills): heal --strict checks skill-dispositions coverage (ag-cw2y item 1)#609
boshu2 merged 1 commit into
mainfrom
feat/ag-cw2y-dispositions-heal-check

Conversation

@boshu2
Copy link
Copy Markdown
Owner

@boshu2 boshu2 commented May 29, 2026

What

First slice of ag-cw2y (make adding a skill one-shot-green). Adding /burndown (ag-3yl8 #600) cost a CI round because a new user-invocable skill with no row in docs/contracts/skill-dispositions.yaml passed every local check (audit-codex-parity --skill, heal --strict, sync-skill-counts) silently — the miss only surfaced in CI.

This adds the local catch: heal.sh Check 12 — dispositions coverage. Every user-invocable skills/<n> must have a dispositions row, else MISSING_DISPOSITION (exit 1 under --strict). Same internal/non-invocable exemptions as the existing catalog check (Check 10).

How

  • heal.sh: new Check 12 (global), plus a HEAL_REPO_ROOT env override so the check is fixture-testable; production still derives REPO_ROOT from script location.
  • Verified no MISSING_DISPOSITION on the real repo — all current skills are covered, so this is a pure tightening with zero false positives.

Tests (TDD, red→green)

tests/scripts/heal-dispositions.bats — fixture skill missing a row → flagged; with a row → clean; --strict exits 1 and names the miss. All 3 green.

Codex artifact note

Editing skills/heal-skill/ requires a paired skills-codex/heal-skill/ update (the source-hash). I refreshed only heal-skill's .agentops-generated.json + its manifest entry. The 6 unrelated pre-existing codex-hash drifts on main (deps/trace/scenario/provenance/red-team/release) are left untouched — out of this PR's scope. PR-diff-scoped validate-codex-generated-artifacts.sh --scope head passes.

Remaining ag-cw2y items (follow-on)

Item 1 (dispositions) is the check half done here. Items 2 (domain-map narrative counts), 3 (codex desc budget / ag-vzbt), 4 (codex override-catalog scaffold) + the skill-builder scaffold halves remain — they fully unblock ag-hdqu0.8 and /burndown #600 one-shot-green.

Closes-scenario: ag-cw2y#dispositions-coverage-check
Bounded-context: BC2-validation
Evidence: tests/scripts/heal-dispositions.bats

…2y item 1)

Adding /burndown (ag-3yl8 #600) cost a CI round because a new user-invocable
skill with NO row in docs/contracts/skill-dispositions.yaml passed every local
check (audit-codex-parity --skill, heal --strict, sync-skill-counts) silently.

heal.sh gains Check 12: every user-invocable skills/<n> must have a dispositions
row, else MISSING_DISPOSITION (exit 1 under --strict). Same internal/non-invocable
exemptions as the catalog check. HEAL_REPO_ROOT env override makes the check
fixture-testable (prod still derives REPO_ROOT from script location).

Verified: no MISSING_DISPOSITION on the real repo (all current skills covered).
Codex artifact: refreshed heal-skill source/generated hash only (the 6 unrelated
pre-existing drifts on main are left untouched — not this PR's scope).

Closes-scenario: ag-cw2y#dispositions-coverage-check
Bounded-context: BC2-validation
Evidence: tests/scripts/heal-dispositions.bats
@boshu2 boshu2 merged commit 3711106 into main May 29, 2026
14 checks passed
@boshu2 boshu2 deleted the feat/ag-cw2y-dispositions-heal-check branch May 29, 2026 23:33
boshu2 added a commit that referenced this pull request May 29, 2026
…unts (ag-cw2y items 1-scaffold + 2) (#610)

## What

Completes **ag-cw2y item 1's scaffold-half + item 2**. A
newly-scaffolded skill is now one-shot-green against the two gates that
silently tripped `/burndown` #600:
1. missing `skill-dispositions.yaml` row → `heal.sh` Check 12
(`MISSING_DISPOSITION`, shipped #609)
2. stale `"N checked-in skills"` narrative counts →
`check-registry-drift`

## How
- **`scripts/append-skill-disposition.sh`** — idempotent helper that
appends a dispositions row (valid `BC4 Factory` placeholder + TODO
rationale, so `check-bounded-contexts-drift` passes; author refines
during content fill). Repo-root-injectable → fixture-testable.
- **`init.sh`** — after scaffolding, calls the helper *and* runs
`check-registry-drift.sh --fix-counts` to bump the narrative skill-count
tokens. Both calls are guarded + WARN-on-failure so they never break the
scaffold.

## Discovery (scope-narrowing)
Item 2's **check + `--fix-counts` already existed** and were wired into
both the fast pre-push gate (line 1330) and CI (line 803). The only gap
was that **skill-builder never invoked them** — so the fix is wiring,
not a new check.

## Tests (TDD, red→green)
`tests/scripts/append-skill-disposition.bats` — appends row / valid BC +
TODO / idempotent / no-dup-on-existing. 4/4 green. shellcheck clean.

## Codex artifact
Refreshed **only skill-builder's** source/generated hash (6 unrelated
pre-existing `main` drifts left untouched). PR-scope
`validate-codex-generated-artifacts --scope head` passes.

## ag-cw2y remaining
Item 1 (check #609 + scaffold here) ✅ · Item 2 (here) ✅ · **Item 3**
(codex desc budget / `ag-vzbt`) and **Item 4** (override-catalog
scaffold + `test-codex-override-coverage`) remain — then `ag-hdqu0.8`
and `/burndown` #600 are fully one-shot-green.

Closes-scenario: ag-cw2y#skillbuilder-scaffold-dispositions-counts
Bounded-context: BC4-factory
Evidence: tests/scripts/append-skill-disposition.bats
boshu2 added a commit that referenced this pull request May 30, 2026
…g-cw2y item 4) (#611)

## What
**ag-cw2y item 4** — the 4th and last new-skill gate that cost
`/burndown` #600 a CI round. A new skill previously tripped
`validate-codex-override-coverage` ("source skill missing from Codex
catalog"). skill-builder now adds the catalog entry automatically.

## How
- **`scripts/append-codex-override-entry.sh`** — idempotent, JSON-aware:
appends a `parity_only` entry
(`name`/`treatment`/`wave=catalog-parity`/`reason`) to
`skills-codex-overrides/catalog.json` if the skill is absent.
`parity_only` is correct for skill-builder's canonical-derived codex
form; author flips to `bespoke` + scaffolds the override dir only if a
Codex-only divergence is needed. Repo-root-injectable.
- **`init.sh`** — calls it in the new-skill plumbing block alongside the
dispositions row (#609/#610) and `--fix-counts` (#610). All three gates
now pre-empted at scaffold time.

## Tests (TDD, red→green)
`tests/scripts/append-codex-override-entry.bats` — appends parity_only /
stays valid JSON / idempotent / no-dup-on-existing. 4/4 green.
shellcheck clean.

## Codex artifact
Refreshed **only skill-builder's** hash (6 unrelated pre-existing `main`
drifts untouched). PR-scope codex validation passes.

## ag-cw2y status after this
Item 1 (#609 check + #610 scaffold) ✅ · Item 2 (#610) ✅ · **Item 4
(here)** ✅ · **Item 3** (codex desc token budget / `ag-vzbt`) is the
only remaining piece. Once item 3 lands, a new skill — and therefore
`ag-hdqu0.8` + `/burndown` #600 — is fully one-shot-green.

Closes-scenario: ag-cw2y#override-catalog-scaffold
Bounded-context: BC4-factory
Evidence: tests/scripts/append-codex-override-entry.bats
boshu2 added a commit that referenced this pull request May 30, 2026
…egate (ag-vzbt) (#612)

## What
**ag-vzbt** — the last `ag-cw2y` item. The skills-codex description
catalog budget was a **hard aggregate** (2800 chars, bumped
2600→2700→2800 as skills landed) with ~17 chars headroom. Adding the
Nth+ skill walls out — `/burndown` #600 was forced into a 17-char stub
("Bounded epic loop") to fit.

## How
Replace the hard aggregate with a **per-skill average** cap
(`CODEX_DESC_AVG_FAIL_CHARS=45`) that scales with the catalog:
- Each terse description keeps the average low; the gate fails only if
descriptions are **bloated on average** — not because the catalog grew.
- Current state: avg **35** chars/skill (77% of 45) — real headroom, and
it never becomes a wall again.
- The per-skill hard cap (`DESC_FAIL_CHARS=180`) still bounds any single
bloated description.
- `BUDGET_REPO_ROOT` override added so the rule is fixture-testable.

## Tests (TDD, red→green)
`tests/scripts/codex-desc-avg-budget.bats` — PASS under budget / FAIL
over budget / **100 skills (total ~3800 > old 2800 wall) still pass**
because avg stays low. 3/3 green; shellcheck clean; real-repo gate
passes (avg 35/45).

## ⚠️ Pre-existing unrelated red
The local fast gate also surfaces a **pre-existing** `mkdocs strict`
failure on `rfcs/0001-finding-generator-parallelism.md` — reproduces on
clean `origin/main` with my changes stashed; my diff touches only the
test script + bats (zero docs). Flagging separately; not in scope here.

## ag-cw2y status
**All four items now done** (items 1,2,4 merged #609/#610/#611; item 3
here). A brand-new skill is now **one-shot-green** → this unblocks
**`ag-hdqu0.8`** (last Outcomes bead) and **`/burndown` #600**.

Closes-scenario: ag-vzbt#per-skill-average-budget
Bounded-context: BC2-validation
Evidence: tests/scripts/codex-desc-avg-budget.bats
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant