@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.
- package/CHANGELOG.md +46 -0
- package/dist/roll.mjs +4563 -3369
- package/package.json +1 -1
- package/lib/__pycache__/changelog_audit.cpython-314.pyc +0 -0
- package/lib/__pycache__/github_sync.cpython-314.pyc +0 -0
- package/lib/__pycache__/loop-fmt.cpython-314.pyc +0 -0
- package/lib/__pycache__/loop_result_eval.cpython-314.pyc +0 -0
- package/lib/__pycache__/loop_unstick.cpython-314.pyc +0 -0
- package/lib/__pycache__/model_prices.cpython-314.pyc +0 -0
- package/lib/__pycache__/prices_fetcher.cpython-314.pyc +0 -0
- package/lib/__pycache__/roll-home.cpython-314.pyc +0 -0
- package/lib/__pycache__/roll-loop-status.cpython-314.pyc +0 -0
- package/lib/__pycache__/roll_git.cpython-314.pyc +0 -0
- package/lib/__pycache__/roll_render.cpython-314.pyc +0 -0
- package/lib/__pycache__/slides-render.cpython-314.pyc +0 -0
- package/lib/agent_usage/__pycache__/__init__.cpython-314.pyc +0 -0
- package/lib/agent_usage/__pycache__/gemini.cpython-314.pyc +0 -0
- package/lib/agent_usage/__pycache__/kimi.cpython-314.pyc +0 -0
- package/lib/agent_usage/__pycache__/openai.cpython-314.pyc +0 -0
- package/lib/agent_usage/__pycache__/pi.cpython-314.pyc +0 -0
- package/lib/agent_usage/__pycache__/pi_emit.cpython-314.pyc +0 -0
- package/lib/agent_usage/__pycache__/qwen.cpython-314.pyc +0 -0
- package/skills/README.md +0 -64
- package/skills/docs/skill-authoring.md +0 -74
- package/skills/reports/skill-audit-summary.md +0 -53
- package/skills/roll-.changelog/SKILL.md +0 -47
- package/skills/roll-.changelog/references/full-contract.md +0 -462
- package/skills/roll-.clarify/SKILL.md +0 -64
- package/skills/roll-.dream/SKILL.md +0 -47
- package/skills/roll-.dream/references/full-contract.md +0 -365
- package/skills/roll-.echo/SKILL.md +0 -118
- package/skills/roll-.qa/SKILL.md +0 -47
- package/skills/roll-.qa/references/full-contract.md +0 -256
- package/skills/roll-.review/SKILL.md +0 -148
- package/skills/roll-build/SKILL.md +0 -49
- package/skills/roll-build/references/full-contract.md +0 -968
- package/skills/roll-debug/SKILL.md +0 -48
- package/skills/roll-debug/assets/injectable-bb.js +0 -263
- package/skills/roll-debug/references/full-contract.md +0 -607
- package/skills/roll-design/SKILL.md +0 -52
- package/skills/roll-design/references/engineering-checklist.md +0 -298
- package/skills/roll-design/references/full-contract.md +0 -940
- package/skills/roll-doc-audit/SKILL.md +0 -51
- package/skills/roll-doc-audit/references/full-contract.md +0 -796
- package/skills/roll-doctor/SKILL.md +0 -211
- package/skills/roll-fix/SKILL.md +0 -49
- package/skills/roll-fix/references/full-contract.md +0 -672
- package/skills/roll-idea/SKILL.md +0 -62
- package/skills/roll-loop/SKILL.md +0 -50
- package/skills/roll-loop/references/full-contract.md +0 -534
- package/skills/roll-notes/SKILL.md +0 -107
- package/skills/roll-onboard/SKILL.md +0 -238
- package/skills/roll-peer/SKILL.md +0 -47
- package/skills/roll-peer/references/full-contract.md +0 -323
- package/skills/roll-propose/SKILL.md +0 -155
- package/skills/roll-review-pr/SKILL.md +0 -62
- package/skills/roll-spar/SKILL.md +0 -47
- package/skills/roll-spar/references/full-contract.md +0 -288
- package/skills/route-cases/skills.json +0 -216
- package/skills/scripts/audit-skills.mjs +0 -272
- package/skills/scripts/test-audit-skills.mjs +0 -39
- package/skills/tests/fixtures/skill-audit/block-skill/SKILL.md +0 -12
- package/skills/tests/fixtures/skill-audit/minimal-skill/SKILL.md +0 -8
- package/skills/tests/fixtures/skill-audit/quoted-skill/SKILL.md +0 -10
- package/skills/tests/fixtures/skill-audit/route-cases.json +0 -21
- package/skills/tests/fixtures/skill-audit/spoke-skill/SKILL.md +0 -12
- 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
|
-
```
|