Commit graph

1 commit

Author SHA1 Message Date
mpstaton
0d7078c688 doc(directory-templates): README section + canonical reference in docs/
Backfills the documentation gap for the directory-templates feature
shipped in changelog/2026-05-10_01.md. Until now, a GitHub reader
landing on README.md had no idea the feature existed — the README
jumped straight from Command Reference into Developer Onboarding.

README.md — new "## Directory Templates" section between Command
Reference and Developer Onboarding (and a matching TOC entry).
~60 lines covering: why this exists, the three primitives
(template / commands / cleanup pipeline), the four shipped
templates and their target globs, auto-seed behavior including
the two-tier policy (README always, templates only when fresh),
how to write your own template, and a link to the canonical
reference.

docs/directory-templates.md — new canonical reference for repo
readers. Adapted and expanded from src/docs/templates/README.md
(which stays as the user-vault-seeded variant). Adds: why this
paradigm exists (the 1,600-empty-files problem), full anatomy
of the three template zones with grammar example, interpolation
token table, fill-vs-append run modes, streaming + cleanup
pipeline mechanics (think wrap, image marker swap, fallback
images section, sources footer aligned to cite-wide's
REFDEF_NUM_RE), frontmatter stamps (cf_last_run /
cf_last_run_model / google_books_url), the anti-incumbent
editorial stance rationale, first-run + re-seed semantics with
the two-tier policy, instructions for writing your own template,
plugin settings reference, and the open-items list mirrored from
the changelog. Links back to the changelog as the canonical
engineering record.

src/docs/templates/README.md left untouched — it's the
user-vault-seeded doc and remains correctly scoped for the
"you have these files in your vault, here's how to use them"
audience.

Naming note: the feature was originally specced as "prompt
outlines" (see context-v/specs/Using-Files-as-Prompt-Outlines.md).
The shipped naming is "directory templates" — matches the code,
the changelog, and the command-palette entries. The new doc
mentions the original name once, for orientation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-10 23:40:05 -05:00