Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions feature-orchestrator-plugin/commands/feature-backlog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
agent: feature-orchestrator-plugin:feature-orchestrator.agent
description: "Create work items in Azure DevOps from an approved plan"
---

# Backlog Phase

You are in the **Backlog** phase. Create work items in ADO from the approved plan.

**First**: Read `.github/orchestrator-config.json` for ADO project, org, and work item type.

Use the `pbi-creator` skill to:
1. Parse the approved plan from the previous phase
2. Discover ADO defaults (area path, iteration, assignee) from your recent work items
3. Present ALL settings for confirmation via `askQuestion` — batch into one call
4. Create all work items in dependency order
5. Link dependencies and parent to Feature work item
6. Mark all as Committed
7. Report AB# IDs with dispatch order

**Pipeline**: ✅ Design → ✅ Plan → 📝 **Backlog** → ○ Dispatch → ○ Monitor
25 changes: 25 additions & 0 deletions feature-orchestrator-plugin/commands/feature-continue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
agent: feature-orchestrator-plugin:feature-orchestrator.agent
description: "Resume working on a feature from its current step"
---

# Continue Feature

Resume working on a feature from its current step.

1. Set state util path: `$su = Join-Path $HOME ".feature-orchestrator" "state-utils.js"`
2. Read feature state: `node $su list-features`
3. If multiple features exist, use `askQuestion` to let the user pick one
4. Read the selected feature: `node $su get-feature "<name>"`
4. Determine the current step and show pipeline progress:

| Step | Next Action |
|------|-------------|
| `designing` | Continue writing the design spec |
| `design_review` | Design is written — ask if approved or needs revision |
| `plan_review` | Plan is ready — ask if approved or needs revision |
| `backlog_review` | PBIs created — ask about dispatching |
| `monitoring` | Check PR statuses |
| `completed` | Feature is done! Show summary |

5. Resume from the appropriate phase
47 changes: 47 additions & 0 deletions feature-orchestrator-plugin/commands/feature-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
agent: feature-orchestrator-plugin:feature-orchestrator.agent
description: "Start a new feature: research the codebase and create a design spec"
---

# Design Phase

You are in the **Design** phase. The user will describe a feature below.

**First**: Read `.github/orchestrator-config.json` for project configuration.

**Step 0**: Register the feature in state:
```powershell
$su = Join-Path $HOME ".feature-orchestrator" "state-utils.js"
node $su add-feature '{"name": "<short feature name>", "step": "designing"}'
```

**Step 1**: Use the `codebase-researcher` skill to understand existing patterns.
Instruct it to return **comprehensive, detailed output** — your design depends on its findings.

**Step 2**: Write a design spec covering:
- Problem description and business context
- Requirements (functional + non-functional)
- Solution options (at least 2) with pseudo code and pros/cons
- Recommended solution with reasoning
- API surface changes (if applicable)
- Data flow across components
- Feature flag strategy
- Testing strategy
- Cross-repo impact

Save to the configured `design.docsPath` location.

**Step 3**: Present the design using `askQuestion`:
```
askQuestion({
question: "Design spec is ready. What would you like to do?",
options: [
{ label: "📖 Review locally", description: "Open in editor for inline review" },
{ label: "✅ Approve & plan PBIs", description: "Move to work item planning" },
{ label: "📋 Open draft PR", description: "Push as draft for team review" },
{ label: "✏️ Revise design", description: "Make changes first" }
]
})
```

**Pipeline**: 📝 **Design** → ○ Plan → ○ Backlog → ○ Dispatch → ○ Monitor
28 changes: 28 additions & 0 deletions feature-orchestrator-plugin/commands/feature-dispatch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
agent: feature-orchestrator-plugin:feature-orchestrator.agent
description: "Dispatch work items to GitHub Copilot coding agent for implementation"
---

# Dispatch Phase

You are in the **Dispatch** phase. Send work items to Copilot coding agent.

**First**: Read `.github/orchestrator-config.json` for repo slugs, base branches, and account types.

Use the `pbi-dispatcher` skill to:
1. Discover GitHub accounts (from developer config file or `gh auth status`)
2. Read work item details from ADO
3. Check dependencies — skip blocked items
4. For each ready item:
- Switch to correct `gh` account (based on repo's `accountType` from config)
- Dispatch via `gh agent-task create` with the full PBI description as prompt
- Include `Fixes AB#ID` in the prompt
5. Update ADO state (Active + agent-dispatched tag)
6. Update orchestrator state:
```powershell
$su = Join-Path $HOME ".feature-orchestrator" "state-utils.js"
node $su set-step "<feature>" monitoring
node $su add-agent-pr "<feature>" '{"repo":"...","prNumber":N,"prUrl":"...","status":"open"}'
```

**Pipeline**: ✅ Design → ✅ Plan → ✅ Backlog → 🚀 **Dispatch** → ○ Monitor
31 changes: 31 additions & 0 deletions feature-orchestrator-plugin/commands/feature-plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
agent: feature-orchestrator-plugin:feature-orchestrator.agent
description: "Decompose an approved design into repo-targeted work items"
---

# Plan Phase

You are in the **Plan** phase. Decompose the approved design into work items.

**First**: Read `.github/orchestrator-config.json` for repository routing and module definitions.

**Step 1**: Read the approved design spec (from the design phase or from the configured docs path).

**Step 2**: Use the `feature-planner` skill to break it into right-sized, self-contained work items:
- One per repo/module (use repo mapping from config)
- Each must be implementable from its description alone — the coding agent has no access to design docs
- Include: objective, context, technical requirements, acceptance criteria, files to modify
- Reference existing code patterns discovered during research

**Step 3**: Present the plan using `askQuestion`:
```
askQuestion({
question: "Work item plan is ready. What next?",
options: [
{ label: "✅ Create in ADO", description: "Create work items in Azure DevOps" },
{ label: "✏️ Revise plan", description: "Adjust the breakdown first" }
]
})
```

**Pipeline**: ✅ Design → 📋 **Plan** → ○ Backlog → ○ Dispatch → ○ Monitor
34 changes: 34 additions & 0 deletions feature-orchestrator-plugin/commands/feature-pr-iterate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
agent: feature-orchestrator-plugin:feature-orchestrator.agent
description: "Review a PR and iterate with Copilot coding agent"
---

# PR Iteration

Help review and iterate on a pull request from the Copilot coding agent.

**First**: Read `.github/orchestrator-config.json` for repo slug mapping.

1. Ask which PR to review (or detect from context/state)
2. Fetch PR details:
```powershell
gh pr view <number> --repo "<slug>" --json title,body,url,state,reviews,comments
gh pr diff <number> --repo "<slug>"
```
3. Fetch all review comments:
```powershell
gh api "/repos/<slug>/pulls/<number>/comments" --jq '.[].body'
```
4. Present findings and use `askQuestion`:
```
askQuestion({
question: "How would you like to handle this PR?",
options: [
{ label: "🤖 Delegate to Copilot", description: "Post @copilot comment with feedback" },
{ label: "📋 Analyze comments", description: "Show review comments with proposed resolutions" },
{ label: "✅ Approve", description: "Approve the PR" },
{ label: "🔄 Request changes", description: "Request specific changes" }
]
})
```
5. Execute the chosen action
28 changes: 28 additions & 0 deletions feature-orchestrator-plugin/commands/feature-status.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
agent: feature-orchestrator-plugin:feature-orchestrator.agent
description: "Check the status of agent-created pull requests"
---

# Monitor Phase

You are in the **Monitor** phase. Check PR status only.

**Do NOT** ask about creating PBIs, planning, or other phases. Just report status.

**First**: Read `.github/orchestrator-config.json` for repo slug mapping.

1. Set state util path: `$su = Join-Path $HOME ".feature-orchestrator" "state-utils.js"`
2. Read feature state: `node $su get-feature "<feature>"`
2. For each tracked PR in `artifacts.agentPrs`:
```powershell
gh pr view <prNumber> --repo "<slug from config>" --json state,title,url,statusCheckRollup,additions,deletions,changedFiles,isDraft
```
3. Present results in a table:

| PR | Repo | Title | Status | Checks | +/- Lines |
|----|------|-------|--------|--------|-----------|

4. Update state with latest PR statuses
5. Suggest: "Use `@copilot` in PR comments to iterate with the coding agent."

**Pipeline**: ✅ Design → ✅ Plan → ✅ Backlog → ✅ Dispatch → 📡 **Monitor**
Loading
Loading