Skip to content

feat(spec): Add Scope Assessment with Non-Goals requirement - #247

Merged
admarble merged 3 commits into
mainfrom
feature/239-feat-add-scope-assessment-to-spec-with-non-goals-r
Feb 3, 2026
Merged

admarble merged 3 commits into
mainfrom
feature/239-feat-add-scope-assessment-to-spec-with-non-goals-r

Conversation

@admarble

@admarble admarble commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add scope analysis library with feature detection heuristics (AC clustering, title verb detection, directory spread analysis)
  • Require Non-Goals section in /spec output with warning if missing
  • Add scope metrics table showing feature count, AC count, directory spread
  • Display verdicts: SCOPE_OK (✅), SCOPE_WARNING (⚠️), SCOPE_SPLIT_RECOMMENDED (❌)
  • Auto-enable quality loop when scope verdict is yellow or red
  • Add configurable thresholds in .sequant/settings.json
  • Skip scope assessment for trivial issues (≤3 AC, single directory)
  • Add --skip-scope-check flag for explicit bypass
  • Store scope assessment results in workflow state for analytics
  • Add 40 unit tests covering all scope module functionality

Test plan

  • All 40 scope module tests pass
  • Full test suite passes (1107/1108 tests, 1 pre-existing flaky semgrep timeout)
  • TypeScript build succeeds
  • Manual test: Run /spec on an overscoped issue → warning appears
  • Manual test: Run /spec on a focused issue → SCOPE_OK verdict
  • Manual test: Verify Non-Goals warning when section missing

Acceptance Criteria Coverage

AC Description Status Evidence
AC-1 Non-Goals section (warning if empty) ✅ SKILL.md:174-212, formatter.ts:formatNonGoals
AC-2 Scope Assessment metrics table ✅ SKILL.md:154-166, formatter.ts:formatMetricsTable
AC-3 Feature count detection heuristic ✅ analyzer.ts:clusterACByKeyword,calculateFeatureCount
AC-4 Scope verdict rendering ✅ verdict.ts:calculateVerdict, formatter.ts:formatVerdict
AC-5 Configurable thresholds ✅ settings.ts:ScopeAssessmentSettings, types.ts:DEFAULT_SCOPE_CONFIG
AC-6 Assessment runs after AC Quality Check ✅ SKILL.md:154 (section ordering)
AC-7 Quality loop auto-enabled for yellow/red ✅ verdict.ts:shouldEnableQualityLoop, SKILL.md:193-197
AC-8 Scope metrics stored in state ✅ state-schema.ts:217, state-manager.ts:updateScopeAssessment
AC-9 Skip logic for trivial issues ✅ analyzer.ts:shouldSkipAssessment
AC-10 --skip-scope-check flag ✅ SKILL.md:52-55
AC-11 Documented in SKILL.md ✅ SKILL.md:154-218
AC-12 Configuration options documented ✅ SKILL.md:165-166, settings.ts types

Closes #239

🤖 Generated with Claude Code

Integrate scope assessment into /spec skill to catch overscoped issues:

- Add scope analysis library with feature detection heuristics
- Require Non-Goals section in /spec output
- Add scope metrics (feature count, AC count, directory spread)
- Display verdicts (SCOPE_OK, SCOPE_WARNING, SCOPE_SPLIT_RECOMMENDED)
- Auto-enable quality loop for yellow/red scope verdicts
- Add configurable thresholds in settings.json
- Skip assessment for trivial issues (configurable)
- Add --skip-scope-check flag for explicit bypass
- Store scope assessment in workflow state for analytics
- Add 40 unit tests for scope module

Closes #239

Co-Authored-By: Claude Opus 4.5 <[email protected]>
admarble and others added 2 commits February 3, 2026 01:25
- Remove unused shouldEnableQualityLoop import in scope/index.ts (re-export handles it)
- Remove unused ScopeAssessment type import in state-schema.ts

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@admarble
admarble merged commit f53b28f into main Feb 3, 2026
6 checks passed
@admarble
admarble deleted the feature/239-feat-add-scope-assessment-to-spec-with-non-goals-r branch February 3, 2026 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Add Scope Assessment to /spec with Non-Goals Requirement

1 participant