agentic-team 0.0.0-stage → 6.2.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 +189 -2
- package/bin/build-template.js +208 -0
- package/bin/index.js +1334 -0
- package/bin/platforms.js +510 -0
- package/package.json +41 -4
- package/template/.claude-plugin/plugin.json +10 -0
- package/template/.orchestra/README.md +391 -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 +293 -0
- package/template/.orchestra/roles/orchestrator.md +105 -0
- package/template/.orchestra/roles/product-manager.md +439 -0
- package/template/.orchestra/scripts/compact-diff.awk +45 -0
- package/template/.orchestra/scripts/context.mjs +373 -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 +1113 -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 +925 -0
- package/template/agents/milestone-reviewer.md +65 -0
- package/template/agents/orchestrator.md +105 -0
- package/template/agents/product-manager.md +439 -0
- package/template/agents/re-reviewer.md +25 -0
- package/template/agents/reviewer.md +303 -0
- package/template/agents/scaffolder.md +206 -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 +56 -0
- package/template/commands/hotfix.md +14 -0
- package/template/commands/orchestrator.md +12 -0
- package/template/commands/pm.md +18 -0
- package/template/commands/rewind.md +63 -0
- package/template/commands/setup.md +15 -0
- package/template/commands/start.md +29 -0
- package/template/commands/status.md +11 -0
- package/template/commands/sync.md +76 -0
- package/template/commands/verifier.md +53 -0
- package/template/hooks/audit-context.sh +166 -0
- package/template/hooks/enforce-role.sh +193 -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 +35 -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 +181 -0
- package/template/rules/observability.orchestra.md +121 -0
- package/template/rules/performance.orchestra.md +190 -0
- package/template/rules/phase-limits.orchestra.md +3 -0
- package/template/rules/pull-request.orchestra.md +218 -0
- package/template/rules/role-boundaries.orchestra.md +132 -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 +219 -0
- package/template/rules/tracker-authority.orchestra.md +198 -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 +45 -0
- package/template/skills/web-quality-audit/SKILL.md +47 -0
- package/template/skills/web-testing/SKILL.md +120 -0
|
@@ -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.
|