claude-code-app-studio / tests
CLAUDE.md40 starsChanged 7 months agoMITView on GitHub
The test tree is a sibling of src/, not nested inside, so coverage visibility is unambiguous and tooling can address suites by directory. Pick one E2E runner per project (the choice goes in .claude/docs/technical-preferences.md). Recommended defaults: Maestro tests live in tests/e2e/maestro/[flow]/[step].yaml. XCUITest and Espresso tests live in their respective project test targets but are mirrored here as Markdown manifests so the suite is discoverable from Claude Code without opening the IDE. The matrix is enforced by /story-done and /test-evidence-review. -…
In this repository77 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- design/CLAUDE.mdCLAUDE.md
- docs/CLAUDE.mdCLAUDE.md
- src/CLAUDE.mdCLAUDE.md
- adoptSkill
- architecture-decisionSkill
- architecture-reviewSkill
- asset-auditSkill
- asset-specSkill
- balance-checkSkill
- brainstormSkill
- bug-reportSkill
- bug-triageSkill
- changelogSkill
- code-reviewSkill
- consistency-checkSkill
- content-auditSkill
- create-architectureSkill
- create-control-manifestSkill
- create-epicsSkill
- create-storiesSkill
- day-one-patchSkill
- design-bibleSkill
- design-reviewSkill
- design-systemSkill
- dev-storySkill
- estimateSkill
- extractSkill
- gate-checkSkill
- helpSkill
- hotfixSkill
- launch-checklistSkill
- localizeSkill
- map-systemsSkill
- milestone-reviewSkill
- onboardSkill
- patch-notesSkill
- perf-profileSkill
- prd-reviewSkill
- project-stage-detectSkill
- propagate-design-changeSkill
- prototypeSkill
- qa-planSkill
- quick-designSkill
- regression-suiteSkill
- release-checklistSkill
- retrospectiveSkill
- reverse-documentSkill
- review-all-prdsSkill
- scope-checkSkill
- security-auditSkill
- setup-frameworkSkill
- skill-improveSkill
- skill-testSkill
- smoke-checkSkill
- soak-testSkill
- sprint-planSkill
- sprint-statusSkill
- startSkill
- story-doneSkill
- The first 60 shown.
The file
We split this CLAUDE.md into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 66
Test names describe behaviour: signs in with valid credentials, not testHandleSubmit.
- Distinctive: line 75
Never depend on test execution order.
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md 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
Tests
The test tree is a sibling of src/, not nested inside, so coverage
visibility is unambiguous and tooling can address suites by directory.
Layout
tests/
├── unit/ # Pure-logic tests, fast, deterministic
├── integration/ # Multi-module tests with fakes for transport
├── component/ # Single-component or single-widget render tests
├── e2e/ # End-to-end tests on a real or virtual device
├── fixtures/ # Shared factories, fixture builders, recorded payloads
├── helpers/ # Test utilities — assertions, matchers, mocks
└── README.mdPer-Framework E2E Conventions
Pick one E2E runner per project (the choice goes in
.claude/docs/technical-preferences.md). Recommended defaults:
| Stack | E2E runner |
| React Native | Maestro (greenfield) or Detox (mature setups) |
| Flutter | Patrol (recommended) or integration_test |
| Native iOS | XCUITest (in-tree) or Maestro (cross-team) |
| Native Android | Espresso + UI Automator (in-tree) or Maestro |
Maestro tests live in tests/e2e/maestro/[flow]/[step].yaml. XCUITest
and Espresso tests live in their respective project test targets but
are mirrored here as Markdown manifests so the suite is discoverable
from Claude Code without opening the IDE.
Pyramid
| Layer | What it covers | Runtime budget | Where it lives |
| Unit | Pure logic — formulas, validators, reducers, mappers | < 5 ms each | tests/unit/[feature]/ |
| Integration | Repository + cache + offline queue together | < 200 ms each | tests/integration/[feature]/ |
| Component / Widget | Single-component render + interaction | < 200 ms each | tests/component/[feature]/ |
| E2E | Critical user paths on a real or virtual device | Minutes | tests/e2e/ |
Required Suites Per Story Type
| Story type | Required suite |
| Logic | At least one unit test that covers all acceptance criteria |
| Integration | Integration test or documented manual run with fixtures |
| UI | Component test or screenshot diff plus manual a11y walkthrough |
| Animation / Motion | Recorded clip plus motion-designer sign-off |
| Config / Remote | Smoke check of each variant |
| Accessibility | Audit run plus screen-reader walkthrough |
The matrix is enforced by /story-done and /test-evidence-review.
Naming
- TS / RN:
[feature]-[capability].test.ts(x)— e.g.,sign-in-validation.test.ts. - Swift:
FeatureNameTests.swift— e.g.,SignInTests.swift. - Kotlin:
FeatureNameTest.kt— e.g.,SignInViewModelTest.kt. - Dart:
feature_name_test.dart— e.g.,sign_in_test.dart.
Test names describe behaviour: signs in with valid credentials, not
testHandleSubmit.
Determinism
- Inject the clock; freeze it in tests.
- Inject the random source; seed it.
- Mock the network at the transport boundary.
- Mock the filesystem; use temp directories that get torn down.
- Never depend on test execution order.
Flaky tests go to tests/quarantine/ via /test-flakiness and are fixed
within one sprint.
CI
The pyramid runs in three CI stages:
- Per-PR — unit + integration + component. Fast (< 5 minutes). Blocks merge.
- Per-PR (parallel) — lint + type-check.
- Nightly — E2E suite on a device matrix. Reports go to the release channel.
Per-framework runners are configured by /test-setup:
- RN:
yarn test --ci(Jest),yarn typecheck,yarn lint,maestro test tests/e2e/maestro(nightly). - Flutter:
flutter analyze,flutter test --coverage,patrol test --target tests/e2e/patrol(nightly). - iOS:
xcodebuild test -scheme App -destination .... - Android:
./gradlew lint test connectedAndroidTest.
Coverage Floor
- Domain (pure logic, validators, formulas): 90%.
- Repositories and services: 70%.
- Overall: 50%. Higher is welcome; 100% is not the goal.
UI and animation work is covered by component tests + screenshot diff where helpful, plus manual review.
What NOT to Test Here
- Real network calls — mock the transport.
- Real push delivery — verify handlers with fixtures; defer to TestFlight / Play internal track for end-to-end.
- Real IAP purchases — sandbox path only.
- Subjective qualities ("feels snappy") — covered by lead reviews and beta testing.
- Pixel-perfect rendering across every device — covered by device-farm runs, not by automated tests.
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.

