Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 23, 2025

This PR adds a comprehensive .github/copilot-instructions.md file to help coding agents work efficiently with the ruudk/code-generator repository without extensive exploration.

What's Added

The instructions provide complete guidance covering:

Repository Overview

  • Clear description of the PHP code generation library using generators and yield syntax
  • High-level technical details (PHP 8.4+, Composer package, dependencies)
  • Project size and architecture overview

Build & Validation Pipeline

  • Complete command sequence from the CI pipeline that must be run in exact order
  • Validated commands with expected execution times and purposes
  • Common issues and workarounds (PHP version requirements, memory limits, etc.)
  • Pre-commit hook validation including example file testing

Dependency Management Guidelines

  • Critical warning against running composer update unless explicitly requested
  • Clear guidance that composer modifications should only be done when asked
  • Instructions to use composer install for normal dependency installation
  • Explicit rule about not committing composer.lock changes without permission

Project Architecture

  • Detailed directory structure with purpose of each component
  • Core class architecture (CodeGenerator, Group, FullyQualified, etc.)
  • Configuration file locations and purposes
  • Dependencies and their roles in the validation pipeline

Critical Requirements

  • PHP 8.4+ requirement clearly documented (uses property hooks syntax)
  • Exact validation sequence that mirrors the GitHub Actions CI
  • File modification guidelines to prevent breaking changes
  • Trust instructions to minimize unnecessary exploration

Key Benefits

This will significantly reduce the time coding agents spend exploring the repository structure, finding build commands, and understanding validation requirements. The dependency management guidelines prevent accidental dependency updates and lock file modifications. The instructions are based on the actual CI pipeline and git hooks, ensuring accuracy and completeness.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits August 23, 2025 05:56
Co-authored-by: ruudk <104180+ruudk@users.noreply.github.com>
Co-authored-by: ruudk <104180+ruudk@users.noreply.github.com>
Copilot AI changed the title [WIP] Your task is to "onboard" this repository to Copilot coding agent by adding a .github/copilot-instructions.md file in the repository that contains information describing how a coding agent seeing it for the first time can work most efficiently. You wi... Add comprehensive Copilot instructions for code-generator repository Aug 23, 2025
Copilot AI requested a review from ruudk August 23, 2025 05:58
Copilot finished work on behalf of ruudk August 23, 2025 05:58
Copy link
Owner

@ruudk ruudk left a comment

Choose a reason for hiding this comment

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

@copilot explain that you should not ever run composer update. Composer modifications should only be done when asked explicitly. You should therefore not have to commit composer.lock changes.

Also undo the composer.lock changes in this PR.

Co-authored-by: ruudk <104180+ruudk@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Aug 23, 2025

@copilot explain that you should not ever run composer update. Composer modifications should only be done when asked explicitly. You should therefore not have to commit composer.lock changes.

Also ...

I've added a prominent warning section about never running composer update unless explicitly requested and reverted all composer.lock changes from this PR. The instructions now clearly state that composer modifications should only be done when explicitly asked. Changes made in commit 7c56bbb.

Copilot AI changed the title Add comprehensive Copilot instructions for code-generator repository Add comprehensive Copilot instructions with dependency management guidelines Aug 23, 2025
Copilot AI requested a review from ruudk August 23, 2025 06:08
Copilot finished work on behalf of ruudk August 23, 2025 06:08
@ruudk ruudk marked this pull request as ready for review August 23, 2025 06:09
@ruudk ruudk merged commit 8e69b93 into main Aug 23, 2025
1 check passed
@ruudk ruudk deleted the copilot/fix-11bd388b-530b-4917-9696-e7c9c195ecbe branch August 23, 2025 07:18
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