Skip to content

docs: explain templates and fragments together - #1666

Open
roli-lpci wants to merge 1 commit into
simonw:mainfrom
roli-lpci:docs/templates-and-fragments
Open

roli-lpci wants to merge 1 commit into
simonw:mainfrom
roli-lpci:docs/templates-and-fragments

Conversation

@roli-lpci

Copy link
Copy Markdown
Contributor

Closes #918.

The opening of the templates page now explains when to use templates and fragments, then shows them working together: save summarization instructions as a template and provide a document with -f. It links to the YAML form for templates that include fragments.

This also removes the stale opening statement that only one template can be used at a time. Current CLI code, the existing multiple-template test, and the later section on the same page support repeated -t options applied from left to right.

Validation:

  • uv run --python 3.11 --with-requirements docs/requirements.txt make -C docs html: build succeeded.
  • Executed the example with the repository's local echo model and an isolated LLM_USER_PATH; verified the saved system instructions and document text arrive together in the prompt. No provider call.
  • git diff --check: passed.
  • The existing template/fragment test run could not complete successfully: current main uses httpx2-pytest while these test modules request httpx_mock. This docs-only diff does not change that fixture setup.

Prepared with AI assistance.

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.

Add documentation clarifying the difference between fragments and templates

2 participants