Meta Factory
Security Notice
This extension includes AI agent skills that can modify AI assistant behavior. Review the skill files before installing.
The documentation quality gate for swamp extensions. Enforces one guiding principle — the published manifest plus README must be enough for a user or agent to easily learn how to do everything the published extension does. WHAT IT DOES
Scores any swamp extension's manifest + README 0-100 against a deterministic
contract, and lists the exact next actions to fix what fails. Prefer it over
eyeballing your docs or a one-off review: the score is repeatable, so you can
gate publishing and CI on it. It covers everything the Swamp Club rubric
does, plus the manifest-as-user-manual, manual order, single-step install,
formatting, functional-example, single-upgrade-workflow, creation-command,
and version-source rules that rubric does not — so swamp model create /
swamp workflow create / swamp vault create are used instead of
hand-writing or copying definition configs, and every extension ships one
documented swamp workflow run <name>-upgrade command that discovers its
own targets (never requiring the user to remember an internal name). The
lintDefinitions method also cross-references the swamp audit timeline,
so a recent definition with no matching create command is flagged even when
it carries a plausible id. It also checks that an extension needing its own
version at run time reads it from manifest.yaml rather than from
model.version (the model-type / schema version) or
context.definition.version (the model instance's version) — neither is the
package version, and the model and manifest versions are independent and need
not be in lock-step. It also enforces a config-lifecycle contract for
extensions that ship a setup method — configuration is precious and
cumulative: supplied values are persisted even when incomplete, existing or
shared config is detected and reused (readModelData / data.latest) rather
than re-asked, and each capability enables progressively; a
// meta-factory-ignore config-lifecycle: <reason> comment exempts a
legitimate case. It also enforces that the information an extension gives
the user is verified reality, not intended state: outcomes are tested before
being reported, a blocking failure is stated and stops the run (never
swallowed, retried unchanged, or continued past), and long-lived changes
(DNS/TTL, certificates) report their time-to-ready. report-reality-lint.ts
reports failure-swallowed / prerequisite-allow-failure and
claim-without-verification / eta-missing, and the ## Setup README
section must document the verified-reality behaviour. A second workflow
prints a scoreboard — a text
table of every git-tracked extension with the reasons each is not 100/100.
Each score can also carry test-factory coverage: how many of an extension's
documented swamp … commands, and how many of the methods and workflows it
ships, its own test-factory.yaml exercises — so a 100/100 scorecard also
shows whether the documented behaviour is tested.
INSTALL
swamp extension pull @svendowideit/meta-factoryDEPENDENCIES
@svendowideit/test-factory — pulled automatically, because every score
also reports how much of an extension's documented and shipped surface its
own test-factory.yaml exercises (documented commands, methods and
workflows). Meta-factory reads an existing test-factory coverage resource
for the manifest, or calls test-factory's checkCoverage method to compute
it when none exists. Otherwise it uses only the swamp CLI and the bundled
deno binary that swamp already ships. Pulling also installs the
extension-docs skill into your tool's skill directory.
RUN
# Gate one extension before you publish it — fails if it scores below
# the threshold (default 75).
swamp workflow run @svendowideit/meta-factory \
--input manifest=extensions/models/caddy/manifest.yaml
# Score every extension in the repo and get the rollup; use this in CI
# or as a periodic health check.
swamp workflow run @svendowideit/meta-factory --input root=extensions
# Score one manifest without the gate, when you just want the number.
swamp model @svendowideit/meta-factory method run check meta-factory \
--input manifest=extensions/models/caddy/manifest.yaml
# Lint every model/workflow/vault definition for hand-written or copied
# configs — a definition must be created by its swamp creation command,
# which the `swamp audit` timeline is cross-referenced to confirm.
swamp model @svendowideit/meta-factory method run lintDefinitions meta-factory
# Score every git-tracked extension and print a text table of each score
# with the reasons it is not 100/100 — excludes pulled/generated copies.
swamp workflow run @svendowideit/meta-factory-scoreboard
# Read the detailed breakdown (failing checks and next actions) from the
# last run.
swamp report get @svendowideit/meta-factory-report \
--model meta-factory --markdown
# Upgrade an existing install in place after updating the extension: it
# refreshes the bundled extension-docs skill and re-scores your extensions
# under the current rules. Idempotent.
swamp workflow run @svendowideit/meta-factory-upgradeThe workflow's final assert step fails the run when any extension scores below the threshold, so it works as a CI/publish gate. The scoreboard workflow never gates — it is a read-only report.
CONFIGURE
All arguments are optional and set as global args on the model:
root Directory checkAll scans (default extensions)
threshold Minimum passing score (default 75)
offline Skip the network dependency audit (default false)
skillName Bundled skill to install (default extension-docs)
definitionsRoot Directory lintDefinitions scans (default .)
auditHours Hours of `swamp audit` history to cross-reference for the
creation-command check (default 168; 0 disables)
testCoverage Attach test-factory coverage (default true)
testFactoryModel test-factory model to read/call (default test-factory)
testFactoryType test-factory model type (default
@svendowideit/test-factory) Per-run overrides: manifest, root, offline, writeSummary, and
gitOnly (score only git-tracked manifests) on checkAll; force on
scaffold; target (project|global|both) on installSkill; scanRoot and
auditHours on lintDefinitions.
UPGRADE
Update the extension, then run the one upgrade workflow; it refreshes the
bundled extension-docs skill into your project and global skill
directories and re-scores your extensions under the current rules, and is
idempotent:
swamp workflow run @svendowideit/meta-factory-upgradeWHAT IT INSTALLS
Nothing on the host — no services, daemons, cron triggers, or webhooks. It
runs only when invoked (workflow, method, or report) and never modifies the
extensions it scores — except scaffold, which writes a README skeleton
only when asked. When scoring, it also reports code metrics (CRAP plus
per-function complexity, LOC and coverage), which it measures by running an
extension's colocated tests under deno test --coverage; these are for
information only and never change the score.
Global Arguments
| Argument | Type | Description |
|---|---|---|
| root? | string | Directory scanned by `checkAll` for manifest.yaml files (relative to the repo root) |
| testFactoryModel? | string | Name of the @svendowideit/test-factory model whose coverage data is read, or whose checkCoverage method is called when no data exists |
| testFactoryType? | string | Model type used when calling checkCoverage to compute missing coverage |
| testCoverage? | boolean | Attach each extension's test-factory.yaml coverage (documented commands and shipped surface exercised by its tests) |
| threshold? | number | Minimum score to consider an extension 'well documented' |
| offline? | boolean | Skip the network dependency-trust audit (dependency check gets 50% credit) |
| skillName? | string | Name of the bundled skill directory installed by `installSkill` |
| definitionsRoot? | string | Repository directory scanned by the creation-command check for hand-written or copied definition configs |
| auditHours? | number | Hours of `swamp audit` history to cross-reference; 0 disables the audit confirmation |
| Argument | Type | Description |
|---|---|---|
| manifest | string | Path to the extension manifest.yaml to score |
| offline? | boolean | Override the global offline flag |
| Argument | Type | Description |
|---|---|---|
| manifest? | string | Score only this manifest instead of scanning the whole root |
| offline? | boolean | Override the global offline flag |
| writeSummary? | boolean | Also write the `summary` rollup resource |
| gitOnly? | boolean | Score only git-tracked extension manifests, excluding pulled/generated copies |
| Argument | Type | Description |
|---|---|---|
| manifest | string | Path to the manifest to scaffold a README for |
| force? | boolean | Overwrite an existing README.md instead of refusing |
| Argument | Type | Description |
|---|---|---|
| scanRoot? | string | Override the directory scanned for definition configs (default: the global `definitionsRoot`) |
| auditHours? | number | Override the hours of `swamp audit` history to cross-reference (default: the global `auditHours`; 0 disables) |
| Argument | Type | Description |
|---|---|---|
| target? | enum | Where to install the skill directory |
| force? | boolean | Overwrite an existing installed skill |
Resources
Score the documentation quality of swamp extensions against the meta-factory contract, then gate on the result. The guiding principle: the published manifest plus README must be enough for a user or agent to easily learn how to do everything the published extension does. This workflow scores it deterministically (0–100) and fails if any scored extension falls below the threshold. Run for one extension: swamp workflow run @svendowideit/meta-factory \ --input manifest=extensions/models/cad
Print a text table of every git-tracked swamp extension's documentation score, with the reasons each one is not a perfect 100/100. Only extensions committed to this git repository are scored — anything pulled or generated into the working tree (for example under `.swamp/`) is excluded, so the table always reflects the repo's own extensions. Run it read-only for the whole repo: swamp workflow run @svendowideit/meta-factory-scoreboard Score a different directory: swamp workflow run @svendow
Upgrade an existing @svendowideit/meta-factory install in one command. Run this after updating the extension (`swamp extension update`). Meta-factory installs nothing on the host — its only local side effect is the bundled `extension-docs` skill it copies into your tool's skill directory — so the upgrade is: re-install that skill at the extension's current version, then re-score the extensions you care about so you can see whether the new rules changed any score. It is idempotent; re-running it
Render the extension documentation score, definition-config lint, and their breakdowns
Compact text table of every scored extension with the reasons each is not 100/100
Added 1 workflows
updated dependencies
Modified 1 behaviors. Added 1 workflows. Added 1 reports
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit1/2partial
- @std/assert--jsr:@std/assert@1 is a range; audited 1.0.19, the version the registry resolved
- @std/path--jsr:@std/path@1 is a range; audited 1.1.6, the version the registry resolved
- @std/yaml--jsr:@std/yaml@1 is a range; audited 1.3.0, the version the registry resolved
- @swamp-club/swamp-testing--jsr:@swamp-club/swamp-testing@^0.3.0 is a range; audited 0.3.0, the version the registry resolved
5 dependencies found
- jsr:@std/assert@1 -- audited 1.0.19
- jsr:@std/path@1 -- audited 1.1.6
- jsr:@std/yaml@1 -- audited 1.3.0
- jsr:@swamp-club/swamp-testing@^0.3.0 -- audited 0.3.0
- npm:@babel/parser@7.28.4 -- audited 7.28.4
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License2/2earned
- Verified public repository2/2earned