Skip to content

fix(#249): Align ScopeAssessmentSettings with ScopeAssessmentConfig - #302

Merged
admarble merged 3 commits into
mainfrom
feature/249-fix-align-scopeassessmentsettings-with-scopeassess
Feb 20, 2026
Merged

admarble merged 3 commits into
mainfrom
feature/249-fix-align-scopeassessmentsettings-with-scopeassess

Conversation

@admarble

Copy link
Copy Markdown
Contributor

Summary

  • Adds missing fields (trivialThresholds, directorySpread) to ScopeAssessmentSettings interface
  • Creates convertSettingsToConfig() function to convert user settings to scope config
  • Updates SKILL.md to read settings before calling performScopeAssessment
  • Adds comprehensive unit tests for the converter function

Changes

File Change
src/lib/settings.ts Added TrivialThresholds interface, trivialThresholds and directorySpread fields
src/lib/scope/settings-converter.ts New converter function with default merging
src/lib/scope/settings-converter.test.ts 9 unit tests covering all conversion scenarios
src/lib/scope/index.ts Export the converter function
.claude/skills/spec/SKILL.md Updated scope assessment to read settings

Test plan

  • TypeScript build passes (npm run build)
  • ESLint passes (npm run lint)
  • All 49 scope module tests pass
  • New converter tests cover: undefined, empty, full, partial settings, edge values

Pre-PR AC Verification

AC Description Status Evidence
AC-1 ScopeAssessmentSettings includes all fields from ScopeAssessmentConfig ✅ Implemented src/lib/settings.ts:113-146
AC-2 Custom thresholds in .sequant/settings.json are used by scope assessment ✅ Implemented convertSettingsToConfig() + SKILL.md update
AC-3 SKILL.md updated to read settings before calling performScopeAssessment ✅ Implemented .claude/skills/spec/SKILL.md:203-218
AC-4 Unit tests verify settings → config flow ✅ Implemented settings-converter.test.ts (9 tests)
AC-5 Default values documented ✅ Implemented JSDoc comments on all defaults

Closes #249

🤖 Generated with Claude Code

- Add trivialThresholds (maxACItems, maxDirectories) to ScopeAssessmentSettings
- Add directorySpread threshold to settings thresholds
- Add DEFAULT_TRIVIAL_THRESHOLDS with documented defaults
- Update getSettings() to deep merge trivialThresholds
- Create convertSettingsToConfig() for settings→config conversion
- Export converter from src/lib/scope/index.ts
- Update SKILL.md to read settings before scope assessment
- Add comprehensive unit tests for converter function

Enables users to configure custom scope thresholds via .sequant/settings.json

Closes #249
Verify the full pipeline: settings.json → getSettings() →
convertSettingsToConfig() → valid ScopeAssessmentConfig.

Covers deep merge of partial trivialThresholds and thresholds,
partial individual thresholds (missing red), invalid JSON
fallback, and default value drift guard.
Operational docs for customizing scope thresholds via
.sequant/settings.json, including options reference,
common workflows, and troubleshooting.
@admarble
admarble merged commit c341c42 into main Feb 20, 2026
6 checks passed
@admarble
admarble deleted the feature/249-fix-align-scopeassessmentsettings-with-scopeassess branch February 20, 2026 06:51
admarble added a commit that referenced this pull request Feb 20, 2026
…302)

* fix(#249): Align ScopeAssessmentSettings with ScopeAssessmentConfig

- Add trivialThresholds (maxACItems, maxDirectories) to ScopeAssessmentSettings
- Add directorySpread threshold to settings thresholds
- Add DEFAULT_TRIVIAL_THRESHOLDS with documented defaults
- Update getSettings() to deep merge trivialThresholds
- Create convertSettingsToConfig() for settings→config conversion
- Export converter from src/lib/scope/index.ts
- Update SKILL.md to read settings before scope assessment
- Add comprehensive unit tests for converter function

Enables users to configure custom scope thresholds via .sequant/settings.json

Closes #249

* test(#249): add integration tests for settings → config flow

Verify the full pipeline: settings.json → getSettings() →
convertSettingsToConfig() → valid ScopeAssessmentConfig.

Covers deep merge of partial trivialThresholds and thresholds,
partial individual thresholds (missing red), invalid JSON
fallback, and default value drift guard.

* docs(#249): add scope assessment settings documentation

Operational docs for customizing scope thresholds via
.sequant/settings.json, including options reference,
common workflows, and troubleshooting.
admarble added a commit that referenced this pull request Feb 20, 2026
…nt (#306)

* fix(#305): add pre-flight state guard and worktree lifecycle management

- Add pre-flight guard to skip issues with ready_for_merge/merged status
- Add --force flag to bypass pre-flight guard
- Add stale worktree detection (>5 commits behind main) with recreation
- Add reconcileStateAtStartup() for auto-cleanup at run start
- Add helper functions: isBranchMergedIntoMain, isIssueMergedIntoMain
- Update merger skill docs with state update steps and worktree cleanup
- Implement graceful degradation (continue on failures)
- Add comprehensive unit tests for reconciliation functions

Closes #305

* fix(#249): Align ScopeAssessmentSettings with ScopeAssessmentConfig (#302)

* fix(#249): Align ScopeAssessmentSettings with ScopeAssessmentConfig

- Add trivialThresholds (maxACItems, maxDirectories) to ScopeAssessmentSettings
- Add directorySpread threshold to settings thresholds
- Add DEFAULT_TRIVIAL_THRESHOLDS with documented defaults
- Update getSettings() to deep merge trivialThresholds
- Create convertSettingsToConfig() for settings→config conversion
- Export converter from src/lib/scope/index.ts
- Update SKILL.md to read settings before scope assessment
- Add comprehensive unit tests for converter function

Enables users to configure custom scope thresholds via .sequant/settings.json

Closes #249

* test(#249): add integration tests for settings → config flow

Verify the full pipeline: settings.json → getSettings() →
convertSettingsToConfig() → valid ScopeAssessmentConfig.

Covers deep merge of partial trivialThresholds and thresholds,
partial individual thresholds (missing red), invalid JSON
fallback, and default value drift guard.

* docs(#249): add scope assessment settings documentation

Operational docs for customizing scope thresholds via
.sequant/settings.json, including options reference,
common workflows, and troubleshooting.

* docs: update what-weve-built and changelog for #249

* fix(#305): register --force flag in CLI for run command

The --force option was defined in RunOptions and checked at runtime,
but never registered with Commander in bin/cli.ts. Users would see
"use --force to re-run" but the flag was unrecognized by the CLI parser.
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.

fix: Align ScopeAssessmentSettings with ScopeAssessmentConfig for custom thresholds

1 participant