@pareto4/pp-core 1.17.1 → 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/README.md +5 -3
- package/agents/pp-code-fixer.md +9 -16
- package/agents/pp-code-reviewer.md +2 -78
- package/agents/pp-codebase-mapper.md +3 -0
- package/agents/pp-debugger.md +3 -2
- package/agents/pp-executor.md +25 -30
- 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 +16 -12
- 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-vault-reviewer.md +43 -189
- package/agents/pp-verifier.md +10 -8
- 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-ns-manage.md +1 -1
- package/commands/pp-ns-review.md +1 -1
- package/commands/pp-quick.md +3 -0
- package/commands/pp-review-backlog.md +2 -1
- package/commands/pp-vault-promote.md +7 -8
- package/commands/pp-vault-review.md +6 -7
- package/gemini-extension.json +1 -1
- package/package.json +3 -6
- package/pp-core/bin/lib/capability-registry.cjs +15 -357
- package/pp-core/bin/lib/capability-state.cjs +15 -79
- package/pp-core/bin/lib/capability-writer.cjs +2 -16
- package/pp-core/bin/lib/check-command-router.cjs +342 -2298
- package/pp-core/bin/lib/clusters.cjs +2 -2
- package/pp-core/bin/lib/commands.cjs +79 -4
- package/pp-core/bin/lib/compose-bindings.cjs +99 -16
- package/pp-core/bin/lib/config.cjs +3 -6
- 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/git-base-branch.cjs +10 -13
- package/pp-core/bin/lib/git-provider.cjs +5 -6
- package/pp-core/bin/lib/init-contract.cjs +55 -42
- package/pp-core/bin/lib/init-interactive.cjs +6 -20
- package/pp-core/bin/lib/io.cjs +2 -8
- package/pp-core/bin/lib/loop-resolver.cjs +8 -32
- package/pp-core/bin/lib/org-profile.cjs +16 -92
- package/pp-core/bin/lib/vault-command-router.cjs +174 -1206
- package/pp-core/bin/lib/vault-coordinates.cjs +4 -4
- package/pp-core/bin/lib/vault-index.cjs +44 -74
- package/pp-core/bin/lib/vault-seal.cjs +37 -122
- package/pp-core/bin/lib/vault-standards-promote.cjs +577 -0
- package/pp-core/bin/lib/vault-standards-review.cjs +293 -0
- package/pp-core/bin/lib/vault-standards.cjs +15 -16
- package/pp-core/bin/lib/vault-trace.cjs +40 -3016
- package/pp-core/bin/lib/vault-update.cjs +5 -26
- package/pp-core/bin/lib/vault.cjs +122 -316
- package/pp-core/bin/pp-tools.cjs +15 -36
- package/pp-core/org-profile.json +1 -1
- package/pp-core/references/autonomous-best-effort.md +4 -3
- 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/planner-vault-standards.md +16 -25
- 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/README.md +1 -1
- package/pp-core/templates/VAULT-REVIEW.md +24 -170
- package/pp-core/templates/milestone.md +5 -5
- package/pp-core/workflows/add-backlog.md +1 -1
- package/pp-core/workflows/add-tests.md +8 -5
- 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 +7 -6
- 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 +15 -8
- package/pp-core/workflows/code-review.md +16 -58
- package/pp-core/workflows/complete-milestone.md +13 -3
- package/pp-core/workflows/debug.md +4 -2
- package/pp-core/workflows/diagnose-issues.md +1 -1
- package/pp-core/workflows/discovery-sprint/prototype.md +2 -2
- 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 +17 -12
- 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 +13 -14
- package/pp-core/workflows/execute-phase/steps/cross-ai-delegation.md +1 -0
- package/pp-core/workflows/execute-phase/steps/execute-pre-dispatch.md +5 -25
- package/pp-core/workflows/execute-phase/steps/per-plan-worktree-gate.md +1 -0
- package/pp-core/workflows/execute-phase/steps/vault-fetch.md +18 -6
- package/pp-core/workflows/execute-phase/steps/vault-load-gate.md +6 -109
- package/pp-core/workflows/execute-phase/steps/verify-post-gate.md +1 -17
- package/pp-core/workflows/execute-phase.md +21 -12
- package/pp-core/workflows/execute-plan.md +24 -15
- 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/help/modes/full.md +1 -1
- 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 +19 -12
- 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 +9 -6
- package/pp-core/workflows/vault-review.md +65 -186
- package/pp-core/workflows/vault-write-back.md +78 -110
- package/pp-core/workflows/verify-phase.md +5 -0
- package/pp-core/workflows/verify-work.md +9 -2
- package/scripts/gen-capability-registry.cjs +12 -93
- package/scripts/lint-test-file-count.allowlist.json +1 -19
- package/scripts/lint-test-file-count.cjs +5 -6
- package/scripts/prompt-injection-scan.sh +1 -4
- package/scripts/sync-runtime-launcher.cjs +115 -5
- package/pp-core/bin/lib/practices-review-check.cjs +0 -944
- package/pp-core/bin/lib/vault-audit.cjs +0 -2594
- package/pp-core/bin/lib/vault-mode.cjs +0 -235
- package/pp-core/bin/lib/vault-practices.cjs +0 -2057
- package/pp-core/bin/lib/vault-review.cjs +0 -2102
- package/pp-core/bin/lib/vault-write-back.cjs +0 -905
- package/pp-core/references/planner-vault-practices.md +0 -95
- package/pp-core/references/practice-arithmetic-contract.md +0 -121
- package/pp-core/references/verifier-practice-verdicts.md +0 -263
- package/pp-core/templates/practices/README.md +0 -248
- package/pp-core/templates/practices/error-handling.md +0 -18
- package/pp-core/templates/practices/minimal-comments.md +0 -14
- package/pp-core/templates/practices/naming-convention.md +0 -18
- package/pp-core/templates/practices/practice-template.md +0 -23
- package/pp-core/workflows/execute-phase/steps/verifier-practice-payload.md +0 -165
- package/scripts/gen-practice-arithmetic-contract.cjs +0 -412
- package/scripts/practice-arithmetic-contract.allow.json +0 -35
- package/scripts/record-vault-mode-golden.cjs +0 -89
- package/scripts/vault-calibrate.cjs +0 -996
package/pp-core/bin/pp-tools.cjs
CHANGED
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
* state signal-resume Remove WAITING.json signal
|
|
20
20
|
* resolve-model <agent-type> Get model for agent based on profile
|
|
21
21
|
* find-phase <phase> Find phase directory by number
|
|
22
|
-
* commit <message> [--files f1 f2] [--no-verify] Commit planning docs
|
|
23
|
-
* commit-to-subrepo <msg> --files f1 f2 Route commits to sub-repos
|
|
22
|
+
* commit <message> [--files f1 f2] [--phase id] [--quick id] [--no-verify] Commit planning docs
|
|
23
|
+
* commit-to-subrepo <msg> --files f1 f2 [--phase id] Route commits to sub-repos
|
|
24
24
|
* verify-summary <path> Verify a SUMMARY.md file
|
|
25
25
|
* generate-slug <text> Convert text to URL-safe slug
|
|
26
26
|
* current-timestamp [format] Get timestamp (full|date|filename)
|
|
@@ -748,32 +748,10 @@ function createReadlinePrompter({ input = process.stdin, output = process.stdout
|
|
|
748
748
|
};
|
|
749
749
|
}
|
|
750
750
|
|
|
751
|
-
/**
|
|
752
|
-
* The vault mode a mode-filtered hook is judged against (Phase 15 D-02). Built
|
|
753
|
-
* here, at the CLI entry, so the pure resolvers (`loop-resolver`,
|
|
754
|
-
* `capability-state`) never import the vault adapter. It asks
|
|
755
|
-
* `vaultModeVerdict`, the single mode owner that honours the org-profile
|
|
756
|
-
* ladder, and answers the mode only for an active gate with a cleanly
|
|
757
|
-
* resolved mode. Anything else, including a throw, is `null`: the undefined
|
|
758
|
-
* mode, fail-closed per D-28. `vault.cjs` is required lazily so commands that
|
|
759
|
-
* never render hooks do not load it.
|
|
760
|
-
*/
|
|
761
|
-
function makeVaultModeResolver(cwd) {
|
|
762
|
-
return () => {
|
|
763
|
-
try {
|
|
764
|
-
const v = require('./lib/vault.cjs').vaultModeVerdict(cwd);
|
|
765
|
-
return v.active && v.ok ? v.mode : null;
|
|
766
|
-
} catch {
|
|
767
|
-
return null;
|
|
768
|
-
}
|
|
769
|
-
};
|
|
770
|
-
}
|
|
771
|
-
|
|
772
751
|
/**
|
|
773
752
|
* Does this project hold engine-written vault records? (Phase 16 D-19.) The
|
|
774
753
|
* predicate a seal gate (`onRecordedArtifacts: true`) is rendered under, built
|
|
775
|
-
* here at the CLI entry
|
|
776
|
-
* pure resolver never imports vault code. It asks the seal leaf's
|
|
754
|
+
* here at the CLI entry so the pure resolver never imports vault code. It asks the seal leaf's
|
|
777
755
|
* `hasRecordedVaultArtifacts`, which is bindings-first (D-42) and answers true
|
|
778
756
|
* when it cannot prove absence (D-44). A throw is `false`, the inert answer.
|
|
779
757
|
* Injected ONLY into `loop render-hooks`: `capability state` / `set` report
|
|
@@ -793,8 +771,8 @@ function makeRecordedArtifactsResolver(cwd) {
|
|
|
793
771
|
|
|
794
772
|
/**
|
|
795
773
|
* Quick 261015-ect (QD-13): the `.platform-bindings.json` measurement
|
|
796
|
-
* `loop render-hooks` injects, built here at the CLI entry
|
|
797
|
-
*
|
|
774
|
+
* `loop render-hooks` injects, built here at the CLI entry so the resolver
|
|
775
|
+
* imports no vault code (D-02). The
|
|
798
776
|
* reader is EXISTENCE, admission's own step 1 (`hasPlatformBindings`), so a
|
|
799
777
|
* malformed file counts as present and the fence's `vault admission` decides
|
|
800
778
|
* (D-47 b). A throw answers `null`, "could not measure", which the resolver
|
|
@@ -912,7 +890,7 @@ async function runCommand(command, args, cwd, raw, defaultValue, originalCommand
|
|
|
912
890
|
// (D-07-04), which is what stops a committed deferral from passing
|
|
913
891
|
// silently forever.
|
|
914
892
|
// --arm-vault (quick 261003-kmd): non-interactive — composes the
|
|
915
|
-
// client-vault binding from the resolved org profile and arms the
|
|
893
|
+
// client-vault binding from the resolved org profile and arms the two
|
|
916
894
|
// vault keys where absent; /pp-new-project calls it. Inert (exit 0,
|
|
917
895
|
// armed:false) when no profile resolves; ok:false means run /pp-init.
|
|
918
896
|
const icArgs = args.slice(1);
|
|
@@ -1180,6 +1158,10 @@ async function runCommand(command, args, cwd, raw, defaultValue, originalCommand
|
|
|
1180
1158
|
}
|
|
1181
1159
|
|
|
1182
1160
|
case 'commit': {
|
|
1161
|
+
// --phase <id> / --quick <id> add a `Phase:` / `Quick:` trailer; pulled out
|
|
1162
|
+
// first so their values are never read as message words or --files paths.
|
|
1163
|
+
const trailerArgs = commands.extractCommitTrailerArgs(args);
|
|
1164
|
+
args = trailerArgs.args;
|
|
1183
1165
|
const amend = args.includes('--amend');
|
|
1184
1166
|
const noVerify = args.includes('--no-verify');
|
|
1185
1167
|
const filesIndex = args.indexOf('--files');
|
|
@@ -1190,7 +1172,7 @@ async function runCommand(command, args, cwd, raw, defaultValue, originalCommand
|
|
|
1190
1172
|
const messageArgs = args.slice(1, endIndex).filter(a => !a.startsWith('--'));
|
|
1191
1173
|
const message = messageArgs.join(' ') || undefined;
|
|
1192
1174
|
const files = filesIndex !== -1 ? args.slice(filesIndex + 1).filter(a => !a.startsWith('--')) : [];
|
|
1193
|
-
commands.cmdCommit(cwd, message, files, raw, amend, noVerify);
|
|
1175
|
+
commands.cmdCommit(cwd, message, files, raw, amend, noVerify, { phase: trailerArgs.phase, quick: trailerArgs.quick });
|
|
1194
1176
|
break;
|
|
1195
1177
|
}
|
|
1196
1178
|
|
|
@@ -1200,10 +1182,12 @@ async function runCommand(command, args, cwd, raw, defaultValue, originalCommand
|
|
|
1200
1182
|
}
|
|
1201
1183
|
|
|
1202
1184
|
case 'commit-to-subrepo': {
|
|
1185
|
+
const trailerArgs = commands.extractCommitTrailerArgs(args);
|
|
1186
|
+
args = trailerArgs.args;
|
|
1203
1187
|
const message = args[1];
|
|
1204
1188
|
const filesIndex = args.indexOf('--files');
|
|
1205
1189
|
const files = filesIndex !== -1 ? args.slice(filesIndex + 1).filter(a => !a.startsWith('--')) : [];
|
|
1206
|
-
commands.cmdCommitToSubrepo(cwd, message, files, raw);
|
|
1190
|
+
commands.cmdCommitToSubrepo(cwd, message, files, raw, { phase: trailerArgs.phase, quick: trailerArgs.quick });
|
|
1207
1191
|
break;
|
|
1208
1192
|
}
|
|
1209
1193
|
|
|
@@ -1723,7 +1707,6 @@ async function runCommand(command, args, cwd, raw, defaultValue, originalCommand
|
|
|
1723
1707
|
configDir: loopConfigDir ? path.resolve(loopConfigDir) : undefined,
|
|
1724
1708
|
activeCap: loopActiveCap,
|
|
1725
1709
|
into: loopInto,
|
|
1726
|
-
resolveVaultMode: makeVaultModeResolver(cwd),
|
|
1727
1710
|
resolveRecordedArtifacts: makeRecordedArtifactsResolver(cwd),
|
|
1728
1711
|
resolvePlatformBindingsPresent: makePlatformBindingsPresentResolver(cwd),
|
|
1729
1712
|
});
|
|
@@ -1756,9 +1739,7 @@ async function runCommand(command, args, cwd, raw, defaultValue, originalCommand
|
|
|
1756
1739
|
configDir = configDirVal;
|
|
1757
1740
|
}
|
|
1758
1741
|
const resolvedConfigDir = configDir ? path.resolve(configDir) : null;
|
|
1759
|
-
capabilityState.cmdCapabilityState(cwd, resolvedConfigDir, raw
|
|
1760
|
-
resolveVaultMode: makeVaultModeResolver(cwd),
|
|
1761
|
-
});
|
|
1742
|
+
capabilityState.cmdCapabilityState(cwd, resolvedConfigDir, raw);
|
|
1762
1743
|
} else if (capSubcommand === 'set') {
|
|
1763
1744
|
// capability set <id> [--on|--off|--enable|--disable] [--gate <key>=<bool>]... [--config-dir <dir>] [--runtime <r>] [--scope <s>]
|
|
1764
1745
|
const capId = args[2];
|
|
@@ -1837,8 +1818,6 @@ async function runCommand(command, args, cwd, raw, defaultValue, originalCommand
|
|
|
1837
1818
|
gates: Object.keys(setGates).length > 0 ? setGates : undefined,
|
|
1838
1819
|
runtime: setRuntime,
|
|
1839
1820
|
scope: setScope,
|
|
1840
|
-
// 15-REVIEW WR-07: the same mode `capability state` and render-hooks use.
|
|
1841
|
-
resolveVaultMode: makeVaultModeResolver(cwd),
|
|
1842
1821
|
},
|
|
1843
1822
|
raw,
|
|
1844
1823
|
);
|
package/pp-core/org-profile.json
CHANGED
|
@@ -83,7 +83,7 @@ grep -q "^handled=${PHASE_NUM}:" "$RUN_STATE" 2>/dev/null ||
|
|
|
83
83
|
printf 'handled=%s:%s\n' "$PHASE_NUM" "$OUTCOME" >> "$RUN_STATE"
|
|
84
84
|
PADDED_PHASE=$(basename "$PHASE_DIR" | cut -d- -f1)
|
|
85
85
|
if [ -f "$REPORT" ]; then
|
|
86
|
-
pp_run query commit "docs(
|
|
86
|
+
pp_run query commit "docs(planning): autonomous report" --phase "${PADDED_PHASE}" --files "$REPORT"
|
|
87
87
|
fi
|
|
88
88
|
```
|
|
89
89
|
|
|
@@ -302,7 +302,7 @@ calls (`pp-ui-phase`, `pp-code-review`, `pp-ui-review`) and the agents on the pa
|
|
|
302
302
|
| execute-phase/steps/worktree-recovery-policy.md exit 42; execute-phase partial-execution recovery | hard stop (fail closed) |
|
|
303
303
|
| execute-phase `state_exists` false; `--interactive` per-plan menu | unreachable — autonomous requires STATE.md and never passes `--interactive` to execute-phase |
|
|
304
304
|
| post-merge-gate | build-failure "Fix now / Continue" (step 5.8) — this is the U-E2 site: fix once, then continue and record |
|
|
305
|
-
| codebase-drift-gate, per-plan-worktree-gate, execute-pre-dispatch, verify-post-gate
|
|
305
|
+
| codebase-drift-gate, per-plan-worktree-gate, execute-pre-dispatch, verify-post-gate | no prompt (non-blocking or gate-enforcer only) |
|
|
306
306
|
| `pp-code-review --fix --auto` (3c.5) | no prompt |
|
|
307
307
|
| **`pp-ui-phase`** (§3a.5-ii): step 9 max-revision choice, and its `pp-ui-researcher` design questions | **remaining stop** — ui-phase has no non-interactive flag; filed as deferred |
|
|
308
308
|
| **`pp-ui-review`** (§3d.5): "UI-REVIEW.md already exists" | **remaining stop** (only on a re-run) — no non-interactive flag; filed as deferred |
|
|
@@ -400,6 +400,7 @@ phase. Printed by the lifecycle single-phase banner, the STOPPED banner and the
|
|
|
400
400
|
Used by `autonomous.md` §3a when `workflow.skip_discuss` is true. Get phase details:
|
|
401
401
|
|
|
402
402
|
```bash
|
|
403
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
403
404
|
DETAIL=$(pp_run query roadmap.get-phase ${PHASE_NUM})
|
|
404
405
|
```
|
|
405
406
|
|
|
@@ -452,7 +453,7 @@ None — discuss phase skipped.
|
|
|
452
453
|
Commit the minimal context:
|
|
453
454
|
|
|
454
455
|
```bash
|
|
455
|
-
pp_run query commit "docs(
|
|
456
|
+
pp_run query commit "docs(planning): auto-generated context (discuss skipped)" --phase "${padded_phase}" --files "${phase_dir}/${padded_phase}-CONTEXT.md"
|
|
456
457
|
```
|
|
457
458
|
|
|
458
459
|
## Banner math
|
|
@@ -109,6 +109,7 @@ Skill(skill="pp-complete-milestone", args="${milestone_version}")
|
|
|
109
109
|
After complete-milestone returns, verify it produced output:
|
|
110
110
|
|
|
111
111
|
```bash
|
|
112
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
112
113
|
ls .planning/milestones/v${milestone_version}-ROADMAP.md 2>/dev/null || true
|
|
113
114
|
```
|
|
114
115
|
|
|
@@ -5,6 +5,7 @@ Smart discuss is the autonomous-optimized variant of `pp-discuss-phase`. It prop
|
|
|
5
5
|
**Inputs:** `PHASE_NUM` from execute_phase. Run init to get phase paths:
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
8
9
|
PHASE_STATE=$(pp-tools query init.phase-op ${PHASE_NUM})
|
|
9
10
|
```
|
|
10
11
|
|
|
@@ -34,6 +35,7 @@ Extract from these:
|
|
|
34
35
|
**Read all prior CONTEXT.md files:**
|
|
35
36
|
|
|
36
37
|
```bash
|
|
38
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
37
39
|
(find "$(dirname "$STATE_PATH")/phases" -name "*-CONTEXT.md" 2>/dev/null || true) | sort
|
|
38
40
|
```
|
|
39
41
|
|
|
@@ -68,6 +70,7 @@ Lightweight codebase scan to inform grey area identification and proposals. Keep
|
|
|
68
70
|
**Check for existing codebase maps:**
|
|
69
71
|
|
|
70
72
|
```bash
|
|
73
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
71
74
|
ls .planning/codebase/*.md 2>/dev/null || true
|
|
72
75
|
```
|
|
73
76
|
|
|
@@ -96,6 +99,7 @@ Read the 3-5 most relevant files to understand existing patterns.
|
|
|
96
99
|
**Get phase details:**
|
|
97
100
|
|
|
98
101
|
```bash
|
|
102
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
99
103
|
DETAIL=$(pp-tools query roadmap.get-phase ${PHASE_NUM})
|
|
100
104
|
```
|
|
101
105
|
|
|
@@ -270,7 +274,7 @@ Write the file.
|
|
|
270
274
|
**Commit:**
|
|
271
275
|
|
|
272
276
|
```bash
|
|
273
|
-
|
|
277
|
+
pp_run query commit "docs(planning): smart discuss context" --phase "${PADDED_PHASE}" --files "${phase_dir}/${padded_phase}-CONTEXT.md"
|
|
274
278
|
```
|
|
275
279
|
|
|
276
280
|
Display confirmation:
|
|
@@ -17,12 +17,13 @@ never `@`-imported.
|
|
|
17
17
|
| Data-gathering items | `DG-<nn>` — same shape as SP. Regex: `DG-\d{2}` | `DG-07` | Open data-gathering items in `_risks.md` |
|
|
18
18
|
| Research items | `RS-<nn>` — same shape as SP/DG: zero-padded 2-digit global sequence, no session component. Regex: `RS-\d{2}` | `RS-01` | Rows of `_research.md`, the research-only backlog |
|
|
19
19
|
| Screens | `SCR-<nn>` — zero-padded 2-digit global sequence, no session and no role component, minted by scan (D-12). Regex: `SCR-\d{2}` | `SCR-01` | Rows of `_screens.md`, the requirement-to-screen inventory; Role is a grouping column, not part of the ID (D-50) |
|
|
20
|
+
| Processes | `PRC-<nn>` — zero-padded 2-digit global sequence. Regex: `PRC-\d{2}` | `PRC-03` | Rows of the Session 2 **Process Inventory**, the as-is processes Session 3 transforms |
|
|
20
21
|
| Requirements | `<PREFIX><n>` — PREFIX is a registered domain prefix (uppercase letters/digits ending in `-`, e.g. a stakeholder-domain prefix, `N-` non-functional, `T-` technical); `<n>` is a numeric sequence, zero-padded to 2 digits by convention (`01`..`99`, then `100`). Regex: `[A-Z][A-Z0-9]*-\d+` | `N-01` | Rows of `_requirements.md`; the prefix carries the classification — there is no separate Type column |
|
|
21
22
|
| Input-package accessions | `NN` — zero-padded 2-digit number, assigned in arrival order and never renumbered; a mid-sprint document takes the next number (D-16). Regex: `\d{2}` | `03` | Numbered documents in `.planning/discovery-input/` (including its `confidential/` subdir — one number space spans both locations, D-21). Reading order is a README column, not the number |
|
|
22
23
|
|
|
23
24
|
## Reserved Prefixes
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
Seven prefixes are reserved by the ID families above and MUST NOT be registered as
|
|
26
27
|
domain prefixes in the `_requirements.md` Prefix Registry:
|
|
27
28
|
|
|
28
29
|
| Reserved | Owned by |
|
|
@@ -33,6 +34,7 @@ domain prefixes in the `_requirements.md` Prefix Registry:
|
|
|
33
34
|
| `DG-` | Data-gathering items |
|
|
34
35
|
| `RS-` | Research items |
|
|
35
36
|
| `SCR-` | Screens |
|
|
37
|
+
| `PRC-` | Processes |
|
|
36
38
|
|
|
37
39
|
Every one of them satisfies the requirement-ID regex `[A-Z][A-Z0-9]*-\d+`, so a
|
|
38
40
|
registry that claims one mints requirement IDs indistinguishable from the family that
|
|
@@ -43,7 +45,11 @@ collide, and no reader or parser can tell them apart.
|
|
|
43
45
|
sequence, so a registry claiming `SCR-` would make `SCR-01` ambiguous between a screen
|
|
44
46
|
and a requirement — the same collision, one artifact further along the traceability ring.
|
|
45
47
|
|
|
46
|
-
|
|
48
|
+
`PRC-` followed with issue #12: Session 2 used to number processes `P-<nn>`, which an
|
|
49
|
+
engagement had also registered as a domain prefix, so `P-03` meant two things. Process IDs
|
|
50
|
+
moved to `PRC-` and the prefix is reserved so the clash cannot come back.
|
|
51
|
+
|
|
52
|
+
Session 1's kick-off prefix selection (D-09) must refuse all seven: pick a different
|
|
47
53
|
domain prefix (any other uppercase letters/digits ending in `-`, e.g. `K-` for *Klant*).
|
|
48
54
|
Non-reserved prefixes are unaffected.
|
|
49
55
|
|
|
@@ -53,6 +59,33 @@ registry, so its requirement rows also report `unknown_prefix`. The check is ret
|
|
|
53
59
|
— an engagement that registered one of these before the rule existed turns red on
|
|
54
60
|
upgrade. The remedy is the same: choose a different domain prefix.
|
|
55
61
|
|
|
62
|
+
## Session-Table Row IDs
|
|
63
|
+
|
|
64
|
+
The Notes Templates number some table rows with their own short prefixes. These IDs are
|
|
65
|
+
local to their table: they are not requirements, never enter `_requirements.md`, and are
|
|
66
|
+
not reserved — but Session 1 should not propose a domain prefix that repeats one, or a
|
|
67
|
+
citation such as `C-01` reads two ways.
|
|
68
|
+
|
|
69
|
+
| Prefix | Table | Session |
|
|
70
|
+
|--------|-------|---------|
|
|
71
|
+
| `CON-` | Constraints and Risks Register (constraints) | 1 |
|
|
72
|
+
| `R-` | Constraints and Risks Register (risks), continued by the Risk Register | 1, 11 |
|
|
73
|
+
| `PP-` | Pain Points Register | 2 |
|
|
74
|
+
| `MP-` | Main Process Register | 3 |
|
|
75
|
+
| `BO-` | Business Objectives | 3 |
|
|
76
|
+
| `E-` | EPIC Register | 3 |
|
|
77
|
+
| `US-` | User Stories | 3 |
|
|
78
|
+
| `C-` | Component Inventory | 5 |
|
|
79
|
+
| `INT-` | Integration Points Map | 5 |
|
|
80
|
+
| `ADR-` | Architecture Decision Records | 5 |
|
|
81
|
+
| `CR-` | Compliance Requirements Register | 6 |
|
|
82
|
+
| `IF-` | Integration Design Register | 8 |
|
|
83
|
+
| `OI-` | Open Items Register | 13 |
|
|
84
|
+
|
|
85
|
+
Non-functional requirements are not in this list: they are `N-` rows of
|
|
86
|
+
`_requirements.md`, minted like every other requirement, and Session 3's
|
|
87
|
+
**Non-Functional Requirements** table cites them by that ID.
|
|
88
|
+
|
|
56
89
|
## Citation Rules
|
|
57
90
|
|
|
58
91
|
- Requirement IDs are never renumbered and never reused (REQM-02). A gap in a sequence
|
|
@@ -15,11 +15,11 @@ If any of these is false, the gate is inactive — execution proceeds normally.
|
|
|
15
15
|
|
|
16
16
|
For each task gated by MVP+TDD, the executor MUST verify (before running the implementation step):
|
|
17
17
|
|
|
18
|
-
1. **A failing-test commit exists.** Search git log on the current branch for a commit
|
|
18
|
+
1. **A failing-test commit exists.** Search git log on the current branch for a commit of type `test` (any scope) that carries the trailer `Phase: {phase}-{plan}` for the same plan as the current task. The commit must touch a test file (`*.test.*`, `*.spec.*`, `tests/**`).
|
|
19
19
|
2. **The test was actually red.** The commit message body or the executor's recent shell history must show the test failed when first run. Acceptable evidence:
|
|
20
20
|
- Commit message contains `RED:` prefix or `(RED)` tag
|
|
21
21
|
- Recent terminal output shows `FAIL` or non-zero exit on the new test before any implementation commit
|
|
22
|
-
3. **No implementation commit yet.** No `feat
|
|
22
|
+
3. **No implementation commit yet.** No `feat` commit carrying the trailer `Phase: {phase}-{plan}` may exist before the failing-test commit.
|
|
23
23
|
|
|
24
24
|
If any check fails, the gate trips.
|
|
25
25
|
|
|
@@ -51,7 +51,7 @@ The executor MUST:
|
|
|
51
51
|
|
|
52
52
|
Required next step:
|
|
53
53
|
1. Write a failing test for the behavior above.
|
|
54
|
-
2. Commit it as: test({
|
|
54
|
+
2. Commit it as: test({area}): {short description} — with the trailer Phase: {phase}-{plan}
|
|
55
55
|
3. Re-run /pp:execute-phase
|
|
56
56
|
```
|
|
57
57
|
|
|
@@ -34,11 +34,23 @@ If NO_GIT: Run `git init` silently. pp-core projects always get their own repo.
|
|
|
34
34
|
|
|
35
35
|
<commit_formats>
|
|
36
36
|
|
|
37
|
+
<format name="scope-and-trailer">
|
|
38
|
+
## Scope and Phase Trailer
|
|
39
|
+
|
|
40
|
+
Every commit follows Conventional Commits: `{type}({scope}): {description}`, an optional body, then trailers.
|
|
41
|
+
|
|
42
|
+
- **The scope names the part of the codebase**, never a phase, plan or quick-task id: `feat(auth)`, `fix(billing)`, `test(api)`. Pick it from the files the commit touches; leave it out (`chore: ...`) when no single area fits. Commits of `.planning/` artifacts use `docs(planning)` (or `chore(planning)`).
|
|
43
|
+
- **The phase or plan goes in a git trailer**, the last paragraph of the message after a blank line: `Phase: 02-03` for a plan, `Phase: 02` for a phase-level commit, `Quick: <id>` for a quick task. `pp_run query commit` and `pp_run query commit-to-subrepo` add it with `--phase <id>` / `--quick <id>`; a raw `git commit` adds it as a second `-m "Phase: <id>"` or as the last paragraph of the message.
|
|
44
|
+
|
|
45
|
+
Why: a scope that is a phase number tells a reviewer nothing about what changed and breaks the client standard that the scope is a noun naming the part of the codebase. The trailer keeps every commit traceable to its phase and plan, and git parses it (`%(trailers:key=Phase)`, `git log --grep="^Phase: 02-03$"`), so tools no longer parse subjects.
|
|
46
|
+
|
|
47
|
+
</format>
|
|
48
|
+
|
|
37
49
|
<format name="initialization">
|
|
38
50
|
## Project Initialization (brief + roadmap together)
|
|
39
51
|
|
|
40
52
|
```
|
|
41
|
-
docs: initialize [project-name] ([N] phases)
|
|
53
|
+
docs(planning): initialize [project-name] ([N] phases)
|
|
42
54
|
|
|
43
55
|
[One-liner from PROJECT.md]
|
|
44
56
|
|
|
@@ -51,7 +63,7 @@ Phases:
|
|
|
51
63
|
What to commit:
|
|
52
64
|
|
|
53
65
|
```bash
|
|
54
|
-
|
|
66
|
+
pp_run query commit "docs(planning): initialize [project-name] ([N] phases)" --files .planning/
|
|
55
67
|
```
|
|
56
68
|
|
|
57
69
|
</format>
|
|
@@ -69,11 +81,13 @@ Each task gets its own commit immediately after completion.
|
|
|
69
81
|
> executor prompt; absent that signal, hooks run normally.
|
|
70
82
|
|
|
71
83
|
```
|
|
72
|
-
{type}({
|
|
84
|
+
{type}({area}): {task-name}
|
|
73
85
|
|
|
74
86
|
- [Key change 1]
|
|
75
87
|
- [Key change 2]
|
|
76
88
|
- [Key change 3]
|
|
89
|
+
|
|
90
|
+
Phase: {phase}-{plan}
|
|
77
91
|
```
|
|
78
92
|
|
|
79
93
|
**Commit types:**
|
|
@@ -89,29 +103,35 @@ Each task gets its own commit immediately after completion.
|
|
|
89
103
|
```bash
|
|
90
104
|
# Standard task
|
|
91
105
|
git add src/api/auth.ts src/types/user.ts
|
|
92
|
-
git commit -m "feat(
|
|
106
|
+
git commit -m "feat(auth): create user registration endpoint
|
|
93
107
|
|
|
94
108
|
- POST /auth/register validates email and password
|
|
95
109
|
- Checks for duplicate users
|
|
96
110
|
- Returns JWT token on success
|
|
111
|
+
|
|
112
|
+
Phase: 08-02
|
|
97
113
|
"
|
|
98
114
|
|
|
99
115
|
# TDD task - RED phase
|
|
100
116
|
git add src/__tests__/jwt.test.ts
|
|
101
|
-
git commit -m "test(
|
|
117
|
+
git commit -m "test(auth): add failing test for JWT generation
|
|
102
118
|
|
|
103
119
|
- Tests token contains user ID claim
|
|
104
120
|
- Tests token expires in 1 hour
|
|
105
121
|
- Tests signature verification
|
|
122
|
+
|
|
123
|
+
Phase: 07-02
|
|
106
124
|
"
|
|
107
125
|
|
|
108
126
|
# TDD task - GREEN phase
|
|
109
127
|
git add src/utils/jwt.ts
|
|
110
|
-
git commit -m "feat(
|
|
128
|
+
git commit -m "feat(auth): implement JWT generation
|
|
111
129
|
|
|
112
130
|
- Uses jose library for signing
|
|
113
131
|
- Includes user ID and expiry claims
|
|
114
132
|
- Signs with HS256 algorithm
|
|
133
|
+
|
|
134
|
+
Phase: 07-02
|
|
115
135
|
"
|
|
116
136
|
```
|
|
117
137
|
|
|
@@ -123,7 +143,7 @@ git commit -m "feat(07-02): implement JWT generation
|
|
|
123
143
|
After all tasks committed, one final metadata commit captures plan completion.
|
|
124
144
|
|
|
125
145
|
```
|
|
126
|
-
docs(
|
|
146
|
+
docs(planning): complete [plan-name] plan
|
|
127
147
|
|
|
128
148
|
Tasks completed: [N]/[N]
|
|
129
149
|
- [Task 1 name]
|
|
@@ -131,12 +151,14 @@ Tasks completed: [N]/[N]
|
|
|
131
151
|
- [Task 3 name]
|
|
132
152
|
|
|
133
153
|
SUMMARY: .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md
|
|
154
|
+
|
|
155
|
+
Phase: {phase}-{plan}
|
|
134
156
|
```
|
|
135
157
|
|
|
136
158
|
What to commit:
|
|
137
159
|
|
|
138
160
|
```bash
|
|
139
|
-
|
|
161
|
+
pp_run query commit "docs(planning): complete [plan-name] plan" --phase "{phase}-{plan}" --files .planning/phases/XX-name/{phase}-{plan}-PLAN.md .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md .planning/STATE.md .planning/ROADMAP.md
|
|
140
162
|
```
|
|
141
163
|
|
|
142
164
|
**Note:** Code files NOT included - already committed per-task.
|
|
@@ -147,7 +169,7 @@ pp-tools query commit "docs({phase}-{plan}): complete [plan-name] plan" --files
|
|
|
147
169
|
## Handoff (WIP)
|
|
148
170
|
|
|
149
171
|
```
|
|
150
|
-
|
|
172
|
+
docs(planning): pause [phase-name] at task [X]/[Y]
|
|
151
173
|
|
|
152
174
|
Current: [task name]
|
|
153
175
|
[If blocked:] Blocked: [reason]
|
|
@@ -156,7 +178,7 @@ Current: [task name]
|
|
|
156
178
|
What to commit:
|
|
157
179
|
|
|
158
180
|
```bash
|
|
159
|
-
|
|
181
|
+
pp_run query commit "docs(planning): pause [phase-name] at task [X]/[Y]" --files .planning/
|
|
160
182
|
```
|
|
161
183
|
|
|
162
184
|
</format>
|
|
@@ -173,36 +195,38 @@ a7f2d1 feat(checkout): Stripe payments with webhook verification
|
|
|
173
195
|
2f4a8d docs: initialize ecommerce-app (5 phases)
|
|
174
196
|
```
|
|
175
197
|
|
|
176
|
-
**New approach (per-task commits):**
|
|
198
|
+
**New approach (per-task commits, phase in the trailer):**
|
|
199
|
+
|
|
200
|
+
`git log --format='%h %s [%(trailers:key=Phase,valueonly)]'` reads:
|
|
177
201
|
```
|
|
178
202
|
# Phase 04 - Checkout
|
|
179
|
-
1a2b3c docs(
|
|
180
|
-
4d5e6f feat(
|
|
181
|
-
7g8h9i feat(
|
|
182
|
-
0j1k2l feat(
|
|
203
|
+
1a2b3c docs(planning): complete checkout flow plan [04-01]
|
|
204
|
+
4d5e6f feat(checkout): add webhook signature verification [04-01]
|
|
205
|
+
7g8h9i feat(checkout): implement payment session creation [04-01]
|
|
206
|
+
0j1k2l feat(checkout): create checkout page component [04-01]
|
|
183
207
|
|
|
184
208
|
# Phase 03 - Products
|
|
185
|
-
3m4n5o docs(
|
|
186
|
-
6p7q8r feat(
|
|
187
|
-
9s0t1u feat(
|
|
188
|
-
2v3w4x feat(
|
|
209
|
+
3m4n5o docs(planning): complete product listing plan [03-02]
|
|
210
|
+
6p7q8r feat(products): add pagination controls [03-02]
|
|
211
|
+
9s0t1u feat(products): implement search and filters [03-02]
|
|
212
|
+
2v3w4x feat(products): create product catalog schema [03-01]
|
|
189
213
|
|
|
190
214
|
# Phase 02 - Auth
|
|
191
|
-
5y6z7a docs(
|
|
192
|
-
8b9c0d feat(
|
|
193
|
-
1e2f3g test(
|
|
194
|
-
4h5i6j docs(
|
|
195
|
-
7k8l9m feat(
|
|
196
|
-
0n1o2p
|
|
215
|
+
5y6z7a docs(planning): complete token refresh plan [02-02]
|
|
216
|
+
8b9c0d feat(auth): implement refresh token rotation [02-02]
|
|
217
|
+
1e2f3g test(auth): add failing test for token refresh [02-02]
|
|
218
|
+
4h5i6j docs(planning): complete JWT setup plan [02-01]
|
|
219
|
+
7k8l9m feat(auth): add JWT generation and validation [02-01]
|
|
220
|
+
0n1o2p build(deps): install jose library [02-01]
|
|
197
221
|
|
|
198
222
|
# Phase 01 - Foundation
|
|
199
|
-
3q4r5s docs(
|
|
200
|
-
6t7u8v feat(
|
|
201
|
-
9w0x1y feat(
|
|
202
|
-
2z3a4b feat
|
|
223
|
+
3q4r5s docs(planning): complete scaffold plan [01-01]
|
|
224
|
+
6t7u8v feat(ui): configure Tailwind and globals [01-01]
|
|
225
|
+
9w0x1y feat(db): set up Prisma with database [01-01]
|
|
226
|
+
2z3a4b feat: create Next.js 15 project [01-01]
|
|
203
227
|
|
|
204
228
|
# Initialization
|
|
205
|
-
5c6d7e docs: initialize ecommerce-app (5 phases)
|
|
229
|
+
5c6d7e docs(planning): initialize ecommerce-app (5 phases) []
|
|
206
230
|
```
|
|
207
231
|
|
|
208
232
|
Each plan produces 2-4 commits (tasks + metadata). Clear, granular, bisectable.
|
|
@@ -233,7 +257,7 @@ Each plan produces 2-4 commits (tasks + metadata). Clear, granular, bisectable.
|
|
|
233
257
|
|
|
234
258
|
**Context engineering for AI:**
|
|
235
259
|
- Git history becomes primary context source for future Claude sessions
|
|
236
|
-
- `git log --grep="{phase}-{plan}"` shows all work for a plan
|
|
260
|
+
- `git log --grep="^Phase: {phase}-{plan}$"` shows all work for a plan
|
|
237
261
|
- `git diff <hash>^..<hash>` shows exact changes per task
|
|
238
262
|
- Less reliance on parsing SUMMARY.md = more context for actual work
|
|
239
263
|
|
|
@@ -287,11 +311,11 @@ Set `commit_docs: false` so planning docs stay local and are not committed to an
|
|
|
287
311
|
Instead of the standard `commit` command, use `commit-to-subrepo` when `sub_repos` is configured:
|
|
288
312
|
|
|
289
313
|
```bash
|
|
290
|
-
|
|
314
|
+
pp_run query commit-to-subrepo "feat(users): add user API" --phase "02-01" \
|
|
291
315
|
--files backend/src/api/users.ts backend/src/types/user.ts frontend/src/components/UserForm.tsx
|
|
292
316
|
```
|
|
293
317
|
|
|
294
|
-
This stages `src/api/users.ts` and `src/types/user.ts` in the `backend/` repo, and `src/components/UserForm.tsx` in the `frontend/` repo, then commits each independently with the same message.
|
|
318
|
+
This stages `src/api/users.ts` and `src/types/user.ts` in the `backend/` repo, and `src/components/UserForm.tsx` in the `frontend/` repo, then commits each independently with the same message and `Phase: 02-01` trailer.
|
|
295
319
|
|
|
296
320
|
Files that don't match any configured sub-repo are reported as unmatched.
|
|
297
321
|
|
|
@@ -9,29 +9,51 @@ Pass the message first, then file paths via `--files`. Both `commit` and `commit
|
|
|
9
9
|
Always use this for `.planning/` files — it handles `commit_docs` and gitignore checks automatically:
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
|
|
12
|
+
pp_run query commit "docs(planning): {description}" --phase "{phase-or-plan-id}" --files .planning/STATE.md .planning/ROADMAP.md
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
The CLI will return `skipped` (with reason) if `commit_docs` is `false` or `.planning/` is gitignored. No manual conditional checks needed.
|
|
16
16
|
|
|
17
|
+
## Scope and the Phase trailer
|
|
18
|
+
|
|
19
|
+
The Conventional Commit scope names the part of the codebase a commit changes, as in `fix(billing): round vat per line`. Planning artifacts are one such part, so every commit of `.planning/` files uses `docs(planning)` (or `chore(planning)` when the type is chore). A phase number, plan number, quick-task id or phase slug never goes in the scope.
|
|
20
|
+
|
|
21
|
+
To keep commits traceable to their phase, the phase or plan id goes in a git trailer instead:
|
|
22
|
+
|
|
23
|
+
- `--phase <id>` adds `Phase: <id>`: a plan id such as `02-03`, or a phase id such as `02` for phase-level commits. Use the same padded ids the phase directory uses.
|
|
24
|
+
- `--quick <id>` adds `Quick: <id>` for a quick task.
|
|
25
|
+
|
|
26
|
+
The trailer is the last paragraph of the message, after a blank line:
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
docs(planning): complete token refresh plan
|
|
30
|
+
|
|
31
|
+
Phase: 02-03
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Readers find a phase's commits with `git log --grep="^Phase: 02-03$"`, or list each commit's trailer with `git log --format='%h %s %(trailers:key=Phase,valueonly)'`. An id may hold letters, digits, dots, dashes and underscores only; anything else (a space, a newline) is rejected before anything is staged. `--phase` and `--quick` are ignored with `--amend`, which keeps the previous message.
|
|
35
|
+
|
|
17
36
|
## Amend previous commit
|
|
18
37
|
|
|
19
38
|
To fold `.planning/` file changes into the previous commit:
|
|
20
39
|
|
|
21
40
|
```bash
|
|
41
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
22
42
|
pp-tools query commit "" --files .planning/codebase/*.md --amend
|
|
23
43
|
```
|
|
24
44
|
|
|
25
45
|
## Commit Message Patterns
|
|
26
46
|
|
|
27
|
-
| Command |
|
|
28
|
-
|
|
29
|
-
| plan-phase |
|
|
30
|
-
| execute-
|
|
31
|
-
|
|
|
32
|
-
|
|
|
33
|
-
|
|
|
34
|
-
|
|
|
47
|
+
| Command | Message | Trailer |
|
|
48
|
+
|---------|---------|---------|
|
|
49
|
+
| plan-phase | `docs(planning): create phase plan` | `Phase: 03` |
|
|
50
|
+
| execute-plan | `docs(planning): complete authentication plan` | `Phase: 03-02` |
|
|
51
|
+
| execute-phase | `docs(planning): complete phase execution` | `Phase: 03` |
|
|
52
|
+
| quick | `docs(planning): record quick task — fix login typo` | `Quick: 260422-abc` |
|
|
53
|
+
| new-milestone | `docs(planning): start milestone v1.1` | — |
|
|
54
|
+
| remove-phase | `chore(planning): remove phase 17 (dashboard)` | — |
|
|
55
|
+
| insert-phase | `docs(planning): insert phase 16.1 (critical fix)` | — |
|
|
56
|
+
| add-phase | `docs(planning): add phase 07 (settings page)` | — |
|
|
35
57
|
|
|
36
58
|
## When to Skip
|
|
37
59
|
|
|
@@ -9,6 +9,7 @@ Triggered by `--gaps` flag. Creates plans to address verification or UAT failure
|
|
|
9
9
|
Use init context (from load_project_state) which provides `phase_dir`:
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
12
13
|
# Check for VERIFICATION.md (code verification gaps)
|
|
13
14
|
ls "$phase_dir"/*-VERIFICATION.md 2>/dev/null
|
|
14
15
|
|
|
@@ -7,6 +7,7 @@ Triggered when orchestrator provides `<revision_context>` with checker issues. N
|
|
|
7
7
|
### Step 1: Load Existing Plans
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
10
11
|
cat .planning/phases/$PHASE-*/$PHASE-*-PLAN.md
|
|
11
12
|
```
|
|
12
13
|
|
|
@@ -55,7 +56,8 @@ Group by plan, dimension, severity.
|
|
|
55
56
|
### Step 6: Commit
|
|
56
57
|
|
|
57
58
|
```bash
|
|
58
|
-
|
|
59
|
+
[ -z "${ZSH_VERSION:-}" ] || emulate -R sh
|
|
60
|
+
pp_run query commit "docs(planning): revise plans based on checker feedback" --phase "$PHASE" --files .planning/phases/$PHASE-*/$PHASE-*-PLAN.md
|
|
59
61
|
```
|
|
60
62
|
|
|
61
63
|
### Step 7: Return Revision Summary
|
|
@@ -40,13 +40,13 @@ Output: [Working, tested feature]
|
|
|
40
40
|
|
|
41
41
|
## Red-Green-Refactor Cycle
|
|
42
42
|
|
|
43
|
-
**RED:** Create test file → write test describing expected behavior → run test (MUST fail) → commit: `test({
|
|
43
|
+
**RED:** Create test file → write test describing expected behavior → run test (MUST fail) → commit: `test({area}): add failing test for [feature]`
|
|
44
44
|
|
|
45
|
-
**GREEN:** Write minimal code to pass → run test (MUST pass) → commit: `feat({
|
|
45
|
+
**GREEN:** Write minimal code to pass → run test (MUST pass) → commit: `feat({area}): implement [feature]`
|
|
46
46
|
|
|
47
|
-
**REFACTOR (if needed):** Clean up → run tests (MUST pass) → commit: `refactor({
|
|
47
|
+
**REFACTOR (if needed):** Clean up → run tests (MUST pass) → commit: `refactor({area}): clean up [feature]`
|
|
48
48
|
|
|
49
|
-
Each TDD plan produces 2-3 atomic commits.
|
|
49
|
+
`{area}` names the part of the codebase under test (`auth`, `billing`); each commit ends with the trailer `Phase: {phase}-{plan}`. Each TDD plan produces 2-3 atomic commits.
|
|
50
50
|
|
|
51
51
|
## Context Budget for TDD
|
|
52
52
|
|