Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .agents/skills/fast-forward-changelog/.fast-forward-install.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"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"
}
21 changes: 21 additions & 0 deletions .agents/skills/fast-forward-changelog/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Felipe Sayao Lobato Abreu <github@mentordosnerds.com>

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.
142 changes: 142 additions & 0 deletions .agents/skills/fast-forward-changelog/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
---
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 <command>` 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=<number>` or
`pull_request: <number>` 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.
45 changes: 45 additions & 0 deletions .agents/skills/fast-forward-changelog/examples/contribution.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php

declare(strict_types=1);

/**
* Creates and validates one consumer fragment using explicit application paths.
*
* @copyright Copyright (c) 2026 Felipe Sayao Lobato Abreu <github@mentordosnerds.com>
* @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");
58 changes: 58 additions & 0 deletions .agents/skills/fast-forward-changelog/references/automation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# 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.
77 changes: 77 additions & 0 deletions .agents/skills/fast-forward-changelog/references/cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# CLI maintenance

Load for release previews, history maintenance, recovery or authorized
publication. First select the real release and inspect `list --raw` and
`help <command>` 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.
Loading
Loading