openplanr 1.4.3 → 1.5.1
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 +256 -250
- package/dist/ai/prompts/prompt-builder.d.ts +1 -1
- package/dist/ai/prompts/prompt-builder.js +1 -1
- package/dist/ai/prompts/system-prompts.d.ts +1 -1
- package/dist/ai/prompts/system-prompts.d.ts.map +1 -1
- package/dist/ai/prompts/system-prompts.js +2 -2
- package/dist/ai/prompts/system-prompts.js.map +1 -1
- package/dist/ai/schemas/ai-response-schemas.js +4 -4
- package/dist/ai/schemas/ai-response-schemas.js.map +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +14 -1
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/rules.d.ts.map +1 -1
- package/dist/cli/commands/rules.js +43 -2
- package/dist/cli/commands/rules.js.map +1 -1
- package/dist/cli/commands/spec.d.ts +1 -1
- package/dist/cli/commands/spec.js +9 -9
- package/dist/cli/commands/spec.js.map +1 -1
- package/dist/generators/base-generator.d.ts +15 -1
- package/dist/generators/base-generator.d.ts.map +1 -1
- package/dist/generators/base-generator.js +21 -0
- package/dist/generators/base-generator.js.map +1 -1
- package/dist/generators/claude-generator.d.ts.map +1 -1
- package/dist/generators/claude-generator.js +25 -8
- package/dist/generators/claude-generator.js.map +1 -1
- package/dist/generators/codex-generator.d.ts.map +1 -1
- package/dist/generators/codex-generator.js +17 -2
- package/dist/generators/codex-generator.js.map +1 -1
- package/dist/generators/cursor-generator.d.ts +4 -0
- package/dist/generators/cursor-generator.d.ts.map +1 -1
- package/dist/generators/cursor-generator.js +67 -8
- package/dist/generators/cursor-generator.js.map +1 -1
- package/dist/models/types.d.ts +12 -1
- package/dist/models/types.d.ts.map +1 -1
- package/dist/services/spec-service.d.ts +5 -5
- package/dist/services/spec-service.js +7 -7
- package/dist/services/spec-service.js.map +1 -1
- package/dist/templates/rules/claude/CLAUDE.md.hbs +14 -0
- package/dist/templates/rules/claude/planr-pipeline.md.hbs +68 -0
- package/dist/templates/rules/codex/_pipeline-section.md.hbs +150 -0
- package/dist/templates/rules/cursor/agents/backend-agent.md +299 -0
- package/dist/templates/rules/cursor/agents/db-agent.md +163 -0
- package/dist/templates/rules/cursor/agents/designer-agent.md +219 -0
- package/dist/templates/rules/cursor/agents/devops-agent.md +197 -0
- package/dist/templates/rules/cursor/agents/doc-gen-agent.md +203 -0
- package/dist/templates/rules/cursor/agents/frontend-agent.md +220 -0
- package/dist/templates/rules/cursor/agents/qa-agent.md +170 -0
- package/dist/templates/rules/cursor/agents/specification-agent.md +282 -0
- package/dist/templates/rules/cursor/planr-pipeline-plan.mdc.hbs +194 -0
- package/dist/templates/rules/cursor/planr-pipeline-ship.mdc.hbs +242 -0
- package/dist/templates/rules/cursor/planr-pipeline.mdc.hbs +134 -0
- package/dist/templates/spec/spec-shaped.md.hbs +1 -1
- package/dist/templates/spec/spec.md.hbs +3 -3
- package/dist/templates/spec/task.md.hbs +1 -1
- package/dist/utils/constants.d.ts +24 -3
- package/dist/utils/constants.d.ts.map +1 -1
- package/dist/utils/constants.js +24 -3
- package/dist/utils/constants.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,287 +1,292 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
[](https://github.com/openplanr/OpenPlanr/blob/main/LICENSE)
|
|
5
|
-
[](https://nodejs.org)
|
|
3
|
+
# OpenPlanr
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
### The planning layer for AI coding agents
|
|
8
6
|
|
|
9
|
-
**
|
|
7
|
+
**Plan once. Ship with agents.** Works natively on **Claude Code**, **Cursor**, and **Codex** via the runtime-agnostic [OpenPlanr Protocol v1.0.0](https://github.com/openplanr/planr-pipeline/tree/main/docs/protocol).
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
[](https://www.npmjs.com/package/openplanr)
|
|
10
|
+
[](https://nodejs.org)
|
|
11
|
+
[](https://github.com/openplanr/OpenPlanr/blob/main/LICENSE)
|
|
12
|
+
[](https://github.com/openplanr/planr-pipeline/tree/main/docs/protocol)
|
|
13
|
+
[](https://github.com/openplanr/planr-pipeline/blob/main/docs/compatibility-matrix.md)
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
**[Website](https://openplanr.dev)** · **[Pipeline plugin](https://github.com/openplanr/planr-pipeline)** · **[Compatibility matrix](https://github.com/openplanr/planr-pipeline/blob/main/docs/compatibility-matrix.md)** · **[Protocol spec](https://github.com/openplanr/planr-pipeline/tree/main/docs/protocol)** · **[CLI reference](docs/CLI.md)**
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
</div>
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
1. **Capturing ideas instantly** — `planr backlog add` captures work items without breaking your flow
|
|
20
|
-
2. **Structuring your planning** — epics, features, stories, and tasks in markdown
|
|
21
|
-
3. **Sprint planning** — time-boxed iterations with velocity tracking and AI task selection
|
|
22
|
-
4. **Reusable patterns** — task templates for common workflows (REST endpoints, React components, etc.)
|
|
23
|
-
5. **AI-powered estimation** — story points, effort hours, and complexity analysis
|
|
24
|
-
6. **Generating AI rules** — rule files that give your AI assistant context about the plan
|
|
25
|
-
7. **GitHub integration** — push artifacts to issues, bi-directional sync, export reports
|
|
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
|
|
19
|
+
---
|
|
28
20
|
|
|
29
|
-
|
|
21
|
+
`planr` is a Node CLI that authors structured plans (epics, features, stories, tasks, or full specs) as markdown in your repo, then generates runtime-native rule files so your AI coding agent picks up the plan automatically. One command to install, one command to initialise — your runtime activates the workflow without further setup.
|
|
30
22
|
|
|
31
23
|
```bash
|
|
32
|
-
# Install globally
|
|
33
24
|
npm install -g openplanr
|
|
34
|
-
|
|
35
|
-
# Initialize in your project
|
|
36
25
|
cd my-project
|
|
37
26
|
planr init
|
|
27
|
+
# ✓ Created .planr/config.json
|
|
28
|
+
# ✓ Generated 17 AI agent rule file(s) (scope: all)
|
|
29
|
+
# ✓ Open Cursor / Codex / Claude Code — pipeline workflow is live
|
|
30
|
+
```
|
|
38
31
|
|
|
39
|
-
|
|
40
|
-
planr backlog add "add user profiles" --priority high --tag feature
|
|
32
|
+
That's the whole onboarding.
|
|
41
33
|
|
|
42
|
-
|
|
43
|
-
planr epic create
|
|
44
|
-
planr feature create --epic EPIC-001
|
|
45
|
-
planr story create --feature FEAT-001
|
|
46
|
-
planr task create --feature FEAT-001
|
|
34
|
+
---
|
|
47
35
|
|
|
48
|
-
|
|
49
|
-
planr template use rest-endpoint --title "User Profile API"
|
|
36
|
+
## Why OpenPlanr?
|
|
50
37
|
|
|
51
|
-
|
|
52
|
-
planr sprint create --name "Sprint 1" --duration 2w
|
|
53
|
-
planr sprint add TASK-001 QT-001
|
|
38
|
+
AI coding agents are powerful but lack structured planning context. Without a clear plan, they generate code that drifts from requirements, churn on the same problem across sessions, and can't be audited. OpenPlanr fixes this with four properties:
|
|
54
39
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
40
|
+
1. **Markdown artifacts in your repo** — plans live next to your code, version-controlled, gittable, gradable. No external SaaS, no DB.
|
|
41
|
+
2. **One contract, every runtime** — author once; Claude Code, Cursor, and Codex all consume the same artifacts via [OpenPlanr Protocol v1.0.0](https://github.com/openplanr/planr-pipeline/tree/main/docs/protocol).
|
|
42
|
+
3. **Three planning postures** — pick the ceremony level that matches the work: agile (epic → feature → story → task), quick task (one-off chores), or spec-driven (handoff to an AI factory).
|
|
43
|
+
4. **Hard rules at the tool layer** — when paired with the [planr-pipeline](https://github.com/openplanr/planr-pipeline) Claude Code plugin, agent tool restrictions are enforced in the manifest, not just the prompt. Production-grade audit trail via the `.pipeline-shipped` execution marker.
|
|
58
44
|
|
|
59
|
-
|
|
45
|
+
---
|
|
60
46
|
|
|
61
|
-
|
|
62
|
-
Backlog → Agile Hierarchy → Sprint → Implementation
|
|
47
|
+
## Three planning postures
|
|
63
48
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
49
|
+
| Posture | Best for | Output |
|
|
50
|
+
|---|---|---|
|
|
51
|
+
| **Agile** | Real teams, sprints, multi-stakeholder work | `.planr/{epics,features,stories,tasks,sprints}/*.md` + Gherkin |
|
|
52
|
+
| **Quick task** | Solo dev, one-off chores, no ceremony | `.planr/quick/QT-NNN-*.md` (a single checklist file) |
|
|
53
|
+
| **Spec-driven** | Handing a feature to an AI agent factory | `.planr/specs/SPEC-NNN-{slug}/{stories,tasks,design}/` |
|
|
67
54
|
|
|
68
|
-
planr
|
|
69
|
-
└── planr epic create # Define the big picture
|
|
70
|
-
└── planr feature create --epic EPIC-001
|
|
71
|
-
└── planr story create --feature FEAT-001
|
|
72
|
-
└── planr task create --feature FEAT-001
|
|
55
|
+
Pick one per project, mix per task. The spec-driven posture is the bridge to the [planr-pipeline](https://github.com/openplanr/planr-pipeline) — same artifact contract, no conversion adapter.
|
|
73
56
|
|
|
74
|
-
|
|
75
|
-
planr sprint add TASK-001 QT-001 # Assign tasks (or --auto for AI)
|
|
76
|
-
planr sprint status # Track progress
|
|
57
|
+
---
|
|
77
58
|
|
|
78
|
-
|
|
79
|
-
```
|
|
59
|
+
## Cross-runtime support
|
|
80
60
|
|
|
81
|
-
|
|
61
|
+
`planr init` auto-generates rule files for all three runtimes by default. Each tool is **self-sufficient after a single install**:
|
|
82
62
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
planr plan
|
|
86
|
-
|
|
63
|
+
| Runtime | What gets installed | How the workflow activates |
|
|
64
|
+
|---|---|---|
|
|
65
|
+
| **Claude Code** | `CLAUDE.md` + sibling `planr-pipeline.md` reference card. Optional: install the `planr-pipeline` plugin for full manifest-enforced subagents. | `/planr-pipeline:plan {feature}` and `/planr-pipeline:ship {feature}` slash commands |
|
|
66
|
+
| **Cursor** | `.cursor/rules/planr-pipeline.mdc` + `agents/{8 role bodies}.md` | User says "plan {feature}" or "ship {feature}" — Composer dispatches the pipeline subagents |
|
|
67
|
+
| **Codex** | `AGENTS.md` with `## Planr Pipeline Orchestration` section | User says "plan {feature}" — Codex adopts the role personas |
|
|
68
|
+
|
|
69
|
+
Same artifacts (`.planr/specs/SPEC-NNN-{slug}/`). Same `.pipeline-shipped` proof markers. Cross-runtime spec portability works out of the box. See the [compatibility matrix](https://github.com/openplanr/planr-pipeline/blob/main/docs/compatibility-matrix.md) for per-capability parity.
|
|
87
70
|
|
|
88
|
-
|
|
71
|
+
---
|
|
89
72
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
| Claude | `CLAUDE.md` | Claude Code CLI |
|
|
94
|
-
| Codex | `AGENTS.md` | OpenAI Codex CLI |
|
|
73
|
+
## Quick start
|
|
74
|
+
|
|
75
|
+
### Install
|
|
95
76
|
|
|
96
77
|
```bash
|
|
97
|
-
|
|
98
|
-
planr rules generate --target cursor # cursor only
|
|
99
|
-
planr rules generate --dry-run # preview
|
|
78
|
+
npm install -g openplanr
|
|
100
79
|
```
|
|
101
80
|
|
|
102
|
-
|
|
81
|
+
### Initialise a project
|
|
103
82
|
|
|
104
|
-
|
|
83
|
+
```bash
|
|
84
|
+
cd my-project
|
|
85
|
+
planr init
|
|
86
|
+
# Interactive: pick AI provider, pick coding agent, generate rules → done
|
|
87
|
+
```
|
|
105
88
|
|
|
106
|
-
|
|
107
|
-
| ----------------------------------------------------- | ------------------------------------------- |
|
|
108
|
-
| `planr backlog add "desc" --priority high --tag bug` | Capture a backlog item |
|
|
109
|
-
| `planr backlog list --tag bug --priority high` | List/filter backlog items |
|
|
110
|
-
| `planr backlog prioritize` | AI sorts open items by impact and effort |
|
|
111
|
-
| `planr backlog promote BL-001 --quick` | Promote to quick task or story |
|
|
112
|
-
| `planr backlog close BL-001` | Close/archive an item |
|
|
113
|
-
| `planr sprint create --name "Sprint 1" --duration 2w` | Create a time-boxed sprint |
|
|
114
|
-
| `planr sprint add TASK-001 QT-001` | Assign tasks to active sprint |
|
|
115
|
-
| `planr sprint add --auto` | AI selects tasks by priority and velocity |
|
|
116
|
-
| `planr sprint status` | Progress dashboard with completion % |
|
|
117
|
-
| `planr sprint close` | Archive sprint, carry over incomplete tasks |
|
|
118
|
-
| `planr sprint list` | List all sprints |
|
|
119
|
-
| `planr sprint history` | Velocity chart across past sprints |
|
|
120
|
-
|
|
121
|
-
### Agile Hierarchy
|
|
122
|
-
|
|
123
|
-
| Command | Description |
|
|
124
|
-
| ----------------------------------- | ----------------------------------------------------- |
|
|
125
|
-
| `planr epic create` | Create a new epic (supports `--file <path>` for PRDs) |
|
|
126
|
-
| `planr epic list` | List all epics |
|
|
127
|
-
| `planr feature create --epic <ID>` | Create features from an epic |
|
|
128
|
-
| `planr feature list` | List all features |
|
|
129
|
-
| `planr story create --feature <ID>` | Create user stories from a feature |
|
|
130
|
-
| `planr story create --epic <ID>` | Batch-generate stories for all features under an epic |
|
|
131
|
-
| `planr story list` | List all user stories |
|
|
132
|
-
| `planr task create --story <ID>` | AI task list from one story |
|
|
133
|
-
| `planr task create --feature <ID>` | AI task list from all stories under a feature |
|
|
134
|
-
| `planr task list` | List all task lists |
|
|
135
|
-
### Quick Tasks & Templates
|
|
136
|
-
|
|
137
|
-
| Command | Description |
|
|
138
|
-
| ----------------------------------------------------- | ---------------------------------- |
|
|
139
|
-
| `planr quick create "description"` | AI-generated standalone task list |
|
|
140
|
-
| `planr quick create --file spec.md` | Task list from a PRD or spec file |
|
|
141
|
-
| `planr quick promote <ID> --story US-001` | Move into agile hierarchy |
|
|
142
|
-
| `planr template list` | List built-in and custom templates |
|
|
143
|
-
| `planr template use rest-endpoint --title "User API"` | Generate tasks from a template |
|
|
144
|
-
| `planr template save TASK-001 --name my-pattern` | Save existing tasks as template |
|
|
145
|
-
| `planr template show rest-endpoint` | Preview template contents |
|
|
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
|
-
|
|
170
|
-
### Planning Tools
|
|
171
|
-
|
|
172
|
-
| Command | Description |
|
|
173
|
-
| ---------------------- | --------------------------------------------------------- |
|
|
174
|
-
| `planr plan` | Full automated flow: Epic -> Features -> Stories -> Tasks |
|
|
175
|
-
| `planr estimate <ID>` | AI effort estimation (story points, hours, complexity) |
|
|
176
|
-
| `planr refine <ID>` | AI-powered review and improvements (prose polish) |
|
|
177
|
-
| `planr revise <ID>` | AI-driven *alignment* of planning artifacts with codebase |
|
|
178
|
-
| `planr search <query>` | Full-text search across all artifacts |
|
|
179
|
-
| `planr sync` | Validate and fix cross-references |
|
|
180
|
-
| `planr status` | Planning progress with tree view and metrics |
|
|
181
|
-
|
|
182
|
-
#### `planr revise` — align planning with reality
|
|
183
|
-
|
|
184
|
-
`refine` improves prose; `revise` actively rewrites planning artifacts so they match the codebase, sibling artifacts, and declared sources. Four-layer safety pipeline:
|
|
185
|
-
|
|
186
|
-
1. **Clean-tree gate** — git working tree must be clean (override with `--allow-dirty`)
|
|
187
|
-
2. **Agent decision** — zod-validated `revise` / `skip` / `flag` per artifact
|
|
188
|
-
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`
|
|
189
|
-
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)
|
|
89
|
+
Non-interactive variants:
|
|
190
90
|
|
|
191
91
|
```bash
|
|
192
|
-
#
|
|
193
|
-
planr
|
|
92
|
+
planr init --yes # accept all defaults (AI on, all rules)
|
|
93
|
+
planr init --no-ai --yes # skip AI provider setup
|
|
94
|
+
planr init --no-pipeline-rules --yes # agile rules only (skip pipeline workflow)
|
|
95
|
+
```
|
|
194
96
|
|
|
195
|
-
|
|
196
|
-
planr revise EPIC-003 --cascade
|
|
97
|
+
### Pick a posture and start
|
|
197
98
|
|
|
198
|
-
|
|
199
|
-
planr revise --all --dry-run # preview every revision
|
|
200
|
-
planr revise --all --yes # type YES once; then non-interactive apply
|
|
99
|
+
**Agile:**
|
|
201
100
|
|
|
202
|
-
|
|
203
|
-
planr
|
|
101
|
+
```bash
|
|
102
|
+
planr epic create
|
|
103
|
+
planr feature create --epic EPIC-001
|
|
104
|
+
planr story create --feature FEAT-001
|
|
105
|
+
planr task create --feature FEAT-001
|
|
106
|
+
# Or one-shot:
|
|
107
|
+
planr plan --epic EPIC-001
|
|
204
108
|
```
|
|
205
109
|
|
|
206
|
-
|
|
110
|
+
**Quick task:**
|
|
207
111
|
|
|
208
|
-
```
|
|
209
|
-
|
|
112
|
+
```bash
|
|
113
|
+
planr quick create "add OAuth login"
|
|
210
114
|
```
|
|
211
115
|
|
|
212
|
-
|
|
116
|
+
**Spec-driven (with the pipeline plugin):**
|
|
213
117
|
|
|
214
|
-
|
|
118
|
+
```bash
|
|
119
|
+
planr spec create "Auth flow" --slug auth
|
|
120
|
+
planr spec shape SPEC-001 # 4 questions, no $EDITOR
|
|
121
|
+
# Then in Claude Code / Cursor / Codex:
|
|
122
|
+
# /planr-pipeline:plan auth → human review → /planr-pipeline:ship auth
|
|
123
|
+
```
|
|
215
124
|
|
|
216
|
-
|
|
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 |
|
|
221
|
-
| `planr github push [ID]` | Push artifacts to GitHub Issues |
|
|
222
|
-
| `planr github sync` | Bi-directional status sync with GitHub |
|
|
223
|
-
| `planr github status` | Show sync status of linked artifacts |
|
|
224
|
-
| `planr export --format html` | Export planning report (markdown, JSON, or HTML) |
|
|
125
|
+
---
|
|
225
126
|
|
|
226
|
-
|
|
127
|
+
## Commands
|
|
227
128
|
|
|
228
|
-
|
|
129
|
+
### Spec-driven mode
|
|
130
|
+
|
|
131
|
+
Third planning posture — designed for handing features to AI coding agents. Specs decompose into User Stories and Tasks with explicit file Create / Modify / Preserve lists, `Type: UI | Tech`, agent assignment, and DoD with build / test commands. Schema matches [OpenPlanr Protocol v1.0.0](https://github.com/openplanr/planr-pipeline/tree/main/docs/protocol).
|
|
132
|
+
|
|
133
|
+
| Command | Description |
|
|
134
|
+
|---|---|
|
|
135
|
+
| `planr spec init` | Activate spec-driven mode (creates `.planr/specs/`) |
|
|
136
|
+
| `planr spec create "Auth flow"` | Create a self-contained `SPEC-NNN-{slug}/` directory |
|
|
137
|
+
| `planr spec shape <id>` | Interactive 4-question authoring (Context, Functional Reqs, Business Rules, Acceptance) |
|
|
138
|
+
| `planr spec decompose <id>` | AI-driven decomposition into US + Tasks |
|
|
139
|
+
| `planr spec sync [<id>]` | Validate integrity (orphans, missing `specId`, schema drift); auto-fixes safe issues |
|
|
140
|
+
| `planr spec list` | List all specs with status + decomposition counts |
|
|
141
|
+
| `planr spec show <id>` | Print a spec + its US/Task tree |
|
|
142
|
+
| `planr spec status [<id>]` | Decomposition state across one/all specs |
|
|
143
|
+
| `planr spec destroy <id>` | Remove a spec entirely |
|
|
144
|
+
| `planr spec attach-design <id> --files <png>...` | Attach UI mockups for the designer-agent |
|
|
145
|
+
| `planr spec promote <id>` | Validate + print the pipeline handoff command |
|
|
146
|
+
|
|
147
|
+
### Agile hierarchy
|
|
148
|
+
|
|
149
|
+
| Command | Description |
|
|
150
|
+
|---|---|
|
|
151
|
+
| `planr epic create` | Create a new epic (supports `--file <path>` for PRDs) |
|
|
152
|
+
| `planr feature create --epic <ID>` | Create features from an epic |
|
|
153
|
+
| `planr story create --feature <ID>` | Create user stories from a feature |
|
|
154
|
+
| `planr story create --epic <ID>` | Batch-generate stories for all features under an epic |
|
|
155
|
+
| `planr task create --story <ID>` | AI task list from one story |
|
|
156
|
+
| `planr task create --feature <ID>` | AI task list from all stories under a feature |
|
|
157
|
+
| `planr plan` | Full automated flow: Epic → Features → Stories → Tasks |
|
|
158
|
+
| `planr epic list` / `planr feature list` / `planr story list` / `planr task list` | List artifacts |
|
|
159
|
+
|
|
160
|
+
### Quick tasks & templates
|
|
161
|
+
|
|
162
|
+
| Command | Description |
|
|
163
|
+
|---|---|
|
|
164
|
+
| `planr quick create "description"` | AI-generated standalone task list |
|
|
165
|
+
| `planr quick create --file spec.md` | Task list from a PRD or spec file |
|
|
166
|
+
| `planr quick promote <ID> --story US-001` | Move into agile hierarchy |
|
|
167
|
+
| `planr template list` | List built-in and custom templates |
|
|
168
|
+
| `planr template use rest-endpoint --title "User API"` | Generate tasks from a template |
|
|
169
|
+
| `planr template save TASK-001 --name my-pattern` | Save existing tasks as template |
|
|
170
|
+
|
|
171
|
+
Built-in templates: `rest-endpoint`, `react-component`, `database-migration`, `api-integration`, `auth-flow`.
|
|
229
172
|
|
|
230
|
-
|
|
231
|
-
| -------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
|
|
232
|
-
| `planr report <type>` | Generate a report (`sprint`, `weekly`, `executive`, `standup`, `retro`, `release`) |
|
|
233
|
-
| `planr report weekly --lint` | Generate and run the report quality linter before saving |
|
|
234
|
-
| `planr report sprint --push slack --dry-run` | Show what would be posted to Slack (no webhook required for dry runs) |
|
|
235
|
-
| `planr report-linter [file]` | Lint an existing markdown report (vague language, evidence density, required sections) |
|
|
236
|
-
| `planr context --report-type weekly` | Print the report context pack (artifacts + GitHub + evidence) as JSON for piping |
|
|
237
|
-
| `planr voice standup --file transcript.txt --lint` | Convert a transcript into a structured standup, optionally linted, edited, or appended to a story |
|
|
238
|
-
| `planr story standup --story US-001 --file t.txt` | Append linted standup notes from a transcript onto an existing user story |
|
|
173
|
+
### Backlog & Sprint
|
|
239
174
|
|
|
240
|
-
|
|
175
|
+
| Command | Description |
|
|
176
|
+
|---|---|
|
|
177
|
+
| `planr backlog add "desc" --priority high --tag bug` | Capture a backlog item |
|
|
178
|
+
| `planr backlog list` / `prioritize` / `promote <id>` / `close <id>` | Manage backlog |
|
|
179
|
+
| `planr sprint create --name "Sprint 1" --duration 2w` | Create a time-boxed sprint |
|
|
180
|
+
| `planr sprint add TASK-001 QT-001` | Assign tasks (or `--auto` for AI) |
|
|
181
|
+
| `planr sprint status` / `list` / `close` / `history` | Track sprint progress + velocity |
|
|
182
|
+
|
|
183
|
+
### Planning tools
|
|
184
|
+
|
|
185
|
+
| Command | Description |
|
|
186
|
+
|---|---|
|
|
187
|
+
| `planr estimate <ID>` | AI effort estimation (story points, hours, complexity) |
|
|
188
|
+
| `planr refine <ID>` | AI-powered review and prose polish |
|
|
189
|
+
| `planr revise <ID>` | AI-driven *alignment* of planning artifacts with codebase (with diff preview) |
|
|
190
|
+
| `planr search <query>` | Full-text search across all artifacts |
|
|
191
|
+
| `planr sync` | Validate and fix cross-references |
|
|
192
|
+
| `planr status` | Tree view of all planning progress |
|
|
193
|
+
|
|
194
|
+
### AI agent rules
|
|
195
|
+
|
|
196
|
+
| Command | Description |
|
|
197
|
+
|---|---|
|
|
198
|
+
| `planr rules generate` | Generate rule files for all configured runtimes (default scope: agile) |
|
|
199
|
+
| `planr rules generate --target cursor --scope pipeline` | Cursor + pipeline workflow rules |
|
|
200
|
+
| `planr rules generate --target all --scope all` | Everything for every runtime |
|
|
201
|
+
| `planr rules generate --dry-run` | Preview without writing |
|
|
202
|
+
|
|
203
|
+
`--scope agile` (default) writes the agile workflow rules. `--scope pipeline` writes the rule files that drive the [planr-pipeline](https://github.com/openplanr/planr-pipeline) two-phase spec-driven flow on the chosen runtime. `--scope all` produces both. `planr init` auto-runs `--scope all` by default — opt out with `planr init --no-pipeline-rules`.
|
|
204
|
+
|
|
205
|
+
### Integrations
|
|
206
|
+
|
|
207
|
+
| Command | Description |
|
|
208
|
+
|---|---|
|
|
209
|
+
| `planr github push [ID]` | Push artifacts to GitHub Issues |
|
|
210
|
+
| `planr github sync` | Bi-directional status sync with GitHub |
|
|
211
|
+
| `planr github status` | Show sync status of linked artifacts |
|
|
212
|
+
| `planr linear init` | Configure Linear (team + token) |
|
|
213
|
+
| `planr linear push <id>` | Epic → Linear project; features / stories / tasks → issues |
|
|
214
|
+
| `planr linear sync` | Pull Linear workflow state into artifact `status` |
|
|
215
|
+
| `planr export --format html` | Export planning report (markdown / JSON / HTML) |
|
|
216
|
+
|
|
217
|
+
### Stakeholder reports
|
|
218
|
+
|
|
219
|
+
| Command | Description |
|
|
220
|
+
|---|---|
|
|
221
|
+
| `planr report <type>` | Generate a report (`sprint`, `weekly`, `executive`, `standup`, `retro`, `release`) |
|
|
222
|
+
| `planr report-linter [file]` | Lint a markdown report (vague language, evidence density) |
|
|
223
|
+
| `planr context --report-type weekly` | Print the report context pack as JSON |
|
|
224
|
+
| `planr voice standup --file transcript.txt` | Convert a transcript into a structured standup |
|
|
225
|
+
|
|
226
|
+
Output: Markdown + HTML written to `.planr/reports/`. `--push slack` posts via webhook; `--push github` opens an issue. `--strict-evidence` fails on bullets without URLs / `#issue` refs.
|
|
227
|
+
|
|
228
|
+
### Setup & config
|
|
229
|
+
|
|
230
|
+
| Command | Description |
|
|
231
|
+
|---|---|
|
|
232
|
+
| `planr init` | Initialise project (creates `.planr/`, generates rules for all runtimes by default) |
|
|
233
|
+
| `planr config show` | Display current configuration + spec-driven readiness |
|
|
234
|
+
| `planr config set-provider` / `set-key` / `set-model` / `set-agent` | Manage AI provider settings |
|
|
235
|
+
| `planr checklist show/toggle/reset` | Agile development checklist |
|
|
236
|
+
|
|
237
|
+
See [docs/CLI.md](docs/CLI.md) for the full reference with every flag.
|
|
241
238
|
|
|
242
|
-
|
|
239
|
+
---
|
|
243
240
|
|
|
244
|
-
|
|
241
|
+
## Project structure
|
|
245
242
|
|
|
246
|
-
|
|
243
|
+
After `planr init` and creating artifacts:
|
|
247
244
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
245
|
+
```text
|
|
246
|
+
my-project/
|
|
247
|
+
├── .planr/
|
|
248
|
+
│ ├── config.json # Project configuration
|
|
249
|
+
│ ├── epics/ # EPIC-001-*.md
|
|
250
|
+
│ ├── features/ # FEAT-001-*.md
|
|
251
|
+
│ ├── stories/ # US-001-*.md + US-001-gherkin.feature
|
|
252
|
+
│ ├── tasks/ # TASK-001-*.md
|
|
253
|
+
│ ├── quick/ # QT-001-*.md
|
|
254
|
+
│ ├── specs/ # SPEC-NNN-{slug}/ (spec-driven mode)
|
|
255
|
+
│ ├── backlog/ # BL-001-*.md
|
|
256
|
+
│ ├── sprints/ # SPRINT-001-*.md
|
|
257
|
+
│ ├── adrs/ # Architecture Decision Records
|
|
258
|
+
│ ├── reports/ # Stakeholder reports
|
|
259
|
+
│ └── checklists/ # Agile development checklist
|
|
260
|
+
├── .cursor/rules/
|
|
261
|
+
│ ├── agile-checklist.mdc # Agile workflow rules
|
|
262
|
+
│ ├── planr-pipeline.mdc # Pipeline rules (default-on)
|
|
263
|
+
│ └── agents/ # 8 subagent body files
|
|
264
|
+
├── CLAUDE.md # Claude Code rules
|
|
265
|
+
├── planr-pipeline.md # Pipeline reference card (Claude Code)
|
|
266
|
+
└── AGENTS.md # Codex rules + pipeline orchestration
|
|
267
|
+
```
|
|
258
268
|
|
|
259
|
-
|
|
269
|
+
---
|
|
260
270
|
|
|
261
|
-
##
|
|
271
|
+
## Architecture decision: `planr revise`
|
|
262
272
|
|
|
263
|
-
|
|
273
|
+
Most planning tools let plans drift from the codebase. `planr revise` actively rewrites planning artifacts so they match reality, with a four-layer safety pipeline:
|
|
264
274
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
│ ├── backlog/ # BL-001-*.md
|
|
275
|
-
│ ├── sprints/ # SPRINT-001-*.md
|
|
276
|
-
│ ├── templates/ # Custom task templates
|
|
277
|
-
│ ├── adrs/ # Architecture Decision Records
|
|
278
|
-
│ ├── checklists/ # Agile development checklist
|
|
279
|
-
│ └── diagrams/ # UML, C4, sequence diagrams
|
|
280
|
-
├── .cursor/rules/ # Generated Cursor rules
|
|
281
|
-
├── CLAUDE.md # Generated Claude Code rules
|
|
282
|
-
└── AGENTS.md # Generated Codex rules
|
|
275
|
+
1. **Clean-tree gate** — git working tree must be clean (`--allow-dirty` to override)
|
|
276
|
+
2. **Agent decision** — zod-validated `revise` / `skip` / `flag` per artifact
|
|
277
|
+
3. **Evidence verification** — agent must cite typed, verifiable evidence (file existence, grep matches, sibling artifacts); unverifiable citations are dropped
|
|
278
|
+
4. **Diff preview + confirmation** — per-artifact `[a]pply / [s]kip / [e]dit / [d]iff / [q]uit`; writes are atomic with sidecar backups
|
|
279
|
+
|
|
280
|
+
```bash
|
|
281
|
+
planr revise EPIC-003 --cascade # interactive
|
|
282
|
+
planr revise --all --dry-run # preview every revision
|
|
283
|
+
planr revise EPIC-003 --cascade --dry-run --audit ./revise.json # CI mode
|
|
283
284
|
```
|
|
284
285
|
|
|
286
|
+
Full design: [.planr/EPIC-REVISE-COMMAND.md](.planr/EPIC-REVISE-COMMAND.md).
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
285
290
|
## Configuration
|
|
286
291
|
|
|
287
292
|
`.planr/config.json` is created by `planr init`:
|
|
@@ -297,62 +302,63 @@ my-project/
|
|
|
297
302
|
"codexConfig": "."
|
|
298
303
|
},
|
|
299
304
|
"idPrefix": {
|
|
300
|
-
"epic": "EPIC",
|
|
301
|
-
"
|
|
302
|
-
"
|
|
303
|
-
"task": "TASK",
|
|
304
|
-
"quick": "QT",
|
|
305
|
-
"backlog": "BL",
|
|
306
|
-
"sprint": "SPRINT"
|
|
305
|
+
"epic": "EPIC", "feature": "FEAT", "story": "US",
|
|
306
|
+
"task": "TASK", "quick": "QT", "backlog": "BL",
|
|
307
|
+
"sprint": "SPRINT", "spec": "SPEC"
|
|
307
308
|
}
|
|
308
309
|
}
|
|
309
310
|
```
|
|
310
311
|
|
|
311
|
-
|
|
312
|
+
---
|
|
312
313
|
|
|
313
|
-
|
|
314
|
-
| -------------------- | ------------------------------------------------------- |
|
|
315
|
-
| `rest-endpoint` | CRUD endpoint with validation, auth, tests, docs |
|
|
316
|
-
| `react-component` | Component, stories, tests, types |
|
|
317
|
-
| `database-migration` | Schema change, migration, rollback, seed data |
|
|
318
|
-
| `api-integration` | External API client, retry logic, error handling, tests |
|
|
319
|
-
| `auth-flow` | Authentication flow with login, signup, password reset |
|
|
314
|
+
## Ecosystem
|
|
320
315
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
316
|
+
OpenPlanr is one of four components:
|
|
317
|
+
|
|
318
|
+
| Component | Role | Repo |
|
|
319
|
+
|---|---|---|
|
|
320
|
+
| **`planr` CLI** | Authoring surface — generates `.planr/` artifacts and runtime rule files | this repo |
|
|
321
|
+
| **`planr-pipeline`** | Claude Code plugin — canonical executor (8 subagents, manifest-enforced tool restrictions) | [openplanr/planr-pipeline](https://github.com/openplanr/planr-pipeline) |
|
|
322
|
+
| **`openplanr` skill** | Routing playbook — teaches Claude when to use which surface | [openplanr/skills](https://github.com/openplanr/skills) |
|
|
323
|
+
| **`openplanr/marketplace`** | Distribution — Claude Code plugin registry | [openplanr/marketplace](https://github.com/openplanr/marketplace) |
|
|
324
|
+
|
|
325
|
+
planr CLI is the only piece you need to install for Cursor and Codex. Add the marketplace + pipeline plugin for the full Claude Code experience.
|
|
326
|
+
|
|
327
|
+
---
|
|
324
328
|
|
|
325
329
|
## Development
|
|
326
330
|
|
|
327
331
|
```bash
|
|
328
|
-
# Clone and install
|
|
329
332
|
git clone https://github.com/openplanr/OpenPlanr.git
|
|
330
|
-
cd
|
|
333
|
+
cd OpenPlanr
|
|
331
334
|
npm install
|
|
332
335
|
|
|
333
336
|
# Run from source
|
|
334
337
|
npx tsx src/cli/index.ts init
|
|
335
338
|
|
|
336
|
-
# Build
|
|
339
|
+
# Build / test / lint
|
|
337
340
|
npm run build
|
|
338
|
-
|
|
339
|
-
# Run tests
|
|
340
341
|
npm test
|
|
342
|
+
npx biome check src/ tests/
|
|
341
343
|
|
|
342
344
|
# Link globally for development
|
|
343
345
|
npm install -g .
|
|
344
346
|
```
|
|
345
347
|
|
|
348
|
+
---
|
|
349
|
+
|
|
346
350
|
## Contributing
|
|
347
351
|
|
|
348
|
-
Contributions
|
|
352
|
+
Contributions welcome. See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
349
353
|
|
|
350
354
|
1. Fork the repository
|
|
351
355
|
2. Create your feature branch (`git checkout -b feat/amazing-feature`)
|
|
352
|
-
3. Commit your changes
|
|
353
|
-
4. Push to the branch
|
|
356
|
+
3. Commit your changes
|
|
357
|
+
4. Push to the branch
|
|
354
358
|
5. Open a Pull Request
|
|
355
359
|
|
|
360
|
+
---
|
|
361
|
+
|
|
356
362
|
## License
|
|
357
363
|
|
|
358
364
|
[MIT](LICENSE)
|
|
@@ -122,7 +122,7 @@ export declare function buildRevisePrompt(ctx: RevisePromptContext): AIMessage[]
|
|
|
122
122
|
*
|
|
123
123
|
* Produces a 2-message conversation that asks the AI to decompose a spec
|
|
124
124
|
* body into N User Stories with 1-2 Tasks each, matching the
|
|
125
|
-
*
|
|
125
|
+
* planr-pipeline plugin's specification-agent contract.
|
|
126
126
|
*
|
|
127
127
|
* @param specBody Raw spec markdown (PO-authored, untrusted — wrapped via wrapUserInput)
|
|
128
128
|
* @param hasPNGs If true, instructs the AI to emit 2 tasks per US (UI + Tech)
|
|
@@ -266,7 +266,7 @@ export function buildRevisePrompt(ctx) {
|
|
|
266
266
|
*
|
|
267
267
|
* Produces a 2-message conversation that asks the AI to decompose a spec
|
|
268
268
|
* body into N User Stories with 1-2 Tasks each, matching the
|
|
269
|
-
*
|
|
269
|
+
* planr-pipeline plugin's specification-agent contract.
|
|
270
270
|
*
|
|
271
271
|
* @param specBody Raw spec markdown (PO-authored, untrusted — wrapped via wrapUserInput)
|
|
272
272
|
* @param hasPNGs If true, instructs the AI to emit 2 tasks per US (UI + Tech)
|