refactor(skills): cap every SKILL.md at 600 words and cut agent messages

Every loaded SKILL.md and every listed description is paid on every turn of every session, and every delivered message costs its recipient a full turn. scripts/budget.py gains SKILL_WORDS = 600, enforced by test_lock, and test_naming forbids a skill naming its own slash command; 53 descriptions and 10 body lines drop it. The 18 longest skills move details into 31 side files read only in their situation (organize's capacity, succession, peers, offices, relay and lineage; cleanup's docker, worktrees, execute and ask; code-tune, changelog, triage, dream, split and others), so all SKILL.md files shrink from 33866 to 26291 words without dropping a rule; an independent review of HEAD against the new text found no loss in 60 of 64 skills and three weakenings, now restored (WSJF re-estimates after an objective change, cleanup's volume checklist, essence's absolute dates).

The kvb-org-organize Peer protocol sends status that asks nothing to the news board, answers nothing that asks nothing, keeps messages terse, and lets light runs admit themselves in the operator's wording; the skills follow it (operator reads the register, relax and wakeup reply through the news, evening collects them there, wsjf asks only for missing estimates, cleanup and triage batch their questions). Skills that explore code ask the codebase-memory-mcp graph first, subagent briefs scale with the stakes and cap their answers, and the skills that need the full register or council tables call show --wide or list --long.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kevin Veen-BirkenbachandClaude Opus 5.5 committed 2026-11-04 17:07:23 +01:00
1 parent 34b434a744
commit 3c2f6c44b5
99 files changed
+2110 -2086

No files matched your search

+41 -40
View File
@@ -2,59 +2,60 @@
name: kvb-ci-observe
description: >
Watch a CI run, pipeline, build or log on a cadence and triage new failures.
Trigger on /kvb-ci-observe <target> or a request to keep monitoring and fix
regressions.
Trigger on a request to keep monitoring and fix regressions.
---
Keep a target under continuous watch and act only when it degrades. The loop is
the watcher; triage is the response. Do not re-investigate failures already
resolved this session, and do not idle-poll work the harness will notify you
about.
Keep a target under watch and act only when it degrades: the loop watches,
triage responds. Never re-investigate a failure already resolved this
session, and never poll work the harness will notify you about.
## Before you start: fix the target
The operator names one concrete target: a CI run id or url, a pipeline, a
branch's checks, a build, or a log file. Restate it in one line and record the
current failure set as the baseline (the failures already known or already
fixed this session). Everything the watch reports is diffed against that
baseline, so a stale baseline re-triages solved failures.
branch's checks, a build, or a log file. Restate it in one line and record
the current failure set (known or already fixed this session) as the
baseline. Every observation is diffed against it; a stale baseline
re-triages solved failures.
## The loop
Drive this with `/loop` in dynamic mode (no fixed interval unless the operator
gave one): after each observation, schedule the next wake-up yourself and pass
the same `/kvb-ci-observe` prompt back so the next firing repeats the watch.
Drive it with `/loop` in dynamic mode (no fixed interval unless the operator
gave one): after each observation, schedule the next wake-up and pass this
skill's prompt back unchanged.
1. **Poll the target.** Pull its current state (job list, check conclusions, the
log's tail); for a GitHub Actions run, the kvb-ci-artifacts skill's
`ci_failures.py <run>`. Enumerate the failures exactly as the `kvb-ci-triage` skill's step 1
does: failure, cancelled, timed-out; a downstream aggregate that fails only
because an upstream did is not its own failure.
2. **Diff against the baseline.** A failure is *new* only if it is not in the
baseline and was not already triaged this session. If nothing is new, log one
short line ("still green" / "N known failures, no change") and reschedule.
3. **Triage each new failure.** Invoke the `kvb-ci-triage` skill on the new set only —
which applies `kvb-think-dialectic` per failing job to a ~99% root cause and a real
fix. Never mask (no retry-until-pass, no disabled check, no soft-skip). Fold
each newly fixed failure into the baseline so it is not re-triaged.
4. **Reschedule.** Pick the next delay from what you are waiting on: an active
run that changes every few minutes gets a check matched to its cadence; a
quiet or long-running target gets a long fallback (1200s+). Keep watching
until the target reaches a terminal state (run completed, pipeline finished)
AND every failure it produced has a verified fix, then stop the loop.
1. **Poll the target**: its job list, check conclusions or log tail; for a
GitHub Actions run, the `kvb-ci-artifacts` skill's `ci_failures.py <run>`.
Enumerate failures as the `kvb-ci-triage` skill's step 1 does: failure,
cancelled, timed-out; a downstream aggregate that fails only because an
upstream did is not its own failure.
2. **Diff against the baseline.** A failure is new only if it is neither in
the baseline nor triaged this session. Nothing new: log one short line
("still green" / "N known failures, no change") and reschedule.
3. **Triage each new failure** with the `kvb-ci-triage` skill on the new set
only; it applies `kvb-think-dialectic` per failing job to a ~99% root
cause and a real fix. Never mask (no retry-until-pass, disabled check or
soft skip). A new failure and its verdict go to peers as news, never as a
message: `${CLAUDE_SKILL_DIR}/../kvb-org-organize/scripts/news.py post
"<target>: <job> <failing line> -> <verdict>"`. Fold each newly fixed
failure into the baseline.
4. **Reschedule** by what you wait on: an active run that changes every few
minutes gets a check matched to its cadence, a quiet or long-running
target a long fallback (1200s+). Stop once the target reaches a terminal
state (run completed, pipeline finished) AND every failure it produced
has a verified fix.
## Rules
- The loop is a fallback timer, not a busy-wait: if the harness will notify you
when tracked work finishes (a background task, a spawned agent), wait for that
notification instead of polling for it; reserve the timed wake-up for external
state the harness cannot see (a remote CI run, a deploy queue).
- Executed evidence beats reasoning: read the actual failing log line and the
artifact, not the job title — kvb-ci-triage and kvb-think-dialectic carry this through.
- One baseline, updated in place: dedup every observation against all failures
seen so far, or a flaky-then-fixed failure reappears every cycle and the watch
never converges.
- The loop is a fallback timer, not a busy-wait: for tracked work the
harness reports (a background task, a spawned agent), wait for that
notification; reserve the timed wake-up for state the harness cannot see
(a remote CI run, a deploy queue).
- Executed evidence beats reasoning: read the failing log line and the
artifact, not the job title.
- One baseline, updated in place: dedup every observation against all
failures seen so far, or a flaky-then-fixed failure reappears every cycle
and the watch never converges.
- Report only on change: a new failure and its triage verdict, or a terminal
"target is green, watch closed". Silence between changes is correct.
- Never invent results for a run still in progress; report what the poll
actually returned.
returned.