sequant 1.20.3 → 2.0.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.
- package/.claude-plugin/marketplace.json +2 -4
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +36 -15
- package/dist/bin/cli.js +25 -2
- package/dist/src/commands/doctor.js +42 -9
- package/dist/src/commands/init.d.ts +1 -0
- package/dist/src/commands/init.js +52 -0
- package/dist/src/commands/logs.d.ts +1 -0
- package/dist/src/commands/logs.js +18 -2
- package/dist/src/commands/run.d.ts +7 -0
- package/dist/src/commands/run.js +235 -68
- package/dist/src/commands/serve.d.ts +13 -0
- package/dist/src/commands/serve.js +131 -0
- package/dist/src/commands/stats.d.ts +1 -0
- package/dist/src/commands/stats.js +185 -26
- package/dist/src/commands/status.d.ts +2 -0
- package/dist/src/commands/status.js +99 -50
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.js +4 -1
- package/dist/src/lib/ac-parser.d.ts +2 -0
- package/dist/src/lib/ac-parser.js +12 -2
- package/dist/src/lib/assess-comment-parser.d.ts +137 -0
- package/dist/src/lib/assess-comment-parser.js +344 -0
- package/dist/src/lib/ci/config.d.ts +22 -0
- package/dist/src/lib/ci/config.js +134 -0
- package/dist/src/lib/ci/index.d.ts +12 -0
- package/dist/src/lib/ci/index.js +10 -0
- package/dist/src/lib/ci/inputs.d.ts +29 -0
- package/dist/src/lib/ci/inputs.js +103 -0
- package/dist/src/lib/ci/labels.d.ts +34 -0
- package/dist/src/lib/ci/labels.js +101 -0
- package/dist/src/lib/ci/outputs.d.ts +25 -0
- package/dist/src/lib/ci/outputs.js +84 -0
- package/dist/src/lib/ci/triggers.d.ts +9 -0
- package/dist/src/lib/ci/triggers.js +86 -0
- package/dist/src/lib/ci/types.d.ts +131 -0
- package/dist/src/lib/ci/types.js +47 -0
- package/dist/src/lib/mcp-config.d.ts +54 -0
- package/dist/src/lib/mcp-config.js +172 -0
- package/dist/src/lib/merge-check/index.js +6 -12
- package/dist/src/lib/merge-check/types.d.ts +20 -7
- package/dist/src/lib/merge-check/types.js +11 -0
- package/dist/src/lib/phase-signal.d.ts +3 -3
- package/dist/src/lib/phase-signal.js +5 -3
- package/dist/src/lib/settings.d.ts +52 -0
- package/dist/src/lib/settings.js +41 -0
- package/dist/src/lib/shutdown.d.ts +16 -5
- package/dist/src/lib/shutdown.js +32 -12
- package/dist/src/lib/solve-comment-parser.d.ts +9 -102
- package/dist/src/lib/solve-comment-parser.js +13 -248
- package/dist/src/lib/stacks.d.ts +8 -0
- package/dist/src/lib/stacks.js +34 -0
- package/dist/src/lib/system.js +3 -7
- package/dist/src/lib/test-tautology-detector.d.ts +10 -0
- package/dist/src/lib/test-tautology-detector.js +43 -4
- package/dist/src/lib/upstream/assessment.js +9 -59
- package/dist/src/lib/upstream/issues.js +12 -75
- package/dist/src/lib/version-check.d.ts +2 -2
- package/dist/src/lib/version-check.js +6 -3
- package/dist/src/lib/version.d.ts +4 -0
- package/dist/src/lib/version.js +25 -0
- package/dist/src/lib/workflow/batch-executor.d.ts +26 -86
- package/dist/src/lib/workflow/batch-executor.js +269 -55
- package/dist/src/lib/workflow/drivers/agent-driver.d.ts +56 -0
- package/dist/src/lib/workflow/drivers/agent-driver.js +8 -0
- package/dist/src/lib/workflow/drivers/aider.d.ts +18 -0
- package/dist/src/lib/workflow/drivers/aider.js +160 -0
- package/dist/src/lib/workflow/drivers/claude-code.d.ts +17 -0
- package/dist/src/lib/workflow/drivers/claude-code.js +165 -0
- package/dist/src/lib/workflow/drivers/index.d.ts +20 -0
- package/dist/src/lib/workflow/drivers/index.js +27 -0
- package/dist/src/lib/workflow/error-classifier.d.ts +16 -0
- package/dist/src/lib/workflow/error-classifier.js +90 -0
- package/dist/src/lib/workflow/log-writer.d.ts +6 -3
- package/dist/src/lib/workflow/log-writer.js +57 -27
- package/dist/src/lib/workflow/metrics-schema.d.ts +9 -9
- package/dist/src/lib/workflow/phase-detection.d.ts +23 -0
- package/dist/src/lib/workflow/phase-detection.js +45 -29
- package/dist/src/lib/workflow/phase-executor.d.ts +42 -3
- package/dist/src/lib/workflow/phase-executor.js +375 -229
- package/dist/src/lib/workflow/phase-mapper.d.ts +1 -1
- package/dist/src/lib/workflow/phase-mapper.js +7 -7
- package/dist/src/lib/workflow/platforms/github.d.ts +157 -0
- package/dist/src/lib/workflow/platforms/github.js +466 -0
- package/dist/src/lib/workflow/platforms/index.d.ts +17 -0
- package/dist/src/lib/workflow/platforms/index.js +25 -0
- package/dist/src/lib/workflow/platforms/platform-provider.d.ts +67 -0
- package/dist/src/lib/workflow/platforms/platform-provider.js +8 -0
- package/dist/src/lib/workflow/pr-status.d.ts +2 -4
- package/dist/src/lib/workflow/pr-status.js +3 -16
- package/dist/src/lib/workflow/qa-cache.d.ts +58 -0
- package/dist/src/lib/workflow/qa-cache.js +88 -0
- package/dist/src/lib/workflow/reconcile.d.ts +69 -0
- package/dist/src/lib/workflow/reconcile.js +290 -0
- package/dist/src/lib/workflow/ring-buffer.d.ts +17 -0
- package/dist/src/lib/workflow/ring-buffer.js +37 -0
- package/dist/src/lib/workflow/run-log-schema.d.ts +115 -24
- package/dist/src/lib/workflow/run-log-schema.js +47 -12
- package/dist/src/lib/workflow/run-reflect.js +1 -1
- package/dist/src/lib/workflow/state-cleanup.js +21 -0
- package/dist/src/lib/workflow/state-manager.d.ts +34 -3
- package/dist/src/lib/workflow/state-manager.js +278 -126
- package/dist/src/lib/workflow/state-schema.d.ts +34 -30
- package/dist/src/lib/workflow/state-schema.js +35 -25
- package/dist/src/lib/workflow/state-utils.d.ts +3 -1
- package/dist/src/lib/workflow/state-utils.js +1 -0
- package/dist/src/lib/workflow/types.d.ts +224 -6
- package/dist/src/lib/workflow/types.js +20 -1
- package/dist/src/lib/workflow/worktree-discovery.d.ts +1 -1
- package/dist/src/lib/workflow/worktree-discovery.js +6 -14
- package/dist/src/lib/workflow/worktree-manager.js +33 -51
- package/dist/src/mcp/index.d.ts +4 -0
- package/dist/src/mcp/index.js +4 -0
- package/dist/src/mcp/resources.d.ts +7 -0
- package/dist/src/mcp/resources.js +111 -0
- package/dist/src/mcp/run-registry.d.ts +34 -0
- package/dist/src/mcp/run-registry.js +42 -0
- package/dist/src/mcp/server.d.ts +12 -0
- package/dist/src/mcp/server.js +50 -0
- package/dist/src/mcp/tools/logs.d.ts +7 -0
- package/dist/src/mcp/tools/logs.js +149 -0
- package/dist/src/mcp/tools/run.d.ts +121 -0
- package/dist/src/mcp/tools/run.js +591 -0
- package/dist/src/mcp/tools/status.d.ts +7 -0
- package/dist/src/mcp/tools/status.js +127 -0
- package/package.json +26 -7
- package/templates/hooks/post-tool.sh +19 -8
- package/templates/hooks/pre-tool.sh +36 -49
- package/templates/mcp.json +6 -0
- package/templates/skills/assess/SKILL.md +354 -352
- package/templates/skills/exec/SKILL.md +64 -1
- package/templates/skills/fullsolve/SKILL.md +35 -4
- package/templates/skills/qa/SKILL.md +486 -9
- package/templates/skills/qa/scripts/quality-checks.sh +1 -1
- package/templates/skills/setup/SKILL.md +386 -0
- package/templates/skills/solve/SKILL.md +38 -664
- package/templates/skills/spec/SKILL.md +90 -31
|
@@ -391,6 +391,51 @@ For each major decision:
|
|
|
391
391
|
|
|
392
392
|
See [parallel-groups.md](references/parallel-groups.md) for parallelization format.
|
|
393
393
|
|
|
394
|
+
### 2.5. Design Review (REQUIRED)
|
|
395
|
+
|
|
396
|
+
**Purpose:** Make design decisions explicit before implementation starts. This forces evaluation of *how* to build, not just *what* to build — catching wrong-layer, over-engineered, or pattern-mismatched approaches before code is written.
|
|
397
|
+
|
|
398
|
+
**Why this matters:** Repeated pattern across issues: implementation passes QA functionally but uses the wrong design — wrong layer, hacky shortcut, over-engineered approach. The fix cycle is expensive. Making design explicit here prevents it.
|
|
399
|
+
|
|
400
|
+
**Complexity Scaling:**
|
|
401
|
+
- **Simple issues** (`simple-fix`, `typo`, `docs-only` labels): Abbreviated — answer Q1 and Q3 only
|
|
402
|
+
- **Standard issues**: Answer all 4 questions
|
|
403
|
+
- **Complex issues** (`complex`, `refactor`, `breaking` labels): Answer all 4 questions with detailed rationale
|
|
404
|
+
|
|
405
|
+
**Answer these questions:**
|
|
406
|
+
|
|
407
|
+
1. **Where does this logic belong?** — Which module/layer owns this change? Name the specific directory, file, or abstraction layer. If it spans layers, explain why.
|
|
408
|
+
|
|
409
|
+
2. **What's the simplest correct approach?** — Actively reject over-engineering. What's the minimum implementation that satisfies all AC? What alternatives did you consider and reject?
|
|
410
|
+
|
|
411
|
+
3. **What existing pattern does this follow?** — Name the specific pattern in the codebase. Confirm it fits this use case. If no existing pattern fits, explain why a new approach is needed.
|
|
412
|
+
|
|
413
|
+
4. **What would a senior reviewer challenge?** — Anticipate design pushback. What's the most likely "why didn't you just...?" or "this should be in X instead" feedback?
|
|
414
|
+
|
|
415
|
+
**Example (standard issue):**
|
|
416
|
+
|
|
417
|
+
```markdown
|
|
418
|
+
## Design Review
|
|
419
|
+
|
|
420
|
+
1. **Where does this logic belong?** Spec skill's SKILL.md prompt files — purely prompt engineering, not TypeScript. Same layer as Feature Quality Planning and AC Checklist sections.
|
|
421
|
+
|
|
422
|
+
2. **What's the simplest correct approach?** Add markdown prompt text to SKILL.md. Reuse the existing complexity scaling pattern from Feature Quality Planning. No code, no new files, no abstractions.
|
|
423
|
+
|
|
424
|
+
3. **What existing pattern does this follow?** Mirrors Feature Quality Planning exactly: required section, purpose statement, complexity scaling table, question format.
|
|
425
|
+
|
|
426
|
+
4. **What would a senior reviewer challenge?** (1) "Why after Implementation Plan, not before?" — Design review needs the plan as input to evaluate. (2) "Won't this bloat output?" — Adds ~15 lines for standard, ~5 for simple-fix.
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
**Example (simple-fix issue, abbreviated):**
|
|
430
|
+
|
|
431
|
+
```markdown
|
|
432
|
+
## Design Review
|
|
433
|
+
|
|
434
|
+
1. **Where does this logic belong?** `src/lib/utils.ts` — utility function, same layer as existing helpers.
|
|
435
|
+
|
|
436
|
+
3. **What existing pattern does this follow?** Same pattern as `formatDuration()` in the same file — pure function, no side effects, single responsibility.
|
|
437
|
+
```
|
|
438
|
+
|
|
394
439
|
### 3. Plan Review
|
|
395
440
|
|
|
396
441
|
Ask the user to confirm or adjust:
|
|
@@ -404,24 +449,24 @@ Ask the user to confirm or adjust:
|
|
|
404
449
|
|
|
405
450
|
**Before** determining the recommended workflow, analyze the issue content for phase-relevant signals:
|
|
406
451
|
|
|
407
|
-
#### Step 1: Check for
|
|
452
|
+
#### Step 1: Check for Assess Comment (AC-4)
|
|
408
453
|
|
|
409
|
-
First, check if
|
|
454
|
+
First, check if an `/assess` comment already exists for this issue:
|
|
410
455
|
|
|
411
456
|
```bash
|
|
412
|
-
# Check issue comments for solve
|
|
413
|
-
gh issue view <issue-number> --json comments --jq '.comments[].body' | grep -l "## Solve Workflow for Issues:" || true
|
|
457
|
+
# Check issue comments for assess workflow (includes legacy /solve format for backward compat)
|
|
458
|
+
gh issue view <issue-number> --json comments --jq '.comments[].body' | grep -l "## Assess Analysis\|## Solve Workflow for Issues:" || true
|
|
414
459
|
```
|
|
415
460
|
|
|
416
|
-
**If
|
|
417
|
-
- Extract phases from the
|
|
418
|
-
- Use
|
|
419
|
-
- Skip content analysis for phases (
|
|
420
|
-
- Include in output: `"
|
|
461
|
+
**If assess comment found:**
|
|
462
|
+
- Extract phases from the assess workflow (e.g., `spec → exec → test → qa`)
|
|
463
|
+
- Use assess recommendations as the primary source (after labels)
|
|
464
|
+
- Skip content analysis for phases (assess already analyzed)
|
|
465
|
+
- Include in output: `"Assess comment found - using /assess workflow recommendations"`
|
|
421
466
|
|
|
422
467
|
#### Step 2: Analyze Title for Keywords (AC-1)
|
|
423
468
|
|
|
424
|
-
If no
|
|
469
|
+
If no assess comment, analyze the issue title for phase-relevant keywords:
|
|
425
470
|
|
|
426
471
|
| Pattern | Detection | Suggested Phase |
|
|
427
472
|
|---------|-----------|-----------------|
|
|
@@ -468,7 +513,7 @@ Content analysis **supplements** label detection - it can only ADD phases, never
|
|
|
468
513
|
|
|
469
514
|
**Priority order (highest first):**
|
|
470
515
|
1. **Labels** (explicit, highest priority)
|
|
471
|
-
2. **
|
|
516
|
+
2. **Assess comment** (if exists)
|
|
472
517
|
3. **Title keywords**
|
|
473
518
|
4. **Body patterns** (lowest priority)
|
|
474
519
|
|
|
@@ -491,42 +536,41 @@ Content analysis **supplements** label detection - it can only ADD phases, never
|
|
|
491
536
|
**Final phases:** spec → exec → test → security-review → qa
|
|
492
537
|
```
|
|
493
538
|
|
|
494
|
-
### 4.5.
|
|
539
|
+
### 4.5. Assess Comment Detection (AC-4, AC-5)
|
|
495
540
|
|
|
496
|
-
**Before making your own phase recommendation**, check if `/
|
|
541
|
+
**Before making your own phase recommendation**, check if `/assess` has already posted an analysis comment to this issue:
|
|
497
542
|
|
|
498
543
|
```bash
|
|
499
|
-
# Check for
|
|
500
|
-
|
|
501
|
-
--jq '[.comments[].body | select(test("## Solve Analysis|<!-- solve:phases="))] | last // empty')
|
|
544
|
+
# Check for assess analysis comment on the issue (includes legacy /solve format for backward compat)
|
|
545
|
+
assess_comment=$(gh issue view <issue-number> --json comments \
|
|
546
|
+
--jq '[.comments[].body | select(test("## Assess Analysis|## Solve Analysis|<!-- assess:phases=|<!-- solve:phases="))] | last // empty')
|
|
502
547
|
```
|
|
503
548
|
|
|
504
|
-
**If
|
|
549
|
+
**If an assess analysis comment exists:**
|
|
505
550
|
|
|
506
551
|
1. Parse the HTML comment markers to extract the recommended phases:
|
|
507
552
|
```
|
|
508
|
-
<!--
|
|
509
|
-
<!--
|
|
510
|
-
<!--
|
|
511
|
-
<!-- solve:quality-loop=true --> → enable quality loop
|
|
553
|
+
<!-- assess:phases=exec,qa --> → phases: ["exec", "qa"] (spec not included = skip spec)
|
|
554
|
+
<!-- assess:browser-test=false --> → no browser testing needed
|
|
555
|
+
<!-- assess:quality-loop=true --> → enable quality loop
|
|
512
556
|
```
|
|
513
557
|
|
|
514
|
-
2. **Use the
|
|
558
|
+
2. **Use the assess recommendation as your starting point** for the phase recommendation in step 5.
|
|
515
559
|
|
|
516
|
-
3. **You may override the
|
|
560
|
+
3. **You may override the assess recommendation**, but you MUST document why:
|
|
517
561
|
```markdown
|
|
518
562
|
## Recommended Workflow
|
|
519
563
|
|
|
520
564
|
**Phases:** spec → exec → test → qa
|
|
521
565
|
**Quality Loop:** enabled
|
|
522
|
-
**Reasoning:**
|
|
566
|
+
**Reasoning:** Assess recommended `exec → qa`, but codebase analysis reveals UI components
|
|
523
567
|
are affected (found `.tsx` files in change scope), so browser testing is needed.
|
|
524
|
-
Overriding
|
|
568
|
+
Overriding assess recommendation with explanation.
|
|
525
569
|
```
|
|
526
570
|
|
|
527
|
-
4. If the
|
|
571
|
+
4. If the assess comment recommends phases that don't include `spec` (e.g., `phases=exec,qa`), acknowledge this in your output but proceed with spec since `/spec` was explicitly invoked.
|
|
528
572
|
|
|
529
|
-
**If no
|
|
573
|
+
**If no assess analysis comment exists:** Proceed with your own analysis as normal (step 5).
|
|
530
574
|
|
|
531
575
|
### 5. Recommended Workflow
|
|
532
576
|
|
|
@@ -654,7 +698,8 @@ npx tsx scripts/state/update.ts fail <issue-number> spec "Error description"
|
|
|
654
698
|
- [ ] **Verification Criteria** - Each AC has Verification Method and Test Scenario
|
|
655
699
|
- [ ] **Conflict Risk Analysis** - Check for in-flight work, include if conflicts found
|
|
656
700
|
- [ ] **Implementation Plan** - 3-7 concrete steps with codebase references
|
|
657
|
-
- [ ] **
|
|
701
|
+
- [ ] **Design Review** - All 4 questions answered (abbreviated to Q1+Q3 for simple-fix/typo/docs-only labels)
|
|
702
|
+
- [ ] **Content Analysis** - Title/body analysis results (or "Assess comment found" if using /assess)
|
|
658
703
|
- [ ] **Recommended Workflow** - Phases, Quality Loop setting, Signal Sources, and Reasoning
|
|
659
704
|
- [ ] **Label Review** - Current vs recommended labels based on plan analysis
|
|
660
705
|
- [ ] **Open Questions** - Any ambiguities with recommended defaults
|
|
@@ -700,6 +745,20 @@ You MUST include these sections in order:
|
|
|
700
745
|
|
|
701
746
|
---
|
|
702
747
|
|
|
748
|
+
## Design Review
|
|
749
|
+
|
|
750
|
+
1. **Where does this logic belong?** [Module/layer that owns this change]
|
|
751
|
+
|
|
752
|
+
2. **What's the simplest correct approach?** [Minimum implementation, rejected alternatives]
|
|
753
|
+
|
|
754
|
+
3. **What existing pattern does this follow?** [Named pattern, confirmation it fits]
|
|
755
|
+
|
|
756
|
+
4. **What would a senior reviewer challenge?** [Anticipated pushback]
|
|
757
|
+
|
|
758
|
+
<!-- For simple-fix/typo/docs-only: only Q1 and Q3 required -->
|
|
759
|
+
|
|
760
|
+
---
|
|
761
|
+
|
|
703
762
|
## Open Questions
|
|
704
763
|
|
|
705
764
|
1. **[Question]**
|
|
@@ -710,10 +769,10 @@ You MUST include these sections in order:
|
|
|
710
769
|
|
|
711
770
|
## Content Analysis
|
|
712
771
|
|
|
713
|
-
<!-- If
|
|
714
|
-
**Source:**
|
|
772
|
+
<!-- If assess comment found: -->
|
|
773
|
+
**Source:** Assess comment found - using /assess workflow recommendations
|
|
715
774
|
|
|
716
|
-
<!-- If no
|
|
775
|
+
<!-- If no assess comment, show analysis: -->
|
|
717
776
|
### Signal Sources
|
|
718
777
|
|
|
719
778
|
| Phase | Source | Confidence | Reason |
|