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,266 @@
1
+ ---
2
+ name: verify
3
+ description: Execution verification for CLI/script features — runs commands and captures output for human review. Use after /exec for script changes.
4
+ license: MIT
5
+ metadata:
6
+ author: sequant
7
+ version: "1.0"
8
+ allowed-tools:
9
+ - Bash(*)
10
+ - Read
11
+ - Glob
12
+ - Grep
13
+ - AskUserQuestion
14
+ - Bash(gh issue view:*)
15
+ - Bash(gh issue comment:*)
16
+ ---
17
+
18
+ # Execution Verification
19
+
20
+ You are the "Execution Verification Agent" for the current repository.
21
+
22
+ ## Purpose
23
+
24
+ When invoked as `/verify`, your job is to:
25
+
26
+ 1. Run the specified command for a CLI/script feature.
27
+ 2. Capture and display the command output (stdout/stderr).
28
+ 3. Prompt for human confirmation that output matches expected behavior.
29
+ 4. Post verification evidence to the GitHub issue.
30
+
31
+ This is the CLI equivalent of `/test` (which handles UI features via browser testing).
32
+
33
+ ## When to Use
34
+
35
+ Use `/verify` for:
36
+ - New scripts in `scripts/`
37
+ - CLI tool changes
38
+ - Automation features
39
+ - Anything with terminal output as primary interface
40
+
41
+ ## Invocation
42
+
43
+ ```bash
44
+ # With explicit command
45
+ /verify 559 --command "npx tsx scripts/dev/execute-issues.ts 535 --phases spec"
46
+
47
+ # With issue only (will prompt for command)
48
+ /verify 559
49
+ ```
50
+
51
+ ## Behavior
52
+
53
+ ### 1. Parse Arguments
54
+
55
+ Extract from the invocation:
56
+ - **Issue number:** The GitHub issue being verified
57
+ - **Command:** The command to execute (from `--command` flag or prompted)
58
+
59
+ If no command provided:
60
+ ```
61
+ Ask: "What command should I run to verify this feature?"
62
+ ```
63
+
64
+ ### 2. Verify Issue Context
65
+
66
+ ```bash
67
+ # Get issue details
68
+ gh issue view <issue-number> --json title,body,labels
69
+ ```
70
+
71
+ Confirm this is a CLI/script feature by checking:
72
+ - Issue title/body mentions scripts, CLI, automation
73
+ - Files changed include `scripts/` directory
74
+ - Not a UI-only feature
75
+
76
+ ### 3. Execute Command
77
+
78
+ Run the specified command with a timeout:
79
+
80
+ ```bash
81
+ # Run with 2-minute timeout, capture both stdout and stderr
82
+ timeout 120 <command> 2>&1
83
+ ```
84
+
85
+ **Timeout handling:**
86
+ - Default: 2 minutes (120 seconds)
87
+ - If command exceeds timeout, capture partial output and note timeout
88
+
89
+ **Output capture:**
90
+ - Capture both stdout and stderr
91
+ - Truncate at 500 lines to prevent oversized GitHub comments
92
+ - Preserve formatting (colors stripped for readability)
93
+
94
+ ### 4. Display Output
95
+
96
+ Present the captured output to the user:
97
+
98
+ ```markdown
99
+ ## Execution Output
100
+
101
+ **Command:** `<command>`
102
+ **Exit code:** <0 or error code>
103
+ **Duration:** <X seconds>
104
+
105
+ <details>
106
+ <summary>Output (X lines)</summary>
107
+
108
+ ```
109
+ [captured output here]
110
+ ```
111
+
112
+ </details>
113
+ ```
114
+
115
+ ### 5. Prompt for Confirmation
116
+
117
+ Use AskUserQuestion to get human confirmation:
118
+
119
+ ```
120
+ Question: Does this output match expected behavior for the feature?
121
+
122
+ Options:
123
+ - Yes, looks correct
124
+ - Partially - some issues but acceptable
125
+ - No, something is wrong
126
+ ```
127
+
128
+ ### 6. Handle Confirmation Response
129
+
130
+ **If "Yes" or "Partially":**
131
+ - Prepare verification evidence comment for GitHub
132
+ - Include: command, exit code, output summary, human confirmation
133
+
134
+ **If "No":**
135
+ - Ask for details about what's wrong
136
+ - Do NOT post verification (feature needs fixes)
137
+ - Suggest running `/exec` to address issues
138
+
139
+ ### 7. Post Verification to GitHub Issue
140
+
141
+ Post a comment with verification evidence:
142
+
143
+ ```markdown
144
+ ## Execution Verification
145
+
146
+ **Command:** `<command>`
147
+ **Result:** Verified by human review
148
+
149
+ <details>
150
+ <summary>Execution Output (click to expand)</summary>
151
+
152
+ **Exit code:** <code>
153
+ **Duration:** <duration>
154
+
155
+ ```
156
+ [truncated output - first 100 lines]
157
+ ```
158
+
159
+ [Output truncated at 100 lines - X total lines captured]
160
+
161
+ </details>
162
+
163
+ **Human Confirmation:**
164
+ > <confirmation response and any notes>
165
+
166
+ ---
167
+ *Verified by `/verify` command*
168
+ ```
169
+
170
+ ### 8. Exit Code Handling
171
+
172
+ Handle non-zero exit codes gracefully:
173
+
174
+ | Exit Code | Interpretation |
175
+ |-----------|----------------|
176
+ | 0 | Success |
177
+ | 1-125 | Command failed (show error output) |
178
+ | 124 | Timeout (command exceeded 2 minutes) |
179
+ | 126 | Permission denied |
180
+ | 127 | Command not found |
181
+
182
+ For non-zero exits:
183
+ - Still display output
184
+ - Still ask for confirmation (failure might be expected for testing error paths)
185
+ - Note the failure in the verification comment
186
+
187
+ ## Output Truncation
188
+
189
+ To prevent oversized GitHub comments (64KB limit):
190
+
191
+ 1. Capture full output to temp file
192
+ 2. Count lines
193
+ 3. If > 500 lines:
194
+ - Show first 100 lines in comment
195
+ - Note: "[Output truncated at 100 lines - X total lines captured]"
196
+ 4. Preserve full output locally for reference
197
+
198
+ ## Examples
199
+
200
+ ### Example 1: Successful Verification
201
+
202
+ ```bash
203
+ /verify 558 --command "npx tsx scripts/dev/execute-issues.ts 535 --phases spec --dry-run"
204
+ ```
205
+
206
+ Output:
207
+ ```
208
+ Starting execution for issues: 535
209
+ Phase: spec
210
+ Dry run mode: enabled
211
+ ...
212
+ Completed successfully
213
+ ```
214
+
215
+ Human confirms: "Yes, looks correct"
216
+
217
+ -> Posts verification evidence to issue #558
218
+
219
+ ### Example 2: Command Failure (Expected)
220
+
221
+ ```bash
222
+ /verify 559 --command "npx tsx scripts/dev/test-error-handling.ts --trigger-error"
223
+ ```
224
+
225
+ Output:
226
+ ```
227
+ Triggering intentional error...
228
+ Error: Test error triggered as expected
229
+ Exit code: 1
230
+ ```
231
+
232
+ Human confirms: "Yes, this error was expected - testing error handling"
233
+
234
+ -> Posts verification evidence noting expected failure
235
+
236
+ ### Example 3: No Command Provided
237
+
238
+ ```bash
239
+ /verify 560
240
+ ```
241
+
242
+ Agent prompts: "What command should I run to verify this feature?"
243
+
244
+ User provides: "npx tsx scripts/audit/check-coverage.ts nashville"
245
+
246
+ -> Proceeds with verification
247
+
248
+ ## Integration with /qa
249
+
250
+ The `/qa` skill will:
251
+ 1. Detect when `scripts/` files are modified
252
+ 2. Prompt to run `/verify` before `READY_FOR_MERGE`
253
+ 3. Check for "Execution Verification" section in issue comments
254
+
255
+ This ensures CLI/script features are actually tested, not just code-reviewed.
256
+
257
+ ## Error Recovery
258
+
259
+ If verification fails due to infrastructure issues:
260
+
261
+ 1. **Network timeout:** Retry once, then note as infrastructure issue
262
+ 2. **Missing dependencies:** Run `npm install` and retry
263
+ 3. **Environment issues:** Check for `.env.local` and required vars
264
+ 4. **File not found:** Verify worktree is correct, check file paths
265
+
266
+ Report infrastructure issues separately from feature issues.