diff --git a/.changelog/consumer-template-skill.md b/.changelog/consumer-template-skill.md new file mode 100644 index 0000000..2ff788c --- /dev/null +++ b/.changelog/consumer-template-skill.md @@ -0,0 +1,6 @@ +--- +category: added +type: minor +--- + +Bundle a portable consumer skill with checked phpDocumentor examples, DevTools reports guidance and optional llm/skills discovery metadata. diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c74c91a..641180c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -30,11 +30,14 @@ jobs: - run: composer install --no-scripts --no-interaction --prefer-dist --no-progress - name: Validate rendered checkout run: php tests/generate-fixture.php + - name: Validate bundled consumer example + run: php tests/verify-consumer-skill.php - name: Validate rendered release archive run: | mkdir -p "$RUNNER_TEMP/template-archive" git archive HEAD | tar -x -C "$RUNNER_TEMP/template-archive" php tests/generate-fixture.php "$RUNNER_TEMP/template-archive" + php tests/verify-consumer-skill.php "$RUNNER_TEMP/template-archive" actions: name: Analyze (actions) diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..94bb8a1 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,27 @@ +# Template maintenance + +This repository owns a phpDocumentor Twig/Bootstrap template, not a PHP service +library. Preserve the Composer type `phpdocumentor-template` and existing public +template path. Follow `CONTRIBUTING.md` for change fragments and `DESIGN.md` for +visual identity. Merge, release and deployment require maintainer authorization. + +## Bundled consumer skill + +Read [the consumer skill](resources/skills/fast-forward-phpdoc-bootstrap-template/SKILL.md) +when changing consumer configuration, integration examples, guides or the skill. +Keep its version contract, references and checked examples aligned with public +template behavior. Its canonical distributable source is `resources/skills`; +do not add a second copy or host aliases. Package procedures belong in `SKILL.md`. + +## Validation + +Run `composer validate --strict`, `php tests/generate-fixture.php` and +`php tests/verify-consumer-skill.php` after installing development dependencies. +Check the archive too: `.gitattributes` excludes `/docs/`, so consumer skill +references and examples must remain inside their package. The CI workflow owns +the PHP matrix and archive rendering checks. Keep unrelated worktree changes. + +## Child DOX Index + +No child instruction contracts. The consumer package owns its procedure through +its linked `SKILL.md`; ordinary template and test folders share this root contract. diff --git a/README.md b/README.md index c87829d..6525b3b 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,18 @@ Typical customization points include: - cards and content sections - Bootstrap styling +## Consumer agent skill + +The package bundles [fast-forward-phpdoc-bootstrap-template](resources/skills/fast-forward-phpdoc-bootstrap-template/SKILL.md) +for agents configuring guide homepages, API generation and output checks. It +supports template `^2.1.1`, PHP `^8.3` and phpDocumentor shim `^3.9`, and includes +an [existing DevTools reports route](resources/skills/fast-forward-phpdoc-bootstrap-template/references/dev-tools.md). +The template itself does not install phpDocumentor or activate an agent skill. + +See [skill installation and lifecycle](resources/skills/fast-forward-phpdoc-bootstrap-template/references/installation.md) +for optional project synchronization with `llm/skills ^1.15`, guarded manual +project/global copies and a pinned Skills CLI alternative. + ## Contributing Contributions are welcome. Please open an issue or submit a pull request. diff --git a/composer.json b/composer.json index ff5cf49..397856d 100644 --- a/composer.json +++ b/composer.json @@ -31,6 +31,14 @@ "require": { "php": "^8.3" }, + "suggest": { + "llm/skills": "Optionally synchronize the bundled consumer skill in your project." + }, + "extra": { + "skills": { + "source": "resources/skills" + } + }, "minimum-stability": "stable", "prefer-stable": true, "config": { diff --git a/composer.lock b/composer.lock index 18096a7..83ebb9b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "27cf07ecfb860cbf86f8a878c6a05e00", + "content-hash": "fe1b3da1089559c1934ad34bdd396896", "packages": [], "packages-dev": [ { diff --git a/resources/skills/fast-forward-phpdoc-bootstrap-template/LICENSE b/resources/skills/fast-forward-phpdoc-bootstrap-template/LICENSE new file mode 100644 index 0000000..6374901 --- /dev/null +++ b/resources/skills/fast-forward-phpdoc-bootstrap-template/LICENSE @@ -0,0 +1,19 @@ +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-phpdoc-bootstrap-template/SKILL.md b/resources/skills/fast-forward-phpdoc-bootstrap-template/SKILL.md new file mode 100644 index 0000000..70bc6d5 --- /dev/null +++ b/resources/skills/fast-forward-phpdoc-bootstrap-template/SKILL.md @@ -0,0 +1,160 @@ +--- +name: fast-forward-phpdoc-bootstrap-template +description: Configure and generate PHP API documentation and guides with the Fast Forward phpDocumentor Bootstrap template. Use for phpdoc.xml setup, guide homepages, template assets, output verification, or an existing Fast Forward DevTools reports integration. +license: MIT; see LICENSE +compatibility: Supports fast-forward/phpdoc-bootstrap-template ^2.1.1, PHP ^8.3 and phpDocumentor shim ^3.9. Requires Composer and phpDocumentor extensions; the verification example also uses DOM. Earlier template releases are outside this contract. +metadata: + author: Fast Forward + api-baseline: fast-forward/phpdoc-bootstrap-template ^2.1.1 +--- + +# Generate Fast Forward documentation + +Use this skill in a PHP project consuming `fast-forward/phpdoc-bootstrap-template +^2.1.1`. Inspect `composer.json`, `composer.lock`, existing documentation commands +and CI before editing. Run `composer show fast-forward/phpdoc-bootstrap-template` +and `composer show phpdocumentor/shim` to check installed versions. If they fall +outside this contract, inspect the matching version's documentation; do not +upgrade dependencies just to use this skill. The template has no PHP namespace, +container registration or application autoloader requirement: phpDocumentor +loads its `template.xml` and Twig files. + +## Configure a guide homepage and API + +Prefer an existing DevTools route if the project already uses it; load +[DevTools integration](references/dev-tools.md) for that case. Otherwise use the +direct route below. Preserve existing source exclusions and project conventions. + +Prerequisites: PHP ^8.3, Composer, phpDocumentor's required extensions (including +DOM/XML, mbstring and intl), and trusted project sources. Graphviz `dot` is needed +for class diagrams. The template package alone does not install the generator. +With authority to install the project's development tooling, review/merge the +specific shim plugin approval and install: + +```sh +composer config allow-plugins.phpdocumentor/shim true +composer require --dev 'fast-forward/phpdoc-bootstrap-template:^2.1.1' 'phpdocumentor/shim:^3.9' +``` + +From the project root, create `phpdoc.xml`: + +```xml + + + Example documentation + + build/docs + build/phpdoc-cache + + + + true + src + + + docs + . + + +