mirror of
https://github.com/humanlayer/humanlayer.git
synced 2025-08-20 19:01:22 +03:00
* quick script to go alongside the `hack/create_worktree.sh` * add `make setup` to CLAUDE.md * TODO system * commands added for claude for us to share * formatting * take feedback from ellipsis * create linear ticket * formatting
4.9 KiB
4.9 KiB
Create Linear Ticket from Thoughts
You are tasked with creating a Linear ticket from a thoughts document, transforming verbose planning or research into clear, actionable tickets.
Initial Setup
When invoked, respond with:
I'll help you create a Linear ticket from your thoughts document. Please provide:
1. The path to the thoughts document (or topic to search for)
2. Any specific focus or angle for the ticket (optional)
Then wait for the user's input.
Steps to follow after receiving the request:
-
Locate and read the thoughts document:
- If given a path, read the document directly
- If given a topic/keyword, search thoughts/ directory using Grep to find relevant documents
- If multiple matches found, show list and ask user to select
- Create a TodoWrite list to track: Read document → Analyze content → Draft ticket → Get user input → Create ticket
-
Analyze the document content:
- Identify the core problem or feature being discussed
- Extract key implementation details or technical decisions
- Note any specific code files or areas mentioned
- Look for action items or next steps
- Identify what stage the idea is at (early ideation vs ready to implement)
-
Check for related context (if mentioned in doc):
- If the document references specific code files, read relevant sections
- If it mentions other thoughts documents, quickly check them
- Look for any existing Linear tickets mentioned
-
Get Linear workspace context:
- Get current user:
mcp__linear__get_user - List teams:
mcp__linear__list_teams - If multiple teams, ask user to select one
- List projects for selected team:
mcp__linear__list_projects - Get available statuses:
mcp__linear__list_issue_statuses
- Get current user:
-
Draft the ticket summary: Present a draft to the user:
## Draft Linear Ticket **Title**: [Clear, action-oriented title] **Description**: [2-3 sentence summary of the problem/goal] ## Key Details - [Bullet points of important details from thoughts] - [Technical decisions or constraints] - [Any specific requirements] ## Implementation Notes (if applicable) [Any specific technical approach or steps outlined] ## References - Source: `thoughts/[path/to/document.md]` - Related code: [any file:line references] --- Based on the document, this seems to be at the stage of: [ideation/planning/ready to implement] -
Interactive refinement: Ask the user:
- Does this summary capture the ticket accurately?
- Which project should this go in? [show list]
- What priority? (0=None, 1=Urgent, 2=High, 3=Medium, 4=Low)
- What status? [show available statuses]
- Any additional context to add?
- Should we include more/less implementation detail?
- Do you want to assign it to yourself?
-
Create the Linear ticket:
mcp__linear__create_issue with: - title: [refined title] - description: [final description in markdown] - teamId: [selected team] - projectId: [if selected] - priority: [selected priority number] - stateId: [selected status] - assigneeId: [if requested] -
Post-creation actions:
- Show the created ticket URL
- Ask if user wants to:
- Add a comment with additional implementation details
- Create sub-tasks for specific action items
- Update the original thoughts document with the ticket reference
- If yes to updating thoughts doc:
Add at the top of the document: --- linear_ticket: [URL] created: [date] ---
Example transformations:
From verbose thoughts:
"I've been thinking about how our resumed sessions don't inherit permissions properly.
This is causing issues where users have to re-specify everything. We should probably
store all the config in the database and then pull it when resuming. Maybe we need
new columns for permission_prompt_tool and allowed_tools..."
To concise ticket:
Title: Fix resumed sessions to inherit all configuration from parent
Description:
Currently, resumed sessions only inherit Model and WorkingDir from parent sessions,
causing all other configuration to be lost. Users must re-specify permissions and
settings when resuming.
## Solution
Store all session configuration in the database and automatically inherit it when
resuming sessions, with support for explicit overrides.
Important notes:
- Keep tickets concise but complete - aim for scannable content
- Focus on the "what" and "why", include "how" only if well-defined
- Always preserve links to source material
- Don't create tickets from early-stage brainstorming unless requested
- Use proper Linear markdown formatting
- Include code references as:
path/to/file.ext:linenum - Ask for clarification rather than guessing project/status
- Remember that Linear descriptions support full markdown including code blocks