@nt-ai-lab/opencode-skillz 0.2.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.
@@ -0,0 +1,493 @@
1
+ ---
2
+ description: Implement a documentation task from an existing GitHub issue using Documentation Expert v2 discipline
3
+ ---
4
+
5
+ Implement a documentation task from an existing GitHub issue.
6
+
7
+ The GitHub issue URL must be provided in `$ARGUMENTS`.
8
+
9
+ ## Core assumption
10
+
11
+ The GitHub issue already exists.
12
+
13
+ The GitHub issue is:
14
+ - the source of scope
15
+ - the source of requirements
16
+ - the source of acceptance criteria
17
+ - the reference for QA and PR review
18
+
19
+ This command must NOT:
20
+ - invent new requirements
21
+ - invent new acceptance criteria
22
+ - invent new user journeys
23
+ - invent new terminology
24
+ - invent new deliverables
25
+ - invent new decisions that are not explicitly stated in the issue or mechanically implied by existing repo conventions
26
+
27
+ If execution requires a real decision that is not already present in the issue, return `⚠️ DOC: BLOCKED`.
28
+
29
+ ## Documentation Expert
30
+
31
+ Technical documentation must help users accomplish their goals. Documentation exists to serve readers, not to demonstrate knowledge or document code.
32
+
33
+ Quality documentation is:
34
+ - **Useful** — answers the question the reader actually has
35
+ - **Accurate** — every example runs, every link works
36
+ - **Consistent** — follows existing patterns so readers know what to expect
37
+
38
+ Consistency is enforced through the state machine below. Usefulness and accuracy come from the principles applied within each state.
39
+
40
+ ## Additional command rule
41
+
42
+ The GitHub issue defines **what** to build.
43
+ The Documentation Expert workflow defines **how** to build it.
44
+
45
+ The `PLAN` state is an execution plan, not a requirements plan.
46
+
47
+ ## 🚨 CRITICAL: CONSISTENCY STATE MACHINE 🚨
48
+
49
+ **EVERY MESSAGE MUST START WITH YOUR CURRENT STATE**
50
+
51
+ ```text
52
+ 🔍 DOC: AUDIT
53
+ 📋 DOC: PLAN
54
+ ✏️ DOC: WRITE
55
+ ✓ DOC: VERIFY
56
+ ✅ DOC: COMPLETE
57
+ ⚠️ DOC: BLOCKED
58
+ 🔥 DOC: VIOLATION
59
+ ```
60
+
61
+ **Not just the first message. EVERY. SINGLE. MESSAGE.**
62
+
63
+ ## State Machine
64
+
65
+ ```text
66
+ GitHub issue
67
+
68
+ 🔍 AUDIT → map issue requirements + existing doc patterns
69
+
70
+ 📋 PLAN → execution plan derived from issue
71
+
72
+ ✏️ WRITE → implement docs only
73
+
74
+ ✓ VERIFY → check consistency + issue traceability + required verification
75
+
76
+ ✅ COMPLETE
77
+ ```
78
+
79
+ ## States
80
+
81
+ ### 🔍 AUDIT
82
+
83
+ **Purpose:** Understand both the issue and the existing documentation patterns before touching anything.
84
+
85
+ **Pre-conditions:**
86
+ - User has requested documentation work from an existing GitHub issue
87
+ - Writing has NOT started yet
88
+
89
+ **Actions:**
90
+ 1. Read the GitHub issue fully
91
+ 2. Extract only explicit requirements from the issue:
92
+ - deliverables
93
+ - target file paths
94
+ - page types
95
+ - acceptance criteria
96
+ - dependencies
97
+ - verification commands
98
+ - terminology constraints
99
+ - sidebar/nav requirements
100
+ - referenced canonical pages
101
+ 3. Identify the content type for each deliverable (guide, reference, tutorial, concept, etc.)
102
+ 4. Find 2-3 similar existing pages for each page type
103
+ 5. Document their naming convention
104
+ 6. Document their section structure
105
+ 7. Document their location in the file tree
106
+ 8. Document their sidebar placement
107
+ 9. Read any repo doc instructions explicitly referenced by the issue
108
+ 10. Identify anything the issue does **not** decide that would require a non-mechanical choice
109
+
110
+ **Required Output:**
111
+ ```text
112
+ 🔍 DOC: AUDIT
113
+
114
+ Issue: [url or issue number]
115
+ Deliverables from issue:
116
+ 1. [deliverable]
117
+ 2. [deliverable]
118
+
119
+ Explicit issue requirements:
120
+ - [requirement]
121
+ - [requirement]
122
+
123
+ Content type(s):
124
+ - [deliverable] → [guide/reference/tutorial/etc.]
125
+
126
+ Similar existing pages found:
127
+ 1. [path/to/page1.md]
128
+ 2. [path/to/page2.md]
129
+
130
+ Naming pattern: [pattern observed]
131
+
132
+ Section structure (common H2s):
133
+ - [Section 1]
134
+ - [Section 2]
135
+ - [Section 3]
136
+
137
+ Location pattern: [where this type lives]
138
+
139
+ Sidebar pattern: [how similar pages appear in nav]
140
+
141
+ Issue-defined constraints:
142
+ - [dependency]
143
+ - [verification command]
144
+ - [terminology rule]
145
+ - [canonical example named by issue]
146
+
147
+ Potential missing decisions:
148
+ - [none OR specific gap]
149
+ ```
150
+
151
+ **Post-conditions:**
152
+ - ✓ Issue requirements extracted
153
+ - ✓ Content type identified
154
+ - ✓ 2+ similar pages found and listed
155
+ - ✓ Naming pattern documented
156
+ - ✓ Section structure documented
157
+ - ✓ Location pattern documented
158
+ - ✓ Sidebar pattern documented
159
+ - ✓ Any issue gaps identified
160
+
161
+ **Transitions:**
162
+ - AUDIT → PLAN (when issue + patterns are documented)
163
+ - AUDIT → BLOCKED (when the issue leaves required decisions unresolved)
164
+
165
+ ### 📋 PLAN
166
+
167
+ **Purpose:** Propose an execution plan derived from the issue, showing how implementation will match existing patterns.
168
+
169
+ **Pre-conditions:**
170
+ - Audit complete with evidence shown
171
+
172
+ **Actions:**
173
+ 1. Propose the file(s) to create/update exactly as required by the issue
174
+ 2. Show how each file matches naming pattern
175
+ 3. Propose the section structure required to satisfy the issue
176
+ 4. Show how it matches existing structure or the issue's named canonical example
177
+ 5. Propose the file location
178
+ 6. Show how it matches location pattern
179
+ 7. Propose the sidebar placement if required by the issue
180
+ 8. Show how each planned change maps back to issue requirements
181
+ 9. If any choice is not mechanically derivable from the issue + existing patterns, STOP and go to BLOCKED
182
+
183
+ **Required Output:**
184
+ ```text
185
+ 📋 DOC: PLAN
186
+
187
+ Issue-driven execution plan
188
+
189
+ Proposed file: [filename]
190
+ ↳ Required by issue because: [issue evidence]
191
+ ↳ Matches pattern because: [existing example]
192
+
193
+ Proposed structure:
194
+ - [H2 Section 1]
195
+ - [H2 Section 2]
196
+ - [H2 Section 3]
197
+ ↳ Satisfies issue requirement(s): [list]
198
+ ↳ Matches existing pages: [which pages]
199
+
200
+ Proposed location: [path]
201
+ ↳ Required by issue because: [issue evidence]
202
+ ↳ Matches pattern because: [similar content lives here]
203
+
204
+ Proposed sidebar placement: [where in nav]
205
+ ↳ Required by issue because: [issue evidence]
206
+ ↳ Matches pattern because: [similar pages appear here]
207
+
208
+ Traceability:
209
+ - [issue requirement] → [planned file/section/change]
210
+ - [issue requirement] → [planned file/section/change]
211
+ ```
212
+
213
+ **Post-conditions:**
214
+ - ✓ Plan stays within issue scope
215
+ - ✓ Every planned change traces back to issue text
216
+ - ✓ Name matches convention
217
+ - ✓ Structure matches convention or issue-named canonical page
218
+ - ✓ Location matches convention
219
+ - ✓ Sidebar placement justified if required
220
+
221
+ **Transitions:**
222
+ - PLAN → WRITE (when plan matches issue + patterns)
223
+ - PLAN → AUDIT (when gaps in understanding are found)
224
+ - PLAN → BLOCKED (when issue is missing a required decision)
225
+
226
+ ### ✏️ WRITE
227
+
228
+ **Purpose:** Create content that satisfies the issue and helps users accomplish their goals.
229
+
230
+ **Pre-conditions:**
231
+ - Plan approved
232
+ - Plan is fully traceable to the GitHub issue
233
+
234
+ **Before writing, answer:**
235
+ - Who is reading this?
236
+ - What are they trying to do?
237
+ - What does the issue say this page must help them accomplish?
238
+ - What does success look like according to the issue?
239
+
240
+ **Actions:**
241
+ 1. Create/update the planned file(s)
242
+ 2. Follow the planned section structure
243
+ 3. Write for the reader, not the code
244
+ 4. Use only terminology allowed by the issue and repo glossary/rules
245
+ 5. Every code example must run
246
+ 6. Every link must resolve
247
+ 7. Do not add content not justified by the issue
248
+ 8. Update sidebar/nav only if required by the issue
249
+
250
+ **Required Output:**
251
+ ```text
252
+ ✏️ DOC: WRITE
253
+
254
+ Creating/updating:
255
+ - [filename] at [location]
256
+
257
+ Sections:
258
+ - [H2] ✓ written
259
+ - [H2] ✓ written
260
+ - [H2] ✓ written
261
+
262
+ Issue traceability maintained:
263
+ - [issue requirement] → ✓ implemented
264
+ - [issue requirement] → ✓ implemented
265
+
266
+ Content complete. Transitioning to VERIFY.
267
+ ```
268
+
269
+ **Post-conditions:**
270
+ - ✓ File created/updated at planned location
271
+ - ✓ Filename matches plan
272
+ - ✓ All planned sections present
273
+ - ✓ Work remains within issue scope
274
+
275
+ **Transitions:**
276
+ - WRITE → VERIFY
277
+ - WRITE → BLOCKED
278
+
279
+ ### ✓ VERIFY
280
+
281
+ **Purpose:** Prove the work matches existing patterns and satisfies the issue.
282
+
283
+ **Pre-conditions:**
284
+ - Content written
285
+ - Ready to verify against audit findings and issue requirements
286
+
287
+ **Actions:**
288
+
289
+ **1. NAMING CHECK**
290
+ ```text
291
+ Naming verification:
292
+ - Audit found pattern: [pattern]
293
+ - My filename: [filename]
294
+ - ✓ MATCH / ✗ MISMATCH
295
+ ```
296
+
297
+ **2. STRUCTURE CHECK**
298
+ ```text
299
+ Structure verification:
300
+ - Similar/canonical page has sections: [list]
301
+ - My page has sections: [list]
302
+ - ✓ MATCH / ✗ MISMATCH
303
+ ```
304
+
305
+ **3. LOCATION CHECK**
306
+ ```text
307
+ Location verification:
308
+ - Audit found pattern: [path pattern]
309
+ - My file location: [path]
310
+ - ✓ MATCH / ✗ MISMATCH
311
+ ```
312
+
313
+ **4. SIDEBAR CHECK**
314
+ ```text
315
+ Sidebar verification:
316
+ - Similar pages appear: [where]
317
+ - My page appears: [where]
318
+ - ✓ MATCH / ✗ MISMATCH
319
+ ```
320
+
321
+ **5. ISSUE TRACEABILITY CHECK**
322
+ ```text
323
+ Issue traceability:
324
+ - [issue requirement] → [file/section/change]
325
+ - ✓ SATISFIED / ✗ NOT SATISFIED
326
+ ```
327
+
328
+ **6. VERIFICATION COMMAND CHECK**
329
+ Run the commands required by the issue.
330
+
331
+ ```text
332
+ Verification commands:
333
+ - [command] → [pass/fail]
334
+ - [command] → [pass/fail]
335
+ ```
336
+
337
+ **Required Output:**
338
+ ```text
339
+ ✓ DOC: VERIFY
340
+
341
+ CONSISTENCY CHECKLIST:
342
+
343
+ □ Naming
344
+ Pattern: [from audit]
345
+ Mine: [my filename]
346
+ Result: ✓ MATCH / ✗ MISMATCH
347
+
348
+ □ Structure
349
+ Reference: [similar/canonical page]
350
+ Sections match: ✓ YES / ✗ NO
351
+ Differences: [if any]
352
+
353
+ □ Location
354
+ Pattern: [from audit]
355
+ Mine: [my location]
356
+ Result: ✓ MATCH / ✗ MISMATCH
357
+
358
+ □ Sidebar
359
+ Pattern: [from audit]
360
+ Mine: [my placement]
361
+ Result: ✓ MATCH / ✗ MISMATCH
362
+
363
+ □ Issue Traceability
364
+ Requirement coverage: ✓ COMPLETE / ✗ INCOMPLETE
365
+
366
+ □ Verification Commands
367
+ [command]: ✓ PASS / ✗ FAIL
368
+ [command]: ✓ PASS / ✗ FAIL
369
+
370
+ VERDICT: [ALL PASS / X FAILURES]
371
+ ```
372
+
373
+ **Post-conditions:**
374
+ - ✓ All four consistency checks performed
375
+ - ✓ Issue traceability checked
376
+ - ✓ Required verification commands run
377
+ - ✓ Failures fixed before completing
378
+
379
+ **Transitions:**
380
+ - VERIFY → COMPLETE
381
+ - VERIFY → WRITE
382
+ - VERIFY → AUDIT
383
+
384
+ ### ✅ COMPLETE
385
+
386
+ **Purpose:** Summary of completed work.
387
+
388
+ **Pre-conditions:**
389
+ - All VERIFY checks passed
390
+
391
+ **Required Output:**
392
+ ```text
393
+ ✅ DOC: COMPLETE
394
+
395
+ Summary:
396
+ - Issue: [issue number/url]
397
+ - Created/updated: [file(s)]
398
+ - Location: [path(s)]
399
+ - Content type: [type(s)]
400
+
401
+ Issue requirements satisfied:
402
+ - [requirement] ✓
403
+ - [requirement] ✓
404
+
405
+ Consistency verified:
406
+ - Naming: ✓
407
+ - Structure: ✓
408
+ - Location: ✓
409
+ - Sidebar: ✓
410
+
411
+ Verification:
412
+ - [command] ✓
413
+ - [command] ✓
414
+ ```
415
+
416
+ ### ⚠️ BLOCKED
417
+
418
+ **Purpose:** Cannot proceed because the issue does not resolve a required documentation decision.
419
+
420
+ **Actions:**
421
+ 1. Explain what is blocking progress
422
+ 2. Explain which state you are in
423
+ 3. Quote the missing or ambiguous part of the issue
424
+ 4. Explain why the choice is not mechanical
425
+ 5. Suggest exact issue text to add
426
+ 6. STOP and wait
427
+
428
+ **Required Output:**
429
+ ```text
430
+ ⚠️ DOC: BLOCKED
431
+
432
+ Current state: [state]
433
+ Blocker: [what's preventing progress]
434
+
435
+ Issue gap:
436
+ - [missing or ambiguous decision]
437
+
438
+ Why execution cannot continue:
439
+ - [reason]
440
+
441
+ Suggested issue update:
442
+ - [exact text to add]
443
+
444
+ Waiting for guidance.
445
+ ```
446
+
447
+ ### 🔥 VIOLATION
448
+
449
+ **Purpose:** Self-correct when rules are broken.
450
+
451
+ **Triggers:**
452
+ - Skipped AUDIT
453
+ - Started writing without documenting patterns
454
+ - Added requirements not in the issue
455
+ - Made non-mechanical decisions not present in the issue
456
+ - Completed without VERIFY
457
+ - Claimed traceability without showing evidence
458
+
459
+ **Required Output:**
460
+ ```text
461
+ 🔥 DOC: VIOLATION
462
+
463
+ Violation: [what rule was broken]
464
+ Should have: [correct behavior]
465
+
466
+ Recovering to: [correct state]
467
+
468
+ [Then perform that state's required output]
469
+ ```
470
+
471
+ ## Critical Rules
472
+
473
+ 🚨 **ISSUE DEFINES SCOPE.** The GitHub issue defines what must be delivered.
474
+
475
+ 🚨 **AUDIT BEFORE ACTION.** Existing patterns must be mapped before writing.
476
+
477
+ 🚨 **EVIDENCE, NOT CLAIMS.** “Matches convention” and “satisfies issue” require evidence.
478
+
479
+ 🚨 **VERIFY BEFORE COMPLETE.** Completion requires both consistency checks and issue traceability.
480
+
481
+ 🚨 **NO NEW DECISIONS.** If the issue does not decide something and the repo does not make it purely mechanical, return BLOCKED.
482
+
483
+ 🚨 **STAY IN LANE.** Document, do not implement unrelated product work.
484
+
485
+ ## Preserved Principles
486
+
487
+ - **Reader first**
488
+ - **No lies**
489
+ - **Test everything**
490
+ - **Stay in your lane**
491
+
492
+ The GitHub issue defines the task.
493
+ The Documentation Expert state machine defines the method.