prizmkit 1.1.156 → 1.1.160
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/bundled/VERSION.json +3 -3
- package/bundled/adapters/codebuddy/settings-adapter.js +76 -25
- package/bundled/dev-pipeline/prizmkit_runtime/gitops.py +9 -2
- package/bundled/dev-pipeline/prizmkit_runtime/reset.py +1 -1
- package/bundled/dev-pipeline/prizmkit_runtime/runner_classification.py +20 -11
- package/bundled/dev-pipeline/prizmkit_runtime/runtime_commit.py +42 -15
- package/bundled/dev-pipeline/scripts/update-feature-status.py +7 -0
- package/bundled/dev-pipeline/templates/bootstrap-prompt.md +1 -1
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +1 -1
- package/bundled/dev-pipeline/templates/sections/runtime-commit-handoff.md +6 -6
- package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +4 -3
- package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +2 -2
- package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +2 -2
- package/bundled/dev-pipeline/tests/test_python_runner_parity.py +115 -4
- package/bundled/dev-pipeline/tests/test_reset_modes.py +137 -0
- package/bundled/dev-pipeline/tests/test_runtime_commit.py +68 -13
- package/bundled/dev-pipeline/tests/test_unified_cli.py +12 -7
- package/bundled/rules/prizm/prizm-commit-workflow.md +7 -7
- package/bundled/rules/prizm/prizm-documentation.md +24 -65
- package/bundled/rules/prizm/prizm-progressive-loading.md +9 -8
- package/bundled/skills/_metadata.json +1 -1
- package/bundled/skills/prizmkit/SKILL.md +1 -13
- package/bundled/skills/prizmkit-code-review/SKILL.md +29 -10
- package/bundled/skills/prizmkit-code-review/references/independent-code-review.md +5 -4
- package/bundled/skills/prizmkit-code-review/references/review-report-template.md +15 -0
- package/bundled/skills/prizmkit-code-review/scripts/render_review_report.py +61 -0
- package/bundled/skills/prizmkit-committer/SKILL.md +50 -38
- package/bundled/skills/prizmkit-deploy/SKILL.md +172 -198
- package/bundled/skills/prizmkit-deploy/references/capability-contract.md +137 -0
- package/bundled/skills/prizmkit-deploy/references/deploy-record-schema.json +1053 -0
- package/bundled/skills/prizmkit-deploy/references/deployment-declaration-schema.json +291 -0
- package/bundled/skills/prizmkit-deploy/references/legacy-migration.md +90 -0
- package/bundled/skills/prizmkit-deploy/references/policy-and-execution.md +170 -0
- package/bundled/skills/prizmkit-deploy/references/real-resource-test-policy.md +73 -0
- package/bundled/skills/prizmkit-deploy/references/verification-and-recovery.md +164 -0
- package/bundled/skills/prizmkit-deploy/scripts/validate-deploy-artifact.py +371 -0
- package/bundled/skills/prizmkit-implement/SKILL.md +2 -2
- package/bundled/skills/prizmkit-init/SKILL.md +38 -42
- package/bundled/skills/prizmkit-init/references/config-schema.md +11 -7
- package/bundled/skills/prizmkit-init/references/rules/layer-detection.md +3 -3
- package/bundled/skills/prizmkit-init/references/update-supplement.md +5 -5
- package/bundled/skills/prizmkit-plan/SKILL.md +5 -4
- package/bundled/skills/prizmkit-plan/assets/plan-template.md +4 -1
- package/bundled/skills/prizmkit-plan/references/verification-checklist.md +3 -2
- package/bundled/skills/prizmkit-prizm-docs/SKILL.md +17 -11
- package/bundled/skills/prizmkit-prizm-docs/assets/prizm-docs-format.md +95 -155
- package/bundled/skills/prizmkit-prizm-docs/references/op-init.md +6 -5
- package/bundled/skills/prizmkit-prizm-docs/references/op-rebuild.md +4 -2
- package/bundled/skills/prizmkit-prizm-docs/references/op-status.md +9 -10
- package/bundled/skills/prizmkit-prizm-docs/references/op-update.md +6 -5
- package/bundled/skills/prizmkit-prizm-docs/references/op-validate.md +13 -12
- package/bundled/skills/prizmkit-retrospective/SKILL.md +3 -3
- package/bundled/skills/prizmkit-test/SKILL.md +26 -13
- package/bundled/skills/prizmkit-test/references/boundary-contract-and-test-double-guidance.md +8 -4
- package/bundled/skills/prizmkit-test/references/independent-test-review.md +7 -3
- package/bundled/skills/prizmkit-test/references/test-coverage-model.md +33 -10
- package/bundled/skills/prizmkit-test/references/test-report-template.md +33 -11
- package/bundled/skills/prizmkit-workflow/SKILL.md +33 -3
- package/bundled/skills/prizmkit-workflow/references/workflow-state-protocol.md +23 -5
- package/bundled/templates/hooks/commit-intent-status.py +9 -41
- package/bundled/templates/hooks/commit-intent.json +3 -3
- package/bundled/templates/hooks/diff-prizm-docs.py +3 -1
- package/bundled/templates/hooks/prizm-pre-commit.py +32 -6
- package/bundled/templates/hooks/run-python-hook.cjs +44 -0
- package/bundled/templates/hooks/validate-prizm-docs.py +399 -173
- package/bundled/templates/project-memory-template.md +19 -19
- package/package.json +1 -1
- package/src/clean.js +6 -7
- package/src/gitignore-template.js +8 -12
- package/src/scaffold.js +125 -71
- package/bundled/skills/prizmkit/references/workflow-state-protocol.md +0 -178
- package/bundled/skills/prizmkit-deploy/assets/deploy-document-template.md +0 -89
- package/bundled/skills/prizmkit-deploy/references/ci-cd-workflows.md +0 -145
- package/bundled/skills/prizmkit-deploy/references/cloud-platform-deploy.md +0 -109
- package/bundled/skills/prizmkit-deploy/references/data-safety-examples.md +0 -120
- package/bundled/skills/prizmkit-deploy/references/database-setup.md +0 -65
- package/bundled/skills/prizmkit-deploy/references/deploy-config-schema.md +0 -150
- package/bundled/skills/prizmkit-deploy/references/deploy-history-schema.md +0 -78
- package/bundled/skills/prizmkit-deploy/references/deploy-metadata-schema.json +0 -49
- package/bundled/skills/prizmkit-deploy/references/deployment-modes.md +0 -50
- package/bundled/skills/prizmkit-deploy/references/direct-upload.md +0 -26
- package/bundled/skills/prizmkit-deploy/references/dns-setup.md +0 -42
- package/bundled/skills/prizmkit-deploy/references/docker-deploy.md +0 -31
- package/bundled/skills/prizmkit-deploy/references/firewall-setup.md +0 -37
- package/bundled/skills/prizmkit-deploy/references/live-validation-notes.md +0 -21
- package/bundled/skills/prizmkit-deploy/references/nginx-blue-green.md +0 -59
- package/bundled/skills/prizmkit-deploy/references/pending-input-schema.json +0 -164
- package/bundled/skills/prizmkit-deploy/references/ssh-adapter-flow.md +0 -221
- package/bundled/skills/prizmkit-deploy/references/ssh-bootstrap-flow.md +0 -49
- package/bundled/skills/prizmkit-deploy/references/ssh-execution-flow.md +0 -41
- package/bundled/skills/prizmkit-deploy/references/ssh-takeover.md +0 -20
- package/bundled/skills/prizmkit-deploy/references/ssl-setup.md +0 -56
|
@@ -1,48 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
-
"""
|
|
3
|
-
|
|
4
|
-
from __future__ import annotations
|
|
5
|
-
|
|
6
|
-
import subprocess
|
|
7
|
-
|
|
8
|
-
SOURCE_EXTENSIONS = (".ts", ".tsx", ".js", ".jsx", ".py", ".go", ".rs", ".java")
|
|
9
|
-
PRIZM_DOCS_PREFIX = ".prizmkit/prizm-docs/"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
def staged_files() -> list[str]:
|
|
13
|
-
result = subprocess.run(
|
|
14
|
-
["git", "diff", "--cached", "--name-only"],
|
|
15
|
-
text=True,
|
|
16
|
-
encoding="utf-8",
|
|
17
|
-
errors="replace",
|
|
18
|
-
stdout=subprocess.PIPE,
|
|
19
|
-
stderr=subprocess.DEVNULL,
|
|
20
|
-
check=False,
|
|
21
|
-
)
|
|
22
|
-
if result.returncode != 0:
|
|
23
|
-
return []
|
|
24
|
-
return [path for path in result.stdout.splitlines() if path.strip()]
|
|
2
|
+
"""Emit Git-neutral PrizmKit lifecycle maintenance guidance."""
|
|
25
3
|
|
|
26
4
|
|
|
27
5
|
def main() -> int:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
f"PRIZMKIT_DOC_STATUS: {len(source_files)} source file(s) staged | "
|
|
37
|
-
f".prizmkit/prizm-docs/ updated ({len(prizm_docs)} file(s))",
|
|
38
|
-
end="",
|
|
39
|
-
)
|
|
40
|
-
else:
|
|
41
|
-
print(
|
|
42
|
-
f"PRIZMKIT_DOC_STATUS: {len(source_files)} source file(s) staged | "
|
|
43
|
-
".prizmkit/prizm-docs/ NOT UPDATED — update if this is a feature change",
|
|
44
|
-
end="",
|
|
45
|
-
)
|
|
6
|
+
print(
|
|
7
|
+
"PRIZMKIT_MAINTENANCE_CHECK: If the validated change affects structure, "
|
|
8
|
+
"interfaces, dependencies, behavior, or durable TRAPS/RULES/DECISIONS, "
|
|
9
|
+
"run /prizmkit-retrospective before Committer. Retrospective never stages or "
|
|
10
|
+
"commits. Project Git policy controls whether .prizmkit paths are ignored, "
|
|
11
|
+
"untracked, or tracked; do not force-add or change ignore rules.",
|
|
12
|
+
end="",
|
|
13
|
+
)
|
|
46
14
|
return 0
|
|
47
15
|
|
|
48
16
|
|
|
@@ -6,18 +6,18 @@
|
|
|
6
6
|
"hooks": [
|
|
7
7
|
{
|
|
8
8
|
"type": "command",
|
|
9
|
-
"command": "
|
|
9
|
+
"command": "node .prizmkit/scripts/run-python-hook.cjs .prizmkit/scripts/commit-intent-status.py"
|
|
10
10
|
}
|
|
11
11
|
]
|
|
12
12
|
}
|
|
13
13
|
],
|
|
14
14
|
"PostToolUse": [
|
|
15
15
|
{
|
|
16
|
-
"matcher": "
|
|
16
|
+
"matcher": ".*",
|
|
17
17
|
"hooks": [
|
|
18
18
|
{
|
|
19
19
|
"type": "command",
|
|
20
|
-
"command": "
|
|
20
|
+
"command": "node .prizmkit/scripts/run-python-hook.cjs .prizmkit/scripts/post-command-prizm-drift.py"
|
|
21
21
|
}
|
|
22
22
|
]
|
|
23
23
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
-
"""
|
|
2
|
+
"""Fail-closed staged Prizm validation entry point for installed Git hooks."""
|
|
3
3
|
|
|
4
4
|
from __future__ import annotations
|
|
5
5
|
|
|
@@ -7,6 +7,8 @@ import subprocess
|
|
|
7
7
|
import sys
|
|
8
8
|
from pathlib import Path
|
|
9
9
|
|
|
10
|
+
DOCS_PREFIX = ".prizmkit/prizm-docs/"
|
|
11
|
+
|
|
10
12
|
|
|
11
13
|
def run_git(args: list[str]) -> subprocess.CompletedProcess[str]:
|
|
12
14
|
return subprocess.run(
|
|
@@ -15,29 +17,53 @@ def run_git(args: list[str]) -> subprocess.CompletedProcess[str]:
|
|
|
15
17
|
encoding="utf-8",
|
|
16
18
|
errors="replace",
|
|
17
19
|
stdout=subprocess.PIPE,
|
|
18
|
-
stderr=subprocess.
|
|
20
|
+
stderr=subprocess.PIPE,
|
|
19
21
|
check=False,
|
|
20
22
|
)
|
|
21
23
|
|
|
22
24
|
|
|
25
|
+
def staged_prizm_docs() -> tuple[bool, str]:
|
|
26
|
+
result = run_git(["diff", "--cached", "--name-only", "-z", "--diff-filter=ACMRD"])
|
|
27
|
+
if result.returncode != 0:
|
|
28
|
+
return False, "PrizmKit: unable to inspect the staged index for Prizm validation."
|
|
29
|
+
paths = [path for path in result.stdout.split("\0") if path]
|
|
30
|
+
return any(path.startswith(DOCS_PREFIX) and path.endswith(".prizm") for path in paths), ""
|
|
31
|
+
|
|
32
|
+
|
|
23
33
|
def main() -> int:
|
|
24
34
|
root_result = run_git(["rev-parse", "--show-toplevel"])
|
|
25
35
|
if root_result.returncode != 0:
|
|
26
36
|
return 0
|
|
27
37
|
|
|
28
|
-
|
|
29
|
-
if
|
|
38
|
+
required, error = staged_prizm_docs()
|
|
39
|
+
if error:
|
|
40
|
+
print(error, file=sys.stderr)
|
|
41
|
+
return 1
|
|
42
|
+
if not required:
|
|
30
43
|
return 0
|
|
31
44
|
|
|
45
|
+
project_root = Path(root_result.stdout.strip())
|
|
32
46
|
candidates = [
|
|
33
47
|
project_root / ".prizmkit/scripts/validate-prizm-docs.py",
|
|
34
48
|
project_root / ".prizmkit/dev-pipeline/scripts/validate-prizm-docs.py",
|
|
35
49
|
]
|
|
36
50
|
validate_script = next((candidate for candidate in candidates if candidate.is_file()), None)
|
|
37
51
|
if validate_script is None:
|
|
38
|
-
|
|
52
|
+
print(
|
|
53
|
+
"PrizmKit: staged Prizm documents require validation, but the canonical validator is unavailable.",
|
|
54
|
+
file=sys.stderr,
|
|
55
|
+
)
|
|
56
|
+
return 1
|
|
39
57
|
|
|
40
|
-
|
|
58
|
+
try:
|
|
59
|
+
result = subprocess.run(
|
|
60
|
+
[sys.executable, str(validate_script), "--staged"],
|
|
61
|
+
cwd=project_root,
|
|
62
|
+
check=False,
|
|
63
|
+
)
|
|
64
|
+
except OSError as exc:
|
|
65
|
+
print(f"PrizmKit: staged Prizm validation could not start: {exc}", file=sys.stderr)
|
|
66
|
+
return 1
|
|
41
67
|
return result.returncode
|
|
42
68
|
|
|
43
69
|
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/* global process, require */
|
|
3
|
+
'use strict';
|
|
4
|
+
|
|
5
|
+
const { spawnSync } = require('node:child_process');
|
|
6
|
+
|
|
7
|
+
const [script, ...scriptArgs] = process.argv.slice(2);
|
|
8
|
+
if (!script) {
|
|
9
|
+
process.stderr.write('PrizmKit: Python hook script path is required.\n');
|
|
10
|
+
process.exit(1);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const candidates = process.platform === 'win32'
|
|
14
|
+
? [
|
|
15
|
+
{ command: 'py', prefix: ['-3'] },
|
|
16
|
+
{ command: 'python3', prefix: [] },
|
|
17
|
+
{ command: 'python', prefix: [] },
|
|
18
|
+
]
|
|
19
|
+
: [
|
|
20
|
+
{ command: 'python3', prefix: [] },
|
|
21
|
+
{ command: 'python', prefix: [] },
|
|
22
|
+
{ command: 'py', prefix: ['-3'] },
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
for (const candidate of candidates) {
|
|
26
|
+
const result = spawnSync(
|
|
27
|
+
candidate.command,
|
|
28
|
+
[...candidate.prefix, script, ...scriptArgs],
|
|
29
|
+
{ stdio: 'inherit', shell: false },
|
|
30
|
+
);
|
|
31
|
+
if (result.error && result.error.code === 'ENOENT') continue;
|
|
32
|
+
if (result.error) {
|
|
33
|
+
process.stderr.write(`PrizmKit: Python hook launch failed: ${result.error.message}\n`);
|
|
34
|
+
process.exit(1);
|
|
35
|
+
}
|
|
36
|
+
if (result.signal) {
|
|
37
|
+
process.stderr.write(`PrizmKit: Python hook terminated by ${result.signal}.\n`);
|
|
38
|
+
process.exit(1);
|
|
39
|
+
}
|
|
40
|
+
process.exit(result.status === null ? 1 : result.status);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
process.stderr.write('PrizmKit: Python 3 is required for this managed hook.\n');
|
|
44
|
+
process.exit(1);
|