openplanr 0.1.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/LICENSE +21 -0
- package/README.md +168 -0
- package/bin/planr.js +2 -0
- package/dist/cli/commands/checklist.d.ts +3 -0
- package/dist/cli/commands/checklist.d.ts.map +1 -0
- package/dist/cli/commands/checklist.js +34 -0
- package/dist/cli/commands/checklist.js.map +1 -0
- package/dist/cli/commands/epic.d.ts +3 -0
- package/dist/cli/commands/epic.d.ts.map +1 -0
- package/dist/cli/commands/epic.js +61 -0
- package/dist/cli/commands/epic.js.map +1 -0
- package/dist/cli/commands/feature.d.ts +3 -0
- package/dist/cli/commands/feature.d.ts.map +1 -0
- package/dist/cli/commands/feature.js +65 -0
- package/dist/cli/commands/feature.js.map +1 -0
- package/dist/cli/commands/init.d.ts +3 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +49 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/rules.d.ts +3 -0
- package/dist/cli/commands/rules.d.ts.map +1 -0
- package/dist/cli/commands/rules.js +48 -0
- package/dist/cli/commands/rules.js.map +1 -0
- package/dist/cli/commands/status.d.ts +3 -0
- package/dist/cli/commands/status.d.ts.map +1 -0
- package/dist/cli/commands/status.js +38 -0
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/commands/story.d.ts +3 -0
- package/dist/cli/commands/story.d.ts.map +1 -0
- package/dist/cli/commands/story.js +81 -0
- package/dist/cli/commands/story.js.map +1 -0
- package/dist/cli/commands/task.d.ts +3 -0
- package/dist/cli/commands/task.d.ts.map +1 -0
- package/dist/cli/commands/task.js +76 -0
- package/dist/cli/commands/task.js.map +1 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +27 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/generators/base-generator.d.ts +9 -0
- package/dist/generators/base-generator.d.ts.map +1 -0
- package/dist/generators/base-generator.js +9 -0
- package/dist/generators/base-generator.js.map +1 -0
- package/dist/generators/claude-generator.d.ts +7 -0
- package/dist/generators/claude-generator.d.ts.map +1 -0
- package/dist/generators/claude-generator.js +27 -0
- package/dist/generators/claude-generator.js.map +1 -0
- package/dist/generators/codex-generator.d.ts +7 -0
- package/dist/generators/codex-generator.d.ts.map +1 -0
- package/dist/generators/codex-generator.js +22 -0
- package/dist/generators/codex-generator.js.map +1 -0
- package/dist/generators/cursor-generator.d.ts +7 -0
- package/dist/generators/cursor-generator.d.ts.map +1 -0
- package/dist/generators/cursor-generator.js +37 -0
- package/dist/generators/cursor-generator.js.map +1 -0
- package/dist/generators/generator-factory.d.ts +5 -0
- package/dist/generators/generator-factory.d.ts.map +1 -0
- package/dist/generators/generator-factory.js +19 -0
- package/dist/generators/generator-factory.js.map +1 -0
- package/dist/generators/generator-types.d.ts +4 -0
- package/dist/generators/generator-types.d.ts.map +1 -0
- package/dist/generators/generator-types.js +2 -0
- package/dist/generators/generator-types.js.map +1 -0
- package/dist/models/schema.d.ts +79 -0
- package/dist/models/schema.d.ts.map +1 -0
- package/dist/models/schema.js +22 -0
- package/dist/models/schema.js.map +1 -0
- package/dist/models/types.d.ts +78 -0
- package/dist/models/types.d.ts.map +1 -0
- package/dist/models/types.js +2 -0
- package/dist/models/types.js.map +1 -0
- package/dist/services/artifact-service.d.ts +17 -0
- package/dist/services/artifact-service.d.ts.map +1 -0
- package/dist/services/artifact-service.js +63 -0
- package/dist/services/artifact-service.js.map +1 -0
- package/dist/services/checklist-service.d.ts +6 -0
- package/dist/services/checklist-service.d.ts.map +1 -0
- package/dist/services/checklist-service.js +26 -0
- package/dist/services/checklist-service.js.map +1 -0
- package/dist/services/config-service.d.ts +5 -0
- package/dist/services/config-service.d.ts.map +1 -0
- package/dist/services/config-service.js +38 -0
- package/dist/services/config-service.js.map +1 -0
- package/dist/services/id-service.d.ts +6 -0
- package/dist/services/id-service.d.ts.map +1 -0
- package/dist/services/id-service.js +22 -0
- package/dist/services/id-service.js.map +1 -0
- package/dist/services/prompt-service.d.ts +9 -0
- package/dist/services/prompt-service.d.ts.map +1 -0
- package/dist/services/prompt-service.js +23 -0
- package/dist/services/prompt-service.js.map +1 -0
- package/dist/services/template-service.d.ts +2 -0
- package/dist/services/template-service.d.ts.map +1 -0
- package/dist/services/template-service.js +32 -0
- package/dist/services/template-service.js.map +1 -0
- package/dist/templates/adrs/adr-general.md.hbs +46 -0
- package/dist/templates/checklists/agile-checklist.md.hbs +49 -0
- package/dist/templates/epics/epic.md.hbs +46 -0
- package/dist/templates/features/feature.md.hbs +42 -0
- package/dist/templates/rules/claude/CLAUDE.md.hbs +63 -0
- package/dist/templates/rules/codex/AGENTS.md.hbs +28 -0
- package/dist/templates/rules/cursor/2000-agile-checklist.mdc.hbs +33 -0
- package/dist/templates/rules/cursor/2001-agile-create-epic.mdc.hbs +35 -0
- package/dist/templates/rules/cursor/2002-agile-create-features.mdc.hbs +35 -0
- package/dist/templates/rules/cursor/2003-agile-create-user-story.mdc.hbs +31 -0
- package/dist/templates/rules/cursor/2100-create-task-list.mdc.hbs +36 -0
- package/dist/templates/rules/cursor/2101-implement-task-list.mdc.hbs +28 -0
- package/dist/templates/stories/gherkin.feature.hbs +13 -0
- package/dist/templates/stories/user-story.md.hbs +28 -0
- package/dist/templates/tasks/task-list.md.hbs +24 -0
- package/dist/templates/templates/adrs/adr-general.md.hbs +46 -0
- package/dist/templates/templates/checklists/agile-checklist.md.hbs +49 -0
- package/dist/templates/templates/epics/epic.md.hbs +46 -0
- package/dist/templates/templates/features/feature.md.hbs +42 -0
- package/dist/templates/templates/rules/claude/CLAUDE.md.hbs +63 -0
- package/dist/templates/templates/rules/codex/AGENTS.md.hbs +28 -0
- package/dist/templates/templates/rules/cursor/2000-agile-checklist.mdc.hbs +33 -0
- package/dist/templates/templates/rules/cursor/2001-agile-create-epic.mdc.hbs +35 -0
- package/dist/templates/templates/rules/cursor/2002-agile-create-features.mdc.hbs +35 -0
- package/dist/templates/templates/rules/cursor/2003-agile-create-user-story.mdc.hbs +31 -0
- package/dist/templates/templates/rules/cursor/2100-create-task-list.mdc.hbs +36 -0
- package/dist/templates/templates/rules/cursor/2101-implement-task-list.mdc.hbs +28 -0
- package/dist/templates/templates/stories/gherkin.feature.hbs +13 -0
- package/dist/templates/templates/stories/user-story.md.hbs +28 -0
- package/dist/templates/templates/tasks/task-list.md.hbs +24 -0
- package/dist/utils/constants.d.ts +20 -0
- package/dist/utils/constants.d.ts.map +1 -0
- package/dist/utils/constants.js +26 -0
- package/dist/utils/constants.js.map +1 -0
- package/dist/utils/fs.d.ts +6 -0
- package/dist/utils/fs.d.ts.map +1 -0
- package/dist/utils/fs.js +26 -0
- package/dist/utils/fs.js.map +1 -0
- package/dist/utils/logger.d.ts +9 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +22 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/markdown.d.ts +7 -0
- package/dist/utils/markdown.d.ts.map +1 -0
- package/dist/utils/markdown.js +9 -0
- package/dist/utils/markdown.js.map +1 -0
- package/dist/utils/slugify.d.ts +2 -0
- package/dist/utils/slugify.d.ts.map +1 -0
- package/dist/utils/slugify.js +10 -0
- package/dist/utils/slugify.js.map +1 -0
- package/package.json +68 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 OpenPlanr Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# Planr
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/openplanr)
|
|
4
|
+
[](https://github.com/TechArc-io/OpenPlanr/blob/main/LICENSE)
|
|
5
|
+
[](https://nodejs.org)
|
|
6
|
+
|
|
7
|
+
**Agile planning CLI for AI-assisted development.** Generate epics, features, user stories, tasks, and AI agent rules — all from your terminal.
|
|
8
|
+
|
|
9
|
+
Planr brings structured agile planning to AI coding workflows. Create planning artifacts with a simple CLI, then generate rule files that teach Cursor, Claude Code, or Codex how to follow your plan.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Why Planr?
|
|
14
|
+
|
|
15
|
+
AI coding assistants are powerful but lack structured planning. Without a clear plan, they generate code that drifts from requirements. Planr solves this by:
|
|
16
|
+
|
|
17
|
+
1. **Structuring your planning** — epics, features, stories, and tasks in markdown
|
|
18
|
+
2. **Generating AI rules** — rule files that give your AI assistant context about the plan
|
|
19
|
+
3. **Keeping everything in your repo** — artifacts live alongside your code, version-controlled
|
|
20
|
+
|
|
21
|
+
## Quick Start
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# Install globally
|
|
25
|
+
npm install -g openplanr
|
|
26
|
+
|
|
27
|
+
# Initialize in your project
|
|
28
|
+
cd my-project
|
|
29
|
+
planr init
|
|
30
|
+
|
|
31
|
+
# Create your first epic
|
|
32
|
+
planr epic create
|
|
33
|
+
|
|
34
|
+
# Break it down
|
|
35
|
+
planr feature create --epic EPIC-001
|
|
36
|
+
planr story create --feature FEAT-001
|
|
37
|
+
planr task create --story US-001
|
|
38
|
+
|
|
39
|
+
# Generate AI rules for your editor
|
|
40
|
+
planr rules generate
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## How It Works
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
planr init
|
|
47
|
+
└── planr epic create # Define the big picture
|
|
48
|
+
└── planr feature create --epic EPIC-001 # Break into features
|
|
49
|
+
└── planr story create --feature FEAT-001 # User stories + Gherkin
|
|
50
|
+
└── planr task create --story US-001 # Implementation tasks
|
|
51
|
+
|
|
52
|
+
planr rules generate # Generate .cursor/rules, CLAUDE.md, AGENTS.md
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Each command creates markdown artifacts in `docs/agile/` and interactively prompts for the details. The hierarchy is enforced — features require an epic, stories require a feature, tasks require a story.
|
|
56
|
+
|
|
57
|
+
## Supported AI Targets
|
|
58
|
+
|
|
59
|
+
| Target | Generated File(s) | Used By |
|
|
60
|
+
|--------|--------------------|---------|
|
|
61
|
+
| Cursor | `.cursor/rules/*.mdc` | Cursor IDE |
|
|
62
|
+
| Claude | `CLAUDE.md` | Claude Code CLI |
|
|
63
|
+
| Codex | `AGENTS.md` | OpenAI Codex CLI |
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
planr rules generate # all targets
|
|
67
|
+
planr rules generate --target cursor # cursor only
|
|
68
|
+
planr rules generate --dry-run # preview
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Commands
|
|
72
|
+
|
|
73
|
+
| Command | Description |
|
|
74
|
+
|---------|-------------|
|
|
75
|
+
| `planr init` | Initialize project with config and directory structure |
|
|
76
|
+
| `planr epic create` | Create a new epic |
|
|
77
|
+
| `planr epic list` | List all epics |
|
|
78
|
+
| `planr feature create --epic <ID>` | Create a feature from an epic |
|
|
79
|
+
| `planr feature list` | List all features |
|
|
80
|
+
| `planr story create --feature <ID>` | Create a user story with Gherkin criteria |
|
|
81
|
+
| `planr story list` | List all user stories |
|
|
82
|
+
| `planr task create --story <ID>` | Create a task list from a story |
|
|
83
|
+
| `planr task list` | List all task lists |
|
|
84
|
+
| `planr task implement <ID>` | View tasks and start implementing |
|
|
85
|
+
| `planr checklist show` | View the agile development checklist |
|
|
86
|
+
| `planr checklist reset` | Reset checklist to initial state |
|
|
87
|
+
| `planr rules generate` | Generate AI agent rule files |
|
|
88
|
+
| `planr status` | Show planning progress overview |
|
|
89
|
+
|
|
90
|
+
See [docs/CLI.md](docs/CLI.md) for the full command reference with all options and flags.
|
|
91
|
+
|
|
92
|
+
## Project Structure
|
|
93
|
+
|
|
94
|
+
After running `planr init` and creating artifacts:
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
my-project/
|
|
98
|
+
├── planr.config.json
|
|
99
|
+
├── docs/agile/
|
|
100
|
+
│ ├── epics/ # EPIC-001-*.md
|
|
101
|
+
│ ├── features/ # FEAT-001-*.md
|
|
102
|
+
│ ├── stories/ # US-001-*.md + US-001-gherkin.feature
|
|
103
|
+
│ ├── tasks/ # TASK-001-*.md
|
|
104
|
+
│ ├── adrs/ # Architecture Decision Records
|
|
105
|
+
│ ├── checklists/ # Agile development checklist
|
|
106
|
+
│ └── diagrams/ # UML, C4, sequence diagrams
|
|
107
|
+
├── .cursor/rules/ # Generated Cursor rules
|
|
108
|
+
├── CLAUDE.md # Generated Claude Code rules
|
|
109
|
+
└── AGENTS.md # Generated Codex rules
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Configuration
|
|
113
|
+
|
|
114
|
+
`planr.config.json` is created by `planr init`:
|
|
115
|
+
|
|
116
|
+
```json
|
|
117
|
+
{
|
|
118
|
+
"projectName": "my-project",
|
|
119
|
+
"targets": ["cursor", "claude", "codex"],
|
|
120
|
+
"outputPaths": {
|
|
121
|
+
"agile": "docs/agile",
|
|
122
|
+
"cursorRules": ".cursor/rules",
|
|
123
|
+
"claudeConfig": ".",
|
|
124
|
+
"codexConfig": "."
|
|
125
|
+
},
|
|
126
|
+
"idPrefix": {
|
|
127
|
+
"epic": "EPIC",
|
|
128
|
+
"feature": "FEAT",
|
|
129
|
+
"story": "US",
|
|
130
|
+
"task": "TASK"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Development
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
# Clone and install
|
|
139
|
+
git clone https://github.com/TechArc-io/OpenPlanr.git
|
|
140
|
+
cd openplanr
|
|
141
|
+
npm install
|
|
142
|
+
|
|
143
|
+
# Run from source
|
|
144
|
+
npx tsx src/cli/index.ts init
|
|
145
|
+
|
|
146
|
+
# Build
|
|
147
|
+
npm run build
|
|
148
|
+
|
|
149
|
+
# Run tests
|
|
150
|
+
npm test
|
|
151
|
+
|
|
152
|
+
# Link globally for development
|
|
153
|
+
npm install -g .
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## Contributing
|
|
157
|
+
|
|
158
|
+
Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
159
|
+
|
|
160
|
+
1. Fork the repository
|
|
161
|
+
2. Create your feature branch (`git checkout -b feat/amazing-feature`)
|
|
162
|
+
3. Commit your changes (`git commit -m 'Add amazing feature'`)
|
|
163
|
+
4. Push to the branch (`git push origin feat/amazing-feature`)
|
|
164
|
+
5. Open a Pull Request
|
|
165
|
+
|
|
166
|
+
## License
|
|
167
|
+
|
|
168
|
+
[MIT](LICENSE)
|
package/bin/planr.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checklist.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/checklist.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,QAiCxD"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { loadConfig } from '../../services/config-service.js';
|
|
2
|
+
import { readChecklist, resetChecklist, createChecklist, } from '../../services/checklist-service.js';
|
|
3
|
+
import { logger } from '../../utils/logger.js';
|
|
4
|
+
export function registerChecklistCommand(program) {
|
|
5
|
+
const checklist = program
|
|
6
|
+
.command('checklist')
|
|
7
|
+
.description('Manage the agile development checklist');
|
|
8
|
+
checklist
|
|
9
|
+
.command('show')
|
|
10
|
+
.description('Display the agile development checklist')
|
|
11
|
+
.action(async () => {
|
|
12
|
+
const projectDir = program.opts().projectDir;
|
|
13
|
+
const config = await loadConfig(projectDir);
|
|
14
|
+
let content = await readChecklist(projectDir, config);
|
|
15
|
+
if (!content) {
|
|
16
|
+
logger.info('No checklist found. Creating one...');
|
|
17
|
+
await createChecklist(projectDir, config);
|
|
18
|
+
content = await readChecklist(projectDir, config);
|
|
19
|
+
}
|
|
20
|
+
if (content) {
|
|
21
|
+
console.log(content);
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
checklist
|
|
25
|
+
.command('reset')
|
|
26
|
+
.description('Reset the checklist to its initial state')
|
|
27
|
+
.action(async () => {
|
|
28
|
+
const projectDir = program.opts().projectDir;
|
|
29
|
+
const config = await loadConfig(projectDir);
|
|
30
|
+
await resetChecklist(projectDir, config);
|
|
31
|
+
logger.success('Checklist has been reset.');
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=checklist.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checklist.js","sourceRoot":"","sources":["../../../src/cli/commands/checklist.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC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CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"epic.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/epic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,QAqEnD"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { loadConfig } from '../../services/config-service.js';
|
|
2
|
+
import { createArtifact, listArtifacts } from '../../services/artifact-service.js';
|
|
3
|
+
import { promptText, promptMultiText } from '../../services/prompt-service.js';
|
|
4
|
+
import { logger } from '../../utils/logger.js';
|
|
5
|
+
export function registerEpicCommand(program) {
|
|
6
|
+
const epic = program.command('epic').description('Manage epics');
|
|
7
|
+
epic
|
|
8
|
+
.command('create')
|
|
9
|
+
.description('Create a new epic')
|
|
10
|
+
.option('--title <title>', 'epic title')
|
|
11
|
+
.option('--owner <owner>', 'epic owner')
|
|
12
|
+
.action(async (opts) => {
|
|
13
|
+
const projectDir = program.opts().projectDir;
|
|
14
|
+
const config = await loadConfig(projectDir);
|
|
15
|
+
logger.heading('Create Epic');
|
|
16
|
+
const title = opts.title || (await promptText('Epic title:'));
|
|
17
|
+
const owner = opts.owner || (await promptText('Owner:', config.author));
|
|
18
|
+
const businessValue = await promptText('Business value:');
|
|
19
|
+
const targetUsers = await promptText('Target users:');
|
|
20
|
+
const problemStatement = await promptText('Problem statement:');
|
|
21
|
+
const solutionOverview = await promptText('Solution overview:');
|
|
22
|
+
const successCriteria = await promptText('Success criteria:');
|
|
23
|
+
const keyFeatures = await promptMultiText('Key features', 'comma-separated');
|
|
24
|
+
const dependencies = await promptText('Dependencies:', 'None');
|
|
25
|
+
const risks = await promptText('Risks:', 'None');
|
|
26
|
+
const { id, filePath } = await createArtifact(projectDir, config, 'epic', 'epics/epic.md.hbs', {
|
|
27
|
+
title,
|
|
28
|
+
owner,
|
|
29
|
+
businessValue,
|
|
30
|
+
targetUsers,
|
|
31
|
+
problemStatement,
|
|
32
|
+
solutionOverview,
|
|
33
|
+
successCriteria,
|
|
34
|
+
keyFeatures,
|
|
35
|
+
dependencies,
|
|
36
|
+
risks,
|
|
37
|
+
featureIds: [],
|
|
38
|
+
});
|
|
39
|
+
logger.success(`Created epic ${id}: ${title}`);
|
|
40
|
+
logger.dim(` ${filePath}`);
|
|
41
|
+
logger.dim('');
|
|
42
|
+
logger.dim(`Next: planr feature create --epic ${id}`);
|
|
43
|
+
});
|
|
44
|
+
epic
|
|
45
|
+
.command('list')
|
|
46
|
+
.description('List all epics')
|
|
47
|
+
.action(async () => {
|
|
48
|
+
const projectDir = program.opts().projectDir;
|
|
49
|
+
const config = await loadConfig(projectDir);
|
|
50
|
+
const epics = await listArtifacts(projectDir, config, 'epic');
|
|
51
|
+
if (epics.length === 0) {
|
|
52
|
+
logger.info('No epics found. Run "planr epic create" to create one.');
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
logger.heading('Epics');
|
|
56
|
+
for (const epic of epics) {
|
|
57
|
+
console.log(` ${epic.id} ${epic.title}`);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=epic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"epic.js","sourceRoot":"","sources":["../../../src/cli/commands/epic.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,MAAM,UAAU,mBAAmB,CAAC,OAAgB;IAClD,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,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{"version":3,"file":"feature.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/feature.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,QA6EtD"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { loadConfig } from '../../services/config-service.js';
|
|
2
|
+
import { createArtifact, listArtifacts, readArtifact } from '../../services/artifact-service.js';
|
|
3
|
+
import { promptText, promptMultiText } from '../../services/prompt-service.js';
|
|
4
|
+
import { logger } from '../../utils/logger.js';
|
|
5
|
+
export function registerFeatureCommand(program) {
|
|
6
|
+
const feature = program.command('feature').description('Manage features');
|
|
7
|
+
feature
|
|
8
|
+
.command('create')
|
|
9
|
+
.description('Create a new feature from an epic')
|
|
10
|
+
.requiredOption('--epic <epicId>', 'parent epic ID (e.g., EPIC-001)')
|
|
11
|
+
.option('--title <title>', 'feature title')
|
|
12
|
+
.action(async (opts) => {
|
|
13
|
+
const projectDir = program.opts().projectDir;
|
|
14
|
+
const config = await loadConfig(projectDir);
|
|
15
|
+
// Verify epic exists
|
|
16
|
+
const epicData = await readArtifact(projectDir, config, 'epic', opts.epic);
|
|
17
|
+
if (!epicData) {
|
|
18
|
+
logger.error(`Epic ${opts.epic} not found.`);
|
|
19
|
+
process.exit(1);
|
|
20
|
+
}
|
|
21
|
+
logger.heading(`Create Feature (from ${opts.epic})`);
|
|
22
|
+
const title = opts.title || (await promptText('Feature title:'));
|
|
23
|
+
const owner = await promptText('Owner:', config.author);
|
|
24
|
+
const overview = await promptText('Overview:');
|
|
25
|
+
const functionalRequirements = await promptMultiText('Functional requirements', 'comma-separated');
|
|
26
|
+
const dependencies = await promptText('Dependencies:', 'None');
|
|
27
|
+
const technicalConsiderations = await promptText('Technical considerations:', 'None');
|
|
28
|
+
const risks = await promptText('Risks:', 'None');
|
|
29
|
+
const successMetrics = await promptText('Success metrics:');
|
|
30
|
+
const { id, filePath } = await createArtifact(projectDir, config, 'feature', 'features/feature.md.hbs', {
|
|
31
|
+
title,
|
|
32
|
+
epicId: opts.epic,
|
|
33
|
+
owner,
|
|
34
|
+
overview,
|
|
35
|
+
functionalRequirements,
|
|
36
|
+
dependencies,
|
|
37
|
+
technicalConsiderations,
|
|
38
|
+
risks,
|
|
39
|
+
successMetrics,
|
|
40
|
+
storyIds: [],
|
|
41
|
+
});
|
|
42
|
+
logger.success(`Created feature ${id}: ${title}`);
|
|
43
|
+
logger.dim(` ${filePath}`);
|
|
44
|
+
logger.dim('');
|
|
45
|
+
logger.dim(`Next: planr story create --feature ${id}`);
|
|
46
|
+
});
|
|
47
|
+
feature
|
|
48
|
+
.command('list')
|
|
49
|
+
.description('List features')
|
|
50
|
+
.option('--epic <epicId>', 'filter by epic ID')
|
|
51
|
+
.action(async (opts) => {
|
|
52
|
+
const projectDir = program.opts().projectDir;
|
|
53
|
+
const config = await loadConfig(projectDir);
|
|
54
|
+
const features = await listArtifacts(projectDir, config, 'feature');
|
|
55
|
+
if (features.length === 0) {
|
|
56
|
+
logger.info('No features found. Run "planr feature create --epic <ID>" to create one.');
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
logger.heading('Features');
|
|
60
|
+
for (const f of features) {
|
|
61
|
+
console.log(` ${f.id} ${f.title}`);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature.js","sourceRoot":"","sources":["../../../src/cli/commands/feature.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACjG,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,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,CAAC;YAC1B,MAAM,CAAC,IAAI,CAAC,0EAA0E,CAAC,CAAC;YACxF,OAAO;QACT,CAAC;QAED,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAC3B,KAAK,MAAM,CAAC,IAAI,QAAQ,EAAE,CAAC;YACzB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;QACvC,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,QAkDnD"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { createDefaultConfig, saveConfig } from '../../services/config-service.js';
|
|
3
|
+
import { createChecklist } from '../../services/checklist-service.js';
|
|
4
|
+
import { ensureDir } from '../../utils/fs.js';
|
|
5
|
+
import { fileExists } from '../../utils/fs.js';
|
|
6
|
+
import { CONFIG_FILENAME, ARTIFACT_DIRS } from '../../utils/constants.js';
|
|
7
|
+
import { logger } from '../../utils/logger.js';
|
|
8
|
+
import { promptText, promptConfirm } from '../../services/prompt-service.js';
|
|
9
|
+
export function registerInitCommand(program) {
|
|
10
|
+
program
|
|
11
|
+
.command('init')
|
|
12
|
+
.description('Initialize Planr in the current project')
|
|
13
|
+
.option('--name <name>', 'project name')
|
|
14
|
+
.action(async (opts) => {
|
|
15
|
+
const projectDir = program.opts().projectDir;
|
|
16
|
+
const configPath = path.join(projectDir, CONFIG_FILENAME);
|
|
17
|
+
if (await fileExists(configPath)) {
|
|
18
|
+
const overwrite = await promptConfirm(`${CONFIG_FILENAME} already exists. Overwrite?`, false);
|
|
19
|
+
if (!overwrite) {
|
|
20
|
+
logger.info('Init cancelled.');
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
const projectName = opts.name || (await promptText('Project name:', path.basename(projectDir)));
|
|
25
|
+
const config = createDefaultConfig(projectName);
|
|
26
|
+
// Create directory structure
|
|
27
|
+
const agileDir = path.join(projectDir, config.outputPaths.agile);
|
|
28
|
+
for (const dir of Object.values(ARTIFACT_DIRS)) {
|
|
29
|
+
await ensureDir(path.join(agileDir, dir));
|
|
30
|
+
}
|
|
31
|
+
// Also create diagrams dir
|
|
32
|
+
await ensureDir(path.join(agileDir, 'diagrams'));
|
|
33
|
+
// Save config
|
|
34
|
+
await saveConfig(projectDir, config);
|
|
35
|
+
logger.success(`Created ${CONFIG_FILENAME}`);
|
|
36
|
+
// Create checklist
|
|
37
|
+
const checklistPath = await createChecklist(projectDir, config);
|
|
38
|
+
logger.success(`Created agile development checklist`);
|
|
39
|
+
logger.heading('Planr initialized!');
|
|
40
|
+
logger.info(`Project: ${projectName}`);
|
|
41
|
+
logger.info(`Artifacts: ${config.outputPaths.agile}/`);
|
|
42
|
+
logger.dim('');
|
|
43
|
+
logger.dim('Next steps:');
|
|
44
|
+
logger.dim(' planr epic create — Create your first epic');
|
|
45
|
+
logger.dim(' planr rules generate — Generate AI agent rules');
|
|
46
|
+
logger.dim(' planr checklist show — View the agile checklist');
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=init.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,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SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC;QAC5C,CAAC;QACD,2BAA2B;QAC3B,MAAM,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC;QAEjD,cAAc;QACd,MAAM,UAAU,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QACrC,MAAM,CAAC,OAAO,CAAC,WAAW,eAAe,EAAE,CAAC,CAAC;QAE7C,mBAAmB;QACnB,MAAM,aAAa,GAAG,MAAM,eAAe,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QAChE,MAAM,CAAC,OAAO,CAAC,qCAAqC,CAAC,CAAC;QAEtD,MAAM,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;QACrC,MAAM,CAAC,IAAI,CAAC,YAAY,WAAW,EAAE,CAAC,CAAC;QACvC,MAAM,CAAC,IAAI,CAAC,cAAc,MAAM,CAAC,WAAW,CAAC,KAAK,GAAG,CAAC,CAAC;QACvD,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACf,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QAC1B,MAAM,CAAC,GAAG,CAAC,qDAAqD,CAAC,CAAC;QAClE,MAAM,CAAC,GAAG,CAAC,sDAAsD,CAAC,CAAC;QACnE,MAAM,CAAC,GAAG,CAAC,wDAAwD,CAAC,CAAC;IACvE,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/rules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQpC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,QAiDpD"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { loadConfig } from '../../services/config-service.js';
|
|
2
|
+
import { createGenerators, createGenerator } from '../../generators/generator-factory.js';
|
|
3
|
+
import { writeFile, ensureDir } from '../../utils/fs.js';
|
|
4
|
+
import { logger } from '../../utils/logger.js';
|
|
5
|
+
import path from 'node:path';
|
|
6
|
+
export function registerRulesCommand(program) {
|
|
7
|
+
program
|
|
8
|
+
.command('rules')
|
|
9
|
+
.description('Generate AI agent rule files')
|
|
10
|
+
.command('generate')
|
|
11
|
+
.description('Generate rule files for configured AI CLIs')
|
|
12
|
+
.option('--target <target>', 'specific target: cursor, claude, codex, or all', 'all')
|
|
13
|
+
.option('--dry-run', 'show what would be generated without writing files', false)
|
|
14
|
+
.action(async (opts) => {
|
|
15
|
+
const projectDir = program.opts().projectDir;
|
|
16
|
+
const config = await loadConfig(projectDir);
|
|
17
|
+
// Empty artifact collection — generators read from disk as needed
|
|
18
|
+
const artifacts = {
|
|
19
|
+
epics: [],
|
|
20
|
+
features: [],
|
|
21
|
+
stories: [],
|
|
22
|
+
tasks: [],
|
|
23
|
+
};
|
|
24
|
+
const generators = opts.target === 'all'
|
|
25
|
+
? createGenerators(config, projectDir)
|
|
26
|
+
: [createGenerator(opts.target, config, projectDir)];
|
|
27
|
+
logger.heading('Generating AI Agent Rules');
|
|
28
|
+
let totalFiles = 0;
|
|
29
|
+
for (const generator of generators) {
|
|
30
|
+
const files = await generator.generate(artifacts);
|
|
31
|
+
logger.info(`${generator.getTargetName()}: ${files.length} file(s)`);
|
|
32
|
+
for (const file of files) {
|
|
33
|
+
const fullPath = path.join(projectDir, file.path);
|
|
34
|
+
if (opts.dryRun) {
|
|
35
|
+
logger.dim(` [dry-run] ${file.path}`);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
await ensureDir(path.dirname(fullPath));
|
|
39
|
+
await writeFile(fullPath, file.content);
|
|
40
|
+
logger.dim(` ${file.path}`);
|
|
41
|
+
}
|
|
42
|
+
totalFiles++;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
logger.success(`${opts.dryRun ? 'Would generate' : 'Generated'} ${totalFiles} rule file(s)`);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=rules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rules.js","sourceRoot":"","sources":["../../../src/cli/commands/rules.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAC1F,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,MAAM,UAAU,oBAAoB,CAAC,OAAgB;IACnD,OAAO;SACJ,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CAAC,8BAA8B,CAAC;SAC3C,OAAO,CAAC,UAAU,CAAC;SACnB,WAAW,CAAC,4CAA4C,CAAC;SACzD,MAAM,CAAC,mBAAmB,EAAE,gDAAgD,EAAE,KAAK,CAAC;SACpF,MAAM,CAAC,WAAW,EAAE,oDAAoD,EAAE,KAAK,CAAC;SAChF,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QACrB,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,UAAoB,CAAC;QACvD,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,UAAU,CAAC,CAAC;QAE5C,kEAAkE;QAClE,MAAM,SAAS,GAAuB;YACpC,KAAK,EAAE,EAAE;YACT,QAAQ,EAAE,EAAE;YACZ,OAAO,EAAE,EAAE;YACX,KAAK,EAAE,EAAE;SACV,CAAC;QAEF,MAAM,UAAU,GACd,IAAI,CAAC,MAAM,KAAK,KAAK;YACnB,CAAC,CAAC,gBAAgB,CAAC,MAAM,EAAE,UAAU,CAAC;YACtC,CAAC,CAAC,CAAC,eAAe,CAAC,IAAI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EAAE,MAAM,WAAW,CAAC;AAMpC,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,QAqCrD"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { loadConfig } from '../../services/config-service.js';
|
|
2
|
+
import { listArtifacts } from '../../services/artifact-service.js';
|
|
3
|
+
import { logger } from '../../utils/logger.js';
|
|
4
|
+
export function registerStatusCommand(program) {
|
|
5
|
+
program
|
|
6
|
+
.command('status')
|
|
7
|
+
.description('Show project planning status')
|
|
8
|
+
.action(async () => {
|
|
9
|
+
const projectDir = program.opts().projectDir;
|
|
10
|
+
const config = await loadConfig(projectDir);
|
|
11
|
+
logger.heading(`OpenPlanr Status — ${config.projectName}`);
|
|
12
|
+
console.log('');
|
|
13
|
+
const types = [
|
|
14
|
+
{ type: 'epic', label: 'Epics' },
|
|
15
|
+
{ type: 'feature', label: 'Features' },
|
|
16
|
+
{ type: 'story', label: 'User Stories' },
|
|
17
|
+
{ type: 'task', label: 'Task Lists' },
|
|
18
|
+
];
|
|
19
|
+
for (const { type, label } of types) {
|
|
20
|
+
const items = await listArtifacts(projectDir, config, type);
|
|
21
|
+
const count = items.length;
|
|
22
|
+
const icon = count > 0 ? '●' : '○';
|
|
23
|
+
console.log(` ${icon} ${label}: ${count}`);
|
|
24
|
+
if (count > 0) {
|
|
25
|
+
for (const item of items.slice(0, 5)) {
|
|
26
|
+
console.log(` ${item.id} ${item.title}`);
|
|
27
|
+
}
|
|
28
|
+
if (count > 5) {
|
|
29
|
+
console.log(` ... and ${count - 5} more`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
console.log('');
|
|
34
|
+
logger.dim('Targets: ' + config.targets.join(', '));
|
|
35
|
+
logger.dim('Artifacts: ' + config.outputPaths.agile + '/');
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.js","sourceRoot":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