Skip to content

fix(scaffold): repair corrupted agent templates shipped by the installer#56

Merged
shyamsridhar123 merged 3 commits into
All-The-Vibes:mainfrom
andreaswasita:fix/scaffold-agent-templates
Jun 7, 2026
Merged

fix(scaffold): repair corrupted agent templates shipped by the installer#56
shyamsridhar123 merged 3 commits into
All-The-Vibes:mainfrom
andreaswasita:fix/scaffold-agent-templates

Conversation

@andreaswasita

@andreaswasita andreaswasita commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Problem

The scaffolded agent templates shipped by atv init were corrupted: every
pkg/scaffold/templates/agents/*.agent.md had all line breaks stripped,
collapsing the YAML frontmatter into a single line. Because the installer
(catalog.goscaffold.go writeIfNotExists) writes template bytes
verbatim with no transformation, consumers received malformed, unparseable
agent files. Empirically reproduced: a clean atv init produced agent files
with 0 newline characters.

A second, related defect: two canonical sources under .github/agents
themselves contained OEM-codepage (CP437) mojibake — an em-dash rendered as
Γ+Ç+ö and a rightwards arrow as Γ+å+Æ.

Fix

  1. Regenerate all 51 templates/agents files as verbatim byte copies of the
    canonical .github/agents source (restores multi-line, parseable frontmatter).
  2. Un-mojibake the two canonical agents
    (cli-agent-readiness-reviewer, issue-intelligence-analyst) and re-sync
    their templates: 101 em-dashes and 3 arrows restored.

Verification

  • Rebuilt the installer and ran atv init in a clean dir: 51/51 agents now
    parse with valid frontmatter (previously 0).
  • 0 mojibake sequences remain across .github/agents and templates/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.

andreaswasita and others added 2 commits June 5, 2026 01:46
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 shyamsridhar123 merged commit feb34c3 into All-The-Vibes:main Jun 7, 2026
2 checks passed
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
…ain-agents

docs(changelog): record #53/#54/#56 in Unreleased
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.

2 participants