Skip to content

Conversation

@PSthelyBlog
Copy link
Owner

Summary

  • Add -o/--output-dir option to the run command
  • Add -o/--output-dir option to the resume command
  • Display output directory in CLI output when specified
  • Update TODO.md to mark this improvement as complete

Changes

The Workflow class already supported an output_dir parameter, but it wasn't exposed via the CLI. Users can now control where workflow outputs (design docs, game builds, publish artifacts) are stored.

Usage

# Specify output directory for a new workflow
game-workflow run "A puzzle platformer" --output-dir ./my-game

# Override output directory when resuming
game-workflow resume --output-dir ./different-location

Test plan

  • All 338 unit tests pass
  • Verified --help output shows new option for both commands

Closes #35

🤖 Generated with Claude Code

Add -o/--output-dir option to both `run` and `resume` CLI commands,
allowing users to specify where workflow outputs are stored.

The Workflow class already supported output_dir, this change exposes
it via the CLI interface.

Closes #35

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@gemini-code-assist
Copy link

Summary of Changes

Hello @PSthelyBlog, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the command-line interface by adding a --output-dir option to the run and resume commands. This allows users greater flexibility in managing where generated workflow artifacts, such as design documents and game builds, are stored, improving the overall user experience and organization of project files.

Highlights

  • New CLI Option: Introduced --output-dir (-o) for both run and resume commands, enabling users to specify a custom directory for workflow outputs.
  • Output Display: The CLI now explicitly displays the chosen output directory when the --output-dir option is used.
  • Feature Completion: The TODO.md file has been updated to mark the --output-dir feature as completed.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request successfully adds the --output-dir option to the run and resume CLI commands, allowing users to specify a custom output directory for workflow artifacts. The implementation is clean and correctly integrates with the existing Workflow class. I've identified one potential issue regarding the behavior of the resume command when the --output-dir flag is not provided, which may lead to unexpected behavior. See my detailed comment below.

Comment on lines 222 to 227
def resume(
state_id: str = typer.Option(None, "--id", help="Specific workflow ID to resume"),
output_dir: Path | None = typer.Option(
None, "--output-dir", "-o", help="Directory for workflow outputs (overrides saved setting)"
),
) -> None:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

There appears to be a logic issue when resuming a workflow without the --output-dir flag. The Workflow class does not use the output_dir saved in the workflow's state. Instead, it falls back to a default directory. This means that resuming a workflow will cause its output to go to a different directory than the original one, unless --output-dir is explicitly provided again. This is likely not the intended behavior and could lead to artifacts being saved in an unexpected location.

To address this, the Workflow constructor in src/game_workflow/orchestrator/workflow.py should be modified to check for and use the output_dir from the loaded state if no override is given. Here's a suggested change:

# In Workflow.__init__ in src/game_workflow/orchestrator/workflow.py
if output_dir is not None:
    self.output_dir = output_dir
elif state is not None and (saved_dir := state.metadata.get("output_dir")):
    self.output_dir = Path(saved_dir)
else:
    self.output_dir = settings.workflow.state_dir / self.state.id

While the fix is outside the files in this PR, it's important for the correctness of this new feature.

@PSthelyBlog PSthelyBlog merged commit a5573e3 into main Jan 20, 2026
4 checks passed
@PSthelyBlog PSthelyBlog deleted the feature/35-add-output-dir-cli-option branch January 20, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add --output-dir option to CLI

2 participants