prizmkit 1.1.153 → 1.1.155
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/codex/skill-adapter.js +1 -1
- package/bundled/adapters/pi/skill-adapter.js +2 -1
- package/bundled/dev-pipeline/.env.example +2 -6
- package/bundled/dev-pipeline/README.md +120 -113
- package/bundled/dev-pipeline/assets/skill-subagent-integration.md +1 -1
- package/bundled/dev-pipeline/prizmkit_runtime/checkpoint_state.py +355 -15
- package/bundled/dev-pipeline/prizmkit_runtime/cli.py +189 -110
- package/bundled/dev-pipeline/prizmkit_runtime/commands.py +146 -111
- package/bundled/dev-pipeline/prizmkit_runtime/daemon.py +4 -20
- package/bundled/dev-pipeline/prizmkit_runtime/gitops.py +48 -14
- package/bundled/dev-pipeline/prizmkit_runtime/interoperability.py +0 -1
- package/bundled/dev-pipeline/prizmkit_runtime/paths.py +0 -3
- package/bundled/dev-pipeline/prizmkit_runtime/reset.py +122 -15
- package/bundled/dev-pipeline/prizmkit_runtime/reset_preserve.py +1 -1
- package/bundled/dev-pipeline/prizmkit_runtime/runner_classification.py +50 -2
- package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +1 -10
- package/bundled/dev-pipeline/prizmkit_runtime/runner_prompts.py +3 -3
- package/bundled/dev-pipeline/prizmkit_runtime/runners.py +139 -74
- package/bundled/dev-pipeline/prizmkit_runtime/runtime_commit.py +482 -0
- package/bundled/dev-pipeline/prizmkit_runtime/status.py +106 -1
- package/bundled/dev-pipeline/prizmkit_runtime/test_result.py +64 -11
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +145 -367
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +91 -62
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +105 -69
- package/bundled/dev-pipeline/scripts/init-bugfix-pipeline.py +2 -2
- package/bundled/dev-pipeline/scripts/prompt_framework.py +36 -41
- package/bundled/dev-pipeline/scripts/update-bug-status.py +197 -71
- package/bundled/dev-pipeline/scripts/update-checkpoint.py +77 -16
- package/bundled/dev-pipeline/scripts/update-feature-status.py +46 -121
- package/bundled/dev-pipeline/scripts/update-refactor-status.py +46 -123
- package/bundled/dev-pipeline/scripts/utils.py +119 -0
- package/bundled/dev-pipeline/templates/bootstrap-prompt.md +22 -27
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +71 -104
- package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +3 -2
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +59 -111
- package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +37 -72
- package/bundled/dev-pipeline/templates/sections/artifact-manifest.md +39 -0
- package/bundled/dev-pipeline/templates/sections/bugfix-critical-paths.md +3 -1
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-commit-report.md +8 -25
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-diagnose-plan.md +3 -3
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-implement.md +2 -2
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-review.md +3 -3
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-test.md +2 -2
- package/bundled/dev-pipeline/templates/sections/bugfix-reminders.md +4 -4
- package/bundled/dev-pipeline/templates/sections/bugfix-session-context.md +0 -1
- package/bundled/dev-pipeline/templates/sections/checkpoint-system.md +7 -4
- package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +14 -27
- package/bundled/dev-pipeline/templates/sections/feature-completion-summary.md +20 -0
- package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +8 -71
- package/bundled/dev-pipeline/templates/sections/phase-implement-full.md +7 -7
- package/bundled/dev-pipeline/templates/sections/phase-prizmkit-test.md +3 -3
- package/bundled/dev-pipeline/templates/sections/phase-review-full.md +4 -4
- package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +5 -17
- package/bundled/dev-pipeline/templates/sections/refactor-critical-paths.md +3 -1
- package/bundled/dev-pipeline/templates/sections/refactor-phase-commit-report.md +10 -23
- package/bundled/dev-pipeline/templates/sections/refactor-phase-implement.md +2 -2
- package/bundled/dev-pipeline/templates/sections/refactor-phase-plan.md +2 -2
- package/bundled/dev-pipeline/templates/sections/refactor-phase-review.md +3 -3
- package/bundled/dev-pipeline/templates/sections/refactor-phase-test.md +2 -2
- package/bundled/dev-pipeline/templates/sections/refactor-reminders.md +7 -7
- package/bundled/dev-pipeline/templates/sections/refactor-session-context.md +0 -1
- package/bundled/dev-pipeline/templates/sections/retrospective.md +12 -0
- package/bundled/dev-pipeline/templates/sections/runtime-commit-handoff.md +35 -0
- package/bundled/dev-pipeline/templates/session-status-schema.json +45 -62
- package/bundled/dev-pipeline/tests/test_auto_skip.py +111 -32
- package/bundled/dev-pipeline/tests/test_checkpoint_state.py +617 -30
- package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +262 -194
- package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +62 -23
- package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +76 -28
- package/bundled/dev-pipeline/tests/test_python_runner_parity.py +281 -206
- package/bundled/dev-pipeline/tests/test_recovery_workflow.py +322 -0
- package/bundled/dev-pipeline/tests/test_reset_modes.py +935 -0
- package/bundled/dev-pipeline/tests/test_reset_preserve.py +5 -7
- package/bundled/dev-pipeline/tests/test_runtime_commit.py +608 -0
- package/bundled/dev-pipeline/tests/test_unified_cli.py +617 -188
- package/bundled/skills/_metadata.json +9 -9
- package/bundled/skills/app-planner/SKILL.md +3 -3
- package/bundled/skills/app-planner/references/generated-plan-review.md +2 -1
- package/bundled/skills/app-planner/references/rules/backend/derivation-rules.md +56 -64
- package/bundled/skills/app-planner/references/rules/backend/fixed-rules.md +85 -240
- package/bundled/skills/app-planner/references/rules/backend/question-bank.md +25 -25
- package/bundled/skills/app-planner/references/rules/backend/question-manifest.json +16 -7
- package/bundled/skills/app-planner/references/rules/backend/template.md +74 -92
- package/bundled/skills/app-planner/references/rules/database/derivation-rules.md +93 -93
- package/bundled/skills/app-planner/references/rules/database/fixed-rules.md +66 -173
- package/bundled/skills/app-planner/references/rules/database/question-bank.md +31 -26
- package/bundled/skills/app-planner/references/rules/database/question-manifest.json +13 -4
- package/bundled/skills/app-planner/references/rules/database/template.md +76 -98
- package/bundled/skills/app-planner/references/rules/frontend/derivation-rules.md +68 -95
- package/bundled/skills/app-planner/references/rules/frontend/fixed-rules.md +93 -166
- package/bundled/skills/app-planner/references/rules/frontend/question-bank.md +46 -36
- package/bundled/skills/app-planner/references/rules/frontend/question-manifest.json +11 -2
- package/bundled/skills/app-planner/references/rules/frontend/template.md +79 -257
- package/bundled/skills/app-planner/references/rules/mobile/derivation-rules.md +91 -99
- package/bundled/skills/app-planner/references/rules/mobile/fixed-rules.md +73 -246
- package/bundled/skills/app-planner/references/rules/mobile/question-bank.md +17 -17
- package/bundled/skills/app-planner/references/rules/mobile/question-manifest.json +17 -2
- package/bundled/skills/app-planner/references/rules/mobile/template.md +73 -85
- package/bundled/skills/app-planner/references/rules-configuration.md +133 -65
- package/bundled/skills/app-planner/scripts/validate-rules-configuration.py +291 -0
- package/bundled/skills/bug-planner/references/schema-validation.md +1 -1
- package/bundled/skills/bug-planner/scripts/validate-bug-list.py +1 -1
- package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +21 -13
- package/bundled/skills/feature-pipeline-launcher/SKILL.md +22 -14
- package/bundled/skills/prizmkit/SKILL.md +17 -18
- package/bundled/skills/prizmkit/references/workflow-state-protocol.md +22 -18
- package/bundled/skills/prizmkit-code-review/SKILL.md +22 -58
- package/bundled/skills/prizmkit-code-review/references/independent-code-review.md +6 -6
- package/bundled/skills/prizmkit-code-review/references/review-report-template.md +2 -2
- package/bundled/skills/prizmkit-committer/SKILL.md +82 -132
- package/bundled/skills/prizmkit-deploy/SKILL.md +27 -11
- package/bundled/skills/prizmkit-deploy/assets/deploy-document-template.md +89 -0
- package/bundled/skills/prizmkit-deploy/references/ci-cd-workflows.md +44 -14
- package/bundled/skills/prizmkit-deploy/references/cloud-platform-deploy.md +19 -3
- package/bundled/skills/prizmkit-deploy/references/database-setup.md +22 -12
- package/bundled/skills/prizmkit-deploy/references/deploy-config-schema.md +3 -1
- package/bundled/skills/prizmkit-deploy/references/deploy-history-schema.md +22 -6
- package/bundled/skills/prizmkit-deploy/references/deploy-metadata-schema.json +49 -0
- package/bundled/skills/prizmkit-deploy/references/live-validation-notes.md +1 -1
- package/bundled/skills/prizmkit-deploy/references/pending-input-schema.json +164 -0
- package/bundled/skills/prizmkit-deploy/references/ssh-adapter-flow.md +9 -8
- package/bundled/skills/prizmkit-deploy/references/ssh-execution-flow.md +6 -6
- package/bundled/skills/prizmkit-implement/SKILL.md +30 -66
- package/bundled/skills/prizmkit-implement/references/implementation-subagent-procedure.md +4 -4
- package/bundled/skills/prizmkit-init/SKILL.md +4 -0
- package/bundled/skills/prizmkit-plan/SKILL.md +21 -64
- package/bundled/skills/prizmkit-plan/references/artifact-identity.md +38 -0
- package/bundled/skills/prizmkit-plan/references/independent-plan-review.md +4 -4
- package/bundled/skills/prizmkit-plan/references/review-plan-spec-loop.md +5 -5
- package/bundled/skills/prizmkit-prizm-docs/SKILL.md +11 -1
- package/bundled/skills/prizmkit-retrospective/SKILL.md +63 -77
- package/bundled/skills/prizmkit-retrospective/references/knowledge-injection-steps.md +3 -3
- package/bundled/skills/prizmkit-retrospective/references/retrospective-result-schema.json +138 -0
- package/bundled/skills/prizmkit-retrospective/references/structural-sync-steps.md +17 -23
- package/bundled/skills/prizmkit-test/SKILL.md +64 -51
- package/bundled/skills/prizmkit-test/references/boundary-contract-and-test-double-guidance.md +206 -0
- package/bundled/skills/prizmkit-test/references/independent-test-review.md +17 -9
- package/bundled/skills/prizmkit-test/references/test-coverage-model.md +45 -21
- package/bundled/skills/prizmkit-test/references/test-report-template.md +20 -13
- package/bundled/skills/prizmkit-workflow/SKILL.md +35 -37
- package/bundled/skills/prizmkit-workflow/references/artifact-identity.md +34 -0
- package/bundled/skills/prizmkit-workflow/references/workflow-state-protocol.md +22 -18
- package/bundled/skills/recovery-workflow/SKILL.md +9 -6
- package/bundled/skills/recovery-workflow/evals/evals.json +2 -2
- package/bundled/skills/recovery-workflow/references/detection.md +7 -6
- package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +16 -6
- package/bundled/skills/refactor-pipeline-launcher/SKILL.md +21 -13
- package/bundled/templates/project-memory-template.md +19 -11
- package/package.json +1 -1
- package/src/scaffold.js +33 -22
- package/bundled/dev-pipeline/prizmkit_runtime/runner_recovery.py +0 -228
- package/bundled/dev-pipeline/scripts/generate-recovery-prompt.py +0 -767
- package/bundled/dev-pipeline/templates/sections/bugfix-artifacts.md +0 -16
- package/bundled/dev-pipeline/templates/sections/bugfix-session-status.md +0 -31
- package/bundled/dev-pipeline/templates/sections/critical-paths-agent.md +0 -7
- package/bundled/dev-pipeline/templates/sections/critical-paths-lite.md +0 -7
- package/bundled/dev-pipeline/templates/sections/directory-convention-agent.md +0 -9
- package/bundled/dev-pipeline/templates/sections/directory-convention-lite.md +0 -6
- package/bundled/dev-pipeline/templates/sections/headless-commit-authorization.md +0 -15
- package/bundled/dev-pipeline/templates/sections/phase-commit.md +0 -61
- package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-agent-suffix.md +0 -24
- package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-lite-suffix.md +0 -12
- package/bundled/dev-pipeline/templates/sections/phase-implement-agent.md +0 -44
- package/bundled/dev-pipeline/templates/sections/phase-implement-lite.md +0 -25
- package/bundled/dev-pipeline/templates/sections/phase-plan-agent.md +0 -20
- package/bundled/dev-pipeline/templates/sections/phase-plan-lite.md +0 -20
- package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +0 -20
- package/bundled/dev-pipeline/templates/sections/refactor-artifacts.md +0 -17
- package/bundled/dev-pipeline/templates/sections/refactor-session-status.md +0 -28
- package/bundled/dev-pipeline/templates/sections/test-failure-recovery-agent.md +0 -52
- package/bundled/dev-pipeline/templates/sections/test-failure-recovery-lite.md +0 -52
- package/bundled/skills/prizmkit-code-review/references/workflow-state-protocol.md +0 -174
- package/bundled/skills/prizmkit-committer/references/workflow-state-protocol.md +0 -174
- package/bundled/skills/prizmkit-implement/references/workflow-state-protocol.md +0 -174
- package/bundled/skills/prizmkit-plan/references/workflow-state-protocol.md +0 -174
- package/bundled/skills/prizmkit-retrospective/references/workflow-state-protocol.md +0 -174
- package/bundled/skills/prizmkit-test/references/external-contract-mock-guidance.md +0 -119
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "PrizmKit Deployment Pending Input",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": [
|
|
7
|
+
"schema_version",
|
|
8
|
+
"result",
|
|
9
|
+
"operation",
|
|
10
|
+
"environment",
|
|
11
|
+
"known_context",
|
|
12
|
+
"questions"
|
|
13
|
+
],
|
|
14
|
+
"properties": {
|
|
15
|
+
"schema_version": {
|
|
16
|
+
"const": 1
|
|
17
|
+
},
|
|
18
|
+
"result": {
|
|
19
|
+
"const": "NEEDS_INPUT"
|
|
20
|
+
},
|
|
21
|
+
"operation": {
|
|
22
|
+
"enum": [
|
|
23
|
+
"configure",
|
|
24
|
+
"deploy",
|
|
25
|
+
"status",
|
|
26
|
+
"logs",
|
|
27
|
+
"restart",
|
|
28
|
+
"rollback",
|
|
29
|
+
"health",
|
|
30
|
+
"history",
|
|
31
|
+
"validate"
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
"environment": {
|
|
35
|
+
"enum": ["dev", "test", null]
|
|
36
|
+
},
|
|
37
|
+
"known_context": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"additionalProperties": false,
|
|
40
|
+
"required": ["project_type", "target", "config_path"],
|
|
41
|
+
"properties": {
|
|
42
|
+
"project_type": {
|
|
43
|
+
"type": ["string", "null"]
|
|
44
|
+
},
|
|
45
|
+
"target": {
|
|
46
|
+
"type": ["string", "null"]
|
|
47
|
+
},
|
|
48
|
+
"config_path": {
|
|
49
|
+
"const": ".prizmkit/deploy/deploy.config.json"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"questions": {
|
|
54
|
+
"type": "array",
|
|
55
|
+
"minItems": 1,
|
|
56
|
+
"items": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"additionalProperties": false,
|
|
59
|
+
"required": [
|
|
60
|
+
"id",
|
|
61
|
+
"prompt",
|
|
62
|
+
"answer_type",
|
|
63
|
+
"required",
|
|
64
|
+
"config_pointer",
|
|
65
|
+
"options"
|
|
66
|
+
],
|
|
67
|
+
"properties": {
|
|
68
|
+
"id": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"pattern": "^[a-z][a-z0-9_]{0,63}$"
|
|
71
|
+
},
|
|
72
|
+
"prompt": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"minLength": 1
|
|
75
|
+
},
|
|
76
|
+
"answer_type": {
|
|
77
|
+
"enum": ["text", "single_choice", "multi_choice", "boolean", "integer"]
|
|
78
|
+
},
|
|
79
|
+
"required": {
|
|
80
|
+
"type": "boolean"
|
|
81
|
+
},
|
|
82
|
+
"config_pointer": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"pattern": "^/(?:[^~/]|~[01])+(?:/(?:[^~/]|~[01])*)*$"
|
|
85
|
+
},
|
|
86
|
+
"options": {
|
|
87
|
+
"type": "array",
|
|
88
|
+
"items": {
|
|
89
|
+
"type": "object",
|
|
90
|
+
"additionalProperties": false,
|
|
91
|
+
"required": ["value", "label"],
|
|
92
|
+
"properties": {
|
|
93
|
+
"value": {
|
|
94
|
+
"type": ["string", "number", "boolean"]
|
|
95
|
+
},
|
|
96
|
+
"label": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"minLength": 1
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"allOf": [
|
|
105
|
+
{
|
|
106
|
+
"if": {
|
|
107
|
+
"properties": {
|
|
108
|
+
"answer_type": {
|
|
109
|
+
"enum": ["single_choice", "multi_choice"]
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"then": {
|
|
114
|
+
"properties": {
|
|
115
|
+
"options": {
|
|
116
|
+
"minItems": 1
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"else": {
|
|
121
|
+
"properties": {
|
|
122
|
+
"options": {
|
|
123
|
+
"maxItems": 0
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"examples": [
|
|
133
|
+
{
|
|
134
|
+
"schema_version": 1,
|
|
135
|
+
"result": "NEEDS_INPUT",
|
|
136
|
+
"operation": "configure",
|
|
137
|
+
"environment": null,
|
|
138
|
+
"known_context": {
|
|
139
|
+
"project_type": "Node.js",
|
|
140
|
+
"target": null,
|
|
141
|
+
"config_path": ".prizmkit/deploy/deploy.config.json"
|
|
142
|
+
},
|
|
143
|
+
"questions": [
|
|
144
|
+
{
|
|
145
|
+
"id": "deployment_target",
|
|
146
|
+
"prompt": "Which deployment target should this project use?",
|
|
147
|
+
"answer_type": "single_choice",
|
|
148
|
+
"required": true,
|
|
149
|
+
"config_pointer": "/deploymentMode",
|
|
150
|
+
"options": [
|
|
151
|
+
{
|
|
152
|
+
"value": "ssh",
|
|
153
|
+
"label": "SSH Linux server"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"value": "docker",
|
|
157
|
+
"label": "Docker"
|
|
158
|
+
}
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
]
|
|
162
|
+
}
|
|
163
|
+
]
|
|
164
|
+
}
|
|
@@ -47,7 +47,7 @@ Server-side layout:
|
|
|
47
47
|
deploy-logs/
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
`shared/.env.production`
|
|
50
|
+
`shared/.env.production` is strict UTF-8 dotenv data with one unique `KEY=value` assignment per line; update it atomically, keep mode `600`, and require runtime-user ownership. `shared/deploy-metadata.json` must conform to `${SKILL_DIR}/references/deploy-metadata-schema.json`, be written atomically after successful live verification, and contain no secrets.
|
|
51
51
|
|
|
52
52
|
## 3. First-Run Configuration Wizard
|
|
53
53
|
|
|
@@ -59,7 +59,7 @@ Collect:
|
|
|
59
59
|
2. Repository access only for `ci-cd-pull`: Git URL, branch, deploy-key or other auth.
|
|
60
60
|
3. App configuration: app id, path, package manager, install/build/start commands, blue/green port pair, health checks.
|
|
61
61
|
4. Environment variables: scan source for env references, ask for values or storage strategy.
|
|
62
|
-
5. Persist `deploy.config.json` and `deploy.md`.
|
|
62
|
+
5. Persist `deploy.config.json` and render/update `deploy.md` from `${SKILL_DIR}/assets/deploy-document-template.md`.
|
|
63
63
|
|
|
64
64
|
Validate SSH immediately with a harmless connectivity command before collecting deeper config. If SSH fails, stop and fix connectivity first.
|
|
65
65
|
|
|
@@ -132,7 +132,7 @@ Failure rules:
|
|
|
132
132
|
## 8. Blue/Green PM2 + Nginx Invariants
|
|
133
133
|
|
|
134
134
|
- Default ports: blue `3101`, green `3102`.
|
|
135
|
-
- Active color is persisted in `shared/deploy-metadata.json`.
|
|
135
|
+
- Active color is persisted in `shared/deploy-metadata.json` using `${SKILL_DIR}/references/deploy-metadata-schema.json`.
|
|
136
136
|
- PM2 process name: `<project>-<app>-<color>`.
|
|
137
137
|
- Nginx managed blocks include `# PrizmKit Managed: <project> — DO NOT EDIT MANUALLY`.
|
|
138
138
|
- First creation or modification of non-PrizmKit Nginx config requires user confirmation.
|
|
@@ -157,8 +157,9 @@ Steps:
|
|
|
157
157
|
3. Start PM2 on the target release/port.
|
|
158
158
|
4. Update Nginx upstream.
|
|
159
159
|
5. Run `nginx -t` and reload.
|
|
160
|
-
6. Run health checks.
|
|
161
|
-
7.
|
|
160
|
+
6. Run public health checks; if they fail, restore the prior verified upstream.
|
|
161
|
+
7. Allocate and atomically write the rollback history event through `${SKILL_DIR}/references/deploy-history-schema.md`.
|
|
162
|
+
8. Atomically update `shared/deploy-metadata.json` through `${SKILL_DIR}/references/deploy-metadata-schema.json` with the restored release/color/port and rollback event identity.
|
|
162
163
|
|
|
163
164
|
If no previous release exists, state clearly that rollback is not possible.
|
|
164
165
|
|
|
@@ -177,13 +178,13 @@ Run app commands as `runtimeUser`.
|
|
|
177
178
|
Supported storage modes:
|
|
178
179
|
|
|
179
180
|
- `ask-every-time`
|
|
180
|
-
- `
|
|
181
|
-
- `plaintext-local`
|
|
181
|
+
- `ignored-local-env`
|
|
182
182
|
- `user-managed-on-server-only`
|
|
183
183
|
|
|
184
184
|
Rules:
|
|
185
185
|
|
|
186
|
-
- `
|
|
186
|
+
- `ignored-local-env` uses `.prizmkit/deploy/secrets.local.env`, must be ignored by Git and current-user-only, and follows `${SKILL_DIR}/references/database-setup.md` dotenv/migration safety.
|
|
187
|
+
- Legacy `plaintext-local` requires explicit migration to `ignored-local-env`; legacy `encrypted-local` is unsupported and requires user selection of a supported mode before deployment.
|
|
187
188
|
- Server runtime secrets live in `shared/.env.production` with mode `600`.
|
|
188
189
|
- Deploy history records secret presence metadata only.
|
|
189
190
|
- Never record raw secret values, passphrases, decryption keys, or unsalted hashes.
|
|
@@ -9,7 +9,7 @@ Show what will be deployed using `git log --oneline <last-deployed-commit>..HEAD
|
|
|
9
9
|
## Group 1 — Pre-flight & Prepare
|
|
10
10
|
|
|
11
11
|
- Verify SSH, runtime user, tools, deploy key, port availability.
|
|
12
|
-
- Generate `releaseId`: `
|
|
12
|
+
- Generate `releaseId`: `YYYYMMDDTHHMMSSZ-<short-commit-sha>` in UTC. If that release directory already exists, select the lowest free suffix from `-01` through `-99`; never reuse or overwrite a release directory, and stop if the suffix space is exhausted. Create `releases/<releaseId>`.
|
|
13
13
|
- Determine target color: read `activeColor` from `shared/deploy-metadata.json` and use the opposite. If first deploy (no metadata, no `current` symlink), default to blue (port 3101).
|
|
14
14
|
|
|
15
15
|
## Group 2 — Fetch & Build
|
|
@@ -28,14 +28,14 @@ Show what will be deployed using `git log --oneline <last-deployed-commit>..HEAD
|
|
|
28
28
|
|
|
29
29
|
- Update Nginx upstream to new port. Run `nginx -t` — abort on failure.
|
|
30
30
|
- `systemctl reload nginx`. Update `current` symlink to new release.
|
|
31
|
-
-
|
|
32
|
-
- Run health checks against public endpoint. If any fails: rollback immediately.
|
|
31
|
+
- Run health checks against the public endpoint. If any fails, rollback immediately and do not record the candidate as active.
|
|
33
32
|
|
|
34
33
|
## Group 5 — Cleanup & Record
|
|
35
34
|
|
|
36
|
-
-
|
|
37
|
-
-
|
|
35
|
+
- Allocate the collision-safe deploy event ID and atomically write deploy-history JSON using `${SKILL_DIR}/references/deploy-history-schema.md`, with event identity separate from `releaseId`.
|
|
36
|
+
- After the history record succeeds, atomically write `shared/deploy-metadata.json` from `${SKILL_DIR}/references/deploy-metadata-schema.json` with the verified `activeColor`, `activePort`, `lastReleaseId`, operation event ID, and UTC update time. If either record write fails, preserve both processes/releases, report a recording failure, and require the next operation to rediscover active state from Nginx plus the `current` symlink before retrying metadata repair.
|
|
37
|
+
- Stop the old PM2 process. Remove oldest releases beyond `releaseRetention` count. Run `pm2 save` and update `deploy.config.json` validation status.
|
|
38
38
|
|
|
39
39
|
## Post-deploy — Completion Summary
|
|
40
40
|
|
|
41
|
-
Output a summary (project, URL, version, duration, health status) and
|
|
41
|
+
Output a summary (project, URL, version, duration, health status) and update the matching sections of `deploy.md` from `${SKILL_DIR}/assets/deploy-document-template.md`; do not append duplicate headings or an event log. If `deployStrategy` is `"direct-upload"`, offer CI/CD upgrade (see §SSH: Post-Deploy CI/CD Upgrade).
|
|
@@ -1,35 +1,34 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "prizmkit-implement"
|
|
3
|
-
description: "Execute
|
|
3
|
+
description: "Execute one caller-supplied spec.md/plan.md change, including explicitly scoped repairs, focused verification, and task-marker updates. Returns IMPLEMENTED or IMPLEMENT_BLOCKED. (project)"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# PrizmKit Implement
|
|
7
7
|
|
|
8
|
-
`/prizmkit-implement` executes
|
|
8
|
+
`/prizmkit-implement` executes tasks from one caller-supplied `plan.md`, including concrete repair findings explicitly included in the request.
|
|
9
9
|
|
|
10
10
|
## When to Use
|
|
11
11
|
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
12
|
+
- A caller supplies reviewed `spec.md` and `plan.md` artifacts with incomplete tasks.
|
|
13
|
+
- A caller supplies an explicit repair scope and findings for implementation repair.
|
|
14
|
+
- `plan.md` contains unchecked or explicitly reopened tasks, or the caller requests validation of completed task markers against the current change.
|
|
15
15
|
- User says "implement", "build", "code it", "start coding", "develop", or "execute".
|
|
16
16
|
|
|
17
17
|
## When NOT to Use
|
|
18
18
|
|
|
19
|
-
- No `spec.md` and `plan.md` exist for the
|
|
20
|
-
- All planned tasks are complete and
|
|
19
|
+
- No `spec.md` and `plan.md` exist for the supplied change.
|
|
20
|
+
- All planned tasks are complete and the caller already has a valid implementation result for the unchanged current work.
|
|
21
21
|
- The user is still deciding scope or asking for planning.
|
|
22
|
-
- The request
|
|
22
|
+
- The request has no reviewed implementation artifact and does not need a formal plan.
|
|
23
23
|
|
|
24
24
|
## Preconditions and Artifact Identity
|
|
25
25
|
|
|
26
26
|
| Required artifact | Check | If missing |
|
|
27
27
|
|---|---|---|
|
|
28
|
-
| `plan.md` with Tasks | Exists
|
|
29
|
-
| `spec.md` | Exists in the same artifact directory | Return `IMPLEMENT_BLOCKED`
|
|
30
|
-
| Workflow state | Reusable or reconstructable | Reconstruct from artifacts and report the result when absent or stale. |
|
|
28
|
+
| `plan.md` with Tasks | Exists; contains incomplete/repairable work or completed markers requiring current-change validation | Return `IMPLEMENT_BLOCKED` with the missing-input reason. |
|
|
29
|
+
| `spec.md` | Exists in the same artifact directory | Return `IMPLEMENT_BLOCKED` with the missing-input reason. |
|
|
31
30
|
|
|
32
|
-
|
|
31
|
+
Require the caller to supply or confirm `artifact_dir`. Do not discover a different recent artifact. Optional repair input must include the exact findings and `repair_scope`; do not infer them from caller state.
|
|
33
32
|
|
|
34
33
|
## Context Loading
|
|
35
34
|
|
|
@@ -37,17 +36,17 @@ Before editing:
|
|
|
37
36
|
|
|
38
37
|
1. Read `plan.md`, `spec.md`, and only relevant companion artifacts.
|
|
39
38
|
2. Read `.prizmkit/prizm-docs/root.prizm` when present.
|
|
40
|
-
3.
|
|
41
|
-
4. If
|
|
39
|
+
3. Follow its pointers to only the relevant module and detail documentation.
|
|
40
|
+
4. If relevant detail documentation is missing, read the target source files as fallback and record that detailed context was unavailable. Context loading does not create or modify documentation.
|
|
42
41
|
5. Read referenced layer rules when present. If a rule conflicts with the plan, stop and ask the user unless the plan clearly supersedes the rule.
|
|
43
42
|
|
|
44
43
|
## Optional Inline Delegation
|
|
45
44
|
|
|
46
|
-
The default is direct Main-Agent implementation. If a narrow slice is delegated, use `prompt_reference: ${SKILL_DIR}/references/implementation-subagent-procedure.md` and follow its active-checkout/no-worktree constraints. Delegation is
|
|
45
|
+
The default is direct Main-Agent implementation. If a narrow slice is delegated, use `prompt_reference: ${SKILL_DIR}/references/implementation-subagent-procedure.md` and follow its active-checkout/no-worktree constraints. Delegation is an implementation-stage detail and does not change this Skill's output contract.
|
|
47
46
|
|
|
48
47
|
## Atomic Stage Boundary
|
|
49
48
|
|
|
50
|
-
`prizmkit-implement` owns only execution of plan tasks and implementation repairs. It
|
|
49
|
+
`prizmkit-implement` owns only execution of supplied plan tasks and explicitly scoped implementation repairs. It returns `IMPLEMENTED` or `IMPLEMENT_BLOCKED` and stops.
|
|
51
50
|
|
|
52
51
|
## Execution
|
|
53
52
|
|
|
@@ -61,15 +60,15 @@ For each unchecked or explicitly repair-scoped task, in plan order:
|
|
|
61
60
|
4. Avoid unrelated edits and preserve the requirement's artifact identity.
|
|
62
61
|
5. Mark a task complete immediately after its implementation is complete.
|
|
63
62
|
6. Stop dependent tasks on failure; run `[P]` tasks in parallel only when safe.
|
|
64
|
-
7. Execute
|
|
63
|
+
7. Execute focused implementation verification appropriate to the changed task; do not expand into a separate broad audit unrelated to implementation.
|
|
65
64
|
|
|
66
65
|
### Repair Scope
|
|
67
66
|
|
|
68
|
-
When
|
|
67
|
+
When the caller requests repair, require an explicit `repair_scope` and concrete findings:
|
|
69
68
|
|
|
70
|
-
- `production`, `runtime`, `schema`, `dependency`, or `public-interface`:
|
|
71
|
-
- `test-infrastructure`: tests, fixtures,
|
|
72
|
-
- `unknown`:
|
|
69
|
+
- `production`, `runtime`, `schema`, `dependency`, or `public-interface`: constrain edits to the supplied production concern.
|
|
70
|
+
- `test-infrastructure`: constrain edits to tests, fixtures, runner configuration, or evidence setup.
|
|
71
|
+
- missing or `unknown`: return `IMPLEMENT_BLOCKED`; do not guess the intended repair.
|
|
73
72
|
|
|
74
73
|
## Recovery
|
|
75
74
|
|
|
@@ -77,53 +76,18 @@ If interrupted:
|
|
|
77
76
|
|
|
78
77
|
- Reuse completed task markers and the same `artifact_dir`.
|
|
79
78
|
- Inspect any partially edited files before continuing.
|
|
80
|
-
- Reconcile
|
|
81
|
-
- Never report `IMPLEMENTED` when
|
|
79
|
+
- Reconcile plan task markers with the current diff.
|
|
80
|
+
- Never report `IMPLEMENTED` when tasks or supplied repair findings remain unresolved.
|
|
82
81
|
|
|
83
|
-
##
|
|
82
|
+
## Output
|
|
84
83
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
On successful implementation, update `.prizmkit/state/workflows/<requirement-slug>.json` with:
|
|
88
|
-
|
|
89
|
-
```json
|
|
90
|
-
{
|
|
91
|
-
"stage": "implement",
|
|
92
|
-
"status": "completed",
|
|
93
|
-
"stage_result": "IMPLEMENTED",
|
|
94
|
-
"completed_stages": ["plan", "implement"],
|
|
95
|
-
"repair_round": 0,
|
|
96
|
-
"repair_scope": null,
|
|
97
|
-
"next_stage": "code-review",
|
|
98
|
-
"resume_from": "prizmkit-code-review"
|
|
99
|
-
}
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
For a repair, increment `repair_round`, set `status=failed` and `stage_result=IMPLEMENT_REPAIR`, preserve the triggering failure in the state, and select the next stage according to `repair_scope`. The outer workflow permits at most three repair rounds; the implementation stage must return a blocked result rather than start a fourth round.
|
|
103
|
-
|
|
104
|
-
## Output and Handoff
|
|
105
|
-
|
|
106
|
-
Report:
|
|
84
|
+
Return only implementation-stage outputs:
|
|
107
85
|
|
|
86
|
+
- `artifact_dir`;
|
|
108
87
|
- implementation summary;
|
|
109
|
-
- completed and remaining
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
-
|
|
113
|
-
- exact next stage.
|
|
114
|
-
|
|
115
|
-
On initial implementation or a production-affecting repair:
|
|
116
|
-
|
|
117
|
-
```text
|
|
118
|
-
IMPLEMENTED
|
|
119
|
-
→ /prizmkit-code-review
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
On a test-infrastructure-only repair:
|
|
123
|
-
|
|
124
|
-
```text
|
|
125
|
-
IMPLEMENTED
|
|
126
|
-
→ /prizmkit-test
|
|
127
|
-
```
|
|
88
|
+
- completed and remaining task markers;
|
|
89
|
+
- changed paths;
|
|
90
|
+
- focused verification performed;
|
|
91
|
+
- `IMPLEMENTED` when all supplied work is complete, otherwise `IMPLEMENT_BLOCKED` with exact blockers.
|
|
128
92
|
|
|
129
|
-
|
|
93
|
+
Return only the listed implementation outputs. Do not invoke another Skill.
|
|
@@ -29,8 +29,8 @@ Do not create worktrees, copied repositories, remote checkouts, or branch switch
|
|
|
29
29
|
1. Read `context-snapshot.md` first when it exists.
|
|
30
30
|
2. Use Section 3 for relevant Prizm rules/traps and Section 4 File Manifest for file summaries.
|
|
31
31
|
3. Do not re-read files already summarized in the File Manifest unless a specific implementation detail is missing.
|
|
32
|
-
4. If no context snapshot exists, read `.prizmkit/prizm-docs/root.prizm`, relevant
|
|
33
|
-
5. If
|
|
32
|
+
4. If no context snapshot exists, read `.prizmkit/prizm-docs/root.prizm`, follow only relevant module/detail pointers, then read targeted source files.
|
|
33
|
+
5. If relevant detail documentation is missing, use source fallback and note the missing context without creating documentation.
|
|
34
34
|
|
|
35
35
|
## Implementation Rules
|
|
36
36
|
|
|
@@ -41,7 +41,7 @@ Do not create worktrees, copied repositories, remote checkouts, or branch switch
|
|
|
41
41
|
- Do not execute git `add`, `commit`, `reset`, `push`, branch checkout, rebase, merge, or stash operations.
|
|
42
42
|
- Do not spawn further agents.
|
|
43
43
|
- Do not perform broad repository rediscovery. Read only delegated files and targeted dependencies needed for correctness.
|
|
44
|
-
- Do not write
|
|
44
|
+
- Do not write internal execution IDs, branch names, absolute worktree paths, or runtime artifact paths into `.prizmkit/prizm-docs/`, user-visible UI text, API responses, emails, notifications, or expected product-copy tests.
|
|
45
45
|
- If creating a new sub-module, note the durable facts needed for retrospective; do not overwrite existing `.prizmkit/prizm-docs/` files in full.
|
|
46
46
|
|
|
47
47
|
## Output Format
|
|
@@ -61,7 +61,7 @@ Report exactly:
|
|
|
61
61
|
- command/check: result
|
|
62
62
|
|
|
63
63
|
### Notes for Main Agent
|
|
64
|
-
- durable decisions, missing
|
|
64
|
+
- durable decisions, missing detail documentation, or blockers
|
|
65
65
|
```
|
|
66
66
|
|
|
67
67
|
For `WRONG_CHECKOUT`, include only the checkout mismatch evidence and do not include normal implementation findings.
|
|
@@ -23,6 +23,10 @@ Recommended project initialization skill. Scans any brownfield or greenfield pro
|
|
|
23
23
|
- If artifacts already exist: idempotent status check offers regenerate/skip choices (see Phase 3: Idempotent Status Check)
|
|
24
24
|
- If no source files found in any directory: fall back to greenfield mode
|
|
25
25
|
|
|
26
|
+
### Artifact Ownership
|
|
27
|
+
|
|
28
|
+
All paths under `.prizmkit/` are framework-internal and remain outside automated task commits. Initialization must not stage or commit them. Root instruction or platform-support files written during setup also remain support data rather than task-owned source.
|
|
29
|
+
|
|
26
30
|
## Execution Steps
|
|
27
31
|
|
|
28
32
|
**Phase 1: Platform Detection**
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "prizmkit-plan"
|
|
3
|
-
description: "
|
|
3
|
+
description: "Create and review spec.md and plan.md artifacts for one supplied software requirement. Covers features, bug fixes, refactors, migrations, tests, and other scoped changes; returns PLAN_READY or PLAN_BLOCKED. (project)"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# PrizmKit Plan
|
|
7
7
|
|
|
8
|
-
`/prizmkit-plan`
|
|
8
|
+
`/prizmkit-plan` converts one caller-supplied natural-language change into a reviewed change artifact: `spec.md` defines WHAT and WHY; `plan.md` defines HOW and executable tasks.
|
|
9
9
|
|
|
10
10
|
A change artifact can describe a feature, bug fix, refactor, migration, test improvement, or another scoped requirement.
|
|
11
11
|
|
|
@@ -19,47 +19,34 @@ A change artifact can describe a feature, bug fix, refactor, migration, test imp
|
|
|
19
19
|
## When NOT to Use
|
|
20
20
|
|
|
21
21
|
- Direct edit: typo, pure formatting, small documentation edit, or another explicitly low-risk non-requirement change.
|
|
22
|
-
- The
|
|
23
|
-
|
|
24
|
-
## Formal Lifecycle
|
|
25
|
-
|
|
26
|
-
A successful plan starts this fixed lifecycle:
|
|
27
|
-
|
|
28
|
-
```text
|
|
29
|
-
plan → implement → code-review → test → retrospective → committer
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
Planning depth may be concise or comprehensive, but no later formal lifecycle stage may be silently skipped.
|
|
22
|
+
- The supplied artifact directory already has an adequate reviewed `spec.md` and `plan.md`; return the existing stage result instead of regenerating them.
|
|
33
23
|
|
|
34
24
|
## Input
|
|
35
25
|
|
|
36
26
|
| Parameter | Required | Description |
|
|
37
27
|
|---|---|---|
|
|
38
28
|
| `description` | Yes | Natural-language description of the requirement. |
|
|
39
|
-
| `artifact_dir` | No |
|
|
29
|
+
| `artifact_dir` | No | Exact caller-supplied directory for the change artifact. If omitted, create a deterministic numbered directory under `.prizmkit/specs/` using `${SKILL_DIR}/references/artifact-identity.md`. |
|
|
40
30
|
|
|
41
31
|
## Atomic Stage Boundary
|
|
42
32
|
|
|
43
|
-
`prizmkit-plan` owns
|
|
33
|
+
`prizmkit-plan` owns specification, plan, task generation, and planning-quality review for one supplied requirement. Its terminal outputs are `PLAN_READY` or `PLAN_BLOCKED`; it stops after producing that result.
|
|
44
34
|
|
|
45
35
|
## Phase 0: Initialization Check and Context
|
|
46
36
|
|
|
47
37
|
1. Check whether project context such as `.prizmkit/prizm-docs/root.prizm`, `.prizmkit/config.json`, or a project brief exists.
|
|
48
|
-
2. If initialization context is missing
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
- if the user continues, load the README, manifests, project instruction files, source structure, and relevant source files as fallback.
|
|
52
|
-
3. If Prizm docs exist, read `root.prizm`, relevant L1 docs, relevant L2 docs when present, and source fallback when L2 is absent.
|
|
53
|
-
4. Resolve `artifact_dir` once and reuse it for every later lifecycle handoff. Do not re-detect another artifact during the same requirement.
|
|
38
|
+
2. If initialization context is missing, do not block planning; load the README, manifests, project instruction files, source structure, and relevant source files as fallback.
|
|
39
|
+
3. If Prizm docs exist, read `root.prizm`, follow only its relevant module/detail pointers, and use source fallback when detailed documentation is absent.
|
|
40
|
+
4. Read `${SKILL_DIR}/references/artifact-identity.md`, validate or generate `artifact_dir` exactly once, and keep it stable throughout this planning invocation.
|
|
54
41
|
|
|
55
42
|
## Phase 1: Specify (`spec.md`)
|
|
56
43
|
|
|
57
44
|
Skip regeneration when `spec.md` already exists and still matches the requested requirement.
|
|
58
45
|
|
|
59
46
|
1. Gather the requirement description. If it is missing in an interactive run, ask the user; otherwise return a clear blocked result.
|
|
60
|
-
2. Determine the artifact directory
|
|
61
|
-
-
|
|
62
|
-
- otherwise
|
|
47
|
+
2. Determine the artifact directory through `${SKILL_DIR}/references/artifact-identity.md`:
|
|
48
|
+
- validate and preserve the exact caller-provided `artifact_dir` when present;
|
|
49
|
+
- otherwise derive the normalized title slug, allocate the next collision-safe number, and create `.prizmkit/specs/<number>-<slug>/`.
|
|
63
50
|
3. Generate `spec.md` from `${SKILL_DIR}/assets/spec-template.md`:
|
|
64
51
|
- focus on WHAT and WHY, not HOW;
|
|
65
52
|
- include only relevant sections;
|
|
@@ -86,7 +73,7 @@ Precondition: `spec.md` exists with no unresolved blocker.
|
|
|
86
73
|
- component and file changes;
|
|
87
74
|
- data migration approach when relevant;
|
|
88
75
|
- interface/API contract design when relevant;
|
|
89
|
-
- test strategy
|
|
76
|
+
- project-native test strategy appropriate to the requirement;
|
|
90
77
|
- risks and mitigations;
|
|
91
78
|
- behavior-preservation strategy for refactors.
|
|
92
79
|
5. Cross-check every spec goal against the plan.
|
|
@@ -98,7 +85,7 @@ Precondition: `spec.md` exists with no unresolved blocker.
|
|
|
98
85
|
2. Append `## Tasks` to `plan.md` using `${SKILL_DIR}/assets/plan-template.md`.
|
|
99
86
|
3. Include setup, foundation, core, polish, and checkpoint tasks only when applicable.
|
|
100
87
|
4. Mark `[P]` only for tasks that can safely execute independently.
|
|
101
|
-
5. Include implementation-local
|
|
88
|
+
5. Include appropriate implementation-local and regression verification tasks without executing them during planning.
|
|
102
89
|
6. Run `${SKILL_DIR}/references/verification-checklist.md` and repair plan defects.
|
|
103
90
|
|
|
104
91
|
## Phase 4: Plan/Spec Review Loop
|
|
@@ -113,7 +100,7 @@ Run every time `spec.md` or `plan.md` is created or changed. This is the mandato
|
|
|
113
100
|
6. If a `BLOCKER` remains, ask targeted questions in interactive mode; otherwise record `PLAN_BLOCKED` and stop.
|
|
114
101
|
7. Continue only when no unresolved blocker remains.
|
|
115
102
|
|
|
116
|
-
The planning review must not
|
|
103
|
+
The planning review must not modify product/source code or execute the planned verification strategy.
|
|
117
104
|
|
|
118
105
|
## Phase 5: Independent Plan Review
|
|
119
106
|
|
|
@@ -127,47 +114,17 @@ Run only after the Main-Agent Plan/Spec review converges. This optional check ne
|
|
|
127
114
|
6. If neither compliant continuation nor replacement is available after modification, record downgrade and rerun the Main-Agent local Plan/Spec review over that modification as specified by the reference.
|
|
128
115
|
7. If the final allowed response causes a modification, run targeted verification, record that the final state was not independently rechecked, and do not exceed the response budget.
|
|
129
116
|
8. Append the terminal `## Independent Plan Review` record. Appending that audit record does not trigger another response.
|
|
130
|
-
9. Any unresolved correction produces `PLAN_BLOCKED`; otherwise independent convergence or strict downgrade
|
|
131
|
-
|
|
132
|
-
## Phase 6: Workflow State and Handoff
|
|
133
|
-
|
|
134
|
-
Read `${SKILL_DIR}/references/workflow-state-protocol.md` and create or update:
|
|
135
|
-
|
|
136
|
-
```text
|
|
137
|
-
.prizmkit/state/workflows/<requirement-slug>.json
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
Follow the bundled protocol. At minimum record:
|
|
141
|
-
|
|
142
|
-
```json
|
|
143
|
-
{
|
|
144
|
-
"schema_version": 1,
|
|
145
|
-
"artifact_dir": ".prizmkit/specs/001-example",
|
|
146
|
-
"stage": "plan",
|
|
147
|
-
"status": "completed",
|
|
148
|
-
"stage_result": "PLAN_READY",
|
|
149
|
-
"completed_stages": ["plan"],
|
|
150
|
-
"repair_round": 0,
|
|
151
|
-
"repair_scope": null,
|
|
152
|
-
"next_stage": "implement",
|
|
153
|
-
"resume_from": "prizmkit-implement"
|
|
154
|
-
}
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
The state file is runtime metadata. Do not change the target project's Git or ignore policy.
|
|
117
|
+
9. Any unresolved correction produces `PLAN_BLOCKED`; otherwise independent convergence or strict downgrade produces `PLAN_READY`.
|
|
158
118
|
|
|
159
119
|
## Output
|
|
160
120
|
|
|
161
|
-
|
|
162
|
-
- Workflow state with `PLAN_READY` or a truthful blocked result.
|
|
163
|
-
- Planning depth, key decisions, task count, and checkpoint summary.
|
|
164
|
-
- The same `artifact_dir` for every downstream stage.
|
|
165
|
-
|
|
166
|
-
## Handoff
|
|
121
|
+
Return only planning-stage outputs:
|
|
167
122
|
|
|
168
|
-
|
|
123
|
+
- the resolved `artifact_dir`;
|
|
124
|
+
- `spec.md` and `plan.md` paths;
|
|
125
|
+
- planning depth, key decisions, and task count;
|
|
126
|
+
- `PLAN_READY` when artifacts pass planning review, otherwise `PLAN_BLOCKED` with unresolved planning blockers.
|
|
169
127
|
|
|
170
|
-
|
|
171
|
-
2. For direct stage use with no active orchestrator, report exactly one deterministic next action: `/prizmkit-implement`, with `stage_result=PLAN_READY`, the state-file path, and `artifact_dir`; a host may perform that semantic handoff on the user's behalf.
|
|
128
|
+
Return only the listed planning outputs. Do not invoke another Skill.
|
|
172
129
|
|
|
173
130
|
Read `${SKILL_DIR}/references/examples.md` only when a worked planning example is needed.
|