-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
cliCLI layer issuesCLI layer issueseffort-mediumMedium effort: 2-4 hoursMedium effort: 2-4 hoursenhancementNew feature or requestNew feature or requestimpact-highHigh impact on users or systemHigh impact on users or systempriority-highHigh priority - should be fixed soonHigh priority - should be fixed soonuxUser experience issuesUser experience issuesworkflowWorkflow state and validation featuresWorkflow state and validation features
Description
Summary
Make incremental analysis the default behavior for docimp analyze to improve performance and user experience without requiring users to remember the --incremental flag.
Current Behavior
Users must explicitly use the --incremental flag to benefit from faster incremental analysis:
docimp analyze ./src --incrementalThis requires users to:
- Know the feature exists
- Remember they ran analysis before
- Manually add the flag each time
- Understand when it will help
Proposed Behavior
Auto-detect and use incremental mode by default:
docimp analyze ./src
# Automatically detects previous analysis
# Uses incremental mode if applicable
# Shows message explaining what happenedUser-facing message:
Analysis complete
I noticed you had previously run analysis on this codebase. To improve performance,
I only re-analyzed the 3 files that changed (97 files reused from previous analysis).
If you want to force a complete re-analysis, run:
docimp analyze --force-full-analysis ./src
Time saved: ~27 seconds (90% faster)
Implementation Details
Changes Required
-
Auto-detection logic in
analyzeCore():- Check for previous analysis in
.docimp/session-reports/analyze-latest.json - Check for workflow state in
.docimp/workflow-state.json - If both exist, automatically use incremental mode
- Check for previous analysis in
-
New flag:
--force-full-analysis(or--no-incremental):- Overrides auto-incremental behavior
- Forces full analysis of all files
- Useful for benchmarking or debugging
-
Keep
--incrementalfor backwards compatibility:- Make it a no-op (incremental is now default)
- Update documentation to note it's redundant
- Keep for users who like being explicit
-
Enhanced messaging:
- Show when incremental mode was used
- Display file counts (changed vs reused)
- Show estimated time savings
- Provide clear opt-out instructions
Files to Modify
cli/src/commands/analyze.ts- Auto-detection logiccli/src/index.ts- Add--force-full-analysisflag, document--incrementalas redundantcli/src/display/terminal-display.ts- Enhanced analysis result messagingCLAUDE.md- Update documentationREADME.md- Update user-facing docs
Benefits
- Better UX: Optimal performance without cognitive load
- Education: Users learn about incremental analysis through messages
- Backwards compatible: Existing
--incrementalusage still works - Discoverable: Users see performance improvements automatically
Related
- Issue Add --dry-run flag for incremental analysis preview #376:
--dry-runflag for incremental analysis - Workflow State Management:
docs/patterns/workflow-state-management.md - Performance benchmarks show 90-95% time savings for typical incremental runs
Priority
High - This significantly improves UX for all users with minimal implementation effort. Makes a powerful feature accessible without requiring flag knowledge.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
cliCLI layer issuesCLI layer issueseffort-mediumMedium effort: 2-4 hoursMedium effort: 2-4 hoursenhancementNew feature or requestNew feature or requestimpact-highHigh impact on users or systemHigh impact on users or systempriority-highHigh priority - should be fixed soonHigh priority - should be fixed soonuxUser experience issuesUser experience issuesworkflowWorkflow state and validation featuresWorkflow state and validation features