relay-cc 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +428 -0
- package/agents/relay-codebase-mapper.md +761 -0
- package/agents/relay-debugger.md +1203 -0
- package/agents/relay-estimator.md +257 -0
- package/agents/relay-executor.md +823 -0
- package/agents/relay-plan-checker.md +812 -0
- package/agents/relay-planner.md +1418 -0
- package/agents/relay-reviewer.md +279 -0
- package/agents/relay-ticket-researcher.md +287 -0
- package/agents/relay-verifier.md +778 -0
- package/bin/install.js +1667 -0
- package/commands/relay/add-todo.md +193 -0
- package/commands/relay/check-todos.md +200 -0
- package/commands/relay/debug.md +169 -0
- package/commands/relay/estimate.md +182 -0
- package/commands/relay/help.md +328 -0
- package/commands/relay/history.md +203 -0
- package/commands/relay/map-codebase.md +71 -0
- package/commands/relay/pause-work.md +128 -0
- package/commands/relay/pr.md +223 -0
- package/commands/relay/quick.md +307 -0
- package/commands/relay/resume-work.md +40 -0
- package/commands/relay/resume.md +181 -0
- package/commands/relay/review.md +322 -0
- package/commands/relay/rollback.md +248 -0
- package/commands/relay/set-profile.md +116 -0
- package/commands/relay/settings.md +165 -0
- package/commands/relay/setup.md +247 -0
- package/commands/relay/status.md +131 -0
- package/commands/relay/tickets.md +106 -0
- package/commands/relay/update.md +200 -0
- package/commands/relay/work.md +398 -0
- package/hooks/dist/relay-check-update.js +61 -0
- package/hooks/dist/relay-statusline.js +91 -0
- package/package.json +47 -0
- package/relay/references/checkpoints.md +1078 -0
- package/relay/references/continuation-format.md +249 -0
- package/relay/references/git-integration.md +209 -0
- package/relay/references/model-profiles.md +57 -0
- package/relay/references/planning-config.md +189 -0
- package/relay/references/questioning.md +141 -0
- package/relay/references/tdd.md +263 -0
- package/relay/references/ui-brand.md +162 -0
- package/relay/references/verification-patterns.md +612 -0
- package/relay/templates/DEBUG.md +159 -0
- package/relay/templates/UAT.md +247 -0
- package/relay/templates/analysis.md +101 -0
- package/relay/templates/codebase/architecture.md +255 -0
- package/relay/templates/codebase/concerns.md +310 -0
- package/relay/templates/codebase/conventions.md +307 -0
- package/relay/templates/codebase/integrations.md +280 -0
- package/relay/templates/codebase/stack.md +186 -0
- package/relay/templates/codebase/structure.md +285 -0
- package/relay/templates/codebase/testing.md +480 -0
- package/relay/templates/config.json +40 -0
- package/relay/templates/context.md +283 -0
- package/relay/templates/continue-here.md +78 -0
- package/relay/templates/debug-subagent-prompt.md +91 -0
- package/relay/templates/estimate.md +108 -0
- package/relay/templates/phase-prompt.md +567 -0
- package/relay/templates/planner-subagent-prompt.md +117 -0
- package/relay/templates/research.md +552 -0
- package/relay/templates/state.md +127 -0
- package/relay/templates/summary.md +246 -0
- package/relay/templates/verification-report.md +322 -0
- package/relay/workflows/analyze-ticket.md +42 -0
- package/relay/workflows/diagnose-issues.md +231 -0
- package/relay/workflows/execute-phase.md +700 -0
- package/relay/workflows/execute-plan.md +1851 -0
- package/relay/workflows/map-codebase.md +357 -0
- package/relay/workflows/resume-project.md +307 -0
- package/relay/workflows/sync-ticket.md +58 -0
- package/relay/workflows/verify-phase.md +628 -0
- package/relay/workflows/verify-ticket.md +596 -0
- package/scripts/build-hooks.js +42 -0
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: relay:settings
|
|
3
|
+
description: Configure Relay workflow toggles and model profile
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Read
|
|
6
|
+
- Write
|
|
7
|
+
- AskUserQuestion
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
<objective>
|
|
11
|
+
Allow users to toggle workflow agents on/off and select model profile via interactive settings.
|
|
12
|
+
|
|
13
|
+
Updates `.relay/config.json` with workflow preferences and model profile selection.
|
|
14
|
+
</objective>
|
|
15
|
+
|
|
16
|
+
<process>
|
|
17
|
+
|
|
18
|
+
## 1. Ensure config exists
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
ls .relay/config.json 2>/dev/null
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
If `.relay/config.json` missing, create it with defaults:
|
|
25
|
+
```bash
|
|
26
|
+
mkdir -p .relay
|
|
27
|
+
```
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"model_profile": "balanced",
|
|
31
|
+
"workflow": {
|
|
32
|
+
"research": true,
|
|
33
|
+
"plan_check": true,
|
|
34
|
+
"verifier": true
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
Write this to `.relay/config.json`, then continue.
|
|
39
|
+
|
|
40
|
+
## 2. Read Current Config
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
cat .relay/config.json
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Parse current values (default to `true` if not present):
|
|
47
|
+
- `workflow.research` — spawn researcher during plan-phase
|
|
48
|
+
- `workflow.plan_check` — spawn plan checker during plan-phase
|
|
49
|
+
- `workflow.verifier` — spawn verifier during execute-phase
|
|
50
|
+
- `model_profile` — which model each agent uses (default: `balanced`)
|
|
51
|
+
- `git.branching_strategy` — branching approach (default: `"none"`)
|
|
52
|
+
- `integration.type` — connected ticket system (jira, github, azure_devops, or null)
|
|
53
|
+
- `integration.project_key` — project identifier for ticket system
|
|
54
|
+
|
|
55
|
+
## 3. Present Settings
|
|
56
|
+
|
|
57
|
+
Use AskUserQuestion with current values shown:
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
AskUserQuestion([
|
|
61
|
+
{
|
|
62
|
+
question: "Which model profile for agents?",
|
|
63
|
+
header: "Model",
|
|
64
|
+
multiSelect: false,
|
|
65
|
+
options: [
|
|
66
|
+
{ label: "Quality", description: "Opus everywhere except verification (highest cost)" },
|
|
67
|
+
{ label: "Balanced (Recommended)", description: "Opus for planning, Sonnet for execution/verification" },
|
|
68
|
+
{ label: "Budget", description: "Sonnet for writing, Haiku for research/verification (lowest cost)" }
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
question: "Spawn Plan Researcher? (researches domain before planning)",
|
|
73
|
+
header: "Research",
|
|
74
|
+
multiSelect: false,
|
|
75
|
+
options: [
|
|
76
|
+
{ label: "Yes", description: "Research phase goals before planning" },
|
|
77
|
+
{ label: "No", description: "Skip research, plan directly" }
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
question: "Spawn Plan Checker? (verifies plans before execution)",
|
|
82
|
+
header: "Plan Check",
|
|
83
|
+
multiSelect: false,
|
|
84
|
+
options: [
|
|
85
|
+
{ label: "Yes", description: "Verify plans meet phase goals" },
|
|
86
|
+
{ label: "No", description: "Skip plan verification" }
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
question: "Spawn Execution Verifier? (verifies phase completion)",
|
|
91
|
+
header: "Verifier",
|
|
92
|
+
multiSelect: false,
|
|
93
|
+
options: [
|
|
94
|
+
{ label: "Yes", description: "Verify must-haves after execution" },
|
|
95
|
+
{ label: "No", description: "Skip post-execution verification" }
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
question: "Git branching strategy?",
|
|
100
|
+
header: "Branching",
|
|
101
|
+
multiSelect: false,
|
|
102
|
+
options: [
|
|
103
|
+
{ label: "None (Recommended)", description: "Commit directly to current branch" },
|
|
104
|
+
{ label: "Per Phase", description: "Create branch for each phase (relay/phase-{N}-{name})" },
|
|
105
|
+
{ label: "Per Ticket", description: "Create branch for each ticket ({ticket_id}/{slug})" }
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
])
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
**Pre-select based on current config values.**
|
|
112
|
+
|
|
113
|
+
## 4. Update Config
|
|
114
|
+
|
|
115
|
+
Merge new settings into existing config.json:
|
|
116
|
+
|
|
117
|
+
```json
|
|
118
|
+
{
|
|
119
|
+
...existing_config,
|
|
120
|
+
"model_profile": "quality" | "balanced" | "budget",
|
|
121
|
+
"workflow": {
|
|
122
|
+
"research": true/false,
|
|
123
|
+
"plan_check": true/false,
|
|
124
|
+
"verifier": true/false
|
|
125
|
+
},
|
|
126
|
+
"git": {
|
|
127
|
+
"branching_strategy": "none" | "phase" | "ticket"
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Write updated config to `.relay/config.json`.
|
|
133
|
+
|
|
134
|
+
## 5. Confirm Changes
|
|
135
|
+
|
|
136
|
+
Display:
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
140
|
+
Relay ► SETTINGS UPDATED
|
|
141
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
142
|
+
|
|
143
|
+
| Setting | Value |
|
|
144
|
+
|----------------------|-------|
|
|
145
|
+
| Model Profile | {quality/balanced/budget} |
|
|
146
|
+
| Plan Researcher | {On/Off} |
|
|
147
|
+
| Plan Checker | {On/Off} |
|
|
148
|
+
| Execution Verifier | {On/Off} |
|
|
149
|
+
| Git Branching | {None/Per Phase/Per Ticket} |
|
|
150
|
+
|
|
151
|
+
These settings apply to future `/relay:work` runs.
|
|
152
|
+
|
|
153
|
+
Quick commands:
|
|
154
|
+
- /relay:set-profile <profile> — switch model profile
|
|
155
|
+
- /relay:setup — reconfigure integration
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
</process>
|
|
159
|
+
|
|
160
|
+
<success_criteria>
|
|
161
|
+
- [ ] Current config read
|
|
162
|
+
- [ ] User presented with 5 settings (profile + 3 workflow toggles + git branching)
|
|
163
|
+
- [ ] Config updated with model_profile, workflow, and git sections
|
|
164
|
+
- [ ] Changes confirmed to user
|
|
165
|
+
</success_criteria>
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: relay:setup
|
|
3
|
+
description: Configure Relay for your project — detect integrations, map codebase, initialize .relay/
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Read
|
|
6
|
+
- Write
|
|
7
|
+
- Bash
|
|
8
|
+
- Glob
|
|
9
|
+
- Grep
|
|
10
|
+
- Task
|
|
11
|
+
- AskUserQuestion
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
<objective>
|
|
15
|
+
Initialize Relay for the current project. Detects available MCP integrations (Jira, GitHub Issues, Azure DevOps), configures the project, maps the codebase, and creates `.relay/` directory structure.
|
|
16
|
+
|
|
17
|
+
This replaces the old `/relay:new-project` command with a ticket-driven setup flow.
|
|
18
|
+
</objective>
|
|
19
|
+
|
|
20
|
+
<process>
|
|
21
|
+
|
|
22
|
+
## 1. Check Existing Setup
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
test -f .relay/config.json && echo "exists" || echo "missing"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
**If `.relay/config.json` exists:**
|
|
29
|
+
|
|
30
|
+
Read current config and offer options:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
AskUserQuestion(
|
|
34
|
+
header: "Setup",
|
|
35
|
+
question: "Relay is already configured for this project. What would you like to do?",
|
|
36
|
+
options: [
|
|
37
|
+
{ label: "Reconfigure", description: "Update integration settings and refresh config" },
|
|
38
|
+
{ label: "Cancel", description: "Keep current configuration" }
|
|
39
|
+
]
|
|
40
|
+
)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
If "Cancel", STOP.
|
|
44
|
+
|
|
45
|
+
## 2. Detect Available MCP Integrations
|
|
46
|
+
|
|
47
|
+
Probe for available MCP tools by checking what's available:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# Check for Jira MCP tools
|
|
51
|
+
echo "Checking integrations..."
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Check for these MCP tool patterns (use tool availability, not execution):
|
|
55
|
+
- `mcp__jira__*` → Jira integration available
|
|
56
|
+
- `mcp__github__*` → GitHub Issues integration available
|
|
57
|
+
- `mcp__azure_devops__*` → Azure DevOps integration available
|
|
58
|
+
|
|
59
|
+
Report what was detected.
|
|
60
|
+
|
|
61
|
+
## 3. Configure Integration
|
|
62
|
+
|
|
63
|
+
Based on detected MCP tools, ask user to confirm:
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
AskUserQuestion(
|
|
67
|
+
header: "Integration",
|
|
68
|
+
question: "Which ticket system should Relay connect to?",
|
|
69
|
+
options: [
|
|
70
|
+
{ label: "Jira", description: "Connect via Jira MCP server" },
|
|
71
|
+
{ label: "GitHub Issues", description: "Connect via GitHub MCP server" },
|
|
72
|
+
{ label: "Azure DevOps", description: "Connect via Azure DevOps MCP server" },
|
|
73
|
+
{ label: "None", description: "Use Relay without external ticket system" }
|
|
74
|
+
]
|
|
75
|
+
)
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
If an integration is selected, ask for the project key:
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
AskUserQuestion(
|
|
82
|
+
header: "Project",
|
|
83
|
+
question: "What is your project key? (e.g., PROJ for Jira, owner/repo for GitHub)",
|
|
84
|
+
options: [
|
|
85
|
+
{ label: "Enter key", description: "Provide your project identifier" }
|
|
86
|
+
]
|
|
87
|
+
)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## 4. Detect Existing Code
|
|
91
|
+
|
|
92
|
+
Check if this is a brownfield project:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
# Count source files (exclude node_modules, .git, etc.)
|
|
96
|
+
find . -type f \( -name "*.js" -o -name "*.ts" -o -name "*.py" -o -name "*.go" -o -name "*.rs" -o -name "*.java" -o -name "*.rb" -o -name "*.php" -o -name "*.cs" -o -name "*.swift" -o -name "*.kt" \) ! -path "*/node_modules/*" ! -path "*/.git/*" ! -path "*/vendor/*" ! -path "*/dist/*" ! -path "*/build/*" 2>/dev/null | wc -l
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
If source files > 0, offer codebase mapping:
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
AskUserQuestion(
|
|
103
|
+
header: "Codebase",
|
|
104
|
+
question: "Existing code detected. Map the codebase for better analysis?",
|
|
105
|
+
options: [
|
|
106
|
+
{ label: "Yes (Recommended)", description: "Run parallel codebase mappers to understand the project" },
|
|
107
|
+
{ label: "Skip", description: "Set up without codebase mapping" }
|
|
108
|
+
]
|
|
109
|
+
)
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## 5. Create `.relay/` Structure
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
mkdir -p .relay/tickets
|
|
116
|
+
mkdir -p .relay/codebase
|
|
117
|
+
mkdir -p .relay/debug
|
|
118
|
+
mkdir -p .relay/quick
|
|
119
|
+
mkdir -p .relay/todos/pending
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## 6. Write Config
|
|
123
|
+
|
|
124
|
+
Write `.relay/config.json` with detected settings:
|
|
125
|
+
|
|
126
|
+
```json
|
|
127
|
+
{
|
|
128
|
+
"mode": "interactive",
|
|
129
|
+
"depth": "standard",
|
|
130
|
+
"integration": {
|
|
131
|
+
"type": "{jira|github|azure_devops|null}",
|
|
132
|
+
"project_key": "{project_key|null}",
|
|
133
|
+
"mcp_server": "{mcp_server_name|null}"
|
|
134
|
+
},
|
|
135
|
+
"workflow": {
|
|
136
|
+
"research": true,
|
|
137
|
+
"plan_check": true,
|
|
138
|
+
"verifier": true
|
|
139
|
+
},
|
|
140
|
+
"planning": {
|
|
141
|
+
"commit_docs": true,
|
|
142
|
+
"search_gitignored": false
|
|
143
|
+
},
|
|
144
|
+
"parallelization": {
|
|
145
|
+
"enabled": true,
|
|
146
|
+
"plan_level": true,
|
|
147
|
+
"task_level": false,
|
|
148
|
+
"skip_checkpoints": true,
|
|
149
|
+
"max_concurrent_agents": 3,
|
|
150
|
+
"min_plans_for_parallel": 2
|
|
151
|
+
},
|
|
152
|
+
"gates": {
|
|
153
|
+
"confirm_analysis": true,
|
|
154
|
+
"confirm_plan": true,
|
|
155
|
+
"confirm_execution": true,
|
|
156
|
+
"confirm_sync": true,
|
|
157
|
+
"issues_review": true
|
|
158
|
+
},
|
|
159
|
+
"git": {
|
|
160
|
+
"ticket_branch_template": "{ticket_id}/{slug}"
|
|
161
|
+
},
|
|
162
|
+
"safety": {
|
|
163
|
+
"always_confirm_destructive": true,
|
|
164
|
+
"always_confirm_external_services": true
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## 7. Write STATE.md
|
|
170
|
+
|
|
171
|
+
Write `.relay/STATE.md` from template:
|
|
172
|
+
|
|
173
|
+
```markdown
|
|
174
|
+
# Relay State
|
|
175
|
+
|
|
176
|
+
## Active Ticket
|
|
177
|
+
|
|
178
|
+
**Ticket:** None
|
|
179
|
+
**Branch:** —
|
|
180
|
+
**Stage:** —
|
|
181
|
+
**Started:** —
|
|
182
|
+
|
|
183
|
+
## Recent Tickets
|
|
184
|
+
|
|
185
|
+
| Ticket | Title | Status | Branch | Completed |
|
|
186
|
+
|--------|-------|--------|--------|-----------|
|
|
187
|
+
|
|
188
|
+
## Velocity Metrics
|
|
189
|
+
|
|
190
|
+
**Completed:** 0 tickets
|
|
191
|
+
**Average duration:** —
|
|
192
|
+
**Recent trend:** —
|
|
193
|
+
|
|
194
|
+
## Session Continuity
|
|
195
|
+
|
|
196
|
+
Last session: {current date}
|
|
197
|
+
Stopped at: Initial setup
|
|
198
|
+
Resume file: None
|
|
199
|
+
|
|
200
|
+
## Pending Todos
|
|
201
|
+
|
|
202
|
+
None yet.
|
|
203
|
+
|
|
204
|
+
## Blockers/Concerns
|
|
205
|
+
|
|
206
|
+
None yet.
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
## 8. Run Codebase Mapping (if selected)
|
|
210
|
+
|
|
211
|
+
If user opted for codebase mapping:
|
|
212
|
+
|
|
213
|
+
```
|
|
214
|
+
SlashCommand("relay:map-codebase")
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
## 9. Display Completion
|
|
218
|
+
|
|
219
|
+
```
|
|
220
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
221
|
+
Relay ► SETUP COMPLETE
|
|
222
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
223
|
+
|
|
224
|
+
| Setting | Value |
|
|
225
|
+
|--------------------|--------------------------------|
|
|
226
|
+
| Integration | {type or "None"} |
|
|
227
|
+
| Project Key | {key or "—"} |
|
|
228
|
+
| Codebase Mapped | {Yes/No} |
|
|
229
|
+
|
|
230
|
+
## Next Steps
|
|
231
|
+
|
|
232
|
+
- `/relay:tickets` — browse available tickets
|
|
233
|
+
- `/relay:work <ticket-id>` — start working on a ticket
|
|
234
|
+
- `/relay:settings` — adjust workflow settings
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
</process>
|
|
238
|
+
|
|
239
|
+
<success_criteria>
|
|
240
|
+
- [ ] MCP integrations detected
|
|
241
|
+
- [ ] Integration type and project key configured
|
|
242
|
+
- [ ] `.relay/` directory structure created
|
|
243
|
+
- [ ] `config.json` written with integration settings
|
|
244
|
+
- [ ] `STATE.md` initialized
|
|
245
|
+
- [ ] Codebase mapping offered for brownfield projects
|
|
246
|
+
- [ ] User knows next steps (`/relay:tickets` or `/relay:work`)
|
|
247
|
+
</success_criteria>
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: relay:status
|
|
3
|
+
description: Show current Relay status — active ticket, recent work, and next actions
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Read
|
|
6
|
+
- Bash
|
|
7
|
+
- Grep
|
|
8
|
+
- Glob
|
|
9
|
+
- SlashCommand
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<objective>
|
|
13
|
+
Show the current state of Relay for this project: active ticket progress, recent tickets, and routing to the next action.
|
|
14
|
+
|
|
15
|
+
Provides situational awareness before continuing work.
|
|
16
|
+
</objective>
|
|
17
|
+
|
|
18
|
+
<process>
|
|
19
|
+
|
|
20
|
+
<step name="verify">
|
|
21
|
+
**Verify Relay structure exists:**
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
test -d .relay && echo "exists" || echo "missing"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
If no `.relay/` directory:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
No Relay setup found.
|
|
31
|
+
|
|
32
|
+
Run /relay:setup to initialize Relay for this project.
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
STOP.
|
|
36
|
+
|
|
37
|
+
If missing STATE.md: suggest `/relay:setup`.
|
|
38
|
+
</step>
|
|
39
|
+
|
|
40
|
+
<step name="load">
|
|
41
|
+
**Load project context:**
|
|
42
|
+
|
|
43
|
+
- Read `.relay/STATE.md` for current state
|
|
44
|
+
- Read `.relay/config.json` for settings
|
|
45
|
+
</step>
|
|
46
|
+
|
|
47
|
+
<step name="active_ticket">
|
|
48
|
+
**Check active ticket:**
|
|
49
|
+
|
|
50
|
+
From STATE.md, extract:
|
|
51
|
+
- Active ticket ID and title
|
|
52
|
+
- Current stage (FETCHING, ANALYZING, PLANNING, EXECUTING, VERIFYING, SYNCING)
|
|
53
|
+
- Branch name
|
|
54
|
+
- When started
|
|
55
|
+
|
|
56
|
+
If active ticket exists, read its artifacts:
|
|
57
|
+
```bash
|
|
58
|
+
ls .relay/tickets/${TICKET_ID}/ 2>/dev/null
|
|
59
|
+
```
|
|
60
|
+
</step>
|
|
61
|
+
|
|
62
|
+
<step name="recent">
|
|
63
|
+
**Gather recent work:**
|
|
64
|
+
|
|
65
|
+
- Read recent tickets table from STATE.md
|
|
66
|
+
- Count pending todos: `ls .relay/todos/pending/*.md 2>/dev/null | wc -l`
|
|
67
|
+
- Check for active debug sessions: `ls .relay/debug/*.md 2>/dev/null | grep -v resolved | wc -l`
|
|
68
|
+
</step>
|
|
69
|
+
|
|
70
|
+
<step name="report">
|
|
71
|
+
**Present status report:**
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
75
|
+
Relay ► STATUS
|
|
76
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
77
|
+
|
|
78
|
+
## Active Ticket
|
|
79
|
+
|
|
80
|
+
{TICKET_ID}: {title}
|
|
81
|
+
Stage: {ANALYZING | PLANNING | EXECUTING | VERIFYING}
|
|
82
|
+
Branch: {branch_name}
|
|
83
|
+
Started: {date}
|
|
84
|
+
|
|
85
|
+
## Recent Tickets
|
|
86
|
+
|
|
87
|
+
| Ticket | Title | Status | Completed |
|
|
88
|
+
|--------|-------|--------|-----------|
|
|
89
|
+
| {id} | {title} | {done/verified} | {date} |
|
|
90
|
+
|
|
91
|
+
## Velocity
|
|
92
|
+
|
|
93
|
+
Completed: {N} tickets
|
|
94
|
+
Average: {duration}
|
|
95
|
+
|
|
96
|
+
## Pending Todos
|
|
97
|
+
|
|
98
|
+
{count} pending — /relay:check-todos to review
|
|
99
|
+
|
|
100
|
+
## Active Debug Sessions
|
|
101
|
+
|
|
102
|
+
{count} active — /relay:debug to continue
|
|
103
|
+
(Only show this section if count > 0)
|
|
104
|
+
```
|
|
105
|
+
</step>
|
|
106
|
+
|
|
107
|
+
<step name="route">
|
|
108
|
+
**Route to next action:**
|
|
109
|
+
|
|
110
|
+
| State | Suggestion |
|
|
111
|
+
|-------|-----------|
|
|
112
|
+
| Active ticket in progress | `/relay:work {ID}` to resume |
|
|
113
|
+
| No active ticket | `/relay:tickets` to browse, `/relay:work <id>` to start |
|
|
114
|
+
| Paused ticket (.continue-here exists) | `/relay:resume-work` to continue |
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
## Next Steps
|
|
118
|
+
|
|
119
|
+
{context-appropriate suggestion}
|
|
120
|
+
```
|
|
121
|
+
</step>
|
|
122
|
+
|
|
123
|
+
</process>
|
|
124
|
+
|
|
125
|
+
<success_criteria>
|
|
126
|
+
- [ ] Current state loaded from STATE.md
|
|
127
|
+
- [ ] Active ticket shown with stage
|
|
128
|
+
- [ ] Recent tickets displayed
|
|
129
|
+
- [ ] Smart routing to next action
|
|
130
|
+
- [ ] User knows what to do next
|
|
131
|
+
</success_criteria>
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: relay:tickets
|
|
3
|
+
description: Browse and select tickets from your connected ticket system
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Read
|
|
6
|
+
- Bash
|
|
7
|
+
- Grep
|
|
8
|
+
- AskUserQuestion
|
|
9
|
+
- mcp__jira__search
|
|
10
|
+
- mcp__jira__get_issue
|
|
11
|
+
- mcp__github__search_issues
|
|
12
|
+
- mcp__github__get_issue
|
|
13
|
+
- mcp__azure_devops__get_work_items
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
<objective>
|
|
17
|
+
Fetch and display tickets from the configured external ticket system (Jira, GitHub Issues, or Azure DevOps) via MCP tools.
|
|
18
|
+
|
|
19
|
+
Presents a formatted table of available tickets and suggests `/relay:work <id>` to start working.
|
|
20
|
+
</objective>
|
|
21
|
+
|
|
22
|
+
<context>
|
|
23
|
+
@.relay/config.json
|
|
24
|
+
@.relay/STATE.md
|
|
25
|
+
</context>
|
|
26
|
+
|
|
27
|
+
<process>
|
|
28
|
+
|
|
29
|
+
## 1. Read Configuration
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
cat .relay/config.json 2>/dev/null || echo "missing"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
If config missing:
|
|
36
|
+
```
|
|
37
|
+
No Relay configuration found. Run `/relay:setup` first.
|
|
38
|
+
```
|
|
39
|
+
STOP.
|
|
40
|
+
|
|
41
|
+
Extract integration settings:
|
|
42
|
+
- `integration.type` — jira, github, azure_devops, or null
|
|
43
|
+
- `integration.project_key` — project identifier
|
|
44
|
+
- `integration.mcp_server` — MCP server name
|
|
45
|
+
|
|
46
|
+
If `integration.type` is null:
|
|
47
|
+
```
|
|
48
|
+
No ticket system configured. Run `/relay:setup` to connect one,
|
|
49
|
+
or use `/relay:work` directly with a ticket description.
|
|
50
|
+
```
|
|
51
|
+
STOP.
|
|
52
|
+
|
|
53
|
+
## 2. Fetch Tickets
|
|
54
|
+
|
|
55
|
+
Based on integration type, fetch open tickets:
|
|
56
|
+
|
|
57
|
+
**Jira:**
|
|
58
|
+
Use `mcp__jira__search` with JQL:
|
|
59
|
+
```
|
|
60
|
+
project = {project_key} AND status NOT IN (Done, Closed) ORDER BY priority DESC, updated DESC
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**GitHub Issues:**
|
|
64
|
+
Use `mcp__github__search_issues` with:
|
|
65
|
+
```
|
|
66
|
+
repo:{project_key} state:open sort:updated-desc
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**Azure DevOps:**
|
|
70
|
+
Use `mcp__azure_devops__get_work_items` with query for open items in the project.
|
|
71
|
+
|
|
72
|
+
## 3. Display Tickets
|
|
73
|
+
|
|
74
|
+
Format as a table:
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
78
|
+
Relay ► TICKETS
|
|
79
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
80
|
+
|
|
81
|
+
| ID | Title | Type | Priority | Assignee |
|
|
82
|
+
|----|-------|------|----------|----------|
|
|
83
|
+
| {id} | {title} | {type} | {priority} | {assignee} |
|
|
84
|
+
...
|
|
85
|
+
|
|
86
|
+
Showing {N} open tickets from {project_key}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## 4. Suggest Next Action
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
## Next Steps
|
|
93
|
+
|
|
94
|
+
`/relay:work <ticket-id>` — start working on a ticket
|
|
95
|
+
|
|
96
|
+
Example: `/relay:work PROJ-123`
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
</process>
|
|
100
|
+
|
|
101
|
+
<success_criteria>
|
|
102
|
+
- [ ] Config read and integration type detected
|
|
103
|
+
- [ ] Tickets fetched from external system via MCP
|
|
104
|
+
- [ ] Formatted table displayed
|
|
105
|
+
- [ ] User directed to `/relay:work <id>`
|
|
106
|
+
</success_criteria>
|