Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/skills/polyphony-bootstrap/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ Pick **one real work item ID** to smoke-test against — list with

Follow `docs/onboarding-guide.md` sections 3–9 to:

- Verify (or migrate to) the bare-repo + per-run worktree layout (§ 2)
- Verify (or create) the bare-repo + per-run worktree layout (§ 2)
- **Fresh clone** (no existing local clone): run
`~/.polyphony/bin/Bootstrap-BareRepo.ps1 -RemoteUrl <url> [-ParentDir <dir>] [-Commit]`
to produce the canonical `<parent>/<repo>.git/ + <parent>/<repo>/ + <parent>/<repo>-runs/` layout.
- **Existing operator clone**: run `Migrate-ToBareRepo.ps1` instead.
- Select your process template (Basic / Agile / Scrum / CMMI / custom)
- Run `bootstrap-conductor.ps1 -ProcessTemplate <template>` to scaffold
`.polyphony-config/`
Expand Down
21 changes: 21 additions & 0 deletions docs/onboarding-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,27 @@ git -C ~/projects/<repo> status # → clean, on main

The script is idempotent, dry-run by default, and never touches `~/projects/<repo>/` until you've explicitly moved it aside in step 1's printed instructions. See [`docs/per-run-worktree-layout.md`](per-run-worktree-layout.md) for the manual procedure if you need to migrate without the script.

### Fresh clone (no existing local checkout)

If you don't have the repo locally yet, use `Bootstrap-BareRepo.ps1` instead — it goes straight to the canonical bare-repo + worktree layout without any migration plumbing:

```powershell
# Dry-run (default): prints the plan, creates nothing.
~/.polyphony/bin/Bootstrap-BareRepo.ps1 -RemoteUrl https://github.com/Org/<repo>.git

# Execute:
~/.polyphony/bin/Bootstrap-BareRepo.ps1 -RemoteUrl https://github.com/Org/<repo>.git -Commit

# Optional overrides:
# -ParentDir D:\repos (default: ~/projects)
# -RepoName custom-name (default: derived from URL)
# -MainBranch develop (default: remote's HEAD branch)
```

`Bootstrap-BareRepo.ps1` is idempotent: re-running on an existing canonical layout is a no-op. Partial-state recovery (bare present + main worktree missing) is supported as long as the bare's `origin` URL matches the `-RemoteUrl` you pass — identity mismatches refuse rather than overwrite.

On Windows the script always probes via `git --git-dir=<bare>` so it works under `git config --global safe.bareRepository explicit`.

### Verifying the layout

Two preflight probes confirm the layout is wired correctly:
Expand Down
3 changes: 2 additions & 1 deletion install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Remove-Item $tempSha -Force
# After that ships, switch $launcherBase to "$base".
$launcherBase = 'https://raw.githubusercontent.com/PolyphonyRequiem/polyphony/main/scripts'
Write-Host "==> downloading launcher scripts..." -ForegroundColor Cyan
foreach ($name in 'Invoke-PolyphonySdlc.ps1', 'Resolve-GhIdentity.ps1', 'Twig-Hydration.ps1', 'Migrate-ToBareRepo.ps1', 'bootstrap-conductor.ps1') {
foreach ($name in 'Invoke-PolyphonySdlc.ps1', 'Resolve-GhIdentity.ps1', 'Twig-Hydration.ps1', 'Migrate-ToBareRepo.ps1', 'Bootstrap-BareRepo.ps1', 'bootstrap-conductor.ps1') {
$dest = Join-Path $installDir $name
Invoke-WebRequest -Uri "$launcherBase/$name" -OutFile $dest
Unblock-File -Path $dest
Expand All @@ -122,6 +122,7 @@ $expectedLaunchers = @(
'Resolve-GhIdentity.ps1',
'Twig-Hydration.ps1',
'Migrate-ToBareRepo.ps1',
'Bootstrap-BareRepo.ps1',
'bootstrap-conductor.ps1'
)
$missingLaunchers = @()
Expand Down
Loading
Loading