openplanr 0.8.0 → 1.0.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 (227) hide show
  1. package/README.md +142 -52
  2. package/dist/agents/index.d.ts +1 -5
  3. package/dist/agents/index.d.ts.map +1 -1
  4. package/dist/agents/index.js +1 -4
  5. package/dist/agents/index.js.map +1 -1
  6. package/dist/agents/task-parser.d.ts +4 -1
  7. package/dist/agents/task-parser.d.ts.map +1 -1
  8. package/dist/agents/task-parser.js +6 -3
  9. package/dist/agents/task-parser.js.map +1 -1
  10. package/dist/agents/utils.d.ts +0 -4
  11. package/dist/agents/utils.d.ts.map +1 -1
  12. package/dist/agents/utils.js +3 -24
  13. package/dist/agents/utils.js.map +1 -1
  14. package/dist/ai/codebase/context-builder.d.ts +22 -3
  15. package/dist/ai/codebase/context-builder.d.ts.map +1 -1
  16. package/dist/ai/codebase/context-builder.js +202 -14
  17. package/dist/ai/codebase/context-builder.js.map +1 -1
  18. package/dist/ai/codebase/file-reader.d.ts.map +1 -1
  19. package/dist/ai/codebase/file-reader.js +7 -3
  20. package/dist/ai/codebase/file-reader.js.map +1 -1
  21. package/dist/ai/codebase/index.d.ts +3 -1
  22. package/dist/ai/codebase/index.d.ts.map +1 -1
  23. package/dist/ai/codebase/index.js +3 -1
  24. package/dist/ai/codebase/index.js.map +1 -1
  25. package/dist/ai/codebase/pattern-rules.d.ts +28 -0
  26. package/dist/ai/codebase/pattern-rules.d.ts.map +1 -0
  27. package/dist/ai/codebase/pattern-rules.js +186 -0
  28. package/dist/ai/codebase/pattern-rules.js.map +1 -0
  29. package/dist/ai/codebase/rules-reader.d.ts +14 -0
  30. package/dist/ai/codebase/rules-reader.d.ts.map +1 -0
  31. package/dist/ai/codebase/rules-reader.js +25 -0
  32. package/dist/ai/codebase/rules-reader.js.map +1 -0
  33. package/dist/ai/codebase/stack-detector.d.ts.map +1 -1
  34. package/dist/ai/codebase/stack-detector.js +4 -1
  35. package/dist/ai/codebase/stack-detector.js.map +1 -1
  36. package/dist/ai/codebase/tree-generator.d.ts.map +1 -1
  37. package/dist/ai/codebase/tree-generator.js +5 -2
  38. package/dist/ai/codebase/tree-generator.js.map +1 -1
  39. package/dist/ai/errors.js +1 -1
  40. package/dist/ai/errors.js.map +1 -1
  41. package/dist/ai/prompts/prompt-builder.d.ts +12 -0
  42. package/dist/ai/prompts/prompt-builder.d.ts.map +1 -1
  43. package/dist/ai/prompts/prompt-builder.js +45 -3
  44. package/dist/ai/prompts/prompt-builder.js.map +1 -1
  45. package/dist/ai/prompts/system-prompts.d.ts +5 -3
  46. package/dist/ai/prompts/system-prompts.d.ts.map +1 -1
  47. package/dist/ai/prompts/system-prompts.js +74 -13
  48. package/dist/ai/prompts/system-prompts.js.map +1 -1
  49. package/dist/ai/schemas/ai-response-schemas.d.ts +48 -2
  50. package/dist/ai/schemas/ai-response-schemas.d.ts.map +1 -1
  51. package/dist/ai/schemas/ai-response-schemas.js +19 -0
  52. package/dist/ai/schemas/ai-response-schemas.js.map +1 -1
  53. package/dist/ai/types.d.ts +4 -2
  54. package/dist/ai/types.d.ts.map +1 -1
  55. package/dist/ai/types.js +3 -1
  56. package/dist/ai/types.js.map +1 -1
  57. package/dist/ai/validation/dependency-chains.d.ts +21 -0
  58. package/dist/ai/validation/dependency-chains.d.ts.map +1 -0
  59. package/dist/ai/validation/dependency-chains.js +114 -0
  60. package/dist/ai/validation/dependency-chains.js.map +1 -0
  61. package/dist/ai/validation/index.d.ts +3 -0
  62. package/dist/ai/validation/index.d.ts.map +1 -0
  63. package/dist/ai/validation/index.js +3 -0
  64. package/dist/ai/validation/index.js.map +1 -0
  65. package/dist/ai/validation/task-validator.d.ts +37 -0
  66. package/dist/ai/validation/task-validator.d.ts.map +1 -0
  67. package/dist/ai/validation/task-validator.js +89 -0
  68. package/dist/ai/validation/task-validator.js.map +1 -0
  69. package/dist/cli/commands/backlog.d.ts +10 -0
  70. package/dist/cli/commands/backlog.d.ts.map +1 -0
  71. package/dist/cli/commands/backlog.js +292 -0
  72. package/dist/cli/commands/backlog.js.map +1 -0
  73. package/dist/cli/commands/checklist.js +4 -4
  74. package/dist/cli/commands/checklist.js.map +1 -1
  75. package/dist/cli/commands/config.js +13 -13
  76. package/dist/cli/commands/config.js.map +1 -1
  77. package/dist/cli/commands/epic.d.ts.map +1 -1
  78. package/dist/cli/commands/epic.js +41 -22
  79. package/dist/cli/commands/epic.js.map +1 -1
  80. package/dist/cli/commands/estimate.d.ts.map +1 -1
  81. package/dist/cli/commands/estimate.js +40 -39
  82. package/dist/cli/commands/estimate.js.map +1 -1
  83. package/dist/cli/commands/export.d.ts +8 -0
  84. package/dist/cli/commands/export.d.ts.map +1 -0
  85. package/dist/cli/commands/export.js +282 -0
  86. package/dist/cli/commands/export.js.map +1 -0
  87. package/dist/cli/commands/feature.js +9 -9
  88. package/dist/cli/commands/feature.js.map +1 -1
  89. package/dist/cli/commands/github.d.ts +8 -0
  90. package/dist/cli/commands/github.d.ts.map +1 -0
  91. package/dist/cli/commands/github.js +415 -0
  92. package/dist/cli/commands/github.js.map +1 -0
  93. package/dist/cli/commands/plan.d.ts.map +1 -1
  94. package/dist/cli/commands/plan.js +104 -50
  95. package/dist/cli/commands/plan.js.map +1 -1
  96. package/dist/cli/commands/quick.d.ts.map +1 -1
  97. package/dist/cli/commands/quick.js +37 -107
  98. package/dist/cli/commands/quick.js.map +1 -1
  99. package/dist/cli/commands/refine.js +21 -21
  100. package/dist/cli/commands/refine.js.map +1 -1
  101. package/dist/cli/commands/search.d.ts.map +1 -1
  102. package/dist/cli/commands/search.js +18 -7
  103. package/dist/cli/commands/search.js.map +1 -1
  104. package/dist/cli/commands/sprint.d.ts +9 -0
  105. package/dist/cli/commands/sprint.d.ts.map +1 -0
  106. package/dist/cli/commands/sprint.js +519 -0
  107. package/dist/cli/commands/sprint.js.map +1 -0
  108. package/dist/cli/commands/status.d.ts.map +1 -1
  109. package/dist/cli/commands/status.js +77 -32
  110. package/dist/cli/commands/status.js.map +1 -1
  111. package/dist/cli/commands/story.js +15 -15
  112. package/dist/cli/commands/story.js.map +1 -1
  113. package/dist/cli/commands/sync.js +11 -7
  114. package/dist/cli/commands/sync.js.map +1 -1
  115. package/dist/cli/commands/task.d.ts +0 -2
  116. package/dist/cli/commands/task.d.ts.map +1 -1
  117. package/dist/cli/commands/task.js +14 -169
  118. package/dist/cli/commands/task.js.map +1 -1
  119. package/dist/cli/commands/template.d.ts +10 -0
  120. package/dist/cli/commands/template.d.ts.map +1 -0
  121. package/dist/cli/commands/template.js +269 -0
  122. package/dist/cli/commands/template.js.map +1 -0
  123. package/dist/cli/helpers/task-creation.d.ts +89 -0
  124. package/dist/cli/helpers/task-creation.d.ts.map +1 -0
  125. package/dist/cli/helpers/task-creation.js +140 -0
  126. package/dist/cli/helpers/task-creation.js.map +1 -0
  127. package/dist/cli/index.js +29 -2
  128. package/dist/cli/index.js.map +1 -1
  129. package/dist/models/schema.d.ts +2 -0
  130. package/dist/models/schema.d.ts.map +1 -1
  131. package/dist/models/schema.js +2 -0
  132. package/dist/models/schema.js.map +1 -1
  133. package/dist/models/types.d.ts +32 -1
  134. package/dist/models/types.d.ts.map +1 -1
  135. package/dist/services/artifact-gathering.d.ts +2 -0
  136. package/dist/services/artifact-gathering.d.ts.map +1 -1
  137. package/dist/services/artifact-gathering.js +26 -7
  138. package/dist/services/artifact-gathering.js.map +1 -1
  139. package/dist/services/artifact-service.d.ts +5 -5
  140. package/dist/services/artifact-service.d.ts.map +1 -1
  141. package/dist/services/artifact-service.js +4 -0
  142. package/dist/services/artifact-service.js.map +1 -1
  143. package/dist/services/config-service.d.ts.map +1 -1
  144. package/dist/services/config-service.js +2 -0
  145. package/dist/services/config-service.js.map +1 -1
  146. package/dist/services/credential-backends.d.ts.map +1 -1
  147. package/dist/services/credential-backends.js +15 -7
  148. package/dist/services/credential-backends.js.map +1 -1
  149. package/dist/services/credentials-service.d.ts.map +1 -1
  150. package/dist/services/credentials-service.js +6 -3
  151. package/dist/services/credentials-service.js.map +1 -1
  152. package/dist/services/github-service.d.ts +83 -0
  153. package/dist/services/github-service.d.ts.map +1 -0
  154. package/dist/services/github-service.js +440 -0
  155. package/dist/services/github-service.js.map +1 -0
  156. package/dist/services/template-service.d.ts +2 -1
  157. package/dist/services/template-service.d.ts.map +1 -1
  158. package/dist/services/template-service.js +3 -1
  159. package/dist/services/template-service.js.map +1 -1
  160. package/dist/templates/backlog/backlog-item.md.hbs +40 -0
  161. package/dist/templates/checklists/agile-checklist.md.hbs +1 -1
  162. package/dist/templates/export/planning-report.html.hbs +230 -0
  163. package/dist/templates/export/planning-report.md.hbs +136 -0
  164. package/dist/templates/quick/quick-task.md.hbs +1 -1
  165. package/dist/templates/rules/claude/CLAUDE.md.hbs +78 -35
  166. package/dist/templates/rules/codex/AGENTS.md.hbs +73 -17
  167. package/dist/templates/rules/cursor/2101-implement-task-list.mdc.hbs +66 -14
  168. package/dist/templates/sprints/sprint.md.hbs +42 -0
  169. package/dist/templates/task-templates/api-integration.json +45 -0
  170. package/dist/templates/task-templates/auth-flow.json +48 -0
  171. package/dist/templates/task-templates/database-migration.json +44 -0
  172. package/dist/templates/task-templates/react-component.json +45 -0
  173. package/dist/templates/task-templates/rest-endpoint.json +53 -0
  174. package/dist/templates/tasks/task-list.md.hbs +1 -1
  175. package/dist/utils/constants.d.ts +4 -0
  176. package/dist/utils/constants.d.ts.map +1 -1
  177. package/dist/utils/constants.js +4 -0
  178. package/dist/utils/constants.js.map +1 -1
  179. package/dist/utils/logger.d.ts +31 -1
  180. package/dist/utils/logger.d.ts.map +1 -1
  181. package/dist/utils/logger.js +92 -9
  182. package/dist/utils/logger.js.map +1 -1
  183. package/dist/utils/markdown.d.ts +3 -2
  184. package/dist/utils/markdown.d.ts.map +1 -1
  185. package/dist/utils/markdown.js +3 -1
  186. package/dist/utils/markdown.js.map +1 -1
  187. package/dist/utils/slugify.d.ts +8 -1
  188. package/dist/utils/slugify.d.ts.map +1 -1
  189. package/dist/utils/slugify.js +18 -2
  190. package/dist/utils/slugify.js.map +1 -1
  191. package/package.json +14 -3
  192. package/dist/agents/agent-factory.d.ts +0 -7
  193. package/dist/agents/agent-factory.d.ts.map +0 -1
  194. package/dist/agents/agent-factory.js +0 -22
  195. package/dist/agents/agent-factory.js.map +0 -1
  196. package/dist/agents/claude-agent.d.ts +0 -18
  197. package/dist/agents/claude-agent.d.ts.map +0 -1
  198. package/dist/agents/claude-agent.js +0 -183
  199. package/dist/agents/claude-agent.js.map +0 -1
  200. package/dist/agents/codex-agent.d.ts +0 -17
  201. package/dist/agents/codex-agent.d.ts.map +0 -1
  202. package/dist/agents/codex-agent.js +0 -124
  203. package/dist/agents/codex-agent.js.map +0 -1
  204. package/dist/agents/cursor-agent.d.ts +0 -14
  205. package/dist/agents/cursor-agent.d.ts.map +0 -1
  206. package/dist/agents/cursor-agent.js +0 -49
  207. package/dist/agents/cursor-agent.js.map +0 -1
  208. package/dist/agents/implementation-bridge.d.ts +0 -30
  209. package/dist/agents/implementation-bridge.d.ts.map +0 -1
  210. package/dist/agents/implementation-bridge.js +0 -256
  211. package/dist/agents/implementation-bridge.js.map +0 -1
  212. package/dist/agents/progress.d.ts +0 -62
  213. package/dist/agents/progress.d.ts.map +0 -1
  214. package/dist/agents/progress.js +0 -155
  215. package/dist/agents/progress.js.map +0 -1
  216. package/dist/agents/prompt-composer.d.ts +0 -30
  217. package/dist/agents/prompt-composer.d.ts.map +0 -1
  218. package/dist/agents/prompt-composer.js +0 -81
  219. package/dist/agents/prompt-composer.js.map +0 -1
  220. package/dist/agents/types.d.ts +0 -25
  221. package/dist/agents/types.d.ts.map +0 -1
  222. package/dist/agents/types.js +0 -8
  223. package/dist/agents/types.js.map +0 -1
  224. package/dist/utils/error-context.d.ts +0 -23
  225. package/dist/utils/error-context.d.ts.map +0 -1
  226. package/dist/utils/error-context.js +0 -94
  227. package/dist/utils/error-context.js.map +0 -1
@@ -0,0 +1,230 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>{{projectName}} — Planning Report</title>
7
+ <style>
8
+ :root {
9
+ --bg: #ffffff;
10
+ --fg: #1a1a2e;
11
+ --muted: #6c757d;
12
+ --border: #dee2e6;
13
+ --accent: #4169E1;
14
+ --done: #2E8B57;
15
+ --progress: #DAA520;
16
+ --pending: #6c757d;
17
+ --epic-bg: #f0edff;
18
+ --feature-bg: #eef3ff;
19
+ --story-bg: #f0faf4;
20
+ --task-bg: #fffcf0;
21
+ --quick-bg: #fdf0ff;
22
+ }
23
+ * { box-sizing: border-box; margin: 0; padding: 0; }
24
+ body {
25
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
26
+ color: var(--fg);
27
+ background: var(--bg);
28
+ line-height: 1.6;
29
+ max-width: 960px;
30
+ margin: 0 auto;
31
+ padding: 2rem 1.5rem;
32
+ }
33
+ h1 { font-size: 1.8rem; margin-bottom: 0.25rem; }
34
+ h2 { font-size: 1.4rem; margin: 2rem 0 1rem; border-bottom: 2px solid var(--border); padding-bottom: 0.3rem; }
35
+ h3 { font-size: 1.1rem; margin: 0; }
36
+ .subtitle { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
37
+ .badge {
38
+ display: inline-block;
39
+ font-size: 0.75rem;
40
+ font-weight: 600;
41
+ padding: 0.15rem 0.5rem;
42
+ border-radius: 4px;
43
+ text-transform: uppercase;
44
+ letter-spacing: 0.03em;
45
+ }
46
+ .badge-done { background: var(--done); color: #fff; }
47
+ .badge-in-progress { background: var(--progress); color: #fff; }
48
+ .badge-pending { background: var(--pending); color: #fff; }
49
+ .estimate { font-size: 0.8rem; color: var(--muted); margin-left: 0.5rem; }
50
+ table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
51
+ th, td { text-align: left; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border); }
52
+ th { font-weight: 600; font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
53
+ td { font-size: 0.95rem; }
54
+ details { margin: 0.5rem 0; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
55
+ details[open] > summary { border-bottom: 1px solid var(--border); }
56
+ summary {
57
+ padding: 0.75rem 1rem;
58
+ cursor: pointer;
59
+ font-weight: 500;
60
+ display: flex;
61
+ align-items: center;
62
+ gap: 0.5rem;
63
+ user-select: none;
64
+ }
65
+ summary:hover { background: #f8f9fa; }
66
+ summary::marker { color: var(--muted); }
67
+ .artifact-body { padding: 0.75rem 1rem 1rem; font-size: 0.9rem; }
68
+ .artifact-body p { margin: 0.5rem 0; }
69
+ .artifact-body ul, .artifact-body ol { margin: 0.5rem 0 0.5rem 1.5rem; }
70
+ .artifact-body li { margin: 0.2rem 0; }
71
+ .artifact-body h1, .artifact-body h2, .artifact-body h3, .artifact-body h4 { margin: 1rem 0 0.5rem; }
72
+ .artifact-body pre { background: #f4f4f5; padding: 0.75rem; border-radius: 4px; overflow-x: auto; font-size: 0.85rem; }
73
+ .artifact-body code { background: #f4f4f5; padding: 0.1rem 0.3rem; border-radius: 3px; font-size: 0.85em; }
74
+ .level-epic > summary { background: var(--epic-bg); }
75
+ .level-feature > summary { background: var(--feature-bg); }
76
+ .level-story > summary { background: var(--story-bg); }
77
+ .level-task > summary { background: var(--task-bg); }
78
+ .level-quick > summary { background: var(--quick-bg); }
79
+ .nested { padding-left: 1.25rem; padding-bottom: 0.5rem; }
80
+ footer { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: 0.8rem; color: var(--muted); }
81
+ @media print {
82
+ details { border: none; }
83
+ details[open] > summary { border-bottom: 1px solid var(--border); }
84
+ summary { pointer-events: none; }
85
+ summary::marker { display: none; }
86
+ .nested { padding-left: 1rem; }
87
+ }
88
+ </style>
89
+ </head>
90
+ <body>
91
+
92
+ <h1>{{projectName}}</h1>
93
+ <p class="subtitle">Planning Report &mdash; {{date}}</p>
94
+
95
+ <h2>Summary</h2>
96
+ <table>
97
+ <thead>
98
+ <tr><th>Type</th><th>Count</th></tr>
99
+ </thead>
100
+ <tbody>
101
+ <tr><td>Epics</td><td>{{counts.epics}}</td></tr>
102
+ <tr><td>Features</td><td>{{counts.features}}</td></tr>
103
+ <tr><td>Stories</td><td>{{counts.stories}}</td></tr>
104
+ <tr><td>Tasks</td><td>{{counts.tasks}}</td></tr>
105
+ <tr><td>Quick Tasks</td><td>{{counts.quick}}</td></tr>
106
+ </tbody>
107
+ </table>
108
+
109
+ {{#if epics.length}}
110
+ <h2>Epics</h2>
111
+
112
+ {{#each epics}}
113
+ <details class="level-epic" open>
114
+ <summary>
115
+ <h3>{{this.id}}: {{this.title}}</h3>
116
+ <span class="badge {{#if (eq this.status 'done')}}badge-done{{else}}{{#if (eq this.status 'in-progress')}}badge-in-progress{{else}}badge-pending{{/if}}{{/if}}">{{this.status}}</span>
117
+ {{#if this.data.estimatedPoints}}<span class="estimate">{{this.data.estimatedPoints}} pts &middot; {{this.data.estimatedHours}}h</span>{{/if}}
118
+ </summary>
119
+ <div class="artifact-body">
120
+ {{{this.body}}}
121
+ </div>
122
+ {{#if this.features.length}}
123
+ <div class="nested">
124
+ {{#each this.features}}
125
+ <details class="level-feature">
126
+ <summary>
127
+ <h3>{{this.id}}: {{this.title}}</h3>
128
+ <span class="badge {{#if (eq this.status 'done')}}badge-done{{else}}{{#if (eq this.status 'in-progress')}}badge-in-progress{{else}}badge-pending{{/if}}{{/if}}">{{this.status}}</span>
129
+ {{#if this.data.estimatedPoints}}<span class="estimate">{{this.data.estimatedPoints}} pts</span>{{/if}}
130
+ </summary>
131
+ <div class="artifact-body">
132
+ {{{this.body}}}
133
+ </div>
134
+ {{#if this.stories.length}}
135
+ <div class="nested">
136
+ {{#each this.stories}}
137
+ <details class="level-story">
138
+ <summary>
139
+ <h3>{{this.id}}: {{this.title}}</h3>
140
+ <span class="badge {{#if (eq this.status 'done')}}badge-done{{else}}{{#if (eq this.status 'in-progress')}}badge-in-progress{{else}}badge-pending{{/if}}{{/if}}">{{this.status}}</span>
141
+ {{#if this.data.estimatedPoints}}<span class="estimate">{{this.data.estimatedPoints}} pts</span>{{/if}}
142
+ </summary>
143
+ <div class="artifact-body">
144
+ {{{this.body}}}
145
+ </div>
146
+ {{#if this.tasks.length}}
147
+ <div class="nested">
148
+ {{#each this.tasks}}
149
+ <details class="level-task">
150
+ <summary>
151
+ <h3>{{this.id}}: {{this.title}}</h3>
152
+ <span class="badge {{#if (eq this.status 'done')}}badge-done{{else}}{{#if (eq this.status 'in-progress')}}badge-in-progress{{else}}badge-pending{{/if}}{{/if}}">{{this.status}}</span>
153
+ </summary>
154
+ <div class="artifact-body">
155
+ {{{this.body}}}
156
+ </div>
157
+ </details>
158
+ {{/each}}
159
+ </div>
160
+ {{/if}}
161
+ </details>
162
+ {{/each}}
163
+ </div>
164
+ {{/if}}
165
+ </details>
166
+ {{/each}}
167
+ </div>
168
+ {{/if}}
169
+ </details>
170
+ {{/each}}
171
+ {{/if}}
172
+
173
+ {{#if orphanFeatures.length}}
174
+ <h2>Unlinked Features</h2>
175
+ {{#each orphanFeatures}}
176
+ <details class="level-feature">
177
+ <summary>
178
+ <h3>{{this.id}}: {{this.title}}</h3>
179
+ <span class="badge {{#if (eq this.status 'done')}}badge-done{{else}}{{#if (eq this.status 'in-progress')}}badge-in-progress{{else}}badge-pending{{/if}}{{/if}}">{{this.status}}</span>
180
+ </summary>
181
+ <div class="artifact-body">{{{this.body}}}</div>
182
+ </details>
183
+ {{/each}}
184
+ {{/if}}
185
+
186
+ {{#if orphanStories.length}}
187
+ <h2>Unlinked Stories</h2>
188
+ {{#each orphanStories}}
189
+ <details class="level-story">
190
+ <summary>
191
+ <h3>{{this.id}}: {{this.title}}</h3>
192
+ <span class="badge {{#if (eq this.status 'done')}}badge-done{{else}}{{#if (eq this.status 'in-progress')}}badge-in-progress{{else}}badge-pending{{/if}}{{/if}}">{{this.status}}</span>
193
+ </summary>
194
+ <div class="artifact-body">{{{this.body}}}</div>
195
+ </details>
196
+ {{/each}}
197
+ {{/if}}
198
+
199
+ {{#if orphanTasks.length}}
200
+ <h2>Unlinked Tasks</h2>
201
+ {{#each orphanTasks}}
202
+ <details class="level-task">
203
+ <summary>
204
+ <h3>{{this.id}}: {{this.title}}</h3>
205
+ <span class="badge {{#if (eq this.status 'done')}}badge-done{{else}}{{#if (eq this.status 'in-progress')}}badge-in-progress{{else}}badge-pending{{/if}}{{/if}}">{{this.status}}</span>
206
+ </summary>
207
+ <div class="artifact-body">{{{this.body}}}</div>
208
+ </details>
209
+ {{/each}}
210
+ {{/if}}
211
+
212
+ {{#if quickTasks.length}}
213
+ <h2>Quick Tasks</h2>
214
+ {{#each quickTasks}}
215
+ <details class="level-quick">
216
+ <summary>
217
+ <h3>{{this.id}}: {{this.title}}</h3>
218
+ <span class="badge {{#if (eq this.status 'done')}}badge-done{{else}}{{#if (eq this.status 'in-progress')}}badge-in-progress{{else}}badge-pending{{/if}}{{/if}}">{{this.status}}</span>
219
+ </summary>
220
+ <div class="artifact-body">{{{this.body}}}</div>
221
+ </details>
222
+ {{/each}}
223
+ {{/if}}
224
+
225
+ <footer>
226
+ Exported by <code>planr export</code> on {{date}}.
227
+ </footer>
228
+
229
+ </body>
230
+ </html>
@@ -0,0 +1,136 @@
1
+ # {{projectName}} — Planning Report
2
+
3
+ > Generated on {{date}}
4
+
5
+ ---
6
+
7
+ ## Summary
8
+
9
+ | Type | Count |
10
+ |------|-------|
11
+ | Epics | {{counts.epics}} |
12
+ | Features | {{counts.features}} |
13
+ | Stories | {{counts.stories}} |
14
+ | Tasks | {{counts.tasks}} |
15
+ | Quick Tasks | {{counts.quick}} |
16
+
17
+ ---
18
+
19
+ {{#if epics.length}}
20
+ ## Epics
21
+
22
+ {{#each epics}}
23
+ ### {{this.id}}: {{this.title}}
24
+
25
+ **Status:** {{this.status}}
26
+ {{#if this.data.estimatedPoints}}
27
+ **Estimate:** {{this.data.estimatedPoints}} pts ({{this.data.estimatedHours}}h, {{this.data.complexity}} complexity)
28
+ {{/if}}
29
+
30
+ {{{this.body}}}
31
+
32
+ {{#if this.features.length}}
33
+ {{#each this.features}}
34
+ #### {{this.id}}: {{this.title}}
35
+
36
+ **Status:** {{this.status}}
37
+ {{#if this.data.estimatedPoints}}
38
+ **Estimate:** {{this.data.estimatedPoints}} pts ({{this.data.estimatedHours}}h)
39
+ {{/if}}
40
+
41
+ {{{this.body}}}
42
+
43
+ {{#if this.stories.length}}
44
+ {{#each this.stories}}
45
+ ##### {{this.id}}: {{this.title}}
46
+
47
+ **Status:** {{this.status}}
48
+ {{#if this.data.estimatedPoints}}
49
+ **Estimate:** {{this.data.estimatedPoints}} pts ({{this.data.estimatedHours}}h)
50
+ {{/if}}
51
+
52
+ {{{this.body}}}
53
+
54
+ {{#if this.tasks.length}}
55
+ {{#each this.tasks}}
56
+ ###### {{this.id}}: {{this.title}}
57
+
58
+ **Status:** {{this.status}}
59
+ {{#if this.data.estimatedPoints}}
60
+ **Estimate:** {{this.data.estimatedPoints}} pts ({{this.data.estimatedHours}}h)
61
+ {{/if}}
62
+
63
+ {{{this.body}}}
64
+
65
+ {{/each}}
66
+ {{/if}}
67
+ {{/each}}
68
+ {{/if}}
69
+ {{/each}}
70
+ {{/if}}
71
+
72
+ ---
73
+
74
+ {{/each}}
75
+ {{/if}}
76
+ {{#if orphanFeatures.length}}
77
+ ## Unlinked Features
78
+
79
+ {{#each orphanFeatures}}
80
+ ### {{this.id}}: {{this.title}}
81
+
82
+ **Status:** {{this.status}}
83
+
84
+ {{{this.body}}}
85
+
86
+ {{#if this.stories.length}}
87
+ {{#each this.stories}}
88
+ #### {{this.id}}: {{this.title}}
89
+
90
+ **Status:** {{this.status}}
91
+
92
+ {{{this.body}}}
93
+
94
+ {{/each}}
95
+ {{/if}}
96
+ {{/each}}
97
+ {{/if}}
98
+ {{#if orphanStories.length}}
99
+ ## Unlinked Stories
100
+
101
+ {{#each orphanStories}}
102
+ ### {{this.id}}: {{this.title}}
103
+
104
+ **Status:** {{this.status}}
105
+
106
+ {{{this.body}}}
107
+
108
+ {{/each}}
109
+ {{/if}}
110
+ {{#if orphanTasks.length}}
111
+ ## Unlinked Tasks
112
+
113
+ {{#each orphanTasks}}
114
+ ### {{this.id}}: {{this.title}}
115
+
116
+ **Status:** {{this.status}}
117
+
118
+ {{{this.body}}}
119
+
120
+ {{/each}}
121
+ {{/if}}
122
+ {{#if quickTasks.length}}
123
+ ## Quick Tasks
124
+
125
+ {{#each quickTasks}}
126
+ ### {{this.id}}: {{this.title}}
127
+
128
+ **Status:** {{this.status}}
129
+
130
+ {{{this.body}}}
131
+
132
+ {{/each}}
133
+ {{/if}}
134
+ ---
135
+
136
+ _Exported by `planr export` on {{date}}._
@@ -25,5 +25,5 @@ status: "pending"
25
25
  {{/if}}
26
26
 
27
27
  ## Notes
28
- _Mark tasks complete by checking the boxes above, or run `planr quick implement {{id}}`._
28
+ _Mark tasks complete by checking the boxes above. Use your coding agent (Claude Code, Cursor, Codex) with the generated rules for context-aware implementation._
29
29
  _To move this into your agile hierarchy, run `planr quick promote {{id}} --story <storyId>`._
@@ -1,52 +1,95 @@
1
- # {{projectName}} — Agile Planning Guide
1
+ # {{projectName}} — Agile Planning & Implementation Guide
2
2
 
3
3
  > Generated by OpenPlanr on {{date}}
4
4
 
5
- ## Project Structure
6
-
7
5
  This project uses OpenPlanr for agile planning. All artifacts are in `{{agilePath}}/`.
8
6
 
9
- ### Artifact Locations
10
- - **Epics:** `{{agilePath}}/epics/`
11
- - **Features:** `{{agilePath}}/features/`
12
- - **User Stories:** `{{agilePath}}/stories/`
13
- - **Tasks:** `{{agilePath}}/tasks/`
14
- - **ADRs:** `{{agilePath}}/adrs/`
15
- - **Checklist:** `{{agilePath}}/checklists/AGILE-DEVELOPMENT-GUIDE.md`
7
+ ## Context-Gathering Protocol
8
+
9
+ Before implementing ANY task or subtask, you MUST gather full planning context by reading the artifact hierarchy. Follow this exact sequence:
10
+
11
+ ### Step 1: Read the Task List
12
+ - Open the task file from `{{agilePath}}/tasks/` (e.g., `TASK-001-*.md`) or quick task from `{{agilePath}}/quick/`
13
+ - Parse the frontmatter to find `storyId` or `featureId`
14
+ - Identify the target subtask (first unchecked `- [ ]` item)
15
+ - Read ALL subtasks to understand the full scope and dependencies
16
+
17
+ ### Step 2: Read the Parent Chain (MANDATORY)
18
+ Follow the artifact hierarchy upward — each level adds critical context:
19
+
20
+ 1. **User Story** → `{{agilePath}}/stories/US-XXX-*.md`
21
+ - Read the full story (role, goal, benefit, acceptance criteria)
22
+ - Find and read the matching Gherkin file: `{{agilePath}}/stories/US-XXX-gherkin.feature`
23
+ - Extract the parent `featureId` from frontmatter
24
+
25
+ 2. **Feature** → `{{agilePath}}/features/FEAT-XXX-*.md`
26
+ - Read the full feature (overview, functional requirements, technical considerations)
27
+ - Extract the parent `epicId` from frontmatter
28
+
29
+ 3. **Epic** → `{{agilePath}}/epics/EPIC-XXX-*.md`
30
+ - Read the epic summary (business value, problem statement, success criteria)
31
+ - This provides the WHY behind the work
32
+
33
+ ### Step 3: Read Architecture Context
34
+ - Read ALL ADRs in `{{agilePath}}/adrs/` — these are binding technical decisions
35
+ - Check `{{agilePath}}/checklists/AGILE-DEVELOPMENT-GUIDE.md` for current progress
36
+
37
+ ### Step 4: Scan the Codebase
38
+ Before writing code, understand what exists:
16
39
 
17
- ## Agile Workflow
40
+ 1. **Identify the tech stack** — Read `package.json`, `tsconfig.json`, or equivalent
41
+ 2. **Scan the source tree** — List directories under `src/` (or project root)
42
+ 3. **Read architecture files** — Look for these high-priority files:
43
+ - Type definitions: `src/models/types.ts`, `src/types/index.ts`, or `src/types.ts`
44
+ - Core services: `src/services/` — understand CRUD patterns
45
+ - Entry point: `src/index.ts`, `src/main.ts`, or `src/app.ts` — understand registration patterns
46
+ - Config: `src/config.ts` or `src/services/config-service.ts`
47
+ 4. **Find related files** — Search for files matching keywords from the task description
48
+ 5. **Check project rules** — Read `.planr/rules.md` if it exists (MANDATORY rules)
18
49
 
19
- Follow the 5-phase agile development workflow:
50
+ ## Implementation Rules
20
51
 
21
- ### Phase 1: Requirements Analysis
22
- 1. Read existing epics in `{{agilePath}}/epics/`
23
- 2. Break epics into features in `{{agilePath}}/features/`
24
- 3. Create user stories with Gherkin acceptance criteria in `{{agilePath}}/stories/`
52
+ 1. **ONE subtask at a time** — implement only the target subtask
53
+ 2. **Wait for user approval** before moving to the next subtask
54
+ 3. **Follow existing patterns** match the code style, naming conventions, and architecture from Step 4
55
+ 4. **Map to acceptance criteria** — every implementation must satisfy the Gherkin scenarios from Step 2
56
+ 5. **Update the task file** — check the box `- [x]` for completed subtasks
57
+ 6. **Don't modify unrelated code** — stay focused on the target subtask
25
58
 
26
- ### Phase 2: Technical Design
27
- - Create UML sequence diagrams and C4 architecture diagrams
28
- - Store in `{{agilePath}}/diagrams/`
59
+ ## Agile Workflow Phases
29
60
 
30
- ### Phase 3: Architecture Decision Records
31
- - Document decisions in `{{agilePath}}/adrs/`
32
- - Cover: functional requirements, testing strategy, non-functional requirements
61
+ 1. **Requirements Analysis** Create epics, features, and user stories
62
+ 2. **Technical Design** UML sequence diagrams and C4 architecture diagrams
63
+ 3. **Architecture Decisions** — ADRs for functional requirements, testing, and NFRs
64
+ 4. **Solution Planning** — Task lists and implementation management
65
+ 5. **Solution Review** — Review against acceptance criteria and refactor
33
66
 
34
- ### Phase 4: Solution Planning
35
- 1. Generate task lists from stories in `{{agilePath}}/tasks/`
36
- 2. Implement one subtask at a time
37
- 3. Wait for user approval between subtasks
38
- 4. Update task checkboxes on completion
67
+ ## Artifact Locations
68
+ - Task lists: `{{agilePath}}/tasks/`
69
+ - User stories: `{{agilePath}}/stories/`
70
+ - Gherkin acceptance criteria: `{{agilePath}}/stories/*-gherkin.feature`
71
+ - Features: `{{agilePath}}/features/`
72
+ - Epics: `{{agilePath}}/epics/`
73
+ - Quick tasks: `{{agilePath}}/quick/`
74
+ - Backlog items: `{{agilePath}}/backlog/`
75
+ - ADRs: `{{agilePath}}/adrs/`
76
+ - Sprints: `{{agilePath}}/sprints/`
77
+ - Checklist: `{{agilePath}}/checklists/AGILE-DEVELOPMENT-GUIDE.md`
39
78
 
40
- ### Phase 5: Solution Review
41
- - Review implementation against acceptance criteria
42
- - Refactor as needed
79
+ ## Frontmatter Cross-References
80
+ Artifacts link to their parents via frontmatter fields:
81
+ - Tasks `storyId: "US-XXX"` or `featureId: "FEAT-XXX"`
82
+ - Stories → `featureId: "FEAT-XXX"`
83
+ - Features → `epicId: "EPIC-XXX"`
43
84
 
44
- ## Rules
85
+ Always follow these links to build the full context chain.
45
86
 
46
- - Always check the checklist at `{{agilePath}}/checklists/AGILE-DEVELOPMENT-GUIDE.md` for current progress
47
- - When creating artifacts, follow the existing naming convention: `PREFIX-NNN-slug.md`
48
- - Cross-reference parent/child artifacts with relative links
49
- - One subtask at a time during implementation
87
+ ## Naming Convention
88
+ All artifacts follow `PREFIX-NNN-slug.md` format:
89
+ - EPIC-001, EPIC-002, ...
90
+ - FEAT-001, FEAT-002, ...
91
+ - US-001, US-002, ...
92
+ - TASK-001, TASK-002, ...
50
93
  {{#if existingEpics}}
51
94
 
52
95
  ## Current Epics
@@ -2,25 +2,81 @@
2
2
 
3
3
  > Generated by OpenPlanr on {{date}}
4
4
 
5
- ## Agile Planning
6
-
7
5
  This project follows a structured agile workflow. All planning artifacts are in `{{agilePath}}/`.
8
6
 
9
- ### Artifact Structure
10
- - Epics: `{{agilePath}}/epics/` — High-level business initiatives
11
- - Features: `{{agilePath}}/features/` Capabilities derived from epics
12
- - User Stories: `{{agilePath}}/stories/` — User-facing requirements with Gherkin acceptance criteria
13
- - Tasks: `{{agilePath}}/tasks/` Implementation task lists with checkboxes
14
- - ADRs: `{{agilePath}}/adrs/` Architecture Decision Records
15
-
16
- ### Workflow
17
- 1. Check the development checklist: `{{agilePath}}/checklists/AGILE-DEVELOPMENT-GUIDE.md`
18
- 2. Identify the current phase and next incomplete activity
19
- 3. When implementing tasks, work on ONE subtask at a time
20
- 4. Update task checkboxes after completing each subtask
21
- 5. Cross-reference artifacts using relative links
22
-
23
- ### Naming Convention
7
+ ## Context-Gathering Protocol
8
+
9
+ Before implementing ANY task or subtask, you MUST gather full planning context by reading the artifact hierarchy. Follow this exact sequence:
10
+
11
+ ### Step 1: Read the Task List
12
+ - Open the task file from `{{agilePath}}/tasks/` (e.g., `TASK-001-*.md`) or quick task from `{{agilePath}}/quick/`
13
+ - Parse the frontmatter to find `storyId` or `featureId`
14
+ - Identify the target subtask (first unchecked `- [ ]` item)
15
+ - Read ALL subtasks to understand the full scope and dependencies
16
+
17
+ ### Step 2: Read the Parent Chain (MANDATORY)
18
+ Follow the artifact hierarchy upward each level adds critical context:
19
+
20
+ 1. **User Story** → `{{agilePath}}/stories/US-XXX-*.md`
21
+ - Read the full story (role, goal, benefit, acceptance criteria)
22
+ - Find and read the matching Gherkin file: `{{agilePath}}/stories/US-XXX-gherkin.feature`
23
+ - Extract the parent `featureId` from frontmatter
24
+
25
+ 2. **Feature** → `{{agilePath}}/features/FEAT-XXX-*.md`
26
+ - Read the full feature (overview, functional requirements, technical considerations)
27
+ - Extract the parent `epicId` from frontmatter
28
+
29
+ 3. **Epic** → `{{agilePath}}/epics/EPIC-XXX-*.md`
30
+ - Read the epic summary (business value, problem statement, success criteria)
31
+ - This provides the WHY behind the work
32
+
33
+ ### Step 3: Read Architecture Context
34
+ - Read ALL ADRs in `{{agilePath}}/adrs/` — these are binding technical decisions
35
+ - Check `{{agilePath}}/checklists/AGILE-DEVELOPMENT-GUIDE.md` for current progress
36
+
37
+ ### Step 4: Scan the Codebase
38
+ Before writing code, understand what exists:
39
+
40
+ 1. **Identify the tech stack** — Read `package.json`, `tsconfig.json`, or equivalent
41
+ 2. **Scan the source tree** — List directories under `src/` (or project root)
42
+ 3. **Read architecture files** — Look for these high-priority files:
43
+ - Type definitions: `src/models/types.ts`, `src/types/index.ts`, or `src/types.ts`
44
+ - Core services: `src/services/` — understand CRUD patterns
45
+ - Entry point: `src/index.ts`, `src/main.ts`, or `src/app.ts` — understand registration patterns
46
+ - Config: `src/config.ts` or `src/services/config-service.ts`
47
+ 4. **Find related files** — Search for files matching keywords from the task description
48
+ 5. **Check project rules** — Read `.planr/rules.md` if it exists (MANDATORY rules)
49
+
50
+ ## Implementation Rules
51
+
52
+ 1. **ONE subtask at a time** — implement only the target subtask
53
+ 2. **Wait for user approval** before moving to the next subtask
54
+ 3. **Follow existing patterns** — match the code style, naming conventions, and architecture from Step 4
55
+ 4. **Map to acceptance criteria** — every implementation must satisfy the Gherkin scenarios from Step 2
56
+ 5. **Update the task file** — check the box `- [x]` for completed subtasks
57
+ 6. **Don't modify unrelated code** — stay focused on the target subtask
58
+
59
+ ## Artifact Locations
60
+ - Task lists: `{{agilePath}}/tasks/`
61
+ - User stories: `{{agilePath}}/stories/`
62
+ - Gherkin acceptance criteria: `{{agilePath}}/stories/*-gherkin.feature`
63
+ - Features: `{{agilePath}}/features/`
64
+ - Epics: `{{agilePath}}/epics/`
65
+ - Quick tasks: `{{agilePath}}/quick/`
66
+ - Backlog items: `{{agilePath}}/backlog/`
67
+ - ADRs: `{{agilePath}}/adrs/`
68
+ - Sprints: `{{agilePath}}/sprints/`
69
+ - Checklist: `{{agilePath}}/checklists/AGILE-DEVELOPMENT-GUIDE.md`
70
+
71
+ ## Frontmatter Cross-References
72
+ Artifacts link to their parents via frontmatter fields:
73
+ - Tasks → `storyId: "US-XXX"` or `featureId: "FEAT-XXX"`
74
+ - Stories → `featureId: "FEAT-XXX"`
75
+ - Features → `epicId: "EPIC-XXX"`
76
+
77
+ Always follow these links to build the full context chain.
78
+
79
+ ## Naming Convention
24
80
  All artifacts follow `PREFIX-NNN-slug.md` format:
25
81
  - EPIC-001, EPIC-002, ...
26
82
  - FEAT-001, FEAT-002, ...