From 69aadab1a5f76eb830df6444638a4a7591c3c953 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Say=C3=A3o=20Lobato=20Abreu?= Date: Tue, 20 Oct 2026 13:25:39 -0300 Subject: [PATCH 1/3] chore(dev): install agent skills through Composer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Felipe Sayão Lobato Abreu --- .../.fast-forward-install.json | 21 --- .agents/skills/fast-forward-changelog/LICENSE | 21 --- .../skills/fast-forward-changelog/SKILL.md | 142 ------------------ .../examples/contribution.php | 45 ------ .../references/automation.md | 58 ------- .../fast-forward-changelog/references/cli.md | 77 ---------- .../references/php-api.md | 40 ----- .../composer-managed-changelog-skill.md | 9 ++ .gitattributes | 1 + .github/workflows/ci.yml | 9 +- .gitignore | 1 + .php-cs-fixer.dist.php | 1 - AGENTS.md | 2 +- CONTRIBUTING.md | 6 + composer.json | 2 + docs/releases.md | 43 +++--- skills.json | 10 ++ 17 files changed, 53 insertions(+), 435 deletions(-) delete mode 100644 .agents/skills/fast-forward-changelog/.fast-forward-install.json delete mode 100644 .agents/skills/fast-forward-changelog/LICENSE delete mode 100644 .agents/skills/fast-forward-changelog/SKILL.md delete mode 100644 .agents/skills/fast-forward-changelog/examples/contribution.php delete mode 100644 .agents/skills/fast-forward-changelog/references/automation.md delete mode 100644 .agents/skills/fast-forward-changelog/references/cli.md delete mode 100644 .agents/skills/fast-forward-changelog/references/php-api.md create mode 100644 .changelog/composer-managed-changelog-skill.md create mode 100644 skills.json diff --git a/.agents/skills/fast-forward-changelog/.fast-forward-install.json b/.agents/skills/fast-forward-changelog/.fast-forward-install.json deleted file mode 100644 index 1dc46c0..0000000 --- a/.agents/skills/fast-forward-changelog/.fast-forward-install.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "schema": 1, - "owner": "fast-forward/changelog", - "name": "fast-forward-changelog", - "scope": "project", - "target": ".agents/skills/fast-forward-changelog", - "source": { - "package": "fast-forward/changelog", - "version": "v0.2.0", - "reference": "2d3f84fa9e5350f03636153fdb3ae2a822e5ae60" - }, - "files": { - "LICENSE": "58bd7c00603e499c575d53a97b8b8c1d1398f584ea5f9f77d369780efb2066ab", - "SKILL.md": "bef12db180f4c8812019ca9286ebaba722fca9850c6d6cfa6a9e7f0e060b4ac2", - "examples/contribution.php": "46f2b30277b4f880a8fc4f5d503d2a4fd13c6802a929159b1895f55f9a97dd2e", - "references/automation.md": "1096976a165c2a0f849470312996b4cdffaf43a18ca04be6e0f823720b47eccb", - "references/cli.md": "787f33efcbc72d40ce5b55507f6f0a59b686bffe4d7edfcf4242c427d7db023e", - "references/php-api.md": "32b67728f3c4ba5870a40f5ad88946dd274f84619676d4783642780a172cade8" - }, - "payload_sha256": "6aa35eb349f80bad8fc78a2cad7995b2fe39e41948f9538ad8a7b0b662ab9fa8" -} diff --git a/.agents/skills/fast-forward-changelog/LICENSE b/.agents/skills/fast-forward-changelog/LICENSE deleted file mode 100644 index f320900..0000000 --- a/.agents/skills/fast-forward-changelog/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2026 Felipe Sayao Lobato Abreu - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/.agents/skills/fast-forward-changelog/SKILL.md b/.agents/skills/fast-forward-changelog/SKILL.md deleted file mode 100644 index 69fb4dd..0000000 --- a/.agents/skills/fast-forward-changelog/SKILL.md +++ /dev/null @@ -1,142 +0,0 @@ ---- -name: fast-forward-changelog -description: Adopt Fast Forward Changelog's GitHub lifecycle, write and check independent fragments, review version PRs, and perform authorized release maintenance. Discover the selected release's documentation and CLI capabilities before choosing integration details. -license: MIT -compatibility: Requires access to the application repository and the selected release's documentation. Verify that release's runner or PHP requirements before execution. Local CLI examples use CPX; PHP integration uses the application's Composer installation. GitHub credentials are needed only for authorized remote operations. -metadata: - author: php-fast-forward - source: original - repository: https://github.com/php-fast-forward/changelog - api-baseline: Verify the selected published release; commands and integration details are release-specific. ---- - -# Fast Forward Changelog - -Ordinary contributions add independent `.changelog/*.md` fragments. GitHub -automation checks each contribution, maintains PR feedback and prepares a -reviewable version PR. That PR consolidates the accepted fragments into -`CHANGELOG.md` and deletes only the consumed files. Publication follows a -separate approval for the exact result; a green check or prepared PR is not that -approval. - -## Select the real contract - -1. Read application instructions, Git status and its existing changelog setup. - Use its reviewed version for an ordinary task; do not upgrade it incidentally. - If its ref is a moving channel, resolve the current commit and corresponding - published full tag before selecting a local runtime. `v0` is not Composer `0`. -2. For new adoption or a requested update, discover the latest published stable - release in the [official repository](https://github.com/php-fast-forward/changelog/releases). - Confirm the complete release tag and its commit, exclude drafts/prereleases, - and respect any explicitly selected maintenance line. For CPX or PHP use, - confirm the same version is available on - [Packagist](https://packagist.org/packages/fast-forward/changelog). -3. Read that tag's README and relevant documentation, not `main` or an old copy - of this skill. Before adding a workflow, inspect its - `resources/workflows/changelog.yml`, companion README and the reusable workflow - they reference. Copy the release's caller, review inputs/permissions and set - its product references to that verified full tag or immutable release commit; - do not retain an obsolete embedded pin blindly. After setting the final ref, - inspect the reusable workflow at that exact ref and confirm its inputs, - permissions and runner requirements before saving the application caller. - Keep publication - disabled for adoption. Change existing integration only within task scope. -4. For local CLI work, set `CHANGELOG_VERSION` to the verified exact numeric - release, without the tag's `v`. Discover commands and inspect their arguments: - - ```sh - cpx --skip-local "fast-forward/changelog:$CHANGELOG_VERSION" list --raw - cpx --skip-local "fast-forward/changelog:$CHANGELOG_VERSION" help add - cpx --skip-local "fast-forward/changelog:$CHANGELOG_VERSION" help check - ``` - - Use [CPX's official setup](https://github.com/laravel/cpx) when installation is - authorized; do not pin the executor in these commands. `--skip-local` selects - its separate tool installation. CPX may handle `--help` or `--version` itself, - so use `help ` for changelog help. An existing reviewed project binary - may be used directly instead. Confirm prerequisites from the chosen release. - -Installing this skill installs instructions, independently of the runtime. If -the selected CLI offers skill installation/check/update operations, inspect -their help and use only the supported operation and requested scope. Otherwise -follow that release's skill-installation guide; do not invent a command. - -This procedure avoids a frozen API inventory. A breaking release can still -change the lifecycle or these entrypoints: when documentation and capabilities -disagree, resolve the mismatch before writes rather than guessing compatibility. - -## Write and check a contribution - -Read the change and describe its observable effect. For example, create one -unique `.changelog/preserve-markdown-spaces.md`: - -```markdown ---- -category: fixed -type: patch ---- - -Preserves meaningful Markdown spaces when parsing fragments. -``` - -Keep existing notes and Markdown intact. Use the selected release's fragment -schema. For the established category scheme, `added`, `changed` and `deprecated` -default to `minor`, `removed` to `major`, and `fixed`/`security` to `patch`. -Persist the effective type explicitly; a justified override may express a -compatible dependency change as `changed`/`patch`. Apply the application's -versioning policy deliberately, especially during `0.x` development. - -After help confirms these arguments, the CLI can create and validate that note -from the application directory instead of writing the example manually: - -```sh -cpx --skip-local "fast-forward/changelog:$CHANGELOG_VERSION" add "Preserves meaningful Markdown spaces when parsing fragments." --category=fixed --no-interaction -cpx --skip-local "fast-forward/changelog:$CHANGELOG_VERSION" check --no-interaction -``` - -Verify that exactly one intended fragment was created and central history stayed -unchanged. Do not run both authoring routes for the same note. Fix diagnostics -and rerun the check. Before a committed PR comparison, inspect `help check`, -fetch the intended baseline under existing authority, then use its supported -comparison option, for example: - -```sh -cpx --skip-local "fast-forward/changelog:$CHANGELOG_VERSION" check --since=origin/main --no-interaction -``` - -That comparison requires committed contribution changes. A local uncommitted -fragment can pass local validation without satisfying the PR comparison. - -Optional PR/issue/author metadata must come from verified evidence. When the -origin PR is already known and supported, use `--pull-request=` or -`pull_request: ` after confirming its repository and exact head. Leave -unknown fields absent; do not invent a number or require a second fragment -commit after opening a PR. If the selected release resolves PR origins during -compilation, follow its documented policy consistently across preparation and -publication. No qualifying PR should become an invented commit or author link. - -Ordinary work preserves inherited fragments and published history. Do not add a -new `Unreleased` section. Editorial replacement, history maintenance and release -consolidation require their own task scope. - -## Verify the lifecycle - -For adoption, open a small pilot PR and inspect the exact head's required status, -sticky comment and independent application checks. Exercise a missing or -malformed note and any enabled bot route. Inspect the generated version PR: -planned version/impact, exact notes, central-history changes and only the accepted -fragment deletions. Review again after its head changes. The workflow does not -merge its own version PR. - -Load only the reference needed for the task: - -- [Automation](references/automation.md): selected caller, optional settings, - credentials, maintenance lines and pilot verification. -- [CLI maintenance](references/cli.md): previews, consolidation, history, - interrupted transactions and separately authorized publication. -- [PHP integration](references/php-api.md): release-specific application - services and the bundled example, only when programmatic integration is needed. - -Retain authority already given, but do not infer commit, push, merge, installation -elsewhere or publication authority from an ordinary fragment task. Report changed -paths, executed checks and the verified version/PR/SHA relevant to the result. diff --git a/.agents/skills/fast-forward-changelog/examples/contribution.php b/.agents/skills/fast-forward-changelog/examples/contribution.php deleted file mode 100644 index 1fdd8de..0000000 --- a/.agents/skills/fast-forward-changelog/examples/contribution.php +++ /dev/null @@ -1,45 +0,0 @@ - - * @license https://opensource.org/licenses/MIT MIT License - */ - -use FastForward\Changelog\Container\ServiceProvider\ChangelogServiceProvider; -use FastForward\Changelog\Fragment\FragmentWriterInterface; -use FastForward\Changelog\Release\Factory\ReleaseOptionsFactoryInterface; -use FastForward\Changelog\Validation\CheckServiceInterface; - -use function FastForward\Container\container; - -$autoload = $argv[1] ?? ''; -$directory = realpath($argv[2] ?? ''); -if ('' === $autoload || !is_file($autoload) || !isset($argv[2]) || false === $directory || !is_dir($directory)) { - fwrite(STDERR, "Usage: php contribution.php /consumer/vendor/autoload.php /existing/project\n"); - exit(2); -} -require $autoload; - -$container = container(ChangelogServiceProvider::class); -$options = $container->get(ReleaseOptionsFactoryInterface::class)->create([ - 'workingDirectory' => $directory, - 'source' => 'tags', -]); -$path = $container->get(FragmentWriterInterface::class)->add( - $options, - 'Preserves meaningful Markdown spaces when parsing fragments.', - category: 'fixed', - name: 'php-api-example.md', -); -$expected = "---\ncategory: fixed\ntype: patch\n---\n\nPreserves meaningful Markdown spaces when parsing fragments.\n"; -if ($expected !== file_get_contents($path)) { - throw new RuntimeException('The fragment does not match the expected application output.'); -} -if (!$container->get(CheckServiceInterface::class)->check($options)->isValid()) { - throw new RuntimeException('The pending fragment inventory is invalid.'); -} -fwrite(STDOUT, "Contribution example PASS\n"); diff --git a/.agents/skills/fast-forward-changelog/references/automation.md b/.agents/skills/fast-forward-changelog/references/automation.md deleted file mode 100644 index 46e36e1..0000000 --- a/.agents/skills/fast-forward-changelog/references/automation.md +++ /dev/null @@ -1,58 +0,0 @@ -# GitHub lifecycle adoption - -Load when installing or changing workflows, configuring credentials or runners, -selecting maintenance lines, or diagnosing feedback. Discover the latest stable -published release for new adoption, respecting an explicitly selected release -line. For ordinary work, retain the application's reviewed implementation. - -## Use the selected release's caller - -From the verified full tag, read `README.md`, -`resources/workflows/changelog.yml`, its companion README, and the reusable -workflow referenced by that caller. Consult that tag's relevant guides, including -`docs/reusable-lifecycle.md`, `docs/github-app.md` and `docs/automation-map.md` when -present. If paths moved, follow that release's README rather than guessing. -Do not combine a caller from one version with settings copied from `main`. - -Copy the caller into the application's `.github/workflows/`, review its events, -inputs and effective permissions, then set its product references to the selected -published complete tag or verified immutable release commit. Review older pins -embedded in the copied caller. After replacing a pin, inspect the reusable -workflow at the final selected ref and verify its actual inputs, permissions and -runner requirements before saving the application caller. -GitHub `uses` references the executable reusable -workflow under `.github/workflows`; the resource caller is a copyable asset. -Internal `repository-*` workflows belong to the library, not the consumer. - -Keep publication disabled during adoption. Choose base and managed branches, -fragment/history paths, historical sources and PR-reference policy consistently -across enabled operations. For parallel maintenance, select a separate managed -branch per release line and verify its actual planned version; a branch's name -does not enforce a SemVer range. Use individual workflows or Docker actions only -when their release-specific contracts suit the application's orchestration. - -Full tags preserve a concrete implementation. A moving major channel is an -explicit update policy and must be documented by the selected product release; -do not assume it exists. In particular `@v0` may cross breaking `0.x` minors and -does not mean Composer `^0.1`. Changing a workflow ref is a deliberate update. - -## Credentials and acceptance - -Use the selected workflow's documented token/App route and the application's -approved secret storage. Preserve the verified automation identity and narrow -permissions. Never check out untrusted PR code in a privileged custom job. -Token-generated events may behave differently from human/App events; consult -the selected release and GitHub's current rules before promising downstream CI. - -Run a small pilot with publication disabled. Verify a valid fragment, missing or -malformed notes, the exact PR head's required status and sticky-comment recovery, -any enabled bot operation, and the generated version PR. Check the actual runner -requirements and access when changing Linux/self-hosted selection. Test custom -policy changes relevant to the application rather than assuming a default-branch -green run proves its generated head. - -The version PR must preserve exact notes and consume only its accepted fragment -set, with no technical plan files or new `Unreleased` section. Head changes need -fresh review and checks. Successful preparation does not authorize merging or -publication. Enable publication only under existing authority for the verified -result, using the selected release's committed evidence and recovery procedure. diff --git a/.agents/skills/fast-forward-changelog/references/cli.md b/.agents/skills/fast-forward-changelog/references/cli.md deleted file mode 100644 index 55eea75..0000000 --- a/.agents/skills/fast-forward-changelog/references/cli.md +++ /dev/null @@ -1,77 +0,0 @@ -# CLI maintenance - -Load for release previews, history maintenance, recovery or authorized -publication. First select the real release and inspect `list --raw` and -`help ` as described in the skill. Read `docs/cli-fragments.md` and the -relevant maintenance/publication guide from that complete release tag. Verify -that its PHP and Git requirements match the environment. Do not infer arguments -or current behavior from an older installed skill. - -## Execute the selected CLI - -Run from the application's directory. `CHANGELOG_VERSION` is the verified exact -numeric product version, not a range frozen into this skill: - -```sh -cpx --skip-local "fast-forward/changelog:$CHANGELOG_VERSION" list --raw -cpx --skip-local "fast-forward/changelog:$CHANGELOG_VERSION" help status -cpx --skip-local "fast-forward/changelog:$CHANGELOG_VERSION" help version -``` - -CPX keeps tool dependencies separate from the application's Composer project; -the command still operates on application files. It is not a filesystem sandbox -or a PHP runtime. CPX's own update/help/version commands concern the executor. -An existing reviewed `vendor/bin/changelog` may run the same supported arguments -without changing the application's dependencies. - -When `list` offers instruction-management operations, inspect their help before -using install, check or update options. Use the requested project/global scope -and preserve local changes. Their existence is a discovered capability, not a -promise that every published changelog version contains them. Runtime updates, -instruction installation and host-session activation remain separate results. - -## Preview before consolidation - -For releases offering these arguments, inspect the read-only plan first: - -```sh -cpx --skip-local "fast-forward/changelog:$CHANGELOG_VERSION" status --json --source=tags --no-interaction -cpx --skip-local "fast-forward/changelog:$CHANGELOG_VERSION" version --dry-run --source=tags --no-interaction -``` - -Review the baseline/current/next version, effective impact, accepted fragment -paths, notes and affected files. Choose the relevant maintenance branch and -historical source explicitly. A branch name alone does not establish a release -range. Check command help before treating an exit code as success or failure; -check modes may use a nonzero result for drift as well as errors. - -The normal GitHub lifecycle prepares the version PR. Applying a local version -transaction requires existing consolidation authority and the same reviewed -options as the preview. Preserve exact committed input bytes, custom-template -trust requirements and any PR-resolution setting required by that release. -Verify only central history and consumed-fragment deletions are changed; no -technical plan file or new `Unreleased` section belongs in the version PR. - -If interrupted, preserve the recovery journal and remaining files. Follow that -release's recovery procedure with the same inputs. Do not edit a journal, delete -newer notes or replace history merely to force a retry. - -## Additional maintenance and publication - -Backfill, format, notes extraction and custom templates are optional operations. -Discover their actual commands and read that release's guide before using them. -Keep published descriptions, unknown dates, existing references and pending -fragments intact as required by the operation. Executable PHP templates require -explicit trust. Preview mutations and review the resulting diff. - -Publication requires separate authority for an exact approved full commit SHA. -Read that release's publication guide and command help, preview when supported, -and supply the verified target explicitly. Use the application's approved -credential mechanism. Verify the approved version, notes, consumed fragments, -tag and source commit; PR text or a moving branch is not transaction evidence. -Preparation and publication must use the same policies that affect the output. - -Do not move conflicting concrete tags or overwrite divergent published notes. -After an uncertain response, inspect remote evidence and follow the selected -release's idempotent recovery route under the existing authority. Report what -was actually published or recovered separately from successful validation. diff --git a/.agents/skills/fast-forward-changelog/references/php-api.md b/.agents/skills/fast-forward-changelog/references/php-api.md deleted file mode 100644 index 2dc88e4..0000000 --- a/.agents/skills/fast-forward-changelog/references/php-api.md +++ /dev/null @@ -1,40 +0,0 @@ -# Optional PHP integration - -Load only when the application needs injected services instead of the CLI or -GitHub lifecycle. CPX executes a separate tool; it does not provide an application -autoloader. Inspect the application's Composer installation with -`composer show fast-forward/changelog`, then read the PHP integration/API guide, -manifest requirements and migration notes from that exact release tag. - -Use the installed namespaces and method signatures. Keep the application's -existing command loader, container precedence and secret mechanism. Expose only -the needed domain services and inject external boundaries in application tests. -Resolving a service or writing a fragment does not authorize commits or releases. - -## Bundled contribution example - -The complete [contribution program](../examples/contribution.php) illustrates the -`0.1.0` PHP API: explicit consumer autoloader and target directory, provider -composition, fragment creation and validation. It is an optional example, not -the contract for every later release. Before using it with another version, -compare its imports/signatures with that release's documented API or use the -example shipped with the selected release. - -For a matching API, run it first in a disposable target: - -```sh -php .agents/skills/fast-forward-changelog/examples/contribution.php ./vendor/autoload.php /absolute/project -vendor/bin/changelog check --no-interaction -``` - -Success prints `Contribution example PASS`; exactly one -`.changelog/php-api-example.md` is created, with no commit or central-history -change. A repeated run must expose the filename collision rather than overwrite -the file. Missing inputs and runtime failures remain nonzero. Do not report -success after a failed write or ignore the validation report. - -Keep PR/issue/author fields absent unless verified. Service access follows the -same fragment, version-transaction and publication boundaries as the selected -release's CLI. Learn optional configuration, planner/history services and -approved-commit publication from that version's documentation when the task -requires them; do not load an API inventory for an ordinary fragment task. diff --git a/.changelog/composer-managed-changelog-skill.md b/.changelog/composer-managed-changelog-skill.md new file mode 100644 index 0000000..8d47c0a --- /dev/null +++ b/.changelog/composer-managed-changelog-skill.md @@ -0,0 +1,9 @@ +--- +category: changed +type: patch +--- + +Install the Changelog agent skill through the development-only `llm/skills` +Composer plugin and the committed skill-source configuration. Keep generated +agent instructions out of Git and Composer distributions instead of maintaining +a versioned copy of the upstream skill. diff --git a/.gitattributes b/.gitattributes index 29c1981..216edfb 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,6 +1,7 @@ * text=auto AGENTS.md export-ignore .agents/ export-ignore +skills.json export-ignore /examples/ export-ignore docs/index.html export-ignore docs/.nojekyll export-ignore diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d793cb2..846ea25 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,10 +63,6 @@ jobs: - name: Run formatting, PHPCS, PHPUnit and maximum src-plus-tests analysis run: composer --no-plugins check - - name: Lint the upstream Changelog skill on its tooling runtime - if: matrix.php == '8.5' - run: git ls-files -z -- '.agents/skills/fast-forward-changelog/*.php' | xargs -0 -n1 php -l - production: name: Production / PHP ${{ matrix.php }} / ${{ matrix.dependencies }} runs-on: ubuntu-latest @@ -98,9 +94,8 @@ jobs: coverage: none tools: composer:v2 - - name: Lint library PHP on the actual runtime - # The upstream release-tooling example has its own PHP requirement. - run: git ls-files -z -- '*.php' ':(exclude).agents/skills/fast-forward-changelog/**' | xargs -0 -n1 php -l + - name: Lint all tracked PHP on the actual runtime + run: git ls-files -z -- '*.php' | xargs -0 -n1 php -l - name: Verify the committed distribution and create a clean consumer run: | diff --git a/.gitignore b/.gitignore index 1891fc2..e518196 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .composer/ +.agents/ /composer.lock .idea/ vendor/ diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 044132e..334fdd9 100755 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -20,7 +20,6 @@ $paths = [ __FILE__, __DIR__, - '!.agents/skills/fast-forward-changelog', ]; $header = HeaderExtractor::extractFromFile(__FILE__); diff --git a/AGENTS.md b/AGENTS.md index 14b0d39..35d0cc8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -52,6 +52,6 @@ and verification continue to follow this AGENTS.md. - [docs/releases.md](docs/releases.md): independent fragments, reviewed version PRs, Git-tag version authority and publication boundaries. - [docs/agent-skill.md](docs/agent-skill.md): optional project/global skill distribution, trust and lifecycle; copying does not establish host activation. - [resources/skills/coisa-error-handler/SKILL.md](resources/skills/coisa-error-handler/SKILL.md): portable consumer integration procedure, bundled examples and supported API contract; keeps its own package entrypoint and source identity. -- [.agents/skills/fast-forward-changelog/SKILL.md](.agents/skills/fast-forward-changelog/SKILL.md): project-installed upstream release-tooling procedure, managed through its native installation receipt; PHP requirements belong to the tool, not this library. +- [skills.json](skills.json): Composer-managed development skill sources; installation creates ignored local agent instructions without changing the library's bundled consumer skill. No subtree needs an additional AGENTS.md. Guides and the skill retain their own procedures without duplicating repository authority. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 155eec6..4ab38b6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,6 +22,12 @@ when deliberately testing a fresh dependency resolution. Record `php --version`, `composer --version` and `composer show --locked` with validation evidence. Do not force-add the local lockfile to a PR. +A normal development `composer install` also synchronizes the Changelog agent +skill configured in `skills.json` through the `llm/skills` plugin. The isolated +commands above deliberately skip this step; run `composer skills:update` if you +want the local instructions afterward. Generated `.agents/` files stay ignored. +See the [project tooling skill](docs/releases.md#project-tooling-skill) for details. + Development integrations can have narrower PHP requirements than the library's runtime `^7.4 || ^8.0`. Resolve them on a compatible runner and verify the supported minimum runtime through a separate consumer without development dependencies. diff --git a/composer.json b/composer.json index 1f21728..8c34fa0 100644 --- a/composer.json +++ b/composer.json @@ -14,6 +14,7 @@ "prefer-stable": true, "optimize-autoloader": true, "allow-plugins": { + "llm/skills": true, "ocramius/package-versions": true } }, @@ -60,6 +61,7 @@ "filp/whoops": "^2.18.4", "jangregor/phpstan-prophecy": "^1.0", "laminas/laminas-servicemanager": "^4.3", + "llm/skills": "^1.15", "nyholm/psr7": "^1.8", "nyholm/psr7-server": "^1.1", "phly/phly-event-dispatcher": "^1.0", diff --git a/docs/releases.md b/docs/releases.md index 27d3b74..fc869ed 100644 --- a/docs/releases.md +++ b/docs/releases.md @@ -52,33 +52,32 @@ With no pending fragments, the version command succeeds without changing files. ## Project tooling skill -The repository includes the upstream `fast-forward-changelog` skill under -`.agents/skills`, installed with the CLI's native project-scoped installer. Its -receipt records the source release and payload hashes. It is separate from the -library's bundled `coisa-error-handler` consumer skill and is excluded from the -Composer distribution. +The development dependency [`llm/skills`](https://github.com/roxblnfk/skills) +installs the upstream `fast-forward-changelog` skill from the source registered +in `skills.json`. A normal development `composer install` synchronizes it into +`.agents/skills`. This generated directory is ignored by Git; only the plugin +dependency and source configuration are versioned. -For the reviewed release, use [CPX](https://github.com/laravel/cpx) with the exact -numeric Composer version, without a `v` prefix: +Run these commands from the repository root to inspect or refresh the skill: ```sh -CHANGELOG_VERSION=0.2.0 - -cpx --skip-local "fast-forward/changelog:$CHANGELOG_VERSION" help skill:install -cpx --skip-local "fast-forward/changelog:$CHANGELOG_VERSION" skill:install --check +composer skills:show +composer skills:update ``` -Run these commands from the repository root. Inspect the selected release's help -before installing or updating; preserve local changes and let its installer -manage the payload and receipt together. A fresh project installation uses -`skill:install` without `--check`. Do not modify the upstream copy directly or -install it globally as part of repository maintenance. Installation and a clean -receipt check do not establish activation in a particular agent session. - -This release tool requires PHP 8.5. CPX isolates its Composer dependencies but -does not supply a PHP runtime. The workflow uses upstream's Docker runtime; -library users retain the declared PHP 7.4+ support. PHP CI checks library-owned -files on each supported runtime and the upstream skill's PHP example on 8.5. +The source is registered through `composer skills:add php-fast-forward/changelog`. +Review `skills.json` when changing its repository or version constraint. The +plugin is explicitly allowed in Composer configuration. `--no-plugins` disables +the plugin, and `--no-scripts` skips automatic synchronization; after an isolated +dependency installation using those flags, run `composer skills:update` when +you want the local instructions. Do not commit or edit the generated copy. + +The plugin is a development tool requiring PHP 8.2+. It does not install the +Changelog CLI or change this library's PHP 7.4+ runtime support. The workflow +supplies its own Changelog runtime. The library's bundled `coisa-error-handler` +consumer skill remains under `resources/skills`; this project setup does not +replace it. Neither `skills.json` nor `.agents/` is included in Composer archives. +Installation does not establish activation in a particular agent session. ## Central history format diff --git a/skills.json b/skills.json new file mode 100644 index 0000000..2122303 --- /dev/null +++ b/skills.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://raw.githubusercontent.com/roxblnfk/skills/master/resources/skills.schema.json", + "sources": [ + { + "from": "github", + "package": "php-fast-forward/changelog", + "ref": "^0.3.0" + } + ] +} From f4eb454be5ef68d299a9daa19c890438ea9a8167 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Say=C3=A3o=20Lobato=20Abreu?= Date: Tue, 20 Oct 2026 14:26:38 -0300 Subject: [PATCH 2/3] chore(dev): include Container and Config agent skills MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Felipe Sayão Lobato Abreu --- .changelog/composer-managed-changelog-skill.md | 2 ++ docs/releases.md | 6 ++++++ skills.json | 8 ++++++++ 3 files changed, 16 insertions(+) diff --git a/.changelog/composer-managed-changelog-skill.md b/.changelog/composer-managed-changelog-skill.md index 8d47c0a..e889548 100644 --- a/.changelog/composer-managed-changelog-skill.md +++ b/.changelog/composer-managed-changelog-skill.md @@ -7,3 +7,5 @@ Install the Changelog agent skill through the development-only `llm/skills` Composer plugin and the committed skill-source configuration. Keep generated agent instructions out of Git and Composer distributions instead of maintaining a versioned copy of the upstream skill. +Also synchronize the Container and Config skills from their installed Composer +packages. diff --git a/docs/releases.md b/docs/releases.md index fc869ed..6bcd097 100644 --- a/docs/releases.md +++ b/docs/releases.md @@ -58,6 +58,12 @@ in `skills.json`. A normal development `composer install` synchronizes it into `.agents/skills`. This generated directory is ignored by Git; only the plugin dependency and source configuration are versioned. +The manifest also explicitly trusts `fast-forward/container` and +`fast-forward/config` as skill donors. Their skills come from the installed +Composer packages, so the instructions match the resolved dependency versions, +including Config as a transitive dependency. No separate GitHub source or +wildcard trust is needed for either package. + Run these commands from the repository root to inspect or refresh the skill: ```sh diff --git a/skills.json b/skills.json index 2122303..0f637a6 100644 --- a/skills.json +++ b/skills.json @@ -1,5 +1,13 @@ { "$schema": "https://raw.githubusercontent.com/roxblnfk/skills/master/resources/skills.schema.json", + "dependencies": { + "composer": { + "trusted": [ + "fast-forward/config", + "fast-forward/container" + ] + } + }, "sources": [ { "from": "github", From a907ec9947c17f7a187cb5e1223de0361fcf84fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Say=C3=A3o=20Lobato=20Abreu?= Date: Tue, 20 Oct 2026 14:29:43 -0300 Subject: [PATCH 3/3] docs: correct Composer skill synchronization controls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Felipe Sayão Lobato Abreu --- docs/releases.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/releases.md b/docs/releases.md index 6bcd097..620e8ec 100644 --- a/docs/releases.md +++ b/docs/releases.md @@ -74,9 +74,12 @@ composer skills:update The source is registered through `composer skills:add php-fast-forward/changelog`. Review `skills.json` when changing its repository or version constraint. The plugin is explicitly allowed in Composer configuration. `--no-plugins` disables -the plugin, and `--no-scripts` skips automatic synchronization; after an isolated -dependency installation using those flags, run `composer skills:update` when -you want the local instructions. Do not commit or edit the generated copy. +all Composer plugins, including skill synchronization. To keep other plugins +active while disabling this tool's automatic synchronization, set +`auto-sync: false` in `skills.json`. `--no-scripts` skips scripts defined in +`composer.json`; plugin listeners can still synchronize skills. After an isolated +installation with plugins disabled, run `composer skills:update` when you want +the local instructions. Do not commit or edit the generated copy. The plugin is a development tool requiring PHP 8.2+. It does not install the Changelog CLI or change this library's PHP 7.4+ runtime support. The workflow