Skip to content

docs: add agent prompt component and agent install instructions#1120

Merged
fi3ework merged 4 commits into
mainfrom
docs/agent-prompt
Apr 2, 2026
Merged

docs: add agent prompt component and agent install instructions#1120
fi3ework merged 4 commits into
mainfrom
docs/agent-prompt

Conversation

@fi3ework

@fi3ework fi3ework commented Mar 30, 2026

Copy link
Copy Markdown
Member

Summary

(specifically adjusted the switching speed to 2s for recording the video.)

Untitled.mp4

Background

The Rstest documentation lacks a standardized way for AI coding agents (Claude Code, Cursor, Amp, Codex, opencode, etc.) to set up Rstest in a project. Users currently must manually guide their agents through installation steps.

Implementation

  • Added website/docs/en/shared/agent-install.mdx — a detection-first, 9-step setup guide that agents can follow (detects workspace scope, language, framework, test environment, then installs deps, creates config, updates scripts, writes tests, and validates)
  • Added AgentPrompt component with rotating agent icons (10s interval, 200ms fade), copy-to-clipboard, and theme-aware header tinting
  • Added MdOnly component that renders content only in .md output (via import.meta.env.SSG_MD)
  • Added agent prompt sections in quick-start.mdx and ai.mdx (both EN and ZH)
  • Added en/guide/start/agent-install.mdx and zh/ counterpart as thin wrappers importing from shared

User Impact

Users can now copy a single prompt into any AI coding agent to automatically set up Rstest in their project with proper detection of their tech stack.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Mar 30, 2026

Copy link
Copy Markdown

Deploying rstest with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5bfad21
Status: ✅  Deploy successful!
Preview URL: https://2e78313a.rstest.pages.dev
Branch Preview URL: https://docs-agent-prompt.rstest.pages.dev

View logs

@github-actions

github-actions Bot commented Mar 30, 2026

Copy link
Copy Markdown

Rsdoctor Bundle Diff Analysis

⚠️ Note: The latest commit (ee500a17bb) does not have baseline artifacts. Using commit 15c15bb63d for baseline comparison instead. If this seems incorrect, please wait a few minutes and try rerunning the workflow.

Found 12 projects in monorepo, 0 projects with changes.

📊 Quick Summary
Project Total Size Change
adapter-rsbuild 2.1 KB 0
adapter-rslib 23.1 KB 0
adapter-rspack 5.9 KB 0
browser 2.0 MB 0
browser-react 3.7 KB 0
browser-ui 804.4 KB 0
coverage-istanbul 8.9 KB 0
core/browser 970.4 KB 0
core/loaders 869.0 B 0
core/main 1.5 MB 0
vscode/extension 60.2 MB 0
vscode/worker 14.4 KB 0

Generated by Rsdoctor GitHub Action

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 467892baa7

ℹ️ 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".

Comment thread website/theme/components/AgentPrompt.tsx
@fi3ework fi3ework force-pushed the docs/agent-prompt branch from d6d2e57 to c17e1a1 Compare March 30, 2026 11:32
@fi3ework fi3ework force-pushed the docs/agent-prompt branch from c17e1a1 to aad2a1f Compare March 30, 2026 11:36
fi3ework and others added 2 commits April 1, 2026 16:41
- Restructure as sequential agent steps with clear decision points
- Split inventory into repo-wide (Step 0) and package-scoped (Step 2)
- Replace inline setup details with links to canonical doc pages
- Add guardrails for Jest/Vitest coexistence and test isolation
- Add migration guide exit ramp in Step 0
- Fix monorepo deps/config/scripts ownership rules
- Add zero-test validation path (--passWithNoTests)
- Broaden script protection to all test-related scripts
- Add Bun support and packageManager field fallback

Amp-Thread-ID: https://ampcode.com/threads/T-019d4805-4494-7349-a62e-5ea8ecb5cbfe
Co-authored-by: Amp <amp@ampcode.com>
@fi3ework fi3ework requested a review from 9aoy April 1, 2026 09:40
@fi3ework fi3ework merged commit 20f9e5c into main Apr 2, 2026
18 checks passed
@fi3ework fi3ework deleted the docs/agent-prompt branch April 2, 2026 03:41
@9aoy 9aoy mentioned this pull request Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants