openplanr 1.2.7 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -4
- package/dist/agents/task-parser.d.ts.map +1 -1
- package/dist/agents/task-parser.js +8 -34
- package/dist/agents/task-parser.js.map +1 -1
- package/dist/ai/prompts/prompt-builder.d.ts +48 -0
- package/dist/ai/prompts/prompt-builder.d.ts.map +1 -1
- package/dist/ai/prompts/prompt-builder.js +57 -1
- package/dist/ai/prompts/prompt-builder.js.map +1 -1
- package/dist/ai/prompts/system-prompts.d.ts +24 -1
- package/dist/ai/prompts/system-prompts.d.ts.map +1 -1
- package/dist/ai/prompts/system-prompts.js +104 -6
- package/dist/ai/prompts/system-prompts.js.map +1 -1
- package/dist/ai/schemas/ai-response-schemas.d.ts +68 -0
- package/dist/ai/schemas/ai-response-schemas.d.ts.map +1 -1
- package/dist/ai/schemas/ai-response-schemas.js +81 -0
- package/dist/ai/schemas/ai-response-schemas.js.map +1 -1
- package/dist/ai/types.d.ts +2 -0
- package/dist/ai/types.d.ts.map +1 -1
- package/dist/ai/types.js +4 -0
- package/dist/ai/types.js.map +1 -1
- package/dist/cli/commands/backlog.d.ts +12 -0
- package/dist/cli/commands/backlog.d.ts.map +1 -1
- package/dist/cli/commands/backlog.js +88 -2
- package/dist/cli/commands/backlog.js.map +1 -1
- package/dist/cli/commands/config.d.ts.map +1 -1
- package/dist/cli/commands/config.js +8 -2
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/linear.d.ts +8 -0
- package/dist/cli/commands/linear.d.ts.map +1 -0
- package/dist/cli/commands/linear.js +550 -0
- package/dist/cli/commands/linear.js.map +1 -0
- package/dist/cli/commands/quick.d.ts +17 -0
- package/dist/cli/commands/quick.d.ts.map +1 -1
- package/dist/cli/commands/quick.js +31 -15
- package/dist/cli/commands/quick.js.map +1 -1
- package/dist/cli/commands/revise.d.ts +24 -0
- package/dist/cli/commands/revise.d.ts.map +1 -0
- package/dist/cli/commands/revise.js +570 -0
- package/dist/cli/commands/revise.js.map +1 -0
- package/dist/cli/index.js +4 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/models/schema.d.ts +43 -0
- package/dist/models/schema.d.ts.map +1 -1
- package/dist/models/schema.js +49 -0
- package/dist/models/schema.js.map +1 -1
- package/dist/models/types.d.ts +296 -0
- package/dist/models/types.d.ts.map +1 -1
- package/dist/services/artifact-gathering.d.ts +4 -0
- package/dist/services/artifact-gathering.d.ts.map +1 -1
- package/dist/services/artifact-gathering.js +1 -1
- package/dist/services/artifact-gathering.js.map +1 -1
- package/dist/services/artifact-service.d.ts +12 -1
- package/dist/services/artifact-service.d.ts.map +1 -1
- package/dist/services/artifact-service.js +49 -6
- package/dist/services/artifact-service.js.map +1 -1
- package/dist/services/atomic-write-service.d.ts +41 -0
- package/dist/services/atomic-write-service.d.ts.map +1 -0
- package/dist/services/atomic-write-service.js +87 -0
- package/dist/services/atomic-write-service.js.map +1 -0
- package/dist/services/audit-log-service.d.ts +47 -0
- package/dist/services/audit-log-service.d.ts.map +1 -0
- package/dist/services/audit-log-service.js +210 -0
- package/dist/services/audit-log-service.js.map +1 -0
- package/dist/services/cascade-service.d.ts +62 -0
- package/dist/services/cascade-service.d.ts.map +1 -0
- package/dist/services/cascade-service.js +189 -0
- package/dist/services/cascade-service.js.map +1 -0
- package/dist/services/credentials-service.js +2 -2
- package/dist/services/credentials-service.js.map +1 -1
- package/dist/services/diff-service.d.ts +18 -0
- package/dist/services/diff-service.d.ts.map +1 -0
- package/dist/services/diff-service.js +35 -0
- package/dist/services/diff-service.js.map +1 -0
- package/dist/services/evidence-verifier.d.ts +71 -0
- package/dist/services/evidence-verifier.d.ts.map +1 -0
- package/dist/services/evidence-verifier.js +174 -0
- package/dist/services/evidence-verifier.js.map +1 -0
- package/dist/services/git-service.d.ts +60 -0
- package/dist/services/git-service.d.ts.map +1 -0
- package/dist/services/git-service.js +137 -0
- package/dist/services/git-service.js.map +1 -0
- package/dist/services/graph-integrity.d.ts +35 -0
- package/dist/services/graph-integrity.d.ts.map +1 -0
- package/dist/services/graph-integrity.js +53 -0
- package/dist/services/graph-integrity.js.map +1 -0
- package/dist/services/linear/body-formatters.d.ts +69 -0
- package/dist/services/linear/body-formatters.d.ts.map +1 -0
- package/dist/services/linear/body-formatters.js +183 -0
- package/dist/services/linear/body-formatters.js.map +1 -0
- package/dist/services/linear/constants.d.ts +61 -0
- package/dist/services/linear/constants.d.ts.map +1 -0
- package/dist/services/linear/constants.js +84 -0
- package/dist/services/linear/constants.js.map +1 -0
- package/dist/services/linear/errors.d.ts +14 -0
- package/dist/services/linear/errors.d.ts.map +1 -0
- package/dist/services/linear/errors.js +106 -0
- package/dist/services/linear/errors.js.map +1 -0
- package/dist/services/linear/estimate-resolver.d.ts +50 -0
- package/dist/services/linear/estimate-resolver.d.ts.map +1 -0
- package/dist/services/linear/estimate-resolver.js +82 -0
- package/dist/services/linear/estimate-resolver.js.map +1 -0
- package/dist/services/linear/plan-builders.d.ts +64 -0
- package/dist/services/linear/plan-builders.d.ts.map +1 -0
- package/dist/services/linear/plan-builders.js +237 -0
- package/dist/services/linear/plan-builders.js.map +1 -0
- package/dist/services/linear/scope-loaders.d.ts +79 -0
- package/dist/services/linear/scope-loaders.d.ts.map +1 -0
- package/dist/services/linear/scope-loaders.js +227 -0
- package/dist/services/linear/scope-loaders.js.map +1 -0
- package/dist/services/linear/strategy-context.d.ts +66 -0
- package/dist/services/linear/strategy-context.d.ts.map +1 -0
- package/dist/services/linear/strategy-context.js +121 -0
- package/dist/services/linear/strategy-context.js.map +1 -0
- package/dist/services/linear-mapping-service.d.ts +11 -0
- package/dist/services/linear-mapping-service.d.ts.map +1 -0
- package/dist/services/linear-mapping-service.js +220 -0
- package/dist/services/linear-mapping-service.js.map +1 -0
- package/dist/services/linear-pull-service.d.ts +137 -0
- package/dist/services/linear-pull-service.d.ts.map +1 -0
- package/dist/services/linear-pull-service.js +720 -0
- package/dist/services/linear-pull-service.js.map +1 -0
- package/dist/services/linear-push-service.d.ts +86 -0
- package/dist/services/linear-push-service.d.ts.map +1 -0
- package/dist/services/linear-push-service.js +956 -0
- package/dist/services/linear-push-service.js.map +1 -0
- package/dist/services/linear-service.d.ts +122 -0
- package/dist/services/linear-service.d.ts.map +1 -0
- package/dist/services/linear-service.js +361 -0
- package/dist/services/linear-service.js.map +1 -0
- package/dist/services/prompt-service.d.ts +37 -0
- package/dist/services/prompt-service.d.ts.map +1 -1
- package/dist/services/prompt-service.js +111 -0
- package/dist/services/prompt-service.js.map +1 -1
- package/dist/services/revise-apply-service.d.ts +55 -0
- package/dist/services/revise-apply-service.d.ts.map +1 -0
- package/dist/services/revise-apply-service.js +255 -0
- package/dist/services/revise-apply-service.js.map +1 -0
- package/dist/services/revise-cache-service.d.ts +46 -0
- package/dist/services/revise-cache-service.d.ts.map +1 -0
- package/dist/services/revise-cache-service.js +88 -0
- package/dist/services/revise-cache-service.js.map +1 -0
- package/dist/services/revise-plan-service.d.ts +38 -0
- package/dist/services/revise-plan-service.d.ts.map +1 -0
- package/dist/services/revise-plan-service.js +151 -0
- package/dist/services/revise-plan-service.js.map +1 -0
- package/dist/services/revise-service.d.ts +115 -0
- package/dist/services/revise-service.d.ts.map +1 -0
- package/dist/services/revise-service.js +294 -0
- package/dist/services/revise-service.js.map +1 -0
- package/dist/services/template-sections.d.ts +28 -0
- package/dist/services/template-sections.d.ts.map +1 -0
- package/dist/services/template-sections.js +55 -0
- package/dist/services/template-sections.js.map +1 -0
- package/dist/templates/backlog/backlog-item.md.hbs +3 -0
- package/dist/templates/quick/quick-task.md.hbs +6 -0
- package/dist/utils/diff.d.ts +47 -0
- package/dist/utils/diff.d.ts.map +1 -0
- package/dist/utils/diff.js +278 -0
- package/dist/utils/diff.js.map +1 -0
- package/dist/utils/markdown.d.ts +23 -0
- package/dist/utils/markdown.d.ts.map +1 -1
- package/dist/utils/markdown.js +79 -0
- package/dist/utils/markdown.js.map +1 -1
- 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. **
|
|
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
|
|
|
@@ -149,15 +150,51 @@ planr rules generate --dry-run # preview
|
|
|
149
150
|
| ---------------------- | --------------------------------------------------------- |
|
|
150
151
|
| `planr plan` | Full automated flow: Epic -> Features -> Stories -> Tasks |
|
|
151
152
|
| `planr estimate <ID>` | AI effort estimation (story points, hours, complexity) |
|
|
152
|
-
| `planr refine <ID>` | AI-powered review and improvements
|
|
153
|
+
| `planr refine <ID>` | AI-powered review and improvements (prose polish) |
|
|
154
|
+
| `planr revise <ID>` | AI-driven *alignment* of planning artifacts with codebase |
|
|
153
155
|
| `planr search <query>` | Full-text search across all artifacts |
|
|
154
156
|
| `planr sync` | Validate and fix cross-references |
|
|
155
157
|
| `planr status` | Planning progress with tree view and metrics |
|
|
156
158
|
|
|
157
|
-
|
|
159
|
+
#### `planr revise` — align planning with reality
|
|
160
|
+
|
|
161
|
+
`refine` improves prose; `revise` actively rewrites planning artifacts so they match the codebase, sibling artifacts, and declared sources. Four-layer safety pipeline:
|
|
162
|
+
|
|
163
|
+
1. **Clean-tree gate** — git working tree must be clean (override with `--allow-dirty`)
|
|
164
|
+
2. **Agent decision** — zod-validated `revise` / `skip` / `flag` per artifact
|
|
165
|
+
3. **Evidence verification** — agent must cite typed, verifiable evidence (file existence, grep matches, sibling artifacts…); unverifiable citations are dropped, and a `revise` that loses all support is demoted to `flag`
|
|
166
|
+
4. **Diff preview + confirmation** — per-artifact `[a]pply / [s]kip / [e]dit / [d]iff / [q]uit`; writes are atomic with sidecar backups; full audit log emitted on every run (dry-run included)
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
# Single artifact, interactive
|
|
170
|
+
planr revise TASK-007
|
|
171
|
+
|
|
172
|
+
# Cascade top-down (epic → features → stories → tasks)
|
|
173
|
+
planr revise EPIC-003 --cascade
|
|
174
|
+
|
|
175
|
+
# Revise everything in the project (content-hash cache skips unchanged artifacts)
|
|
176
|
+
planr revise --all --dry-run # preview every revision
|
|
177
|
+
planr revise --all --yes # type YES once; then non-interactive apply
|
|
178
|
+
|
|
179
|
+
# CI mode — dry-run + JSON audit + non-zero exit on flagged findings
|
|
180
|
+
planr revise EPIC-003 --cascade --dry-run --audit-format json --audit ./revise.json
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
After a successful apply, revise prints a suggested commit:
|
|
184
|
+
|
|
185
|
+
```
|
|
186
|
+
git commit -am "chore(plan): revise EPIC-003 against codebase"
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
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).
|
|
190
|
+
|
|
191
|
+
### GitHub, Linear & export
|
|
158
192
|
|
|
159
193
|
| Command | Description |
|
|
160
194
|
| ---------------------------- | ------------------------------------------------ |
|
|
195
|
+
| `planr linear init` | Save Linear team + token (PAT) for API access |
|
|
196
|
+
| `planr linear sync` | Pull Linear workflow state into Feature/Story `status` (one-way) |
|
|
197
|
+
| `planr linear push <epicId>` | Epic → Linear project, features → issues, stories and task lists → sub-issues |
|
|
161
198
|
| `planr github push [ID]` | Push artifacts to GitHub Issues |
|
|
162
199
|
| `planr github sync` | Bi-directional status sync with GitHub |
|
|
163
200
|
| `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":"
|
|
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
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
|
1
|
+
{"version":3,"file":"task-parser.js","sourceRoot":"","sources":["../../src/agents/task-parser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAoB9D;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAe;IAC/C,OAAO,sBAAsB,CAAC,OAAO,CAAC,CAAC,GAAG,CACxC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAiB,EAAE,CAAC,CAAC;QACxD,EAAE;QACF,KAAK;QACL,IAAI;QACJ,QAAQ;QACR,KAAK;KACN,CAAC,CACH,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAC,KAAsB,EAAE,KAAa;IAChE,qBAAqB;IACrB,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,KAAK,CAAC,CAAC;IACvD,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1B,8CAA8C;QAC9C,MAAM,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,OAAO,EAAE,CAAC;YACZ,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YACrC,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,QAAQ,GAAG,CAAC,CAAC,CAAC;QAC9D,CAAC;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,uBAAuB;IACvB,MAAM,UAAU,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;IACvC,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;AACzE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,KAAsB;IACnD,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,KAAK,GAAG,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"}
|
|
@@ -69,4 +69,52 @@ export declare function buildRefinePrompt(artifactContent: string, artifactType:
|
|
|
69
69
|
type: string;
|
|
70
70
|
content: string;
|
|
71
71
|
}): AIMessage[];
|
|
72
|
+
/** Writable scope passed to `buildRevisePrompt`; governs what the agent may modify. */
|
|
73
|
+
export type ReviseWritableScope = 'prose' | 'references' | 'paths' | 'all';
|
|
74
|
+
/** A saved artifact (target, parent, or sibling) passed to `buildRevisePrompt`. */
|
|
75
|
+
export interface RevisePromptArtifact {
|
|
76
|
+
id: string;
|
|
77
|
+
type: string;
|
|
78
|
+
content: string;
|
|
79
|
+
}
|
|
80
|
+
/** One declared source-of-truth document injected into the revise prompt. */
|
|
81
|
+
export interface RevisePromptSource {
|
|
82
|
+
label: string;
|
|
83
|
+
content: string;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Full context pack for a single revise agent call.
|
|
87
|
+
*
|
|
88
|
+
* The builder stays synchronous — the caller (revise-service) is responsible
|
|
89
|
+
* for reading the target artifact, its parent chain, its siblings, and any
|
|
90
|
+
* codebase / source context before invoking this function. This keeps prompt
|
|
91
|
+
* composition a pure function that is easy to test.
|
|
92
|
+
*/
|
|
93
|
+
export interface RevisePromptContext {
|
|
94
|
+
artifact: RevisePromptArtifact;
|
|
95
|
+
parents: RevisePromptArtifact[];
|
|
96
|
+
siblings: RevisePromptArtifact[];
|
|
97
|
+
/** Pre-rendered string from `formatCodebaseContext`; omit in fast mode. */
|
|
98
|
+
codebaseContextFormatted?: string;
|
|
99
|
+
sources: RevisePromptSource[];
|
|
100
|
+
writableScope: ReviseWritableScope;
|
|
101
|
+
/**
|
|
102
|
+
* Canonical `## Section` names for this artifact type (from the matching
|
|
103
|
+
* Handlebars template). When provided, the prompt emits a
|
|
104
|
+
* `[TEMPLATE_STRUCTURE]` section telling the agent to stay within this
|
|
105
|
+
* section set — preventing additive drift like adding a task-level
|
|
106
|
+
* `## Relevant Files` section to an epic. Omit to skip the hint.
|
|
107
|
+
*/
|
|
108
|
+
canonicalSections?: readonly string[];
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Build the message array for a `planr revise` agent call.
|
|
112
|
+
*
|
|
113
|
+
* Emits labeled sections exactly as `REVISE_SYSTEM_PROMPT` expects:
|
|
114
|
+
* `[TARGET_ARTIFACT]`, `[PARENT_CHAIN]`, `[SIBLINGS]`, `[CODEBASE_CONTEXT]`,
|
|
115
|
+
* `[DECLARED_SOURCES]`, `[WRITABLE_SCOPE]`. Missing sections render as
|
|
116
|
+
* explicit "(none)" / "(not loaded)" markers rather than being dropped, so
|
|
117
|
+
* the agent can distinguish "checked and empty" from "not provided."
|
|
118
|
+
*/
|
|
119
|
+
export declare function buildRevisePrompt(ctx: RevisePromptContext): AIMessage[];
|
|
72
120
|
//# 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;
|
|
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,EAA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@@ -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, 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, 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
|
/**
|
|
@@ -205,4 +205,60 @@ export function buildRefinePrompt(artifactContent, artifactType, parentContext)
|
|
|
205
205
|
{ role: 'user', content: userContent },
|
|
206
206
|
];
|
|
207
207
|
}
|
|
208
|
+
/**
|
|
209
|
+
* Build the message array for a `planr revise` agent call.
|
|
210
|
+
*
|
|
211
|
+
* Emits labeled sections exactly as `REVISE_SYSTEM_PROMPT` expects:
|
|
212
|
+
* `[TARGET_ARTIFACT]`, `[PARENT_CHAIN]`, `[SIBLINGS]`, `[CODEBASE_CONTEXT]`,
|
|
213
|
+
* `[DECLARED_SOURCES]`, `[WRITABLE_SCOPE]`. Missing sections render as
|
|
214
|
+
* explicit "(none)" / "(not loaded)" markers rather than being dropped, so
|
|
215
|
+
* the agent can distinguish "checked and empty" from "not provided."
|
|
216
|
+
*/
|
|
217
|
+
export function buildRevisePrompt(ctx) {
|
|
218
|
+
const sections = [];
|
|
219
|
+
sections.push(`[TARGET_ARTIFACT] (type=${ctx.artifact.type}, id=${ctx.artifact.id})\n${ctx.artifact.content}`);
|
|
220
|
+
if (ctx.parents.length > 0) {
|
|
221
|
+
const parentBlock = ctx.parents
|
|
222
|
+
.map((p) => `--- ${p.type} ${p.id} ---\n${p.content}`)
|
|
223
|
+
.join('\n\n');
|
|
224
|
+
sections.push(`[PARENT_CHAIN]\n${parentBlock}`);
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
sections.push(`[PARENT_CHAIN]\n(none — this is a top-level artifact)`);
|
|
228
|
+
}
|
|
229
|
+
if (ctx.siblings.length > 0) {
|
|
230
|
+
const siblingBlock = ctx.siblings
|
|
231
|
+
.map((s) => `--- ${s.type} ${s.id} ---\n${s.content}`)
|
|
232
|
+
.join('\n\n');
|
|
233
|
+
sections.push(`[SIBLINGS]\n${siblingBlock}`);
|
|
234
|
+
}
|
|
235
|
+
else {
|
|
236
|
+
sections.push(`[SIBLINGS]\n(none)`);
|
|
237
|
+
}
|
|
238
|
+
if (ctx.codebaseContextFormatted) {
|
|
239
|
+
sections.push(`[CODEBASE_CONTEXT]\n${ctx.codebaseContextFormatted}`);
|
|
240
|
+
}
|
|
241
|
+
else {
|
|
242
|
+
sections.push(`[CODEBASE_CONTEXT]\n(not loaded — fast mode or --no-code-context)`);
|
|
243
|
+
}
|
|
244
|
+
if (ctx.sources.length > 0) {
|
|
245
|
+
const sourceBlock = ctx.sources.map((s) => `--- ${s.label} ---\n${s.content}`).join('\n\n');
|
|
246
|
+
sections.push(`[DECLARED_SOURCES]\n${sourceBlock}`);
|
|
247
|
+
}
|
|
248
|
+
else {
|
|
249
|
+
sections.push(`[DECLARED_SOURCES]\n(no sources declared in .planr/revise.yaml, or no files matched the configured globs)`);
|
|
250
|
+
}
|
|
251
|
+
if (ctx.canonicalSections && ctx.canonicalSections.length > 0) {
|
|
252
|
+
const list = ctx.canonicalSections.map((s) => ` ## ${s}`).join('\n');
|
|
253
|
+
sections.push(`[TEMPLATE_STRUCTURE]\nCanonical sections for this artifact type (from the project template):\n${list}\n\nDo NOT add sections outside this list. If drift motivates a new section, emit 'flag' with an ambiguous entry instead of 'revise'. You MAY rewrite the content of existing sections and you MAY keep sections already present in the TARGET_ARTIFACT even if they fall outside this list (they are a user-maintained custom section, not drift for you to remove).`);
|
|
254
|
+
}
|
|
255
|
+
else {
|
|
256
|
+
sections.push(`[TEMPLATE_STRUCTURE]\n(no canonical section list enforced for this artifact type — preserve the TARGET_ARTIFACT's existing section structure unless drift clearly motivates a change)`);
|
|
257
|
+
}
|
|
258
|
+
sections.push(`[WRITABLE_SCOPE]\n${ctx.writableScope}`);
|
|
259
|
+
return [
|
|
260
|
+
{ role: 'system', content: REVISE_SYSTEM_PROMPT },
|
|
261
|
+
{ role: 'user', content: sections.join('\n\n') },
|
|
262
|
+
];
|
|
263
|
+
}
|
|
208
264
|
//# sourceMappingURL=prompt-builder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-builder.js","sourceRoot":"","sources":["../../../src/ai/prompts/prompt-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EACL,gCAAgC,EAChC,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,yBAAyB,EACzB,oBAAoB,EACpB,gCAAgC,EAChC,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAE7B,2FAA2F;AAC3F,MAAM,6BAA6B,GAAG,CAAC,CAAC;AAExC;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,OAAO,CAAC;AAEvC;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,KAAa;IACzC,IAAI,cAAc,GAAG,KAAK,CAAC;IAE3B,iCAAiC;IACjC,IAAI,cAAc,CAAC,MAAM,GAAG,eAAe,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,2GAA2G,CAC5G,CAAC;IACJ,CAAC;IAED,IAAI,GAAG,CAAC,iBAAiB,IAAI,GAAG,CAAC,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC9D,MAAM,IAAI,GAAG,GAAG,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtE,QAAQ,CAAC,IAAI,CACX,iGAAiG,IAAI,uWAAuW,CAC7c,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,QAAQ,CAAC,IAAI,CACX,uLAAuL,CACxL,CAAC;IACJ,CAAC;IAED,QAAQ,CAAC,IAAI,CAAC,qBAAqB,GAAG,CAAC,aAAa,EAAE,CAAC,CAAC;IAExD,OAAO;QACL,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,oBAAoB,EAAE;QACjD,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;KACjD,CAAC;AACJ,CAAC"}
|
|
@@ -7,11 +7,34 @@
|
|
|
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
|
|
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.";
|
|
14
14
|
export declare const BACKLOG_PRIORITIZE_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 prioritize a list of backlog items based on their estimated business impact and implementation effort.\n\nYou MUST respond with a valid JSON object containing:\n- \"items\": An array of objects (one per backlog item), sorted from highest to lowest priority, each with:\n - \"id\": The backlog item ID (e.g., \"BL-001\")\n - \"priority\": Recommended priority \u2014 \"critical\", \"high\", \"medium\", or \"low\"\n - \"impactScore\": Business impact score from 1 (minimal) to 10 (transformative)\n - \"effortScore\": Implementation effort score from 1 (trivial) to 10 (massive)\n - \"reasoning\": One sentence explaining the priority decision\n- \"summary\": A 2-3 sentence summary of the overall prioritization rationale\n\nPrioritization factors (in order of importance):\n1. Business value and user impact\n2. Risk reduction and unblocking potential\n3. Implementation effort (prefer high-impact, low-effort items)\n4. Dependencies and sequencing\n5. Technical debt and maintenance cost\n\nWhen codebase context is provided, factor in technical complexity and affected surface area.\n\nRespond with JSON only, no markdown or explanation.";
|
|
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
|
+
/**
|
|
18
|
+
* System prompt for `planr revise` — the agentic revision command.
|
|
19
|
+
*
|
|
20
|
+
* Unlike REFINE_SYSTEM_PROMPT (which improves prose quality of one artifact
|
|
21
|
+
* in isolation and is forbidden from touching cross-references), the revise
|
|
22
|
+
* prompt actively aligns an artifact with reality: codebase, parent chain,
|
|
23
|
+
* immediate siblings, and declared sources of truth. Cross-references MAY
|
|
24
|
+
* be modified when evidence shows they have drifted.
|
|
25
|
+
*
|
|
26
|
+
* The prompt enforces:
|
|
27
|
+
* 1. A three-way decision: revise / skip / flag (matches aiReviseDecisionSchema)
|
|
28
|
+
* 2. The facts-vs-intent rule: code wins on structural facts, plan wins on intent,
|
|
29
|
+
* intent conflicts are flagged as ambiguous (never silently rewritten)
|
|
30
|
+
* 3. Typed evidence taxonomy: every citation must use one of six verifiable
|
|
31
|
+
* kinds (file_exists, file_absent, grep_match, sibling_artifact,
|
|
32
|
+
* source_quote, pattern_rule) — the post-flight verifier drops any change
|
|
33
|
+
* whose evidence cannot be confirmed against the provided context
|
|
34
|
+
* 4. A writable-scope gate: the caller tells the agent which parts of the
|
|
35
|
+
* artifact may be rewritten (prose / references / paths / all)
|
|
36
|
+
*
|
|
37
|
+
* Output conforms to aiReviseDecisionSchema, not free-form prose.
|
|
38
|
+
*/
|
|
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.";
|
|
17
40
|
//# 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,
|
|
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"}
|
|
@@ -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
|
|
76
|
-
- "goal":
|
|
77
|
-
- "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
|
|
82
|
-
- "when": When
|
|
83
|
-
- "then":
|
|
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)
|
|
@@ -302,4 +302,102 @@ title: "My Epic"
|
|
|
302
302
|
...then "improvedMarkdown" must also start with --- frontmatter and contain markdown content. Keep the same structure, sections, and cross-reference links as the original.
|
|
303
303
|
|
|
304
304
|
Respond with JSON only, no markdown or explanation.`;
|
|
305
|
+
/**
|
|
306
|
+
* System prompt for `planr revise` — the agentic revision command.
|
|
307
|
+
*
|
|
308
|
+
* Unlike REFINE_SYSTEM_PROMPT (which improves prose quality of one artifact
|
|
309
|
+
* in isolation and is forbidden from touching cross-references), the revise
|
|
310
|
+
* prompt actively aligns an artifact with reality: codebase, parent chain,
|
|
311
|
+
* immediate siblings, and declared sources of truth. Cross-references MAY
|
|
312
|
+
* be modified when evidence shows they have drifted.
|
|
313
|
+
*
|
|
314
|
+
* The prompt enforces:
|
|
315
|
+
* 1. A three-way decision: revise / skip / flag (matches aiReviseDecisionSchema)
|
|
316
|
+
* 2. The facts-vs-intent rule: code wins on structural facts, plan wins on intent,
|
|
317
|
+
* intent conflicts are flagged as ambiguous (never silently rewritten)
|
|
318
|
+
* 3. Typed evidence taxonomy: every citation must use one of six verifiable
|
|
319
|
+
* kinds (file_exists, file_absent, grep_match, sibling_artifact,
|
|
320
|
+
* source_quote, pattern_rule) — the post-flight verifier drops any change
|
|
321
|
+
* whose evidence cannot be confirmed against the provided context
|
|
322
|
+
* 4. A writable-scope gate: the caller tells the agent which parts of the
|
|
323
|
+
* artifact may be rewritten (prose / references / paths / all)
|
|
324
|
+
*
|
|
325
|
+
* Output conforms to aiReviseDecisionSchema, not free-form prose.
|
|
326
|
+
*/
|
|
327
|
+
export const REVISE_SYSTEM_PROMPT = `${BASE_PERSONA}
|
|
328
|
+
|
|
329
|
+
Your 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 — and you rewrite the artifact to eliminate that drift.
|
|
330
|
+
|
|
331
|
+
## Inputs you will receive (labeled sections)
|
|
332
|
+
|
|
333
|
+
- [TARGET_ARTIFACT] — the artifact to revise, full markdown with frontmatter
|
|
334
|
+
- [PARENT_CHAIN] — parent artifacts (epic → feature → story), top-down
|
|
335
|
+
- [SIBLINGS] — other artifacts at the same hierarchy level within the scope
|
|
336
|
+
- [CODEBASE_CONTEXT] — tech stack, folder tree, architecture files, and keyword-matched source snippets
|
|
337
|
+
- [DECLARED_SOURCES] — PRDs, design references, ADRs, and rule files configured in .planr/revise.yaml
|
|
338
|
+
- [TEMPLATE_STRUCTURE] — canonical ## section names for the target artifact type (from the project template)
|
|
339
|
+
- [WRITABLE_SCOPE] — which parts of the target you may modify: "prose" | "references" | "paths" | "all"
|
|
340
|
+
|
|
341
|
+
## Your decision (return exactly one)
|
|
342
|
+
|
|
343
|
+
- "revise" — 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.
|
|
344
|
+
- "skip" — no drift detected, the artifact already matches reality. MUST have no "revisedMarkdown" and no "ambiguous" entries.
|
|
345
|
+
- "flag" — you detected drift but cannot resolve it without a human decision (intent conflict, contradictory sources). REQUIRES at least one "ambiguous" entry describing the conflict.
|
|
346
|
+
|
|
347
|
+
## CRITICAL RULE: Facts vs. intent
|
|
348
|
+
|
|
349
|
+
- **Facts win from code.** Paths, file existence, stack names, actual symbol names, implemented behavior, concrete cross-references → rewrite these to match the codebase and siblings without hesitation.
|
|
350
|
+
- **Intent stays from the plan.** What the feature is *supposed to do*, the user value, the product decision, the @v1 / @v2 split → 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".
|
|
351
|
+
|
|
352
|
+
## CRITICAL RULE: Template structure conformance
|
|
353
|
+
|
|
354
|
+
- **Do NOT add sections outside the [TEMPLATE_STRUCTURE] list.** Epics, features, stories, and tasks each have a canonical section set — 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.
|
|
355
|
+
- **Sections already present in the TARGET_ARTIFACT that fall outside the list are user-maintained customs** — preserve them byte-for-byte unless the user's evidence explicitly asks you to remove them.
|
|
356
|
+
- 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.
|
|
357
|
+
- When [TEMPLATE_STRUCTURE] is absent, preserve the TARGET_ARTIFACT's existing section structure and only rewrite within it.
|
|
358
|
+
|
|
359
|
+
## Evidence taxonomy (every citation MUST use one of these types)
|
|
360
|
+
|
|
361
|
+
- "file_exists" — ref is a relative file path that appears in CODEBASE_CONTEXT
|
|
362
|
+
- "file_absent" — ref is a relative file path NOT in CODEBASE_CONTEXT (and not mentioned in folder tree / source inventory)
|
|
363
|
+
- "grep_match" — ref is a symbol / literal found in CODEBASE_CONTEXT; supply the matching line as "quote"
|
|
364
|
+
- "sibling_artifact" — ref is another artifact id from SIBLINGS or PARENT_CHAIN; supply the quoted excerpt as "quote"
|
|
365
|
+
- "source_quote" — ref is a DECLARED_SOURCES path or URL; supply the quoted excerpt as "quote"
|
|
366
|
+
- "pattern_rule" — ref is a pattern rule id from CODEBASE_CONTEXT's architectural patterns
|
|
367
|
+
|
|
368
|
+
## Hallucination guardrails (load-bearing)
|
|
369
|
+
|
|
370
|
+
- NEVER cite a file path, symbol, artifact id, or quote unless it appears verbatim in one of the provided sections.
|
|
371
|
+
- The post-flight verifier will drop any change whose evidence cannot be confirmed against the actual repo. Inventing evidence wastes the run.
|
|
372
|
+
- When unsure whether a change is supported, prefer "flag" with an "ambiguous" entry over "revise" with weak evidence.
|
|
373
|
+
|
|
374
|
+
## Writable scope
|
|
375
|
+
|
|
376
|
+
- "prose" — you may rewrite descriptions, requirements, risks, success criteria, notes. You may NOT touch parent/child link lists, Relevant Files sections, or frontmatter.
|
|
377
|
+
- "references" — 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.
|
|
378
|
+
- "paths" — adds permission to rewrite Relevant Files sections in task artifacts when cited paths do not exist or real paths are missing.
|
|
379
|
+
- "all" — everything above, plus frontmatter fields that are non-identity (updatedAt, owner). Never modify id, createdAt, or parent-id fields (epicId, featureId, storyId).
|
|
380
|
+
|
|
381
|
+
If WRITABLE_SCOPE excludes a category, do NOT emit revisions that touch it — flag instead.
|
|
382
|
+
|
|
383
|
+
## Output contract
|
|
384
|
+
|
|
385
|
+
You MUST respond with a valid JSON object matching this shape exactly:
|
|
386
|
+
|
|
387
|
+
{
|
|
388
|
+
"artifactId": "<the id from TARGET_ARTIFACT frontmatter>",
|
|
389
|
+
"action": "revise" | "skip" | "flag",
|
|
390
|
+
"revisedMarkdown": "<full artifact markdown, with --- frontmatter, when action === 'revise'; omit otherwise>",
|
|
391
|
+
"rationale": "<one paragraph: what drift, why you made this call>",
|
|
392
|
+
"evidence": [{ "type": "<one of six>", "ref": "<path|id|rule-id>", "quote": "<optional verbatim snippet>" }],
|
|
393
|
+
"ambiguous": [{ "section": "<section name>", "reason": "<why human decision needed>" }]
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
Rules for revisedMarkdown:
|
|
397
|
+
- It MUST be a plain markdown string, NOT a JSON object or fenced code block.
|
|
398
|
+
- It MUST preserve YAML frontmatter between --- delimiters.
|
|
399
|
+
- It MUST preserve id, createdAt, and parent-id frontmatter fields (epicId/featureId/storyId) byte-for-byte.
|
|
400
|
+
- The structure (## sections) MAY change only within WRITABLE_SCOPE.
|
|
401
|
+
|
|
402
|
+
Respond with JSON only, no markdown or explanation outside the JSON.`;
|
|
305
403
|
//# 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,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"}
|
|
1
|
+
{"version":3,"file":"system-prompts.js","sourceRoot":"","sources":["../../../src/ai/prompts/system-prompts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAE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