Ship's templates travel with its package#90
Merged
Conversation
The prompts sat in a platform-level backend/templates/prompts/ that only ship used, kept in the wheel by a force-include. They move to druks/contrib/ship/templates/, the root every extension gets: the resolver walks each installed extension's package for one and mounts it under the extension's name, so ship/build/implement.md is build/implement.md inside ship's own tree. Names and the .druks/ship/prompts/ override path are unchanged, and an extension shipped on its own now carries its templates with it. That emptied backend/templates/, so the directory, the force-include, and the loader entry pointing at it go with it.
czpython
added a commit
that referenced
this pull request
Jul 26, 2026
The prompts sat in a platform-level backend/templates/prompts/ that only ship used, kept in the wheel by a force-include. They move to druks/contrib/ship/templates/, the root every extension gets: the resolver walks each installed extension's package for one and mounts it under the extension's name, so ship/build/implement.md is build/implement.md inside ship's own tree. Names and the .druks/ship/prompts/ override path are unchanged, and an extension shipped on its own now carries its templates with it. That emptied backend/templates/, so the directory, the force-include, and the loader entry pointing at it go with it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #89.
The prompts sat in a platform-level
backend/templates/prompts/that only ship used, kept in the wheel by aforce-include. They move tobackend/druks/contrib/ship/templates/— the root every extension gets. The resolver walks each installed extension's package for one and mounts it under the extension's name, soship/build/implement.mdisbuild/implement.mdinside ship's own tree: nothing repeats the extension inside its own package, and there is noprompts/level.Prompt names are unchanged (
ship/build/*.md), and so is the.druks/ship/prompts/build/*.mdoverride path — it is still derived from the name.That was the last thing in
backend/templates/, so the directory goes, and with it theforce-include, the sdist entry, and thePROMPTS_DIRloader entry that pointed at it — the wheel carries the templates because they live inside the package.Verified: every name shape resolves through the new loader (
ship/build/implement.md, its_header.mdpartial,ship/verification_block.md,ship/profile/repo_profiler.md) andimplement.mdrenders whole with its includes;uv build --wheelships all 14.mdfiles; ruff check, ruff format --check, pyright (135, unchanged from main), pytest --collect-only (959).