@sienklogic/plan-build-run 2.3.0 → 2.4.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 +49 -0
- package/README.md +54 -20
- package/dashboard/src/services/dashboard.service.js +24 -1
- package/dashboard/src/services/milestone.service.js +68 -17
- package/package.json +1 -1
- package/plugins/copilot-pbr/CHANGELOG.md +19 -0
- package/plugins/copilot-pbr/README.md +129 -0
- package/plugins/copilot-pbr/agents/codebase-mapper.agent.md +109 -0
- package/plugins/copilot-pbr/agents/debugger.agent.md +169 -0
- package/plugins/copilot-pbr/agents/executor.agent.md +237 -0
- package/plugins/copilot-pbr/agents/general.agent.md +88 -0
- package/plugins/copilot-pbr/agents/integration-checker.agent.md +88 -0
- package/plugins/copilot-pbr/agents/plan-checker.agent.md +199 -0
- package/plugins/copilot-pbr/agents/planner.agent.md +181 -0
- package/plugins/copilot-pbr/agents/researcher.agent.md +163 -0
- package/plugins/copilot-pbr/agents/synthesizer.agent.md +102 -0
- package/plugins/copilot-pbr/agents/verifier.agent.md +194 -0
- package/plugins/copilot-pbr/hooks/hooks.json +144 -0
- package/plugins/copilot-pbr/plugin.json +30 -0
- package/plugins/copilot-pbr/references/agent-anti-patterns.md +25 -0
- package/plugins/copilot-pbr/references/agent-interactions.md +135 -0
- package/plugins/copilot-pbr/references/agent-teams.md +55 -0
- package/plugins/copilot-pbr/references/checkpoints.md +158 -0
- package/plugins/copilot-pbr/references/common-bug-patterns.md +14 -0
- package/plugins/copilot-pbr/references/config-reference.md +442 -0
- package/plugins/copilot-pbr/references/continuation-format.md +213 -0
- package/plugins/copilot-pbr/references/deviation-rules.md +113 -0
- package/plugins/copilot-pbr/references/git-integration.md +227 -0
- package/plugins/copilot-pbr/references/integration-patterns.md +118 -0
- package/plugins/copilot-pbr/references/model-profiles.md +100 -0
- package/plugins/copilot-pbr/references/model-selection.md +32 -0
- package/plugins/copilot-pbr/references/pbr-rules.md +194 -0
- package/plugins/copilot-pbr/references/plan-authoring.md +182 -0
- package/plugins/copilot-pbr/references/plan-format.md +288 -0
- package/plugins/copilot-pbr/references/planning-config.md +214 -0
- package/plugins/copilot-pbr/references/questioning.md +215 -0
- package/plugins/copilot-pbr/references/reading-verification.md +128 -0
- package/plugins/copilot-pbr/references/stub-patterns.md +161 -0
- package/plugins/copilot-pbr/references/subagent-coordination.md +120 -0
- package/plugins/copilot-pbr/references/ui-formatting.md +462 -0
- package/plugins/copilot-pbr/references/verification-patterns.md +199 -0
- package/plugins/copilot-pbr/references/wave-execution.md +96 -0
- package/plugins/copilot-pbr/rules/pbr-workflow.mdc +48 -0
- package/plugins/copilot-pbr/setup.ps1 +93 -0
- package/plugins/copilot-pbr/setup.sh +92 -0
- package/plugins/copilot-pbr/skills/begin/SKILL.md +566 -0
- package/plugins/copilot-pbr/skills/begin/templates/PROJECT.md.tmpl +34 -0
- package/plugins/copilot-pbr/skills/begin/templates/REQUIREMENTS.md.tmpl +19 -0
- package/plugins/copilot-pbr/skills/begin/templates/STATE.md.tmpl +50 -0
- package/plugins/copilot-pbr/skills/begin/templates/config.json.tmpl +64 -0
- package/plugins/copilot-pbr/skills/begin/templates/researcher-prompt.md.tmpl +20 -0
- package/plugins/copilot-pbr/skills/begin/templates/roadmap-prompt.md.tmpl +31 -0
- package/plugins/copilot-pbr/skills/begin/templates/synthesis-prompt.md.tmpl +17 -0
- package/plugins/copilot-pbr/skills/build/SKILL.md +901 -0
- package/plugins/copilot-pbr/skills/config/SKILL.md +253 -0
- package/plugins/copilot-pbr/skills/continue/SKILL.md +159 -0
- package/plugins/copilot-pbr/skills/dashboard/SKILL.md +31 -0
- package/plugins/copilot-pbr/skills/debug/SKILL.md +511 -0
- package/plugins/copilot-pbr/skills/debug/templates/continuation-prompt.md.tmpl +17 -0
- package/plugins/copilot-pbr/skills/debug/templates/initial-investigation-prompt.md.tmpl +28 -0
- package/plugins/copilot-pbr/skills/discuss/SKILL.md +343 -0
- package/plugins/copilot-pbr/skills/discuss/templates/CONTEXT.md.tmpl +62 -0
- package/plugins/copilot-pbr/skills/discuss/templates/decision-categories.md +10 -0
- package/plugins/copilot-pbr/skills/do/SKILL.md +66 -0
- package/plugins/copilot-pbr/skills/explore/SKILL.md +374 -0
- package/plugins/copilot-pbr/skills/health/SKILL.md +218 -0
- package/plugins/copilot-pbr/skills/health/templates/check-pattern.md.tmpl +31 -0
- package/plugins/copilot-pbr/skills/health/templates/output-format.md.tmpl +64 -0
- package/plugins/copilot-pbr/skills/help/SKILL.md +152 -0
- package/plugins/copilot-pbr/skills/import/SKILL.md +498 -0
- package/plugins/copilot-pbr/skills/milestone/SKILL.md +703 -0
- package/plugins/copilot-pbr/skills/milestone/templates/audit-report.md.tmpl +49 -0
- package/plugins/copilot-pbr/skills/milestone/templates/stats-file.md.tmpl +31 -0
- package/plugins/copilot-pbr/skills/note/SKILL.md +227 -0
- package/plugins/copilot-pbr/skills/pause/SKILL.md +246 -0
- package/plugins/copilot-pbr/skills/pause/templates/continue-here.md.tmpl +72 -0
- package/plugins/copilot-pbr/skills/plan/SKILL.md +649 -0
- package/plugins/copilot-pbr/skills/plan/templates/checker-prompt.md.tmpl +22 -0
- package/plugins/copilot-pbr/skills/plan/templates/gap-closure-prompt.md.tmpl +33 -0
- package/plugins/copilot-pbr/skills/plan/templates/planner-prompt.md.tmpl +39 -0
- package/plugins/copilot-pbr/skills/plan/templates/researcher-prompt.md.tmpl +20 -0
- package/plugins/copilot-pbr/skills/plan/templates/revision-prompt.md.tmpl +24 -0
- package/plugins/copilot-pbr/skills/quick/SKILL.md +351 -0
- package/plugins/copilot-pbr/skills/resume/SKILL.md +399 -0
- package/plugins/copilot-pbr/skills/review/SKILL.md +648 -0
- package/plugins/copilot-pbr/skills/review/templates/debugger-prompt.md.tmpl +61 -0
- package/plugins/copilot-pbr/skills/review/templates/gap-planner-prompt.md.tmpl +41 -0
- package/plugins/copilot-pbr/skills/review/templates/verifier-prompt.md.tmpl +116 -0
- package/plugins/copilot-pbr/skills/scan/SKILL.md +301 -0
- package/plugins/copilot-pbr/skills/scan/templates/mapper-prompt.md.tmpl +202 -0
- package/plugins/copilot-pbr/skills/setup/SKILL.md +250 -0
- package/plugins/copilot-pbr/skills/shared/commit-planning-docs.md +36 -0
- package/plugins/copilot-pbr/skills/shared/config-loading.md +103 -0
- package/plugins/copilot-pbr/skills/shared/context-budget.md +41 -0
- package/plugins/copilot-pbr/skills/shared/context-loader-task.md +87 -0
- package/plugins/copilot-pbr/skills/shared/digest-select.md +80 -0
- package/plugins/copilot-pbr/skills/shared/domain-probes.md +126 -0
- package/plugins/copilot-pbr/skills/shared/error-reporting.md +80 -0
- package/plugins/copilot-pbr/skills/shared/gate-prompts.md +389 -0
- package/plugins/copilot-pbr/skills/shared/phase-argument-parsing.md +46 -0
- package/plugins/copilot-pbr/skills/shared/progress-display.md +54 -0
- package/plugins/copilot-pbr/skills/shared/revision-loop.md +82 -0
- package/plugins/copilot-pbr/skills/shared/state-loading.md +63 -0
- package/plugins/copilot-pbr/skills/shared/state-update.md +162 -0
- package/plugins/copilot-pbr/skills/shared/universal-anti-patterns.md +34 -0
- package/plugins/copilot-pbr/skills/status/SKILL.md +362 -0
- package/plugins/copilot-pbr/skills/todo/SKILL.md +256 -0
- package/plugins/copilot-pbr/templates/CONTEXT.md.tmpl +53 -0
- package/plugins/copilot-pbr/templates/INTEGRATION-REPORT.md.tmpl +152 -0
- package/plugins/copilot-pbr/templates/RESEARCH-SUMMARY.md.tmpl +98 -0
- package/plugins/copilot-pbr/templates/ROADMAP.md.tmpl +41 -0
- package/plugins/copilot-pbr/templates/SUMMARY.md.tmpl +82 -0
- package/plugins/copilot-pbr/templates/VERIFICATION-DETAIL.md.tmpl +117 -0
- package/plugins/copilot-pbr/templates/codebase/ARCHITECTURE.md.tmpl +98 -0
- package/plugins/copilot-pbr/templates/codebase/CONCERNS.md.tmpl +93 -0
- package/plugins/copilot-pbr/templates/codebase/CONVENTIONS.md.tmpl +104 -0
- package/plugins/copilot-pbr/templates/codebase/INTEGRATIONS.md.tmpl +78 -0
- package/plugins/copilot-pbr/templates/codebase/STACK.md.tmpl +78 -0
- package/plugins/copilot-pbr/templates/codebase/STRUCTURE.md.tmpl +80 -0
- package/plugins/copilot-pbr/templates/codebase/TESTING.md.tmpl +107 -0
- package/plugins/copilot-pbr/templates/continue-here.md.tmpl +74 -0
- package/plugins/copilot-pbr/templates/prompt-partials/phase-project-context.md.tmpl +38 -0
- package/plugins/copilot-pbr/templates/research/ARCHITECTURE.md.tmpl +124 -0
- package/plugins/copilot-pbr/templates/research/STACK.md.tmpl +71 -0
- package/plugins/copilot-pbr/templates/research/SUMMARY.md.tmpl +112 -0
- package/plugins/copilot-pbr/templates/research-outputs/phase-research.md.tmpl +81 -0
- package/plugins/copilot-pbr/templates/research-outputs/project-research.md.tmpl +99 -0
- package/plugins/copilot-pbr/templates/research-outputs/synthesis.md.tmpl +36 -0
- package/plugins/cursor-pbr/.cursor-plugin/plugin.json +13 -3
- package/plugins/cursor-pbr/skills/dashboard/SKILL.md +14 -4
- package/plugins/cursor-pbr/skills/do/SKILL.md +67 -0
- package/plugins/cursor-pbr/skills/milestone/SKILL.md +10 -7
- package/plugins/cursor-pbr/skills/todo/SKILL.md +28 -5
- package/plugins/cursor-pbr/templates/codebase/ARCHITECTURE.md.tmpl +98 -0
- package/plugins/cursor-pbr/templates/codebase/CONCERNS.md.tmpl +93 -0
- package/plugins/cursor-pbr/templates/codebase/CONVENTIONS.md.tmpl +104 -0
- package/plugins/cursor-pbr/templates/codebase/INTEGRATIONS.md.tmpl +78 -0
- package/plugins/cursor-pbr/templates/codebase/STACK.md.tmpl +78 -0
- package/plugins/cursor-pbr/templates/codebase/STRUCTURE.md.tmpl +80 -0
- package/plugins/cursor-pbr/templates/codebase/TESTING.md.tmpl +107 -0
- package/plugins/cursor-pbr/templates/research/ARCHITECTURE.md.tmpl +124 -0
- package/plugins/cursor-pbr/templates/research/STACK.md.tmpl +71 -0
- package/plugins/cursor-pbr/templates/research/SUMMARY.md.tmpl +112 -0
- package/plugins/cursor-pbr/templates/research-outputs/phase-research.md.tmpl +81 -0
- package/plugins/cursor-pbr/templates/research-outputs/project-research.md.tmpl +99 -0
- package/plugins/cursor-pbr/templates/research-outputs/synthesis.md.tmpl +36 -0
- package/plugins/pbr/.claude-plugin/plugin.json +7 -2
- package/plugins/pbr/scripts/validate-skill-args.js +54 -10
- package/plugins/pbr/skills/do/SKILL.md +70 -0
- package/plugins/pbr/skills/milestone/SKILL.md +10 -7
- package/plugins/pbr/skills/todo/SKILL.md +29 -6
|
@@ -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,93 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Plan-Build-Run for GitHub Copilot CLI — 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\copilot-pbr\setup.ps1
|
|
7
|
+
#
|
|
8
|
+
# Installs PBR as a Copilot CLI plugin using `copilot plugin install`
|
|
9
|
+
# if available, or creates symlinks in ~/.copilot/installed-plugins/ as fallback.
|
|
10
|
+
|
|
11
|
+
$ErrorActionPreference = "Stop"
|
|
12
|
+
|
|
13
|
+
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
14
|
+
$PluginDir = $ScriptDir
|
|
15
|
+
$ProjectDir = Get-Location
|
|
16
|
+
|
|
17
|
+
Write-Host "Plan-Build-Run for GitHub Copilot CLI - Setup" -ForegroundColor Cyan
|
|
18
|
+
Write-Host "===============================================" -ForegroundColor Cyan
|
|
19
|
+
Write-Host ""
|
|
20
|
+
Write-Host "Plugin source: $PluginDir"
|
|
21
|
+
Write-Host "Target project: $ProjectDir"
|
|
22
|
+
Write-Host ""
|
|
23
|
+
|
|
24
|
+
# Sanity check
|
|
25
|
+
if (Test-Path (Join-Path $ProjectDir "plugins\copilot-pbr\setup.ps1")) {
|
|
26
|
+
Write-Host "Error: You appear to be inside the plan-build-run repo itself." -ForegroundColor Red
|
|
27
|
+
Write-Host "Run this script from your target project directory instead:" -ForegroundColor Red
|
|
28
|
+
Write-Host ""
|
|
29
|
+
Write-Host " cd C:\path\to\your\project"
|
|
30
|
+
Write-Host " powershell -ExecutionPolicy Bypass -File $($MyInvocation.MyCommand.Path)"
|
|
31
|
+
exit 1
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
# Strategy 1: Try copilot plugin install
|
|
35
|
+
$copilotCmd = Get-Command copilot -ErrorAction SilentlyContinue
|
|
36
|
+
if ($copilotCmd) {
|
|
37
|
+
Write-Host "Found Copilot CLI. Installing plugin via 'copilot plugin install'..."
|
|
38
|
+
Write-Host ""
|
|
39
|
+
& copilot plugin install --local "$PluginDir"
|
|
40
|
+
Write-Host ""
|
|
41
|
+
Write-Host "Plugin installed successfully via Copilot CLI." -ForegroundColor Green
|
|
42
|
+
} else {
|
|
43
|
+
# Strategy 2: Manual symlink
|
|
44
|
+
Write-Host "Copilot CLI not found in PATH. Falling back to manual symlink install."
|
|
45
|
+
Write-Host ""
|
|
46
|
+
|
|
47
|
+
$installDir = Join-Path $env:USERPROFILE ".copilot\installed-plugins\pbr"
|
|
48
|
+
$parentDir = Join-Path $env:USERPROFILE ".copilot\installed-plugins"
|
|
49
|
+
New-Item -ItemType Directory -Force -Path $parentDir | Out-Null
|
|
50
|
+
|
|
51
|
+
if (Test-Path $installDir) {
|
|
52
|
+
Write-Host " $installDir already exists, skipping (remove it first to reinstall)"
|
|
53
|
+
} else {
|
|
54
|
+
New-Item -ItemType SymbolicLink -Path $installDir -Target $PluginDir | Out-Null
|
|
55
|
+
Write-Host " Linked $PluginDir -> $installDir"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
# Install project-level agents
|
|
60
|
+
Write-Host ""
|
|
61
|
+
Write-Host "Installing project-level agents..."
|
|
62
|
+
$agentsDir = Join-Path $ProjectDir ".github\agents"
|
|
63
|
+
New-Item -ItemType Directory -Force -Path $agentsDir | Out-Null
|
|
64
|
+
|
|
65
|
+
Get-ChildItem (Join-Path $PluginDir "agents\*.agent.md") | ForEach-Object {
|
|
66
|
+
$agentTarget = Join-Path $agentsDir $_.Name
|
|
67
|
+
if (Test-Path $agentTarget) {
|
|
68
|
+
Write-Host " $($_.Name) already exists, skipping"
|
|
69
|
+
} else {
|
|
70
|
+
New-Item -ItemType SymbolicLink -Path $agentTarget -Target $_.FullName | Out-Null
|
|
71
|
+
Write-Host " Linked $($_.Name)"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
Write-Host ""
|
|
76
|
+
Write-Host "Setup complete!" -ForegroundColor Green
|
|
77
|
+
Write-Host ""
|
|
78
|
+
Write-Host "What was installed:"
|
|
79
|
+
Write-Host " Plugin (global): ~/.copilot/installed-plugins/pbr (or via copilot plugin install)"
|
|
80
|
+
Write-Host " Agents (project): .github\agents\*.agent.md"
|
|
81
|
+
Write-Host ""
|
|
82
|
+
Write-Host "Next steps:"
|
|
83
|
+
Write-Host " 1. Open a terminal in this project"
|
|
84
|
+
Write-Host " 2. Run: copilot"
|
|
85
|
+
Write-Host " 3. Use /pbr:begin to start a new project"
|
|
86
|
+
Write-Host ""
|
|
87
|
+
Write-Host "Skills are located at:"
|
|
88
|
+
Write-Host " $PluginDir\skills\"
|
|
89
|
+
Write-Host ""
|
|
90
|
+
Write-Host "To uninstall:"
|
|
91
|
+
Write-Host " copilot plugin uninstall pbr"
|
|
92
|
+
Write-Host " # or: Remove-Item ~/.copilot/installed-plugins/pbr"
|
|
93
|
+
Write-Host " Remove-Item .github\agents\*.agent.md"
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
#
|
|
3
|
+
# Plan-Build-Run for GitHub Copilot CLI — Setup Script
|
|
4
|
+
#
|
|
5
|
+
# Usage:
|
|
6
|
+
# cd /path/to/your/project
|
|
7
|
+
# bash /path/to/plan-build-run/plugins/copilot-pbr/setup.sh
|
|
8
|
+
#
|
|
9
|
+
# This installs PBR as a Copilot CLI plugin using `copilot plugin install`
|
|
10
|
+
# if available, or creates symlinks in ~/.copilot/installed-plugins/ as fallback.
|
|
11
|
+
|
|
12
|
+
set -euo pipefail
|
|
13
|
+
|
|
14
|
+
# Resolve the absolute path to the copilot-pbr plugin directory
|
|
15
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
16
|
+
PLUGIN_DIR="$SCRIPT_DIR"
|
|
17
|
+
PROJECT_DIR="$(pwd)"
|
|
18
|
+
|
|
19
|
+
echo "Plan-Build-Run for GitHub Copilot CLI — Setup"
|
|
20
|
+
echo "==============================================="
|
|
21
|
+
echo ""
|
|
22
|
+
echo "Plugin source: $PLUGIN_DIR"
|
|
23
|
+
echo "Target project: $PROJECT_DIR"
|
|
24
|
+
echo ""
|
|
25
|
+
|
|
26
|
+
# Sanity check: don't install into the PBR repo itself
|
|
27
|
+
if [ -f "$PROJECT_DIR/plugins/copilot-pbr/setup.sh" ]; then
|
|
28
|
+
echo "Error: You appear to be inside the plan-build-run repo itself."
|
|
29
|
+
echo "Run this script from your target project directory instead:"
|
|
30
|
+
echo ""
|
|
31
|
+
echo " cd /path/to/your/project"
|
|
32
|
+
echo " bash $0"
|
|
33
|
+
exit 1
|
|
34
|
+
fi
|
|
35
|
+
|
|
36
|
+
# Strategy 1: Try copilot plugin install (if copilot CLI is available)
|
|
37
|
+
if command -v copilot &> /dev/null; then
|
|
38
|
+
echo "Found Copilot CLI. Installing plugin via 'copilot plugin install'..."
|
|
39
|
+
echo ""
|
|
40
|
+
copilot plugin install --local "$PLUGIN_DIR"
|
|
41
|
+
echo ""
|
|
42
|
+
echo "Plugin installed successfully via Copilot CLI."
|
|
43
|
+
else
|
|
44
|
+
# Strategy 2: Manual symlink into ~/.copilot/installed-plugins/
|
|
45
|
+
echo "Copilot CLI not found in PATH. Falling back to manual symlink install."
|
|
46
|
+
echo ""
|
|
47
|
+
|
|
48
|
+
INSTALL_DIR="$HOME/.copilot/installed-plugins/pbr"
|
|
49
|
+
mkdir -p "$HOME/.copilot/installed-plugins"
|
|
50
|
+
|
|
51
|
+
if [ -e "$INSTALL_DIR" ]; then
|
|
52
|
+
echo " $INSTALL_DIR already exists, skipping (remove it first to reinstall)"
|
|
53
|
+
else
|
|
54
|
+
ln -s "$PLUGIN_DIR" "$INSTALL_DIR"
|
|
55
|
+
echo " Linked $PLUGIN_DIR -> $INSTALL_DIR"
|
|
56
|
+
fi
|
|
57
|
+
fi
|
|
58
|
+
|
|
59
|
+
# Also install agents into project-level .github/agents/ for repo-scoped discovery
|
|
60
|
+
echo ""
|
|
61
|
+
echo "Installing project-level agents..."
|
|
62
|
+
mkdir -p "$PROJECT_DIR/.github/agents"
|
|
63
|
+
for agent_file in "$PLUGIN_DIR/agents/"*.agent.md; do
|
|
64
|
+
agent_name="$(basename "$agent_file")"
|
|
65
|
+
target="$PROJECT_DIR/.github/agents/$agent_name"
|
|
66
|
+
if [ -e "$target" ]; then
|
|
67
|
+
echo " $agent_name already exists, skipping"
|
|
68
|
+
else
|
|
69
|
+
ln -s "$agent_file" "$target"
|
|
70
|
+
echo " Linked $agent_name"
|
|
71
|
+
fi
|
|
72
|
+
done
|
|
73
|
+
|
|
74
|
+
echo ""
|
|
75
|
+
echo "Setup complete!"
|
|
76
|
+
echo ""
|
|
77
|
+
echo "What was installed:"
|
|
78
|
+
echo " Plugin (global): ~/.copilot/installed-plugins/pbr (or via copilot plugin install)"
|
|
79
|
+
echo " Agents (project): .github/agents/*.agent.md"
|
|
80
|
+
echo ""
|
|
81
|
+
echo "Next steps:"
|
|
82
|
+
echo " 1. Open a terminal in this project"
|
|
83
|
+
echo " 2. Run: copilot"
|
|
84
|
+
echo " 3. Use /pbr:begin to start a new project"
|
|
85
|
+
echo ""
|
|
86
|
+
echo "Skills are located at:"
|
|
87
|
+
echo " $PLUGIN_DIR/skills/"
|
|
88
|
+
echo ""
|
|
89
|
+
echo "To uninstall:"
|
|
90
|
+
echo " copilot plugin uninstall pbr"
|
|
91
|
+
echo " # or: rm ~/.copilot/installed-plugins/pbr"
|
|
92
|
+
echo " rm .github/agents/*.agent.md"
|