Skip to content

feat(skills): add frostyard-risk-paths - #268

Merged
bketelsen merged 3 commits into
mainfrom
lucilla/core-249-risk-paths-skill
Nov 16, 2026
Merged

bketelsen merged 3 commits into
mainfrom
lucilla/core-249-risk-paths-skill

Conversation

@frostyard-machines

@frostyard-machines frostyard-machines commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds the shared skill frostyard-risk-paths (.agents/skills/frostyard-risk-paths/SKILL.md): how to write or extend a repository's .github/risk-paths.json so that every privileged file matches an L1 or L2 glob.

The problem, from #249: a first list often misses privileged files, and cross-review then finds them 1 at a time. The 27 correction records that #249 cites (17 repositories, 2026-11-04 to 2026-11-11, under .memory/corrections/ on each main) fall in 3 classes, and each class has a step and a pitfall in the skill:

  • Coverage gaps (callers of a delete, token scope checks, signing gates, sudo callers in other packages, installers, privileged helpers, destructive tools, roles that run with sudo): step 2 (a marker scan by family) and step 3 (follow each hit to its callers, its gates and its trusted inputs; cover a wholly privileged tree with 1 glob).
  • A why with no category of spec rule B: step 4 lists the exact WHY_CATEGORIES names and the names seen in the records that are not categories; step 5 runs checkWhyCategories.
  • A version 2 coverage test that accepts an L3 or L4 glob: step 5 requires a matching glob at L1 or L2, not any glob and not a floor (rule G floors depend on the path name, so a rename can remove them).

The coverage test has a negative control and asserts a count above 0, so it cannot pass on an empty list. Step 6 covers the PR: make ci, and the PR body names each matched path and why the change is safe (spec rule F).

Also in this PR:

  • AGENTS.md: 1 skill bullet, after frostyard-readme; 1 rule after the "Risk paths follow" bullet (the guard for 2 review findings, below).
  • .memory/corrections/2026-11-15-pr-268-risk-level-v1-entries.json and 2026-11-15-pr-268-first-list-no-label.json, each with promoted_to: "AGENTS.md".
  • docs/design/shared-skills.md: 1 row in the skills table.

Not in this PR: the skill is not added to the sync defaults in .github/skills-sync.json (an L1 risk path). Consumers find it in core's AGENTS.md until a separate PR enrolls it.

Rationale: ADR-0068, ADR-0078, risk-paths spec.

Risk tier

Risk tier: 1 — skill and docs only. The 3 changed paths match no glob in .github/risk-paths.json and no organization floor (the path words of frostyard-risk-paths/SKILL.md are agents, skills, frostyard, risk, paths, skill, md).

Docs housekeeping

  • New skill started from .agents/skills/TEMPLATE/SKILL.md (goal and done line, Steps, Pitfalls)
  • Registered in AGENTS.md's Skills section and in the docs/design/shared-skills.md table
  • Links from the skill to core docs are absolute GitHub URLs, so they hold in a synced copy (check:docs rejects relative links that leave .agents/skills)
  • No new decision: the skill applies ADR-0068, ADR-0078 and the risk-paths spec

Verification

  • make ci green on 05cff41 before the first push, and again on 5b1c4c4 and 837b770 (npm run check: check:docs, check:organization, tests: 953 pass, 0 fail)
  • node scripts/check-corrections.mjs --root . --base origin/main: ok corrections: 60 records, append-only vs origin/main
  • The step 5 coverage sample, run with node against scripts/lib/risk-paths.mjs: version 1 signing/** against signing/a.sh gives true; a version 2 L3 glob gives false; a version 2 L2 glob gives true; a version 2 L1 glob that does not match gives false

Cross-review

Reviewer openai/gpt-6.1-sol, coder anthropic/claude-opus-5-5, base 675c34df887812d956b796a7ed02f5a8f41e9a54.

  • Initial review of 05cff413fb1c6112d0ee46f1812673b384a34c86: Not ready, 2 blocking findings and 1 low finding.
    1. (medium, blocking) The coverage sample read e.level, so it rejected every version 1 entry (no level, counts as L1). Fixed in 5b1c4c4: the sample accepts list.schema_version === 1 or a level of L1 or L2.
    2. (medium, blocking) Step 6 said the PR that changes the list gets risk:high; a PR that adds the first list gets no label (no list on base, spec rule E). Fixed in 5b1c4c4: the author adds risk:high and the level label by hand.
    3. (low) The rule A note left out the ** exception. Fixed in 5b1c4c4.
      Guard: no test reads a skill's prose, so the guard is the new AGENTS.md rule and the 2 correction records above.
  • Re-review 1 of 5b1c4c41f2b0e30e7c81f7e5bc8f3591d1eb09ed: Ready, findings 1 to 3 resolved; 1 new low finding (add only labels that exist: adding a missing label creates it). Fixed in 837b770.
  • Re-review 2 of 837b770b0a8d51f58bbb26a9a133d3177012742d: Ready, Blocking: none, 0 findings.

Revert test: exempt (skill and docs only, no executable behavior).

Not covered: the skill's procedure was not run on a repository in this PR; the marker patterns are examples to adapt per language, and no test reads the skill text beyond check:docs (links, index, symlinks).

Fixes #249

A first risk-path list often misses privileged files: callers of a
delete, files that enforce a token scope, gates of signing, sudo entry
points in other packages, installers. Reviews then find them 1 at a
time, and authors write why values with no rule B category or coverage
tests that accept L3 or L4 globs.

The skill gives the procedure: a marker scan by family, callers and
gates of each hit, L1 or L2 globs with a rule B why, and a coverage
test with a required-file list, a marker scan and a negative control.
AGENTS.md and the shared-skills design list it.
@github-actions github-actions Bot added the level:L3 Skim label Nov 16, 2026
…list

Cross-review of 05cff41 found 2 blocking points in frostyard-risk-paths:

- The coverage sample read e.level, so it rejected every version 1
  entry, which has no level and counts as L1. The sample now accepts a
  version 1 list or a level of L1 or L2.
- Step 6 said the PR that changes the list gets risk:high. A PR that
  adds the first list gets no label (no list on base, spec rule E); the
  author now adds risk:high and the level label by hand.

The glob note also names the ** exception of rule A. AGENTS.md gains a
rule for both points, with 2 correction records.
Adding a missing label through the API creates it; only the accountable
owner creates labels. Keep a stricter level label that the PR has.
@frostyard-machines frostyard-machines added the ready-for-human Reviewed, CI green: ready for Brian to review and merge label Nov 16, 2026
@bketelsen
bketelsen added this pull request to the merge queue Nov 16, 2026
Merged via the queue into main with commit 37d1198 Nov 16, 2026
6 checks passed
@bketelsen
bketelsen deleted the lucilla/core-249-risk-paths-skill branch November 16, 2026 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

level:L3 Skim ready-for-human Reviewed, CI green: ready for Brian to review and merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Skill proposal: frostyard-risk-paths

2 participants