@pareto4/pp-core 1.18.0 → 1.19.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.
Files changed (147) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/agents/pp-code-fixer.md +9 -5
  3. package/agents/pp-code-reviewer.md +1 -0
  4. package/agents/pp-codebase-mapper.md +3 -0
  5. package/agents/pp-debugger.md +3 -2
  6. package/agents/pp-executor.md +16 -7
  7. package/agents/pp-integration-checker.md +1 -0
  8. package/agents/pp-phase-researcher.md +3 -1
  9. package/agents/pp-plan-checker.md +3 -0
  10. package/agents/pp-planner.md +5 -1
  11. package/agents/pp-research-synthesizer.md +1 -1
  12. package/agents/pp-ui-auditor.md +1 -0
  13. package/agents/pp-ui-researcher.md +3 -1
  14. package/agents/pp-verifier.md +10 -2
  15. package/commands/pp-add-tests.md +1 -1
  16. package/commands/pp-debug.md +1 -0
  17. package/commands/pp-init.md +4 -3
  18. package/commands/pp-quick.md +3 -0
  19. package/commands/pp-review-backlog.md +2 -1
  20. package/gemini-extension.json +1 -1
  21. package/package.json +1 -1
  22. package/pp-core/bin/lib/capability-registry.cjs +2 -2
  23. package/pp-core/bin/lib/check-command-router.cjs +60 -20
  24. package/pp-core/bin/lib/commands.cjs +79 -4
  25. package/pp-core/bin/lib/compose-bindings.cjs +97 -14
  26. package/pp-core/bin/lib/discovery-rollup.cjs +9 -6
  27. package/pp-core/bin/lib/discovery-screens.cjs +20 -2
  28. package/pp-core/bin/lib/discovery-sweep.cjs +12 -3
  29. package/pp-core/bin/lib/discovery-vault-check.cjs +37 -3
  30. package/pp-core/bin/lib/init-contract.cjs +48 -7
  31. package/pp-core/bin/lib/vault-coordinates.cjs +1 -1
  32. package/pp-core/bin/lib/vault-index.cjs +18 -5
  33. package/pp-core/bin/lib/vault-update.cjs +4 -0
  34. package/pp-core/bin/lib/vault.cjs +2 -2
  35. package/pp-core/bin/pp-tools.cjs +10 -4
  36. package/pp-core/org-profile.json +1 -1
  37. package/pp-core/references/autonomous-best-effort.md +3 -2
  38. package/pp-core/references/autonomous-lifecycle.md +1 -0
  39. package/pp-core/references/autonomous-smart-discuss.md +5 -1
  40. package/pp-core/references/discovery-id-conventions.md +35 -2
  41. package/pp-core/references/execute-mvp-tdd.md +3 -3
  42. package/pp-core/references/git-integration.md +57 -33
  43. package/pp-core/references/git-planning-commit.md +31 -9
  44. package/pp-core/references/phase-argument-parsing.md +1 -0
  45. package/pp-core/references/planner-gap-closure.md +1 -0
  46. package/pp-core/references/planner-revision.md +3 -1
  47. package/pp-core/references/planner-tdd.md +4 -4
  48. package/pp-core/references/planning-config.md +3 -3
  49. package/pp-core/references/shell-portability.md +28 -0
  50. package/pp-core/references/tdd.md +20 -16
  51. package/pp-core/references/worktree-path-safety.md +1 -0
  52. package/pp-core/templates/milestone.md +5 -5
  53. package/pp-core/workflows/add-backlog.md +1 -1
  54. package/pp-core/workflows/add-tests.md +5 -2
  55. package/pp-core/workflows/add-todo.md +3 -1
  56. package/pp-core/workflows/ai-integration-phase.md +2 -1
  57. package/pp-core/workflows/audit-fix.md +4 -3
  58. package/pp-core/workflows/audit-milestone.md +1 -0
  59. package/pp-core/workflows/autonomous.md +6 -0
  60. package/pp-core/workflows/check-todos.md +2 -1
  61. package/pp-core/workflows/cleanup.md +3 -1
  62. package/pp-core/workflows/code-review-fix.md +12 -5
  63. package/pp-core/workflows/code-review.md +15 -1
  64. package/pp-core/workflows/complete-milestone.md +13 -3
  65. package/pp-core/workflows/debug.md +2 -0
  66. package/pp-core/workflows/diagnose-issues.md +1 -1
  67. package/pp-core/workflows/discovery-sprint/session-13-gates.md +1 -1
  68. package/pp-core/workflows/discovery-sprint/sessions/01-kick-off.md +51 -7
  69. package/pp-core/workflows/discovery-sprint/sessions/02-as-is.md +5 -3
  70. package/pp-core/workflows/discovery-sprint/sessions/03-to-be.md +10 -8
  71. package/pp-core/workflows/discovery-sprint/sessions/04-ux-design.md +11 -2
  72. package/pp-core/workflows/discovery-sprint/sessions/05-architecture.md +5 -5
  73. package/pp-core/workflows/discovery-sprint/sessions/06-security.md +3 -3
  74. package/pp-core/workflows/discovery-sprint/sessions/07-identity.md +2 -2
  75. package/pp-core/workflows/discovery-sprint/sessions/08-integration.md +14 -2
  76. package/pp-core/workflows/discovery-sprint/sessions/09-qa.md +2 -2
  77. package/pp-core/workflows/discovery-sprint/sessions/10-infrastructure.md +10 -10
  78. package/pp-core/workflows/discovery-sprint/sessions/11-roadmap.md +11 -8
  79. package/pp-core/workflows/discovery-sprint/sessions/12-delivery-model.md +21 -18
  80. package/pp-core/workflows/discovery-sprint/sessions/13-wrap-up.md +5 -3
  81. package/pp-core/workflows/discovery-sprint/templates/context-template.md +9 -3
  82. package/pp-core/workflows/discovery-sprint/vault-context.md +14 -3
  83. package/pp-core/workflows/discovery-sprint.md +11 -8
  84. package/pp-core/workflows/discovery-to-build/steps/architecture-deliverables.md +1 -0
  85. package/pp-core/workflows/discuss-phase-assumptions.md +5 -3
  86. package/pp-core/workflows/discuss-phase.md +8 -3
  87. package/pp-core/workflows/docs-update.md +1 -0
  88. package/pp-core/workflows/eval-review.md +2 -1
  89. package/pp-core/workflows/execute-phase/steps/check-query-gate.md +7 -6
  90. package/pp-core/workflows/execute-phase/steps/cross-ai-delegation.md +1 -0
  91. package/pp-core/workflows/execute-phase/steps/per-plan-worktree-gate.md +1 -0
  92. package/pp-core/workflows/execute-phase/steps/vault-fetch.md +12 -0
  93. package/pp-core/workflows/execute-phase.md +19 -7
  94. package/pp-core/workflows/execute-plan.md +18 -7
  95. package/pp-core/workflows/explore.md +1 -1
  96. package/pp-core/workflows/forensics.md +4 -2
  97. package/pp-core/workflows/health.md +1 -0
  98. package/pp-core/workflows/import.md +2 -1
  99. package/pp-core/workflows/ingest-docs.md +1 -0
  100. package/pp-core/workflows/init/steps/client-context-capture.md +1 -0
  101. package/pp-core/workflows/init/steps/github-provisioning.md +145 -0
  102. package/pp-core/workflows/init/steps/gitlab-provisioning.md +18 -4
  103. package/pp-core/workflows/init/steps/reachability-outcome.md +3 -1
  104. package/pp-core/workflows/init.md +56 -66
  105. package/pp-core/workflows/map-codebase.md +5 -1
  106. package/pp-core/workflows/milestone-summary.md +2 -1
  107. package/pp-core/workflows/mvp-phase.md +1 -0
  108. package/pp-core/workflows/new-milestone.md +9 -5
  109. package/pp-core/workflows/new-project.md +9 -8
  110. package/pp-core/workflows/new-workspace.md +1 -0
  111. package/pp-core/workflows/next.md +2 -1
  112. package/pp-core/workflows/pause-work.md +6 -4
  113. package/pp-core/workflows/plan-milestone-gaps.md +3 -1
  114. package/pp-core/workflows/plan-phase/steps/chunked-planning.md +1 -1
  115. package/pp-core/workflows/plan-phase.md +21 -6
  116. package/pp-core/workflows/plan-review-convergence.md +2 -0
  117. package/pp-core/workflows/plant-seed.md +4 -2
  118. package/pp-core/workflows/pr-branch.md +2 -0
  119. package/pp-core/workflows/progress.md +5 -0
  120. package/pp-core/workflows/quick.md +11 -4
  121. package/pp-core/workflows/reapply-patches.md +3 -0
  122. package/pp-core/workflows/remove-phase.md +1 -1
  123. package/pp-core/workflows/resume-project.md +3 -0
  124. package/pp-core/workflows/review.md +7 -1
  125. package/pp-core/workflows/secure-phase.md +2 -1
  126. package/pp-core/workflows/session-report.md +1 -0
  127. package/pp-core/workflows/ship.md +8 -1
  128. package/pp-core/workflows/sketch-wrap-up.md +1 -1
  129. package/pp-core/workflows/sketch.md +3 -2
  130. package/pp-core/workflows/spec-phase.md +2 -1
  131. package/pp-core/workflows/spike-wrap-up.md +1 -1
  132. package/pp-core/workflows/spike.md +4 -3
  133. package/pp-core/workflows/sync-skills.md +5 -2
  134. package/pp-core/workflows/thread.md +3 -2
  135. package/pp-core/workflows/transition.md +6 -0
  136. package/pp-core/workflows/ui-phase.md +3 -1
  137. package/pp-core/workflows/ui-review.md +2 -1
  138. package/pp-core/workflows/ultraplan-phase.md +1 -0
  139. package/pp-core/workflows/undo.md +14 -10
  140. package/pp-core/workflows/update.md +5 -0
  141. package/pp-core/workflows/validate-phase.md +6 -3
  142. package/pp-core/workflows/vault-review.md +2 -1
  143. package/pp-core/workflows/vault-write-back.md +5 -0
  144. package/pp-core/workflows/verify-phase.md +5 -0
  145. package/pp-core/workflows/verify-work.md +8 -1
  146. package/scripts/prompt-injection-scan.sh +1 -1
  147. package/scripts/sync-runtime-launcher.cjs +115 -5
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pp-core",
3
3
  "displayName": "PP Core",
4
- "version": "1.18.0",
4
+ "version": "1.19.0",
5
5
  "description": "PP Core is a meta-prompting, context engineering, and spec-driven development system for AI coding agents.",
6
6
  "author": {
7
7
  "name": "pareto4",
@@ -217,6 +217,7 @@ This agent runs as a background process that makes commits. Operating on the mai
217
217
  The cleanup tail (commit fixes -> remove worktree -> drop recovery sentinel) MUST be **transactional**: either all of (worktree, branch advance, sentinel) end in a clean state, or — if the process is interrupted (system restart, OOM kill) between the last commit and `git worktree remove` — a discoverable recovery sentinel is left behind so a future run, `/pp:resume-work`, or `/pp:progress` can complete the cleanup. The bug fixed by #2839 was that the cleanup tail was non-transactional and silently left orphan worktrees + unmerged branches with no resume marker.
218
218
 
219
219
  ```bash
220
+ [ -z "${ZSH_VERSION:-}" ] || emulate -R sh
220
221
  # Derive worktree path from padded_phase (parsed from config in next step,
221
222
  # but the shell snippet below is illustrative — adapt once config is parsed).
222
223
  # In practice: parse padded_phase from config first, then run:
@@ -458,18 +459,21 @@ Use `pp_run query commit` with conventional format (message first, then every st
458
459
  ```bash
459
460
  _PP_SHIM_NAME="pp-tools.cjs"; _pp_root() { ( for _v in $(env | sed -n 's/^\(GIT_[A-Za-z0-9_]*\)=.*/\1/p'); do unset "$_v"; done; _c=$(git rev-parse --git-common-dir 2>/dev/null); if [ "${_c##*/}" = .git ] && cd "$_c/.." 2>/dev/null; then pwd -P; else git rev-parse --show-toplevel 2>/dev/null || pwd; fi ); }; pp_run() { case "$PP_TOOLS" in *.cjs) node "$PP_TOOLS" "$@";; *) "$PP_TOOLS" "$@";; esac; }; _PP_RUNTIME_ROOT="${RUNTIME_DIR:-$(_pp_root)}"; PP_TOOLS="${_PP_RUNTIME_ROOT}/pp-core/bin/${_PP_SHIM_NAME}"; if [ -f "$PP_TOOLS" ]; then :; elif [ -f "${_PP_RUNTIME_ROOT}/.claude/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${_PP_RUNTIME_ROOT}/.claude/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${_PP_RUNTIME_ROOT}/.codex/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${_PP_RUNTIME_ROOT}/.codex/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "$HOME/.claude/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="$HOME/.claude/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${HERMES_HOME:-$HOME/.hermes}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${HERMES_HOME:-$HOME/.hermes}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${CURSOR_CONFIG_DIR:-$HOME/.cursor}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${CURSOR_CONFIG_DIR:-$HOME/.cursor}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${CODEX_HOME:-$HOME/.codex}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${CODEX_HOME:-$HOME/.codex}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${GEMINI_CONFIG_DIR:-$HOME/.gemini}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${GEMINI_CONFIG_DIR:-$HOME/.gemini}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${COPILOT_CONFIG_DIR:-$HOME/.copilot}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${COPILOT_CONFIG_DIR:-$HOME/.copilot}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${WINDSURF_CONFIG_DIR:-$HOME/.codeium/windsurf}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${WINDSURF_CONFIG_DIR:-$HOME/.codeium/windsurf}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${AUGMENT_CONFIG_DIR:-$HOME/.augment}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${AUGMENT_CONFIG_DIR:-$HOME/.augment}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${TRAE_CONFIG_DIR:-$HOME/.trae}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${TRAE_CONFIG_DIR:-$HOME/.trae}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${QWEN_CONFIG_DIR:-$HOME/.qwen}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${QWEN_CONFIG_DIR:-$HOME/.qwen}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${CODEBUDDY_CONFIG_DIR:-$HOME/.codebuddy}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${CODEBUDDY_CONFIG_DIR:-$HOME/.codebuddy}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${CLINE_CONFIG_DIR:-$HOME/.cline}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${CLINE_CONFIG_DIR:-$HOME/.cline}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${GROK_AGENTS_HOME:-$HOME/.agents}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${GROK_AGENTS_HOME:-$HOME/.agents}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${ANTIGRAVITY_CONFIG_DIR:-$HOME/.gemini/antigravity}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${ANTIGRAVITY_CONFIG_DIR:-$HOME/.gemini/antigravity}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${OPENCODE_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/opencode}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${OPENCODE_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/opencode}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${KILO_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/kilo}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${KILO_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/kilo}/pp-core/bin/${_PP_SHIM_NAME}"; elif command -v pp-tools >/dev/null 2>&1; then PP_TOOLS="$(command -v pp-tools)"; else echo "ERROR: pp-tools.cjs not found at $PP_TOOLS and pp-tools is not on PATH. Run: npx -y @pareto4/pp-core@latest --claude --local" >&2; exit 1; fi; if [ -n "${CLAUDE_ENV_FILE:-}" ] && [ -n "${PP_TOOLS:-}" ]; then printf "export PATH='%s':\"\$PATH\"\n" "${PP_TOOLS%/*}" >> "$CLAUDE_ENV_FILE" 2>/dev/null || true; fi
460
461
  pp_run query commit \
461
- "fix({padded_phase}): {finding_id} {short_description}" \
462
+ "fix({area}): {finding_id} {short_description}" \
463
+ --phase "{padded_phase}" \
462
464
  --files \
463
465
  {all_modified_files}
464
466
  ```
465
467
 
468
+ `{area}` names the part of the codebase the fix touches (omit `({area})` when no single area fits); the phase goes in the `Phase:` trailer that `--phase` adds, never in the scope.
469
+
466
470
  Examples:
467
- - `fix(02): CR-01 fix SQL injection in auth.py`
468
- - `fix(03): WR-05 add null check before array access`
471
+ - `fix(auth): CR-01 fix SQL injection in auth.py` with trailer `Phase: 02`
472
+ - `fix(dashboard): WR-05 add null check before array access` with trailer `Phase: 03`
469
473
 
470
474
  **Multiple files:** List ALL modified files after the message (space-separated):
471
475
  ```bash
472
- pp_run query commit "fix(02): CR-01 ..." --files \
476
+ pp_run query commit "fix(auth): CR-01 ..." --phase "02" --files \
473
477
  src/api/auth.ts src/types/user.ts tests/auth.test.ts
474
478
  ```
475
479
 
@@ -656,7 +660,7 @@ Fixes are committed **per-finding**. This has operational implications:
656
660
  <success_criteria>
657
661
 
658
662
  - [ ] All in-scope findings attempted (either fixed or skipped with reason)
659
- - [ ] Each fix committed atomically with `fix({padded_phase}): {id} {description}` format
663
+ - [ ] Each fix committed atomically as `fix({area}): {id} {description}` with `--phase "{padded_phase}"` (trailer `Phase: {padded_phase}`)
660
664
  - [ ] All modified files listed after each commit message (multi-file fix support)
661
665
  - [ ] REVIEW-FIX.md created with accurate counts, status, and iteration number
662
666
  - [ ] No source files left in broken state (failed fixes rolled back via git checkout)
@@ -133,6 +133,7 @@ Do NOT invent a heuristic (e.g., HEAD~5) — silent mis-scoping is worse than fa
133
133
 
134
134
  If DIFF_BASE is set, run:
135
135
  ```bash
136
+ [ -z "${ZSH_VERSION:-}" ] || emulate -R sh
136
137
  git diff --name-only ${DIFF_BASE}..HEAD -- . ':!.planning/' ':!ROADMAP.md' ':!STATE.md' ':!*-SUMMARY.md' ':!*-VERIFICATION.md' ':!*-PLAN.md' ':!package-lock.json' ':!yarn.lock' ':!Gemfile.lock' ':!poetry.lock'
137
138
  ```
138
139
 
@@ -114,6 +114,7 @@ Explore the codebase thoroughly for your focus area.
114
114
 
115
115
  **For tech focus:**
116
116
  ```bash
117
+ [ -z "${ZSH_VERSION:-}" ] || emulate -R sh
117
118
  # Package manifests
118
119
  ls package.json requirements.txt Cargo.toml go.mod pyproject.toml 2>/dev/null
119
120
  cat package.json 2>/dev/null | head -100
@@ -128,6 +129,7 @@ grep -r "import.*stripe\|import.*supabase\|import.*aws\|import.*@" src/ --includ
128
129
 
129
130
  **For arch focus:**
130
131
  ```bash
132
+ [ -z "${ZSH_VERSION:-}" ] || emulate -R sh
131
133
  # Directory structure
132
134
  find . -type d -not -path '*/node_modules/*' -not -path '*/.git/*' | head -50
133
135
 
@@ -140,6 +142,7 @@ grep -r "^import" src/ --include="*.ts" --include="*.tsx" 2>/dev/null | head -10
140
142
 
141
143
  **For quality focus:**
142
144
  ```bash
145
+ [ -z "${ZSH_VERSION:-}" ] || emulate -R sh
143
146
  # Linting/formatting config
144
147
  ls .eslintrc* .prettierrc* eslint.config.* biome.json 2>/dev/null
145
148
  cat .prettierrc 2>/dev/null
@@ -912,6 +912,7 @@ The file IS the debugging brain.
912
912
  **First:** Check for active debug sessions.
913
913
 
914
914
  ```bash
915
+ [ -z "${ZSH_VERSION:-}" ] || emulate -R sh
915
916
  ls .planning/debug/*.md 2>/dev/null | grep -v resolved
916
917
  ```
917
918
 
@@ -1169,7 +1170,7 @@ Root cause: {root_cause}"
1169
1170
 
1170
1171
  Then commit planning docs via CLI (respects `commit_docs` config automatically):
1171
1172
  ```bash
1172
- pp_run query commit "docs: resolve debug {slug}" --files .planning/debug/resolved/{slug}.md
1173
+ pp_run query commit "docs(planning): resolve debug {slug}" --files .planning/debug/resolved/{slug}.md
1173
1174
  ```
1174
1175
 
1175
1176
  **Append to knowledge base:**
@@ -1200,7 +1201,7 @@ Then append the entry:
1200
1201
 
1201
1202
  Commit the knowledge base update alongside the resolved session:
1202
1203
  ```bash
1203
- pp_run query commit "docs: update debug knowledge base with {slug}" --files .planning/debug/knowledge-base.md
1204
+ pp_run query commit "docs(planning): update debug knowledge base with {slug}" --files .planning/debug/knowledge-base.md
1204
1205
  ```
1205
1206
 
1206
1207
  Report completion and offer next steps.
@@ -18,6 +18,8 @@ Spawned by `/pp:execute-phase` orchestrator.
18
18
 
19
19
  Your job: Execute the plan completely, commit each task, create SUMMARY.md, update STATE.md.
20
20
 
21
+ Shell you compose yourself may run under zsh on macOS: start every multi-line command with `[ -z "${ZSH_VERSION:-}" ] || emulate -R sh` and use no GNU-only flags (`grep -P`). Details: `~/.claude/pp-core/references/shell-portability.md`.
22
+
21
23
  @~/.claude/pp-core/references/mandatory-initial-read.md
22
24
  </role>
23
25
 
@@ -381,11 +383,11 @@ When executing task with `tdd="true"`:
381
383
 
382
384
  **1. Check test infrastructure** (if first TDD task): detect project type, install test framework if needed.
383
385
 
384
- **2. RED:** Read `<behavior>`, create test file, write failing tests, run (MUST fail), commit: `test({phase}-{plan}): add failing test for [feature]`
386
+ **2. RED:** Read `<behavior>`, create test file, write failing tests, run (MUST fail), commit: `test({area}): add failing test for [feature]` with the trailer `Phase: {phase}-{plan}`
385
387
 
386
- **3. GREEN:** Read `<implementation>`, write minimal code to pass, run (MUST pass), commit: `feat({phase}-{plan}): implement [feature]`
388
+ **3. GREEN:** Read `<implementation>`, write minimal code to pass, run (MUST pass), commit: `feat({area}): implement [feature]` with the trailer `Phase: {phase}-{plan}`
387
389
 
388
- **4. REFACTOR (if needed):** Clean up, run tests (MUST still pass), commit only if changes: `refactor({phase}-{plan}): clean up [feature]`
390
+ **4. REFACTOR (if needed):** Clean up, run tests (MUST still pass), commit only if changes: `refactor({area}): clean up [feature]` with the trailer `Phase: {phase}-{plan}`
389
391
 
390
392
  **Error handling:** RED doesn't fail ��� investigate. GREEN doesn't pass → debug/iterate. REFACTOR breaks → undo.
391
393
 
@@ -395,7 +397,7 @@ When the plan frontmatter has `type: tdd`, the entire plan follows the RED/GREEN
395
397
 
396
398
  **Fail-fast rule:** If a test passes unexpectedly during the RED phase (before any implementation), STOP. The feature may already exist or the test is not testing what you think. Investigate and fix the test before proceeding to GREEN. Do NOT skip RED by proceeding with a passing test.
397
399
 
398
- **Gate sequence validation:** After completing the plan, verify in git log:
400
+ **Gate sequence validation:** After completing the plan, verify in git log (each commit carrying the trailer `Phase: {phase}-{plan}`):
399
401
  1. A `test(...)` commit exists (RED gate)
400
402
  2. A `feat(...)` commit exists after it (GREEN gate)
401
403
  3. Optionally a `refactor(...)` commit exists after GREEN (REFACTOR gate)
@@ -442,6 +444,7 @@ A prior Bash call may have `cd`'d out of the worktree into the main repo. When t
442
444
  `[ -f .git ]` is false (main repo's `.git` is a directory), silently skipping all worktree guards.
443
445
  Capture the spawn-time toplevel via a sentinel on first commit, then verify on every subsequent commit:
444
446
  ```bash
447
+ [ -z "${ZSH_VERSION:-}" ] || emulate -R sh
445
448
  WT_GIT_DIR=$(git rev-parse --git-dir 2>/dev/null)
446
449
  case "$WT_GIT_DIR" in
447
450
  *.git/worktrees/*)
@@ -525,18 +528,22 @@ git add src/types/user.ts
525
528
 
526
529
  **4. Commit:**
527
530
 
531
+ The subject is `{type}({area}): {concise task description}`. `{area}` is a noun naming the part of the codebase the staged files belong to (`auth`, `billing`, `api`), picked from the files you touched; omit `({area})` when no single area fits. Never put the phase or plan number in the scope: the plan goes in the trailer `Phase: {phase}-{plan}`, the last paragraph of the message.
532
+
528
533
  **If `sub_repos` is configured (non-empty array from init context):** Use `commit-to-subrepo` to route files to their correct sub-repo:
529
534
  ```bash
530
- pp_run query commit-to-subrepo "{type}({phase}-{plan}): {concise task description}" --files file1 file2 ...
535
+ pp_run query commit-to-subrepo "{type}({area}): {concise task description}" --phase "{phase}-{plan}" --files file1 file2 ...
531
536
  ```
532
537
  Returns JSON with per-repo commit hashes: `{ committed: true, repos: { "backend": { hash: "abc", files: [...] }, ... } }`. Record all hashes for SUMMARY.
533
538
 
534
539
  **Otherwise (standard single-repo):**
535
540
  ```bash
536
- git commit -m "{type}({phase}-{plan}): {concise task description}
541
+ git commit -m "{type}({area}): {concise task description}
537
542
 
538
543
  - {key change 1}
539
544
  - {key change 2}
545
+
546
+ Phase: {phase}-{plan}
540
547
  "
541
548
  ```
542
549
 
@@ -707,6 +714,7 @@ Do NOT skip. Do NOT proceed to state updates if self-check fails.
707
714
  After SUMMARY.md, update STATE.md using `pp-tools query` state handlers (arguments by name; see `sdk/src/query/QUERY-HANDLERS.md`):
708
715
 
709
716
  ```bash
717
+ [ -z "${ZSH_VERSION:-}" ] || emulate -R sh
710
718
  # Advance plan counter (handles edge cases automatically)
711
719
  pp_run query state.advance-plan
712
720
 
@@ -728,6 +736,7 @@ pp_run query state.record-session \
728
736
  ```
729
737
 
730
738
  ```bash
739
+ [ -z "${ZSH_VERSION:-}" ] || emulate -R sh
731
740
  # Update ROADMAP.md progress for this phase (plan counts, status)
732
741
  pp_run query roadmap.update-plan-progress "${PHASE_NUMBER}"
733
742
 
@@ -757,7 +766,7 @@ pp_run query state.add-blocker --text "Blocker description"
757
766
 
758
767
  <final_commit>
759
768
  ```bash
760
- pp_run query commit "docs({phase}-{plan}): complete [plan-name] plan" --files \
769
+ pp_run query commit "docs(planning): complete [plan-name] plan" --phase "{phase}-{plan}" --files \
761
770
  .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md .planning/STATE.md .planning/ROADMAP.md .planning/REQUIREMENTS.md
762
771
  ```
763
772
 
@@ -92,6 +92,7 @@ For each phase, extract what it provides and what it should consume.
92
92
  **From SUMMARYs, extract:**
93
93
 
94
94
  ```bash
95
+ [ -z "${ZSH_VERSION:-}" ] || emulate -R sh
95
96
  # Key exports from each phase
96
97
  for summary in .planning/phases/*/*-SUMMARY.md; do
97
98
  echo "=== $summary ==="
@@ -531,6 +531,7 @@ Also read `.planning/config.json` — include Validation Architecture section in
531
531
 
532
532
  Then read CONTEXT.md if exists:
533
533
  ```bash
534
+ [ -z "${ZSH_VERSION:-}" ] || emulate -R sh
534
535
  cat "$phase_dir"/*-CONTEXT.md 2>/dev/null
535
536
  ```
536
537
 
@@ -652,6 +653,7 @@ Plans that assume a tool is available without checking lead to silent failures a
652
653
  2. **Probe availability** for each dependency:
653
654
 
654
655
  ```bash
656
+ [ -z "${ZSH_VERSION:-}" ] || emulate -R sh
655
657
  # CLI tools — check if command exists and get version
656
658
  command -v $TOOL 2>/dev/null && $TOOL --version 2>/dev/null | head -1
657
659
 
@@ -781,7 +783,7 @@ Write to: `$PHASE_DIR/$PADDED_PHASE-RESEARCH.md`
781
783
  ## Step 7: Commit Research (optional)
782
784
 
783
785
  ```bash
784
- pp_run query commit "docs($PHASE): research phase domain" --files "$PHASE_DIR/$PADDED_PHASE-RESEARCH.md"
786
+ pp_run query commit "docs(planning): research phase domain" --phase "$PHASE" --files "$PHASE_DIR/$PADDED_PHASE-RESEARCH.md"
785
787
  ```
786
788
 
787
789
  ## Step 8: Return Structured Result
@@ -453,6 +453,7 @@ Skip if: `workflow.nyquist_validation` is explicitly set to `false` in config.js
453
453
  Before running checks 8a-8d, verify VALIDATION.md exists:
454
454
 
455
455
  ```bash
456
+ [ -z "${ZSH_VERSION:-}" ] || emulate -R sh
456
457
  ls "${PHASE_DIR}"/*-VALIDATION.md 2>/dev/null
457
458
  ```
458
459
 
@@ -679,6 +680,7 @@ pp_run query phase.list-artifacts "$phase_number" --type summary
679
680
  Use `pp-tools query` to validate plan structure:
680
681
 
681
682
  ```bash
683
+ [ -z "${ZSH_VERSION:-}" ] || emulate -R sh
682
684
  for plan in "$PHASE_DIR"/*-PLAN.md; do
683
685
  echo "=== $plan ==="
684
686
  PLAN_STRUCTURE=$(pp_run query verify.plan-structure "$plan")
@@ -764,6 +766,7 @@ Inspect `tasks` in the JSON; open the PLAN in the editor for prose-level review.
764
766
  ## Step 6: Verify Dependency Graph
765
767
 
766
768
  ```bash
769
+ [ -z "${ZSH_VERSION:-}" ] || emulate -R sh
767
770
  for plan in "$PHASE_DIR"/*-PLAN.md; do
768
771
  grep "depends_on:" "$plan"
769
772
  done
@@ -615,6 +615,7 @@ instructions for operating in that mode.
615
615
  Check for codebase map:
616
616
 
617
617
  ```bash
618
+ [ -z "${ZSH_VERSION:-}" ] || emulate -R sh
618
619
  ls .planning/codebase/*.md 2>/dev/null
619
620
  ```
620
621
 
@@ -676,6 +677,7 @@ Select top 2-4 phases. Skip phases with no relevance signal.
676
677
 
677
678
  **Step 3 — Read full SUMMARYs for selected phases:**
678
679
  ```bash
680
+ [ -z "${ZSH_VERSION:-}" ] || emulate -R sh
679
681
  cat .planning/phases/{selected-phase}/*-SUMMARY.md
680
682
  ```
681
683
 
@@ -713,6 +715,7 @@ If `features.global_learnings` is `true`: run `pp-tools query learnings.query --
713
715
  Use `phase_dir` from init context (already loaded in load_project_state).
714
716
 
715
717
  ```bash
718
+ [ -z "${ZSH_VERSION:-}" ] || emulate -R sh
716
719
  cat "$phase_dir"/*-CONTEXT.md 2>/dev/null # From /pp:discuss-phase
717
720
  cat "$phase_dir"/*-RESEARCH.md 2>/dev/null # Research output
718
721
  cat "$phase_dir"/*-DISCOVERY.md 2>/dev/null # From mandatory discovery
@@ -906,7 +909,8 @@ Plans:
906
909
 
907
910
  <step name="git_commit">
908
911
  ```bash
909
- pp_run query commit "docs($PHASE): create phase plan" --files \
912
+ [ -z "${ZSH_VERSION:-}" ] || emulate -R sh
913
+ pp_run query commit "docs(planning): create phase plan" --phase "$PHASE" --files \
910
914
  .planning/phases/$PHASE-*/$PHASE-*-PLAN.md .planning/ROADMAP.md
911
915
  ```
912
916
  </step>
@@ -152,7 +152,7 @@ The 4 parallel researcher agents write files but do NOT commit. You commit every
152
152
 
153
153
  ```bash
154
154
  _PP_SHIM_NAME="pp-tools.cjs"; _pp_root() { ( for _v in $(env | sed -n 's/^\(GIT_[A-Za-z0-9_]*\)=.*/\1/p'); do unset "$_v"; done; _c=$(git rev-parse --git-common-dir 2>/dev/null); if [ "${_c##*/}" = .git ] && cd "$_c/.." 2>/dev/null; then pwd -P; else git rev-parse --show-toplevel 2>/dev/null || pwd; fi ); }; pp_run() { case "$PP_TOOLS" in *.cjs) node "$PP_TOOLS" "$@";; *) "$PP_TOOLS" "$@";; esac; }; _PP_RUNTIME_ROOT="${RUNTIME_DIR:-$(_pp_root)}"; PP_TOOLS="${_PP_RUNTIME_ROOT}/pp-core/bin/${_PP_SHIM_NAME}"; if [ -f "$PP_TOOLS" ]; then :; elif [ -f "${_PP_RUNTIME_ROOT}/.claude/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${_PP_RUNTIME_ROOT}/.claude/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${_PP_RUNTIME_ROOT}/.codex/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${_PP_RUNTIME_ROOT}/.codex/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "$HOME/.claude/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="$HOME/.claude/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${HERMES_HOME:-$HOME/.hermes}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${HERMES_HOME:-$HOME/.hermes}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${CURSOR_CONFIG_DIR:-$HOME/.cursor}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${CURSOR_CONFIG_DIR:-$HOME/.cursor}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${CODEX_HOME:-$HOME/.codex}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${CODEX_HOME:-$HOME/.codex}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${GEMINI_CONFIG_DIR:-$HOME/.gemini}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${GEMINI_CONFIG_DIR:-$HOME/.gemini}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${COPILOT_CONFIG_DIR:-$HOME/.copilot}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${COPILOT_CONFIG_DIR:-$HOME/.copilot}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${WINDSURF_CONFIG_DIR:-$HOME/.codeium/windsurf}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${WINDSURF_CONFIG_DIR:-$HOME/.codeium/windsurf}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${AUGMENT_CONFIG_DIR:-$HOME/.augment}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${AUGMENT_CONFIG_DIR:-$HOME/.augment}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${TRAE_CONFIG_DIR:-$HOME/.trae}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${TRAE_CONFIG_DIR:-$HOME/.trae}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${QWEN_CONFIG_DIR:-$HOME/.qwen}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${QWEN_CONFIG_DIR:-$HOME/.qwen}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${CODEBUDDY_CONFIG_DIR:-$HOME/.codebuddy}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${CODEBUDDY_CONFIG_DIR:-$HOME/.codebuddy}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${CLINE_CONFIG_DIR:-$HOME/.cline}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${CLINE_CONFIG_DIR:-$HOME/.cline}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${GROK_AGENTS_HOME:-$HOME/.agents}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${GROK_AGENTS_HOME:-$HOME/.agents}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${ANTIGRAVITY_CONFIG_DIR:-$HOME/.gemini/antigravity}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${ANTIGRAVITY_CONFIG_DIR:-$HOME/.gemini/antigravity}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${OPENCODE_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/opencode}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${OPENCODE_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/opencode}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${KILO_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/kilo}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${KILO_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/kilo}/pp-core/bin/${_PP_SHIM_NAME}"; elif command -v pp-tools >/dev/null 2>&1; then PP_TOOLS="$(command -v pp-tools)"; else echo "ERROR: pp-tools.cjs not found at $PP_TOOLS and pp-tools is not on PATH. Run: npx -y @pareto4/pp-core@latest --claude --local" >&2; exit 1; fi; if [ -n "${CLAUDE_ENV_FILE:-}" ] && [ -n "${PP_TOOLS:-}" ]; then printf "export PATH='%s':\"\$PATH\"\n" "${PP_TOOLS%/*}" >> "$CLAUDE_ENV_FILE" 2>/dev/null || true; fi
155
- pp_run query commit "docs: complete project research" --files .planning/research/
155
+ pp_run query commit "docs(planning): complete project research" --files .planning/research/
156
156
  ```
157
157
 
158
158
  ## Step 8: Return Summary
@@ -79,6 +79,7 @@ If no UI-SPEC exists: audit against abstract 6-pillar standards.
79
79
  **MUST run before any screenshot capture.** Prevents binary files from reaching git history.
80
80
 
81
81
  ```bash
82
+ [ -z "${ZSH_VERSION:-}" ] || emulate -R sh
82
83
  # Ensure directory exists
83
84
  mkdir -p .planning/ui-reviews
84
85
 
@@ -102,6 +102,7 @@ Your UI-SPEC.md is consumed by:
102
102
  **Codebase first:** Always scan the project for existing design decisions before asking.
103
103
 
104
104
  ```bash
105
+ [ -z "${ZSH_VERSION:-}" ] || emulate -R sh
105
106
  # Detect design system
106
107
  ls components.json tailwind.config.* postcss.config.* 2>/dev/null
107
108
 
@@ -236,6 +237,7 @@ Read all files from `<required_reading>` block. Parse:
236
237
  ## Step 2: Scout Existing UI
237
238
 
238
239
  ```bash
240
+ [ -z "${ZSH_VERSION:-}" ] || emulate -R sh
239
241
  # Design system detection
240
242
  ls components.json tailwind.config.* postcss.config.* 2>/dev/null
241
243
 
@@ -287,7 +289,7 @@ This file is the canonical output of this agent. The orchestrator reads `$PHASE_
287
289
 
288
290
  ```bash
289
291
  _PP_SHIM_NAME="pp-tools.cjs"; _pp_root() { ( for _v in $(env | sed -n 's/^\(GIT_[A-Za-z0-9_]*\)=.*/\1/p'); do unset "$_v"; done; _c=$(git rev-parse --git-common-dir 2>/dev/null); if [ "${_c##*/}" = .git ] && cd "$_c/.." 2>/dev/null; then pwd -P; else git rev-parse --show-toplevel 2>/dev/null || pwd; fi ); }; pp_run() { case "$PP_TOOLS" in *.cjs) node "$PP_TOOLS" "$@";; *) "$PP_TOOLS" "$@";; esac; }; _PP_RUNTIME_ROOT="${RUNTIME_DIR:-$(_pp_root)}"; PP_TOOLS="${_PP_RUNTIME_ROOT}/pp-core/bin/${_PP_SHIM_NAME}"; if [ -f "$PP_TOOLS" ]; then :; elif [ -f "${_PP_RUNTIME_ROOT}/.claude/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${_PP_RUNTIME_ROOT}/.claude/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${_PP_RUNTIME_ROOT}/.codex/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${_PP_RUNTIME_ROOT}/.codex/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "$HOME/.claude/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="$HOME/.claude/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${HERMES_HOME:-$HOME/.hermes}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${HERMES_HOME:-$HOME/.hermes}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${CURSOR_CONFIG_DIR:-$HOME/.cursor}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${CURSOR_CONFIG_DIR:-$HOME/.cursor}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${CODEX_HOME:-$HOME/.codex}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${CODEX_HOME:-$HOME/.codex}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${GEMINI_CONFIG_DIR:-$HOME/.gemini}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${GEMINI_CONFIG_DIR:-$HOME/.gemini}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${COPILOT_CONFIG_DIR:-$HOME/.copilot}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${COPILOT_CONFIG_DIR:-$HOME/.copilot}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${WINDSURF_CONFIG_DIR:-$HOME/.codeium/windsurf}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${WINDSURF_CONFIG_DIR:-$HOME/.codeium/windsurf}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${AUGMENT_CONFIG_DIR:-$HOME/.augment}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${AUGMENT_CONFIG_DIR:-$HOME/.augment}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${TRAE_CONFIG_DIR:-$HOME/.trae}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${TRAE_CONFIG_DIR:-$HOME/.trae}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${QWEN_CONFIG_DIR:-$HOME/.qwen}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${QWEN_CONFIG_DIR:-$HOME/.qwen}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${CODEBUDDY_CONFIG_DIR:-$HOME/.codebuddy}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${CODEBUDDY_CONFIG_DIR:-$HOME/.codebuddy}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${CLINE_CONFIG_DIR:-$HOME/.cline}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${CLINE_CONFIG_DIR:-$HOME/.cline}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${GROK_AGENTS_HOME:-$HOME/.agents}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${GROK_AGENTS_HOME:-$HOME/.agents}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${ANTIGRAVITY_CONFIG_DIR:-$HOME/.gemini/antigravity}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${ANTIGRAVITY_CONFIG_DIR:-$HOME/.gemini/antigravity}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${OPENCODE_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/opencode}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${OPENCODE_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/opencode}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${KILO_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/kilo}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${KILO_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/kilo}/pp-core/bin/${_PP_SHIM_NAME}"; elif command -v pp-tools >/dev/null 2>&1; then PP_TOOLS="$(command -v pp-tools)"; else echo "ERROR: pp-tools.cjs not found at $PP_TOOLS and pp-tools is not on PATH. Run: npx -y @pareto4/pp-core@latest --claude --local" >&2; exit 1; fi; if [ -n "${CLAUDE_ENV_FILE:-}" ] && [ -n "${PP_TOOLS:-}" ]; then printf "export PATH='%s':\"\$PATH\"\n" "${PP_TOOLS%/*}" >> "$CLAUDE_ENV_FILE" 2>/dev/null || true; fi
290
- pp_run query commit "docs($PHASE): UI design contract" --files "$PHASE_DIR/$PADDED_PHASE-UI-SPEC.md"
292
+ pp_run query commit "docs(planning): UI design contract" --phase "$PHASE" --files "$PHASE_DIR/$PADDED_PHASE-UI-SPEC.md"
291
293
  ```
292
294
 
293
295
  ## Step 7: Return Structured Result
@@ -14,7 +14,7 @@ color: green
14
14
  <role>
15
15
  A completed phase has been submitted for goal-backward verification. Verify that the phase goal is actually achieved in the codebase — SUMMARY.md claims are not evidence.
16
16
 
17
- Goal-backward verification. Start from what the phase SHOULD deliver, verify it actually exists and works in the codebase.
17
+ Goal-backward verification. Start from what the phase SHOULD deliver; verify it exists and works in the codebase.
18
18
 
19
19
  @~/.claude/pp-core/references/mandatory-initial-read.md
20
20
 
@@ -79,6 +79,7 @@ At verification decision points, reference calibration examples:
79
79
  ## Step 0: Check for Previous Verification
80
80
 
81
81
  ```bash
82
+ [ -z "${ZSH_VERSION:-}" ] || emulate -R sh
82
83
  cat "$PHASE_DIR"/*-VERIFICATION.md 2>/dev/null
83
84
  ```
84
85
 
@@ -100,6 +101,7 @@ Set `is_re_verification = false`, proceed with Step 1.
100
101
 
101
102
  ```bash
102
103
  _PP_SHIM_NAME="pp-tools.cjs"; _pp_root() { ( for _v in $(env | sed -n 's/^\(GIT_[A-Za-z0-9_]*\)=.*/\1/p'); do unset "$_v"; done; _c=$(git rev-parse --git-common-dir 2>/dev/null); if [ "${_c##*/}" = .git ] && cd "$_c/.." 2>/dev/null; then pwd -P; else git rev-parse --show-toplevel 2>/dev/null || pwd; fi ); }; pp_run() { case "$PP_TOOLS" in *.cjs) node "$PP_TOOLS" "$@";; *) "$PP_TOOLS" "$@";; esac; }; _PP_RUNTIME_ROOT="${RUNTIME_DIR:-$(_pp_root)}"; PP_TOOLS="${_PP_RUNTIME_ROOT}/pp-core/bin/${_PP_SHIM_NAME}"; if [ -f "$PP_TOOLS" ]; then :; elif [ -f "${_PP_RUNTIME_ROOT}/.claude/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${_PP_RUNTIME_ROOT}/.claude/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${_PP_RUNTIME_ROOT}/.codex/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${_PP_RUNTIME_ROOT}/.codex/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "$HOME/.claude/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="$HOME/.claude/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${HERMES_HOME:-$HOME/.hermes}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${HERMES_HOME:-$HOME/.hermes}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${CURSOR_CONFIG_DIR:-$HOME/.cursor}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${CURSOR_CONFIG_DIR:-$HOME/.cursor}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${CODEX_HOME:-$HOME/.codex}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${CODEX_HOME:-$HOME/.codex}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${GEMINI_CONFIG_DIR:-$HOME/.gemini}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${GEMINI_CONFIG_DIR:-$HOME/.gemini}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${COPILOT_CONFIG_DIR:-$HOME/.copilot}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${COPILOT_CONFIG_DIR:-$HOME/.copilot}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${WINDSURF_CONFIG_DIR:-$HOME/.codeium/windsurf}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${WINDSURF_CONFIG_DIR:-$HOME/.codeium/windsurf}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${AUGMENT_CONFIG_DIR:-$HOME/.augment}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${AUGMENT_CONFIG_DIR:-$HOME/.augment}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${TRAE_CONFIG_DIR:-$HOME/.trae}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${TRAE_CONFIG_DIR:-$HOME/.trae}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${QWEN_CONFIG_DIR:-$HOME/.qwen}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${QWEN_CONFIG_DIR:-$HOME/.qwen}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${CODEBUDDY_CONFIG_DIR:-$HOME/.codebuddy}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${CODEBUDDY_CONFIG_DIR:-$HOME/.codebuddy}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${CLINE_CONFIG_DIR:-$HOME/.cline}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${CLINE_CONFIG_DIR:-$HOME/.cline}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${GROK_AGENTS_HOME:-$HOME/.agents}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${GROK_AGENTS_HOME:-$HOME/.agents}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${ANTIGRAVITY_CONFIG_DIR:-$HOME/.gemini/antigravity}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${ANTIGRAVITY_CONFIG_DIR:-$HOME/.gemini/antigravity}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${OPENCODE_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/opencode}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${OPENCODE_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/opencode}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${KILO_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/kilo}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${KILO_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/kilo}/pp-core/bin/${_PP_SHIM_NAME}"; elif command -v pp-tools >/dev/null 2>&1; then PP_TOOLS="$(command -v pp-tools)"; else echo "ERROR: pp-tools.cjs not found at $PP_TOOLS and pp-tools is not on PATH. Run: npx -y @pareto4/pp-core@latest --claude --local" >&2; exit 1; fi; if [ -n "${CLAUDE_ENV_FILE:-}" ] && [ -n "${PP_TOOLS:-}" ]; then printf "export PATH='%s':\"\$PATH\"\n" "${PP_TOOLS%/*}" >> "$CLAUDE_ENV_FILE" 2>/dev/null || true; fi
104
+ [ -z "${ZSH_VERSION:-}" ] || emulate -R sh
103
105
  ls "$PHASE_DIR"/*-PLAN.md 2>/dev/null
104
106
  ls "$PHASE_DIR"/*-SUMMARY.md 2>/dev/null
105
107
  pp_run query roadmap.get-phase "$PHASE_NUM"
@@ -123,6 +125,7 @@ Parse the `success_criteria` array from the JSON output. These are the **roadmap
123
125
  **Step 2b: Load PLAN frontmatter must-haves (if present)**
124
126
 
125
127
  ```bash
128
+ [ -z "${ZSH_VERSION:-}" ] || emulate -R sh
126
129
  grep -l "must_haves:" "$PHASE_DIR"/*-PLAN.md 2>/dev/null
127
130
  ```
128
131
 
@@ -397,6 +400,7 @@ Status: WIRED (state displayed) | NOT_WIRED (state exists, not rendered)
397
400
  **6a. Extract requirement IDs from PLAN frontmatter:**
398
401
 
399
402
  ```bash
403
+ [ -z "${ZSH_VERSION:-}" ] || emulate -R sh
400
404
  grep -A5 "^requirements:" "$PHASE_DIR"/*-PLAN.md 2>/dev/null
401
405
  ```
402
406
 
@@ -425,6 +429,7 @@ If REQUIREMENTS.md maps additional IDs to this phase that don't appear in ANY pl
425
429
  Identify files modified in this phase from SUMMARY.md key-files section, or extract commits and verify:
426
430
 
427
431
  ```bash
432
+ [ -z "${ZSH_VERSION:-}" ] || emulate -R sh
428
433
  # Option 1: Extract from SUMMARY frontmatter
429
434
  SUMMARY_FILES=$(pp_run query summary-extract "$PHASE_DIR"/*-SUMMARY.md --fields key-files)
430
435
 
@@ -475,6 +480,7 @@ Anti-pattern scanning (Step 7) checks for code smells. Behavioral spot-checks go
475
480
  1. **Identify checkable behaviors** from must-haves truths. Select 2-4 that can be tested with a single command:
476
481
 
477
482
  ```bash
483
+ [ -z "${ZSH_VERSION:-}" ] || emulate -R sh
478
484
  # API endpoint returns non-empty data
479
485
  curl -s http://localhost:$PORT/api/$ENDPOINT 2>/dev/null | node -e "let b='';process.stdin.setEncoding('utf8');process.stdin.on('data',c=>b+=c);process.stdin.on('end',()=>{const d=JSON.parse(b);process.exit(Array.isArray(d)?(d.length>0?0:1):(Object.keys(d).length>0?0:1))})"
480
486
 
@@ -523,6 +529,7 @@ SUMMARY.md probe pass claims are not evidence. If a phase declares or implies pr
523
529
  **Probe discovery:**
524
530
 
525
531
  ```bash
532
+ [ -z "${ZSH_VERSION:-}" ] || emulate -R sh
526
533
  # Conventional project probes
527
534
  find scripts -path '*/tests/probe-*.sh' -type f 2>/dev/null | sort
528
535
 
@@ -537,6 +544,7 @@ grep -R -n -E 'probe-[^[:space:]]+\.sh|scripts/.*/tests/probe-.*\.sh' "$PHASE_DI
537
544
  3. Run each probe from the built `PROBES` list (declared + conventional) from the repository root:
538
545
 
539
546
  ```bash
547
+ [ -z "${ZSH_VERSION:-}" ] || emulate -R sh
540
548
  PP_GATE_BIN=$(printf '%s\n' "${PP_TOOLS:+${PP_TOOLS%/*}:}$PATH" | tr : '\n' | while IFS= read -r d; do if [ -r "$d/portable-timeout.sh" ]; then printf %s "$d"; break; fi; done)
541
549
  if [ ! -r "$PP_GATE_BIN/portable-timeout.sh" ]; then echo "✗ probes NEVER RAN — portable-timeout.sh not found beside pp-tools"; else . "$PP_GATE_BIN/portable-timeout.sh"; fi
542
550
  for probe in "${PROBES[@]}"; do
@@ -877,7 +885,7 @@ Automated checks passed. Awaiting human verification.
877
885
 
878
886
  <critical_rules>
879
887
 
880
- **DO NOT trust SUMMARY claims.** Verify the component actually renders messages, not a placeholder.
888
+ **DO NOT trust SUMMARY claims.** Verify the component renders messages, not a placeholder.
881
889
 
882
890
  **DO NOT assume existence = implementation.** Need level 2 (substantive), level 3 (wired), and level 4 (data flowing) for artifacts that render dynamic data.
883
891
 
@@ -22,7 +22,7 @@ Generate unit and E2E tests for a completed phase, using its SUMMARY.md, CONTEXT
22
22
 
23
23
  Analyzes implementation files, classifies them into TDD (unit), E2E (browser), or Skip categories, presents a test plan for user approval, then generates tests following RED-GREEN conventions.
24
24
 
25
- Output: Test files committed with message `test(phase-{N}): add unit and E2E tests from add-tests command`
25
+ Output: Test files committed with message `test({area}): add unit and E2E tests from add-tests command` and the trailer `Phase: {N}`
26
26
  </objective>
27
27
 
28
28
  <execution_context>
@@ -43,6 +43,7 @@ Parse subcommands and flags from $ARGUMENTS BEFORE the active-session check:
43
43
 
44
44
  Check for active sessions (used for non-list/status/continue flows):
45
45
  ```bash
46
+ [ -z "${ZSH_VERSION:-}" ] || emulate -R sh
46
47
  ls .planning/debug/*.md 2>/dev/null | grep -v resolved | head -5
47
48
  ```
48
49
  </context>
@@ -18,9 +18,10 @@ Universal project entry point. Takes any directory — empty or with existing co
18
18
  to: git-initialized, minimal identity captured, remote wired, and handed off to the next
19
19
  workflow.
20
20
 
21
- Works for every project regardless of provider. The gated GitLab provisioning path
22
- (Pareto satellite repos with `.platform-bindings.json`) is added in Plan 02 and slots
23
- into the structural anchor already present in the workflow.
21
+ Works for every project regardless of provider. On a Pareto project (one with
22
+ `.platform-bindings.json`) whose provider is GitLab or GitHub, it creates the repository
23
+ under the org profile's provisioning group — or adopts it if it already exists — after
24
+ confirming, always private; any other provider gets the generic remote-URL prompt.
24
25
 
25
26
  **After this command:** You will be asked whether to continue with `/pp-discovery`
26
27
  (client/Pareto projects) or `/pp-new-project` (greenfield planning).
@@ -65,6 +65,7 @@ Context files are resolved inside the workflow (`init quick`) and delegated via
65
65
  When SUBCMD=list:
66
66
 
67
67
  ```bash
68
+ [ -z "${ZSH_VERSION:-}" ] || emulate -R sh
68
69
  ls -d .planning/quick/*/ 2>/dev/null
69
70
  ```
70
71
 
@@ -105,6 +106,7 @@ When SUBCMD=status and SLUG is set (already sanitized):
105
106
 
106
107
  Find directory matching `*-{SLUG}` pattern:
107
108
  ```bash
109
+ [ -z "${ZSH_VERSION:-}" ] || emulate -R sh
108
110
  dir=$(ls -d .planning/quick/*-{SLUG}/ 2>/dev/null | head -1)
109
111
  ```
110
112
 
@@ -130,6 +132,7 @@ When SUBCMD=resume and SLUG is set (already sanitized):
130
132
 
131
133
  1. Find the directory matching `*-{SLUG}` pattern:
132
134
  ```bash
135
+ [ -z "${ZSH_VERSION:-}" ] || emulate -R sh
133
136
  dir=$(ls -d .planning/quick/*-{SLUG}/ 2>/dev/null | head -1)
134
137
  ```
135
138
  2. If no directory found, print `No quick task found with slug: {SLUG}` and stop.
@@ -18,6 +18,7 @@ milestone sequence or remove stale entries.
18
18
 
19
19
  1. **List backlog items:**
20
20
  ```bash
21
+ [ -z "${ZSH_VERSION:-}" ] || emulate -R sh
21
22
  ls -d .planning/phases/999* 2>/dev/null || echo "No backlog items found"
22
23
  ```
23
24
 
@@ -48,7 +49,7 @@ milestone sequence or remove stale entries.
48
49
 
49
50
  6. **Commit changes:**
50
51
  ```bash
51
- pp_run query commit "docs: review backlog — promoted N, removed M" --files .planning/ROADMAP.md
52
+ pp_run query commit "docs(planning): review backlog — promoted N, removed M" --files .planning/ROADMAP.md
52
53
  ```
53
54
 
54
55
  7. **Report summary:**
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pp-core",
3
- "version": "1.18.0",
3
+ "version": "1.19.0",
4
4
  "description": "PP Core — a meta-prompting, context engineering, and spec-driven development system for AI coding agents. Loads pp-core's operating context into every Gemini CLI session.",
5
5
  "contextFileName": "GEMINI.md"
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pareto4/pp-core",
3
- "version": "1.18.0",
3
+ "version": "1.19.0",
4
4
  "description": "Pareto pp-core — The Pareto Project's AI-assisted engineering framework: meta-prompting, context engineering, and spec-driven development for AI coding agents.",
5
5
  "bin": {
6
6
  "pp-core": "bin/install.js",
@@ -1967,7 +1967,7 @@ const capabilities = {
1967
1967
  },
1968
1968
  "vault.fallback_repo": {
1969
1969
  "type": "string",
1970
- "default": "pareto000/Pareto-Vault",
1970
+ "default": "pareto-ooo/pareto-vault-releases",
1971
1971
  "description": "Shared org-wide vault repo used when no client.vaultRepo is configured, or when the client vault is unreachable. Set to '' to disable fallback."
1972
1972
  },
1973
1973
  "vault.fallback_ref": {
@@ -3178,7 +3178,7 @@ const configSchema = {
3178
3178
  "vault.fallback_repo": {
3179
3179
  "owner": "vault",
3180
3180
  "type": "string",
3181
- "default": "pareto000/Pareto-Vault",
3181
+ "default": "pareto-ooo/pareto-vault-releases",
3182
3182
  "description": "Shared org-wide vault repo used when no client.vaultRepo is configured, or when the client vault is unreachable. Set to '' to disable fallback."
3183
3183
  },
3184
3184
  "vault.fallback_ref": {