opencastle 0.32.12 → 0.32.13

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.
Files changed (110) hide show
  1. package/README.md +5 -3
  2. package/package.json +1 -1
  3. package/src/dashboard/dist/data/convoys/demo-api-v2.json +3 -3
  4. package/src/dashboard/dist/data/convoys/demo-auth-revamp.json +4 -4
  5. package/src/dashboard/dist/data/convoys/demo-dashboard-ui.json +6 -6
  6. package/src/dashboard/dist/data/convoys/demo-data-pipeline.json +3 -3
  7. package/src/dashboard/dist/data/convoys/demo-deploy-ci.json +1 -1
  8. package/src/dashboard/dist/data/convoys/demo-docs-update.json +7 -7
  9. package/src/dashboard/dist/data/convoys/demo-perf-opt.json +4 -4
  10. package/src/dashboard/node_modules/.vite/deps/_metadata.json +6 -6
  11. package/src/dashboard/public/data/convoys/demo-api-v2.json +3 -3
  12. package/src/dashboard/public/data/convoys/demo-auth-revamp.json +4 -4
  13. package/src/dashboard/public/data/convoys/demo-dashboard-ui.json +6 -6
  14. package/src/dashboard/public/data/convoys/demo-data-pipeline.json +3 -3
  15. package/src/dashboard/public/data/convoys/demo-deploy-ci.json +1 -1
  16. package/src/dashboard/public/data/convoys/demo-docs-update.json +7 -7
  17. package/src/dashboard/public/data/convoys/demo-perf-opt.json +4 -4
  18. package/src/orchestrator/customizations/stack/sanity-config.md +43 -0
  19. package/src/orchestrator/customizations/stack/supabase-config.md +53 -0
  20. package/src/orchestrator/plugins/astro/REFERENCE.md +5 -0
  21. package/src/orchestrator/plugins/astro/SKILL.md +22 -29
  22. package/src/orchestrator/plugins/chrome-devtools/REFERENCE.md +9 -0
  23. package/src/orchestrator/plugins/chrome-devtools/SKILL.md +10 -55
  24. package/src/orchestrator/plugins/contentful/REFERENCE.md +16 -0
  25. package/src/orchestrator/plugins/contentful/SKILL.md +69 -29
  26. package/src/orchestrator/plugins/convex/REFERENCE.md +9 -0
  27. package/src/orchestrator/plugins/convex/SKILL.md +13 -1
  28. package/src/orchestrator/plugins/cypress/REFERENCE.md +5 -0
  29. package/src/orchestrator/plugins/cypress/SKILL.md +29 -93
  30. package/src/orchestrator/plugins/figma/REFERENCE.md +18 -0
  31. package/src/orchestrator/plugins/figma/SKILL.md +41 -66
  32. package/src/orchestrator/plugins/jira/REFERENCE.md +9 -0
  33. package/src/orchestrator/plugins/jira/SKILL.md +26 -114
  34. package/src/orchestrator/plugins/linear/SKILL.md +42 -109
  35. package/src/orchestrator/plugins/netlify/REFERENCE.md +33 -0
  36. package/src/orchestrator/plugins/netlify/SKILL.md +34 -64
  37. package/src/orchestrator/plugins/nextjs/REFERENCE.md +73 -0
  38. package/src/orchestrator/plugins/nextjs/SKILL.md +49 -138
  39. package/src/orchestrator/plugins/notion/SKILL.md +26 -168
  40. package/src/orchestrator/plugins/notion/TEMPLATES.md +88 -0
  41. package/src/orchestrator/plugins/nx/REFERENCE.md +10 -0
  42. package/src/orchestrator/plugins/nx/SKILL.md +12 -12
  43. package/src/orchestrator/plugins/playwright/REFERENCE.md +12 -0
  44. package/src/orchestrator/plugins/playwright/SKILL.md +33 -98
  45. package/src/orchestrator/plugins/prisma/REFERENCE.md +42 -0
  46. package/src/orchestrator/plugins/prisma/SKILL.md +18 -68
  47. package/src/orchestrator/plugins/resend/REFERENCE.md +61 -0
  48. package/src/orchestrator/plugins/resend/SKILL.md +23 -137
  49. package/src/orchestrator/plugins/sanity/SKILL.md +50 -3
  50. package/src/orchestrator/plugins/slack/REFERENCE.md +24 -0
  51. package/src/orchestrator/plugins/slack/SKILL.md +36 -111
  52. package/src/orchestrator/plugins/strapi/REFERENCE.md +35 -0
  53. package/src/orchestrator/plugins/strapi/SKILL.md +60 -24
  54. package/src/orchestrator/plugins/supabase/REFERENCE.md +9 -0
  55. package/src/orchestrator/plugins/supabase/SKILL.md +44 -16
  56. package/src/orchestrator/plugins/teams/REFERENCE.md +36 -0
  57. package/src/orchestrator/plugins/teams/SKILL.md +35 -85
  58. package/src/orchestrator/plugins/trello/REFERENCE.md +9 -0
  59. package/src/orchestrator/plugins/trello/SKILL.md +25 -97
  60. package/src/orchestrator/plugins/turborepo/REFERENCE.md +9 -0
  61. package/src/orchestrator/plugins/turborepo/SKILL.md +13 -1
  62. package/src/orchestrator/plugins/vercel/SKILL.md +45 -52
  63. package/src/orchestrator/plugins/vitest/SKILL.md +10 -14
  64. package/src/orchestrator/prompts/create-skill.prompt.md +62 -20
  65. package/src/orchestrator/skills/accessibility-standards/REFERENCE.md +34 -0
  66. package/src/orchestrator/skills/accessibility-standards/SKILL.md +6 -3
  67. package/src/orchestrator/skills/agent-hooks/HOOKS-REFERENCE.md +48 -0
  68. package/src/orchestrator/skills/agent-hooks/SKILL.md +41 -65
  69. package/src/orchestrator/skills/agent-memory/KNOWLEDGE-GRAPH.md +49 -0
  70. package/src/orchestrator/skills/agent-memory/SKILL.md +30 -67
  71. package/src/orchestrator/skills/api-patterns/SKILL.md +29 -1
  72. package/src/orchestrator/skills/code-commenting/SKILL.md +1 -1
  73. package/src/orchestrator/skills/context-map/REFERENCE.md +70 -0
  74. package/src/orchestrator/skills/context-map/SKILL.md +28 -55
  75. package/src/orchestrator/skills/data-engineering/REFERENCE.md +55 -0
  76. package/src/orchestrator/skills/data-engineering/SKILL.md +40 -34
  77. package/src/orchestrator/skills/decomposition/REFERENCE.md +28 -0
  78. package/src/orchestrator/skills/decomposition/SKILL.md +15 -30
  79. package/src/orchestrator/skills/deployment-infrastructure/SKILL.md +31 -65
  80. package/src/orchestrator/skills/documentation-standards/SKILL.md +31 -50
  81. package/src/orchestrator/skills/documentation-standards/WRITING-GUIDE.md +39 -0
  82. package/src/orchestrator/skills/fast-review/REFERENCE.md +30 -0
  83. package/src/orchestrator/skills/fast-review/SKILL.md +11 -31
  84. package/src/orchestrator/skills/frontend-design/COMPONENTS.md +113 -0
  85. package/src/orchestrator/skills/frontend-design/REFERENCE.md +36 -0
  86. package/src/orchestrator/skills/frontend-design/SKILL.md +36 -85
  87. package/src/orchestrator/skills/git-workflow/SKILL.md +1 -1
  88. package/src/orchestrator/skills/memory-merger/REFERENCE.md +20 -0
  89. package/src/orchestrator/skills/memory-merger/SKILL.md +29 -38
  90. package/src/orchestrator/skills/observability-logging/SKILL.md +5 -12
  91. package/src/orchestrator/skills/orchestration-protocols/REFERENCE.md +42 -0
  92. package/src/orchestrator/skills/orchestration-protocols/SKILL.md +54 -41
  93. package/src/orchestrator/skills/panel-majority-vote/REFERENCE.md +55 -0
  94. package/src/orchestrator/skills/panel-majority-vote/SKILL.md +30 -75
  95. package/src/orchestrator/skills/performance-optimization/SKILL.md +41 -1
  96. package/src/orchestrator/skills/project-consistency/SKILL.md +50 -89
  97. package/src/orchestrator/skills/project-consistency/TEMPLATES.md +39 -0
  98. package/src/orchestrator/skills/react-development/REFERENCE.md +7 -0
  99. package/src/orchestrator/skills/react-development/SKILL.md +50 -42
  100. package/src/orchestrator/skills/security-hardening/SKILL.md +88 -1
  101. package/src/orchestrator/skills/self-improvement/LESSON-CATEGORIES.md +36 -0
  102. package/src/orchestrator/skills/self-improvement/SKILL.md +19 -25
  103. package/src/orchestrator/skills/seo-patterns/REFERENCE.md +54 -0
  104. package/src/orchestrator/skills/seo-patterns/SKILL.md +20 -88
  105. package/src/orchestrator/skills/session-checkpoints/CHECKPOINT-TEMPLATE.md +58 -0
  106. package/src/orchestrator/skills/session-checkpoints/SKILL.md +34 -58
  107. package/src/orchestrator/skills/team-lead-reference/SKILL.md +37 -30
  108. package/src/orchestrator/skills/testing-workflow/SKILL.md +55 -2
  109. package/src/orchestrator/skills/validation-gates/REFERENCE.md +50 -0
  110. package/src/orchestrator/skills/validation-gates/SKILL.md +39 -35
@@ -1,21 +1,31 @@
1
1
  ---
2
2
  name: team-lead-reference
3
- description: "Reference data for Team Lead orchestration — model routing, pre-delegation checks, cost tracking template, and DLQ format. Load when starting a delegation session."
3
+ description: "Provides model routing rules, validates delegation prerequisites, supplies cost tracking templates, and defines dead-letter queue formats for Team Lead orchestration. Load when assigning tasks to agents, choosing model tiers, starting a delegation session, running a multi-agent workflow, delegating work, choosing which model to use, or assigning tasks."
4
4
  ---
5
5
 
6
6
  # Team Lead Reference
7
7
 
8
+ ## Delegation Sequence
9
+
10
+ 1. **Score** task complexity (table below) → determines tier
11
+ 2. **Route** to model tier via Cost-Aware Routing
12
+ 3. **Deepen** plan if 3+ subtasks (Deepen-Plan Protocol)
13
+ 4. **Check** pre-delegation policy (5-point checklist below)
14
+ 5. **Delegate** using Compact Delegation Envelope
15
+ 6. **Handle** output per Status Handling table
16
+ 7. **Log** via **observability-logging** skill
17
+
8
18
  For the specialist agent registry and model assignments, see [agent-registry.md](../../.opencastle/agents/agent-registry.md).
9
19
 
10
20
  ## Cost-Aware Model Routing
11
21
 
12
- | Tier | Cost | Use For |
13
- |------|------|---------|
14
- | **Premium** | $$$$ | Team Lead orchestration, highest-stakes decisions |
15
- | **Quality** | $$$ | Feature implementation, UI/frontend, security, architecture, complex reasoning |
16
- | **Standard** | $$ | Large-scale analysis, schema design, cost-efficient coding, repo exploration |
17
- | **Fast** | $$ | Terminal-heavy tasks, E2E tests, data pipelines, agentic workflows |
18
- | **Economy** | $ | Docs, simple config, formatting, boilerplate |
22
+ | Tier | Use For |
23
+ |------|---------|
24
+ | **Premium** | Team Lead orchestration, highest-stakes decisions |
25
+ | **Quality** | Feature implementation, UI/frontend, security, architecture, complex reasoning |
26
+ | **Standard** | Large-scale analysis, schema design, cost-efficient coding, repo exploration |
27
+ | **Fast** | Terminal-heavy tasks, E2E tests, data pipelines, agentic workflows |
28
+ | **Economy** | Docs, simple config, formatting, boilerplate |
19
29
 
20
30
  **Selection:** Default to agent's assigned tier. Downgrade pure docs/config → Economy. Upgrade security/architecture ambiguity → Quality/Premium. Never Premium/Quality for boilerplate. 3+ parallel agents → prefer Economy/Fast/Standard.
21
31
 
@@ -61,16 +71,21 @@ For the specialist agent registry and model assignments, see [agent-registry.md]
61
71
 
62
72
  | Status | Action |
63
73
  |--------|--------|
64
- | Complete | All AC addressed → fast review |
65
- | Complete with concerns | Resolve correctness/scope before review |
66
- | Needs context | Provide info, re-dispatch same agent |
67
- | Blocked | Provide context/upgrade model/escalate; never re-dispatch unchanged |
74
+ | Complete | Fast review |
75
+ | Complete with concerns | Resolve before review |
76
+ | Needs context | Provide info; re-dispatch |
77
+ | Blocked | Upgrade model/escalate; never re-dispatch unchanged |
68
78
 
69
79
  ## Pre-Delegation Policy Checks
70
80
 
71
- See Team Lead agent § Pre-Delegation Checks for the mandatory 5-point checklist.
72
- - **Feature work** adds: (6) Known issues reviewed, (7) Architecture docs read, (8) Existing code searched.
73
- - **High-risk work** adds: (9) Panel review planned, (10) Rollback path identified.
81
+ 1. Tracker issue exists for this task
82
+ 2. File partition is clean (no overlap with parallel agents)
83
+ 3. All dependency tasks are Done
84
+ 4. Delegation prompt has file paths + acceptance criteria
85
+ 5. Self-improvement reminder included (`Read LESSONS-LEARNED.md first`)
86
+
87
+ **Feature work** adds: (6) Known issues reviewed, (7) Architecture docs read, (8) Existing code searched.
88
+ **High-risk work** adds: (9) Panel review planned, (10) Rollback path identified.
74
89
 
75
90
  ## Compact Delegation Envelope
76
91
 
@@ -104,22 +119,14 @@ For common failure modes and recovery procedures, load the **orchestration-proto
104
119
 
105
120
  ## Dispute Protocol
106
121
 
107
- | Scenario | Action |
108
- |----------|--------|
109
- | Tool error / timeout / MCP failure | DLQ entry |
110
- | Scope creep | DLQ entry + redirect |
111
- | Agent fails 2+ times (simple) | DLQ entry |
112
- | Panel 3x BLOCK / agent-reviewer disagreement / criteria contradictions / no convergence / needs human | Dispute record |
113
-
114
- Create in `.opencastle/DISPUTES.md` (inspired by [Steroids CLI](https://github.com/UnlikeOtherAI/steroids-cli)):
122
+ Triggers: Panel BLOCK, agent-reviewer disagreement, criteria contradictions, no convergence, needs human input.
115
123
 
116
- 1. Number (`DSP-XXX`) and set priority (critical/high/medium/low)
117
- 2. Document both perspectives with file/code references
118
- 3. Build attempt history with one-line verdict summaries
119
- 4. Present ≥2 options with rationale/risk; note recommended action
120
- 5. Link panel reports, review logs, changed files, DLQ entries
121
- 6. Log with **observability-logging** dispute command; add ID to tracker and Index
124
+ Create in `.opencastle/DISPUTES.md`:
125
+ 1. Number (`DSP-XXX`), set priority, document both perspectives with file references
126
+ 2. Build attempt history; present ≥2 options with rationale/risk
127
+ 3. Link panel reports, DLQ entries, changed files
128
+ 4. Log with **observability-logging** dispute command
122
129
 
123
- **After human resolution:** Set `Status` → `resolved`/`deferred`. Record chosen option. Resolved → re-delegate with decision as explicit constraint. Deferredcreate follow-up issue. Log in `events.ndjson`.
130
+ **After resolution:** `resolved` → re-delegate with decision as constraint. `deferred` → follow-up issue.
124
131
 
125
132
 
@@ -1,10 +1,18 @@
1
1
  ---
2
2
  name: testing-workflow
3
- description: "Comprehensive testing workflow including test planning, unit/integration/E2E testing patterns, coverage requirements, and common testing mistakes. Use when writing tests, planning test strategies, or validating feature completeness."
3
+ description: "Generates test plans, writes unit/integration/E2E test files, identifies coverage gaps, and flags common testing anti-patterns. Use when writing tests, creating test suites, planning test strategies, mocking dependencies, measuring code coverage, or test planning."
4
4
  ---
5
5
 
6
6
  # Testing Workflow
7
7
 
8
+ ## Workflow
9
+
10
+ 1. **Plan** — Write a test plan using the Pre-Implementation categories below.
11
+ 2. **Implement** — Write unit/integration tests; run and verify passing.
12
+ 3. **E2E** — Run E2E tests in browser via the **e2e-testing** capability slot.
13
+ 4. **Validate** — Run the Post-Implementation Checklist.
14
+ 5. **Fix loop** — If any step fails → fix → re-run from step 2.
15
+
8
16
  ## Core Rules
9
17
 
10
18
  - Validate every feature: happy paths, edge cases, error conditions, interactions.
@@ -63,4 +71,49 @@ Suite files: see `.opencastle/project.instructions.md`.
63
71
 
64
72
  ## Commands
65
73
 
66
- Resolve exact commands via the **codebase-tool** skill (run tests, run with coverage, update snapshots, run affected only).
74
+ ```sh
75
+ # Unit / integration
76
+ npx vitest run --coverage # all tests + coverage
77
+ npx vitest run src/utils.test.ts # single file
78
+
79
+ # E2E (Playwright)
80
+ npx playwright test # all E2E suites
81
+ npx playwright test --ui # interactive mode
82
+ ```
83
+
84
+ ```ts
85
+ // Unit test with mock
86
+ import { describe, it, expect, vi } from 'vitest';
87
+ import { fetchItems } from './api';
88
+
89
+ describe('fetchItems', () => {
90
+ it('returns filtered results', async () => {
91
+ vi.spyOn(global, 'fetch').mockResolvedValue(
92
+ new Response(JSON.stringify([{ id: 1, name: 'test' }]))
93
+ );
94
+ const items = await fetchItems({ category: 'active' });
95
+ expect(items).toHaveLength(1);
96
+ expect(fetch).toHaveBeenCalledWith(expect.stringContaining('category=active'));
97
+ });
98
+ });
99
+ ```
100
+
101
+ ```ts
102
+ // E2E test (Playwright)
103
+ import { test, expect } from '@playwright/test';
104
+
105
+ test('filter updates results and URL', async ({ page }) => {
106
+ await page.goto('/items');
107
+ await page.getByRole('combobox', { name: 'Category' }).selectOption('active');
108
+ await expect(page).toHaveURL(/category=active/);
109
+ await expect(page.getByRole('listitem')).not.toHaveCount(0);
110
+ });
111
+ ```
112
+
113
+ ## References
114
+
115
+ | Resource | Purpose |
116
+ |----------|--------|
117
+ | **browser-testing** skill | Chrome DevTools automation for E2E |
118
+ | **validation-gates** Gate 3 | Responsive breakpoint checks |
119
+ | `project.instructions.md` | Suite files, project-specific test config |
@@ -0,0 +1,50 @@
1
+ > Parent: [SKILL.md](./SKILL.md)
2
+
3
+ # Validation Gates Reference
4
+
5
+ Extended checklists and options for validation gates.
6
+
7
+ ## Gate 4: Full Dependency Audit Checklist
8
+
9
+ | Check | Tool / Command | Pass Criteria | On Failure |
10
+ |-------|---------------|---------------|------------|
11
+ | Vulnerability | `npm audit --audit-level=moderate` | No new high/critical | BLOCK — use patched version or alternative |
12
+ | Bundle size | `npx source-map-explorer dist/*.js` | Frontend pkgs ≤50KB gzipped | SHOULD-FIX; blocking if >200KB |
13
+ | License | `npx license-checker --onlyAllow 'MIT;ISC;BSD-2-Clause;BSD-3-Clause;Apache-2.0'` | No copyleft in prod deps | BLOCK — remove or replace |
14
+ | Duplicates | `npx npm-dedupe --check` or inspect lockfile | No duplicate major versions of same pkg | SHOULD-FIX |
15
+ | Maintenance | Check npm page / GitHub | Last publish <18 months; >100 weekly downloads | Evaluate alternatives |
16
+ | Peer deps | `npm ls --depth=0` | No unmet peer dependencies | Fix before merge |
17
+ | Type coverage | `npx @arethetypeswrong/cli <pkg>` | No `false` CJS/ESM resolution | SHOULD-FIX for new deps |
18
+
19
+ ## Gate 7: Browser Testing Options
20
+
21
+ ### Viewport Presets
22
+
23
+ | Preset | Width × Height |
24
+ |--------|---------------|
25
+ | `mobile` | 375 × 812 |
26
+ | `tablet` | 768 × 1024 |
27
+ | `desktop` | 1440 × 900 |
28
+
29
+ ### MCP Payload Options
30
+
31
+ ```json
32
+ {
33
+ "tool": "browser-testing/capture_screenshot",
34
+ "url": "http://localhost:3000/page",
35
+ "viewports": ["mobile", "tablet", "desktop"],
36
+ "wait_selector": ".content-loaded",
37
+ "auth": { "cookie": "session=abc123" },
38
+ "full_page": true
39
+ }
40
+ ```
41
+
42
+ ### Console Error Check
43
+
44
+ ```json
45
+ {
46
+ "tool": "browser-testing/evaluate_script",
47
+ "url": "http://localhost:3000",
48
+ "script": "window.__console_errors || []"
49
+ }
50
+ ```
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: validation-gates
3
- description: "Shared validation gates for all orchestration workflows — secret scanning, deterministic checks, blast radius analysis, dependency auditing, browser testing, cache management, regression checks, and final smoke tests. Referenced by prompt templates to maintain single source of truth."
3
+ description: "Defines 10 sequential validation gates: secret scanning, lint/test/build checks, blast radius analysis, dependency auditing, browser testing, cache management, regression checks, and smoke tests. Use when running pre-deploy validation or CI checks, CI/CD pipelines, deployment pipeline validation, pre-merge checks, continuous integration, or pull request validation."
4
4
  ---
5
5
 
6
6
  # Validation Gates
@@ -24,10 +24,18 @@ description: "Shared validation gates for all orchestration workflows — secret
24
24
 
25
25
  Scan every diff **before** any other gate.
26
26
 
27
+ Example tool: `gitleaks detect --source . --verbosity warn` (or CI equivalent) — fail on findings matching secrets rules.
28
+
27
29
  ## Gate 2: Deterministic Checks
28
30
 
29
31
  Run for every affected project (resolve exact commands via the **codebase-tool** skill): lint (with auto-fix), test, build. All must pass with zero errors.
30
32
 
33
+ Example (project with npm scripts):
34
+
35
+ ```bash
36
+ npm run lint && npm test --silent && npm run build
37
+ ```
38
+
31
39
  ## Gate 3: Blast Radius Check
32
40
 
33
41
  | Metric | Normal | Warning | Escalate |
@@ -36,66 +44,62 @@ Run for every affected project (resolve exact commands via the **codebase-tool**
36
44
  | Files changed | ≤5 | 6–10 | >10 |
37
45
  | Projects affected | ≤1 | 2 | >2 |
38
46
 
39
- - **Normal** — proceed to Gate 4
40
- - **Warning** — log in delegation record; investigate partition drift if unexpected
41
- - **Escalate** — STOP. Verify partition; split or revert; mandatory fast review (no auto-PASS)
47
+ - **Normal** — proceed
48
+ - **Warning** — log; investigate partition drift
49
+ - **Escalate** — STOP; verify partition; split or revert; no auto-PASS
42
50
 
43
- **Sensitive files** (always Warning regardless of line count): auth/middleware (`middleware.ts`, `auth.ts`, `**/auth/**`), DB migrations/RLS, security headers/CSP (`next.config.*`, `vercel.json`), env schemas (`.env.example`, `env.ts`), CI/CD (`.github/workflows/**`), package configs (`package.json`, lockfiles) — also triggers Gate 4.
51
+ **Sensitive files** (always Warning): `**/auth/**`, DB migrations, `next.config.*`, `.env*`, `.github/workflows/**`, lockfiles — also triggers Gate 4.
44
52
 
45
53
  ## Gate 4: Dependency Audit
46
54
 
47
55
  > Runs only when `package.json`, `yarn.lock`, `package-lock.json`, `pnpm-lock.yaml`, or similar lockfiles are modified.
48
56
 
49
- | Check | Tool | Pass Criteria | On Failure |
50
- |-------|------|---------------|------------|
51
- | Vulnerability | `npm audit` | No new high/critical | BLOCK — use patched version or alternative |
52
- | License | | MIT, Apache-2.0, BSD-*, ISC | Flag for human review (non-blocking) |
53
- | Bundle size | — | Frontend pkgs ≤50KB gzipped | SHOULD-FIX; blocking if >200KB |
54
- | Duplicates | — | No overlap with existing deps | SHOULD-FIX |
55
- | Maintenance | — | Updated <2yr, ≥100 weekly DLs | Flag |
57
+ | Check | Tool / Example Command | Pass Criteria | On Failure |
58
+ |-------|-------------------------|---------------|------------|
59
+ | Vulnerability | `npm audit --audit-level=moderate` | No new high/critical | BLOCK — use patched version or alternative |
60
+ | Bundle size | `npx source-map-explorer dist/*.js` or `npx bundlesize` | Frontend pkgs ≤50KB gzipped (project policy) | SHOULD-FIX; blocking if >200KB |
56
61
 
57
- ## Gate 5: Fast Review
62
+ See [REFERENCE.md](REFERENCE.md) for the full dependency-audit checklist (license, duplicates, maintenance, and additional checks).
58
63
 
59
- > **HARD GATE.** Every delegation must pass. Spawn a reviewer sub-agent; PASS → proceed; FAIL → re-delegate (up to 2 retries); 3× FAIL → Gate 9 panel. Load **fast-review** skill.
60
-
61
- **Auto-PASS** (skip reviewer): pure research with no code changes; only `.md` files modified; all deterministic gates passed AND ≤10 lines across ≤2 files AND no sensitive files touched.
64
+ ## Gate 5: Fast Review
62
65
 
63
- > **Sensitive file override:** Sensitive files (Gate 3 list) never get auto-PASS, even for 1-line changes.
66
+ Spawn reviewer sub-agent (load **fast-review** skill). PASS proceed; FAIL → re-delegate (max 2); 3× FAIL Gate 9. Auto-PASS rules: see **fast-review** skill.
64
67
 
65
68
  ## Gate 6: Cache Clearing
66
69
 
67
- Clear framework and task runner caches before starting the dev server. See **codebase-tool** skill.
68
-
70
+ ```bash
71
+ rm -rf node_modules/.cache .next/cache .astro/ dist/
72
+ ```
69
73
  ## Gate 7: Browser Testing
70
74
 
71
- > **HARD GATE:** UI changes are NOT done without screenshots in Chrome proving the feature works.
75
+ UI changes require Chrome screenshots. Start dev server verify ACs responsive breakpoints capture screenshots. Load **browser-testing** skill.
72
76
 
73
- 1. Start dev server (see **codebase-tool** skill)
74
- 2. Verify all acceptance-criteria items render and behave correctly
75
- 3. Test responsive breakpoints; verify empty, error, and loading states
76
- 4. Capture screenshots of key states (REQUIRED)
77
+ ```json
78
+ { "tool": "browser-testing/capture_screenshot", "url": "http://localhost:3000", "viewports": ["mobile", "desktop"] }
79
+ ```
77
80
 
78
- Load the **browser-testing** skill for Chrome MCP commands, breakpoints, and reporting format.
81
+ Additional options: see [REFERENCE.md](REFERENCE.md).
79
82
 
80
83
  ## Gate 8: Regression Testing
81
84
 
82
- 1. Run full test suite for all affected projects
83
- 2. Browser-test adjacent pages; verify navigation, routing, and back-button
84
- 3. Check shared components in all consuming apps if a shared library changed
85
+ 1. `npm test -- --runInBand` for all affected projects
86
+ 2. Browser-test adjacent pages (navigation, routing, back-button). Identify adjacent pages by searching for route imports or links to the changed path (e.g., `rg "href=\"/changed-path|import .*from '@/components/changed'"`).
87
+ 3. Check consuming apps / packages that import the changed files: search the repo for the component or package name (e.g., `rg "from '@/components/PriceRange'|@my-org/ui-package"`) and run their tests or quick smoke builds.
85
88
 
86
89
  ## Gate 9: Panel Review
87
90
 
88
- Use the **panel-majority-vote** skill for: security-sensitive changes, DB migrations, architecture decisions/large refactors, complex business logic without comprehensive tests.
91
+ Load **panel-majority-vote** skill — spawns 3 isolated reviewers, majority (2/3) wins. Use for: security-sensitive changes, DB migrations, architecture decisions.
89
92
 
90
- On BLOCK: extract MUST-FIX items, re-delegate, re-run panel. Max 3 attempts, then escalate to Architect.
93
+ ```js
94
+ runSubagent({ agentName: 'Reviewer', prompt: `Panel review 1/3: ${criteria}` });
95
+ ```
91
96
 
92
97
  ## Gate 10: Final Smoke Test
93
98
 
94
99
  > Runs once after ALL tasks are Done.
95
100
 
96
- 1. Full build + full test suite from clean state
97
- 2. End-to-end browser walkthrough (loading, empty, populated, error states, transitions)
98
- 3. Cross-task integration check
99
- 4. Final responsive sweep (if UI)
101
+ ```bash
102
+ npm run build && npm test && npx playwright test
103
+ ```
100
104
 
101
- **Skip for:** non-UI with comprehensive tests, or single-task features (Gate 8 covers those). On failure: re-delegate the specific failing integration only.
105
+ Full build + test from clean state → E2E browser walkthrough → cross-task integration check responsive sweep (if UI). On failure: re-delegate the specific failing integration only.