vite-ts-react-template / instructions
Copilot instructions122 starsChanged 4 months agoMITView on GitHub
React SPA built with Vite using feature slice architecture with clean architecture principles. TypeScript SPA. React 19, Vite 8, React Router 8, TanStack Query, Zustand, XState, Chakra UI, i18next. Testing: Vitest, Storybook, Playwright, MSW. Package manager: PNPM only. Path alias: @/* → src/. 1. Plan Mode Default 2. Self-Improvement Loop 3. Verification Before Done 4. Demand Elegance (Balanced) 5. Autonomous Bug Fixing 6. Spec-Driven Development
In this repository18 other files it gives its agents.
- .agents/skills/vercel-react-best-practices/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-md-refactorSkill
- brainstormingSkill
- building-blocksSkill
- commit-workSkill
- dependency-updaterSkill
- explaining-codeSkill
- frontend-designSkill
- github-actions-templatesSkill
- playwright-page-objectsSkill
- qa-test-plannerSkill
- react-useeffectSkill
- test-building-blocksSkill
- test-driven-developmentSkill
- typescript-advanced-typesSkill
- vercel-react-best-practicesSkill
- writing-specSkill
The file
Show its rules and text
We split this copilot-instructions.md into the rules it gives an agent
14 rules. About 0 are common, 12 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈12
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 27
When unsure about requirements or business logic, ask the developer — never assume
- Distinctive: line 28
When multiple interpretations exist, present them — don't pick silently
- Distinctive: line 31
Use git commands only when explicitly requested
- Distinctive: line 33
Keep reports, options, and summaries extremely concise — prioritize information density
- Distinctive: line 40
If something goes wrong, STOP and re-plan immediately — do not keep pushing
- Distinctive: line 42
Use plan mode for verification steps, not just building
- Very specific: line 46
After any correction, capture the pattern in specs/lessons.md and write a rule to prevent recurrence
- Distinctive: line 52
Never mark a task complete without proving it works
- Distinctive: line 53
Run tests, check logs, and demonstrate correctness
- Distinctive: line 54
Ask: "Would a staff engineer approve this?"
- Distinctive: line 59
If a fix feels hacky: "Knowing everything I know now, implement the elegant solution"
- Distinctive: line 64
When given a bug report: just fix it
- Distinctive: line 65
Use logs, errors, and failing tests to diagnose — require zero context switching from the developer
- Very specific: line 74
Use AIDEV-NOTE:, AIDEV-TODO:, AIDEV-QUESTION: anchors near non-trivial code (exception to no-comments rule)
≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Project
React SPA built with Vite using feature slice architecture with clean architecture principles.
Stack
TypeScript SPA. React 19, Vite 8, React Router 8, TanStack Query, Zustand, XState, Chakra UI, i18next. Testing: Vitest, Storybook, Playwright, MSW.
Commands
pnpm dev— start dev server (port 5173)pnpm lint --fix— lint and auto-fixpnpm test— all tests (unit + storybook)pnpm test:e2e— Playwright E2E (headless)pnpm storybook— component dev (port 6006)
Package manager: PNPM only. Path alias: @/* → src/.
Core Principles
- Simplicity first — make every change as simple as possible, minimize code impact, choose the boring solution
- Surgical changes — touch only what the task requires; don't refactor, reformat, or "improve" adjacent code. Remove only the orphans your own changes create
- When unsure about requirements or business logic, ask the developer — never assume
- When multiple interpretations exist, present them — don't pick silently
- For changes >300 LOC or >3 files, ask for confirmation before proceeding
- Modify API contracts only with explicit approval
- Use git commands only when explicitly requested
- Stay within current task context — inform dev if a fresh start is needed
- Keep reports, options, and summaries extremely concise — prioritize information density
Workflow
1. Plan Mode Default
- Enter plan mode for any non-trivial task (3+ steps or architectural decisions)
- If something goes wrong, STOP and re-plan immediately — do not keep pushing
- For complex features, write or request a spec before implementation
- Use plan mode for verification steps, not just building
2. Self-Improvement Loop
- After any correction, capture the pattern in
specs/lessons.mdand write a rule to prevent recurrence - Review
specs/lessons.mdat the start of each session - Ruthlessly iterate on lessons until the mistake rate drops
3. Verification Before Done
- Never mark a task complete without proving it works
- Run tests, check logs, and demonstrate correctness
- Ask: "Would a staff engineer approve this?"
4. Demand Elegance (Balanced)
- For non-trivial changes, ask: "Is there a more elegant solution?"
- If a fix feels hacky: "Knowing everything I know now, implement the elegant solution"
- Skip this for simple fixes — do not over-engineer
5. Autonomous Bug Fixing
- When given a bug report: just fix it
- Use logs, errors, and failing tests to diagnose — require zero context switching from the developer
6. Spec-Driven Development
- For features spanning 5+ files or 5+ unconstrained decisions, write a spec first using writing-spec skill
- Skip when the developer opts out
Conventions
- Use
AIDEV-NOTE:,AIDEV-TODO:,AIDEV-QUESTION:anchors near non-trivial code (exception to no-comments rule)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

