@sienklogic/plan-build-run 2.0.1 → 2.1.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/dashboard/src/routes/pages.routes.js +11 -4
- package/dashboard/src/services/dashboard.service.js +81 -17
- package/dashboard/src/services/phase.service.js +30 -24
- package/dashboard/src/services/roadmap.service.js +3 -3
- package/dashboard/src/views/partials/phase-content.ejs +5 -4
- package/package.json +1 -1
- package/plugins/cursor-pbr/.cursor-plugin/plugin.json +22 -0
- package/plugins/cursor-pbr/CHANGELOG.md +15 -0
- package/plugins/cursor-pbr/README.md +118 -0
- package/plugins/cursor-pbr/agents/codebase-mapper.md +108 -0
- package/plugins/cursor-pbr/agents/debugger.md +168 -0
- package/plugins/cursor-pbr/agents/executor.md +236 -0
- package/plugins/cursor-pbr/agents/general.md +87 -0
- package/plugins/cursor-pbr/agents/integration-checker.md +87 -0
- package/plugins/cursor-pbr/agents/plan-checker.md +198 -0
- package/plugins/cursor-pbr/agents/planner.md +180 -0
- package/plugins/cursor-pbr/agents/researcher.md +162 -0
- package/plugins/cursor-pbr/agents/synthesizer.md +101 -0
- package/plugins/cursor-pbr/agents/verifier.md +193 -0
- package/plugins/cursor-pbr/assets/.gitkeep +0 -0
- package/plugins/cursor-pbr/assets/logo.svg +21 -0
- package/plugins/cursor-pbr/hooks/hooks.json +193 -0
- package/plugins/cursor-pbr/references/agent-anti-patterns.md +25 -0
- package/plugins/cursor-pbr/references/agent-interactions.md +135 -0
- package/plugins/cursor-pbr/references/agent-teams.md +55 -0
- package/plugins/cursor-pbr/references/checkpoints.md +158 -0
- package/plugins/cursor-pbr/references/common-bug-patterns.md +14 -0
- package/plugins/cursor-pbr/references/config-reference.md +442 -0
- package/plugins/cursor-pbr/references/continuation-format.md +213 -0
- package/plugins/cursor-pbr/references/deviation-rules.md +113 -0
- package/plugins/cursor-pbr/references/git-integration.md +227 -0
- package/plugins/cursor-pbr/references/integration-patterns.md +118 -0
- package/plugins/cursor-pbr/references/model-profiles.md +100 -0
- package/plugins/cursor-pbr/references/model-selection.md +32 -0
- package/plugins/cursor-pbr/references/pbr-rules.md +194 -0
- package/plugins/cursor-pbr/references/plan-authoring.md +182 -0
- package/plugins/cursor-pbr/references/plan-format.md +288 -0
- package/plugins/cursor-pbr/references/planning-config.md +214 -0
- package/plugins/cursor-pbr/references/questioning.md +215 -0
- package/plugins/cursor-pbr/references/reading-verification.md +128 -0
- package/plugins/cursor-pbr/references/stub-patterns.md +161 -0
- package/plugins/cursor-pbr/references/subagent-coordination.md +120 -0
- package/plugins/cursor-pbr/references/ui-formatting.md +462 -0
- package/plugins/cursor-pbr/references/verification-patterns.md +199 -0
- package/plugins/cursor-pbr/references/wave-execution.md +96 -0
- package/plugins/cursor-pbr/rules/pbr-workflow.mdc +48 -0
- package/plugins/cursor-pbr/setup.ps1 +78 -0
- package/plugins/cursor-pbr/setup.sh +83 -0
- package/plugins/cursor-pbr/skills/begin/SKILL.md +566 -0
- package/plugins/cursor-pbr/skills/begin/templates/PROJECT.md.tmpl +34 -0
- package/plugins/cursor-pbr/skills/begin/templates/REQUIREMENTS.md.tmpl +19 -0
- package/plugins/cursor-pbr/skills/begin/templates/STATE.md.tmpl +50 -0
- package/plugins/cursor-pbr/skills/begin/templates/config.json.tmpl +64 -0
- package/plugins/cursor-pbr/skills/begin/templates/researcher-prompt.md.tmpl +20 -0
- package/plugins/cursor-pbr/skills/begin/templates/roadmap-prompt.md.tmpl +31 -0
- package/plugins/cursor-pbr/skills/begin/templates/synthesis-prompt.md.tmpl +17 -0
- package/plugins/cursor-pbr/skills/build/SKILL.md +902 -0
- package/plugins/cursor-pbr/skills/config/SKILL.md +253 -0
- package/plugins/cursor-pbr/skills/continue/SKILL.md +159 -0
- package/plugins/cursor-pbr/skills/debug/SKILL.md +512 -0
- package/plugins/cursor-pbr/skills/debug/templates/continuation-prompt.md.tmpl +17 -0
- package/plugins/cursor-pbr/skills/debug/templates/initial-investigation-prompt.md.tmpl +28 -0
- package/plugins/cursor-pbr/skills/discuss/SKILL.md +344 -0
- package/plugins/cursor-pbr/skills/discuss/templates/CONTEXT.md.tmpl +62 -0
- package/plugins/cursor-pbr/skills/discuss/templates/decision-categories.md +10 -0
- package/plugins/cursor-pbr/skills/explore/SKILL.md +375 -0
- package/plugins/cursor-pbr/skills/health/SKILL.md +218 -0
- package/plugins/cursor-pbr/skills/health/templates/check-pattern.md.tmpl +31 -0
- package/plugins/cursor-pbr/skills/health/templates/output-format.md.tmpl +64 -0
- package/plugins/cursor-pbr/skills/help/SKILL.md +152 -0
- package/plugins/cursor-pbr/skills/import/SKILL.md +499 -0
- package/plugins/cursor-pbr/skills/milestone/SKILL.md +701 -0
- package/plugins/cursor-pbr/skills/milestone/templates/audit-report.md.tmpl +49 -0
- package/plugins/cursor-pbr/skills/milestone/templates/stats-file.md.tmpl +31 -0
- package/plugins/cursor-pbr/skills/note/SKILL.md +228 -0
- package/plugins/cursor-pbr/skills/pause/SKILL.md +246 -0
- package/plugins/cursor-pbr/skills/pause/templates/continue-here.md.tmpl +72 -0
- package/plugins/cursor-pbr/skills/plan/SKILL.md +648 -0
- package/plugins/cursor-pbr/skills/plan/templates/checker-prompt.md.tmpl +22 -0
- package/plugins/cursor-pbr/skills/plan/templates/gap-closure-prompt.md.tmpl +33 -0
- package/plugins/cursor-pbr/skills/plan/templates/planner-prompt.md.tmpl +39 -0
- package/plugins/cursor-pbr/skills/plan/templates/researcher-prompt.md.tmpl +20 -0
- package/plugins/cursor-pbr/skills/plan/templates/revision-prompt.md.tmpl +24 -0
- package/plugins/cursor-pbr/skills/quick/SKILL.md +351 -0
- package/plugins/cursor-pbr/skills/resume/SKILL.md +399 -0
- package/plugins/cursor-pbr/skills/review/SKILL.md +649 -0
- package/plugins/cursor-pbr/skills/review/templates/debugger-prompt.md.tmpl +61 -0
- package/plugins/cursor-pbr/skills/review/templates/gap-planner-prompt.md.tmpl +41 -0
- package/plugins/cursor-pbr/skills/review/templates/verifier-prompt.md.tmpl +116 -0
- package/plugins/cursor-pbr/skills/scan/SKILL.md +301 -0
- package/plugins/cursor-pbr/skills/scan/templates/mapper-prompt.md.tmpl +202 -0
- package/plugins/cursor-pbr/skills/setup/SKILL.md +250 -0
- package/plugins/cursor-pbr/skills/shared/commit-planning-docs.md +36 -0
- package/plugins/cursor-pbr/skills/shared/config-loading.md +103 -0
- package/plugins/cursor-pbr/skills/shared/context-budget.md +41 -0
- package/plugins/cursor-pbr/skills/shared/context-loader-task.md +87 -0
- package/plugins/cursor-pbr/skills/shared/digest-select.md +80 -0
- package/plugins/cursor-pbr/skills/shared/domain-probes.md +126 -0
- package/plugins/cursor-pbr/skills/shared/error-reporting.md +80 -0
- package/plugins/cursor-pbr/skills/shared/gate-prompts.md +389 -0
- package/plugins/cursor-pbr/skills/shared/phase-argument-parsing.md +46 -0
- package/plugins/cursor-pbr/skills/shared/progress-display.md +54 -0
- package/plugins/cursor-pbr/skills/shared/revision-loop.md +82 -0
- package/plugins/cursor-pbr/skills/shared/state-loading.md +63 -0
- package/plugins/cursor-pbr/skills/shared/state-update.md +162 -0
- package/plugins/cursor-pbr/skills/shared/universal-anti-patterns.md +34 -0
- package/plugins/cursor-pbr/skills/status/SKILL.md +362 -0
- package/plugins/cursor-pbr/skills/todo/SKILL.md +195 -0
- package/plugins/cursor-pbr/templates/CONTEXT.md.tmpl +53 -0
- package/plugins/cursor-pbr/templates/INTEGRATION-REPORT.md.tmpl +152 -0
- package/plugins/cursor-pbr/templates/RESEARCH-SUMMARY.md.tmpl +98 -0
- package/plugins/cursor-pbr/templates/ROADMAP.md.tmpl +41 -0
- package/plugins/cursor-pbr/templates/SUMMARY.md.tmpl +82 -0
- package/plugins/cursor-pbr/templates/VERIFICATION-DETAIL.md.tmpl +117 -0
- package/plugins/cursor-pbr/templates/continue-here.md.tmpl +74 -0
- package/plugins/cursor-pbr/templates/prompt-partials/phase-project-context.md.tmpl +38 -0
- package/plugins/pbr/agents/codebase-mapper.md +41 -206
- package/plugins/pbr/agents/debugger.md +65 -171
- package/plugins/pbr/agents/executor.md +90 -275
- package/plugins/pbr/agents/general.md +27 -97
- package/plugins/pbr/agents/integration-checker.md +35 -112
- package/plugins/pbr/agents/plan-checker.md +71 -164
- package/plugins/pbr/agents/planner.md +75 -246
- package/plugins/pbr/agents/researcher.md +63 -255
- package/plugins/pbr/agents/synthesizer.md +49 -174
- package/plugins/pbr/agents/verifier.md +75 -366
- package/plugins/pbr/hooks/hooks.json +14 -10
- package/plugins/pbr/scripts/auto-continue.js +20 -4
- package/plugins/pbr/scripts/check-dangerous-commands.js +1 -1
- package/plugins/pbr/scripts/check-phase-boundary.js +1 -1
- package/plugins/pbr/scripts/check-plan-format.js +3 -3
- package/plugins/pbr/scripts/check-roadmap-sync.js +3 -3
- package/plugins/pbr/scripts/check-skill-workflow.js +1 -1
- package/plugins/pbr/scripts/check-state-sync.js +2 -2
- package/plugins/pbr/scripts/check-subagent-output.js +1 -1
- package/plugins/pbr/scripts/check-summary-gate.js +198 -0
- package/plugins/pbr/scripts/context-budget-check.js +1 -1
- package/plugins/pbr/scripts/event-handler.js +2 -2
- package/plugins/pbr/scripts/event-logger.js +1 -1
- package/plugins/pbr/scripts/log-subagent.js +1 -1
- package/plugins/pbr/scripts/pbr-tools.js +1 -1
- package/plugins/pbr/scripts/post-write-dispatch.js +1 -1
- package/plugins/pbr/scripts/post-write-quality.js +1 -1
- package/plugins/pbr/scripts/pre-bash-dispatch.js +1 -1
- package/plugins/pbr/scripts/pre-write-dispatch.js +16 -3
- package/plugins/pbr/scripts/session-cleanup.js +1 -1
- package/plugins/pbr/scripts/status-line.js +1 -1
- package/plugins/pbr/scripts/suggest-compact.js +1 -1
- package/plugins/pbr/scripts/task-completed.js +1 -1
- package/plugins/pbr/scripts/track-context-budget.js +11 -6
- package/plugins/pbr/scripts/validate-commit.js +1 -1
- package/plugins/pbr/scripts/validate-task.js +1 -1
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
<!-- canonical: ../../pbr/references/wave-execution.md -->
|
|
2
|
+
# Wave-Based Execution
|
|
3
|
+
|
|
4
|
+
How Plan-Build-Run parallelizes plan execution within a phase while respecting dependencies.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## What Are Waves?
|
|
9
|
+
|
|
10
|
+
Waves are dependency-based groupings of plans within a phase. Plans in the same wave have no dependencies on each other and can execute in parallel. Plans in later waves depend on earlier waves completing first.
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
Wave 1: [plan-01, plan-02] (no dependencies, can run in parallel)
|
|
14
|
+
Wave 2: [plan-03] (depends on wave 1 plans)
|
|
15
|
+
Wave 3: [plan-04, plan-05] (depends on wave 2)
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## How Wave Numbers Are Assigned
|
|
19
|
+
|
|
20
|
+
Wave numbers come from the `depends_on` field in each plan's YAML frontmatter:
|
|
21
|
+
|
|
22
|
+
```yaml
|
|
23
|
+
---
|
|
24
|
+
plan: "03-01"
|
|
25
|
+
wave: 1
|
|
26
|
+
depends_on: [] # No dependencies → Wave 1
|
|
27
|
+
---
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
```yaml
|
|
31
|
+
---
|
|
32
|
+
plan: "03-03"
|
|
33
|
+
wave: 2
|
|
34
|
+
depends_on: [03-01] # Depends on Wave 1 plan → Wave 2
|
|
35
|
+
---
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**Rules**:
|
|
39
|
+
- Wave 1 plans must have `depends_on: []`
|
|
40
|
+
- Wave 2+ plans must depend only on plans from earlier waves
|
|
41
|
+
- No plan depends on a plan in the same wave (that would require sequential execution within the wave)
|
|
42
|
+
|
|
43
|
+
## Execution Order
|
|
44
|
+
|
|
45
|
+
1. All Wave 1 plans execute (in parallel if enabled)
|
|
46
|
+
2. Wait for all Wave 1 plans to complete
|
|
47
|
+
3. All Wave 2 plans execute (in parallel if enabled)
|
|
48
|
+
4. Repeat until all waves complete
|
|
49
|
+
|
|
50
|
+
## Parallelization Config
|
|
51
|
+
|
|
52
|
+
Controlled by `config.json`:
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"parallelization": {
|
|
57
|
+
"enabled": true,
|
|
58
|
+
"plan_level": true,
|
|
59
|
+
"max_concurrent_agents": 3
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
| Setting | Effect |
|
|
65
|
+
|---------|--------|
|
|
66
|
+
| `enabled: false` | All plans execute sequentially, regardless of wave |
|
|
67
|
+
| `plan_level: true` | Plans within a wave run in parallel |
|
|
68
|
+
| `max_concurrent_agents` | Cap on simultaneous executor agents (default: 3) |
|
|
69
|
+
|
|
70
|
+
When `enabled: false` or `plan_level: false`, plans execute one at a time within each wave, in plan ID order.
|
|
71
|
+
|
|
72
|
+
## Git Lock Handling
|
|
73
|
+
|
|
74
|
+
When multiple executors run in parallel, git lock conflicts can occur. Executors handle this with a retry pattern:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
git commit -m "message" || (sleep 2 && git commit -m "message") || (sleep 2 && git commit -m "message")
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Maximum 3 attempts with 2-second delays between retries.
|
|
81
|
+
|
|
82
|
+
## Checkpoint Manifest
|
|
83
|
+
|
|
84
|
+
The build skill tracks wave progress in `.checkpoint-manifest.json`:
|
|
85
|
+
|
|
86
|
+
```json
|
|
87
|
+
{
|
|
88
|
+
"plans": ["03-01", "03-02", "03-03"],
|
|
89
|
+
"checkpoints_resolved": ["03-01", "03-02"],
|
|
90
|
+
"wave": 2,
|
|
91
|
+
"commit_log": [...],
|
|
92
|
+
"last_good_commit": "abc1234"
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
On crash/resume, the manifest tells the build skill which plans are complete and which wave to resume from.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Plan-Build-Run workflow rules for .planning/ managed projects"
|
|
3
|
+
globs: ".planning/**"
|
|
4
|
+
alwaysApply: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Plan-Build-Run Workflow Rules
|
|
8
|
+
|
|
9
|
+
When a `.planning/` directory exists, this is a Plan-Build-Run-managed project. Follow these rules:
|
|
10
|
+
|
|
11
|
+
## Context Awareness
|
|
12
|
+
|
|
13
|
+
- Check `.planning/STATE.md` for current project context before starting work
|
|
14
|
+
- Read `.planning/config.json` for workflow preferences
|
|
15
|
+
- Respect phase boundaries — don't work on Phase 4 code when Phase 2 is in progress
|
|
16
|
+
|
|
17
|
+
## Context Budget Management
|
|
18
|
+
|
|
19
|
+
Context is your scarcest resource. Protect it:
|
|
20
|
+
|
|
21
|
+
- **Delegate heavy work** to agent invocations — never analyze, research, or build in the main context
|
|
22
|
+
- **Never read agent definitions** (agents/*.md) — agent invocation auto-loads them
|
|
23
|
+
- **Read summaries, not full files** — when checking agent results, read only frontmatter or first 20 lines
|
|
24
|
+
- **Proactive session boundaries**: When you sense context is getting heavy (long conversation, many tool calls, large file reads), proactively tell the user:
|
|
25
|
+
- "Context is getting full. I recommend running `/pbr:pause` now so we can resume fresh."
|
|
26
|
+
- Do this BEFORE hitting the limit — once context is compacted, details are lost
|
|
27
|
+
- **After compaction**: If the conversation was auto-compacted, immediately read STATE.md to reorient
|
|
28
|
+
- **One phase per session** is a good rule of thumb for complex work
|
|
29
|
+
|
|
30
|
+
## Commit Discipline
|
|
31
|
+
|
|
32
|
+
- Prefer atomic commits per logical change
|
|
33
|
+
- Follow the commit format: `{type}({phase}-{plan}): {description}`
|
|
34
|
+
- Valid types: feat, fix, refactor, test, docs, chore
|
|
35
|
+
|
|
36
|
+
## Workflow Discipline
|
|
37
|
+
|
|
38
|
+
- When asked to implement multi-step changes, suggest `/pbr:plan` before diving in
|
|
39
|
+
- When asked to fix bugs, suggest `/pbr:debug` for systematic investigation
|
|
40
|
+
- When asked about project status, suggest `/pbr:status`
|
|
41
|
+
- When starting a new session, suggest `/pbr:resume` if paused work exists
|
|
42
|
+
|
|
43
|
+
## Planning Integrity
|
|
44
|
+
|
|
45
|
+
- Do not modify files in `.planning/phases/` directly — use `/pbr:plan` and `/pbr:build`
|
|
46
|
+
- Do not skip verification — use `/pbr:review` after building
|
|
47
|
+
- Respect locked decisions in CONTEXT.md files
|
|
48
|
+
- Do not implement deferred ideas from CONTEXT.md
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Plan-Build-Run for Cursor — Setup Script (Windows)
|
|
3
|
+
#
|
|
4
|
+
# Usage:
|
|
5
|
+
# cd C:\path\to\your\project
|
|
6
|
+
# powershell -ExecutionPolicy Bypass -File C:\path\to\plan-build-run\plugins\cursor-pbr\setup.ps1
|
|
7
|
+
#
|
|
8
|
+
# Creates symlinks in your project's .cursor\ directory so Cursor
|
|
9
|
+
# can discover PBR rules and agents. Requires admin privileges for
|
|
10
|
+
# symlinks on older Windows versions, or Developer Mode enabled.
|
|
11
|
+
|
|
12
|
+
$ErrorActionPreference = "Stop"
|
|
13
|
+
|
|
14
|
+
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
15
|
+
$PluginDir = $ScriptDir
|
|
16
|
+
$ProjectDir = Get-Location
|
|
17
|
+
|
|
18
|
+
Write-Host "Plan-Build-Run for Cursor - Setup" -ForegroundColor Cyan
|
|
19
|
+
Write-Host "=================================" -ForegroundColor Cyan
|
|
20
|
+
Write-Host ""
|
|
21
|
+
Write-Host "Plugin source: $PluginDir"
|
|
22
|
+
Write-Host "Target project: $ProjectDir"
|
|
23
|
+
Write-Host ""
|
|
24
|
+
|
|
25
|
+
# Sanity check
|
|
26
|
+
if (Test-Path (Join-Path $ProjectDir "plugins\cursor-pbr\setup.ps1")) {
|
|
27
|
+
Write-Host "Error: You appear to be inside the plan-build-run repo itself." -ForegroundColor Red
|
|
28
|
+
Write-Host "Run this script from your target project directory instead:" -ForegroundColor Red
|
|
29
|
+
Write-Host ""
|
|
30
|
+
Write-Host " cd C:\path\to\your\project"
|
|
31
|
+
Write-Host " powershell -ExecutionPolicy Bypass -File $($MyInvocation.MyCommand.Path)"
|
|
32
|
+
exit 1
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
# Create .cursor directories
|
|
36
|
+
$rulesDir = Join-Path $ProjectDir ".cursor\rules"
|
|
37
|
+
$agentsDir = Join-Path $ProjectDir ".cursor\agents"
|
|
38
|
+
New-Item -ItemType Directory -Force -Path $rulesDir | Out-Null
|
|
39
|
+
New-Item -ItemType Directory -Force -Path $agentsDir | Out-Null
|
|
40
|
+
|
|
41
|
+
# --- Rules ---
|
|
42
|
+
Write-Host "Installing rules..."
|
|
43
|
+
$ruleTarget = Join-Path $rulesDir "pbr-workflow.mdc"
|
|
44
|
+
$ruleSource = Join-Path $PluginDir "rules\pbr-workflow.mdc"
|
|
45
|
+
if (Test-Path $ruleTarget) {
|
|
46
|
+
Write-Host " pbr-workflow.mdc already exists, skipping (remove it first to reinstall)"
|
|
47
|
+
} else {
|
|
48
|
+
New-Item -ItemType SymbolicLink -Path $ruleTarget -Target $ruleSource | Out-Null
|
|
49
|
+
Write-Host " Linked pbr-workflow.mdc"
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
# --- Agents ---
|
|
53
|
+
Write-Host "Installing agents..."
|
|
54
|
+
Get-ChildItem (Join-Path $PluginDir "agents\*.md") | ForEach-Object {
|
|
55
|
+
$agentTarget = Join-Path $agentsDir $_.Name
|
|
56
|
+
if (Test-Path $agentTarget) {
|
|
57
|
+
Write-Host " $($_.Name) already exists, skipping"
|
|
58
|
+
} else {
|
|
59
|
+
New-Item -ItemType SymbolicLink -Path $agentTarget -Target $_.FullName | Out-Null
|
|
60
|
+
Write-Host " Linked $($_.Name)"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
Write-Host ""
|
|
65
|
+
Write-Host "Setup complete!" -ForegroundColor Green
|
|
66
|
+
Write-Host ""
|
|
67
|
+
Write-Host "What was installed:"
|
|
68
|
+
Write-Host " .cursor\rules\pbr-workflow.mdc - Workflow rules (auto-loaded when .planning\ exists)"
|
|
69
|
+
Write-Host " .cursor\agents\*.md - 10 specialized agents"
|
|
70
|
+
Write-Host ""
|
|
71
|
+
Write-Host "Next steps:"
|
|
72
|
+
Write-Host " 1. Open this project in Cursor"
|
|
73
|
+
Write-Host " 2. Start a conversation and use /pbr:begin to start a new project"
|
|
74
|
+
Write-Host ""
|
|
75
|
+
Write-Host "Skills are located at:"
|
|
76
|
+
Write-Host " $PluginDir\skills\"
|
|
77
|
+
Write-Host ""
|
|
78
|
+
Write-Host "To uninstall, remove the symlinks from .cursor\rules\ and .cursor\agents\"
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
#
|
|
3
|
+
# Plan-Build-Run for Cursor — Setup Script
|
|
4
|
+
#
|
|
5
|
+
# Usage:
|
|
6
|
+
# cd /path/to/your/project
|
|
7
|
+
# bash /path/to/plan-build-run/plugins/cursor-pbr/setup.sh
|
|
8
|
+
#
|
|
9
|
+
# This creates symlinks in your project's .cursor/ directory so Cursor
|
|
10
|
+
# can discover PBR rules and agents. The plugin source stays in the
|
|
11
|
+
# plan-build-run repo — symlinks keep everything up to date.
|
|
12
|
+
|
|
13
|
+
set -euo pipefail
|
|
14
|
+
|
|
15
|
+
# Resolve the absolute path to the cursor-pbr plugin directory
|
|
16
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
17
|
+
PLUGIN_DIR="$SCRIPT_DIR"
|
|
18
|
+
PROJECT_DIR="$(pwd)"
|
|
19
|
+
|
|
20
|
+
echo "Plan-Build-Run for Cursor — Setup"
|
|
21
|
+
echo "================================="
|
|
22
|
+
echo ""
|
|
23
|
+
echo "Plugin source: $PLUGIN_DIR"
|
|
24
|
+
echo "Target project: $PROJECT_DIR"
|
|
25
|
+
echo ""
|
|
26
|
+
|
|
27
|
+
# Sanity check: don't install into the PBR repo itself
|
|
28
|
+
if [ -f "$PROJECT_DIR/plugins/cursor-pbr/setup.sh" ]; then
|
|
29
|
+
echo "Error: You appear to be inside the plan-build-run repo itself."
|
|
30
|
+
echo "Run this script from your target project directory instead:"
|
|
31
|
+
echo ""
|
|
32
|
+
echo " cd /path/to/your/project"
|
|
33
|
+
echo " bash $0"
|
|
34
|
+
exit 1
|
|
35
|
+
fi
|
|
36
|
+
|
|
37
|
+
# Create .cursor directories if they don't exist
|
|
38
|
+
mkdir -p "$PROJECT_DIR/.cursor/rules"
|
|
39
|
+
|
|
40
|
+
# --- Rules ---
|
|
41
|
+
echo "Installing rules..."
|
|
42
|
+
if [ -e "$PROJECT_DIR/.cursor/rules/pbr-workflow.mdc" ]; then
|
|
43
|
+
echo " pbr-workflow.mdc already exists, skipping (remove it first to reinstall)"
|
|
44
|
+
else
|
|
45
|
+
ln -s "$PLUGIN_DIR/rules/pbr-workflow.mdc" "$PROJECT_DIR/.cursor/rules/pbr-workflow.mdc"
|
|
46
|
+
echo " Linked pbr-workflow.mdc"
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
# --- Agents ---
|
|
50
|
+
# Cursor reads agent definitions from .cursor/agents/ (if supported)
|
|
51
|
+
echo "Installing agents..."
|
|
52
|
+
mkdir -p "$PROJECT_DIR/.cursor/agents"
|
|
53
|
+
for agent_file in "$PLUGIN_DIR/agents/"*.md; do
|
|
54
|
+
agent_name="$(basename "$agent_file")"
|
|
55
|
+
target="$PROJECT_DIR/.cursor/agents/$agent_name"
|
|
56
|
+
if [ -e "$target" ]; then
|
|
57
|
+
echo " $agent_name already exists, skipping"
|
|
58
|
+
else
|
|
59
|
+
ln -s "$agent_file" "$target"
|
|
60
|
+
echo " Linked $agent_name"
|
|
61
|
+
fi
|
|
62
|
+
done
|
|
63
|
+
|
|
64
|
+
echo ""
|
|
65
|
+
echo "Setup complete!"
|
|
66
|
+
echo ""
|
|
67
|
+
echo "What was installed:"
|
|
68
|
+
echo " .cursor/rules/pbr-workflow.mdc — Workflow rules (auto-loaded when .planning/ exists)"
|
|
69
|
+
echo " .cursor/agents/*.md — 10 specialized agents"
|
|
70
|
+
echo ""
|
|
71
|
+
echo "Next steps:"
|
|
72
|
+
echo " 1. Open this project in Cursor"
|
|
73
|
+
echo " 2. Start a conversation and use /pbr:begin to start a new project"
|
|
74
|
+
echo " (or paste the contents of a skill's SKILL.md as a prompt)"
|
|
75
|
+
echo ""
|
|
76
|
+
echo "Skills are located at:"
|
|
77
|
+
echo " $PLUGIN_DIR/skills/"
|
|
78
|
+
echo ""
|
|
79
|
+
echo "To uninstall, remove the symlinks:"
|
|
80
|
+
echo " rm .cursor/rules/pbr-workflow.mdc"
|
|
81
|
+
echo " rm .cursor/agents/codebase-mapper.md debugger.md executor.md general.md"
|
|
82
|
+
echo " rm .cursor/agents/integration-checker.md plan-checker.md planner.md"
|
|
83
|
+
echo " rm .cursor/agents/researcher.md synthesizer.md verifier.md"
|