@langadventurellc/task-trellis-mcp 1.2.2 → 1.3.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.
Files changed (191) hide show
  1. package/README.md +2 -2
  2. package/dist/__tests__/copyBasicClaudeAgents.test.d.ts +2 -0
  3. package/dist/__tests__/copyBasicClaudeAgents.test.d.ts.map +1 -0
  4. package/dist/__tests__/copyBasicClaudeAgents.test.js +24 -0
  5. package/dist/__tests__/copyBasicClaudeAgents.test.js.map +1 -0
  6. package/dist/__tests__/e2e/crud/createObject.e2e.test.js +4 -4
  7. package/dist/__tests__/e2e/crud/createObject.e2e.test.js.map +1 -1
  8. package/dist/__tests__/e2e/crud/fileValidation.e2e.test.js +4 -4
  9. package/dist/__tests__/e2e/crud/fileValidation.e2e.test.js.map +1 -1
  10. package/dist/__tests__/e2e/crud/getObject.e2e.test.js +3 -3
  11. package/dist/__tests__/e2e/crud/getObject.e2e.test.js.map +1 -1
  12. package/dist/__tests__/e2e/workflow/appendLog.e2e.test.js +10 -10
  13. package/dist/__tests__/e2e/workflow/appendLog.e2e.test.js.map +1 -1
  14. package/dist/__tests__/e2e/workflow/appendModifiedFiles.e2e.test.js +1 -1
  15. package/dist/__tests__/e2e/workflow/appendModifiedFiles.e2e.test.js.map +1 -1
  16. package/dist/__tests__/e2e/workflow/getNextAvailableIssue.e2e.test.d.ts +2 -0
  17. package/dist/__tests__/e2e/workflow/getNextAvailableIssue.e2e.test.d.ts.map +1 -0
  18. package/dist/__tests__/e2e/workflow/getNextAvailableIssue.e2e.test.js +806 -0
  19. package/dist/__tests__/e2e/workflow/getNextAvailableIssue.e2e.test.js.map +1 -0
  20. package/dist/__tests__/e2e/workflow/taskLifecycle.e2e.test.js +7 -7
  21. package/dist/__tests__/e2e/workflow/taskLifecycle.e2e.test.js.map +1 -1
  22. package/dist/__tests__/serverStartup.test.js +138 -0
  23. package/dist/__tests__/serverStartup.test.js.map +1 -1
  24. package/dist/models/TrellisObject.d.ts +1 -1
  25. package/dist/models/TrellisObject.d.ts.map +1 -1
  26. package/dist/models/TrellisObjectSummary.d.ts +1 -1
  27. package/dist/models/TrellisObjectSummary.d.ts.map +1 -1
  28. package/dist/models/__tests__/isClaimable.test.js +1 -0
  29. package/dist/models/__tests__/isClaimable.test.js.map +1 -1
  30. package/dist/models/__tests__/isClosed.test.js +3 -1
  31. package/dist/models/__tests__/isClosed.test.js.map +1 -1
  32. package/dist/models/__tests__/isOpen.test.js +3 -1
  33. package/dist/models/__tests__/isOpen.test.js.map +1 -1
  34. package/dist/prompts/PromptArgument.d.ts +16 -0
  35. package/dist/prompts/PromptArgument.d.ts.map +1 -0
  36. package/dist/prompts/PromptArgument.js +3 -0
  37. package/dist/prompts/PromptArgument.js.map +1 -0
  38. package/dist/prompts/PromptManager.d.ts +48 -0
  39. package/dist/prompts/PromptManager.d.ts.map +1 -0
  40. package/dist/prompts/PromptManager.js +151 -0
  41. package/dist/prompts/PromptManager.js.map +1 -0
  42. package/dist/prompts/PromptMessage.d.ts +11 -0
  43. package/dist/prompts/PromptMessage.d.ts.map +1 -0
  44. package/dist/prompts/PromptMessage.js +3 -0
  45. package/dist/prompts/PromptMessage.js.map +1 -0
  46. package/dist/prompts/PromptParser.d.ts +7 -0
  47. package/dist/prompts/PromptParser.d.ts.map +1 -0
  48. package/dist/prompts/PromptParser.js +141 -0
  49. package/dist/prompts/PromptParser.js.map +1 -0
  50. package/dist/prompts/PromptRenderer.d.ts +38 -0
  51. package/dist/prompts/PromptRenderer.d.ts.map +1 -0
  52. package/dist/prompts/PromptRenderer.js +128 -0
  53. package/dist/prompts/PromptRenderer.js.map +1 -0
  54. package/dist/prompts/PromptsRegistry.d.ts +43 -0
  55. package/dist/prompts/PromptsRegistry.d.ts.map +1 -0
  56. package/dist/prompts/PromptsRegistry.js +76 -0
  57. package/dist/prompts/PromptsRegistry.js.map +1 -0
  58. package/dist/prompts/TrellisPrompt.d.ts +19 -0
  59. package/dist/prompts/TrellisPrompt.d.ts.map +1 -0
  60. package/dist/prompts/TrellisPrompt.js +3 -0
  61. package/dist/prompts/TrellisPrompt.js.map +1 -0
  62. package/dist/prompts/__tests__/PromptArgument.test.d.ts +2 -0
  63. package/dist/prompts/__tests__/PromptArgument.test.d.ts.map +1 -0
  64. package/dist/prompts/__tests__/PromptArgument.test.js +60 -0
  65. package/dist/prompts/__tests__/PromptArgument.test.js.map +1 -0
  66. package/dist/prompts/__tests__/PromptManager.test.d.ts +2 -0
  67. package/dist/prompts/__tests__/PromptManager.test.d.ts.map +1 -0
  68. package/dist/prompts/__tests__/PromptManager.test.js +364 -0
  69. package/dist/prompts/__tests__/PromptManager.test.js.map +1 -0
  70. package/dist/prompts/__tests__/PromptParser.test.d.ts +2 -0
  71. package/dist/prompts/__tests__/PromptParser.test.d.ts.map +1 -0
  72. package/dist/prompts/__tests__/PromptParser.test.js +237 -0
  73. package/dist/prompts/__tests__/PromptParser.test.js.map +1 -0
  74. package/dist/prompts/__tests__/PromptRenderer.test.d.ts +2 -0
  75. package/dist/prompts/__tests__/PromptRenderer.test.d.ts.map +1 -0
  76. package/dist/prompts/__tests__/PromptRenderer.test.js +325 -0
  77. package/dist/prompts/__tests__/PromptRenderer.test.js.map +1 -0
  78. package/dist/prompts/__tests__/TrellisPrompt.test.d.ts +2 -0
  79. package/dist/prompts/__tests__/TrellisPrompt.test.d.ts.map +1 -0
  80. package/dist/prompts/__tests__/TrellisPrompt.test.js +107 -0
  81. package/dist/prompts/__tests__/TrellisPrompt.test.js.map +1 -0
  82. package/dist/prompts/index.d.ts +9 -0
  83. package/dist/prompts/index.d.ts.map +1 -0
  84. package/dist/prompts/index.js +14 -0
  85. package/dist/prompts/index.js.map +1 -0
  86. package/dist/prompts/registry.d.ts +6 -0
  87. package/dist/prompts/registry.d.ts.map +1 -0
  88. package/dist/prompts/registry.js +60 -0
  89. package/dist/prompts/registry.js.map +1 -0
  90. package/dist/repositories/local/__tests__/getObjectByFilePath.test.js +5 -5
  91. package/dist/repositories/local/__tests__/getObjectByFilePath.test.js.map +1 -1
  92. package/dist/repositories/local/__tests__/getObjectFilePath.test.js +2 -2
  93. package/dist/repositories/local/__tests__/getObjectFilePath.test.js.map +1 -1
  94. package/dist/resources/basic/prompts/create-epics.md +177 -0
  95. package/dist/resources/basic/prompts/create-features.md +172 -0
  96. package/dist/resources/basic/prompts/create-project.md +128 -0
  97. package/dist/resources/basic/prompts/create-tasks.md +225 -0
  98. package/dist/resources/basic/prompts/implement-task.md +170 -0
  99. package/dist/resources/basic-claude/agents/implementation-planner.md +187 -0
  100. package/dist/resources/basic-claude/agents/issue-verifier.md +154 -0
  101. package/dist/resources/basic-claude/prompts/create-epics.md +204 -0
  102. package/dist/resources/basic-claude/prompts/create-features.md +199 -0
  103. package/dist/resources/basic-claude/prompts/create-project.md +155 -0
  104. package/dist/resources/basic-claude/prompts/create-tasks.md +252 -0
  105. package/dist/resources/basic-claude/prompts/implement-task.md +179 -0
  106. package/dist/server.js +59 -2
  107. package/dist/server.js.map +1 -1
  108. package/dist/services/TaskTrellisService.d.ts +9 -0
  109. package/dist/services/TaskTrellisService.d.ts.map +1 -1
  110. package/dist/services/local/LocalTaskTrellisService.d.ts +6 -0
  111. package/dist/services/local/LocalTaskTrellisService.d.ts.map +1 -1
  112. package/dist/services/local/LocalTaskTrellisService.js +24 -0
  113. package/dist/services/local/LocalTaskTrellisService.js.map +1 -1
  114. package/dist/services/local/__tests__/appendAffectedFiles.test.js +9 -9
  115. package/dist/services/local/__tests__/appendAffectedFiles.test.js.map +1 -1
  116. package/dist/services/local/__tests__/appendModifiedFiles.test.js +1 -1
  117. package/dist/services/local/__tests__/appendModifiedFiles.test.js.map +1 -1
  118. package/dist/services/local/__tests__/claimTask.test.js +1 -0
  119. package/dist/services/local/__tests__/claimTask.test.js.map +1 -1
  120. package/dist/services/local/__tests__/completeTask.test.js +3 -3
  121. package/dist/services/local/__tests__/completeTask.test.js.map +1 -1
  122. package/dist/services/local/__tests__/createObject.test.js +7 -4
  123. package/dist/services/local/__tests__/createObject.test.js.map +1 -1
  124. package/dist/services/local/__tests__/getNextAvailableIssue.test.d.ts +2 -0
  125. package/dist/services/local/__tests__/getNextAvailableIssue.test.d.ts.map +1 -0
  126. package/dist/services/local/__tests__/getNextAvailableIssue.test.js +314 -0
  127. package/dist/services/local/__tests__/getNextAvailableIssue.test.js.map +1 -0
  128. package/dist/services/local/__tests__/listObjects.test.js +1 -0
  129. package/dist/services/local/__tests__/listObjects.test.js.map +1 -1
  130. package/dist/services/local/__tests__/pruneClosed.test.js +1 -0
  131. package/dist/services/local/__tests__/pruneClosed.test.js.map +1 -1
  132. package/dist/services/local/__tests__/updateObject.test.js +2 -2
  133. package/dist/services/local/__tests__/updateObject.test.js.map +1 -1
  134. package/dist/services/local/createObject.d.ts +1 -1
  135. package/dist/services/local/createObject.d.ts.map +1 -1
  136. package/dist/services/local/createObject.js +1 -1
  137. package/dist/services/local/createObject.js.map +1 -1
  138. package/dist/services/local/getNextAvailableIssue.d.ts +14 -0
  139. package/dist/services/local/getNextAvailableIssue.d.ts.map +1 -0
  140. package/dist/services/local/getNextAvailableIssue.js +28 -0
  141. package/dist/services/local/getNextAvailableIssue.js.map +1 -0
  142. package/dist/tools/__tests__/claimTaskTool.test.js +1 -0
  143. package/dist/tools/__tests__/claimTaskTool.test.js.map +1 -1
  144. package/dist/tools/__tests__/completeTaskTool.test.js +1 -0
  145. package/dist/tools/__tests__/completeTaskTool.test.js.map +1 -1
  146. package/dist/tools/__tests__/getObjectTool.test.js +1 -0
  147. package/dist/tools/__tests__/getObjectTool.test.js.map +1 -1
  148. package/dist/tools/__tests__/listObjectsTool.test.js +1 -0
  149. package/dist/tools/__tests__/listObjectsTool.test.js.map +1 -1
  150. package/dist/tools/getNextAvailableIssueTool.d.ts +34 -0
  151. package/dist/tools/getNextAvailableIssueTool.d.ts.map +1 -0
  152. package/dist/tools/getNextAvailableIssueTool.js +94 -0
  153. package/dist/tools/getNextAvailableIssueTool.js.map +1 -0
  154. package/dist/tools/index.d.ts +1 -0
  155. package/dist/tools/index.d.ts.map +1 -1
  156. package/dist/tools/index.js +4 -1
  157. package/dist/tools/index.js.map +1 -1
  158. package/dist/utils/__tests__/checkHierarchicalPrerequisitesComplete.test.js +3 -3
  159. package/dist/utils/__tests__/checkHierarchicalPrerequisitesComplete.test.js.map +1 -1
  160. package/dist/utils/__tests__/checkPrerequisitesComplete.test.js +1 -0
  161. package/dist/utils/__tests__/checkPrerequisitesComplete.test.js.map +1 -1
  162. package/dist/utils/__tests__/deserializeTrellisObject.test.js +23 -1
  163. package/dist/utils/__tests__/deserializeTrellisObject.test.js.map +1 -1
  164. package/dist/utils/__tests__/filterUnavailableObjects.test.js +1 -1
  165. package/dist/utils/__tests__/filterUnavailableObjects.test.js.map +1 -1
  166. package/dist/utils/__tests__/isRequiredForOtherObjects.test.js +1 -0
  167. package/dist/utils/__tests__/isRequiredForOtherObjects.test.js.map +1 -1
  168. package/dist/utils/__tests__/serializationRoundTrip.test.js +35 -0
  169. package/dist/utils/__tests__/serializationRoundTrip.test.js.map +1 -1
  170. package/dist/utils/__tests__/serializeTrellisObject.test.js +8 -2
  171. package/dist/utils/__tests__/serializeTrellisObject.test.js.map +1 -1
  172. package/dist/utils/__tests__/sortTrellisObjects.test.js +1 -0
  173. package/dist/utils/__tests__/sortTrellisObjects.test.js.map +1 -1
  174. package/dist/utils/__tests__/updateParentHierarchy.test.js +4 -4
  175. package/dist/utils/__tests__/updateParentHierarchy.test.js.map +1 -1
  176. package/dist/utils/deserializeTrellisObject.d.ts.map +1 -1
  177. package/dist/utils/deserializeTrellisObject.js +1 -1
  178. package/dist/utils/deserializeTrellisObject.js.map +1 -1
  179. package/dist/utils/serializeTrellisObject.js +1 -1
  180. package/dist/utils/serializeTrellisObject.js.map +1 -1
  181. package/dist/utils/updateParentHierarchy.d.ts +1 -1
  182. package/dist/utils/updateParentHierarchy.d.ts.map +1 -1
  183. package/dist/utils/updateParentHierarchy.js.map +1 -1
  184. package/dist/validation/__tests__/validateObjectCreation.test.js +3 -3
  185. package/dist/validation/__tests__/validateObjectCreation.test.js.map +1 -1
  186. package/dist/validation/__tests__/validateParentExists.test.js +2 -1
  187. package/dist/validation/__tests__/validateParentExists.test.js.map +1 -1
  188. package/dist/validation/validateParentExists.d.ts +1 -1
  189. package/dist/validation/validateParentExists.d.ts.map +1 -1
  190. package/dist/validation/validateParentExists.js.map +1 -1
  191. package/package.json +3 -2
@@ -0,0 +1,172 @@
1
+ ---
2
+ description: Break down an epic into specific features by analyzing the epic specification
3
+ ---
4
+
5
+ # Create Features Command
6
+
7
+ Break down an epic into specific features using the Trellis task management system by analyzing the epic specification and gathering additional requirements as needed. Do not attempt to create multiple features in parallel. Do them sequentially one at a time.
8
+
9
+ ## Goal
10
+
11
+ Analyze an epic's comprehensive specification to create well-structured features that represent implementable functionality, ensuring complete coverage of the epic's scope and enabling effective task decomposition.
12
+
13
+ **IMPORTANT**: Features must include actual changes, implementations, or deliverables. Do not create features that are purely research tasks or analysis tasks without any tangible output. Since all features and tasks are executed independently without context from other features or tasks, purely analytical work provides no value.
14
+
15
+ ## Process
16
+
17
+ ### 1. Identify Context and Requirements
18
+
19
+ #### Input
20
+
21
+ `$ARGUMENTS`
22
+
23
+ #### Context Determination
24
+
25
+ The input may contain:
26
+
27
+ - **Epic ID**: (e.g., "E-user-auth") - Create features within an epic hierarchy
28
+ - **Feature Requirements**: Direct description of standalone functionality needed
29
+ - **Mixed**: Epic ID plus additional feature specifications
30
+
31
+ #### Instructions
32
+
33
+ **For Hierarchical Features:**
34
+
35
+ - Retrieve the epic using MCP `get_issue` to access its comprehensive description, requirements, and parent project context
36
+
37
+ **For Standalone Features:**
38
+
39
+ - Analyze the provided requirements directly
40
+ - No parent context needed, focus on the specific functionality described
41
+
42
+ ### 2. Analyze Requirements
43
+
44
+ **Thoroughly analyze the requirements (epic description OR standalone requirements) to identify natural feature boundaries:**
45
+
46
+ - **Search codebase** for similar feature patterns or implementations
47
+ - Extract all deliverables and components from the epic description
48
+ - Review architecture diagrams and technical specifications
49
+ - Analyze user stories to identify discrete user-facing functionality
50
+ - Consider non-functional requirements that need specific implementation
51
+ - Group related functionality into cohesive features
52
+ - Identify dependencies between features
53
+ - Note any specific instructions provided in `input`
54
+
55
+ ### 3. Gather Additional Information
56
+
57
+ **Ask clarifying questions as needed to refine the feature structure:**
58
+
59
+ Use this structured approach:
60
+
61
+ - **Ask one question at a time** with specific options
62
+ - **Focus on feature boundaries** - understand what constitutes a complete, testable feature
63
+ - **Identify component relationships** - how features interact with each other
64
+ - **Continue until complete** - don't stop until you have clear feature structure
65
+
66
+ Key areas to clarify:
67
+
68
+ - **Feature Boundaries**: What constitutes a complete, testable feature?
69
+ - **Dependencies**: Which features must be implemented before others?
70
+ - **Technical Approach**: How should complex functionality be divided?
71
+ - **Testing Strategy**: How can features be tested independently?
72
+ - **Integration Points**: Where do features interface with each other?
73
+
74
+ **Example questioning approach:**
75
+
76
+ ```
77
+ How should the user registration feature be scoped?
78
+ Options:
79
+ - A) Basic registration only (email, password, confirmation)
80
+ - B) Full registration with profile setup and email verification
81
+ - C) Registration with social login integration included
82
+ ```
83
+
84
+ Continue until the feature structure:
85
+
86
+ - Covers all aspects of the epic specification
87
+ - Represents 6-20 tasks worth of work per feature
88
+ - Has clear implementation boundaries
89
+ - Enables independent development and testing
90
+
91
+ ### 4. Generate Feature Structure
92
+
93
+ For each feature, create:
94
+
95
+ - **Title**: Clear, specific name (3-5 words)
96
+ - **Description**: Comprehensive explanation including:
97
+ - Purpose and functionality
98
+ - Key components to implement
99
+ - **Detailed Acceptance Criteria**: Specific, measurable requirements that define feature completion, including:
100
+ - Functional behavior with specific input/output expectations
101
+ - User interface requirements and interaction patterns
102
+ - Data validation and error handling criteria
103
+ - Integration points with other features or systems
104
+ - Performance benchmarks and response time requirements
105
+ - Security validation and access control requirements
106
+ - Browser/platform compatibility requirements
107
+ - Accessibility and usability standards
108
+ - Technical requirements
109
+ - Dependencies on other features
110
+ - **Implementation Guidance** - Technical approach and patterns to follow
111
+ - **Testing Requirements** - How to verify the feature works correctly
112
+ - **Security Considerations** - Input validation, authorization, data protection needs
113
+ - **Performance Requirements** - Response times, resource usage constraints
114
+
115
+ **Feature Granularity Guidelines:**
116
+
117
+ Each feature should be sized appropriately for task breakdown:
118
+
119
+ - **1-2 hours per task** - When broken down, each task should be completable in 1-2 hours
120
+ - **Independent implementation** - Features should be implementable without blocking other features
121
+ - **Testable boundaries** - Features should have clear success criteria and testing strategies
122
+
123
+ ### 5. Create Features Using MCP
124
+
125
+ For each feature, call the Task Trellis MCP `create_issue` tool:
126
+
127
+ - `type`: Set to `"feature"`
128
+ - `parent`: The epic ID (optional - omit for standalone features)
129
+ - `title`: Generated feature title
130
+ - `status`: Set to `"open"` (default, ready to begin work) or `"draft"` unless specified
131
+ - `prerequisites`: List of feature IDs that must complete first
132
+ - `description`: Comprehensive feature description with all elements from step 4
133
+
134
+ **For standalone features**: Simply omit the `parent` parameter entirely.
135
+
136
+ ### 6. Output Format
137
+
138
+ After successful creation:
139
+
140
+ ```
141
+ ✅ Successfully created [N] features for epic "[Epic Title]"
142
+
143
+ 📋 Created Features:
144
+ 1. F-[id1]: [Feature 1 Title]
145
+ → Dependencies: none
146
+
147
+ 2. F-[id2]: [Feature 2 Title]
148
+ → Dependencies: F-[id1]
149
+
150
+ 3. F-[id3]: [Feature 3 Title]
151
+ → Dependencies: F-[id1], F-[id2]
152
+
153
+ 📊 Feature Summary:
154
+ - Total Features: [N]
155
+ ```
156
+
157
+ ## Question Guidelines
158
+
159
+ Ask questions that:
160
+
161
+ - **Define feature scope**: What's included vs excluded?
162
+ - **Clarify technical approach**: Specific technologies or patterns?
163
+ - **Identify dependencies**: Build order and integration points?
164
+ - **Consider testing**: How to verify feature completeness?
165
+
166
+ <rules>
167
+ <critical>Use MCP tools for all operations (create_issue, get_issue, etc.)</critical>
168
+ <critical>Ask one question at a time with specific options</critical>
169
+ <critical>Continue asking questions until you have complete understanding of feature boundaries</critical>
170
+ <important>Feature descriptions must be detailed enough for task creation</important>
171
+ <important>Include implementation guidance and testing requirements</important>
172
+ </rules>
@@ -0,0 +1,128 @@
1
+ ---
2
+ description: Create a new project in the Trellis task management system by analyzing specifications and gathering requirements
3
+ ---
4
+
5
+ # Create Project Trellis Command
6
+
7
+ Create a new project in the Trellis task management system by analyzing specifications provided and gathering additional requirements as needed.
8
+
9
+ ## Goal
10
+
11
+ Transform project specifications into a comprehensive project definition with full context and requirements that enable other agents to effectively create epics, features, and ultimately implementable tasks.
12
+
13
+ ## Process
14
+
15
+ ### 1. Parse Input Specifications
16
+
17
+ #### Specification Input
18
+
19
+ `$ARGUMENTS`
20
+
21
+ #### Instructions
22
+
23
+ Read and analyze the specifications:
24
+
25
+ - Extract key project goals, requirements, and constraints
26
+
27
+ ### 2. Analyze Project Context
28
+
29
+ **Before gathering requirements, research the existing system:**
30
+
31
+ - **Search codebase** for similar projects or patterns
32
+ - **Identify existing architecture** and conventions
33
+ - **Document discovered technologies** for consistency
34
+
35
+ ### 3. Gather Additional Requirements
36
+
37
+ **Continue asking questions until you can create a complete project specification:**
38
+
39
+ Use this structured approach:
40
+
41
+ - **Ask one question at a time** with specific options
42
+ - **Focus on decomposition** - break large concepts into smaller components
43
+ - **Clarify boundaries** - understand where one component ends and another begins
44
+ - **Continue until complete** - don't stop until you have full understanding
45
+
46
+ Key areas to explore:
47
+
48
+ - **Functional Requirements**: What specific capabilities must the system provide?
49
+ - **Technical Architecture**: What technologies, frameworks, and patterns should be used?
50
+ - **Integration Points**: What external systems or APIs need to be integrated?
51
+ - **User Types**: Who will use this system and what are their needs?
52
+ - **Performance Requirements**: What are the response time, load, and scaling needs?
53
+ - **Security Requirements**: What authentication, authorization, and data protection is needed?
54
+ - **Deployment Environment**: Where and how will this be deployed?
55
+ - **Timeline & Phases**: Are there specific deadlines or phase requirements?
56
+ - **Success Metrics**: How will project success be measured?
57
+
58
+ **Example questioning approach:**
59
+
60
+ ```
61
+ How should user authentication be handled in this project?
62
+ Options:
63
+ - A) Use existing authentication system (specify integration points)
64
+ - B) Implement new authentication mechanism (specify requirements)
65
+ - C) No authentication needed for this project
66
+ ```
67
+
68
+ Continue asking clarifying questions until you have enough information to create a comprehensive project description that would enable another agent to:
69
+
70
+ - Understand the full scope and vision
71
+ - Create appropriate epics covering all aspects
72
+ - Make informed technical decisions
73
+ - Understand constraints and requirements
74
+
75
+ ### 4. Generate Project Title and Description
76
+
77
+ Based on gathered information:
78
+
79
+ - **Title**: Create a clear, concise project title (5-7 words)
80
+ - **Description**: Write comprehensive project specification including:
81
+ - Executive summary
82
+ - Detailed functional requirements
83
+ - Technical requirements and constraints
84
+ - Architecture overview
85
+ - User stories or personas
86
+ - Non-functional requirements (performance, security, etc.)
87
+ - Integration requirements
88
+ - Deployment strategy
89
+ - **Detailed Acceptance Criteria**: Specific, measurable requirements that define feature completion, including:
90
+ - Functional behavior with specific input/output expectations
91
+ - User interface requirements and interaction patterns
92
+ - Data validation and error handling criteria
93
+ - Integration points with other features or systems
94
+ - Performance benchmarks and response time requirements
95
+ - Security validation and access control requirements
96
+ - Browser/platform compatibility requirements
97
+ - Accessibility and usability standards
98
+ - Any other context needed for epic creation
99
+
100
+ ### 5. Create Project Using MCP
101
+
102
+ Call the Task Trellis MCP `create_issue` tool to create the project with the following parameters:
103
+
104
+ - `type`: Set to `"project"`
105
+ - `title`: The generated project title
106
+ - `status`: Set to `"open"` (default, ready to begin work) or `"draft"` unless specified
107
+ - `description`: The comprehensive project description generated in the previous step
108
+
109
+ ### 6. Output Format
110
+
111
+ After successful creation:
112
+
113
+ ```
114
+ ✅ Project created successfully!
115
+
116
+ 📁 Project: [Generated Title]
117
+ 📍 ID: [generated-id]
118
+ 📊 Status: [actual-status]
119
+
120
+ 📝 Project Summary:
121
+ [First paragraph of description]
122
+ ```
123
+
124
+ <rules>
125
+ <critical>Use MCP tools for all operations (create_issue, get_issue, activate, etc.)</critical>
126
+ <critical>Continue asking questions until you have a complete understanding of the requirements</critical>
127
+ <critical>Ask one question at a time with specific options</critical>
128
+ </rules>
@@ -0,0 +1,225 @@
1
+ ---
2
+ description: Break down a feature into specific, actionable tasks (1-2 hours each)
3
+ ---
4
+
5
+ # Create Tasks Command
6
+
7
+ Break down a feature into specific, actionable tasks using the Trellis task management system. Do not attempt to create multiple tasks in parallel. Do them sequentially one at a time.
8
+
9
+ ## Goal
10
+
11
+ Analyze a feature's comprehensive specification to create granular tasks that can be individually claimed and completed by developers, ensuring complete implementation of the feature with proper testing and security considerations.
12
+
13
+ ## Process
14
+
15
+ ### 1. Identify Context and Requirements
16
+
17
+ #### Input
18
+
19
+ `$ARGUMENTS`
20
+
21
+ #### Context Determination
22
+
23
+ The input may contain:
24
+
25
+ - **Feature ID**: (e.g., "F-user-registration") - Create tasks within a feature hierarchy
26
+ - **Task Requirements**: Direct description of standalone work needed
27
+ - **Mixed**: Feature ID plus additional task specifications
28
+
29
+ #### Instructions
30
+
31
+ **For Hierarchical Tasks:**
32
+
33
+ - Retrieve the feature using MCP `get_issue` to access its comprehensive description, requirements, and parent epic/project context
34
+
35
+ **For Standalone Tasks:**
36
+
37
+ - Analyze the provided requirements directly
38
+ - No parent context needed, focus on the specific work described
39
+
40
+ ### 2. Analyze Requirements
41
+
42
+ **Thoroughly analyze the requirements (feature description OR standalone requirements) to identify required tasks:**
43
+
44
+ - **Search codebase** for similar task patterns or implementations
45
+ - Extract all components and deliverables from the feature description
46
+ - Review implementation guidance and technical approach
47
+ - Identify testing requirements for comprehensive coverage
48
+ - Consider security considerations that need implementation
49
+ - Analyze performance requirements and constraints
50
+ - Group related implementation work
51
+ - Identify task dependencies and sequencing
52
+ - Note any specific instructions provided in `input`
53
+
54
+ ### 3. Gather Additional Information
55
+
56
+ **Ask clarifying questions as needed to refine the task breakdown:**
57
+
58
+ Use this structured approach:
59
+
60
+ - **Ask one question at a time** with specific options
61
+ - **Focus on task boundaries** - understand what constitutes a complete, testable task
62
+ - **Identify implementation details** - specific technical approaches or patterns
63
+ - **Continue until complete** - don't stop until you have clear task structure
64
+
65
+ Key areas to clarify:
66
+
67
+ - **Implementation Details**: Specific technical approaches or patterns?
68
+ - Include unit testing in the tasks for the implementation.
69
+ - **Task Boundaries**: What constitutes a complete, testable task?
70
+ - **Dependencies**: Which tasks must complete before others?
71
+ - **Testing Approach**: Unit tests, integration tests, or both?
72
+ - Do not create separate tasks just for unit tests. Unit tests should always be included in the same task as the changes to the production code.
73
+ - Do create separate tasks for integration tests.
74
+ - If specifically requested, do create separate tasks for performance tests. But, do not add tasks for performance tests unless specifically requested by the user.
75
+ - **Security Implementation**: How to handle validation and authorization?
76
+
77
+ **Example questioning approach:**
78
+
79
+ ```
80
+ How should the user model validation be implemented?
81
+ Options:
82
+ - A) Basic field validation only (required fields, data types)
83
+ - B) Advanced validation with custom rules and error messages
84
+ - C) Validation with integration to existing validation framework
85
+ ```
86
+
87
+ Continue until the task structure:
88
+
89
+ - Covers all aspects of the feature specification
90
+ - Represents atomic units of work (1-2 hours each)
91
+ - Has clear implementation boundaries
92
+ - Includes adequate testing and security tasks
93
+
94
+ ### 4. Generate Task Structure
95
+
96
+ For each task, create:
97
+
98
+ - **Title**: Clear, actionable description
99
+ - **Description**: Detailed explanation including:
100
+ - **Detailed Context**: Enough information for a developer new to the project to complete the work, including:
101
+ - Links to relevant specifications, documentation, or other Trellis issues (tasks, features, epics, projects)
102
+ - References to existing patterns or similar implementations in the codebase
103
+ - Specific technologies, frameworks, or libraries to use
104
+ - File paths and component locations where work should be done
105
+ - **Specific implementation requirements**: What exactly needs to be built
106
+ - **Technical approach to follow**: Step-by-step guidance on implementation
107
+ - **Detailed Acceptance Criteria**: Specific, measurable requirements that define project success, including:
108
+ - Functional deliverables with clear success metrics
109
+ - Performance benchmarks (response times, throughput, capacity)
110
+ - Security requirements and compliance standards
111
+ - User experience criteria and usability standards
112
+ - Integration testing requirements with external systems
113
+ - Deployment and operational readiness criteria
114
+ - **Dependencies on other tasks**: Prerequisites and sequencing
115
+ - **Security considerations**: Validation, authorization, and protection requirements
116
+ - **Testing requirements**: Specific tests to write and coverage expectations
117
+
118
+ **Task Granularity Guidelines:**
119
+
120
+ Each task should be sized appropriately for implementation:
121
+
122
+ - **1-2 hours per task** - Tasks should be completable in one sitting
123
+ - **Atomic units of work** - Each task should produce a meaningful, testable change
124
+ - **Independent implementation** - Tasks should be workable without blocking others
125
+ - **Specific scope** - Implementation approach should be clear from the task description
126
+ - **Testable outcome** - Tasks should have defined acceptance criteria
127
+
128
+ **Default task hierarchy approach:**
129
+
130
+ - **Prefer flat structure** - Most tasks should be at the same level
131
+ - **Only create sub-tasks when necessary** - When a task is genuinely too large (>2 hours)
132
+ - **Keep it simple** - Avoid unnecessary complexity in task organization
133
+
134
+ Group tasks logically:
135
+
136
+ - **Setup/Configuration**: Initial setup tasks
137
+ - **Core Implementation**: Main functionality (includes unit tests and documentation)
138
+ - **Security**: Validation and protection (includes related tests and docs)
139
+
140
+ ### 5. Create Tasks Using MCP
141
+
142
+ For each task, call the Task Trellis MCP `create_issue` tool:
143
+
144
+ - `type`: Set to `"task"`
145
+ - `parent`: The feature ID (optional - omit for standalone tasks)
146
+ - `title`: Generated task title
147
+ - `status`: Set to `"open"` (default, ready to claim) or `"draft"`
148
+ - `priority`: Based on criticality and dependencies (`"high"`, `"medium"`, or `"low"`)
149
+ - `prerequisites`: List of task IDs that must complete first
150
+ - `description`: Comprehensive task description
151
+
152
+ **For standalone tasks**: Simply omit the `parent` parameter entirely.
153
+
154
+ ### 6. Output Format
155
+
156
+ After successful creation:
157
+
158
+ ```
159
+ ✅ Successfully created [N] tasks for feature "[Feature Title]"
160
+
161
+ 📋 Created Tasks:
162
+ Database & Models:
163
+ ✓ T-[id1]: Create user database model with validation and unit tests
164
+ ✓ T-[id2]: Add email verification token system with tests and docs
165
+
166
+ API Development:
167
+ ✓ T-[id3]: Create POST /api/register endpoint with tests and validation
168
+ ✓ T-[id4]: Implement email verification endpoint with tests
169
+ ✓ T-[id5]: Add rate limiting with monitoring and tests
170
+
171
+ Frontend:
172
+ ✓ T-[id6]: Create registration form component with tests and error handling
173
+ ✓ T-[id7]: Add client-side validation with unit tests
174
+ ✓ T-[id8]: Implement success/error states with component tests
175
+
176
+ Integration:
177
+ ✓ T-[id9]: Write end-to-end integration tests for full registration flow
178
+
179
+ 📊 Task Summary:
180
+ - Total Tasks: [N]
181
+ - High Priority: [X]
182
+ ```
183
+
184
+ ## Task Creation Guidelines
185
+
186
+ Ensure tasks are:
187
+
188
+ - **Atomic**: Completable in one sitting (1-2 hours)
189
+ - **Specific**: Clear implementation path
190
+ - **Testable**: Defined acceptance criteria. Include instructions for writing unit tests in the same tasks as writing the production code. Integration tests should be in separate tasks.
191
+ - **Independent**: Minimal coupling where possible
192
+ - **Secure**: Include necessary validations
193
+
194
+ Common task patterns:
195
+
196
+ - **Model/Schema**: Create with validation, indexing, unit tests, and docs
197
+ - **API Endpoint**: Implement with input validation, error handling, tests, and docs
198
+ - **Frontend Component**: Create with interactivity, state handling, tests, and docs
199
+ - **Security**: Input validation, authorization, rate limiting with tests and docs
200
+
201
+ ## Question Guidelines
202
+
203
+ Ask questions that:
204
+
205
+ - **Clarify implementation**: Specific libraries or approaches?
206
+ - **Define boundaries**: What's included in each task?
207
+ - **Identify prerequisites**: What must be built first?
208
+ - **Confirm testing strategy**: What types of tests are needed?
209
+
210
+ ## Priority Assignment
211
+
212
+ Assign priorities based on:
213
+
214
+ - **High**: Blocking other work, security-critical, core functionality
215
+ - **Medium**: Standard implementation tasks
216
+ - **Low**: Enhancements, optimizations, nice-to-have features
217
+
218
+ <rules>
219
+ <critical>Use MCP tools for all operations (create_issue, get_issue, etc.)</critical>
220
+ <critical>Each task must be completable in 1-2 hours</critical>
221
+ <critical>Ask one question at a time with specific options</critical>
222
+ <critical>Continue asking questions until you have complete understanding of task boundaries</critical>
223
+ <important>Include testing and documentation within implementation tasks</important>
224
+ <important>Add security validation with tests where applicable</important>
225
+ </rules>
@@ -0,0 +1,170 @@
1
+ ---
2
+ description: Claim and implement a task following Research and Plan → Implement workflow
3
+ ---
4
+
5
+ # Implement Task Command
6
+
7
+ Claim and implement the next available task from the backlog using the Trellis task management system with the Research and Plan → Implement workflow.
8
+
9
+ ## Goal
10
+
11
+ Automatically claim the highest-priority available task and implement it following project standards, with comprehensive research, planning, and quality checks before marking complete.
12
+
13
+ ## Process
14
+
15
+ ### 1. Claim Next Available Task
16
+
17
+ Command: `claim_task`
18
+
19
+ #### Input
20
+
21
+ `$ARGUMENTS` (optional) - Can specify:
22
+
23
+ - Specific task ID to claim (e.g., "T-create-user-model")
24
+ - `--worktree (worktree-path)` - Worktree identifier to stamp on claimed task (currently informational only)
25
+ - `--scope (issue-id)` - Hierarchical scope for task filtering (P-, E-, F- prefixed)
26
+ - `--force` - Bypass validation when claiming specific task (only with `taskId`)
27
+ - Additional context or preferences
28
+
29
+ #### Instructions
30
+
31
+ Claims are made against the current working directory's task trellis system (tasks are managed in `.trellis` folder).
32
+
33
+ ### 2. Research and Planning Phase (MANDATORY)
34
+
35
+ **Never skip research - understand before coding:**
36
+
37
+ The research phase is critical for understanding the context and requirements before writing any code. During this phase:
38
+
39
+ - **Read parent issues for context**: Use MCP `get_issue` to read the parent feature (if it has one) for additional context, specifications, and requirements that may not be fully detailed in the task description.
40
+ - **Research**: Review the task requirements and related materials to identify key considerations, potential challenges, and relevant patterns or practices. Analyze the existing codebase for similar implementations or patterns. If necessary, perform external research via MCP tools or web searches.
41
+
42
+ ```
43
+ 📚 Research Phase for T-create-user-model
44
+
45
+ 1️⃣ Reading parent issues for context...
46
+ - `get_issue` for task's feature, epic, and project
47
+
48
+ 2️⃣ Using research and implementation planner subagent for comprehensive research and planning...
49
+
50
+ ✅ Research and planning complete. Implementing plan...
51
+ ```
52
+
53
+ ### 3. Implementation Phase
54
+
55
+ **Execute the plan with progress updates:**
56
+
57
+ The implementation phase is where the actual coding happens. During this phase:
58
+
59
+ - **Write clean code**: Follow project conventions and best practices
60
+ - **Run quality checks frequently**: Format, lint, and test after each major change
61
+ - **Write tests alongside code**: Don't leave testing for the end
62
+ - **Apply security measures**: Implement validation, sanitization, and protection as planned
63
+ - **Handle errors gracefully**: Include proper error handling and user feedback
64
+
65
+ ### 4. Complete Task
66
+
67
+ **Update task and provide summary:**
68
+
69
+ The completion phase ensures the task is properly documented and marked as done. This phase includes:
70
+
71
+ - **Verify all requirements met**: Check that the implementation satisfies the task description
72
+ - **Confirm quality checks pass**: Ensure all tests, linting, and formatting are clean
73
+ - **Write meaningful summary**: Describe what was implemented and any important decisions
74
+ - **List all changed files**: Document what was created or modified
75
+ - **Update task status**: Use MCP to mark the task as complete
76
+ - **Note any follow-up needed**: Identify if additional tasks should be created
77
+
78
+ Use MCP `complete_task` with:
79
+
80
+ - Task ID
81
+ - Summary of work done
82
+ - List of files changed
83
+
84
+ Example for a database model task:
85
+
86
+ ```
87
+ ✅ Completing task: T-create-user-model
88
+
89
+ Summary:
90
+ Implemented User model with all required fields including secure password
91
+ hashing, email validation, and unique constraints. Added comprehensive
92
+ test coverage and database migrations. Password hashing uses bcrypt with 12
93
+ rounds for security. Email validation includes regex pattern and uniqueness
94
+ constraints. All tests passing with 100% coverage.
95
+
96
+ Files changed:
97
+ - models/User.js (new) - User model with validation methods
98
+ - models/index.js (modified) - Added User export
99
+ - migrations/001_create_users.sql (new) - Database schema
100
+ - tests/models/User.test.js (new) - Comprehensive test suite
101
+ - package.json (modified) - Added bcrypt dependency
102
+
103
+ ✅ Task completed and moved to done folder!
104
+ ```
105
+
106
+ ### 5. Next Steps
107
+
108
+ **Provide clear next actions:**
109
+
110
+ ```
111
+ 🎯 Task Complete: T-create-user-model
112
+ ```
113
+
114
+ **STOP!** - Do not proceed. Complete one task and one task only. Do not implement another task.
115
+
116
+ ### During Research and Planning Phase
117
+
118
+ ```
119
+ ⚠️ Research issue: Cannot find existing model patterns
120
+
121
+ Attempting alternative approaches:
122
+ - Checking documentation...
123
+ - Searching for examples...
124
+ - Using web search for best practices...
125
+
126
+ [If still stuck]
127
+ ❓ Need clarification:
128
+ The project doesn't seem to have existing models.
129
+ Should I:
130
+ A) Create the first model and establish patterns
131
+ B) Check if models are in a different location
132
+ C) Use a different approach (raw SQL, different ORM)
133
+ ```
134
+
135
+ ## Security & Performance Principles
136
+
137
+ ### Security Always:
138
+
139
+ - **Validate ALL inputs** - Never trust user data
140
+ - **Use secure defaults** - Fail closed, not open
141
+ - **Parameterized queries** - Never concatenate SQL/queries
142
+ - **Secure random** - Use cryptographically secure generators
143
+ - **Least privilege** - Request minimum permissions needed
144
+ - **Error handling** - Don't expose internal details
145
+
146
+ ## Quality Standards
147
+
148
+ During implementation, ensure:
149
+
150
+ - **Research First**: Never skip research phase
151
+ - **Test Coverage**: Write tests in same task
152
+ - **Security**: Validate all inputs
153
+ - **Documentation**: Comment complex logic
154
+ - **Quality Checks**: All must pass before completion
155
+
156
+ ## Workflow Guidelines
157
+
158
+ - Always follow Research and Plan → Implement
159
+ - Run quality checks after each major change
160
+ - Write tests alongside implementation
161
+ - Commit only when all checks pass
162
+
163
+ <rules>
164
+ <critical>ALWAYS follow Research and Plan → Implement workflow</critical>
165
+ <critical>NEVER skip quality checks before completing task</critical>
166
+ <critical>All tests must pass before marking task complete</critical>
167
+ <important>Search codebase for patterns before implementing</important>
168
+ <important>Write tests in the same task as implementation</important>
169
+ <important>Apply security best practices to all code</important>
170
+ </rules>