Skip to content

Commit d8ff0be

Browse files
docs: fix {{ agent }} marker description in template-markers.md (#854)
{{ agent }} expands to sanitize_filename() — lowercase with non-alphanumeric characters replaced by hyphens — not the raw unescaped name value as the previous alias note claimed. {{ agent_name }} retains the raw front-matter name. Update the note to accurately describe both markers and their use cases. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 87d5f1d commit d8ff0be

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/template-markers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Should be replaced with the human-readable name from the front matter
107107
no quoting or escaping — front-matter `name` values are free-form and
108108
have not been validated against YAML scalar rules.
109109

110-
> **Alias:** `{{ agent }}` is registered as a backward-compatible alias for `{{ agent_name }}` and expands to the same unescaped name value. The same safety caveat applies — only safe in non-YAML positions.
110+
> **Related marker:** `{{ agent }}` is a distinct marker that expands to the *sanitized filename* form of the agent name — lowercase, with every non-alphanumeric character replaced by a hyphen and consecutive hyphens collapsed. For an agent named `Daily Code Review`, `{{ agent }}` expands to `daily-code-review`. Use `{{ agent_name }}` when the raw unescaped name is needed; use `{{ agent }}` when a filename-safe or URL-safe identifier is needed.
111111

112112
> ⚠️ This marker is only safe inside a position that is **not parsed as
113113
> YAML** (currently only `src/data/threat-analysis.md`, which is a

0 commit comments

Comments
 (0)