Skip to content

feat(setup-repo): add agent selection, auto-detection, and project-co… - #18

Open
florian101010 wants to merge 4 commits into
mainfrom
claude/evaluate-template-solution-VAq0o
Open

feat(setup-repo): add agent selection, auto-detection, and project-co…#18
florian101010 wants to merge 4 commits into
mainfrom
claude/evaluate-template-solution-VAq0o

Conversation

@florian101010

Copy link
Copy Markdown
Owner

…ntext.json as canonical output

  • Add Question 0 to setup-repo: users select which AI tools they use (Claude, Copilot, Jules, etc.) so only relevant files are generated (~8 for Claude-only vs 41 for all tools)
  • Add auto-detection table for test/lint/build commands from package.json, pyproject.toml, Cargo.toml, go.mod, and Makefile — no manual input required for standard stacks
  • Add Phase 1.5: write project-context.json as canonical first output before any instruction file, making it the durable record of setup decisions (validated by check-agent-context-sync.py)
  • Add "agents" field to project-context.example.json schema
  • Add repomix-output.xml to .gitignore (generated bundle, not source)
  • Update README Quick Start: clarify agent selection, auto-detection, and project-context.json flow; remove "optional" framing for project-context.json; note repomix-output.xml is not committed
  • Sync all changes across .claude/, .agents/, .agent/ SKILL.md copies and Copilot prompt

https://claude.ai/code/session_01PZSeMAKkcRug1QH81MU1qh

PR-Checklist

Goal

Change Type

  • Small Change (Bugfix/Copy/Style)
  • Feature
  • Architecture Change
  • Docs only

Scope

Implementation

Test Evidence

  • Manual verification done
  • Relevant checks from docs/QA-CHECKLIST.md verified (if applicable)

Details:

Documentation Impact (Required)

Affected doc files:

  • docs/README.md
  • docs/ARCHITECTURE.md
  • docs/CHANGELOG.md
  • docs/decisions/ (ADR file, if architectural)
  • [FILL: Add your project-specific doc paths]
  • No docs affected (reason below)

Reason / Updated docs:

ADR Check

  • ADR required
  • ADR not required

If required: ADR in docs/decisions/ created/updated?

  • Yes
  • No (reason)

Definition of Done

  • Project rules followed (see AGENTS.md)
  • Policy alignment checked (AGENTS.md, CLAUDE.md, .github/copilot-instructions.md, .agent/rules/*)
  • No new errors in changed code
  • Documentation in sync
  • Changelog updated (if relevant)

…ntext.json as canonical output

- Add Question 0 to setup-repo: users select which AI tools they use (Claude, Copilot, Jules, etc.)
  so only relevant files are generated (~8 for Claude-only vs 41 for all tools)
- Add auto-detection table for test/lint/build commands from package.json, pyproject.toml,
  Cargo.toml, go.mod, and Makefile — no manual input required for standard stacks
- Add Phase 1.5: write project-context.json as canonical first output before any instruction file,
  making it the durable record of setup decisions (validated by check-agent-context-sync.py)
- Add "agents" field to project-context.example.json schema
- Add repomix-output.xml to .gitignore (generated bundle, not source)
- Update README Quick Start: clarify agent selection, auto-detection, and project-context.json flow;
  remove "optional" framing for project-context.json; note repomix-output.xml is not committed
- Sync all changes across .claude/, .agents/, .agent/ SKILL.md copies and Copilot prompt

https://claude.ai/code/session_01PZSeMAKkcRug1QH81MU1qh
@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, 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 significantly enhances the setup-repo skill by introducing intelligent agent configuration. Users can now select their preferred AI coding tools, leading to the generation of only relevant instruction files, reducing boilerplate. The skill also gained the ability to auto-detect common project commands, minimizing manual input. A new project-context.json file now serves as a durable, canonical record of all setup decisions, improving consistency and validation across the repository.

Highlights

  • Agent Selection: Introduced a new step in the setup-repo skill allowing users to select which AI coding tools they use, ensuring only relevant instruction files are generated.
  • Auto-Detection of Commands: Implemented auto-detection for common test, lint, and build commands by scanning project configuration files such as package.json, pyproject.toml, Cargo.toml, go.mod, and Makefile.
  • Canonical Project Context Output: Added a new phase to write project-context.json as the first output, serving as a durable and canonical record of all setup decisions.
  • Documentation Updates: Updated the README.md and various SKILL.md files to reflect the new agent selection, auto-detection, and project-context.json workflow.
  • Git Ignore Addition: Added repomix-output.xml to .gitignore to prevent committing generated bundle files.
Changelog
  • .agent/skills/setup-repo/SKILL.md
    • Updated skill description to reflect 4 questions, auto-detection, and selective file generation.
    • Changed 'Ask 3 Questions' to 'Ask 4 Questions' and added 'Question 0 — AI tools in use'.
    • Modified 'Mode B — Other agents' to note repomix-output.xml is not committed.
    • Introduced a 'Detection lookup table' for auto-detecting commands and tech stack.
    • Updated 'Full facts table' to reference the auto-detection table for commands.
    • Added 'Phase 1.5 — Write project-context.json' with its schema and agent key mapping.
    • Updated 'Phase 2 — Generate and Write (Tiered)' to include skipping files for inactive agents and an 'Agent-to-file mapping'.
    • Modified tier descriptions to indicate which agents each file applies to.
    • Updated the final 'Setup Complete' summary to include active agents, files skipped, auto-detected values, and project-context.json status.
    • Added a rule to skip files for inactive agents during validation.
  • .agents/skills/setup-repo/SKILL.md
    • Updated skill description to reflect 4 questions, auto-detection, and selective file generation.
    • Changed 'Ask 3 Questions' to 'Ask 4 Questions' and added 'Question 0 — AI tools in use'.
    • Modified 'Mode B — Other agents' to note repomix-output.xml is not committed.
    • Introduced a 'Detection lookup table' for auto-detecting commands and tech stack.
    • Updated 'Full facts table' to reference the auto-detection table for commands.
    • Added 'Phase 1.5 — Write project-context.json' with its schema and agent key mapping.
    • Updated 'Phase 2 — Generate and Write (Tiered)' to include skipping files for inactive agents and an 'Agent-to-file mapping'.
    • Modified tier descriptions to indicate which agents each file applies to.
    • Updated the final 'Setup Complete' summary to include active agents, files skipped, auto-detected values, and project-context.json status.
    • Added a rule to skip files for inactive agents during validation.
  • .claude/skills/setup-repo/SKILL.md
    • Updated skill description to reflect 4 questions, auto-detection, and selective file generation.
    • Changed 'Ask 3 Questions' to 'Ask 4 Questions' and added 'Question 0 — AI tools in use'.
    • Modified 'Mode B — Other agents' to note repomix-output.xml is not committed.
    • Introduced a 'Detection lookup table' for auto-detecting commands and tech stack.
    • Updated 'Full facts table' to reference the auto-detection table for commands.
    • Added 'Phase 1.5 — Write project-context.json' with its schema and agent key mapping.
    • Updated 'Phase 2 — Generate and Write (Tiered)' to include skipping files for inactive agents and an 'Agent-to-file mapping'.
    • Modified tier descriptions to indicate which agents each file applies to.
    • Updated the final 'Setup Complete' summary to include active agents, files skipped, auto-detected values, and project-context.json status.
    • Added a rule to skip files for inactive agents during validation.
  • .github/prompts/setup-repo.prompt.md
    • Updated prompt description to reflect 4 questions, auto-detection, and selective file generation.
    • Changed 'Ask the user 3 questions' to 'Ask the user 4 questions' and added 'AI tools in use' as the first question.
    • Replaced 'Gather project facts from @workspace' with 'Auto-detect project facts from @workspace' and added the detection table.
    • Removed 'Test / lint / build commands' from the manual fact-gathering table, deferring to auto-detection.
    • Added 'Step 1.5 — Output project-context.json first' with its schema and agent key mapping.
    • Updated 'Step 2 — Generate files, tiered' to specify generation for active agents only and included the agent-to-file mapping.
    • Modified tier descriptions to indicate which agents each file applies to.
    • Updated the final 'Setup Summary' to include active agents, files skipped, and auto-detected values.
    • Updated the 'Verify no markers remain' instruction to 'Verify no markers remain in active files'.
  • .gitignore
    • Added repomix-output.xml to the list of ignored files.
  • README.md
    • Updated project-context.example.json description from 'Optional' to 'Example' and noted it's written by /setup-repo.
    • Revised the 'Configure' section to explain agent selection, auto-detection, and project-context.json flow.
    • Clarified that repomix-output.xml is 'not committed to git'.
    • Updated 'Step 6 — Enable cross-file consistency checks' to reflect project-context.json being automatically written and its role in validation, and updated the manual setup instructions for it.
    • Updated the description for the 'Setup Repo' skill in the table.
  • project-context.example.json
    • Added a new 'agents' field with example values.
Activity
  • The pull request introduces new features for the setup-repo skill.
  • It modifies documentation and configuration files to support these features.
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.

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

Copy link
Copy Markdown

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 introduces a significant improvement by allowing users to select which AI agents they use, and only generating the relevant configuration files. The auto-detection of commands is also a great addition. The changes across the documentation and skill definitions are comprehensive and mostly consistent.

However, there is a critical issue: the new agent selection feature breaks the scripts/check-agent-context-sync.py validation script. This script is hardcoded to check for all instruction files, but with this PR, some files may not be generated, causing the script to fail. This breaks the check-all.sh quality gate. The validation script needs to be updated to read the agents from project-context.json and only check for files corresponding to the active agents.

I've also left a couple of comments on markdown files to improve clarity and consistency.

Note: Security Review has been skipped due to the limited scope of the PR.

Comment thread README.md Outdated
Comment thread .github/prompts/setup-repo.prompt.md Outdated
florian101010 and others added 3 commits March 4, 2026 08:31
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…text.json

The hardcoded TARGETS list broke the quality gate when agent selection
was used — files for inactive agents don't exist, so the script would
always fail after a Claude-only or partial setup.

GEMINI.md is now only checked when "gemini" or "jules" is active;
.github/copilot-instructions.md only when "copilot" is active.
AGENTS.md and CLAUDE.md remain always-checked ([ALL]).

Fixes the critical issue raised in PR #18 review.

https://claude.ai/code/session_01PZSeMAKkcRug1QH81MU1qh
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.

2 participants