Skip to content

Commit 2d90cbf

Browse files
[docs] Refresh console class references (#123) (#124)
* [docs] Refresh console class references (#123) * [docs] Refresh console class references (#123) * Update wiki submodule pointer for PR #124 * [docs] Refresh architecture and sync guidance (#123) --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
1 parent bac2949 commit 2d90cbf

8 files changed

Lines changed: 95 additions & 49 deletions

File tree

.github/wiki

Submodule wiki updated from cc53289 to 244a89c

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- Document required GitHub Actions permissions for changelog release automation (#118)
1313
- Add the project mascot image to README and documentation (#121)
1414
- Upgrade the packaged phpDocumentor bootstrap template to v2.0.0 (#121)
15+
- Refresh outdated console bootstrap, sync, and dependency-injection documentation (#123)
1516

1617
## [1.12.0] - 2026-04-19
1718

README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,21 @@ so agents can discover the packaged skills shipped with this repository.
216216

217217
## 🏗️ Architecture
218218

219-
Each command is self-contained and receives its dependencies through constructor injection, following the :abbr:`DI` pattern. The ``ProcessBuilder`` and ``ProcessQueue`` classes provide a fluent API for constructing and executing system processes in sequence.
220-
221-
- ``ProcessBuilderInterface`` - Builds process commands with arguments
222-
- ``ProcessQueueInterface`` - Manages and executes process queues
223-
- ``FilesystemInterface`` - Abstracts filesystem operations
219+
- `Composer Plugin` - `FastForward\DevTools\Composer\Plugin` exposes the
220+
packaged command set to Composer and runs `dev-tools:sync` after install and
221+
update.
222+
- `DevTools Container` - `FastForward\DevTools\Console\DevTools::create()`
223+
builds a shared container from `DevToolsServiceProvider`, which wires
224+
process execution, filesystem access, changelog services, Git helpers,
225+
diffing, reporting, and template loading.
226+
- `Lazy Command Loading` - `DevToolsCommandLoader` discovers `#[AsCommand]`
227+
classes and resolves most commands only when they are invoked, while
228+
orchestration commands such as `standards` dispatch other commands through
229+
the console application itself.
230+
- `Consumer Sync Pipeline` - `dev-tools:sync` refreshes `composer.json`,
231+
funding metadata, workflow stubs, repository defaults, git metadata files,
232+
packaged Git hooks, and, in normal mode, the wiki submodule plus packaged
233+
skills.
224234

225235
## 🤝 Contributing
226236

docs/api/commands.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
Command Classes
22
===============
33

4-
All public CLI commands extend ``Composer\Command\BaseCommand`` and receive
5-
dependencies through constructor injection. The architecture uses
6-
``ProcessBuilder`` and ``ProcessQueue`` for fluent process management.
4+
All public CLI commands extend ``Composer\Command\BaseCommand``. Most command
5+
classes are resolved lazily through ``DevToolsCommandLoader`` and receive
6+
their collaborators from the shared ``DevToolsServiceProvider`` container,
7+
while orchestration commands such as ``standards`` dispatch other commands
8+
through the console application itself. The architecture also relies on
9+
``ProcessBuilder`` and ``ProcessQueue`` for fluent process management where
10+
subprocess execution is needed.
711

812
.. list-table::
913
:header-rows: 1

docs/api/composer-integration.rst

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,14 @@ Startup Chain
1010
1. ``bin/dev-tools`` loads ``bin/dev-tools.php``.
1111
2. ``bin/dev-tools.php`` prefers the consumer project's
1212
``vendor/autoload.php`` and falls back to the package autoloader.
13-
3. ``bin/dev-tools.php`` starts ``FastForward\DevTools\DevTools`` and appends
13+
3. ``bin/dev-tools.php`` starts ``FastForward\DevTools\Console\DevTools`` and appends
1414
``--no-plugins``.
15-
4. ``FastForward\DevTools\DevTools`` sets ``standards`` as the default command
16-
and loads commands from
17-
``FastForward\DevTools\Composer\Capability\DevToolsCommandProvider``.
15+
4. ``FastForward\DevTools\Console\DevTools::create()`` builds the shared
16+
container from ``FastForward\DevTools\ServiceProvider\DevToolsServiceProvider``.
17+
5. ``FastForward\DevTools\Console\CommandLoader\DevToolsCommandLoader``
18+
lazily discovers ``#[AsCommand]`` classes from the command namespace.
19+
6. ``FastForward\DevTools\Composer\Capability\DevToolsCommandProvider`` later
20+
exposes that same command set to Composer.
1821

1922
Composer Plugin Classes
2023
-----------------------
@@ -29,7 +32,7 @@ Composer Plugin Classes
2932
Composer install and update.
3033
* - ``FastForward\DevTools\Composer\Capability\DevToolsCommandProvider``
3134
- Instantiates and returns the available command classes.
32-
* - ``FastForward\DevTools\DevTools``
35+
* - ``FastForward\DevTools\Console\DevTools``
3336
- Console application used by the local binary.
3437

3538
Why ``--no-plugins`` Is Appended

docs/getting-started/installation.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,18 @@ following steps:
3232
update.
3333
4. ``dev-tools:sync`` adds or refreshes the ``dev-tools`` and
3434
``dev-tools:fix`` scripts in the consumer ``composer.json``.
35-
5. ``dev-tools:sync`` updates ``extra.grumphp.config-default-path`` and copies
36-
missing automation assets such as workflow stubs, ``.editorconfig``, and
37-
``.github/dependabot.yml``.
35+
5. ``dev-tools:sync`` updates ``extra.grumphp.config-default-path``,
36+
synchronizes funding metadata, copies automation assets such as workflow
37+
stubs, ``.editorconfig``, and ``.github/dependabot.yml``, and refreshes
38+
``.gitignore``, ``.gitattributes``, the project license, and packaged Git
39+
hooks.
3840
6. If ``.github/wiki`` is missing, ``dev-tools:sync`` adds it as a Git
3941
submodule that points to the repository wiki.
4042
7. ``dev-tools:sync`` runs ``gitignore`` to merge canonical ignore rules into
4143
the consumer project.
4244
8. ``dev-tools:sync`` runs ``skills`` to create or repair packaged skill links
43-
inside ``.agents/skills``.
45+
inside ``.agents/skills`` when sync runs in normal mode rather than
46+
preview/check mode.
4447

4548
First commands to try
4649
---------------------

docs/internals/architecture.rst

Lines changed: 48 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,15 @@ Local Command Lifecycle
1010
1. ``bin/dev-tools`` loads ``bin/dev-tools.php``.
1111
2. ``bin/dev-tools.php`` prefers the consumer ``vendor/autoload.php`` and
1212
falls back to the package autoloader.
13-
3. ``FastForward\DevTools\DevTools`` boots the command registry from
14-
``FastForward\DevTools\Composer\Capability\DevToolsCommandProvider``.
15-
4. ``standards`` is used as the default command when no explicit command name
13+
3. ``FastForward\DevTools\Console\DevTools::create()`` builds a shared
14+
container from ``FastForward\DevTools\ServiceProvider\DevToolsServiceProvider``.
15+
4. ``FastForward\DevTools\Console\CommandLoader\DevToolsCommandLoader``
16+
lazily discovers ``#[AsCommand]`` classes and resolves them from that
17+
container.
18+
5. ``standards`` is used as the default command when no explicit command name
1619
is given.
17-
5. Commands receive dependencies through constructor injection from
18-
``DevToolsServiceProvider``.
20+
6. ``FastForward\DevTools\Composer\Capability\DevToolsCommandProvider`` only
21+
adapts the same application command set for Composer plugin integration.
1922

2023
Consumer Synchronization Lifecycle
2124
----------------------------------
@@ -26,12 +29,17 @@ Consumer Synchronization Lifecycle
2629
``FastForward\DevTools\Composer\Capability\DevToolsCommandProvider``.
2730
4. After ``composer install`` or ``composer update``, the plugin runs
2831
``vendor/bin/dev-tools dev-tools:sync``.
29-
5. ``FastForward\DevTools\Console\Command\SyncCommand`` updates scripts, GitHub
30-
workflow stubs, ``.editorconfig``, ``dependabot.yml``, ``.gitignore``, and
31-
the wiki submodule in the consumer repository.
32-
6. ``FastForward\DevTools\Console\Command\SkillsCommand`` synchronizes packaged skill
33-
links into the consumer ``.agents/skills`` directory.
34-
7. ``FastForward\DevTools\Agent\Skills\SkillsSynchronizer`` creates missing
32+
5. ``FastForward\DevTools\Console\Command\SyncCommand`` updates
33+
``composer.json`` scripts, funding metadata, workflow stubs,
34+
``.editorconfig``, ``dependabot.yml``, ``.gitignore``,
35+
``.gitattributes``, the project license, and packaged Git hooks.
36+
6. In normal mode, ``dev-tools:sync`` also runs ``wiki --init`` and
37+
``skills`` to initialize the wiki submodule and synchronize packaged skill
38+
links into ``.agents/skills``.
39+
7. In ``--dry-run``, ``--check``, and ``--interactive`` modes, ``wiki`` and
40+
``skills`` are skipped because they do not yet expose non-destructive
41+
verification paths.
42+
8. ``FastForward\DevTools\Agent\Skills\SkillsSynchronizer`` creates missing
3543
links, repairs broken ones, and preserves consumer-owned directories.
3644

3745
Documentation Pipeline
@@ -50,21 +58,37 @@ Documentation Pipeline
5058
Dependency Injection
5159
--------------------
5260

53-
Commands receive their dependencies through constructor injection provided by
54-
``DevToolsServiceProvider``.
61+
``DevToolsServiceProvider`` builds the shared application container used by
62+
``DevTools::create()``. Most commands receive collaborators through
63+
constructor injection once resolved by that container, while command discovery
64+
itself stays lazy through ``DevToolsCommandLoader``.
65+
66+
The provider wires the command runtime by concern rather than by one flat
67+
command list:
5568

5669
.. list-table::
5770
:header-rows: 1
5871

59-
* - Interface
60-
- Purpose
72+
* - Concern
73+
- Services
6174
* - ``FastForward\DevTools\Process\ProcessBuilderInterface``
62-
- Builds process commands with a fluent API for arguments.
63-
* - ``FastForward\DevTools\Process\ProcessQueueInterface``
64-
- Queues and executes multiple processes in sequence.
65-
* - ``FastForward\DevTools\Filesystem\FilesystemInterface``
66-
- Abstracts filesystem operations.
67-
* - ``FastForward\DevTools\Composer\Json\ComposerJsonInterface``
68-
- Reads and validates ``composer.json`` metadata.
69-
* - ``Symfony\Component\Config\FileLocatorInterface``
70-
- Locates configuration files.
75+
- ``ProcessBuilderInterface`` and ``ProcessQueueInterface`` build and
76+
execute subprocess pipelines.
77+
* - ``Filesystem and metadata``
78+
- ``FilesystemInterface``, ``ComposerJsonInterface``, and
79+
``FileLocatorInterface`` resolve local files, project metadata, and
80+
packaged resources.
81+
* - ``Console bootstrapping``
82+
- ``CommandLoaderInterface`` resolves lazy command loading, and
83+
``Composer\Plugin\Capability\CommandProvider`` exposes the same
84+
command set to Composer.
85+
* - ``Changelog and Git``
86+
- The changelog manager, parser, renderer, checker, and
87+
``GitClientInterface`` support changelog authoring, verification, and
88+
release-note flows.
89+
* - ``Synchronization helpers``
90+
- Git ignore, Git attributes, license, resource diffing, and coverage
91+
summary services support consumer sync and reporting workflows.
92+
* - ``Shared infrastructure``
93+
- ``LoggerInterface``, ``ClockInterface``, and Twig's
94+
``LoaderInterface`` provide reusable runtime infrastructure.

docs/usage/syncing-consumer-projects.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ What the Command Changes
2525
- Updated in place.
2626
* - ``.github/workflows/*.yml``
2727
- Copies stub workflows from ``resources/github-actions``.
28-
- Only when missing.
28+
- Only when missing by default; replaceable with ``--overwrite``.
2929
* - ``.editorconfig``
3030
- Copies the packaged file from the repository root.
31-
- Only when missing.
31+
- Only when missing by default; replaceable with ``--overwrite``.
3232
* - ``.github/dependabot.yml``
3333
- Copies the packaged Dependabot template.
34-
- Only when missing.
34+
- Only when missing by default; replaceable with ``--overwrite``.
3535
* - ``.agents/skills/<skill-name>``
3636
- Creates or repairs symlinks to packaged agent skills.
3737
- Creates missing links, repairs broken symlinks, and preserves existing
@@ -61,7 +61,8 @@ What It Needs
6161
.. important::
6262

6363
Workflow stubs, ``.editorconfig``, and ``dependabot.yml`` are copied only
64-
when the target file does not already exist. This protects
65-
consumer-specific customizations. The ``skills`` phase follows the same
66-
spirit by preserving existing non-symlink directories inside
67-
``.agents/skills``.
64+
when the target file does not already exist unless ``--overwrite`` is used.
65+
This protects consumer-specific customizations by default while still
66+
allowing explicit replacement during shared automation updates. The
67+
``skills`` phase follows the same spirit by preserving existing
68+
non-symlink directories inside ``.agents/skills``.

0 commit comments

Comments
 (0)