Repository navigation
Closed
Labels
auto-readyCan be resolved via automated workflowenhancementNew feature or requestready-for-reviewReady for code review
Description
Summary
The /solve skill analyzes issues and recommends optimal workflows, but this analysis is displayed only in the terminal and discarded. When sequant run executes, /spec re-analyzes from scratch, sometimes reaching different conclusions.
Problem
Current Flow (Disconnected)
/solve 113 114 115
↓
[Advisory output to terminal] ←── User reads, decides
↓
npx sequant run 113 114 115
↓
/spec runs, makes its own analysis ←── Ignores solve's work
Evidence
From verbose run review:
/solverecommended:exec → qafor feat(#87): warn when running from local node_modules #113 (skip spec for trivial fix)/solverecommended:spec → exec → test → qafor Add persistent state tracking for workflow phases #115 (UI refactor needs browser testing)- But
sequant runexecutedspec → exec → qafor all three issues
Acceptance Criteria
- AC-1: After analysis, solve prompts: "Save this plan to the issues? [Y/n]"
- AC-2: If yes, solve posts a structured comment to each issue with machine-readable markers
- AC-3: Comment includes recommended phases, flags, and reasoning
- AC-4:
/specskill checks for solve analysis comment before making its own recommendation - AC-5: If solve comment exists, spec uses it as input (can still override with explanation)
Proposed Comment Format
## Solve Analysis
**Recommended Phases:** exec → qa
**Skip Spec:** Yes (trivial fix - unused variable removal)
**Browser Testing:** No (no UI changes detected)
**Quality Loop:** No (simple fix)
### Reasoning
- Title contains "Fix unused variable" → trivial fix pattern
- No `.tsx` files likely modified
- Labels: `enhancement` (no `complex`/`refactor`)
<!-- solve:phases=exec,qa -->
<!-- solve:skip-spec=true -->
<!-- solve:browser-test=false -->
<!-- solve:quality-loop=false -->Proposed Flow (Connected)
/solve 113 114 115
↓
[Analysis output to terminal]
↓
"Save this plan to the issues? [Y/n]"
↓
Posts structured comment to each issue
↓
npx sequant run 113 114 115
↓
/spec reads issue comments, finds solve analysis
↓
Spec uses solve's recommendation OR overrides with documented reason
Benefits
- Solve's analysis persists — Not lost after terminal output
- Spec can read it — Machine-readable markers enable parsing
- Audit trail — Issue comments show decision history
- User control — Prompted before posting, can decline
References
- Solve skill:
templates/skills/solve/SKILL.md - Spec skill:
templates/skills/spec/SKILL.md
Metadata
Metadata
Assignees
Labels
auto-readyCan be resolved via automated workflowenhancementNew feature or requestready-for-reviewReady for code review
Activity
admarble commentedon Feb 23, 2026
Spec Plan for #172
AC Checklist
/specskill checks for solve analysis comment before making its own recommendationImplementation Plan
Phase 1: Update solve skill to post analysis (AC-1, AC-2, AC-3)
gh issue commentto allowed-tools in all 3 solve SKILL.md locationssolve-comment-parser.tsexpectationsPhase 2: Update solve-comment-parser (AC-4)
4. Add
## Solve AnalysistoSOLVE_MARKERSarray5. Add
<!-- solve:phases=... -->HTML comment marker parsing6. Create
solve-comment-parser.test.tswith comprehensive testsPhase 3: Update spec skill (AC-4, AC-5)
7. Add "Solve Comment Detection" section to both spec SKILL.md locations
8. Instruct spec to fetch comments, check for solve analysis, use as phase input
Recommended Workflow
Phases: spec → exec → qa
Quality Loop: enabled
Files to Modify
.claude/skills/solve/SKILL.mdtemplates/skills/solve/SKILL.mdskills/solve/SKILL.mdsrc/lib/solve-comment-parser.tssrc/lib/solve-comment-parser.test.ts.claude/skills/spec/SKILL.mdtemplates/skills/spec/SKILL.mdfeat(#172): persist solve workflow analysis to issue comments
admarble commentedon Mar 11, 2026
QA Review for Issue #172
AC Coverage
AskUserQuestionwith "Yes (Recommended)" / "No" optionsgh issue commentposts with HTML comment markers/specchecks for solve analysis commentgh issue view --json commentsfor solve markersparseSolveMarkerssuite (7 tests) and## Solve Analysisdetectiondiff—.claude/,skills/,templates/diff—.claude/,templates/Coverage: 8/8 AC items fully met
Original ACs: 5/5 met
Derived ACs: 3/3 met
Quality Plan Verification
N/A — No quality plan found in issue comments
CI Status
validate-pluginbuild (18.x)build (20.x)build (22.x)validate-skillstypecheckCI Summary: 6 passed, 0 pending, 0 failed
Quality Metrics
any)Cache Status
N/A — Caching disabled (first run)
Build Verification
N/A — Build passed (
tscexits 0)Test Coverage Analysis
src/lib/solve-comment-parser.tssrc/lib/solve-comment-parser.test.ts(69 tests).claude/skills/solve/SKILL.md.claude/skills/spec/SKILL.mdskills/solve/SKILL.mdtemplates/skills/solve/SKILL.mdtemplates/skills/spec/SKILL.mdCoverage: 1/1 changed source files have corresponding tests
Critical paths without tests: None
Code Review
Strengths:
parseSolveMarkers()is a focused, well-typed parser for the new HTML marker formatSOLVE_HTML_MARKER_PATTERNregex handles whitespace variation (<!-- solve:... -->)SolveMarkersinterface properly usesundefinedvs explicit booleansif (!result.qualityLoop))Issues:
Suggestions:
markers.phases as Phase[]on line 225 is an unchecked type assertion — invalid phase names from a malformed marker would pass through. Low risk since markers are machine-generated, and existing code uses the same pattern (line 133).Test Quality Review
Issues Found: None
Anti-Pattern Detection
Dependency Audit
N/A — No dependency changes
Code Patterns
as Phase[]castCritical Issues: 0
Warnings: 0
Call-Site Review
New exported functions detected: 1
parseSolveMarkers()solve-comment-parser.ts:223(internal)parseSolveWorkflowFindings: Function is used internally only. Export enables direct use by
/specskill or future consumers.Execution Evidence
N/A — No executable script changes. Changes are to
.tsparser (verified via tests) and.mdskill instructions.Skill Command Verification
Skill files changed: 5
.claude/skills/solve/SKILL.mdgh issue comment$issue_number).claude/skills/spec/SKILL.mdgh issue view --json comments --jq<issue-number>)skills/solve/SKILL.mdtemplates/skills/solve/SKILL.mdtemplates/skills/spec/SKILL.mdCommands Verified (syntax):
gh issue comment "$issue_number" --body "..."→ ✅ Validghsyntaxgh issue view <N> --json comments --jq '...'→ ✅commentsis a valid JSON fieldVerification Status: Skipped (all commands use placeholders; syntax verified)
Skill Change Review
gh issue commentandgh issue view --json commentsare valid commandscommentsis a valid JSON field forgh issue view## Solve Analysisand<!-- solve:... -->markers cover the proposed format fullyghCLI authenticated (consistent with existing solve/spec skills)Self-Evaluation
/solveskill generates a comment that doesn't exactly match the expected marker format (e.g., extra whitespace or different casing) — mitigated by flexible regexVerdict: READY_FOR_MERGE
All 8 AC items met. Implementation is clean, well-tested (69 tests), and all skill locations are synced. CI is fully green. The
parseSolveMarkersfunction adds the right abstraction for machine-readable solve markers without disrupting existing parsing.Documentation
Next Steps
/docs 172if any user-facing documentation is desired (optional for this change)feat(#172): persist solve workflow analysis to issue comments
feat(#172): persist solve workflow analysis to issue comments (#338)
admarble commentedon Mar 11, 2026
Documentation Generated
File:
docs/features/solve-analysis-persistence.mdSections Included:
Next Steps:
Ready to merge!
docs(#172): add solve analysis persistence feature documentation
docs(#172): add solve analysis persistence feature documentation