Christopher Hertel e3e72d3fe4 feature #1682 [Mate] Add Codex wrappers and refresh agent instructions on discover (wachterjohannes)
This PR was squashed before being merged into the main branch.

Discussion
----------

[Mate] Add Codex wrappers and refresh agent instructions on discover

| Q             | A |
| ------------- | --- |
| Bug fix?      | yes |
| New feature?  | yes |
| Docs?         | yes |
| Issues        | n/a (no related issue) |
| License       | MIT |

## Description

This PR improves Symfony AI Mate integration for Codex and keeps agent instructions in sync with extension discovery.

### What changed

- mate discover now also refreshes agent instruction artifacts:
    - updates mate/AGENT_INSTRUCTIONS.md
    - updates a managed AI Mate section in AGENTS.md
- mate init now scaffolds all integration artifacts (without running discover):
    - keeps mcp.json + .mcp.json behavior
    - adds Codex runtime wrappers:
        - bin/codex (macOS/Linux)
        - bin/codex.bat (Windows)
    - adds mate/AGENT_INSTRUCTIONS.md template
    - updates AGENTS.md managed section from current instruction file
    - prints explicit next step to run vendor/bin/mate discover
- extracted extension sync logic to ExtensionConfigSynchronizer
- added AgentInstructionsMaterializer to centralize writing:
    - mate/AGENT_INSTRUCTIONS.md
    - managed block in AGENTS.md
- extended AgentInstructionsAggregator with aggregateForExtensions(...) to support fresh discovered maps and avoid stale container state
- updated Mate docs and changelog accordingly

## Usage

vendor/bin/mate init
vendor/bin/mate discover
./bin/codex

discover is now the command that refreshes both extension config and instruction artifacts.

Commits
-------

7362bb22 [Mate] Add Codex wrappers and refresh agent instructions on discover
2026-03-17 22:26:39 +01:00

Symfony AI - Mate Component

The Mate component provides an MCP (Model Context Protocol) server that enables AI assistants to interact with PHP applications (including Symfony) through standardized tools. This is a development tool, not intended for production use.

Installation

composer require --dev symfony/ai-mate

This repository is a READ-ONLY sub-tree split. See https://github.com/symfony/ai to create issues or submit pull requests.

Resources

Description
⚠️ ARCHIVED: Original GitHub repository no longer exists. Preserved as backup on 2026-01-22T16:28:39.651Z
Readme MIT 292 KiB
Languages
PHP 99.6%
Shell 0.2%
Batchfile 0.2%