Skip to content

#17: needs-extraction composite (multi) sensor - #38

Merged
devill merged 3 commits into
mainfrom
issue-17-needs-extraction
Jun 17, 2026
Merged

#17: needs-extraction composite (multi) sensor#38
devill merged 3 commits into
mainfrom
issue-17-needs-extraction

Conversation

@devill

@devill devill commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Closes #17.

Ships the first composite/multi sensor described in docs/architecture.md: oversized-file + duplicated-code in the same fileneeds-extraction.

Locked decisions

  • 17.1: same-file oversized-file + duplicated-codeneeds-extraction.
  • 17.2: configurable; default augment (all three show). needsExtraction.replace: true suppresses the two input smells for that file.
  • 17.3: severity enforced.
  • 17.4: ROSE-pattern needs-extraction.md prompt.

Hard constraints — all met

  • A real multi sensor via dependsOn/ctx.deps; the mapper is untouched and stays a pure single-smell function. Replace-mode (applyReplaceMode) runs in the sensor layer (detect() on the merged bag).
  • Fires end-to-end through the real runner on a fixture that trips both inputs (bundled eslint max-lines + jscpd duplication, plain-JS so no node_modules needed).
  • needs-extraction added to docs/smell-vocabulary.md (+ a Combinations section).

Notes

Atomic commits

  1. #17: add the needs-extraction composite sensor and a satisfiability prune
  2. #17: catalogue, prompt, and config for needs-extraction
  3. #17: wire needs-extraction into the TS preset end-to-end

Gates

  • pnpm build, pnpm lint — clean
  • pnpm test — 392 passed (+7)

🤖 Generated with Claude Code


Generated by Claude Code

claude added 3 commits June 17, 2026 17:13
…rune

needsExtractionSensor is a real multi sensor (dependsOn oversized-file +
duplicated-code) that emits needs-extraction for any file with both, plus
applyReplaceMode for the augment/replace switch. satisfiableSensors drops
a multi sensor whose dependency producers were gated out, so SensorRunner
construction can't crash a run. Unwired until the preset uses it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nq6xHU6JtSNpYWhMYjXB15
Add the enforced needs-extraction smell to the catalogue (custom source),
a ROSE-pattern needs-extraction.md prompt, and the needsExtraction.replace
config knob (default augment).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nq6xHU6JtSNpYWhMYjXB15
the merged bag (the mapper stays a pure single-smell function). Covered by
unit tests and an end-to-end runner test on a fixture that trips both
inputs (augment default + replace). Updates docs/smell-vocabulary.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nq6xHU6JtSNpYWhMYjXB15
@devill
devill force-pushed the issue-17-needs-extraction branch from 9b79c23 to c71b206 Compare June 17, 2026 15:17
@devill
devill marked this pull request as ready for review June 17, 2026 15:18
@devill
devill merged commit 06b7001 into main Jun 17, 2026
1 of 2 checks passed
@devill
devill deleted the issue-17-needs-extraction branch June 19, 2026 12:21
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.

Composite (multi) sensors: ship combination smells via dependsOn/ctx.deps

2 participants