agentic-team 0.0.0-stage → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +184 -2
- package/bin/build-template.js +208 -0
- package/bin/index.js +1139 -0
- package/package.json +41 -4
- package/template/.claude-plugin/plugin.json +10 -0
- package/template/.orchestra/README.md +401 -0
- package/template/.orchestra/blueprints/README.md +87 -0
- package/template/.orchestra/blueprints/api-only.md +46 -0
- package/template/.orchestra/blueprints/component-crud-resource.md +25 -0
- package/template/.orchestra/blueprints/saas-starter.md +69 -0
- package/template/.orchestra/config.yml +277 -0
- package/template/.orchestra/roles/orchestrator.md +105 -0
- package/template/.orchestra/roles/product-manager.md +438 -0
- package/template/.orchestra/scripts/compact-diff.awk +45 -0
- package/template/.orchestra/stacks/README.md +81 -0
- package/template/.orchestra/stacks/_lib/common.sh +3095 -0
- package/template/.orchestra/stacks/_repo/setup.sh +1109 -0
- package/template/.orchestra/stacks/backend-hono/claude/commands/endpoint.md +13 -0
- package/template/.orchestra/stacks/backend-hono/claude/skills/api-endpoint/SKILL.md +111 -0
- package/template/.orchestra/stacks/backend-hono/claude/skills/testing/SKILL.md +75 -0
- package/template/.orchestra/stacks/backend-hono/setup.sh +5945 -0
- package/template/.orchestra/stacks/backend-hono/stack.md +195 -0
- package/template/.orchestra/stacks/mobile-android-native/claude/commands/component.md +13 -0
- package/template/.orchestra/stacks/mobile-android-native/claude/skills/design-component/SKILL.md +58 -0
- package/template/.orchestra/stacks/mobile-android-native/setup.sh +607 -0
- package/template/.orchestra/stacks/mobile-android-native/stack.md +138 -0
- package/template/.orchestra/stacks/mobile-expo/claude/commands/component.md +12 -0
- package/template/.orchestra/stacks/mobile-expo/claude/skills/design-component/SKILL.md +92 -0
- package/template/.orchestra/stacks/mobile-expo/setup.sh +470 -0
- package/template/.orchestra/stacks/mobile-expo/stack.md +141 -0
- package/template/.orchestra/stacks/mobile-ios-native/claude/commands/component.md +12 -0
- package/template/.orchestra/stacks/mobile-ios-native/claude/skills/design-component/SKILL.md +58 -0
- package/template/.orchestra/stacks/mobile-ios-native/setup.sh +468 -0
- package/template/.orchestra/stacks/mobile-ios-native/stack.md +130 -0
- package/template/.orchestra/stacks/web-nextjs/claude/commands/component.md +12 -0
- package/template/.orchestra/stacks/web-nextjs/claude/skills/design-component/SKILL.md +100 -0
- package/template/.orchestra/stacks/web-nextjs/claude/skills/design-tokens/SKILL.md +61 -0
- package/template/.orchestra/stacks/web-nextjs/setup.sh +128 -0
- package/template/.orchestra/stacks/web-nextjs/stack.md +170 -0
- package/template/.orchestra/stacks/web-vite-react/claude/commands/component.md +12 -0
- package/template/.orchestra/stacks/web-vite-react/claude/skills/design-component/SKILL.md +100 -0
- package/template/.orchestra/stacks/web-vite-react/claude/skills/design-tokens/SKILL.md +61 -0
- package/template/.orchestra/stacks/web-vite-react/setup.sh +185 -0
- package/template/.orchestra/stacks/web-vite-react/stack.md +177 -0
- package/template/.orchestra/trackers/github.sh +467 -0
- package/template/CLAUDE.md +54 -0
- package/template/agents/architect.md +83 -0
- package/template/agents/engineer-high.md +17 -0
- package/template/agents/engineer-low.md +17 -0
- package/template/agents/engineer-max.md +17 -0
- package/template/agents/engineer-medium.md +17 -0
- package/template/agents/engineer-xhigh.md +17 -0
- package/template/agents/lead.md +870 -0
- package/template/agents/milestone-reviewer.md +63 -0
- package/template/agents/orchestrator.md +105 -0
- package/template/agents/product-manager.md +438 -0
- package/template/agents/reviewer.md +301 -0
- package/template/agents/scaffolder.md +180 -0
- package/template/agents/tracker.md +202 -0
- package/template/commands/blueprint.md +23 -0
- package/template/commands/create-role.md +64 -0
- package/template/commands/export.md +45 -0
- package/template/commands/help.md +55 -0
- package/template/commands/hotfix.md +12 -0
- package/template/commands/orchestrator.md +12 -0
- package/template/commands/pm.md +18 -0
- package/template/commands/rewind.md +61 -0
- package/template/commands/setup.md +14 -0
- package/template/commands/start.md +29 -0
- package/template/commands/status.md +11 -0
- package/template/commands/sync.md +73 -0
- package/template/commands/verifier.md +53 -0
- package/template/hooks/audit-context.sh +153 -0
- package/template/hooks/enforce-role.sh +175 -0
- package/template/hooks/protect-system-files.sh +123 -0
- package/template/hooks/review-rounds.sh +172 -0
- package/template/rules/acceptance-check.orchestra.md +11 -0
- package/template/rules/analytics-kpi.orchestra.md +56 -0
- package/template/rules/code-standards.orchestra.md +34 -0
- package/template/rules/comments.orchestra.md +77 -0
- package/template/rules/commit-format.orchestra.md +20 -0
- package/template/rules/dependency-upgrade.orchestra.md +112 -0
- package/template/rules/design-parity.orchestra.md +170 -0
- package/template/rules/observability.orchestra.md +118 -0
- package/template/rules/performance.orchestra.md +186 -0
- package/template/rules/phase-limits.orchestra.md +3 -0
- package/template/rules/pull-request.orchestra.md +213 -0
- package/template/rules/role-boundaries.orchestra.md +117 -0
- package/template/rules/security.orchestra.md +106 -0
- package/template/rules/stuck-detection.orchestra.md +25 -0
- package/template/rules/testing-standards.orchestra.md +214 -0
- package/template/rules/tracker-authority.orchestra.md +190 -0
- package/template/rules/verification-gate.orchestra.md +56 -0
- package/template/skills/accessibility/SKILL.md +31 -0
- package/template/skills/android-testing/SKILL.md +112 -0
- package/template/skills/architecture/SKILL.md +175 -0
- package/template/skills/auth-setup/SKILL.md +105 -0
- package/template/skills/best-practices/SKILL.md +29 -0
- package/template/skills/code-optimizer/SKILL.md +27 -0
- package/template/skills/core-web-vitals/SKILL.md +32 -0
- package/template/skills/crud-api/SKILL.md +32 -0
- package/template/skills/debug/SKILL.md +28 -0
- package/template/skills/deployment/SKILL.md +104 -0
- package/template/skills/error-handling/SKILL.md +154 -0
- package/template/skills/frontend-design/SKILL.md +30 -0
- package/template/skills/fullstack-infrastructure/SKILL.md +108 -0
- package/template/skills/ios-testing/SKILL.md +100 -0
- package/template/skills/mobile-testing/SKILL.md +102 -0
- package/template/skills/observability/SKILL.md +91 -0
- package/template/skills/project-structure/SKILL.md +114 -0
- package/template/skills/push-notifications/SKILL.md +146 -0
- package/template/skills/react-best-practices/SKILL.md +31 -0
- package/template/skills/realtime/SKILL.md +146 -0
- package/template/skills/review/SKILL.md +82 -0
- package/template/skills/testing/SKILL.md +44 -0
- package/template/skills/web-quality-audit/SKILL.md +47 -0
- package/template/skills/web-testing/SKILL.md +120 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review
|
|
3
|
+
description: "Reviewing a diff — as the reviewer role, or self-review before submitting. Use for any phase that reviews code rather than writing it."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill: Review
|
|
7
|
+
|
|
8
|
+
## Review what the gate cannot
|
|
9
|
+
|
|
10
|
+
By the time a diff exists, a great deal has already been decided
|
|
11
|
+
mechanically. Re-checking any of it spends the only thing a reader has that
|
|
12
|
+
a script does not.
|
|
13
|
+
|
|
14
|
+
**Already enforced. Do not spend attention here:**
|
|
15
|
+
|
|
16
|
+
| Concern | Enforced by |
|
|
17
|
+
|---|---|
|
|
18
|
+
| Secrets, in the diff or anywhere in history | gitleaks |
|
|
19
|
+
| String-built SQL | `scripts/policy-check.mjs` |
|
|
20
|
+
| Empty or unreported `catch` | `scripts/policy-check.mjs` |
|
|
21
|
+
| `getByTestId` in a test | `scripts/policy-check.mjs` |
|
|
22
|
+
| A mocked database | `scripts/policy-check.mjs` |
|
|
23
|
+
| Unused imports, dead code, `console.log` | biome |
|
|
24
|
+
| Contrast, ARIA, missing labels | axe, in component tests and e2e |
|
|
25
|
+
| Coverage of the lines this change touched | the diff gate |
|
|
26
|
+
| Anything wrapping a dependency, at 100% | the seam gate |
|
|
27
|
+
| Bundle growth | the bundle ratchet |
|
|
28
|
+
| It compiles, bundles, boots | typecheck, build, e2e |
|
|
29
|
+
| A known critical vulnerability | `yarn npm audit` in CI |
|
|
30
|
+
|
|
31
|
+
If one of those is wrong the commit does not exist — the gate blocked it.
|
|
32
|
+
Reporting it anyway tells the author you did not know that.
|
|
33
|
+
|
|
34
|
+
## Yours alone
|
|
35
|
+
|
|
36
|
+
Every item here needs a reader.
|
|
37
|
+
|
|
38
|
+
- [ ] **It does what the phase asked.** Re-read the acceptance criteria
|
|
39
|
+
against the diff. Working code that solves a different problem is the
|
|
40
|
+
most expensive defect there is, and no gate detects it.
|
|
41
|
+
- [ ] **The error handling is meaningful, not merely present.** A check
|
|
42
|
+
proves the `catch` is not empty. Only a reader can tell whether the
|
|
43
|
+
user gets a correct outcome or the failure was made invisible.
|
|
44
|
+
- [ ] **The tests assert behaviour.** Coverage proves a line ran. Read the
|
|
45
|
+
assertions: a test that calls a function and checks nothing about what
|
|
46
|
+
it did passes every gate we have.
|
|
47
|
+
- [ ] **Authorization is on the route**, not in a helper a future route can
|
|
48
|
+
forget to call. Named as unmechanizable in
|
|
49
|
+
`.claude/rules/security.orchestra.md` — so it is yours.
|
|
50
|
+
- [ ] **No PII in logs, errors or analytics.** Redaction covers known keys;
|
|
51
|
+
a new field carrying a person's name is invisible to it.
|
|
52
|
+
- [ ] **Query shape.** N+1, a missing index, a transaction that should exist
|
|
53
|
+
and does not.
|
|
54
|
+
- [ ] **Readiness probes what it claims.** A new dependency without a probe
|
|
55
|
+
is a broken release that gets promoted.
|
|
56
|
+
- [ ] **The abstraction earns itself.** Extracted after the second
|
|
57
|
+
duplication, not before. Was a simpler alternative available?
|
|
58
|
+
- [ ] **Loading, empty and failure states exist** for anything a user waits
|
|
59
|
+
on.
|
|
60
|
+
- [ ] **Anything that will be wrong later.** A pinned version with no reason
|
|
61
|
+
written beside it, a TODO with no owner, a workaround presented as a
|
|
62
|
+
fix.
|
|
63
|
+
|
|
64
|
+
## Severity
|
|
65
|
+
|
|
66
|
+
Defined once, in `.claude/agents/reviewer.md` under Severity — Blocking,
|
|
67
|
+
Important, Suggestion, and which of them hold the pull request. Read it
|
|
68
|
+
there; a second copy here drifted from it before.
|
|
69
|
+
|
|
70
|
+
## Common mistakes
|
|
71
|
+
|
|
72
|
+
- Reviewing the diff without opening the file. Context-dependent bugs live
|
|
73
|
+
in the lines that did not change.
|
|
74
|
+
- Re-reporting something a gate already decided.
|
|
75
|
+
- Nitpicking style a formatter owns.
|
|
76
|
+
- A vague finding. Say what, where, and why.
|
|
77
|
+
|
|
78
|
+
## Never ask for a test to be loosened
|
|
79
|
+
|
|
80
|
+
Nor a threshold lowered, nor an ignore added. If a gate is wrong, that is a
|
|
81
|
+
finding **about the gate** — a change to `.orchestra/stacks/`, not to the
|
|
82
|
+
project under review.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: testing
|
|
3
|
+
description: "The working checklist for writing tests. Strategy lives in the testing-standards rule; each platform has its own skill. Use for any phase that writes or changes tests."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill: Testing
|
|
7
|
+
|
|
8
|
+
## When to Use
|
|
9
|
+
Phase involves writing tests or improving coverage. The strategy lives in
|
|
10
|
+
`.claude/rules/testing-standards.orchestra.md`; this is the working checklist.
|
|
11
|
+
|
|
12
|
+
## Checklist
|
|
13
|
+
- [ ] **Detect framework:** check package.json for vitest, jest, pytest — use the project's
|
|
14
|
+
- [ ] **Read existing tests:** match style, naming, and file organisation
|
|
15
|
+
- [ ] **Pick the right layer:** pure logic → unit. Anything touching I/O → integration through the real entry point
|
|
16
|
+
- [ ] **Real database, never a mocked driver:** a fake repository returns what you told it to and cannot tell you the query is wrong
|
|
17
|
+
- [ ] **Fake external services at the network boundary** (MSW or a stub server), never by mocking our own wrapper — the wrapper is the thing that breaks on a provider change
|
|
18
|
+
- [ ] **Happy path, edge cases, and failures:** empty, null, boundary values, and the error branch with its reason
|
|
19
|
+
- [ ] **Async behaviour:** resolve and reject, timeouts, ordering
|
|
20
|
+
- [ ] **One assertion per concept:** the test name states the scenario
|
|
21
|
+
- [ ] **Run them, then break the code and confirm they fail** — a test that has never failed has not been tested
|
|
22
|
+
- [ ] **Isolation:** each test creates its own data; no shared seed fixture, no ordering dependency
|
|
23
|
+
|
|
24
|
+
## Common Mistakes
|
|
25
|
+
- Mocking the database → you test the mock. Use a real one in a container.
|
|
26
|
+
- Mocking your own module instead of the network → the seam goes untested.
|
|
27
|
+
- Snapshot tests as coverage → a snapshot passes while a handler stops firing.
|
|
28
|
+
- Writing tests to move the coverage number → the gate has started doing harm; say so.
|
|
29
|
+
- Testing implementation details → assert behaviour, not internal calls.
|
|
30
|
+
- Imposing a new style on an existing project → match what is there.
|
|
31
|
+
|
|
32
|
+
## Related
|
|
33
|
+
|
|
34
|
+
Each platform has a different shape, and the differences are not stylistic —
|
|
35
|
+
they come from what the test runner can and cannot see.
|
|
36
|
+
|
|
37
|
+
- Web: `.claude/skills/web-testing/SKILL.md` — jsdom has no layout engine, so
|
|
38
|
+
component tests run in real Chromium.
|
|
39
|
+
- Mobile: `.claude/skills/mobile-testing/SKILL.md` — jest does not run React
|
|
40
|
+
Native; the device layer is not optional.
|
|
41
|
+
- iOS: `.claude/skills/ios-testing/SKILL.md` — a green unit suite does not
|
|
42
|
+
prove the app launches.
|
|
43
|
+
- Android: `.claude/skills/android-testing/SKILL.md` — a passing debug build
|
|
44
|
+
proves little about the release build.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: web-quality-audit
|
|
3
|
+
description: "End-to-end quality review of a web app — performance, accessibility, SEO, best practices. Use when auditing an existing app rather than building a feature."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill: Web Quality Audit
|
|
7
|
+
|
|
8
|
+
## When to Use
|
|
9
|
+
Phase involves comprehensive quality review of a web application — performance, accessibility, SEO, and best practices.
|
|
10
|
+
|
|
11
|
+
## Checklist
|
|
12
|
+
|
|
13
|
+
### Performance
|
|
14
|
+
- [ ] Core Web Vitals pass (LCP <= 2.5s, INP <= 200ms, CLS <= 0.1)
|
|
15
|
+
- [ ] Images compressed and properly sized (WebP/AVIF preferred)
|
|
16
|
+
- [ ] JavaScript minified and tree-shaken
|
|
17
|
+
- [ ] Critical CSS inlined, non-critical deferred
|
|
18
|
+
- [ ] Lazy loading for below-the-fold images and components
|
|
19
|
+
- [ ] Caching headers set for static assets (Cache-Control, ETag)
|
|
20
|
+
|
|
21
|
+
### Accessibility
|
|
22
|
+
- [ ] WCAG 2.1 AA compliant (run axe or similar audit)
|
|
23
|
+
- [ ] Keyboard navigation works for all interactive elements
|
|
24
|
+
- [ ] Screen reader tested (proper headings, landmarks, alt text)
|
|
25
|
+
- [ ] Color contrast ratios meet minimums
|
|
26
|
+
|
|
27
|
+
### SEO
|
|
28
|
+
- [ ] Unique `<title>` and `<meta name="description">` per page
|
|
29
|
+
- [ ] `robots.txt` present and correct
|
|
30
|
+
- [ ] Sitemap.xml generated and submitted
|
|
31
|
+
- [ ] Structured data (JSON-LD) for key content types
|
|
32
|
+
- [ ] Canonical URLs set for duplicate content
|
|
33
|
+
- [ ] Open Graph and Twitter Card meta tags present
|
|
34
|
+
|
|
35
|
+
### Best Practices
|
|
36
|
+
- [ ] HTTPS everywhere, no mixed content
|
|
37
|
+
- [ ] No vulnerable dependencies (`npm audit`)
|
|
38
|
+
- [ ] Error pages (404, 500) are user-friendly
|
|
39
|
+
- [ ] Console has no errors or warnings in production
|
|
40
|
+
- [ ] No deprecated APIs used
|
|
41
|
+
|
|
42
|
+
## Common Mistakes
|
|
43
|
+
- Optimizing only one metric → all four areas matter for real quality
|
|
44
|
+
- Ignoring SEO on SPAs → search engines need server-rendered content or prerendering
|
|
45
|
+
- No structured data → misses rich snippets in search results
|
|
46
|
+
- Performance testing only on fast networks → test on 3G/slow 4G too
|
|
47
|
+
- Missing error pages → users see raw error messages
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: web-testing
|
|
3
|
+
description: "Testing strategy for React web apps — Vite SPA and Next.js. Use for any phase that writes or changes tests in a web app, or that adds an e2e flow."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill: Web Testing
|
|
7
|
+
|
|
8
|
+
## The fact everything else follows from
|
|
9
|
+
|
|
10
|
+
**jsdom is not a browser.**
|
|
11
|
+
|
|
12
|
+
It has no layout engine. `getBoundingClientRect` returns zeros, nothing
|
|
13
|
+
scrolls, CSS is parsed but never applied, focus order is approximated, and
|
|
14
|
+
`:hover`, media queries and container queries do not exist. A component can
|
|
15
|
+
be invisible, unclickable, or overlapping another and every jsdom test still
|
|
16
|
+
passes.
|
|
17
|
+
|
|
18
|
+
So component tests run in **real Chromium** through Vitest browser mode.
|
|
19
|
+
That is already configured by the stack — do not replace it with jsdom
|
|
20
|
+
because a test is awkward. The awkwardness is usually the bug.
|
|
21
|
+
|
|
22
|
+
## The layers
|
|
23
|
+
|
|
24
|
+
| Layer | What belongs here | Runs in |
|
|
25
|
+
|---|---|---|
|
|
26
|
+
| Pure logic | Formatting, validation, reducers, date and money math — extracted **out** of components | Node |
|
|
27
|
+
| Component | Render, interact, assert behaviour and accessibility | **Real Chromium** |
|
|
28
|
+
| API seam (MSW) | Our own backend, faked at the network layer | Chromium |
|
|
29
|
+
| E2E (Playwright) | 3–5 journeys against the **built** app | Real browser |
|
|
30
|
+
| Build | `vite build` / `next build` | The gate |
|
|
31
|
+
|
|
32
|
+
## Query by role, never by test id
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
screen.getByRole("button", { name: "Save changes" }); // yes
|
|
36
|
+
screen.getByTestId("save-btn"); // no
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Testing Library resolves roles from the accessible tree. Query that way and
|
|
40
|
+
**a div-with-onClick fails the test** — accessibility stops being a review
|
|
41
|
+
checklist item and becomes something the suite enforces.
|
|
42
|
+
|
|
43
|
+
A `testID` proves a node exists. It proves nothing about whether a keyboard
|
|
44
|
+
or a screen reader can reach it.
|
|
45
|
+
|
|
46
|
+
Order of preference: role → label → text → `getByTestId` only for something
|
|
47
|
+
genuinely not user-visible.
|
|
48
|
+
|
|
49
|
+
## Assert accessibility, do not eyeball it
|
|
50
|
+
|
|
51
|
+
Querying by role already fails a test when a control has no accessible name.
|
|
52
|
+
axe covers what a role query cannot see — contrast, duplicate landmarks,
|
|
53
|
+
orphaned labels, invalid ARIA — and all of it is mechanical, so a machine
|
|
54
|
+
catches it every run instead of a human at review time.
|
|
55
|
+
|
|
56
|
+
The stack wires two levels, and they see different things:
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
// component test — the mounted subtree
|
|
60
|
+
import { expectNoA11yViolations } from "../test/a11y";
|
|
61
|
+
|
|
62
|
+
await expectNoA11yViolations(screen.container);
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
```ts
|
|
66
|
+
// e2e/a11y.spec.ts — the whole built page, already written for you
|
|
67
|
+
const results = await new AxeBuilder({ page }).analyze();
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Contrast against the real background, landmark structure and heading order
|
|
71
|
+
only exist on the full page. A component test cannot see any of them, which
|
|
72
|
+
is why both levels are there.
|
|
73
|
+
|
|
74
|
+
`region` and `page-has-heading-one` are disabled for component tests: a
|
|
75
|
+
mounted subtree legitimately has neither, and a rule that always fails
|
|
76
|
+
trains people to ignore the report.
|
|
77
|
+
|
|
78
|
+
See `.claude/skills/accessibility/SKILL.md` for what the rules mean.
|
|
79
|
+
|
|
80
|
+
## The workbench is the render target
|
|
81
|
+
|
|
82
|
+
`react-cosmos` fixtures are the same artefact used by design parity
|
|
83
|
+
(`.claude/rules/design-parity.orchestra.md`). Write the fixture once: the
|
|
84
|
+
component test renders it, and the parity check screenshots it.
|
|
85
|
+
|
|
86
|
+
A fixture renders deterministically. A live screen carries real data,
|
|
87
|
+
loading states and timing — differences that have nothing to do with the
|
|
88
|
+
component.
|
|
89
|
+
|
|
90
|
+
## E2E is about journeys, not components
|
|
91
|
+
|
|
92
|
+
Three to five, against the **built** app, never the dev server. A dev server
|
|
93
|
+
hides exactly what this layer exists to catch: a bad production bundle, a
|
|
94
|
+
missing environment variable, a route that only resolves in development.
|
|
95
|
+
|
|
96
|
+
`e2e/smoke.spec.ts` is written by the stack and asserts the app boots and
|
|
97
|
+
throws nothing on load. Add: sign in and survive a reload; the one flow the
|
|
98
|
+
product exists for; and that flow's failure path.
|
|
99
|
+
|
|
100
|
+
Each one costs a build and a browser. A suite nobody trusts is worse than
|
|
101
|
+
no suite.
|
|
102
|
+
|
|
103
|
+
## Never
|
|
104
|
+
|
|
105
|
+
- **Snapshot tests.** Enormous, unread, and "updated" reflexively. A
|
|
106
|
+
snapshot passes while the click handler stops firing.
|
|
107
|
+
- **jsdom**, for anything about layout, visibility or focus.
|
|
108
|
+
- Testing that the router routes, or that React re-renders. Assert that
|
|
109
|
+
pressing the control calls the thing with the right argument.
|
|
110
|
+
- Chasing the coverage number through page composition files. The value is
|
|
111
|
+
in the logic modules, the components, and the journeys.
|
|
112
|
+
|
|
113
|
+
## The build is part of the suite
|
|
114
|
+
|
|
115
|
+
`tsc --noEmit` accepts a Next.js app that fails `next build` on a
|
|
116
|
+
server/client boundary or a static-generation error. Neither tests nor lint
|
|
117
|
+
load the bundler.
|
|
118
|
+
|
|
119
|
+
The gate runs `build` for exactly this reason. When it fails, the fix is the
|
|
120
|
+
code — never a loosened config.
|