| name | docs-server-dev |
| description | Expert developer for the le-truc docs build pipeline and dev server. Use when implementing features, fixing bugs, adding Markdoc schemas, writing tests, or answering questions about the Bun + Cause & Effect + Markdoc + TypeDoc + Shiki stack in server/. |
| user_invocable | false |
Scope
In scope:
server/ โ effects, templates, schemas, file signals, HTTP server, HMR, config, io, helpers
typedoc.json and typedoc-heading-shift.mjs โ TypeDoc pipeline configuration
docs-src/ โ as read-only input; do not author content here
src/ โ as read-only input for TypeDoc; do not change library source here
docs/ โ as write-only output; do not edit files here manually
Out of scope:
docs-src/pages/*.md content authoring โ use tech-writer
src/ library source โ use le-truc-dev
examples/ component source โ use le-truc or le-truc-dev
- Playwright tests in
examples/*.spec.ts โ those test components, not the server
Essential Principles
Bun, not Node.js. Use Bun.serve, Bun.Glob, Bun.file, bun:test, and Bun APIs throughout. Never use node:fs, node:http, or node:path when Bun equivalents exist.
Cause-effect drives the build pipeline. List<FileInfo> signals represent watched directories. Effects (createEffect + match) re-run when source files change and write output to docs/. This is cause-effect as a reactive build graph.
Two html tags exist โ they are completely different:
templates/utils.ts โ html produces auto-escaped HTML strings for page output
markdoc-helpers.ts โ html is a Markdoc Tag builder that produces Tag objects
Never use the templates html inside a Markdoc schema transform. Never use markdoc-helpers html to produce output strings.
All template output is auto-escaped by default. The html, xml, css, and js tagged template literals in templates/utils.ts escape all interpolated values. Use raw()/RawHtml only for content that is already trusted: Shiki-highlighted HTML, previously validated Markdoc output, or output from other template functions.
SERVER.md is authoritative. Read it before changing any major component.
Run bun test server/tests after every change.
Run the linter after every change to server/: bunx biome check --write ./server.
Task Types
- Implement โ add or extend build pipeline or server functionality
- Fix โ debug unexpected build or server behavior
- Add schema โ create a new Markdoc tag
- Test โ write or update server tests
- Question โ understand the architecture or a specific component
Quick Reference
| Need | Location |
|---|
| Architecture overview, effects table, file signals, HTTP routes, HMR | server/SERVER.md |
| Test strategy, conventions, verification | server/TESTS.md |
| Template system design | server/templates/README.md |
| Source file locations | server/SERVER.md source files section |
Routing
| Task | Workflow |
|---|
| Implement feature, add effect, extend build, create template | Follow effect-pattern.md or template-system.md |
| Fix bug, debug behavior | Follow fix-bug.md |
| Add Markdoc tag/schema | Follow markdoc-schema.md |
| Write tests | Follow testing.md |
| Answer question | Follow architecture docs in SERVER.md |
Post-Task Protocol
After completing any task, in order:
- Run tests:
bun test server/tests โ all tests must pass
- Run linter:
bunx biome check --write ./server โ no new lint errors
- Update TODO.md (only if task was assigned via TODO.md):
- Write to NOTES.md if you encountered an unexpected challenge or want to deviate from the plan:
- Use the format defined in the
architect skill's notes format
- Stop work on the task
- Wait for Architect or user to resolve before proceeding