@sienklogic/plan-build-run 2.5.0 → 2.7.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.
Files changed (30) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/package.json +5 -5
  3. package/plugins/copilot-pbr/plugin.json +1 -1
  4. package/plugins/copilot-pbr/skills/import/SKILL.md +2 -2
  5. package/plugins/copilot-pbr/skills/note/SKILL.md +36 -50
  6. package/plugins/copilot-pbr/skills/quick/SKILL.md +1 -1
  7. package/plugins/copilot-pbr/skills/shared/context-loader-task.md +1 -1
  8. package/plugins/copilot-pbr/skills/status/SKILL.md +3 -3
  9. package/plugins/copilot-pbr/skills/statusline/SKILL.md +145 -0
  10. package/plugins/cursor-pbr/.cursor-plugin/plugin.json +1 -1
  11. package/plugins/cursor-pbr/skills/import/SKILL.md +2 -2
  12. package/plugins/cursor-pbr/skills/note/SKILL.md +36 -50
  13. package/plugins/cursor-pbr/skills/quick/SKILL.md +1 -1
  14. package/plugins/cursor-pbr/skills/shared/context-loader-task.md +1 -1
  15. package/plugins/cursor-pbr/skills/status/SKILL.md +3 -3
  16. package/plugins/cursor-pbr/skills/statusline/SKILL.md +146 -0
  17. package/plugins/pbr/.claude-plugin/plugin.json +1 -1
  18. package/plugins/pbr/commands/statusline.md +5 -0
  19. package/plugins/pbr/scripts/check-dangerous-commands.js +44 -0
  20. package/plugins/pbr/scripts/check-roadmap-sync.js +21 -5
  21. package/plugins/pbr/scripts/check-skill-workflow.js +87 -3
  22. package/plugins/pbr/scripts/check-subagent-output.js +64 -1
  23. package/plugins/pbr/scripts/progress-tracker.js +13 -9
  24. package/plugins/pbr/scripts/validate-task.js +284 -3
  25. package/plugins/pbr/skills/import/SKILL.md +2 -2
  26. package/plugins/pbr/skills/note/SKILL.md +36 -50
  27. package/plugins/pbr/skills/quick/SKILL.md +1 -1
  28. package/plugins/pbr/skills/shared/context-loader-task.md +1 -1
  29. package/plugins/pbr/skills/status/SKILL.md +3 -3
  30. package/plugins/pbr/skills/statusline/SKILL.md +147 -0
package/CHANGELOG.md CHANGED
@@ -5,6 +5,39 @@ All notable changes to Plan-Build-Run will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [2.7.0](https://github.com/SienkLogic/plan-build-run/compare/plan-build-run-v2.6.0...plan-build-run-v2.7.0) (2026-02-19)
9
+
10
+
11
+ ### Features
12
+
13
+ * **02-01:** add milestone, explore, import, scan write guards to checkSkillRules ([bd21366](https://github.com/SienkLogic/plan-build-run/commit/bd21366f8f63277566035f0827e3fde2ebc39400))
14
+ * **02-02:** add review planner gate to validate-task.js ([89ffb05](https://github.com/SienkLogic/plan-build-run/commit/89ffb05bc6384fc47fbf85ac7c875e16a29db0b9))
15
+ * **02-02:** strengthen ROADMAP sync warnings to CRITICAL level ([7120d60](https://github.com/SienkLogic/plan-build-run/commit/7120d60fdc6678d8c9853679b0d3464116821097))
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * **tools:** auto-route quick skill to plan skill when user selects Full plan ([252a35e](https://github.com/SienkLogic/plan-build-run/commit/252a35ed9942c2b1902f38923bb80d92d819ae4e))
21
+
22
+ ## [2.6.0](https://github.com/SienkLogic/plan-build-run/compare/plan-build-run-v2.5.0...plan-build-run-v2.6.0) (2026-02-19)
23
+
24
+
25
+ ### Features
26
+
27
+ * **01-01:** add build and plan executor gates to validate-task.js ([4d882e0](https://github.com/SienkLogic/plan-build-run/commit/4d882e07d9560c0540c2277149338137a9a7e05d))
28
+ * **01-01:** extend agent output validation to all 10 PBR agent types ([9f4384f](https://github.com/SienkLogic/plan-build-run/commit/9f4384fa2391c3e5905243119da5bebbf65f6218))
29
+ * **01-02:** add skill-specific workflow rules and CRITICAL enforcement ([173e89e](https://github.com/SienkLogic/plan-build-run/commit/173e89e0dfc81aa425b222efd982b83a19e2b3d0))
30
+ * **tools:** add /pbr:statusline command to install PBR status line ([8bd9e7a](https://github.com/SienkLogic/plan-build-run/commit/8bd9e7a98b76cf8e1686eb7a936da8539fe20a08))
31
+
32
+
33
+ ### Bug Fixes
34
+
35
+ * **01-01:** hasPlanFile now matches numbered plan files like PLAN-01.md ([00c4af8](https://github.com/SienkLogic/plan-build-run/commit/00c4af8066c4c0c24f25be7cd6731acb2b13cb61))
36
+ * **tools:** prefix unused name var with underscore in version sync test ([8b8b81d](https://github.com/SienkLogic/plan-build-run/commit/8b8b81dea5eff86fb4503cecdc9e677f573faf03))
37
+ * **tools:** resolve lint errors in statusline workflow rules ([6c32db7](https://github.com/SienkLogic/plan-build-run/commit/6c32db7947ccaf392457750a26406ca92a3eef77))
38
+ * **tools:** revert release branch CI trigger (using non-strict protection instead) ([836ac24](https://github.com/SienkLogic/plan-build-run/commit/836ac2401d3381b395fcf6b2bf252ff78745abd5))
39
+ * **tools:** trigger CI on release-please branch pushes for auto-merge ([443e046](https://github.com/SienkLogic/plan-build-run/commit/443e0466f27eb51269999755eb2f8d37093d0f65))
40
+
8
41
  ## [2.5.0](https://github.com/SienkLogic/plan-build-run/compare/plan-build-run-v2.4.1...plan-build-run-v2.5.0) (2026-02-19)
9
42
 
10
43
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sienklogic/plan-build-run",
3
- "version": "2.5.0",
3
+ "version": "2.7.0",
4
4
  "description": "Plan it, Build it, Run it — structured development workflow for Claude Code",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -47,10 +47,10 @@
47
47
  ],
48
48
  "coverageThreshold": {
49
49
  "global": {
50
- "statements": 65,
51
- "branches": 58,
52
- "functions": 70,
53
- "lines": 65
50
+ "statements": 60,
51
+ "branches": 55,
52
+ "functions": 60,
53
+ "lines": 60
54
54
  }
55
55
  }
56
56
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pbr",
3
3
  "displayName": "Plan-Build-Run",
4
- "version": "2.5.0",
4
+ "version": "2.7.0",
5
5
  "description": "Plan-Build-Run — Structured development workflow for GitHub Copilot CLI. Solves context rot through disciplined agent delegation, structured planning, atomic execution, and goal-backward verification.",
6
6
  "author": {
7
7
  "name": "SienkLogic",
@@ -76,7 +76,7 @@ Read all relevant context files. This context is used for conflict detection in
76
76
  - trigger equals the phase number as integer
77
77
  - trigger equals * (always matches)
78
78
  9. Pending todos — scan .planning/todos/pending/ for items related to this phase
79
- 10. NOTES.md (if exists at .planning/NOTES.md) — check for related notes
79
+ 10. Notes (if .planning/notes/ exists) — check for related notes
80
80
  ```
81
81
 
82
82
  Collect all of this into a context bundle for use in Steps 4 and 5.
@@ -150,7 +150,7 @@ Run each of these checks. If any matches, record a `[WARNING]`:
150
150
  #### INFO checks (supplementary context):
151
151
  Run each of these checks. If any matches, record an `[INFO]`:
152
152
 
153
- 1. **Related notes**: Are there related notes in NOTES.md?
153
+ 1. **Related notes**: Are there related notes in `.planning/notes/`?
154
154
  2. **Matching seeds**: Are there matching seeds in `.planning/seeds/` that could enhance the plan?
155
155
  3. **Prior phase patterns**: What patterns from prior phases (from SUMMARY.md `patterns` fields) should the imported plan follow?
156
156
 
@@ -23,12 +23,23 @@ This skill runs **inline** — no Task, no AskUserQuestion, no Bash.
23
23
 
24
24
  ---
25
25
 
26
- ## Scope Detection
26
+ ## Storage Format
27
27
 
28
- Two scopes exist. Auto-detect which to use:
28
+ Notes are stored as **individual markdown files** in a notes directory:
29
29
 
30
- 1. **Project scope**: `.planning/NOTES.md` — used when `.planning/` directory exists in cwd
31
- 2. **Global scope**: `~/.claude/notes.md` — used as fallback when no `.planning/`, or when `--global` flag is present
30
+ - **Project scope**: `.planning/notes/{YYYY-MM-DD}-{slug}.md` — used when `.planning/` directory exists in cwd
31
+ - **Global scope**: `~/.claude/notes/{YYYY-MM-DD}-{slug}.md` — used as fallback when no `.planning/`, or when `--global` flag is present
32
+
33
+ Each note file has this format:
34
+
35
+ ```markdown
36
+ ---
37
+ date: "YYYY-MM-DD HH:mm"
38
+ promoted: false
39
+ ---
40
+
41
+ {note text verbatim}
42
+ ```
32
43
 
33
44
  **`--global` flag**: Strip `--global` from anywhere in `$ARGUMENTS` before parsing. When present, force global scope regardless of whether `.planning/` exists.
34
45
 
@@ -53,27 +64,17 @@ Parse `$ARGUMENTS` after stripping `--global`:
53
64
 
54
65
  ## Subcommand: append
55
66
 
56
- Append a timestamped note to the target file.
67
+ Create a timestamped note file in the target directory.
57
68
 
58
69
  ### Steps
59
70
 
60
- 1. Determine scope (project or global) per Scope Detection above
61
- 2. Read the target file if it exists
62
- 3. If the file doesn't exist, create it with this header:
63
-
64
- ```markdown
65
- # Notes
66
-
67
- Quick captures from `/pbr:note`. Ideas worth remembering.
68
-
69
- ---
70
-
71
- ```
72
-
73
- 4. Ensure the file content ends with a newline before appending
74
- 5. Append: `- [YYYY-MM-DD HH:mm] {note text verbatim}`
75
- 6. Write the file
76
- 7. Confirm with exactly one line: `Noted ({scope}): {note text}`
71
+ 1. Determine scope (project or global) per Storage Format above
72
+ 2. Ensure the notes directory exists (`.planning/notes/` or `~/.claude/notes/`)
73
+ 3. Generate slug: first ~4 meaningful words of the note text, lowercase, hyphen-separated (strip articles/prepositions from the start)
74
+ 4. Generate filename: `{YYYY-MM-DD}-{slug}.md`
75
+ - If a file with that name already exists, append `-2`, `-3`, etc.
76
+ 5. Write the file with frontmatter and note text (see Storage Format)
77
+ 6. Confirm with exactly one line: `Noted ({scope}): {note text}`
77
78
  - Where `{scope}` is "project" or "global"
78
79
 
79
80
  ### Constraints
@@ -90,11 +91,11 @@ Show notes from both project and global scopes.
90
91
 
91
92
  ### Steps
92
93
 
93
- 1. Read `.planning/NOTES.md` (if exists) — these are "project" notes
94
- 2. Read `~/.claude/notes.md` (if exists) — these are "global" notes
95
- 3. Parse entries: lines matching `^- \[` are notes
96
- 4. Exclude lines containing `[promoted]` from active counts (but still show them, dimmed)
97
- 5. Number all active entries sequentially starting at 1, using plain integers (1, 2, 3...) for display (across both scopes)
94
+ 1. Glob `.planning/notes/*.md` (if directory exists) — these are "project" notes
95
+ 2. Glob `~/.claude/notes/*.md` (if directory exists) — these are "global" notes
96
+ 3. For each file, read frontmatter to get `date` and `promoted` status
97
+ 4. Exclude files where `promoted: true` from active counts (but still show them, dimmed)
98
+ 5. Sort by date, number all active entries sequentially starting at 1
98
99
  6. If total active entries > 20, show only the last 10 with a note about how many were omitted
99
100
 
100
101
  ### Display Format
@@ -102,18 +103,18 @@ Show notes from both project and global scopes.
102
103
  ```
103
104
  Notes:
104
105
 
105
- Project (.planning/NOTES.md):
106
+ Project (.planning/notes/):
106
107
  1. [2026-02-08 14:32] refactor the hook system to support async validators
107
108
  2. [promoted] [2026-02-08 14:40] add rate limiting to the API endpoints
108
109
  3. [2026-02-08 15:10] consider adding a --dry-run flag to build
109
110
 
110
- Global (~/.claude/notes.md):
111
+ Global (~/.claude/notes/):
111
112
  4. [2026-02-08 10:00] cross-project idea about shared config
112
113
 
113
114
  {count} active note(s). Use `/pbr:note promote <N>` to convert to a todo.
114
115
  ```
115
116
 
116
- If a scope has no file or no entries, show: `(no notes)`
117
+ If a scope has no directory or no entries, show: `(no notes)`
117
118
 
118
119
  ---
119
120
 
@@ -129,7 +130,7 @@ Convert a note into a todo file.
129
130
  4. **Requires `.planning/` directory** — if it doesn't exist, warn: "Todos require a Plan-Build-Run project. Run `/pbr:begin` to initialize one, or use `/pbr:todo add` in an existing project."
130
131
  5. Ensure `.planning/todos/pending/` directory exists
131
132
  6. Generate todo ID: `{NNN}-{slug}` where NNN is the next sequential number (scan both `.planning/todos/pending/` and `.planning/todos/done/` for the highest existing number, increment by 1, zero-pad to 3 digits) and slug is the first ~4 meaningful words of the note text, lowercase, hyphen-separated
132
- 7. Extract the note text (everything after the timestamp)
133
+ 7. Extract the note text from the source file (body after frontmatter)
133
134
  8. Create `.planning/todos/pending/{id}.md`:
134
135
 
135
136
  ```yaml
@@ -155,34 +156,18 @@ Promoted from quick note captured on {original date}.
155
156
  - [ ] {primary criterion derived from note text}
156
157
  ```
157
158
 
158
- 9. Mark the original note as promoted: replace `- [` with `- [promoted] [` on that line
159
+ 9. Mark the source note file as promoted: update its frontmatter to `promoted: true`
159
160
  10. Confirm: `Promoted note {N} to todo {id}: {note text}`
160
161
 
161
162
  ---
162
163
 
163
- ## NOTES.md Format Reference
164
-
165
- ```markdown
166
- # Notes
167
-
168
- Quick captures from `/pbr:note`. Ideas worth remembering.
169
-
170
- ---
171
-
172
- - [2026-02-08 14:32] refactor the hook system to support async validators
173
- - [promoted] [2026-02-08 14:40] add rate limiting to the API endpoints
174
- - [2026-02-08 15:10] consider adding a --dry-run flag to build
175
- ```
176
-
177
- ---
178
-
179
164
  ## Edge Cases
180
165
 
181
166
  1. **"list" as note text**: `/pbr:note list of things` → saves note "list of things" (subcommand only when `list` is the entire arg)
182
- 2. **No `.planning/`**: Falls back to global `~/.claude/notes.md` — works in any directory
167
+ 2. **No `.planning/`**: Falls back to global `~/.claude/notes/` — works in any directory
183
168
  3. **Promote without project**: Warns that todos require `.planning/`, suggests `/pbr:begin`
184
169
  4. **Large files**: `list` shows last 10 when >20 active entries
185
- 5. **Missing newline**: Always ensure trailing newline before appending
170
+ 5. **Duplicate slugs**: Append `-2`, `-3` etc. to filename if slug already used on same date
186
171
  6. **`--global` position**: Stripped from anywhere — `--global my idea` and `my idea --global` both save "my idea" globally
187
172
  7. **Promote already-promoted**: Tell user "Note {N} is already promoted" and stop
188
173
  8. **Empty note text after stripping flags**: Treat as `list` subcommand
@@ -225,3 +210,4 @@ Note {N} not found. Valid range: 1-{max}.
225
210
  4. **DO NOT** create `.planning/` if it doesn't exist — fall back to global
226
211
  5. **DO NOT** number promoted notes in the active count (but still display them)
227
212
  6. **DO NOT** over-format the confirmation — one line is enough
213
+ 7. **DO NOT** use a flat NOTES.md file — always use individual files in notes directory
@@ -85,7 +85,7 @@ Use AskUserQuestion:
85
85
  multiSelect: false
86
86
 
87
87
  If user selects "Quick task": continue to Step 4.
88
- If user selects "Full plan": respond "Use `/pbr:plan` to create a full planning cycle for this task." and stop.
88
+ If user selects "Full plan": clean up `.active-skill` if it exists, then chain directly to the plan skill. The user's task description carries over in conversation context — the plan skill will pick it up.
89
89
  If user selects "Revise": go back to Step 2 to get a new task description.
90
90
  If user types something else (freeform): interpret their response and proceed accordingly.
91
91
 
@@ -32,7 +32,7 @@ Task({
32
32
  - .planning/CONTEXT.md
33
33
  - Any .planning/phases/*/CONTEXT.md files
34
34
  - .planning/research/SUMMARY.md (if exists)
35
- - .planning/NOTES.md (if exists)
35
+ - .planning/notes/*.md (if notes directory exists — read frontmatter for date/promoted status)
36
36
  - .planning/HISTORY.md (if exists — scan for decisions relevant to current work only, do NOT summarize all history)
37
37
 
38
38
  Return ONLY the briefing text. No preamble, no suggestions."
@@ -142,9 +142,9 @@ If any discrepancy found, add: `Run /pbr:resume to auto-reconcile STATE.md.`
142
142
  - Count and summarize if any exist
143
143
 
144
144
  #### Quick Notes
145
- - Check `.planning/NOTES.md` for active note entries
146
- - Count active notes (lines matching `^- \[` that don't contain `[promoted]`)
147
- - Also check `~/.claude/notes.md` for global notes
145
+ - Check `.planning/notes/` directory for note files (individual `.md` files)
146
+ - Count active notes (files where frontmatter does NOT contain `promoted: true`)
147
+ - Also check `~/.claude/notes/` for global notes
148
148
 
149
149
  #### Quick Tasks
150
150
  - Check `.planning/quick/` for recent quick tasks
@@ -0,0 +1,145 @@
1
+ ---
2
+ name: statusline
3
+ description: "Install or configure the PBR status line in Claude Code."
4
+ ---
5
+
6
+ **STOP — DO NOT READ THIS FILE. You are already reading it. This prompt was injected into your context by Claude Code's plugin system. Using the Read tool on this SKILL.md file wastes ~3,000 tokens. Begin executing Step 0 immediately.**
7
+
8
+ ## Step 0 — Immediate Output
9
+
10
+ **Before ANY tool calls**, display this banner:
11
+
12
+ ```
13
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
14
+ PLAN-BUILD-RUN ► STATUS LINE
15
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
16
+ ```
17
+
18
+ Then proceed to Step 1.
19
+
20
+ # /pbr:statusline — Status Line Setup
21
+
22
+ The PBR status line displays live project state (phase, plan, status, git branch, context usage) in the Claude Code terminal status bar.
23
+
24
+ ---
25
+
26
+ ## Subcommand Parsing
27
+
28
+ Parse `$ARGUMENTS`:
29
+
30
+ | Argument | Action |
31
+ |----------|--------|
32
+ | `install` or empty | Install/enable the status line |
33
+ | `uninstall` or `remove` | Remove the status line configuration |
34
+ | `preview` | Show what the status line looks like without installing |
35
+
36
+ ---
37
+
38
+ ## Subcommand: install (default)
39
+
40
+ ### Step 1: Locate the status-line script
41
+
42
+ **CRITICAL: You must resolve the correct absolute path to `status-line.js`. Do NOT hardcode paths.**
43
+
44
+ 1. The script lives at `${PLUGIN_ROOT}/scripts/status-line.js`
45
+ 2. Resolve `${PLUGIN_ROOT}` to its absolute path using `pwd` or by checking the plugin root
46
+ 3. If running from a local plugin dir (`claude --plugin-dir .`), the path is the local repo's `plugins/pbr/scripts/status-line.js`
47
+ 4. If running from the installed plugin cache (`~/.claude/plugins/cache/`), use that path
48
+ 5. **Verify the script exists** with `ls` before proceeding. If it doesn't exist, show an error and stop.
49
+
50
+ Store the resolved absolute path as `SCRIPT_PATH`.
51
+
52
+ ### Step 2: Read current settings
53
+
54
+ Read `~/.claude/settings.json` (or `$HOME/.claude/settings.json`).
55
+
56
+ - If the file doesn't exist: start with an empty object `{}`
57
+ - If it exists: parse the JSON content
58
+ - Check if `statusLine` key already exists:
59
+ - If yes and points to the same script: inform user "PBR status line is already installed." and stop (unless they want to reconfigure)
60
+ - If yes but points to a different command: warn user and ask if they want to replace it
61
+
62
+ ### Step 3: Configure settings.json
63
+
64
+ Use AskUserQuestion:
65
+ question: "Install the PBR status line? This adds a `statusLine` entry to ~/.claude/settings.json."
66
+ header: "Install?"
67
+ options:
68
+ - label: "Install" description: "Enable the PBR status line in Claude Code"
69
+ - label: "Preview first" description: "Show a preview before installing"
70
+ - label: "Cancel" description: "Don't install"
71
+ multiSelect: false
72
+
73
+ If "Preview first": run the preview subcommand (show sample output), then ask again.
74
+ If "Cancel": stop.
75
+ If "Install":
76
+
77
+ **CRITICAL: Use Read tool to read the file, then Write to update it. Do NOT use sed or other text manipulation on JSON files.**
78
+
79
+ 1. Read `~/.claude/settings.json`
80
+ 2. Parse the JSON
81
+ 3. Set `statusLine` to:
82
+ ```json
83
+ {
84
+ "type": "command",
85
+ "command": "node \"SCRIPT_PATH\""
86
+ }
87
+ ```
88
+ Where `SCRIPT_PATH` is the resolved absolute path from Step 1. Use forward slashes even on Windows.
89
+ 4. Write the updated JSON back (preserve all other settings, use 2-space indentation)
90
+
91
+ ### Step 4: Verify and confirm
92
+
93
+ Display:
94
+ ```
95
+ ✓ PBR status line installed
96
+
97
+ Script: {SCRIPT_PATH}
98
+ Config: ~/.claude/settings.json
99
+
100
+ The status line will appear on your next Claude Code session.
101
+ Restart Claude Code or run `/clear` to activate it now.
102
+
103
+ Customize per-project via .planning/config.json:
104
+ "status_line": {
105
+ "sections": ["phase", "plan", "status", "git", "context"],
106
+ "brand_text": "PBR"
107
+ }
108
+ ```
109
+
110
+ ---
111
+
112
+ ## Subcommand: uninstall
113
+
114
+ 1. Read `~/.claude/settings.json`
115
+ 2. If no `statusLine` key: inform user "No status line configured." and stop
116
+ 3. Remove the `statusLine` key from the JSON
117
+ 4. Write the updated file
118
+ 5. Display: `✓ PBR status line removed. Restart Claude Code to take effect.`
119
+
120
+ ---
121
+
122
+ ## Subcommand: preview
123
+
124
+ 1. Locate and run the status-line script: `node {SCRIPT_PATH}`
125
+ - Pass sample stdin JSON: `{"context_window": {"used_percentage": 35}, "model": {"display_name": "Claude Opus 4.6"}, "cost": {"total_cost_usd": 0.42}}`
126
+ 2. Display the raw output to the user
127
+ 3. Also show a description of each section:
128
+ - **Phase**: Current phase number and name from STATE.md
129
+ - **Plan**: Plan progress (N of M)
130
+ - **Status**: Phase status keyword (planning, building, built, etc.)
131
+ - **Git**: Current branch + dirty indicator
132
+ - **Context**: Unicode bar showing context window usage (green/yellow/red)
133
+
134
+ ---
135
+
136
+ ## Edge Cases
137
+
138
+ ### No .planning/ directory
139
+ The status line works even without `.planning/` — it will show only git and context sections. Installation doesn't require a PBR project.
140
+
141
+ ### Plugin installed from npm vs local
142
+ The script path differs between `~/.claude/plugins/cache/plan-build-run/pbr/{version}/scripts/status-line.js` and a local `plugins/pbr/scripts/status-line.js`. The install command must resolve the actual path at install time.
143
+
144
+ ### Existing non-PBR status line
145
+ If `statusLine` already exists with a different command, warn the user and confirm before replacing.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pbr",
3
3
  "displayName": "Plan-Build-Run",
4
- "version": "2.5.0",
4
+ "version": "2.7.0",
5
5
  "description": "Plan-Build-Run — Structured development workflow for Cursor. Solves context rot through disciplined subagent delegation, structured planning, atomic execution, and goal-backward verification.",
6
6
  "author": {
7
7
  "name": "SienkLogic",
@@ -77,7 +77,7 @@ Read all relevant context files. This context is used for conflict detection in
77
77
  - trigger equals the phase number as integer
78
78
  - trigger equals * (always matches)
79
79
  9. Pending todos — scan .planning/todos/pending/ for items related to this phase
80
- 10. NOTES.md (if exists at .planning/NOTES.md) — check for related notes
80
+ 10. Notes (if .planning/notes/ exists) — check for related notes
81
81
  ```
82
82
 
83
83
  Collect all of this into a context bundle for use in Steps 4 and 5.
@@ -151,7 +151,7 @@ Run each of these checks. If any matches, record a `[WARNING]`:
151
151
  #### INFO checks (supplementary context):
152
152
  Run each of these checks. If any matches, record an `[INFO]`:
153
153
 
154
- 1. **Related notes**: Are there related notes in NOTES.md?
154
+ 1. **Related notes**: Are there related notes in `.planning/notes/`?
155
155
  2. **Matching seeds**: Are there matching seeds in `.planning/seeds/` that could enhance the plan?
156
156
  3. **Prior phase patterns**: What patterns from prior phases (from SUMMARY.md `patterns` fields) should the imported plan follow?
157
157
 
@@ -24,12 +24,23 @@ This skill runs **inline** — no Task, no AskUserQuestion, no Bash.
24
24
 
25
25
  ---
26
26
 
27
- ## Scope Detection
27
+ ## Storage Format
28
28
 
29
- Two scopes exist. Auto-detect which to use:
29
+ Notes are stored as **individual markdown files** in a notes directory:
30
30
 
31
- 1. **Project scope**: `.planning/NOTES.md` — used when `.planning/` directory exists in cwd
32
- 2. **Global scope**: `~/.claude/notes.md` — used as fallback when no `.planning/`, or when `--global` flag is present
31
+ - **Project scope**: `.planning/notes/{YYYY-MM-DD}-{slug}.md` — used when `.planning/` directory exists in cwd
32
+ - **Global scope**: `~/.claude/notes/{YYYY-MM-DD}-{slug}.md` — used as fallback when no `.planning/`, or when `--global` flag is present
33
+
34
+ Each note file has this format:
35
+
36
+ ```markdown
37
+ ---
38
+ date: "YYYY-MM-DD HH:mm"
39
+ promoted: false
40
+ ---
41
+
42
+ {note text verbatim}
43
+ ```
33
44
 
34
45
  **`--global` flag**: Strip `--global` from anywhere in `$ARGUMENTS` before parsing. When present, force global scope regardless of whether `.planning/` exists.
35
46
 
@@ -54,27 +65,17 @@ Parse `$ARGUMENTS` after stripping `--global`:
54
65
 
55
66
  ## Subcommand: append
56
67
 
57
- Append a timestamped note to the target file.
68
+ Create a timestamped note file in the target directory.
58
69
 
59
70
  ### Steps
60
71
 
61
- 1. Determine scope (project or global) per Scope Detection above
62
- 2. Read the target file if it exists
63
- 3. If the file doesn't exist, create it with this header:
64
-
65
- ```markdown
66
- # Notes
67
-
68
- Quick captures from `/pbr:note`. Ideas worth remembering.
69
-
70
- ---
71
-
72
- ```
73
-
74
- 4. Ensure the file content ends with a newline before appending
75
- 5. Append: `- [YYYY-MM-DD HH:mm] {note text verbatim}`
76
- 6. Write the file
77
- 7. Confirm with exactly one line: `Noted ({scope}): {note text}`
72
+ 1. Determine scope (project or global) per Storage Format above
73
+ 2. Ensure the notes directory exists (`.planning/notes/` or `~/.claude/notes/`)
74
+ 3. Generate slug: first ~4 meaningful words of the note text, lowercase, hyphen-separated (strip articles/prepositions from the start)
75
+ 4. Generate filename: `{YYYY-MM-DD}-{slug}.md`
76
+ - If a file with that name already exists, append `-2`, `-3`, etc.
77
+ 5. Write the file with frontmatter and note text (see Storage Format)
78
+ 6. Confirm with exactly one line: `Noted ({scope}): {note text}`
78
79
  - Where `{scope}` is "project" or "global"
79
80
 
80
81
  ### Constraints
@@ -91,11 +92,11 @@ Show notes from both project and global scopes.
91
92
 
92
93
  ### Steps
93
94
 
94
- 1. Read `.planning/NOTES.md` (if exists) — these are "project" notes
95
- 2. Read `~/.claude/notes.md` (if exists) — these are "global" notes
96
- 3. Parse entries: lines matching `^- \[` are notes
97
- 4. Exclude lines containing `[promoted]` from active counts (but still show them, dimmed)
98
- 5. Number all active entries sequentially starting at 1, using plain integers (1, 2, 3...) for display (across both scopes)
95
+ 1. Glob `.planning/notes/*.md` (if directory exists) — these are "project" notes
96
+ 2. Glob `~/.claude/notes/*.md` (if directory exists) — these are "global" notes
97
+ 3. For each file, read frontmatter to get `date` and `promoted` status
98
+ 4. Exclude files where `promoted: true` from active counts (but still show them, dimmed)
99
+ 5. Sort by date, number all active entries sequentially starting at 1
99
100
  6. If total active entries > 20, show only the last 10 with a note about how many were omitted
100
101
 
101
102
  ### Display Format
@@ -103,18 +104,18 @@ Show notes from both project and global scopes.
103
104
  ```
104
105
  Notes:
105
106
 
106
- Project (.planning/NOTES.md):
107
+ Project (.planning/notes/):
107
108
  1. [2026-02-08 14:32] refactor the hook system to support async validators
108
109
  2. [promoted] [2026-02-08 14:40] add rate limiting to the API endpoints
109
110
  3. [2026-02-08 15:10] consider adding a --dry-run flag to build
110
111
 
111
- Global (~/.claude/notes.md):
112
+ Global (~/.claude/notes/):
112
113
  4. [2026-02-08 10:00] cross-project idea about shared config
113
114
 
114
115
  {count} active note(s). Use `/pbr:note promote <N>` to convert to a todo.
115
116
  ```
116
117
 
117
- If a scope has no file or no entries, show: `(no notes)`
118
+ If a scope has no directory or no entries, show: `(no notes)`
118
119
 
119
120
  ---
120
121
 
@@ -130,7 +131,7 @@ Convert a note into a todo file.
130
131
  4. **Requires `.planning/` directory** — if it doesn't exist, warn: "Todos require a Plan-Build-Run project. Run `/pbr:begin` to initialize one, or use `/pbr:todo add` in an existing project."
131
132
  5. Ensure `.planning/todos/pending/` directory exists
132
133
  6. Generate todo ID: `{NNN}-{slug}` where NNN is the next sequential number (scan both `.planning/todos/pending/` and `.planning/todos/done/` for the highest existing number, increment by 1, zero-pad to 3 digits) and slug is the first ~4 meaningful words of the note text, lowercase, hyphen-separated
133
- 7. Extract the note text (everything after the timestamp)
134
+ 7. Extract the note text from the source file (body after frontmatter)
134
135
  8. Create `.planning/todos/pending/{id}.md`:
135
136
 
136
137
  ```yaml
@@ -156,34 +157,18 @@ Promoted from quick note captured on {original date}.
156
157
  - [ ] {primary criterion derived from note text}
157
158
  ```
158
159
 
159
- 9. Mark the original note as promoted: replace `- [` with `- [promoted] [` on that line
160
+ 9. Mark the source note file as promoted: update its frontmatter to `promoted: true`
160
161
  10. Confirm: `Promoted note {N} to todo {id}: {note text}`
161
162
 
162
163
  ---
163
164
 
164
- ## NOTES.md Format Reference
165
-
166
- ```markdown
167
- # Notes
168
-
169
- Quick captures from `/pbr:note`. Ideas worth remembering.
170
-
171
- ---
172
-
173
- - [2026-02-08 14:32] refactor the hook system to support async validators
174
- - [promoted] [2026-02-08 14:40] add rate limiting to the API endpoints
175
- - [2026-02-08 15:10] consider adding a --dry-run flag to build
176
- ```
177
-
178
- ---
179
-
180
165
  ## Edge Cases
181
166
 
182
167
  1. **"list" as note text**: `/pbr:note list of things` → saves note "list of things" (subcommand only when `list` is the entire arg)
183
- 2. **No `.planning/`**: Falls back to global `~/.claude/notes.md` — works in any directory
168
+ 2. **No `.planning/`**: Falls back to global `~/.claude/notes/` — works in any directory
184
169
  3. **Promote without project**: Warns that todos require `.planning/`, suggests `/pbr:begin`
185
170
  4. **Large files**: `list` shows last 10 when >20 active entries
186
- 5. **Missing newline**: Always ensure trailing newline before appending
171
+ 5. **Duplicate slugs**: Append `-2`, `-3` etc. to filename if slug already used on same date
187
172
  6. **`--global` position**: Stripped from anywhere — `--global my idea` and `my idea --global` both save "my idea" globally
188
173
  7. **Promote already-promoted**: Tell user "Note {N} is already promoted" and stop
189
174
  8. **Empty note text after stripping flags**: Treat as `list` subcommand
@@ -226,3 +211,4 @@ Note {N} not found. Valid range: 1-{max}.
226
211
  4. **DO NOT** create `.planning/` if it doesn't exist — fall back to global
227
212
  5. **DO NOT** number promoted notes in the active count (but still display them)
228
213
  6. **DO NOT** over-format the confirmation — one line is enough
214
+ 7. **DO NOT** use a flat NOTES.md file — always use individual files in notes directory
@@ -85,7 +85,7 @@ Use AskUserQuestion:
85
85
  multiSelect: false
86
86
 
87
87
  If user selects "Quick task": continue to Step 4.
88
- If user selects "Full plan": respond "Use `/pbr:plan` to create a full planning cycle for this task." and stop.
88
+ If user selects "Full plan": clean up `.active-skill` if it exists, then chain directly to the plan skill. The user's task description carries over in conversation context — the plan skill will pick it up.
89
89
  If user selects "Revise": go back to Step 2 to get a new task description.
90
90
  If user types something else (freeform): interpret their response and proceed accordingly.
91
91
 
@@ -32,7 +32,7 @@ Task({
32
32
  - .planning/CONTEXT.md
33
33
  - Any .planning/phases/*/CONTEXT.md files
34
34
  - .planning/research/SUMMARY.md (if exists)
35
- - .planning/NOTES.md (if exists)
35
+ - .planning/notes/*.md (if notes directory exists — read frontmatter for date/promoted status)
36
36
  - .planning/HISTORY.md (if exists — scan for decisions relevant to current work only, do NOT summarize all history)
37
37
 
38
38
  Return ONLY the briefing text. No preamble, no suggestions."
@@ -142,9 +142,9 @@ If any discrepancy found, add: `Run /pbr:resume to auto-reconcile STATE.md.`
142
142
  - Count and summarize if any exist
143
143
 
144
144
  #### Quick Notes
145
- - Check `.planning/NOTES.md` for active note entries
146
- - Count active notes (lines matching `^- \[` that don't contain `[promoted]`)
147
- - Also check `~/.claude/notes.md` for global notes
145
+ - Check `.planning/notes/` directory for note files (individual `.md` files)
146
+ - Count active notes (files where frontmatter does NOT contain `promoted: true`)
147
+ - Also check `~/.claude/notes/` for global notes
148
148
 
149
149
  #### Quick Tasks
150
150
  - Check `.planning/quick/` for recent quick tasks