You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
QA skill: add small-diff fast path to skip sub-agents for trivial changes #465
The /qa skill unconditionally spawns 3 sub-agents for quality checks (type-safety, scope/size, security) regardless of diff size. For trivial fixes (e.g., #461 — 9 line substitutions, 57 additions), this adds ~30s latency and ~3x token cost compared to running the same checks inline.
The mandatory output template also includes ~15 sections, most of which are N/A for small mechanical fixes (Quality Plan Verification, Incremental QA, Call-Site Review, Product Review, Smoke Test, CLI Registration, etc.).
Acceptance Criteria
AC-1: Add a size gate in the Quality Checks section: if additions + deletions < 100 AND no new dependencies (package.json unchanged) AND no security-sensitive paths changed, allow inline quality checks instead of spawning sub-agents
AC-2: Add a "simple fix" output mode that omits N/A-heavy sections (Quality Plan, Incremental QA, Call-Site Review, Product Review, Smoke Test, CLI Registration, Skill Command Verification) when the diff is below the size gate
AC-3: The size gate threshold (default: 100 lines) should be configurable via .sequant/settings.json (e.g., qa.smallDiffThreshold)
This QA itself runs as standard (diff > 100 lines: 528 additions across 5 files). Meta-verified: the size gate would correctly route this PR to sub-agents.
Stale Branch Check
Check
Value
Commits behind main
0
Status
✅ OK
CI Status
Check
State
Impact
build (20.x)
SUCCESS
✅
build (22.x)
SUCCESS
✅
validate-skills
SUCCESS
✅
typecheck
SUCCESS
✅
validate-plugin
SUCCESS
✅
CI Summary: 5 passed, 0 pending, 0 failed
AC Coverage
AC
Source
Description
Status
Notes
AC-1
Original
Size gate for inline quality checks
MET
SKILL.md:836-905 — evaluates diff size, package.json, security paths before spawning sub-agents. Inline checks for type safety, deleted tests, scope, security when SMALL_DIFF=true
AC-2
Original
Simple fix output mode
MET
Output Verification section lists 9 omitted sections; Simple Fix Template is complete with all required sections (Size Gate, AC Coverage, Quality Metrics, Code Review, Test Coverage, Anti-Patterns, Self-Eval, Verdict, Docs, Next Steps)
AC-3
Original
Configurable threshold via settings.json
MET
QASettings.smallDiffThreshold in settings.ts with default 100; getSettings() merges parsed.qa over defaults; 6/6 unit tests pass covering default, custom threshold, merge behavior
Dependencies explicit: Requires only git, grep, wc — all standard POSIX tools
Skill Command Verification
Skill files changed: 2
File
Commands Found
Verification Status
.claude/skills/qa/SKILL.md
8 (in size gate section)
✅ Passed
templates/skills/qa/SKILL.md
8 (identical)
✅ Passed
All commands use standard POSIX tools (cat, grep, git diff). No gh JSON field dependencies in the new sections.
Verification Status: Passed
CHANGELOG Verification
Check
Status
CHANGELOG.md exists
✅
User-facing changes
✅ (feat: skill optimization)
[Unreleased] entry
✅ Present
Entry format
✅ Action verb, includes (#465), correct section (Added)
Self-Evaluation
Verified working: Yes — built successfully, 6/6 new tests pass, all CI green, bash commands in skill tested manually
Test efficacy: Medium — unit tests cover settings schema/merge; the skill prompt behavior itself is tested implicitly through use (prompt engineering, not executable code)
Likely failure mode: An LLM agent might not correctly parse the size gate threshold from settings.json if the JSON structure is unusual (e.g., nested or with comments). The grep -o approach is brittle compared to jq, but has the advantage of zero external dependencies.
Verdict confidence: High — changes are well-scoped (settings interface + prompt template), follow existing patterns, and all automated checks pass
Verdict: READY_FOR_MERGE
All 6 ACs (4 original + 2 derived) are met. Code quality is high:
TypeScript changes are minimal and follow existing settings patterns
Skill prompt changes are clearly structured with decision tables and fallback behavior
All grep commands are exit-code safe
Templates are in sync
CI is fully green (5/5 checks)
CHANGELOG entry present
Documentation
CHANGELOG entry added
N/A — No new user-facing CLI commands or config documentation needed (settings.json field is self-documenting via existing patterns)
Documentation: Before merging, run /docs 465 to generate feature documentation.
Activity
admarble commentedon Mar 26, 2026
→ PROCEED — Clear ACs, planned label, QA skill optimization
spec → exec → qa · 4 ACs · -q (configurable threshold + output mode change)
admarble commentedon Mar 26, 2026
Spec Plan for #465: QA Skill Small-Diff Fast Path
AC Checklist with Verification Criteria
AC-1: Size gate for inline quality checks
Verification Method: Integration Test
package.jsonchanges, no security-sensitive paths/qainvoked/qainvokedAC-2: Simple fix output mode
Verification Method: Integration Test
/qacompletesAC-3: Configurable threshold via settings.json
Verification Method: Unit Test
{"qa": {"smallDiffThreshold": 50}}in settingsqa.smallDiffThresholdin settingsAC-4: Security-sensitive path detection reuses existing heuristic
Verification Method: Unit Test
src/middleware/auth.tssrc/lib/utils.tsDerived ACs
Implementation Plan
Phase 1: Settings schema (AC-3)
QASettingsinterface tosrc/lib/settings.tswithsmallDiffThreshold: number(default: 100)qafield toSequantSettingsandDEFAULT_SETTINGSPhase 2: Size gate logic in QA SKILL.md (AC-1, AC-4)
3. Insert size gate section before "Quality Checks (Multi-Agent)" (~line 836):
.sequant/settings.jsongit diff --statpackage.jsonin changed filesauth|payment|security|server-action|middleware|adminSMALL_DIFF=true/falseflagSMALL_DIFF=truepathPhase 3: Simple fix output template (AC-2)
5. Add conditional annotations to existing output template sections (omit N/A-heavy sections when
SMALL_DIFF=true)Phase 4: Sync templates
6. Mirror all SKILL.md changes to
templates/skills/qa/SKILL.mdDesign Review
SKILL.md(prompt engineering) +src/lib/settings.ts(settings interface)SMALL_DIFFflag in SKILL.md, branching quality checks and output template. No new files or abstractions.SEQUANT_ISSUE_TYPE=docsdetection (line 844-861) — same early-detect-and-branch pattern. Settings followstaleBranchThresholdconvention.Open Questions
server-actionin security regex? → Yes, AC-4 says "existing heuristic" which includes itRecommended Workflow
Phases: spec → exec → qa
Quality Loop: enabled (scope spans 4 directories)
Label Review
Current: enhancement, planned, cli
Recommended: Remove
cli— no CLI interface changes, only skill prompt + settings interface→
gh issue edit 465 --remove-label clifeat(#465): add small-diff fast path to QA skill
admarble commentedon Mar 26, 2026
Exec Progress Update
AC Coverage
.claude/skills/qa/SKILL.md:836-905— size gate evaluates diff size, package.json, security paths.claude/skills/qa/SKILL.md— simplified template omits 9 N/A-heavy sectionssrc/lib/settings.ts—QASettings.smallDiffThresholdwith default 100, merged ingetSettings()SMALL_DIFF=falseon evaluation errorsFiles Changed
src/lib/settings.ts— AddedQASettingsinterface,DEFAULT_QA_SETTINGS, wired intoSequantSettingsandgetSettings()src/lib/qa-settings.test.ts— 6 unit tests for QA settings (default, custom threshold, merge behavior).claude/skills/qa/SKILL.md— Size gate section + inline checks + simplified output templatetemplates/skills/qa/SKILL.md— Synced copyCHANGELOG.md— Added [Unreleased] entryQuality Checks
npm run buildnpm run lintnpm testQuality Plan Alignment: N/A — No quality plan in issue
PR: #469
admarble commentedon Mar 26, 2026
QA Review for Issue #465
Size Gate
This QA itself runs as standard (diff > 100 lines: 528 additions across 5 files). Meta-verified: the size gate would correctly route this PR to sub-agents.
Stale Branch Check
CI Status
build (20.x)build (22.x)validate-skillstypecheckvalidate-pluginCI Summary: 5 passed, 0 pending, 0 failed
AC Coverage
QASettings.smallDiffThresholdin settings.ts with default 100;getSettings()mergesparsed.qaover defaults; 6/6 unit tests pass covering default, custom threshold, merge behaviorauth|payment|security|server-action|middleware|adminconfirmed in size gate bash block (matches anti-pattern detection heuristic)Coverage: 6/6 AC items fully met
Quality Metrics
any)Build Verification
N/A — Build passed (
tscclean)Test Coverage Analysis
src/lib/settings.tssrc/lib/qa-settings.test.ts(new, 6 tests).claude/skills/qa/SKILL.mdtemplates/skills/qa/SKILL.mdCHANGELOG.mdCoverage: 1/1 changed source files have tests
Code Review
Strengths:
QASettingsmirrorsAgentSettings/ScopeAssessmentSettingspatterngrep -ccommands in skill have|| echo "0"safety (per known pitfall)grep -owith fallback|| echo "100"is robust.claude/skills/qa/SKILL.mdandtemplates/skills/qa/SKILL.mdare byte-identical (verified via diff)Issues:
Suggestions:
Anti-Pattern Detection
No dependency changes (package.json unchanged).
Skill Change Review
grep -o '"smallDiffThreshold"...'extraction — produces correct output for{"qa":{"smallDiffThreshold":50}}git,grep,wc— all standard POSIX toolsSkill Command Verification
Skill files changed: 2
.claude/skills/qa/SKILL.mdtemplates/skills/qa/SKILL.mdAll commands use standard POSIX tools (cat, grep, git diff). No gh JSON field dependencies in the new sections.
Verification Status: Passed
CHANGELOG Verification
Self-Evaluation
grep -oapproach is brittle compared tojq, but has the advantage of zero external dependencies.Verdict: READY_FOR_MERGE
All 6 ACs (4 original + 2 derived) are met. Code quality is high:
Documentation
Documentation: Before merging, run
/docs 465to generate feature documentation.Next Steps
/qarun against a small difffix(#465): replace grep -c || echo "0" with || true across all skills
feat(#465): add small-diff fast path to QA skill (#469)
feat(#465): add small-diff fast path to QA skill
fix(#465): replace grep -c || echo "0" with || true across all skills