Task summary
Add a --dry-run flag to commit-echo suggest that shows what would be sent to the LLM — the diff, style profile, resolved prompts, and truncation info — without actually making the API call. Useful for debugging custom prompt templates and understanding what data the LLM receives.
Why this is a good first issue
Well-scoped feature that adds a single flag and an early-return path. Teaches CLI option registration with Commander.js, the suggest command flow, and how prompts are assembled. No external API calls needed for testing.
Suggested files or areas
src/index.ts — Add --dry-run / -n option to the suggest command
src/commands/suggest.ts — When --dry-run is set, print the diff, resolved prompts, profile summary, and truncation info (if any), then exit without calling generateSuggestions
Acceptance criteria
Extra context
- Follow the existing flag pattern in
src/index.ts (e.g., --verbose, --commit, --yes)
- The
showVerboseInfo() and showTruncationWarning() functions in src/commands/suggest.ts demonstrate how to print diagnostic info using pc.dim() / pc.yellow()
resolveSystemPrompt() and resolveUserPrompt() in src/llm/prompt.ts can be called directly to show the resolved prompts
- Use
pc.dim() for the diff and prompt output to distinguish it from normal output
Task summary
Add a
--dry-runflag tocommit-echo suggestthat shows what would be sent to the LLM — the diff, style profile, resolved prompts, and truncation info — without actually making the API call. Useful for debugging custom prompt templates and understanding what data the LLM receives.Why this is a good first issue
Well-scoped feature that adds a single flag and an early-return path. Teaches CLI option registration with Commander.js, the suggest command flow, and how prompts are assembled. No external API calls needed for testing.
Suggested files or areas
src/index.ts— Add--dry-run/-noption to thesuggestcommandsrc/commands/suggest.ts— When--dry-runis set, print the diff, resolved prompts, profile summary, and truncation info (if any), then exit without callinggenerateSuggestionsAcceptance criteria
commit-echo suggest --dry-runprints the diff, system prompt, user prompt, style profile summary, and truncation infocommit-echo suggest -nworks as an alias--dry-runis set--dry-run, behavior is unchangednpm run buildpasses with no errorsExtra context
src/index.ts(e.g.,--verbose,--commit,--yes)showVerboseInfo()andshowTruncationWarning()functions insrc/commands/suggest.tsdemonstrate how to print diagnostic info usingpc.dim()/pc.yellow()resolveSystemPrompt()andresolveUserPrompt()insrc/llm/prompt.tscan be called directly to show the resolved promptspc.dim()for the diff and prompt output to distinguish it from normal output