#17: needs-extraction composite (multi) sensor - #38
Merged
Conversation
…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
force-pushed
the
issue-17-needs-extraction
branch
from
June 17, 2026 15:17
9b79c23 to
c71b206
Compare
devill
marked this pull request as ready for review
June 17, 2026 15:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #17.
Ships the first composite/multi sensor described in
docs/architecture.md:oversized-file+duplicated-codein the same file →needs-extraction.Locked decisions
oversized-file+duplicated-code→needs-extraction.needsExtraction.replace: truesuppresses the two input smells for that file.needs-extraction.mdprompt.Hard constraints — all met
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).max-lines+ jscpd duplication, plain-JS so nonode_modulesneeded).needs-extractionadded todocs/smell-vocabulary.md(+ a Combinations section).Notes
mainthe Python preset has nooversized-fileproducer (that's Python preset: detect oversized-file (currently deferred — no clean ruff rule) #19).satisfiableSensorsdrops a composite whose dependency producers were gated out (e.g. a config that disables an input), so the run can't crash.Atomic commits
#17: add the needs-extraction composite sensor and a satisfiability prune#17: catalogue, prompt, and config for needs-extraction#17: wire needs-extraction into the TS preset end-to-endGates
pnpm build,pnpm lint— cleanpnpm test— 392 passed (+7)🤖 Generated with Claude Code
Generated by Claude Code