@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.
- package/.claude-plugin/plugin.json +1 -1
- package/agents/pp-code-fixer.md +9 -5
- package/agents/pp-code-reviewer.md +1 -0
- package/agents/pp-codebase-mapper.md +3 -0
- package/agents/pp-debugger.md +3 -2
- package/agents/pp-executor.md +16 -7
- package/agents/pp-integration-checker.md +1 -0
- package/agents/pp-phase-researcher.md +3 -1
- package/agents/pp-plan-checker.md +3 -0
- package/agents/pp-planner.md +5 -1
- package/agents/pp-research-synthesizer.md +1 -1
- package/agents/pp-ui-auditor.md +1 -0
- package/agents/pp-ui-researcher.md +3 -1
- package/agents/pp-verifier.md +10 -2
- package/commands/pp-add-tests.md +1 -1
- package/commands/pp-debug.md +1 -0
- package/commands/pp-init.md +4 -3
- package/commands/pp-quick.md +3 -0
- package/commands/pp-review-backlog.md +2 -1
- package/gemini-extension.json +1 -1
- package/package.json +1 -1
- package/pp-core/bin/lib/capability-registry.cjs +2 -2
- package/pp-core/bin/lib/check-command-router.cjs +60 -20
- package/pp-core/bin/lib/commands.cjs +79 -4
- package/pp-core/bin/lib/compose-bindings.cjs +97 -14
- package/pp-core/bin/lib/discovery-rollup.cjs +9 -6
- package/pp-core/bin/lib/discovery-screens.cjs +20 -2
- package/pp-core/bin/lib/discovery-sweep.cjs +12 -3
- package/pp-core/bin/lib/discovery-vault-check.cjs +37 -3
- package/pp-core/bin/lib/init-contract.cjs +48 -7
- package/pp-core/bin/lib/vault-coordinates.cjs +1 -1
- package/pp-core/bin/lib/vault-index.cjs +18 -5
- package/pp-core/bin/lib/vault-update.cjs +4 -0
- package/pp-core/bin/lib/vault.cjs +2 -2
- package/pp-core/bin/pp-tools.cjs +10 -4
- package/pp-core/org-profile.json +1 -1
- package/pp-core/references/autonomous-best-effort.md +3 -2
- package/pp-core/references/autonomous-lifecycle.md +1 -0
- package/pp-core/references/autonomous-smart-discuss.md +5 -1
- package/pp-core/references/discovery-id-conventions.md +35 -2
- package/pp-core/references/execute-mvp-tdd.md +3 -3
- package/pp-core/references/git-integration.md +57 -33
- package/pp-core/references/git-planning-commit.md +31 -9
- package/pp-core/references/phase-argument-parsing.md +1 -0
- package/pp-core/references/planner-gap-closure.md +1 -0
- package/pp-core/references/planner-revision.md +3 -1
- package/pp-core/references/planner-tdd.md +4 -4
- package/pp-core/references/planning-config.md +3 -3
- package/pp-core/references/shell-portability.md +28 -0
- package/pp-core/references/tdd.md +20 -16
- package/pp-core/references/worktree-path-safety.md +1 -0
- package/pp-core/templates/milestone.md +5 -5
- package/pp-core/workflows/add-backlog.md +1 -1
- package/pp-core/workflows/add-tests.md +5 -2
- package/pp-core/workflows/add-todo.md +3 -1
- package/pp-core/workflows/ai-integration-phase.md +2 -1
- package/pp-core/workflows/audit-fix.md +4 -3
- package/pp-core/workflows/audit-milestone.md +1 -0
- package/pp-core/workflows/autonomous.md +6 -0
- package/pp-core/workflows/check-todos.md +2 -1
- package/pp-core/workflows/cleanup.md +3 -1
- package/pp-core/workflows/code-review-fix.md +12 -5
- package/pp-core/workflows/code-review.md +15 -1
- package/pp-core/workflows/complete-milestone.md +13 -3
- package/pp-core/workflows/debug.md +2 -0
- package/pp-core/workflows/diagnose-issues.md +1 -1
- package/pp-core/workflows/discovery-sprint/session-13-gates.md +1 -1
- package/pp-core/workflows/discovery-sprint/sessions/01-kick-off.md +51 -7
- package/pp-core/workflows/discovery-sprint/sessions/02-as-is.md +5 -3
- package/pp-core/workflows/discovery-sprint/sessions/03-to-be.md +10 -8
- package/pp-core/workflows/discovery-sprint/sessions/04-ux-design.md +11 -2
- package/pp-core/workflows/discovery-sprint/sessions/05-architecture.md +5 -5
- package/pp-core/workflows/discovery-sprint/sessions/06-security.md +3 -3
- package/pp-core/workflows/discovery-sprint/sessions/07-identity.md +2 -2
- package/pp-core/workflows/discovery-sprint/sessions/08-integration.md +14 -2
- package/pp-core/workflows/discovery-sprint/sessions/09-qa.md +2 -2
- package/pp-core/workflows/discovery-sprint/sessions/10-infrastructure.md +10 -10
- package/pp-core/workflows/discovery-sprint/sessions/11-roadmap.md +11 -8
- package/pp-core/workflows/discovery-sprint/sessions/12-delivery-model.md +21 -18
- package/pp-core/workflows/discovery-sprint/sessions/13-wrap-up.md +5 -3
- package/pp-core/workflows/discovery-sprint/templates/context-template.md +9 -3
- package/pp-core/workflows/discovery-sprint/vault-context.md +14 -3
- package/pp-core/workflows/discovery-sprint.md +11 -8
- package/pp-core/workflows/discovery-to-build/steps/architecture-deliverables.md +1 -0
- package/pp-core/workflows/discuss-phase-assumptions.md +5 -3
- package/pp-core/workflows/discuss-phase.md +8 -3
- package/pp-core/workflows/docs-update.md +1 -0
- package/pp-core/workflows/eval-review.md +2 -1
- package/pp-core/workflows/execute-phase/steps/check-query-gate.md +7 -6
- package/pp-core/workflows/execute-phase/steps/cross-ai-delegation.md +1 -0
- package/pp-core/workflows/execute-phase/steps/per-plan-worktree-gate.md +1 -0
- package/pp-core/workflows/execute-phase/steps/vault-fetch.md +12 -0
- package/pp-core/workflows/execute-phase.md +19 -7
- package/pp-core/workflows/execute-plan.md +18 -7
- package/pp-core/workflows/explore.md +1 -1
- package/pp-core/workflows/forensics.md +4 -2
- package/pp-core/workflows/health.md +1 -0
- package/pp-core/workflows/import.md +2 -1
- package/pp-core/workflows/ingest-docs.md +1 -0
- package/pp-core/workflows/init/steps/client-context-capture.md +1 -0
- package/pp-core/workflows/init/steps/github-provisioning.md +145 -0
- package/pp-core/workflows/init/steps/gitlab-provisioning.md +18 -4
- package/pp-core/workflows/init/steps/reachability-outcome.md +3 -1
- package/pp-core/workflows/init.md +56 -66
- package/pp-core/workflows/map-codebase.md +5 -1
- package/pp-core/workflows/milestone-summary.md +2 -1
- package/pp-core/workflows/mvp-phase.md +1 -0
- package/pp-core/workflows/new-milestone.md +9 -5
- package/pp-core/workflows/new-project.md +9 -8
- package/pp-core/workflows/new-workspace.md +1 -0
- package/pp-core/workflows/next.md +2 -1
- package/pp-core/workflows/pause-work.md +6 -4
- package/pp-core/workflows/plan-milestone-gaps.md +3 -1
- package/pp-core/workflows/plan-phase/steps/chunked-planning.md +1 -1
- package/pp-core/workflows/plan-phase.md +21 -6
- package/pp-core/workflows/plan-review-convergence.md +2 -0
- package/pp-core/workflows/plant-seed.md +4 -2
- package/pp-core/workflows/pr-branch.md +2 -0
- package/pp-core/workflows/progress.md +5 -0
- package/pp-core/workflows/quick.md +11 -4
- package/pp-core/workflows/reapply-patches.md +3 -0
- package/pp-core/workflows/remove-phase.md +1 -1
- package/pp-core/workflows/resume-project.md +3 -0
- package/pp-core/workflows/review.md +7 -1
- package/pp-core/workflows/secure-phase.md +2 -1
- package/pp-core/workflows/session-report.md +1 -0
- package/pp-core/workflows/ship.md +8 -1
- package/pp-core/workflows/sketch-wrap-up.md +1 -1
- package/pp-core/workflows/sketch.md +3 -2
- package/pp-core/workflows/spec-phase.md +2 -1
- package/pp-core/workflows/spike-wrap-up.md +1 -1
- package/pp-core/workflows/spike.md +4 -3
- package/pp-core/workflows/sync-skills.md +5 -2
- package/pp-core/workflows/thread.md +3 -2
- package/pp-core/workflows/transition.md +6 -0
- package/pp-core/workflows/ui-phase.md +3 -1
- package/pp-core/workflows/ui-review.md +2 -1
- package/pp-core/workflows/ultraplan-phase.md +1 -0
- package/pp-core/workflows/undo.md +14 -10
- package/pp-core/workflows/update.md +5 -0
- package/pp-core/workflows/validate-phase.md +6 -3
- package/pp-core/workflows/vault-review.md +2 -1
- package/pp-core/workflows/vault-write-back.md +5 -0
- package/pp-core/workflows/verify-phase.md +5 -0
- package/pp-core/workflows/verify-work.md +8 -1
- package/scripts/prompt-injection-scan.sh +1 -1
- package/scripts/sync-runtime-launcher.cjs +115 -5
|
@@ -189,6 +189,7 @@ Set `FIRST_PHASE` to the first remaining phase's number, derive `RUN_STATE` per
|
|
|
189
189
|
**Fetch details for each phase:**
|
|
190
190
|
|
|
191
191
|
```bash
|
|
192
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
192
193
|
DETAIL=$(pp_run query roadmap.get-phase ${PHASE_NUM})
|
|
193
194
|
```
|
|
194
195
|
|
|
@@ -217,6 +218,7 @@ Banner math (N, T, P and the N > T fallback): reference § Banner math.
|
|
|
217
218
|
Check if CONTEXT.md already exists for this phase:
|
|
218
219
|
|
|
219
220
|
```bash
|
|
221
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
220
222
|
PHASE_STATE=$(pp_run query init.phase-op ${PHASE_NUM})
|
|
221
223
|
```
|
|
222
224
|
|
|
@@ -262,6 +264,7 @@ Skill(skill="pp-discuss-phase", args="${PHASE_NUM}")
|
|
|
262
264
|
After discuss completes (either mode), verify context was written:
|
|
263
265
|
|
|
264
266
|
```bash
|
|
267
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
265
268
|
PHASE_STATE=$(pp_run query init.phase-op ${PHASE_NUM})
|
|
266
269
|
```
|
|
267
270
|
|
|
@@ -281,6 +284,7 @@ case "$VAULT_ADMIT" in on) echo "VAULT_ADMIT=on" ;; off|inert) : ;; *) pp_run va
|
|
|
281
284
|
Resolve active `plan:pre` hooks:
|
|
282
285
|
|
|
283
286
|
```bash
|
|
287
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
284
288
|
UI_SPEC_FILE=$(ls "${PHASE_DIR}"/*-UI-SPEC.md 2>/dev/null | head -1)
|
|
285
289
|
HOOKS_JSON=$(pp_run loop render-hooks plan:pre --raw)
|
|
286
290
|
printf '%s' "$HOOKS_JSON" | node -e "let h=[];try{h=JSON.parse(require('fs').readFileSync(0,'utf-8')).activeHooks||[]}catch{}console.log('HOOKS_JSON='+JSON.stringify({activeHooks:h}))"
|
|
@@ -350,6 +354,7 @@ Skill(skill="pp-${ref.skill}", args="${PHASE_NUM}")
|
|
|
350
354
|
After all step hooks return, re-read:
|
|
351
355
|
|
|
352
356
|
```bash
|
|
357
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
353
358
|
UI_SPEC_FILE=$(ls "${PHASE_DIR}"/*-UI-SPEC.md 2>/dev/null | head -1)
|
|
354
359
|
```
|
|
355
360
|
|
|
@@ -554,6 +559,7 @@ Route the new status through A-3 (passed → `OUTCOME=passed`; human_needed →
|
|
|
554
559
|
Resolve the active post-verification hooks and the UI-SPEC gate:
|
|
555
560
|
|
|
556
561
|
```bash
|
|
562
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
557
563
|
UI_SPEC_FILE=$(ls "${PHASE_DIR}"/*-UI-SPEC.md 2>/dev/null | head -1)
|
|
558
564
|
HOOKS_JSON=$(pp_run loop render-hooks verify:post --raw)
|
|
559
565
|
```
|
|
@@ -168,8 +168,9 @@ Re-run `init todos` to get updated count, then update STATE.md "### Pending Todo
|
|
|
168
168
|
If todo was moved to done/, commit the change:
|
|
169
169
|
|
|
170
170
|
```bash
|
|
171
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
171
172
|
git rm --cached .planning/todos/pending/[filename] 2>/dev/null || true
|
|
172
|
-
pp_run query commit "docs: start work on todo - [title]" --files .planning/todos/completed/[filename] .planning/STATE.md
|
|
173
|
+
pp_run query commit "docs(planning): start work on todo - [title]" --files .planning/todos/completed/[filename] .planning/STATE.md
|
|
173
174
|
```
|
|
174
175
|
|
|
175
176
|
Tool respects `commit_docs` config and gitignore automatically.
|
|
@@ -27,6 +27,7 @@ Extract each milestone version (e.g., v1.0, v1.1, v2.0).
|
|
|
27
27
|
Check which milestone archive dirs already exist:
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
30
31
|
ls -d .planning/milestones/v*-phases 2>/dev/null || true
|
|
31
32
|
```
|
|
32
33
|
|
|
@@ -55,6 +56,7 @@ Extract phase numbers and names from the archived roadmap (e.g., Phase 1: Founda
|
|
|
55
56
|
Check which of those phase directories still exist in `.planning/phases/`:
|
|
56
57
|
|
|
57
58
|
```bash
|
|
59
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
58
60
|
ls -d .planning/phases/*/ 2>/dev/null || true
|
|
59
61
|
```
|
|
60
62
|
|
|
@@ -162,7 +164,7 @@ Commit the changes:
|
|
|
162
164
|
|
|
163
165
|
```bash
|
|
164
166
|
_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
|
|
165
|
-
pp_run query commit "chore: archive phase directories from completed milestones" --files .planning/milestones/ .planning/phases/
|
|
167
|
+
pp_run query commit "chore(planning): archive phase directories from completed milestones" --files .planning/milestones/ .planning/phases/
|
|
166
168
|
```
|
|
167
169
|
|
|
168
170
|
</step>
|
|
@@ -110,6 +110,7 @@ Do NOT auto-run code-review. Require explicit user action to ensure review inten
|
|
|
110
110
|
Parse REVIEW.md frontmatter to check status and extract context for --auto loop:
|
|
111
111
|
|
|
112
112
|
```bash
|
|
113
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
113
114
|
# Parse status field
|
|
114
115
|
REVIEW_STATUS=$(REVIEW_PATH="${REVIEW_PATH}" node -e "
|
|
115
116
|
const fs = require('fs');
|
|
@@ -137,6 +138,7 @@ Warning: Could not parse REVIEW.md status. Proceeding with fix attempt.
|
|
|
137
138
|
Extract review depth for --auto re-review:
|
|
138
139
|
|
|
139
140
|
```bash
|
|
141
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
140
142
|
REVIEW_DEPTH=$(REVIEW_PATH="${REVIEW_PATH}" node -e "
|
|
141
143
|
const fs = require('fs');
|
|
142
144
|
const content = fs.readFileSync(process.env.REVIEW_PATH, 'utf-8');
|
|
@@ -152,6 +154,7 @@ REVIEW_DEPTH=$(REVIEW_PATH="${REVIEW_PATH}" node -e "
|
|
|
152
154
|
Extract original review file list for --auto re-review scope persistence:
|
|
153
155
|
|
|
154
156
|
```bash
|
|
157
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
155
158
|
# Extract review file list — portable bash 3.2+ (no mapfile, handles spaces in paths)
|
|
156
159
|
REVIEW_FILES_ARRAY=()
|
|
157
160
|
while IFS= read -r line; do
|
|
@@ -199,6 +202,7 @@ gate on the `execute:pre` payload, filtered in the fence to the `vault`
|
|
|
199
202
|
capability (D-30):
|
|
200
203
|
|
|
201
204
|
```bash
|
|
205
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
202
206
|
CRF_EXECUTE_PRE_HOOKS_JSON=$(pp_run loop render-hooks execute:pre --raw | node -e "const d=require('fs').readFileSync(0,'utf-8');try{const j=JSON.parse(d);j.activeHooks=(j.activeHooks||[]).filter((x)=>x&&x.capId==='vault');process.stdout.write(JSON.stringify(j));}catch{process.stdout.write('');}")
|
|
203
207
|
printf '%s' "$CRF_EXECUTE_PRE_HOOKS_JSON" | node -e "let h=[];try{h=JSON.parse(require('fs').readFileSync(0,'utf-8')).activeHooks||[]}catch{}console.log('CRF_EXECUTE_PRE_HOOKS_JSON='+JSON.stringify({activeHooks:h}))"
|
|
204
208
|
```
|
|
@@ -267,7 +271,7 @@ Check if FIX_REPORT_PATH exists:
|
|
|
267
271
|
|
|
268
272
|
Either way:
|
|
269
273
|
```
|
|
270
|
-
Some fix commits may already exist in git history — check git log
|
|
274
|
+
Some fix commits may already exist in git history — check git log --grep="^Phase: ${PADDED_PHASE}$" for fix commits.
|
|
271
275
|
You can retry with /pp:code-review ${PHASE_ARG} --fix.
|
|
272
276
|
```
|
|
273
277
|
|
|
@@ -278,6 +282,7 @@ Exit workflow (skip auto loop).
|
|
|
278
282
|
Only runs if AUTO_MODE is true. If AUTO_MODE is false, skip this step entirely.
|
|
279
283
|
|
|
280
284
|
```bash
|
|
285
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
281
286
|
if [ "$AUTO_MODE" = "true" ]; then
|
|
282
287
|
# Iteration semantics: the initial fix pass (step 5) is iteration 1.
|
|
283
288
|
# This loop runs iterations 2..MAX_ITERATIONS (re-review + re-fix cycles).
|
|
@@ -395,6 +400,7 @@ Key design decisions for --auto (addresses ALL review HIGH concerns):
|
|
|
395
400
|
After ALL iterations complete (or single pass in non-auto mode), validate and commit REVIEW-FIX.md:
|
|
396
401
|
|
|
397
402
|
```bash
|
|
403
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
398
404
|
if [ -f "${FIX_REPORT_PATH}" ]; then
|
|
399
405
|
# Validate REVIEW-FIX.md has valid YAML frontmatter with status field
|
|
400
406
|
HAS_STATUS=$(REVIEW_PATH="${REVIEW_PATH}" node -e "
|
|
@@ -409,7 +415,7 @@ if [ -f "${FIX_REPORT_PATH}" ]; then
|
|
|
409
415
|
|
|
410
416
|
if [ "$COMMIT_DOCS" = "true" ]; then
|
|
411
417
|
pp_run query commit \
|
|
412
|
-
"docs(
|
|
418
|
+
"docs(planning): add code review fix report" --phase "${PADDED_PHASE}" \
|
|
413
419
|
--files "${FIX_REPORT_PATH}"
|
|
414
420
|
fi
|
|
415
421
|
else
|
|
@@ -419,7 +425,7 @@ if [ -f "${FIX_REPORT_PATH}" ]; then
|
|
|
419
425
|
else
|
|
420
426
|
echo "Warning: REVIEW-FIX.md not found at ${FIX_REPORT_PATH}."
|
|
421
427
|
echo "Agent may have failed before writing report."
|
|
422
|
-
echo "Check git log
|
|
428
|
+
echo "Check git log --grep='^Phase: ${PADDED_PHASE}\$' for any fix commits that were applied."
|
|
423
429
|
fi
|
|
424
430
|
```
|
|
425
431
|
|
|
@@ -441,7 +447,7 @@ The verb writes a `## Vault Door Record` (mode, vault ref and sha, governing pha
|
|
|
441
447
|
recorded and the end commit; the agent never types a sha) into a fresh per-run artifact, because it refuses a second record
|
|
442
448
|
in one file (D-57) and a rewritten report would drop the earlier run's coverage (D-79). It prints
|
|
443
449
|
nothing and writes nothing unless `vault admission` answers `on`. When it wrote the file and
|
|
444
|
-
`commit_docs` is true, commit the `artifact` path it printed: `pp_run query commit "docs(
|
|
450
|
+
`commit_docs` is true, commit the `artifact` path it printed: `pp_run query commit "docs(planning): vault door record for code-review-fix" --phase "${PADDED_PHASE}" --files "<that artifact>"`.
|
|
445
451
|
</step>
|
|
446
452
|
|
|
447
453
|
<step name="present_results">
|
|
@@ -459,7 +465,7 @@ if [ ! -f "${FIX_REPORT_PATH}" ]; then
|
|
|
459
465
|
echo "───────────────────────────────────────────────────────────────"
|
|
460
466
|
echo ""
|
|
461
467
|
echo "The fixer agent may have failed before completing."
|
|
462
|
-
echo "Check git log
|
|
468
|
+
echo "Check git log --grep='^Phase: ${PADDED_PHASE}\$' for any fix commits."
|
|
463
469
|
echo ""
|
|
464
470
|
echo "Retry: /pp:code-review ${PHASE_ARG} --fix"
|
|
465
471
|
echo ""
|
|
@@ -471,6 +477,7 @@ fi
|
|
|
471
477
|
Extract frontmatter fields:
|
|
472
478
|
|
|
473
479
|
```bash
|
|
480
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
474
481
|
# Extract only the YAML frontmatter block (between first two --- lines)
|
|
475
482
|
FIX_FRONTMATTER=$(REVIEW_PATH="${REVIEW_PATH}" node -e "
|
|
476
483
|
const fs = require('fs');
|
|
@@ -18,6 +18,7 @@ Parse arguments and load project state:
|
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
20
|
_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
|
|
21
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
21
22
|
PHASE_ARG="${1}"
|
|
22
23
|
INIT=$(pp_run query init.phase-op "${PHASE_ARG}")
|
|
23
24
|
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
@@ -138,6 +139,7 @@ Three-tier scoping with explicit precedence:
|
|
|
138
139
|
|
|
139
140
|
If FILES_OVERRIDE is set (from --files flag):
|
|
140
141
|
```bash
|
|
142
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
141
143
|
if [ -n "$FILES_OVERRIDE" ]; then
|
|
142
144
|
REVIEW_FILES=()
|
|
143
145
|
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
|
|
@@ -168,6 +170,7 @@ Skip SUMMARY/git scoping entirely when --files is provided.
|
|
|
168
170
|
|
|
169
171
|
If --files NOT provided:
|
|
170
172
|
```bash
|
|
173
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
171
174
|
if [ -z "$FILES_OVERRIDE" ]; then
|
|
172
175
|
SUMMARIES=$(ls "${PHASE_DIR}"/*-SUMMARY.md 2>/dev/null)
|
|
173
176
|
REVIEW_FILES=()
|
|
@@ -222,6 +225,7 @@ fi
|
|
|
222
225
|
|
|
223
226
|
If no SUMMARY.md files found OR no files extracted from them:
|
|
224
227
|
```bash
|
|
228
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
225
229
|
if [ ${#REVIEW_FILES[@]} -eq 0 ]; then
|
|
226
230
|
# Compute diff base from phase commits — fail closed if no reliable base found
|
|
227
231
|
PHASE_COMMITS=$(git log --oneline --all --grep="${PADDED_PHASE}" --format="%H" 2>/dev/null)
|
|
@@ -257,6 +261,7 @@ fi
|
|
|
257
261
|
|
|
258
262
|
1. **Apply exclusions (per D-03):** Remove paths matching planning artifacts
|
|
259
263
|
```bash
|
|
264
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
260
265
|
FILTERED_FILES=()
|
|
261
266
|
for file in "${REVIEW_FILES[@]}"; do
|
|
262
267
|
# Skip planning directory and specific artifacts
|
|
@@ -275,6 +280,7 @@ REVIEW_FILES=("${FILTERED_FILES[@]}")
|
|
|
275
280
|
|
|
276
281
|
2. **Filter deleted files:** Remove paths that don't exist on disk
|
|
277
282
|
```bash
|
|
283
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
278
284
|
EXISTING_FILES=()
|
|
279
285
|
DELETED_COUNT=0
|
|
280
286
|
for file in "${REVIEW_FILES[@]}"; do
|
|
@@ -293,6 +299,7 @@ fi
|
|
|
293
299
|
|
|
294
300
|
3. **Deduplicate:** Remove duplicate paths (portable — bash 3.2+ compatible, handles spaces in paths)
|
|
295
301
|
```bash
|
|
302
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
296
303
|
DEDUPED=()
|
|
297
304
|
while IFS= read -r line; do
|
|
298
305
|
[ -n "$line" ] && DEDUPED+=("$line")
|
|
@@ -304,6 +311,7 @@ REVIEW_FILES=("${DEDUPED[@]}")
|
|
|
304
311
|
|
|
305
312
|
**Log final scope and warn if large:**
|
|
306
313
|
```bash
|
|
314
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
307
315
|
if [ -n "$FILES_OVERRIDE" ]; then
|
|
308
316
|
TIER="--files override"
|
|
309
317
|
elif [ -n "$SUMMARIES" ] && [ ${#REVIEW_FILES[@]} -gt 0 ]; then
|
|
@@ -379,6 +387,7 @@ fi
|
|
|
379
387
|
|
|
380
388
|
3) Execute structural pass and persist JSON (bounded at 120s). Note: `fallow audit` exits 0 when clean and 1 when issues are found — BOTH are successful runs. Only a timeout (124), usage error (2), or crash yields no usable JSON; success is decided by whether the output parses as a valid fallow report, not by exit code:
|
|
381
389
|
```bash
|
|
390
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
382
391
|
FALLOW_JSON_PATH="${PHASE_DIR}/FALLOW.json"
|
|
383
392
|
FALLOW_STDERR_TMP=$(mktemp)
|
|
384
393
|
|
|
@@ -459,6 +468,7 @@ fi
|
|
|
459
468
|
|
|
460
469
|
Build files_to_read block for agent:
|
|
461
470
|
```bash
|
|
471
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
462
472
|
FILES_TO_READ=""
|
|
463
473
|
for file in "${REVIEW_FILES[@]}"; do
|
|
464
474
|
FILES_TO_READ+="- ${file}\n"
|
|
@@ -467,6 +477,7 @@ done
|
|
|
467
477
|
|
|
468
478
|
Build config block for agent:
|
|
469
479
|
```bash
|
|
480
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
470
481
|
CONFIG_FILES=""
|
|
471
482
|
for file in "${REVIEW_FILES[@]}"; do
|
|
472
483
|
CONFIG_FILES+=" - ${file}\n"
|
|
@@ -475,6 +486,7 @@ done
|
|
|
475
486
|
|
|
476
487
|
Build structural findings block for agent:
|
|
477
488
|
```bash
|
|
489
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
478
490
|
STRUCTURAL_FINDINGS_BLOCK=""
|
|
479
491
|
MAX_FINDINGS_SIZE=50000
|
|
480
492
|
if [ -n "$FALLOW_JSON_PATH" ] && [ -f "$FALLOW_JSON_PATH" ]; then
|
|
@@ -542,6 +554,7 @@ Do NOT proceed to commit_review step. Do NOT create a partial or empty REVIEW.md
|
|
|
542
554
|
After agent completes successfully, verify REVIEW.md was created and has valid structure:
|
|
543
555
|
|
|
544
556
|
```bash
|
|
557
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
545
558
|
if [ -f "${REVIEW_PATH}" ]; then
|
|
546
559
|
# Validate REVIEW.md has valid YAML frontmatter with status field
|
|
547
560
|
HAS_STATUS=$(REVIEW_PATH="${REVIEW_PATH}" node -e "
|
|
@@ -556,7 +569,7 @@ if [ -f "${REVIEW_PATH}" ]; then
|
|
|
556
569
|
|
|
557
570
|
if [ "$COMMIT_DOCS" = "true" ]; then
|
|
558
571
|
pp_run query commit \
|
|
559
|
-
"docs(
|
|
572
|
+
"docs(planning): add code review report" --phase "${PADDED_PHASE}" \
|
|
560
573
|
--files "${REVIEW_PATH}"
|
|
561
574
|
fi
|
|
562
575
|
else
|
|
@@ -616,6 +629,7 @@ Read the REVIEW.md YAML frontmatter to extract finding counts.
|
|
|
616
629
|
Extract frontmatter between `---` delimiters first to avoid matching values in the review body:
|
|
617
630
|
|
|
618
631
|
```bash
|
|
632
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
619
633
|
# Extract only the YAML frontmatter block (between first two --- lines)
|
|
620
634
|
FRONTMATTER=$(REVIEW_PATH="${REVIEW_PATH}" node -e "
|
|
621
635
|
const fs = require('fs');
|
|
@@ -201,6 +201,7 @@ Milestone Stats:
|
|
|
201
201
|
Extract one-liners from SUMMARY.md files using summary-extract:
|
|
202
202
|
|
|
203
203
|
```bash
|
|
204
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
204
205
|
# For each phase in milestone, extract one-liner
|
|
205
206
|
for summary in .planning/phases/*-*/*-SUMMARY.md; do
|
|
206
207
|
[ -e "$summary" ] || continue
|
|
@@ -236,6 +237,7 @@ Full PROJECT.md evolution review at milestone completion.
|
|
|
236
237
|
Read all phase summaries:
|
|
237
238
|
|
|
238
239
|
```bash
|
|
240
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
239
241
|
cat .planning/phases/*-*/*-SUMMARY.md
|
|
240
242
|
```
|
|
241
243
|
|
|
@@ -385,11 +387,13 @@ AskUserQuestion(header="Archive Phases", question="Archive phase directories to
|
|
|
385
387
|
|
|
386
388
|
If "Yes":
|
|
387
389
|
```bash
|
|
390
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
388
391
|
ARCHIVE=$(pp_run query milestone.complete "v[X.Y]" --name "[Milestone Name]" --archive-phases ${GSD_WS})
|
|
389
392
|
```
|
|
390
393
|
|
|
391
394
|
If "Skip":
|
|
392
395
|
```bash
|
|
396
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
393
397
|
ARCHIVE=$(pp_run query milestone.complete "v[X.Y]" --name "[Milestone Name]" ${GSD_WS})
|
|
394
398
|
```
|
|
395
399
|
|
|
@@ -482,7 +486,8 @@ Append the extracted Backlog content verbatim to the end of the newly written RO
|
|
|
482
486
|
**Safety commit — commit archive files BEFORE deleting any originals:**
|
|
483
487
|
|
|
484
488
|
```bash
|
|
485
|
-
|
|
489
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
490
|
+
pp_run query commit "chore(planning): archive v[X.Y] milestone files" --files .planning/milestones/v[X.Y]-ROADMAP.md .planning/milestones/v[X.Y]-REQUIREMENTS.md .planning/milestones/v[X.Y]-MILESTONE-AUDIT.md .planning/MILESTONES.md .planning/PROJECT.md .planning/STATE.md .planning/ROADMAP.md
|
|
486
491
|
```
|
|
487
492
|
|
|
488
493
|
This creates a durable checkpoint in git history. If anything fails after this point, the working tree can be reconstructed from git.
|
|
@@ -551,7 +556,7 @@ If the "## Cross-Milestone Trends" section exists, update the tables with new da
|
|
|
551
556
|
|
|
552
557
|
**Commit:**
|
|
553
558
|
```bash
|
|
554
|
-
pp_run query commit "docs: update retrospective for v${VERSION}" --files .planning/RETROSPECTIVE.md
|
|
559
|
+
pp_run query commit "docs(planning): update retrospective for v${VERSION}" --files .planning/RETROSPECTIVE.md
|
|
555
560
|
```
|
|
556
561
|
|
|
557
562
|
</step>
|
|
@@ -633,6 +638,7 @@ AskUserQuestion with options: Squash merge (Recommended), Merge with history, De
|
|
|
633
638
|
**Squash merge:**
|
|
634
639
|
|
|
635
640
|
```bash
|
|
641
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
636
642
|
CURRENT_BRANCH=$(git branch --show-current)
|
|
637
643
|
git checkout ${BASE_BRANCH}
|
|
638
644
|
|
|
@@ -662,6 +668,7 @@ git checkout "$CURRENT_BRANCH"
|
|
|
662
668
|
**Merge with history:**
|
|
663
669
|
|
|
664
670
|
```bash
|
|
671
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
665
672
|
CURRENT_BRANCH=$(git branch --show-current)
|
|
666
673
|
git checkout ${BASE_BRANCH}
|
|
667
674
|
|
|
@@ -691,6 +698,7 @@ git checkout "$CURRENT_BRANCH"
|
|
|
691
698
|
**Delete without merging:**
|
|
692
699
|
|
|
693
700
|
```bash
|
|
701
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
694
702
|
if [ "$BRANCHING_STRATEGY" = "phase" ]; then
|
|
695
703
|
for branch in $PHASE_BRANCHES; do
|
|
696
704
|
git branch -d "$branch" 2>/dev/null || git branch -D "$branch"
|
|
@@ -716,6 +724,7 @@ If the result is `false` → skip this step entirely and proceed to `git_commit_
|
|
|
716
724
|
Create git tag:
|
|
717
725
|
|
|
718
726
|
```bash
|
|
727
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
719
728
|
# Pre-check: skip if tag already exists (prevents silent failure on retry)
|
|
720
729
|
if git rev-parse "v[X.Y]" >/dev/null 2>&1; then echo "Tag v[X.Y] already exists, skipping"; exit 0; fi
|
|
721
730
|
git tag -a v[X.Y] -m "v[X.Y] [Name]
|
|
@@ -736,6 +745,7 @@ Ask: "Push tag to remote? (y/n)"
|
|
|
736
745
|
|
|
737
746
|
If yes:
|
|
738
747
|
```bash
|
|
748
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
739
749
|
git push origin v[X.Y]
|
|
740
750
|
```
|
|
741
751
|
|
|
@@ -746,7 +756,7 @@ git push origin v[X.Y]
|
|
|
746
756
|
Commit the REQUIREMENTS.md deletion (archive files and ROADMAP.md were already committed in the safety commit in `reorganize_roadmap_and_delete_originals`).
|
|
747
757
|
|
|
748
758
|
```bash
|
|
749
|
-
git commit -m "chore: remove REQUIREMENTS.md for v[X.Y] milestone"
|
|
759
|
+
git commit -m "chore(planning): remove REQUIREMENTS.md for v[X.Y] milestone"
|
|
750
760
|
```
|
|
751
761
|
|
|
752
762
|
Confirm: "Committed: chore: remove REQUIREMENTS.md for v[X.Y] milestone"
|
|
@@ -51,6 +51,7 @@ non-Pareto or `vault.enabled=false` project debugs byte-identically to how it di
|
|
|
51
51
|
`vault` capability (D-30):
|
|
52
52
|
|
|
53
53
|
```bash
|
|
54
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
54
55
|
DEBUG_PLAN_PRE_HOOKS_JSON=$(pp_run loop render-hooks plan:pre --raw | node -e "const d=require('fs').readFileSync(0,'utf-8');try{const j=JSON.parse(d);j.activeHooks=(j.activeHooks||[]).filter((x)=>x&&x.capId==='vault');process.stdout.write(JSON.stringify(j));}catch{process.stdout.write('');}")
|
|
55
56
|
printf '%s' "$DEBUG_PLAN_PRE_HOOKS_JSON" | node -e "let h=[];try{h=JSON.parse(require('fs').readFileSync(0,'utf-8')).activeHooks||[]}catch{}console.log('DEBUG_PLAN_PRE_HOOKS_JSON='+JSON.stringify({activeHooks:h}))"
|
|
56
57
|
```
|
|
@@ -68,6 +69,7 @@ It owns the halt: a required miss stops here with the gate's own message, before
|
|
|
68
69
|
When SUBCMD=list:
|
|
69
70
|
|
|
70
71
|
```bash
|
|
72
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
71
73
|
ls .planning/debug/*.md 2>/dev/null | grep -v resolved
|
|
72
74
|
```
|
|
73
75
|
|
|
@@ -184,7 +184,7 @@ Update status in frontmatter to "diagnosed".
|
|
|
184
184
|
|
|
185
185
|
Commit the updated UAT.md:
|
|
186
186
|
```bash
|
|
187
|
-
pp_run query commit "docs(
|
|
187
|
+
pp_run query commit "docs(planning): add root causes from diagnosis" --phase "{phase_num}" --files ".planning/phases/XX-name/{phase_num}-UAT.md"
|
|
188
188
|
```
|
|
189
189
|
</step>
|
|
190
190
|
|
|
@@ -19,7 +19,7 @@ documented absent-artifact arm — before the cross-reference analysis begins.
|
|
|
19
19
|
|
|
20
20
|
**Element-sweep gate:** run `pp_run query discovery.element-sweep --check`. Exit 0 → proceed. Non-zero → a functional prototype element has no id, a tag names an unknown requirement, or `_sweep.md` leaves an element of the current pages undecided, decides one twice, or cites a reference that does not fit its outcome — finish the sweep with `/pp-discovery prototype` Step 8 and re-run. Without a prototype the check exits 0 by itself.
|
|
21
21
|
|
|
22
|
-
**Vault-context gate (PBI 75336):** for each of sessions 1–12 whose `.planning/discovery/session-NN.md` carries a `## Vault Context` section, run `pp_run query discovery.vault-check <N>`. Exit 0 → proceed. Non-zero → the record names no index, a line is not one `` - `<path>` — <why> `` entry,
|
|
22
|
+
**Vault-context gate (PBI 75336):** for each of sessions 1–12 whose `.planning/discovery/session-NN.md` carries a `## Vault Context` section, run `pp_run query discovery.vault-check <N>`. Exit 0 → proceed. Non-zero → the record names no index, a line is not one `` - `<path>` — <why> `` entry, a selected vault document is neither cited `[vault: <path>]` in the notes nor marked `— not used: <reason>`, or a document the vault's `INDEX.md` marks `[cross-cutting]` has no record line: fix that session's record or notes and re-run. A session with no `## Vault Context` section ran without the vault and is skipped.
|
|
23
23
|
|
|
24
24
|
**The screen-traceability gate reports open feedback; it never blocks on it (D-53, first arm).** A round whose `Processing` cells all read `Open` exits 0 and the open count is reported as outstanding work — exactly as an open `Gates-MVP` research item exits 0 under D-43. It fails only on structural faults. The hard block on those same structural faults lives at `/pp-discovery-to-build`, not here (D-53, second arm): the handoff into build is the last moment an uncovered MVP requirement or an unclassified surface is still free to fix. Open feedback is still closed before Session 13 completes, by the `--require-processed` check in Flow 2 Step 7, and the handoff refuses it too.
|
|
25
25
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
### Session 1: Discovery Sprint Kick-off
|
|
7
7
|
|
|
8
|
-
**Goal:** Align all participants on the Discovery Sprint purpose, establish project context, confirm business vision, identify stakeholders, and agree on the discovery approach, ground rules, and logistics.
|
|
8
|
+
**Goal:** Align all participants on the Discovery Sprint purpose, establish project context, confirm business vision, identify stakeholders and who approves what, and agree on the discovery approach, ground rules, and logistics.
|
|
9
9
|
|
|
10
10
|
**What We Cover:**
|
|
11
11
|
|
|
@@ -29,9 +29,10 @@
|
|
|
29
29
|
|
|
30
30
|
4. **Discovery Sprint approach and logistics**
|
|
31
31
|
*Why it matters: sets expectations so the remaining 12 sessions run smoothly without renegotiating format each time. Skip when: the team has already run a Discovery Sprint together before and knows the cadence.*
|
|
32
|
-
- Walk through the 13-session agenda and expected outputs
|
|
32
|
+
- Walk through the 13-session agenda and expected outputs, including the cross-reference that closes Session 8 and the one that opens Session 13
|
|
33
33
|
- What is the preferred meeting cadence and format (in-person, remote, hybrid)?
|
|
34
34
|
- How will decisions be documented and communicated?
|
|
35
|
+
- What is the team shape for the sprint and the build: a full delivery team, a small team, or one person working with an AI assistant? Session 12 builds the delivery model on this answer.
|
|
35
36
|
|
|
36
37
|
5. **Ground rules and ways of working**
|
|
37
38
|
*Why it matters: prevents disagreements from derailing later sessions once real tradeoffs surface. Skip when: the team already has an established working agreement from a prior engagement.*
|
|
@@ -44,16 +45,28 @@
|
|
|
44
45
|
- Are there hard deadlines (regulatory, contractual, market)?
|
|
45
46
|
- What budget constraints exist? [needs-business-input]
|
|
46
47
|
- Are there technology mandates or restrictions?
|
|
48
|
+
- Does the client vault or the client mandate a platform: cloud provider, CI/CD, observability? Record the mandate as a Key Decisions row `D-01-<n>`, citing `[vault: <path>]` when the vault states it. Sessions 5, 6 and 10 fill their tables against this decision; with no mandate, record that the platform is open.
|
|
47
49
|
|
|
48
50
|
7. **Requirement ID prefixes and decision-ID conventions**
|
|
49
51
|
*Why it matters: every requirement, decision, and action across all 13 sessions cites these IDs — chosen once here, never renumbered. Skip when: never — mandatory.*
|
|
50
52
|
- Propose a prefix set derived from the stakeholder domains just mapped in topic 3: one prefix per stakeholder domain, plus `N-` (non-functional) and `T-` (technical) defaults; the user confirms or adjusts (D-09)
|
|
51
53
|
- Create `.planning/discovery/_requirements.md` from the bootstrap template in the pp-core reference `references/discovery-id-conventions.md` — locate it under the installed pp-core root (`${PP_TOOLS%/bin/pp-tools.cjs}/references/discovery-id-conventions.md`) and Read it lazily; never `@`-import it. Fill the Prefix Registry header table with the confirmed set (the registry and the requirements table travel in one file — D-10)
|
|
52
|
-
- Never register a reserved prefix: the proposed set must not include `D-`, `A-`, `SP-`, `DG-`, `RS-` or `
|
|
54
|
+
- Never register a reserved prefix: the proposed set must not include `D-`, `A-`, `SP-`, `DG-`, `RS-`, `SCR-` or `PRC-` — they are owned by other ID families, and a row claiming one makes `discovery rollup --check` report `reserved_prefix` (D-44). Avoid the session-table row prefixes that reference lists too (`C-`, `R-`, `E-`, …), so a citation never reads two ways
|
|
53
55
|
- Decisions are cited inline as `D-<ss>-<n>` per that same reference; record the chosen prefix set as a Key Decisions row in the Session 1 notes
|
|
54
56
|
|
|
57
|
+
8. **Approval routes**
|
|
58
|
+
*Why it matters: Sessions 5–7 sign architecture and security deviations; an approval route found only later means those signatures were given by people who could not give them. Skip when: never — "no formal route" is itself an answer to record.*
|
|
59
|
+
- Which approvals will this project need: scope, budget, architecture, security deviations, data protection, go-live?
|
|
60
|
+
- Who gives each approval, and who is consulted or informed?
|
|
61
|
+
- When the client vault is bound, sweep it for approval rules: every document that says who must approve what. Record each route in the **Approval Matrix** with its `[vault: <path>]` citation.
|
|
62
|
+
- Where no route exists for an approval the sprint will need, who approves it? Record the answer as `D-01-<n>`.
|
|
63
|
+
|
|
55
64
|
**Notes Template:**
|
|
56
65
|
|
|
66
|
+
**Background**
|
|
67
|
+
|
|
68
|
+
The business problem or opportunity, what was tried before and with what result, and the documents handed over, cited by accession number (`[NN]`).
|
|
69
|
+
|
|
57
70
|
**Stakeholder Register**
|
|
58
71
|
|
|
59
72
|
| Name | Role | Organization | Interest Area | Decision Authority | Availability |
|
|
@@ -70,21 +83,52 @@
|
|
|
70
83
|
| Success criteria (12-month) | |
|
|
71
84
|
| Key business drivers | |
|
|
72
85
|
|
|
86
|
+
**Sprint Logistics**
|
|
87
|
+
|
|
88
|
+
| Aspect | Agreement |
|
|
89
|
+
|--------|-----------|
|
|
90
|
+
| Session cadence and format | |
|
|
91
|
+
| Team shape | |
|
|
92
|
+
| Decision recording and communication | |
|
|
93
|
+
|
|
94
|
+
**Working Agreement**
|
|
95
|
+
|
|
96
|
+
| Aspect | Agreement |
|
|
97
|
+
|--------|-----------|
|
|
98
|
+
| Disagreements and competing priorities | |
|
|
99
|
+
| Escalation path for blockers | |
|
|
100
|
+
| Collaboration tools | |
|
|
101
|
+
|
|
73
102
|
**Constraints and Risks Register**
|
|
74
103
|
|
|
75
104
|
| ID | Type | Description | Impact (H/M/L) | Mitigation | Owner |
|
|
76
105
|
|----|------|-------------|-----------------|------------|-------|
|
|
77
|
-
|
|
|
78
|
-
|
|
|
106
|
+
| CON-01 | Constraint | | | | |
|
|
107
|
+
| R-01 | Risk | | | | |
|
|
108
|
+
|
|
109
|
+
Session 11's **Risk Register** continues the `R-` sequence; a risk raised here keeps its ID there.
|
|
110
|
+
|
|
111
|
+
**Approval Matrix**
|
|
112
|
+
|
|
113
|
+
| Approval | Approver | Consulted | Source | Decision |
|
|
114
|
+
|----------|----------|-----------|--------|----------|
|
|
115
|
+
| Scope change | | | | |
|
|
116
|
+
| Budget | | | | |
|
|
117
|
+
| Architecture deviation | | | | |
|
|
118
|
+
| Security deviation | | | | |
|
|
119
|
+
| Data protection | | | | |
|
|
120
|
+
| Go-live | | | | |
|
|
121
|
+
|
|
122
|
+
**Source** is a `[vault: <path>]` citation or `room`. **Decision** is `—` or the `D-01-<n>` that set a route the vault does not give.
|
|
79
123
|
|
|
80
124
|
**Key Decisions**
|
|
81
125
|
|
|
82
|
-
|
|
|
126
|
+
| ID | Decision | Rationale | Owner | Date |
|
|
83
127
|
|---|----------|-----------|-------|------|
|
|
84
128
|
| | | | | |
|
|
85
129
|
|
|
86
130
|
**Action Items**
|
|
87
131
|
|
|
88
|
-
|
|
|
132
|
+
| ID | Action | Owner | Due Date | Status |
|
|
89
133
|
|---|--------|-------|----------|--------|
|
|
90
134
|
| | | | | |
|
|
@@ -57,7 +57,9 @@
|
|
|
57
57
|
|
|
58
58
|
| Process ID | Process Name | Owner | Trigger | End State | Frequency | Avg Duration | Criticality |
|
|
59
59
|
|------------|-------------|-------|---------|-----------|-----------|--------------|-------------|
|
|
60
|
-
|
|
|
60
|
+
| PRC-01 | | | | | | | |
|
|
61
|
+
|
|
62
|
+
**Process ID** is `PRC-<nn>`, a reserved prefix, so a process never shares an ID with a requirement.
|
|
61
63
|
|
|
62
64
|
**Pain Points Register**
|
|
63
65
|
|
|
@@ -85,12 +87,12 @@
|
|
|
85
87
|
|
|
86
88
|
**Key Decisions**
|
|
87
89
|
|
|
88
|
-
|
|
|
90
|
+
| ID | Decision | Rationale | Owner | Date |
|
|
89
91
|
|---|----------|-----------|-------|------|
|
|
90
92
|
| | | | | |
|
|
91
93
|
|
|
92
94
|
**Action Items**
|
|
93
95
|
|
|
94
|
-
|
|
|
96
|
+
| ID | Action | Owner | Due Date | Status |
|
|
95
97
|
|---|--------|-------|----------|--------|
|
|
96
98
|
| | | | | |
|
|
@@ -65,7 +65,7 @@ One Mermaid flowchart block per accepted sub-process decomposition.
|
|
|
65
65
|
|
|
66
66
|
**Step Matrices** (populated via Step 5C)
|
|
67
67
|
|
|
68
|
-
One step matrix per sub-process; Requirements column back-filled at Step 5D.
|
|
68
|
+
One step matrix per sub-process, or one combined matrix per main process when its sub-processes are step-sized (Step 5C); Requirements column back-filled at Step 5D.
|
|
69
69
|
|
|
70
70
|
**Business Objectives**
|
|
71
71
|
|
|
@@ -99,10 +99,12 @@ Orphan-requirement and uncovered-step flags only — the canonical requirements
|
|
|
99
99
|
|
|
100
100
|
| ID | Category | Requirement | Target / Threshold | MoSCoW |
|
|
101
101
|
|----|----------|-------------|-------------------|--------|
|
|
102
|
-
|
|
|
103
|
-
|
|
|
104
|
-
|
|
|
105
|
-
|
|
|
102
|
+
| | Performance | | | |
|
|
103
|
+
| | Availability | | | |
|
|
104
|
+
| | Scalability | | | |
|
|
105
|
+
| | Accessibility | | | |
|
|
106
|
+
|
|
107
|
+
**ID** is the requirement's `N-<nn>` row in `_requirements.md`, minted at Step 5D like every other requirement — never a separate `NFR-` sequence.
|
|
106
108
|
|
|
107
109
|
**Prototype Validation Plan** (populated via Step 5G)
|
|
108
110
|
|
|
@@ -110,13 +112,13 @@ Flows to be clickable, personas covered, and per-flow definition of "validated".
|
|
|
110
112
|
|
|
111
113
|
**Key Decisions**
|
|
112
114
|
|
|
113
|
-
|
|
|
115
|
+
| ID | Decision | Rationale | Owner | Date |
|
|
114
116
|
|---|----------|-----------|-------|------|
|
|
115
117
|
| | | | | |
|
|
116
118
|
|
|
117
119
|
**Action Items**
|
|
118
120
|
|
|
119
|
-
|
|
|
121
|
+
| ID | Action | Owner | Due Date | Status |
|
|
120
122
|
|---|--------|-------|----------|--------|
|
|
121
123
|
| | | | | |
|
|
122
124
|
|
|
@@ -173,7 +175,7 @@ For each accepted sub-process, propose a step-level matrix:
|
|
|
173
175
|
- **Integration:** external systems with direction
|
|
174
176
|
- **Requirements:** leave blank during 5C — back-filled with minted `_requirements.md` IDs during Step 5D consolidation
|
|
175
177
|
|
|
176
|
-
Present one sub-process matrix at a time. After validation, fill the section titled exactly **Step Matrices** in `.planning/discovery/session-03.md` — edit in place; never append a new heading.
|
|
178
|
+
Present one sub-process matrix at a time. When a main process's sub-processes are step-sized — each one or two steps — propose one combined matrix for the main process instead, with a **Sub-process** column after `#`; the user may still ask for one matrix per sub-process. After validation, fill the section titled exactly **Step Matrices** in `.planning/discovery/session-03.md` — edit in place; never append a new heading.
|
|
177
179
|
|
|
178
180
|
### Step 5D: Consolidate Requirements
|
|
179
181
|
|