Skip to content

Commit e669af8

Browse files
committed
docs: add GitHub issue creation guide to CLAUDE.md
Comprehensive documentation covering: - Workflow overview for Linear to GitHub process - Implementation plan format template - GitHub issue format template - Key formatting rules (HEREDOC, escaping, tables) - Meta tracker update process - Commit message format - Complete example workflow - Reference to existing implementation plans
1 parent d422cce commit e669af8

1 file changed

Lines changed: 299 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 299 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,3 +243,302 @@ npm run test # All tests must pass
243243
`docker-compose.yml` provides PostgreSQL 15, Redis 7, MinIO (S3-compatible storage).
244244

245245
API Dockerfile uses multi-stage build with non-root user.
246+
247+
## Creating GitHub Issues from Linear
248+
249+
This section documents the standard process for creating GitHub issues and implementation plans from Linear issues.
250+
251+
### Workflow Overview
252+
253+
1. **Fetch Linear Issue** - Get details from Linear API
254+
2. **Create Implementation Plan** - Write comprehensive `docs/SSC-XX-IMPLEMENTATION-PLAN.md`
255+
3. **Create GitHub Issue** - Create issue with standardized format
256+
4. **Commit & Push** - Commit implementation plan so links work
257+
5. **Update Meta Tracker** - Update issue #3 with new links
258+
6. **Verify CI/CD** - Ensure all checks pass
259+
260+
### Fetching Linear Issue Details
261+
262+
```bash
263+
curl -s -X POST https://api.linear.app/graphql \
264+
-H "Content-Type: application/json" \
265+
-H "Authorization: $LINEAR_API_KEY" \
266+
-d '{"query": "{ issue(id: \"SSC-XX\") { identifier title description state { name } priorityLabel labels { nodes { name } } } }"}'
267+
```
268+
269+
### Implementation Plan Format (`docs/SSC-XX-IMPLEMENTATION-PLAN.md`)
270+
271+
Every implementation plan should follow this structure:
272+
273+
```markdown
274+
# SSC-XX: [Title] - Implementation Plan
275+
276+
## Overview
277+
[2-3 paragraph description of the feature and its purpose]
278+
279+
**Priority**: [High/Medium/Low]
280+
**Feature Type**: [Premium Feature / B2B Feature / Cross-Platform, etc.]
281+
282+
## Tech Stack
283+
- **Backend**: [Technologies]
284+
- **Frontend**: [Technologies]
285+
- **Database**: [Technologies]
286+
- **Other**: [Any additional tech]
287+
288+
## Current State Analysis
289+
290+
### What Already Exists
291+
- [List existing infrastructure that can be leveraged]
292+
293+
### What Needs to Be Built
294+
1. [Numbered list of components to build]
295+
296+
## Implementation Stages (N Atomic Commits)
297+
298+
### Phase 1: [Phase Name] (Commits 1-X)
299+
300+
**Commit 1**: [Commit description]
301+
- [Details]
302+
- Code examples in fenced blocks
303+
304+
**Commit 2**: [Commit description]
305+
...
306+
307+
### Phase 2: [Phase Name] (Commits X-Y)
308+
...
309+
310+
## API Endpoints Summary
311+
312+
### [Endpoint Category]
313+
```
314+
METHOD /api/endpoint - Description (auth requirements)
315+
```
316+
317+
## Database Schema Changes
318+
319+
### New Models
320+
```prisma
321+
model ModelName {
322+
// Schema definition
323+
}
324+
```
325+
326+
## Component Structure
327+
328+
```
329+
apps/web/src/
330+
├── app/
331+
│ └── feature/
332+
├── components/
333+
│ └── feature/
334+
```
335+
336+
## Feature Requirements Checklist
337+
338+
### [Category]
339+
- [ ] Feature 1
340+
- [ ] Feature 2
341+
342+
## Success Criteria
343+
344+
- [ ] All N commits completed and passing CI
345+
- [ ] [Specific measurable criteria]
346+
347+
## Integration with Existing Features
348+
349+
### [Feature Name]
350+
- [How it integrates]
351+
352+
## Dependencies
353+
354+
This feature depends on:
355+
- [SSC-XX] ✅ Complete
356+
- [SSC-YY] - [Status]
357+
358+
## Future Enhancements
359+
360+
1. [Future enhancement 1]
361+
2. [Future enhancement 2]
362+
363+
## Notes
364+
365+
- [Important implementation notes]
366+
```
367+
368+
### GitHub Issue Format
369+
370+
Create issues using `gh issue create` with this structure:
371+
372+
```markdown
373+
# [Feature Title]
374+
375+
**Linear Issue**: SSC-XX
376+
**Priority**: [High/Medium/Low]
377+
**Feature Type**: [Type description]
378+
379+
## Overview
380+
381+
[Brief description - 2-3 sentences]
382+
383+
## Implementation Plan
384+
385+
📄 **Full implementation plan**: [docs/SSC-XX-IMPLEMENTATION-PLAN.md](link)
386+
387+
---
388+
389+
## Phase 1: [Phase Name] (Commits 1-X)
390+
391+
### Commit 1: [Description]
392+
393+
\`\`\`prisma
394+
// Key schema or code snippet
395+
\`\`\`
396+
397+
### Commit 2: [Description]
398+
...
399+
400+
---
401+
402+
## API Endpoints
403+
404+
| Method | Endpoint | Description |
405+
|--------|----------|-------------|
406+
| GET | \`/api/...\` | Description |
407+
| POST | \`/api/...\` | Description |
408+
409+
---
410+
411+
## Checklist
412+
413+
### [Category]
414+
- [ ] Task 1
415+
- [ ] Task 2
416+
417+
---
418+
419+
## Success Criteria
420+
421+
- [ ] Criterion 1
422+
- [ ] Criterion 2
423+
424+
---
425+
426+
## Dependencies
427+
428+
This feature depends on:
429+
- [Dependency] ✅ Complete
430+
```
431+
432+
### Key Formatting Rules
433+
434+
1. **Use HEREDOC for issue body** - Prevents shell escaping issues:
435+
```bash
436+
gh issue create --title "SSC-XX: Title" --body "$(cat <<'EOF'
437+
Issue content here...
438+
EOF
439+
)"
440+
```
441+
442+
2. **Escape backticks in code blocks** - Use `\`\`\`` in the heredoc for markdown code blocks
443+
444+
3. **Link to implementation plan** - Always include the full GitHub URL:
445+
```markdown
446+
📄 **Full implementation plan**: [docs/SSC-XX-IMPLEMENTATION-PLAN.md](https://github.com/Sakeeb91/StudySync/blob/main/docs/SSC-XX-IMPLEMENTATION-PLAN.md)
447+
```
448+
449+
4. **Use tables for API endpoints** - Makes them scannable:
450+
```markdown
451+
| Method | Endpoint | Description |
452+
|--------|----------|-------------|
453+
| GET | `/api/resource` | Get resource |
454+
```
455+
456+
5. **Organize with horizontal rules** - Use `---` between major sections
457+
458+
6. **Checklist format** - Use `- [ ]` for actionable items
459+
460+
### Updating the Meta Tracker (Issue #3)
461+
462+
After creating the issue and pushing the implementation plan:
463+
464+
1. **Update the Phase 2 table** - Add the new issue link and implementation plan link:
465+
```markdown
466+
| SSC-XX | Feature Title | Priority | 📋 Backlog | [#N](issue-url) | [SSC-XX Plan](plan-url) |
467+
```
468+
469+
2. **Update Implementation Priority Order** - Add checkmarks:
470+
```markdown
471+
X. **SSC-XX**: Feature Title
472+
- [x] Implementation plan created
473+
- [x] GitHub issue created: [#N](url)
474+
- [ ] Implementation started
475+
- [ ] Implementation complete
476+
```
477+
478+
3. **Update Subscription Feature Matrix** - If feature affects tiers:
479+
```markdown
480+
| Feature (SSC-XX) | ❌ | ✅ | ✅ | ✅ |
481+
```
482+
483+
### Commit Message Format
484+
485+
For implementation plans:
486+
```
487+
docs: add implementation plan for SSC-XX [Feature Title]
488+
489+
Comprehensive plan covering:
490+
- [Key aspect 1]
491+
- [Key aspect 2]
492+
- [Key aspect 3]
493+
- [Number] atomic commits implementation strategy
494+
- [Additional details]
495+
```
496+
497+
### Complete Example Workflow
498+
499+
```bash
500+
# 1. Fetch Linear issue
501+
curl -s -X POST https://api.linear.app/graphql \
502+
-H "Content-Type: application/json" \
503+
-H "Authorization: $LINEAR_API_KEY" \
504+
-d '{"query": "{ issue(id: \"SSC-XX\") { ... } }"}'
505+
506+
# 2. Create implementation plan (write to docs/SSC-XX-IMPLEMENTATION-PLAN.md)
507+
508+
# 3. Create GitHub issue
509+
gh issue create --title "SSC-XX: Feature Title" --body "$(cat <<'EOF'
510+
# Feature Title
511+
...
512+
EOF
513+
)"
514+
515+
# 4. Commit and push implementation plan
516+
git add docs/SSC-XX-IMPLEMENTATION-PLAN.md
517+
git commit -m "docs: add implementation plan for SSC-XX Feature Title
518+
519+
Comprehensive plan covering:
520+
- Detail 1
521+
- Detail 2
522+
"
523+
git push
524+
525+
# 5. Verify CI/CD
526+
gh run list --limit 1
527+
# Wait for completion, then verify success
528+
529+
# 6. Update meta tracker (issue #3)
530+
gh issue edit 3 --body "$(cat <<'EOF'
531+
# Updated meta tracker content...
532+
EOF
533+
)"
534+
```
535+
536+
### Existing Implementation Plans
537+
538+
Reference these for format examples:
539+
- `docs/SSC-13-IMPLEMENTATION-PLAN.md` - Assignment Brainstorming (22 commits, AI features)
540+
- `docs/SSC-14-IMPLEMENTATION-PLAN.md` - Exam Prediction (18 commits, AI + analytics)
541+
- `docs/SSC-15-IMPLEMENTATION-PLAN.md` - Mobile App (25 commits, React Native)
542+
- `docs/SSC-16-IMPLEMENTATION-PLAN.md` - Payment System (Stripe integration)
543+
- `docs/SSC-17-IMPLEMENTATION-PLAN.md` - Analytics Dashboard (20 commits, charts)
544+
- `docs/SSC-18-IMPLEMENTATION-PLAN.md` - University Partnerships (24 commits, B2B)

0 commit comments

Comments
 (0)