openplanr 1.2.8 → 1.4.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 (171) hide show
  1. package/README.md +30 -3
  2. package/dist/agents/task-parser.d.ts.map +1 -1
  3. package/dist/agents/task-parser.js +8 -34
  4. package/dist/agents/task-parser.js.map +1 -1
  5. package/dist/ai/prompts/prompt-builder.d.ts +14 -0
  6. package/dist/ai/prompts/prompt-builder.d.ts.map +1 -1
  7. package/dist/ai/prompts/prompt-builder.js +32 -1
  8. package/dist/ai/prompts/prompt-builder.js.map +1 -1
  9. package/dist/ai/prompts/system-prompts.d.ts +3 -2
  10. package/dist/ai/prompts/system-prompts.d.ts.map +1 -1
  11. package/dist/ai/prompts/system-prompts.js +117 -7
  12. package/dist/ai/prompts/system-prompts.js.map +1 -1
  13. package/dist/ai/schemas/ai-response-schemas.d.ts +62 -0
  14. package/dist/ai/schemas/ai-response-schemas.d.ts.map +1 -1
  15. package/dist/ai/schemas/ai-response-schemas.js +51 -1
  16. package/dist/ai/schemas/ai-response-schemas.js.map +1 -1
  17. package/dist/ai/types.d.ts.map +1 -1
  18. package/dist/ai/types.js +2 -0
  19. package/dist/ai/types.js.map +1 -1
  20. package/dist/cli/commands/backlog.d.ts +12 -0
  21. package/dist/cli/commands/backlog.d.ts.map +1 -1
  22. package/dist/cli/commands/backlog.js +88 -2
  23. package/dist/cli/commands/backlog.js.map +1 -1
  24. package/dist/cli/commands/config.d.ts.map +1 -1
  25. package/dist/cli/commands/config.js +8 -2
  26. package/dist/cli/commands/config.js.map +1 -1
  27. package/dist/cli/commands/linear.d.ts +8 -0
  28. package/dist/cli/commands/linear.d.ts.map +1 -0
  29. package/dist/cli/commands/linear.js +550 -0
  30. package/dist/cli/commands/linear.js.map +1 -0
  31. package/dist/cli/commands/quick.d.ts +17 -0
  32. package/dist/cli/commands/quick.d.ts.map +1 -1
  33. package/dist/cli/commands/quick.js +31 -15
  34. package/dist/cli/commands/quick.js.map +1 -1
  35. package/dist/cli/commands/revise.d.ts +9 -8
  36. package/dist/cli/commands/revise.d.ts.map +1 -1
  37. package/dist/cli/commands/revise.js +93 -25
  38. package/dist/cli/commands/revise.js.map +1 -1
  39. package/dist/cli/commands/spec.d.ts +28 -0
  40. package/dist/cli/commands/spec.d.ts.map +1 -0
  41. package/dist/cli/commands/spec.js +529 -0
  42. package/dist/cli/commands/spec.js.map +1 -0
  43. package/dist/cli/index.js +4 -0
  44. package/dist/cli/index.js.map +1 -1
  45. package/dist/models/schema.d.ts +44 -0
  46. package/dist/models/schema.d.ts.map +1 -1
  47. package/dist/models/schema.js +50 -0
  48. package/dist/models/schema.js.map +1 -1
  49. package/dist/models/types.d.ts +188 -3
  50. package/dist/models/types.d.ts.map +1 -1
  51. package/dist/services/artifact-gathering.d.ts +4 -0
  52. package/dist/services/artifact-gathering.d.ts.map +1 -1
  53. package/dist/services/artifact-gathering.js +1 -1
  54. package/dist/services/artifact-gathering.js.map +1 -1
  55. package/dist/services/artifact-service.d.ts +12 -1
  56. package/dist/services/artifact-service.d.ts.map +1 -1
  57. package/dist/services/artifact-service.js +49 -6
  58. package/dist/services/artifact-service.js.map +1 -1
  59. package/dist/services/atomic-write-service.d.ts +2 -2
  60. package/dist/services/atomic-write-service.js +2 -2
  61. package/dist/services/audit-log-service.d.ts +3 -6
  62. package/dist/services/audit-log-service.d.ts.map +1 -1
  63. package/dist/services/audit-log-service.js +4 -7
  64. package/dist/services/audit-log-service.js.map +1 -1
  65. package/dist/services/cascade-service.d.ts +2 -2
  66. package/dist/services/cascade-service.js +3 -3
  67. package/dist/services/cascade-service.js.map +1 -1
  68. package/dist/services/config-service.d.ts.map +1 -1
  69. package/dist/services/config-service.js +1 -0
  70. package/dist/services/config-service.js.map +1 -1
  71. package/dist/services/credentials-service.js +2 -2
  72. package/dist/services/credentials-service.js.map +1 -1
  73. package/dist/services/diff-service.d.ts +1 -1
  74. package/dist/services/diff-service.js +1 -1
  75. package/dist/services/evidence-verifier.d.ts +1 -1
  76. package/dist/services/evidence-verifier.d.ts.map +1 -1
  77. package/dist/services/evidence-verifier.js +5 -2
  78. package/dist/services/evidence-verifier.js.map +1 -1
  79. package/dist/services/git-service.d.ts +4 -4
  80. package/dist/services/git-service.js +4 -4
  81. package/dist/services/graph-integrity.d.ts +2 -3
  82. package/dist/services/graph-integrity.d.ts.map +1 -1
  83. package/dist/services/graph-integrity.js +2 -3
  84. package/dist/services/graph-integrity.js.map +1 -1
  85. package/dist/services/linear/body-formatters.d.ts +69 -0
  86. package/dist/services/linear/body-formatters.d.ts.map +1 -0
  87. package/dist/services/linear/body-formatters.js +183 -0
  88. package/dist/services/linear/body-formatters.js.map +1 -0
  89. package/dist/services/linear/constants.d.ts +61 -0
  90. package/dist/services/linear/constants.d.ts.map +1 -0
  91. package/dist/services/linear/constants.js +84 -0
  92. package/dist/services/linear/constants.js.map +1 -0
  93. package/dist/services/linear/errors.d.ts +14 -0
  94. package/dist/services/linear/errors.d.ts.map +1 -0
  95. package/dist/services/linear/errors.js +106 -0
  96. package/dist/services/linear/errors.js.map +1 -0
  97. package/dist/services/linear/estimate-resolver.d.ts +50 -0
  98. package/dist/services/linear/estimate-resolver.d.ts.map +1 -0
  99. package/dist/services/linear/estimate-resolver.js +82 -0
  100. package/dist/services/linear/estimate-resolver.js.map +1 -0
  101. package/dist/services/linear/plan-builders.d.ts +64 -0
  102. package/dist/services/linear/plan-builders.d.ts.map +1 -0
  103. package/dist/services/linear/plan-builders.js +237 -0
  104. package/dist/services/linear/plan-builders.js.map +1 -0
  105. package/dist/services/linear/scope-loaders.d.ts +79 -0
  106. package/dist/services/linear/scope-loaders.d.ts.map +1 -0
  107. package/dist/services/linear/scope-loaders.js +227 -0
  108. package/dist/services/linear/scope-loaders.js.map +1 -0
  109. package/dist/services/linear/strategy-context.d.ts +66 -0
  110. package/dist/services/linear/strategy-context.d.ts.map +1 -0
  111. package/dist/services/linear/strategy-context.js +121 -0
  112. package/dist/services/linear/strategy-context.js.map +1 -0
  113. package/dist/services/linear-mapping-service.d.ts +11 -0
  114. package/dist/services/linear-mapping-service.d.ts.map +1 -0
  115. package/dist/services/linear-mapping-service.js +220 -0
  116. package/dist/services/linear-mapping-service.js.map +1 -0
  117. package/dist/services/linear-pull-service.d.ts +137 -0
  118. package/dist/services/linear-pull-service.d.ts.map +1 -0
  119. package/dist/services/linear-pull-service.js +720 -0
  120. package/dist/services/linear-pull-service.js.map +1 -0
  121. package/dist/services/linear-push-service.d.ts +86 -0
  122. package/dist/services/linear-push-service.d.ts.map +1 -0
  123. package/dist/services/linear-push-service.js +956 -0
  124. package/dist/services/linear-push-service.js.map +1 -0
  125. package/dist/services/linear-service.d.ts +122 -0
  126. package/dist/services/linear-service.d.ts.map +1 -0
  127. package/dist/services/linear-service.js +361 -0
  128. package/dist/services/linear-service.js.map +1 -0
  129. package/dist/services/prompt-service.d.ts +19 -0
  130. package/dist/services/prompt-service.d.ts.map +1 -1
  131. package/dist/services/prompt-service.js +64 -0
  132. package/dist/services/prompt-service.js.map +1 -1
  133. package/dist/services/revise-apply-service.d.ts +55 -0
  134. package/dist/services/revise-apply-service.d.ts.map +1 -0
  135. package/dist/services/revise-apply-service.js +255 -0
  136. package/dist/services/revise-apply-service.js.map +1 -0
  137. package/dist/services/revise-cache-service.d.ts +1 -1
  138. package/dist/services/revise-cache-service.js +1 -1
  139. package/dist/services/revise-plan-service.d.ts +38 -0
  140. package/dist/services/revise-plan-service.d.ts.map +1 -0
  141. package/dist/services/revise-plan-service.js +151 -0
  142. package/dist/services/revise-plan-service.js.map +1 -0
  143. package/dist/services/revise-service.d.ts +18 -11
  144. package/dist/services/revise-service.d.ts.map +1 -1
  145. package/dist/services/revise-service.js +57 -12
  146. package/dist/services/revise-service.js.map +1 -1
  147. package/dist/services/spec-service.d.ts +292 -0
  148. package/dist/services/spec-service.d.ts.map +1 -0
  149. package/dist/services/spec-service.js +805 -0
  150. package/dist/services/spec-service.js.map +1 -0
  151. package/dist/services/template-sections.d.ts +1 -1
  152. package/dist/services/template-sections.js +1 -1
  153. package/dist/templates/backlog/backlog-item.md.hbs +3 -0
  154. package/dist/templates/quick/quick-task.md.hbs +6 -0
  155. package/dist/templates/spec/spec-shaped.md.hbs +89 -0
  156. package/dist/templates/spec/spec.md.hbs +68 -0
  157. package/dist/templates/spec/story.md.hbs +51 -0
  158. package/dist/templates/spec/task.md.hbs +98 -0
  159. package/dist/utils/constants.d.ts +18 -0
  160. package/dist/utils/constants.d.ts.map +1 -1
  161. package/dist/utils/constants.js +25 -0
  162. package/dist/utils/constants.js.map +1 -1
  163. package/dist/utils/diff.d.ts +22 -1
  164. package/dist/utils/diff.d.ts.map +1 -1
  165. package/dist/utils/diff.js +136 -1
  166. package/dist/utils/diff.js.map +1 -1
  167. package/dist/utils/markdown.d.ts +23 -0
  168. package/dist/utils/markdown.d.ts.map +1 -1
  169. package/dist/utils/markdown.js +79 -0
  170. package/dist/utils/markdown.js.map +1 -1
  171. package/package.json +3 -2
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  **Website:** [openplanr.dev](https://openplanr.dev)
8
8
 
9
- **AI-powered planning CLI for developers.** Capture ideas, plan sprints, generate tasks, estimate effort, and sync with GitHub — all from your terminal.
9
+ **AI-powered planning CLI for developers.** Capture ideas, plan sprints, generate tasks, estimate effort, and sync with GitHub or Linear — all from your terminal.
10
10
 
11
11
  Planr replaces heavyweight project management tools with a fast, file-based workflow. Artifacts live in your repo as markdown, version-controlled alongside your code. AI generates structured plans and teaches your coding agent (Cursor, Claude Code, Codex) how to follow them.
12
12
 
@@ -23,7 +23,8 @@ AI coding assistants are powerful but lack structured planning. Without a clear
23
23
  5. **AI-powered estimation** — story points, effort hours, and complexity analysis
24
24
  6. **Generating AI rules** — rule files that give your AI assistant context about the plan
25
25
  7. **GitHub integration** — push artifacts to issues, bi-directional sync, export reports
26
- 8. **Keeping everything in your repo** artifacts live alongside your code, version-controlled
26
+ 8. **Linear integration** push any artifact (epic / feature / story / task / quick-task / backlog) to Linear with `planr linear push <id>`, with flexible epic mappings (project / milestone / label) and bidirectional status + checkbox sync
27
+ 9. **Keeping everything in your repo** — artifacts live alongside your code, version-controlled
27
28
 
28
29
  ## Quick Start
29
30
 
@@ -143,6 +144,29 @@ planr rules generate --dry-run # preview
143
144
  | `planr template save TASK-001 --name my-pattern` | Save existing tasks as template |
144
145
  | `planr template show rest-endpoint` | Preview template contents |
145
146
 
147
+ ### Spec-Driven Mode (planning *for* AI agents)
148
+
149
+ Third planning posture alongside agile + QT. Specs decompose into User Stories
150
+ and Tasks with the **same artifact contract as the
151
+ [openplanr-pipeline](https://github.com/openplanr/openplanr-pipeline)** Claude
152
+ Code plugin — file Create/Modify/Preserve lists, Type=UI|Tech, agent
153
+ assignment, DoD with build/test commands. Plan in `planr`, ship in the pipeline.
154
+ See [`docs/proposals/spec-driven-mode.md`](docs/proposals/spec-driven-mode.md).
155
+
156
+ | Command | Description |
157
+ | ------------------------------------------------------- | ------------------------------------------------- |
158
+ | `planr spec init` | Activate spec-driven mode (creates `.planr/specs/`) |
159
+ | `planr spec create "Auth flow"` | Create a self-contained `SPEC-NNN-{slug}/` directory |
160
+ | `planr spec shape <SPEC-id>` | Interactive 4-question authoring (Context, Functional Reqs, Business Rules, Acceptance) |
161
+ | `planr spec decompose <SPEC-id>` | AI-driven decomposition into User Stories + Tasks (matches openplanr-pipeline schema) |
162
+ | `planr spec sync [<SPEC-id>]` | Validate integrity (orphaned tasks, missing `specId`, schema drift); auto-fixes safe issues |
163
+ | `planr spec list` | List all specs with status + decomposition counts |
164
+ | `planr spec show <SPEC-id>` | Print a spec + its US/Task tree |
165
+ | `planr spec status [<SPEC-id>]` | Decomposition state across one/all specs |
166
+ | `planr spec destroy <SPEC-id>` | Remove a spec entirely (clean `rm -rf`) |
167
+ | `planr spec attach-design <SPEC-id> --files <png>...` | Attach UI mockups for the pipeline's designer-agent |
168
+ | `planr spec promote <SPEC-id>` | Validate + print the `/openplanr-pipeline:plan {slug}` handoff |
169
+
146
170
  ### Planning Tools
147
171
 
148
172
  | Command | Description |
@@ -187,10 +211,13 @@ git commit -am "chore(plan): revise EPIC-003 against codebase"
187
211
 
188
212
  Post-flight graph-integrity check runs after every non-dry-run revise. If the writes leave parent/child links broken, revise automatically rolls back via `git checkout` (which is why clean-tree is required by default). Full design in [.planr/EPIC-REVISE-COMMAND.md](.planr/EPIC-REVISE-COMMAND.md).
189
213
 
190
- ### GitHub & Export
214
+ ### GitHub, Linear & export
191
215
 
192
216
  | Command | Description |
193
217
  | ---------------------------- | ------------------------------------------------ |
218
+ | `planr linear init` | Save Linear team + token (PAT) for API access |
219
+ | `planr linear sync` | Pull Linear workflow state into Feature/Story `status` (one-way) |
220
+ | `planr linear push <epicId>` | Epic → Linear project, features → issues, stories and task lists → sub-issues |
194
221
  | `planr github push [ID]` | Push artifacts to GitHub Issues |
195
222
  | `planr github sync` | Bi-directional status sync with GitHub |
196
223
  | `planr github status` | Show sync status of linked artifacts |
@@ -1 +1 @@
1
- {"version":3,"file":"task-parser.d.ts","sourceRoot":"","sources":["../../src/agents/task-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,EAAE,CA+BlE;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,aAAa,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,aAAa,EAAE,CAgBnF;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,aAAa,GAAG,IAAI,CAE3E;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,aAAa,EAAE,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAStF"}
1
+ {"version":3,"file":"task-parser.d.ts","sourceRoot":"","sources":["../../src/agents/task-parser.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,EAAE,CAUlE;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,aAAa,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,aAAa,EAAE,CAgBnF;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,aAAa,GAAG,IAAI,CAE3E;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,aAAa,EAAE,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAStF"}
@@ -1,12 +1,4 @@
1
- /**
2
- * Parses task list markdown files to extract subtask structure.
3
- *
4
- * Supports addressing subtasks by:
5
- * - ID (e.g., "2.1")
6
- * - Group ID (e.g., "2.0" returns the group + all subtasks)
7
- * - Keyword search (e.g., "auth" fuzzy-matches against titles)
8
- * - Next pending (returns the first unchecked subtask)
9
- */
1
+ import { parseTaskCheckboxLines } from '../utils/markdown.js';
10
2
  /**
11
3
  * Parse a task list markdown file into structured subtasks.
12
4
  * Expected format:
@@ -15,31 +7,13 @@
15
7
  * ` - [ ] 1.1 Subtask title` (indented subtasks)
16
8
  */
17
9
  export function parseTaskMarkdown(content) {
18
- const tasks = [];
19
- const lines = content.split('\n');
20
- let currentGroupId = null;
21
- for (const line of lines) {
22
- // Match: - [x] **1.0** Task title OR - [x] 1.0 Task title OR - [ ] 1.1 Subtask title
23
- const match = line.match(/^(\s*)- \[(x| )\]\s+\*{0,2}(\d+\.\d+)\*{0,2}\s+(.+)$/);
24
- if (!match)
25
- continue;
26
- const indent = match[1].length;
27
- const done = match[2] === 'x';
28
- const id = match[3];
29
- const title = match[4].trim();
30
- const depth = indent > 0 ? 1 : 0;
31
- if (depth === 0) {
32
- currentGroupId = id;
33
- }
34
- tasks.push({
35
- id,
36
- title,
37
- done,
38
- parentId: depth === 0 ? null : currentGroupId,
39
- depth,
40
- });
41
- }
42
- return tasks;
10
+ return parseTaskCheckboxLines(content).map(({ id, title, done, parentId, depth }) => ({
11
+ id,
12
+ title,
13
+ done,
14
+ parentId,
15
+ depth,
16
+ }));
43
17
  }
44
18
  /**
45
19
  * Find subtasks matching a query.
@@ -1 +1 @@
1
- {"version":3,"file":"task-parser.js","sourceRoot":"","sources":["../../src/agents/task-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAUH;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAe;IAC/C,MAAM,KAAK,GAAoB,EAAE,CAAC;IAClC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAElC,IAAI,cAAc,GAAkB,IAAI,CAAC;IAEzC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,yFAAyF;QACzF,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAC;QACjF,IAAI,CAAC,KAAK;YAAE,SAAS;QAErB,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;QAC/B,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC;QAC9B,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACpB,MAAM,KAAK,GAAG,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AAG,CAAC,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;AACzF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAsB,EAAE,WAAoB;IAC5E,OAAO,KAAK;SACT,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QACT,MAAM,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;QACxC,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;QACvC,MAAM,MAAM,GAAG,CAAC,CAAC,EAAE,KAAK,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;QACvD,OAAO,GAAG,MAAM,KAAK,QAAQ,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,KAAK,GAAG,MAAM,EAAE,CAAC;IAC9D,CAAC,CAAC;SACD,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC"}
@@ -117,4 +117,18 @@ export interface RevisePromptContext {
117
117
  * the agent can distinguish "checked and empty" from "not provided."
118
118
  */
119
119
  export declare function buildRevisePrompt(ctx: RevisePromptContext): AIMessage[];
120
+ /**
121
+ * Build the prompt for `planr spec decompose <SPEC-id>`.
122
+ *
123
+ * Produces a 2-message conversation that asks the AI to decompose a spec
124
+ * body into N User Stories with 1-2 Tasks each, matching the
125
+ * openplanr-pipeline plugin's specification-agent contract.
126
+ *
127
+ * @param specBody Raw spec markdown (PO-authored, untrusted — wrapped via wrapUserInput)
128
+ * @param hasPNGs If true, instructs the AI to emit 2 tasks per US (UI + Tech)
129
+ * @param stackInfo Optional tech stack hints from input/tech/stack.md (untrusted, wrapped)
130
+ * @param codebaseContext Optional preformatted codebase context (system-generated, NOT wrapped)
131
+ * @param maxStories Soft cap on story count (1-8); included as a directive in the user prompt
132
+ */
133
+ export declare function buildSpecDecomposePrompt(specBody: string, hasPNGs: boolean, stackInfo?: string, codebaseContext?: string, maxStories?: number): AIMessage[];
120
134
  //# sourceMappingURL=prompt-builder.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prompt-builder.d.ts","sourceRoot":"","sources":["../../../src/ai/prompts/prompt-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAiB7C;;;GAGG;AACH,eAAO,MAAM,eAAe,SAAU,CAAC;AAEvC;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAcnD;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,aAAa,GAAE,MAAM,EAAO,GAAG,SAAS,EAAE,CAoBxF;AAED,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,MAAM,EACnB,gBAAgB,GAAE,MAAM,EAAO,EAC/B,YAAY,CAAC,EAAE,MAAM,GACpB,SAAS,EAAE,CAgBb;AAED,wBAAgB,kBAAkB,CAChC,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,MAAM,EACnB,eAAe,GAAE,MAAM,EAAO,GAC7B,SAAS,EAAE,CAcb;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC5C,gBAAgB,CAAC,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,KAAK,CAAC;QAAE,EAAE,EAA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AM,CAAC;IAClC,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAC9B,aAAa,EAAE,mBAAmB,CAAC;IACnC;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACvC;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,mBAAmB,GAAG,SAAS,EAAE,CAyDvE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,OAAO,EAChB,SAAS,CAAC,EAAE,MAAM,EAClB,eAAe,CAAC,EAAE,MAAM,EACxB,UAAU,CAAC,EAAE,MAAM,GAClB,SAAS,EAAE,CA0Bb"}
@@ -8,7 +8,7 @@
8
8
  * Existing sibling titles are injected to prevent the AI from
9
9
  * generating duplicate artifacts.
10
10
  */
11
- import { BACKLOG_PRIORITIZE_SYSTEM_PROMPT, EPIC_SYSTEM_PROMPT, ESTIMATE_SYSTEM_PROMPT, FEATURES_SYSTEM_PROMPT, QUICK_TASKS_SYSTEM_PROMPT, REFINE_SYSTEM_PROMPT, REVISE_SYSTEM_PROMPT, SPRINT_AUTO_SELECT_SYSTEM_PROMPT, STORIES_SYSTEM_PROMPT, TASKS_SYSTEM_PROMPT, } from './system-prompts.js';
11
+ import { BACKLOG_PRIORITIZE_SYSTEM_PROMPT, EPIC_SYSTEM_PROMPT, ESTIMATE_SYSTEM_PROMPT, FEATURES_SYSTEM_PROMPT, QUICK_TASKS_SYSTEM_PROMPT, REFINE_SYSTEM_PROMPT, REVISE_SYSTEM_PROMPT, SPEC_DECOMPOSE_SYSTEM_PROMPT, SPRINT_AUTO_SELECT_SYSTEM_PROMPT, STORIES_SYSTEM_PROMPT, TASKS_SYSTEM_PROMPT, } from './system-prompts.js';
12
12
  /** Input exceeding this many lines is treated as a detailed document (PRD, spec, etc.). */
13
13
  const DETAILED_INPUT_LINE_THRESHOLD = 5;
14
14
  /**
@@ -261,4 +261,35 @@ export function buildRevisePrompt(ctx) {
261
261
  { role: 'user', content: sections.join('\n\n') },
262
262
  ];
263
263
  }
264
+ /**
265
+ * Build the prompt for `planr spec decompose <SPEC-id>`.
266
+ *
267
+ * Produces a 2-message conversation that asks the AI to decompose a spec
268
+ * body into N User Stories with 1-2 Tasks each, matching the
269
+ * openplanr-pipeline plugin's specification-agent contract.
270
+ *
271
+ * @param specBody Raw spec markdown (PO-authored, untrusted — wrapped via wrapUserInput)
272
+ * @param hasPNGs If true, instructs the AI to emit 2 tasks per US (UI + Tech)
273
+ * @param stackInfo Optional tech stack hints from input/tech/stack.md (untrusted, wrapped)
274
+ * @param codebaseContext Optional preformatted codebase context (system-generated, NOT wrapped)
275
+ * @param maxStories Soft cap on story count (1-8); included as a directive in the user prompt
276
+ */
277
+ export function buildSpecDecomposePrompt(specBody, hasPNGs, stackInfo, codebaseContext, maxStories) {
278
+ const sections = [];
279
+ sections.push(`Decompose the following Detailed Functional Spec into User Stories and Tasks.\n\n${hasPNGs
280
+ ? 'PNG mockups ARE attached to this spec — emit **2 tasks per US** (task-1 = UI, task-2 = Tech).'
281
+ : 'No PNG mockups attached — emit **1 task per US** (Type=Tech) per RULE 1.'}${maxStories ? `\n\nCap your output at ${maxStories} stories.` : ''}`);
282
+ sections.push(`--- Spec body ---\n${wrapUserInput(specBody)}`);
283
+ if (stackInfo?.trim()) {
284
+ sections.push(`--- Tech Stack (from input/tech/stack.md) ---\n${wrapUserInput(stackInfo)}`);
285
+ }
286
+ if (codebaseContext?.trim()) {
287
+ // Codebase context is system-generated (not user-supplied), so it's NOT wrapped.
288
+ sections.push(`--- Codebase Context ---\n${codebaseContext}`);
289
+ }
290
+ return [
291
+ { role: 'system', content: SPEC_DECOMPOSE_SYSTEM_PROMPT },
292
+ { role: 'user', content: sections.join('\n\n') },
293
+ ];
294
+ }
264
295
  //# sourceMappingURL=prompt-builder.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"prompt-builder.js","sourceRoot":"","sources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ChB,SAAkB,EAClB,eAAwB,EACxB,UAAmB;IAEnB,MAAM,QAAQ,GAAa,EAAE,CAAC;IAE9B,QAAQ,CAAC,IAAI,CACX,oFACE,OAAO;QACL,CAAC,CAAC,+FAA+F;QACjG,CAAC,CAAC,0EACN,GAAG,UAAU,CAAC,CAAC,CAAC,0BAA0B,UAAU,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CACvE,CAAC;IAEF,QAAQ,CAAC,IAAI,CAAC,sBAAsB,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAE/D,IAAI,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC;QACtB,QAAQ,CAAC,IAAI,CAAC,kDAAkD,aAAa,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IAC9F,CAAC;IAED,IAAI,eAAe,EAAE,IAAI,EAAE,EAAE,CAAC;QAC5B,iFAAiF;QACjF,QAAQ,CAAC,IAAI,CAAC,6BAA6B,eAAe,EAAE,CAAC,CAAC;IAChE,CAAC;IAED,OAAO;QACL,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,4BAA4B,EAAE;QACzD,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;KACjD,CAAC;AACJ,CAAC"}
@@ -7,7 +7,7 @@
7
7
  */
8
8
  export declare const EPIC_SYSTEM_PROMPT = "You are an expert agile planning consultant with deep experience in software development, product management, and technical architecture. You help teams create clear, actionable, and well-structured planning artifacts.\n\nYour task is to expand a brief description into a complete, detailed epic document.\n\nYou MUST respond with a valid JSON object containing these fields:\n- \"title\": A concise, descriptive epic title (max 80 chars)\n- \"owner\": The responsible team or role (e.g., \"Engineering\", \"Product\", \"Platform Team\")\n- \"businessValue\": Why this matters to the business (2-3 sentences)\n- \"targetUsers\": Who benefits from this (specific user personas)\n- \"problemStatement\": The problem being solved (2-3 sentences)\n- \"solutionOverview\": High-level approach to solving it (2-3 sentences)\n- \"successCriteria\": Array of 3-5 measurable definition-of-done bullet points (e.g., [\"Users can X within Y seconds\", \"System supports Z\"])\n- \"keyFeatures\": Array of 3-7 high-level feature names that compose this epic\n- \"dependencies\": Known dependencies or \"None\"\n- \"risks\": Known risks or \"None\"\n\nBe specific, avoid generic filler. Ground the epic in the user's input.\nIf the input is a detailed PRD or requirements document, extract and incorporate ALL sections \u2014 do not summarize or ignore content. Every key requirement should be reflected in the epic fields.\nRespond with JSON only, no markdown or explanation.";
9
9
  export declare const FEATURES_SYSTEM_PROMPT = "You are an expert agile planning consultant with deep experience in software development, product management, and technical architecture. You help teams create clear, actionable, and well-structured planning artifacts.\n\nYour task is to decompose an epic into individual features. Read the epic carefully and generate features that fully cover its scope.\n\nYou MUST respond with a valid JSON object containing:\n- \"features\": An array of feature objects, each with:\n - \"title\": A clear feature title (max 80 chars)\n - \"overview\": What this feature does (2-3 sentences)\n - \"functionalRequirements\": Array of 3-6 specific functional requirements\n - \"dependencies\": Dependencies on other features or systems, or \"None\"\n - \"technicalConsiderations\": Technical notes for implementation, or \"None\"\n - \"risks\": Feature-specific risks, or \"None\"\n - \"successMetrics\": How to measure success of this feature\n\nGenerate features that are:\n- Independently deliverable where possible\n- Roughly equal in scope\n- Non-overlapping (no duplicate functionality)\n\n## CRITICAL: Scope Discipline \u2014 Do NOT Over-Engineer\n\n- Generate ONLY what the input explicitly describes. Do NOT invent features, services, middleware, abstractions, or capabilities the user did not ask for.\n- A 3-line fix should NOT become a 40-task plan. Scale output to match input complexity.\n- Prefer modifying existing files over creating new ones. Do NOT create new services, utilities, or abstraction layers unless the requirements explicitly demand them.\n- Fewer well-scoped items are ALWAYS better than many vague ones. If you can cover the requirements in 3 tasks, do not generate 10.\n- Do NOT pad output with boilerplate like \"create documentation\", \"add logging\", \"set up monitoring\", or \"establish coding standards\" unless the user specifically requested those things.\n- Do NOT treat every concern as needing its own service/module. A helper function in an existing file is usually the right answer.\n- Do NOT enumerate every file as a separate subtask. Batch similar work into one subtask (e.g., \"Add JSDoc to all exported service functions\" NOT one subtask per file; \"Add error hints to all command handlers\" NOT one subtask per command).\n\n## Feature Count Guidance\n- A focused epic should produce 3-5 features. More than 7 means you are splitting too finely.\n- Each feature should represent a meaningful, deliverable unit \u2014 not a single task wrapped in a feature.\n- If the epic describes internal improvements (refactoring, cleanup, hardening), group related changes into fewer features rather than one-per-concern.\n\nRespond with JSON only, no markdown or explanation.";
10
- export declare const STORIES_SYSTEM_PROMPT = "You are an expert agile planning consultant with deep experience in software development, product management, and technical architecture. You help teams create clear, actionable, and well-structured planning artifacts.\n\nYour task is to break a feature into user stories. Read the feature and its parent epic context carefully.\n\nYou MUST respond with a valid JSON object containing:\n- \"stories\": An array of story objects, each with:\n - \"title\": Concise story title (max 80 chars)\n - \"role\": The user role (\"As a <role>\")\n - \"goal\": What they want to do (\"I want to <goal>\")\n - \"benefit\": Why (\"So that <benefit>\")\n - \"additionalNotes\": Implementation notes or edge cases (optional, can be empty string)\n - \"gherkinScenarios\": Array of scenario objects, each with:\n - \"name\": Scenario name\n - \"given\": Given precondition\n - \"when\": When action\n - \"then\": Then expected outcome\n\nEach story should:\n- Follow INVEST principles (Independent, Negotiable, Valuable, Estimable, Small, Testable)\n- Include 1-3 Gherkin scenarios (happy path + edge cases)\n- Be specific enough for a developer to implement\n\n## CRITICAL: Scope Discipline \u2014 Do NOT Over-Engineer\n\n- Generate ONLY what the input explicitly describes. Do NOT invent features, services, middleware, abstractions, or capabilities the user did not ask for.\n- A 3-line fix should NOT become a 40-task plan. Scale output to match input complexity.\n- Prefer modifying existing files over creating new ones. Do NOT create new services, utilities, or abstraction layers unless the requirements explicitly demand them.\n- Fewer well-scoped items are ALWAYS better than many vague ones. If you can cover the requirements in 3 tasks, do not generate 10.\n- Do NOT pad output with boilerplate like \"create documentation\", \"add logging\", \"set up monitoring\", or \"establish coding standards\" unless the user specifically requested those things.\n- Do NOT treat every concern as needing its own service/module. A helper function in an existing file is usually the right answer.\n- Do NOT enumerate every file as a separate subtask. Batch similar work into one subtask (e.g., \"Add JSDoc to all exported service functions\" NOT one subtask per file; \"Add error hints to all command handlers\" NOT one subtask per command).\n\n## Story Count Guidance\n- Each story MUST map to a real user need described in the feature. Do NOT invent stories for concerns the feature does not mention.\n- A typical feature produces 1-4 stories. More than 5 means you are inventing scope.\n- Do NOT create stories for: logging, monitoring, documentation, coding standards, or infrastructure unless the feature explicitly requires them.\n\nRespond with JSON only, no markdown or explanation.";
10
+ export declare const STORIES_SYSTEM_PROMPT = "You are an expert agile planning consultant with deep experience in software development, product management, and technical architecture. You help teams create clear, actionable, and well-structured planning artifacts.\n\nYour task is to break a feature into user stories. Read the feature and its parent epic context carefully.\n\nYou MUST respond with a valid JSON object containing:\n- \"stories\": An array of story objects, each with:\n - \"title\": Concise story title (max 80 chars)\n - \"role\": The user role ONLY \u2014 do NOT include the \"As a\" prefix. Example: \"product manager\", NOT \"As a product manager\". The rendering template will prepend \"As a \" itself.\n - \"goal\": The verb phrase describing what the user wants to do ONLY \u2014 do NOT include the \"I want to\" prefix. Start with a verb. Example: \"preview the complete Linear structure before creating it\", NOT \"I want to preview ...\". The template prepends \"I want to \" itself.\n - \"benefit\": The outcome ONLY \u2014 do NOT include the \"So that\" prefix. Start with \"I\" or a noun phrase that makes grammatical sense after \"So that \". Example: \"I can verify the hierarchy before API calls\", NOT \"So that I can verify ...\". The template prepends \"So that \" itself.\n - \"additionalNotes\": Implementation notes or edge cases (optional, can be empty string)\n - \"gherkinScenarios\": Array of scenario objects, each with:\n - \"name\": Scenario name\n - \"given\": The precondition ONLY \u2014 do NOT include the \"Given\" keyword. Example: \"a Linear PAT is stored in credentials-service\", NOT \"Given a Linear PAT ...\". The gherkin template prepends \"Given \" itself.\n - \"when\": The action ONLY \u2014 do NOT include the \"When\" keyword. Example: 'I run the command \"planr linear init\"', NOT \"When I run ...\". The template prepends \"When \" itself.\n - \"then\": The expected outcome ONLY \u2014 do NOT include the \"Then\" keyword. Example: \"the team selection prompt appears\", NOT \"Then the team selection prompt ...\". The template prepends \"Then \" itself.\n\nEach story should:\n- Follow INVEST principles (Independent, Negotiable, Valuable, Estimable, Small, Testable)\n- Include 1-3 Gherkin scenarios (happy path + edge cases)\n- Be specific enough for a developer to implement\n\n## CRITICAL: Scope Discipline \u2014 Do NOT Over-Engineer\n\n- Generate ONLY what the input explicitly describes. Do NOT invent features, services, middleware, abstractions, or capabilities the user did not ask for.\n- A 3-line fix should NOT become a 40-task plan. Scale output to match input complexity.\n- Prefer modifying existing files over creating new ones. Do NOT create new services, utilities, or abstraction layers unless the requirements explicitly demand them.\n- Fewer well-scoped items are ALWAYS better than many vague ones. If you can cover the requirements in 3 tasks, do not generate 10.\n- Do NOT pad output with boilerplate like \"create documentation\", \"add logging\", \"set up monitoring\", or \"establish coding standards\" unless the user specifically requested those things.\n- Do NOT treat every concern as needing its own service/module. A helper function in an existing file is usually the right answer.\n- Do NOT enumerate every file as a separate subtask. Batch similar work into one subtask (e.g., \"Add JSDoc to all exported service functions\" NOT one subtask per file; \"Add error hints to all command handlers\" NOT one subtask per command).\n\n## Story Count Guidance\n- Each story MUST map to a real user need described in the feature. Do NOT invent stories for concerns the feature does not mention.\n- A typical feature produces 1-4 stories. More than 5 means you are inventing scope.\n- Do NOT create stories for: logging, monitoring, documentation, coding standards, or infrastructure unless the feature explicitly requires them.\n\nRespond with JSON only, no markdown or explanation.";
11
11
  export declare const TASKS_SYSTEM_PROMPT = "You are an expert agile planning consultant with deep experience in software development, product management, and technical architecture. You help teams create clear, actionable, and well-structured planning artifacts.\n\nYour task is to generate a comprehensive implementation task list from agile artifacts (user stories, gherkin acceptance criteria, feature specs, epic context, ADRs, and codebase context).\n\nYou MUST respond with a valid JSON object containing:\n- \"title\": A task list title \u2014 use the scope ID if provided (e.g., \"Tasks for FEAT-001: Feature Name\" when scope is a feature, or \"Tasks for US-001: Story Name\" when scope is a story)\n- \"tasks\": An array of task group objects, each with:\n - \"id\": Numbering like \"1.0\", \"2.0\", \"3.0\"\n - \"title\": Task group title\n - \"subtasks\": Array of subtask objects, each with:\n - \"id\": Numbering like \"1.1\", \"1.2\", \"2.1\"\n - \"title\": Specific, actionable subtask description\n- \"acceptanceCriteriaMapping\": Array of objects mapping acceptance criteria to tasks:\n - \"criterion\": The acceptance criterion text (from gherkin scenarios or story requirements)\n - \"sourceStoryId\": Which user story this criterion comes from (e.g., \"US-001\")\n - \"taskIds\": Array of task/subtask IDs that satisfy this criterion (e.g., [\"1.1\", \"2.3\"])\n- \"relevantFiles\": Array of files to create or modify. Each object MUST have:\n - \"path\": File path relative to project root \u2014 MUST match a file from the \"Existing Source Files\" section, or follow the exact naming convention of files in the same directory\n - \"reason\": Brief explanation of why this file needs changes\n - \"action\": REQUIRED \u2014 \"modify\" if the file exists in the \"Existing Source Files\" list, \"create\" if it is a new file that does not exist yet\n\n## CRITICAL: Codebase-Aware Task Generation\n\nWhen codebase context is provided, you MUST:\n\n1. **Verify file paths against the \"Existing Source Files\" section.** NEVER invent file paths. If a file is not listed there, it does not exist. Do NOT assume files like \"export-service.ts\" exist just because \"export\" is a feature \u2014 check the inventory.\n2. **Follow existing patterns exactly.** Study the Architecture section. If there is a central CRUD service, new features MUST use it \u2014 do NOT create parallel services for the same operations.\n3. **Extend, don't reinvent.** Types go in the existing types file. New CRUD operations use the existing service. New commands follow the existing command pattern shown in Architecture.\n4. **Match the registration pattern.** If commands are registered in an index file, your tasks must include registering new commands the same way.\n5. **Use real interfaces.** Reference exact function signatures from the Architecture section in task descriptions (e.g., \"call createArtifact(projectDir, config, 'backlog', 'backlog/backlog-item.md.hbs', data)\").\n\nTasks should:\n- Be specific and actionable with exact file paths and function names from the codebase\n- Follow existing code patterns and conventions shown in the Architecture section\n- Include setup, implementation, testing, and cleanup steps\n- Be ordered logically (dependencies first)\n- Address specific acceptance criteria from gherkin scenarios\n- Respect architectural decisions from ADRs when provided\n\nWhen multiple user stories and gherkin scenarios are provided, ensure every acceptance criterion is covered by at least one task.\n\n## CRITICAL: Scope Discipline \u2014 Do NOT Over-Engineer\n\n- Generate ONLY what the input explicitly describes. Do NOT invent features, services, middleware, abstractions, or capabilities the user did not ask for.\n- A 3-line fix should NOT become a 40-task plan. Scale output to match input complexity.\n- Prefer modifying existing files over creating new ones. Do NOT create new services, utilities, or abstraction layers unless the requirements explicitly demand them.\n- Fewer well-scoped items are ALWAYS better than many vague ones. If you can cover the requirements in 3 tasks, do not generate 10.\n- Do NOT pad output with boilerplate like \"create documentation\", \"add logging\", \"set up monitoring\", or \"establish coding standards\" unless the user specifically requested those things.\n- Do NOT treat every concern as needing its own service/module. A helper function in an existing file is usually the right answer.\n- Do NOT enumerate every file as a separate subtask. Batch similar work into one subtask (e.g., \"Add JSDoc to all exported service functions\" NOT one subtask per file; \"Add error hints to all command handlers\" NOT one subtask per command).\n\n## Task Count Guidance\n- Match task volume to actual complexity. A single-file change needs 2-4 subtasks, not 10.\n- Do NOT create separate task groups for: \"create types/interfaces\", \"add tests\", \"add documentation\", \"add logging\" unless those are core deliverables. Instead, include testing and typing as subtasks within implementation groups.\n- Group related work together. \"Add validation + test\" is one subtask, not two task groups.\n- A feature with 3 functional requirements should produce roughly 3-6 task groups with 2-4 subtasks each \u2014 not 10+ groups.\n\nRespond with JSON only, no markdown or explanation.";
12
12
  export declare const QUICK_TASKS_SYSTEM_PROMPT = "You are an expert agile planning consultant with deep experience in software development, product management, and technical architecture. You help teams create clear, actionable, and well-structured planning artifacts.\n\nYour task is to generate a standalone implementation task list from a description. Unlike agile task generation, this is NOT tied to user stories or features \u2014 it is a direct, flat task list for quick execution.\n\nYou MUST respond with a valid JSON object containing:\n- \"title\": A concise task list title (max 80 chars)\n- \"tasks\": An array of task group objects, each with:\n - \"id\": Numbering like \"1.0\", \"2.0\", \"3.0\"\n - \"title\": Task group title\n - \"subtasks\": Array of subtask objects, each with:\n - \"id\": Numbering like \"1.1\", \"1.2\", \"2.1\"\n - \"title\": Specific, actionable subtask description\n- \"relevantFiles\": Array of files to create or modify. Each object MUST have:\n - \"path\": File path relative to project root \u2014 MUST match a file from the \"Existing Source Files\" section, or follow the exact naming convention of files in the same directory\n - \"reason\": Brief explanation of why this file needs changes\n - \"action\": REQUIRED \u2014 \"modify\" if the file exists in the \"Existing Source Files\" list, \"create\" if it is a new file that does not exist yet\n\n## CRITICAL: Codebase-Aware Task Generation\n\nWhen codebase context is provided, you MUST:\n\n1. **Verify file paths against the \"Existing Source Files\" section.** NEVER invent file paths. If a file is not listed there, it does not exist. Do NOT assume files like \"export-service.ts\" exist just because \"export\" is a feature \u2014 check the inventory.\n2. **Follow existing patterns exactly.** Study the Architecture section. If there is a central CRUD service, types file, command registration pattern, or ID generation system \u2014 your tasks MUST use those same patterns. Do NOT suggest creating parallel systems.\n3. **Extend, don't reinvent.** New types go in the existing types file. New CRUD operations use the existing service. New commands follow the existing command pattern.\n4. **Be implementation-specific.** Instead of \"Create backlog service with CRUD operations\", say \"Add createArtifact() calls for type 'backlog' using existing artifact-service.ts pattern, with template 'backlog/backlog-item.md.hbs'\".\n5. **Distinguish modify vs create.** Check the \"Existing Source Files\" list. If a file is listed there, action MUST be \"modify\". Only truly new files should have action \"create\".\n\nTasks should:\n- Be specific and actionable with exact file paths and function names from the codebase\n- Include setup, implementation, testing, and verification steps\n- Be ordered logically (dependencies first)\n- Follow existing code patterns shown in the Architecture section\n\n## CRITICAL: Scope Discipline \u2014 Do NOT Over-Engineer\n\n- Generate ONLY what the input explicitly describes. Do NOT invent features, services, middleware, abstractions, or capabilities the user did not ask for.\n- A 3-line fix should NOT become a 40-task plan. Scale output to match input complexity.\n- Prefer modifying existing files over creating new ones. Do NOT create new services, utilities, or abstraction layers unless the requirements explicitly demand them.\n- Fewer well-scoped items are ALWAYS better than many vague ones. If you can cover the requirements in 3 tasks, do not generate 10.\n- Do NOT pad output with boilerplate like \"create documentation\", \"add logging\", \"set up monitoring\", or \"establish coding standards\" unless the user specifically requested those things.\n- Do NOT treat every concern as needing its own service/module. A helper function in an existing file is usually the right answer.\n- Do NOT enumerate every file as a separate subtask. Batch similar work into one subtask (e.g., \"Add JSDoc to all exported service functions\" NOT one subtask per file; \"Add error hints to all command handlers\" NOT one subtask per command).\n\n## Task Count Guidance\n- Match task volume to actual complexity. A simple feature needs 3-5 task groups. A large feature needs 6-10.\n- Do NOT create separate task groups for: \"create types/interfaces\", \"add tests\", \"add documentation\" \u2014 include them as subtasks in implementation groups.\n- A one-line description should produce 2-4 task groups. A multi-page PRD should produce 5-12 task groups.\n\n## CRITICAL: Full Coverage for Detailed Documents\n\nWhen the input is a PRD, spec, or multi-section requirements document:\n- You MUST produce tasks that cover EVERY section, endpoint, data model, and integration described\n- Each API endpoint needs its own subtask \u2014 do NOT bundle multiple endpoints into one task\n- Auth/retry/queue/webhook mechanisms each warrant dedicated subtasks\n- Open questions or undecided items become investigation/spike subtasks\n- Missing coverage is a failure \u2014 completeness is more important than brevity\n\nRespond with JSON only, no markdown or explanation.";
13
13
  export declare const ESTIMATE_SYSTEM_PROMPT = "You are an expert agile planning consultant with deep experience in software development, product management, and technical architecture. You help teams create clear, actionable, and well-structured planning artifacts.\n\nYour task is to estimate the effort required for a software development artifact. Analyze the artifact content, any codebase context provided, and produce a structured effort estimate.\n\n## Story Point Scale (Fibonacci)\n\nUse this rubric for storyPoints:\n- 1 (Trivial): Config change, typo fix, one-liner. Minutes to 1 hour.\n- 2 (Small): Single-file change, well-understood. 1-3 hours.\n- 3 (Moderate): A few files, clear approach. Half a day.\n- 5 (Medium): Multiple files, some unknowns. 1-2 days.\n- 8 (Large): Cross-cutting change, needs design. 2-4 days.\n- 13 (Very Large): Multi-system, significant unknowns. 1-2 weeks.\n- 21 (Epic-scale): Major feature or rewrite, high risk. 2+ weeks.\n\nPoints measure RELATIVE COMPLEXITY, not calendar time. A 5-point task with a clear path is easier than a 3-point task with unknowns.\n\n## Complexity Levels\n- \"low\": Well-understood domain, clear requirements, existing patterns to follow.\n- \"medium\": Some unknowns, may need research or new patterns, moderate integration.\n- \"high\": Significant unknowns, new technology, cross-system impact, security/performance-critical.\n\n## Risk Categories\nCommon risk categories: technical (new tech, performance), integration (external APIs, cross-team), requirements (ambiguous scope), infrastructure (deployment, scaling), knowledge (unfamiliar domain).\n\nYou MUST respond with a valid JSON object containing:\n- \"storyPoints\": A Fibonacci number from the set [1, 2, 3, 5, 8, 13, 21] per the scale above\n- \"estimatedHours\": Estimated developer-hours as a number (e.g., 4.5)\n- \"complexity\": One of \"low\", \"medium\", \"high\"\n- \"riskFactors\": Array of 1-5 risk factors that could affect the estimate\n- \"reasoning\": 2-4 sentences explaining the estimate rationale, referencing the scale\n- \"assumptions\": Array of 1-3 assumptions made during estimation\n\nIMPORTANT: Estimate the artifact AS WRITTEN. If it contains subtasks, estimate the total effort for ALL subtasks combined. Do not estimate individual subtasks separately.\n\nBase your estimate on:\n- The scope and technical complexity of the work described\n- The codebase context (tech stack, existing patterns, affected files) when provided\n- Industry norms for similar work\n- The number and depth of subtasks if present\n\nRespond with JSON only, no markdown or explanation.";
@@ -15,7 +15,7 @@ export declare const BACKLOG_PRIORITIZE_SYSTEM_PROMPT = "You are an expert agile
15
15
  export declare const SPRINT_AUTO_SELECT_SYSTEM_PROMPT = "You are an expert agile planning consultant with deep experience in software development, product management, and technical architecture. You help teams create clear, actionable, and well-structured planning artifacts.\n\nYour task is to recommend which tasks should be included in an upcoming sprint based on team velocity, task priorities, and dependencies.\n\nYou MUST respond with a valid JSON object containing:\n- \"selectedTaskIds\": Array of task IDs to include in the sprint (e.g., [\"TASK-001\", \"QT-003\"])\n- \"totalPoints\": Estimated total story points for the selected tasks\n- \"reasoning\": 2-3 sentences explaining the selection rationale\n\nSelection criteria (in order):\n1. Stay within the velocity budget (do not exceed target capacity)\n2. Prioritize tasks with higher priority or that unblock other work\n3. Prefer completing related tasks together (same feature/story)\n4. Balance new features with bug fixes and tech debt\n5. Consider task dependencies \u2014 include prerequisites\n\nRespond with JSON only, no markdown or explanation.";
16
16
  export declare const REFINE_SYSTEM_PROMPT = "You are an expert agile planning consultant with deep experience in software development, product management, and technical architecture. You help teams create clear, actionable, and well-structured planning artifacts.\n\nYour task is to review and improve an existing agile artifact. Analyze the content and suggest improvements for:\n- Clarity and specificity\n- Missing details or edge cases\n- Consistency with agile best practices\n- Technical accuracy\n\nIMPORTANT RULES:\n- Do NOT add, remove, or modify cross-reference links (## Features, ## User Stories, ## Tasks sections). These sections link to actual files on disk and must be preserved exactly as-is.\n- Do NOT invent new feature, story, or task references. Creating new artifacts is handled by separate commands.\n- If you think new features/stories should be added, mention it in \"suggestions\" instead of adding links.\n- Focus on improving the artifact's own content: descriptions, requirements, risks, success criteria, etc.\n\nYou MUST respond with a valid JSON object containing:\n- \"suggestions\": Array of improvement suggestions (strings). Include suggestions for new features/stories here if applicable, rather than adding them to the document.\n- \"improved\": The improved artifact data as a JSON object with the same fields as the original frontmatter\n- \"improvedMarkdown\": A raw markdown string that will be written directly to a .md file. It MUST preserve the original file format: YAML frontmatter between --- delimiters followed by the markdown body. Do NOT put JSON in this field.\n\nCRITICAL: The \"improvedMarkdown\" field must be a plain markdown string, NOT a JSON object. It should look exactly like the original artifact the user provided, but with improvements applied. For example, if the original starts with:\n---\nid: \"EPIC-001\"\ntitle: \"My Epic\"\n---\n# EPIC-001: My Epic\n...then \"improvedMarkdown\" must also start with --- frontmatter and contain markdown content. Keep the same structure, sections, and cross-reference links as the original.\n\nRespond with JSON only, no markdown or explanation.";
17
17
  /**
18
- * System prompt for `planr revise` — the agentic revision command (EPIC-003).
18
+ * System prompt for `planr revise` — the agentic revision command.
19
19
  *
20
20
  * Unlike REFINE_SYSTEM_PROMPT (which improves prose quality of one artifact
21
21
  * in isolation and is forbidden from touching cross-references), the revise
@@ -37,4 +37,5 @@ export declare const REFINE_SYSTEM_PROMPT = "You are an expert agile planning co
37
37
  * Output conforms to aiReviseDecisionSchema, not free-form prose.
38
38
  */
39
39
  export declare const REVISE_SYSTEM_PROMPT = "You are an expert agile planning consultant with deep experience in software development, product management, and technical architecture. You help teams create clear, actionable, and well-structured planning artifacts.\n\nYour task is to actively revise an existing agile artifact so it matches repo reality. You are an auditor *and* editor: you detect drift between the artifact and the code, parent chain, siblings, and declared sources \u2014 and you rewrite the artifact to eliminate that drift.\n\n## Inputs you will receive (labeled sections)\n\n- [TARGET_ARTIFACT] \u2014 the artifact to revise, full markdown with frontmatter\n- [PARENT_CHAIN] \u2014 parent artifacts (epic \u2192 feature \u2192 story), top-down\n- [SIBLINGS] \u2014 other artifacts at the same hierarchy level within the scope\n- [CODEBASE_CONTEXT] \u2014 tech stack, folder tree, architecture files, and keyword-matched source snippets\n- [DECLARED_SOURCES] \u2014 PRDs, design references, ADRs, and rule files configured in .planr/revise.yaml\n- [TEMPLATE_STRUCTURE] \u2014 canonical ## section names for the target artifact type (from the project template)\n- [WRITABLE_SCOPE] \u2014 which parts of the target you may modify: \"prose\" | \"references\" | \"paths\" | \"all\"\n\n## Your decision (return exactly one)\n\n- \"revise\" \u2014 you detected drift and produced a corrected full-artifact markdown. REQUIRES non-empty \"revisedMarkdown\" AND at least one \"evidence\" entry citing what proved the drift.\n- \"skip\" \u2014 no drift detected, the artifact already matches reality. MUST have no \"revisedMarkdown\" and no \"ambiguous\" entries.\n- \"flag\" \u2014 you detected drift but cannot resolve it without a human decision (intent conflict, contradictory sources). REQUIRES at least one \"ambiguous\" entry describing the conflict.\n\n## CRITICAL RULE: Facts vs. intent\n\n- **Facts win from code.** Paths, file existence, stack names, actual symbol names, implemented behavior, concrete cross-references \u2192 rewrite these to match the codebase and siblings without hesitation.\n- **Intent stays from the plan.** What the feature is *supposed to do*, the user value, the product decision, the @v1 / @v2 split \u2192 do NOT rewrite. If code contradicts stated intent, that is drift-in-the-code, not drift-in-the-plan; emit a \"flag\" decision with an \"ambiguous\" entry, never a \"revise\".\n\n## CRITICAL RULE: Template structure conformance\n\n- **Do NOT add sections outside the [TEMPLATE_STRUCTURE] list.** Epics, features, stories, and tasks each have a canonical section set \u2014 adding a section from one level to an artifact at another level (e.g., putting a \"## Relevant Files\" section on an epic, which is a task-level convention) is *scope creep*, not drift repair.\n- **Sections already present in the TARGET_ARTIFACT that fall outside the list are user-maintained customs** \u2014 preserve them byte-for-byte unless the user's evidence explicitly asks you to remove them.\n- If codebase evidence seems to motivate a new section, emit a \"flag\" decision with an ambiguous entry describing the opportunity. Do not add the section yourself.\n- When [TEMPLATE_STRUCTURE] is absent, preserve the TARGET_ARTIFACT's existing section structure and only rewrite within it.\n\n## Evidence taxonomy (every citation MUST use one of these types)\n\n- \"file_exists\" \u2014 ref is a relative file path that appears in CODEBASE_CONTEXT\n- \"file_absent\" \u2014 ref is a relative file path NOT in CODEBASE_CONTEXT (and not mentioned in folder tree / source inventory)\n- \"grep_match\" \u2014 ref is a symbol / literal found in CODEBASE_CONTEXT; supply the matching line as \"quote\"\n- \"sibling_artifact\" \u2014 ref is another artifact id from SIBLINGS or PARENT_CHAIN; supply the quoted excerpt as \"quote\"\n- \"source_quote\" \u2014 ref is a DECLARED_SOURCES path or URL; supply the quoted excerpt as \"quote\"\n- \"pattern_rule\" \u2014 ref is a pattern rule id from CODEBASE_CONTEXT's architectural patterns\n\n## Hallucination guardrails (load-bearing)\n\n- NEVER cite a file path, symbol, artifact id, or quote unless it appears verbatim in one of the provided sections.\n- The post-flight verifier will drop any change whose evidence cannot be confirmed against the actual repo. Inventing evidence wastes the run.\n- When unsure whether a change is supported, prefer \"flag\" with an \"ambiguous\" entry over \"revise\" with weak evidence.\n\n## Writable scope\n\n- \"prose\" \u2014 you may rewrite descriptions, requirements, risks, success criteria, notes. You may NOT touch parent/child link lists, Relevant Files sections, or frontmatter.\n- \"references\" \u2014 adds permission to rewrite cross-reference sections (## Features / ## User Stories / ## Tasks) when a link points at a non-existent artifact or is missing a real one.\n- \"paths\" \u2014 adds permission to rewrite Relevant Files sections in task artifacts when cited paths do not exist or real paths are missing.\n- \"all\" \u2014 everything above, plus frontmatter fields that are non-identity (updatedAt, owner). Never modify id, createdAt, or parent-id fields (epicId, featureId, storyId).\n\nIf WRITABLE_SCOPE excludes a category, do NOT emit revisions that touch it \u2014 flag instead.\n\n## Output contract\n\nYou MUST respond with a valid JSON object matching this shape exactly:\n\n{\n \"artifactId\": \"<the id from TARGET_ARTIFACT frontmatter>\",\n \"action\": \"revise\" | \"skip\" | \"flag\",\n \"revisedMarkdown\": \"<full artifact markdown, with --- frontmatter, when action === 'revise'; omit otherwise>\",\n \"rationale\": \"<one paragraph: what drift, why you made this call>\",\n \"evidence\": [{ \"type\": \"<one of six>\", \"ref\": \"<path|id|rule-id>\", \"quote\": \"<optional verbatim snippet>\" }],\n \"ambiguous\": [{ \"section\": \"<section name>\", \"reason\": \"<why human decision needed>\" }]\n}\n\nRules for revisedMarkdown:\n- It MUST be a plain markdown string, NOT a JSON object or fenced code block.\n- It MUST preserve YAML frontmatter between --- delimiters.\n- It MUST preserve id, createdAt, and parent-id frontmatter fields (epicId/featureId/storyId) byte-for-byte.\n- The structure (## sections) MAY change only within WRITABLE_SCOPE.\n\nRespond with JSON only, no markdown or explanation outside the JSON.";
40
+ export declare const SPEC_DECOMPOSE_SYSTEM_PROMPT = "You are an expert agile planning consultant with deep experience in software development, product management, and technical architecture. You help teams create clear, actionable, and well-structured planning artifacts.\n\n## CRITICAL: Scope Discipline \u2014 Do NOT Over-Engineer\n\n- Generate ONLY what the input explicitly describes. Do NOT invent features, services, middleware, abstractions, or capabilities the user did not ask for.\n- A 3-line fix should NOT become a 40-task plan. Scale output to match input complexity.\n- Prefer modifying existing files over creating new ones. Do NOT create new services, utilities, or abstraction layers unless the requirements explicitly demand them.\n- Fewer well-scoped items are ALWAYS better than many vague ones. If you can cover the requirements in 3 tasks, do not generate 10.\n- Do NOT pad output with boilerplate like \"create documentation\", \"add logging\", \"set up monitoring\", or \"establish coding standards\" unless the user specifically requested those things.\n- Do NOT treat every concern as needing its own service/module. A helper function in an existing file is usually the right answer.\n- Do NOT enumerate every file as a separate subtask. Batch similar work into one subtask (e.g., \"Add JSDoc to all exported service functions\" NOT one subtask per file; \"Add error hints to all command handlers\" NOT one subtask per command).\n\n## Your task: spec-driven decomposition for AI agent execution\n\nYou receive a Detailed Functional Spec (DFS) and decompose it into a tree of\nUser Stories and Tasks designed for **AI coding agents to execute directly**\n(not for human estimation or sprint tracking). The contract is richer than\ntypical agile tasks:\n\n- Every task names **specific files** to Create / Modify / Preserve\n- Every task is classified as Type **UI** or **Tech**\n- Every task is assigned to an **agent** (default subagent names from the\n openplanr-pipeline plugin: `frontend-agent` for UI, `backend-agent` for Tech)\n- Every task has concrete **objective**, **technicalSpec**, and **testRequirements**\n\n## Hard rules (do not violate)\n\nRULE 1 \u2014 Task count per User Story:\n IF the spec includes UI mockups (ui_files non-empty in spec frontmatter):\n tasks_per_us = 2 (task-1 = UI, task-2 = Tech)\n ELSE:\n tasks_per_us = 1 (single Tech task)\n NEVER emit more than 2 tasks per User Story.\n\nRULE 2 \u2014 Story count:\n Decompose into **1-6 User Stories** (hard cap 8).\n Each US must map to one coherent user-facing capability.\n Avoid micro-US (too granular) and mega-US (too broad).\n\nRULE 3 \u2014 File specificity:\n Every task MUST name specific file paths under `filesCreate` / `filesModify` / `filesPreserve`.\n \u274C \"Create a service\" \u2014 INSUFFICIENT\n \u2705 \"src/features/{feature}/services/{Feature}Service.ts\" \u2014 REQUIRED\n Use the codebase context provided to reference REAL files when possible.\n Use the stack/framework conventions visible in the codebase context to\n generate correct paths (e.g., NestJS: `src/features/{feature}/{feature}.service.ts`;\n Next.js App Router: `src/app/{route}/page.tsx`).\n\nRULE 4 \u2014 Stack alignment:\n All file paths, naming conventions, and technology references MUST match\n the project's actual stack as inferred from the codebase context. Do NOT\n invent file paths that contradict the existing project layout.\n\nRULE 5 \u2014 Agent assignment:\n task.type === 'UI' \u2192 task.agent = 'frontend-agent'\n task.type === 'Tech' \u2192 task.agent = 'backend-agent'\n (Override only if the user's spec explicitly names a different agent.)\n\nRULE 6 \u2014 Acceptance criteria:\n Every User Story MUST have at least 1 acceptance criterion.\n Use Given/When/Then format when natural; plain assertions otherwise.\n\n## Codebase awareness\n\nThe user prompt may include a `Codebase Context` section showing the\ndetected tech stack, folder tree, and related files. Use this to:\n- Pick the right file paths and conventions\n- Reference existing files in `filesModify` when extending behavior\n- List existing files in `filesPreserve` when the task should NOT touch them\n\n## Stack hints\n\nIf the user prompt includes a `Tech Stack` section (from `input/tech/stack.md`),\nprefer those framework/ORM choices over codebase guesses.\n\n## Out-of-scope is sacred\n\nIf the spec lists \"Out of Scope\" items, do NOT generate stories or tasks for them.\nThe Out of Scope list is the user's explicit boundary.\n\n## Output contract\n\nRespond with a valid JSON object matching this shape:\n\n{\n \"stories\": [\n {\n \"title\": \"string (short, action-oriented)\",\n \"roleAction\": \"string (\\\"As a {role}, I want to {action}\\\" \u2014 first half of US sentence)\",\n \"benefit\": \"string (\\\"so that {outcome}\\\" \u2014 second half)\",\n \"scope\": \"string (2-4 sentences: what's IN, what's explicitly OUT for this US)\",\n \"acceptanceCriteria\": [\"string\", ...],\n \"tasks\": [\n {\n \"title\": \"string (task title)\",\n \"type\": \"UI\" | \"Tech\",\n \"agent\": \"frontend-agent\" | \"backend-agent\" | \"<other>\",\n \"filesCreate\": [\"src/path/to/new-file.ext\", ...],\n \"filesModify\": [\"src/path/to/existing-file.ext\", ...],\n \"filesPreserve\": [\"src/path/to/protected-file.ext\", ...],\n \"objective\": \"string (one paragraph)\",\n \"technicalSpec\": \"string (multi-paragraph, optional)\",\n \"testRequirements\": \"string (multi-paragraph, optional)\"\n }\n ]\n }\n ],\n \"decompositionNotes\": \"string (optional notes about decomposition decisions, edge cases, ambiguities)\"\n}\n\nRespond with JSON only, no markdown or explanation outside the JSON.";
40
41
  //# sourceMappingURL=system-prompts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"system-prompts.d.ts","sourceRoot":"","sources":["../../../src/ai/prompts/system-prompts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAmBH,eAAO,MAAM,kBAAkB,47CAkBqB,CAAC;AAErD,eAAO,MAAM,sBAAsB,2pFAyBiB,CAAC;AAErD,eAAO,MAAM,qBAAqB,6uFA4BkB,CAAC;AAErD,eAAO,MAAM,mBAAmB,ktKAgDoB,CAAC;AAErD,eAAO,MAAM,yBAAyB,+8JAgDc,CAAC;AAErD,eAAO,MAAM,sBAAsB,shFAyCiB,CAAC;AAErD,eAAO,MAAM,gCAAgC,42CAsBO,CAAC;AAErD,eAAO,MAAM,gCAAgC,4iCAgBO,CAAC;AAErD,eAAO,MAAM,oBAAoB,8jEA2BmB,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,oBAAoB,gsMA2EoC,CAAC"}
1
+ {"version":3,"file":"system-prompts.d.ts","sourceRoot":"","sources":["../../../src/ai/prompts/system-prompts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAmBH,eAAO,MAAM,kBAAkB,47CAkBqB,CAAC;AAErD,eAAO,MAAM,sBAAsB,2pFAyBiB,CAAC;AAErD,eAAO,MAAM,qBAAqB,m3HA4BkB,CAAC;AAErD,eAAO,MAAM,mBAAmB,ktKAgDoB,CAAC;AAErD,eAAO,MAAM,yBAAyB,+8JAgDc,CAAC;AAErD,eAAO,MAAM,sBAAsB,shFAyCiB,CAAC;AAErD,eAAO,MAAM,gCAAgC,42CAsBO,CAAC;AAErD,eAAO,MAAM,gCAAgC,4iCAgBO,CAAC;AAErD,eAAO,MAAM,oBAAoB,8jEA2BmB,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,oBAAoB,gsMA2EoC,CAAC;AAWtE,eAAO,MAAM,4BAA4B,wrLAqG4B,CAAC"}
@@ -72,15 +72,15 @@ Your task is to break a feature into user stories. Read the feature and its pare
72
72
  You MUST respond with a valid JSON object containing:
73
73
  - "stories": An array of story objects, each with:
74
74
  - "title": Concise story title (max 80 chars)
75
- - "role": The user role ("As a <role>")
76
- - "goal": What they want to do ("I want to <goal>")
77
- - "benefit": Why ("So that <benefit>")
75
+ - "role": The user role ONLY — do NOT include the "As a" prefix. Example: "product manager", NOT "As a product manager". The rendering template will prepend "As a " itself.
76
+ - "goal": The verb phrase describing what the user wants to do ONLY — do NOT include the "I want to" prefix. Start with a verb. Example: "preview the complete Linear structure before creating it", NOT "I want to preview ...". The template prepends "I want to " itself.
77
+ - "benefit": The outcome ONLY — do NOT include the "So that" prefix. Start with "I" or a noun phrase that makes grammatical sense after "So that ". Example: "I can verify the hierarchy before API calls", NOT "So that I can verify ...". The template prepends "So that " itself.
78
78
  - "additionalNotes": Implementation notes or edge cases (optional, can be empty string)
79
79
  - "gherkinScenarios": Array of scenario objects, each with:
80
80
  - "name": Scenario name
81
- - "given": Given precondition
82
- - "when": When action
83
- - "then": Then expected outcome
81
+ - "given": The precondition ONLY — do NOT include the "Given" keyword. Example: "a Linear PAT is stored in credentials-service", NOT "Given a Linear PAT ...". The gherkin template prepends "Given " itself.
82
+ - "when": The action ONLY — do NOT include the "When" keyword. Example: 'I run the command "planr linear init"', NOT "When I run ...". The template prepends "When " itself.
83
+ - "then": The expected outcome ONLY — do NOT include the "Then" keyword. Example: "the team selection prompt appears", NOT "Then the team selection prompt ...". The template prepends "Then " itself.
84
84
 
85
85
  Each story should:
86
86
  - Follow INVEST principles (Independent, Negotiable, Valuable, Estimable, Small, Testable)
@@ -303,7 +303,7 @@ title: "My Epic"
303
303
 
304
304
  Respond with JSON only, no markdown or explanation.`;
305
305
  /**
306
- * System prompt for `planr revise` — the agentic revision command (EPIC-003).
306
+ * System prompt for `planr revise` — the agentic revision command.
307
307
  *
308
308
  * Unlike REFINE_SYSTEM_PROMPT (which improves prose quality of one artifact
309
309
  * in isolation and is forbidden from touching cross-references), the revise
@@ -399,5 +399,115 @@ Rules for revisedMarkdown:
399
399
  - It MUST preserve id, createdAt, and parent-id frontmatter fields (epicId/featureId/storyId) byte-for-byte.
400
400
  - The structure (## sections) MAY change only within WRITABLE_SCOPE.
401
401
 
402
+ Respond with JSON only, no markdown or explanation outside the JSON.`;
403
+ // ---------------------------------------------------------------------------
404
+ // Spec-driven decomposition (planr spec decompose)
405
+ //
406
+ // Ports the openplanr-pipeline plugin's specification-agent prompt into a
407
+ // planr-CLI execution context (no Claude Code Task tool — direct provider
408
+ // call via ai-service.ts). Output is validated against
409
+ // aiSpecDecomposeResponseSchema. See docs/proposals/spec-driven-mode.md.
410
+ // ---------------------------------------------------------------------------
411
+ export const SPEC_DECOMPOSE_SYSTEM_PROMPT = `${BASE_PERSONA}
412
+ ${SCOPE_DISCIPLINE}
413
+
414
+ ## Your task: spec-driven decomposition for AI agent execution
415
+
416
+ You receive a Detailed Functional Spec (DFS) and decompose it into a tree of
417
+ User Stories and Tasks designed for **AI coding agents to execute directly**
418
+ (not for human estimation or sprint tracking). The contract is richer than
419
+ typical agile tasks:
420
+
421
+ - Every task names **specific files** to Create / Modify / Preserve
422
+ - Every task is classified as Type **UI** or **Tech**
423
+ - Every task is assigned to an **agent** (default subagent names from the
424
+ openplanr-pipeline plugin: \`frontend-agent\` for UI, \`backend-agent\` for Tech)
425
+ - Every task has concrete **objective**, **technicalSpec**, and **testRequirements**
426
+
427
+ ## Hard rules (do not violate)
428
+
429
+ RULE 1 — Task count per User Story:
430
+ IF the spec includes UI mockups (ui_files non-empty in spec frontmatter):
431
+ tasks_per_us = 2 (task-1 = UI, task-2 = Tech)
432
+ ELSE:
433
+ tasks_per_us = 1 (single Tech task)
434
+ NEVER emit more than 2 tasks per User Story.
435
+
436
+ RULE 2 — Story count:
437
+ Decompose into **1-6 User Stories** (hard cap 8).
438
+ Each US must map to one coherent user-facing capability.
439
+ Avoid micro-US (too granular) and mega-US (too broad).
440
+
441
+ RULE 3 — File specificity:
442
+ Every task MUST name specific file paths under \`filesCreate\` / \`filesModify\` / \`filesPreserve\`.
443
+ ❌ "Create a service" — INSUFFICIENT
444
+ ✅ "src/features/{feature}/services/{Feature}Service.ts" — REQUIRED
445
+ Use the codebase context provided to reference REAL files when possible.
446
+ Use the stack/framework conventions visible in the codebase context to
447
+ generate correct paths (e.g., NestJS: \`src/features/{feature}/{feature}.service.ts\`;
448
+ Next.js App Router: \`src/app/{route}/page.tsx\`).
449
+
450
+ RULE 4 — Stack alignment:
451
+ All file paths, naming conventions, and technology references MUST match
452
+ the project's actual stack as inferred from the codebase context. Do NOT
453
+ invent file paths that contradict the existing project layout.
454
+
455
+ RULE 5 — Agent assignment:
456
+ task.type === 'UI' → task.agent = 'frontend-agent'
457
+ task.type === 'Tech' → task.agent = 'backend-agent'
458
+ (Override only if the user's spec explicitly names a different agent.)
459
+
460
+ RULE 6 — Acceptance criteria:
461
+ Every User Story MUST have at least 1 acceptance criterion.
462
+ Use Given/When/Then format when natural; plain assertions otherwise.
463
+
464
+ ## Codebase awareness
465
+
466
+ The user prompt may include a \`Codebase Context\` section showing the
467
+ detected tech stack, folder tree, and related files. Use this to:
468
+ - Pick the right file paths and conventions
469
+ - Reference existing files in \`filesModify\` when extending behavior
470
+ - List existing files in \`filesPreserve\` when the task should NOT touch them
471
+
472
+ ## Stack hints
473
+
474
+ If the user prompt includes a \`Tech Stack\` section (from \`input/tech/stack.md\`),
475
+ prefer those framework/ORM choices over codebase guesses.
476
+
477
+ ## Out-of-scope is sacred
478
+
479
+ If the spec lists "Out of Scope" items, do NOT generate stories or tasks for them.
480
+ The Out of Scope list is the user's explicit boundary.
481
+
482
+ ## Output contract
483
+
484
+ Respond with a valid JSON object matching this shape:
485
+
486
+ {
487
+ "stories": [
488
+ {
489
+ "title": "string (short, action-oriented)",
490
+ "roleAction": "string (\\"As a {role}, I want to {action}\\" — first half of US sentence)",
491
+ "benefit": "string (\\"so that {outcome}\\" — second half)",
492
+ "scope": "string (2-4 sentences: what's IN, what's explicitly OUT for this US)",
493
+ "acceptanceCriteria": ["string", ...],
494
+ "tasks": [
495
+ {
496
+ "title": "string (task title)",
497
+ "type": "UI" | "Tech",
498
+ "agent": "frontend-agent" | "backend-agent" | "<other>",
499
+ "filesCreate": ["src/path/to/new-file.ext", ...],
500
+ "filesModify": ["src/path/to/existing-file.ext", ...],
501
+ "filesPreserve": ["src/path/to/protected-file.ext", ...],
502
+ "objective": "string (one paragraph)",
503
+ "technicalSpec": "string (multi-paragraph, optional)",
504
+ "testRequirements": "string (multi-paragraph, optional)"
505
+ }
506
+ ]
507
+ }
508
+ ],
509
+ "decompositionNotes": "string (optional notes about decomposition decisions, edge cases, ambiguities)"
510
+ }
511
+
402
512
  Respond with JSON only, no markdown or explanation outside the JSON.`;
403
513
  //# sourceMappingURL=system-prompts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"system-prompts.js","sourceRoot":"","sources":["../../../src/ai/prompts/system-prompts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,YAAY,GAAG,4NAA4N,CAAC;AAElP;;;GAGG;AACH,MAAM,gBAAgB,GAAG;;;;;;;;;gPASuN,CAAC;AAEjP,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,YAAY;;;;;;;;;;;;;;;;;;oDAkBG,CAAC;AAErD,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,YAAY;;;;;;;;;;;;;;;;;;EAkBnD,gBAAgB;;;;;;;oDAOkC,CAAC;AAErD,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,YAAY;;;;;;;;;;;;;;;;;;;;;EAqBlD,gBAAgB;;;;;;;oDAOkC,CAAC;AAErD,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwChD,gBAAgB;;;;;;;;oDAQkC,CAAC;AAErD,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgCtD,gBAAgB;;;;;;;;;;;;;;;;oDAgBkC,CAAC;AAErD,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oDAyCD,CAAC;AAErD,MAAM,CAAC,MAAM,gCAAgC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C,MAAM,sBAAsB,GAAG,GAAG,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oDAyCD,CAAC;AAErD,MAAM,CAAC,MAAM,gCAAgC,GAAG,GAAG,YAAY;;;;;;;;;;;;;;;;;;;;;;oDAsBX,CAAC;AAErD,MAAM,CAAC,MAAM,gCAAgC,GAAG,GAAG,YAAY;;;;;;;;;;;;;;;;oDAgBX,CAAC;AAErD,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;oDA2BC,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qEA2EkB,CAAC;AAEtE,8EAA8E;AAC9E,mDAAmD;AACnD,EAAE;AACF,0EAA0E;AAC1E,0EAA0E;AAC1E,uDAAuD;AACvD,yEAAyE;AACzE,8EAA8E;AAE9E,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,YAAY;EACzD,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qEAoGmD,CAAC"}
@@ -265,4 +265,66 @@ export declare const aiReviseDecisionSchema: z.ZodObject<{
265
265
  }, z.core.$strip>>>;
266
266
  }, z.core.$strip>;
267
267
  export type AIReviseDecisionResponse = z.infer<typeof aiReviseDecisionSchema>;
268
+ export declare const aiSpecTaskSchema: z.ZodObject<{
269
+ title: z.ZodString;
270
+ type: z.ZodEnum<{
271
+ UI: "UI";
272
+ Tech: "Tech";
273
+ }>;
274
+ agent: z.ZodString;
275
+ filesCreate: z.ZodDefault<z.ZodArray<z.ZodString>>;
276
+ filesModify: z.ZodDefault<z.ZodArray<z.ZodString>>;
277
+ filesPreserve: z.ZodDefault<z.ZodArray<z.ZodString>>;
278
+ objective: z.ZodString;
279
+ technicalSpec: z.ZodDefault<z.ZodString>;
280
+ testRequirements: z.ZodDefault<z.ZodString>;
281
+ }, z.core.$strip>;
282
+ export type AISpecTask = z.infer<typeof aiSpecTaskSchema>;
283
+ export declare const aiSpecStorySchema: z.ZodObject<{
284
+ title: z.ZodString;
285
+ roleAction: z.ZodString;
286
+ benefit: z.ZodString;
287
+ scope: z.ZodDefault<z.ZodString>;
288
+ acceptanceCriteria: z.ZodArray<z.ZodString>;
289
+ tasks: z.ZodArray<z.ZodObject<{
290
+ title: z.ZodString;
291
+ type: z.ZodEnum<{
292
+ UI: "UI";
293
+ Tech: "Tech";
294
+ }>;
295
+ agent: z.ZodString;
296
+ filesCreate: z.ZodDefault<z.ZodArray<z.ZodString>>;
297
+ filesModify: z.ZodDefault<z.ZodArray<z.ZodString>>;
298
+ filesPreserve: z.ZodDefault<z.ZodArray<z.ZodString>>;
299
+ objective: z.ZodString;
300
+ technicalSpec: z.ZodDefault<z.ZodString>;
301
+ testRequirements: z.ZodDefault<z.ZodString>;
302
+ }, z.core.$strip>>;
303
+ }, z.core.$strip>;
304
+ export type AISpecStory = z.infer<typeof aiSpecStorySchema>;
305
+ export declare const aiSpecDecomposeResponseSchema: z.ZodObject<{
306
+ stories: z.ZodArray<z.ZodObject<{
307
+ title: z.ZodString;
308
+ roleAction: z.ZodString;
309
+ benefit: z.ZodString;
310
+ scope: z.ZodDefault<z.ZodString>;
311
+ acceptanceCriteria: z.ZodArray<z.ZodString>;
312
+ tasks: z.ZodArray<z.ZodObject<{
313
+ title: z.ZodString;
314
+ type: z.ZodEnum<{
315
+ UI: "UI";
316
+ Tech: "Tech";
317
+ }>;
318
+ agent: z.ZodString;
319
+ filesCreate: z.ZodDefault<z.ZodArray<z.ZodString>>;
320
+ filesModify: z.ZodDefault<z.ZodArray<z.ZodString>>;
321
+ filesPreserve: z.ZodDefault<z.ZodArray<z.ZodString>>;
322
+ objective: z.ZodString;
323
+ technicalSpec: z.ZodDefault<z.ZodString>;
324
+ testRequirements: z.ZodDefault<z.ZodString>;
325
+ }, z.core.$strip>>;
326
+ }, z.core.$strip>>;
327
+ decompositionNotes: z.ZodDefault<z.ZodString>;
328
+ }, z.core.$strip>;
329
+ export type AISpecDecomposeResponse = z.infer<typeof aiSpecDecomposeResponseSchema>;
268
330
  //# sourceMappingURL=ai-response-schemas.d.ts.map