Skip to content

feat(config): add a top-level partials field - #54

Draft
steve-calvert-glean wants to merge 1 commit into
mainfrom
feat/top-level-partials
Draft

steve-calvert-glean wants to merge 1 commit into
mainfrom
feat/top-level-partials

Conversation

@steve-calvert-glean

Copy link
Copy Markdown
Contributor

Problem

Partials are configured as source.partials. In 0.11 (#30), the whole source object was marked legacy, because source.plugins, source.skills and source.rootPlugin belong to the 0.10 discovery model that direct plugin sources replaced. Partials got the same label only because they live in that object. They aren't part of the old model and have no replacement. The README calls source legacy, and the 0.11 migration guide says to keep source.partials "temporarily", so users are told a supported feature is going away.

Change

  • Add a top-level partials field with the same safe-relative-path rule as source.partials.
  • Keep source.partials working as the older spelling. A config that sets both fails to load, so the two can't disagree.
  • Load partials and protect the partials folder through one helper, so errors and the outDir guard name the field the config actually used.
  • The "no partials are configured" hint now says to set partials.
  • README: document partials: "partials", add partials to the top-level table, and mark only plugins, skills and rootPlugin as legacy in the source table.
  • MIGRATING_TO_0.11.md: say to keep source.partials, not keep it "temporarily".

No change for existing configs. source.partials builds exactly as before.

Not in this PR

source.skills and rootPlugin stay legacy here. They support a layout with skills at the repo root and generated output at the repo root too, and the 0.11 model has no equivalent for it yet. That needs its own decision before those fields are removed.

Testing

  • npm run check passes: format, lint, typecheck, 504 tests, build, docs.
  • New tests: a top-level partials build into a direct source, partials outside the project and URL-shaped, an outDir inside the partials folder for each spelling, and a config that sets both.
  • The built dist/index.d.ts exposes the new partials? field.

Partials were configured as source.partials, inside the source object
that 0.11 marked legacy along with the 0.10 discovery fields (plugins,
skills, rootPlugin). Partials are not part of that model and have no
replacement, so the label told users a supported feature was going
away.

Add a top-level partials field with the same safe-path rule.
source.partials keeps working as the older spelling. A config that sets
both fails to load, so the two can't silently disagree. Errors and the
outDir guard name whichever field the config used.

Update the README config tables to mark only plugins, skills and
rootPlugin as legacy, and correct the 0.11 migration guide, which said
to keep source.partials only temporarily.
@steve-calvert-glean steve-calvert-glean added the enhancement New feature or request label Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant