Relationships
#348 Scaffold new extensions to publish-ready quality (12/12) by default
Opened by magistr · 5/13/2026· Shipped 5/22/2026
Problem
Following the documented swamp-extension-model workflow today produces an extension that scores 4/12 (33%) on swamp extension quality. The missing factors are not bugs or stylistic preferences — they're explicitly client-earnable items in the rubric:
has-readme(2 pt) — no README writtenreadme-example(1 pt) — README has no fenced code blocksrich-readme(1 pt) — README is shortsymbols-docs(1 pt) — no JSDoc on exported symbolshas-license(1 pt) — no LICENSE filerepository-verified(2 pt) —repository:field unset in manifest- (often)
fast-check(1 pt) — re-exporting barez.enum(...)/z.object(...)failsdeno doc --lint
This is a real friction point. After creating @magistr/telegram-send end-to-end today, getting from 33% → 100% took an extra round trip: write README, write LICENSE, add module + symbol JSDoc, restructure exports to satisfy deno doc --lint, add a verified repository URL, re-format, re-score, dry-run, push.
All of that work is mechanical and predictable — it could be done by scaffolding at extension-creation time.
Proposed solution
Add a swamp extension new <name> (or init) subcommand that scaffolds a publish-ready skeleton from a single prompt:
swamp extension new @magistr/foo
# prompts: kind (model/workflow/vault/driver/datastore/report), license (MIT default),
# repository URL (optional, validated against the verified-host list)The resulting directory should reach 12/12 on swamp extension quality immediately, with TODO: markers in the spots that require human input (description, code example, repository URL if skipped).
Concretely, the scaffold should produce:
manifest.yamlwithname,version(fromswamp extension version),description: TODO,repository:(if supplied),additionalFiles: [README.md, LICENSE.md], and the right typed-content array seeded with one entry.README.mdskeleton that already meetsrich-readmeandreadme-examplethresholds — sections for Install, Setup, Usage with two fenced code blocks of placeholder commands, ≥500 characters of structure.LICENSE.mdpopulated from the chosen SPDX identifier (MIT default), with current year and the authenticated collective name auto-filled..gitignoreanddeno.jsonmatching the existing per-extension layout convention (good-planning / issue-lifecycle style).- For a model:
extensions/models/<snake>.tswhoseexport const modelcarries a module-level JSDoc with@example, and whose any-exported Zod schemas have explicit type annotations sodeno doc --lintpasses (fast-check). The currentswamp-extension-modelQuick Start exportsmodelonly — that's fine; but if it grows to export schemas they should be annotated, and the template should demonstrate the safe pattern (or simply keep schemas un-exported).
Alternatives considered
- Document-only fix. Update the
swamp-extension-modelSKILL.md Quick Start so it ships a polished file by default (README + LICENSE + JSDoc + repository). This raises the floor without new CLI surface area, but Claude/users still have to copy and customize four files manually for each new extension. A scaffolder is strictly better, but the SKILL.md update is a worthwhile first step on its own. - Quality-as-warning during
extension push. Todayqualityis opt-in andpushdoesn't surface the score. Makingpushprint a single-line "X/12 (Y%)" alongside the dry-run summary would at least make the gap visible at the moment authors care most. (Suggesting this in addition to scaffolding, not instead.) - Defer to per-collective templates. Some collectives might want their own LICENSE / README header. The scaffolder can accept
--template <path>later; for v1 the built-in MIT/skeleton is enough.
Additional context
- Existing
swamp-extension-publishskill already encodes the publishing state machine and surfacesqualityas optional. Anewcommand would close the loop on the other end — authoring — so authors don't only learn about the rubric at push time. - The
repository-verifiedfactor specifically requires a public HTTPS URL on github.com/gitlab.com/codeberg.org/bitbucket.org. The scaffolder should validate the host up-front rather than letting the failure surface at push. - Real example for context:
@magistr/telegram-sendv2026.05.13.1 (https://swamp-club.com/extensions/@magistr/telegram-send) — went from 33% → 100% by adding the items listed above, no code or behavior change.
Shipped
Click a lifecycle step above to view its details.
stack72 commented 5/22/2026, 10:40:40 PM
Thanks for the detailed writeup @magistr — the friction you hit going from 33% to 100% on @magistr/telegram-send is real and the analysis of what's missing is spot-on.
After looking at this, we're taking a different approach than the proposed swamp extension new CLI command. Here's the thinking:
Several of the quality factors — README, LICENSE, repository URL, description — are authorship decisions that vary by extension and collective. Scaffolding opinionated defaults for those would be too restrictive, and the quality score already surfaces them as opt-in signals.
What we are doing:
Improving the
swamp-extensionskill templates so the code Claude generates passessymbols-docsandfast-checkout of the box (JSDoc annotations, proper type exports). Today these are the factors that trip people up because they're technical correctness issues, not content decisions.Surfacing the quality score during publish — the
swamp-extension-publishworkflow will show your score as a visible step before dry-run, so you see where you stand at the moment you care most. Non-blocking — it's awareness, not a gate.
The net effect: the technical quality factors land automatically when you create an extension with the skill, and the content-oriented factors (README, LICENSE, repo) stay visible through the quality score without forcing a particular structure.
Sign in to post a ripple.