@studiomopoke/agentic-bootstrap 1.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 +557 -0
- package/bin/cli.js +88 -0
- package/bootstrap.md +725 -0
- package/package.json +27 -0
package/bootstrap.md
ADDED
|
@@ -0,0 +1,725 @@
|
|
|
1
|
+
# Bootstrap Agentic Workflow
|
|
2
|
+
|
|
3
|
+
Set up an AI-assisted development workflow for this project. Generates five slash commands tailored to this codebase, plus a workflow configuration section for CLAUDE.md.
|
|
4
|
+
|
|
5
|
+
- `/feature` — Specify **what** to build: interactive feature specification, technical design, and scope planning
|
|
6
|
+
- `/discuss` — Plan **when** and **how** to execute: sprint planning, task scheduling, backlog management
|
|
7
|
+
- `/start` — Begin work on a task: fetch context, create branch, spawn zone agents
|
|
8
|
+
- `/resume` — Continue work after a session break: reconstruct context from durable state
|
|
9
|
+
- `/review` — Pre-PR self-review: evaluate changes against requirements and acceptance criteria
|
|
10
|
+
|
|
11
|
+
## Instructions
|
|
12
|
+
|
|
13
|
+
Execute the phases below in order. Use `AskUserQuestion` for multi-choice questions and conversation for open-ended ones.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Prerequisites & Error Handling
|
|
18
|
+
|
|
19
|
+
Before starting the phases, check these prerequisites:
|
|
20
|
+
|
|
21
|
+
1. **Verify git is initialized:** Run `git rev-parse --git-dir`. If it fails, warn the user that this directory is not a git repository and offer to run `git init`.
|
|
22
|
+
2. **MCP tool availability:** If MCP tools are referenced but not available in the current environment, fall back gracefully to CLI tools or manual workflows. Never fail a phase just because an MCP tool is missing.
|
|
23
|
+
3. **Partial failure recovery:** If any phase fails, report what succeeded so far and what failed. The user can re-run `/bootstrap` to retry — the command should detect existing artifacts and pick up where it left off.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
### Phase 1: Task Management Discovery
|
|
28
|
+
|
|
29
|
+
Ask the user about their task management system.
|
|
30
|
+
|
|
31
|
+
**Question 1:** Which task management system do you use?
|
|
32
|
+
- Jira
|
|
33
|
+
- Linear
|
|
34
|
+
- GitHub Issues
|
|
35
|
+
- Asana
|
|
36
|
+
- None / Other
|
|
37
|
+
|
|
38
|
+
Based on their answer, ask for connection details:
|
|
39
|
+
|
|
40
|
+
#### If Jira:
|
|
41
|
+
- Instance URL (e.g., `mycompany.atlassian.net`)
|
|
42
|
+
- Cloud ID (needed for MCP tools — they can find it at `https://{instance}/wiki/rest/api/settings/systemId` or via the Atlassian MCP `getAccessibleAtlassianResources` tool)
|
|
43
|
+
- Project key pattern (e.g., `PROJ`, `ENG` — the prefix before the dash in task IDs like `PROJ-1234`)
|
|
44
|
+
- What MCP tools are available? Check if `mcp__atlassian__` tools exist in the current environment. If not, note that task management features will use CLI tools or be manual.
|
|
45
|
+
|
|
46
|
+
#### If Linear:
|
|
47
|
+
- Team identifier
|
|
48
|
+
- Whether Linear MCP tools are available
|
|
49
|
+
|
|
50
|
+
#### If GitHub Issues:
|
|
51
|
+
- Repository (can be auto-detected from git remote)
|
|
52
|
+
- Whether `gh` CLI is available (run `which gh`)
|
|
53
|
+
|
|
54
|
+
#### If Asana:
|
|
55
|
+
- Workspace GID (found in Asana URL or via API)
|
|
56
|
+
- Project GID (the project that contains the tasks)
|
|
57
|
+
- Whether Asana MCP tools are available in the current environment. If not, check for the `asana` CLI. Note that task management features will use whichever is available, or be manual.
|
|
58
|
+
|
|
59
|
+
#### If None / Other:
|
|
60
|
+
- Ask if they want a simplified workflow without task management integration
|
|
61
|
+
- Or if they have a custom system they can describe
|
|
62
|
+
|
|
63
|
+
Store the answers as variables for template generation.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
### Phase 2: Git Conventions Discovery
|
|
68
|
+
|
|
69
|
+
Ask about their git workflow:
|
|
70
|
+
|
|
71
|
+
**Question 2:** Branch naming convention?
|
|
72
|
+
- Suggest a default based on task management: `feature/{TASK_ID}-short-name`
|
|
73
|
+
- Ask if they use different prefixes (e.g., `feature/`, `bugfix/`, `hotfix/`)
|
|
74
|
+
- Ask what their default base branch is. Detect it automatically using this fallback chain:
|
|
75
|
+
1. `git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null` (local, fast — works if remote HEAD is set)
|
|
76
|
+
2. `git remote show origin | grep 'HEAD branch'` (requires network access — fallback)
|
|
77
|
+
3. If both fail, ask the user directly
|
|
78
|
+
|
|
79
|
+
**Question 3:** Commit message format?
|
|
80
|
+
- Suggest: `{TASK_ID} Description of change`
|
|
81
|
+
- Ask if they want any prefix/suffix conventions (e.g., emoji, conventional commits)
|
|
82
|
+
- Ask if they want the AI marker (e.g., robot emoji or `[AI]` tag)
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
### Phase 3: Codebase Analysis
|
|
87
|
+
|
|
88
|
+
Explore the codebase to understand its structure. Run these in parallel:
|
|
89
|
+
|
|
90
|
+
1. **Detect project type:** Check for `package.json`, `go.mod`, `Cargo.toml`, `pyproject.toml`, `*.csproj`, `*.sln`, `Gemfile`, etc.
|
|
91
|
+
2. **Identify key directories:** Run `ls -la` at root, look for common patterns (`src/`, `pkg/`, `internal/`, `lib/`, `app/`, `routes/`, `tests/`, `scripts/`)
|
|
92
|
+
3. **Check for related repos:** Ask the user if this project works alongside other repos they'd want agents to explore
|
|
93
|
+
4. **Discover dependencies and external domains:** Ask the user about:
|
|
94
|
+
- Key external services or APIs the project talks to (e.g., REST APIs, GraphQL endpoints, third-party SDKs)
|
|
95
|
+
- Internal packages or libraries it depends on that live outside this repo
|
|
96
|
+
- External domains agents should be aware of when investigating issues (e.g., "auth is handled by our identity service in repo X", "we consume events from the payments service")
|
|
97
|
+
- Any documentation URLs, API specs (OpenAPI/Swagger), or reference repos that would help agents understand integrations
|
|
98
|
+
5. **Check for existing CLAUDE.md:** Read it if present — we'll append to it rather than overwrite
|
|
99
|
+
6. **Check for existing .claude/commands/:** Warn if start.md, resume.md, review.md, discuss.md, or feature.md already exist
|
|
100
|
+
|
|
101
|
+
Present findings to the user:
|
|
102
|
+
- "I found a [Go/Node/Python/etc.] project with these key directories: ..."
|
|
103
|
+
- "Here's the structure I see: ..."
|
|
104
|
+
- "External dependencies/services: ..." (summarize what they told you)
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
### Phase 4: Agent Zone Definition
|
|
109
|
+
|
|
110
|
+
This is the most important step. Define the exploration agents that `/feature`, `/start`, `/resume`, and `/review` will spawn.
|
|
111
|
+
|
|
112
|
+
Ask the user to describe the major areas of their codebase. Help them by suggesting based on Phase 3 findings.
|
|
113
|
+
|
|
114
|
+
For each zone, capture:
|
|
115
|
+
- **Name**: Short label (e.g., "API Surface", "Core Logic", "Tests")
|
|
116
|
+
- **Paths**: Which directories to explore
|
|
117
|
+
- **Description**: What this zone covers (1-2 sentences)
|
|
118
|
+
- **Triggers**: Task types that should activate this agent (e.g., "API changes", "bug investigation")
|
|
119
|
+
- **Dependencies/context** (optional): External services, APIs, or sibling repos this zone interacts with. Drawn from Phase 3 discovery — include relevant details so agents understand the integration boundaries (e.g., "calls the payments API via `pkg/payments/client.go`", "depends on shared-types from `../common-lib`")
|
|
120
|
+
|
|
121
|
+
Aim for 3-6 zones. For very small projects (single-directory), 1-2 zones is fine (e.g., "Source" + "Tests"). For large monorepos, group related packages into composite zones rather than creating 10+ individual ones.
|
|
122
|
+
|
|
123
|
+
Good defaults based on common patterns:
|
|
124
|
+
|
|
125
|
+
| Project Type | Suggested Zones |
|
|
126
|
+
|-------------|----------------|
|
|
127
|
+
| Go service | Core logic, API/routes, infrastructure/config, tests |
|
|
128
|
+
| Node/React app | Components, API/services, state management, tests |
|
|
129
|
+
| Python service | Core modules, API endpoints, config/infra, tests |
|
|
130
|
+
| Monorepo | Per-package zones + shared/common zone |
|
|
131
|
+
|
|
132
|
+
If they have **related repos**, define zones for those too with absolute paths.
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
### Phase 5: Planning Structure
|
|
137
|
+
|
|
138
|
+
Ask about the project's planning and documentation approach.
|
|
139
|
+
|
|
140
|
+
**Question 1:** What level of planning docs do you want?
|
|
141
|
+
|
|
142
|
+
- **Full project planning** (recommended for greenfield/new projects) — Architecture docs, sprint planning, task breakdowns with TDD specs, backlog management
|
|
143
|
+
- **Task-level only** — Simple per-task planning docs created by `/start` (good for established codebases with external task management)
|
|
144
|
+
- **None** — No local planning docs, rely entirely on task management system
|
|
145
|
+
|
|
146
|
+
#### If Full Project Planning:
|
|
147
|
+
|
|
148
|
+
Scaffold the planning directory structure:
|
|
149
|
+
|
|
150
|
+
`{NN}` is a two-digit ordering prefix (e.g., `01_features.md`, `02_architecture.md`). Number by logical reading order, not priority. Gaps are fine — leave room for future docs.
|
|
151
|
+
|
|
152
|
+
```
|
|
153
|
+
planning/
|
|
154
|
+
├── {NN}_{topic}.md # Project-level docs (features, architecture, tech stack, etc.)
|
|
155
|
+
├── backlog/
|
|
156
|
+
│ ├── README.md # When to park/pull items
|
|
157
|
+
│ └── {deferred-feature}.md
|
|
158
|
+
├── features/
|
|
159
|
+
│ └── {feature-name}/
|
|
160
|
+
│ ├── spec.md # Feature specification (created by /feature)
|
|
161
|
+
│ ├── technical-design.md # Technical design document
|
|
162
|
+
│ └── scope.md # Scope, phases, task breakdown
|
|
163
|
+
└── sprints/
|
|
164
|
+
└── sprint-{N}-{name}/
|
|
165
|
+
├── 00_sprint_overview.md # Sprint goal, task table, success criteria, out of scope
|
|
166
|
+
├── {NN}_{task}.md # Detailed task spec (requirements, AC, files to create, API endpoints)
|
|
167
|
+
├── COMPLETED.md # Progress tracking
|
|
168
|
+
└── tdd/
|
|
169
|
+
├── README.md # TDD overview for the sprint
|
|
170
|
+
└── phase-{NN}-{name}.md # Full test specifications per task
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Ask the user:
|
|
174
|
+
- What project-level docs should we create stubs for? Suggest based on codebase analysis:
|
|
175
|
+
- Features overview / scope
|
|
176
|
+
- Architecture principles
|
|
177
|
+
- Tech stack decisions
|
|
178
|
+
- App structure
|
|
179
|
+
- MVP / milestone scope
|
|
180
|
+
- Any domain-specific reference docs
|
|
181
|
+
- Is TDD part of their workflow? (determines whether to include `tdd/` directories)
|
|
182
|
+
- What's their sprint naming convention? (numbered, named, dated)
|
|
183
|
+
|
|
184
|
+
Create the backlog README with guidelines on when to park and pull items.
|
|
185
|
+
|
|
186
|
+
#### If Task-Level Only:
|
|
187
|
+
|
|
188
|
+
Ask for the planning doc path. Default: `planning/tasks/{TASK_ID}.md`
|
|
189
|
+
|
|
190
|
+
The `/start` command will create a per-task doc with:
|
|
191
|
+
- Task context from the task management system
|
|
192
|
+
- Acceptance criteria
|
|
193
|
+
- Approach section (to fill during implementation)
|
|
194
|
+
- Notes section (for investigation during development)
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
### Phase 6: Generate Commands
|
|
199
|
+
|
|
200
|
+
Now generate the files. Create each one using the Write tool.
|
|
201
|
+
|
|
202
|
+
#### 6a. Generate `start.md`
|
|
203
|
+
|
|
204
|
+
Write to `.claude/commands/start.md`. The generated command should handle:
|
|
205
|
+
|
|
206
|
+
1. **Parse argument** — Extract task identifier from `$ARGUMENTS`. Support the following inputs:
|
|
207
|
+
- **`next`** — Auto-select the next task to work on. Query the configured provider for open/unassigned tasks, check `git branch -a` to filter out tasks that already have branches, and pick the lowest/highest-priority remaining task. Show the user which task was selected and ask for confirmation before proceeding.
|
|
208
|
+
- **Task ID** — A task identifier matching the configured pattern (e.g., `#42`, `PROJ-123`, `ENG-456`).
|
|
209
|
+
- **URL** — A full URL to the task in the provider's UI.
|
|
210
|
+
- **Empty or unrecognizable** — Ask the user for the task identifier. Never guess or make one up. **Include this guard in the generated `start.md`**.
|
|
211
|
+
2. **Fetch task context** — Using the configured provider, get summary, description, status, AC, priority, parent/epic, linked tasks.
|
|
212
|
+
3. **Guard against duplicate work** — Check `git branch -a` for existing branches. Check for existing planning docs. Suggest `/resume` if work exists.
|
|
213
|
+
4. **Create feature branch** — Derive short name from task summary, check for parent/epic branch, create with configured prefix and base branch.
|
|
214
|
+
5. **Load planning context** — Based on planning mode:
|
|
215
|
+
- **Full planning:** Read the active sprint overview and find the relevant task spec if one exists. If a task spec exists in a sprint, surface its requirements, AC, files to create, and TDD specs. If no task spec exists, note that the user may want to run `/discuss` first or create one ad-hoc.
|
|
216
|
+
- **Task-level:** Create a per-task planning doc with context from the task management system.
|
|
217
|
+
- **None:** Skip.
|
|
218
|
+
6. **Spawn exploration agents** — Based on the task description and planning context, pick relevant agent zones. Run in parallel with `run_in_background: true`.
|
|
219
|
+
7. **Transition task status** — Mark as in-progress via configured provider.
|
|
220
|
+
8. **Report setup summary** — Task info, branch, planning docs found/created, running agents, suggested approach.
|
|
221
|
+
|
|
222
|
+
Include the relationship note: `/start` initializes, `/resume` continues. Cross-redirect between them.
|
|
223
|
+
|
|
224
|
+
#### 6b. Generate `resume.md`
|
|
225
|
+
|
|
226
|
+
Write to `.claude/commands/resume.md`. The generated command should handle:
|
|
227
|
+
|
|
228
|
+
1. **Detect current work from git** — Branch name, extract task ID, recent commits, uncommitted changes.
|
|
229
|
+
2. **Fetch task context** — Same provider integration as start.
|
|
230
|
+
3. **Check progress** — TaskList for Claude Code tasks, plus planning context:
|
|
231
|
+
- **Full planning:** Read sprint overview, find task spec, check which subtasks/phases are done. Read COMPLETED.md if it exists. Surface what's next based on the task spec.
|
|
232
|
+
- **Task-level:** Read the per-task planning doc, check notes/approach sections.
|
|
233
|
+
- **None:** Skip.
|
|
234
|
+
4. **Spawn exploration agents** — Same zones as start, picked by relevance.
|
|
235
|
+
5. **Report status** — Task summary, git state, planning progress, running agents, what to work on next.
|
|
236
|
+
6. **Continue** — Resume work, with agent follow-up instructions.
|
|
237
|
+
|
|
238
|
+
Include workflow reminders: commit format, task management updates, agent follow-up pattern.
|
|
239
|
+
|
|
240
|
+
#### 6c. Generate `discuss.md`
|
|
241
|
+
|
|
242
|
+
Write to `.claude/commands/discuss.md`. This command handles **execution planning** — sprint structure, task scheduling, backlog management. It does NOT handle feature specification (that's `/feature`).
|
|
243
|
+
|
|
244
|
+
Include this description at the top of the generated command:
|
|
245
|
+
> Plan **when** and **how** to execute work: sprint planning, task scheduling, and backlog management. For specifying **what** to build, use `/feature` instead.
|
|
246
|
+
|
|
247
|
+
The generated command should handle:
|
|
248
|
+
|
|
249
|
+
1. **Parse argument** — Accepts a sprint name/number, task ID, or topic from `$ARGUMENTS`. If empty, ask what they want to plan.
|
|
250
|
+
2. **Gather context** — Read existing planning docs, feature specs in `planning/features/`, check git history, fetch task management context as relevant.
|
|
251
|
+
3. **Adapt to planning mode:**
|
|
252
|
+
- **Full planning:** Plan sprints from feature specs and roadmap — break work into numbered tasks with requirements, AC, file lists, dependencies, and TDD specs. Create sprint directories. Manage the backlog (park, prioritize, pull items).
|
|
253
|
+
- **Task-level:** Discuss a specific task's implementation approach, update the per-task planning doc with decisions and notes.
|
|
254
|
+
- **None:** Freeform discussion about execution, scheduling, or priorities. Optionally capture notes.
|
|
255
|
+
4. **Leverage feature specs** — When planning a sprint, check `planning/features/` for feature specs that provide task breakdowns, dependencies, and scope. Use these as input rather than re-deriving requirements.
|
|
256
|
+
5. **Explore as needed** — Spawn agents to answer codebase questions that arise during planning.
|
|
257
|
+
6. **Produce artifacts** — Write sprint overviews, task specs, TDD specs, or backlog items. Always ask before creating files.
|
|
258
|
+
7. **Offer next steps** — Suggest `/start` to begin the first task, or `/feature` if requirements need to be specified first.
|
|
259
|
+
|
|
260
|
+
#### 6d. Generate `review.md`
|
|
261
|
+
|
|
262
|
+
Write to `.claude/commands/review.md`. The generated command should handle:
|
|
263
|
+
|
|
264
|
+
1. **Detect current work from git** — Branch name, extract task ID, base branch. Identify the full set of changes: `git diff {base_branch}...HEAD` for committed changes, plus any uncommitted/staged changes.
|
|
265
|
+
2. **Gather requirements** — Collect everything we know about what this task should accomplish:
|
|
266
|
+
- Fetch task details from the configured provider (summary, description, AC, linked tasks).
|
|
267
|
+
- **Full planning:** Read the task spec from the sprint directory (requirements, AC, files to create, TDD specs). Read the sprint overview for broader context.
|
|
268
|
+
- **Task-level:** Read the per-task planning doc (approach, notes, AC).
|
|
269
|
+
- **None:** Use the task management description alone, or ask the user to describe expected behavior.
|
|
270
|
+
3. **Collect all changes** — Build a complete picture of the work:
|
|
271
|
+
- List all commits on the branch (`git log {base_branch}..HEAD --oneline`).
|
|
272
|
+
- Get the full diff (`git diff {base_branch}...HEAD`).
|
|
273
|
+
- List files changed with stats (`git diff {base_branch}...HEAD --stat`).
|
|
274
|
+
- Note any uncommitted changes separately.
|
|
275
|
+
4. **Spawn deep review agents** — For each major area of change, spawn an exploration agent to understand the surrounding code context. This lets the review consider not just the diff, but how changes interact with the broader codebase.
|
|
276
|
+
5. **Conduct the review** — Evaluate the changes against the requirements. Check for:
|
|
277
|
+
- **Completeness:** Are all acceptance criteria addressed? Any requirements missed?
|
|
278
|
+
- **Correctness:** Logic errors, edge cases, off-by-one errors, null/nil handling.
|
|
279
|
+
- **Security:** Injection risks, auth/authz gaps, secrets in code, OWASP top 10.
|
|
280
|
+
- **Performance:** N+1 queries, unbounded loops, missing pagination, unnecessary allocations.
|
|
281
|
+
- **Error handling:** Unhappy paths covered? Errors propagated correctly? User-facing messages helpful?
|
|
282
|
+
- **Tests:** Are new/changed paths tested? Any obvious gaps in coverage? Do test names describe behavior?
|
|
283
|
+
- **Style & consistency:** Does the code follow the patterns already established in the codebase? Naming conventions, file organization, abstraction level.
|
|
284
|
+
- **Dependencies/integrations:** If the task touches external service boundaries (from Phase 3 discovery), are those integrations handled correctly?
|
|
285
|
+
6. **Report findings** — Present a structured review:
|
|
286
|
+
- **Summary:** One-paragraph overview of what the changes do.
|
|
287
|
+
- **Requirements checklist:** Each AC item with pass/fail/partial status.
|
|
288
|
+
- **Issues found:** Grouped by severity (blocking, warning, nit). Each with file, line, description, and suggested fix.
|
|
289
|
+
- **What looks good:** Highlight well-implemented parts — this isn't just a fault-finder.
|
|
290
|
+
- **Suggestions:** Optional improvements that aren't blocking (not required to address before merge).
|
|
291
|
+
7. **Offer next steps** — Based on findings:
|
|
292
|
+
- If blocking issues: offer to fix them now.
|
|
293
|
+
- If clean: suggest creating a PR. If uncommitted changes exist, offer to commit them first.
|
|
294
|
+
- If task management is configured: offer to add a review-complete comment to the task.
|
|
295
|
+
|
|
296
|
+
Include a note: `/review` is for pre-PR self-review. It's not a replacement for team code review, but helps catch issues before involving reviewers.
|
|
297
|
+
|
|
298
|
+
#### 6e. Generate `feature.md`
|
|
299
|
+
|
|
300
|
+
Write to `.claude/commands/feature.md`. This command handles **feature specification** — defining what to build, why, and at what scope. It does NOT handle sprint planning or task scheduling (that's `/discuss`).
|
|
301
|
+
|
|
302
|
+
Include this description at the top of the generated command:
|
|
303
|
+
> Specify **what** to build: interactive feature specification, technical design, and scope planning. For planning **when** and **how** to execute, use `/discuss` instead. Use `/feature review {name}` to review an existing feature spec.
|
|
304
|
+
|
|
305
|
+
The generated command should handle two modes: **specification mode** (default) and **review mode**.
|
|
306
|
+
|
|
307
|
+
##### Specification mode (default)
|
|
308
|
+
|
|
309
|
+
Invoked as `/feature` or `/feature {feature-name}`. Drives an interactive discovery process that produces a complete feature specification before any code is written.
|
|
310
|
+
|
|
311
|
+
1. **Parse argument** — If `$ARGUMENTS` is empty, ask the user to name or describe the feature in a sentence. If a name is provided, use it as the working title. If the argument starts with `review`, switch to review mode (see below).
|
|
312
|
+
|
|
313
|
+
2. **Check for existing feature docs** — Search `planning/features/` (or the configured planning path) for docs matching the feature name. If found, ask the user whether to continue refining the existing spec or start fresh. If continuing, load the existing docs as starting context.
|
|
314
|
+
|
|
315
|
+
3. **Initial exploration** — Spawn exploration agents across all configured zones with `run_in_background: true`. Prompt them to:
|
|
316
|
+
- Identify systems, modules, and patterns relevant to the feature description
|
|
317
|
+
- Report existing code that the feature will interact with, extend, or depend on
|
|
318
|
+
- Surface architectural constraints or patterns the feature must follow
|
|
319
|
+
- Find related features already implemented that could serve as reference implementations
|
|
320
|
+
|
|
321
|
+
4. **Iterative discovery** — Conduct a structured Q&A to flesh out the feature. Use `AskUserQuestion` for multi-choice questions and conversation for open-ended ones. Work through these areas, but **adapt the order and depth based on user responses** — skip what's not relevant, dig deeper where there's ambiguity:
|
|
322
|
+
|
|
323
|
+
**Problem & Purpose:**
|
|
324
|
+
- What problem does this solve? Who is it for?
|
|
325
|
+
- What does success look like? How will you know it's working?
|
|
326
|
+
- Are there existing workarounds or partial solutions?
|
|
327
|
+
|
|
328
|
+
**Scope & Boundaries:**
|
|
329
|
+
- What's the MVP — the minimum that delivers value?
|
|
330
|
+
- What's explicitly out of scope for now?
|
|
331
|
+
- Are there phases or milestones (MVP → v1 → full vision)?
|
|
332
|
+
|
|
333
|
+
**Behaviour & Requirements:**
|
|
334
|
+
- What are the key user stories or use cases?
|
|
335
|
+
- What are the acceptance criteria for each?
|
|
336
|
+
- What happens in error/edge cases?
|
|
337
|
+
- Are there performance, scale, or latency requirements?
|
|
338
|
+
|
|
339
|
+
**Dependencies & Integration:**
|
|
340
|
+
- What existing systems does this touch? (use agent findings to ground this)
|
|
341
|
+
- What external services, APIs, or data sources are involved?
|
|
342
|
+
- Are there ordering dependencies — things that must be built or changed first?
|
|
343
|
+
- Does this feature depend on other planned-but-not-built features?
|
|
344
|
+
|
|
345
|
+
**Technical Approach:**
|
|
346
|
+
- What's the proposed architecture? (suggest based on agent findings and existing patterns)
|
|
347
|
+
- What new interfaces, services, or data structures are needed?
|
|
348
|
+
- What existing code needs modification?
|
|
349
|
+
- Are there meaningful technical alternatives to evaluate?
|
|
350
|
+
|
|
351
|
+
**Testing Strategy:**
|
|
352
|
+
- What are the key test scenarios?
|
|
353
|
+
- What needs unit tests vs integration tests vs manual verification?
|
|
354
|
+
- Are there test data or fixture requirements?
|
|
355
|
+
|
|
356
|
+
**Risks & Unknowns:**
|
|
357
|
+
- What are you unsure about?
|
|
358
|
+
- What could go wrong? What are the biggest risks?
|
|
359
|
+
- Are there questions that need external input to answer?
|
|
360
|
+
|
|
361
|
+
**Keep iterating** until the user is satisfied that the feature is well-defined. After each major section, summarize what's been captured and ask if anything is missing or needs revision. If exploration agents surface relevant code or patterns, present findings and ask follow-up questions based on them.
|
|
362
|
+
|
|
363
|
+
5. **Produce artifacts** — Once the discovery is complete, generate the feature documentation. Ask the user for approval before writing. Create a feature directory:
|
|
364
|
+
|
|
365
|
+
```
|
|
366
|
+
planning/features/{feature-name}/
|
|
367
|
+
├── spec.md # Feature specification
|
|
368
|
+
├── technical-design.md # Technical design document
|
|
369
|
+
└── scope.md # Scope, phases, and milestones
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
**`spec.md`** — The feature specification:
|
|
373
|
+
```markdown
|
|
374
|
+
# Feature: {Feature Name}
|
|
375
|
+
|
|
376
|
+
## Problem Statement
|
|
377
|
+
{What problem this solves and for whom}
|
|
378
|
+
|
|
379
|
+
## Success Criteria
|
|
380
|
+
{How you know the feature is working — measurable outcomes}
|
|
381
|
+
|
|
382
|
+
## User Stories
|
|
383
|
+
- As a {role}, I want {action} so that {benefit}
|
|
384
|
+
|
|
385
|
+
## Acceptance Criteria
|
|
386
|
+
- [ ] {AC item with clear pass/fail definition}
|
|
387
|
+
|
|
388
|
+
## Out of Scope
|
|
389
|
+
- {What this feature explicitly does NOT cover}
|
|
390
|
+
|
|
391
|
+
## Open Questions
|
|
392
|
+
- {Anything unresolved that needs further input}
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
**`technical-design.md`** — The technical design:
|
|
396
|
+
```markdown
|
|
397
|
+
# Technical Design: {Feature Name}
|
|
398
|
+
|
|
399
|
+
## Overview
|
|
400
|
+
{One-paragraph summary of the technical approach}
|
|
401
|
+
|
|
402
|
+
## Architecture
|
|
403
|
+
{How the feature fits into the existing system — reference agent zone findings}
|
|
404
|
+
|
|
405
|
+
## Dependencies
|
|
406
|
+
### Internal
|
|
407
|
+
- {Existing modules/services this depends on}
|
|
408
|
+
### External
|
|
409
|
+
- {APIs, services, libraries}
|
|
410
|
+
### Ordering
|
|
411
|
+
- {What must be built/changed before this feature}
|
|
412
|
+
|
|
413
|
+
## Key Changes
|
|
414
|
+
### New
|
|
415
|
+
- `{path}` — {description of new file/module}
|
|
416
|
+
### Modified
|
|
417
|
+
- `{path}` — {what changes and why}
|
|
418
|
+
|
|
419
|
+
## Interfaces & Data
|
|
420
|
+
{New interfaces, data structures, API contracts}
|
|
421
|
+
|
|
422
|
+
## Alternatives Considered
|
|
423
|
+
{Other approaches evaluated and why they were rejected}
|
|
424
|
+
|
|
425
|
+
## Risks
|
|
426
|
+
- **{Risk}** — {Impact and mitigation}
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
**`scope.md`** — Scope and phasing:
|
|
430
|
+
```markdown
|
|
431
|
+
# Scope: {Feature Name}
|
|
432
|
+
|
|
433
|
+
## Phases
|
|
434
|
+
|
|
435
|
+
### Phase 1: MVP
|
|
436
|
+
{Minimum viable scope that delivers value}
|
|
437
|
+
- [ ] {Deliverable}
|
|
438
|
+
- **Estimated complexity:** S/M/L
|
|
439
|
+
|
|
440
|
+
### Phase 2: {Name}
|
|
441
|
+
{Next increment}
|
|
442
|
+
- [ ] {Deliverable}
|
|
443
|
+
- **Estimated complexity:** S/M/L
|
|
444
|
+
|
|
445
|
+
## Task Breakdown
|
|
446
|
+
{Numbered tasks ready to become issues — each with summary, AC, and estimated complexity}
|
|
447
|
+
|
|
448
|
+
| # | Task | Depends On | Complexity |
|
|
449
|
+
|---|------|-----------|------------|
|
|
450
|
+
| 1 | {task} | — | S |
|
|
451
|
+
| 2 | {task} | 1 | M |
|
|
452
|
+
|
|
453
|
+
## Testing Strategy
|
|
454
|
+
- **Unit:** {What gets unit tested}
|
|
455
|
+
- **Integration:** {What needs integration testing}
|
|
456
|
+
- **Manual:** {What requires manual verification}
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
6. **Offer next steps** — After writing the feature docs:
|
|
460
|
+
- Offer to create GitHub Issues (or tasks in the configured provider) from the task breakdown in `scope.md`
|
|
461
|
+
- Suggest `/discuss` to plan a sprint around this feature
|
|
462
|
+
- Suggest `/start` to begin work on the first task
|
|
463
|
+
- If there are open questions, highlight them and suggest resolving before starting implementation
|
|
464
|
+
|
|
465
|
+
##### Review mode
|
|
466
|
+
|
|
467
|
+
Invoked as `/feature review {feature-name}`.
|
|
468
|
+
|
|
469
|
+
1. **Find feature docs** — Search `planning/features/` for the named feature. If not found, list available features and ask the user to pick one. If multiple matches, disambiguate.
|
|
470
|
+
|
|
471
|
+
2. **Load all feature docs** — Read `spec.md`, `technical-design.md`, and `scope.md` for the feature.
|
|
472
|
+
|
|
473
|
+
3. **Spawn exploration agents** — For each zone referenced in the technical design's dependencies or key changes, spawn an agent to check the current state of those areas. Prompt them to:
|
|
474
|
+
- Check if dependencies listed in the design are still accurate
|
|
475
|
+
- Check if referenced code has changed since the feature was planned
|
|
476
|
+
- Look for any new code or patterns that affect the feature's approach
|
|
477
|
+
- Check for implementations that partially or fully address tasks in the scope
|
|
478
|
+
|
|
479
|
+
4. **Assess completeness** — Evaluate each document against a checklist:
|
|
480
|
+
|
|
481
|
+
**Spec completeness:**
|
|
482
|
+
- Does the problem statement clearly define the problem and audience?
|
|
483
|
+
- Are success criteria measurable and specific?
|
|
484
|
+
- Are acceptance criteria testable (clear pass/fail)?
|
|
485
|
+
- Are edge cases and error scenarios covered?
|
|
486
|
+
- Are out-of-scope items explicitly listed?
|
|
487
|
+
|
|
488
|
+
**Technical design completeness:**
|
|
489
|
+
- Are all dependencies identified (internal, external, ordering)?
|
|
490
|
+
- Are key changes mapped to specific files/paths?
|
|
491
|
+
- Are interfaces and data structures defined concretely?
|
|
492
|
+
- Does the architecture align with the project's existing patterns? (check against agent findings)
|
|
493
|
+
- Are risks identified with mitigations?
|
|
494
|
+
|
|
495
|
+
**Scope completeness:**
|
|
496
|
+
- Is the MVP clearly defined and separable from later phases?
|
|
497
|
+
- Does the task breakdown have enough detail to create issues from?
|
|
498
|
+
- Are task dependencies mapped?
|
|
499
|
+
- Is the testing strategy concrete?
|
|
500
|
+
|
|
501
|
+
5. **Check for staleness** — Using agent findings, identify:
|
|
502
|
+
- Dependencies that have changed since the feature was planned
|
|
503
|
+
- Code that was referenced but has moved or been refactored
|
|
504
|
+
- New patterns or systems introduced that the design should account for
|
|
505
|
+
- Tasks in the scope that have already been partially implemented
|
|
506
|
+
|
|
507
|
+
6. **Report findings** — Present a structured review:
|
|
508
|
+
|
|
509
|
+
```
|
|
510
|
+
## Feature Review: {Feature Name}
|
|
511
|
+
|
|
512
|
+
### Status
|
|
513
|
+
{Overall assessment: Ready to implement / Needs refinement / Significant gaps}
|
|
514
|
+
|
|
515
|
+
### Completeness
|
|
516
|
+
- **Spec:** {Complete / Gaps found}
|
|
517
|
+
- {List of missing or weak items}
|
|
518
|
+
- **Technical Design:** {Complete / Gaps found}
|
|
519
|
+
- {List of missing or weak items}
|
|
520
|
+
- **Scope:** {Complete / Gaps found}
|
|
521
|
+
- {List of missing or weak items}
|
|
522
|
+
|
|
523
|
+
### Staleness
|
|
524
|
+
{Items that are outdated based on current codebase state}
|
|
525
|
+
|
|
526
|
+
### Open Questions
|
|
527
|
+
{Unresolved items from the spec + any new questions raised by the review}
|
|
528
|
+
|
|
529
|
+
### Recommendations
|
|
530
|
+
- {Specific actions to address gaps}
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
7. **Offer to fix** — For each gap or staleness issue found, offer to update the feature docs. Make changes interactively — show proposed updates and ask for approval before writing.
|
|
534
|
+
|
|
535
|
+
#### 6f. Update CLAUDE.md
|
|
536
|
+
|
|
537
|
+
Add a `## Workflow Configuration` section to the project's CLAUDE.md (create if it doesn't exist). This section acts as the "config" that the generated commands reference.
|
|
538
|
+
|
|
539
|
+
**Re-bootstrap handling:** Before writing, check if a `## Workflow Configuration` section already exists in CLAUDE.md. If it does, **replace** that section (from the `## Workflow Configuration` heading to the next `##` heading or end of file) rather than appending a duplicate. Warn the user that you're replacing the existing section and show a brief diff summary of what changed.
|
|
540
|
+
|
|
541
|
+
```markdown
|
|
542
|
+
## Workflow Configuration
|
|
543
|
+
|
|
544
|
+
### Commands
|
|
545
|
+
| Command | Purpose |
|
|
546
|
+
|---------|---------|
|
|
547
|
+
| `/feature` | Specify **what** to build — feature spec, technical design, scope |
|
|
548
|
+
| `/discuss` | Plan **when/how** to execute — sprint planning, task scheduling, backlog |
|
|
549
|
+
| `/start` | Begin a task — fetch context, create branch, spawn zone agents |
|
|
550
|
+
| `/resume` | Continue after a break — reconstruct context from durable state |
|
|
551
|
+
| `/review` | Pre-PR self-review — evaluate changes against requirements |
|
|
552
|
+
|
|
553
|
+
### Task Management
|
|
554
|
+
- **Provider:** {provider}
|
|
555
|
+
[PROVIDER-SPECIFIC CONFIG]
|
|
556
|
+
|
|
557
|
+
### Git Conventions
|
|
558
|
+
- **Branch format:** {branch_format}
|
|
559
|
+
- **Commit format:** {commit_format}
|
|
560
|
+
- **Default base branch:** {base_branch}
|
|
561
|
+
- **AI marker:** {ai_marker}
|
|
562
|
+
|
|
563
|
+
### Agent Zones
|
|
564
|
+
[Zone definitions for reference]
|
|
565
|
+
|
|
566
|
+
### Key Locations
|
|
567
|
+
[Key directories and their purposes]
|
|
568
|
+
|
|
569
|
+
[IF EXTERNAL DEPENDENCIES WERE DISCOVERED:]
|
|
570
|
+
### External Dependencies
|
|
571
|
+
[Services, APIs, sibling repos, and integration points — from Phase 3 discovery]
|
|
572
|
+
|
|
573
|
+
[IF PLANNING DOCS:]
|
|
574
|
+
### Planning
|
|
575
|
+
- **Feature specs:** `planning/features/{feature-name}/` (created by `/feature`)
|
|
576
|
+
- **Sprint plans:** `planning/sprints/sprint-{N}-{name}/` (created by `/discuss`)
|
|
577
|
+
- **Task plans:** `{planning_path}/{TASK_ID}.md`
|
|
578
|
+
```
|
|
579
|
+
|
|
580
|
+
#### 6g. Configure Permissions
|
|
581
|
+
|
|
582
|
+
The generated commands need certain permissions to work without constant prompts. Check the project's `.claude/settings.json` (or `.claude/settings.local.json`) and offer to configure appropriate allow-lists.
|
|
583
|
+
|
|
584
|
+
**Always allow (non-destructive, essential for workflow):**
|
|
585
|
+
- `Read` tool — reading files is fundamental to all commands
|
|
586
|
+
- `Edit` tool — editing files is core to development work
|
|
587
|
+
- `Write` tool — creating planning docs, writing new files
|
|
588
|
+
- `Glob` tool — finding files by pattern
|
|
589
|
+
- `Grep` tool — searching file contents
|
|
590
|
+
- `Bash(git status)` — checking repo state
|
|
591
|
+
- `Bash(git branch*)` — listing/creating branches
|
|
592
|
+
- `Bash(git checkout*)` — switching branches
|
|
593
|
+
- `Bash(git log*)` — viewing history
|
|
594
|
+
- `Bash(git diff*)` — viewing changes
|
|
595
|
+
- `Bash(git add*)` — staging files
|
|
596
|
+
- `Bash(git commit*)` — committing (non-destructive)
|
|
597
|
+
- `Bash(git stash*)` — stashing changes
|
|
598
|
+
- Any MCP tools discovered in Phase 1 (e.g., `mcp__atlassian__*` for Jira)
|
|
599
|
+
|
|
600
|
+
**Language/stack-specific permissions (from Phase 3 findings):**
|
|
601
|
+
|
|
602
|
+
Based on the detected project type, also include relevant build, test, and run commands:
|
|
603
|
+
|
|
604
|
+
| Stack | Suggested allows |
|
|
605
|
+
|-------|-----------------|
|
|
606
|
+
| Node/TypeScript | `Bash(npm run*)`, `Bash(npx *)`, `Bash(yarn *)`, `Bash(pnpm *)`, `Bash(node *)`, `Bash(tsc *)` |
|
|
607
|
+
| Go | `Bash(go build*)`, `Bash(go test*)`, `Bash(go run*)`, `Bash(go vet*)`, `Bash(go mod*)` |
|
|
608
|
+
| Python | `Bash(python *)`, `Bash(pytest*)`, `Bash(mypy *)`, `Bash(ruff *)` |
|
|
609
|
+
| Rust | `Bash(cargo build*)`, `Bash(cargo test*)`, `Bash(cargo run*)`, `Bash(cargo clippy*)` |
|
|
610
|
+
| .NET/C# | `Bash(dotnet build*)`, `Bash(dotnet test*)`, `Bash(dotnet run*)` |
|
|
611
|
+
| Ruby | `Bash(bundle *)`, `Bash(rake *)`, `Bash(ruby *)`, `Bash(rspec *)` |
|
|
612
|
+
| Unity | `Bash(unity-editor*)`, any project-specific build scripts found in `scripts/` or `Makefile` |
|
|
613
|
+
|
|
614
|
+
Add any project-specific scripts found during codebase analysis (e.g., `Bash(make *)`, `Bash(./scripts/*)`) to the allow list.
|
|
615
|
+
|
|
616
|
+
**Ask the user whether to allow (potentially destructive):**
|
|
617
|
+
- `Bash(git push*)` — pushes to remote
|
|
618
|
+
- `Bash(git merge*)` — merging branches
|
|
619
|
+
- `Bash(git rebase*)` — rewriting history
|
|
620
|
+
- `Bash(git reset*)` — resetting state
|
|
621
|
+
- `Bash(git clean*)` — removing untracked files
|
|
622
|
+
- `Bash(rm *)` — deleting files
|
|
623
|
+
- `Bash(npm install*)`, `Bash(pip install*)`, `Bash(cargo add*)`, etc. — installing/modifying dependencies
|
|
624
|
+
|
|
625
|
+
Present the user with the proposed permission configuration and ask for approval before writing to `.claude/settings.json`. Explain that they can always adjust permissions later by editing the file directly.
|
|
626
|
+
|
|
627
|
+
#### 6h. Git Hygiene Setup
|
|
628
|
+
|
|
629
|
+
Based on the project type detected in Phase 3, check and offer to create or update git configuration files.
|
|
630
|
+
|
|
631
|
+
**`.gitignore`:**
|
|
632
|
+
- Check if `.gitignore` exists. If it does, review it for completeness against the detected stack.
|
|
633
|
+
- If missing or incomplete, generate one appropriate for the language/stack. Use standard patterns:
|
|
634
|
+
- **Node/TypeScript:** `node_modules/`, `dist/`, `.env`, `.env.local`, `*.tsbuildinfo`
|
|
635
|
+
- **Go:** binary output dirs, `vendor/` (if not vendoring), `.env`
|
|
636
|
+
- **Python:** `__pycache__/`, `*.pyc`, `.venv/`, `venv/`, `dist/`, `*.egg-info/`, `.env`
|
|
637
|
+
- **Rust:** `target/`, `Cargo.lock` (for libraries only)
|
|
638
|
+
- **.NET/C#:** `bin/`, `obj/`, `*.user`, `*.suo`
|
|
639
|
+
- **Ruby:** `.bundle/`, `vendor/bundle/`, `*.gem`
|
|
640
|
+
- **Unity:** `Library/`, `Temp/`, `Obj/`, `Build/`, `Builds/`, `Logs/`, `UserSettings/`, `*.csproj`, `*.sln`
|
|
641
|
+
- Always include: `.env`, `.env.local`, `.env.*.local`, `.DS_Store`, `*.log`
|
|
642
|
+
- Always include Claude Code artifacts that shouldn't be committed: `.claude/settings.local.json`
|
|
643
|
+
- If a `.gitignore` already exists, show what entries would be added and ask before modifying.
|
|
644
|
+
|
|
645
|
+
**`.gitattributes`:**
|
|
646
|
+
- Check if `.gitattributes` exists. If the project uses file types that benefit from explicit line-ending or diff handling, offer to create one:
|
|
647
|
+
- Text normalization (`* text=auto`)
|
|
648
|
+
- Language-specific diff drivers (e.g., `*.swift diff=swift`, `*.cs diff=csharp`)
|
|
649
|
+
- Binary file markers for known binary types in the project (e.g., `*.png binary`, `*.fbx binary`, `*.unity binary`)
|
|
650
|
+
- If the project doesn't need special handling, skip this — don't create it just for the sake of it.
|
|
651
|
+
|
|
652
|
+
**Git LFS:**
|
|
653
|
+
- Scan the repo for large binary files or binary-heavy directories (e.g., assets, models, textures, `.fbx`, `.png`, `.psd`, `.unitypackage`, `.dll`).
|
|
654
|
+
- If large binaries are found or the project type commonly uses them (e.g., Unity, game dev):
|
|
655
|
+
- Check if Git LFS is already configured (`git lfs install` / `.gitattributes` LFS entries).
|
|
656
|
+
- If not configured, **alert the user**: explain that large binaries can bloat the repo and suggest setting up Git LFS. Offer to configure it with appropriate track patterns.
|
|
657
|
+
- If already configured, verify the tracked patterns cover the binary types present.
|
|
658
|
+
- If the project has no binary files and the stack doesn't typically need LFS, skip silently.
|
|
659
|
+
|
|
660
|
+
For all files in this step: show the proposed content, ask for approval, and only write after confirmation.
|
|
661
|
+
|
|
662
|
+
---
|
|
663
|
+
|
|
664
|
+
### Phase 7: Verify and Report
|
|
665
|
+
|
|
666
|
+
After generating all files:
|
|
667
|
+
|
|
668
|
+
1. List the files created and their paths
|
|
669
|
+
2. Show a quick summary of what each command does (`/feature`, `/discuss`, `/start`, `/resume`, `/review`)
|
|
670
|
+
3. Suggest the user try `/feature` to spec out their first feature, or `/start {EXAMPLE_TASK_ID}` to begin an existing task
|
|
671
|
+
4. Mention they can re-run `/bootstrap` to regenerate if needed
|
|
672
|
+
|
|
673
|
+
---
|
|
674
|
+
|
|
675
|
+
## Provider Reference
|
|
676
|
+
|
|
677
|
+
Use these patterns when generating provider-specific sections:
|
|
678
|
+
|
|
679
|
+
### Jira
|
|
680
|
+
- **Fetch task:** Use `jira-task-manager` agent or `mcp__atlassian__getJiraIssue` tool
|
|
681
|
+
- **Task ID pattern:** `{PROJECT_KEY}-\d+` (e.g., `PROJ-1234`)
|
|
682
|
+
- **Transition:** Use `jira-task-manager` agent to transition status
|
|
683
|
+
- **Comment:** Use `jira-task-manager` agent to add comments
|
|
684
|
+
- **Branch extraction regex:** Extract `{PROJECT_KEY}-\d+` from branch name
|
|
685
|
+
- **CLAUDE.md config:**
|
|
686
|
+
```
|
|
687
|
+
- **Provider:** Jira
|
|
688
|
+
- **Instance:** {instance_url}
|
|
689
|
+
- **Cloud ID:** {cloud_id}
|
|
690
|
+
- **Project key:** {project_key}
|
|
691
|
+
```
|
|
692
|
+
|
|
693
|
+
### Linear
|
|
694
|
+
- **Fetch task:** Use Linear MCP tools if available, or `linear` CLI
|
|
695
|
+
- **Task ID pattern:** `{TEAM}-\d+` (e.g., `ENG-123`)
|
|
696
|
+
- **Transition:** Update issue state via Linear API/MCP
|
|
697
|
+
- **Comment:** Add comment via Linear API/MCP
|
|
698
|
+
- **Branch extraction regex:** Extract `{TEAM}-\d+` from branch name
|
|
699
|
+
|
|
700
|
+
### GitHub Issues
|
|
701
|
+
- **Fetch task:** Use `gh issue view {NUMBER}` via Bash
|
|
702
|
+
- **Task ID pattern:** `#\d+` or just the number
|
|
703
|
+
- **Transition:** Use `gh issue close` or label changes
|
|
704
|
+
- **Comment:** Use `gh issue comment {NUMBER} -b "message"`
|
|
705
|
+
- **Branch extraction regex:** Extract number from branch name
|
|
706
|
+
|
|
707
|
+
### Asana
|
|
708
|
+
- **Fetch task:** Use Asana MCP tools if available, or `asana` CLI (`asana tasks get {TASK_GID}`)
|
|
709
|
+
- **Task ID pattern:** Numeric GID (e.g., `1234567890123`) — Asana uses long numeric IDs
|
|
710
|
+
- **Transition:** Move task to a different section/column via Asana API/MCP, or update custom status field
|
|
711
|
+
- **Comment:** Add story (comment) to task via Asana API/MCP or `asana stories create --task {TASK_GID}`
|
|
712
|
+
- **Branch extraction regex:** Extract numeric GID from branch name (e.g., `feature/1234567890123-task-name`)
|
|
713
|
+
- **CLAUDE.md config:**
|
|
714
|
+
```
|
|
715
|
+
- **Provider:** Asana
|
|
716
|
+
- **Workspace GID:** {workspace_gid}
|
|
717
|
+
- **Project GID:** {project_gid}
|
|
718
|
+
```
|
|
719
|
+
|
|
720
|
+
### None / Manual
|
|
721
|
+
- **Fetch task:** Skip or ask user to describe the task
|
|
722
|
+
- **Task ID pattern:** User-defined or free-form
|
|
723
|
+
- **Transition:** Skip
|
|
724
|
+
- **Comment:** Skip
|
|
725
|
+
- **Branch extraction:** Use full branch name as context
|