Cap scanner file count and warn on missing framework detection#15
Merged
Conversation
Closes two of the open questions in CLAUDE.md (Q1 and Q5).
Scanner gains a configurable file cap (DEFAULT_MAX_FILES = 5000)
to protect against runaway walks in monorepos. The scan() function
now accepts { maxFiles } and stops walking once the cap is hit,
returning the truncated flag and the cap that was applied. Walk
respects the flag mid-recursion to avoid extra work.
config.yaml gains an optional scan section:
scan:
max_files: 10000
loadConfig parses scan.max_files into config.scanMaxFiles (coerced
to a positive integer). Each command that calls the scanner now
passes config.scanMaxFiles through to scan().
Two warnings via the new src/utils/scan-warnings.js helper:
- "Note: scanner stopped at N source files. Raise scan.max_files
in .draftwise/config.yaml for fuller coverage." — surfaced in
every command that invokes the scanner whenever truncated is
true.
- "Heads up: no framework detected. Draftwise's scanner supports
JS/TS (Next.js, Express, Fastify, Vue, Svelte) and common ORMs
(Prisma, Mongoose, Drizzle). Other languages will produce
shallow scans until language-specific support lands." — only
surfaced in init (brownfield) and scan, since those are the
natural moments to recalibrate expectations.
10 new tests across scanner, config, and the warnings helper.
112 total, all passing.
Per docs-sync: CLAUDE.md config.yaml example shows the new scan
section; open questions list marks Q1 and Q5 as resolved and adds
a new Q7 noting Python is the next planned scanner expansion.
4nkur
added a commit
that referenced
this pull request
Apr 25, 2026
Per the user's request — every change to the project gets recorded here by tag ID, date, and author. Format follows Keep a Changelog (keepachangelog.com) with semver versioning. Retroactively populated: - [0.0.1] — 2026-04-25 — Ankur — the first npm release, with every command in the v1 build order (init, scan, explain, new, tech, tasks, list, show) and the AI plumbing for Claude. - [Unreleased] — everything merged to main since 0.0.1 but not yet published: greenfield init routing (#12), greenfield-aware new/tech/tasks (#13), scaffold (#14), scanner robustness (#15), Python support (#16), scan cache + flow filter (#17), pruning resolved questions out of CLAUDE.md (#18), and this changelog. Going forward (saved as a feedback memory): - Every functional PR adds an entry under [Unreleased] in the same PR — bundled with the change, not as a follow-up. - On version tag, [Unreleased] entries move into a versioned section header `## [X.Y.Z] — YYYY-MM-DD — author` and a fresh empty [Unreleased] block is added at the top. - Pure-internal noise (test-only refactors, lockfile bumps, settings.local.json) is skipped.
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 two of the open questions in CLAUDE.md (Q1 and Q5).
Scanner gains a configurable file cap (DEFAULT_MAX_FILES = 5000) to protect against runaway walks in monorepos. The scan() function now accepts { maxFiles } and stops walking once the cap is hit, returning the truncated flag and the cap that was applied. Walk respects the flag mid-recursion to avoid extra work.
config.yaml gains an optional scan section:
loadConfig parses scan.max_files into config.scanMaxFiles (coerced to a positive integer). Each command that calls the scanner now passes config.scanMaxFiles through to scan().
Two warnings via the new src/utils/scan-warnings.js helper:
"Note: scanner stopped at N source files. Raise scan.max_files in .draftwise/config.yaml for fuller coverage." — surfaced in every command that invokes the scanner whenever truncated is true.
"Heads up: no framework detected. Draftwise's scanner supports JS/TS (Next.js, Express, Fastify, Vue, Svelte) and common ORMs (Prisma, Mongoose, Drizzle). Other languages will produce shallow scans until language-specific support lands." — only surfaced in init (brownfield) and scan, since those are the natural moments to recalibrate expectations.
10 new tests across scanner, config, and the warnings helper. 112 total, all passing.
Per docs-sync: CLAUDE.md config.yaml example shows the new scan section; open questions list marks Q1 and Q5 as resolved and adds a new Q7 noting Python is the next planned scanner expansion.