Add a new exporter
Follow this recipe to add an agent exporter without guesswork.
Steps
- Create the module
- Copy the smallest existing exporter as a starting point (e.g.,
packages/exporters/src/cline). - Add
manifest.jsonandindex.tsunderpackages/exporters/src/<agent>/. - Register it in
packages/exporters/src/registry.ts.
- Copy the smallest existing exporter as a starting point (e.g.,
- Wire outputs
- Decide output paths and filenames; keep them deterministic.
- Include fidelity notes if the format is lossy compared to IR.
- Add tests
- Golden determinism: IR fixture → expected files in
packages/exporters/tests/__fixtures__/<agent>/. - Contract coverage: validate manifest and hash stability if applicable.
- Run:
pnpm --filter @aligntrue/exporters test.
- Golden determinism: IR fixture → expected files in
- Docs
- Add the agent to
apps/docs/content/04-reference/agent-support.mdwith any fidelity notes. - Update
CHANGELOG.mdunder “Added”.
- Add the agent to
- init detection (optional)
- If the exporter should auto-detect on
aligntrue init, hook it into the detection logic inpackages/cli/src/commands/init.ts.
- If the exporter should auto-detect on
Checks before opening a PR
- Golden fixtures pass for the new exporter.
- Manifest fields and outputs are documented.
pnpm checkandpnpm --filter @aligntrue/exporters testare green.- Docs updated for user-facing behavior.
Last updated on