Repository navigation
feat(docs): add guided implementation prompts to task guides - #887
Conversation
Guides can declare optional `implementation` frontmatter (objective, decisions, constraints, related links), validated by the docs schema. Pages that declare it show "Copy implementation prompt", which copies a prompt built from one shared agent workflow: read the guide, inspect the project, settle the page's decisions with the user, then implement. Enabled on Threaded replies, Publish notifications and the widgets End-to-end Example. Contributor docs explain how to author the metadata. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0129cPmZegPiTUyX5NPnpdZ3
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
React Doctor found no issues. 🎉
|
An eye button next to "Copy implementation prompt" opens a lazily loaded dialog with the exact prompt text and its own copy button. One-click copying stays unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0129cPmZegPiTUyX5NPnpdZ3
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1175ce2e27
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| describe('pilot implementation metadata', () => { | ||
| const pilots = [ | ||
| 'content-engine/threads.mdx', | ||
| 'dev/notifications/publishing.mdx', | ||
| 'dev/widgets/end-to-end.mdx', | ||
| ] |
There was a problem hiding this comment.
Remove the static pilot-frontmatter tests
These tests hard-code the current pilot files and inspect their frontmatter, so renaming or intentionally removing a guide can break the suite while adding another implementation-enabled guide receives no coverage. The docs build already validates this metadata through docsPageSchema; keep behavioral tests for the schema and prompt builder rather than testing static documentation configuration.
AGENTS.md reference: AGENTS.md:L122-L124
Useful? React with 👍 / 👎.
Adds implementation metadata to Public write, Containers, Search, Public pages, Publishing policies, AI Actions, Editable Pages and Enable reports. Each decision offers only options the installed code supports. The schema test now covers every guide that declares the field instead of a fixed list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0129cPmZegPiTUyX5NPnpdZ3
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9192a6ad1f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| `## 3. Implement\n\n${list([ | ||
| 'When the required answers are in, state the resulting scope in two or three lines and start. Do not ask for another confirmation.', | ||
| 'Reuse the existing VitNode features, permissions and UI conventions instead of building parallel ones.', | ||
| 'Complete the server part and the public UI integration the guide describes, for the chosen target.', |
There was a problem hiding this comment.
Scope UI work to the selected implementation
When a reader chooses a server-only trigger—such as the background job or cron options offered by the new AI Actions metadata—the generated prompt still instructs the coding agent to complete a public UI integration. This contradicts the selected scope and can cause unrelated frontend work for guides such as AI Actions or notification publishing; make this step conditional on the guide and choices actually requiring a public UI.
Useful? React with 👍 / 👎.
…compressPublicAssets`
Description
What?
Guides can now declare an optional
implementationfield in their frontmatter. A page that has it shows a Copy implementation prompt button next to Copy Markdown..mdversion, tells the agent to inspect the reader's project and ask a short set of questions, then implement where the reader chose.How it works
Schema (
apps/web/src/docs/implementation/schema.ts): a strict zod schema added to the fumadocs page schema. Fields areobjective,decisions(1-6), optionalconstraints(up to 6) and optionalrelated(up to 4/docs/...links). Bad metadata fails the docs build and names the file. Pages without the field are unchanged.Prompt builder (
prompt.ts): a pure function holding the one shared agent workflow:Links are absolute on
SITE_ORIGIN.UI (
prompt-actions.tsx,prompt-preview-dialog.tsx): reuses the coreCopyButton,ButtonGroup,TooltipandDialog. The dialog is lazy-loaded and prefetched on hover or focus, so the docs bundle only grows by the button.Enabled guides (11)
Fixed option sets in the decisions (publication status, container depth and ordering, policy modes, AI action actors and output kinds, delivery path and sitemap rules, report snapshot kinds) were checked against the source. There is no reactions guide or reactions feature in the codebase, so none was enabled.
Docs and tests
dev/contribution.mdx, plus a pointer to it in thevitnode-docsskill.apps/web/src/tests/. They cover the prompt builder, the schema, and every guide that declares the field. No new dependency.Why?
A reader can paste one prompt into their coding agent and get the documented feature built into their own plugin and content type, instead of the guide's example names. The preview lets them see what they are about to hand over. Each guide keeps only a few lines of metadata, and the tutorial stays the single technical reference. The metadata does not appear in the article, the
.mdexport,/llms.txtor/llms-full.txt.Checks
pnpm typecheckandpnpm lintinapps/webpass.pnpm testpasses (21/21).pnpm buildpasses.oxfmt --check.pnpm checkfails on the same 103 files before and after this change; none of them are touched here.🤖 Generated with Claude Code
https://claude.ai/code/session_0129cPmZegPiTUyX5NPnpdZ3