Repository navigation
Description
Summary
Integrate scope assessment into the /spec skill to catch overscoped issues before implementation begins. Following industry best practices (Google design docs, Amazon 6-pagers), require explicit scope boundaries.
Philosophy: Structure that enforces discipline, not process that adds steps.
Problem Statement
What Goes Wrong Today
- Bundled features - Issues contain 3+ distinct features that should be separate
- Vague scope - No clear boundary on what's included vs excluded
- Scope creep during implementation - Adjacent work gets pulled in
- Wasted iteration - QA fails because requirements were unclear upfront
Evidence
Issues #233-236 were created with these exact problems:
- feat: Learning & Adaptation - Pattern Memory and Codebase Conventions #233: 3 distinct features bundled (pattern memory, failure analysis, conventions)
- feat: Collaboration & Visibility - Team Dashboard and Notifications #234: 4 features, 2 requiring infrastructure changes
- feat: Smarter Planning - Dependency Detection and Effort Estimation #235: Included effort estimation (unreliable) alongside useful features
- feat: Testing Enhancements - Visual Regression, Auto E2E, Coverage Gates #236: 4 unrelated testing features conflated
All required significant revision before being actionable.
Proposed Solution
1. Required "Non-Goals" Section
Every /spec output must include:
## Non-Goals
What this issue explicitly will NOT do:
- [ ] [Adjacent feature we're deferring]
- [ ] [Scope boundary we're respecting]
- [ ] [Future work that's out of scope]
If you cannot list non-goals, the scope may be too vague.Why this works:
- Forces explicit boundary thinking
- Self-documenting scope limits
- Easy for reviewers to verify
- Industry standard (Google, Amazon, Stripe all require this)
2. Scope Assessment Checklist
Add automated checks during /spec:
## Scope Assessment
| Check | Status | Details |
|-------|--------|---------|
| Single outcome | ✅ | One deployable feature |
| AC testable | ⚠️ | AC-3 flagged as vague |
| File estimate | ✅ | ~5 files (under threshold) |
| Feature count | ❌ | 3 distinct features detected |
| Non-goals defined | ✅ | 4 non-goals listed |
| No overlap with open issues | ⚠️ | #237 covers similar ground |
**Recommendation:** Consider splitting into separate issues.3. Feature Count Detection
Heuristics to detect bundled features:
| Signal | Detection Method |
|---|---|
| Multiple AC clusters | AC items group into distinct functional areas |
| "And" in title | "Add caching AND improve logging" |
| Unrelated file groups | Changes span 3+ unrelated directories |
| Multiple verbs | "Add X, refactor Y, fix Z" |
| Section headers in body | "## Feature 1", "## Feature 2" |
Algorithm:
feature_count = 0
if AC items cluster into distinct groups: feature_count += cluster_count
if title contains multiple verbs: feature_count += verb_count - 1
if file changes span unrelated areas: feature_count += area_count - 1
4. Complexity Thresholds
| Metric | Green | Yellow | Red |
|---|---|---|---|
| Feature count | 1 | 2 | 3+ |
| AC items | 1-5 | 6-8 | 9+ |
| Estimated files | 1-7 | 8-12 | 13+ |
| Directory spread | 1-2 | 3-4 | 5+ |
Behavior:
- Green: Proceed normally
- Yellow: Warning in output, suggest consideration
- Red: Strong recommendation to split, explain why
5. Integration Points
| Existing Feature | Integration |
|---|---|
| AC Quality Check | Scope assessment runs after AC lint |
| Conflict Analysis | Scope check includes overlap detection |
| Label Review | Suggest complex label if thresholds exceeded |
| Workflow Recommendation | Enable quality loop if scope is yellow/red |
Output Template Addition
Insert after "AC Quality Check", before "Implementation Plan":
## Scope Assessment
### Outcome Definition
**Goal:** [One sentence describing success]
### Non-Goals (Required)
- [ ] [What this will NOT do]
- [ ] [Scope boundary]
- [ ] [Deferred work]
### Scope Metrics
| Metric | Value | Status |
|--------|-------|--------|
| Feature count | 1 | ✅ |
| AC items | 4 | ✅ |
| Estimated files | 6 | ✅ |
| Directory spread | 2 | ✅ |
### Scope Verdict
✅ **SCOPE_OK** - Single focused feature, clear boundaries
⚠️ **SCOPE_WARNING** - Consider narrowing (details below)
❌ **SCOPE_SPLIT_RECOMMENDED** - Should be multiple issues
[If warning/split: explanation of why and how to split]Gap Analysis
Known Limitations
| Gap | Mitigation |
|---|---|
| Heuristics aren't perfect | Warning only, not blocking. Human decides. |
| Legitimate complex issues exist | Yellow/red status can be acknowledged and overridden |
| May slow down simple issues | Skip assessment if AC count ≤ 3 and single directory |
| Different projects have different norms | Thresholds configurable in .sequant/config.json |
Open Questions
-
How strict should "Non-Goals" requirement be?
- Option A: Hard requirement, /spec fails without it
- Option B: Strong warning, but proceeds
- Recommendation: Option B (warning) - don't block, educate
-
Should scope assessment run on all issues?
- Option A: Always run
- Option B: Skip for trivial issues (≤3 AC, single file)
- Recommendation: Option B - avoid annoying for simple fixes
-
How do we handle
/improveauto-created issues?/improveshould generate single-feature issues by default- If it detects multiple improvements, create separate issues
- Add scope check to
/improveas well
-
What if users consistently ignore warnings?
- Track in metrics: scope warnings vs actual split rate
- Surface in
/reflect: "80% of scope warnings were ignored, 60% of those required rework" - Don't escalate to blocking - that's against sequant philosophy
-
Calibration per project type
- Thresholds in
.sequant/config.json:{ "scopeAssessment": { "enabled": true, "skipIfSimple": true, "thresholds": { "featureCount": { "yellow": 2, "red": 3 }, "acItems": { "yellow": 6, "red": 9 }, "fileEstimate": { "yellow": 8, "red": 13 } } } }
- Thresholds in
Risks
| Risk | Likelihood | Impact | Mitigation |
|---|---|---|---|
| Over-engineering simple issues | Medium | Low | Skip assessment for trivial issues |
| False positives annoy users | Medium | Medium | Warning only, configurable thresholds |
| Heuristics wrong for domain | Low | Medium | Project-specific config |
| Slows down workflow | Low | Low | Runs during existing /spec, minimal overhead |
What This Does NOT Solve
- Ensuring issues are well-written - That's AC linting's job
- Detecting all scope creep - Some emerges during implementation
- Forcing users to split - We warn, they decide
- Cross-repo scope issues - Out of sequant's domain
Acceptance Criteria
Core Functionality
- AC-1:
/specoutput includes "Non-Goals" section (warning if empty) - AC-2:
/specoutput includes "Scope Assessment" with metrics table - AC-3: Feature count detection heuristic implemented
- AC-4: Scope verdict rendered (SCOPE_OK / SCOPE_WARNING / SCOPE_SPLIT_RECOMMENDED)
- AC-5: Thresholds configurable in
.sequant/config.json
Integration
- AC-6: Scope assessment runs after AC Quality Check
- AC-7: If scope is yellow/red, quality loop auto-enabled
- AC-8: Scope metrics stored in workflow state for analytics
Skip Logic
- AC-9: Assessment skipped for trivial issues (configurable)
- AC-10:
--skip-scope-checkflag available
Documentation
- AC-11: Scope assessment documented in skill template
- AC-12: Configuration options documented
Implementation Plan
Phase 1: Core Assessment (AC-1, AC-2, AC-4)
- Add Non-Goals section to
/specoutput template - Add Scope Assessment section with basic metrics
- Implement verdict logic based on thresholds
Phase 2: Feature Detection (AC-3)
- Implement AC clustering heuristic
- Implement title verb detection
- Implement directory spread analysis
- Combine into feature count score
Phase 3: Configuration (AC-5, AC-9, AC-10)
- Add
scopeAssessmentconfig schema - Implement skip logic for trivial issues
- Add
--skip-scope-checkflag
Phase 4: Integration (AC-6, AC-7, AC-8)
- Insert assessment after AC lint in skill flow
- Auto-enable quality loop for yellow/red
- Store metrics in state for analytics
Phase 5: Documentation (AC-11, AC-12)
- Update SKILL.md with new sections
- Document configuration options
- Add examples to docs/
Verification Criteria
| AC | Verification Method | Test Scenario |
|---|---|---|
| AC-1 | Integration test | Run /spec on issue without non-goals → warning appears |
| AC-2 | Integration test | Run /spec → scope metrics table in output |
| AC-3 | Unit test | Input AC clusters → correct feature count |
| AC-4 | Unit test | Input metrics → correct verdict |
| AC-5 | Unit test | Custom thresholds in config → used in assessment |
| AC-9 | Integration test | 2 AC, 1 file issue → assessment skipped |
Related Issues
- roadmap: Developer Experience Improvements #237 - DX Roadmap (integrated failure context relates to scope feedback loop)
- feat: Learning & Adaptation - Pattern Memory and Codebase Conventions #233-236 - Evidence of scope problems this would catch
References
- Google Design Docs - Non-goals requirement
- Amazon 6-Pager - "What we will NOT do" section
- Stripe RFCs - Scope boundaries
Comprehensive issue with gap analysis - ready for implementation
Activity
admarble commentedon Feb 2, 2026
📋 Spec Review: Scope Assessment for /spec
✅ AC Quality Check
All 12 acceptance criteria are clear and testable with specific, measurable outcomes.
Acceptance Criteria Checklist
--skip-scope-checkflagVerification Criteria Summary
Assumptions to Validate
Implementation Plan
Phase 1: Core Scope Analysis Library (AC-3, AC-4)
src/lib/scope/analyzer.ts- AC clustering and feature detectionsrc/lib/scope/verdict.ts- threshold comparison and verdict logicsrc/lib/scope/formatter.ts- markdown output generationPhase 2: State & Configuration (AC-5, AC-8)
state-schema.tswithScopeAssessmentSchemastate-manager.tswithupdateScopeAssessment()scopeAssessmentto.sequant/settings.jsonschemaPhase 3: SKILL.md Integration (AC-1, AC-2, AC-6)
Phase 4: Workflow Integration (AC-7, AC-9, AC-10)
--skip-scope-checkflag supportPhase 5: Documentation (AC-11, AC-12)
Key Decisions
Scope Self-Assessment
Verdict:⚠️ SCOPE_WARNING - Phased implementation recommended
Recommended Workflow
Quality Loop: disabled
Reasoning: Phased implementation plan mitigates complexity
Generated by /spec • Ready for implementation
feat(spec): Add Scope Assessment with Non-Goals requirement (#239)
admarble commentedon Feb 2, 2026
🚀 Implementation Complete
AC Coverage Summary
SKILL.md:174-212,formatter.ts:formatNonGoalsSKILL.md:154-166,formatter.ts:formatMetricsTableanalyzer.ts:clusterACByKeyword,calculateFeatureCountverdict.ts:calculateVerdict,formatter.ts:formatVerdictsettings.ts:ScopeAssessmentSettingsSKILL.md:154(section ordering)verdict.ts:shouldEnableQualityLoopstate-manager.ts:updateScopeAssessmentanalyzer.ts:shouldSkipAssessment--skip-scope-checkflagSKILL.md:52-55SKILL.md:154-218settings.ts,types.tsKey Files Changed
src/lib/scope/- New scope analysis library (analyzer, verdict, formatter, types)src/lib/settings.ts- AddedscopeAssessmentconfigurationsrc/lib/workflow/state-schema.ts- AddedScopeAssessmentSchemasrc/lib/workflow/state-manager.ts- AddedupdateScopeAssessment()method.claude/skills/spec/SKILL.md- Added Scope Assessment section and--skip-scope-checkflagTests
PR Created
#247
🤖 Generated by
/exec 239admarble commentedon Feb 3, 2026
✅ QA Complete - Merged
Final Status
PR #247 merged to main (
f53b28f). All 12 AC items implemented and verified.Post-Merge Cleanup
Test coverage gap filled: Added 6 tests for
updateScopeAssessmentandgetScopeAssessment(commit1d82780)Follow-up issue created: fix: Align ScopeAssessmentSettings with ScopeAssessmentConfig for custom thresholds #249 - Settings/config type alignment for custom threshold support
Smoke Test Results
Known Limitation
Custom thresholds via
.sequant/settings.jsonnot yet wired up (tracked in #249). Feature works with defaults.QA completed by Claude Opus 4.5
docs: Add scope assessment to changelog and what-weve-built
fix(exec): Add pre-PR lint validation to catch CI failures early