@seanyao/roll 3.610.1 → 3.610.2

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 (73) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +5 -5
  3. package/dist/roll.mjs +9115 -11282
  4. package/package.json +3 -1
  5. package/skills/README.md +14 -1
  6. package/skills/docs/skill-authoring.md +66 -0
  7. package/skills/reports/skill-audit-summary.md +53 -0
  8. package/skills/roll-.changelog/SKILL.md +25 -443
  9. package/skills/roll-.changelog/references/full-contract.md +462 -0
  10. package/skills/roll-.clarify/SKILL.md +6 -4
  11. package/skills/roll-.dream/SKILL.md +26 -353
  12. package/skills/roll-.dream/references/full-contract.md +365 -0
  13. package/skills/roll-.echo/SKILL.md +6 -4
  14. package/skills/roll-.qa/SKILL.md +25 -236
  15. package/skills/roll-.qa/references/full-contract.md +256 -0
  16. package/skills/roll-.review/SKILL.md +6 -2
  17. package/skills/roll-brief/SKILL.md +6 -8
  18. package/skills/roll-build/SKILL.md +28 -864
  19. package/skills/roll-build/references/full-contract.md +883 -0
  20. package/skills/roll-debug/SKILL.md +26 -585
  21. package/skills/roll-debug/references/full-contract.md +607 -0
  22. package/skills/roll-design/SKILL.md +28 -903
  23. package/skills/roll-design/references/full-contract.md +923 -0
  24. package/skills/roll-doc/SKILL.md +25 -574
  25. package/skills/roll-doc/references/full-contract.md +594 -0
  26. package/skills/roll-doctor/SKILL.md +21 -2
  27. package/skills/roll-fix/SKILL.md +28 -621
  28. package/skills/roll-fix/references/full-contract.md +640 -0
  29. package/skills/roll-idea/SKILL.md +6 -2
  30. package/skills/roll-loop/SKILL.md +27 -543
  31. package/skills/roll-loop/references/full-contract.md +555 -0
  32. package/skills/roll-notes/SKILL.md +6 -2
  33. package/skills/roll-onboard/SKILL.md +6 -2
  34. package/skills/roll-peer/SKILL.md +27 -316
  35. package/skills/roll-peer/references/full-contract.md +329 -0
  36. package/skills/roll-propose/SKILL.md +6 -8
  37. package/skills/roll-review-pr/SKILL.md +6 -2
  38. package/skills/roll-sentinel/SKILL.md +26 -344
  39. package/skills/roll-sentinel/references/full-contract.md +363 -0
  40. package/skills/roll-spar/SKILL.md +27 -269
  41. package/skills/roll-spar/references/full-contract.md +288 -0
  42. package/skills/route-cases/skills.json +235 -0
  43. package/skills/scripts/audit-skills.mjs +272 -0
  44. package/skills/scripts/test-audit-skills.mjs +39 -0
  45. package/skills/tests/fixtures/skill-audit/block-skill/SKILL.md +12 -0
  46. package/skills/tests/fixtures/skill-audit/minimal-skill/SKILL.md +8 -0
  47. package/skills/tests/fixtures/skill-audit/quoted-skill/SKILL.md +10 -0
  48. package/skills/tests/fixtures/skill-audit/route-cases.json +21 -0
  49. package/skills/tests/fixtures/skill-audit/spoke-skill/SKILL.md +12 -0
  50. package/skills/tests/fixtures/skill-audit/spoke-skill/references/runbook.md +3 -0
  51. package/lib/i18n/slides.sh +0 -3
  52. package/lib/i18n/slides_build.sh +0 -38
  53. package/lib/i18n/slides_delete.sh +0 -19
  54. package/lib/i18n/slides_list.sh +0 -14
  55. package/lib/i18n/slides_logs.sh +0 -12
  56. package/lib/i18n/slides_new.sh +0 -15
  57. package/lib/i18n/slides_preview.sh +0 -14
  58. package/lib/i18n/slides_templates.sh +0 -7
  59. package/lib/slides/components/README.md +0 -123
  60. package/lib/slides/components/cards-2.html +0 -9
  61. package/lib/slides/components/cards-3.html +0 -9
  62. package/lib/slides/components/cards-4.html +0 -9
  63. package/lib/slides/components/compare.html +0 -22
  64. package/lib/slides/components/highlight.html +0 -9
  65. package/lib/slides/components/pipeline.html +0 -12
  66. package/lib/slides/components/plain.html +0 -7
  67. package/lib/slides/components/quote.html +0 -4
  68. package/lib/slides/components/timeline.html +0 -9
  69. package/lib/slides/templates/introduction-v3.html +0 -571
  70. package/lib/slides/templates/pitch.html +0 -0
  71. package/skills/roll-deck/SKILL.md +0 -296
  72. /package/skills/roll-debug/{injectable-bb.js → assets/injectable-bb.js} +0 -0
  73. /package/skills/roll-design/{ENGINEERING_CHECKLIST.md → references/engineering-checklist.md} +0 -0
@@ -0,0 +1,256 @@
1
+ # Full Contract Reference
2
+
3
+ This file preserves the detailed contract extracted from SKILL.md. Read it when the hub points here for exact workflow steps, templates, rubrics, or recovery branches.
4
+
5
+ ---
6
+
7
+ # QA Cover
8
+
9
+ This is a **reference skill** used by `roll-build` and `roll-fix` for quality assurance and test coverage.
10
+
11
+ ## When to Apply
12
+
13
+ Any product with a user interface (Web, Desktop, Mobile) must follow these testing standards.
14
+
15
+ ## When Not to Use
16
+
17
+ - Non-UI backends (APIs, CLI tools, data pipelines) — use project-specific test frameworks
18
+ - Spike code or throwaway prototypes that won't ship
19
+ - Per-commit self-review of diffs (use `$roll-.review`)
20
+
21
+ ## Required Testing Levels
22
+
23
+ ### 1. Unit Tests (Logic)
24
+ - **Tool**: Vitest / Jest
25
+ - **Coverage**: Business logic, utilities, hooks
26
+ - **Run**: `npm run test`
27
+
28
+ ### 2. E2E Tests (User Flows)
29
+ - **Tool**: **Playwright** (default)
30
+ - **Coverage**: Critical user paths, interactions
31
+ - **Run**: `npm run test:e2e`
32
+
33
+ ### 3. Visual Regression (UI Stability)
34
+ - **Tool**: Playwright screenshot testing
35
+ - **Coverage**: Key UI states
36
+ - **Run**: Part of E2E tests
37
+ - **Baseline**: Stored in `e2e/__snapshots__/`
38
+
39
+ ### 4. Smoke Tests (Post-deploy)
40
+ - **Tool**: Playwright
41
+ - **Coverage**: Core functionality on production
42
+ - **Run**: `npm run test:e2e:smoke`
43
+
44
+ ## Playwright Setup
45
+
46
+ ### Installation
47
+ ```bash
48
+ npm install -D @playwright/test
49
+ npx playwright install chromium
50
+ ```
51
+
52
+ ### Configuration (playwright.config.ts)
53
+ ```typescript
54
+ import { defineConfig, devices } from '@playwright/test';
55
+
56
+ export default defineConfig({
57
+ testDir: './e2e',
58
+ fullyParallel: true,
59
+ retries: process.env.CI ? 2 : 0,
60
+ reporter: 'html',
61
+ use: {
62
+ baseURL: process.env.PLAYWRIGHT_BASE_URL || 'http://localhost:5173',
63
+ trace: 'on-first-retry',
64
+ screenshot: 'only-on-failure',
65
+ },
66
+ projects: [
67
+ { name: 'chromium', use: { ...devices['Desktop Chrome'] } },
68
+ ],
69
+ });
70
+ ```
71
+
72
+ ### Required Test Files
73
+
74
+ **e2e/smoke.spec.ts** (Deployment verification)
75
+ ```typescript
76
+ import { test, expect } from '@playwright/test';
77
+
78
+ test('app loads', async ({ page }) => {
79
+ await page.goto('/');
80
+ await expect(page.locator('#app')).toBeVisible();
81
+ });
82
+ ```
83
+
84
+ **e2e/interaction.spec.ts** (User flows)
85
+ ```typescript
86
+ test('user can complete core flow', async ({ page }) => {
87
+ await page.goto('/');
88
+ // Test critical user journey
89
+ });
90
+ ```
91
+
92
+ **e2e/visual.spec.ts** (Visual regression)
93
+ ```typescript
94
+ test('homepage visual', async ({ page }) => {
95
+ await page.goto('/');
96
+ await expect(page).toHaveScreenshot('homepage.png');
97
+ });
98
+ ```
99
+
100
+ ### Package.json Scripts
101
+ ```json
102
+ {
103
+ "scripts": {
104
+ "test:e2e": "playwright test",
105
+ "test:e2e:ui": "playwright test --ui",
106
+ "test:e2e:smoke": "playwright test smoke.spec.ts",
107
+ "test:all": "npm run test && npm run test:e2e"
108
+ }
109
+ }
110
+ ```
111
+
112
+ ## Visual Regression Workflow
113
+
114
+ ### 1. Create Baseline (First Time)
115
+ ```bash
116
+ npx playwright test --update-snapshots
117
+ ```
118
+
119
+ ### 2. Commit Baseline
120
+ ```bash
121
+ git add e2e/__snapshots__/
122
+ git commit -m "chore: add visual regression baselines"
123
+ ```
124
+
125
+ ### 3. Subsequent Runs (Compare)
126
+ ```bash
127
+ npm run test:e2e
128
+ # Fails if screenshots differ beyond threshold
129
+ ```
130
+
131
+ ### 4. Update Baseline (Intentional UI Change)
132
+ ```bash
133
+ npx playwright test --update-snapshots
134
+ git add e2e/__snapshots__/
135
+ git commit -m "chore: update visual baseline for new design"
136
+ ```
137
+
138
+ ## CI/CD Integration
139
+
140
+ ### Local Pre-push Checklist
141
+ - [ ] `npm run test` passes
142
+ - [ ] `npm run test:e2e` passes
143
+ - [ ] No unexpected visual regressions
144
+
145
+ ### Post-deploy Smoke Test
146
+ ```bash
147
+ # Against production URL
148
+ PLAYWRIGHT_BASE_URL=https://your-app.com npm run test:e2e:smoke
149
+ ```
150
+
151
+ ## Common Patterns
152
+
153
+ ### Testing Canvas/Game Rendering
154
+ ```typescript
155
+ test('game renders', async ({ page }) => {
156
+ await page.goto('/');
157
+ const canvas = page.locator('#gameCanvas');
158
+ await expect(canvas).toBeVisible();
159
+
160
+ // Visual regression for canvas
161
+ await expect(page).toHaveScreenshot('game-initial.png', {
162
+ maxDiffPixels: 100,
163
+ });
164
+ });
165
+ ```
166
+
167
+ ### Testing Responsive Layouts
168
+ ```typescript
169
+ test('responsive design', async ({ page }) => {
170
+ await page.setViewportSize({ width: 375, height: 667 });
171
+ await page.goto('/');
172
+ await expect(page.locator('.mobile-menu')).toBeVisible();
173
+ });
174
+ ```
175
+
176
+ ### Testing Voice/Audio Features
177
+ ```typescript
178
+ test('voice button toggles', async ({ page }) => {
179
+ await page.goto('/');
180
+ const btn = page.locator('#voiceBtn');
181
+ await btn.click();
182
+ await expect(btn).toHaveClass(/active/);
183
+ });
184
+ ```
185
+
186
+ ## Failure Handling
187
+
188
+ ### Flaky Tests
189
+ - Add `test.fixme()` to skip temporarily
190
+ - Increase `timeout` for slow operations
191
+ - Use `retries` in config for network-dependent tests
192
+
193
+ ### Visual Regression Failures
194
+ 1. Check if change is intentional
195
+ 2. If yes: `npx playwright test --update-snapshots`
196
+ 3. If no: fix the code
197
+
198
+ ### Missing Test Infrastructure
199
+ If project lacks Playwright setup:
200
+ 1. Install dependencies
201
+ 2. Create config
202
+ 3. Add basic smoke test
203
+ 4. Run to create baseline
204
+ 5. Commit as separate "test infrastructure" change
205
+
206
+ ## CI Failure Triage
207
+
208
+ When CI goes red, triage the failure into an actionable item instead of ignoring it.
209
+
210
+ ### Step 1: Read the CI Log
211
+
212
+ ```
213
+ CI failure
214
+
215
+ ├── Which step failed? (lint / build / test / e2e)
216
+ ├── What is the error message?
217
+ ├── Is it reproducible locally?
218
+ └── Is it flaky (passes on retry)?
219
+ ```
220
+
221
+ ### Step 2: Classify Severity
222
+
223
+ | Severity | Signal | Action |
224
+ |----------|--------|--------|
225
+ | Critical | Build or core tests fail, blocks all merges | Fix immediately via `$roll-fix` |
226
+ | High | E2E test fails on a key user flow | Create FIX-XXX, fix within current sprint |
227
+ | Medium | Visual regression, non-critical test failure | Create FIX-XXX, prioritize in backlog |
228
+ | Low | Lint warning, flaky test (passes on retry) | Create FIX-XXX or IDEA-XXX, fix when convenient |
229
+
230
+ ### Step 3: Create Backlog Entry
231
+
232
+ ```bash
233
+ # For fixable bugs — create FIX entry
234
+ $roll-idea fix "CI: {step} fails — {root cause summary}"
235
+
236
+ # For flaky/environmental issues — create IDEA entry
237
+ $roll-idea idea "CI: investigate flaky {test name}"
238
+ ```
239
+
240
+ ### Step 4: Execute Fix
241
+
242
+ ```
243
+ FIX-XXX created
244
+
245
+ ├── Critical / High → $roll-fix FIX-XXX (immediate)
246
+ ├── Medium → schedule in backlog, $roll-fix when ready
247
+ └── Low → backlog, fix opportunistically
248
+ ```
249
+
250
+ All fixes go through `$roll-fix` TCR workflow — test, fix, review, commit, push, CI green.
251
+
252
+ ## References
253
+
254
+ - [Playwright Docs](https://playwright.dev/)
255
+ - [Visual Regression Guide](https://playwright.dev/docs/test-snapshots)
256
+ - Example implementation: `<owner>/<repo>/e2e/`
@@ -3,11 +3,15 @@ hidden: true
3
3
  name: roll-.review
4
4
  license: MIT
5
5
  allowed-tools: "Read, Bash(git:*)"
6
- description: Self code review step in the TCR workflow. Runs after each micro-step is completed and before commit, checking code quality, security, and design issues.
6
+ description: "Load when a TCR micro-step needs self code review before commit, focused on bugs, regressions, security, and design issues."
7
7
  ---
8
-
9
8
  # WK Self Code Review
10
9
 
10
+ ## Gotchas
11
+
12
+ - Review findings lead with bugs and regressions, not style preferences or summaries.
13
+ - This is local self-review; use roll-review-pr for PR diffs and roll-peer for cross-agent negotiation.
14
+
11
15
  **Quality gate for the TCR loop** - Self-review after each micro-step is completed and before commit.
12
16
 
13
17
  ## Position in WK Workflow
@@ -2,17 +2,15 @@
2
2
  name: roll-brief
3
3
  license: MIT
4
4
  allowed-tools: "Read, Glob, Grep, Write, Bash(git:*)"
5
- description: |
6
- Owner-facing briefing generator. Summarizes what the agent has done since
7
- the last brief: completed US/FIX/REFACTOR, in-progress items, BACKLOG queue
8
- status, escalations requiring human attention, and a release-readiness verdict.
9
- Three trigger modes: auto on Feature completion, daily morning schedule,
10
- or manual $roll-brief invocation. Distinct from roll-.changelog (user-facing
11
- changelog) — this is an internal digest for the product owner.
5
+ description: "Load when the owner asks for an internal Roll briefing summarizing completed work, in-progress items, backlog queue, escalations, and release readiness."
12
6
  ---
13
-
14
7
  # Roll Brief
15
8
 
9
+ ## Gotchas
10
+
11
+ - Brief is owner-facing internal context, not public changelog copy.
12
+ - Call out escalations and release readiness explicitly; do not flatten them into a generic progress summary.
13
+
16
14
  > Follows the Architecture Constraints, Development Discipline, and Engineering
17
15
  > Common Sense defined in the project AGENTS.md.
18
16