Skip to content

SkillsCommand

github-actions edited this page Apr 22, 2026 · 1 revision

Synchronizes packaged Fast Forward skills into the consumer repository.

This command SHALL ensure that the consumer repository contains the expected .agents/skills directory structure backed by the packaged skill set. The command MUST verify that the packaged skills directory exists before any synchronization is attempted. If the target skills directory does not exist, it SHALL be created before the synchronization process begins.

The synchronization workflow is delegated to

  • See: \FastForward\DevTools\Sync\PackagedDirectorySynchronizer. This command MUST act as an orchestration layer only: it prepares the source and target paths, triggers synchronization, and translates the resulting status into Symfony Console output and process exit codes.

Methods

__construct

Initializes the command with an optional skills synchronizer instance.

public __construct(\FastForward\DevTools\Sync\PackagedDirectorySynchronizer $synchronizer, \FastForward\DevTools\Filesystem\FilesystemInterface $filesystem, \Psr\Log\LoggerInterface $logger): mixed

Parameters:

Parameter Type Description
$synchronizer \FastForward\DevTools\Sync\PackagedDirectorySynchronizer the synchronizer responsible
for applying the skills
synchronization process
$filesystem \FastForward\DevTools\Filesystem\FilesystemInterface filesystem used to resolve
and manage the skills
directory structure
$logger \Psr\Log\LoggerInterface logger used for command feedback

configure

Configures the supported JSON output option.

protected configure(): void

execute

Executes the skills synchronization workflow.

protected execute(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output): int

This method SHALL:

  • announce the start of synchronization;

  • resolve the packaged skills path and consumer target directory;

  • fail when the packaged skills directory does not exist;

  • create the target directory when it is missing;

  • delegate synchronization to

  • See: \FastForward\DevTools\Sync\PackagedDirectorySynchronizer;

  • return a success or failure exit code based on the synchronization result.

The command MUST return

  • See: \FastForward\DevTools\Console\Command\self::FAILURE when packaged skills are not available or when the synchronizer reports a failure. It MUST return

  • See: \FastForward\DevTools\Console\Command\self::SUCCESS only when synchronization completes successfully.

Parameters:

Parameter Type Description
$input \Symfony\Component\Console\Input\InputInterface the console input instance provided by Symfony
$output \Symfony\Component\Console\Output\OutputInterface the console output instance used to report progress

Return Value:

The process exit status. This MUST be

  • See: \FastForward\DevTools\Console\Command\self::SUCCESS on success and
  • See: \FastForward\DevTools\Console\Command\self::FAILURE on failure.

Inherited methods

addJsonOption

Adds the standard JSON output options to the current command.

protected addJsonOption(): static

isJsonOutput

Determines whether JSON output was requested.

protected isJsonOutput(\Symfony\Component\Console\Input\InputInterface $input): bool

The pretty-json flag SHALL imply JSON output.

Parameters:

Parameter Type Description
$input \Symfony\Component\Console\Input\InputInterface

isPrettyJsonOutput

Determines whether pretty JSON output was requested.

protected isPrettyJsonOutput(\Symfony\Component\Console\Input\InputInterface $input): bool

Parameters:

Parameter Type Description
$input \Symfony\Component\Console\Input\InputInterface

Clone this wiki locally