sequant 2.0.1 → 2.1.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 (58) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/dist/bin/cli.js +2 -1
  4. package/dist/marketplace/external_plugins/sequant/.claude-plugin/plugin.json +1 -1
  5. package/dist/marketplace/external_plugins/sequant/.mcp.json +6 -0
  6. package/dist/marketplace/external_plugins/sequant/README.md +58 -8
  7. package/dist/marketplace/external_plugins/sequant/hooks/post-tool.sh +19 -8
  8. package/dist/marketplace/external_plugins/sequant/hooks/pre-tool.sh +36 -49
  9. package/dist/marketplace/external_plugins/sequant/skills/_shared/references/subagent-types.md +158 -48
  10. package/dist/marketplace/external_plugins/sequant/skills/assess/SKILL.md +354 -352
  11. package/dist/marketplace/external_plugins/sequant/skills/exec/SKILL.md +1155 -33
  12. package/dist/marketplace/external_plugins/sequant/skills/fullsolve/SKILL.md +35 -4
  13. package/dist/marketplace/external_plugins/sequant/skills/qa/SKILL.md +2157 -104
  14. package/dist/marketplace/external_plugins/sequant/skills/qa/scripts/quality-checks.sh +1 -1
  15. package/dist/marketplace/external_plugins/sequant/skills/setup/SKILL.md +386 -0
  16. package/dist/marketplace/external_plugins/sequant/skills/solve/SKILL.md +38 -664
  17. package/dist/marketplace/external_plugins/sequant/skills/spec/SKILL.md +505 -120
  18. package/dist/marketplace/external_plugins/sequant/skills/test/SKILL.md +246 -1
  19. package/dist/marketplace/external_plugins/sequant/skills/testgen/SKILL.md +138 -1
  20. package/dist/src/commands/dashboard.js +1 -1
  21. package/dist/src/commands/doctor.js +1 -1
  22. package/dist/src/commands/init.js +10 -10
  23. package/dist/src/commands/logs.js +1 -1
  24. package/dist/src/commands/run.js +49 -39
  25. package/dist/src/commands/state.js +3 -3
  26. package/dist/src/commands/status.js +5 -5
  27. package/dist/src/commands/sync.js +8 -8
  28. package/dist/src/commands/update.js +16 -16
  29. package/dist/src/lib/cli-ui.js +20 -19
  30. package/dist/src/lib/merge-check/index.js +2 -2
  31. package/dist/src/lib/settings.d.ts +8 -0
  32. package/dist/src/lib/settings.js +1 -0
  33. package/dist/src/lib/shutdown.js +1 -1
  34. package/dist/src/lib/templates.js +2 -0
  35. package/dist/src/lib/wizard.js +6 -4
  36. package/dist/src/lib/workflow/batch-executor.js +1 -1
  37. package/dist/src/lib/workflow/log-writer.js +6 -6
  38. package/dist/src/lib/workflow/metrics-writer.js +5 -3
  39. package/dist/src/lib/workflow/phase-executor.js +5 -1
  40. package/dist/src/lib/workflow/platforms/github.js +5 -1
  41. package/dist/src/lib/workflow/state-cleanup.js +1 -1
  42. package/dist/src/lib/workflow/state-manager.js +15 -13
  43. package/dist/src/lib/workflow/state-rebuild.js +2 -2
  44. package/dist/src/lib/workflow/types.d.ts +11 -0
  45. package/dist/src/lib/workflow/worktree-manager.js +40 -41
  46. package/dist/src/lib/worktree-isolation.d.ts +130 -0
  47. package/dist/src/lib/worktree-isolation.js +310 -0
  48. package/package.json +8 -8
  49. package/templates/agents/sequant-explorer.md +23 -0
  50. package/templates/agents/sequant-implementer.md +18 -0
  51. package/templates/agents/sequant-qa-checker.md +24 -0
  52. package/templates/agents/sequant-testgen.md +25 -0
  53. package/templates/scripts/cleanup-worktree.sh +18 -0
  54. package/templates/skills/_shared/references/subagent-types.md +158 -48
  55. package/templates/skills/exec/SKILL.md +72 -6
  56. package/templates/skills/qa/SKILL.md +8 -217
  57. package/templates/skills/spec/SKILL.md +446 -120
  58. package/templates/skills/testgen/SKILL.md +138 -1
@@ -1,697 +1,71 @@
1
1
  ---
2
2
  name: solve
3
- description: "Generate the recommended workflow for one or more GitHub issues"
3
+ description: "Deprecated: alias for /assess. Generate the recommended workflow for one or more GitHub issues."
4
4
  license: MIT
5
5
  metadata:
6
6
  author: sequant
7
- version: "1.0"
7
+ version: "2.0"
8
8
  allowed-tools:
9
- - Bash(gh issue view:*)
10
- - Bash(gh issue comment:*)
9
+ - Read
10
+ - Glob
11
+ - Grep
12
+ - Bash(git *)
13
+ - Bash(gh *)
11
14
  ---
12
15
 
13
- # Solve Command Generator
16
+ # /solve Deprecated Alias for /assess
14
17
 
15
- You are the "Solve Command Generator" for the current repository.
18
+ **This command has been merged into `/assess`.** Use `/assess` instead.
16
19
 
17
- ## Purpose
20
+ ## Deprecation Notice
18
21
 
19
- When invoked as `/solve <issue-numbers>`, your job is to:
22
+ When invoked as `/solve <issue-numbers>`, display this notice:
20
23
 
21
- 1. Analyze the provided issue number(s)
22
- 2. Check labels to determine issue type
23
- 3. Recommend the optimal workflow sequence
24
- 4. **Output using the EXACT template format** (see Output Template section)
25
-
26
- ## CRITICAL: Output Requirements
27
-
28
- **You MUST follow the Output Template exactly.** Key requirements:
29
-
30
- 1. **Use the ASCII box header** with `npx sequant run <ISSUES> <FLAGS>`
31
- 2. **Include the Flags Table** showing ALL flags with ✓/✗:
32
- - `-q` (quality-loop) — **Default to ✓** unless trivial bug fix
33
- - `--chain` — ✓ if dependencies between issues
34
- - `--qa-gate` — ✓ if chain with 3+ issues
35
- - `--base` — ✓ if feature branch context
36
- - `--testgen` — ✓ if new feature needs tests
37
- 3. **Quality loop (`-q`) should be ✓ (enabled)** for most issues — only skip for simple bug fixes or docs-only changes
38
-
39
- **DO NOT** output free-form prose. Use the structured template.
40
-
41
- ## Behavior
42
-
43
- ### Invocation Formats
44
-
45
- - `/solve 152` - Single issue
46
- - `/solve 152 153 154` - Multiple issues
47
-
48
- ### Detection Logic
49
-
50
- For each issue, check GitHub labels to determine the workflow:
51
-
52
- ```bash
53
- gh issue view <issue-number> --json labels --jq '.labels[].name'
54
- ```
55
-
56
- **UI/Frontend Issues** (labels: `ui`, `frontend`, `admin`):
57
- - Include `/test` phase for browser testing
58
-
59
- **Backend/API Issues** (labels: `backend`, `api`, `cli`):
60
- - Skip browser testing, focus on unit/integration tests
61
-
62
- **Bug Fixes** (labels: `bug`, `fix`):
63
- - May need simpler workflow, possibly skip `/spec`
64
-
65
- **Complex Issues** (labels: `complex`, `refactor`, `breaking`, `major`):
66
- - Recommend `--quality-loop` flag for auto-retry on failures
67
- - Quality loop auto-enables for these labels in `sequant run`
68
-
69
- **New Features** (labels: `enhancement`, `feature`):
70
- - Include `testgen` phase when ACs need automated tests
71
- - Workflow: `spec → testgen → exec → qa`
72
-
73
- ### Quality Loop Detection
74
-
75
- Quality loop (`--quality-loop` or `-q`) provides automatic fix iterations when phases fail. **Recommend quality loop broadly** for any non-trivial work.
76
-
77
- **Always recommend `--quality-loop` when:**
78
- - Labels include: `complex`, `refactor`, `breaking`, `major` (auto-enabled)
79
- - Labels include: `enhancement`, `feature` (new functionality)
80
- - Issue involves multiple files or components
81
- - Issue title contains: "add", "implement", "create", "refactor", "update", "overhaul", "redesign", "improve", "rework", "revamp", "migrate", "convert", "design", "build", "develop"
82
- - Issue is NOT a simple bug fix with `bug` or `fix` label only
83
- - **Default: recommend quality loop unless explicitly trivial** — most issues benefit from retry capability
84
-
85
- **Skip quality loop recommendation only when:**
86
- - Simple bug fix (only `bug` or `fix` label, no other labels)
87
- - Documentation-only changes (`docs` label only)
88
- - Issue explicitly marked as trivial
89
-
90
- **Quality loop benefits:**
91
- - Auto-retries failed phases up to 3 times
92
- - Catches intermittent test failures
93
- - Handles build issues from dependency changes
94
- - Reduces manual intervention for recoverable errors
95
-
96
- ### Feature Branch Detection
97
-
98
- When analyzing issues, check if `--base` flag should be recommended.
99
-
100
- **Check for feature branch indicators:**
101
-
102
- ```bash
103
- # Check for feature branch references in issue body
104
- gh issue view <issue-number> --json body --jq '.body' | grep -iE "(feature/|branch from|based on|part of.*feature)" || true
105
-
106
- # Check issue labels for feature context
107
- gh issue view <issue-number> --json labels --jq '.labels[].name' | grep -iE "(dashboard|feature-|epic-)" || true
108
-
109
- # Check if project has defaultBase configured
110
- # Use the Read tool to check project settings
111
- Read(file_path=".sequant/settings.json")
112
- # Extract .run.defaultBase from the JSON
113
- ```
114
-
115
- **Recommend `--base <branch>` when:**
116
- - Issue body references a feature branch (e.g., "Part of dashboard feature")
117
- - Issue is labeled with a feature epic label (e.g., `dashboard`, `epic-auth`)
118
- - Multiple related issues reference the same parent feature
119
- - Project has `run.defaultBase` configured in settings
120
-
121
- **Do NOT recommend `--base` when:**
122
- - Issue should branch from main (default, most common)
123
- - No feature branch context detected
124
- - Issue is a standalone bug fix or independent feature
125
-
126
- ### Chain Mode Detection
127
-
128
- When analyzing multiple issues, determine if `--chain` flag should be recommended.
129
-
130
- **Check for chain indicators:**
131
-
132
- ```bash
133
- # Check for dependency keywords in issue body
134
- gh issue view <issue-number> --json body --jq '.body' | grep -iE "(depends on|blocked by|requires|after #|builds on)" || true
135
-
136
- # Check for sequence labels
137
- gh issue view <issue-number> --json labels --jq '.labels[].name' | grep -iE "(part-[0-9]|step-[0-9]|phase-[0-9])" || true
138
-
139
- # Check for related issue references
140
- gh issue view <issue-number> --json body --jq '.body' | grep -oE "#[0-9]+" || true
141
- ```
142
-
143
- **Recommend `--chain` when:**
144
- - Multiple issues have explicit dependencies (e.g., "depends on #123")
145
- - Issues are labeled as parts of a sequence (e.g., `part-1`, `part-2`)
146
- - Issue titles indicate sequence (e.g., "Part 1:", "Step 2:")
147
- - Issues reference each other in their bodies
148
- - Issues modify the same files in a specific order
149
-
150
- **Do NOT recommend `--chain` when:**
151
- - Single issue (chain requires 2+ issues)
152
- - Issues are independent (no shared files or dependencies)
153
- - Issues touch completely different areas of codebase
154
- - Parallel batch mode is more appropriate (unrelated issues)
155
-
156
- ### QA Gate Detection
157
-
158
- When recommending `--chain`, also consider if `--qa-gate` should be added.
159
-
160
- **Recommend `--qa-gate` when:**
161
- - Chain has 3+ issues (longer chains have higher stale code risk)
162
- - Issues have tight dependencies (later issues heavily rely on earlier ones)
163
- - Issues modify the same files across the chain
164
- - Production-critical or high-risk changes
165
-
166
- **Do NOT recommend `--qa-gate` when:**
167
- - Chain has only 2 issues (lower risk)
168
- - Issues are mostly independent despite chain structure
169
- - Speed is prioritized over safety
170
- - Simple, low-risk changes
171
-
172
- **Chain structure visualization:**
173
- ```
174
- origin/main → #10 → #11 → #12
175
- │ │ │
176
- └──────┴──────┴── Each branch builds on previous
177
- ```
178
-
179
- ## Output Format
180
-
181
- **Design Principles:**
182
- - Lead with the recommendation (command first, top-down)
183
- - Show all flag decisions explicitly with reasoning
184
- - Be concise — signal over prose
185
- - Visual hierarchy using ASCII boxes and lines
186
- - Max ~25 lines (excluding conflict warnings)
187
-
188
- **Required Sections (in order):**
189
-
190
- 1. **Header Box** — Command recommendation prominently displayed
191
- 2. **Issues List** — Compact: `#N Title ··· labels → workflow`
192
- 3. **Flags Table** — ALL flags with ✓/✗ and one-line reasoning
193
- 4. **Why Section** — 3-5 bullet points explaining key decisions
194
- 5. **Also Consider** — Conditional curated alternatives (0-3 items)
195
- 6. **Conflict Warning** — Only if in-flight work overlaps (conditional)
196
-
197
- ---
198
-
199
- ## Conflict Detection
200
-
201
- Before generating output, check for in-flight work that may conflict:
202
-
203
- ```bash
204
- # List open worktrees
205
- git worktree list --porcelain 2>/dev/null | grep "^worktree" | cut -d' ' -f2 || true
206
-
207
- # For each worktree, get changed files
208
- git -C <worktree-path> diff --name-only main...HEAD 2>/dev/null
209
24
  ```
210
-
211
- **If overlap detected** with files this issue likely touches, include warning:
212
- ```
213
- ⚠ Conflict risk: #45 (open) modifies lib/auth/* — coordinate or wait
25
+ ⚠ /solve is deprecated — use /assess instead.
26
+ /assess now includes workflow recommendations alongside health checks.
27
+ Running /assess for you...
214
28
  ```
215
29
 
216
- ---
217
-
218
- ## "Also Consider" Logic
219
-
220
- Only show alternatives representing genuine trade-offs. Max 2-3 items.
221
-
222
- | Condition | Show Alternative |
223
- |-----------|------------------|
224
- | Complex issues OR user unfamiliar with sequant | `--dry-run` (preview before executing) |
225
- | UI-adjacent AND test phase not included | `--phases +test` (add browser testing) |
226
- | Mild dependency risk between issues | `--sequential` (run one at a time) |
227
- | Dependencies ambiguous | Show both parallel and `--chain` options |
228
-
229
- **Rules:**
230
- - Omit section entirely if nothing worth showing
231
- - Never list every flag — only curated, contextual options
232
- - Each alternative needs one-line explanation
233
-
234
- ---
235
-
236
- ## Output Template
237
-
238
- You MUST use this exact structure:
239
-
240
- ```
241
- ╭──────────────────────────────────────────────────────────────╮
242
- │ sequant solve │
243
- │ │
244
- │ npx sequant run <ISSUES> <FLAGS> │
245
- ╰──────────────────────────────────────────────────────────────╯
246
-
247
- #<N> <Title truncated to ~35 chars> ·········· <labels> → <workflow>
248
- #<N> <Title truncated to ~35 chars> ·········· <labels> → <workflow>
249
-
250
- ┌─ Flags ──────────────────────────────────────────────────────┐
251
- │ -q quality-loop ✓/✗ <one-line reasoning> │
252
- │ --chain ✓/✗ <one-line reasoning> │
253
- │ --qa-gate ✓/✗ <one-line reasoning> │
254
- │ --base ✓/✗ <one-line reasoning> │
255
- │ --testgen ✓/✗ <one-line reasoning> │
256
- └──────────────────────────────────────────────────────────────┘
257
-
258
- Why this workflow:
259
- • <reason 1>
260
- • <reason 2>
261
- • <reason 3>
262
-
263
- <!-- CONDITIONAL: Only if alternatives worth showing -->
264
- Also consider:
265
- <flag> <one-line explanation>
266
- <flag> <one-line explanation>
267
-
268
- <!-- CONDITIONAL: Only if conflict detected -->
269
- ⚠ Conflict risk: #<N> (open) modifies <path> — coordinate or wait
270
- ```
271
-
272
- ---
273
-
274
- ### Example Output (Independent Issues)
275
-
276
- ```
277
- ╭──────────────────────────────────────────────────────────────╮
278
- │ sequant solve │
279
- │ │
280
- │ npx sequant run 152 153 -q │
281
- ╰──────────────────────────────────────────────────────────────╯
282
-
283
- #152 Add user dashboard ······················ ui → spec → testgen → exec → test → qa
284
- #153 Refactor auth module ···················· backend → spec → exec → qa
285
-
286
- ┌─ Flags ──────────────────────────────────────────────────────┐
287
- │ -q quality-loop ✓ refactor label auto-enables retry │
288
- │ --chain ✗ independent (different codepaths) │
289
- │ --qa-gate ✗ no chain mode │
290
- │ --base ✗ branching from main │
291
- │ --testgen ✓ #152 has testable ACs (Unit Tests) │
292
- └──────────────────────────────────────────────────────────────┘
293
-
294
- Why this workflow:
295
- • #152 has ui label → includes /test for browser verification
296
- • #152 has testable ACs → includes /testgen for test stubs
297
- • #153 has refactor label → quality loop auto-enabled
298
- • No shared files → safe to parallelize
299
-
300
- Also consider:
301
- --dry-run Preview execution before running
302
- ```
303
-
304
- ---
305
-
306
- ### Example Output (Dependent Issues — Chain)
307
-
308
- ```
309
- ╭──────────────────────────────────────────────────────────────╮
310
- │ sequant solve │
311
- │ │
312
- │ npx sequant run 10 11 12 --sequential --chain --qa-gate -q │
313
- ╰──────────────────────────────────────────────────────────────╯
314
-
315
- #10 Add auth middleware ······················ backend → spec → testgen → exec → qa
316
- #11 Add login page ··························· ui → spec → testgen → exec → test → qa
317
- #12 Add logout functionality ················· ui → spec → exec → test → qa
318
-
319
- ┌─ Flags ──────────────────────────────────────────────────────┐
320
- │ -q quality-loop ✓ multi-step implementation │
321
- │ --chain ✓ #11 depends on #10, #12 depends on #11│
322
- │ --qa-gate ✓ 3 issues with tight dependencies │
323
- │ --base ✗ branching from main │
324
- │ --testgen ✓ #10, #11 have Unit Test ACs │
325
- └──────────────────────────────────────────────────────────────┘
326
-
327
- Chain structure:
328
- main → #10 → #11 → #12
329
-
330
- Why this workflow:
331
- • Explicit dependencies detected in issue bodies
332
- • Chain ensures each branch builds on previous
333
- • QA gate prevents stale code in downstream issues
334
- • UI issues (#11, #12) include /test phase
335
- • #10, #11 have testable ACs → include /testgen
336
- ```
337
-
338
- ---
339
-
340
- ### Example Output (With Conflict Warning)
341
-
342
- ```
343
- ╭──────────────────────────────────────────────────────────────╮
344
- │ sequant solve │
345
- │ │
346
- │ npx sequant run 85 -q │
347
- ╰──────────────────────────────────────────────────────────────╯
348
-
349
- #85 Update auth cookie handling ·············· bug → exec → qa
350
-
351
- ┌─ Flags ──────────────────────────────────────────────────────┐
352
- │ -q quality-loop ✓ auth changes benefit from retry │
353
- │ --chain ✗ single issue │
354
- │ --qa-gate ✗ no chain mode │
355
- │ --base ✗ branching from main │
356
- │ --testgen ✗ bug fix (targeted tests in exec) │
357
- └──────────────────────────────────────────────────────────────┘
358
-
359
- Why this workflow:
360
- • Bug fix with clear AC → skip /spec
361
- • Bug fix → skip /testgen (targeted tests added during exec)
362
- • Single issue → no chain needed
363
-
364
- ⚠ Conflict risk: #82 (open) modifies lib/auth/cookies.ts — coordinate or wait
365
- ```
30
+ Then **immediately execute the full `/assess` workflow** for the provided issue numbers, following the assess SKILL.md instructions exactly.
366
31
 
367
- ## Workflow Selection Logic
368
-
369
- **Note:** `npx sequant run` now uses **spec-driven phase detection**. It runs `/spec` first, which analyzes the issue and outputs a `## Recommended Workflow` section. The CLI then parses this to determine subsequent phases.
370
-
371
- ### How It Works
372
-
373
- 1. **Bug fixes** (labels: `bug`, `fix`) → Skip spec, run `exec → qa` directly
374
- 2. **All other issues** → Run `/spec` first, which recommends phases based on:
375
- - UI/frontend changes → Add `test` phase
376
- - Complex refactors → Enable quality loop
377
- - Security-sensitive → Add `security-review` phase
378
- - New features with testable ACs → Add `testgen` phase
379
-
380
- ### Standard Workflow (Most Issues)
381
- ```
382
- /spec → /exec → /qa
383
- ```
384
-
385
- ### Feature with Testable ACs
386
- ```
387
- /spec → /testgen → /exec → /qa
388
- ```
389
- Include `testgen` when ACs have Unit Test or Integration Test verification methods.
390
-
391
- ### UI Feature Workflow
392
- ```
393
- /spec → /exec → /test → /qa
394
- ```
395
-
396
- ### UI Feature with Tests
397
- ```
398
- /spec → /testgen → /exec → /test → /qa
399
- ```
400
- Combine `testgen` and `test` for UI features with testable ACs.
401
-
402
- ### Bug Fix Workflow (Simple)
403
- ```
404
- /exec → /qa
405
- ```
406
- Skip `/spec` if the bug is well-defined and straightforward.
407
-
408
- ### Complex Feature Workflow
409
- ```
410
- /fullsolve <issue>
411
- ```
412
- Runs complete workflow with automatic fix iterations.
413
-
414
- ## Quick Reference
415
-
416
- | Issue Type | Labels | Workflow |
417
- |------------|--------|----------|
418
- | UI Feature | ui, frontend, admin | spec → exec → test → qa |
419
- | UI Feature with Tests | ui + enhancement | spec → testgen → exec → test → qa |
420
- | Backend Feature | backend, api | spec → exec → qa |
421
- | New Feature (testable) | enhancement, feature | spec → testgen → exec → qa |
422
- | Bug Fix | bug, fix | exec → qa (or full if complex) |
423
- | Complex Feature | complex, refactor | `--quality-loop` or fullsolve |
424
- | Documentation | docs | exec → qa |
425
-
426
- ### Testgen Phase Detection
427
-
428
- **Include `testgen` in workflow when:**
429
- - Issue has `enhancement` or `feature` label AND
430
- - Issue is NOT a simple bug fix or docs-only change AND
431
- - Project has test infrastructure (Jest, Vitest, etc.)
432
-
433
- **Skip `testgen` when:**
434
- - Issue is `bug` or `fix` only (targeted tests added during exec)
435
- - Issue is `docs` only (no code tests needed)
436
- - All ACs use Manual Test or Browser Test verification
437
-
438
- **Quality Loop vs Fullsolve:**
439
- - `--quality-loop`: Enables auto-retry within `sequant run` (good for CI/automation)
440
- - `/fullsolve`: Interactive single-issue resolution with inline loops (good for manual work)
441
-
442
- ## CLI Alternative
443
-
444
- Use `npx sequant run` for batch execution from the command line:
445
-
446
- ```bash
447
- # Run workflow for single issue
448
- npx sequant run 152
449
-
450
- # Multiple issues in parallel
451
- npx sequant run 152 153 154
452
-
453
- # Sequential execution (respects dependencies)
454
- npx sequant run 152 153 --sequential
455
-
456
- # Chain mode (each issue branches from previous completed issue)
457
- npx sequant run 10 11 12 --sequential --chain
458
-
459
- # Chain mode with QA gate (pause if QA fails, prevent stale code)
460
- npx sequant run 10 11 12 --sequential --chain --qa-gate
461
-
462
- # Custom base branch (branch from feature branch instead of main)
463
- npx sequant run 117 --base feature/dashboard
464
-
465
- # Chain mode with custom base branch
466
- npx sequant run 117 118 119 --sequential --chain --base feature/dashboard
467
-
468
- # Custom phases
469
- npx sequant run 152 --phases spec,exec,qa
470
-
471
- # Quality loop (auto-retry on failures, max 3 iterations)
472
- npx sequant run 152 --quality-loop
473
-
474
- # Quality loop with custom iterations
475
- npx sequant run 152 --quality-loop --max-iterations 5
476
-
477
- # Dry run (shows what would execute)
478
- npx sequant run 152 --dry-run
479
- ```
480
-
481
- ### Post-Run: Merge Verification
482
-
483
- After batch execution, run merge checks before merging:
484
-
485
- ```bash
486
- # Verify feature branches are safe to merge (auto-detects issues from last run)
487
- npx sequant merge --check
488
-
489
- # Full scan including residual pattern detection
490
- npx sequant merge --scan
491
-
492
- # Post results to each PR
493
- npx sequant merge --check --post
494
- ```
495
-
496
- **Recommended workflow:**
497
- ```bash
498
- npx sequant run 152 153 154 # implement
499
- npx sequant merge --check # verify cross-issue integration
500
- /merger 152 153 154 # merge
501
- ```
502
-
503
- ### Custom Base Branch
504
-
505
- The `--base` flag specifies which branch to create worktrees from:
506
-
507
- ```
508
- Without --base: With --base feature/dashboard:
509
- origin/main feature/dashboard
510
- ├── #117 ├── #117
511
- ├── #118 ├── #118
512
- └── #119 └── #119
513
- ```
514
-
515
- **Use `--base` when:**
516
- - Working on issues for a feature integration branch
517
- - Issue references a parent branch (e.g., "Part of dashboard feature")
518
- - Project uses `.sequant/settings.json` with `run.defaultBase` configured
519
- - Issues should build on an existing feature branch
520
-
521
- **Do NOT use `--base` when:**
522
- - Issues should branch from main (default behavior)
523
- - Working on independent bug fixes or features
524
-
525
- ### Chain Mode Explained
526
-
527
- The `--chain` flag (requires `--sequential`) creates dependent branches:
528
-
529
- ```
530
- Without --chain: With --chain:
531
- origin/main origin/main
532
- ├── #10 └── #10 (merged)
533
- ├── #11 └── #11 (merged)
534
- └── #12 └── #12
535
- ```
536
-
537
- **Use `--chain` when:**
538
- - Issues have explicit dependencies
539
- - Later issues build on earlier implementations
540
- - Order matters for correctness
541
-
542
- **Do NOT use `--chain` when:**
543
- - Issues are independent
544
- - Parallel execution is appropriate
545
- - Issues can be merged in any order
546
-
547
- > **Tip:** Install globally with `npm install -g sequant` to omit the `npx` prefix.
548
-
549
- ## Edge Cases
550
-
551
- ### Multiple Issues with Different Types
552
-
553
- When solving multiple issues with mixed types, recommend running them separately:
554
-
555
- ```markdown
556
- These issues have different requirements. Run separately:
557
-
558
- **UI Issues (with browser testing):**
559
- /fullsolve 152
560
-
561
- **Backend Issues:**
562
- /fullsolve 153
563
- ```
564
-
565
- ### Issue with Dependencies
566
-
567
- If issues depend on each other:
568
-
569
- ```markdown
570
- ⚠️ Issue #154 depends on #153. Run in order:
571
-
572
- 1. /fullsolve 153
573
- 2. (Wait for PR merge)
574
- 3. /fullsolve 154
575
- ```
576
-
577
- ---
578
-
579
- ## Persist Analysis to Issue Comments
580
-
581
- **After displaying the solve output in the terminal**, prompt the user to save the analysis:
582
-
583
- ```
584
- Save this plan to the issues? [Y/n]
585
- ```
586
-
587
- Use the `AskUserQuestion` tool with options "Yes (Recommended)" and "No".
588
-
589
- **If user confirms (Y):**
590
-
591
- Post a structured comment to **each analyzed issue** with machine-readable markers that `/spec` can later parse.
592
-
593
- ### Comment Format
594
-
595
- ```markdown
596
- ## Solve Analysis
597
-
598
- **Recommended Phases:** <phases in arrow notation>
599
- **Skip Spec:** Yes/No (<reasoning>)
600
- **Browser Testing:** Yes/No (<reasoning>)
601
- **Quality Loop:** Yes/No (<reasoning>)
32
+ ## Behavior
602
33
 
603
- ### Reasoning
604
- - <reason 1>
605
- - <reason 2>
606
- - <reason 3>
34
+ `/solve` is functionally identical to `/assess`. The only difference is the deprecation notice shown before the assessment output.
607
35
 
608
- ### Flags
609
- | Flag | Value | Reasoning |
610
- |------|-------|-----------|
611
- | -q (quality-loop) | ✓/✗ | <reasoning> |
612
- | --chain | ✓/✗ | <reasoning> |
613
- | --qa-gate | ✓/✗ | <reasoning> |
614
- | --base | ✓/✗ | <reasoning> |
615
- | --testgen | ✓/✗ | <reasoning> |
36
+ - `/solve 152` → Shows deprecation notice, then runs `/assess 152`
37
+ - `/solve 152 153` Shows deprecation notice, then runs `/assess 152 153`
616
38
 
617
- <!-- solve:phases=<comma-separated phases> -->
618
- <!-- solve:skip-spec=<true/false> -->
619
- <!-- solve:browser-test=<true/false> -->
620
- <!-- solve:quality-loop=<true/false> -->
39
+ ## Migration
621
40
 
622
- *📝 Generated by `/solve`*
623
41
  ```
42
+ # Before (deprecated):
43
+ /solve 152
624
44
 
625
- ### Posting Logic
626
-
627
- ```bash
628
- # For each analyzed issue, post the structured comment
629
- for issue_number in <ANALYZED_ISSUES>; do
630
- gh issue comment "$issue_number" --body "$(cat <<'EOF'
631
- ## Solve Analysis
632
-
633
- **Recommended Phases:** <phases>
634
- ...
635
-
636
- <!-- solve:phases=<phases> -->
637
- <!-- solve:skip-spec=<true/false> -->
638
- <!-- solve:browser-test=<true/false> -->
639
- <!-- solve:quality-loop=<true/false> -->
640
-
641
- *📝 Generated by `/solve`*
642
- EOF
643
- )"
644
- done
45
+ # After (preferred):
46
+ /assess 152
645
47
  ```
646
48
 
647
- **If user declines (N):** Skip posting. The terminal output remains the only record.
648
-
649
- ### Machine-Readable Markers
650
-
651
- The HTML comment markers enable downstream tools (like `/spec`) to parse the analysis programmatically:
652
-
653
- | Marker | Values | Consumed By |
654
- |--------|--------|-------------|
655
- | `<!-- solve:phases=... -->` | Comma-separated phase names | `/spec` phase detection |
656
- | `<!-- solve:skip-spec=... -->` | `true`/`false` | `/spec` skip logic |
657
- | `<!-- solve:browser-test=... -->` | `true`/`false` | `/spec` test phase |
658
- | `<!-- solve:quality-loop=... -->` | `true`/`false` | `/spec` quality loop |
659
-
660
- ---
49
+ ## Comment Format
661
50
 
662
- ## State Tracking
51
+ When persisting to issue comments, use the new `assess:` marker format:
663
52
 
664
- **IMPORTANT:** `/solve` initializes issue state when analyzing issues.
665
-
666
- ### State Updates
667
-
668
- When analyzing issues, initialize state tracking so the dashboard can show planned work:
669
-
670
- **Initialize each issue being analyzed:**
671
- ```bash
672
- # Get issue title
673
- TITLE=$(gh issue view <issue-number> --json title -q '.title')
674
-
675
- # Initialize state (if not already tracked)
676
- npx tsx scripts/state/update.ts init <issue-number> "$TITLE"
53
+ ```html
54
+ <!-- assess:phases=spec,exec,qa -->
55
+ <!-- assess:action=PROCEED -->
56
+ <!-- assess:quality-loop=true -->
677
57
  ```
678
58
 
679
- **Note:** `/solve` only initializes issues - actual phase tracking happens during workflow execution (`/fullsolve`, `sequant run`, or individual skills).
680
-
681
- ---
59
+ The old `solve:` markers are still parsed for backward compatibility, but new comments should use `assess:` markers.
682
60
 
683
61
  ## Output Verification
684
62
 
685
- **Before responding, verify your output includes ALL of these:**
63
+ After showing the deprecation notice, the output should follow the `/assess` output format exactly, including:
686
64
 
687
- - [ ] **Header Box** — ASCII box with `sequant solve` and full command
688
- - [ ] **Issues List** — Each issue with dot leaders: `#N Title ··· labels → workflow`
689
- - [ ] **Flags Table** — ALL five flags (-q, --chain, --qa-gate, --base, --testgen) with ✓/✗ and reasoning
690
- - [ ] **Why Section** — 3-5 bullet points explaining decisions
691
- - [ ] **Also Consider** — (conditional) Curated alternatives if applicable
692
- - [ ] **Conflict Warning** — (conditional) If in-flight work overlaps
693
- - [ ] **Line Count** — Total ≤25 lines (excluding conflict warnings)
694
- - [ ] **Persist Prompt** — After output, prompt "Save this plan to the issues? [Y/n]"
695
- - [ ] **Comment Posted** — If user confirms, structured comment posted to each issue with HTML markers
65
+ - [ ] **Deprecation Notice** — Shown before assessment output
66
+ - [ ] **Action Headline** — `→ ACTION reason`
67
+ - [ ] **Health Checks** — Signals that informed the action
68
+ - [ ] **Workflow Plan** — Full CLI command with flags (for PROCEED)
69
+ - [ ] **HTML Markers** — Using `assess:` prefix (not `solve:`)
696
70
 
697
- **DO NOT respond until all items are verified.**
71
+ *Generated by `/assess`*