Develop#10
Conversation
* initial setup for basi cli * fix issue in basi cli
* change desing of CLI * fix: address CodeRabbit review comments * fix: check brd file is docx in the flag option * fix: output path issue
* feat: add windows exe build pipeline and fix bundled template path * fix: get_base_path method
* release: merge develop into main (CLI + UX + Windows exe support) (#4) * developed cli for auditgen (#1) * initial setup for basi cli * fix issue in basi cli * feat: improve CLI UX, prompts, and generate workflow * change desing of CLI * fix: address CodeRabbit review comments * fix: check brd file is docx in the flag option * fix: output path issue * feat: add windows exe build pipeline and fix bundled template path (#3) * feat: add windows exe build pipeline and fix bundled template path * fix: get_base_path method * fix: resolve exe crash due to lazy import handling (#5) * fix: lazy import not catch by PyInstaller * fix: add debug in the cli to check what issue it crash (#6)
* release: merge develop into main (CLI + UX + Windows exe support) (#4) * developed cli for auditgen (#1) * initial setup for basi cli * fix issue in basi cli * feat: improve CLI UX, prompts, and generate workflow * change desing of CLI * fix: address CodeRabbit review comments * fix: check brd file is docx in the flag option * fix: output path issue * feat: add windows exe build pipeline and fix bundled template path (#3) * feat: add windows exe build pipeline and fix bundled template path * fix: get_base_path method * fix: resolve exe crash due to lazy import handling (#5) * fix: lazy import not catch by PyInstaller * fix: add debug in the cli to check what issue it crash (#6)
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR delivers the v0.1.0 release of AudiGen: a complete interactive CLI application that generates audit deliverables (Impact Analysis, Test Cases, Code Checklists) from a Business Requirements Document. It includes configuration management, a Windows executable build workflow, and comprehensive user documentation. ChangesAudiGen v0.1.0 Release
Sequence DiagramsequenceDiagram
participant User
participant CLI as generate command
participant BRD as extractDoc
participant LLM as callLLM
participant Excel as startExcelChange
participant Output as Excel File
User->>CLI: auditgen generate [flags/interactive]
CLI->>CLI: Collect input (BRD, ticket, dates, user, approver, complexity, priority)
CLI->>CLI: Validate dates and output directory
CLI->>BRD: Extract requirements from BRD file
BRD->>CLI: Return extracted content
CLI->>LLM: Generate test cases via Gemini API
LLM->>CLI: Return generated results
CLI->>Excel: Write Impact Analysis, Test Cases, Code Checklist
Excel->>Output: Create three Excel files
CLI->>User: Display summary and file locations
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 12
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/build.yml:
- Around line 60-64: The "Create Github Release" step (uses:
softprops/action-gh-release@v2) runs on manual workflow_dispatch and tag pushes
causing failures when no tag exists; add a conditional like if:
startsWith(github.ref, 'refs/tags/') to the step to ensure the release action
(files: dist/auditgen.exe, generate_release_notes: true) only executes for
tag-created workflows.
- Around line 3-4: The workflow currently sets the compatibility env var
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 to force Node 24 for older actions; either
keep that env var as-is for compatibility or upgrade the referenced actions to
versions that natively support Node.js 24 (replace checkout@v4 → checkout@v5+,
setup-python@v5 → setup-python@v6+, upload-artifact@v4 → upload-artifact@v6+,
action-gh-release@v2 → action-gh-release@v3+) and then remove the
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 line; update the workflow action references
accordingly and run the workflow to confirm no deprecation warnings.
In `@audigen_cli/banner.py`:
- Around line 1-5: The file imports Console twice; remove the duplicate import
statement so only a single "from rich.console import Console" remains; edit
audigen_cli/banner.py to delete the redundant Console import (the duplicate
line) and keep the other imports (Text, Panel, Align) unchanged to avoid unused
or duplicate import warnings.
In `@audigen_cli/cli.py`:
- Line 61: The string passed to questionary.confirm in the create assignment is
using an unnecessary f-string (causing Ruff F541); update the call in the
expression create = _ask(questionary.confirm(f"Folder does not exist. Create
it?", style=custom_style)) to use a plain string without the f prefix — e.g.
questionary.confirm("Folder does not exist. Create it?", style=custom_style) —
leaving the surrounding _ask helper and variable name create unchanged.
- Around line 264-273: The current crash handler inside the if __name__ ==
"__main__" block never runs for the installed entrypoint because the entrypoint
calls audigen_cli.cli:cli directly; fix by adding a new top-level main()
function in audigen_cli.cli that wraps the existing cli() call with the
try/except crash-logging logic (move the traceback import, log_path creation,
file write, print, and SystemExit into main), keep cli() unchanged, and update
pyproject.toml entrypoint to point to audigen_cli.cli:main so the installed
command runs the crash-handling wrapper.
- Around line 114-117: The checkbox prompt in config_setup calls
questionary.checkbox(...).ask() directly so Ctrl+C returns None and triggers the
wrong message; instead build the Question object with questionary.checkbox(...)
and pass it to the existing _ask(...) wrapper (i.e., replace
questionary.checkbox(...).ask() with _ask(questionary.checkbox(...))) so that
Ctrl+C is handled consistently and the "Aborted." message is shown; update the
assignment to selected_keys = _ask(questionary.checkbox(...)) and keep the
existing if not selected_keys: logic unchanged.
- Around line 202-204: The interactive fallback prompts hardcode choices for
complexity and priority, causing drift from the Click constants; update the
generate() logic (the lines setting complexity and priority using _ask and
questionary.select) to reuse the raw choice lists derived from
COMPLEXITY_CHOICES and PRIORITY_CHOICES (or their underlying values) instead of
hardcoding ["LOW","MEDIUM","HIGH"] and ["P1","P2","P3"], so the
questionary.select calls reference the same shared choice definitions as the
click.Choice constants; keep use of _ask, questionary.select and custom_style
intact while pulling the choices from those constants.
In `@audigen_cli/config.py`:
- Around line 25-28: The save_config function currently writes CONFIG_FILE with
default umask-permissions making the stored api_key world-readable; after the
json.dump finishes in save_config, call os.chmod(CONFIG_FILE, 0o600) to restrict
file permissions to owner read/write only (and add an import os if missing);
keep the existing _ensure_config_dir() and write flow but ensure chmod runs
after closing the file to apply the secure mode.
- Around line 17-22: The load_config function should guard against a corrupted
JSON file: wrap the json.load(CONFIG_FILE) call (inside load_config) in a
try/except that catches json.JSONDecodeError; when caught, log or print a
warning (include CONFIG_FILE name), move/rename the corrupted file to a backup
(so it’s not lost), and return a safe configuration (e.g., dict(DEFAULTS) or
{**DEFAULTS}); optionally write DEFAULTS back to CONFIG_FILE after ensuring the
directory via _ensure_config_dir(). Ensure you reference load_config,
CONFIG_FILE, DEFAULTS and _ensure_config_dir when updating the code.
In `@CHANGELOG.md`:
- Line 3: The release date in the changelog header "## [v0.1.0] - 2025-04-26" is
incorrect; update that line to the correct release/tag date (for example change
2025-04-26 to 2025-05-04 or the actual planned release date) while preserving
the existing header format "## [v0.1.0] - YYYY-MM-DD" so the version heading
remains consistent.
- Around line 1-11: The Markdown headings in the changelog (e.g., "# Changelog",
"## [v0.1.0] - 2025-04-26", and "### Added") need blank lines before and after
each heading and the file must end with a trailing newline to satisfy
MD022/MD047; update CHANGELOG.md to insert a blank line above "## [v0.1.0] -
2025-04-26" and above "### Added" (and ensure a blank line between each heading
and the list that follows), and add a final newline at EOF.
In `@README.md`:
- Around line 1-45: The README has Markdown spacing and minor grammar issues:
add a blank line before and after each heading (e.g., "# AudiGen CLI", "##
Requirements", "## Installation", "## First-Time Setup", "## Usage", "##
Output", "## Built With") and ensure fenced code blocks use blank lines above
and below the ```cmd blocks (both the single-line `auditgen config setup` and
the multi-line usage example). Replace the heading text "First Time Setup" with
"First-Time Setup" to hyphenate the adjective, ensure the file ends with a
trailing newline (MD047), and remove any stray or duplicate punctuation/spacing
in the "Built With" list (e.g., ensure "Rich + Questionary — terminal UI"
appears once).
🪄 Autofix (Beta)
❌ Autofix failed (check again to retry)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 7480a2b9-be8c-4fd3-af45-a6abd8cc2c2a
⛔ Files ignored due to path filters (2)
poetry.lockis excluded by!**/*.locktemplate/Vendor initiation date and time should be captured in the checklevel report.docxis excluded by!**/*.docx
📒 Files selected for processing (12)
.github/workflows/build.ymlCHANGELOG.mdREADME.mdaudigen_cli/banner.pyaudigen_cli/cli.pyaudigen_cli/config.pyaudigen_cli/excelWriter.pyaudigen_cli/extractor.pyaudigen_cli/llm_client.pyaudigen_cli/ui.pyaudigen_cli/utils.pypyproject.toml
💤 Files with no reviewable changes (1)
- audigen_cli/llm_client.py
| env: | ||
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check the Node.js compatibility of the GitHub Actions used in this workflow
echo "=== Checking Node.js compatibility for GitHub Actions ==="
echo ""
echo "Actions used in workflow:"
echo "- actions/checkout@v4"
echo "- actions/setup-python@v5"
echo "- actions/upload-artifact@v4"
echo "- softprops/action-gh-release@v2"
echo ""
echo "Checking if these actions support Node.js 24 by default..."
# Check each action's latest release/docs for Node.js compatibility
for action in "actions/checkout" "actions/setup-python" "actions/upload-artifact" "softprops/action-gh-release"; do
echo ""
echo "--- $action ---"
gh api repos/$action/releases/latest --jq '.name, .published_at' 2>/dev/null || echo "Could not fetch release info"
doneRepository: ThiruNithish28/audiGen-cli
Length of output: 563
🌐 Web query:
Do GitHub Actions checkout@v4, setup-python@v5, upload-artifact@v4, and action-gh-release@v2 natively support Node.js 24?
💡 Result:
No, GitHub Actions checkout@v4, setup-python@v5, upload-artifact@v4, and action-gh-release@v2 do not natively support Node.js 24. They run on Node.js 20 by default and trigger deprecation warnings. Newer versions are required for native Node.js 24 support (e.g., checkout@v5+, setup-python@v6+, upload-artifact@v6+, action-gh-release@v3+).
Citations:
- 1: Bump actions/checkout from 4 to 6 actions/github-script#684
- 2: actions/checkout@v4...v6
- 3: https://github.com/actions/checkout
- 4: chore: update GitHub Actions to support Node.js 24 before June 2026 deadline msarson/Clarion-Extension#57
- 5: CI: Update GitHub Actions to support Node.js 24 (deprecate Node.js 20) mandiant/capa#2983
- 6: actions/setup-python@e797f83
- 7: https://github.com/actions/setup-python/releases/tag/v5.0.0
- 8: https://github.com/actions/setup-python
- 9: https://github.com/actions/upload-artifact/releases/tag/v6.0.0
- 10: Upload Artifact Node 24 support actions/upload-artifact#719
- 11: [feat req] Update to Node.js 24 actions/upload-artifact#780
- 12: release: cut v3.0.0 for Node 24 upgrade softprops/action-gh-release#670
- 13: Upgrade to node 24 softprops/action-gh-release#654
- 14: https://github.com/actions/checkout/blob/v4/action.yml
- 15: https://github.com/actions/setup-python/blob/main/action.yml
Update GitHub Actions to versions that natively support Node.js 24, or keep FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 as a compatibility measure.
The current actions (checkout@v4, setup-python@v5, upload-artifact@v4, action-gh-release@v2) do not natively support Node.js 24 and default to Node.js 20, triggering deprecation warnings. The FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 variable is necessary for your current setup.
For long-term maintenance, consider upgrading to action versions that natively support Node.js 24: checkout@v5+, setup-python@v6+, upload-artifact@v6+, action-gh-release@v3+. This would allow removing the environment variable.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/build.yml around lines 3 - 4, The workflow currently sets
the compatibility env var FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 to force Node 24
for older actions; either keep that env var as-is for compatibility or upgrade
the referenced actions to versions that natively support Node.js 24 (replace
checkout@v4 → checkout@v5+, setup-python@v5 → setup-python@v6+,
upload-artifact@v4 → upload-artifact@v6+, action-gh-release@v2 →
action-gh-release@v3+) and then remove the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24
line; update the workflow action references accordingly and run the workflow to
confirm no deprecation warnings.
| - name: Create Github Release | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| files: dist/auditgen.exe | ||
| generate_release_notes: true |
There was a problem hiding this comment.
Add condition to prevent release step failure on manual triggers.
The release creation step will run on both tag pushes and manual workflow_dispatch triggers. When triggered manually without a tag context, this step will likely fail or produce unexpected results.
🔧 Proposed fix to conditionally run release only on tags
- name: Create Github Release
uses: softprops/action-gh-release@v2
+ if: startsWith(github.ref, 'refs/tags/')
with:
files: dist/auditgen.exe
generate_release_notes: true📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - name: Create Github Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: dist/auditgen.exe | |
| generate_release_notes: true | |
| - name: Create Github Release | |
| uses: softprops/action-gh-release@v2 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: dist/auditgen.exe | |
| generate_release_notes: true |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/build.yml around lines 60 - 64, The "Create Github
Release" step (uses: softprops/action-gh-release@v2) runs on manual
workflow_dispatch and tag pushes causing failures when no tag exists; add a
conditional like if: startsWith(github.ref, 'refs/tags/') to the step to ensure
the release action (files: dist/auditgen.exe, generate_release_notes: true) only
executes for tag-created workflows.
| from rich.console import Console | ||
| from rich.text import Text | ||
| from rich.console import Console | ||
| from rich.panel import Panel | ||
| from rich.align import Align |
There was a problem hiding this comment.
Remove the duplicate Console import on Line 3.
from rich.console import Console appears on both line 1 and line 3.
🔧 Proposed fix
from rich.console import Console
from rich.text import Text
-from rich.console import Console
from rich.panel import Panel
from rich.align import Align📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| from rich.console import Console | |
| from rich.text import Text | |
| from rich.console import Console | |
| from rich.panel import Panel | |
| from rich.align import Align | |
| from rich.console import Console | |
| from rich.text import Text | |
| from rich.panel import Panel | |
| from rich.align import Align |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@audigen_cli/banner.py` around lines 1 - 5, The file imports Console twice;
remove the duplicate import statement so only a single "from rich.console import
Console" remains; edit audigen_cli/banner.py to delete the redundant Console
import (the duplicate line) and keep the other imports (Text, Panel, Align)
unchanged to avoid unused or duplicate import warnings.
| if key == "output_dir": | ||
| path = Path(value.strip()) | ||
| if not path.exists(): | ||
| create = _ask(questionary.confirm(f"Folder does not exist. Create it?", style=custom_style)) |
There was a problem hiding this comment.
Remove the f prefix — this f-string has no placeholders (Ruff F541).
🔧 Proposed fix
- create = _ask(questionary.confirm(f"Folder does not exist. Create it?", style=custom_style))
+ create = _ask(questionary.confirm("Folder does not exist. Create it?", style=custom_style))📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| create = _ask(questionary.confirm(f"Folder does not exist. Create it?", style=custom_style)) | |
| create = _ask(questionary.confirm("Folder does not exist. Create it?", style=custom_style)) |
🧰 Tools
🪛 Ruff (0.15.12)
[error] 61-61: f-string without any placeholders
Remove extraneous f prefix
(F541)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@audigen_cli/cli.py` at line 61, The string passed to questionary.confirm in
the create assignment is using an unnecessary f-string (causing Ruff F541);
update the call in the expression create = _ask(questionary.confirm(f"Folder
does not exist. Create it?", style=custom_style)) to use a plain string without
the f prefix — e.g. questionary.confirm("Folder does not exist. Create it?",
style=custom_style) — leaving the surrounding _ask helper and variable name
create unchanged.
| selected_keys = questionary.checkbox( | ||
| "Select fields to configure:(space to toggle, enter to confirm)", | ||
| choices=choices | ||
| ).ask() |
There was a problem hiding this comment.
config_setup bypasses _ask() — Ctrl+C during the checkbox prompt shows the wrong message.
questionary.checkbox(...).ask() is called directly instead of through _ask(). When the user presses Ctrl+C, .ask() returns None, which the if not selected_keys: guard then turns into "⚠ No fields selected. Aborting setup." instead of the consistent "Aborted." message produced by _ask().
🔧 Proposed fix
- selected_keys = questionary.checkbox(
- "Select fields to configure:(space to toggle, enter to confirm)",
- choices=choices
- ).ask()
-
- if not selected_keys:
- console.print("[yellow]⚠ No fields selected. Aborting setup.[/yellow]")
- return
+ selected_keys = _ask(questionary.checkbox(
+ "Select fields to configure:(space to toggle, enter to confirm)",
+ choices=choices,
+ ))
+ if not selected_keys:
+ console.print("[yellow]⚠ No fields selected. Aborting setup.[/yellow]")
+ return📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| selected_keys = questionary.checkbox( | |
| "Select fields to configure:(space to toggle, enter to confirm)", | |
| choices=choices | |
| ).ask() | |
| selected_keys = _ask(questionary.checkbox( | |
| "Select fields to configure:(space to toggle, enter to confirm)", | |
| choices=choices, | |
| )) | |
| if not selected_keys: | |
| console.print("[yellow]⚠ No fields selected. Aborting setup.[/yellow]") | |
| return |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@audigen_cli/cli.py` around lines 114 - 117, The checkbox prompt in
config_setup calls questionary.checkbox(...).ask() directly so Ctrl+C returns
None and triggers the wrong message; instead build the Question object with
questionary.checkbox(...) and pass it to the existing _ask(...) wrapper (i.e.,
replace questionary.checkbox(...).ask() with _ask(questionary.checkbox(...))) so
that Ctrl+C is handled consistently and the "Aborted." message is shown; update
the assignment to selected_keys = _ask(questionary.checkbox(...)) and keep the
existing if not selected_keys: logic unchanged.
| def load_config() -> dict: | ||
| _ensure_config_dir() | ||
| if not CONFIG_FILE.exists(): | ||
| return dict(DEFAULTS) | ||
| with open(CONFIG_FILE, "r") as f: | ||
| return {**DEFAULTS,**json.load(f)} |
There was a problem hiding this comment.
Handle json.JSONDecodeError — a corrupted config crashes the entire tool.
If ~/.auditgen/config.json contains invalid JSON (e.g., partial write, manual edit mistake), json.load(f) raises json.JSONDecodeError which propagates unhandled and kills any auditgen invocation.
🛡️ Proposed fix
def load_config() -> dict:
_ensure_config_dir()
if not CONFIG_FILE.exists():
return dict(DEFAULTS)
- with open(CONFIG_FILE, "r") as f:
- return {**DEFAULTS, **json.load(f)}
+ try:
+ with open(CONFIG_FILE) as f:
+ return {**DEFAULTS, **json.load(f)}
+ except json.JSONDecodeError:
+ return dict(DEFAULTS)🧰 Tools
🪛 Ruff (0.15.12)
[warning] 21-21: Unnecessary mode argument
Remove mode argument
(UP015)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@audigen_cli/config.py` around lines 17 - 22, The load_config function should
guard against a corrupted JSON file: wrap the json.load(CONFIG_FILE) call
(inside load_config) in a try/except that catches json.JSONDecodeError; when
caught, log or print a warning (include CONFIG_FILE name), move/rename the
corrupted file to a backup (so it’s not lost), and return a safe configuration
(e.g., dict(DEFAULTS) or {**DEFAULTS}); optionally write DEFAULTS back to
CONFIG_FILE after ensuring the directory via _ensure_config_dir(). Ensure you
reference load_config, CONFIG_FILE, DEFAULTS and _ensure_config_dir when
updating the code.
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. ❌ Cannot run autofix: This PR has merge conflicts. Please resolve the conflicts with the base branch and try again. Alternatively, use |
|
@coderabbitai resolve merge conflict |
|
❌ An unexpected error occurred while resolving merge conflicts: Resource not accessible by integration - https://docs.github.com/rest/git/trees#create-a-tree |
Summary by CodeRabbit
New Features
config setup) for managing API keys and user preferences.auditgen.exe) now available via automated builds on releases.Documentation