Skip to content

fix(port): derive skill command names from the tree and drop hand-kept counts - #56

Merged
negoro26 merged 2 commits into
mainfrom
fix/skill-command-names
Nov 26, 2026
Merged

negoro26 merged 2 commits into
mainfrom
fix/skill-command-names

Conversation

@negoro26

Copy link
Copy Markdown
Owner

Summary

Every skill upstream adds and mentions as /name failed the gate until a human extended a hand-kept alternation in rules.sed (this stalled #55). The READMEs also hard-coded skill, playbook, and principle counts that counts required to match. This PR derives the rewrite from the tree and removes both lists.

  • A. Generated rewrite. rules.sed holds one rule with an @skill-names@ token where the static alternation was. apply_rules expands it from every directory under the tree's skills/ plus the owned skills in owned.txt, minus poteto-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 /reframed are untouched. The two Use for /name and like /ketchup, rules are deleted because the generated rule covers them. The probes that read rules.sed as data (dead_rule_causes) expand the token the same way.
  • B. Counts. The skill, playbook, and principle counts are gone from README.md and plugins/pstack/README.md, and the README half of the counts check with them. marketplace.json keeps its counts, written by the build, and the gate still holds it to the live tree.
  • C. Gate. skill command form now fails any /name for a real skill directory (except poteto-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).
  • Rebuilt at the same pin, omp-port/RELEASE 1, publishing 0.15.4801.

Decisions

  • poteto-mode is excluded, as specified, because the port's potetomode extension registers it. The consequence is visible in the generated diff. Upstream's /poteto-mode text that the old alternation rewrote to /skill:poteto-mode now stays /poteto-mode: 15 lines in poteto-help/SKILL.md (12), poteto-agent.md (2), and poteto-mode/SKILL.md (1). Rules that write /skill:poteto-mode explicitly (router-versus-pin explanations) are unchanged. If the router-only form is wanted in those 15 lines instead, drop the grep -vx poteto-mode in skill_command_names and the gate exemption follows.
  • The rule consumes the one character after the name. Two names exactly one space apart (/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_names lists only [a-z0-9-] names. test-sync-owned-paths.sh uses an owned fixture directory named local[.]owner, which would otherwise corrupt the ERE.

Generated tree diff (git diff --stat origin/main -- plugins/pstack .omp-plugin)

 .omp-plugin/marketplace.json                       |  4 ++--
 plugins/pstack/README.md                           |  8 +++----
 plugins/pstack/agents/poteto-agent.md              |  4 ++--
 plugins/pstack/package.json                        |  2 +-
 plugins/pstack/skills/poteto-help/SKILL.md         | 26 ++++++++++----------
 .../skills/poteto-help/references/recipes.md       | 28 +++++++++++-----------
 plugins/pstack/skills/poteto-mode/SKILL.md         |  2 +-
 7 files changed, 37 insertions(+), 37 deletions(-)
  • Version lines (package.json, marketplace.json, 3 lines): 0.15.4800 to 0.15.4801, required by release version.
  • plugins/pstack/README.md: hand-edited count removal (B).
  • recipes.md (14 lines) and the poteto-help description: 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-help now read /skill:<name>. Lines for /poteto-mode, /verify-<app>, and /loop are untouched.
  • poteto-agent.md, poteto-help/SKILL.md (13 lines, 12 of them /skill:poteto-mode back to /poteto-mode), and poteto-mode/SKILL.md: the poteto-mode exclusion 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, then grep -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 ledger all PASS, gate mutations PASS 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).
  • The same harness file run beside feb99f3's lib.sh, rules.sed, and check-port.sh: bare skill command with arguments and bare skill command in prose report unexpectedly passed, and new upstream skill linked in poteto-help reports unexpectedly failed with skill command form FAIL on skills/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.
  • Real omp, scratch HOME, ~/.local/share/tern/omp/bin/omp --mode rpc -e plugins/pstack, get_available_commands: all 17 /skill:<name> in recipes.md are registered, 60/60 skill directories are registered, /poteto-mode is an extension command.

…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.
@negoro26
negoro26 merged commit 19cd247 into main Nov 26, 2026
3 checks passed
@negoro26
negoro26 deleted the fix/skill-command-names branch November 26, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant