@specforge/mcp 3.0.7 → 3.1.1
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/dist/autopilot/agents/agent-runner.d.ts.map +1 -1
- package/dist/autopilot/agents/agent-runner.js +7 -0
- package/dist/autopilot/agents/agent-runner.js.map +1 -1
- package/dist/autopilot/api/autopilot-api-client.d.ts +5 -4
- package/dist/autopilot/api/autopilot-api-client.d.ts.map +1 -1
- package/dist/autopilot/api/autopilot-api-client.js +21 -26
- package/dist/autopilot/api/autopilot-api-client.js.map +1 -1
- package/dist/autopilot/cli/run.d.ts.map +1 -1
- package/dist/autopilot/cli/run.js +28 -0
- package/dist/autopilot/cli/run.js.map +1 -1
- package/dist/autopilot/core/dependency-resolver.d.ts +10 -1
- package/dist/autopilot/core/dependency-resolver.d.ts.map +1 -1
- package/dist/autopilot/core/dependency-resolver.js +27 -1
- package/dist/autopilot/core/dependency-resolver.js.map +1 -1
- package/dist/autopilot/core/dispatcher.d.ts +26 -0
- package/dist/autopilot/core/dispatcher.d.ts.map +1 -1
- package/dist/autopilot/core/dispatcher.js +116 -6
- package/dist/autopilot/core/dispatcher.js.map +1 -1
- package/dist/autopilot/readiness/aggregation.d.ts +56 -0
- package/dist/autopilot/readiness/aggregation.d.ts.map +1 -0
- package/dist/autopilot/readiness/aggregation.js +94 -0
- package/dist/autopilot/readiness/aggregation.js.map +1 -0
- package/dist/autopilot/readiness/config.d.ts +15 -0
- package/dist/autopilot/readiness/config.d.ts.map +1 -0
- package/dist/autopilot/readiness/config.js +76 -0
- package/dist/autopilot/readiness/config.js.map +1 -0
- package/dist/autopilot/readiness/index.d.ts +16 -0
- package/dist/autopilot/readiness/index.d.ts.map +1 -0
- package/dist/autopilot/readiness/index.js +11 -0
- package/dist/autopilot/readiness/index.js.map +1 -0
- package/dist/autopilot/readiness/post-scoring.d.ts +28 -0
- package/dist/autopilot/readiness/post-scoring.d.ts.map +1 -0
- package/dist/autopilot/readiness/post-scoring.js +41 -0
- package/dist/autopilot/readiness/post-scoring.js.map +1 -0
- package/dist/autopilot/readiness/preflight.d.ts +36 -0
- package/dist/autopilot/readiness/preflight.d.ts.map +1 -0
- package/dist/autopilot/readiness/preflight.js +93 -0
- package/dist/autopilot/readiness/preflight.js.map +1 -0
- package/dist/autopilot/readiness/prompt-section.d.ts +19 -0
- package/dist/autopilot/readiness/prompt-section.d.ts.map +1 -0
- package/dist/autopilot/readiness/prompt-section.js +33 -0
- package/dist/autopilot/readiness/prompt-section.js.map +1 -0
- package/dist/autopilot/readiness/types.d.ts +25 -0
- package/dist/autopilot/readiness/types.d.ts.map +1 -0
- package/dist/autopilot/readiness/types.js +8 -0
- package/dist/autopilot/readiness/types.js.map +1 -0
- package/dist/autopilot/sync/sync-manager.d.ts.map +1 -1
- package/dist/autopilot/sync/sync-manager.js +2 -1
- package/dist/autopilot/sync/sync-manager.js.map +1 -1
- package/dist/autopilot/types.d.ts +28 -0
- package/dist/autopilot/types.d.ts.map +1 -1
- package/dist/autopilot/types.js.map +1 -1
- package/dist/cli/commands/index.d.ts +5 -0
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +5 -0
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +184 -2
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/init.types.d.ts +37 -0
- package/dist/cli/commands/init.types.d.ts.map +1 -1
- package/dist/cli/commands/init.types.js +18 -0
- package/dist/cli/commands/init.types.js.map +1 -1
- package/dist/cli/commands/plan.d.ts +18 -0
- package/dist/cli/commands/plan.d.ts.map +1 -0
- package/dist/cli/commands/plan.js +154 -0
- package/dist/cli/commands/plan.js.map +1 -0
- package/dist/cli/commands/plan.types.d.ts +60 -0
- package/dist/cli/commands/plan.types.d.ts.map +1 -0
- package/dist/cli/commands/plan.types.js +8 -0
- package/dist/cli/commands/plan.types.js.map +1 -0
- package/dist/cli/commands/review-implementation.d.ts +16 -0
- package/dist/cli/commands/review-implementation.d.ts.map +1 -0
- package/dist/cli/commands/review-implementation.js +226 -0
- package/dist/cli/commands/review-implementation.js.map +1 -0
- package/dist/cli/commands/review-planning.d.ts +15 -0
- package/dist/cli/commands/review-planning.d.ts.map +1 -0
- package/dist/cli/commands/review-planning.js +177 -0
- package/dist/cli/commands/review-planning.js.map +1 -0
- package/dist/cli/commands/score/display.d.ts +20 -0
- package/dist/cli/commands/score/display.d.ts.map +1 -0
- package/dist/cli/commands/score/display.js +111 -0
- package/dist/cli/commands/score/display.js.map +1 -0
- package/dist/cli/commands/score/index.d.ts +9 -0
- package/dist/cli/commands/score/index.d.ts.map +1 -0
- package/dist/cli/commands/score/index.js +12 -0
- package/dist/cli/commands/score/index.js.map +1 -0
- package/dist/cli/commands/score/score.d.ts +17 -0
- package/dist/cli/commands/score/score.d.ts.map +1 -0
- package/dist/cli/commands/score/score.js +144 -0
- package/dist/cli/commands/score/score.js.map +1 -0
- package/dist/cli/commands/score/types.d.ts +79 -0
- package/dist/cli/commands/score/types.d.ts.map +1 -0
- package/dist/cli/commands/score/types.js +51 -0
- package/dist/cli/commands/score/types.js.map +1 -0
- package/dist/cli/commands/spec-activate.d.ts +29 -0
- package/dist/cli/commands/spec-activate.d.ts.map +1 -0
- package/dist/cli/commands/spec-activate.js +155 -0
- package/dist/cli/commands/spec-activate.js.map +1 -0
- package/dist/cli/commands/spec-activate.types.d.ts +24 -0
- package/dist/cli/commands/spec-activate.types.d.ts.map +1 -0
- package/dist/cli/commands/spec-activate.types.js +8 -0
- package/dist/cli/commands/spec-activate.types.js.map +1 -0
- package/dist/cli/commands/status.d.ts.map +1 -1
- package/dist/cli/commands/status.js +89 -1
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/status.types.d.ts +2 -0
- package/dist/cli/commands/status.types.d.ts.map +1 -1
- package/dist/cli/commands/status.types.js.map +1 -1
- package/dist/cli/config/agent-teams.types.d.ts +194 -0
- package/dist/cli/config/agent-teams.types.d.ts.map +1 -0
- package/dist/cli/config/agent-teams.types.js +36 -0
- package/dist/cli/config/agent-teams.types.js.map +1 -0
- package/dist/cli/config/index.d.ts +2 -0
- package/dist/cli/config/index.d.ts.map +1 -1
- package/dist/cli/config/index.js +2 -0
- package/dist/cli/config/index.js.map +1 -1
- package/dist/cli/config/loader.d.ts +36 -2
- package/dist/cli/config/loader.d.ts.map +1 -1
- package/dist/cli/config/loader.js +65 -0
- package/dist/cli/config/loader.js.map +1 -1
- package/dist/cli/config/validation.d.ts +69 -0
- package/dist/cli/config/validation.d.ts.map +1 -0
- package/dist/cli/config/validation.js +295 -0
- package/dist/cli/config/validation.js.map +1 -0
- package/dist/cli/config/writer.d.ts +39 -0
- package/dist/cli/config/writer.d.ts.map +1 -1
- package/dist/cli/config/writer.js +58 -0
- package/dist/cli/config/writer.js.map +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +10 -8
- package/dist/cli/index.js.map +1 -1
- package/dist/lib/index.d.ts +3 -0
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +3 -0
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/monorepo-detector.d.ts +31 -0
- package/dist/lib/monorepo-detector.d.ts.map +1 -0
- package/dist/lib/monorepo-detector.js +271 -0
- package/dist/lib/monorepo-detector.js.map +1 -0
- package/dist/lib/prompt-generator.d.ts +65 -0
- package/dist/lib/prompt-generator.d.ts.map +1 -0
- package/dist/lib/prompt-generator.js +174 -0
- package/dist/lib/prompt-generator.js.map +1 -0
- package/dist/lib/strategy-analyzer.d.ts +59 -0
- package/dist/lib/strategy-analyzer.d.ts.map +1 -0
- package/dist/lib/strategy-analyzer.js +137 -0
- package/dist/lib/strategy-analyzer.js.map +1 -0
- package/dist/tools/core/context-helper.d.ts +22 -0
- package/dist/tools/core/context-helper.d.ts.map +1 -1
- package/dist/tools/core/context-helper.js +37 -1
- package/dist/tools/core/context-helper.js.map +1 -1
- package/dist/tools/core/workspace-files.d.ts +49 -0
- package/dist/tools/core/workspace-files.d.ts.map +1 -0
- package/dist/tools/core/workspace-files.js +259 -0
- package/dist/tools/core/workspace-files.js.map +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +147 -0
- package/dist/tools/index.js.map +1 -1
- package/package.json +3 -2
- package/src/cli/templates/agents/content/core/sfag-implementer.ts +113 -0
- package/src/cli/templates/agents/content/core/sfag-orchestrator.ts +107 -0
- package/src/cli/templates/agents/content/core/sfag-spec-creator.ts +126 -0
- package/src/cli/templates/agents/content/core/sfag-ticket-implementer.ts +132 -0
- package/src/cli/templates/agents/content/research/sfag-package-researcher.ts +153 -0
- package/src/cli/templates/agents/content/task-type/sfag-api-implementer.ts +132 -0
- package/src/cli/templates/agents/content/task-type/sfag-docs-writer.ts +183 -0
- package/src/cli/templates/agents/content/task-type/sfag-frontend-builder.ts +141 -0
- package/src/cli/templates/agents/content/task-type/sfag-infra-architect.ts +149 -0
- package/src/cli/templates/agents/content/task-type/sfag-schema-designer.ts +132 -0
- package/src/cli/templates/agents/content/task-type/sfag-test-writer.ts +171 -0
- package/src/cli/templates/agents/index.ts +74 -0
- package/src/cli/templates/commands.ts +179 -0
- package/src/cli/templates/content/sf-autonomous.ts +78 -0
- package/src/cli/templates/content/sf-blockers.ts +68 -0
- package/src/cli/templates/content/sf-commit.ts +78 -0
- package/src/cli/templates/content/sf-context.ts +64 -0
- package/src/cli/templates/content/sf-create-epics.ts +129 -0
- package/src/cli/templates/content/sf-create-spec.ts +136 -0
- package/src/cli/templates/content/sf-create-tickets.ts +148 -0
- package/src/cli/templates/content/sf-epic.ts +69 -0
- package/src/cli/templates/content/sf-help.ts +61 -0
- package/src/cli/templates/content/sf-import.ts +88 -0
- package/src/cli/templates/content/sf-init.ts +61 -0
- package/src/cli/templates/content/sf-next.ts +67 -0
- package/src/cli/templates/content/sf-reset.ts +78 -0
- package/src/cli/templates/content/sf-review.ts +67 -0
- package/src/cli/templates/content/sf-search.ts +64 -0
- package/src/cli/templates/content/sf-status.ts +67 -0
- package/src/cli/templates/content/sf-ticket.ts +76 -0
- package/src/cli/templates/content/sf-validate.ts +78 -0
- package/src/cli/templates/index.ts +16 -0
- package/src/cli/templates/skills/specforge-conventions.md +109 -0
- package/src/cli/templates/skills/specforge-orchestrator.md +401 -0
- package/src/cli/templates/skills/specforge-validator.md +122 -0
- package/src/cli/templates/skills/specforge-worker.md +378 -0
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
# SpecForge Worker Execution Protocol
|
|
2
|
+
|
|
3
|
+
You are a SpecForge worker agent — responsible for implementing tickets from a specification. You receive a fresh context window scoped to a single ticket (or a small batch). This file is your complete protocol. Follow it exactly.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
You have been spawned by the SpecForge Orchestrator (team lead) to implement one or more tickets from a SpecForge specification. Follow the 9-step cycle below for each ticket.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 9-Step Execution Cycle
|
|
12
|
+
|
|
13
|
+
### Step 1: CLAIM
|
|
14
|
+
|
|
15
|
+
Find your next ticket to work on.
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
1. Check your task list for an unblocked task assigned to you
|
|
19
|
+
2. If no task is pre-assigned:
|
|
20
|
+
Call: get_next_actionable_tickets({ specificationId })
|
|
21
|
+
→ Returns tickets with status "ready" (all dependencies satisfied)
|
|
22
|
+
3. Pick the highest-priority ready ticket
|
|
23
|
+
4. If no ready tickets exist, message team lead: "No ready tickets — idle"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Step 2: START
|
|
27
|
+
|
|
28
|
+
Mark the ticket as active so no other worker claims it.
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
Call: start_work_session({ ticketId })
|
|
32
|
+
→ Transitions ticket from ready → active
|
|
33
|
+
→ Returns error if ticket is pending (dependencies not met)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
If `start_work_session` returns an error, the ticket is not ready. Go back to Step 1 and pick a different ticket.
|
|
37
|
+
|
|
38
|
+
### Step 3: CONTEXT
|
|
39
|
+
|
|
40
|
+
Load everything you need to implement the ticket.
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
1. Call: get_implementation_context({ ticketId, depth: "full" })
|
|
44
|
+
→ Returns: ticket details, acceptance criteria, implementation guide,
|
|
45
|
+
epic context, spec patterns, blocker info
|
|
46
|
+
|
|
47
|
+
2. Call: get_workspace_files({ workspacePath })
|
|
48
|
+
→ Returns: package.json, tsconfig.json, framework detection,
|
|
49
|
+
test/lint/typecheck commands, key dependencies
|
|
50
|
+
(Only available on stdio transport — skip if unavailable)
|
|
51
|
+
|
|
52
|
+
3. Call: get_patterns({ ticketId })
|
|
53
|
+
→ Returns: resolved code patterns with spec → epic → ticket inheritance
|
|
54
|
+
(naming conventions, imports, error handling)
|
|
55
|
+
|
|
56
|
+
4. Call: blueprint({ operation: "get_for_ticket", ticketId })
|
|
57
|
+
→ Returns: linked blueprints (architecture diagrams, flowcharts, etc.)
|
|
58
|
+
(Skip if no blueprints linked)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Read the referenced files from `implementation.filesToModify` and `implementation.filesToCreate` to understand existing code before making changes.
|
|
62
|
+
|
|
63
|
+
### Step 4: BRANCH
|
|
64
|
+
|
|
65
|
+
Create a git branch for your work.
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
Branch naming by strategy (from .specforge.json agentTeams.branchStrategy):
|
|
69
|
+
|
|
70
|
+
ticket (default):
|
|
71
|
+
git checkout -b ticket/E{epicNumber}-T{ticketNumber}-{slug}
|
|
72
|
+
Examples:
|
|
73
|
+
ticket/E1-T3-jwt-middleware
|
|
74
|
+
ticket/E2-T1-login-component
|
|
75
|
+
|
|
76
|
+
epic:
|
|
77
|
+
Work on the shared epic branch (created by lead):
|
|
78
|
+
git checkout epic/E{epicNumber}-{epicSlug}
|
|
79
|
+
Examples:
|
|
80
|
+
epic/E1-auth-backend
|
|
81
|
+
epic/E2-auth-frontend
|
|
82
|
+
|
|
83
|
+
spec:
|
|
84
|
+
Work on the shared spec branch (created by lead):
|
|
85
|
+
git checkout spec/{specSlug}
|
|
86
|
+
Example:
|
|
87
|
+
spec/authentication-system
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
For `ticket` strategy, always create a fresh branch from the current base:
|
|
91
|
+
```
|
|
92
|
+
git checkout -b ticket/E{epicNumber}-T{ticketNumber}-{slug}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Step 5: IMPLEMENT
|
|
96
|
+
|
|
97
|
+
Write code following the ticket's implementation guide.
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
1. Read the implementation steps from the ticket:
|
|
101
|
+
- implementation.steps → ordered list of what to do
|
|
102
|
+
- implementation.filesToCreate → new files to write
|
|
103
|
+
- implementation.filesToModify → existing files to change
|
|
104
|
+
|
|
105
|
+
2. For each file to modify:
|
|
106
|
+
- Read the existing file first
|
|
107
|
+
- Understand the current patterns and conventions
|
|
108
|
+
- Make targeted changes — don't refactor unrelated code
|
|
109
|
+
|
|
110
|
+
3. For each file to create:
|
|
111
|
+
- Follow naming conventions from get_patterns()
|
|
112
|
+
- Use common imports from the spec/epic patterns
|
|
113
|
+
- Match the error handling approach from patterns
|
|
114
|
+
|
|
115
|
+
4. Follow these rules:
|
|
116
|
+
- Stay within your assigned workspace (monorepo)
|
|
117
|
+
- Follow the project's coding conventions
|
|
118
|
+
- Write tests for new functionality when test infrastructure exists
|
|
119
|
+
- Keep changes focused on the ticket scope
|
|
120
|
+
- Don't add features or improvements beyond the ticket requirements
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Step 6: VALIDATE
|
|
124
|
+
|
|
125
|
+
Run validation checks before committing.
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
Check .specforge.json agentTeams.validationCommands for configured commands:
|
|
129
|
+
|
|
130
|
+
1. TypeCheck (if configured):
|
|
131
|
+
Run: {validationCommands.typeCheck} (e.g., "npx tsc --noEmit")
|
|
132
|
+
|
|
133
|
+
2. Lint (if configured):
|
|
134
|
+
Run: {validationCommands.lint} (e.g., "npx eslint --fix .")
|
|
135
|
+
|
|
136
|
+
3. Test (if configured):
|
|
137
|
+
Run: {validationCommands.test} (e.g., "npm test")
|
|
138
|
+
|
|
139
|
+
4. Build (if configured):
|
|
140
|
+
Run: {validationCommands.build} (e.g., "npm run build")
|
|
141
|
+
|
|
142
|
+
If no commands are configured, use the workspace's detected commands
|
|
143
|
+
from get_workspace_files() (testCommand, lintCommand, typecheckCommand).
|
|
144
|
+
|
|
145
|
+
If a validation fails:
|
|
146
|
+
→ Fix the issue
|
|
147
|
+
→ Re-run the failing check
|
|
148
|
+
→ If unfixable after 2 attempts, see Error Recovery section below
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Step 7: COMMIT
|
|
152
|
+
|
|
153
|
+
Stage and commit your changes with a conventional commit message.
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
1. Stage only the files you changed:
|
|
157
|
+
git add {specific files}
|
|
158
|
+
(Never use git add -A or git add . — avoid committing unrelated files)
|
|
159
|
+
|
|
160
|
+
2. Commit with this format:
|
|
161
|
+
{commitPrefix}({scope}): {ticket title} [SF-E{epicNumber}-T{ticketNumber}]
|
|
162
|
+
|
|
163
|
+
Where:
|
|
164
|
+
- commitPrefix: from .specforge.json agentTeams.branchPrefix (default: "feat")
|
|
165
|
+
- scope: workspace name or module (e.g., "api", "web", "auth")
|
|
166
|
+
- ticket title: short description from the ticket
|
|
167
|
+
- SF reference: ticket identifier for traceability
|
|
168
|
+
|
|
169
|
+
Examples:
|
|
170
|
+
feat(api): implement JWT middleware [SF-E1-T3]
|
|
171
|
+
feat(web): add login component [SF-E2-T1]
|
|
172
|
+
fix(auth): resolve token refresh race condition [SF-E1-T5]
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Step 8: REPORT
|
|
176
|
+
|
|
177
|
+
Report completion to SpecForge and notify the team lead.
|
|
178
|
+
|
|
179
|
+
```
|
|
180
|
+
1. Call: complete_work_session({
|
|
181
|
+
ticketId: "{ticketId}",
|
|
182
|
+
summary: "Brief description of what was implemented and key decisions made",
|
|
183
|
+
filesCreated: ["path/to/new/file.ts", ...],
|
|
184
|
+
filesModified: ["path/to/changed/file.ts", ...],
|
|
185
|
+
validated: true,
|
|
186
|
+
validation: {
|
|
187
|
+
tests: "passed" | "failed" | "skipped" | "na",
|
|
188
|
+
lint: "passed" | "failed" | "skipped" | "na",
|
|
189
|
+
typeCheck: "passed" | "failed" | "skipped" | "na",
|
|
190
|
+
build: "passed" | "failed" | "skipped" | "na",
|
|
191
|
+
notes: "any additional context"
|
|
192
|
+
}
|
|
193
|
+
})
|
|
194
|
+
→ Transitions ticket from active → done
|
|
195
|
+
→ Automatically unblocks dependent tickets
|
|
196
|
+
|
|
197
|
+
2. Message team lead:
|
|
198
|
+
"Completed E{epicNumber}-T{ticketNumber}: {summary of changes}"
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### Step 9: NEXT
|
|
202
|
+
|
|
203
|
+
Move to the next ticket or signal completion.
|
|
204
|
+
|
|
205
|
+
```
|
|
206
|
+
1. Call: get_next_actionable_tickets({ specificationId })
|
|
207
|
+
→ Check if more ready tickets exist in your scope
|
|
208
|
+
|
|
209
|
+
2. If ready tickets exist:
|
|
210
|
+
→ Go back to Step 1 (CLAIM)
|
|
211
|
+
|
|
212
|
+
3. If no ready tickets:
|
|
213
|
+
→ Message team lead: "No more ready tickets in scope — idle"
|
|
214
|
+
→ Wait for lead's instructions (may get new tickets unblocked by other workers)
|
|
215
|
+
|
|
216
|
+
4. If all tickets in your epic are done:
|
|
217
|
+
→ Message team lead: "Epic E{epicNumber} complete — all tickets done"
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## Blocker Handling
|
|
223
|
+
|
|
224
|
+
When you encounter something that prevents you from completing a ticket:
|
|
225
|
+
|
|
226
|
+
```
|
|
227
|
+
1. Identify the blocker type:
|
|
228
|
+
a. Missing dependency: another ticket must complete first
|
|
229
|
+
b. External blocker: missing API, unclear requirement, infrastructure issue
|
|
230
|
+
c. Technical issue: build failure, incompatible dependency, environment problem
|
|
231
|
+
|
|
232
|
+
2. Report the blocker:
|
|
233
|
+
Call: update_ticket({ ticketId, blockReason: "Clear description of the blocker" })
|
|
234
|
+
→ This sets the ticket status to pending
|
|
235
|
+
|
|
236
|
+
3. Notify team lead with details:
|
|
237
|
+
Message: "Blocked on E{epicNumber}-T{ticketNumber}: {blocker description}
|
|
238
|
+
Type: {dependency | external | technical}
|
|
239
|
+
Suggestion: {what might resolve it}"
|
|
240
|
+
|
|
241
|
+
4. Move on:
|
|
242
|
+
→ Go to Step 9 (NEXT) to claim another ticket
|
|
243
|
+
→ Don't wait idle — work on what you can
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## Discovery Protocol
|
|
249
|
+
|
|
250
|
+
When you find unexpected issues, missing requirements, or additional work needed:
|
|
251
|
+
|
|
252
|
+
```
|
|
253
|
+
1. Report the discovery:
|
|
254
|
+
Call: report_progress({
|
|
255
|
+
ticketId,
|
|
256
|
+
progress: {current percentage},
|
|
257
|
+
message: "Discovery: {description of what was found}"
|
|
258
|
+
})
|
|
259
|
+
|
|
260
|
+
2. Notify team lead:
|
|
261
|
+
Message: "Discovery while working on E{epicNumber}-T{ticketNumber}:
|
|
262
|
+
{description}
|
|
263
|
+
Impact: {how it affects current or future tickets}
|
|
264
|
+
Suggestion: {create new ticket? modify existing ticket? ignore?}"
|
|
265
|
+
|
|
266
|
+
3. Wait for lead's decision before:
|
|
267
|
+
- Creating new tickets
|
|
268
|
+
- Modifying the scope of the current ticket
|
|
269
|
+
- Making changes outside the ticket scope
|
|
270
|
+
|
|
271
|
+
4. Continue working on the current ticket unless lead says otherwise
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
## Branch Naming Reference
|
|
277
|
+
|
|
278
|
+
Full branch naming conventions per strategy:
|
|
279
|
+
|
|
280
|
+
### ticket strategy (default)
|
|
281
|
+
Each ticket gets its own branch. Best for independent work and clean PRs.
|
|
282
|
+
```
|
|
283
|
+
Pattern: ticket/E{epicNumber}-T{ticketNumber}-{slug}
|
|
284
|
+
Examples:
|
|
285
|
+
ticket/E1-T1-setup-database-schema
|
|
286
|
+
ticket/E1-T2-create-user-model
|
|
287
|
+
ticket/E2-T1-build-login-page
|
|
288
|
+
ticket/E3-T1-add-e2e-tests
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
### epic strategy
|
|
292
|
+
All tickets in an epic share a branch. Good for tightly coupled tickets.
|
|
293
|
+
```
|
|
294
|
+
Pattern: epic/E{epicNumber}-{epicSlug}
|
|
295
|
+
Examples:
|
|
296
|
+
epic/E1-auth-backend
|
|
297
|
+
epic/E2-auth-frontend
|
|
298
|
+
Workers commit directly to the shared epic branch.
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
### spec strategy
|
|
302
|
+
All tickets share a single branch. For small specs or sequential work.
|
|
303
|
+
```
|
|
304
|
+
Pattern: spec/{specSlug}
|
|
305
|
+
Examples:
|
|
306
|
+
spec/authentication-system
|
|
307
|
+
spec/payment-integration
|
|
308
|
+
All workers commit to the same branch (requires coordination).
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
313
|
+
## Error Recovery
|
|
314
|
+
|
|
315
|
+
### Test Failure
|
|
316
|
+
```
|
|
317
|
+
1. Read the test output carefully
|
|
318
|
+
2. Fix the failing test or the code causing the failure
|
|
319
|
+
3. Re-run the test
|
|
320
|
+
4. If still failing after 2 fix attempts:
|
|
321
|
+
→ Report in complete_work_session with validation.tests: "failed"
|
|
322
|
+
→ Include failure details in validation.notes
|
|
323
|
+
→ Message lead: "Tests failing on E{n}-T{n}: {error summary}"
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
### Build Failure
|
|
327
|
+
```
|
|
328
|
+
1. Check for missing imports or type errors
|
|
329
|
+
2. Verify dependencies are installed
|
|
330
|
+
3. Check if a dependency from another ticket is needed
|
|
331
|
+
4. If build depends on another ticket:
|
|
332
|
+
→ Block the ticket: update_ticket({ ticketId, blockReason: "Depends on E{n}-T{n} for {reason}" })
|
|
333
|
+
→ Move to next ticket
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
### Lint Failure
|
|
337
|
+
```
|
|
338
|
+
1. Run the lint fix command if available (e.g., eslint --fix)
|
|
339
|
+
2. Fix remaining issues manually
|
|
340
|
+
3. Re-run lint
|
|
341
|
+
4. If unfixable (conflicting rules, upstream issues):
|
|
342
|
+
→ Note in validation.notes and proceed
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
### Unrecoverable Error
|
|
346
|
+
```
|
|
347
|
+
If you cannot complete the ticket after reasonable attempts:
|
|
348
|
+
1. Call: update_ticket({ ticketId, blockReason: "Unrecoverable: {description}" })
|
|
349
|
+
2. Message lead with full details:
|
|
350
|
+
"Failed E{n}-T{n}: {what was attempted, what failed, what might fix it}"
|
|
351
|
+
3. Move to next ticket (Step 9)
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
---
|
|
355
|
+
|
|
356
|
+
## MCP Tools Reference
|
|
357
|
+
|
|
358
|
+
| Tool | When to Use |
|
|
359
|
+
|------|-------------|
|
|
360
|
+
| `get_next_actionable_tickets` | CLAIM — find ready tickets |
|
|
361
|
+
| `start_work_session` | START — mark ticket active |
|
|
362
|
+
| `get_implementation_context` | CONTEXT — load full ticket details |
|
|
363
|
+
| `get_workspace_files` | CONTEXT — workspace metadata (local only) |
|
|
364
|
+
| `get_patterns` | CONTEXT — code patterns with inheritance |
|
|
365
|
+
| `blueprint` (get_for_ticket) | CONTEXT — load linked blueprints |
|
|
366
|
+
| `complete_work_session` | REPORT — mark ticket done with summary |
|
|
367
|
+
| `report_progress` | Report incremental progress or discoveries |
|
|
368
|
+
| `update_ticket` | Block a ticket (set blockReason) |
|
|
369
|
+
| `pause_work_session` | Pause work without completing (back to ready) |
|
|
370
|
+
|
|
371
|
+
## Status Values
|
|
372
|
+
|
|
373
|
+
- **Ticket:** `pending` | `ready` | `active` | `done`
|
|
374
|
+
- There is no `in_review` status. Tickets go directly from `active` to `done`.
|
|
375
|
+
- `pending` means dependencies are not met. `ready` means all dependencies satisfied.
|
|
376
|
+
- `start_work_session` transitions `ready` → `active`.
|
|
377
|
+
- `complete_work_session` transitions `active` → `done`.
|
|
378
|
+
- Blocking a ticket with `update_ticket({ blockReason })` sets it to `pending`.
|