What
Single entry point into the queue — but Foundry accepts manifests from multiple interfaces. All roads lead to the same ScaffoldPipeline.
Entry Points
| Interface |
How |
| REST API |
POST /api/scaffold |
| MCP server |
scaffold_app tool — Claude/Lexi calls directly |
| Bifrost subscriber |
Listens on bifrost.foundry Redis channel, routes foundry.scaffold.requested events |
| Mattermost/Slack |
/foundry billing-service slash command |
| CLI |
php artisan foundry:scaffold manifest.json |
Bifrost Integration
Foundry registers itself as a Bifrost subscriber on boot. Any service that emits a foundry.scaffold.requested event via Bifrost gets a microservice scaffolded automatically — no direct HTTP call required.
Core Flow (same regardless of entry point)
manifest in
→ validate via ManifestData DTO
→ dispatch RepoGeneratorJob
→ dispatch CodeGeneratorJob
→ return { job_id, status_url }
Acceptance Criteria
What
Single entry point into the queue — but Foundry accepts manifests from multiple interfaces. All roads lead to the same
ScaffoldPipeline.Entry Points
POST /api/scaffoldscaffold_apptool — Claude/Lexi calls directlybifrost.foundryRedis channel, routesfoundry.scaffold.requestedevents/foundry billing-serviceslash commandphp artisan foundry:scaffold manifest.jsonBifrost Integration
Foundry registers itself as a Bifrost subscriber on boot. Any service that emits a
foundry.scaffold.requestedevent via Bifrost gets a microservice scaffolded automatically — no direct HTTP call required.Core Flow (same regardless of entry point)
Acceptance Criteria
POST /api/scaffoldaccepts manifest JSONscaffold_apptoolListenCommandsubscribes tobifrost.foundryon boot, routesfoundry.scaffold.requestedphp artisan foundry:scaffoldreads manifest from file or stdinScaffoldPipelineserviceGET /api/scaffold/{id}returns current status