@sienklogic/plan-build-run 2.0.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/CHANGELOG.md +56 -0
- package/CLAUDE.md +149 -0
- package/LICENSE +21 -0
- package/README.md +247 -0
- package/dashboard/bin/cli.js +25 -0
- package/dashboard/package.json +34 -0
- package/dashboard/public/.gitkeep +0 -0
- package/dashboard/public/css/layout.css +406 -0
- package/dashboard/public/css/status-colors.css +98 -0
- package/dashboard/public/js/htmx-title.js +5 -0
- package/dashboard/public/js/sidebar-toggle.js +20 -0
- package/dashboard/src/app.js +78 -0
- package/dashboard/src/middleware/errorHandler.js +52 -0
- package/dashboard/src/middleware/notFoundHandler.js +9 -0
- package/dashboard/src/repositories/planning.repository.js +128 -0
- package/dashboard/src/routes/events.routes.js +40 -0
- package/dashboard/src/routes/index.routes.js +31 -0
- package/dashboard/src/routes/pages.routes.js +195 -0
- package/dashboard/src/server.js +42 -0
- package/dashboard/src/services/dashboard.service.js +222 -0
- package/dashboard/src/services/phase.service.js +167 -0
- package/dashboard/src/services/project.service.js +57 -0
- package/dashboard/src/services/roadmap.service.js +171 -0
- package/dashboard/src/services/sse.service.js +58 -0
- package/dashboard/src/services/todo.service.js +254 -0
- package/dashboard/src/services/watcher.service.js +48 -0
- package/dashboard/src/views/coming-soon.ejs +11 -0
- package/dashboard/src/views/error.ejs +13 -0
- package/dashboard/src/views/index.ejs +5 -0
- package/dashboard/src/views/layout.ejs +1 -0
- package/dashboard/src/views/partials/dashboard-content.ejs +77 -0
- package/dashboard/src/views/partials/footer.ejs +3 -0
- package/dashboard/src/views/partials/head.ejs +21 -0
- package/dashboard/src/views/partials/header.ejs +12 -0
- package/dashboard/src/views/partials/layout-bottom.ejs +15 -0
- package/dashboard/src/views/partials/layout-top.ejs +8 -0
- package/dashboard/src/views/partials/phase-content.ejs +181 -0
- package/dashboard/src/views/partials/phases-content.ejs +117 -0
- package/dashboard/src/views/partials/roadmap-content.ejs +142 -0
- package/dashboard/src/views/partials/sidebar.ejs +38 -0
- package/dashboard/src/views/partials/todo-create-content.ejs +53 -0
- package/dashboard/src/views/partials/todo-detail-content.ejs +38 -0
- package/dashboard/src/views/partials/todos-content.ejs +53 -0
- package/dashboard/src/views/phase-detail.ejs +5 -0
- package/dashboard/src/views/phases.ejs +5 -0
- package/dashboard/src/views/roadmap.ejs +5 -0
- package/dashboard/src/views/todo-create.ejs +5 -0
- package/dashboard/src/views/todo-detail.ejs +5 -0
- package/dashboard/src/views/todos.ejs +5 -0
- package/package.json +57 -0
- package/plugins/pbr/.claude-plugin/plugin.json +13 -0
- package/plugins/pbr/UI-CONSISTENCY-GAPS.md +61 -0
- package/plugins/pbr/agents/codebase-mapper.md +271 -0
- package/plugins/pbr/agents/debugger.md +281 -0
- package/plugins/pbr/agents/executor.md +407 -0
- package/plugins/pbr/agents/general.md +164 -0
- package/plugins/pbr/agents/integration-checker.md +141 -0
- package/plugins/pbr/agents/plan-checker.md +280 -0
- package/plugins/pbr/agents/planner.md +358 -0
- package/plugins/pbr/agents/researcher.md +363 -0
- package/plugins/pbr/agents/synthesizer.md +230 -0
- package/plugins/pbr/agents/verifier.md +454 -0
- package/plugins/pbr/commands/begin.md +5 -0
- package/plugins/pbr/commands/build.md +5 -0
- package/plugins/pbr/commands/config.md +5 -0
- package/plugins/pbr/commands/continue.md +5 -0
- package/plugins/pbr/commands/debug.md +5 -0
- package/plugins/pbr/commands/discuss.md +5 -0
- package/plugins/pbr/commands/explore.md +5 -0
- package/plugins/pbr/commands/health.md +5 -0
- package/plugins/pbr/commands/help.md +5 -0
- package/plugins/pbr/commands/import.md +5 -0
- package/plugins/pbr/commands/milestone.md +5 -0
- package/plugins/pbr/commands/note.md +5 -0
- package/plugins/pbr/commands/pause.md +5 -0
- package/plugins/pbr/commands/plan.md +5 -0
- package/plugins/pbr/commands/quick.md +5 -0
- package/plugins/pbr/commands/resume.md +5 -0
- package/plugins/pbr/commands/review.md +5 -0
- package/plugins/pbr/commands/scan.md +5 -0
- package/plugins/pbr/commands/setup.md +5 -0
- package/plugins/pbr/commands/status.md +5 -0
- package/plugins/pbr/commands/todo.md +5 -0
- package/plugins/pbr/contexts/dev.md +27 -0
- package/plugins/pbr/contexts/research.md +28 -0
- package/plugins/pbr/contexts/review.md +36 -0
- package/plugins/pbr/hooks/hooks.json +183 -0
- package/plugins/pbr/references/agent-anti-patterns.md +24 -0
- package/plugins/pbr/references/agent-interactions.md +134 -0
- package/plugins/pbr/references/agent-teams.md +54 -0
- package/plugins/pbr/references/checkpoints.md +157 -0
- package/plugins/pbr/references/common-bug-patterns.md +13 -0
- package/plugins/pbr/references/continuation-format.md +212 -0
- package/plugins/pbr/references/deviation-rules.md +112 -0
- package/plugins/pbr/references/git-integration.md +226 -0
- package/plugins/pbr/references/integration-patterns.md +117 -0
- package/plugins/pbr/references/model-profiles.md +99 -0
- package/plugins/pbr/references/model-selection.md +31 -0
- package/plugins/pbr/references/pbr-rules.md +193 -0
- package/plugins/pbr/references/plan-authoring.md +181 -0
- package/plugins/pbr/references/plan-format.md +283 -0
- package/plugins/pbr/references/planning-config.md +213 -0
- package/plugins/pbr/references/questioning.md +214 -0
- package/plugins/pbr/references/reading-verification.md +127 -0
- package/plugins/pbr/references/stub-patterns.md +160 -0
- package/plugins/pbr/references/subagent-coordination.md +119 -0
- package/plugins/pbr/references/ui-formatting.md +399 -0
- package/plugins/pbr/references/verification-patterns.md +198 -0
- package/plugins/pbr/references/wave-execution.md +95 -0
- package/plugins/pbr/scripts/auto-continue.js +80 -0
- package/plugins/pbr/scripts/check-dangerous-commands.js +136 -0
- package/plugins/pbr/scripts/check-doc-sprawl.js +102 -0
- package/plugins/pbr/scripts/check-phase-boundary.js +196 -0
- package/plugins/pbr/scripts/check-plan-format.js +270 -0
- package/plugins/pbr/scripts/check-roadmap-sync.js +252 -0
- package/plugins/pbr/scripts/check-skill-workflow.js +262 -0
- package/plugins/pbr/scripts/check-state-sync.js +476 -0
- package/plugins/pbr/scripts/check-subagent-output.js +144 -0
- package/plugins/pbr/scripts/config-schema.json +251 -0
- package/plugins/pbr/scripts/context-budget-check.js +287 -0
- package/plugins/pbr/scripts/event-handler.js +151 -0
- package/plugins/pbr/scripts/event-logger.js +92 -0
- package/plugins/pbr/scripts/hook-logger.js +76 -0
- package/plugins/pbr/scripts/hooks-schema.json +79 -0
- package/plugins/pbr/scripts/log-subagent.js +152 -0
- package/plugins/pbr/scripts/log-tool-failure.js +88 -0
- package/plugins/pbr/scripts/pbr-tools.js +1301 -0
- package/plugins/pbr/scripts/post-write-dispatch.js +66 -0
- package/plugins/pbr/scripts/post-write-quality.js +207 -0
- package/plugins/pbr/scripts/pre-bash-dispatch.js +56 -0
- package/plugins/pbr/scripts/pre-write-dispatch.js +62 -0
- package/plugins/pbr/scripts/progress-tracker.js +228 -0
- package/plugins/pbr/scripts/session-cleanup.js +254 -0
- package/plugins/pbr/scripts/status-line.js +285 -0
- package/plugins/pbr/scripts/suggest-compact.js +119 -0
- package/plugins/pbr/scripts/task-completed.js +45 -0
- package/plugins/pbr/scripts/track-context-budget.js +119 -0
- package/plugins/pbr/scripts/validate-commit.js +200 -0
- package/plugins/pbr/scripts/validate-plugin-structure.js +172 -0
- package/plugins/pbr/skills/begin/SKILL.md +545 -0
- package/plugins/pbr/skills/begin/templates/PROJECT.md.tmpl +33 -0
- package/plugins/pbr/skills/begin/templates/REQUIREMENTS.md.tmpl +18 -0
- package/plugins/pbr/skills/begin/templates/STATE.md.tmpl +49 -0
- package/plugins/pbr/skills/begin/templates/config.json.tmpl +63 -0
- package/plugins/pbr/skills/begin/templates/researcher-prompt.md.tmpl +19 -0
- package/plugins/pbr/skills/begin/templates/roadmap-prompt.md.tmpl +30 -0
- package/plugins/pbr/skills/begin/templates/synthesis-prompt.md.tmpl +16 -0
- package/plugins/pbr/skills/build/SKILL.md +962 -0
- package/plugins/pbr/skills/config/SKILL.md +241 -0
- package/plugins/pbr/skills/continue/SKILL.md +127 -0
- package/plugins/pbr/skills/debug/SKILL.md +489 -0
- package/plugins/pbr/skills/debug/templates/continuation-prompt.md.tmpl +16 -0
- package/plugins/pbr/skills/debug/templates/initial-investigation-prompt.md.tmpl +27 -0
- package/plugins/pbr/skills/discuss/SKILL.md +338 -0
- package/plugins/pbr/skills/discuss/templates/CONTEXT.md.tmpl +61 -0
- package/plugins/pbr/skills/discuss/templates/decision-categories.md +9 -0
- package/plugins/pbr/skills/explore/SKILL.md +362 -0
- package/plugins/pbr/skills/health/SKILL.md +186 -0
- package/plugins/pbr/skills/health/templates/check-pattern.md.tmpl +30 -0
- package/plugins/pbr/skills/health/templates/output-format.md.tmpl +63 -0
- package/plugins/pbr/skills/help/SKILL.md +140 -0
- package/plugins/pbr/skills/import/SKILL.md +490 -0
- package/plugins/pbr/skills/milestone/SKILL.md +673 -0
- package/plugins/pbr/skills/milestone/templates/audit-report.md.tmpl +48 -0
- package/plugins/pbr/skills/milestone/templates/stats-file.md.tmpl +30 -0
- package/plugins/pbr/skills/note/SKILL.md +212 -0
- package/plugins/pbr/skills/pause/SKILL.md +235 -0
- package/plugins/pbr/skills/pause/templates/continue-here.md.tmpl +71 -0
- package/plugins/pbr/skills/plan/SKILL.md +628 -0
- package/plugins/pbr/skills/plan/decimal-phase-calc.md +98 -0
- package/plugins/pbr/skills/plan/templates/checker-prompt.md.tmpl +21 -0
- package/plugins/pbr/skills/plan/templates/gap-closure-prompt.md.tmpl +32 -0
- package/plugins/pbr/skills/plan/templates/planner-prompt.md.tmpl +38 -0
- package/plugins/pbr/skills/plan/templates/researcher-prompt.md.tmpl +19 -0
- package/plugins/pbr/skills/plan/templates/revision-prompt.md.tmpl +23 -0
- package/plugins/pbr/skills/quick/SKILL.md +335 -0
- package/plugins/pbr/skills/resume/SKILL.md +388 -0
- package/plugins/pbr/skills/review/SKILL.md +652 -0
- package/plugins/pbr/skills/review/templates/debugger-prompt.md.tmpl +60 -0
- package/plugins/pbr/skills/review/templates/gap-planner-prompt.md.tmpl +40 -0
- package/plugins/pbr/skills/review/templates/verifier-prompt.md.tmpl +115 -0
- package/plugins/pbr/skills/scan/SKILL.md +269 -0
- package/plugins/pbr/skills/scan/templates/mapper-prompt.md.tmpl +201 -0
- package/plugins/pbr/skills/setup/SKILL.md +227 -0
- package/plugins/pbr/skills/shared/commit-planning-docs.md +35 -0
- package/plugins/pbr/skills/shared/config-loading.md +102 -0
- package/plugins/pbr/skills/shared/context-budget.md +40 -0
- package/plugins/pbr/skills/shared/context-loader-task.md +86 -0
- package/plugins/pbr/skills/shared/digest-select.md +79 -0
- package/plugins/pbr/skills/shared/domain-probes.md +125 -0
- package/plugins/pbr/skills/shared/error-reporting.md +79 -0
- package/plugins/pbr/skills/shared/gate-prompts.md +388 -0
- package/plugins/pbr/skills/shared/phase-argument-parsing.md +45 -0
- package/plugins/pbr/skills/shared/progress-display.md +53 -0
- package/plugins/pbr/skills/shared/revision-loop.md +81 -0
- package/plugins/pbr/skills/shared/state-loading.md +62 -0
- package/plugins/pbr/skills/shared/state-update.md +161 -0
- package/plugins/pbr/skills/shared/universal-anti-patterns.md +33 -0
- package/plugins/pbr/skills/status/SKILL.md +353 -0
- package/plugins/pbr/skills/todo/SKILL.md +181 -0
- package/plugins/pbr/templates/CONTEXT.md.tmpl +52 -0
- package/plugins/pbr/templates/INTEGRATION-REPORT.md.tmpl +151 -0
- package/plugins/pbr/templates/RESEARCH-SUMMARY.md.tmpl +97 -0
- package/plugins/pbr/templates/ROADMAP.md.tmpl +40 -0
- package/plugins/pbr/templates/SUMMARY.md.tmpl +81 -0
- package/plugins/pbr/templates/VERIFICATION-DETAIL.md.tmpl +116 -0
- package/plugins/pbr/templates/codebase/ARCHITECTURE.md.tmpl +98 -0
- package/plugins/pbr/templates/codebase/CONCERNS.md.tmpl +93 -0
- package/plugins/pbr/templates/codebase/CONVENTIONS.md.tmpl +104 -0
- package/plugins/pbr/templates/codebase/INTEGRATIONS.md.tmpl +78 -0
- package/plugins/pbr/templates/codebase/STACK.md.tmpl +78 -0
- package/plugins/pbr/templates/codebase/STRUCTURE.md.tmpl +80 -0
- package/plugins/pbr/templates/codebase/TESTING.md.tmpl +107 -0
- package/plugins/pbr/templates/continue-here.md.tmpl +73 -0
- package/plugins/pbr/templates/prompt-partials/phase-project-context.md.tmpl +37 -0
- package/plugins/pbr/templates/research/ARCHITECTURE.md.tmpl +124 -0
- package/plugins/pbr/templates/research/STACK.md.tmpl +71 -0
- package/plugins/pbr/templates/research/SUMMARY.md.tmpl +112 -0
- package/plugins/pbr/templates/research-outputs/phase-research.md.tmpl +81 -0
- package/plugins/pbr/templates/research-outputs/project-research.md.tmpl +99 -0
- package/plugins/pbr/templates/research-outputs/synthesis.md.tmpl +36 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Template: Milestone Audit Report
|
|
2
|
+
# Used by: milestone/SKILL.md (audit subcommand, Step 5)
|
|
3
|
+
# Variables: {version}, {status}, {date}, {phase entries}, {integration results}, {requirements}, {tech debt}
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
milestone: "{version}"
|
|
7
|
+
status: "{passed | gaps_found | tech_debt}"
|
|
8
|
+
date: "{ISO date}"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Milestone Audit: {version}
|
|
12
|
+
|
|
13
|
+
## Overall Status: {PASSED / GAPS FOUND / TECH DEBT}
|
|
14
|
+
|
|
15
|
+
## Phase Verification Summary
|
|
16
|
+
|
|
17
|
+
| Phase | Verified | Gaps | Integration |
|
|
18
|
+
|-------|----------|------|-------------|
|
|
19
|
+
| {N}. {name} | {yes/no} | {count} | {ok/issues} |
|
|
20
|
+
|
|
21
|
+
## Integration Check Results
|
|
22
|
+
|
|
23
|
+
### Dependency Graph
|
|
24
|
+
{Mermaid or ASCII representation of phase dependencies}
|
|
25
|
+
|
|
26
|
+
### Integration Issues
|
|
27
|
+
{List of integration problems found, or "None"}
|
|
28
|
+
|
|
29
|
+
- **{Issue}**: {description}
|
|
30
|
+
- Affected phases: {list}
|
|
31
|
+
- Severity: {critical/high/medium/low}
|
|
32
|
+
- Suggested fix: {brief suggestion}
|
|
33
|
+
|
|
34
|
+
## Requirements Coverage
|
|
35
|
+
|
|
36
|
+
| Requirement | Status | Verified By |
|
|
37
|
+
|-------------|--------|-------------|
|
|
38
|
+
| {req} | {covered/uncovered} | {phase/plan or "N/A"} |
|
|
39
|
+
|
|
40
|
+
## Tech Debt Identified
|
|
41
|
+
|
|
42
|
+
{Issues that don't block the milestone but should be addressed}
|
|
43
|
+
|
|
44
|
+
- {debt item}: {description}
|
|
45
|
+
|
|
46
|
+
## Recommendations
|
|
47
|
+
|
|
48
|
+
{Summary of what needs to be done, if anything}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Template: Milestone Stats File
|
|
2
|
+
# Used by: milestone/SKILL.md (complete subcommand, Step 5)
|
|
3
|
+
# Variables: {version}, {name}, {date}, {days}, {counts}, {accomplishments}, {decisions}, {tech stack}, {patterns}
|
|
4
|
+
|
|
5
|
+
# Milestone {version} Stats
|
|
6
|
+
|
|
7
|
+
**Name:** {milestone name}
|
|
8
|
+
**Completed:** {ISO date}
|
|
9
|
+
**Duration:** {days}
|
|
10
|
+
|
|
11
|
+
## Metrics
|
|
12
|
+
- Phases: {count}
|
|
13
|
+
- Plans executed: {count}
|
|
14
|
+
- Quick tasks: {count}
|
|
15
|
+
- Total commits: {count}
|
|
16
|
+
- Files changed: {count}
|
|
17
|
+
- Lines added: {count}
|
|
18
|
+
- Lines removed: {count}
|
|
19
|
+
|
|
20
|
+
## Accomplishments
|
|
21
|
+
{bulleted list of key features/capabilities built}
|
|
22
|
+
|
|
23
|
+
## Key Decisions
|
|
24
|
+
{bulleted list of important decisions made}
|
|
25
|
+
|
|
26
|
+
## Technology Stack
|
|
27
|
+
{list of technologies used}
|
|
28
|
+
|
|
29
|
+
## Patterns Established
|
|
30
|
+
{list of patterns applied}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: note
|
|
3
|
+
description: "Zero-friction idea capture. Append, list, or promote notes to todos."
|
|
4
|
+
allowed-tools: Read, Write, Glob, Grep
|
|
5
|
+
argument-hint: "<text> | list | promote <index> [--global]"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# /pbr:note — Quick Note Capture
|
|
9
|
+
|
|
10
|
+
You are running the **note** skill. Your job is zero-friction idea capture. One Write call, one confirmation line. No questions, no prompts.
|
|
11
|
+
|
|
12
|
+
This skill runs **inline** — no Task, no AskUserQuestion, no Bash.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Scope Detection
|
|
17
|
+
|
|
18
|
+
Two scopes exist. Auto-detect which to use:
|
|
19
|
+
|
|
20
|
+
1. **Project scope**: `.planning/NOTES.md` — used when `.planning/` directory exists in cwd
|
|
21
|
+
2. **Global scope**: `~/.claude/notes.md` — used as fallback when no `.planning/`, or when `--global` flag is present
|
|
22
|
+
|
|
23
|
+
**`--global` flag**: Strip `--global` from anywhere in `$ARGUMENTS` before parsing. When present, force global scope regardless of whether `.planning/` exists.
|
|
24
|
+
|
|
25
|
+
**Important**: Do NOT create `.planning/` if it doesn't exist. If there's no `.planning/` directory, fall back to global scope silently.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Subcommand Parsing
|
|
30
|
+
|
|
31
|
+
Parse `$ARGUMENTS` after stripping `--global`:
|
|
32
|
+
|
|
33
|
+
| Condition | Subcommand |
|
|
34
|
+
|-----------|------------|
|
|
35
|
+
| Arguments are exactly `list` (case-insensitive) | **list** |
|
|
36
|
+
| Arguments are exactly `promote <N>` where N is a number | **promote** |
|
|
37
|
+
| Arguments are empty (no text at all) | **list** |
|
|
38
|
+
| Anything else | **append** (the text IS the note) |
|
|
39
|
+
|
|
40
|
+
**Critical**: `list` is only a subcommand when it's the ENTIRE argument. `/pbr:note list of groceries` saves a note with text "list of groceries". Same for `promote` — only a subcommand when followed by exactly one number.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Subcommand: append
|
|
45
|
+
|
|
46
|
+
Append a timestamped note to the target file.
|
|
47
|
+
|
|
48
|
+
### Steps
|
|
49
|
+
|
|
50
|
+
1. Determine scope (project or global) per Scope Detection above
|
|
51
|
+
2. Read the target file if it exists
|
|
52
|
+
3. If the file doesn't exist, create it with this header:
|
|
53
|
+
|
|
54
|
+
```markdown
|
|
55
|
+
# Notes
|
|
56
|
+
|
|
57
|
+
Quick captures from `/pbr:note`. Ideas worth remembering.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
4. Ensure the file content ends with a newline before appending
|
|
64
|
+
5. Append: `- [YYYY-MM-DD HH:mm] {note text verbatim}`
|
|
65
|
+
6. Write the file
|
|
66
|
+
7. Confirm with exactly one line: `Noted ({scope}): {note text}`
|
|
67
|
+
- Where `{scope}` is "project" or "global"
|
|
68
|
+
|
|
69
|
+
### Constraints
|
|
70
|
+
|
|
71
|
+
- **Never modify the note text** — capture verbatim, including typos
|
|
72
|
+
- **Never ask questions** — just write and confirm
|
|
73
|
+
- **Timestamp format**: Use local time, `YYYY-MM-DD HH:mm` (24-hour, no seconds)
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Subcommand: list
|
|
78
|
+
|
|
79
|
+
Show notes from both project and global scopes.
|
|
80
|
+
|
|
81
|
+
### Steps
|
|
82
|
+
|
|
83
|
+
1. Read `.planning/NOTES.md` (if exists) — these are "project" notes
|
|
84
|
+
2. Read `~/.claude/notes.md` (if exists) — these are "global" notes
|
|
85
|
+
3. Parse entries: lines matching `^- \[` are notes
|
|
86
|
+
4. Exclude lines containing `[promoted]` from active counts (but still show them, dimmed)
|
|
87
|
+
5. Number all active entries sequentially starting at 1 (across both scopes)
|
|
88
|
+
6. If total active entries > 20, show only the last 10 with a note about how many were omitted
|
|
89
|
+
|
|
90
|
+
### Display Format
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
Notes:
|
|
94
|
+
|
|
95
|
+
Project (.planning/NOTES.md):
|
|
96
|
+
1. [2026-02-08 14:32] refactor the hook system to support async validators
|
|
97
|
+
2. [promoted] [2026-02-08 14:40] add rate limiting to the API endpoints
|
|
98
|
+
3. [2026-02-08 15:10] consider adding a --dry-run flag to build
|
|
99
|
+
|
|
100
|
+
Global (~/.claude/notes.md):
|
|
101
|
+
4. [2026-02-08 10:00] cross-project idea about shared config
|
|
102
|
+
|
|
103
|
+
{count} active note(s). Use `/pbr:note promote <N>` to convert to a todo.
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
If a scope has no file or no entries, show: `(no notes)`
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Subcommand: promote
|
|
111
|
+
|
|
112
|
+
Convert a note into a todo file.
|
|
113
|
+
|
|
114
|
+
### Steps
|
|
115
|
+
|
|
116
|
+
1. Run the **list** logic to build the numbered index (both scopes)
|
|
117
|
+
2. Find entry N from the numbered list
|
|
118
|
+
3. If N is invalid or refers to an already-promoted note, tell the user and stop
|
|
119
|
+
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."
|
|
120
|
+
5. Ensure `.planning/todos/pending/` directory exists
|
|
121
|
+
6. Generate todo ID: `{YYYYMMDD}-{NNN}` where NNN is sequential within the day (check existing files)
|
|
122
|
+
7. Extract the note text (everything after the timestamp)
|
|
123
|
+
8. Create `.planning/todos/pending/{id}.md`:
|
|
124
|
+
|
|
125
|
+
```yaml
|
|
126
|
+
---
|
|
127
|
+
id: {id}
|
|
128
|
+
area: general
|
|
129
|
+
priority: normal
|
|
130
|
+
created: {ISO-timestamp}
|
|
131
|
+
source: "promoted from /pbr:note"
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
# {note text}
|
|
135
|
+
|
|
136
|
+
## Context
|
|
137
|
+
Promoted from quick note captured on {original date}.
|
|
138
|
+
|
|
139
|
+
## Notes
|
|
140
|
+
(empty)
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
9. Mark the original note as promoted: replace `- [` with `- [promoted] [` on that line
|
|
144
|
+
10. Confirm: `Promoted note {N} to todo {id}: {note text}`
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## NOTES.md Format Reference
|
|
149
|
+
|
|
150
|
+
```markdown
|
|
151
|
+
# Notes
|
|
152
|
+
|
|
153
|
+
Quick captures from `/pbr:note`. Ideas worth remembering.
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
- [2026-02-08 14:32] refactor the hook system to support async validators
|
|
158
|
+
- [promoted] [2026-02-08 14:40] add rate limiting to the API endpoints
|
|
159
|
+
- [2026-02-08 15:10] consider adding a --dry-run flag to build
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## Edge Cases
|
|
165
|
+
|
|
166
|
+
1. **"list" as note text**: `/pbr:note list of things` → saves note "list of things" (subcommand only when `list` is the entire arg)
|
|
167
|
+
2. **No `.planning/`**: Falls back to global `~/.claude/notes.md` — works in any directory
|
|
168
|
+
3. **Promote without project**: Warns that todos require `.planning/`, suggests `/pbr:begin`
|
|
169
|
+
4. **Large files**: `list` shows last 10 when >20 active entries
|
|
170
|
+
5. **Missing newline**: Always ensure trailing newline before appending
|
|
171
|
+
6. **`--global` position**: Stripped from anywhere — `--global my idea` and `my idea --global` both save "my idea" globally
|
|
172
|
+
7. **Promote already-promoted**: Tell user "Note {N} is already promoted" and stop
|
|
173
|
+
8. **Empty note text after stripping flags**: Treat as `list` subcommand
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Error Handling
|
|
178
|
+
|
|
179
|
+
### Write failure
|
|
180
|
+
If the Write tool fails (permissions, disk full, etc.), display:
|
|
181
|
+
```
|
|
182
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
183
|
+
║ ERROR ║
|
|
184
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
185
|
+
|
|
186
|
+
Failed to write note to {target_file}.
|
|
187
|
+
|
|
188
|
+
**To fix:** Check file permissions or disk space.
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Promote target not found
|
|
192
|
+
If the specified note index is invalid, display:
|
|
193
|
+
```
|
|
194
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
195
|
+
║ ERROR ║
|
|
196
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
197
|
+
|
|
198
|
+
Note {N} not found. Valid range: 1-{max}.
|
|
199
|
+
|
|
200
|
+
**To fix:** Run `/pbr:note list` to see available notes.
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## Anti-Patterns
|
|
206
|
+
|
|
207
|
+
1. **DO NOT** ask questions on append — just write and confirm
|
|
208
|
+
2. **DO NOT** modify note text — capture verbatim
|
|
209
|
+
3. **DO NOT** use Task, AskUserQuestion, or Bash
|
|
210
|
+
4. **DO NOT** create `.planning/` if it doesn't exist — fall back to global
|
|
211
|
+
5. **DO NOT** number promoted notes in the active count (but still display them)
|
|
212
|
+
6. **DO NOT** over-format the confirmation — one line is enough
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pause
|
|
3
|
+
description: "Save your current session state for later resumption."
|
|
4
|
+
allowed-tools: Read, Write, Bash, Glob
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /pbr:pause — Save Session State
|
|
8
|
+
|
|
9
|
+
You are running the **pause** skill. Your job is to capture the current session state so the user can resume exactly where they left off in a future conversation. This creates a `.continue-here.md` handoff file with everything the next session needs.
|
|
10
|
+
|
|
11
|
+
This skill runs **inline** (no Task delegation).
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Core Principle
|
|
16
|
+
|
|
17
|
+
**Capture everything the next session needs to hit the ground running.** The resume skill will read this file cold, with zero prior context. Write it as if you're handing off to a colleague who has never seen this project.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Flow
|
|
22
|
+
|
|
23
|
+
### Step 1: Read Current State
|
|
24
|
+
|
|
25
|
+
**Flag: `--checkpoint`**
|
|
26
|
+
|
|
27
|
+
If `$ARGUMENTS` contains `--checkpoint`:
|
|
28
|
+
- Perform a lightweight state dump without full session analysis
|
|
29
|
+
- Write a minimal .continue-here.md with just: Position, git status, and suggested next action
|
|
30
|
+
- Skip the detailed "Completed This Session" analysis (saves time)
|
|
31
|
+
- Useful for quick manual checkpoints at any point
|
|
32
|
+
|
|
33
|
+
Read the following files to understand where things stand:
|
|
34
|
+
|
|
35
|
+
1. **`.planning/STATE.md`** — Current position
|
|
36
|
+
- Extract: current phase, current plan, progress, blockers
|
|
37
|
+
- If STATE.md doesn't exist, display:
|
|
38
|
+
```
|
|
39
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
40
|
+
║ ERROR ║
|
|
41
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
42
|
+
|
|
43
|
+
No Plan-Build-Run project state found. Nothing to pause.
|
|
44
|
+
|
|
45
|
+
**To fix:** Run `/pbr:begin` to initialize a project first.
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
2. **`.planning/config.json`** — Project settings
|
|
49
|
+
- Extract: project name, feature toggles
|
|
50
|
+
|
|
51
|
+
3. **`.planning/ROADMAP.md`** — Phase overview
|
|
52
|
+
- Extract: current phase name, total phases
|
|
53
|
+
|
|
54
|
+
### Step 2: Determine Current Phase Directory
|
|
55
|
+
|
|
56
|
+
From STATE.md, get the current phase number and find its directory:
|
|
57
|
+
1. List directories in `.planning/phases/`
|
|
58
|
+
2. Match the current phase number to a directory
|
|
59
|
+
3. If no match: use the most recently modified phase directory
|
|
60
|
+
|
|
61
|
+
### Step 3: Gather Session State
|
|
62
|
+
|
|
63
|
+
Collect the following information:
|
|
64
|
+
|
|
65
|
+
#### Current Position
|
|
66
|
+
- Phase number and name
|
|
67
|
+
- Plan number (if mid-phase) or "between plans"
|
|
68
|
+
- Status: in-progress, between-plans, between-phases, planning, reviewing
|
|
69
|
+
|
|
70
|
+
#### Work Completed This Session
|
|
71
|
+
Scan the current phase directory for SUMMARY.md files:
|
|
72
|
+
- Read each SUMMARY.md frontmatter
|
|
73
|
+
- Note which ones were created/modified recently (check timestamps or git log)
|
|
74
|
+
- For recently completed plans: extract the plan name and brief status
|
|
75
|
+
|
|
76
|
+
Also check git log for recent commits:
|
|
77
|
+
```bash
|
|
78
|
+
git log --oneline -20 --since="8 hours ago"
|
|
79
|
+
```
|
|
80
|
+
This gives a reasonable window for "this session's work."
|
|
81
|
+
|
|
82
|
+
#### Remaining Work
|
|
83
|
+
Scan for plan files without corresponding SUMMARY.md files:
|
|
84
|
+
- These are plans that haven't been executed yet
|
|
85
|
+
- List them with brief descriptions from their frontmatter
|
|
86
|
+
|
|
87
|
+
#### Key Decisions Made
|
|
88
|
+
Check for:
|
|
89
|
+
- Recent CONTEXT.md files (from `/pbr:discuss`)
|
|
90
|
+
- Key decisions in recent SUMMARY.md files
|
|
91
|
+
- Any deviations noted in summaries
|
|
92
|
+
|
|
93
|
+
#### Blockers or Concerns
|
|
94
|
+
From STATE.md blockers section and any:
|
|
95
|
+
- Failed verifications
|
|
96
|
+
- Checkpoint stops
|
|
97
|
+
- Active debug sessions
|
|
98
|
+
- Unresolved issues noted in summaries
|
|
99
|
+
|
|
100
|
+
#### What to Do Next
|
|
101
|
+
Determine the logical next action (same routing logic as `/pbr:status`):
|
|
102
|
+
- If mid-plan execution: "Continue building phase N"
|
|
103
|
+
- If between plans in a phase: "Execute next plan (plan M)"
|
|
104
|
+
- If phase complete, not reviewed: "Review phase N"
|
|
105
|
+
- If phase reviewed, has gaps: "Fix gaps in phase N"
|
|
106
|
+
- If phase complete: "Plan phase N+1"
|
|
107
|
+
|
|
108
|
+
### Step 4: Write .continue-here.md
|
|
109
|
+
|
|
110
|
+
Write the handoff file to the current phase directory:
|
|
111
|
+
|
|
112
|
+
**Path:** `.planning/phases/{NN}-{phase-name}/.continue-here.md`
|
|
113
|
+
|
|
114
|
+
**Content:**
|
|
115
|
+
|
|
116
|
+
Read `skills/pause/templates/continue-here.md.tmpl` for the handoff file format. Fill in all `{variable}` placeholders with actual session data gathered in Steps 1-3.
|
|
117
|
+
|
|
118
|
+
### Step 5: Update STATE.md
|
|
119
|
+
|
|
120
|
+
Update the Session Continuity section of STATE.md:
|
|
121
|
+
|
|
122
|
+
```markdown
|
|
123
|
+
### Session Continuity
|
|
124
|
+
|
|
125
|
+
**Last paused:** {ISO datetime}
|
|
126
|
+
**Position:** Phase {N}, Plan {M}
|
|
127
|
+
**Continue file:** .planning/phases/{NN}-{phase-name}/.continue-here.md
|
|
128
|
+
**Next action:** {suggested command}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
If the Session Continuity section doesn't exist, create it at the end of STATE.md.
|
|
132
|
+
|
|
133
|
+
### Step 6: Commit as WIP
|
|
134
|
+
|
|
135
|
+
Reference: `skills/shared/commit-planning-docs.md` for the standard commit pattern.
|
|
136
|
+
|
|
137
|
+
If `planning.commit_docs: true` in config.json:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
git add .planning/phases/{NN}-{phase-name}/.continue-here.md
|
|
141
|
+
git add .planning/STATE.md
|
|
142
|
+
git commit -m "wip: pause at phase {N} plan {M}"
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
**Commit rules:**
|
|
146
|
+
- Always use `wip:` prefix for pause commits
|
|
147
|
+
- Include phase and plan numbers
|
|
148
|
+
- Stage only the continue-here and STATE.md files
|
|
149
|
+
- Do NOT stage any code changes (those should already be committed by the executor)
|
|
150
|
+
|
|
151
|
+
### Step 7: Confirm to User
|
|
152
|
+
|
|
153
|
+
Display branded confirmation:
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
157
|
+
PLAN-BUILD-RUN ► SESSION SAVED ✓
|
|
158
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
159
|
+
|
|
160
|
+
Position: Phase {N} — {phase name}, Plan {M}
|
|
161
|
+
Completed: {count} plans this session
|
|
162
|
+
Remaining: {count} plans in this phase
|
|
163
|
+
|
|
164
|
+
───────────────────────────────────────────────────────────────
|
|
165
|
+
|
|
166
|
+
## ▶ Next Up
|
|
167
|
+
|
|
168
|
+
**Resume in your next session**
|
|
169
|
+
|
|
170
|
+
`/pbr:resume`
|
|
171
|
+
|
|
172
|
+
<sub>`/clear` first → fresh context window</sub>
|
|
173
|
+
|
|
174
|
+
───────────────────────────────────────────────────────────────
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## What Gets Captured
|
|
180
|
+
|
|
181
|
+
| Information | Source | Why It Matters |
|
|
182
|
+
|-------------|--------|---------------|
|
|
183
|
+
| Phase + plan position | STATE.md | Know where to start |
|
|
184
|
+
| Completed work | SUMMARY.md files, git log | Know what's already done |
|
|
185
|
+
| Remaining work | Plan files without summaries | Know what's left |
|
|
186
|
+
| Decisions | CONTEXT.md, SUMMARY.md | Preserve user preferences |
|
|
187
|
+
| Blockers | STATE.md, verification files | Don't repeat failed approaches |
|
|
188
|
+
| Next steps | Routing logic | Immediate action on resume |
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## Edge Cases
|
|
193
|
+
|
|
194
|
+
### No work was done this session
|
|
195
|
+
- Still write the continue-here file
|
|
196
|
+
- "Completed This Session" section says: "No plans completed (discussion/planning only)"
|
|
197
|
+
- Capture any decisions or context from the conversation
|
|
198
|
+
|
|
199
|
+
### Multiple phases were worked on
|
|
200
|
+
- Write .continue-here.md in the MOST RECENT phase directory
|
|
201
|
+
- Reference the other phases in the "Completed This Session" section
|
|
202
|
+
- Next steps should focus on the current position
|
|
203
|
+
|
|
204
|
+
### Mid-task pause (executor was interrupted)
|
|
205
|
+
- Note which task was in progress
|
|
206
|
+
- Warn: "Task {name} was in progress when paused. It may need to be re-executed."
|
|
207
|
+
- Check git log to see if any partial commits exist
|
|
208
|
+
|
|
209
|
+
### .continue-here.md already exists
|
|
210
|
+
- **Always REPLACE** the existing file entirely — never append
|
|
211
|
+
- Appending causes stale data from previous sessions to persist, which confuses resume
|
|
212
|
+
- The old .continue-here.md content is superseded by the current state
|
|
213
|
+
- No need to ask the user — the current session state is always more accurate
|
|
214
|
+
|
|
215
|
+
### STATE.md doesn't exist
|
|
216
|
+
- Warn: "No STATE.md found. Creating a minimal pause file."
|
|
217
|
+
- Write .continue-here.md based on git log and file system scan only
|
|
218
|
+
- Don't try to update STATE.md
|
|
219
|
+
|
|
220
|
+
### No git history (fresh project)
|
|
221
|
+
- Skip the git log step
|
|
222
|
+
- Estimate session work from file modification times
|
|
223
|
+
- Still write the continue-here file
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## Anti-Patterns
|
|
228
|
+
|
|
229
|
+
1. **DO NOT** include full file contents in .continue-here.md — keep it concise
|
|
230
|
+
2. **DO NOT** stage code files in the WIP commit — only planning docs
|
|
231
|
+
3. **DO NOT** skip the commit — the WIP commit is how `/pbr:resume` finds the pause point
|
|
232
|
+
4. **DO NOT** write multiple .continue-here.md files — one per pause
|
|
233
|
+
5. **DO NOT** include sensitive information (API keys, passwords) in the handoff
|
|
234
|
+
6. **DO NOT** modify any code files — this skill only writes planning docs
|
|
235
|
+
7. **DO NOT** skip the "Next Steps" section — it's the most important part for resumption
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Template: Continue Here Handoff File
|
|
2
|
+
# Used by: pause/SKILL.md (Step 4)
|
|
3
|
+
# Output path: .planning/phases/{NN}-{phase-name}/.continue-here.md
|
|
4
|
+
# Variables: {datetime}, {hours}, {phase}, {plan}, {status}, {session work}, {remaining}, {decisions}, {blockers}, {context}, {next steps}
|
|
5
|
+
|
|
6
|
+
# Continue Here
|
|
7
|
+
|
|
8
|
+
**Paused:** {ISO datetime}
|
|
9
|
+
**Session duration:** ~{estimated hours} (based on git log timestamps)
|
|
10
|
+
|
|
11
|
+
## Position
|
|
12
|
+
|
|
13
|
+
Phase: {N} -- {name}
|
|
14
|
+
Plan: {M} of {total} (or "between plans" / "phase complete")
|
|
15
|
+
Status: {in-progress / between-plans / reviewing / planning}
|
|
16
|
+
|
|
17
|
+
## Completed This Session
|
|
18
|
+
|
|
19
|
+
{List of work done, with commit references where available}
|
|
20
|
+
|
|
21
|
+
- Plan {A}: {summary} (commit: {short hash})
|
|
22
|
+
- Plan {B}: {summary} (commit: {short hash})
|
|
23
|
+
- Quick task: {description} (commit: {short hash})
|
|
24
|
+
|
|
25
|
+
{If nothing was completed:}
|
|
26
|
+
- No plans completed this session (discussion/planning only)
|
|
27
|
+
|
|
28
|
+
## Remaining
|
|
29
|
+
|
|
30
|
+
{What still needs to be done in this phase}
|
|
31
|
+
|
|
32
|
+
- Plan {C}: {brief description from plan frontmatter}
|
|
33
|
+
- Plan {D}: {brief description from plan frontmatter}
|
|
34
|
+
|
|
35
|
+
{If phase is complete:}
|
|
36
|
+
- Phase {N} is complete. Next: {review or next phase}
|
|
37
|
+
|
|
38
|
+
## Decisions Made
|
|
39
|
+
|
|
40
|
+
{Key decisions from this session that affect future work}
|
|
41
|
+
|
|
42
|
+
- {decision 1}: {brief description}
|
|
43
|
+
- {decision 2}: {brief description}
|
|
44
|
+
|
|
45
|
+
{If no notable decisions:}
|
|
46
|
+
- No major decisions this session
|
|
47
|
+
|
|
48
|
+
## Blockers
|
|
49
|
+
|
|
50
|
+
{Any issues preventing progress}
|
|
51
|
+
|
|
52
|
+
- {blocker description}
|
|
53
|
+
|
|
54
|
+
{If no blockers:}
|
|
55
|
+
- None
|
|
56
|
+
|
|
57
|
+
## Context Notes
|
|
58
|
+
|
|
59
|
+
{Any additional context that would help the next session}
|
|
60
|
+
|
|
61
|
+
- {note about something tricky}
|
|
62
|
+
- {note about something to watch out for}
|
|
63
|
+
- {note about user preferences expressed during this session}
|
|
64
|
+
|
|
65
|
+
## Next Steps
|
|
66
|
+
|
|
67
|
+
{Ordered list of what to do when resuming}
|
|
68
|
+
|
|
69
|
+
1. {Specific first action with command}
|
|
70
|
+
2. {Following action}
|
|
71
|
+
3. {And so on}
|