mirror of
https://github.com/cypress-io/cypress.git
synced 2026-05-25 01:49:06 -05:00
4931cf06ff
* chore: bootstrap AI agent context files (AGENTS.md + CLAUDE.md)
Adds a three-tier set of AI context files across the monorepo:
- Root AGENTS.md / CLAUDE.md — project overview, workspaces, common
commands, architecture map, code conventions, and CI/CD summary
- Workspace-level pairs for cli/, packages/, npm/, tooling/,
system-tests/, and scripts/
- Package-level pairs for all 33 packages/, 15 npm/, 3 tooling/
packages, and the cli workspace (117 files total)
CLAUDE.md files are thin wrappers (@AGENTS.md import + workflow rules)
so Claude Code picks them up walking upward from cwd. AGENTS.md files
carry the substantive content and are also read natively by Codex CLI
and Cursor.
Command conventions applied throughout:
- No watch / file-watcher commands (agents run once and read results)
- No bare full-suite test runs for large packages; always target a
specific file (<path-to-spec>) or glob ("<glob-pattern>")
- No cypress:open (interactive mode); use cypress:run with --spec
- Test runner syntax varies by package: vitest (test --),
mocha (test-unit/test-integration --), jest (--testPathPattern),
Cypress CT (cypress:run:ct -- --spec)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* gitignore
* clarify AI internal docs and contribution guidelines
* update TOC
* tweak nvm wording
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1.4 KiB
1.4 KiB
CLAUDE.md
Workflow Orchestration
1. Plan Mode Default
- Enter plan mode for ANY non-trivial task (3+ steps or architectural decisions)
- If something goes sideways, STOP and re-plan immediately - don't keep pushing
- Use plan mode for verification steps, not just building
- Write detailed specs upfront to reduce ambiguity
2. Subagent Strategy
- Use subagents liberally to keep main context window clean
- Offload research, exploration, and parallel analysis to subagents
- For complex problems, throw more compute at it via subagents
- One task per subagent for focused execution
3. Self-Improvement Loop
- After ANY correction from the user: update the closest relevant
CLAUDE.mdfile - Write rules for yourself that prevent the same mistake
4. Verification Before Done
- Never mark a task complete without proving it works
- Diff behavior between main and your changes when relevant
- Ask yourself: "Would a staff engineer approve this?"
- Run relevant tests only, check logs, demonstrate correctness
5. Demand Elegance (Balanced)
- For non-trivial changes: pause and ask "is there a more elegant way?"
- If a fix feels hacky: "Knowing everything I know now, implement the elegant solution"
- Skip this for simple, obvious fixes - don't over-engineer
- Challenge your own work before presenting it
Core Principles
- Minimal Impact: Changes should only touch what's necessary. Avoid introducing bugs.
@AGENTS.md