Canonical Source Fidelity
When tasks reference specific source files — config schemas, multi-step flows, field names — implementation agents must read and reproduce the source faithfully rather than generating content from conceptual understanding. LLMs produce plausible-but-wrong field names that pass automated checks but are semantically incorrect.
⚠️The “Plausible Fabrication” Anti-Pattern
When told “document the CLI auth fields from auth-headless”, an agent may write strategy, tokenOutput, sessionCookie instead of the actual fields command, responseFormat, tokenPath. The fabricated content is structurally valid — it passes typecheck and lint — but the field names are wrong.
Required Steps for @developer
When a task references specific files, line ranges, schemas, or says “match X” / “reproduce Y”:
1READ
Read every referenced source file before writing anything
2EXTRACT
Extract exact field names, column headers, and structure from the source
3REPRODUCE
Reproduce faithfully — do not rename fields, reorder columns, or “improve” the structure
4VERIFY
Re-read the source after writing and diff against your output for mismatches
Inline Canonical Source in Delegation
For documentation tasks, @builder embeds the canonical content directly in the delegation context block using a canonicalSource field. This ensures the agent has the exact text in its context window and doesn't need to read external files:
<context>
version: 1
project:
path: /Users/dev/code/website
canonicalSource:
description: "Exact content to reproduce"
sources:
- file: skills/auth-headless/SKILL.md
lines: "331-359"
content: |
headless:
method: cli
command: "pnpm cli auth:test-token"
responseFormat: json
tokenPath: accessToken
sessionStorage: localStorage
</context>
Field names and structure MUST match
canonicalSource exactly.
This belt-and-suspenders approach combines the developer's READ-EXTRACT-REPRODUCE-VERIFY rule with Builder embedding the source content inline, ensuring faithful reproduction even when the agent skips reading referenced files.