@magic-ingredients/tiny-brain-local 0.13.1 → 0.14.10

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 (258) hide show
  1. package/dist/agents/formatters/claude-code-formatter.js +0 -1
  2. package/dist/agents/formatters/formatter-factory.js +0 -1
  3. package/dist/agents/types.js +0 -1
  4. package/dist/core/console-logger.js +0 -1
  5. package/dist/core/file-logger.js +0 -1
  6. package/dist/core/mcp-server.js +0 -1
  7. package/dist/index.d.ts +22 -8
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +20 -151
  10. package/dist/prompts/index.js +0 -1
  11. package/dist/prompts/persona/persona.prompt.js +0 -1
  12. package/dist/prompts/planning/planning.prompt.js +0 -1
  13. package/dist/prompts/prompt-registry.js +0 -1
  14. package/dist/prompts/rules/rules.prompt.js +0 -1
  15. package/dist/prompts/thinking/thinking.prompt.js +0 -1
  16. package/dist/services/UpdateService.js +0 -1
  17. package/dist/services/agent-installation-service.js +0 -1
  18. package/dist/services/agent-manager.js +0 -1
  19. package/dist/services/agent-service.js +0 -1
  20. package/dist/services/analyse-service.d.ts +52 -8
  21. package/dist/services/analyse-service.d.ts.map +1 -1
  22. package/dist/services/analyse-service.js +325 -66
  23. package/dist/services/credential-storage.service.js +0 -1
  24. package/dist/services/dashboard-launcher.service.js +0 -1
  25. package/dist/services/persona-enhancer.js +0 -1
  26. package/dist/services/persona-service.js +0 -1
  27. package/dist/services/remote/auth-token-service.js +0 -1
  28. package/dist/services/remote/persona-sync-service.js +0 -1
  29. package/dist/services/remote/system-persona-service.js +0 -1
  30. package/dist/services/repo-service.d.ts.map +1 -1
  31. package/dist/services/repo-service.js +31 -25
  32. package/dist/services/versioning-service.js +0 -1
  33. package/dist/storage/local-filesystem-adapter.js +0 -1
  34. package/dist/storage/platform-config-adapter.js +0 -1
  35. package/dist/storage/platform-path-builder.js +0 -1
  36. package/dist/storage/storage-path-builder.js +0 -1
  37. package/dist/tools/analyse-request/analyse-request.tool.js +0 -1
  38. package/dist/tools/analyse.tool.d.ts +4 -0
  39. package/dist/tools/analyse.tool.d.ts.map +1 -1
  40. package/dist/tools/analyse.tool.js +34 -3
  41. package/dist/tools/config/config.tool.d.ts +3 -0
  42. package/dist/tools/config/config.tool.d.ts.map +1 -1
  43. package/dist/tools/config/config.tool.js +139 -70
  44. package/dist/tools/config/index.js +0 -1
  45. package/dist/tools/index.d.ts +4 -4
  46. package/dist/tools/index.js +0 -1
  47. package/dist/tools/persona/as.tool.js +0 -1
  48. package/dist/tools/persona/persona.tool.js +0 -1
  49. package/dist/tools/plan/plan.tool.d.ts +4 -0
  50. package/dist/tools/plan/plan.tool.d.ts.map +1 -1
  51. package/dist/tools/plan/plan.tool.js +144 -32
  52. package/dist/tools/rules/rules.tool.js +0 -1
  53. package/dist/tools/strategy/strategy.tool.js +0 -1
  54. package/dist/tools/thinking/thinking.tool.js +0 -1
  55. package/dist/tools/tool-registry.js +0 -1
  56. package/dist/tools/update/update.tool.js +0 -1
  57. package/dist/tools/validate-response/validate-response.tool.js +0 -1
  58. package/dist/types/local-context.js +0 -1
  59. package/dist/types/request-context.d.ts +1 -1
  60. package/dist/types/request-context.d.ts.map +1 -1
  61. package/dist/types/request-context.js +0 -1
  62. package/dist/utils/package-version.js +0 -1
  63. package/dist/utils/repo-utils.js +0 -1
  64. package/package.json +8 -32
  65. package/LICENSE +0 -21
  66. package/README.md +0 -260
  67. package/dist/agents/formatters/claude-code-formatter.js.map +0 -1
  68. package/dist/agents/formatters/formatter-factory.js.map +0 -1
  69. package/dist/agents/types.js.map +0 -1
  70. package/dist/analyser/analyzers/script-analyzer.d.ts +0 -10
  71. package/dist/analyser/analyzers/script-analyzer.d.ts.map +0 -1
  72. package/dist/analyser/analyzers/script-analyzer.js +0 -205
  73. package/dist/analyser/analyzers/script-analyzer.js.map +0 -1
  74. package/dist/analyser/detectors/base-detector.d.ts +0 -12
  75. package/dist/analyser/detectors/base-detector.d.ts.map +0 -1
  76. package/dist/analyser/detectors/base-detector.js +0 -50
  77. package/dist/analyser/detectors/base-detector.js.map +0 -1
  78. package/dist/analyser/detectors/javascript-detector.d.ts +0 -19
  79. package/dist/analyser/detectors/javascript-detector.d.ts.map +0 -1
  80. package/dist/analyser/detectors/javascript-detector.js +0 -347
  81. package/dist/analyser/detectors/javascript-detector.js.map +0 -1
  82. package/dist/analyser/index.d.ts +0 -5
  83. package/dist/analyser/index.d.ts.map +0 -1
  84. package/dist/analyser/index.js +0 -315
  85. package/dist/analyser/index.js.map +0 -1
  86. package/dist/analyser/types.d.ts +0 -2
  87. package/dist/analyser/types.d.ts.map +0 -1
  88. package/dist/analyser/types.js +0 -2
  89. package/dist/analyser/types.js.map +0 -1
  90. package/dist/analyser/utils.d.ts +0 -5
  91. package/dist/analyser/utils.d.ts.map +0 -1
  92. package/dist/analyser/utils.js +0 -24
  93. package/dist/analyser/utils.js.map +0 -1
  94. package/dist/cli/cli-factory.d.ts +0 -3
  95. package/dist/cli/cli-factory.d.ts.map +0 -1
  96. package/dist/cli/cli-factory.js +0 -235
  97. package/dist/cli/cli-factory.js.map +0 -1
  98. package/dist/cli/commands/analyse.command.d.ts +0 -18
  99. package/dist/cli/commands/analyse.command.d.ts.map +0 -1
  100. package/dist/cli/commands/analyse.command.js +0 -161
  101. package/dist/cli/commands/analyse.command.js.map +0 -1
  102. package/dist/cli/commands/config.command.d.ts +0 -25
  103. package/dist/cli/commands/config.command.d.ts.map +0 -1
  104. package/dist/cli/commands/config.command.js +0 -285
  105. package/dist/cli/commands/config.command.js.map +0 -1
  106. package/dist/cli/commands/install.command.d.ts +0 -23
  107. package/dist/cli/commands/install.command.d.ts.map +0 -1
  108. package/dist/cli/commands/install.command.js +0 -189
  109. package/dist/cli/commands/install.command.js.map +0 -1
  110. package/dist/cli/commands/list.command.d.ts +0 -15
  111. package/dist/cli/commands/list.command.d.ts.map +0 -1
  112. package/dist/cli/commands/list.command.js +0 -90
  113. package/dist/cli/commands/list.command.js.map +0 -1
  114. package/dist/cli/commands/status.command.d.ts +0 -25
  115. package/dist/cli/commands/status.command.d.ts.map +0 -1
  116. package/dist/cli/commands/status.command.js +0 -367
  117. package/dist/cli/commands/status.command.js.map +0 -1
  118. package/dist/cli/commands/track-commit.command.d.ts +0 -52
  119. package/dist/cli/commands/track-commit.command.d.ts.map +0 -1
  120. package/dist/cli/commands/track-commit.command.js +0 -239
  121. package/dist/cli/commands/track-commit.command.js.map +0 -1
  122. package/dist/cli/commands/uninstall.command.d.ts +0 -23
  123. package/dist/cli/commands/uninstall.command.d.ts.map +0 -1
  124. package/dist/cli/commands/uninstall.command.js +0 -176
  125. package/dist/cli/commands/uninstall.command.js.map +0 -1
  126. package/dist/cli/commands/validate-commit-message.command.d.ts +0 -47
  127. package/dist/cli/commands/validate-commit-message.command.d.ts.map +0 -1
  128. package/dist/cli/commands/validate-commit-message.command.js +0 -223
  129. package/dist/cli/commands/validate-commit-message.command.js.map +0 -1
  130. package/dist/cli/installers/base-installer.d.ts +0 -20
  131. package/dist/cli/installers/base-installer.d.ts.map +0 -1
  132. package/dist/cli/installers/base-installer.js +0 -3
  133. package/dist/cli/installers/base-installer.js.map +0 -1
  134. package/dist/cli/installers/chatgpt-installer.d.ts +0 -18
  135. package/dist/cli/installers/chatgpt-installer.d.ts.map +0 -1
  136. package/dist/cli/installers/chatgpt-installer.js +0 -45
  137. package/dist/cli/installers/chatgpt-installer.js.map +0 -1
  138. package/dist/cli/installers/claude-code-installer.d.ts +0 -23
  139. package/dist/cli/installers/claude-code-installer.d.ts.map +0 -1
  140. package/dist/cli/installers/claude-code-installer.js +0 -127
  141. package/dist/cli/installers/claude-code-installer.js.map +0 -1
  142. package/dist/cli/installers/claude-desktop-installer.d.ts +0 -18
  143. package/dist/cli/installers/claude-desktop-installer.d.ts.map +0 -1
  144. package/dist/cli/installers/claude-desktop-installer.js +0 -48
  145. package/dist/cli/installers/claude-desktop-installer.js.map +0 -1
  146. package/dist/cli/installers/cursor-installer.d.ts +0 -18
  147. package/dist/cli/installers/cursor-installer.d.ts.map +0 -1
  148. package/dist/cli/installers/cursor-installer.js +0 -45
  149. package/dist/cli/installers/cursor-installer.js.map +0 -1
  150. package/dist/cli/installers/installer-factory.d.ts +0 -30
  151. package/dist/cli/installers/installer-factory.d.ts.map +0 -1
  152. package/dist/cli/installers/installer-factory.js +0 -90
  153. package/dist/cli/installers/installer-factory.js.map +0 -1
  154. package/dist/cli/utils/node-resolver.d.ts +0 -53
  155. package/dist/cli/utils/node-resolver.d.ts.map +0 -1
  156. package/dist/cli/utils/node-resolver.js +0 -200
  157. package/dist/cli/utils/node-resolver.js.map +0 -1
  158. package/dist/cli/utils/package-locator.d.ts +0 -9
  159. package/dist/cli/utils/package-locator.d.ts.map +0 -1
  160. package/dist/cli/utils/package-locator.js +0 -81
  161. package/dist/cli/utils/package-locator.js.map +0 -1
  162. package/dist/cli/utils/system-info.d.ts +0 -20
  163. package/dist/cli/utils/system-info.d.ts.map +0 -1
  164. package/dist/cli/utils/system-info.js +0 -90
  165. package/dist/cli/utils/system-info.js.map +0 -1
  166. package/dist/cli.d.ts +0 -3
  167. package/dist/cli.d.ts.map +0 -1
  168. package/dist/cli.js +0 -27
  169. package/dist/cli.js.map +0 -1
  170. package/dist/core/console-logger.js.map +0 -1
  171. package/dist/core/file-logger.js.map +0 -1
  172. package/dist/core/mcp-server.js.map +0 -1
  173. package/dist/index.js.map +0 -1
  174. package/dist/prompts/index.js.map +0 -1
  175. package/dist/prompts/persona/persona.prompt.js.map +0 -1
  176. package/dist/prompts/planning/planning.prompt.js.map +0 -1
  177. package/dist/prompts/prompt-registry.js.map +0 -1
  178. package/dist/prompts/rules/rules.prompt.js.map +0 -1
  179. package/dist/prompts/thinking/thinking.prompt.js.map +0 -1
  180. package/dist/services/UpdateService.js.map +0 -1
  181. package/dist/services/adr-service.d.ts +0 -70
  182. package/dist/services/adr-service.d.ts.map +0 -1
  183. package/dist/services/adr-service.js +0 -242
  184. package/dist/services/adr-service.js.map +0 -1
  185. package/dist/services/agent-installation-service.js.map +0 -1
  186. package/dist/services/agent-manager.js.map +0 -1
  187. package/dist/services/agent-service.js.map +0 -1
  188. package/dist/services/analyse-service.js.map +0 -1
  189. package/dist/services/credential-storage.service.js.map +0 -1
  190. package/dist/services/dashboard-launcher.service.js.map +0 -1
  191. package/dist/services/persona-enhancer.js.map +0 -1
  192. package/dist/services/persona-grouper.d.ts +0 -29
  193. package/dist/services/persona-grouper.d.ts.map +0 -1
  194. package/dist/services/persona-grouper.js +0 -111
  195. package/dist/services/persona-grouper.js.map +0 -1
  196. package/dist/services/persona-service.js.map +0 -1
  197. package/dist/services/remote/auth-token-service.js.map +0 -1
  198. package/dist/services/remote/persona-sync-service.js.map +0 -1
  199. package/dist/services/remote/system-persona-service.js.map +0 -1
  200. package/dist/services/repo-service.js.map +0 -1
  201. package/dist/services/types/persona-types.d.ts +0 -84
  202. package/dist/services/types/persona-types.d.ts.map +0 -1
  203. package/dist/services/types/persona-types.js +0 -5
  204. package/dist/services/types/persona-types.js.map +0 -1
  205. package/dist/services/versioning-service.js.map +0 -1
  206. package/dist/storage/local-filesystem-adapter.js.map +0 -1
  207. package/dist/storage/platform-config-adapter.js.map +0 -1
  208. package/dist/storage/platform-path-builder.js.map +0 -1
  209. package/dist/storage/storage-path-builder.js.map +0 -1
  210. package/dist/test-setup.d.ts +0 -2
  211. package/dist/test-setup.d.ts.map +0 -1
  212. package/dist/test-setup.js +0 -12
  213. package/dist/test-setup.js.map +0 -1
  214. package/dist/tools/analyse-request/analyse-request.tool.js.map +0 -1
  215. package/dist/tools/analyse.tool.js.map +0 -1
  216. package/dist/tools/config/config.tool.js.map +0 -1
  217. package/dist/tools/config/index.js.map +0 -1
  218. package/dist/tools/index.js.map +0 -1
  219. package/dist/tools/persona/as.tool.js.map +0 -1
  220. package/dist/tools/persona/persona.tool.js.map +0 -1
  221. package/dist/tools/plan/plan.tool.js.map +0 -1
  222. package/dist/tools/rules/rules.tool.js.map +0 -1
  223. package/dist/tools/strategy/strategy.tool.js.map +0 -1
  224. package/dist/tools/thinking/thinking.tool.js.map +0 -1
  225. package/dist/tools/tool-registry.js.map +0 -1
  226. package/dist/tools/update/update.tool.js.map +0 -1
  227. package/dist/tools/validate-response/validate-response.tool.js.map +0 -1
  228. package/dist/types/local-context.js.map +0 -1
  229. package/dist/types/request-context.js.map +0 -1
  230. package/dist/utils/adr-pattern-detector.d.ts +0 -38
  231. package/dist/utils/adr-pattern-detector.d.ts.map +0 -1
  232. package/dist/utils/adr-pattern-detector.js +0 -158
  233. package/dist/utils/adr-pattern-detector.js.map +0 -1
  234. package/dist/utils/adr-suggestion-generator.d.ts +0 -50
  235. package/dist/utils/adr-suggestion-generator.d.ts.map +0 -1
  236. package/dist/utils/adr-suggestion-generator.js +0 -63
  237. package/dist/utils/adr-suggestion-generator.js.map +0 -1
  238. package/dist/utils/commit-parser.d.ts +0 -25
  239. package/dist/utils/commit-parser.d.ts.map +0 -1
  240. package/dist/utils/commit-parser.js +0 -46
  241. package/dist/utils/commit-parser.js.map +0 -1
  242. package/dist/utils/package-version.js.map +0 -1
  243. package/dist/utils/repo-utils.js.map +0 -1
  244. package/templates/adr/README.md +0 -243
  245. package/templates/adr/_template/0001-record-architecture-decisions.md +0 -223
  246. package/templates/adr/_template/ADR_CREATION_INSTRUCTIONS.md +0 -234
  247. package/templates/adr/_template/adr-schema.json +0 -74
  248. package/templates/adr/_template/adr-template.md +0 -136
  249. package/templates/prd/PRD_CREATION_INSTRUCTIONS.md +0 -268
  250. package/templates/prd/README.md +0 -252
  251. package/templates/prd/_template/feature-template.md +0 -105
  252. package/templates/prd/_template/prd-template.md +0 -126
  253. package/templates/prd/example-task-management/features/task-collaboration.md +0 -84
  254. package/templates/prd/example-task-management/features/task-crud.md +0 -222
  255. package/templates/prd/example-task-management/features/task-workflow.md +0 -62
  256. package/templates/prd/example-task-management/prd.md +0 -177
  257. package/templates/prd/feature-schema.json +0 -54
  258. package/templates/prd/prd-schema.json +0 -60
@@ -1,74 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://example.com/adr-schema.json",
4
- "title": "Architecture Decision Record",
5
- "description": "Schema for validating ADR YAML frontmatter",
6
- "type": "object",
7
- "required": ["adr_number", "title", "date", "status"],
8
- "properties": {
9
- "adr_number": {
10
- "type": "integer",
11
- "minimum": 1,
12
- "description": "Sequential ADR number"
13
- },
14
- "title": {
15
- "type": "string",
16
- "minLength": 5,
17
- "maxLength": 100,
18
- "description": "Brief, descriptive title of the decision"
19
- },
20
- "date": {
21
- "type": "string",
22
- "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
23
- "description": "Decision date in YYYY-MM-DD format"
24
- },
25
- "status": {
26
- "type": "string",
27
- "enum": ["proposed", "accepted", "deprecated", "superseded"],
28
- "description": "Current status of the ADR"
29
- },
30
- "supersedes": {
31
- "oneOf": [
32
- { "type": "null" },
33
- { "type": "integer", "minimum": 1 }
34
- ],
35
- "description": "ADR number this decision replaces (if any)"
36
- },
37
- "superseded_by": {
38
- "oneOf": [
39
- { "type": "null" },
40
- { "type": "integer", "minimum": 1 }
41
- ],
42
- "description": "ADR number that replaces this decision (if any)"
43
- },
44
- "tags": {
45
- "type": "array",
46
- "items": {
47
- "type": "string",
48
- "pattern": "^[a-z0-9-]+$"
49
- },
50
- "uniqueItems": true,
51
- "description": "Tags for categorizing the ADR"
52
- },
53
- "decision_makers": {
54
- "type": "array",
55
- "items": {
56
- "type": "string"
57
- },
58
- "description": "People involved in making this decision"
59
- }
60
- },
61
- "additionalProperties": false,
62
- "examples": [
63
- {
64
- "adr_number": 42,
65
- "title": "Use PostgreSQL for Data Storage",
66
- "date": "2025-01-15",
67
- "status": "accepted",
68
- "supersedes": null,
69
- "superseded_by": null,
70
- "tags": ["database", "infrastructure"],
71
- "decision_makers": ["Alice", "Bob", "Charlie"]
72
- }
73
- ]
74
- }
@@ -1,136 +0,0 @@
1
- ---
2
- # ADR Metadata (YAML Frontmatter)
3
- adr_number: 0
4
- title: "Decision Title Here"
5
- date: YYYY-MM-DD
6
- status: proposed # proposed | accepted | deprecated | superseded
7
- supersedes: null # ADR number if replacing another decision
8
- superseded_by: null # ADR number if this decision was replaced
9
- tags: [] # e.g., [infrastructure, testing, backend]
10
- decision_makers: [] # People involved in the decision
11
- ---
12
-
13
- # ADR-{adr_number}: {title}
14
-
15
- ## Status
16
-
17
- **{status}** (Date: {date})
18
-
19
- <!-- Status values: proposed | accepted | deprecated | superseded -->
20
- <!-- If superseded, reference the new ADR: "Superseded by ADR-XXX" -->
21
- <!-- If superseding, reference the old ADR: "Supersedes ADR-XXX" -->
22
-
23
- ## Context
24
-
25
- <!-- What is the issue we're facing? -->
26
- <!-- What constraints exist (technical, business, team, time)? -->
27
- <!-- What research/prototyping/experiments informed this decision? -->
28
- <!-- What problem are we trying to solve? -->
29
-
30
- ### Background
31
- <!-- Additional context about the situation -->
32
-
33
- ### Constraints
34
- <!-- List key constraints that influenced the decision -->
35
- - Constraint 1
36
- - Constraint 2
37
-
38
- ## Decision
39
-
40
- <!-- The decision that was made - be specific and concrete -->
41
- <!-- Use clear, declarative language: "We will use..." -->
42
-
43
- ### Implementation Details
44
- <!-- How will this decision be implemented? -->
45
- <!-- Key technical specifics -->
46
-
47
- ## Consequences
48
-
49
- ### Positive Consequences
50
- <!-- Benefits realized -->
51
- <!-- Problems solved -->
52
- - Benefit 1
53
- - Benefit 2
54
-
55
- ### Negative Consequences
56
- <!-- Trade-offs accepted -->
57
- <!-- Technical debt incurred -->
58
- <!-- Limitations introduced -->
59
- - Trade-off 1
60
- - Trade-off 2
61
-
62
- ### Neutral Consequences
63
- <!-- Future work required -->
64
- <!-- Dependencies created -->
65
- <!-- Changes to team workflow -->
66
- - Implication 1
67
- - Implication 2
68
-
69
- ## Alternatives Considered
70
-
71
- ### Alternative 1: {Name}
72
- **Description:** Brief description of this alternative
73
-
74
- **Pros:**
75
- - Pro 1
76
- - Pro 2
77
-
78
- **Cons:**
79
- - Con 1
80
- - Con 2
81
-
82
- **Rejection Reason:** Why this option was not chosen
83
-
84
- ---
85
-
86
- ### Alternative 2: {Name}
87
- **Description:** Brief description of this alternative
88
-
89
- **Pros:**
90
- - Pro 1
91
- - Pro 2
92
-
93
- **Cons:**
94
- - Con 1
95
- - Con 2
96
-
97
- **Rejection Reason:** Why this option was not chosen
98
-
99
- ---
100
-
101
- ## Validation
102
-
103
- <!-- How was this decision validated? -->
104
- <!-- What tests/experiments were performed? -->
105
- <!-- What metrics were collected? -->
106
- <!-- What success criteria were met? -->
107
-
108
- ### Tests Performed
109
- - Test 1
110
- - Test 2
111
-
112
- ### Metrics Collected
113
- - Metric 1: Value
114
- - Metric 2: Value
115
-
116
- ### Success Criteria
117
- - [ ] Criterion 1
118
- - [ ] Criterion 2
119
-
120
- ## References
121
-
122
- <!-- Links to relevant resources -->
123
- - [Prototype code](url)
124
- - [Benchmark results](url)
125
- - [Team discussion](url)
126
- - [Related documentation](url)
127
-
128
- ## Notes
129
-
130
- <!-- Any additional notes, future considerations, or follow-up items -->
131
-
132
- ---
133
-
134
- **Related ADRs:**
135
- - ADR-XXX: Related Decision
136
- - ADR-YYY: Another Related Decision
@@ -1,268 +0,0 @@
1
- # PRD Creation Instructions for Claude Code
2
-
3
- ## When to Create a PRD
4
-
5
- Create a PRD automatically when the user describes:
6
- - A new product feature or capability
7
- - A system enhancement or improvement
8
- - A major technical initiative
9
- - A user-facing functionality change
10
- - Multi-step implementation requiring planning
11
-
12
- ## PRD Creation Process
13
-
14
- ### Step 1: Engage in Interactive Planning
15
-
16
- When a user describes requirements, engage in collaborative discussion:
17
- - Ask clarifying questions about scope and goals
18
- - Discuss constraints (technical, time, budget, team)
19
- - Explore user needs and pain points
20
- - Consider alternatives and trade-offs
21
- - Validate understanding before creating PRD
22
-
23
- ### Step 2: Determine PRD Structure
24
-
25
- From the conversation, extract:
26
- - **Purpose**: What problem are we solving?
27
- - **Goals**: What do we want to achieve?
28
- - **User needs**: Who benefits and how?
29
- - **Features**: What functionality is needed?
30
- - **Success criteria**: How do we measure success?
31
- - **Constraints**: What limitations exist?
32
-
33
- ### Step 3: Create PRD Document
34
-
35
- Use the template at `docs/prd/_template/prd-template.md` and populate:
36
-
37
- **YAML Frontmatter:**
38
- ```yaml
39
- id: [descriptive-kebab-case-id]
40
- title: "[Clear, User-Focused Title]"
41
- version: 1.0.0 # Start with 1.0.0
42
- status: not_started # or in_progress if work has begun
43
- created: [YYYY-MM-DD - today's date]
44
- updated: [YYYY-MM-DD - today's date]
45
- author: [Claude Code or user name if provided]
46
- ```
47
-
48
- **Content Sections:**
49
-
50
- 1. **Purpose and Goals**
51
- - Clear problem statement
52
- - High-level objectives
53
- - Value proposition
54
-
55
- 2. **User Needs**
56
- - Target audience definition
57
- - User stories in "As a [role], I want [action] so that [benefit]" format
58
- - Pain points being addressed
59
-
60
- 3. **Features and Functionality**
61
- - List each major feature
62
- - Link to separate feature markdown files
63
- - Brief description of each feature
64
- - Initial status (usually "planned")
65
-
66
- 4. **Design and User Experience** (Optional)
67
- - Directory structures if relevant
68
- - Workflow visualizations
69
- - UI/UX considerations
70
-
71
- 5. **Release Criteria**
72
- - Functional requirements (must-haves)
73
- - Usability requirements
74
- - Technical requirements
75
- - Use checkboxes for trackability
76
-
77
- 6. **Success Metrics (KPIs)**
78
- - Measurable goals
79
- - Target values
80
- - How success will be evaluated
81
-
82
- 7. **Constraints and Dependencies**
83
- - Technical constraints
84
- - Dependencies on other systems
85
- - Known limitations or trade-offs
86
-
87
- ### Step 4: Create Feature Files
88
-
89
- For each feature identified in the PRD:
90
-
91
- 1. Create `docs/prd/{prd-id}/features/{feature-name}.md`
92
- 2. Use the feature template at `docs/prd/_template/feature-template.md`
93
- 3. Fill out:
94
- - **YAML frontmatter** with feature metadata
95
- - **Description** of what the feature does
96
- - **Acceptance Criteria** with checkboxes
97
- - **Tasks** broken down with files and expected changes
98
- - **Dependencies** on other features
99
- - **Testing Strategy** for validation
100
-
101
- **Feature YAML Frontmatter:**
102
- ```yaml
103
- id: [feature-kebab-case-id]
104
- prd_id: [parent-prd-id]
105
- title: "[Feature Title]"
106
- status: planned # planned | in_progress | complete
107
- created: [YYYY-MM-DD]
108
- updated: [YYYY-MM-DD]
109
- ```
110
-
111
- ### Step 5: Organize Directory Structure
112
-
113
- Create the following structure:
114
- ```
115
- docs/prd/{prd-id}/
116
- ├── prd.md
117
- └── features/
118
- ├── feature-1.md
119
- ├── feature-2.md
120
- └── feature-3.md
121
- ```
122
-
123
- ### Step 6: Save and Confirm
124
-
125
- 1. Save PRD to `docs/prd/{prd-id}/prd.md`
126
- 2. Save features to `docs/prd/{prd-id}/features/{feature-name}.md`
127
- 3. Tell user: "I've created PRD '{title}' with {N} features at docs/prd/{prd-id}/"
128
- 4. Offer to make adjustments or add more features
129
-
130
- ## Quality Checklist
131
-
132
- Before finalizing a PRD, verify:
133
-
134
- - [ ] All YAML frontmatter fields are filled
135
- - [ ] ID is in kebab-case and unique
136
- - [ ] Purpose clearly states the problem being solved
137
- - [ ] User needs include specific user stories
138
- - [ ] Each feature has its own markdown file
139
- - [ ] Features link correctly from main PRD
140
- - [ ] Acceptance criteria are testable
141
- - [ ] Tasks are broken down granularly
142
- - [ ] Success metrics are measurable
143
- - [ ] No TODO or FIXME comments remain
144
- - [ ] Markdown formatting is correct
145
- - [ ] File names follow conventions
146
-
147
- ## Example Workflows
148
-
149
- ### Workflow 1: New Feature Request
150
-
151
- ```
152
- User: "We need to add user authentication to our app"
153
-
154
- Claude:
155
- 1. Ask: "What authentication methods? Email/password? OAuth? Both?"
156
- 2. Ask: "Any specific security requirements or compliance needs?"
157
- 3. Ask: "Do we need password reset, MFA, session management?"
158
- 4. Once clarified, create PRD:
159
- - ID: user-authentication-system
160
- - Features: email-auth, oauth-integration, password-reset, session-management
161
- 5. Create feature files for each
162
- 6. Save and confirm
163
- ```
164
-
165
- ### Workflow 2: Enhancement to Existing System
166
-
167
- ```
168
- User: "Let's add real-time notifications to our chat app"
169
-
170
- Claude:
171
- 1. Ask: "What events should trigger notifications?"
172
- 2. Ask: "Desktop, mobile, or both? Browser notifications?"
173
- 3. Ask: "How should users control notification preferences?"
174
- 4. Create PRD:
175
- - ID: real-time-notifications
176
- - Features: push-notifications, notification-preferences, notification-history
177
- 5. Create feature files
178
- 6. Reference any existing PRDs if relevant
179
- 7. Save and confirm
180
- ```
181
-
182
- ### Workflow 3: Technical Initiative
183
-
184
- ```
185
- User: "We should refactor our API to use GraphQL"
186
-
187
- Claude:
188
- 1. Ask: "What's driving this? Performance? Developer experience?"
189
- 2. Ask: "Full migration or gradual? Timeline?"
190
- 3. Ask: "Keep REST endpoints or deprecate them?"
191
- 4. Create PRD:
192
- - ID: graphql-api-migration
193
- - Features: graphql-schema-design, resolver-implementation, client-migration
194
- 5. Include migration strategy in PRD
195
- 6. Create feature files with detailed tasks
196
- 7. Save and confirm
197
- ```
198
-
199
- ## Common Pitfalls to Avoid
200
-
201
- ❌ **Don't**: Create PRD without understanding user needs
202
- ✅ **Do**: Have a collaborative discussion first
203
-
204
- ❌ **Don't**: Write vague acceptance criteria like "Works well"
205
- ✅ **Do**: Be specific "User can log in within 2 seconds"
206
-
207
- ❌ **Don't**: Lump all functionality into one feature
208
- ✅ **Do**: Break down into logical, testable features
209
-
210
- ❌ **Don't**: Skip the constraints section
211
- ✅ **Do**: Document limitations upfront to set expectations
212
-
213
- ❌ **Don't**: Forget to link features in the main PRD
214
- ✅ **Do**: Use relative links: `[features/auth.md](features/auth.md)`
215
-
216
- ❌ **Don't**: Use technical jargon without explanation
217
- ✅ **Do**: Write for both technical and non-technical stakeholders
218
-
219
- ## Template Shortcuts
220
-
221
- ### Simple Feature PRD
222
- ```
223
- Purpose: Add [capability] to [system] for [user benefit]
224
- Features: 1-3 core features, each in separate file
225
- Success: [Measurable outcome]
226
- Timeline: [Estimated completion]
227
- ```
228
-
229
- ### System Enhancement PRD
230
- ```
231
- Purpose: Improve [existing system] by [enhancement]
232
- Current Problems: [List pain points]
233
- Proposed Solution: [High-level approach]
234
- Features: Broken down by component or workflow
235
- Migration Strategy: If replacing existing functionality
236
- ```
237
-
238
- ### Technical Initiative PRD
239
- ```
240
- Purpose: [Technical improvement] to achieve [business goal]
241
- Technical Context: Current architecture and limitations
242
- Proposed Architecture: New approach
243
- Features: Implementation phases or components
244
- Validation: How to test and measure success
245
- ```
246
-
247
- ## Integration with Planning System
248
-
249
- PRDs work alongside the planning system:
250
- - **Plan tool**: Use `plan accept` to create implementation plans
251
- - **Plan feature**: Add features to existing PRDs
252
- - **Plan implement**: Execute task-by-task with TDD
253
- - **Git hooks**: Automatically track commit SHAs in feature files
254
-
255
- When creating a PRD, you can offer to:
256
- 1. Create the PRD structure
257
- 2. Use the plan tool to create an implementation plan
258
- 3. Begin implementation with `plan implement`
259
-
260
- ## Final Notes
261
-
262
- - **Be collaborative**: PRDs are living documents; expect iteration
263
- - **Be thorough**: Better to over-document than under-document
264
- - **Be clear**: Write for diverse audiences
265
- - **Be realistic**: Set achievable goals and acknowledge constraints
266
- - **Be helpful**: Offer to create PRD even if not explicitly requested
267
-
268
- When in doubt, ask the user: "Would you like me to create a PRD to document these requirements?"