prizmkit 1.1.141 → 1.1.143
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/dev-pipeline/README.md +1 -1
- package/bundled/dev-pipeline/prizmkit_runtime/checkpoint_state.py +124 -4
- package/bundled/dev-pipeline/prizmkit_runtime/runner_classification.py +13 -1
- package/bundled/dev-pipeline/prizmkit_runtime/runners.py +4 -1
- package/bundled/dev-pipeline/prizmkit_runtime/test_result.py +20 -10
- package/bundled/dev-pipeline/scripts/check-session-status.py +11 -1
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +2 -2
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +2 -2
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +2 -2
- package/bundled/dev-pipeline/scripts/prompt_framework.py +12 -1
- package/bundled/dev-pipeline/scripts/update-bug-status.py +20 -0
- package/bundled/dev-pipeline/scripts/update-checkpoint.py +38 -9
- package/bundled/dev-pipeline/scripts/update-feature-status.py +20 -0
- package/bundled/dev-pipeline/scripts/update-refactor-status.py +20 -0
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +1 -1
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-review.md +1 -1
- package/bundled/dev-pipeline/templates/sections/checkpoint-system.md +5 -1
- package/bundled/dev-pipeline/templates/sections/phase-review-full.md +2 -2
- package/bundled/dev-pipeline/templates/sections/refactor-phase-review.md +1 -1
- package/bundled/dev-pipeline/templates/session-status-schema.json +1 -1
- package/bundled/dev-pipeline/tests/test_checkpoint_state.py +231 -0
- package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +26 -1
- package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +4 -2
- package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +5 -2
- package/bundled/dev-pipeline/tests/test_python_runner_parity.py +147 -4
- package/bundled/skills/_metadata.json +1 -1
- package/bundled/skills/prizmkit/SKILL.md +6 -6
- package/bundled/skills/prizmkit/references/workflow-state-protocol.md +23 -11
- package/bundled/skills/prizmkit-code-review/SKILL.md +4 -4
- package/bundled/skills/prizmkit-code-review/references/workflow-state-protocol.md +23 -11
- package/bundled/skills/prizmkit-committer/SKILL.md +5 -4
- package/bundled/skills/prizmkit-committer/references/workflow-state-protocol.md +23 -11
- package/bundled/skills/prizmkit-implement/SKILL.md +3 -2
- package/bundled/skills/prizmkit-implement/references/workflow-state-protocol.md +23 -11
- package/bundled/skills/prizmkit-plan/SKILL.md +2 -1
- package/bundled/skills/prizmkit-plan/references/workflow-state-protocol.md +23 -11
- package/bundled/skills/prizmkit-retrospective/SKILL.md +6 -4
- package/bundled/skills/prizmkit-retrospective/references/workflow-state-protocol.md +23 -11
- package/bundled/skills/prizmkit-test/SKILL.md +1 -1
- package/bundled/skills/prizmkit-test/references/test-report-template.md +1 -1
- package/bundled/skills/prizmkit-workflow/SKILL.md +13 -13
- package/bundled/skills/prizmkit-workflow/references/workflow-state-protocol.md +23 -11
- package/bundled/templates/hooks/commit-intent-status.py +50 -0
- package/bundled/templates/hooks/commit-intent.json +2 -2
- package/bundled/templates/hooks/post-command-prizm-drift.py +44 -0
- package/package.json +1 -1
- package/src/scaffold.js +2 -0
|
@@ -45,7 +45,7 @@ Every consumer compares workflow state with the skill-owned artifacts and curren
|
|
|
45
45
|
"artifact_dir": ".prizmkit/specs/example",
|
|
46
46
|
"orchestrator": "prizmkit-workflow",
|
|
47
47
|
"stage": "test",
|
|
48
|
-
"status": "
|
|
48
|
+
"status": "completed",
|
|
49
49
|
"stage_result": "TEST_PASS",
|
|
50
50
|
"completed_stages": ["plan", "implement", "code-review", "test"],
|
|
51
51
|
"repair_scope": null,
|
|
@@ -63,14 +63,16 @@ Every consumer compares workflow state with the skill-owned artifacts and curren
|
|
|
63
63
|
| `artifact_dir` | Generic requirement artifact root reused by every stage. |
|
|
64
64
|
| `orchestrator` | Semantic coordinator identifier, or null for direct stage use. |
|
|
65
65
|
| `stage` | Stage that most recently wrote state. |
|
|
66
|
-
| `status` | Lifecycle
|
|
67
|
-
| `stage_result` | Domain result such as `
|
|
66
|
+
| `status` | Lifecycle status: `pending`, `in_progress`, `completed`, `failed`, or `skipped`. |
|
|
67
|
+
| `stage_result` | Domain result for the current stage, such as `PLAN_READY`, `IMPLEMENTED`, `REVIEW_PASS`, `REVIEW_NEEDS_FIXES`, `TEST_*`, `RETRO_COMPLETE`, or `COMMITTED`. |
|
|
68
68
|
| `completed_stages` | Ordered stages completed for this requirement. |
|
|
69
69
|
| `repair_scope` | Optional caller-owned routing scope. The test skill reports high-risk repairs through `test-result.json` instead of scheduling another stage. |
|
|
70
70
|
| `repair_round` | Optional outer cross-stage repair round, from 0 through 3. It is not a test-internal repair counter. |
|
|
71
71
|
| `next_stage` | Next semantic stage, or null when stopped. |
|
|
72
72
|
| `resume_from` | Exact atomic skill that can resume, or null when none is selected. |
|
|
73
73
|
|
|
74
|
+
`status` and `stage_result` are deliberately separate. Lifecycle status values must never be replaced with domain result values.
|
|
75
|
+
|
|
74
76
|
## Lifecycle and Result Mappings
|
|
75
77
|
|
|
76
78
|
```text
|
|
@@ -83,18 +85,28 @@ PLAN_READY
|
|
|
83
85
|
→ COMMITTED
|
|
84
86
|
```
|
|
85
87
|
|
|
86
|
-
No formal stage is silently optional. Domain artifacts map as follows:
|
|
88
|
+
No formal stage is silently optional. Domain artifacts map to workflow state as follows:
|
|
87
89
|
|
|
88
90
|
```text
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
91
|
+
plan PLAN_READY → status=completed, stage_result=PLAN_READY
|
|
92
|
+
plan PLAN_BLOCKED → status=failed, stage_result=PLAN_BLOCKED
|
|
93
|
+
implementation IMPLEMENTED → status=completed, stage_result=IMPLEMENTED
|
|
94
|
+
implementation repair/block → status=failed, stage_result=IMPLEMENT_REPAIR or IMPLEMENT_BLOCKED
|
|
95
|
+
review-report PASS → status=completed, stage_result=REVIEW_PASS
|
|
96
|
+
review-report NEEDS_FIXES → status=failed, stage_result=REVIEW_NEEDS_FIXES
|
|
97
|
+
test-result TEST_PASS → status=completed, stage_result=TEST_PASS
|
|
98
|
+
test-result TEST_NEEDS_FIXES → status=failed, stage_result=TEST_NEEDS_FIXES
|
|
99
|
+
test-result TEST_BLOCKED → status=failed, stage_result=TEST_BLOCKED
|
|
100
|
+
retrospective DOCS_UPDATED → status=completed, stage_result=RETRO_COMPLETE
|
|
101
|
+
retrospective NO_DOC_CHANGE → status=completed, stage_result=RETRO_COMPLETE
|
|
102
|
+
retrospective blocked → status=failed, stage_result=RETRO_BLOCKED
|
|
103
|
+
commit authorization pending → status=in_progress, stage_result=COMMIT_PENDING
|
|
104
|
+
local commit confirmed → status=completed, stage_result=COMMITTED
|
|
105
|
+
commit blocked → status=failed, stage_result=COMMIT_BLOCKED
|
|
96
106
|
```
|
|
97
107
|
|
|
108
|
+
`DOCS_UPDATED` and `NO_DOC_CHANGE` remain retrospective artifact `result` values. The workflow `stage_result` is the retrospective stage result `RETRO_COMPLETE`.
|
|
109
|
+
|
|
98
110
|
`TEST_PASS` requires both `test-report.md` and a consistent `test-result.json`. No manifest, attestation, evidence package, or test-internal checkpoint is part of this contract.
|
|
99
111
|
|
|
100
112
|
## Non-Pass Results and Routing Boundary
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Report whether staged source changes include Prizm documentation updates."""
|
|
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()]
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def main() -> int:
|
|
28
|
+
files = staged_files()
|
|
29
|
+
source_files = [path for path in files if path.endswith(SOURCE_EXTENSIONS)]
|
|
30
|
+
if not source_files:
|
|
31
|
+
return 0
|
|
32
|
+
|
|
33
|
+
prizm_docs = [path for path in files if path.startswith(PRIZM_DOCS_PREFIX)]
|
|
34
|
+
if prizm_docs:
|
|
35
|
+
print(
|
|
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
|
+
)
|
|
46
|
+
return 0
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
if __name__ == "__main__":
|
|
50
|
+
raise SystemExit(main())
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"hooks": [
|
|
7
7
|
{
|
|
8
8
|
"type": "command",
|
|
9
|
-
"command": "python3
|
|
9
|
+
"command": "python3 .prizmkit/scripts/commit-intent-status.py"
|
|
10
10
|
}
|
|
11
11
|
]
|
|
12
12
|
}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"hooks": [
|
|
18
18
|
{
|
|
19
19
|
"type": "command",
|
|
20
|
-
"command": "python3
|
|
20
|
+
"command": "python3 .prizmkit/scripts/post-command-prizm-drift.py"
|
|
21
21
|
}
|
|
22
22
|
]
|
|
23
23
|
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Report Prizm documentation drift after relevant Git commands."""
|
|
3
|
+
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
|
|
6
|
+
import os
|
|
7
|
+
import re
|
|
8
|
+
import subprocess
|
|
9
|
+
import sys
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
|
|
12
|
+
DRIFT_SCRIPT = Path(".prizmkit/scripts/diff-prizm-docs.py")
|
|
13
|
+
RELEVANT_GIT_COMMAND = re.compile(r"git\s+(commit|merge|rebase)")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def tool_input() -> str:
|
|
17
|
+
return os.environ.get("CLAUDE_TOOL_INPUT") or os.environ.get("CODEBUDDY_TOOL_INPUT") or ""
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def main() -> int:
|
|
21
|
+
if not RELEVANT_GIT_COMMAND.search(tool_input()) or not DRIFT_SCRIPT.is_file():
|
|
22
|
+
return 0
|
|
23
|
+
|
|
24
|
+
result = subprocess.run(
|
|
25
|
+
[sys.executable, str(DRIFT_SCRIPT)],
|
|
26
|
+
text=True,
|
|
27
|
+
encoding="utf-8",
|
|
28
|
+
errors="replace",
|
|
29
|
+
stdout=subprocess.PIPE,
|
|
30
|
+
stderr=subprocess.DEVNULL,
|
|
31
|
+
check=False,
|
|
32
|
+
)
|
|
33
|
+
drift = result.stdout.strip()
|
|
34
|
+
if drift:
|
|
35
|
+
print(
|
|
36
|
+
"PRIZMKIT_DRIFT_DETECTED: prizm-docs structural differences found:\n"
|
|
37
|
+
f"{drift}\n"
|
|
38
|
+
"Please update affected .prizmkit/prizm-docs/ files."
|
|
39
|
+
)
|
|
40
|
+
return 0
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
if __name__ == "__main__":
|
|
44
|
+
raise SystemExit(main())
|
package/package.json
CHANGED
package/src/scaffold.js
CHANGED
|
@@ -724,6 +724,8 @@ export async function installPrizmkitScripts(projectRoot, dryRun, runtime = 'pyt
|
|
|
724
724
|
const scripts = [
|
|
725
725
|
'validate-prizm-docs.py',
|
|
726
726
|
'diff-prizm-docs.py',
|
|
727
|
+
'commit-intent-status.py',
|
|
728
|
+
'post-command-prizm-drift.py',
|
|
727
729
|
];
|
|
728
730
|
const legacyManagedScripts = [
|
|
729
731
|
'validate-prizm-docs.sh',
|