Terminal First-Run (No Guessing)
Always run PG commands in the project root (the folder that contains pg.ps1).
One-time machine setup from an updated PG repo root: pwsh -ExecutionPolicy Bypass -File ./scripts/sync_global_pg_cli.ps1
PowerShell
Set-Location "C:\real\project\root"
pg install backend --target "."
# or: install frontend --target "."
pg start -Yes
pg map-structure
pg tapsign -Action catalog
pg tapsign -Action plan -Profile universal-web -Endpoint POST:/login
pg integration-init # existing/legacy repo only when missing
pg backend-start
pg frontend-start
pg status
macOS / Linux Shell
cd "/real/project/root"
pg install backend --target "."
# or: install frontend --target "."
pg start -Yes
pg map-structure
pg tapsign -Action catalog
pg tapsign -Action plan -Profile universal-web -Endpoint POST:/login
pg integration-init # existing/legacy repo only when missing
pg backend-start
pg frontend-start
pg status
CMD
cd /d "C:\real\project\root"
pg install backend --target "."
REM or: install frontend --target "."
pg start -Yes
pg map-structure
pg tapsign -Action catalog
pg tapsign -Action plan -Profile universal-web -Endpoint POST:/login
pg integration-init
pg backend-start
pg frontend-start
pg status
Shell translation: After the one-time sync, use pg install ..., pg start ..., pg map-structure, and pg status as the primary commands. If pg is still not found, fall back to the explicit $HOME/.pg-cli path. Repo-local forms such as .\pg.ps1 ..., pwsh -ExecutionPolicy Bypass -File ./pg.ps1 ..., and pg.cmd ... still work.
Start gate: legacy/half-built repos now block session start by default when map docs are missing or stale. Run pg map-structure.
Integration ledger bootstrap: new PG installs now scaffold the shared frontend/backend integration files automatically. Older repos may need a one-time pg integration-init if Memory-bank/frontend-integration.md does not exist yet.
Important: backend-start and frontend-start do not replace pg install or pg start. They only claim roles inside an already bootstrapped project root.
Warning-only override: pg start -Yes -EnforcementMode warn
Narrate startup guard: the extension now detects the nearest AGENTS.md/pg.ps1 context, auto-runs startup once per context per UTC day, and reruns when you move into a new nested repo. Manual retry: Narrate: Run Startup For Current Context.
User-editable agent instructions: the only intended user-editable instruction file is .github/instructions/user-custom.instructions.md inside the project root. pg start includes it in the required read list when present. Keep it plain text/markdown only: no executable command blocks, no secrets, and no instructions to bypass safeguards or ignore higher-priority rules.
Tip: run .\pg.ps1 help to see the full project-local command set. The short pg launcher now forwards repo-local commands too.
pg update / .\pg.ps1 update is profile-dependent. Use it only when help lists update.
Planning rule: when scope changes, add a REQ tag in Memory-bank/project-spec.md and map it to milestones in Memory-bank/project-details.md.