Authoring PIE docs
The single source of truth for all pie-docs authoring conventions is apps/pie-docs/AUTHORING_GUIDE.md. Read it before writing or reviewing any content. Do not duplicate or paraphrase its rules here. Follow the guide directly so guidance never drifts. The same file backs the GitHub Copilot review instructions.
Workflow
Read
apps/pie-docs/AUTHORING_GUIDE.mdin full. It is the authority on every rule below.Identify the task and jump to the matching section of the guide:
Task Guide section Add a top-level nav section Creating a new navigation section Add a component, pattern or foundation page Creating tabbed pages Add landing content to a nav item Adding index pages Mark a page or section not ready for production Drafts Any wording, frontmatter, shortcode or link question Conventions and quality rules Author or edit the content following the guide's examples and rules exactly.
Work through "Before you publish" below before presenting the work.
Before you publish
The guide's "Conventions and quality rules" section is the checklist. Verify the content against it directly. Don't rely on this skill to restate the rules.
Two things the guide can't do for you, so do them yourself.
1. Actively check the rules that fail silently. These produce no build error, so reading the rule is not enough. You have to confirm each one:
- Nav
parent/keyand.jsonnavKeyactually match (guide, "Frontmatter correctness"). ogImage, imagesrc, and index card files actually exist on disk (guide, "Asset references").indexPageDisplayitemKeymatches the section key exactly (guide, "Shortcode usage").
2. Build it and inspect the output. Run the production build with the Turborepo
commands in AGENTS.md, and don't cd into the app. The build catches the loud failures,
such as a missing icon that throws or bad frontmatter. The generated HTML in
apps/pie-docs/dist/ confirms the silent ones didn't bite, with no dev server or browser
needed:
yarn build --filter=@justeattakeaway/pie-docs # must finish with no errors
Then in apps/pie-docs/dist/:
- The new page rendered, and was not dropped as a draft: its
index.htmlexists at the expected path, for exampledist/example/introduction/index.html. - It joined the nav, so
parent/keymatched: the new entry appears in the nav markup of the built pages. A silent mismatch leaves it absent.
3. If you added or removed a page, regenerate the route snapshot. A stale
expected-routes.snapshot.json fails the navigation tests:
yarn test:generate-routes --filter=@justeattakeaway/pie-docs
Notes
- All paths above are relative to the repo root.
- If anything in this skill conflicts with the guide, the guide wins. Update the skill to match.