Repository navigation
fix(port): derive skill command names from the tree and drop hand-kept counts - #56
Merged
Merged
Conversation
…t counts - rules.sed carries one @skill-names@ rule in place of the static alternation and the Use-for rules. apply_rules expands it from the skill directories of the tree being built plus owned skills, minus poteto-mode. - check-port.sh fails any bare /name for a real skill, in code spans with or without arguments and in prose. The README half of the counts check is gone, marketplace.json keeps its counts. - test-gate-mutations.sh gains cases for a new upstream skill, a span with arguments, prose, and non-commands. - Rebuild at the same pin with RELEASE 1, publishing 0.15.4801.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Every skill upstream adds and mentions as
/namefailed the gate until a human extended a hand-kept alternation inrules.sed(this stalled #55). The READMEs also hard-coded skill, playbook, and principle counts thatcountsrequired to match. This PR derives the rewrite from the tree and removes both lists.rules.sedholds one rule with an@skill-names@token where the static alternation was.apply_rulesexpands it from every directory under the tree'sskills/plus the owned skills inowned.txt, minuspoteto-mode. The rule runs where the old one ran. A name is rewritten after start of line, space,(, a backtick, or"when the next character is not a letter, digit,_,/, or-. Paths, URLs,skill://name,/how-to, and/reframedare untouched. The twoUse for /nameandlike /ketchup,rules are deleted because the generated rule covers them. The probes that readrules.sedas data (dead_rule_causes) expand the token the same way.README.mdandplugins/pstack/README.md, and the README half of thecountscheck with them.marketplace.jsonkeeps its counts, written by the build, and the gate still holds it to the live tree.skill command formnow fails any/namefor a real skill directory (exceptpoteto-mode) that is not/skill:name, in code spans with or without arguments and in prose, with the same boundaries as the rule (PCRE lookaround).omp-port/RELEASE1, publishing0.15.4801.Decisions
poteto-modeis excluded, as specified, because the port'spotetomodeextension registers it. The consequence is visible in the generated diff. Upstream's/poteto-modetext that the old alternation rewrote to/skill:poteto-modenow stays/poteto-mode: 15 lines inpoteto-help/SKILL.md(12),poteto-agent.md(2), andpoteto-mode/SKILL.md(1). Rules that write/skill:poteto-modeexplicitly (router-versus-pin explanations) are unchanged. If the router-only form is wanted in those 15 lines instead, drop thegrep -vx poteto-modeinskill_command_namesand the gate exemption follows./how /why) rewrite only the first. The gate check uses lookaround and fails such a line, so it cannot ship silently. Not a case in the current tree.skill_command_nameslists only[a-z0-9-]names.test-sync-owned-paths.shuses an owned fixture directory namedlocal[.]owner, which would otherwise corrupt the ERE.Generated tree diff (
git diff --stat origin/main -- plugins/pstack .omp-plugin)package.json,marketplace.json, 3 lines):0.15.4800to0.15.4801, required byrelease version.plugins/pstack/README.md: hand-edited count removal (B).recipes.md(14 lines) and thepoteto-helpdescription: previously unrewritten/in-your-own-words,/sharpen,/how,/why,/recall,/teach,/tdd,/architect,/arena,/interrogate,/create-formal-verification-skill,/swarm,/show-me-your-work,/reflect, and/poteto-helpnow read/skill:<name>. Lines for/poteto-mode,/verify-<app>, and/loopare untouched.poteto-agent.md,poteto-help/SKILL.md(13 lines, 12 of them/skill:poteto-modeback to/poteto-mode), andpoteto-mode/SKILL.md: thepoteto-modeexclusion above, 15 lines in total.Verification
All run in the worktree with
/usr/bin/bash,CANON=/tmp/cursor-plugins.omp-port/sync-upstream.sh rebuild, thengrep -rnE '(^|[ ("])/(how|sharpen|why|reframe|poteto-help|arena|swarm)\b' plugins/pstack` prints nothing.omp-port/check-port.sh: PASS (skill command form,counts,release version,reproducible,rule staleness,rule shadowing,swallow ledgerall PASS,gate mutationsPASS with 42 rejected).omp-port/test-gate-mutations.sh: PASS. New cases:new upstream skill linked in poteto-help(accepted),bare skill command with arguments(rejected,skill command form),bare skill command in prose(rejected,skill command form),paths, longer names, and poteto-mode(accepted).lib.sh,rules.sed, andcheck-port.sh:bare skill command with argumentsandbare skill command in prosereportunexpectedly passed, andnew upstream skill linked in poteto-helpreportsunexpectedly failedwithskill command form FAILonskills/poteto-help/SKILL.md:84:| Try the new thing | [/fakenewskill](../fakenewskill/SKILL.md) |.test-sync-owned-paths.sh,test-upstream-sync.sh,test-worktree-audit.sh: PASS.OMP_SMOKE_REQUIRED=1 bun omp-port/smoke-plugin.mjs: PASS on omp/19.2.1 for-e,omp plugin link, and marketplace install, 60/60 skills registered.~/.local/share/tern/omp/bin/omp --mode rpc -e plugins/pstack,get_available_commands: all 17/skill:<name>inrecipes.mdare registered, 60/60 skill directories are registered,/poteto-modeis an extension command.