Skip to content

feat: implement CodeGeneratorJob, ScaffoldPipeline, ListenCommand and supporting services#7

Open
jordanpartridge wants to merge 4 commits into
mainfrom
feature/code-generator-and-bifrost-subscriber
Open

feat: implement CodeGeneratorJob, ScaffoldPipeline, ListenCommand and supporting services#7
jordanpartridge wants to merge 4 commits into
mainfrom
feature/code-generator-and-bifrost-subscriber

Conversation

@jordanpartridge

Copy link
Copy Markdown
Contributor

Closes #3, closes #5

What's in this PR

CodeGeneratorJob — the intelligent scaffold half:

  • Clones the-shit/agent-skeleton via SkeletonService
  • Generates Blueprint YAML and runs blueprint:build via BlueprintService
  • Calls Ollama on Loki for business logic suggestions via OllamaService
  • Pushes scaffolded code to the new GitHub repo
  • Deploys Podman Quadlet on Odin via QuadletService
  • Updates ScaffoldRun status throughout (running → complete/failed)

ScaffoldPipeline — shared entry point all interfaces converge on. Creates the ScaffoldRun, dispatches RepoGeneratorJob and CodeGeneratorJob.

ListenCommand (foundry:listen) — subscribes to bifrost.foundry Redis pub/sub channel, routes foundry.scaffold.requested events through ScaffoldPipeline.

ScaffoldController — updated to use ScaffoldPipeline::dispatch() instead of inline job dispatch.

Gate

  • 100% coverage across all classes
  • Pint clean
  • PHPStan level 8

Jordan Partridge added 4 commits June 8, 2026 19:34
…issue #2)

Adds queued job that creates a GitHub repo, opens starter issues (one
Setup issue + one per model with attributes and relationships), and
registers a Bifrost webhook source. Uses raw Http facade since
conduit-ui/connector is not yet available. Config wired through
services.php. Tests cover all success and failure paths at 100%
coverage using Http::fake() and Mockery.
- Add ScaffoldStatus enum (Queued, Running, Complete, Failed)
- Add ScaffoldRun Eloquent model with UUID primary key, manifest JSON cast, status enum cast
- Add scaffold_runs migration
- Add ScaffoldController with store (validates manifest, creates run, dispatches jobs) and show
- Add CodeGeneratorJob stub implementing ShouldQueue
- Wire POST /api/scaffold and GET /api/scaffold/{id} routes
- Add 100% coverage tests: feature tests for controller routes, model, and job
… graceful Ollama/Bifrost failures, push validation

- Run blueprint:build from foundry's own artisan (installed here) and copy
  generated files to target repo — removes need for blueprint in agent-skeleton
- Make Ollama and Bifrost registration failures non-fatal (best-effort)
- Validate git push exit code and throw on failure
- Remove auto_init from GitHub repo creation so initial push succeeds
- Add failed_jobs migration, public/index.php entry point, .gitignore
- Add laravel-shift/blueprint as dev dependency

@lexi-chief-of-staff lexi-chief-of-staff Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking correctness and safety issues.

  • CodeGeneratorJob serializes a full Eloquent model onto the queue.
  • BlueprintService runs blueprint against the wrong artisan and copies files from the wrong base_path.
  • tmpPath and deploy commands accept unsanitized manifest.name; direct shell injection vectors.
  • Gate now auto-merges on coverage only.

Fix the execution model and input handling before merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bifrost subscriber: listen for foundry.scaffold.requested events Job 2: CodeGeneratorJob — clone skeleton, fill via Ollama, gate, deploy

1 participant