sequant 1.0.0

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 (99) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +237 -0
  3. package/dist/bin/cli.d.ts +8 -0
  4. package/dist/bin/cli.d.ts.map +1 -0
  5. package/dist/bin/cli.js +70 -0
  6. package/dist/bin/cli.js.map +1 -0
  7. package/dist/src/commands/doctor.d.ts +8 -0
  8. package/dist/src/commands/doctor.d.ts.map +1 -0
  9. package/dist/src/commands/doctor.js +171 -0
  10. package/dist/src/commands/doctor.js.map +1 -0
  11. package/dist/src/commands/init.d.ts +11 -0
  12. package/dist/src/commands/init.d.ts.map +1 -0
  13. package/dist/src/commands/init.js +124 -0
  14. package/dist/src/commands/init.js.map +1 -0
  15. package/dist/src/commands/run.d.ts +18 -0
  16. package/dist/src/commands/run.d.ts.map +1 -0
  17. package/dist/src/commands/run.js +229 -0
  18. package/dist/src/commands/run.js.map +1 -0
  19. package/dist/src/commands/status.d.ts +5 -0
  20. package/dist/src/commands/status.d.ts.map +1 -0
  21. package/dist/src/commands/status.js +45 -0
  22. package/dist/src/commands/status.js.map +1 -0
  23. package/dist/src/commands/update.d.ts +10 -0
  24. package/dist/src/commands/update.d.ts.map +1 -0
  25. package/dist/src/commands/update.js +124 -0
  26. package/dist/src/commands/update.js.map +1 -0
  27. package/dist/src/index.d.ts +15 -0
  28. package/dist/src/index.d.ts.map +1 -0
  29. package/dist/src/index.js +13 -0
  30. package/dist/src/index.js.map +1 -0
  31. package/dist/src/lib/fs.d.ts +10 -0
  32. package/dist/src/lib/fs.d.ts.map +1 -0
  33. package/dist/src/lib/fs.js +44 -0
  34. package/dist/src/lib/fs.js.map +1 -0
  35. package/dist/src/lib/manifest.d.ts +14 -0
  36. package/dist/src/lib/manifest.d.ts.map +1 -0
  37. package/dist/src/lib/manifest.js +37 -0
  38. package/dist/src/lib/manifest.js.map +1 -0
  39. package/dist/src/lib/stacks.d.ts +22 -0
  40. package/dist/src/lib/stacks.d.ts.map +1 -0
  41. package/dist/src/lib/stacks.js +131 -0
  42. package/dist/src/lib/stacks.js.map +1 -0
  43. package/dist/src/lib/templates.d.ts +16 -0
  44. package/dist/src/lib/templates.d.ts.map +1 -0
  45. package/dist/src/lib/templates.js +118 -0
  46. package/dist/src/lib/templates.js.map +1 -0
  47. package/dist/src/lib/workflow/cli-args.d.ts +138 -0
  48. package/dist/src/lib/workflow/cli-args.d.ts.map +1 -0
  49. package/dist/src/lib/workflow/cli-args.js +210 -0
  50. package/dist/src/lib/workflow/cli-args.js.map +1 -0
  51. package/dist/src/lib/workflow/execute-issues.d.ts +42 -0
  52. package/dist/src/lib/workflow/execute-issues.d.ts.map +1 -0
  53. package/dist/src/lib/workflow/execute-issues.js +463 -0
  54. package/dist/src/lib/workflow/execute-issues.js.map +1 -0
  55. package/dist/src/lib/workflow/logger.d.ts +168 -0
  56. package/dist/src/lib/workflow/logger.d.ts.map +1 -0
  57. package/dist/src/lib/workflow/logger.js +249 -0
  58. package/dist/src/lib/workflow/logger.js.map +1 -0
  59. package/dist/src/lib/workflow/types.d.ts +89 -0
  60. package/dist/src/lib/workflow/types.d.ts.map +1 -0
  61. package/dist/src/lib/workflow/types.js +23 -0
  62. package/dist/src/lib/workflow/types.js.map +1 -0
  63. package/package.json +69 -0
  64. package/stacks/go.yaml +22 -0
  65. package/stacks/nextjs.yaml +28 -0
  66. package/stacks/python.yaml +24 -0
  67. package/stacks/rust.yaml +23 -0
  68. package/templates/hooks/post-tool.sh +301 -0
  69. package/templates/hooks/pre-tool.sh +350 -0
  70. package/templates/memory/constitution.md +60 -0
  71. package/templates/scripts/cleanup-worktree.sh +78 -0
  72. package/templates/scripts/list-worktrees.sh +50 -0
  73. package/templates/scripts/new-feature.sh +156 -0
  74. package/templates/settings.json +26 -0
  75. package/templates/skills/assess/SKILL.md +428 -0
  76. package/templates/skills/clean/SKILL.md +196 -0
  77. package/templates/skills/docs/SKILL.md +323 -0
  78. package/templates/skills/exec/SKILL.md +426 -0
  79. package/templates/skills/fullsolve/SKILL.md +479 -0
  80. package/templates/skills/loop/SKILL.md +310 -0
  81. package/templates/skills/qa/SKILL.md +261 -0
  82. package/templates/skills/qa/references/code-quality-exemplars.md +112 -0
  83. package/templates/skills/qa/references/code-review-checklist.md +77 -0
  84. package/templates/skills/qa/references/quality-gates.md +95 -0
  85. package/templates/skills/qa/references/testing-requirements.md +109 -0
  86. package/templates/skills/qa/scripts/quality-checks.sh +109 -0
  87. package/templates/skills/reflect/SKILL.md +159 -0
  88. package/templates/skills/reflect/references/documentation-tiers.md +70 -0
  89. package/templates/skills/reflect/references/phase-reflection.md +95 -0
  90. package/templates/skills/reflect/scripts/workflow-queries.ts +165 -0
  91. package/templates/skills/security-review/SKILL.md +344 -0
  92. package/templates/skills/security-review/references/security-checklists.md +377 -0
  93. package/templates/skills/solve/SKILL.md +242 -0
  94. package/templates/skills/spec/SKILL.md +169 -0
  95. package/templates/skills/spec/references/parallel-groups.md +72 -0
  96. package/templates/skills/spec/references/verification-criteria.md +104 -0
  97. package/templates/skills/test/SKILL.md +508 -0
  98. package/templates/skills/testgen/SKILL.md +561 -0
  99. package/templates/skills/verify/SKILL.md +266 -0
@@ -0,0 +1,323 @@
1
+ ---
2
+ name: docs
3
+ description: "Phase 4 - Generate admin-facing documentation for implemented features before merging."
4
+ license: MIT
5
+ metadata:
6
+ author: sequant
7
+ version: "1.0"
8
+ allowed-tools:
9
+ - Read
10
+ - Write
11
+ - Glob
12
+ - Grep
13
+ - Bash(git diff:*)
14
+ - Bash(git status:*)
15
+ - Bash(gh issue view:*)
16
+ - Bash(gh issue comment:*)
17
+ - Bash(gh pr view:*)
18
+ - Bash(gh pr diff:*)
19
+ ---
20
+
21
+ # Documentation Generator
22
+
23
+ You are the Phase 4 "Documentation Agent" for the current repository.
24
+
25
+ ## Purpose
26
+
27
+ When invoked as `/docs`, your job is to:
28
+
29
+ 1. Analyze the implemented feature (from PR diff or git diff).
30
+ 2. Generate operational documentation (how to use, not how it works).
31
+ 3. Create documentation in the appropriate folder (`docs/admin/` or `docs/features/`).
32
+ 4. Post a summary comment to the GitHub issue.
33
+
34
+ ## Behavior
35
+
36
+ Invocation:
37
+
38
+ - `/docs 123`:
39
+ - Treat `123` as the GitHub issue number.
40
+ - Analyze the implementation to understand what was built.
41
+ - Generate admin-facing or user-facing documentation.
42
+
43
+ ### 1. Gather Context
44
+
45
+ **Step 1:** Read the GitHub issue and comments for feature context:
46
+ ```bash
47
+ gh issue view <issue-number> --json title,body,labels
48
+ ```
49
+
50
+ **Step 2:** Check for existing PR:
51
+ ```bash
52
+ gh pr list --search "head:feature/<issue-number>" --json number,headRefName
53
+ ```
54
+
55
+ **Step 3:** Analyze the implementation diff:
56
+ ```bash
57
+ # If PR exists:
58
+ gh pr diff <pr-number>
59
+
60
+ # If no PR, use git diff from feature branch:
61
+ git diff main...HEAD --name-only
62
+ git diff main...HEAD
63
+ ```
64
+
65
+ ### 2. Auto-Detect Documentation Type
66
+
67
+ Determine documentation type based on changed files:
68
+
69
+ **Admin Documentation** (`docs/admin/`):
70
+ - Files in `app/admin/`
71
+ - Files in `components/admin/`
72
+ - Files in `lib/admin/`
73
+ - Admin-related API routes
74
+
75
+ **User-Facing Documentation** (`docs/features/`):
76
+ - Files in `app/[city]/`
77
+ - Files in `components/` (non-admin)
78
+ - Public-facing pages or features
79
+
80
+ **Decision Logic:**
81
+ ```
82
+ IF any file path contains "/admin/" THEN
83
+ type = "admin"
84
+ output_dir = "docs/admin/"
85
+ ELSE
86
+ type = "feature"
87
+ output_dir = "docs/features/"
88
+ END IF
89
+ ```
90
+
91
+ ### 3. Documentation Template
92
+
93
+ Generate documentation using this template:
94
+
95
+ ```markdown
96
+ # [Feature Name]
97
+
98
+ **Quick Start:** [1-2 sentence summary of what this feature does and why to use it]
99
+
100
+ ## Access
101
+
102
+ - **URL:** `/admin/[route]` or `/[route]`
103
+ - **Menu:** Admin → [Section] → [Feature]
104
+ - **Permissions:** [Required role or access level]
105
+
106
+ ## Usage
107
+
108
+ ### [Primary Action]
109
+
110
+ 1. Navigate to [location]
111
+ 2. [Step 2...]
112
+ 3. [Step 3...]
113
+
114
+ ### [Secondary Action] (if applicable)
115
+
116
+ 1. [Steps...]
117
+
118
+ ## Options & Settings
119
+
120
+ | Option | Description | Default |
121
+ |--------|-------------|---------|
122
+ | [Option 1] | [What it does] | [Default value] |
123
+ | [Option 2] | [What it does] | [Default value] |
124
+
125
+ ## Common Workflows
126
+
127
+ ### [Workflow 1: e.g., "Review and Approve Shops"]
128
+
129
+ 1. [Step 1]
130
+ 2. [Step 2]
131
+ 3. [Step 3]
132
+
133
+ ### [Workflow 2: e.g., "Bulk Edit Multiple Items"]
134
+
135
+ 1. [Step 1]
136
+ 2. [Step 2]
137
+
138
+ ## Troubleshooting
139
+
140
+ ### [Common Issue 1]
141
+
142
+ **Symptoms:** [What the user sees]
143
+
144
+ **Solution:** [How to fix it]
145
+
146
+ ### [Common Issue 2]
147
+
148
+ **Symptoms:** [What the user sees]
149
+
150
+ **Solution:** [How to fix it]
151
+
152
+ ---
153
+
154
+ *Generated for Issue #[number] on [date]*
155
+ ```
156
+
157
+ ### 4. Content Guidelines
158
+
159
+ **Focus on operational usage, not technical implementation:**
160
+
161
+ - "Click the 'Approve' button to publish the shop"
162
+ - NOT: "The `approveShop` function updates the database"
163
+
164
+ - "Wait for the green success message"
165
+ - NOT: "The API returns a 200 status code"
166
+
167
+ **Be specific and actionable:**
168
+
169
+ - "Navigate to Admin → Shops → Review Queue"
170
+ - NOT: "Go to the review page"
171
+
172
+ **Include visual cues when relevant:**
173
+
174
+ - "Look for the blue 'Edit' icon next to each row"
175
+ - NOT: "Click the edit button"
176
+
177
+ **Document common workflows end-to-end:**
178
+
179
+ - "To approve a shop: 1. Open Review Queue, 2. Click shop name, 3. Review details in each tab, 4. Click Approve"
180
+ - NOT: "Use the approve button to approve shops"
181
+
182
+ ### 5. File Naming Convention
183
+
184
+ Generate filename from feature name:
185
+ - Use lowercase with hyphens
186
+ - Be descriptive but concise
187
+ - Match the primary feature purpose
188
+
189
+ Examples:
190
+ - `shop-review-queue.md` - For shop review admin page
191
+ - `bulk-edit-operations.md` - For bulk editing feature
192
+ - `city-configuration.md` - For city config admin
193
+ - `feature-gallery.md` - For maps gallery feature
194
+
195
+ ### 6. Output and Summary
196
+
197
+ After generating documentation:
198
+
199
+ 1. **Create the documentation file:**
200
+ - Write to `docs/admin/[feature-name].md` or `docs/features/[feature-name].md`
201
+ - Ensure directory exists (create with `.gitkeep` if needed)
202
+
203
+ 2. **Post summary comment to GitHub issue:**
204
+ ```bash
205
+ gh issue comment <issue-number> --body "$(cat <<'EOF'
206
+ ## Documentation Generated
207
+
208
+ **File:** `docs/[admin|features]/[filename].md`
209
+
210
+ ### Sections Included:
211
+ - Quick Start
212
+ - Access (URL, menu, permissions)
213
+ - Usage (step-by-step workflows)
214
+ - Options & Settings
215
+ - Common Workflows
216
+ - Troubleshooting
217
+
218
+ ### Next Steps:
219
+ 1. Review generated documentation for accuracy
220
+ 2. Add screenshots if helpful (optional)
221
+ 3. Merge PR to deploy documentation
222
+
223
+ ---
224
+ Ready to merge!
225
+ EOF
226
+ )"
227
+ ```
228
+
229
+ ### 7. Quality Checklist
230
+
231
+ Before completing, verify:
232
+
233
+ - [ ] Documentation is operational (how to use, not how it works)
234
+ - [ ] All user-facing actions are documented
235
+ - [ ] Steps are numbered and specific
236
+ - [ ] Options/settings are in table format
237
+ - [ ] At least 1-2 troubleshooting items included
238
+ - [ ] Filename follows naming convention
239
+ - [ ] Correct folder (`docs/admin/` vs `docs/features/`)
240
+ - [ ] Summary comment posted to issue
241
+
242
+ ## Workflow Integration
243
+
244
+ The `/docs` command is the final step before merging:
245
+
246
+ ```
247
+ /spec → /exec → /test (optional) → /qa → /docs
248
+ ```
249
+
250
+ **After /qa passes:**
251
+ - Run `/docs <issue>` to generate feature documentation
252
+ - Review generated docs for accuracy
253
+ - Add screenshots if helpful
254
+ - Merge PR
255
+
256
+ ## Example Output
257
+
258
+ For Issue #180 (City Configuration UI):
259
+
260
+ **File:** `docs/admin/city-configuration.md`
261
+
262
+ ```markdown
263
+ # City Configuration
264
+
265
+ **Quick Start:** Add and manage cities through the Admin CMS. Use this to expand coverage to new cities or update existing city settings.
266
+
267
+ ## Access
268
+
269
+ - **URL:** `/admin/cities`
270
+ - **Menu:** Admin → Cities
271
+ - **Permissions:** Admin access required
272
+
273
+ ## Usage
274
+
275
+ ### Adding a New City
276
+
277
+ 1. Navigate to Admin → Cities
278
+ 2. Click the "Add City" button (top right)
279
+ 3. Complete the 4-step wizard:
280
+ - **Step 1 - Basic Info:** Enter city name, state, and select status
281
+ - **Step 2 - Geography:** Set center coordinates and map bounds
282
+ - **Step 3 - Discovery:** Configure shop discovery settings
283
+ - **Step 4 - Review:** Confirm all settings
284
+ 4. Click "Create City" to save
285
+
286
+ ### Editing an Existing City
287
+
288
+ 1. Navigate to Admin → Cities
289
+ 2. Click on the city card to open details
290
+ 3. Click "Edit" in the Config tab
291
+ 4. Update settings as needed
292
+ 5. Click "Save Changes"
293
+
294
+ ## Options & Settings
295
+
296
+ | Option | Description | Default |
297
+ |--------|-------------|---------|
298
+ | Status | City visibility (active, in_development, coming_soon) | in_development |
299
+ | Timezone | City timezone for hours display | America/New_York |
300
+ | Map Bounds | Visible area on city map | Auto-calculated |
301
+
302
+ ## Common Workflows
303
+
304
+ ### Launch a New City
305
+
306
+ 1. Add city via wizard (status: in_development)
307
+ 2. Run shop discovery scripts
308
+ 3. Review and approve shops in Review Queue
309
+ 4. Change city status to "active"
310
+ 5. City appears on homepage
311
+
312
+ ## Troubleshooting
313
+
314
+ ### City doesn't appear on homepage
315
+
316
+ **Symptoms:** City was added but doesn't show in city selector
317
+
318
+ **Solution:** Check city status is set to "active" in Admin → Cities → [City] → Config
319
+
320
+ ---
321
+
322
+ *Generated for Issue #180 on 2025-11-25*
323
+ ```