一键导入
tdd
Start a TDD cycle for a new Inertia bundle feature or bug fix. Write the test first, then implement.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Start a TDD cycle for a new Inertia bundle feature or bug fix. Write the test first, then implement.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Run a complete code review of the Inertia bundle. Checks protocol compliance and Symfony bundle conventions via static analysis (no automated tools).
Complete PHP API reference for all Inertia.js v3 prop types (optional/lazy, always, defer, once, merge, deepMerge, scroll). Auto-loaded when working on Props/, Service/Inertia.php, or InertiaResponse.php.
Complete reference for the Inertia.js v3 server-side protocol. Auto-loaded when working on InertiaResponse, InertiaListener, Inertia service, or any HTTP response handling.
Plan the implementation of a new Inertia bundle feature before writing any code. Creates a detailed implementation plan.
Reference patterns for creating Symfony 6.4+ reusable bundles using AbstractBundle. Auto-loaded when working on InertiaBundle.php, config/definition.php, config/services.yaml, or any DI configuration.
| name | tdd |
| description | Start a TDD cycle for a new Inertia bundle feature or bug fix. Write the test first, then implement. |
| argument-hint | <feature-or-bug-description> |
| allowed-tools | Bash(vendor/bin/phpunit:*), Bash(find:*), Bash(cat:*), Read, Write, Edit |
Implement $ARGUMENTS using strict Test-Driven Development.
tests/Unit/ or tests/Functional/Protocol/declare(strict_types=1) in every test filetest<Behavior>_<Condition>_<ExpectedResult>Read the relevant section of AGENTS.md and .claude/skills/inertia-protocol/SKILL.md.
Identify which protocol behavior needs to be implemented.
Check how inertia-laravel tests the same behavior — it is the reference implementation:
find /home/tony/Documents/tony/inertia-laravel/tests -name "*.php" | xargs grep -l "<keyword>" 2>/dev/null
Read the relevant test(s) to understand what cases to cover and how assertions are structured. Align test naming and coverage with the Laravel reference before writing anything.
Create the test file. Run it and confirm it FAILS:
vendor/bin/phpunit tests/path/to/TheTest.php --testdox
Show the failure output. If it fails with a PHP error (missing class, etc.) that's fine for now.
Write the smallest possible production code that makes the test pass. Run again — must be GREEN.
vendor/bin/phpunit --testdox
All tests must pass.
Clean up, apply conventions from AGENTS.md. Run tests again after each change.
vendor/bin/phpstan analyse src/ tests/ --level=8 --no-progress
vendor/bin/php-cs-fixer fix --dry-run --diff src/ tests/