@seanyao/roll 3.620.1 โ†’ 3.624.1

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 (67) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/dist/roll.mjs +4563 -3369
  3. package/package.json +1 -1
  4. package/lib/__pycache__/changelog_audit.cpython-314.pyc +0 -0
  5. package/lib/__pycache__/github_sync.cpython-314.pyc +0 -0
  6. package/lib/__pycache__/loop-fmt.cpython-314.pyc +0 -0
  7. package/lib/__pycache__/loop_result_eval.cpython-314.pyc +0 -0
  8. package/lib/__pycache__/loop_unstick.cpython-314.pyc +0 -0
  9. package/lib/__pycache__/model_prices.cpython-314.pyc +0 -0
  10. package/lib/__pycache__/prices_fetcher.cpython-314.pyc +0 -0
  11. package/lib/__pycache__/roll-home.cpython-314.pyc +0 -0
  12. package/lib/__pycache__/roll-loop-status.cpython-314.pyc +0 -0
  13. package/lib/__pycache__/roll_git.cpython-314.pyc +0 -0
  14. package/lib/__pycache__/roll_render.cpython-314.pyc +0 -0
  15. package/lib/__pycache__/slides-render.cpython-314.pyc +0 -0
  16. package/lib/agent_usage/__pycache__/__init__.cpython-314.pyc +0 -0
  17. package/lib/agent_usage/__pycache__/gemini.cpython-314.pyc +0 -0
  18. package/lib/agent_usage/__pycache__/kimi.cpython-314.pyc +0 -0
  19. package/lib/agent_usage/__pycache__/openai.cpython-314.pyc +0 -0
  20. package/lib/agent_usage/__pycache__/pi.cpython-314.pyc +0 -0
  21. package/lib/agent_usage/__pycache__/pi_emit.cpython-314.pyc +0 -0
  22. package/lib/agent_usage/__pycache__/qwen.cpython-314.pyc +0 -0
  23. package/skills/README.md +0 -64
  24. package/skills/docs/skill-authoring.md +0 -74
  25. package/skills/reports/skill-audit-summary.md +0 -53
  26. package/skills/roll-.changelog/SKILL.md +0 -47
  27. package/skills/roll-.changelog/references/full-contract.md +0 -462
  28. package/skills/roll-.clarify/SKILL.md +0 -64
  29. package/skills/roll-.dream/SKILL.md +0 -47
  30. package/skills/roll-.dream/references/full-contract.md +0 -365
  31. package/skills/roll-.echo/SKILL.md +0 -118
  32. package/skills/roll-.qa/SKILL.md +0 -47
  33. package/skills/roll-.qa/references/full-contract.md +0 -256
  34. package/skills/roll-.review/SKILL.md +0 -148
  35. package/skills/roll-build/SKILL.md +0 -49
  36. package/skills/roll-build/references/full-contract.md +0 -968
  37. package/skills/roll-debug/SKILL.md +0 -48
  38. package/skills/roll-debug/assets/injectable-bb.js +0 -263
  39. package/skills/roll-debug/references/full-contract.md +0 -607
  40. package/skills/roll-design/SKILL.md +0 -52
  41. package/skills/roll-design/references/engineering-checklist.md +0 -298
  42. package/skills/roll-design/references/full-contract.md +0 -940
  43. package/skills/roll-doc-audit/SKILL.md +0 -51
  44. package/skills/roll-doc-audit/references/full-contract.md +0 -796
  45. package/skills/roll-doctor/SKILL.md +0 -211
  46. package/skills/roll-fix/SKILL.md +0 -49
  47. package/skills/roll-fix/references/full-contract.md +0 -672
  48. package/skills/roll-idea/SKILL.md +0 -62
  49. package/skills/roll-loop/SKILL.md +0 -50
  50. package/skills/roll-loop/references/full-contract.md +0 -534
  51. package/skills/roll-notes/SKILL.md +0 -107
  52. package/skills/roll-onboard/SKILL.md +0 -238
  53. package/skills/roll-peer/SKILL.md +0 -47
  54. package/skills/roll-peer/references/full-contract.md +0 -323
  55. package/skills/roll-propose/SKILL.md +0 -155
  56. package/skills/roll-review-pr/SKILL.md +0 -62
  57. package/skills/roll-spar/SKILL.md +0 -47
  58. package/skills/roll-spar/references/full-contract.md +0 -288
  59. package/skills/route-cases/skills.json +0 -216
  60. package/skills/scripts/audit-skills.mjs +0 -272
  61. package/skills/scripts/test-audit-skills.mjs +0 -39
  62. package/skills/tests/fixtures/skill-audit/block-skill/SKILL.md +0 -12
  63. package/skills/tests/fixtures/skill-audit/minimal-skill/SKILL.md +0 -8
  64. package/skills/tests/fixtures/skill-audit/quoted-skill/SKILL.md +0 -10
  65. package/skills/tests/fixtures/skill-audit/route-cases.json +0 -21
  66. package/skills/tests/fixtures/skill-audit/spoke-skill/SKILL.md +0 -12
  67. package/skills/tests/fixtures/skill-audit/spoke-skill/references/runbook.md +0 -3
@@ -1,298 +0,0 @@
1
- # Roll Engineering Common Sense Checklist
2
-
3
- > **These are not best practices โ€” they are baseline requirements.** Violations are bugs.
4
-
5
- ## 0. Visual Evidence Contract (FIX-311) ๐Ÿ“ธ
6
-
7
- **Definition:** A spec must be born honest โ€” its design already names HOW the
8
- delivery will prove its user-visible surface. A missing screenshot is a DESIGN
9
- defect, not a delivery omission.
10
-
11
- **Must verify (default = REQUIRED; exemption is the only opt-out):**
12
- - [ ] Every story carries one AC that captures its user-visible surface (web/CLI/TUI screenshot / ๆˆชๅ›พ).
13
- - [ ] A web/visual card declares the real product surface in frontmatter โ€” `deliverable_url:` (alias `screenshot_url:`) pointing at the actual deliverable page (e.g. `.roll/features/index.html#casting`), NEVER the card's own dossier/report page.
14
- - [ ] A card with genuinely no visual surface records `screenshot_exempt: <reason>` (a naked `true`/`yes` is invalid โ€” the reason is mandatory).
15
-
16
- **Enforced, not advisory:** `validateStoryVisualEvidence(specText)` in
17
- `packages/cli/src/lib/design-visual-evidence.ts` returns `ok:false` for a
18
- non-exempt spec missing a visual-evidence AC, or one that declares a visual
19
- surface but no `deliverable_url`. Keyword matching may only RECOGNISE an
20
- exemption / an existing visual-evidence AC โ€” never decide a card needs a
21
- screenshot (it always does, by default). Same contract the runtime enforce gate
22
- (FIX-309) and archive gate (FIX-334) hold; the three must agree.
23
-
24
- **Counter-example (FIX-284):** โ‘  a card declared a deliverable url yet wired no
25
- capture AC โ†’ honest-skip / empty shell forever; โ‘ก a clear UI redesign lacking
26
- the literal keyword slipped the iron rule (keyword-as-enabler leak). Both are
27
- caught here at the spec source.
28
-
29
- ---
30
-
31
- ## 1. Idempotency ๐Ÿ”
32
-
33
- **Definition:** Performing the same operation N times produces the same result as performing it once.
34
-
35
- **Must test:**
36
- ```typescript
37
- it('should be idempotent', async () => {
38
- await operation(data) // 1st
39
- const result1 = await getState()
40
-
41
- await operation(data) // 2nd
42
- const result2 = await getState()
43
-
44
- await operation(data) // 3rd
45
- const result3 = await getState()
46
-
47
- expect(result1).toEqual(result2)
48
- expect(result2).toEqual(result3)
49
- })
50
- ```
51
-
52
- **Common scenarios:**
53
- - [ ] Import/ingest operations
54
- - [ ] Configuration updates
55
- - [ ] State transitions
56
- - [ ] API calls
57
- - [ ] File writes
58
-
59
- **Counter-example (this time):** Running ingest repeatedly โ†’ files duplicated 7 times
60
-
61
- ---
62
-
63
- ## 2. Cross-Module Contract Consistency ๐Ÿ”—
64
-
65
- **Definition:** Data/IDs/formats shared across multiple modules must be fully consistent.
66
-
67
- **Must check:**
68
- ```typescript
69
- // Checklist
70
- - [ ] Is the ID generation algorithm consistent?
71
- - [ ] Is the data serialization format consistent?
72
- - [ ] Is path handling consistent? (e.g., / vs -)
73
- - [ ] Is it extracted into a shared function/constant?
74
- ```
75
-
76
- **Test template:**
77
- ```typescript
78
- it('should generate same ID across modules', () => {
79
- const scannerId = generateScannerId('articles/test.md')
80
- const inboxId = generateInboxId('articles/test.md')
81
- expect(scannerId).toEqual(inboxId)
82
- })
83
- ```
84
-
85
- **Counter-example (this time):** Scanner replaces `/` with `-`, inbox uses raw path โ†’ deduplication fails
86
-
87
- ---
88
-
89
- ## 3. Data Flow Integrity ๐ŸŒŠ
90
-
91
- **Definition:** The complete data pipeline from producer to consumer must be unobstructed.
92
-
93
- **Must verify:**
94
- ```typescript
95
- // Integration test - must exist
96
- describe('Data Flow: Producer -> Consumer', () => {
97
- it('should write data that consumer can read', async () => {
98
- await producer.write(testData)
99
- const result = await consumer.read()
100
- expect(result).toEqual(testData)
101
- })
102
- })
103
- ```
104
-
105
- **Checklist:**
106
- - [ ] Who writes the data? (Producer)
107
- - [ ] Who reads the data? (Consumer)
108
- - [ ] What is the intermediate storage? (state/file/cache)
109
- - [ ] Is there an integration test to verify?
110
-
111
- **Counter-example (this time):** Ingest doesn't write state, status can't read it โ†’ displays 0
112
-
113
- ---
114
-
115
- ## 4. Atomicity โš›๏ธ
116
-
117
- **Definition:** An operation either fully succeeds or doesn't execute at all (no intermediate states).
118
-
119
- **Must consider:**
120
- - [ ] How to roll back on partial failure?
121
- - [ ] Is there a transaction mechanism?
122
- - [ ] How is data consistency guaranteed after a crash?
123
-
124
- **Test template:**
125
- ```typescript
126
- it('should be atomic', async () => {
127
- try {
128
- await operation([item1, item2, INVALID_ITEM, item4])
129
- } catch (e) {
130
- // After failure, already-processed items should be rolled back
131
- const state = await getState()
132
- expect(state).toEqual(initialState)
133
- }
134
- })
135
- ```
136
-
137
- ---
138
-
139
- ## 5. Input Validation ๐Ÿ›ก๏ธ
140
-
141
- **Definition:** Never trust any external input โ€” it must be validated.
142
-
143
- **Must check:**
144
- - [ ] Null/undefined handling
145
- - [ ] Type checking
146
- - [ ] Range checking (array length, numeric range)
147
- - [ ] Special character/injection attack protection
148
- - [ ] File path traversal protection
149
-
150
- **Test template:**
151
- ```typescript
152
- it('should handle invalid inputs gracefully', async () => {
153
- await expect(operation(null)).rejects.toThrow()
154
- await expect(operation('')).rejects.toThrow()
155
- await expect(operation({})).rejects.toThrow()
156
- })
157
- ```
158
-
159
- ---
160
-
161
- ## 6. Graceful Degradation ๐Ÿช‚
162
-
163
- **Definition:** When a dependency fails, the system should still provide limited functionality.
164
-
165
- **Must consider:**
166
- - [ ] What happens when an external API fails?
167
- - [ ] What happens when the database connection drops?
168
- - [ ] Is there a fallback mechanism?
169
- - [ ] What feedback does the user receive?
170
-
171
- **Test template:**
172
- ```typescript
173
- it('should degrade gracefully when dependency fails', async () => {
174
- mockDependency.toThrow('Network error')
175
-
176
- // Should not crash
177
- const result = await operation()
178
-
179
- // Should return a fallback value or partial result
180
- expect(result).toEqual(fallbackValue)
181
- })
182
- ```
183
-
184
- ---
185
-
186
- ## 7. Observability ๐Ÿ‘๏ธ
187
-
188
- **Definition:** System state must be visible and traceable.
189
-
190
- **Must provide:**
191
- - [ ] Progress feedback (for long-running operations)
192
- - [ ] State query interface (e.g., status command)
193
- - [ ] Error logs (failure reasons)
194
- - [ ] Key metrics (counts, durations)
195
-
196
- **Improvements made this time:**
197
- - Added `kkb status` to show raw files statistics โœ…
198
- - Added `kkb compile` progress feedback โœ…
199
-
200
- ---
201
-
202
- ## 8. Concurrency Safety ๐Ÿงต
203
-
204
- **Definition:** Access to shared resources across multiple threads/processes must be safe.
205
-
206
- **Must consider:**
207
- - [ ] File read/write conflicts
208
- - [ ] Database transaction isolation level
209
- - [ ] Locking for shared in-memory state
210
- - [ ] Race conditions
211
-
212
- **Test template:**
213
- ```typescript
214
- it('should handle concurrent writes', async () => {
215
- await Promise.all([
216
- operation(data1),
217
- operation(data2),
218
- operation(data3)
219
- ])
220
-
221
- // Verify final state consistency
222
- const state = await getState()
223
- expect(state).toBeValid()
224
- })
225
- ```
226
-
227
- ---
228
-
229
- ## 9. Detailed Design Completeness ๐Ÿ“
230
-
231
- **Definition:** Before decomposing work into stories, the detailed design must be concrete and implementable โ€” not a sketch.
232
-
233
- **Must include (proportional to risk/novelty):**
234
- - [ ] Data/contract **schema**
235
- - [ ] **At least one complete worked sample** of the intended output/behavior
236
- - [ ] Key **interface signatures**
237
- - [ ] **Mapping/normalization rules**
238
- - [ ] **Edge cases & failure modes**
239
-
240
- **Rule:** If you cannot show at least one complete worked sample, the design is NOT done. Decomposition slices an agreed design โ€” it is not a substitute for designing.
241
-
242
- ---
243
-
244
- ## Mandatory Check Process
245
-
246
- During the **Test Design Review** phase of each Story, the following must be answered:
247
-
248
- ```markdown
249
- ### Engineering Common Sense Checklist
250
- - [ ] **Detailed design completeness**: Does the detailed design include at least one complete worked sample plus schema, interface signatures, mapping rules, and edge cases?
251
- - [ ] **Idempotency**: Can it be run repeatedly? Are there tests?
252
- - [ ] **Cross-module contract**: Are IDs/formats/algorithms consistent?
253
- - [ ] **Data flow**: Is the producer โ†’ consumer pipeline complete?
254
- - [ ] **Atomicity**: Does partial failure trigger a rollback?
255
- - [ ] **Input validation**: Are all inputs validated?
256
- - [ ] **Graceful degradation**: What happens when a dependency fails?
257
- - [ ] **Observability**: Can the user see progress/status?
258
- - [ ] **Concurrency safety**: Is multi-threaded access safe?
259
-
260
- **If any item is not satisfied, tests/design must be added before writing implementation code.**
261
- ```
262
-
263
- ---
264
-
265
- ## Automated Protection
266
-
267
- ### Sentinel Patrol Rules
268
- ```yaml
269
- # .github/roll-sentinel-config.yml
270
- checks:
271
- idempotency:
272
- - pattern: "ingest|import|sync"
273
- require_test: "idempotency"
274
-
275
- cross_module_contract:
276
- - files: ["src/*/index.ts"]
277
- check: "shared_id_generation"
278
-
279
- data_flow:
280
- - require_integration_test: true
281
- ```
282
-
283
- ### Pre-Commit Hook
284
- ```bash
285
- #!/bin/bash
286
- # .git/hooks/pre-commit
287
- echo "๐Ÿ” Checking engineering common sense..."
288
-
289
- # Check for idempotency tests
290
- if git diff --cached --name-only | grep -q "ingest\|import\|sync"; then
291
- if ! grep -r "idempotency\|repeated run\|multiple times" tests/ 2>/dev/null; then
292
- echo "โŒ Missing idempotency tests!"
293
- exit 1
294
- fi
295
- fi
296
-
297
- echo "โœ… Basic checks passed"
298
- ```