Generate structured markdown documents (PRDs, tasks, investigation plans) from templates based on workflow type...
This skill handles creation of all structured documentation for workflow, bugfix, and plan commands.
Use this skill when:
Read the selected task from the appropriate directory (created by linear-task-selector):
features/<feature-name>/selected-task.jsonbugs/<bug-name>/selected-task.jsonepics/<epic-name>/selected-task.jsonThe featureName field in the JSON tells you which directory to use.
Extract:
workflowType: "feature", "bugfix", or "plan"featureName: Directory name for locating/storing filestitle: Task titledescription: Full task descriptiontaskId: Linear issue IDThe directory should already exist (created by linear-task-selector).
For feature workflows:
Use existing features/<feature-name>/ directory
For bugfix workflows:
Use existing bugs/<bug-name>/ directory
For plan workflows:
Use existing epics/<epic-name>/ directory
If directory doesn't exist, create it using the featureName from selected-task.json.
3a. Generate PRD
Use the PRD template from tools/prompts/prd-prompt-template.md:
Role: Senior product manager for Hokusai
Task: Generate PRD that a junior team member can follow
Input: Replace {{PROJECT_SUMMARY}} with task title + description
Output: features/<feature-name>/prd.md
Required sections:
Reference: Review project README.md and https://docs.hokus.ai/
3b. Generate Tasks
Use the tasks template from tools/prompts/tasks-prompt-template.md:
Role: Product manager working with junior developer
Task: Create detailed, prioritized task list from PRD
Input: Read features/<feature-name>/prd.md
Output: features/<feature-name>/tasks.md
Required format:
## Section Name
1. [ ] Task description
a. [ ] Subtask description
b. [ ] Subtask description
## Testing
7. [ ] Write and implement tests
a. [ ] Database schema tests
b. [ ] API endpoint tests
c. [ ] Integration tests
Required components:
3a. Generate Investigation Plan
Use template from tools/prompts/bug-investigation-template.md:
Role: Senior software engineer and debugging specialist
Task: Create comprehensive investigation plan
Input: Replace {{BUG_SUMMARY}} with task title + description
Output: bugs/<bug-name>/investigation.md
Required sections:
3b. Generate Hypotheses Document
Use template from tools/prompts/bug-hypothesis-template.md:
Output: bugs/<bug-name>/hypotheses.md
Format for each hypothesis:
## Hypothesis N: [Brief description]
**Proposed Root Cause:**
[What you think is causing the bug]
**Why This Could Cause Observed Behavior:**
[Technical explanation]
**How to Test:**
[Specific steps to validate/invalidate]
**Expected Outcome if Correct:**
[What you'll observe if this is the root cause]
**Priority:** [High/Medium/Low]
**Likelihood:** [High/Medium/Low]
**Status:** [Untested/Testing/Confirmed/Rejected]
3c. Generate Fix Tasks Document
Use template from tools/prompts/bug-tasks-template.md:
Output: bugs/<bug-name>/fix-tasks.md
Required sections:
3a. Generate Decomposition Request
Output: epics/<epic-name>/decomposition-request.json
{
"issueNumber": 10,
"title": "Epic Title",
"projectName": "Project Name",
"description": "Epic description summary"
}
3b. Research Existing Implementation Use Read, Grep, Glob tools to:
Output: epics/<epic-name>/research.md
3c. Generate Decomposition Plan
Output: epics/<epic-name>/decomposition-plan.json
{
"masterDocumentPath": "path/to/main/doc.md",
"relevantFiles": ["file1.ts", "file2.tsx"],
"subIssues": [
{
"title": "Task title (action verb + specific noun)",
"description": "Detailed description with context, requirements, acceptance criteria, references, edge cases",
"dependencies": [0, 1],
"estimate": 5,
"priority": 1
}
]
}
Guidelines:
Check that:
Provide user with:
ā Documents generated:
- features/add-user-auth/prd.md
- features/add-user-auth/tasks.md
Next step: Review PRD and tasks, then begin implementation
Input: features/add-user-auth/selected-task.json with workflowType: "feature"
Process:
1. Use existing features/add-user-auth/
2. Generate prd.md from template + task description
3. Generate tasks.md from PRD
4. Return: "ā PRD and tasks created"
Input: bugs/contact-discovery-timeout/selected-task.json with workflowType: "bugfix"
Process:
1. Use existing bugs/contact-discovery-timeout/
2. Generate investigation.md from template + bug description
3. Generate hypotheses.md with 3-5 initial hypotheses
4. Generate fix-tasks.md template
5. Return: "ā Investigation plan created"
Input: epics/user-management-system/selected-task.json with workflowType: "plan"
Process:
1. Use existing epics/user-management-system/
2. Generate decomposition-request.json
3. Research existing codebase ā research.md
4. Generate decomposition-plan.json with 5 sub-issues
5. Return: "ā Decomposition plan created"
If no selected-task.json exists in the expected directory:
If feature/bug directory exists:
If template generation fails:
This skill outputs:
features/<name>/prd.md, features/<name>/tasks.mdbugs/<name>/investigation.md, bugs/<name>/hypotheses.md, bugs/<name>/fix-tasks.mdepics/<name>/decomposition-request.json, epics/<name>/decomposition-plan.json, epics/<name>/research.mdNote: All files are stored in workflow-specific directories to prevent conflicts when multiple Claude sessions run concurrently.
This skill integrates with: