2.5 KiB
2.5 KiB
Autoresearch: Reduce Biome Lint Diagnostics
Objective
Minimize the total number of Biome lint diagnostics (errors + warnings + info) across src/, starting from baseline ~40 diagnostics. Errors are mostly organizeImports, warnings are noUnusedImports, noUnusedVariables, and useConst.
Metrics
- Primary:
diagnostics(count, lower is better) — sum of errors + warnings + info fromnpx biome check src/ - Secondary:
errors(count, lower is better) - Secondary:
warnings(count, lower is better)
How to Run
bash autoresearch.sh — runs Biome check, parses JSON summary, outputs METRIC diagnostics=N and METRIC errors=N and METRIC warnings=N.
Files in Scope
All files under src/ — but focus on the files flagged by Biome:
src/resources/extensions/sf/auto/phases.jssrc/resources/extensions/sf/commands/handlers/ops.jssrc/resources/extensions/sf/memory-repository.jssrc/resources/extensions/sf/metrics-central.jssrc/resources/extensions/sf/reasoning-assist.jssrc/resources/extensions/sf/remote-steering.jssrc/resources/extensions/sf/sf-db.jssrc/resources/extensions/sf/subagent-inheritance.jssrc/resources/extensions/sf/tests/memory-repository.test.mjssrc/resources/extensions/sf/tests/metrics-central.test.mjssrc/resources/extensions/sf/tests/trajectory-recorder.test.mjssrc/resources/extensions/sf/trajectory-command.jssrc/resources/extensions/sf/trajectory-recorder.jssrc/resources/extensions/sf/uok/writer.js
Off Limits
biome.json(don't change lint rules — fixing source is the goal)node_modules/,dist/,.sf/,packages/(outsidesrc/scope)- Test assertion logic (don't weaken tests to make linters pass)
Constraints
- Existing vitest tests must pass:
npx vitest run --config vitest.config.ts - No new dependencies
- Don't introduce runtime behavior changes — only lint/import/style fixes
Termination
Run until interrupted by the user.
What's Been Tried
- #2 (auto-fix):
biome check --write— fixed 26 auto-fixable errors (format/organizeImports), dropped diagnostics from 40 to 11. Status: keep. - #3 (manual fixes): Removed 7 unused imports (
injectReasoningGuidance,withQueryTimeout,getAutoSession,logWarningx3,debugLog,readFileSync/unlinkSync/writeFileSync) and prefixed 4 intentionally-unused items with underscore (_MAX_HISTOGRAM_BUCKETS,_REASONING_ASSIST_MAX_CHARS,_basePath,_withQueryTimeout). Dropped from 11 to 0. Status: keep.