Expand description
Generate the three distribution files from a ProjectProfile + Intent
via Tera templates. Pure (no disk writes here): returns [GeneratedFile]s;
the CLI dispatcher decides whether to write them (after pre-commit verify).
Design §5.1 step 3 + §6.3. Idempotent: identical inputs produce byte-identical
output across runs (templates use sorted/stable iteration where order
matters, and default(value=...) keeps fields present rather than
conditionally-present).
Structs§
- Generated
File Output - Output path + rendered contents, root-relative. Re-exports the shared
GeneratedFileshape; kept as its own type so callers don’t need to import the path tuple awkwardly. - Keywords
- A transparent newtype wrapper so the JSON / Tera context exposes the inner
array under the field name directly (the templates iterate
keywordsas a list, notkeywords.inner).
Constants§
- OUTPUT_
PATHS - The three files
initemits, relative to the project root. Documented for external tooling/tests; the renderer computes paths itself.
Functions§
- build_
context - Build the full Tera context from profile + intent.
- coerce_
kebab - Coerce an arbitrary detected name into valid kebab-case for the plugin/skill namespace. Lowercases, replaces runs of non-[a-z0-9] with a single hyphen, strips leading/trailing hyphens.
- render
- Renders all three files and returns them with their root-relative paths. The skill path uses the kebab name.
- render_
targets - Render distribution files for one or more agent ecosystems. Calls
renderfor Claude (the three-file set) and emits additional files for each extra target intargets. Dedupes: iftargetscontainsClaudeplus others, Claude files are emitted once.