Skip to content

docs: document include manifest field, loader pre-check, and helper scripts#850

Merged
stack72 merged 1 commit intomainfrom
docs/include-files-and-loader-precheck
Mar 24, 2026
Merged

docs: document include manifest field, loader pre-check, and helper scripts#850
stack72 merged 1 commit intomainfrom
docs/include-files-and-loader-precheck

Conversation

@stack72
Copy link
Contributor

@stack72 stack72 commented Mar 24, 2026

Summary

Documents the include manifest field and loader pre-check behaviour introduced in #849.

Changes

design/extension.md

  • Added include to manifest Optional Fields section with description
  • Added explanation of include files in the Models section (copied to archive under models/, not bundled)
  • Added new "Loader pre-check" section explaining how loaders skip files without the expected export

swamp-extension-model/SKILL.md

  • Added Key Rule 5: "Helper scripts" — use include for files executed via Deno.Command subprocess, links to examples

swamp-extension-model/references/examples.md

  • Added "Helper Scripts" to table of contents
  • Added complete example showing: manifest with include, model that shells out to helper, helper script with native deps that isn't bundled

swamp-extension-model/references/publishing.md

  • Updated "What Happens During Push" steps to include:
    • Step 5: Resolve include files
    • Step 6: Safety analysis now explicitly includes include files
    • Step 7: Quality checks explicitly exclude include files
    • Step 8: Bundle step notes include files are not bundled

🤖 Generated with Claude Code

Update design doc with include field in manifest, loader pre-check
behaviour, and include file lifecycle through push/pull.

Update extension model skill with helper scripts key rule and example
showing include usage with a Deno.Command subprocess pattern.

Update publishing reference with include file resolution in push steps.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

Documentation-only PR — verified all documented behavior against the actual codebase.

Blocking Issues

None.

Suggestions

  1. Minor: Loader pre-check docs could mention all loader typesdesign/extension.md says loaders check for "the expected named export (export const model, export const vault, etc.)" which is accurate but slightly vague. All five loaders (model, vault, driver, datastore, report) implement the same pre-check pattern. The current wording with "etc." is fine, but listing them explicitly could be more precise. Not blocking since the pattern is clear.

  2. Minor: Example execute signature — In the helper scripts example in examples.md, the execute callback uses (_args: unknown, context: { repoDir: string }). The _args: unknown typing is consistent with Key Rule 7 ("No type annotations — avoid TypeScript types in execute parameters"), but it might be worth noting in a comment that the inline context type is just for illustration since real context comes from the runtime. Very minor — the example is clear as-is.

All documented behavior (include file resolution relative to modelsDir, safety analysis inclusion, quality check exclusion, archive placement under models/, loader pre-check regex) matches the implementation. Good docs update.

@stack72 stack72 merged commit 88a9ee0 into main Mar 24, 2026
10 checks passed
@stack72 stack72 deleted the docs/include-files-and-loader-precheck branch March 24, 2026 20:30
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