Skip to content

feat: infer intent output defaults#385

Merged
kvz merged 4 commits intomainfrom
feat/intent-output-defaults
Apr 15, 2026
Merged

feat: infer intent output defaults#385
kvz merged 4 commits intomainfrom
feat/intent-output-defaults

Conversation

@kvz
Copy link
Copy Markdown
Member

@kvz kvz commented Apr 15, 2026

Summary

  • rename intent commands to advertise --output, -o instead of --out
  • infer default local output paths when --output is omitted
  • fix sibling output inference for runtime formats and multi-input directory defaults

Testing

  • ~/code/dotfiles/bin/council.ts review
  • corepack yarn vitest run packages/node/test/unit/cli/intents.test.ts -t "avoids overwriting|uses the requested runtime format|defaults multi-input watchable intents"
  • corepack yarn check

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f931dde261

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +574 to +576
if (this.getIntentDefinition().outputMode === 'directory') {
return join(dirname(inputPath), parse(inputPath).name)
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Prevent inferred directory output from reusing input file path

For directory-output intents, getSiblingOutputPath always returns join(dirname(inputPath), parse(inputPath).name), which can resolve to the same path as the input file (for extensionless inputs like /tmp/report) or another existing file with the same basename. When --output is omitted, this inferred path is passed as a directory target and later fails in assemblies.create with “Output must be a directory for this command”, so valid single-file runs unexpectedly error instead of choosing a safe fallback path.

Useful? React with 👍 / 👎.

@kvz kvz merged commit 4a63ff7 into main Apr 15, 2026
10 checks passed
@kvz kvz deleted the feat/intent-output-defaults branch April 15, 2026 12:07
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.

1 participant