
JSX That Outputs Markdown
This started because managing agent instruction files as template strings became unbearable. The fix was JSX. I have about fifteen of them now — Markdown files that tell LLM agents how to behave. An orchestrator, a code implementer, a critic, a planner, a handful of single-purpose grunts. It grew out of experimentation — different persona variants, different tool sets per harness, shared fragments that kept getting copy-pasted between files. Each file defines the agent's role, what tools it has access to, what constraints it follows, how it handles failure. A typical file starts looking something like this: const forgePrompt = ` # Forge You are an implementation agent. Write code, tests, migrations. Axes: trust=assume-broken, solution=converge, risk=block. ## Tools You have access to: ${ tools . map ( t => `- \` ${ t . name } \` — ${ t . description } ` ). join ( ' \n ' )} ## Code Rules - **P0**: No non-null assertions. No \` as \` casts without type guards. - **P0**: No \` enum \` . U
Continue reading on Dev.to JavaScript
Opens in a new tab



