Loading...
Loading...
Get up to speed on the current branch's intent by analyzing commits, changes, and optionally a Linear ticket. Use when starting work on an existing branch.
npx skill4agent add casper-studios/casper-marketplace recover-branch-contextI'll help you understand the context of this branch. Let me analyze the commits and changes.
Do you have a Linear ticket ID or URL for this work? (optional - I can proceed without it)git branch -a | grep -E "(main|master|dev|develop)" | head -5# Try dev first (common in this repo), then main/master
git merge-base HEAD dev 2>/dev/null || git merge-base HEAD main 2>/dev/null || git merge-base HEAD mastergit branch --show-currentgit log --oneline $(git merge-base HEAD dev)..HEADgit log --format="%h %s%n%b" $(git merge-base HEAD dev)..HEADgit diff --name-status $(git merge-base HEAD dev)..HEADgit diff --name-status --cachedgit diff --name-statusgit ls-files --others --exclude-standardgit status --shortmcp__linear__get_issue# Branch Context: [branch-name]
**Base branch**: [dev/main]
**Commits since divergence**: [count]
**Linear ticket**: [ID if provided, or "None provided"]
## Intent Summary
[1-3 sentences describing the overall goal of this branch based on commits and changes]
## Feature Areas
### [Feature/Intent Area 1]
**Purpose**: [What this group of changes accomplishes]
**Status**: [Complete/In Progress/Not Started]
**Committed changes**:
- `path/to/file.ext:lines` - [brief description]
- `path/to/another.ext` - [brief description]
**Uncommitted changes**:
- `path/to/wip.ext` - [brief description]
### [Feature/Intent Area 2]
...
## Uncommitted Work
**Staged** (ready to commit):
- [files]
**Modified** (not staged):
- [files]
**Untracked** (new files):
- [files]
## Code vs Ticket Drift
[If a Linear ticket was provided, note any discrepancies between what the ticket describes and what the code actually implements. The code is the source of truth.]
## Suggested Next Steps
[Based on the analysis, what appears to be remaining work or natural next actions]# Branch Context: feat/comment-threads
**Base branch**: main
**Commits since divergence**: 3
**Linear ticket**: TASK-142
## Intent Summary
This branch adds threaded comments to tasks, allowing users to start discussion threads on individual tasks and reply to existing comments. The implementation includes a new database table, API routes for CRUD operations, and a collapsible thread UI in the task detail view.
## Feature Areas
### Comments Data Layer
**Purpose**: Database schema and API routes for storing and retrieving comment threads
**Status**: Complete
**Committed changes**:
- `src/db/schema/comments.ts` - New comments table with parent_id for threading
- `src/db/migrations/0012_add_comments.sql` - Migration file
- `src/api/routes/comments.ts` - CRUD endpoints for comments
### Thread UI Components
**Purpose**: Components for displaying and composing threaded comments on tasks
**Status**: In Progress
**Committed changes**:
- `src/components/tasks/CommentThread.tsx` - Recursive thread display component
**Uncommitted changes**:
- `src/components/tasks/CommentComposer.tsx` - Reply/new comment input box
- `src/hooks/useCommentThread.ts` - Data fetching hook for thread state
## Code vs Ticket Drift
The ticket scoped comments as flat (non-threaded), but the implementation adds full threading support with nested replies via a parent_id column.
## Suggested Next Steps
1. Complete the CommentComposer component and wire it into CommentThread
2. Add optimistic updates to useCommentThread for snappy UX
3. Add tests for the comment API routes