planflow-ai 1.1.0 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +113 -21
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -92,15 +92,17 @@ Copy `skills/plan-flow/` to your project's `skills/plan-flow/`
92
92
 
93
93
  | Command | Description |
94
94
  |---------|-------------|
95
- | `/setup` | Analyze project and generate pattern files |
96
- | `/discovery-plan` | Create discovery document for requirements |
97
- | `/create-plan` | Create implementation plan with phases |
98
- | `/execute-plan` | Execute plan phases with verification |
95
+ | `/setup` | Analyze project structure, detect stack, and run security baseline |
96
+ | `/discovery-plan` | Create discovery document with iterative refinement |
97
+ | `/create-plan` | Create implementation plan with phases, evals, and complexity scores |
98
+ | `/execute-plan` | Execute plan phases with eval verification and pass@k tracking |
99
99
  | `/create-contract` | Create integration contract from API docs |
100
- | `/review-code` | Review local uncommitted changes |
101
- | `/review-pr` | Review a Pull Request |
100
+ | `/review-code` | Review local uncommitted changes (supports parallel review) |
101
+ | `/review-pr` | Review a Pull Request (supports parallel review) |
102
102
  | `/write-tests` | Generate tests for coverage target |
103
- | `/flow` | Toggle autopilot mode on/off |
103
+ | `/brain` | Capture meeting notes, ideas, and decisions into the project brain |
104
+ | `/learn` | Extract reusable patterns from the current session |
105
+ | `/flow` | Toggle autopilot mode with workflow type selection |
104
106
 
105
107
  ## Workflow
106
108
 
@@ -116,7 +118,7 @@ Copy `skills/plan-flow/` to your project's `skills/plan-flow/`
116
118
 
117
119
  ### Autopilot Mode
118
120
 
119
- Enable autopilot with `/flow -enable` and the full workflow runs automatically for feature requests:
121
+ Enable autopilot with `/flow -enable` and the full workflow runs automatically:
120
122
 
121
123
  ```
122
124
  You: "Add dark mode support"
@@ -129,11 +131,14 @@ You: "Add dark mode support"
129
131
  -> Archive (automatic)
130
132
  ```
131
133
 
132
- Autopilot classifies every input and only triggers the full flow for feature requests (complexity 3+). Questions, trivial tasks, and slash commands are handled normally.
134
+ Autopilot classifies every input and selects the appropriate workflow type. Questions, trivial tasks, and slash commands are handled normally.
133
135
 
134
136
  | Usage | Description |
135
137
  |-------|-------------|
136
- | `/flow -enable` | Enable autopilot mode |
138
+ | `/flow -enable` | Enable autopilot with default feature workflow |
139
+ | `/flow -enable bugfix` | Enable autopilot with bugfix workflow |
140
+ | `/flow -enable refactor` | Enable autopilot with refactor workflow |
141
+ | `/flow -enable security` | Enable autopilot with security workflow |
137
142
  | `/flow -disable` | Disable autopilot mode |
138
143
  | `/flow -status` | Check current state |
139
144
 
@@ -143,17 +148,92 @@ Autopilot classifies every input and only triggers the full flow for feature req
143
148
 
144
149
  State is persisted in `flow/.autopilot` (survives session restarts).
145
150
 
146
- ## Complexity Scoring
151
+ ### Workflow Types
147
152
 
148
- Every plan phase has a complexity score (0-10):
153
+ | Type | When to Use | Steps |
154
+ |------|-------------|-------|
155
+ | **feature** (default) | New functionality, behavior changes | contracts -> discovery -> plan -> execute -> review -> archive |
156
+ | **bugfix** | Bug reports, error fixes | review (diagnostic) -> plan -> execute -> review (verify) -> archive |
157
+ | **refactor** | Code restructuring, tech debt | review (baseline) -> discovery -> plan -> execute -> review (compare) -> archive |
158
+ | **security** | Vulnerability fixes, auth changes | review (audit) -> discovery -> plan -> execute -> review (security verify) -> archive |
149
159
 
150
- | Score | Level | Description |
151
- |-------|-------|-------------|
152
- | 0-2 | Trivial | Simple, mechanical changes |
153
- | 3-4 | Low | Straightforward implementation |
154
- | 5-6 | Medium | Moderate complexity |
155
- | 7-8 | High | Complex, multiple considerations |
156
- | 9-10 | Very High | Significant complexity/risk |
160
+ ## Key Features
161
+
162
+ ### Complexity Scoring
163
+
164
+ Every plan phase has a complexity score (0-10) that drives execution strategy:
165
+
166
+ | Score | Level | Execution Strategy |
167
+ |-------|-------|--------------------|
168
+ | 0-2 | Trivial | Aggregate with adjacent phases |
169
+ | 3-4 | Low | Aggregate if combined score <= 6 |
170
+ | 5-6 | Medium | Cautious, 1-2 phases at a time |
171
+ | 7-8 | High | Sequential, one phase at a time |
172
+ | 9-10 | Very High | Sequential with extra review |
173
+
174
+ ### Eval-Driven Development
175
+
176
+ Plan phases can define **evals** — testable assertions verified after each phase with **pass@k** tracking:
177
+
178
+ ```markdown
179
+ ### Phase 2: API Implementation
180
+
181
+ **Evals**:
182
+ - [EVAL-1]: POST /api/users returns 201 with valid body
183
+ - [EVAL-2]: Invalid input returns 400 with validation errors
184
+
185
+ - [ ] Create user endpoint
186
+ - [ ] Add input validation
187
+ ```
188
+
189
+ After execution, evals show results:
190
+
191
+ ```markdown
192
+ ### Phase 2: API Implementation ✅ (pass@1.5)
193
+
194
+ **Evals**:
195
+ - [EVAL-1]: ✅ (k=2) POST /api/users returns 201
196
+ - [EVAL-2]: ✅ (k=1) Invalid input returns 400
197
+ ```
198
+
199
+ ### Iterative Discovery Refinement
200
+
201
+ Discovery supports up to 3 rounds of refinement. After generating the discovery document, you can iteratively refine specific sections (requirements, approach, scope, risks) with targeted follow-up questions before proceeding to planning.
202
+
203
+ ### Parallel Code Review
204
+
205
+ For large changesets (8+ files), reviews automatically split files into directory-based groups and spawn parallel review agents. Results are aggregated into a unified review document.
206
+
207
+ ### Security Scanning
208
+
209
+ - **Setup scan**: `/setup` runs a security baseline — secret detection, `.env` hygiene check, security library inventory, and posture assessment
210
+ - **Auto scan**: Every `/execute-plan` run automatically scans changed files for secrets (Step 7.8), with results included in the handoff to code review
211
+ - **Security workflow**: Dedicated workflow type with mandatory security verification checkpoint
212
+
213
+ ### Architecture Decision Records (ADRs)
214
+
215
+ During discovery, when significant architectural decisions are made (choosing between alternatives with long-term impact), ADRs are automatically generated and stored in `flow/brain/decisions/`.
216
+
217
+ ### Project Brain
218
+
219
+ Automatic knowledge capture across all skills builds institutional memory:
220
+
221
+ - **Features**: History and context for each feature worked on
222
+ - **Errors**: Reusable error patterns and solutions
223
+ - **Decisions**: Architecture decision records with rationale
224
+ - **Sessions**: Daily activity logs
225
+
226
+ Brain data is Obsidian-compatible with `[[wiki-links]]` for graph visualization.
227
+
228
+ ### Agent Profiles
229
+
230
+ All commands operate under structured agent profiles that control tool access:
231
+
232
+ | Profile | Commands | Capabilities |
233
+ |---------|----------|-------------|
234
+ | **read-only** | discovery, create-plan, review-code, review-pr, create-contract | Read/search only, output to `flow/` |
235
+ | **write-restricted** | brain, learn, flow | Write only to `flow/brain/`, `flow/resources/` |
236
+ | **full-access** | execute-plan, setup, write-tests | All tools, all project files |
157
237
 
158
238
  ## Directory Structure
159
239
 
@@ -162,13 +242,25 @@ All artifacts are stored in `flow/`:
162
242
  ```
163
243
  flow/
164
244
  ├── archive/ # Completed/abandoned plans
245
+ ├── brain/ # Knowledge capture (Obsidian-compatible)
246
+ │ ├── index.md # Brain index
247
+ │ ├── features/ # Feature history
248
+ │ ├── errors/ # Error patterns
249
+ │ ├── decisions/ # ADRs and decision records
250
+ │ └── sessions/ # Daily activity logs
165
251
  ├── contracts/ # Integration contracts
166
252
  ├── discovery/ # Discovery documents
253
+ ├── handoffs/ # Context transfer between commands
167
254
  ├── plans/ # Active implementation plans
168
- ├── references/ # Reference materials
255
+ ├── references/ # Auto-generated reference materials
256
+ ├── resources/ # Captured artifacts from skill execution
169
257
  ├── reviewed-code/ # Code review documents
170
258
  ├── reviewed-pr/ # PR review documents
171
- └── ledger.md # Persistent project learning journal
259
+ ├── state/ # Execution state for session continuity
260
+ ├── audit.log # JSONL event log for workflow observability
261
+ ├── ledger.md # Persistent project learning journal
262
+ ├── log.md # Heartbeat log of important events
263
+ └── tasklist.md # Project todo list
172
264
  ```
173
265
 
174
266
  ## Requirements
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "planflow-ai",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "Structured AI-assisted development workflows for discovery, planning, execution, code reviews, and testing",
5
5
  "type": "module",
6
6
  "main": "dist/cli/index.js",