sequant 1.1.0 → 1.1.2

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 (64) hide show
  1. package/dist/bin/cli.js +21 -3
  2. package/dist/bin/cli.js.map +1 -1
  3. package/dist/src/commands/doctor.d.ts.map +1 -1
  4. package/dist/src/commands/doctor.js +1 -25
  5. package/dist/src/commands/doctor.js.map +1 -1
  6. package/dist/src/commands/doctor.test.js +28 -97
  7. package/dist/src/commands/doctor.test.js.map +1 -1
  8. package/dist/src/commands/init.d.ts.map +1 -1
  9. package/dist/src/commands/init.js +3 -27
  10. package/dist/src/commands/init.js.map +1 -1
  11. package/dist/src/commands/init.test.js +32 -75
  12. package/dist/src/commands/init.test.js.map +1 -1
  13. package/dist/src/commands/logs.d.ts +18 -0
  14. package/dist/src/commands/logs.d.ts.map +1 -0
  15. package/dist/src/commands/logs.js +188 -0
  16. package/dist/src/commands/logs.js.map +1 -0
  17. package/dist/src/commands/run.d.ts +10 -1
  18. package/dist/src/commands/run.d.ts.map +1 -1
  19. package/dist/src/commands/run.js +429 -98
  20. package/dist/src/commands/run.js.map +1 -1
  21. package/dist/src/commands/update.d.ts.map +1 -1
  22. package/dist/src/commands/update.js +16 -0
  23. package/dist/src/commands/update.js.map +1 -1
  24. package/dist/src/lib/system.d.ts +16 -0
  25. package/dist/src/lib/system.d.ts.map +1 -0
  26. package/dist/src/lib/system.js +52 -0
  27. package/dist/src/lib/system.js.map +1 -0
  28. package/dist/src/lib/system.test.d.ts +2 -0
  29. package/dist/src/lib/system.test.d.ts.map +1 -0
  30. package/dist/src/lib/system.test.js +80 -0
  31. package/dist/src/lib/system.test.js.map +1 -0
  32. package/dist/src/lib/workflow/log-writer.d.ts +83 -0
  33. package/dist/src/lib/workflow/log-writer.d.ts.map +1 -0
  34. package/dist/src/lib/workflow/log-writer.js +193 -0
  35. package/dist/src/lib/workflow/log-writer.js.map +1 -0
  36. package/dist/src/lib/workflow/log-writer.test.d.ts +7 -0
  37. package/dist/src/lib/workflow/log-writer.test.d.ts.map +1 -0
  38. package/dist/src/lib/workflow/log-writer.test.js +451 -0
  39. package/dist/src/lib/workflow/log-writer.test.js.map +1 -0
  40. package/dist/src/lib/workflow/run-log-schema.d.ts +261 -0
  41. package/dist/src/lib/workflow/run-log-schema.d.ts.map +1 -0
  42. package/dist/src/lib/workflow/run-log-schema.js +234 -0
  43. package/dist/src/lib/workflow/run-log-schema.js.map +1 -0
  44. package/dist/src/lib/workflow/run-log-schema.test.d.ts +2 -0
  45. package/dist/src/lib/workflow/run-log-schema.test.d.ts.map +1 -0
  46. package/dist/src/lib/workflow/run-log-schema.test.js +455 -0
  47. package/dist/src/lib/workflow/run-log-schema.test.js.map +1 -0
  48. package/package.json +4 -2
  49. package/templates/hooks/pre-tool.sh +14 -2
  50. package/templates/scripts/cleanup-worktree.sh +23 -1
  51. package/templates/skills/assess/SKILL.md +15 -0
  52. package/templates/skills/clean/SKILL.md +15 -0
  53. package/templates/skills/docs/SKILL.md +16 -0
  54. package/templates/skills/exec/SKILL.md +32 -0
  55. package/templates/skills/fullsolve/SKILL.md +42 -0
  56. package/templates/skills/loop/SKILL.md +14 -0
  57. package/templates/skills/qa/SKILL.md +67 -0
  58. package/templates/skills/reflect/SKILL.md +14 -0
  59. package/templates/skills/security-review/SKILL.md +15 -0
  60. package/templates/skills/solve/SKILL.md +44 -0
  61. package/templates/skills/spec/SKILL.md +59 -0
  62. package/templates/skills/test/SKILL.md +14 -0
  63. package/templates/skills/testgen/SKILL.md +15 -0
  64. package/templates/skills/verify/SKILL.md +15 -0
@@ -65,6 +65,24 @@ Invocation:
65
65
  - `/exec <freeform description>`:
66
66
  - Treat the text as a lightweight description + AC if no issue context is available.
67
67
 
68
+ ### 0. Pre-flight Check (After Context Restoration)
69
+
70
+ **CRITICAL:** If continuing from a restored/summarized conversation, verify git state first:
71
+
72
+ ```bash
73
+ # Check current state - are we in a worktree or main repo?
74
+ pwd
75
+ git log --oneline -3 --stat
76
+
77
+ # Check for existing PRs or branches for this issue
78
+ gh pr list --search "<issue-number>"
79
+ git branch -a | grep -i "<issue-number>"
80
+ ```
81
+
82
+ **Why this matters:** After context restoration, PRs may have merged, branches may have changed, or work may already be complete. Always verify before creating duplicate work.
83
+
84
+ **If PR already merged:** The issue may be complete - verify and close if so.
85
+
68
86
  ### 1. Check Implementation Readiness
69
87
 
70
88
  **FIRST STEP:** Review the issue readiness and proceed with implementation.
@@ -416,3 +434,17 @@ At the end of a session:
416
434
  ```
417
435
 
418
436
  You may be invoked multiple times for the same issue. Each time, re-establish context, ensure you're in the correct worktree, and continue iterating until we are as close as practical to meeting the AC.
437
+
438
+ ---
439
+
440
+ ## Output Verification
441
+
442
+ **Before responding, verify your output includes ALL of these:**
443
+
444
+ - [ ] **AC Progress Summary** - Which AC items are satisfied, partially met, or blocked
445
+ - [ ] **Files Changed** - List of key files modified
446
+ - [ ] **Test/Build Results** - Output from `npm test` and `npm run build`
447
+ - [ ] **Progress Update Draft** - Formatted comment for GitHub issue
448
+ - [ ] **Next Steps** - Clear guidance on remaining work
449
+
450
+ **DO NOT respond until all items are verified.**
@@ -90,6 +90,32 @@ When invoked as `/fullsolve <issue-number>`, execute the complete issue resoluti
90
90
  /fullsolve 218 --max-iterations 5 # Override max fix iterations
91
91
  ```
92
92
 
93
+ ## Phase 0: Pre-flight Checks
94
+
95
+ **CRITICAL after context restoration:** Before starting any work, verify the current git state to avoid duplicate work.
96
+
97
+ ### 0.1 Git State Verification
98
+
99
+ ```bash
100
+ # Check current branch and recent commits
101
+ git log --oneline -5 --stat
102
+
103
+ # Check for any existing work on this issue
104
+ git branch -a | grep -i "<issue-number>"
105
+ gh pr list --search "<issue-number>"
106
+ ```
107
+
108
+ **Why this matters:** After context restoration from a summarized conversation, the git state may have changed (PRs merged, rebases, etc.). Always verify what's already been done before creating files or making changes.
109
+
110
+ ### 0.2 Existing Work Detection
111
+
112
+ Before creating any files, check if they already exist:
113
+ - Look for test files: `ls -la src/**/*.test.ts`
114
+ - Check recent commits for relevant changes
115
+ - Verify PR status if one was mentioned in context
116
+
117
+ **If work already exists:** Skip to the appropriate phase (e.g., if implementation is done, go to Phase 3 or 4).
118
+
93
119
  ## Phase 1: Planning (SPEC)
94
120
 
95
121
  Execute the planning phase inline (not as separate command):
@@ -479,3 +505,19 @@ For multiple issues, run `/fullsolve` on each sequentially:
479
505
  ```
480
506
 
481
507
  Each issue gets its own worktree, PR, and quality validation.
508
+
509
+ ---
510
+
511
+ ## Output Verification
512
+
513
+ **Before responding, verify your output includes ALL of these:**
514
+
515
+ - [ ] **Progress Table** - Phase, iterations, and status for each phase
516
+ - [ ] **AC Coverage** - Each AC marked MET/PARTIALLY_MET/NOT_MET
517
+ - [ ] **Quality Metrics** - Tests passed, build status, type issues
518
+ - [ ] **Iteration Summary** - Test loop and QA loop iteration counts
519
+ - [ ] **Final Verdict** - READY_FOR_MERGE, AC_MET_BUT_NOT_A_PLUS, or AC_NOT_MET
520
+ - [ ] **PR Link** - Pull request URL (if created)
521
+ - [ ] **Final GitHub Comment** - Summary posted to issue
522
+
523
+ **DO NOT respond until all items are verified.**
@@ -311,3 +311,17 @@ Please run /exec <N> first to create the worktree.
311
311
  **Max iterations:** 3 (prevents infinite loops)
312
312
  **Re-validation after each fix:** Required
313
313
  **GitHub comment:** Posted after loop completion
314
+
315
+ ---
316
+
317
+ ## Output Verification
318
+
319
+ **Before responding, verify your output includes ALL of these:**
320
+
321
+ - [ ] **Iteration Progress** - Current iteration X/3
322
+ - [ ] **Issues from Previous Phase** - List of issues being fixed
323
+ - [ ] **Fixes Applied** - Each fix with file:line location
324
+ - [ ] **Re-validation Results** - Tests/build/AC status after fixes
325
+ - [ ] **Final Status** - FIXED, NEEDS_MORE_WORK, or MAX_ITERATIONS_REACHED
326
+
327
+ **DO NOT respond until all items are verified.**
@@ -277,3 +277,70 @@ fi
277
277
 
278
278
  /qa 558 # Re-run, now sees verification, can give READY_FOR_MERGE
279
279
  ```
280
+
281
+ ---
282
+
283
+ ## Output Verification
284
+
285
+ **Before responding, verify your output includes ALL of these:**
286
+
287
+ - [ ] **AC Coverage** - Each AC item marked as MET, PARTIALLY_MET, or NOT_MET
288
+ - [ ] **Verdict** - One of: READY_FOR_MERGE, AC_MET_BUT_NOT_A_PLUS, AC_NOT_MET
289
+ - [ ] **Quality Metrics** - Type issues, deleted tests, files changed, additions/deletions
290
+ - [ ] **Code Review Findings** - Strengths, issues, suggestions
291
+ - [ ] **Next Steps** - Clear, actionable recommendations
292
+
293
+ **DO NOT respond until all items are verified.**
294
+
295
+ ## Output Template
296
+
297
+ You MUST include these sections:
298
+
299
+ ```markdown
300
+ ## QA Review for Issue #<N>
301
+
302
+ ### AC Coverage
303
+
304
+ | AC | Description | Status | Notes |
305
+ |----|-------------|--------|-------|
306
+ | AC-1 | [description] | MET/PARTIALLY_MET/NOT_MET | [explanation] |
307
+ | AC-2 | [description] | MET/PARTIALLY_MET/NOT_MET | [explanation] |
308
+
309
+ **Coverage:** X/Y AC items fully met
310
+
311
+ ---
312
+
313
+ ### Quality Metrics
314
+
315
+ | Metric | Value | Status |
316
+ |--------|-------|--------|
317
+ | Type issues (`any`) | X | OK/WARN |
318
+ | Deleted tests | X | OK/WARN |
319
+ | Files changed | X | OK/WARN |
320
+ | Lines added | +X | - |
321
+ | Lines deleted | -X | - |
322
+
323
+ ---
324
+
325
+ ### Code Review
326
+
327
+ **Strengths:**
328
+ - [Positive findings]
329
+
330
+ **Issues:**
331
+ - [Problems found]
332
+
333
+ **Suggestions:**
334
+ - [Improvements recommended]
335
+
336
+ ---
337
+
338
+ ### Verdict: [READY_FOR_MERGE | AC_MET_BUT_NOT_A_PLUS | AC_NOT_MET]
339
+
340
+ [Explanation of verdict]
341
+
342
+ ### Next Steps
343
+
344
+ 1. [Action item 1]
345
+ 2. [Action item 2]
346
+ ```
@@ -159,3 +159,17 @@ At the end of reflection, ask:
159
159
  - Did I identify root causes or just symptoms?
160
160
  - Will these changes be maintainable long-term?
161
161
  - Am I in the right workflow phase for this reflection focus?
162
+
163
+ ---
164
+
165
+ ## Output Verification
166
+
167
+ **Before responding, verify your output includes ALL of these:**
168
+
169
+ - [ ] **Session Summary** - What was accomplished, what went well, friction points
170
+ - [ ] **Effectiveness Analysis** - Token efficiency, context gathering, pattern reuse
171
+ - [ ] **Proposed Changes** - Specific changes with target files and rationale
172
+ - [ ] **Documentation Health** - Line count, bloat assessment, recommendations
173
+ - [ ] **Action Items** - Checklist of concrete next steps
174
+
175
+ **DO NOT respond until all items are verified.**
@@ -342,3 +342,18 @@ EOF
342
342
  - Trace session lifecycle
343
343
  - Review token handling
344
344
  - Check for timing vulnerabilities
345
+
346
+ ---
347
+
348
+ ## Output Verification
349
+
350
+ **Before responding, verify your output includes ALL of these:**
351
+
352
+ - [ ] **Security Domain** - Identified domains (Auth, API, Admin, Data, Infra)
353
+ - [ ] **Threat Model Summary** - Attack surface, threat actors, attack vectors
354
+ - [ ] **Findings by Severity** - Critical, High, Medium, Low/Informational
355
+ - [ ] **Checklist Status Table** - Passed/Failed/Manual counts per domain
356
+ - [ ] **Verdict** - SECURE, WARNINGS, or ISSUES_FOUND
357
+ - [ ] **GitHub Comment** - Security review posted to issue
358
+
359
+ **DO NOT respond until all items are verified.**
@@ -194,3 +194,47 @@ If issues depend on each other:
194
194
  2. (Wait for PR merge)
195
195
  3. /fullsolve 154
196
196
  ```
197
+
198
+ ---
199
+
200
+ ## Output Verification
201
+
202
+ **Before responding, verify your output includes ALL of these:**
203
+
204
+ - [ ] **Issue Summary Table** - Table with Issue, Title, Labels, Workflow columns
205
+ - [ ] **Recommended Workflow** - Slash commands in order for each issue
206
+ - [ ] **CLI Command** - `sequant run <issue-numbers>` command (REQUIRED)
207
+ - [ ] **Explanation** - Brief notes explaining workflow choices
208
+
209
+ **DO NOT respond until all items are verified.**
210
+
211
+ ## Output Template
212
+
213
+ You MUST use this exact structure:
214
+
215
+ ```markdown
216
+ ## Solve Workflow for Issues: <ISSUE_NUMBERS>
217
+
218
+ ### Issue Analysis
219
+
220
+ | Issue | Title | Labels | Workflow |
221
+ |-------|-------|--------|----------|
222
+ <!-- FILL: one row per issue -->
223
+
224
+ ### Recommended Workflow
225
+
226
+ **For #<N> (<type>):**
227
+ \`\`\`bash
228
+ <!-- FILL: slash commands in order -->
229
+ \`\`\`
230
+
231
+ ### CLI Command
232
+
233
+ Run from terminal (useful for automation/CI):
234
+ \`\`\`bash
235
+ sequant run <ISSUE_NUMBERS>
236
+ \`\`\`
237
+
238
+ ### Notes
239
+ <!-- FILL: explanation of workflow choices -->
240
+ ```
@@ -166,3 +166,62 @@ Post the draft comment to GitHub:
166
166
  gh issue comment <issue-number> --body "..."
167
167
  gh issue edit <issue-number> --add-label "planned"
168
168
  ```
169
+
170
+ ---
171
+
172
+ ## Output Verification
173
+
174
+ **Before responding, verify your output includes ALL of these:**
175
+
176
+ - [ ] **AC Checklist** - Numbered AC items (AC-1, AC-2, etc.) with descriptions
177
+ - [ ] **Verification Criteria** - Each AC has Verification Method and Test Scenario
178
+ - [ ] **Implementation Plan** - 3-7 concrete steps with codebase references
179
+ - [ ] **Open Questions** - Any ambiguities with recommended defaults
180
+ - [ ] **Issue Comment Draft** - Formatted for GitHub posting
181
+
182
+ **DO NOT respond until all items are verified.**
183
+
184
+ ## Output Template
185
+
186
+ You MUST include these sections in order:
187
+
188
+ ```markdown
189
+ ## Acceptance Criteria
190
+
191
+ ### AC-1: [Description]
192
+
193
+ **Verification Method:** [Unit Test | Integration Test | Browser Test | Manual Test]
194
+
195
+ **Test Scenario:**
196
+ - Given: [Initial state]
197
+ - When: [Action]
198
+ - Then: [Expected outcome]
199
+
200
+ ### AC-2: [Description]
201
+ <!-- Continue for all AC items -->
202
+
203
+ ---
204
+
205
+ ## Implementation Plan
206
+
207
+ ### Phase 1: [Phase Name]
208
+ 1. [Step with specific file/component references]
209
+ 2. [Step]
210
+
211
+ ### Phase 2: [Phase Name]
212
+ <!-- Continue for all phases -->
213
+
214
+ ---
215
+
216
+ ## Open Questions
217
+
218
+ 1. **[Question]**
219
+ - Recommendation: [Default choice]
220
+ - Impact: [What happens if wrong]
221
+
222
+ ---
223
+
224
+ --- DRAFT GITHUB ISSUE COMMENT (PLAN) ---
225
+
226
+ [Complete formatted comment for GitHub]
227
+ ```
@@ -507,3 +507,17 @@ Testing session is complete when:
507
507
  Both can be used together:
508
508
  1. `/test` → Verify feature works for users
509
509
  2. `/qa` → Verify code quality and completeness
510
+
511
+ ---
512
+
513
+ ## Output Verification
514
+
515
+ **Before responding, verify your output includes ALL of these:**
516
+
517
+ - [ ] **Test Summary** - X/Y tests passed
518
+ - [ ] **Test Results Table** - Each test marked PASS, FAIL, or BLOCKED
519
+ - [ ] **Bugs Found** - List of bugs with file:line locations (if any)
520
+ - [ ] **Coverage** - Completed, failed, blocked, remaining counts
521
+ - [ ] **Recommendations** - Next steps for failures or follow-up
522
+
523
+ **DO NOT respond until all items are verified.**
@@ -558,3 +558,18 @@ For Issue #452 (hooks):
558
558
  ---
559
559
  Generated with [Claude Code](https://claude.com/claude-code)
560
560
  ```
561
+
562
+ ---
563
+
564
+ ## Output Verification
565
+
566
+ **Before responding, verify your output includes ALL of these:**
567
+
568
+ - [ ] **AC Parsing** - Each AC identified with verification method
569
+ - [ ] **Test Stubs Generated** - Files created for Unit/Integration tests
570
+ - [ ] **Browser/Manual Scenarios** - Written for applicable AC items
571
+ - [ ] **Failure Paths** - Error handling stubs for each AC
572
+ - [ ] **Summary Table** - AC count, happy path count, failure path count
573
+ - [ ] **GitHub Comment** - Summary posted to issue
574
+
575
+ **DO NOT respond until all items are verified.**
@@ -264,3 +264,18 @@ If verification fails due to infrastructure issues:
264
264
  4. **File not found:** Verify worktree is correct, check file paths
265
265
 
266
266
  Report infrastructure issues separately from feature issues.
267
+
268
+ ---
269
+
270
+ ## Output Verification
271
+
272
+ **Before responding, verify your output includes ALL of these:**
273
+
274
+ - [ ] **Command Executed** - The exact command that was run
275
+ - [ ] **Exit Code** - Success (0) or error code
276
+ - [ ] **Duration** - How long the command took
277
+ - [ ] **Output Sample** - Captured stdout/stderr (truncated if needed)
278
+ - [ ] **Human Confirmation** - User's verification response recorded
279
+ - [ ] **GitHub Comment** - Verification evidence posted to issue
280
+
281
+ **DO NOT respond until all items are verified.**