Skip to content

skills: nothing stops a skill's Markdown accumulating an unshipped program — audit is clean today, add the guard #422

Description

@evanharmon1

Invariant

A skill's Markdown documents decisions; its assets/ hold the mechanism.
No skill file accumulates a body of fenced shell large enough to be a program
the operator must transcribe before it can run — the failure #420 describes.

Nothing enforces this today, so the only thing standing between the skill tree
and a second mode-update.md is whoever notices.

The audit is already done — and it is clean

Run across all 36 skill Markdown files in ai/skills/, counting fenced
sh/bash/shell/console lines. Every file with 15+ lines:

file blocks shell lines longest block
repo/standardize-repo/references/mode-update.md 31 1,882 1,196
repo/standardize-repo/references/mode-new-repo.md 6 168 59
repo/standardize-repo/references/mode-adopt-existing.md 8 87 39
universal/kickoff/SKILL.md 1 20 20
universal/track-work/SKILL.md 10 22 4

mode-update.md is the only instance. The gap is not marginal — it carries
11× the shell of the next file and a single block 20× the next-longest. The
rest are what fenced shell should be: track-work is 10 blocks averaging 2
lines (one-line gh invocations), kickoff is a single 20-line snippet, and
the other two update-mode siblings top out at a 59-line block.

So this issue is not a request to go looking. The looking is done; #420 is
the finding. What is missing is the guard that keeps it a finding of one.

Why a threshold is safe here

The distribution makes this unusually easy to gate without false positives.
Legitimate maximums today are 168 lines per file and 59 per block; the
violation is 1,882 and 1,196. Anything in between — say 400 per file,
150 per block — has an order of magnitude of headroom over every honest file
while still having caught mode-update.md the day it crossed over.

The check should measure the longest single block as well as the total. A
file of thirty small invocations is healthy; one 1,196-line block is a program
regardless of what the file totals, and total-only would miss it.

Verify

find ai/skills -name '*.md' | while read -r f; do
  awk -v F="$f" '
    /^```(sh|bash|shell|console)$/ { inb=1; c=0; next }
    /^```$/ { if (inb) { t+=c; if (c>max) max=c }; inb=0 }
    inb { c++ }
    END { if (t >= 15) printf "%-52s lines=%-6d longest=%d\n", F, t, max }
  ' "$f"
done

Output means: any file whose lines or longest sits far outside the
table above is a candidate for the same treatment as #420 — the mechanism
belongs in assets/. An empty result, or only the five rows above, means the
tree is still clean.

Acceptance criteria

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    layer:logicBusiness rules, handlers, calculationneeds-triageAwaiting triagetech-debtTechnical debt

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions