Repository navigation
v1.91.287.0 feat(write-skill): write, change and diet skills; /learn at half its template size - #3524
Conversation
…(GSTA-133) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ngs bins; cross-project search no longer drops every project when the state root path contains the slug Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…inline stats program, one mode table, prune rules kept Skill-Diet: learn Skill-Size: 5797→2586 bytes (SKILL.md.tmpl) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…l-to-bin drift ratchet, shared skill eval contract Skill-Size: 0→3245 bytes (write-skill/SKILL.md.tmpl) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…n ceiling Skill-Size: 2586→2707 bytes (learn/SKILL.md.tmpl) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…bill baselines, eval fixtures) - skill-bin-drift: a redirect no longer ends a command, so `bin/x 2>/dev/null --bogus` is checked - gstack-learnings-search: a missing value or a non-positive --limit exits 2 like an unknown flag - gstack-skill-bill: the gstack root skill is a checkout skill; Skill-Diet trailers match the exact name; the baseline counts the committed bytes untrimmed - skill-evals task files get a free contract test and are registered in FREE_FIXTURES, with the drift allowlist - learn eval: the no-code-change safety task no longer asks the model to fix code (its check penalised obeying the user) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…per entry unless the request names the action Skill-Diet: learn Skill-Size: 2707→2955 bytes (learn/SKILL.md.tmpl) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… contract, /learn diet Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ple asks per entry Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…t against the contract The skill-evals task-file test now exercises lib/skill-bill.ts's checkEvalTasks, with a negative control, instead of a test-only validator (test-of-test ratchet). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…rm; a non-object task entry is a problem, not a crash Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…write-skill in the paid census Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
E2E Evals: ✅ PASS125 executed, 0 reused rule/judge records | 0 manual accepted (unscored; no score-cache credit) | $31.94 rule/judge cost | reconcile exit: 0 Profile: pr / mode Derived dependents (scripts/pr-dependencies.ts):
Rule and judge shards
Fail-closed reconciliationSliced lane: planner → duration-packed executors → fail-closed report. Behavior cases run a pre-registered 3-trial panel (PASS at 2/3 with no contract violation); a PASS 2/3 is shown with its failed trial, never as a clean pass. Reused results retain their original provenance and expiry. Dispatched narrow screen (gstack-ship-queue ready --screen) of merge commit |
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Body is being composed by /ship; the receipt-bound body replaces this shortly.
What changed
/learn on a diet: the template halves and the rendered SKILL.md drops a quarter, while 30 sessions per version on claude-opus-5-5 pass the same tasks (30/30 before, 30/30 after, 29/30 with no skill) at 10% fewer tokens per session.
Text version
Why
Garry asked: "Can we incorporate skill writing and improvement into gstack? https://github.com/nicobailon/skill-diet". gstack had no skill for writing or slimming skills, so prompts grew one appended paragraph at a time and nothing checked that a skill's commands still matched its tools. Now
/write-skillwrites, changes and diets skills by editing the line a lesson belongs to,gstack-skill-billshows what each level costs, and a free ratchet fails when a skill calls a flag its bin does not accept.Blast radius
The learnings bins now exit 2 on an unknown flag, a missing value or a bad
--limit; every in-repo caller passes literal, valid flags (bin/gstack-skill-start:286,scripts/resolvers/learnings.ts:69-87,scripts/resolvers/review-army.ts:128, read and run). The /learn template changed, which selects its paid E2E cases through touchfiles for the train gate; every other skill's render is unchanged, and the drift scan over all 333 inputs is clean.Approvals
Source: gstack-approvals record for gsta133-write-skill (display only; not an approval citation).
Summary
/write-skill(new / change / diet), adapted from nicobailon/skill-diet at 5f41df1 (MIT; NOTICE.md, licenses/MIT-skill-diet.txt). Diet mode is report first, eval tasks before any cut, then before, after and no-skill eval.gstack-skill-billsizes each level of a skill, finds the lastSkill-Diet:commit, marks growth past 10% as DUE, and in a gstack checkout names the skill's eval task file.scripts/skill-bin-drift.ts): 1,751 bin calls checked against 105 bins' parsers; one allowlisted false positive; the allowlist only shrinks.docs/designs/SKILL_EVAL_CONTRACT.md) for the shared skill eval GSTA-2 is building; task files attest/fixtures/skill-evals/<skill>/tasks.json, held to the format by a free test.--help,--stats, exit 2 on bad input, and--cross-projectno longer drops every project when the state root path contains the slug.Behavior changes
gstack-learnings-searchandgstack-learnings-logexit 2 on unknown flags (previously skipped silently), a flag with no value, or a non-positive--limit.gstack-learnings-search --statsis new; /learn's Prune now asks per entry unless the request names the action.Test Coverage
New:
test/learnings-bin-cli.test.ts,test/skill-bill.test.ts,test/skill-bin-drift.test.ts(with a negative control: an invented flag on a real bin),test/skill-eval-tasks.test.ts(with a malformed-file control), and the periodic-tierwrite-skill-add-lessonE2E (kindrule). The learnings tests were written failing first.Tests ran: tests (
gstack-pregate --stage tests --remote, the 830 test files its selection picked, on one Ubicloud VM) 20168, 0 failed, at 6c2a829. macOS named regressions and Windows Free Tests: dispatched CI runs (see Test plan). The selection left out the two files CI later failed on at 3e5feed; the full Free Tests run at 6c2a829 is green.Pre-Landing Review
Four passes (frozen scope), the fourth granted by GStack Minder past the cap under CREW rule 23. Pass 1: one combined checklist + specialist reviewer (testing, maintainability, security, performance, simplification), a Claude adversarial pass that also served as Red Team, and openai/gpt-6.1-sol as the cross-family outside voice (Codex CLI is not installed here; a subagent on another model family is the outside voice per the Capy gstack skill). 11 findings: 8 fixed, the other three below the floor (7 noted across the four passes). The outside voice rated one CRITICAL: the drift scanner stopped at a redirect, so
bin/x 2>/dev/null --boguswent unchecked; fixed with a test. Pass 2 (re-check of the fixes): 2 informational notes. Pass 3 (re-check of the test-of-test ratchet fix): one blocking finding, a Windows path separator in the new EVAL TASKS line that would fail Windows Free Tests; fixed in pass 4's range with a guard for non-object task entries. After pass 4, Free Tests at 3e5feed failed on two in-branch tests: the heredoc pipe-deadlock guard (the learnings bins' longer--helptext and the learn eval seed now have heredocs over 512 bytes) and the paid census count (the new write-skill E2E makes 112 files). 6c2a829 addsBASH_COMPAT=50to those three scripts and bumps the count. No review pass covers 6c2a829.REVIEW_LOOP: passes=4 blocking_found=2 deferred=0 noted=7 fixed=8 scope=frozen
Gate edits: 17 listed, 5 read, 0 findings (one RH-16 hunk in
bin/gstack-learnings-search: the arg parser moved above the state-root lookup and unknown flags now exit 2, a tightening). Budget edits: catalog cap raised by the measured 34-byte /write-skill catalog row; always-on ceiling raised by write-skill's measured frontmatter ×1.05; learn's eager ceiling lowered.Review notes
Below the blocking floor; recorded here and not fixed in this PR.
scripts/skill-bin-drift.tsbare backtickedgstack-*calls (nobin/prefix) are not scanned; /learn and /write-skill now use full paths, other skills may not.scripts/skill-bin-drift.tsa quoted or spaced redirect target (> "out file" --x) and&>still end argument scanning (misses only, never a false report).bin/gstack-learnings-search--statscounts malformed rows and ignores--type/--cross-project(moved unchanged from the old template).bin/gstack-learnings-searcha state root containing glob characters is not excluded from the cross-project scan.learn/SKILL.md.tmplthe review-fix commit carriesSkill-Diet: learn, so the bill's baseline is the shipped 2,955 bytes rather than the mid-branch 2,586.Exploratory QA
Smoke probes on a scratch state root:
gstack-skill-bill learn(levels, baseline, EVAL TASKS),gstack-skill-bill nope(exit 2, SKILL_NOT_FOUND with closest names),gstack-learnings-search --bogus(exit 2),--statson an empty store (NO_LEARNINGS), a log then search round trip,gstack-learnings-log --help, andskill-bin-drift --skill learn(0 findings). All passed.Design Review
No frontend files changed — design review skipped.
Eval Results
/learn A/B with upstream skill-diet
eval.mjsat 5f41df1 and the lane's Claude Code adapter (GSTA-2's shared eval does not exist yet), claude-opus-5-5, 10 tasks × 3 trials per version, calibration 6/6: before 30/30, after 30/30, no skill 29/30; no task that passed before fails after. The safety task (no code edits) first asked the model for the fix its check forbade, so it failed in every version; it was repaired during review and rerun in all three versions (3/3 each), which makes it a guard rather than a discriminator. /write-skill acceptance: with the skill 6/6, without 3/3 of 6 (add-lesson 3/3 vs 0/3). Total paid spend $16.22 over 150 priced sessions, inside GStack Minder's $25 lane ceiling.Scope Drift
Scope Check: CLEAN. Deviations from plan v4, all recorded in the decision trail: the /write-skill E2E is kind
rule, not a behavior panel; /eval-plan preregistration was not run (the task file committed before the cut, 897d33c, is the preregistration record); diet mode readsreferences/diet.md, notsections/diet.md; the interim eval adapter is this lane's own, since GSTA-134's did not exist.Plan Completion
Plan v4 items 1–9: done, with the deviations above. Item 7 (shared files with GSTA-134): no GSTA-134 PR exists; trial merges with #3521 and #3522 were clean and the budget tests pass on the merged tree. Item 9: handoffs/GSTA-133/gbrain-note.md written.
Verification Results
Plan test list: skill-bill on full, shallow and non-git folders PASS; drift scanner with negative control PASS; learnings bins
--helpand exit 2 before state access PASS; gen:skill-docs freshness, skill:check, parity suite, catalog and context budgets, module-size ratchet, bun-entry isolation, credential scan PASS. Paid: /learn A/B and /write-skill acceptance PASS (spend above the plan's $10 line, within the raised $25 ceiling).TODOS
No TODO items completed in this PR.
Documentation
Status: updated: two factual doc edits, no blockers.
Scope: base
10b77deto head6de9c7fongsta133-write-skill: 42 committed files (staged, unstaged and untracked were empty). Covered:/write-skill,gstack-skill-bill, thescripts/skill-bin-drift.tsratchet,docs/designs/SKILL_EVAL_CONTRACT.md, the /learn diet, the learnings-bin flag fixes, and the catalog (1,359→1,393) and always-on context (7,880→7,985) budget ratchets. The authored docs, root router template, nested docs and both skill templates were audited.Documentation health:
CONTRIBUTING.md: Updated. Added the skill-to-bin drift ratchet to the Tier 1 static-test list (DRIFT_UNKNOWN_BIN/DRIFT_UNKNOWN_FLAG, shrink-only allowlist,bun run scripts/skill-bin-drift.ts --skill <name>).docs/skills.md: Updated. The/learnexample prompt now reads[Remove, keep, or update each one?], matching per-entry prune.README.md,AGENTS.md,CLAUDE.md,docs/PROJECT_STRUCTURE.md,docs/CONTRIBUTOR_REFERENCE.md,NOTICE.md,SKILL.md.tmpl,gstack/llms.txt: Current. The/write-skillrows agree, and the 1,393 catalog cap reads the same in all three budget docs.docs/designs/SKILL_EVAL_CONTRACT.md: Current (new; linked fromdocs/skills.md).ARCHITECTURE.md: Current (see debt).CHANGELOG.md,TODOS.md: Reviewed read-only; parent-owned.Documentation coverage:
/write-skill: reference ✅ (README, AGENTS, docs/skills), how-to ✅ (docs/skills), tutorial ❌, explanation ✅ (docs/skills intro).gstack-skill-bill: reference ✅ (docs/skills,--help), how-to ✅ (docs/skills), tutorial ❌, explanation ❌.--skill), tutorial ❌, explanation ❌ (ARCHITECTURE's template-system 'problem' section predates it).gstack-learnings-search --stats/--help, exit 2 on bad input: reference only in CHANGELOG and bin--help(common gap).Diagram drift: none; no diagram entity was renamed, split or removed by this diff.
Verified:
/learnsizes (5,797→2,955 B template, 11,217→8,375 B render) bywc -c; the drift script's--skilland codes by a live run; the docs tests that read the edited files passed 408/408. Consider/document-generatefor the explanation and tutorial gaps.Test plan
gstack-pregate --allow-repo-commandspreflight (regen, secrets, strays, literals, timing, guards): pass; strays warns on the new top-levelwrite-skill/directory, intendedgstack-pregate --stage tests --remote --spend-cap 2 --timeout 2700 --allow-repo-commands: 830 selected test files, 20168 tests, 0 failed on tree 7fed39b (6c2a829), $0.07bun run typecheck,bun run typecheck:test(no new diagnostics),bun run skill:check,bun run gen:skill-docsfreshness,bun test test/parity-suite.test.ts, catalog and context budgets, module-size ratchet: passDecision trail
reports/GSTA-133-decisions.tsvin GStack Minder's drive, rows 1–39, reviewed by openai/gpt-6.1-sol; its flags are answered in rows 26–30 and 37–39.🤖 Generated with Claude Code