Skip to content

Ship's templates travel with its package#90

Merged
czpython merged 1 commit into
ship-renamefrom
ship-prompts
Jul 26, 2026
Merged

Ship's templates travel with its package#90
czpython merged 1 commit into
ship-renamefrom
ship-prompts

Conversation

@czpython

@czpython czpython commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Stacked on #89.

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 backend/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: nothing repeats the extension inside its own package, and there is no prompts/ level.

backend/druks/contrib/ship/templates/
├── verification_block.md
├── build/…
└── profile/repo_profiler.md

Prompt names are unchanged (ship/build/*.md), and so is the .druks/ship/prompts/build/*.md override path — it is still derived from the name.

That was the last thing in backend/templates/, so the directory goes, and with it the force-include, the sdist entry, and the PROMPTS_DIR loader 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.md partial, ship/verification_block.md, ship/profile/repo_profiler.md) and implement.md renders whole with its includes; uv build --wheel ships all 14 .md files; ruff check, ruff format --check, pyright (135, unchanged from main), pytest --collect-only (959).

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 czpython changed the title Ship's prompts travel with its package Ship's templates travel with its package Jul 26, 2026
@czpython
czpython merged commit 17e016b into ship-rename Jul 26, 2026
@czpython
czpython deleted the ship-prompts branch July 26, 2026 09:44
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.
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