planflow-ai 1.3.0 → 1.3.4
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/.claude/commands/brainstorm.md +2 -2
- package/.claude/commands/discovery-plan.md +11 -0
- package/.claude/commands/execute-plan.md +26 -2
- package/.claude/commands/flow.md +5 -0
- package/.claude/commands/heartbeat.md +1 -1
- package/.claude/commands/learn.md +4 -6
- package/.claude/commands/{brain.md → note.md} +12 -12
- package/.claude/commands/review-code.md +61 -1
- package/.claude/commands/review-pr.md +61 -1
- package/.claude/commands/setup.md +11 -1
- package/.claude/resources/core/_index.md +102 -2
- package/.claude/resources/core/compaction-guide.md +111 -0
- package/.claude/resources/core/discovery-sub-agents.md +266 -0
- package/.claude/resources/core/phase-isolation.md +222 -0
- package/.claude/resources/core/resource-capture.md +1 -1
- package/.claude/resources/core/review-adaptive-depth.md +217 -0
- package/.claude/resources/core/review-multi-agent.md +289 -0
- package/.claude/resources/core/review-severity-ranking.md +149 -0
- package/.claude/resources/core/review-verification.md +158 -0
- package/.claude/resources/core/session-scratchpad.md +105 -0
- package/.claude/resources/patterns/review-code-templates.md +315 -2
- package/.claude/resources/skills/_index.md +108 -42
- package/.claude/resources/skills/brain-skill.md +3 -3
- package/.claude/resources/skills/discovery-skill.md +50 -6
- package/.claude/resources/skills/execute-plan-skill.md +14 -6
- package/.claude/resources/skills/review-code-skill.md +73 -0
- package/.claude/resources/skills/review-pr-skill.md +58 -0
- package/README.md +38 -3
- package/dist/cli/commands/heartbeat.js.map +1 -1
- package/dist/cli/daemon/heartbeat-daemon.js +31 -1
- package/dist/cli/daemon/heartbeat-daemon.js.map +1 -1
- package/dist/cli/daemon/heartbeat-parser.d.ts.map +1 -1
- package/dist/cli/daemon/heartbeat-parser.js +6 -0
- package/dist/cli/daemon/heartbeat-parser.js.map +1 -1
- package/dist/cli/handlers/claude.js +20 -12
- package/dist/cli/handlers/claude.js.map +1 -1
- package/dist/cli/types.d.ts +1 -0
- package/dist/cli/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/rules/skills/brain-skill.mdc +4 -4
- package/skills/plan-flow/SKILL.md +1 -1
- package/skills/plan-flow/brain/SKILL.md +1 -1
- package/templates/shared/AGENTS.md.template +1 -1
- package/templates/shared/CLAUDE.md.template +11 -1
|
@@ -58,7 +58,7 @@ WHAT IT IS:
|
|
|
58
58
|
|
|
59
59
|
WHAT IT IS NOT:
|
|
60
60
|
- Not /discovery-plan — no codebase scanning, no requirements docs
|
|
61
|
-
- Not /
|
|
61
|
+
- Not /note — no knowledge capture, no wiki-links
|
|
62
62
|
- Not a plan — no phases, no complexity scores
|
|
63
63
|
|
|
64
64
|
RECOMMENDED MODEL:
|
|
@@ -67,7 +67,7 @@ RECOMMENDED MODEL:
|
|
|
67
67
|
RELATED COMMANDS:
|
|
68
68
|
/discovery-plan Ground the brainstorm idea into the project
|
|
69
69
|
/create-plan Create plan from discovery document
|
|
70
|
-
/
|
|
70
|
+
/note Capture knowledge (different purpose)
|
|
71
71
|
```
|
|
72
72
|
|
|
73
73
|
---
|
|
@@ -278,6 +278,7 @@ This command uses hierarchical context loading to reduce context consumption. In
|
|
|
278
278
|
| SKL-DIS-1 | Discovery skill workflow | Understanding full process |
|
|
279
279
|
| TLS-IQ-2 | How to switch to Plan mode | Before asking questions |
|
|
280
280
|
| TLS-IQ-3 | How to ask questions | When gathering requirements |
|
|
281
|
+
| COR-CG-1 | Compaction guide | Load when compacting mid-discovery |
|
|
281
282
|
|
|
282
283
|
### Expansion Instructions
|
|
283
284
|
|
|
@@ -389,6 +390,16 @@ Only save if the user approves. Do not re-ask if declined.
|
|
|
389
390
|
|
|
390
391
|
---
|
|
391
392
|
|
|
393
|
+
## Discovery Sub-Agents
|
|
394
|
+
|
|
395
|
+
After reading referenced documents (Step 1), three parallel Agent sub-agents explore the codebase simultaneously: **Similar Features** (finds related existing code), **API/Data Patterns** (maps endpoints and service patterns), and **Schema/Types** (explores type definitions and schemas). All use haiku model.
|
|
396
|
+
|
|
397
|
+
Each sub-agent returns condensed JSON findings (under 2K tokens) that the coordinator merges into a `## Codebase Analysis` section in the discovery document. Findings also inform the clarifying questions in Step 2.
|
|
398
|
+
|
|
399
|
+
Always-on — no configuration needed. See `.claude/resources/core/discovery-sub-agents.md` for full rules.
|
|
400
|
+
|
|
401
|
+
---
|
|
402
|
+
|
|
392
403
|
## Design Awareness
|
|
393
404
|
|
|
394
405
|
During discovery, always ask whether the feature involves UI work. If confirmed, follow the design question flow to capture structured design tokens (colors, typography, spacing, component patterns) into a `## Design Context` section in the discovery document.
|
|
@@ -328,11 +328,25 @@ This command uses hierarchical context loading to reduce context consumption. In
|
|
|
328
328
|
|
|
329
329
|
| Code | Description | When to Expand |
|
|
330
330
|
|------|-------------|----------------|
|
|
331
|
-
| SKL-EXEC-
|
|
332
|
-
| SKL-EXEC-
|
|
331
|
+
| SKL-EXEC-2 | Critical rules (build, DB) | Need build/DB command restrictions |
|
|
332
|
+
| SKL-EXEC-4 | Analyze complexity | Determining execution strategy |
|
|
333
|
+
| SKL-EXEC-6 | Execute phase with Plan mode | Running a specific phase |
|
|
334
|
+
| SKL-EXEC-8 | Phase-boundary compaction | Compacting between phases |
|
|
335
|
+
| SKL-EXEC-9 | Handle tests phase | Executing the tests phase |
|
|
336
|
+
| SKL-EXEC-10 | Build and test verification | Final verification step |
|
|
337
|
+
| SKL-EXEC-11 | Complexity-based behavior | Need low/medium/high behavior details |
|
|
338
|
+
| SKL-EXEC-12 | Error handling | Build/test failure or cancellation |
|
|
333
339
|
| COR-CS-1 | Complexity scoring table | Interpreting phase complexity |
|
|
334
340
|
| TLS-PLN-1 | Plan mode switching | Before each phase |
|
|
335
341
|
| TLS-PLN-2 | Plan mode workflow | Presenting phase details |
|
|
342
|
+
| COR-CG-1 | Compaction guide purpose | When compacting at phase boundaries |
|
|
343
|
+
| COR-CG-2 | Preserve rules | Crafting compact summary — what to keep |
|
|
344
|
+
| COR-CG-3 | Discard rules | Crafting compact summary — what to drop |
|
|
345
|
+
| COR-CG-4 | Compact summary template | Structuring compact instructions |
|
|
346
|
+
| COR-PI-1 | Phase isolation architecture | Understanding isolated sub-agent flow |
|
|
347
|
+
| COR-PI-2 | Sub-agent context template | Preparing focused prompt for sub-agent |
|
|
348
|
+
| COR-PI-3 | Return format schema | Parsing sub-agent JSON response |
|
|
349
|
+
| COR-PI-4 | Coordinator processing rules | Handling success/failure/partial returns |
|
|
336
350
|
|
|
337
351
|
### Expansion Instructions
|
|
338
352
|
|
|
@@ -465,3 +479,13 @@ Routing happens at Step 4 of the execution skill — the phase implementation is
|
|
|
465
479
|
|
|
466
480
|
Disable with `/flow model_routing=false`. See `.claude/resources/core/model-routing.md` for full tier table, platform mappings, and aggregation rules.
|
|
467
481
|
|
|
482
|
+
---
|
|
483
|
+
|
|
484
|
+
## Phase Isolation
|
|
485
|
+
|
|
486
|
+
When `phase_isolation: true` in `flow/.flowconfig` (default), each phase implementation runs in an **isolated Agent sub-agent** with a clean context window. The sub-agent receives only: phase spec, files modified so far, pattern file paths, and design context (if UI phase). It returns a structured JSON summary (1-2K tokens) with status, files changed, decisions, errors, and captured patterns.
|
|
487
|
+
|
|
488
|
+
This eliminates context rot — phase 7 has the same quality as phase 1. Planning/approval stays in the main session; only the implementation step is isolated.
|
|
489
|
+
|
|
490
|
+
Disable with `/flow phase_isolation=false`. See `.claude/resources/core/phase-isolation.md` for the full context template, return format schema, and coordinator processing rules.
|
|
491
|
+
|
package/.claude/commands/flow.md
CHANGED
|
@@ -40,6 +40,7 @@ SETTINGS:
|
|
|
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
42
|
model_routing=true|false Auto-select model per phase based on complexity (default: true)
|
|
43
|
+
phase_isolation=true|false Run each phase in isolated sub-agent with clean context (default: true)
|
|
43
44
|
|
|
44
45
|
COST REPORTING:
|
|
45
46
|
/flow cost Last 7 days summary (default)
|
|
@@ -57,6 +58,7 @@ EXAMPLES:
|
|
|
57
58
|
/flow branch=development # Set target branch
|
|
58
59
|
/flow commit=false push=false # Disable git control
|
|
59
60
|
/flow model_routing=false # Disable model routing (use session model for all phases)
|
|
61
|
+
/flow phase_isolation=false # Disable phase isolation (inline execution, for debugging)
|
|
60
62
|
/flow cost # Show cost report (last 7 days)
|
|
61
63
|
/flow cost --today --detail # Today's costs with model breakdown
|
|
62
64
|
/flow -status # Show current config
|
|
@@ -110,6 +112,7 @@ Parse the user input to determine what action to take:
|
|
|
110
112
|
| `push` | `true`, `false` | `false` | Auto-push after completion |
|
|
111
113
|
| `branch` | any string | current branch | Target branch for git ops |
|
|
112
114
|
| `model_routing` | `true`, `false` | `true` | Auto-select model per phase based on complexity |
|
|
115
|
+
| `phase_isolation` | `true`, `false` | `true` | Run each phase in isolated sub-agent with clean context |
|
|
113
116
|
|
|
114
117
|
---
|
|
115
118
|
|
|
@@ -239,6 +242,8 @@ autopilot: false
|
|
|
239
242
|
commit: false
|
|
240
243
|
push: false
|
|
241
244
|
branch: ""
|
|
245
|
+
model_routing: true
|
|
246
|
+
phase_isolation: true
|
|
242
247
|
```
|
|
243
248
|
|
|
244
249
|
**Location**: `flow/.flowconfig`
|
|
@@ -26,11 +26,10 @@ This command has two modes:
|
|
|
26
26
|
| User Input | Mode | What To Do |
|
|
27
27
|
|------------|------|------------|
|
|
28
28
|
| `/learn` (no arguments) | **Pattern Extraction** | Scan session for reusable patterns (Steps 1-4 below) |
|
|
29
|
-
| `/learn
|
|
30
|
-
| `/learn <topic>` (any text after /learn) | **Teaching Mode** | Same as above — treat any argument as a topic to teach |
|
|
29
|
+
| `/learn <topic>` (any text after /learn) | **Teaching Mode** | Create a step-by-step curriculum to TEACH the user about `<topic>` |
|
|
31
30
|
| `/learn -help` | Help | Show help and stop |
|
|
32
31
|
|
|
33
|
-
**Rule**: If the user provides ANY
|
|
32
|
+
**Rule**: If the user provides ANY text after `/learn`, you are in **Teaching Mode**. The ONLY way to trigger Pattern Extraction is `/learn` with no arguments.
|
|
34
33
|
|
|
35
34
|
**Teaching Mode means**: You are a TEACHER. You create a structured curriculum and teach the user step by step. You do NOT extract patterns from the session. You do NOT create `learned-*.md` files. You CREATE a curriculum and TEACH.
|
|
36
35
|
|
|
@@ -49,8 +48,7 @@ DESCRIPTION:
|
|
|
49
48
|
|
|
50
49
|
USAGE:
|
|
51
50
|
/learn Analyze session and suggest patterns to extract
|
|
52
|
-
/learn
|
|
53
|
-
/learn <topic> Same as above — teach me about <topic>
|
|
51
|
+
/learn <topic> Teach me about <topic> step by step
|
|
54
52
|
/learn -help Show this help
|
|
55
53
|
|
|
56
54
|
PATTERN EXTRACTION MODE (/learn):
|
|
@@ -81,7 +79,7 @@ TEACHING MODE (/learn about <topic>):
|
|
|
81
79
|
Index: ~/plan-flow/brain/learns/_index.md (LRN-* codes)
|
|
82
80
|
|
|
83
81
|
RELATED COMMANDS:
|
|
84
|
-
/
|
|
82
|
+
/note Capture meeting notes, ideas, brainstorms
|
|
85
83
|
/setup Generate project pattern files
|
|
86
84
|
/review-code Review local uncommitted changes
|
|
87
85
|
```
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Manual
|
|
2
|
+
description: Manual note entry - capture meeting notes, ideas, brainstorms, and insights into the project brain
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
#
|
|
5
|
+
# Note: Manual Knowledge Capture
|
|
6
6
|
|
|
7
7
|
## Command Description
|
|
8
8
|
|
|
@@ -18,25 +18,25 @@ This command allows manual brain entries for capturing meeting notes, brainstorm
|
|
|
18
18
|
**If the user invokes this command with `-help`, display only this section and stop:**
|
|
19
19
|
|
|
20
20
|
```
|
|
21
|
-
/
|
|
21
|
+
/note - Manual Brain Entry
|
|
22
22
|
|
|
23
23
|
DESCRIPTION:
|
|
24
24
|
Capture meeting notes, brainstorms, ideas, and insights into the
|
|
25
25
|
project brain. Creates Obsidian-compatible markdown with [[wiki-links]].
|
|
26
26
|
|
|
27
27
|
USAGE:
|
|
28
|
-
/
|
|
29
|
-
/
|
|
30
|
-
/
|
|
28
|
+
/note <free text> Free-text mode (default)
|
|
29
|
+
/note -guided Guided mode with structured questions
|
|
30
|
+
/note -help Show this help
|
|
31
31
|
|
|
32
32
|
ARGUMENTS:
|
|
33
33
|
free text Unstructured text to parse and categorize
|
|
34
34
|
-guided Triggers structured question mode
|
|
35
35
|
|
|
36
36
|
EXAMPLES:
|
|
37
|
-
/
|
|
38
|
-
/
|
|
39
|
-
/
|
|
37
|
+
/note Had a call with the team about auth flow. Decision: use JWT with refresh tokens.
|
|
38
|
+
/note Discovered that the API rate limits at 100 req/min. Need to add throttling.
|
|
39
|
+
/note -guided
|
|
40
40
|
|
|
41
41
|
OUTPUT:
|
|
42
42
|
- Writes to appropriate flow/brain/ subdirectory
|
|
@@ -90,7 +90,7 @@ If no content and no `-guided` flag, ask:
|
|
|
90
90
|
```markdown
|
|
91
91
|
What would you like to capture? You can:
|
|
92
92
|
1. Type free text and I'll categorize it automatically
|
|
93
|
-
2. Use `/
|
|
93
|
+
2. Use `/note -guided` for structured prompts
|
|
94
94
|
```
|
|
95
95
|
|
|
96
96
|
---
|
|
@@ -175,7 +175,7 @@ Brain entry captured!
|
|
|
175
175
|
|
|
176
176
|
```
|
|
177
177
|
+------------------------------------------+
|
|
178
|
-
| /
|
|
178
|
+
| /note COMMAND |
|
|
179
179
|
+------------------------------------------+
|
|
180
180
|
|
|
|
181
181
|
v
|
|
@@ -214,7 +214,7 @@ Brain entry captured!
|
|
|
214
214
|
|
|
215
215
|
### Recommended Loading Order
|
|
216
216
|
|
|
217
|
-
1. **Always load first**: This command file (`commands/
|
|
217
|
+
1. **Always load first**: This command file (`commands/note.md`)
|
|
218
218
|
2. **Load indexes**: Load `_index.md` files for relevant folders
|
|
219
219
|
3. **Expand on-demand**: Use reference codes to load specific sections when needed
|
|
220
220
|
|
|
@@ -46,6 +46,11 @@ WORKFLOW:
|
|
|
46
46
|
4. Compares against existing patterns
|
|
47
47
|
5. Generates review document with findings
|
|
48
48
|
|
|
49
|
+
ADAPTIVE DEPTH:
|
|
50
|
+
< 50 lines Lightweight (security, logic bugs, breaking changes only)
|
|
51
|
+
50-500 lines Standard (full review)
|
|
52
|
+
500+ lines Deep (multi-pass, severity-grouped, executive summary)
|
|
53
|
+
|
|
49
54
|
REVIEW CATEGORIES:
|
|
50
55
|
- Pattern compliance
|
|
51
56
|
- Code quality issues
|
|
@@ -145,10 +150,24 @@ This command uses hierarchical context loading to reduce context consumption. In
|
|
|
145
150
|
|
|
146
151
|
| Code | Description | When to Expand |
|
|
147
152
|
|------|-------------|----------------|
|
|
148
|
-
| SKL-REV-1 |
|
|
153
|
+
| SKL-REV-1 | Purpose and restrictions | Understanding allowed actions |
|
|
154
|
+
| SKL-REV-2 | Identify changed files | Starting the review |
|
|
155
|
+
| SKL-REV-3 | Determine review depth | Adaptive depth selection |
|
|
156
|
+
| SKL-REV-5 | Find similar implementations | Searching for comparable code |
|
|
157
|
+
| SKL-REV-7 | Pattern conflicts + verify + re-rank | Processing findings |
|
|
158
|
+
| SKL-REV-8 | Generate review document | Creating the output file |
|
|
159
|
+
| SKL-REV-9 | Severity and conflict resolution | Severity levels and resolution options |
|
|
149
160
|
| PTN-REV-1 | Review document structure | Creating review output |
|
|
150
161
|
| COR-AP-1 | Allowed patterns overview | Checking pattern compliance |
|
|
151
162
|
| COR-FP-1 | Forbidden patterns overview | Identifying anti-patterns |
|
|
163
|
+
| COR-MA-1 | Multi-agent subagent definitions | Deep mode parallel review setup |
|
|
164
|
+
| COR-MA-2 | Coordinator dedup and merge | Deep mode result processing |
|
|
165
|
+
| COR-SR-1 | Severity re-ranking algorithm | Ordering findings by impact |
|
|
166
|
+
| COR-SR-2 | Finding grouping rules | Grouping related findings |
|
|
167
|
+
| COR-AD-1 | Adaptive depth size detection | Determining review mode |
|
|
168
|
+
| COR-AD-2 | Lightweight review mode | Changeset < 50 lines |
|
|
169
|
+
| COR-AD-3 | Deep review mode | Changeset 500+ lines |
|
|
170
|
+
| COR-CG-1 | Compaction guide | Load when compacting mid-review |
|
|
152
171
|
|
|
153
172
|
### Expansion Instructions
|
|
154
173
|
|
|
@@ -241,6 +260,47 @@ Only save if the user approves. Do not re-ask if declined.
|
|
|
241
260
|
|
|
242
261
|
---
|
|
243
262
|
|
|
263
|
+
## Multi-Agent Parallel Review
|
|
264
|
+
|
|
265
|
+
For Deep mode reviews (500+ lines), the review is split into 4 specialized subagents running in parallel:
|
|
266
|
+
|
|
267
|
+
| Agent | Focus | Model |
|
|
268
|
+
|-------|-------|-------|
|
|
269
|
+
| Security | Vulnerabilities, secrets, injection, auth bypass | sonnet |
|
|
270
|
+
| Logic & Bugs | Edge cases, null handling, race conditions, wrong logic | sonnet |
|
|
271
|
+
| Performance | N+1 queries, memory leaks, blocking I/O, re-renders | sonnet |
|
|
272
|
+
| Pattern Compliance | Forbidden/allowed patterns, naming, consistency | haiku |
|
|
273
|
+
|
|
274
|
+
The coordinator merges results, deduplicates overlapping findings, then runs verification and re-ranking.
|
|
275
|
+
|
|
276
|
+
See `.claude/resources/core/review-multi-agent.md` for full rules.
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
## Adaptive Depth
|
|
281
|
+
|
|
282
|
+
Review depth scales automatically based on changeset size:
|
|
283
|
+
|
|
284
|
+
| Lines Changed | Mode | Behavior |
|
|
285
|
+
|--------------|------|----------|
|
|
286
|
+
| < 50 | **Lightweight** | Quick-scan for security, logic bugs, breaking changes only. Skips pattern loading, similar implementations, verification pass. |
|
|
287
|
+
| 50–500 | **Standard** | Full review (current behavior, no changes). |
|
|
288
|
+
| 500+ | **Deep** | Multi-pass review with file categorization, severity-grouped output, executive summary, and mandatory verification pass. |
|
|
289
|
+
|
|
290
|
+
Thresholds are hardcoded. The detected mode is displayed before the review starts.
|
|
291
|
+
|
|
292
|
+
See `.claude/resources/core/review-adaptive-depth.md` for full rules and `.claude/resources/patterns/review-code-templates.md` for lightweight and deep templates.
|
|
293
|
+
|
|
294
|
+
---
|
|
295
|
+
|
|
296
|
+
## Verification Pass
|
|
297
|
+
|
|
298
|
+
After initial analysis, all findings undergo a second-pass verification. Each finding is re-examined against 15 lines of surrounding context and classified as Confirmed, Likely, or Dismissed. False positives are filtered before output. A Verification Summary shows filter stats.
|
|
299
|
+
|
|
300
|
+
See `.claude/resources/core/review-verification.md` for classification criteria, category-specific questions, and output format.
|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
244
304
|
## Pattern Capture
|
|
245
305
|
|
|
246
306
|
During code review, silently watch for anti-patterns found in changed code, good patterns that should be documented, and pattern conflicts between new and existing code. Append captured patterns to `flow/resources/pending-patterns.md` without interrupting work.
|
|
@@ -49,6 +49,11 @@ WORKFLOW:
|
|
|
49
49
|
5. Analyzes code changes
|
|
50
50
|
6. Generates review document
|
|
51
51
|
|
|
52
|
+
ADAPTIVE DEPTH:
|
|
53
|
+
< 50 lines Lightweight (security, logic bugs, breaking changes only)
|
|
54
|
+
50-500 lines Standard (full review)
|
|
55
|
+
500+ lines Deep (multi-pass, severity-grouped, executive summary)
|
|
56
|
+
|
|
52
57
|
REVIEW INCLUDES:
|
|
53
58
|
- Summary of changes
|
|
54
59
|
- Pattern compliance check
|
|
@@ -140,12 +145,26 @@ This command uses hierarchical context loading to reduce context consumption. In
|
|
|
140
145
|
|
|
141
146
|
| Code | Description | When to Expand |
|
|
142
147
|
|------|-------------|----------------|
|
|
143
|
-
| SKL-PR-1 |
|
|
148
|
+
| SKL-PR-1 | Purpose and restrictions | Understanding allowed actions |
|
|
149
|
+
| SKL-PR-2 | Authenticate for PR access | Setting up authentication |
|
|
150
|
+
| SKL-PR-3 | Fetch PR info + determine depth | Getting PR data and review mode |
|
|
151
|
+
| SKL-PR-5 | Analyze + verify + re-rank | Processing findings |
|
|
152
|
+
| SKL-PR-6 | Generate review document | Creating the output file |
|
|
153
|
+
| SKL-PR-7 | Output template | Review document structure |
|
|
154
|
+
| SKL-PR-8 | Fix complexity scoring | Severity and complexity details |
|
|
155
|
+
| SKL-PR-9 | Link format (GitHub/Azure DevOps) | Platform-specific link formats |
|
|
144
156
|
| TLS-AUTH-1 | Auth tool configuration | Setting up authentication |
|
|
145
157
|
| TLS-AUTH-2 | Authentication workflow | Authenticating to platform |
|
|
146
158
|
| PTN-PR-1 | PR review patterns | Creating review output |
|
|
147
159
|
| COR-AP-1 | Allowed patterns overview | Checking pattern compliance |
|
|
148
160
|
| COR-FP-1 | Forbidden patterns overview | Identifying anti-patterns |
|
|
161
|
+
| COR-MA-1 | Multi-agent subagent definitions | Deep mode parallel review setup |
|
|
162
|
+
| COR-MA-2 | Coordinator dedup and merge | Deep mode result processing |
|
|
163
|
+
| COR-SR-1 | Severity re-ranking algorithm | Ordering findings by impact |
|
|
164
|
+
| COR-SR-2 | Finding grouping rules | Grouping related findings |
|
|
165
|
+
| COR-AD-1 | Adaptive depth size detection | Determining review mode |
|
|
166
|
+
| COR-AD-2 | Lightweight review mode | Changeset < 50 lines |
|
|
167
|
+
| COR-AD-3 | Deep review mode | Changeset 500+ lines |
|
|
149
168
|
|
|
150
169
|
### Expansion Instructions
|
|
151
170
|
|
|
@@ -238,3 +257,44 @@ During this skill's execution, watch for valuable reference materials worth pres
|
|
|
238
257
|
At natural break points, if you encounter information that could be useful for future development (API specs, architecture notes, config references, domain knowledge, etc.), ask the user: "I found something that could be useful for future reference: _{brief description}_. Should I save it to `flow/resources/`?"
|
|
239
258
|
|
|
240
259
|
Only save if the user approves. Do not re-ask if declined.
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
## Multi-Agent Parallel Review
|
|
264
|
+
|
|
265
|
+
For Deep mode reviews (500+ lines), the review is split into 4 specialized subagents running in parallel:
|
|
266
|
+
|
|
267
|
+
| Agent | Focus | Model |
|
|
268
|
+
|-------|-------|-------|
|
|
269
|
+
| Security | Vulnerabilities, secrets, injection, auth bypass | sonnet |
|
|
270
|
+
| Logic & Bugs | Edge cases, null handling, race conditions, wrong logic | sonnet |
|
|
271
|
+
| Performance | N+1 queries, memory leaks, blocking I/O, re-renders | sonnet |
|
|
272
|
+
| Pattern Compliance | Forbidden/allowed patterns, naming, consistency | haiku |
|
|
273
|
+
|
|
274
|
+
The coordinator merges results, deduplicates overlapping findings, then runs verification and re-ranking.
|
|
275
|
+
|
|
276
|
+
See `.claude/resources/core/review-multi-agent.md` for full rules.
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
## Adaptive Depth
|
|
281
|
+
|
|
282
|
+
Review depth scales automatically based on changeset size:
|
|
283
|
+
|
|
284
|
+
| Lines Changed | Mode | Behavior |
|
|
285
|
+
|--------------|------|----------|
|
|
286
|
+
| < 50 | **Lightweight** | Quick-scan for security, logic bugs, breaking changes only. Skips pattern loading, full analysis, verification pass. |
|
|
287
|
+
| 50–500 | **Standard** | Full review (current behavior, no changes). |
|
|
288
|
+
| 500+ | **Deep** | Multi-pass review with file categorization, severity-grouped output, executive summary, and mandatory verification pass. |
|
|
289
|
+
|
|
290
|
+
Thresholds are hardcoded. The detected mode is displayed before the review starts.
|
|
291
|
+
|
|
292
|
+
See `.claude/resources/core/review-adaptive-depth.md` for full rules.
|
|
293
|
+
|
|
294
|
+
---
|
|
295
|
+
|
|
296
|
+
## Verification Pass
|
|
297
|
+
|
|
298
|
+
After initial analysis, all findings undergo a second-pass verification. Each finding is re-examined against 15 lines of surrounding context and classified as Confirmed, Likely, or Dismissed. False positives are filtered before output. A Verification Summary shows filter stats.
|
|
299
|
+
|
|
300
|
+
See `.claude/resources/core/review-verification.md` for classification criteria, category-specific questions, and output format.
|
|
@@ -673,7 +673,17 @@ This command uses hierarchical context loading to reduce context consumption. In
|
|
|
673
673
|
|
|
674
674
|
| Code | Description | When to Expand |
|
|
675
675
|
|------|-------------|----------------|
|
|
676
|
-
| SKL-SETUP-1 |
|
|
676
|
+
| SKL-SETUP-1 | Purpose and critical approach | Understanding setup goals |
|
|
677
|
+
| SKL-SETUP-2 | Scan project structure | Scanning files and directories |
|
|
678
|
+
| SKL-SETUP-3 | Deep dependency analysis | Analyzing package dependencies |
|
|
679
|
+
| SKL-SETUP-4 | Deep code analysis | Sampling files and extracting patterns |
|
|
680
|
+
| SKL-SETUP-7 | Ask confirming questions | Presenting questions via Plan mode |
|
|
681
|
+
| SKL-SETUP-8 | Generate pattern files | Creating framework/library pattern files |
|
|
682
|
+
| SKL-SETUP-9 | Update core pattern files | Updating allowed/forbidden patterns |
|
|
683
|
+
| SKL-SETUP-11 | Create analysis document | Generating project analysis doc |
|
|
684
|
+
| SKL-SETUP-12 | Index documentation | Indexing project docs with reference codes |
|
|
685
|
+
| SKL-SETUP-13 | Create flow folder | Setting up flow/ directory structure |
|
|
686
|
+
| SKL-SETUP-14 | Present summary | Final setup summary output |
|
|
677
687
|
| TLS-IQ-1 | Interactive questions overview | Before asking questions |
|
|
678
688
|
| TLS-IQ-2 | Switch to Plan mode | Starting question session |
|
|
679
689
|
| TLS-IQ-3 | Ask questions format | Asking confirmation questions |
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
Core rules define the foundational coding standards that apply across the entire project. These include best practices to follow (allowed patterns), anti-patterns to avoid (forbidden patterns), and complexity scoring for implementation planning.
|
|
7
7
|
|
|
8
|
-
**Total Files**:
|
|
9
|
-
**Reference Codes**: COR-AP-1 through COR-
|
|
8
|
+
**Total Files**: 22 files, ~3580 lines
|
|
9
|
+
**Reference Codes**: COR-AP-1 through COR-DSA-3
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
@@ -118,6 +118,74 @@ Core rules define the foundational coding standards that apply across the entire
|
|
|
118
118
|
| COR-DA-2 | Token extraction and UI detection rules | design-awareness.md | 182-260 |
|
|
119
119
|
| COR-DA-3 | Discovery question flow and execution injection | design-awareness.md | 262-350 |
|
|
120
120
|
|
|
121
|
+
### Review Verification (`review-verification.md`)
|
|
122
|
+
|
|
123
|
+
| Code | Description | Source | Lines |
|
|
124
|
+
|------|-------------|--------|-------|
|
|
125
|
+
| COR-RV-1 | Verification logic, questions, and classification criteria | review-verification.md | 1-120 |
|
|
126
|
+
| COR-RV-2 | Output format and insertion points | review-verification.md | 122-200 |
|
|
127
|
+
|
|
128
|
+
### Review Multi-Agent (`review-multi-agent.md`)
|
|
129
|
+
|
|
130
|
+
| Code | Description | Source | Lines |
|
|
131
|
+
|------|-------------|--------|-------|
|
|
132
|
+
| COR-MA-1 | Subagent definitions (security, logic, performance, patterns) with prompts and models | review-multi-agent.md | 30-130 |
|
|
133
|
+
| COR-MA-2 | Coordinator behavior (spawn, collect, deduplicate, verify, rank, output) | review-multi-agent.md | 132-195 |
|
|
134
|
+
| COR-MA-3 | Subagent input rules and diff splitting for very large changesets | review-multi-agent.md | 100-130 |
|
|
135
|
+
| COR-MA-4 | Insertion points for review-code and review-pr skills | review-multi-agent.md | 197-220 |
|
|
136
|
+
|
|
137
|
+
### Review Severity Re-Ranking (`review-severity-ranking.md`)
|
|
138
|
+
|
|
139
|
+
| Code | Description | Source | Lines |
|
|
140
|
+
|------|-------------|--------|-------|
|
|
141
|
+
| COR-SR-1 | Ranking algorithm (severity → confidence → complexity) | review-severity-ranking.md | 14-26 |
|
|
142
|
+
| COR-SR-2 | Grouping related findings (patterns, rules, format) | review-severity-ranking.md | 28-88 |
|
|
143
|
+
| COR-SR-3 | Executive summary trigger and risk level derivation | review-severity-ranking.md | 90-120 |
|
|
144
|
+
| COR-SR-4 | Output structure and insertion points | review-severity-ranking.md | 122-150 |
|
|
145
|
+
|
|
146
|
+
### Compaction Guide (`compaction-guide.md`)
|
|
147
|
+
|
|
148
|
+
| Code | Description | Source | Lines |
|
|
149
|
+
|------|-------------|--------|-------|
|
|
150
|
+
| COR-CG-1 | Purpose, core principle, and when to compact | compaction-guide.md | 3-20 |
|
|
151
|
+
| COR-CG-2 | Preserve rules — what to keep during compaction | compaction-guide.md | 22-38 |
|
|
152
|
+
| COR-CG-3 | Discard rules — what to drop during compaction | compaction-guide.md | 40-55 |
|
|
153
|
+
| COR-CG-4 | Compact summary template and skill-specific examples | compaction-guide.md | 57-110 |
|
|
154
|
+
|
|
155
|
+
### Session Scratchpad (`session-scratchpad.md`)
|
|
156
|
+
|
|
157
|
+
| Code | Description | Source | Lines |
|
|
158
|
+
|------|-------------|--------|-------|
|
|
159
|
+
| COR-SS-1 | Purpose, session start behavior, and write triggers | session-scratchpad.md | 3-45 |
|
|
160
|
+
| COR-SS-2 | File format and 50-line limit | session-scratchpad.md | 47-68 |
|
|
161
|
+
| COR-SS-3 | Promotion rules, targets, and compaction integration | session-scratchpad.md | 70-95 |
|
|
162
|
+
|
|
163
|
+
### Phase Isolation (`phase-isolation.md`)
|
|
164
|
+
|
|
165
|
+
| Code | Description | Source | Lines |
|
|
166
|
+
|------|-------------|--------|-------|
|
|
167
|
+
| COR-PI-1 | Purpose, architecture overview, and coordinator flow | phase-isolation.md | 3-40 |
|
|
168
|
+
| COR-PI-2 | Context template — what to include in sub-agent prompt | phase-isolation.md | 42-85 |
|
|
169
|
+
| COR-PI-3 | Return format schema (JSON), field descriptions, failure example | phase-isolation.md | 87-140 |
|
|
170
|
+
| COR-PI-4 | Coordinator processing (success/failure/partial), config, and rules | phase-isolation.md | 142-180 |
|
|
171
|
+
|
|
172
|
+
### Discovery Sub-Agents (`discovery-sub-agents.md`)
|
|
173
|
+
|
|
174
|
+
| Code | Description | Source | Lines |
|
|
175
|
+
|------|-------------|--------|-------|
|
|
176
|
+
| COR-DSA-1 | Agent definitions with prompt templates (Similar Features, API/Data, Schema/Types) | discovery-sub-agents.md | 30-130 |
|
|
177
|
+
| COR-DSA-2 | Return format schema and Codebase Analysis section template | discovery-sub-agents.md | 132-190 |
|
|
178
|
+
| COR-DSA-3 | Coordinator behavior (spawn, collect, merge, error handling) | discovery-sub-agents.md | 192-240 |
|
|
179
|
+
|
|
180
|
+
### Review Adaptive Depth (`review-adaptive-depth.md`)
|
|
181
|
+
|
|
182
|
+
| Code | Description | Source | Lines |
|
|
183
|
+
|------|-------------|--------|-------|
|
|
184
|
+
| COR-AD-1 | Size detection, line counting rules, and tier definitions | review-adaptive-depth.md | 14-47 |
|
|
185
|
+
| COR-AD-2 | Lightweight review mode (< 50 lines) — checks, skips, output | review-adaptive-depth.md | 51-101 |
|
|
186
|
+
| COR-AD-3 | Deep review mode (500+ lines) — categorization, passes, executive summary | review-adaptive-depth.md | 103-187 |
|
|
187
|
+
| COR-AD-4 | Insertion points for review-code and review-pr skills | review-adaptive-depth.md | 189-205 |
|
|
188
|
+
|
|
121
189
|
---
|
|
122
190
|
|
|
123
191
|
## When to Expand
|
|
@@ -160,6 +228,34 @@ Core rules define the foundational coding standards that apply across the entire
|
|
|
160
228
|
| COR-DA-1 | Need design context template or personality options |
|
|
161
229
|
| COR-DA-2 | Need token extraction or UI detection heuristics |
|
|
162
230
|
| COR-DA-3 | Need design question flow or execution injection rules |
|
|
231
|
+
| COR-RV-1 | Need verification questions or classification criteria |
|
|
232
|
+
| COR-RV-2 | Need verification output format or skill insertion points |
|
|
233
|
+
| COR-MA-1 | Need subagent definitions or prompt templates for deep review |
|
|
234
|
+
| COR-MA-2 | Need coordinator dedup/merge behavior |
|
|
235
|
+
| COR-MA-3 | Need subagent input rules or diff splitting strategy |
|
|
236
|
+
| COR-MA-4 | Need multi-agent insertion points for review skills |
|
|
237
|
+
| COR-SR-1 | Need ranking algorithm for review findings |
|
|
238
|
+
| COR-SR-2 | Need grouping rules for related findings |
|
|
239
|
+
| COR-SR-3 | Need executive summary trigger conditions |
|
|
240
|
+
| COR-SR-4 | Need severity re-ranking output structure or insertion points |
|
|
241
|
+
| COR-CG-1 | Need to understand when and why to compact |
|
|
242
|
+
| COR-CG-2 | Need preserve rules for crafting compact summaries |
|
|
243
|
+
| COR-CG-3 | Need discard rules for dropping low-signal tokens |
|
|
244
|
+
| COR-CG-4 | Need compact summary template or skill-specific examples |
|
|
245
|
+
| COR-AD-1 | Need size detection thresholds or line counting rules |
|
|
246
|
+
| COR-AD-2 | Need lightweight review mode behavior |
|
|
247
|
+
| COR-AD-3 | Need deep review mode behavior (categorization, passes, executive summary) |
|
|
248
|
+
| COR-AD-4 | Need insertion points for adaptive depth in review skills |
|
|
249
|
+
| COR-SS-1 | Need scratchpad purpose, session start behavior, or write triggers |
|
|
250
|
+
| COR-SS-2 | Need scratchpad file format or size limit |
|
|
251
|
+
| COR-SS-3 | Need scratchpad promotion rules or compaction integration |
|
|
252
|
+
| COR-PI-1 | Need phase isolation architecture or coordinator flow |
|
|
253
|
+
| COR-PI-2 | Need sub-agent context template (what to include in prompt) |
|
|
254
|
+
| COR-PI-3 | Need return format schema or field descriptions |
|
|
255
|
+
| COR-PI-4 | Need coordinator processing rules or config settings |
|
|
256
|
+
| COR-DSA-1 | Need discovery sub-agent definitions or prompt templates |
|
|
257
|
+
| COR-DSA-2 | Need return format schema or Codebase Analysis section template |
|
|
258
|
+
| COR-DSA-3 | Need coordinator spawn/collect/merge behavior or error handling |
|
|
163
259
|
|
|
164
260
|
---
|
|
165
261
|
|
|
@@ -200,5 +296,9 @@ Core rules define the foundational coding standards that apply across the entire
|
|
|
200
296
|
- `pattern-capture.md` is loaded on-demand - silently captures patterns during skill execution and presents for approval
|
|
201
297
|
- `model-routing.md` is loaded on-demand - automatic model selection per phase based on complexity scores during `/execute-plan`
|
|
202
298
|
- `project-tasklist.md` is loaded on-demand - session start tasklist behavior
|
|
299
|
+
- `compaction-guide.md` is loaded on-demand - preserve/discard rules and summary template for `/compact`
|
|
300
|
+
- `session-scratchpad.md` is loaded on-demand - ephemeral per-session notes with promotion to permanent storage
|
|
301
|
+
- `phase-isolation.md` is loaded on-demand - isolated sub-agent execution per phase during `/execute-plan`
|
|
203
302
|
- `project-memory.md` is loaded on-demand - artifact tracking and 7-day session loading
|
|
204
303
|
- `heartbeat.md` is loaded on-demand - scheduled task daemon configuration
|
|
304
|
+
- `discovery-sub-agents.md` is loaded on-demand - parallel codebase exploration sub-agents during `/discovery-plan`
|