Skip to content

POST /api/scaffold — accept manifest, dispatch both jobs #4

Description

@jordanpartridge

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

  • POST /api/scaffold accepts manifest JSON
  • MCP server exposes scaffold_app tool
  • ListenCommand subscribes to bifrost.foundry on boot, routes foundry.scaffold.requested
  • php artisan foundry:scaffold reads manifest from file or stdin
  • All entry points converge on same ScaffoldPipeline service
  • GET /api/scaffold/{id} returns current status
  • 100% test coverage

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions