feat: add swamp-extension-publish skill with state-machine checklist#1171
feat: add swamp-extension-publish skill with state-machine checklist#1171
Conversation
…92) Create a dedicated publishing skill that enforces prerequisites as gates before allowing an extension push. The state machine walks through repo initialization, authentication, manifest validation, collective ownership, version bumping, formatting, and dry-run — each step must pass before the next begins. The final push requires explicit user approval. Moves publishing.md from swamp-extension-model to the new skill and updates all four extension creation skills plus the report skill to cross-reference it. Registers the new skill in BUNDLED_SKILLS so it ships with repo init and repo upgrade. Co-authored-by: Sean Escriva <webframp@users.noreply.github.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
Blocking Issues
None.
Suggestions
- Stale trigger phrases in
swamp-extension-modeldescription: Theswamp-extension-model/SKILL.mdfrontmatter description still lists publishing-related trigger phrases ("push extension","publish extension","extension push","release extension","bump version","publish to registry","prepare for publishing") even though the trigger evals were correctly updated toshould_trigger: falsefor those queries. Consider removing them from the model skill'sdescriptionfield to keep the frontmatter consistent with the evals and avoid ambiguity in trigger routing. The Skill Trigger Eval CI passes as-is, so this is a cleanup item only.
Notes
- New skill structure follows all CLAUDE.md conventions: uppercase
SKILL.md, required frontmatter withnameanddescriptiononly, body is 273 lines (well under 500 limit), no extraneous files - The
publishing.mdrename fromswamp-extension-model/references/toswamp-extension-publish/references/is properly tracked by git, and all cross-references in the four extension skills + report skill were updated to point at the new location skill_assets.tscorrectly replaces the oldswamp-extension-model/references/publishing.mdentry with the newswamp-extension-publish/SKILL.mdandswamp-extension-publish/references/publishing.mdentries — no stale bundle entries remain- State 8 (push) properly requires explicit user approval before running the push command — good security practice
- CI passes: lint, test, format, skill review (90%), skill trigger eval
- No DDD concerns — this PR is skill documentation and a minimal infrastructure asset registration change with no domain logic
There was a problem hiding this comment.
Adversarial Review
Critical / High
None found.
Medium
- Stale orphan file on
swamp repo upgrade(src/infrastructure/assets/skill_assets.ts,src/domain/repo/repo_service.ts:287): ThecopySkillsTomethod only adds/overwrites files — it never removes files that are no longer inBUNDLED_SKILLS. When an existing installation runsswamp repo upgrade, the oldswamp-extension-model/references/publishing.mdwill remain as an orphan alongside the newswamp-extension-publish/references/publishing.md. This doesn't break anything (all markdown links are updated to the new path), but the stale file could cause confusion if someone browses the skill directory manually. This is a pre-existing gap in the upgrade mechanism rather than a bug in this PR, but this PR is the first file rename that exposes it.
Low
-
No explicit test for new bundled skill (
src/infrastructure/assets/skill_assets_test.ts): Other skills added toBUNDLED_SKILLShave corresponding assertions (e.g.,SkillAssets includes swamp-extension-datastore skillat line 428,swamp-extension-driverat line 491). The newswamp-extension-publishskill has no such test. The existingcopySkillsTointegration tests will implicitly exercise the new entries (they'd fail if the source files didn't exist), so this is a coverage gap rather than a correctness issue. -
Dual-trigger ambiguity on manifest creation: The query "Make a manifest.yaml so I can push my extension" is
should_trigger: truein bothswamp-extension-modelandswamp-extension-publishevals. The notes indicate this is intentional (shared concern), but if the skill router can only pick one, the user may get routed to the wrong skill depending on implementation. No action needed if the router supports multi-skill triggers.
Verdict
PASS — Clean refactoring. The only code change is two new entries in the BUNDLED_SKILLS array (skill_assets.ts), which is correct and consistent with the file rename. All cross-references in the five modified skill files are updated to the new path. No logic errors, no security issues, no broken references.
Summary
swamp-extension-publishskill with an 8-state state machine that enforces publishing prerequisites as gates: repo initialization, authentication, manifest validation, collective ownership, version bumping, formatting, dry-run, and push (with explicit user approval)publishing.mdfromswamp-extension-model/references/to the new skill, adding the missing.swamp.yamlprerequisite documentationswamp-extension-model,swamp-extension-vault,swamp-extension-datastore,swamp-extension-driver) andswamp-reportto cross-reference the new publish skill instead of duplicating publishing stepsBUNDLED_SKILLSso it ships withswamp repo initandswamp repo upgradeFixes #92
Test Plan
deno checkpassesdeno lintpasses (1025 files)deno run testpasses (4310 tests, 0 failures)deno run compilesucceedsnpx tessl skill reviewscores 90%/swamp-extension-publish— state machine runs correctly, prints checklist upfront, walks through all 8 gates, stops at push for user approval🤖 Generated with Claude Code