When a user drops a feature spec into Gluecron's spec editor and hits "Generate PR," a pull request lands in their repository within 90 seconds on average. Here's exactly what happens in that window.
Phase 1: Parsing (0–5s)
The spec text is sent to Claude Sonnet 4 with a structured prompt that extracts:
- The target repository and base branch
- A list of file changes (create, edit, delete) with natural-language descriptions
- A PR title and body draft
- Any explicit constraints ("don't touch the auth layer", "keep the test suite green")
The model returns a structured JSON plan. This phase takes 3–5 seconds depending on spec length.
Phase 2: Context loading (5–20s)
For each file the plan touches, we fetch the current content from the git object store and pass it
into the context window. We also load the repository's CLAUDE.md (if present) as
system-level instructions, and the last 10 commits to the files in scope (for coding style reference).
Large repos keep this phase under 15 seconds because we only fetch the specific blobs we need, not the whole tree. The git object model is extremely efficient for point lookups.
Phase 3: Code generation (20–75s)
The file edit plan is executed by a second Claude call (Sonnet 4) that writes the actual diffs. We run file edits in parallel where there are no inter-file dependencies — typically 60–70% of all edits in a spec. The remainder run sequentially so that a later file can reference changes made in an earlier one.
Each generated file goes through a lightweight AST sanity check: TypeScript files are parsed with
ts.createSourceFile, and any file that fails to parse gets one retry with the parse
error appended to the prompt.
Phase 4: Commit and push (75–85s)
We use git plumbing directly — git hash-object, git update-index,
git write-tree, git commit-tree — to build the commit object without
touching a working directory. The branch is created and the commit pushed atomically. This runs
in under 3 seconds even for large change sets.
Phase 5: PR creation and AI review (85–90s)
The PR is created via our internal API (same endpoint the web UI and MCP server use). Immediately after creation, our standard AI review hook fires — a third Claude call reads the diff and posts inline review comments. This is the same review that runs on every human-authored PR. Spec-generated PRs get no special treatment.
Total: 85–95 seconds wall-clock, depending on spec complexity. The spec-to-PR feature has been live since April 2026 and is now used in roughly 30% of all PR creation events on the platform.
What we don't do
We don't run the generated code. We don't check out a working copy. We don't call any external tool-execution API. Everything happens in-process using git plumbing, Bun, and Claude. The simplicity is what makes it fast.