prizmkit 1.1.154 → 1.1.156

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.
Files changed (164) hide show
  1. package/bundled/VERSION.json +3 -3
  2. package/bundled/adapters/codex/skill-adapter.js +1 -1
  3. package/bundled/adapters/pi/skill-adapter.js +2 -1
  4. package/bundled/dev-pipeline/.env.example +2 -6
  5. package/bundled/dev-pipeline/README.md +21 -27
  6. package/bundled/dev-pipeline/prizmkit_runtime/checkpoint_state.py +341 -15
  7. package/bundled/dev-pipeline/prizmkit_runtime/cli.py +0 -3
  8. package/bundled/dev-pipeline/prizmkit_runtime/daemon.py +1 -15
  9. package/bundled/dev-pipeline/prizmkit_runtime/gitops.py +48 -14
  10. package/bundled/dev-pipeline/prizmkit_runtime/runner_classification.py +50 -2
  11. package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +0 -9
  12. package/bundled/dev-pipeline/prizmkit_runtime/runner_prompts.py +3 -3
  13. package/bundled/dev-pipeline/prizmkit_runtime/runners.py +120 -22
  14. package/bundled/dev-pipeline/prizmkit_runtime/runtime_commit.py +482 -0
  15. package/bundled/dev-pipeline/prizmkit_runtime/test_result.py +64 -11
  16. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +145 -367
  17. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +91 -62
  18. package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +105 -69
  19. package/bundled/dev-pipeline/scripts/prompt_framework.py +36 -41
  20. package/bundled/dev-pipeline/scripts/update-bug-status.py +1 -4
  21. package/bundled/dev-pipeline/scripts/update-checkpoint.py +61 -13
  22. package/bundled/dev-pipeline/scripts/update-feature-status.py +1 -4
  23. package/bundled/dev-pipeline/scripts/update-refactor-status.py +1 -4
  24. package/bundled/dev-pipeline/templates/bootstrap-prompt.md +22 -27
  25. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +71 -104
  26. package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +59 -111
  27. package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +37 -72
  28. package/bundled/dev-pipeline/templates/sections/artifact-manifest.md +39 -0
  29. package/bundled/dev-pipeline/templates/sections/bugfix-critical-paths.md +3 -1
  30. package/bundled/dev-pipeline/templates/sections/bugfix-phase-commit-report.md +8 -25
  31. package/bundled/dev-pipeline/templates/sections/bugfix-phase-diagnose-plan.md +3 -3
  32. package/bundled/dev-pipeline/templates/sections/bugfix-phase-implement.md +2 -2
  33. package/bundled/dev-pipeline/templates/sections/bugfix-phase-review.md +3 -3
  34. package/bundled/dev-pipeline/templates/sections/bugfix-phase-test.md +2 -2
  35. package/bundled/dev-pipeline/templates/sections/bugfix-reminders.md +4 -4
  36. package/bundled/dev-pipeline/templates/sections/bugfix-session-context.md +0 -1
  37. package/bundled/dev-pipeline/templates/sections/checkpoint-system.md +7 -4
  38. package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +14 -27
  39. package/bundled/dev-pipeline/templates/sections/feature-completion-summary.md +20 -0
  40. package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +8 -71
  41. package/bundled/dev-pipeline/templates/sections/phase-implement-full.md +7 -7
  42. package/bundled/dev-pipeline/templates/sections/phase-prizmkit-test.md +3 -3
  43. package/bundled/dev-pipeline/templates/sections/phase-review-full.md +4 -4
  44. package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +5 -17
  45. package/bundled/dev-pipeline/templates/sections/refactor-critical-paths.md +3 -1
  46. package/bundled/dev-pipeline/templates/sections/refactor-phase-commit-report.md +10 -23
  47. package/bundled/dev-pipeline/templates/sections/refactor-phase-implement.md +2 -2
  48. package/bundled/dev-pipeline/templates/sections/refactor-phase-plan.md +2 -2
  49. package/bundled/dev-pipeline/templates/sections/refactor-phase-review.md +3 -3
  50. package/bundled/dev-pipeline/templates/sections/refactor-phase-test.md +2 -2
  51. package/bundled/dev-pipeline/templates/sections/refactor-reminders.md +7 -7
  52. package/bundled/dev-pipeline/templates/sections/refactor-session-context.md +0 -1
  53. package/bundled/dev-pipeline/templates/sections/retrospective.md +12 -0
  54. package/bundled/dev-pipeline/templates/sections/runtime-commit-handoff.md +35 -0
  55. package/bundled/dev-pipeline/templates/session-status-schema.json +45 -62
  56. package/bundled/dev-pipeline/tests/test_checkpoint_state.py +469 -18
  57. package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +262 -175
  58. package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +62 -23
  59. package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +76 -28
  60. package/bundled/dev-pipeline/tests/test_python_runner_parity.py +168 -18
  61. package/bundled/dev-pipeline/tests/test_recovery_workflow.py +111 -0
  62. package/bundled/dev-pipeline/tests/test_reset_preserve.py +0 -2
  63. package/bundled/dev-pipeline/tests/test_runtime_commit.py +608 -0
  64. package/bundled/dev-pipeline/tests/test_unified_cli.py +167 -25
  65. package/bundled/skills/_metadata.json +9 -9
  66. package/bundled/skills/app-planner/SKILL.md +3 -3
  67. package/bundled/skills/app-planner/references/generated-plan-review.md +2 -1
  68. package/bundled/skills/app-planner/references/rules/backend/derivation-rules.md +56 -64
  69. package/bundled/skills/app-planner/references/rules/backend/fixed-rules.md +85 -240
  70. package/bundled/skills/app-planner/references/rules/backend/question-bank.md +25 -25
  71. package/bundled/skills/app-planner/references/rules/backend/question-manifest.json +16 -7
  72. package/bundled/skills/app-planner/references/rules/backend/template.md +74 -92
  73. package/bundled/skills/app-planner/references/rules/database/derivation-rules.md +93 -93
  74. package/bundled/skills/app-planner/references/rules/database/fixed-rules.md +66 -173
  75. package/bundled/skills/app-planner/references/rules/database/question-bank.md +31 -26
  76. package/bundled/skills/app-planner/references/rules/database/question-manifest.json +13 -4
  77. package/bundled/skills/app-planner/references/rules/database/template.md +76 -98
  78. package/bundled/skills/app-planner/references/rules/frontend/derivation-rules.md +68 -95
  79. package/bundled/skills/app-planner/references/rules/frontend/fixed-rules.md +93 -166
  80. package/bundled/skills/app-planner/references/rules/frontend/question-bank.md +46 -36
  81. package/bundled/skills/app-planner/references/rules/frontend/question-manifest.json +11 -2
  82. package/bundled/skills/app-planner/references/rules/frontend/template.md +79 -257
  83. package/bundled/skills/app-planner/references/rules/mobile/derivation-rules.md +91 -99
  84. package/bundled/skills/app-planner/references/rules/mobile/fixed-rules.md +73 -246
  85. package/bundled/skills/app-planner/references/rules/mobile/question-bank.md +17 -17
  86. package/bundled/skills/app-planner/references/rules/mobile/question-manifest.json +17 -2
  87. package/bundled/skills/app-planner/references/rules/mobile/template.md +73 -85
  88. package/bundled/skills/app-planner/references/rules-configuration.md +133 -65
  89. package/bundled/skills/app-planner/scripts/validate-rules-configuration.py +291 -0
  90. package/bundled/skills/prizmkit/SKILL.md +17 -18
  91. package/bundled/skills/prizmkit/references/workflow-state-protocol.md +22 -18
  92. package/bundled/skills/prizmkit-code-review/SKILL.md +22 -58
  93. package/bundled/skills/prizmkit-code-review/references/independent-code-review.md +6 -6
  94. package/bundled/skills/prizmkit-code-review/references/review-report-template.md +2 -2
  95. package/bundled/skills/prizmkit-committer/SKILL.md +82 -132
  96. package/bundled/skills/prizmkit-deploy/SKILL.md +27 -11
  97. package/bundled/skills/prizmkit-deploy/assets/deploy-document-template.md +89 -0
  98. package/bundled/skills/prizmkit-deploy/references/ci-cd-workflows.md +44 -14
  99. package/bundled/skills/prizmkit-deploy/references/cloud-platform-deploy.md +19 -3
  100. package/bundled/skills/prizmkit-deploy/references/database-setup.md +22 -12
  101. package/bundled/skills/prizmkit-deploy/references/deploy-config-schema.md +3 -1
  102. package/bundled/skills/prizmkit-deploy/references/deploy-history-schema.md +22 -6
  103. package/bundled/skills/prizmkit-deploy/references/deploy-metadata-schema.json +49 -0
  104. package/bundled/skills/prizmkit-deploy/references/live-validation-notes.md +1 -1
  105. package/bundled/skills/prizmkit-deploy/references/pending-input-schema.json +164 -0
  106. package/bundled/skills/prizmkit-deploy/references/ssh-adapter-flow.md +9 -8
  107. package/bundled/skills/prizmkit-deploy/references/ssh-execution-flow.md +6 -6
  108. package/bundled/skills/prizmkit-implement/SKILL.md +30 -66
  109. package/bundled/skills/prizmkit-implement/references/implementation-subagent-procedure.md +4 -4
  110. package/bundled/skills/prizmkit-init/SKILL.md +4 -0
  111. package/bundled/skills/prizmkit-plan/SKILL.md +21 -64
  112. package/bundled/skills/prizmkit-plan/references/artifact-identity.md +38 -0
  113. package/bundled/skills/prizmkit-plan/references/independent-plan-review.md +4 -4
  114. package/bundled/skills/prizmkit-plan/references/review-plan-spec-loop.md +5 -5
  115. package/bundled/skills/prizmkit-prizm-docs/SKILL.md +75 -11
  116. package/bundled/skills/prizmkit-prizm-docs/assets/prizm-docs-format.md +191 -56
  117. package/bundled/skills/prizmkit-prizm-docs/references/op-init.md +18 -18
  118. package/bundled/skills/prizmkit-prizm-docs/references/op-rebuild.md +14 -8
  119. package/bundled/skills/prizmkit-prizm-docs/references/op-status.md +12 -5
  120. package/bundled/skills/prizmkit-prizm-docs/references/op-update.md +23 -12
  121. package/bundled/skills/prizmkit-prizm-docs/references/op-validate.md +13 -9
  122. package/bundled/skills/prizmkit-retrospective/SKILL.md +94 -97
  123. package/bundled/skills/prizmkit-retrospective/references/knowledge-injection-steps.md +79 -37
  124. package/bundled/skills/prizmkit-retrospective/references/retrospective-result-schema.json +138 -0
  125. package/bundled/skills/prizmkit-retrospective/references/structural-sync-steps.md +111 -54
  126. package/bundled/skills/prizmkit-test/SKILL.md +64 -51
  127. package/bundled/skills/prizmkit-test/references/boundary-contract-and-test-double-guidance.md +206 -0
  128. package/bundled/skills/prizmkit-test/references/independent-test-review.md +17 -9
  129. package/bundled/skills/prizmkit-test/references/test-coverage-model.md +45 -21
  130. package/bundled/skills/prizmkit-test/references/test-report-template.md +20 -13
  131. package/bundled/skills/prizmkit-workflow/SKILL.md +35 -37
  132. package/bundled/skills/prizmkit-workflow/references/artifact-identity.md +34 -0
  133. package/bundled/skills/prizmkit-workflow/references/workflow-state-protocol.md +22 -18
  134. package/bundled/skills/recovery-workflow/SKILL.md +2 -1
  135. package/bundled/skills/recovery-workflow/references/detection.md +4 -3
  136. package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +15 -5
  137. package/bundled/templates/hooks/validate-prizm-docs.py +124 -12
  138. package/package.json +1 -1
  139. package/src/scaffold.js +33 -22
  140. package/bundled/dev-pipeline/templates/sections/bugfix-artifacts.md +0 -16
  141. package/bundled/dev-pipeline/templates/sections/bugfix-session-status.md +0 -31
  142. package/bundled/dev-pipeline/templates/sections/critical-paths-agent.md +0 -7
  143. package/bundled/dev-pipeline/templates/sections/critical-paths-lite.md +0 -7
  144. package/bundled/dev-pipeline/templates/sections/directory-convention-agent.md +0 -9
  145. package/bundled/dev-pipeline/templates/sections/directory-convention-lite.md +0 -6
  146. package/bundled/dev-pipeline/templates/sections/headless-commit-authorization.md +0 -15
  147. package/bundled/dev-pipeline/templates/sections/phase-commit.md +0 -61
  148. package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-agent-suffix.md +0 -24
  149. package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-lite-suffix.md +0 -12
  150. package/bundled/dev-pipeline/templates/sections/phase-implement-agent.md +0 -44
  151. package/bundled/dev-pipeline/templates/sections/phase-implement-lite.md +0 -25
  152. package/bundled/dev-pipeline/templates/sections/phase-plan-agent.md +0 -20
  153. package/bundled/dev-pipeline/templates/sections/phase-plan-lite.md +0 -20
  154. package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +0 -20
  155. package/bundled/dev-pipeline/templates/sections/refactor-artifacts.md +0 -17
  156. package/bundled/dev-pipeline/templates/sections/refactor-session-status.md +0 -28
  157. package/bundled/dev-pipeline/templates/sections/test-failure-recovery-agent.md +0 -52
  158. package/bundled/dev-pipeline/templates/sections/test-failure-recovery-lite.md +0 -52
  159. package/bundled/skills/prizmkit-code-review/references/workflow-state-protocol.md +0 -174
  160. package/bundled/skills/prizmkit-committer/references/workflow-state-protocol.md +0 -174
  161. package/bundled/skills/prizmkit-implement/references/workflow-state-protocol.md +0 -174
  162. package/bundled/skills/prizmkit-plan/references/workflow-state-protocol.md +0 -174
  163. package/bundled/skills/prizmkit-retrospective/references/workflow-state-protocol.md +0 -174
  164. package/bundled/skills/prizmkit-test/references/external-contract-mock-guidance.md +0 -119
@@ -40,7 +40,23 @@ Platform rollback is instant — no release-based rollback needed.
40
40
 
41
41
  ### Vercel
42
42
 
43
- Vercel auto-detects Next.js projects — no config file required for basic deployments. Generate `vercel.json` only for custom rewrites, redirects, or headers.
43
+ Vercel auto-detects Next.js projects — no config file is generated for basic deployments. When confirmed custom routing or static build settings require `vercel.json`, start from this minimal platform-native shape and include only established keys:
44
+
45
+ ```json
46
+ {
47
+ "$schema": "https://openapi.vercel.sh/vercel.json",
48
+ "buildCommand": "npm run build",
49
+ "outputDirectory": "dist",
50
+ "rewrites": [
51
+ {
52
+ "source": "/(.*)",
53
+ "destination": "/index.html"
54
+ }
55
+ ]
56
+ }
57
+ ```
58
+
59
+ Omit `buildCommand`/`outputDirectory` when framework detection owns them, and omit `rewrites` unless the application actually needs SPA fallback or a confirmed route. Validate generated configuration with the installed Vercel CLI before deployment.
44
60
 
45
61
  Key behaviors:
46
62
  - Next.js: framework auto-detected, build command and output directory inferred automatically
@@ -77,7 +93,7 @@ app = "<app-name>"
77
93
  primary_region = "lhr"
78
94
 
79
95
  [build]
80
- builder = "dockerfile"
96
+ dockerfile = "Dockerfile"
81
97
 
82
98
  [http_service]
83
99
  internal_port = 3000
@@ -85,7 +101,7 @@ primary_region = "lhr"
85
101
  ```
86
102
 
87
103
  Key behaviors:
88
- - Builder: `dockerfile` (default, uses Dockerfile) or `static` (static site hosting)
104
+ - Build source: `dockerfile = "Dockerfile"` for project-owned images, or a confirmed platform-supported image/build configuration; static sites still need a valid serving image rather than an invented `static` builder value
89
105
  - Secrets: `fly secrets set <KEY>=<VALUE>` for runtime environment variables
90
106
  - Scale: `fly scale count <N>` to adjust VM instances
91
107
  - Volumes: for persistent data, configure `[mounts]` in fly.toml
@@ -12,12 +12,13 @@ During Discovery Step 1 (Project Detection), database drivers were already scann
12
12
 
13
13
  ## Secrets file safety
14
14
 
15
- Before writing `.prizmkit/deploy/secrets.local.json`:
15
+ Before writing `.prizmkit/deploy/secrets.local.env`:
16
16
 
17
- 1. Verify `.gitignore` or an equivalent ignore rule covers `.prizmkit/deploy/secrets.local.json` and any `.prizmkit/deploy/*.local.json` pattern used by the project.
18
- 2. If the ignore rule is missing, pause and add or request the ignore rule before writing secrets.
19
- 3. Set the secrets file permissions to current-user read/write only, for example `chmod 600 .prizmkit/deploy/secrets.local.json` on POSIX systems.
20
- 4. Record only presence metadata in deploy config, docs, reports, and history. Never copy raw passwords, connection strings, passphrases, decryption keys, unsalted hashes, or full env var values into committed files.
17
+ 1. Verify `.gitignore` or an equivalent ignore rule covers the exact `.prizmkit/deploy/secrets.local.env` path or a compatible `.prizmkit/deploy/*.local.env` pattern.
18
+ 2. If the ignore rule is missing, pause and add or request it before writing secrets.
19
+ 3. Create/update the file with restrictive creation permissions (for example `umask 077` on POSIX), atomically replace it without widening permissions, set mode `600`, and verify it is ignored by Git.
20
+ 4. Use dotenv syntax: one `KEY=value` assignment per line, UTF-8, no JSON braces or commas. Preserve unrelated existing assignments and reject malformed or duplicate keys.
21
+ 5. Record only presence metadata in deploy config, docs, reports, and history. Never copy raw passwords, connection strings, passphrases, decryption keys, unsalted hashes, or full env var values into committed files.
21
22
 
22
23
  ```
23
24
  apt-get install -y postgresql postgresql-contrib
@@ -26,10 +27,19 @@ sudo -u postgres psql -c "CREATE USER <project> WITH PASSWORD '<random-password>
26
27
  sudo -u postgres psql -c "GRANT ALL ON DATABASE <project> TO <project>;"
27
28
  ```
28
29
 
29
- - Generate a secure random password (32 chars, alphanumeric + symbols).
30
- - Write the connection string to `.prizmkit/deploy/secrets.local.json`: `DATABASE_URL=postgresql://<project>:<password>@localhost:5432/<project>`.
31
- - Set `.prizmkit/deploy/secrets.local.json` permissions to current-user read/write only after writing.
32
- - In deploy.md, write: "PostgreSQL installed, connection info recorded in `.prizmkit/deploy/secrets.local.json` (gitignored; raw value not committed)".
30
+ - Generate a cryptographically secure 32-character URL-safe password using letters, digits, `_`, and `-`, with no whitespace, quotes, `#`, or `=`.
31
+ - Write or replace the single dotenv assignment `DATABASE_URL=postgresql://<project>:<password>@localhost:5432/<project>` in `.prizmkit/deploy/secrets.local.env`.
32
+ - Re-verify ignore status and current-user-only permissions after atomic replacement.
33
+ - In `deploy.md`, record only: "PostgreSQL connection information is stored in ignored local secret storage; raw values are not committed."
34
+
35
+ ## Legacy Local-Secret Migration
36
+
37
+ If `.prizmkit/deploy/secrets.local.json` already exists from an earlier installation, treat the filename as legacy input only, never as a current output:
38
+
39
+ 1. Verify it is ignored by Git and restricted to the current user before reading it.
40
+ 2. Detect either a JSON object containing string values or strict dotenv `KEY=value` lines; reject mixed, malformed, duplicate, or non-string content without printing values.
41
+ 3. Convert the validated assignments to `.prizmkit/deploy/secrets.local.env` through the restrictive atomic-write rules above.
42
+ 4. Compare key names and presence only. Remove the legacy file only after successful conversion and explicit user confirmation; otherwise leave it untouched and report migration pending.
33
43
 
34
44
  ## MySQL setup (future)
35
45
 
@@ -44,12 +54,12 @@ redis-cli CONFIG REWRITE
44
54
  ```
45
55
 
46
56
  - Bind to localhost only (modify `/etc/redis/redis.conf` if needed).
47
- - Write `REDIS_URL=redis://:<password>@localhost:6379` to `.prizmkit/deploy/secrets.local.json`.
48
- - Set `.prizmkit/deploy/secrets.local.json` permissions to current-user read/write only after writing.
57
+ - Write or replace the single dotenv assignment `REDIS_URL=redis://:<password>@localhost:6379` in `.prizmkit/deploy/secrets.local.env` using the same URL-safe password and atomic permission rules.
58
+ - Re-verify ignore status and current-user-only permissions after replacement.
49
59
 
50
60
  ## Security notes
51
61
 
52
62
  - Never write database passwords to deploy.md, because deploy.md may be committed to git and passwords would leak.
53
- - Passwords stored in `.prizmkit/deploy/secrets.local.json` only after verifying the file is ignored by git and locked down to current-user read/write permissions.
63
+ - Passwords are stored only in `.prizmkit/deploy/secrets.local.env` after verifying the file is ignored by Git and locked down to current-user read/write permissions.
54
64
  - Default: database binds to localhost, no external access, because most indie projects only need local connections.
55
65
  - Record a `"database-setup"` event in deploy history (presence metadata only, no passwords).
@@ -26,12 +26,14 @@ This file is the machine-readable deployment configuration. Always read it befor
26
26
  {
27
27
  "releaseRetention": 5,
28
28
  "credentialMode": "ai-assisted|user-managed",
29
- "secretStorage": "ask-every-time|encrypted-local|plaintext-local|user-managed-on-server-only",
29
+ "secretStorage": "ask-every-time|ignored-local-env|user-managed-on-server-only",
30
30
  "rollbackOnFailure": true,
31
31
  "headlessDefaultEnvironment": "test"
32
32
  }
33
33
  ```
34
34
 
35
+ `ignored-local-env` means `.prizmkit/deploy/secrets.local.env` after exact ignore and permission verification. Legacy `plaintext-local` may be migrated only through the local-secret migration contract. Legacy `encrypted-local` is unsupported because this Skill has no encryption/key-management implementation; block deployment and require the user to select a supported mode without exposing secret values.
36
+
35
37
  ## environments
36
38
 
37
39
  Keyed by environment name. Each entry:
@@ -1,17 +1,18 @@
1
1
  # Deploy History Record Schema
2
2
 
3
- Each event in `.prizmkit/deploy/deploy-history/<id>.json` follows this schema:
3
+ Each immutable event is written atomically to `.prizmkit/deploy/deploy-history/<eventId>.json`. The filename stem must equal the JSON `eventId` exactly.
4
4
 
5
5
  ```json
6
6
  {
7
- "eventId": "<releaseId or event id>",
8
- "eventType": "deploy|rollback|status|validation|failed-deploy|user-aborted|takeover|adapter-gap",
9
- "timestamp": "<ISO 8601>",
7
+ "eventId": "deploy-20260430T142233Z-22783a3",
8
+ "eventType": "deploy|rollback|status|validation|failed-deploy|user-aborted|takeover|adapter-gap|database-setup",
9
+ "timestamp": "<ISO 8601 UTC>",
10
+ "releaseId": "20260430T142233Z-22783a3 or null",
10
11
  "serverId": "<server id from deploy.config.json>",
11
12
  "appIds": ["<app ids involved>"],
12
13
  "branch": "<git branch>",
13
14
  "commitSha": "<full or short commit SHA>",
14
- "releasePath": "<full server path, e.g. /var/www/prizm-ideas/releases/20260430-22783a3>",
15
+ "releasePath": "<full server path, e.g. /var/www/prizm-ideas/releases/20260430T142233Z-22783a3>",
15
16
  "previousReleasePath": "<previous release path or null for first deploy>",
16
17
  "targetPort": 3101,
17
18
  "targetColor": "blue|green",
@@ -45,9 +46,24 @@ Each event in `.prizmkit/deploy/deploy-history/<id>.json` follows this schema:
45
46
  }
46
47
  ```
47
48
 
49
+ ## Event and File Identity
50
+
51
+ Generate every `eventId` as:
52
+
53
+ ```text
54
+ <event-type>-<UTC-compact-timestamp>-<short-sha-or-none>[-NN]
55
+ ```
56
+
57
+ Rules:
58
+
59
+ - `UTC-compact-timestamp` is the event time formatted `YYYYMMDDTHHMMSSZ`.
60
+ - `short-sha` is the lowercase 7-12 hexadecimal commit prefix when a commit exists; otherwise use literal `none`.
61
+ - If the candidate filename already exists, append the lowest available two-digit suffix from `-01` through `-99`; never overwrite a history record. If all suffixes are occupied, stop with a recording error.
62
+ - Use the exact event ID as the filename stem. Example: `rollback-20260430T151000Z-22783a3.json`.
63
+ - `releaseId` is a separate deployment/release-directory identity. Set it to the affected release for deploy, failed-deploy, and rollback events; otherwise use `null` when no release applies.
64
+
48
65
  ## Field Notes
49
66
 
50
- - `eventId`: Use `<releaseId>` for deploy events, `<releaseId>-rollback` for rollbacks.
51
67
  - `eventType`: Use `failed-deploy` when deploy fails before traffic switch, `deploy` when it succeeds. Use `adapter-gap` when no adapter exists for the detected project type or target — include `detectedProjectType`, `missingAdapter`, and `fallbackOutput` in the record.
52
68
  - `phases`: Only include phases that were attempted. Skip phases that were never reached.
53
69
  - `healthCheckResults`: Include all configured health checks. `pass` = actual status matches one of the expected status codes.
@@ -0,0 +1,49 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "PrizmKit Server Deployment Metadata",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": [
7
+ "schema_version",
8
+ "activeColor",
9
+ "activePort",
10
+ "lastReleaseId",
11
+ "lastOperationEventId",
12
+ "updatedAt"
13
+ ],
14
+ "properties": {
15
+ "schema_version": {
16
+ "const": 1
17
+ },
18
+ "activeColor": {
19
+ "enum": ["blue", "green"]
20
+ },
21
+ "activePort": {
22
+ "type": "integer",
23
+ "minimum": 1,
24
+ "maximum": 65535
25
+ },
26
+ "lastReleaseId": {
27
+ "type": "string",
28
+ "pattern": "^[0-9]{8}T[0-9]{6}Z-[0-9a-f]{7,12}(?:-[0-9]{2})?$"
29
+ },
30
+ "lastOperationEventId": {
31
+ "type": "string",
32
+ "pattern": "^[a-z][a-z-]*-[0-9]{8}T[0-9]{6}Z-(?:[0-9a-f]{7,12}|none)(?:-[0-9]{2})?$"
33
+ },
34
+ "updatedAt": {
35
+ "type": "string",
36
+ "format": "date-time"
37
+ }
38
+ },
39
+ "examples": [
40
+ {
41
+ "schema_version": 1,
42
+ "activeColor": "blue",
43
+ "activePort": 3101,
44
+ "lastReleaseId": "20260430T142233Z-22783a3",
45
+ "lastOperationEventId": "deploy-20260430T142233Z-22783a3",
46
+ "updatedAt": "2026-04-30T14:22:33Z"
47
+ }
48
+ ]
49
+ }
@@ -12,7 +12,7 @@ These findings from the first PrizmKit deployment (PrizmIdeas) guide edge-case h
12
12
 
13
13
  5. **`pm2 startup` needs explicit PATH.** Always use `env PATH=$PATH:/usr/bin pm2 startup ...`, because the pm2 binary may not be on root's default PATH.
14
14
 
15
- 6. **Persist deploy metadata on server.** Write `activeColor`, `activePort`, `lastReleaseId`, `lastDeployTimestamp` to `shared/deploy-metadata.json`, because subsequent deploys and rollbacks depend on knowing the current active slot.
15
+ 6. **Persist deploy metadata on server.** After public health and history recording succeed, atomically write `shared/deploy-metadata.json` from `${SKILL_DIR}/references/deploy-metadata-schema.json`, including active color/port, release identity, operation event identity, and UTC update time. Subsequent deploys and rollbacks depend on this active-slot record.
16
16
 
17
17
  7. **Detect first deployment.** If no `current` symlink and no PM2 process for the app, skip rollback safety checks and use blue (3101) as initial color.
18
18
 
@@ -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` must be mode `600` and owned by the runtime user.
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. Write rollback event.
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
- - `encrypted-local`
181
- - `plaintext-local`
181
+ - `ignored-local-env`
182
182
  - `user-managed-on-server-only`
183
183
 
184
184
  Rules:
185
185
 
186
- - `plaintext-local` must be gitignored; stop if tracked by git.
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`: `YYYYMMDD-<short-commit-sha>`. Create `releases/<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
- - Write `shared/deploy-metadata.json` with new `activeColor`, `activePort`, `lastReleaseId`.
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
- - Stop old PM2 process. Remove oldest releases beyond `releaseRetention` count. `pm2 save`.
37
- - Write deploy-history JSON. Update `deploy.config.json` validation status.
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 append to deploy.md. If `deployStrategy` is `"direct-upload"`, offer CI/CD upgrade (see §SSH: Post-Deploy CI/CD Upgrade).
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 the reviewed plan for a formal PrizmKit requirement, update task checkpoints, preserve the shared workflow artifact directory, and hand off to prizmkit-code-review. Use after prizmkit-plan or when resuming implementation repair. (project)"
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 the tasks in one formal requirement's `plan.md`. It is the implementation stage, including implementation repairs requested by code review or testing.
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
- - After `/prizmkit-plan` reports `PLAN_READY`.
13
- - When workflow state routes a review or test repair back to implementation.
14
- - When `plan.md` contains unchecked tasks for the active requirement.
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 formal requirement.
20
- - All planned tasks are complete and no repair scope is recorded.
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 is a direct low-risk edit outside the formal requirement lifecycle.
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 and contains incomplete or explicitly repairable work | Return `IMPLEMENT_BLOCKED` and direct the user to `/prizmkit-plan`. |
29
- | `spec.md` | Exists in the same artifact directory | Return `IMPLEMENT_BLOCKED` and direct the user to `/prizmkit-plan`. |
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
- Accept `artifact_dir` from the preceding skill or workflow state. Do not scan for a different most-recent plan when invoked as a handoff. A single requirement must reuse the same `artifact_dir` throughout all stages.
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. Read relevant L1 docs and relevant L2 docs when present.
41
- 4. If an affected L2 doc is missing, read the target source files as fallback and record that no L2 context was available. Do not create L2 merely because it was read; retrospective decides whether durable knowledge warrants it.
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 optional implementation detail and does not alter lifecycle handoff or ownership.
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 writes its truthful terminal result and `next_stage`, then returns control. When an external orchestrator is active, it must not invoke code review or test itself. The active orchestrator owns the next-stage invocation.
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 only local implementation verification here. The mandatory full lifecycle code review follows implementation and the mandatory auditable test stage follows code review.
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 routed from a failed test or review, read `repair_scope` from workflow state and constrain edits accordingly:
67
+ When the caller requests repair, require an explicit `repair_scope` and concrete findings:
69
68
 
70
- - `production`, `runtime`, `schema`, `dependency`, or `public-interface`: production-affecting changes. Completion must hand off to `prizmkit-code-review`.
71
- - `test-infrastructure`: tests, fixtures, test runner configuration, or evidence setup only. Completion may hand off directly to `prizmkit-test`.
72
- - `unknown`: stop and ask the user; do not guess which downstream gates can be skipped.
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 workflow state with the plan and current diff.
81
- - Never report `IMPLEMENTED` when incomplete tasks or unresolved repair work remain.
79
+ - Reconcile plan task markers with the current diff.
80
+ - Never report `IMPLEMENTED` when tasks or supplied repair findings remain unresolved.
82
81
 
83
- ## Workflow State
82
+ ## Output
84
83
 
85
- Before reading or updating workflow state, read `${SKILL_DIR}/references/workflow-state-protocol.md`.
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 tasks;
110
- - files changed;
111
- - local verification performed;
112
- - workflow state path and status;
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
- If workflow state names an active `orchestrator`, return the terminal result, state path, and selected next stage to it; do not invoke another stage independently. For direct stage use, provide the deterministic next invocation with the same `artifact_dir`; a host may perform that semantic handoff on the user's behalf.
93
+ Return only the listed implementation outputs. Do not invoke another Skill.