FORGE Resolve-Next-Ticket Workflow
What This Workflow Does
The resolve-next-ticket workflow closes the gap between issue creation (the FORGE Factory, Phases P1-P5) and issue execution. After the factory populates a project board with an Epic/Taskset/Task hierarchy, this workflow determines what to work on next by scanning the board, resolving dependencies, and producing a fully populated implementation prompt. It is the execution-side counterpart to the FORGE Factory Pipeline.The 6 Phases
| Phase | Name | Input | Output |
|---|---|---|---|
| 1 | Board Scan | Project board URL / org + project number | Raw inventory of all items with statuses |
| 2 | Hierarchy Reconstruction | Raw inventory | Structured tree: Epic → Tasksets → Tasks with blocking edges |
| 3 | Dependency Resolution | Structured tree | Sorted candidate list: unblocked tickets ranked by priority + critical path |
| 4 | Codebase Audit | Next ticket + repo | Current state of affected files, CI config, existing patterns |
| 5 | Prompt Assembly | Resolved ticket + audit results + template | Self-contained implementation prompt |
| 6 | Artifact Persistence | Workflow doc + prompt | Secret gists with ctx:proto: naming convention |
Phase Details
Phase 1: Board Scan
Query the project board usinggh project item-list to capture all items with their current column status (Todo / In Progress / Done).
Phase 2: Hierarchy Reconstruction
For each item, fetch the issue body and extract:- Tier from labels:
epic,taskset,task - Parent references from body text:
Parent Epic: #N,Parent Taskset: #N - Blocking edges from body text:
Blocked By: #N,Blocks: #N - Priority from labels:
priority:p0,priority:p1,priority:p2
Phase 3: Dependency Resolution
Walk the DAG and classify each taskset:| Classification | Criteria | Action |
|---|---|---|
| Ready | All blockers Done, status is Todo | Candidate for execution |
| Blocked | At least one blocker not Done | Skip — list what blocks it |
| In Progress | Already being worked on | Skip — report current state |
| Done | Completed | Skip |
- Critical path position — prefer tickets that unblock the most downstream work
- Priority label — p0 > p1 > p2
- Issue number — lower number = created first = natural ordering
Phase 4: Codebase Audit
For the selected ticket, audit the current repo state:- Read every file that will be created or modified
- Read adjacent configuration files (CI workflows, package.json, tsconfig, etc.)
- Identify existing patterns to follow (naming conventions, test structure, linter config)
- Check for any work already started
Phase 5: Prompt Assembly
Using the taskset-template-engine XML template, produce a fully self-contained implementation prompt that includes:- Pre-filled task issue references with acceptance criteria
- Exact file paths, content, and verification commands
- Branch naming convention and commit strategy
- All context the executing agent needs — zero follow-up questions required
Phase 6: Artifact Persistence
Persist both the reusable workflow and the populated prompt as secret gists:ctx:proto:forge-resolve-next-ticket-workflow.md— the generic workflow (reusable across any board)ctx:proto:<project>-<block>-<description>.md— the populated implementation prompt (specific to this ticket)
Full FORGE Lifecycle
The resolve-next-ticket workflow completes the FORGE lifecycle. The factory creates issues; this workflow selects and prepares them for execution. The dotted edge from “Issue Closed” back to “Project Board” represents the loop: once a ticket is done, the workflow can run again to select the next one. Combined with the Autonomous Execution model, this loop can run unattended overnight.Companion Artifacts
| Artifact | Type | ID |
|---|---|---|
| Resolve-next-ticket workflow gist | ctx:proto | a30390ef7bcb74c866fae53b88cdc07a |
| Block 2 implementation prompt gist | ctx:proto | a520575c07afe9efc753ba1c0afb076f |
| FORGE Factory Agent Guidance | Gist | 995a4a3ae71952975eee3c4f2b2394b0 |
| FORGE A2A Diagram Archive | Gist | 6a92c1f3858aa86130775034cff995fc |
| FORGE A2A Handbook | Gist | dc28f6be50d1212ea686004f546efa97 |
| FORGE Deep Research | Gist | 79ec7d730e0ad707489f19d77eff91f4 |
| Taskset Template Engine | Gist | c30ea47a53d3d26f3f5d23d18be2c2d4 |
Related Pages
- FORGE Stages — The 6-stage FORGE execution model (creation side)
- Autonomous Execution — Overnight unattended execution using this workflow in a loop
- Archive System v2 — How session knowledge flows to repos after execution