From 1c623cdffba2b6e9646bde289a235ff3e57e11af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Say=C3=A3o=20Lobato=20Abreu?= Date: Tue, 20 Oct 2026 16:56:21 -0300 Subject: [PATCH 1/2] feat: bundle enum consumer skill --- .changelog/bundled-consumer-skill.md | 6 + AGENTS.md | 8 + README.md | 9 + composer.json | 6 + resources/skills/fast-forward-enum/LICENSE | 21 +++ resources/skills/fast-forward-enum/SKILL.md | 77 +++++++++ .../examples/integration.php | 23 +++ .../references/installation.md | 160 ++++++++++++++++++ tests/ConsumerSkillTest.php | 47 +++++ 9 files changed, 357 insertions(+) create mode 100644 .changelog/bundled-consumer-skill.md create mode 100644 resources/skills/fast-forward-enum/LICENSE create mode 100644 resources/skills/fast-forward-enum/SKILL.md create mode 100644 resources/skills/fast-forward-enum/examples/integration.php create mode 100644 resources/skills/fast-forward-enum/references/installation.md create mode 100644 tests/ConsumerSkillTest.php diff --git a/.changelog/bundled-consumer-skill.md b/.changelog/bundled-consumer-skill.md new file mode 100644 index 0000000..0cd2587 --- /dev/null +++ b/.changelog/bundled-consumer-skill.md @@ -0,0 +1,6 @@ +--- +category: added +type: minor +--- + +Bundle the fast-forward-enum consumer skill with executable examples, optional installation guidance and Composer discovery metadata. diff --git a/AGENTS.md b/AGENTS.md index 8461ff4..b3f314e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -161,3 +161,11 @@ When changing public API: - update tests and README in the same pass When opening repo-maintenance issues against `dev-tools`, prefer separate issues per bug instead of mixing unrelated failures into one report. + +## Bundled consumer skill + +Read [the consumer skill](resources/skills/fast-forward-enum/SKILL.md) when changing application integration +examples, consumer guides or the skill. Keep its version contract, references +and executable examples aligned with the supported public API. The canonical +distributable source is `resources/skills`; it needs no installed copy or host +alias. Repository maintenance continues to follow this AGENTS.md. diff --git a/README.md b/README.md index 7adb66b..1947c2d 100644 --- a/README.md +++ b/README.md @@ -316,3 +316,12 @@ Issues, pull requests, and documentation improvements are welcome. - [Tests workflow](https://github.com/php-fast-forward/enum/actions/workflows/tests.yml) - [MIT License](LICENSE) - [RFC 2119](https://datatracker.ietf.org/doc/html/rfc2119) + +## Consumer agent skill + +The package includes [fast-forward-enum](resources/skills/fast-forward-enum/SKILL.md) for application integration. +It supports `fast-forward/enum:^0.2`; inspect the installed version. +See [skill installation and lifecycle](resources/skills/fast-forward-enum/references/installation.md) for +optional project synchronization with `llm/skills ^1.15`, guarded manual +project/global copies and a pinned Skills CLI alternative. Shipping files does +not install tooling or activate the skill in an agent session. diff --git a/composer.json b/composer.json index 1bec609..f0575dd 100644 --- a/composer.json +++ b/composer.json @@ -43,6 +43,9 @@ "require-dev": { "fast-forward/dev-tools": "dev-main" }, + "suggest": { + "llm/skills": "Optionally synchronize the bundled consumer skill in your project." + }, "minimum-stability": "stable", "autoload": { "psr-4": { @@ -73,6 +76,9 @@ }, "grumphp": { "config-default-path": "vendor/fast-forward/dev-tools/grumphp.yml" + }, + "skills": { + "source": "resources/skills" } }, "scripts": { diff --git a/resources/skills/fast-forward-enum/LICENSE b/resources/skills/fast-forward-enum/LICENSE new file mode 100644 index 0000000..acddad6 --- /dev/null +++ b/resources/skills/fast-forward-enum/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Felipe Sayão 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/resources/skills/fast-forward-enum/SKILL.md b/resources/skills/fast-forward-enum/SKILL.md new file mode 100644 index 0000000..75abee7 --- /dev/null +++ b/resources/skills/fast-forward-enum/SKILL.md @@ -0,0 +1,77 @@ +--- +name: fast-forward-enum +description: Integrate Fast Forward enum traits, catalogs, name/value lookups and transitions with explicit handling of invalid external values. +license: MIT; see LICENSE +compatibility: Supports fast-forward/enum ^0.2 and PHP ^8.3. Requires Composer and declared extensions; inspect the installed version. Earlier releases are outside this contract. Requires ext-mbstring. +metadata: + author: Fast Forward + api-baseline: fast-forward/enum ^0.2 +--- + +# Use enum helpers and catalogs + +Use this skill for an application consuming `fast-forward/enum:^0.2`. +Read its instructions, manifest/lockfile and installed source before editing. +Run `composer show fast-forward/enum`. For versions outside this contract, +inspect matching documentation; do not silently upgrade the application. + +## First working integration + +Requires PHP ^8.3, Composer's application autoloader and this package's runtime +dependencies. Enable ext-mbstring. +With authority to install the dependency: + +```sh +composer require 'fast-forward/enum:^0.2' +``` + +Create `app.php` in the application root alongside composer.json/vendor: + +```php + + * @license https://opensource.org/licenses/MIT MIT License + * + * @see https://github.com/php-fast-forward/enum + * @see https://github.com/php-fast-forward/enum/issues + * @see https://php-fast-forward.github.io/enum/ + * @see https://datatracker.ietf.org/doc/html/rfc2119 + */ + +namespace FastForward\Enum\Tests; + +use PHPUnit\Framework\Attributes\CoversNothing; +use PHPUnit\Framework\TestCase; +use Symfony\Component\Process\Process; + +#[CoversNothing] +final class ConsumerSkillTest extends TestCase +{ + /** + * @return void + */ + public function testBundledConsumerIntegration(): void + { + $root = \dirname(__DIR__); + $process = new Process([ + \PHP_BINARY, + $root . '/resources/skills/fast-forward-enum/examples/integration.php', + $root . '/vendor/autoload.php', + ], $root, [ + 'XDEBUG_MODE' => 'off', + ]); + $process->setTimeout(20); + $process->run(); + + self::assertTrue($process->isSuccessful(), $process->getErrorOutput() . $process->getOutput()); + self::assertStringContainsString('fast-forward-enum: ok', $process->getOutput()); + } +} From e1b841ef772b4ad58c5ee8d77d24ced7b6427bf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Say=C3=A3o=20Lobato=20Abreu?= Date: Tue, 20 Oct 2026 17:09:18 -0300 Subject: [PATCH 2/2] docs: clarify Skills CLI removal leftovers --- .../skills/fast-forward-enum/references/installation.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/resources/skills/fast-forward-enum/references/installation.md b/resources/skills/fast-forward-enum/references/installation.md index 64dd624..110c44b 100644 --- a/resources/skills/fast-forward-enum/references/installation.md +++ b/resources/skills/fast-forward-enum/references/installation.md @@ -158,3 +158,10 @@ A copy, listing and successful task are separate observations. Tool contracts: [llm/skills 1.15.0](https://github.com/roxblnfk/skills/tree/1.15.0), [Composer plugin approval](https://getcomposer.org/doc/06-config.md#allow-plugins) and [Skills CLI](https://github.com/vercel-labs/skills). + +The Skills CLI 1.7.2 removal report is not proof that the canonical project +`.agents/skills` directory disappeared. A Codex project exercise reported one +removal while that copied package remained. Inspect the actual target and CLI +lockfiles afterwards. If an obsolete copy remains, verify that no other host +uses it, then archive only that selected directory outside discovery using the +manual recovery procedure above. Do not run a blanket clean to compensate.