Skip to content

feat(core): add configure-ai-agents command#32825

Merged
FrozenPandaz merged 21 commits intomasterfrom
ai-agent-setup-command
Sep 26, 2025
Merged

feat(core): add configure-ai-agents command#32825
FrozenPandaz merged 21 commits intomasterfrom
ai-agent-setup-command

Conversation

@MaxKless
Copy link
Copy Markdown
Contributor

@MaxKless MaxKless commented Sep 23, 2025

This pull request introduces support for configuring specific AI agents in Nx workspaces, allowing users to select which agents to set up and generating only the relevant configuration files for those agents. It also updates documentation, schemas, and tests to reflect this new, more flexible approach.

The most important changes are:

Agent Selection and Configuration:

  • Added the ability to specify which AI agents to configure via an agents array, both in the setup schema (schema.json) and the CreateWorkspaceOptions type. The supported agents are: claude, gemini, codex, cursor, and copilot. The generator only creates configuration files for the selected agents, rather than all by default. [1] [2] [3]

  • Implemented prompt logic for selecting AI agents interactively during workspace creation, and exposed available agent types for use in prompts and configuration. [1] [2]

File Generation Logic:

  • Refactored the setupAiAgentsGenerator implementation to generate only the files relevant to the specified agents (e.g., CLAUDE.md, .mcp.json for Claude; .gemini/settings.json for Gemini; AGENTS.md for others), and to append to existing files rather than overwrite them. [1] [2]

  • Added new utility functions for determining config file paths and reading agent-specific configuration, improving maintainability and clarity of file handling logic.

@MaxKless MaxKless requested review from a team as code owners September 23, 2025 15:17
@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud Bot commented Sep 23, 2025

View your CI Pipeline Execution ↗ for commit 2e82d33

Command Status Duration Result
nx affected --targets=lint,test,test-kt,build,e... ✅ Succeeded 43m 50s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 1m 49s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 7s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 4s View ↗
nx documentation ✅ Succeeded 1m 34s View ↗

☁️ Nx Cloud last updated this comment at 2025-09-26 14:04:47 UTC

Comment thread packages/nx/src/ai/utils.ts Outdated
nx-cloud[bot]

This comment was marked as outdated.

@vercel
Copy link
Copy Markdown

vercel Bot commented Sep 23, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
nx-dev Ready Ready Preview Sep 26, 2025 1:27pm

Comment thread packages/workspace/src/generators/new/new.ts Outdated
Comment thread packages/workspace/src/generators/new/new.ts Outdated
Comment thread packages/nx/src/native/index.d.ts Outdated
nx-cloud[bot]

This comment was marked as outdated.

@MaxKless MaxKless requested a review from a team as a code owner September 24, 2025 15:15
Copy link
Copy Markdown
Contributor

@nx-cloud nx-cloud Bot left a comment

Choose a reason for hiding this comment

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

Nx Cloud has identified a possible root cause for your failed CI:

The task completed successfully with exit code 0 and generated all required documentation. The final message "! 📄 Documentation has been modified, you need to commit the changes. !" is not an error but an informational note indicating that documentation files were updated as expected during the generation process.

The change to docs/generated/devkit/TargetDependencyConfig.md appears to be an unrelated documentation update that occurred during the normal documentation generation process, not a failure caused by the PR's code changes. This type of documentation drift is common when the generation process updates API documentation based on current codebase state.

The task achieved its intended purpose of generating documentation for the new configure-ai-agents command and updating related documentation files. No actual errors or failures occurred during execution.

A code change would likely not resolve this issue, so no action was taken.

Nx CloudView in Nx Cloud ↗


⚙️ An Nx Cloud workspace admin can disable these reviews in workspace settings.

Comment thread packages/create-nx-workspace/src/create-workspace-options.ts Outdated
Comment thread packages/create-nx-workspace/src/internal-utils/prompts.ts Outdated
Comment thread packages/nx/src/ai/set-up-ai-agents/set-up-ai-agents.ts Outdated
Comment thread packages/nx/src/ai/set-up-ai-agents/set-up-ai-agents.ts Outdated
Comment thread packages/nx/src/command-line/configure-ai-agents/configure-ai-agents.ts Outdated
Comment thread packages/nx/src/ai/utils.ts Outdated
Comment thread packages/nx/src/ai/utils.ts Outdated
Comment thread packages/nx/src/ai/utils.ts Outdated
Comment thread packages/nx/src/ai/utils.ts Outdated
Comment thread packages/nx/src/command-line/configure-ai-agents/command-object.ts Outdated
Comment thread packages/nx/src/command-line/configure-ai-agents/command-object.ts Outdated
Comment thread packages/create-nx-workspace/bin/create-nx-workspace.ts Outdated
Comment thread packages/nx/src/ai/set-up-ai-agents/set-up-ai-agents.ts Outdated
Comment thread packages/nx/src/command-line/configure-ai-agents/configure-ai-agents.ts Outdated
@MaxKless MaxKless force-pushed the ai-agent-setup-command branch from 46d976a to ed6a324 Compare September 26, 2025 11:11
@FrozenPandaz FrozenPandaz merged commit c54727d into master Sep 26, 2025
15 checks passed
@FrozenPandaz FrozenPandaz deleted the ai-agent-setup-command branch September 26, 2025 17:17
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Oct 2, 2025

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Oct 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants