1.9 KiB
1.9 KiB
Tasker Milestones
This document defines the implementation milestones for the getphred/tasker runner.
1. Project Infrastructure
- Initialize
composer.jsonwith PSR-4 autoloading and dev tools (PHPUnit, PHPStan, PHPCS). - Set up GitHub Actions (PHP 8.2/8.3) with fail-on-warning policy.
- Establish coding standards and baseline configuration files.
2. Core Runner MVP
- Bootstrap runner accepting a PSR-11 container (
ContainerInterface). - Implement explicit command registration API.
- Implement Composer-based discovery via
extra.phred-tasker.commands. - Implement basic argv parser for global flags:
-v/-vv/-vvv/-q,-n/--no-interaction,--no-ansi,-h/--help. - Implement built-in
listandhelpcommands.
3. Middleware Engine
- Define middleware registration via container and ordered execution.
- Implement middleware execution chain (
ConsoleMiddlewareInterface). - Add top-level exception guard and standardized exit code mapping (sysexits.h).
4. IO & State Wiring
- Initialize default PhredBridge adapters for
InputInterface/OutputInterface. - Wire verbosity, decoration (ANSI), and non-interactive flags into output and helper behavior.
- Ensure fixed markup set renders (via PhredBridge) or strips when colors are disabled.
5. Integration Tests
- End-to-end test: run sample command discovered via Composer.
- Arg/option parsing tests including edge cases (unknown flags, combined short flags rejection, defaults).
- Middleware behavior tests (ordering, early return, error handling).
- Help/list output tests (including non-interactive and
--no-ansi).
6. Developer Experience
- Quick Start guide with container boot example and Composer discovery snippet.
- Example project with 1–2 sample commands using attributes (
#[Cmd],#[Arg],#[Opt]). - Troubleshooting section (common exit codes, discovery pitfalls).