fix(scaffold): repair corrupted agent templates shipped by the installer#56
Merged
shyamsridhar123 merged 3 commits intoJun 7, 2026
Conversation
pkg/scaffold/templates/agents/*.agent.md were stored in a corrupted form: every file had all line breaks stripped, collapsing the YAML frontmatter onto a single line (`---description: ... user-invocable: true---<body>`) so it no longer parses, and the files containing multibyte characters additionally had them mojibaked (em-dashes/smart quotes). These files are embedded via go:embed and written verbatim into each consumer's .github/agents/ by `atv init`, so every install shipped 50 malformed agent personas. Regenerate all 51 agent templates from the canonical, correctly formatted .github/agents/*.agent.md definitions the repo already dogfoods. After this change every template agent has standalone `---` frontmatter delimiters and is byte-identical to its .github counterpart. pattern-observer.agent.md was already correct and is unchanged (50 files touched). Verified: rebuilt the installer and ran `atv init` into a clean project; all scaffolded agents are now multi-line with parseable frontmatter (previously 0). `go test ./pkg/scaffold` is unchanged — the only failing test, TestDogfoodPromptParity, fails identically on a Windows CRLF checkout of pristine main and is unrelated to this change. Note: two agents (cli-agent-readiness-reviewer, issue-intelligence-analyst) contain minor mojibake in the canonical .github/agents source itself; that pre-existing content issue is left untouched here and noted as follow-up. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
cli-agent-readiness-reviewer and issue-intelligence-analyst contained OEM-codepage mojibake in the canonical .github/agents source itself: an em-dash became the byte sequence rendered as the GREEK CAPITAL LETTER GAMMA + C-cedilla + o-diaeresis, and a rightwards arrow similarly. Restore the intended characters and re-sync the two scaffolded templates. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Run go run ./cmd/plugingen so the generated plugins/ tree matches the repaired (un-mojibaked, multi-line) agent templates, fixing the failing 'Plugin marketplace drift check' CI step. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
shyamsridhar123
added a commit
to andreaswasita/ATV-StarterKit
that referenced
this pull request
Jun 7, 2026
shyamsridhar123
added a commit
that referenced
this pull request
Jun 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The scaffolded agent templates shipped by
atv initwere corrupted: everypkg/scaffold/templates/agents/*.agent.mdhad all line breaks stripped,collapsing the YAML frontmatter into a single line. Because the installer
(
catalog.go→scaffold.go writeIfNotExists) writes template bytesverbatim with no transformation, consumers received malformed, unparseable
agent files. Empirically reproduced: a clean
atv initproduced agent fileswith 0 newline characters.
A second, related defect: two canonical sources under
.github/agentsthemselves contained OEM-codepage (CP437) mojibake — an em-dash rendered as
Γ+Ç+öand a rightwards arrow asΓ+å+Æ.Fix
templates/agentsfiles as verbatim byte copies of thecanonical
.github/agentssource (restores multi-line, parseable frontmatter).(
cli-agent-readiness-reviewer,issue-intelligence-analyst) and re-synctheir templates: 101 em-dashes and 3 arrows restored.
Verification
atv initin a clean dir: 51/51 agents nowparse with valid frontmatter (previously 0).
0mojibake sequences remain across.github/agentsandtemplates/agents.go test ./pkg/scaffold/passes (the only failure,TestDogfoodPromptParity,is a pre-existing Windows-CRLF environment artifact unrelated to this change;
green on Linux CI).
Impact
Consumer-facing only — repairs the files end users receive. No installer code
changes, no API changes, no CI risk.