agentleFS
bartstcbartstc/vite-ts-react-template/.github/instructions/copilot-instructions.md

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

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
  1. Distinctive:

    When unsure about requirements or business logic, ask the developer — never assume

    line 27
  2. Distinctive:

    When multiple interpretations exist, present them — don't pick silently

    line 28
  3. Distinctive:

    Use git commands only when explicitly requested

    line 31
  4. Distinctive:

    Keep reports, options, and summaries extremely concise — prioritize information density

    line 33
  5. Distinctive:

    If something goes wrong, STOP and re-plan immediately — do not keep pushing

    line 40
  6. Distinctive:

    Use plan mode for verification steps, not just building

    line 42
  7. Very specific:

    After any correction, capture the pattern in specs/lessons.md and write a rule to prevent recurrence

    line 46
  8. Distinctive:

    Never mark a task complete without proving it works

    line 52
  9. Distinctive:

    Run tests, check logs, and demonstrate correctness

    line 53
  10. Distinctive:

    Ask: "Would a staff engineer approve this?"

    line 54
  11. Distinctive:

    If a fix feels hacky: "Knowing everything I know now, implement the elegant solution"

    line 59
  12. Distinctive:

    When given a bug report: just fix it

    line 64
  13. Distinctive:

    Use logs, errors, and failing tests to diagnose — require zero context switching from the developer

    line 65
  14. Very specific:

    Use AIDEV-NOTE:, AIDEV-TODO:, AIDEV-QUESTION: anchors near non-trivial code (exception to no-comments rule)

    line 74

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

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-fix
  • pnpm 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.md and write a rule to prevent recurrence
  • Review specs/lessons.md at 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)

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.