Skip to content

Commit 408d217

Browse files
committed
feat: Update documentation to include details about the new skills command for synchronizing packaged agent skills
Signed-off-by: Felipe Sayão Lobato Abreu <github@mentordosnerds.com>
1 parent 143931b commit 408d217

File tree

16 files changed

+236
-25
lines changed

16 files changed

+236
-25
lines changed

README.md

Lines changed: 49 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# FastForward\DevTools
22

3+
FastForward DevTools is a Composer plugin that standardizes quality checks,
4+
documentation builds, consumer repository bootstrap, and packaged agent skills
5+
across Fast Forward libraries.
6+
37
[![PHP Version](https://img.shields.io/badge/php-^8.3-777BB4?logo=php&logoColor=white)](https://www.php.net/releases/)
48
[![Composer Package](https://img.shields.io/badge/composer-fast--forward%2Fdev--tools-F28D1A.svg?logo=composer&logoColor=white)](https://packagist.org/packages/fast-forward/dev-tools)
59
[![Tests](https://img.shields.io/github/actions/workflow/status/php-fast-forward/dev-tools/tests.yml?logo=githubactions&logoColor=white&label=tests&color=22C55E)](https://github.com/php-fast-forward/dev-tools/actions/workflows/tests.yml)
@@ -10,11 +14,14 @@
1014

1115
## ✨ Features
1216

13-
- Aggregates multiple development tools into a single command
14-
- Automates execution of tests, static analysis, and code styling
15-
- First-class support for automated refactoring and docblock generation
16-
- Integrates seamlessly as a Composer plugin without boilerplate
17-
- Configures default setups for QA tools out of the box
17+
- Aggregates refactoring, PHPDoc, code style, tests, and reporting under a
18+
single Composer-facing command vocabulary
19+
- Ships shared workflow stubs, `.editorconfig`, Dependabot configuration, and
20+
other onboarding defaults for consumer repositories
21+
- Synchronizes packaged agent skills into consumer `.agents/skills`
22+
directories using safe link-based updates
23+
- Works both as a Composer plugin and as a local binary
24+
- Preserves local overrides through consumer-first configuration resolution
1825

1926
## 🚀 Installation
2027

@@ -58,13 +65,48 @@ composer dev-tools wiki
5865
# Generate documentation frontpage and related reports
5966
composer dev-tools reports
6067

68+
# Synchronize packaged agent skills into .agents/skills
69+
composer dev-tools skills
70+
6171
# Merges and synchronizes .gitignore files
6272
composer dev-tools gitignore
6373

64-
# Installs and synchronizes dev-tools scripts, GitHub Actions workflows, .editorconfig, and ensures the repository wiki is present as a git submodule in .github/wiki
74+
# Installs and synchronizes dev-tools scripts, GitHub Actions workflows,
75+
# .editorconfig, .gitignore rules, packaged skills, and the repository wiki
76+
# submodule in .github/wiki
6577
composer dev-tools:sync
6678
```
6779

80+
The `skills` command keeps `.agents/skills` aligned with the packaged Fast
81+
Forward skill set. It creates missing links, repairs broken links, and
82+
preserves existing non-symlink directories. The `dev-tools:sync` command calls
83+
`skills` automatically after refreshing the rest of the consumer-facing
84+
automation assets.
85+
86+
## 🧰 Command Summary
87+
88+
| Command | Purpose |
89+
|---------|---------|
90+
| `composer dev-tools` | Runs the full `standards` pipeline. |
91+
| `composer dev-tools tests` | Runs PHPUnit with local-or-packaged configuration. |
92+
| `composer dev-tools docs` | Builds the HTML documentation site from PSR-4 code and `docs/`. |
93+
| `composer dev-tools skills` | Creates or repairs packaged skill links in `.agents/skills`. |
94+
| `composer dev-tools:sync` | Updates scripts, workflow stubs, `.editorconfig`, `.gitignore`, wiki setup, and packaged skills. |
95+
96+
## 🔌 Integration
97+
98+
DevTools integrates with consumer repositories in two ways. The Composer plugin
99+
exposes the command set automatically after installation, and the local binary
100+
keeps the same command vocabulary when you prefer running tools directly from
101+
`vendor/bin/dev-tools`. The consumer sync flow also refreshes `.agents/skills`
102+
so agents can discover the packaged skills shipped with this repository.
103+
104+
## 🤝 Contributing
105+
106+
Run `composer dev-tools` before opening a pull request. If you change public
107+
commands or consumer onboarding behavior, update `README.md` and `docs/`
108+
together so downstream libraries keep accurate guidance.
109+
68110
## 📄 License
69111

70112
This package is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.
@@ -73,4 +115,5 @@ This package is licensed under the MIT License. See the [LICENSE](LICENSE) file
73115

74116
- [Repository](https://github.com/php-fast-forward/dev-tools)
75117
- [Packagist](https://packagist.org/packages/fast-forward/dev-tools)
118+
- [Documentation](https://php-fast-forward.github.io/dev-tools/index.html)
76119
- [RFC 2119](https://datatracker.ietf.org/doc/html/rfc2119)

docs/advanced/consumer-automation.rst

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ FastForward DevTools plays two roles at once:
55

66
- producer: this repository ships reusable workflow templates and default
77
configuration files;
8-
- consumer helper: the ``dev-tools:sync`` command copies those assets into
9-
other Fast Forward libraries.
8+
- consumer helper: the ``dev-tools:sync`` command copies those assets and links
9+
packaged skills into other Fast Forward libraries.
1010

1111
Reusable Workflows Versus Consumer Stubs
1212
----------------------------------------
@@ -25,6 +25,9 @@ Reusable Workflows Versus Consumer Stubs
2525
- This repository's own Dependabot configuration.
2626
* - ``resources/dependabot.yml``
2727
- Template copied into consumer repositories.
28+
* - ``.agents/skills/*``
29+
- Packaged agent skills linked into consumer repositories by the
30+
``skills`` command.
2831
* - ``.github/wiki``
2932
- Generated Markdown API documentation locally and wiki submodule content
3033
in consumer repositories.
@@ -48,5 +51,6 @@ Producer Impact
4851
---------------
4952

5053
Any change to ``resources/github-actions``, ``resources/dependabot.yml``,
51-
``.github/workflows``, or ``FastForward\DevTools\Command\SyncCommand`` changes
52-
the default onboarding story for every consumer library.
54+
``.agents/skills``, ``.github/workflows``, or
55+
``FastForward\DevTools\Command\SyncCommand`` changes the default onboarding
56+
story for every consumer library.

docs/api/commands.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,13 @@ resolution, configuration fallback, PSR-4 lookup, and child-command dispatch.
3939
* - ``FastForward\DevTools\Command\ReportsCommand``
4040
- ``reports``
4141
- Combines the documentation build with coverage generation.
42+
* - ``FastForward\DevTools\Command\SkillsCommand``
43+
- ``skills``
44+
- Synchronizes packaged agent skills into ``.agents/skills``.
4245
* - ``FastForward\DevTools\Command\SyncCommand``
4346
- ``dev-tools:sync``
44-
- Synchronizes consumer-facing scripts and automation assets.
47+
- Synchronizes consumer-facing scripts, automation assets, and packaged
48+
skills.
4549
* - ``FastForward\DevTools\Command\GitIgnoreCommand``
4650
- ``gitignore``
4751
- Merges and synchronizes .gitignore files.

docs/configuration/overriding-defaults.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ Commands and Their Configuration Files
3939
* - ``docs``
4040
- ``docs/`` or another path passed with ``--source``
4141
- The selected guide source must exist locally.
42+
* - ``skills``
43+
- ``.agents/skills/``
44+
- Creates missing local links to packaged skills and preserves existing
45+
non-symlink directories.
4246
* - ``dev-tools:sync``
4347
- Consumer repository files
4448
- Works directly against local project files such as ``composer.json`` and
@@ -106,6 +110,7 @@ What Is Not Overwritten Automatically
106110
- existing workflow files in ``.github/workflows/``;
107111
- an existing ``.editorconfig``;
108112
- an existing ``.github/dependabot.yml``;
113+
- an existing non-symlink directory inside ``.agents/skills/``;
109114
- an existing ``.github/wiki`` directory or submodule.
110115

111116
.. tip::

docs/configuration/tooling-defaults.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ create them on day one.
2828
* - ``.editorconfig``
2929
- ``dev-tools:sync``
3030
- Copied into the consumer root when missing.
31+
* - ``.agents/skills/*``
32+
- ``skills`` and ``dev-tools:sync``
33+
- Packaged agent skill directories exposed to consumer repositories
34+
through symlinks.
3135

3236
Generated and Cache Directories
3337
-------------------------------
@@ -37,6 +41,8 @@ Generated and Cache Directories
3741
coverage data.
3842
- ``.github/wiki/`` contains generated Markdown API documentation and, in
3943
consumer repositories, the wiki submodule.
44+
- ``.agents/skills/`` contains symlinked packaged skills or consumer-owned
45+
directories kept in place by the ``skills`` command.
4046
- ``tmp/cache/phpdoc``, ``tmp/cache/phpunit``, ``tmp/cache/rector``, and
4147
``tmp/cache/.php-cs-fixer.cache`` store tool caches.
4248

docs/faq.rst

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,15 @@ Do I always need to run ``dev-tools:sync`` manually?
2020
Usually no. The plugin already runs it after ``composer install`` and
2121
``composer update``. Manual sync is most useful when plugins were disabled or
2222
after upgrading ``fast-forward/dev-tools`` and wanting to refresh consumer
23-
automation.
23+
automation. That flow also runs ``skills`` so packaged skill links are kept up
24+
to date.
25+
26+
When should I run ``composer dev-tools skills`` manually?
27+
---------------------------------------------------------
28+
29+
Run it when you want to refresh ``.agents/skills`` without rerunning the full
30+
consumer sync flow, especially after upgrading ``fast-forward/dev-tools`` or
31+
after deleting a packaged skill link locally.
2432

2533
Why does ``code-style`` touch ``composer.lock``?
2634
------------------------------------------------
@@ -69,6 +77,13 @@ What happens if ``.github/wiki`` already exists?
6977
``dev-tools:sync`` leaves it alone. The wiki submodule is only created when the
7078
directory is missing.
7179

80+
What happens if ``.agents/skills/my-skill`` already exists?
81+
-----------------------------------------------------------
82+
83+
If that path is a real directory instead of a symlink, the ``skills`` command
84+
preserves it and skips link creation. Broken symlinks are repaired, but
85+
consumer-owned directories are not overwritten automatically.
86+
7287
How do I override only one tool without forking the whole package?
7388
------------------------------------------------------------------
7489

docs/getting-started/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ By the end of this section you will know how to:
1111
- run the generated commands through Composer or directly through the binary;
1212
- prepare the minimum ``docs/`` structure required by the documentation
1313
pipeline;
14-
- understand which files ``dev-tools:sync`` creates or updates.
14+
- understand which files ``dev-tools:sync`` creates or updates, including
15+
packaged skills under ``.agents/skills``.
1516

1617
.. toctree::
1718
:maxdepth: 1

docs/getting-started/installation.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ following steps:
3737
``.github/dependabot.yml``.
3838
6. If ``.github/wiki`` is missing, ``dev-tools:sync`` adds it as a Git
3939
submodule that points to the repository wiki.
40+
7. ``dev-tools:sync`` runs ``gitignore`` to merge canonical ignore rules into
41+
the consumer project.
42+
8. ``dev-tools:sync`` runs ``skills`` to create or repair packaged skill links
43+
inside ``.agents/skills``.
4044

4145
First commands to try
4246
---------------------
@@ -45,6 +49,7 @@ After installation, these are the most useful sanity checks:
4549

4650
.. code-block:: bash
4751
52+
composer dev-tools skills
4853
composer dev-tools tests
4954
composer dev-tools docs
5055
composer dev-tools
@@ -55,6 +60,12 @@ If Composer argument forwarding becomes awkward, call the binary directly:
5560
5661
vendor/bin/dev-tools tests --filter=SyncCommandTest
5762
63+
If you want to verify the packaged skills on their own, run:
64+
65+
.. code-block:: bash
66+
67+
vendor/bin/dev-tools skills
68+
5869
When manual sync is useful
5970
--------------------------
6071

@@ -75,3 +86,5 @@ Or call the binary explicitly:
7586

7687
The ``docs`` and ``reports`` commands require a ``docs/`` directory. If
7788
your package does not have one yet, create it before running those commands.
89+
The ``skills`` command creates ``.agents/skills`` when needed, but it does
90+
not overwrite an existing non-symlink directory inside that tree.

docs/getting-started/quickstart.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This walkthrough is the fastest way to get a new library into a healthy state.
55

66
1. Install the package.
77
2. Create a minimal guide directory.
8-
3. Synchronize shared automation.
8+
3. Synchronize shared automation and packaged skills.
99
4. Run the focused commands once.
1010
5. Run the full suite before opening a pull request.
1111

@@ -38,6 +38,7 @@ Once the package is installed and the guide directory exists, run:
3838
.. code-block:: bash
3939
4040
composer dev-tools:sync
41+
composer dev-tools skills
4142
composer dev-tools tests
4243
composer dev-tools docs
4344
composer dev-tools
@@ -46,7 +47,10 @@ What Each Command Proves
4647
------------------------
4748

4849
- ``composer dev-tools:sync`` proves the consumer repository can receive the
49-
shared scripts and automation assets.
50+
shared scripts, automation assets, and packaged skills during onboarding.
51+
- ``composer dev-tools skills`` proves the packaged skill set can be linked
52+
safely into ``.agents/skills`` without copying files into the consumer
53+
repository.
5054
- ``composer dev-tools tests`` proves the packaged or local PHPUnit
5155
configuration can execute the current test suite.
5256
- ``composer dev-tools docs`` proves the PSR-4 source paths and the guide

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Documentation
33

44
FastForward DevTools is infrastructure for Fast Forward libraries. It ships
55
shared defaults, registers Composer commands, generates documentation, and
6-
synchronizes automation into consumer repositories.
6+
synchronizes automation plus packaged agent skills into consumer repositories.
77

88
If you are new to the package, start with :doc:`getting-started/index` and
99
:doc:`usage/index`. If you maintain Fast Forward libraries, continue with

0 commit comments

Comments
 (0)