sequant 2.0.1 → 2.1.1

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 (59) 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/mcp-config.js +1 -1
  31. package/dist/src/lib/merge-check/index.js +2 -2
  32. package/dist/src/lib/settings.d.ts +8 -0
  33. package/dist/src/lib/settings.js +1 -0
  34. package/dist/src/lib/shutdown.js +1 -1
  35. package/dist/src/lib/templates.js +2 -0
  36. package/dist/src/lib/wizard.js +6 -4
  37. package/dist/src/lib/workflow/batch-executor.js +1 -1
  38. package/dist/src/lib/workflow/log-writer.js +6 -6
  39. package/dist/src/lib/workflow/metrics-writer.js +5 -3
  40. package/dist/src/lib/workflow/phase-executor.js +5 -1
  41. package/dist/src/lib/workflow/platforms/github.js +5 -1
  42. package/dist/src/lib/workflow/state-cleanup.js +1 -1
  43. package/dist/src/lib/workflow/state-manager.js +15 -13
  44. package/dist/src/lib/workflow/state-rebuild.js +2 -2
  45. package/dist/src/lib/workflow/types.d.ts +11 -0
  46. package/dist/src/lib/workflow/worktree-manager.js +40 -41
  47. package/dist/src/lib/worktree-isolation.d.ts +130 -0
  48. package/dist/src/lib/worktree-isolation.js +310 -0
  49. package/package.json +8 -8
  50. package/templates/agents/sequant-explorer.md +23 -0
  51. package/templates/agents/sequant-implementer.md +18 -0
  52. package/templates/agents/sequant-qa-checker.md +24 -0
  53. package/templates/agents/sequant-testgen.md +25 -0
  54. package/templates/scripts/cleanup-worktree.sh +18 -0
  55. package/templates/skills/_shared/references/subagent-types.md +158 -48
  56. package/templates/skills/exec/SKILL.md +72 -6
  57. package/templates/skills/qa/SKILL.md +8 -217
  58. package/templates/skills/spec/SKILL.md +446 -120
  59. package/templates/skills/testgen/SKILL.md +138 -1
@@ -143,7 +143,14 @@ When posting progress comments after each phase, append the appropriate marker:
143
143
  ### 0.1 Git State Verification
144
144
 
145
145
  ```bash
146
- # Check current branch and recent commits
146
+ # Check current branch warn if on main/master
147
+ CURRENT_BRANCH=$(git branch --show-current)
148
+ echo "Current branch: $CURRENT_BRANCH"
149
+ if [[ "$CURRENT_BRANCH" == "main" || "$CURRENT_BRANCH" == "master" ]]; then
150
+ echo "⚠️ WARNING: On $CURRENT_BRANCH — will need feature branch before committing"
151
+ fi
152
+
153
+ # Check recent commits
147
154
  git log --oneline -5 --stat
148
155
 
149
156
  # Check for any existing work on this issue
@@ -412,6 +419,30 @@ while qa_iteration < 2:
412
419
 
413
420
  ## Phase 5: Pull Request (PR)
414
421
 
422
+ ### 5.0 Branch Verification Gate
423
+
424
+ **CRITICAL: Verify you are on the correct feature branch before committing or creating a PR.**
425
+
426
+ ```bash
427
+ CURRENT_BRANCH=$(git branch --show-current)
428
+ echo "Current branch: $CURRENT_BRANCH"
429
+
430
+ # HARD GATE: Must be on a feature branch, not main/master
431
+ if [[ "$CURRENT_BRANCH" == "main" || "$CURRENT_BRANCH" == "master" ]]; then
432
+ echo "❌ ERROR: On $CURRENT_BRANCH — commits must NOT land on main."
433
+ echo " Fix: git checkout feature/<issue-number>-* or create a new branch."
434
+ exit 1
435
+ fi
436
+
437
+ # Soft check: branch should match the issue number
438
+ if ! echo "$CURRENT_BRANCH" | grep -q "<issue-number>"; then
439
+ echo "⚠️ WARNING: Branch '$CURRENT_BRANCH' does not contain issue number <issue-number>."
440
+ echo " Verify this is the correct branch before continuing."
441
+ fi
442
+ ```
443
+
444
+ **Why this matters:** Sub-agents and shell context resets can silently switch the working directory back to main. Without this check, commits land on main instead of the feature branch, requiring messy recovery (cherry-picks, force pushes, re-created PRs).
445
+
415
446
  ### 5.1 Create PR (if not exists)
416
447
 
417
448
  ```bash
@@ -435,8 +466,8 @@ Post completion comment to issue with:
435
466
  **IMPORTANT:** Merge the PR first, then clean up the worktree.
436
467
 
437
468
  ```bash
438
- # 1. Merge PR (--delete-branch deletes remote; local deletion will fail but that's OK)
439
- gh pr merge <N> --squash --delete-branch
469
+ # 1. Merge PR (without --delete-branch; cleanup happens after success)
470
+ gh pr merge <N> --squash
440
471
 
441
472
  # 2. Clean up worktree (removes local worktree + branch)
442
473
  ./scripts/dev/cleanup-worktree.sh feature/<issue-number>-*
@@ -444,7 +475,7 @@ gh pr merge <N> --squash --delete-branch
444
475
  # 3. Issue auto-closes if commit message contains "Fixes #N"
445
476
  ```
446
477
 
447
- **Why this order matters:** The cleanup script checks if the PR is merged before proceeding. The `--delete-branch` flag will fail to delete the local branch (worktree conflict) but successfully deletes the remote branch. The cleanup script then handles the local branch removal.
478
+ **Why this order matters:** The cleanup script checks if the PR is merged before proceeding. Merging without `--delete-branch` avoids worktree lock conflicts. The post-tool hook and cleanup script handle branch removal after merge succeeds. If the merge fails, the worktree is preserved so work isn't lost.
448
479
 
449
480
  ### 5.4 Post-Merge Verification
450
481