@pareto4/pp-core 1.13.0 → 1.18.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 +3 -3
- package/README.md +31 -12
- package/agents/pp-code-fixer.md +0 -11
- package/agents/pp-code-reviewer.md +1 -77
- package/agents/pp-debug-session-manager.md +9 -6
- package/agents/pp-executor.md +12 -29
- package/agents/pp-plan-checker.md +4 -4
- package/agents/pp-planner.md +34 -20
- package/agents/pp-vault-reviewer.md +100 -23
- package/agents/pp-verifier.md +1 -3
- package/bin/install.js +10 -3
- package/commands/pp-execute-phase.md +1 -3
- package/commands/pp-ns-manage.md +1 -1
- package/commands/pp-ns-review.md +1 -1
- package/commands/pp-plan-phase.md +1 -2
- package/commands/pp-vault-promote.md +7 -8
- package/commands/pp-vault-review.md +6 -5
- package/commands/pp-verify-work.md +1 -2
- package/gemini-extension.json +1 -1
- package/hooks/dist/pp-check-update.js +0 -0
- package/hooks/dist/pp-cursor-session-start.js +1 -1
- package/hooks/dist/pp-statusline.js +1 -1
- package/hooks/dist/pp-update-banner.js +0 -0
- package/hooks/pp-check-update.js +0 -0
- package/hooks/pp-cursor-session-start.js +1 -1
- package/hooks/pp-statusline.js +1 -1
- package/hooks/pp-update-banner.js +0 -0
- package/package.json +10 -18
- package/pareto-skills/_shared/create-project-board.sh +0 -0
- package/pareto-skills/pp-project-setup/SKILL.md +1 -1
- package/pp-core/bin/check-latest-version.cjs +0 -0
- package/pp-core/bin/detect-build-commands.sh +2 -2
- package/pp-core/bin/lib/capability-activation.cjs +83 -9
- package/pp-core/bin/lib/capability-registry.cjs +201 -229
- package/pp-core/bin/lib/capability-state.cjs +93 -1
- package/pp-core/bin/lib/capability-writer.cjs +3 -3
- package/pp-core/bin/lib/check-command-router.cjs +1906 -1514
- package/pp-core/bin/lib/clusters.cjs +3 -0
- package/pp-core/bin/lib/command-aliases.cjs +0 -35
- package/pp-core/bin/lib/commands.cjs +9 -4
- package/pp-core/bin/lib/compose-bindings.cjs +251 -88
- package/pp-core/bin/lib/config-loader.cjs +7 -103
- package/pp-core/bin/lib/config-schema.cjs +1 -1
- package/pp-core/bin/lib/config.cjs +151 -62
- package/pp-core/bin/lib/decisions.cjs +4 -4
- package/pp-core/bin/lib/discovery-vault-check.cjs +246 -0
- package/pp-core/bin/lib/frontmatter.cjs +1 -38
- package/pp-core/bin/lib/git-base-branch.cjs +11 -12
- package/pp-core/bin/lib/git-provider.cjs +9 -10
- package/pp-core/bin/lib/init-command-router.cjs +5 -8
- package/pp-core/bin/lib/init-contract.cjs +620 -738
- package/pp-core/bin/lib/init-interactive.cjs +62 -4
- package/pp-core/bin/lib/init.cjs +24 -51
- package/pp-core/bin/lib/install-profiles.cjs +1 -1
- package/pp-core/bin/lib/io.cjs +4 -2
- package/pp-core/bin/lib/loop-resolver.cjs +165 -129
- package/pp-core/bin/lib/org-profile.cjs +402 -161
- package/pp-core/bin/lib/package-identity.cjs +3 -3
- package/pp-core/bin/lib/phase-command-router.cjs +1 -29
- package/pp-core/bin/lib/phase-scope.cjs +1 -1
- package/pp-core/bin/lib/phase.cjs +11 -253
- package/pp-core/bin/lib/platform-bindings.cjs +40 -19
- package/pp-core/bin/lib/profile-output.cjs +1 -1
- package/pp-core/bin/lib/shell-command-projection.cjs +104 -1
- package/pp-core/bin/lib/state.cjs +11 -85
- package/pp-core/bin/lib/template.cjs +1 -1
- package/pp-core/bin/lib/vault-command-router.cjs +1682 -477
- package/pp-core/bin/lib/vault-coordinates.cjs +16 -7
- package/pp-core/bin/lib/vault-index.cjs +656 -0
- package/pp-core/bin/lib/vault-seal.cjs +1851 -0
- 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 +1504 -0
- package/pp-core/bin/lib/vault-trace.cjs +155 -2778
- package/pp-core/bin/lib/vault-update.cjs +10 -59
- package/pp-core/bin/lib/vault.cjs +2570 -950
- package/pp-core/bin/lib/verify.cjs +0 -11
- package/pp-core/bin/portable-timeout.sh +1 -1
- package/pp-core/bin/pp-tools.cjs +157 -54
- package/pp-core/bin/shared/config-defaults.manifest.json +0 -7
- package/pp-core/bin/shared/config-schema.manifest.json +0 -3
- package/pp-core/bin/shared/model-catalog.json +2 -2
- package/pp-core/bin/verify-reapply-patches.cjs +0 -0
- package/pp-core/org-profile.json +26 -0
- package/pp-core/references/autonomous-best-effort.md +8 -7
- package/pp-core/references/loop-hook-dispatch.md +0 -25
- package/pp-core/references/planner-gap-closure.md +0 -1
- package/pp-core/references/planner-tdd.md +0 -1
- package/pp-core/references/planner-vault-standards.md +311 -0
- package/pp-core/references/planning-config.md +0 -8
- package/pp-core/references/tdd.md +0 -1
- package/pp-core/templates/README.md +1 -0
- package/pp-core/templates/VAULT-REVIEW.md +56 -0
- package/pp-core/templates/phase-prompt.md +2 -6
- package/pp-core/workflows/_runtime-launcher.snippet.sh +0 -0
- package/pp-core/workflows/add-tests.md +55 -4
- package/pp-core/workflows/audit-fix.md +63 -2
- package/pp-core/workflows/audit-milestone.md +1 -1
- package/pp-core/workflows/autonomous.md +85 -11
- package/pp-core/workflows/check-todos.md +13 -2
- package/pp-core/workflows/code-review-fix.md +59 -3
- package/pp-core/workflows/code-review.md +10 -57
- package/pp-core/workflows/complete-milestone.md +1 -1
- package/pp-core/workflows/debug.md +54 -4
- package/pp-core/workflows/discovery-sprint/prefill.md +19 -7
- package/pp-core/workflows/discovery-sprint/prototype.md +46 -49
- package/pp-core/workflows/discovery-sprint/session-13-gates.md +2 -0
- package/pp-core/workflows/discovery-sprint/sessions/01-kick-off.md +1 -3
- package/pp-core/workflows/discovery-sprint/sessions/02-as-is.md +1 -3
- package/pp-core/workflows/discovery-sprint/sessions/03-to-be.md +1 -3
- package/pp-core/workflows/discovery-sprint/sessions/04-ux-design.md +20 -24
- package/pp-core/workflows/discovery-sprint/sessions/05-architecture.md +1 -3
- package/pp-core/workflows/discovery-sprint/sessions/06-security.md +1 -3
- package/pp-core/workflows/discovery-sprint/sessions/07-identity.md +1 -3
- package/pp-core/workflows/discovery-sprint/sessions/08-integration.md +1 -3
- package/pp-core/workflows/discovery-sprint/sessions/09-qa.md +1 -3
- package/pp-core/workflows/discovery-sprint/sessions/10-infrastructure.md +1 -6
- package/pp-core/workflows/discovery-sprint/sessions/11-roadmap.md +1 -3
- package/pp-core/workflows/discovery-sprint/sessions/12-delivery-model.md +1 -3
- package/pp-core/workflows/discovery-sprint/sessions/13-wrap-up.md +1 -3
- package/pp-core/workflows/discovery-sprint/templates/context-template.md +1 -1
- package/pp-core/workflows/discovery-sprint/vault-context.md +207 -0
- package/pp-core/workflows/discovery-sprint.md +7 -3
- package/pp-core/workflows/discovery-to-build/steps/architecture-deliverables.md +4 -4
- package/pp-core/workflows/discovery-to-build/templates/pp-handoff.md +43 -1
- package/pp-core/workflows/discovery-to-build.md +10 -2
- package/pp-core/workflows/discuss-phase.md +3 -10
- package/pp-core/workflows/execute-phase/steps/check-query-gate.md +327 -0
- package/pp-core/workflows/execute-phase/steps/client-context-gate.md +3 -2
- package/pp-core/workflows/execute-phase/steps/cross-ai-delegation.md +1 -1
- package/pp-core/workflows/execute-phase/steps/execute-pre-dispatch.md +78 -0
- package/pp-core/workflows/execute-phase/steps/per-plan-worktree-gate.md +94 -0
- package/pp-core/workflows/execute-phase/steps/post-merge-gate.md +6 -8
- package/pp-core/workflows/execute-phase/steps/vault-fetch.md +115 -14
- package/pp-core/workflows/execute-phase/steps/vault-load-gate.md +219 -20
- package/pp-core/workflows/execute-phase/steps/verify-post-gate.md +147 -0
- package/pp-core/workflows/execute-phase.md +152 -128
- package/pp-core/workflows/execute-plan.md +54 -6
- package/pp-core/workflows/fast.md +53 -4
- package/pp-core/workflows/help/modes/full.md +3 -3
- package/pp-core/workflows/init/steps/client-context-capture.md +101 -0
- package/pp-core/workflows/init/steps/gitlab-provisioning.md +130 -0
- package/pp-core/workflows/init/steps/project-md-deferral-narration.md +66 -0
- package/pp-core/workflows/init/steps/reachability-outcome.md +70 -0
- package/pp-core/workflows/init.md +232 -272
- package/pp-core/workflows/new-project.md +31 -23
- package/pp-core/workflows/plan-phase.md +98 -45
- package/pp-core/workflows/quick.md +117 -3
- package/pp-core/workflows/secure-phase.md +1 -1
- package/pp-core/workflows/ship.md +57 -28
- package/pp-core/workflows/undo.md +1 -1
- package/pp-core/workflows/update.md +3 -3
- package/pp-core/workflows/validate-phase.md +58 -3
- package/pp-core/workflows/vault-review.md +161 -23
- package/pp-core/workflows/vault-write-back.md +73 -110
- package/pp-core/workflows/verify-work.md +12 -14
- package/scripts/changeset/cli.cjs +6 -5
- package/scripts/changeset/lint.cjs +0 -0
- package/scripts/changeset/new.cjs +33 -50
- package/scripts/dev-env.cjs +25 -85
- package/scripts/gen-capability-registry.cjs +120 -13
- package/scripts/lib/allowlist-ratchet.cjs +1 -103
- package/scripts/lint-allow-test-rule-refs.allowlist.json +0 -2
- package/scripts/lint-docs-required.cjs +0 -0
- package/scripts/lint-pr-check-project-dir.cjs +1 -3
- package/scripts/lint-test-file-count.allowlist.json +3 -19
- package/scripts/lint-test-file-count.cjs +5 -6
- package/scripts/prompt-injection-scan.sh +19 -17
- package/scripts/release-channel.cjs +0 -0
- package/scripts/sync-manifest-versions.cjs +5 -4
- package/scripts/sync-rulesets.sh +1 -1
- package/scripts/update-size-baseline.cjs +30 -274
- package/scripts/verify-opengsd-sweep.cjs +3 -5
- package/scripts/workflow-size.cjs +9 -61
- package/pp-core/bin/lib/dispatch-plan.cjs +0 -483
- package/pp-core/bin/lib/install-run.cjs +0 -536
- package/pp-core/bin/lib/loop-gates.cjs +0 -213
- package/pp-core/bin/lib/phase-manifest.cjs +0 -527
- package/pp-core/bin/lib/phase-tier.cjs +0 -480
- package/pp-core/bin/lib/plan-graph.cjs +0 -368
- package/pp-core/bin/lib/practices-review-check.cjs +0 -938
- package/pp-core/bin/lib/vault-audit.cjs +0 -2070
- package/pp-core/bin/lib/vault-practices.cjs +0 -1990
- package/pp-core/bin/lib/vault-review.cjs +0 -2359
- package/pp-core/bin/lib/vault-write-back.cjs +0 -877
- package/pp-core/references/executor-vault-trace.md +0 -47
- package/pp-core/references/planner-plan-graph.md +0 -66
- package/pp-core/references/planner-vault-practices.md +0 -112
- package/pp-core/templates/practices/README.md +0 -251
- 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/discovery-sprint/vault-fetch.md +0 -37
- package/pp-core/workflows/execute-phase/steps/checkpoint-handling.md +0 -45
- package/pp-core/workflows/execute-phase/steps/install-run.md +0 -29
- package/pp-core/workflows/execute-phase/steps/phase-close-rebaseline.md +0 -23
- package/pp-core/workflows/execute-phase/steps/serial-group-dispatch.md +0 -73
- package/pp-core/workflows/execute-phase/steps/vault-door-gate.md +0 -19
- package/pp-core/workflows/plan-phase/steps/phase-tier.md +0 -43
- package/scripts/lib/size-budget.cjs +0 -311
- package/scripts/lint-neutrality-names.cjs +0 -694
- package/scripts/lint-org-coordinates.allowlist.json +0 -35
- package/scripts/lint-org-coordinates.cjs +0 -426
|
@@ -62,6 +62,86 @@ function _isSafePropKey(key) {
|
|
|
62
62
|
return false;
|
|
63
63
|
return true;
|
|
64
64
|
}
|
|
65
|
+
// ─── Seal gates over recorded artifacts (Phase 16 D-18 / D-19 / D-26) ──────────
|
|
66
|
+
/**
|
|
67
|
+
* The per-hook seal field's name (Phase 16 D-19). One statement of it: the
|
|
68
|
+
* resolver reads the hook field under this name and the registry generator
|
|
69
|
+
* validates the same name, so the two cannot name different fields.
|
|
70
|
+
*/
|
|
71
|
+
const SEAL_FIELD = 'onRecordedArtifacts';
|
|
72
|
+
/**
|
|
73
|
+
* How the resolver treats one GATE, given its seal field, its capability's
|
|
74
|
+
* state and the injected recorded-artifacts predicate. THE ONE statement of
|
|
75
|
+
* the seal rule (Phase 16 D-19), owned here because loop-resolver requires
|
|
76
|
+
* this module, never the reverse.
|
|
77
|
+
*
|
|
78
|
+
* Why a field and not a widened `when` (D-18, measured): the resolver drops a
|
|
79
|
+
* hook whose capability is not `active` BEFORE `when` is read, and `active`
|
|
80
|
+
* ANDs the capability's `activationKey`. With `vault.enabled` false no vault
|
|
81
|
+
* hook can render, whatever its `when` says. So a seal gate bypasses the active check and the `when`,
|
|
82
|
+
* under this closed rule only:
|
|
83
|
+
*
|
|
84
|
+
* - no seal field (anything but literal `true`) → `'normal'` when the
|
|
85
|
+
* capability is active, else `'drop'`. That is the resolver's behaviour
|
|
86
|
+
* before Phase 16, exactly; `when` is then evaluated as before.
|
|
87
|
+
* - a seal gate whose capability is active → `'drop'`: the normal gates
|
|
88
|
+
* cover it, so a check is never dispatched twice.
|
|
89
|
+
* - a seal gate whose capability is not `enabled` (not installed or not
|
|
90
|
+
* surfaced), or has no state at all → `'drop'` (fail closed).
|
|
91
|
+
* - otherwise (enabled, config-inactive) → `'seal'` iff the predicate
|
|
92
|
+
* answers literal `true`, else `'drop'`. The predicate is called on this
|
|
93
|
+
* arm ONLY, so no other hook pays its planning-tree read.
|
|
94
|
+
*
|
|
95
|
+
* Pure apart from the injected thunk.
|
|
96
|
+
*/
|
|
97
|
+
function sealRenderVerdict(sealField, state, recordedArtifacts) {
|
|
98
|
+
const active = state !== undefined && state !== null && state.active === true;
|
|
99
|
+
if (sealField !== true)
|
|
100
|
+
return active ? 'normal' : 'drop';
|
|
101
|
+
if (active)
|
|
102
|
+
return 'drop';
|
|
103
|
+
if (state === undefined || state === null || state.enabled !== true)
|
|
104
|
+
return 'drop';
|
|
105
|
+
return recordedArtifacts() === true ? 'seal' : 'drop';
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Call an injected `resolveRecordedArtifacts` (pp-tools builds it on the seal
|
|
109
|
+
* leaf's `hasRecordedVaultArtifacts`) and normalise its answer to a boolean:
|
|
110
|
+
* literal `true` is `true`; a missing resolver, a throw or any other answer
|
|
111
|
+
* (`'true'`, `1`, `undefined`) is `false`, the inert value under which no seal
|
|
112
|
+
* renders (Phase 16 D-19). The leaf itself answers `true` when it cannot prove
|
|
113
|
+
* absence (D-44); this normaliser only refuses answers that are not a boolean.
|
|
114
|
+
*/
|
|
115
|
+
function resolveInjectedRecordedArtifacts(resolveRecordedArtifacts) {
|
|
116
|
+
try {
|
|
117
|
+
if (typeof resolveRecordedArtifacts !== 'function')
|
|
118
|
+
return false;
|
|
119
|
+
return resolveRecordedArtifacts() === true;
|
|
120
|
+
}
|
|
121
|
+
catch {
|
|
122
|
+
return false;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Quick 261015-ect (QD-13): call an injected `resolvePlatformBindingsPresent`
|
|
127
|
+
* (pp-tools builds it on the vault leaf's `hasPlatformBindings`) and normalise
|
|
128
|
+
* its answer: literal `false` is `false` (measured absent), literal `true` is
|
|
129
|
+
* `true`; a missing resolver, a throw or any other answer is `null`, "could not
|
|
130
|
+
* measure". The resolver drops a bindings-requiring capability's hooks only on
|
|
131
|
+
* `false`: a filter that cannot measure must never silence a gate on a governed
|
|
132
|
+
* project, so the unmeasured answer renders as before.
|
|
133
|
+
*/
|
|
134
|
+
function resolveInjectedPlatformBindingsPresent(resolvePlatformBindingsPresent) {
|
|
135
|
+
try {
|
|
136
|
+
if (typeof resolvePlatformBindingsPresent !== 'function')
|
|
137
|
+
return null;
|
|
138
|
+
const answer = resolvePlatformBindingsPresent();
|
|
139
|
+
return answer === true || answer === false ? answer : null;
|
|
140
|
+
}
|
|
141
|
+
catch {
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
65
145
|
// ─── Pure resolver ─────────────────────────────────────────────────────────────
|
|
66
146
|
/**
|
|
67
147
|
* Deterministic resolver: for each capability in the registry, produce the
|
|
@@ -222,7 +302,12 @@ function resolveCapabilityState(input) {
|
|
|
222
302
|
// used here so that a config-disabled capability (active=false) cannot
|
|
223
303
|
// produce active hooks even when the hook's own `when` is unconditional
|
|
224
304
|
// (configured=true). The capability gate cascades to all its hooks.
|
|
225
|
-
|
|
305
|
+
// A seal gate (`SEAL_FIELD`, Phase 16 D-19) never renders for an ACTIVE
|
|
306
|
+
// capability — `sealRenderVerdict` drops it, because the normal gates
|
|
307
|
+
// cover it — so it is reported inactive here, keeping this report in
|
|
308
|
+
// agreement with what `loop render-hooks` renders.
|
|
309
|
+
const seal = kind === 'gate' && h[SEAL_FIELD] === true;
|
|
310
|
+
hooks.push({ point, kind, when: whenRaw, configured, active: active && configured && !seal });
|
|
226
311
|
}
|
|
227
312
|
}
|
|
228
313
|
const stepsRaw = capObj['steps'];
|
|
@@ -533,6 +618,13 @@ module.exports = {
|
|
|
533
618
|
resolveCapabilityRuntimeState,
|
|
534
619
|
isCapabilityActive,
|
|
535
620
|
cmdCapabilityState,
|
|
621
|
+
// Phase 16 D-19: the one seal rule, its injected-predicate normaliser and the
|
|
622
|
+
// field name the resolver and the registry generator both read.
|
|
623
|
+
SEAL_FIELD,
|
|
624
|
+
sealRenderVerdict,
|
|
625
|
+
resolveInjectedRecordedArtifacts,
|
|
626
|
+
// Quick 261015-ect (QD-13): the bindings measurement's normaliser.
|
|
627
|
+
resolveInjectedPlatformBindingsPresent,
|
|
536
628
|
// Exported for tests
|
|
537
629
|
_resolveCommandsGsdDir,
|
|
538
630
|
_loadInstalledSkillsManifest,
|
|
@@ -313,9 +313,9 @@ function cmdCapabilitySet(cwd, runtimeConfigDir, capId, options, raw) {
|
|
|
313
313
|
...(options.gates ? { gates: options.gates } : {}),
|
|
314
314
|
},
|
|
315
315
|
];
|
|
316
|
-
const opts =
|
|
317
|
-
? { materialize: { runtime: options.runtime, scope: options.scope ?? 'global' } }
|
|
318
|
-
|
|
316
|
+
const opts = {
|
|
317
|
+
...(options.runtime ? { materialize: { runtime: options.runtime, scope: options.scope ?? 'global' } } : {}),
|
|
318
|
+
};
|
|
319
319
|
const result = setCapabilityState(cwd, runtimeConfigDir, desired, opts);
|
|
320
320
|
if (raw) {
|
|
321
321
|
// Raw mode: emit JSON to stdout including errors; exit non-zero if errors present.
|