Create work-order with minimal context for isolated subagent execution, optionally linked to GitHub issue
Generates isolated work-orders with TDD requirements and optional GitHub issue integration.
/plugin marketplace add laurigates/claude-plugins/plugin install blueprint-plugin@lgates-claude-plugins--no-publish for local-only, --from-issue 123 to create from existing issueGenerate a work-order document for isolated subagent execution with optional GitHub issue integration.
| Flag | Description |
|---|---|
--no-publish | Create local work-order only, skip GitHub issue creation |
--from-issue N | Create work-order from existing GitHub issue #N |
Default behavior: Creates both local work-order AND GitHub issue with work-order label.
docs/blueprint/ exists)--from-issue)docs/blueprint/work-overview.md existsgh CLI authenticated (unless using --no-publish)--from-issue N)When --from-issue N is provided:
Fetch issue:
gh issue view N --json title,body,labels,number
Parse issue content:
Generate work-order:
042-...)Update issue with link:
gh issue comment N --body "Work-order created: \`docs/blueprint/work-orders/NNN-task-name.md\`"
gh issue edit N --add-label "work-order"
Continue to save and report (skip to Step 6 below)
docs/blueprint/work-overview.md to understand current phasegit status to check uncommitted workgit log -5 --oneline to see recent workShould be:
Good examples:
Bad examples (too broad):
NNN-brief-task-description.mdWork-order structure:
# Work-Order NNN: [Task Name]
**GitHub Issue**: #N
**Status**: pending
## Objective
[One sentence describing what needs to be accomplished]
## Context
### Required Files
[Only files needed - list with purpose]
### PRD Reference
[Link to specific PRD section, not entire PRD]
### Technical Decisions
[Only decisions relevant to this specific task]
### Existing Code
[Only relevant code excerpts needed for integration]
## TDD Requirements
### Test 1: [Test Description]
[Exact test to write, with code template]
**Expected Outcome**: Test should fail
### Test 2: [Test Description]
[Exact test to write]
**Expected Outcome**: Test should fail
[More tests as needed]
## Implementation Steps
1. **Write Test 1** - Run: `[test_command]` - Expected: **FAIL**
2. **Implement Test 1** - Run: `[test_command]` - Expected: **PASS**
3. **Refactor (if needed)** - Run: `[test_command]` - Expected: **STILL PASS**
[Repeat for all tests]
## Success Criteria
- [ ] All specified tests written and passing
- [ ] [Specific functional requirement met]
- [ ] [Performance/security baseline met]
- [ ] No regressions (existing tests pass)
## Notes
[Additional context, gotchas, considerations]
## Related Work-Orders
- **Depends on**: Work-Order NNN (if applicable)
- **Blocks**: Work-Order NNN (if applicable)
Save to docs/blueprint/work-orders/NNN-task-name.md
Ensure zero-padded numbering (001, 002, 010, 100)
--no-publish)gh issue create \
--title "Work-Order NNN: [Task Name]" \
--body "## Work Order: [Task Name]
**Local Context**: \`docs/blueprint/work-orders/NNN-task-name.md\`
### Objective
[One-line objective from work order]
### TDD Requirements
- [ ] Test 1: [description]
- [ ] Test 2: [description]
### Success Criteria
- [ ] [Criterion 1]
- [ ] [Criterion 2]
---
*AI-assisted development work order. See linked file for full execution context.*" \
--label "work-order"
Capture issue number and update work-order file:
# Extract issue number from gh output
gh issue create ... 2>&1 | grep -oE '#[0-9]+' | head -1
Update the **GitHub Issue**: line in the work-order file with the issue number.
docs/blueprint/work-overview.mdWork-order created!
Work-Order: 003-jwt-token-generation.md
Location: docs/blueprint/work-orders/003-jwt-token-generation.md
GitHub Issue: #42 (or "Local only" if --no-publish)
Objective: [Brief objective]
Context included:
- Files: [List files]
- Tests: [Number of tests specified]
- Dependencies: [Key dependencies]
Ready for execution:
- Can be executed by subagent with isolated context
- TDD workflow enforced (tests specified first)
- Clear success criteria defined
- PR should use "Fixes #42" to auto-close issue
Use AskUserQuestion:
question: "Work-order ready. What would you like to do?"
options:
- label: "Execute this work-order (Recommended)"
description: "Start working on the task with TDD workflow"
- label: "Create another work-order"
description: "Generate the next task from pending items"
- label: "Delegate to subagent"
description: "Hand off for isolated execution"
- label: "I'm done for now"
description: "Exit - work-order is saved and ready"
Based on selection:
/project:continue with work-order context/blueprint:work-order again| Condition | Action |
|---|---|
| No PRDs exist | Guide to write PRDs first |
work-overview.md empty | Ask for current phase/status |
| Task unclear | Ask user what to work on next |
gh not authenticated | Warn and fallback to --no-publish behavior |
Issue already has work-order label | Warn, ask to update or create new |
Fixes #N in body/titlecompleted/ directoryThe work-order label identifies issues created from this workflow. Create it in your repo if it doesn't exist:
gh label create work-order --description "AI-assisted work order" --color "0E8A16"
Use --no-publish when:
Can publish later by manually creating issue and updating work-order file.