planflow-ai 1.3.4 → 1.3.5

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.
@@ -39,7 +39,7 @@ SETTINGS:
39
39
  commit=true|false Auto-commit after each completed phase (default: false)
40
40
  push=true|false Auto-push after all phases + build/test pass (default: false)
41
41
  branch=<name> Target branch for git operations (default: current branch)
42
- model_routing=true|false Auto-select model per phase based on complexity (default: true)
42
+ model_routing=true|false Auto-select model per phase based on complexity (default: false)
43
43
  phase_isolation=true|false Run each phase in isolated sub-agent with clean context (default: true)
44
44
 
45
45
  COST REPORTING:
@@ -111,7 +111,7 @@ Parse the user input to determine what action to take:
111
111
  | `commit` | `true`, `false` | `false` | Auto-commit after each phase |
112
112
  | `push` | `true`, `false` | `false` | Auto-push after completion |
113
113
  | `branch` | any string | current branch | Target branch for git ops |
114
- | `model_routing` | `true`, `false` | `true` | Auto-select model per phase based on complexity |
114
+ | `model_routing` | `true`, `false` | `false` | Auto-select model per phase based on complexity |
115
115
  | `phase_isolation` | `true`, `false` | `true` | Run each phase in isolated sub-agent with clean context |
116
116
 
117
117
  ---
@@ -242,7 +242,7 @@ autopilot: false
242
242
  commit: false
243
243
  push: false
244
244
  branch: ""
245
- model_routing: true
245
+ model_routing: false
246
246
  phase_isolation: true
247
247
  ```
248
248
 
@@ -7,7 +7,7 @@ Automatic model selection at phase boundaries during `/execute-plan`. Each phase
7
7
 
8
8
  **Scope**: `/execute-plan` only. Other skills (discovery, review, brainstorm) do not have pre-defined complexity scores and are not routed.
9
9
 
10
- **Config**: Controlled by `model_routing` key in `flow/.flowconfig` (default: `true`). Set `model_routing: false` to disable.
10
+ **Config**: Controlled by `model_routing` key in `flow/.flowconfig` (default: `false`). Set `model_routing: true` to enable.
11
11
 
12
12
  ---
13
13
 
@@ -23,12 +23,16 @@ Automatic model selection at phase boundaries during `/execute-plan`. Each phase
23
23
 
24
24
  ## Platform Mappings
25
25
 
26
+ Always use the **latest and most capable model** from each provider. Model names below are examples — always prefer the most recent version available at runtime.
27
+
26
28
  | Tier | Claude Code | Codex (OpenAI) | Cursor |
27
29
  |------|------------|----------------|--------|
28
30
  | Fast | `haiku` | `gpt-4.1-mini` | auto (fast) |
29
31
  | Standard | `sonnet` | `gpt-4.1` | auto (normal) |
30
32
  | Powerful | `opus` | `o3` | auto (max) |
31
33
 
34
+ **Default model (when routing is OFF)**: Always use the most capable/recent model from the active provider — e.g., `opus` for Anthropic, `o3` for OpenAI. This is the default behavior.
35
+
32
36
  **Fallback rule**: If a platform doesn't support a tier, fall back to the next tier up (e.g., if no haiku equivalent, use Standard).
33
37
 
34
38
  ---
@@ -37,7 +41,7 @@ Automatic model selection at phase boundaries during `/execute-plan`. Each phase
37
41
 
38
42
  ### At Each Phase Boundary
39
43
 
40
- 1. **Check config**: Read `model_routing` from `flow/.flowconfig`. If `false` or missing key, skip routing (use session default).
44
+ 1. **Check config**: Read `model_routing` from `flow/.flowconfig`. If `false`, missing key, or not set, skip routing (use the most capable session model — this is the default).
41
45
  2. **Read complexity**: Get the phase's complexity score from the plan file.
42
46
  3. **Look up tier**: Map score to tier using the table above.
43
47
  4. **Spawn subagent**: Use the Agent tool with `model={tier_model}` to implement the phase.
@@ -189,11 +189,11 @@ Wait for user confirmation before proceeding.
189
189
  1. **Auto-switch to Plan mode** - Call `SwitchMode` tool
190
190
  2. **Present phase details** - Show scope, tasks, and approach
191
191
  3. **Wait for approval** - Get user confirmation
192
- 4. **Select model tier** - If `model_routing` is enabled in `flow/.flowconfig` (default: `true`):
192
+ 4. **Select model tier** - If `model_routing` is enabled in `flow/.flowconfig` (default: `false` — uses the most capable session model):
193
193
  - Read the phase's complexity score
194
194
  - Look up model tier: **0-3 → Fast (haiku)**, **4-5 → Standard (sonnet)**, **6-10 → Powerful (opus)**
195
195
  - For aggregated phases, use the **highest individual phase complexity** to determine the tier
196
- - If `model_routing` is `false` or key is missing, skip routing (use session model)
196
+ - If `model_routing` is `false` or key is missing, skip routing (use the most capable model from the active provider — e.g., opus for Anthropic, o3 for OpenAI)
197
197
  - See `.claude/resources/core/model-routing.md` for full tier table, platform mappings, and rules
198
198
  5. **Inject design context** - Before implementing, check if the discovery doc (from plan's "Based on Discovery" field) has a `## Design Context` section. If present and the phase involves UI work (see UI Phase Detection Heuristics in `.claude/resources/core/design-awareness.md`), include the Design Context in the implementation prompt. If no Design Context or phase is not UI-related, skip this step.
199
199
  6. **Implement (with phase isolation)** - Check `phase_isolation` in `flow/.flowconfig` (default: `true`):
@@ -256,4 +256,42 @@ const badExample = problematicCode()
256
256
 
257
257
  ## Project Anti-Patterns
258
258
 
259
+ ### 6. DON'T Execute ORM/Database Migration Commands Directly
260
+
261
+ **Problem**: Running ORM tools (Prisma, Drizzle, TypeORM, Sequelize, Knex, Django ORM, Alembic, etc.) directly can cause irreversible data loss, schema corruption, or unintended migrations in production environments.
262
+
263
+ ```bash
264
+ # BAD - Never run these directly
265
+ npx prisma migrate dev
266
+ npx prisma db push
267
+ npx prisma db seed
268
+ npx drizzle-kit push
269
+ npx drizzle-kit migrate
270
+ npx typeorm migration:run
271
+ python manage.py migrate
272
+ alembic upgrade head
273
+ npx knex migrate:latest
274
+ ```
275
+
276
+ **Why This is Wrong**:
277
+
278
+ - Database migrations can be destructive and irreversible (dropping columns, tables, data)
279
+ - ORM commands may connect to production databases if environment is misconfigured
280
+ - Schema changes need human review before execution
281
+ - Seed commands can overwrite existing data
282
+ - The AI agent has no way to verify which database environment it's targeting
283
+
284
+ **Fix**: Always present the command to the user and ask them to execute it manually.
285
+
286
+ ```markdown
287
+ <!-- GOOD - Ask the user to run it -->
288
+ "Please run the following command to apply the migration:"
289
+
290
+ `npx prisma migrate dev --name add_users_table`
291
+
292
+ "Review the generated migration SQL before confirming."
293
+ ```
294
+
295
+ **Scope**: This applies to ALL ORM and database tools — Prisma, Drizzle, TypeORM, Sequelize, Knex, Django ORM, Alembic, SQLAlchemy, ActiveRecord, and any other database migration or seeding tool.
296
+
259
297
  <!-- auto-captured anti-patterns below this line -->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "planflow-ai",
3
- "version": "1.3.4",
3
+ "version": "1.3.5",
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",