glori-builder 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/.claude/CLAUDE.md +66 -0
- package/.claude/agents/architect.md +69 -0
- package/.claude/agents/database-architect.md +36 -0
- package/.claude/agents/designer.md +33 -0
- package/.claude/agents/developer.md +34 -0
- package/.claude/agents/git-workflow.md +60 -0
- package/.claude/agents/nextjs-migrator.md +28 -0
- package/.claude/agents/product-manager.md +44 -0
- package/.claude/agents/qa.md +44 -0
- package/.claude/agents/reviewer.md +55 -0
- package/.claude/agents/security-reviewer.md +34 -0
- package/.claude/agents/test-writer.md +26 -0
- package/.claude/commands/auto-pilot.md +228 -0
- package/.claude/commands/commit.md +7 -0
- package/.claude/commands/create-rules.md +356 -0
- package/.claude/commands/deploy-setup.md +158 -0
- package/.claude/commands/execute.md +101 -0
- package/.claude/commands/issue-prd.md +108 -0
- package/.claude/commands/issue-rework.md +272 -0
- package/.claude/commands/plan-feature.md +433 -0
- package/.claude/commands/plan-project.md +452 -0
- package/.claude/commands/prime.md +100 -0
- package/.claude/commands/project-setup.md +187 -0
- package/.claude/commands/quetrex-docs.md +188 -0
- package/.claude/commands/quetrex-setup.md +159 -0
- package/.claude/commands/quetrex-update.md +59 -0
- package/.claude/commands/secrets.md +122 -0
- package/.claude/commands/update-rules.md +143 -0
- package/.claude/hooks/auto-format.sh +27 -0
- package/.claude/hooks/check-quetrex-update.sh +34 -0
- package/.claude/hooks/enforce-branch.sh +66 -0
- package/.claude/hooks/security-check.sh +39 -0
- package/.claude/settings.json +89 -0
- package/.claude/skills/agent-browser/SKILL.md +251 -0
- package/.claude/skills/domain-capture/SKILL.md +385 -0
- package/.claude/skills/e2e-test/SKILL.md +213 -0
- package/.claude/skills/merge-issue/SKILL.md +126 -0
- package/.claude/skills/qa-verify/SKILL.md +194 -0
- package/.claude/skills/story-builder/SKILL.md +231 -0
- package/.claude/skills/tab-control/SKILL.md +92 -0
- package/.claude/statusline-command.sh +159 -0
- package/.claude/team-protocol.md +28 -0
- package/README.md +86 -0
- package/install.js +102 -0
- package/package.json +34 -0
|
@@ -0,0 +1,452 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Plan a new greenfield project: gather requirements, generate PRD, create a Linear project and all tasks with dependencies"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Plan Project: From Idea to Linear
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
This command guides you through planning any new software project. A conversational interview captures requirements, a comprehensive PRD is generated, a new Linear project is created, then all tasks are created with correct priorities, sort order, and dependencies. Issue creation uses Python to guarantee reliable JSON escaping.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Phase 1: Discovery Interview
|
|
14
|
+
|
|
15
|
+
Ask ONE question at a time. After every answer, confirm what you heard in one sentence before moving on. Never ask all questions at once. Adapt depth to project type — skip irrelevant rounds entirely.
|
|
16
|
+
|
|
17
|
+
### Round 1: The Big Picture
|
|
18
|
+
|
|
19
|
+
**Q1** — "Tell me about your project in a few sentences. What does it do and who is it for?"
|
|
20
|
+
|
|
21
|
+
Classify as: Script/CLI · API/Backend · Web App · Mobile App · Library/Package · Full Platform. Tell the user which type you detected and confirm before continuing.
|
|
22
|
+
|
|
23
|
+
**Q2** — "What's the main pain point this solves? Why would someone use this instead of what already exists?"
|
|
24
|
+
|
|
25
|
+
**Q3** — "Describe your ideal user. Technical or non-technical? Individual or team? What's their experience level?"
|
|
26
|
+
|
|
27
|
+
### Round 2: Scope and Features
|
|
28
|
+
|
|
29
|
+
**Q4** — "List the 3-5 most important things this needs to do on day one. What's the bare minimum to be genuinely useful?"
|
|
30
|
+
|
|
31
|
+
**Q5** — "What features are tempting but should wait for later? What's explicitly out of v1?"
|
|
32
|
+
|
|
33
|
+
### Round 3: Technical Preferences
|
|
34
|
+
|
|
35
|
+
**Q6** — "Do you have a preferred tech stack, or should I recommend one based on your project type?"
|
|
36
|
+
|
|
37
|
+
If no preference: recommend based on project type and CLAUDE.md defaults. Present a short recommendation and confirm. Example: "For a web app like this, I'd suggest Next.js with TypeScript and PostgreSQL. Does that work?"
|
|
38
|
+
|
|
39
|
+
**Q7** — "Are we starting from scratch, or building on top of something that exists?"
|
|
40
|
+
|
|
41
|
+
### Round 4: Design and UX (UI projects only — skip for CLI/API/Library)
|
|
42
|
+
|
|
43
|
+
**Q8** — "What vibe are you going for? Clean/minimal, bold/colorful, dark mode, corporate, playful, developer-focused? Or share a site you admire."
|
|
44
|
+
|
|
45
|
+
**Q9** — "Walk me through the main screens. What does a user see first? Where do they go next? What's the most important view?"
|
|
46
|
+
|
|
47
|
+
### Round 5: Infrastructure and Integrations
|
|
48
|
+
|
|
49
|
+
**Q10** — "Do users need accounts? If so, how do they sign in — email/password, Google, GitHub, magic link?" (skip for scripts and libraries)
|
|
50
|
+
|
|
51
|
+
**Q11** — "Will this have paid features or subscriptions? What's free vs paid?" (only if the project suggests monetization)
|
|
52
|
+
|
|
53
|
+
**Q12** — "Does this connect to any external services? Email, AI APIs, payments, analytics, file storage?"
|
|
54
|
+
|
|
55
|
+
**Q13** — "Where should this run? Vercel, Fly.io, AWS, a VPS, or local only?"
|
|
56
|
+
|
|
57
|
+
### Round 6: Quality and Process
|
|
58
|
+
|
|
59
|
+
**Q14** — "How thorough should testing be? Basic (smoke tests only), standard (unit + integration), or comprehensive (full coverage with E2E)?"
|
|
60
|
+
|
|
61
|
+
**Q15** — "Anything I missed? Hard constraints, strong opinions, or requirements that haven't come up?"
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Phase 2: PRD Generation
|
|
66
|
+
|
|
67
|
+
Write a comprehensive PRD to `.claude/prds/{project-slug}-prd.md`. Adapt section depth to project type.
|
|
68
|
+
|
|
69
|
+
Every PRD must include:
|
|
70
|
+
|
|
71
|
+
1. **Executive Summary** — What it is, why it exists, who it serves (2-3 paragraphs)
|
|
72
|
+
2. **Mission** — Core purpose and 3-5 guiding principles
|
|
73
|
+
3. **Target Users** — Personas, pain points, skill level
|
|
74
|
+
4. **MVP Scope** — Checklist: `- [x]` in scope, `- [ ]` deferred
|
|
75
|
+
5. **User Stories** — 5-8 stories: "As a [user], I want to [action], so that [benefit]"
|
|
76
|
+
6. **Core Architecture** — Directory structure, data flow, key patterns
|
|
77
|
+
7. **Feature Specifications** — Detailed spec per feature
|
|
78
|
+
8. **Technology Stack** — Specific libraries and versions
|
|
79
|
+
9. **Security and Configuration** — Auth approach, env vars, rate limiting
|
|
80
|
+
10. **API Specification** — Endpoints, request/response shapes (if applicable)
|
|
81
|
+
11. **Database Schema** — Full schema with ORM notation (if applicable)
|
|
82
|
+
12. **Success Criteria** — Measurable outcomes
|
|
83
|
+
13. **Implementation Phases** — 3-4 ordered phases with deliverables
|
|
84
|
+
14. **Risks and Mitigations** — 3-5 key risks
|
|
85
|
+
|
|
86
|
+
For UI projects, also include: design system (colors, typography, spacing), page specifications, interaction and animation notes.
|
|
87
|
+
|
|
88
|
+
Present a summary and ask: "Does this capture everything accurately? Anything to add or change before I create the Linear tasks?" Wait for explicit confirmation.
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Phase 3: Task Breakdown
|
|
93
|
+
|
|
94
|
+
Break the PRD into discrete, implementable tasks.
|
|
95
|
+
|
|
96
|
+
**Rules:**
|
|
97
|
+
- Each task = 2-4 hours of AI implementation time
|
|
98
|
+
- Dependencies are explicit — each task lists which indices it blocks on (0-based)
|
|
99
|
+
- Tasks are self-contained — enough context to implement without follow-up questions
|
|
100
|
+
- Tests are specified in every task description
|
|
101
|
+
- Tasks are ordered by execution sequence — earlier tasks unblock later ones
|
|
102
|
+
|
|
103
|
+
**Priority assignment:**
|
|
104
|
+
|
|
105
|
+
| Phase | Priority Label | Value |
|
|
106
|
+
|---|---|---|
|
|
107
|
+
| Phase 1 — Foundation / Setup | Urgent | 1 |
|
|
108
|
+
| Phase 2 — Core Features | High | 2 |
|
|
109
|
+
| Phase 3 — Secondary Features | Medium | 3 |
|
|
110
|
+
| Phase 4 — Polish and Launch | Low | 4 |
|
|
111
|
+
|
|
112
|
+
Within each phase: tasks that block the most others get higher priority (lower number).
|
|
113
|
+
|
|
114
|
+
**Sort order:** `sortOrder = task_execution_index * 100`
|
|
115
|
+
|
|
116
|
+
**Task format for review:**
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
[0] Setup: Initialize repository and tooling (Phase 1 | Urgent | 1pt | sortOrder: 0)
|
|
120
|
+
Deps: none
|
|
121
|
+
Tests: All scripts run without errors
|
|
122
|
+
|
|
123
|
+
[1] Database: Create schema and migrations (Phase 1 | Urgent | 2pt | sortOrder: 100)
|
|
124
|
+
Deps: [0]
|
|
125
|
+
Tests: Migration runs cleanly, rollback works
|
|
126
|
+
|
|
127
|
+
[2] Auth: Implement sign-up and sign-in (Phase 2 | High | 3pt | sortOrder: 200)
|
|
128
|
+
Deps: [0], [1]
|
|
129
|
+
Tests: Unit tests for token generation, E2E for login flow
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Estimate mapping: 2h = 1pt, 3h = 2pt, 4h = 3pt.
|
|
133
|
+
|
|
134
|
+
Ask: "Here are the {N} tasks I will create in Linear. Want to review or adjust anything before I create them?" Wait for confirmation.
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Phase 4: Linear Integration
|
|
139
|
+
|
|
140
|
+
### Step 1: Verify API Key
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
echo "${LINEAR_API_KEY:+set}"
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
If `$LINEAR_API_KEY` is not set, stop and tell the user:
|
|
147
|
+
> "LINEAR_API_KEY is not set. Run /quetrex-setup to configure it, or run `/secrets add LINEAR_API_KEY` if you have already run setup."
|
|
148
|
+
|
|
149
|
+
### Step 2: Fetch and Select Team
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
curl -s -X POST https://api.linear.app/graphql \
|
|
153
|
+
-H "Authorization: $LINEAR_API_KEY" \
|
|
154
|
+
-H "Content-Type: application/json" \
|
|
155
|
+
-d '{"query": "{ teams { nodes { id name key } } }"}'
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Present the team list and ask: "Which team should this project go under?"
|
|
159
|
+
|
|
160
|
+
### Step 3: Fetch States and Labels, Create the Linear Project
|
|
161
|
+
|
|
162
|
+
Using the selected team ID, fetch workflow states and labels:
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
LINEAR_API_KEY=$(security find-generic-password -s "linear-api-key" -a "$(whoami)" -w 2>/dev/null)
|
|
166
|
+
curl -s -X POST https://api.linear.app/graphql \
|
|
167
|
+
-H "Authorization: $LINEAR_API_KEY" \
|
|
168
|
+
-H "Content-Type: application/json" \
|
|
169
|
+
-d '{"query": "{ team(id: \"TEAM_ID\") { labels { nodes { id name } } states { nodes { id name type } } } }"}'
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Identify the Backlog state (type: `backlog`).
|
|
173
|
+
|
|
174
|
+
Check if an "ai" label exists. If not, create it:
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
LINEAR_API_KEY=$(security find-generic-password -s "linear-api-key" -a "$(whoami)" -w 2>/dev/null)
|
|
178
|
+
curl -s -X POST https://api.linear.app/graphql \
|
|
179
|
+
-H "Authorization: $LINEAR_API_KEY" \
|
|
180
|
+
-H "Content-Type: application/json" \
|
|
181
|
+
-d '{"query": "mutation { issueLabelCreate(input: { teamId: \"TEAM_ID\", name: \"ai\", color: \"#6366f1\" }) { success issueLabel { id name } } }"}'
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
**Create the new Linear project** for this greenfield work:
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
LINEAR_API_KEY=$(security find-generic-password -s "linear-api-key" -a "$(whoami)" -w 2>/dev/null)
|
|
188
|
+
curl -s -X POST https://api.linear.app/graphql \
|
|
189
|
+
-H "Authorization: $LINEAR_API_KEY" \
|
|
190
|
+
-H "Content-Type: application/json" \
|
|
191
|
+
-d '{"query": "mutation { projectCreate(input: { teamIds: [\"TEAM_ID\"], name: \"PROJECT_NAME\", description: \"PROJECT_DESCRIPTION\", state: planned }) { success project { id name } } }"}'
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Use the project name from the PRD and a one-sentence description from the Executive Summary. Record the returned project ID.
|
|
195
|
+
|
|
196
|
+
### Step 4: Create Issues Using Python
|
|
197
|
+
|
|
198
|
+
**CRITICAL**: Use Python — not bash or curl — to create issues. Task descriptions contain multi-line text, special characters, and code blocks that break shell quoting.
|
|
199
|
+
|
|
200
|
+
#### Step 4a: Write task data to `/tmp/linear-tasks.json`
|
|
201
|
+
|
|
202
|
+
```json
|
|
203
|
+
{
|
|
204
|
+
"teamId": "TEAM_UUID",
|
|
205
|
+
"projectId": "PROJECT_UUID",
|
|
206
|
+
"stateId": "BACKLOG_STATE_UUID",
|
|
207
|
+
"labelIds": ["AI_LABEL_UUID"],
|
|
208
|
+
"tasks": [
|
|
209
|
+
{
|
|
210
|
+
"title": "Setup: Initialize repository and tooling",
|
|
211
|
+
"description": "Full task description with all context, subtasks, and test requirements.\n\n## Subtasks\n- [ ] ...\n\n## Tests\n- ...",
|
|
212
|
+
"estimate": 1,
|
|
213
|
+
"priority": 1,
|
|
214
|
+
"sortOrder": 0,
|
|
215
|
+
"deps": []
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"title": "Database: Create schema and migrations",
|
|
219
|
+
"description": "...",
|
|
220
|
+
"estimate": 2,
|
|
221
|
+
"priority": 1,
|
|
222
|
+
"sortOrder": 100,
|
|
223
|
+
"deps": [0]
|
|
224
|
+
}
|
|
225
|
+
]
|
|
226
|
+
}
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
Write every task from Phase 3 into this array with full descriptions — not summaries.
|
|
230
|
+
|
|
231
|
+
#### Step 4b: Write the Python script to `/tmp/create-linear-issues.py`
|
|
232
|
+
|
|
233
|
+
```python
|
|
234
|
+
#!/usr/bin/env python3
|
|
235
|
+
"""Create Linear issues from a task JSON file."""
|
|
236
|
+
import json
|
|
237
|
+
import subprocess
|
|
238
|
+
import urllib.request
|
|
239
|
+
import sys
|
|
240
|
+
import time
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
def get_api_key():
|
|
244
|
+
result = subprocess.run(
|
|
245
|
+
[
|
|
246
|
+
"security",
|
|
247
|
+
"find-generic-password",
|
|
248
|
+
"-s", "linear-api-key",
|
|
249
|
+
"-a", subprocess.check_output(["whoami"]).decode().strip(),
|
|
250
|
+
"-w",
|
|
251
|
+
],
|
|
252
|
+
capture_output=True,
|
|
253
|
+
text=True,
|
|
254
|
+
)
|
|
255
|
+
if result.returncode != 0:
|
|
256
|
+
print("ERROR: No Linear API key found in keychain", file=sys.stderr)
|
|
257
|
+
sys.exit(1)
|
|
258
|
+
return result.stdout.strip()
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
def gql(api_key, query):
|
|
262
|
+
data = json.dumps({"query": query}).encode()
|
|
263
|
+
req = urllib.request.Request(
|
|
264
|
+
"https://api.linear.app/graphql",
|
|
265
|
+
data=data,
|
|
266
|
+
headers={
|
|
267
|
+
"Authorization": api_key,
|
|
268
|
+
"Content-Type": "application/json",
|
|
269
|
+
},
|
|
270
|
+
)
|
|
271
|
+
with urllib.request.urlopen(req) as resp:
|
|
272
|
+
return json.loads(resp.read())
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
def create_issue(api_key, team_id, project_id, state_id, label_ids, task):
|
|
276
|
+
title = json.dumps(task["title"])[1:-1]
|
|
277
|
+
desc = json.dumps(task["description"])[1:-1]
|
|
278
|
+
labels_str = ", ".join(f'"{lid}"' for lid in label_ids)
|
|
279
|
+
|
|
280
|
+
query = f'''mutation {{
|
|
281
|
+
issueCreate(input: {{
|
|
282
|
+
teamId: "{team_id}",
|
|
283
|
+
projectId: "{project_id}",
|
|
284
|
+
title: "{title}",
|
|
285
|
+
description: "{desc}",
|
|
286
|
+
estimate: {task["estimate"]},
|
|
287
|
+
priority: {task["priority"]},
|
|
288
|
+
sortOrder: {task["sortOrder"]},
|
|
289
|
+
stateId: "{state_id}",
|
|
290
|
+
labelIds: [{labels_str}]
|
|
291
|
+
}}) {{
|
|
292
|
+
success
|
|
293
|
+
issue {{
|
|
294
|
+
id
|
|
295
|
+
identifier
|
|
296
|
+
}}
|
|
297
|
+
}}
|
|
298
|
+
}}'''
|
|
299
|
+
|
|
300
|
+
result = gql(api_key, query)
|
|
301
|
+
issue_data = result.get("data", {}).get("issueCreate", {})
|
|
302
|
+
if issue_data.get("success"):
|
|
303
|
+
issue = issue_data["issue"]
|
|
304
|
+
return {"id": issue["id"], "identifier": issue["identifier"]}
|
|
305
|
+
else:
|
|
306
|
+
print(
|
|
307
|
+
f"FAILED: {task['title'][:60]} - {json.dumps(result)[:300]}",
|
|
308
|
+
file=sys.stderr,
|
|
309
|
+
)
|
|
310
|
+
return None
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
def create_dependency(api_key, blocked_id, blocker_id):
|
|
314
|
+
query = f'''mutation {{
|
|
315
|
+
issueRelationCreate(input: {{
|
|
316
|
+
issueId: "{blocked_id}",
|
|
317
|
+
relatedIssueId: "{blocker_id}",
|
|
318
|
+
type: blocks
|
|
319
|
+
}}) {{
|
|
320
|
+
success
|
|
321
|
+
}}
|
|
322
|
+
}}'''
|
|
323
|
+
gql(api_key, query)
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
def main():
|
|
327
|
+
with open("/tmp/linear-tasks.json") as f:
|
|
328
|
+
config = json.load(f)
|
|
329
|
+
|
|
330
|
+
api_key = get_api_key()
|
|
331
|
+
team_id = config["teamId"]
|
|
332
|
+
project_id = config["projectId"]
|
|
333
|
+
state_id = config["stateId"]
|
|
334
|
+
label_ids = config["labelIds"]
|
|
335
|
+
tasks = config["tasks"]
|
|
336
|
+
|
|
337
|
+
print(f"Creating {len(tasks)} issues...")
|
|
338
|
+
created = []
|
|
339
|
+
|
|
340
|
+
for i, task in enumerate(tasks):
|
|
341
|
+
result = create_issue(api_key, team_id, project_id, state_id, label_ids, task)
|
|
342
|
+
if result:
|
|
343
|
+
created.append(result)
|
|
344
|
+
print(f" [{i}] Created: {result['identifier']} - {task['title'][:60]}")
|
|
345
|
+
else:
|
|
346
|
+
created.append(None)
|
|
347
|
+
time.sleep(0.3)
|
|
348
|
+
|
|
349
|
+
print("\nSetting dependencies...")
|
|
350
|
+
dep_count = 0
|
|
351
|
+
for i, task in enumerate(tasks):
|
|
352
|
+
if not created[i]:
|
|
353
|
+
continue
|
|
354
|
+
for dep_idx in task.get("deps", []):
|
|
355
|
+
if dep_idx < len(created) and created[dep_idx]:
|
|
356
|
+
create_dependency(api_key, created[i]["id"], created[dep_idx]["id"])
|
|
357
|
+
print(
|
|
358
|
+
f" {created[i]['identifier']} blocked by {created[dep_idx]['identifier']}"
|
|
359
|
+
)
|
|
360
|
+
dep_count += 1
|
|
361
|
+
time.sleep(0.2)
|
|
362
|
+
|
|
363
|
+
if dep_count == 0:
|
|
364
|
+
print(" No dependencies to set.")
|
|
365
|
+
|
|
366
|
+
output = {
|
|
367
|
+
"issues": [c for c in created if c],
|
|
368
|
+
"total": len([c for c in created if c]),
|
|
369
|
+
"failed": len([c for c in created if c is None]),
|
|
370
|
+
}
|
|
371
|
+
with open("/tmp/linear-issues-result.json", "w") as f:
|
|
372
|
+
json.dump(output, f, indent=2)
|
|
373
|
+
|
|
374
|
+
print(f"\nDone. Created {output['total']} issues, {output['failed']} failed.")
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
if __name__ == "__main__":
|
|
378
|
+
main()
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
#### Step 4c: Execute
|
|
382
|
+
|
|
383
|
+
```bash
|
|
384
|
+
python3 /tmp/create-linear-issues.py
|
|
385
|
+
cat /tmp/linear-issues-result.json
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
If any issues failed, report which tasks failed and offer to retry.
|
|
389
|
+
|
|
390
|
+
### Step 5: Commit the PRD
|
|
391
|
+
|
|
392
|
+
```bash
|
|
393
|
+
git add .claude/prds/
|
|
394
|
+
git commit -m "docs: add PRD for {project-name}"
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
Skip silently if not in a git repository.
|
|
398
|
+
|
|
399
|
+
---
|
|
400
|
+
|
|
401
|
+
## Phase 5: Summary
|
|
402
|
+
|
|
403
|
+
```
|
|
404
|
+
Project planned.
|
|
405
|
+
|
|
406
|
+
PRD: .claude/prds/{project-slug}-prd.md
|
|
407
|
+
Linear: {N} issues created in {Team} / {Project Name}
|
|
408
|
+
|
|
409
|
+
Epics:
|
|
410
|
+
- {Epic 1}: {N} issues
|
|
411
|
+
- {Epic 2}: {N} issues
|
|
412
|
+
|
|
413
|
+
Parallel execution batches:
|
|
414
|
+
Batch 1 (start here, no dependencies): {identifiers}
|
|
415
|
+
Batch 2 (after Batch 1 completes): {identifiers}
|
|
416
|
+
Batch 3 (after Batch 2 completes): {identifiers}
|
|
417
|
+
|
|
418
|
+
To start implementation:
|
|
419
|
+
Manual: /issue-prd {FIRST-ISSUE-IDENTIFIER} — work issues one at a time
|
|
420
|
+
Auto-pilot: /auto-pilot {LINEAR-PROJECT-ID} — walk away and let Glori Builder finish everything
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
Show batches as groups of tasks with no mutual dependencies. This tells you exactly which issues can be worked simultaneously and which must wait.
|
|
424
|
+
|
|
425
|
+
---
|
|
426
|
+
|
|
427
|
+
## Adaptive Behavior
|
|
428
|
+
|
|
429
|
+
| Project Type | Interview Rounds | Typical Task Count | PRD Depth |
|
|
430
|
+
|---|---|---|---|
|
|
431
|
+
| Script / CLI | 1, 2, 3, 6 only | 5-10 | Minimal |
|
|
432
|
+
| API / Backend | 1, 2, 3, 5, 6 | 10-20 | Standard |
|
|
433
|
+
| Web App | All rounds | 15-25 | Full |
|
|
434
|
+
| Full Platform | All rounds + follow-ups | 25-45 | Comprehensive |
|
|
435
|
+
|
|
436
|
+
- Do not ask about color schemes for a CLI tool
|
|
437
|
+
- Do not skip auth questions for a platform
|
|
438
|
+
- Do not ask about deployment for a library
|
|
439
|
+
- If the user does not know an answer, make a concrete recommendation and confirm it
|
|
440
|
+
|
|
441
|
+
---
|
|
442
|
+
|
|
443
|
+
## Notes
|
|
444
|
+
|
|
445
|
+
- Linear API key must come from macOS keychain — never hardcoded, never from env vars
|
|
446
|
+
- Python handles all JSON escaping via `json.dumps` — never escape descriptions manually
|
|
447
|
+
- `sortOrder` places tasks in execution sequence in Linear's UI — always set it
|
|
448
|
+
- `priority` is set on every issue — never leave it as the Linear default
|
|
449
|
+
- `deps` indices are 0-based and refer to position in the `tasks` array
|
|
450
|
+
- The PRD is the source of truth — tasks are derived from it, not the other way around
|
|
451
|
+
- This command never writes application code, only planning documents and Linear issues
|
|
452
|
+
- If Linear API calls fail due to rate limits, increase `time.sleep()` delays in the Python script
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Prime agent with codebase understanding
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Prime: Load Project Context
|
|
6
|
+
|
|
7
|
+
## Objective
|
|
8
|
+
|
|
9
|
+
Build comprehensive understanding of the codebase by analyzing structure, documentation, and key files.
|
|
10
|
+
|
|
11
|
+
## Process
|
|
12
|
+
|
|
13
|
+
### 1. Analyze Project Structure
|
|
14
|
+
|
|
15
|
+
List all tracked files:
|
|
16
|
+
!`git ls-files`
|
|
17
|
+
|
|
18
|
+
Show directory structure:
|
|
19
|
+
On Linux, run: `tree -L 3 -I 'node_modules|__pycache__|.git|dist|build'`
|
|
20
|
+
|
|
21
|
+
### 2. Check Project Health
|
|
22
|
+
|
|
23
|
+
**Check for CLAUDE.md** at the project root. If it does not exist, tell the user:
|
|
24
|
+
|
|
25
|
+
> "No CLAUDE.md found at project root. Run `/create-rules` to generate one from the codebase. This file is essential for giving Claude consistent context across sessions."
|
|
26
|
+
|
|
27
|
+
**Check for `.github/workflows/`**. If the directory does not exist or is empty, tell the user:
|
|
28
|
+
|
|
29
|
+
> "No CI workflows found in .github/workflows/. Run `/create-rules` to generate a quality gate workflow. This ensures type-check, lint, tests, and builds run on every pull request."
|
|
30
|
+
|
|
31
|
+
**Check for existing PRDs** in `.claude/prds/`. List any `.md` files found (excluding `.gitkeep`):
|
|
32
|
+
!`ls .claude/prds/ 2>/dev/null | grep -v .gitkeep || echo "No PRDs found"`
|
|
33
|
+
|
|
34
|
+
If PRDs exist, display them as a list so the agent knows what work is in progress or has been planned.
|
|
35
|
+
|
|
36
|
+
### 3. Read Core Documentation
|
|
37
|
+
|
|
38
|
+
- Read `CLAUDE.md` if it exists
|
|
39
|
+
- Read `README.md` at project root
|
|
40
|
+
- Read any architecture documentation in `.agents/` or `docs/`
|
|
41
|
+
- Read the drizzle config if present so you understand the database schema
|
|
42
|
+
|
|
43
|
+
### 4. Identify Key Files
|
|
44
|
+
|
|
45
|
+
Based on the structure, identify and read:
|
|
46
|
+
- Main entry points (main.py, index.ts, app.py, src/app/layout.tsx, etc.)
|
|
47
|
+
- Core configuration files (pyproject.toml, package.json, tsconfig.json, biome.json)
|
|
48
|
+
- Key model/schema definitions
|
|
49
|
+
- Important service or controller files
|
|
50
|
+
|
|
51
|
+
### 5. Understand Current State
|
|
52
|
+
|
|
53
|
+
Check recent activity:
|
|
54
|
+
!`git log -10 --oneline`
|
|
55
|
+
|
|
56
|
+
Check current branch and status:
|
|
57
|
+
!`git status`
|
|
58
|
+
|
|
59
|
+
Check current branch name:
|
|
60
|
+
!`git branch --show-current`
|
|
61
|
+
|
|
62
|
+
## Output Report
|
|
63
|
+
|
|
64
|
+
Provide a concise summary covering:
|
|
65
|
+
|
|
66
|
+
### Project Overview
|
|
67
|
+
- Purpose and type of application
|
|
68
|
+
- Primary technologies and frameworks
|
|
69
|
+
- Current version/state
|
|
70
|
+
|
|
71
|
+
### Architecture
|
|
72
|
+
- Overall structure and organization
|
|
73
|
+
- Key architectural patterns identified
|
|
74
|
+
- Important directories and their purposes
|
|
75
|
+
|
|
76
|
+
### Tech Stack
|
|
77
|
+
- Languages and versions
|
|
78
|
+
- Frameworks and major libraries
|
|
79
|
+
- Build tools and package managers
|
|
80
|
+
- Testing frameworks
|
|
81
|
+
|
|
82
|
+
### Core Principles
|
|
83
|
+
- Code style and conventions observed
|
|
84
|
+
- Documentation standards
|
|
85
|
+
- Testing approach
|
|
86
|
+
|
|
87
|
+
### Current State
|
|
88
|
+
- Active branch
|
|
89
|
+
- Recent changes or development focus
|
|
90
|
+
- Any immediate observations or concerns
|
|
91
|
+
|
|
92
|
+
### PRDs in Progress
|
|
93
|
+
- List any PRDs found in `.claude/prds/` with their issue IDs
|
|
94
|
+
- Note if no PRDs exist yet
|
|
95
|
+
|
|
96
|
+
### Setup Gaps
|
|
97
|
+
- Missing CLAUDE.md (run `/create-rules` to fix)
|
|
98
|
+
- Missing CI workflows (run `/create-rules` to fix)
|
|
99
|
+
|
|
100
|
+
**Make this summary easy to scan - use bullet points and clear headers.**
|