@pareto4/pp-core 1.9.0 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/agents/pp-code-fixer.md +11 -0
- package/agents/pp-code-reviewer.md +77 -1
- package/agents/pp-executor.md +34 -1
- package/agents/pp-planner.md +24 -103
- package/commands/pp-ns-manage.md +2 -1
- package/commands/pp-vault-promote.md +31 -0
- package/gemini-extension.json +1 -1
- package/package.json +5 -3
- package/pareto-skills/pp-brand/SKILL.md +1 -1
- package/pp-core/bin/lib/capability-registry.cjs +160 -3
- package/pp-core/bin/lib/capability-state.cjs +41 -3
- package/pp-core/bin/lib/check-command-router.cjs +473 -3
- package/pp-core/bin/lib/clusters.cjs +3 -0
- package/pp-core/bin/lib/compose-bindings.cjs +736 -0
- package/pp-core/bin/lib/git-provider.cjs +279 -0
- package/pp-core/bin/lib/init-contract.cjs +989 -0
- package/pp-core/bin/lib/init-interactive.cjs +183 -0
- package/pp-core/bin/lib/io.cjs +9 -0
- package/pp-core/bin/lib/org-profile.cjs +696 -0
- package/pp-core/bin/lib/platform-bindings.cjs +268 -64
- package/pp-core/bin/lib/practices-review-check.cjs +938 -0
- package/pp-core/bin/lib/vault-command-router.cjs +239 -2
- package/pp-core/bin/lib/vault-coordinates.cjs +485 -0
- package/pp-core/bin/lib/vault-practices.cjs +982 -0
- package/pp-core/bin/lib/vault-write-back.cjs +842 -0
- package/pp-core/bin/lib/vault.cjs +170 -51
- package/pp-core/bin/pp-tools.cjs +225 -2
- package/pp-core/references/planner-checkpoints.md +72 -0
- package/pp-core/references/planner-tdd.md +55 -0
- package/pp-core/references/planner-vault-practices.md +67 -0
- package/pp-core/templates/practices/README.md +122 -0
- package/pp-core/templates/practices/error-handling.md +18 -0
- package/pp-core/templates/practices/minimal-comments.md +14 -0
- package/pp-core/templates/practices/naming-convention.md +18 -0
- package/pp-core/templates/practices/practice-template.md +23 -0
- package/pp-core/workflows/code-review.md +74 -18
- package/pp-core/workflows/discovery-sprint.md +1 -1
- package/pp-core/workflows/discovery-to-build/steps/architecture-deliverables.md +1 -1
- package/pp-core/workflows/init.md +137 -76
- package/pp-core/workflows/ship.md +1 -0
- package/pp-core/workflows/vault-write-back.md +213 -0
- package/scripts/gen-capability-registry.cjs +68 -8
- package/scripts/gen-platform-bindings-schema.cjs +148 -0
- package/scripts/lint-allow-test-rule-refs.allowlist.json +8 -1
- package/scripts/lint-descriptions.cjs +3 -1
- package/scripts/lint-legacy-dir-name.cjs +5 -0
- package/scripts/lint-test-file-count.allowlist.json +10 -1
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Generates schemas/platform-bindings.schema.json's three GENERATED values
|
|
6
|
+
* from src/platform-bindings.cts's exported constants (via the COMPILED
|
|
7
|
+
* pp-core/bin/lib/platform-bindings.cjs). Commit the result; CI re-runs the
|
|
8
|
+
* script's --check arm and fails on drift.
|
|
9
|
+
*
|
|
10
|
+
* This script owns EXACTLY three values in the schema — the JSON pointers
|
|
11
|
+
* `properties.platform.properties.repo.pattern`,
|
|
12
|
+
* `properties.client.properties.vaultRepo.pattern`, and (34-02)
|
|
13
|
+
* `properties.schemaVersion.default`. Every other field in
|
|
14
|
+
* schemas/platform-bindings.schema.json is hand-authored and must be edited
|
|
15
|
+
* by hand. `--write` additionally normalizes the whole file's JSON
|
|
16
|
+
* formatting (two-space indent, single trailing newline).
|
|
17
|
+
*
|
|
18
|
+
* BUILD ORDER: this script requires the COMPILED
|
|
19
|
+
* pp-core/bin/lib/platform-bindings.cjs, so it must run AFTER `build:lib` in
|
|
20
|
+
* the `build` npm script chain — running it before the TypeScript build
|
|
21
|
+
* would throw a missing-module error.
|
|
22
|
+
*
|
|
23
|
+
* Usage:
|
|
24
|
+
* node scripts/gen-platform-bindings-schema.cjs # print to stdout
|
|
25
|
+
* node scripts/gen-platform-bindings-schema.cjs --write # write the schema
|
|
26
|
+
* node scripts/gen-platform-bindings-schema.cjs --check # exit 1 if committed schema is stale
|
|
27
|
+
* node scripts/gen-platform-bindings-schema.cjs --schema <path> # override the target file
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
const fs = require('node:fs');
|
|
31
|
+
const path = require('node:path');
|
|
32
|
+
|
|
33
|
+
const { ExitError, runMain } = require('./lib/cli-exit.cjs');
|
|
34
|
+
|
|
35
|
+
const ROOT = path.resolve(__dirname, '..');
|
|
36
|
+
const DEFAULT_SCHEMA_PATH = path.join(ROOT, 'schemas', 'platform-bindings.schema.json');
|
|
37
|
+
|
|
38
|
+
const PLATFORM_REPO_POINTER = 'properties.platform.properties.repo.pattern';
|
|
39
|
+
const VAULT_REPO_POINTER = 'properties.client.properties.vaultRepo.pattern';
|
|
40
|
+
// 34-02: carries CONTRACT_SCHEMA_VERSION into the schema as `default`, never
|
|
41
|
+
// `const`/`enum` — JSON Schema treats `default` as annotation-only, so this
|
|
42
|
+
// documents the current contract without constraining validation. Using
|
|
43
|
+
// `const`/`enum` here would reject every existing `1.0.0` binding and break
|
|
44
|
+
// Phase 32 D-08.
|
|
45
|
+
const CONTRACT_VERSION_POINTER = 'properties.schemaVersion.default';
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Two-space-indented JSON with a single trailing newline — the format the
|
|
49
|
+
* committed schema file already uses.
|
|
50
|
+
*/
|
|
51
|
+
function serialize(obj) {
|
|
52
|
+
return JSON.stringify(obj, null, 2) + '\n';
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Build the regenerated schema object: read and parse `schemaPath`, then
|
|
57
|
+
* assign the two owned pattern values from the compiled library. Throws an
|
|
58
|
+
* ExitError if either exported pattern source is missing or empty — a
|
|
59
|
+
* silently-empty pattern written into the schema would accept everything.
|
|
60
|
+
*/
|
|
61
|
+
function buildSchema(schemaPath) {
|
|
62
|
+
const lib = require(path.join(ROOT, 'pp-core', 'bin', 'lib', 'platform-bindings.cjs'));
|
|
63
|
+
const { PLATFORM_REPO_PATTERN_SOURCE, VAULT_REPO_PATTERN_SOURCE, CONTRACT_SCHEMA_VERSION } = lib;
|
|
64
|
+
|
|
65
|
+
if (typeof PLATFORM_REPO_PATTERN_SOURCE !== 'string' || PLATFORM_REPO_PATTERN_SOURCE.length === 0) {
|
|
66
|
+
throw new ExitError(
|
|
67
|
+
1,
|
|
68
|
+
'pp-core/bin/lib/platform-bindings.cjs does not export a non-empty PLATFORM_REPO_PATTERN_SOURCE — ' +
|
|
69
|
+
'run `npm run build:lib` first.',
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
if (typeof VAULT_REPO_PATTERN_SOURCE !== 'string' || VAULT_REPO_PATTERN_SOURCE.length === 0) {
|
|
73
|
+
throw new ExitError(
|
|
74
|
+
1,
|
|
75
|
+
'pp-core/bin/lib/platform-bindings.cjs does not export a non-empty VAULT_REPO_PATTERN_SOURCE — ' +
|
|
76
|
+
'run `npm run build:lib` first.',
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
if (typeof CONTRACT_SCHEMA_VERSION !== 'string' || !/^\d+\.\d+\.\d+$/.test(CONTRACT_SCHEMA_VERSION)) {
|
|
80
|
+
throw new ExitError(
|
|
81
|
+
1,
|
|
82
|
+
'pp-core/bin/lib/platform-bindings.cjs does not export a semver-triplet CONTRACT_SCHEMA_VERSION — ' +
|
|
83
|
+
'run `npm run build:lib` first.',
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const schema = JSON.parse(fs.readFileSync(schemaPath, 'utf8'));
|
|
88
|
+
schema.properties.platform.properties.repo.pattern = PLATFORM_REPO_PATTERN_SOURCE;
|
|
89
|
+
schema.properties.client.properties.vaultRepo.pattern = VAULT_REPO_PATTERN_SOURCE;
|
|
90
|
+
schema.properties.schemaVersion.default = CONTRACT_SCHEMA_VERSION;
|
|
91
|
+
return schema;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function parseSchemaPathArg(argv) {
|
|
95
|
+
const idx = argv.indexOf('--schema');
|
|
96
|
+
if (idx === -1) return DEFAULT_SCHEMA_PATH;
|
|
97
|
+
const value = argv[idx + 1];
|
|
98
|
+
if (!value) {
|
|
99
|
+
throw new ExitError(1, '--schema requires a path argument');
|
|
100
|
+
}
|
|
101
|
+
return path.resolve(value);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function main() {
|
|
105
|
+
const argv = process.argv.slice(2);
|
|
106
|
+
const schemaPath = parseSchemaPathArg(argv);
|
|
107
|
+
|
|
108
|
+
if (argv.includes('--check')) {
|
|
109
|
+
const committed = fs.readFileSync(schemaPath, 'utf8');
|
|
110
|
+
const live = serialize(buildSchema(schemaPath));
|
|
111
|
+
if (committed !== live) {
|
|
112
|
+
const committedObj = JSON.parse(committed);
|
|
113
|
+
const liveObj = JSON.parse(live);
|
|
114
|
+
process.stderr.write(
|
|
115
|
+
schemaPath + ' is stale. The generator owns exactly three values:\n' +
|
|
116
|
+
' ' + PLATFORM_REPO_POINTER + '\n' +
|
|
117
|
+
' ' + VAULT_REPO_POINTER + '\n' +
|
|
118
|
+
' ' + CONTRACT_VERSION_POINTER + '\n\n' +
|
|
119
|
+
' ' + PLATFORM_REPO_POINTER + '\n' +
|
|
120
|
+
' committed: ' + JSON.stringify(committedObj.properties.platform.properties.repo.pattern) + '\n' +
|
|
121
|
+
' live: ' + JSON.stringify(liveObj.properties.platform.properties.repo.pattern) + '\n' +
|
|
122
|
+
' ' + VAULT_REPO_POINTER + '\n' +
|
|
123
|
+
' committed: ' + JSON.stringify(committedObj.properties.client.properties.vaultRepo.pattern) + '\n' +
|
|
124
|
+
' live: ' + JSON.stringify(liveObj.properties.client.properties.vaultRepo.pattern) + '\n' +
|
|
125
|
+
' ' + CONTRACT_VERSION_POINTER + '\n' +
|
|
126
|
+
' committed: ' + JSON.stringify(committedObj.properties.schemaVersion.default) + '\n' +
|
|
127
|
+
' live: ' + JSON.stringify(liveObj.properties.schemaVersion.default) + '\n\n' +
|
|
128
|
+
'Run:\n' +
|
|
129
|
+
' node scripts/gen-platform-bindings-schema.cjs --write' +
|
|
130
|
+
(schemaPath === DEFAULT_SCHEMA_PATH ? '' : ' --schema ' + schemaPath) +
|
|
131
|
+
'\n',
|
|
132
|
+
);
|
|
133
|
+
throw new ExitError(1);
|
|
134
|
+
}
|
|
135
|
+
process.stdout.write(schemaPath + ' is up to date.\n');
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
if (argv.includes('--write')) {
|
|
140
|
+
fs.writeFileSync(schemaPath, serialize(buildSchema(schemaPath)));
|
|
141
|
+
process.stdout.write('Wrote ' + schemaPath + '\n');
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
process.stdout.write(serialize(buildSchema(schemaPath)));
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
runMain(main);
|
|
@@ -326,5 +326,12 @@
|
|
|
326
326
|
"tests/workflow-size-budget.test.cjs :: source-text-is-the-product",
|
|
327
327
|
"tests/workspace.test.cjs :: source-text-is-the-product",
|
|
328
328
|
"tests/worktree-cleanup.test.cjs :: source-text-is-the-product",
|
|
329
|
-
"tests/worktree.test.cjs :: source-text-is-the-product"
|
|
329
|
+
"tests/worktree.test.cjs :: source-text-is-the-product",
|
|
330
|
+
"tests/comp-01-provider-off-by-default.test.cjs :: validates runtime CLI stdout/stderr/on-disk-config behavior, not source grep",
|
|
331
|
+
"tests/discovery-annotations.test.cjs :: source-text-is-the-product",
|
|
332
|
+
"tests/discovery-architecture-deliverables.test.cjs :: source-text-is-the-product",
|
|
333
|
+
"tests/discovery-to-build-canonical-refs.test.cjs :: source-text-is-the-product",
|
|
334
|
+
"tests/discovery-to-build-fixture.test.cjs :: source-text-is-the-product",
|
|
335
|
+
"tests/discovery-to-build-path-contract.test.cjs :: source-text-is-the-product",
|
|
336
|
+
"tests/release-smoke-discuss-plan-execute.install.test.cjs :: integration-test-input"
|
|
330
337
|
]
|
|
@@ -18,7 +18,9 @@ const path = require('path');
|
|
|
18
18
|
const { ExitError, runMain } = require('./lib/cli-exit.cjs');
|
|
19
19
|
|
|
20
20
|
const MAX_LENGTH = 100;
|
|
21
|
-
|
|
21
|
+
// D-12 flat-hyphen rename (05-04): command files live flat at commands/pp-<cmd>.md,
|
|
22
|
+
// no longer under a legacy nested subdirectory (mirrors lint-command-contract.cjs's COMMANDS_DIR).
|
|
23
|
+
const COMMANDS_DIR = path.join(__dirname, '..', 'commands');
|
|
22
24
|
|
|
23
25
|
/**
|
|
24
26
|
* Parse the description field from frontmatter in a .md file.
|
|
@@ -53,6 +53,11 @@ const ALLOWLIST_FILES = new Set([
|
|
|
53
53
|
'README.ko-KR.md',
|
|
54
54
|
'README.pt-BR.md',
|
|
55
55
|
'README.zh-CN.md',
|
|
56
|
+
// Generated snapshot of every grandfathered legacy-token reference in the tree,
|
|
57
|
+
// so it quotes those lines by construction — including this file's own comment
|
|
58
|
+
// above. Scanning it here is circular: the baseline cannot carry per-line allow
|
|
59
|
+
// markers without breaking its byte-for-byte match against the real sources.
|
|
60
|
+
'tests/rename-guard-baseline.json',
|
|
56
61
|
]);
|
|
57
62
|
|
|
58
63
|
const ALLOWLIST_DIR_PREFIXES = [
|
|
@@ -179,12 +179,21 @@
|
|
|
179
179
|
},
|
|
180
180
|
"vault": {
|
|
181
181
|
"files": [
|
|
182
|
+
"vault-practices.property.test.cjs",
|
|
182
183
|
"vault-read-path.test.cjs",
|
|
183
184
|
"vault-security.test.cjs",
|
|
184
185
|
"vault-status-check.test.cjs",
|
|
185
186
|
"vault.test.cjs"
|
|
186
187
|
],
|
|
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)"
|
|
188
|
+
"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). Phase 24-02 added vault-practices.property.test.cjs (fast-check fuzz of the practices glob-fallback compiler + a practices-frontmatter round-trip, PRAC-02) — it is grouped under this bucket rather than \"vault-practices\" because the test-file-count lint's hyphen-prefix matcher treats \"vault-practices.property\" (period before \"property\") as starting with \"vault-\" before it can match the more specific \"vault-practices-\" prefix; the module it actually tests is pp-core/bin/lib/vault-practices.cjs, not vault.cjs."
|
|
189
|
+
},
|
|
190
|
+
"vault-practices": {
|
|
191
|
+
"files": [
|
|
192
|
+
"vault-practices-examples.test.cjs",
|
|
193
|
+
"vault-practices-matcher.test.cjs",
|
|
194
|
+
"vault-practices.test.cjs"
|
|
195
|
+
],
|
|
196
|
+
"issue": "Phase 24 (24-01/24-02/24-04) — three distinct concerns for pp-core/bin/lib/vault-practices.cjs: vault-practices.test (24-01 parser/validation/discovery unit tests), vault-practices-matcher.test (24-02 glob matcher + two-bucket result + report unit tests), vault-practices-examples.test (24-04 shipped-example drift guard + minimal-comments global-bucket smoke case, PRAC-03 Success Criterion 3). All three test the same production module and are each independently load-bearing; consolidating would blur distinct plan-level verification gates."
|
|
188
197
|
}
|
|
189
198
|
}
|
|
190
199
|
}
|