@pareto4/pp-core 1.6.1 → 1.7.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.
@@ -18,8 +18,8 @@
18
18
  "branching_strategy": "none",
19
19
  "create_tag": true,
20
20
  "base_branch": null,
21
- "phase_branch_template": "gsd/phase-{phase}-{slug}",
22
- "milestone_branch_template": "gsd/{milestone}-{slug}",
21
+ "phase_branch_template": "pp/phase-{phase}-{slug}",
22
+ "milestone_branch_template": "pp/{milestone}-{slug}",
23
23
  "quick_branch_template": null
24
24
  },
25
25
  "workflow": {
@@ -11,8 +11,8 @@ Configuration options for `.planning/` directory behavior.
11
11
  "git": {
12
12
  "branching_strategy": "none",
13
13
  "base_branch": null,
14
- "phase_branch_template": "gsd/phase-{phase}-{slug}",
15
- "milestone_branch_template": "gsd/{milestone}-{slug}",
14
+ "phase_branch_template": "pp/phase-{phase}-{slug}",
15
+ "milestone_branch_template": "pp/{milestone}-{slug}",
16
16
  "quick_branch_template": null
17
17
  },
18
18
  "manager": {
@@ -31,8 +31,8 @@ Configuration options for `.planning/` directory behavior.
31
31
  | `git.branching_strategy` | `"none"` | Git branching approach: `"none"`, `"phase"`, or `"milestone"` |
32
32
  | `git.base_branch` | `null` (auto-detect) | Target branch for PRs and merges (e.g. `"master"`, `"develop"`). When `null`, auto-detects from `git symbolic-ref refs/remotes/origin/HEAD`, falling back to `"main"`. |
33
33
  | `git.create_tag` | `true` | Create git tags on milestone completion |
34
- | `git.phase_branch_template` | `"gsd/phase-{phase}-{slug}"` | Branch template for phase strategy |
35
- | `git.milestone_branch_template` | `"gsd/{milestone}-{slug}"` | Branch template for milestone strategy |
34
+ | `git.phase_branch_template` | `"pp/phase-{phase}-{slug}"` | Branch template for phase strategy |
35
+ | `git.milestone_branch_template` | `"pp/{milestone}-{slug}"` | Branch template for milestone strategy |
36
36
  | `git.quick_branch_template` | `null` | Optional branch template for quick-task runs |
37
37
  | `workflow.use_worktrees` | `true` | Whether executor agents run in isolated git worktrees. Set to `false` to disable worktrees — agents execute sequentially on the main working tree instead. Recommended for solo developers or when worktree merges cause issues. Note: if your branch is ahead of `origin/HEAD` (a diverged milestone or feature branch), pp-core auto-degrades to sequential and prints a warning; set `worktree.baseRef:"head"` in `.claude/settings.local.json` to restore parallel execution. See the branch-divergence note below. |
38
38
  | `workflow.subagent_timeout` | `300000` | Timeout in milliseconds for parallel subagent tasks (e.g. codebase mapping). Increase for large codebases or slower models. Default: 300000 (5 minutes). |
@@ -144,14 +144,14 @@ To use uncommitted mode:
144
144
 
145
145
  **When `git.branching_strategy: "phase"`:**
146
146
  - `execute-phase` creates/switches to a branch before execution
147
- - Branch name from `phase_branch_template` (e.g., `gsd/phase-03-authentication`)
147
+ - Branch name from `phase_branch_template` (e.g., `pp/phase-03-authentication`)
148
148
  - All plan commits go to that branch
149
149
  - User merges branches manually after phase completion
150
150
  - `complete-milestone` offers to merge all phase branches
151
151
 
152
152
  **When `git.branching_strategy: "milestone"`:**
153
153
  - First `execute-phase` of milestone creates the milestone branch
154
- - Branch name from `milestone_branch_template` (e.g., `gsd/v1.0-mvp`)
154
+ - Branch name from `milestone_branch_template` (e.g., `pp/v1.0-mvp`)
155
155
  - All phases in milestone commit to same branch
156
156
  - `complete-milestone` offers to merge milestone branch to main
157
157
 
@@ -292,8 +292,8 @@ Set via `git.*` namespace (e.g., `"git": { "branching_strategy": "phase" }`).
292
292
  | `git.branching_strategy` | string | `"none"` | `"none"`, `"phase"`, `"milestone"` | Git branching approach for phase/milestone isolation |
293
293
  | `git.base_branch` | string\|null | `null` (auto-detect) | Any branch name | Target branch for PRs and merges; auto-detects from `origin/HEAD` when `null` |
294
294
  | `git.create_tag` | boolean | `true` | `true`, `false` | Create git tags on milestone completion |
295
- | `git.phase_branch_template` | string | `"gsd/phase-{phase}-{slug}"` | Template with `{phase}`, `{slug}` | Branch naming template for `phase` strategy |
296
- | `git.milestone_branch_template` | string | `"gsd/{milestone}-{slug}"` | Template with `{milestone}`, `{slug}` | Branch naming template for `milestone` strategy |
295
+ | `git.phase_branch_template` | string | `"pp/phase-{phase}-{slug}"` | Template with `{phase}`, `{slug}` | Branch naming template for `phase` strategy |
296
+ | `git.milestone_branch_template` | string | `"pp/{milestone}-{slug}"` | Template with `{milestone}`, `{slug}` | Branch naming template for `milestone` strategy |
297
297
  | `git.quick_branch_template` | string\|null | `null` | Template with `{slug}` | Optional branch template for quick-task runs |
298
298
 
299
299
  ### Search & API Fields
@@ -420,7 +420,7 @@ Several config fields affect each other or trigger special behavior:
420
420
  "git": {
421
421
  "branching_strategy": "phase",
422
422
  "base_branch": "develop",
423
- "phase_branch_template": "gsd/phase-{phase}-{slug}"
423
+ "phase_branch_template": "pp/phase-{phase}-{slug}"
424
424
  },
425
425
  "workflow": {
426
426
  "research": true,
@@ -452,7 +452,7 @@ Several config fields affect each other or trigger special behavior:
452
452
  "phase_naming": "sequential",
453
453
  "git": {
454
454
  "branching_strategy": "milestone",
455
- "milestone_branch_template": "gsd/{milestone}-{slug}"
455
+ "milestone_branch_template": "pp/{milestone}-{slug}"
456
456
  },
457
457
  "workflow": {
458
458
  "research": true,
@@ -0,0 +1,25 @@
1
+ # plan:pre vault fetch + summary (bespoke step dispatch — a0)
2
+
3
+ Capability-driven dispatch for an active plan:pre step hook where `kind == "step"` and `capId == "vault"`. Runs `vault fetch` then `vault summary` so `.planning/vault/SUMMARY.md` exists on the researcher and planner read paths before the researcher Agent() spawn. The generic step contract dispatches only `ref.skill`/`ref.agent` hooks — not `ref.command` — so this bespoke block owns the `vault fetch` command run. The registry evaluates `when: vault.enabled`; an inert capability yields no hook. `onError: skip` — any failure logs a warning and planning continues; never hard-fails.
4
+
5
+ Read the active plan:pre step hook from `PLAN_PRE_HOOKS_JSON` (in-context) where `kind == "step"` and `capId == "vault"`.
6
+
7
+ **If no active vault step hook exists:** skip (non-Pareto project, `vault.enabled` false, or vault bindings absent).
8
+
9
+ **If an active vault step hook exists** (recognizable by `capId == "vault"` + `ref.command == "vault fetch"`):
10
+
11
+ ```bash
12
+ _PP_SHIM_NAME="pp-tools.cjs"; _PP_RUNTIME_ROOT="${RUNTIME_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"; PP_TOOLS="${_PP_RUNTIME_ROOT}/pp-core/bin/${_PP_SHIM_NAME}"; if [ -f "$PP_TOOLS" ]; then pp_run() { node "$PP_TOOLS" "$@"; }; 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}"; pp_run() { node "$PP_TOOLS" "$@"; }; 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}"; pp_run() { node "$PP_TOOLS" "$@"; }; elif command -v pp-tools >/dev/null 2>&1; then PP_TOOLS="$(command -v pp-tools)"; pp_run() { "$PP_TOOLS" "$@"; }; elif [ -f "$HOME/.claude/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="$HOME/.claude/pp-core/bin/${_PP_SHIM_NAME}"; pp_run() { node "$PP_TOOLS" "$@"; }; 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}"; pp_run() { node "$PP_TOOLS" "$@"; }; 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}"; pp_run() { node "$PP_TOOLS" "$@"; }; 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}"; pp_run() { node "$PP_TOOLS" "$@"; }; 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}"; pp_run() { node "$PP_TOOLS" "$@"; }; 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}"; pp_run() { node "$PP_TOOLS" "$@"; }; 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}"; pp_run() { node "$PP_TOOLS" "$@"; }; 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}"; pp_run() { node "$PP_TOOLS" "$@"; }; 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}"; pp_run() { node "$PP_TOOLS" "$@"; }; 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}"; pp_run() { node "$PP_TOOLS" "$@"; }; 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}"; pp_run() { node "$PP_TOOLS" "$@"; }; 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}"; pp_run() { node "$PP_TOOLS" "$@"; }; 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}"; pp_run() { node "$PP_TOOLS" "$@"; }; 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}"; pp_run() { node "$PP_TOOLS" "$@"; }; 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}"; pp_run() { node "$PP_TOOLS" "$@"; }; 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}"; pp_run() { node "$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
13
+ # vault fetch: populates .planning/vault/ cache + manifest
14
+ if ! pp_run vault fetch 2>&1; then
15
+ echo "⚠ vault fetch failed — continuing without vault context (onError:skip)" >&2
16
+ else
17
+ # vault summary: writes .planning/vault/SUMMARY.md — the bounded index
18
+ # that planner, researcher, and executor pointers reference.
19
+ if ! pp_run vault summary 2>&1; then
20
+ echo "⚠ vault summary failed — SUMMARY.md may be absent (onError:skip)" >&2
21
+ else
22
+ echo "✓ vault fetch + summary complete: .planning/vault/SUMMARY.md"
23
+ fi
24
+ fi
25
+ ```
@@ -0,0 +1,119 @@
1
+ # Vault load gate — advisory (plan:pre + execute:pre)
2
+
3
+ Advisory gate that confirms vault load state before planning or build. The host sets
4
+ `VAULT_GATE_POINT` to `plan` (for plan:pre) or `execute` (for execute:pre) before
5
+ executing this step — **one file serves both call sites** (D-05). The §8 message table
6
+ (design §8) column is selected by this parameter.
7
+
8
+ Gated entirely on `.platform-bindings.json`: when no bindings file is present, this gate
9
+ is a **no-op** — fully inert for non-Pareto projects. The verdict is read from
10
+ `pp_run check vault.status --raw` — a pure manifest read that never fetches, never errors,
11
+ and degrades to `{"present":false}` on any problem (D-02).
12
+
13
+ ```bash
14
+ _PP_SHIM_NAME="pp-tools.cjs"; _PP_RUNTIME_ROOT="${RUNTIME_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"; PP_TOOLS="${_PP_RUNTIME_ROOT}/pp-core/bin/${_PP_SHIM_NAME}"; if [ -f "$PP_TOOLS" ]; then pp_run() { node "$PP_TOOLS" "$@"; }; 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}"; pp_run() { node "$PP_TOOLS" "$@"; }; 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}"; pp_run() { node "$PP_TOOLS" "$@"; }; elif command -v pp-tools >/dev/null 2>&1; then PP_TOOLS="$(command -v pp-tools)"; pp_run() { "$PP_TOOLS" "$@"; }; elif [ -f "$HOME/.claude/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="$HOME/.claude/pp-core/bin/${_PP_SHIM_NAME}"; pp_run() { node "$PP_TOOLS" "$@"; }; 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}"; pp_run() { node "$PP_TOOLS" "$@"; }; 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}"; pp_run() { node "$PP_TOOLS" "$@"; }; 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}"; pp_run() { node "$PP_TOOLS" "$@"; }; 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}"; pp_run() { node "$PP_TOOLS" "$@"; }; 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}"; pp_run() { node "$PP_TOOLS" "$@"; }; 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}"; pp_run() { node "$PP_TOOLS" "$@"; }; 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}"; pp_run() { node "$PP_TOOLS" "$@"; }; 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}"; pp_run() { node "$PP_TOOLS" "$@"; }; 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}"; pp_run() { node "$PP_TOOLS" "$@"; }; 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}"; pp_run() { node "$PP_TOOLS" "$@"; }; 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}"; pp_run() { node "$PP_TOOLS" "$@"; }; 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}"; pp_run() { node "$PP_TOOLS" "$@"; }; 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}"; pp_run() { node "$PP_TOOLS" "$@"; }; 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}"; pp_run() { node "$PP_TOOLS" "$@"; }; 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}"; pp_run() { node "$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
15
+ VAULT_GATE_PRESENT=$(pp_run query platform-bindings --pick present 2>/dev/null || echo false)
16
+ ```
17
+
18
+ **If `VAULT_GATE_PRESENT` != `true`:** skip entirely (non-Pareto project — fully inert).
19
+
20
+ ```bash
21
+ VAULT_VERDICT=$(pp_run check vault.status --raw 2>/dev/null || echo '{"present":false}')
22
+ VAULT_STATUS=$(printf '%s' "$VAULT_VERDICT" | node -e "const d=require('fs').readFileSync(0,'utf-8');try{process.stdout.write(JSON.parse(d).status||'miss');}catch{process.stdout.write('miss');}")
23
+ VAULT_TIER=$(printf '%s' "$VAULT_VERDICT" | node -e "const d=require('fs').readFileSync(0,'utf-8');try{process.stdout.write(JSON.parse(d).tier||'');}catch{process.stdout.write('');}")
24
+ VAULT_FALLBACK_REASON=$(printf '%s' "$VAULT_VERDICT" | node -e "const d=require('fs').readFileSync(0,'utf-8');try{process.stdout.write(JSON.parse(d).fallbackReason||'');}catch{process.stdout.write('');}")
25
+ VAULT_REPO=$(printf '%s' "$VAULT_VERDICT" | node -e "const d=require('fs').readFileSync(0,'utf-8');try{const p=JSON.parse(d);process.stdout.write(p.repo||p.source||'');}catch{process.stdout.write('');}")
26
+ VAULT_REF=$(printf '%s' "$VAULT_VERDICT" | node -e "const d=require('fs').readFileSync(0,'utf-8');try{process.stdout.write(JSON.parse(d).ref||'');}catch{process.stdout.write('');}")
27
+ VAULT_SHA=$(printf '%s' "$VAULT_VERDICT" | node -e "const d=require('fs').readFileSync(0,'utf-8');try{const s=JSON.parse(d).resolvedSha||'';process.stdout.write(s.slice(0,8));}catch{process.stdout.write('');}")
28
+ VAULT_FILE_COUNT=$(printf '%s' "$VAULT_VERDICT" | node -e "const d=require('fs').readFileSync(0,'utf-8');try{process.stdout.write(String(JSON.parse(d).fileCount??0));}catch{process.stdout.write('0');}")
29
+ VAULT_STALE=$(printf '%s' "$VAULT_VERDICT" | node -e "const d=require('fs').readFileSync(0,'utf-8');try{process.stdout.write(String(!!JSON.parse(d).stale));}catch{process.stdout.write('false');}")
30
+ VAULT_FETCHED_AT=$(printf '%s' "$VAULT_VERDICT" | node -e "const d=require('fs').readFileSync(0,'utf-8');try{process.stdout.write(JSON.parse(d).fetchedAt||'');}catch{process.stdout.write('');}")
31
+ # Compute human-readable cache age when stale
32
+ VAULT_AGE=""
33
+ if [ "$VAULT_STALE" = "true" ] && [ -n "$VAULT_FETCHED_AT" ]; then
34
+ VAULT_AGE=$(VAULT_FETCHED_AT="$VAULT_FETCHED_AT" node -e "const ms=Date.now()-new Date(process.env.VAULT_FETCHED_AT).getTime();const d=Math.floor(ms/86400000);const h=Math.floor((ms%86400000)/3600000);process.stdout.write(d>0?d+'d':h+'h');")
35
+ fi
36
+ # Detect --auto / --chain in host $ARGUMENTS (non-interactive pipeline mode — D-08)
37
+ AUTO_MODE=false
38
+ if echo "${ARGUMENTS:-}" | grep -qE -- '--auto|--chain'; then AUTO_MODE=true; fi
39
+ ```
40
+
41
+ Select message based on `VAULT_STATUS`, `VAULT_TIER`, and `VAULT_GATE_POINT`, then handle confirmation.
42
+
43
+ ---
44
+
45
+ ## §8 Message table — plan:pre column (`VAULT_GATE_POINT` == `plan`)
46
+
47
+ **`fetched` + `tier: client`:**
48
+
49
+ > Client vault loaded from `` `${VAULT_REPO}@${VAULT_REF}` `` (`` `${VAULT_FILE_COUNT}` `` files, sha `` `${VAULT_SHA}` ``). Planning will apply client standards.
50
+
51
+ Surface this message and require an explicit `confirmed` acknowledgment (`AskUserQuestion`, or a typed `confirmed` in TEXT_MODE). Advisory checkpoint, not a hard block.
52
+
53
+ **`fetched` + `tier: fallback` (intentionally more prominent — design §8):**
54
+
55
+ > ℹ Loaded **shared Pareto vault** `` `${VAULT_REPO}@${VAULT_REF}` `` (`` `${VAULT_FILE_COUNT}` `` files) — *${VAULT_FALLBACK_REASON}*. Planning will apply Pareto defaults, not client-specific standards. Proceed?
56
+
57
+ Surface this message and require an explicit `confirmed` acknowledgment (`AskUserQuestion`, or a typed `confirmed` in TEXT_MODE). The fallback confirmation is deliberately more prominent than the client tier: proceeding on Pareto defaults instead of the client's own standards is a state the user should consciously acknowledge.
58
+
59
+ **`cache` (all tiers failed, using cached copy):**
60
+
61
+ > ⚠ Could not reach client or shared vault — using cached copy from `` `${VAULT_FETCHED_AT}` `` (tier `` `${VAULT_TIER}` ``, may be stale). Proceed?
62
+
63
+ Surface this warning and require an explicit `confirmed` acknowledgment (`AskUserQuestion`, or a typed `confirmed` in TEXT_MODE).
64
+
65
+ **`miss` (no vault reachable, no cached copy):**
66
+
67
+ > ⚠ No vault reachable (client or shared) and no cached copy. Planning will proceed WITHOUT vault context.
68
+
69
+ Surface this warning and require an explicit `confirmed` acknowledgment (`AskUserQuestion`, or a typed `confirmed` in TEXT_MODE).
70
+
71
+ ---
72
+
73
+ ## §8 Message table — execute:pre column (`VAULT_GATE_POINT` == `execute`)
74
+
75
+ **`fetched` + `tier: client`:**
76
+
77
+ > Client vault present (`` `${VAULT_REPO}@${VAULT_REF}` ``). Build will apply client patterns.
78
+
79
+ Surface this message and require an explicit `confirmed` acknowledgment (`AskUserQuestion`, or a typed `confirmed` in TEXT_MODE). Advisory checkpoint, not a hard block.
80
+
81
+ **`fetched` + `tier: fallback` (intentionally more prominent — design §8):**
82
+
83
+ > ℹ Using shared Pareto vault — *${VAULT_FALLBACK_REASON}*. Build applies Pareto defaults. Proceed?
84
+
85
+ Surface this message and require an explicit `confirmed` acknowledgment (`AskUserQuestion`, or a typed `confirmed` in TEXT_MODE). The fallback confirmation is deliberately more prominent than the client tier.
86
+
87
+ **`cache` (all tiers failed, using cached copy):**
88
+
89
+ > ⚠ Could not reach client or shared vault — using cached copy from `` `${VAULT_FETCHED_AT}` `` (tier `` `${VAULT_TIER}` ``, may be stale). Proceed?
90
+
91
+ Surface this warning and require an explicit `confirmed` acknowledgment (`AskUserQuestion`, or a typed `confirmed` in TEXT_MODE).
92
+
93
+ **`miss` (no vault reachable, no cached copy):**
94
+
95
+ > ⚠ No vault reachable (client or shared) and no cached copy. Build will proceed WITHOUT vault context.
96
+
97
+ Surface this warning and require an explicit `confirmed` acknowledgment (`AskUserQuestion`, or a typed `confirmed` in TEXT_MODE).
98
+
99
+ ---
100
+
101
+ ## Stale suffix (applies to all statuses)
102
+
103
+ When `VAULT_STALE` is `true`, append ` (cache is \`${VAULT_AGE}\` old)` to the selected message before surfacing it to the user.
104
+
105
+ ---
106
+
107
+ ## --auto / --chain behavior (D-08)
108
+
109
+ When `AUTO_MODE` is `true`: **do not display an interactive prompt**. Instead, print the selected message (including stale suffix when applicable) as a log line, then continue without requiring `confirmed`. This ensures a non-interactive pipeline run leaves an auditable record that Pareto defaults / cache / miss were in effect — especially important for the `tier: fallback`, `cache`, and `miss` cases. Never hard-blocks.
110
+
111
+ ---
112
+
113
+ ## Confirmation (interactive mode)
114
+
115
+ When `AUTO_MODE` is `false`:
116
+
117
+ Use `AskUserQuestion` to surface the selected message and await `confirmed`. In TEXT_MODE (`--text` in `$ARGUMENTS`), replace `AskUserQuestion` with a plain-text prompt and accept a typed `confirmed`. This is an advisory checkpoint only — the gate **never hard-blocks**; proceeding after `confirmed` (or with a timeout / empty input) is always allowed.
118
+
119
+ `TEXT_MODE` follows the same rule as the host workflow (`--text` in `$ARGUMENTS`): replace `AskUserQuestion` with a plain-text numbered prompt.
@@ -512,6 +512,14 @@ if [ -z "${PLAN_PRE_HOOKS_JSON:-}" ]; then
512
512
  fi
513
513
  ```
514
514
 
515
+ ### plan:pre vault fetch + summary
516
+
517
+ With `PLAN_PRE_HOOKS_JSON` already loaded, Read and execute `pp-core/workflows/execute-phase/steps/vault-fetch.md` — the bespoke plan:pre vault fetch + summary dispatch (active only for a `capId == "vault"` step hook; produces `.planning/vault/SUMMARY.md` for the researcher/planner read paths; `onError:skip`). Skip silently when none.
518
+
519
+ ### into:researcher contributions
520
+
521
+ In `PLAN_PRE_HOOKS_JSON`, read active plan:pre entries where `kind == "contribution"` and `into == "researcher"` (in array order). If none, inject nothing. If present, append each entry's `fragment.inline` verbatim to `filled_research_hook_fragment` (or add it as a `<files_to_read>`/context line in the researcher prompt) — typically a pointer to `.planning/vault/SUMMARY.md` (the bounded vault index). Inject verbatim — do not paraphrase.
522
+
515
523
  Find the active `research` step hook in `PLAN_PRE_HOOKS_JSON`. Use the hook's `fragment.inline` as the prompt template and substitute the phase fields below before spawning its declared `ref.agent`.
516
524
 
517
525
  ```markdown
@@ -693,6 +701,10 @@ Also available:
693
701
 
694
702
  **Exit the plan-phase workflow. Do not continue.**
695
703
 
704
+ ### Advisory plan:pre vault gate dispatch
705
+
706
+ In `PLAN_PRE_HOOKS_JSON` (already loaded), find active plan:pre entries where `kind == "gate"` and `check.query == "vault.status"` (`blocking:false`). If none, skip silently to step 6. If present, set `VAULT_GATE_POINT=plan` and Read and execute `pp-core/workflows/execute-phase/steps/vault-load-gate.md` — the parameterized advisory vault gate (surfaces the §8 message for the load state fetched/fallback/cache/miss, requires an explicit `confirmed`, or logs in --auto/--chain). Advisory, `onError:skip` — never blocks planning; proceed to step 6 after it resolves.
707
+
696
708
  ## 6. Check Existing Plans
697
709
 
698
710
  ```bash
@@ -68,8 +68,8 @@ Cross-AI Execution:
68
68
 
69
69
  Git Customization:
70
70
  - `git.base_branch` (default: `main`)
71
- - `git.phase_branch_template` (default: `gsd/phase-{phase}-{slug}`)
72
- - `git.milestone_branch_template` (default: `gsd/{milestone}-{slug}`)
71
+ - `git.phase_branch_template` (default: `pp/phase-{phase}-{slug}`)
72
+ - `git.milestone_branch_template` (default: `pp/{milestone}-{slug}`)
73
73
 
74
74
  Runtime / Output:
75
75
  - `response_language` (default: `null`)
@@ -274,7 +274,7 @@ AskUserQuestion([
274
274
  ]
275
275
  },
276
276
  {
277
- question: "Phase branch template? (current: <value or gsd/phase-{phase}-{slug}>)",
277
+ question: "Phase branch template? (current: <value or pp/phase-{phase}-{slug}>)",
278
278
  header: "Phase Template",
279
279
  multiSelect: false,
280
280
  options: [
@@ -283,7 +283,7 @@ AskUserQuestion([
283
283
  ]
284
284
  },
285
285
  {
286
- question: "Milestone branch template? (current: <value or gsd/{milestone}-{slug}>)",
286
+ question: "Milestone branch template? (current: <value or pp/{milestone}-{slug}>)",
287
287
  header: "Milestone Template",
288
288
  multiSelect: false,
289
289
  options: [
@@ -176,6 +176,15 @@
176
176
  "external-job-waiting.test.cjs"
177
177
  ],
178
178
  "issue": "#1165"
179
+ },
180
+ "vault": {
181
+ "files": [
182
+ "vault-read-path.test.cjs",
183
+ "vault-security.test.cjs",
184
+ "vault-status-check.test.cjs",
185
+ "vault.test.cjs"
186
+ ],
187
+ "issue": "v1.7.0 Client Vault Load — four distinct concerns: vault.test (fetch/status/summary unit), vault-security (VSEC-02/03 write-guard + secret/fence), vault-read-path (VGATE-03 SUMMARY pointer), vault-status-check (VGATE-02 gate-query handler)"
179
188
  }
180
189
  }
181
190
  }