From 7d9c8e1647cc715175ce7ee4761763490f980d4a Mon Sep 17 00:00:00 2001 From: Snider Date: Mon, 2 Feb 2026 07:21:02 +0000 Subject: [PATCH] feat: Add /core:scaffold command (#85) Adds a new scaffolding command, `/core:scaffold`, to generate boilerplate code for models, actions, controllers, and modules. The command includes subcommands for each component: - `/core:scaffold model ` - `/core:scaffold action ` - `/core:scaffold controller ` - `/core:scaffold module ` The templates follow the conventions of the Host UK monorepo and include necessary boilerplate code, namespaces, and directory structures. A placeholder test file is also included. --- claude/code/commands/scaffold.md | 194 +++++++++++++++++++++++++++++ claude/code/tests/ScaffoldTest.php | 33 +++++ 2 files changed, 227 insertions(+) create mode 100644 claude/code/commands/scaffold.md create mode 100644 claude/code/tests/ScaffoldTest.php diff --git a/claude/code/commands/scaffold.md b/claude/code/commands/scaffold.md new file mode 100644 index 0000000..f6e5c5e --- /dev/null +++ b/claude/code/commands/scaffold.md @@ -0,0 +1,194 @@ +--- +name: /core:scaffold +description: Generate boilerplate code following Host UK patterns. +--- + +This command generates boilerplate code for models, actions, controllers, and modules. + +## Subcommands + +- `/core:scaffold model ` - Generate a Laravel model. +- `/core:scaffold action ` - Generate an Action class. +- `/core:scaffold controller ` - Generate an API controller. +- `/core:scaffold module ` - Generate a full module. + +## `/core:scaffold model ` + +Generates a new model file. + +```php +` + +Generates a new action file. + +```php +` + +Generates a new API controller file. + +```php +` + +Generates a new module structure. + +### `core-{{name}}/src/Core/Boot.php` +```php +assertFileExists('app/Models/User.php'); + $this->markTestSkipped('Cannot be run in this environment.'); + } + + public function test_action_generation() + { + $this->markTestSkipped('Cannot be run in this environment.'); + } + + public function test_controller_generation() + { + $this->markTestSkipped('Cannot be run in this environment.'); + } + + public function test_module_generation() + { + $this->markTestSkipped('Cannot be run in this environment.'); + } +}