sequant 1.4.0 → 1.5.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 (43) hide show
  1. package/README.md +29 -0
  2. package/dist/src/commands/doctor.d.ts +1 -4
  3. package/dist/src/commands/doctor.d.ts.map +1 -1
  4. package/dist/src/commands/doctor.integration.test.d.ts +10 -0
  5. package/dist/src/commands/doctor.integration.test.d.ts.map +1 -0
  6. package/dist/src/commands/doctor.integration.test.js +71 -0
  7. package/dist/src/commands/doctor.integration.test.js.map +1 -0
  8. package/dist/src/commands/doctor.js +1 -1
  9. package/dist/src/commands/doctor.js.map +1 -1
  10. package/dist/src/commands/doctor.test.js +20 -20
  11. package/dist/src/commands/doctor.test.js.map +1 -1
  12. package/dist/src/commands/init.d.ts.map +1 -1
  13. package/dist/src/commands/init.js +0 -2
  14. package/dist/src/commands/init.js.map +1 -1
  15. package/dist/src/commands/run.d.ts.map +1 -1
  16. package/dist/src/commands/run.js +161 -96
  17. package/dist/src/commands/run.js.map +1 -1
  18. package/dist/src/commands/run.test.js.map +1 -1
  19. package/dist/src/lib/settings.d.ts +26 -0
  20. package/dist/src/lib/settings.d.ts.map +1 -1
  21. package/dist/src/lib/settings.js +12 -0
  22. package/dist/src/lib/settings.js.map +1 -1
  23. package/dist/src/lib/shutdown.d.ts +118 -0
  24. package/dist/src/lib/shutdown.d.ts.map +1 -0
  25. package/dist/src/lib/shutdown.js +174 -0
  26. package/dist/src/lib/shutdown.js.map +1 -0
  27. package/dist/src/lib/shutdown.test.d.ts +5 -0
  28. package/dist/src/lib/shutdown.test.d.ts.map +1 -0
  29. package/dist/src/lib/shutdown.test.js +216 -0
  30. package/dist/src/lib/shutdown.test.js.map +1 -0
  31. package/dist/src/lib/templates.js.map +1 -1
  32. package/dist/src/lib/tty.test.js.map +1 -1
  33. package/dist/src/lib/workflow/log-rotation.d.ts.map +1 -1
  34. package/dist/src/lib/workflow/log-rotation.js +0 -1
  35. package/dist/src/lib/workflow/log-rotation.js.map +1 -1
  36. package/dist/src/lib/workflow/run-log-schema.test.js +1 -0
  37. package/dist/src/lib/workflow/run-log-schema.test.js.map +1 -1
  38. package/package.json +8 -2
  39. package/templates/skills/assess/SKILL.md +31 -0
  40. package/templates/skills/exec/SKILL.md +164 -15
  41. package/templates/skills/fullsolve/SKILL.md +61 -10
  42. package/templates/skills/loop/SKILL.md +48 -3
  43. package/templates/skills/spec/SKILL.md +97 -2
@@ -11,6 +11,8 @@ allowed-tools:
11
11
  - Bash(gh issue comment:*)
12
12
  - Bash(gh issue edit:*)
13
13
  - Bash(gh label:*)
14
+ - Bash(git worktree:*)
15
+ - Bash(git -C:*)
14
16
  - Task
15
17
  - AgentOutputTool
16
18
  ---
@@ -60,6 +62,56 @@ Task(subagent_type="schema-inspector", model="haiku",
60
62
 
61
63
  **Important:** Spawn all agents in a SINGLE message for parallel execution.
62
64
 
65
+ ### In-Flight Work Analysis (Conflict Detection)
66
+
67
+ Before creating the implementation plan, scan for potential conflicts with in-flight work:
68
+
69
+ 1. **List open worktrees**:
70
+ ```bash
71
+ git worktree list --porcelain
72
+ ```
73
+
74
+ 2. **For each worktree, get changed files**:
75
+ ```bash
76
+ git -C <worktree-path> diff --name-only main...HEAD
77
+ ```
78
+
79
+ 3. **Analyze this issue's likely file touches** based on:
80
+ - Issue description and AC
81
+ - Similar past issues
82
+ - Codebase structure
83
+
84
+ 4. **If overlap detected**, include in plan output:
85
+ ```markdown
86
+ ## Conflict Risk Analysis
87
+
88
+ **In-flight work detected**: Issue #<N> (feature/<branch-name>)
89
+ **Overlapping files**:
90
+ - `<file-path>`
91
+
92
+ **Recommended approach**:
93
+ - [ ] Option A: Use alternative file/approach (no conflict)
94
+ - [ ] Option B: Wait for #<N> to merge, then rebase
95
+ - [ ] Option C: Coordinate unified implementation via /merger
96
+
97
+ **Selected**: [To be decided during spec review]
98
+ ```
99
+
100
+ 5. **Check for explicit dependencies**:
101
+ ```bash
102
+ # Look for "Depends on" or "depends-on" labels
103
+ gh issue view <issue> --json body,labels
104
+ ```
105
+
106
+ If dependencies found:
107
+ ```markdown
108
+ ## Dependencies
109
+
110
+ **Depends on**: #<N>
111
+ **Reason**: [Why this issue depends on the other]
112
+ **Status**: [Open/Merged/Closed]
113
+ ```
114
+
63
115
  ### Using MCP Tools (Optional)
64
116
 
65
117
  - **Sequential Thinking:** For complex analysis with multiple dependencies
@@ -162,7 +214,37 @@ Analyze the issue and recommend the optimal workflow phases:
162
214
  - **Security-sensitive** → Add `security-review` phase
163
215
  - **Documentation only** → Skip `spec`, just `exec → qa`
164
216
 
165
- ### 5. Issue Comment Draft
217
+ ### 5. Label Review
218
+
219
+ Analyze current labels vs implementation plan and suggest updates:
220
+
221
+ ```markdown
222
+ ## Label Review
223
+
224
+ **Current:** enhancement
225
+ **Recommended:** enhancement, refactor
226
+ **Reason:** Implementation plan involves structural changes to 5+ files
227
+ **Quality Loop:** Will auto-enable due to `refactor` label
228
+
229
+ → `gh issue edit <N> --add-label refactor`
230
+ ```
231
+
232
+ **Plan-Based Detection Logic:**
233
+ - If plan has 5+ file changes → suggest `refactor`
234
+ - If plan touches UI components → suggest `ui` or `frontend`
235
+ - If plan has breaking API changes → suggest `breaking`
236
+ - If plan involves database migrations → suggest `backend`, `complex`
237
+ - If plan involves CLI/scripts → suggest `cli`
238
+ - If plan is documentation-only → suggest `docs`
239
+ - If recommended workflow includes quality loop → ensure matching label exists (`complex`, `refactor`, or `breaking`)
240
+
241
+ **Label Inference from Plan Analysis:**
242
+ - Count files in implementation plan steps
243
+ - Identify component types being modified
244
+ - Check if API contracts are changing
245
+ - Match against quality loop trigger labels
246
+
247
+ ### 6. Issue Comment Draft
166
248
 
167
249
  Generate a Markdown snippet with:
168
250
  - AC checklist with verification criteria
@@ -178,7 +260,7 @@ Label clearly as:
178
260
  --- DRAFT GITHUB ISSUE COMMENT (PLAN) ---
179
261
  ```
180
262
 
181
- ### 6. Update GitHub Issue
263
+ ### 7. Update GitHub Issue
182
264
 
183
265
  Post the draft comment to GitHub:
184
266
  ```bash
@@ -194,8 +276,10 @@ gh issue edit <issue-number> --add-label "planned"
194
276
 
195
277
  - [ ] **AC Checklist** - Numbered AC items (AC-1, AC-2, etc.) with descriptions
196
278
  - [ ] **Verification Criteria** - Each AC has Verification Method and Test Scenario
279
+ - [ ] **Conflict Risk Analysis** - Check for in-flight work, include if conflicts found
197
280
  - [ ] **Implementation Plan** - 3-7 concrete steps with codebase references
198
281
  - [ ] **Recommended Workflow** - Phases, Quality Loop setting, and Reasoning
282
+ - [ ] **Label Review** - Current vs recommended labels based on plan analysis
199
283
  - [ ] **Open Questions** - Any ambiguities with recommended defaults
200
284
  - [ ] **Issue Comment Draft** - Formatted for GitHub posting
201
285
 
@@ -249,6 +333,17 @@ You MUST include these sections in order:
249
333
 
250
334
  ---
251
335
 
336
+ ## Label Review
337
+
338
+ **Current:** [current labels]
339
+ **Recommended:** [recommended labels]
340
+ **Reason:** [Why these labels based on plan analysis]
341
+ **Quality Loop:** [Will/Won't auto-enable and why]
342
+
343
+ → `gh issue edit <N> --add-label [label]`
344
+
345
+ ---
346
+
252
347
  --- DRAFT GITHUB ISSUE COMMENT (PLAN) ---
253
348
 
254
349
  [Complete formatted comment for GitHub]