pilotphp / core
Composition kernel for PilotPHP: trusted discovery, activation, resolution, registration, and declaration replay.
Requires
- php: ^8.5
- composer/semver: ^3.4
- pilotphp/contracts: ~0.1.4
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.75
- phpstan/phpstan: ^2.1
- phpstan/phpstan-phpunit: ^2.0
- phpunit/phpunit: ^11.5
README
Composition kernel for the PilotPHP Agent-First framework.
Core owns the package composition lifecycle:
trusted discovery
→ candidate catalog
→ explicit activation
→ dependency/capability closure
→ graph/version validation
→ deferred entrypoint loading
→ single instantiation
→ transactional registration
→ immutable declaration replay
It is an infrastructure-only Composer library (not a Pilot extension). It does
not boot applications, dispatch operations, compile build stages, or depend on
domain packages. Production dependencies are PHP 8.5, pilotphp/contracts, and
composer/semver.
Quick start
use PilotPHP\Core\Composition\CompositionKernel;
use PilotPHP\Core\Composition\CompositionRequest;
$request = new CompositionRequest(
projectRoot: $projectRoot,
rootPackages: [
'acme/application',
'pilotphp/config',
'pilotphp/container',
],
capabilityBindings: [
'pilotphp.service-container' => 'pilotphp/container',
],
);
$resolved = (new CompositionKernel())->resolve($request);
$declarations = $resolved->declarations(); // DeclarationReplay
Root package order is not an ordering instruction. Registration order is the deterministic topological order of the resolved Pilot dependency/capability graph (lexical package ID for independent nodes).
Architectural invariant
Adding, removing, or replacing a Pilot extension must not require changes to
pilotphp/core.
Application code supplies package IDs and capability bindings. Core discovers
candidates from trusted Composer install paths and
<project-root>/pilot/package.json, then activates only the requested closure.
Documentation
- Architecture
- Package composition
- Capabilities
- Package graph
- Package registration
- Public API
- Impact audit
- Runtime kernel handoff
- Operation dispatch handoff
Development
composer test
composer analyse
composer cs-check
composer check
composer benchmark