prizmkit 1.1.156 → 1.1.159
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/VERSION.json +3 -3
- package/bundled/dev-pipeline/prizmkit_runtime/reset.py +1 -1
- package/bundled/dev-pipeline/prizmkit_runtime/runner_classification.py +20 -11
- package/bundled/dev-pipeline/scripts/update-feature-status.py +7 -0
- package/bundled/dev-pipeline/tests/test_python_runner_parity.py +115 -4
- package/bundled/dev-pipeline/tests/test_reset_modes.py +137 -0
- package/bundled/dev-pipeline/tests/test_unified_cli.py +2 -1
- package/bundled/skills/_metadata.json +1 -1
- package/bundled/skills/prizmkit/SKILL.md +1 -13
- package/bundled/skills/prizmkit-code-review/SKILL.md +29 -10
- package/bundled/skills/prizmkit-code-review/references/independent-code-review.md +5 -4
- package/bundled/skills/prizmkit-code-review/references/review-report-template.md +15 -0
- package/bundled/skills/prizmkit-code-review/scripts/render_review_report.py +61 -0
- package/bundled/skills/prizmkit-committer/SKILL.md +22 -17
- package/bundled/skills/prizmkit-init/SKILL.md +21 -25
- package/bundled/skills/prizmkit-init/references/config-schema.md +11 -7
- package/bundled/skills/prizmkit-init/references/rules/layer-detection.md +3 -3
- package/bundled/skills/prizmkit-plan/SKILL.md +5 -4
- package/bundled/skills/prizmkit-plan/assets/plan-template.md +4 -1
- package/bundled/skills/prizmkit-plan/references/verification-checklist.md +3 -2
- package/bundled/skills/prizmkit-workflow/SKILL.md +35 -3
- package/bundled/skills/prizmkit-workflow/references/workflow-state-protocol.md +24 -5
- package/package.json +1 -1
- package/bundled/skills/prizmkit/references/workflow-state-protocol.md +0 -178
|
@@ -19,6 +19,8 @@ Remote publication is outside this Skill.
|
|
|
19
19
|
| `artifact_dir` | Yes | Exact caller-supplied artifact root for this commit stage. |
|
|
20
20
|
| `operation` | Yes | `interactive-commit` or `prepare-runtime-commit`. |
|
|
21
21
|
| `evidence_paths` | Yes | Exact caller-supplied project-relative artifacts that establish commit readiness. |
|
|
22
|
+
| `intended_paths` | Interactive only: Yes | Exact unique project-relative final paths approved by the caller for preview and staging. It is never inferred from `git add .` or workspace breadth. |
|
|
23
|
+
| `support_validation_evidence` | Interactive conditional | Required when `intended_paths` contains an explicit support path. Supply one exact record per support path with `path`, named semantic `contract`, completed `validation`, `result=PASS`, and an exact `evidence_path` also present in `evidence_paths`. |
|
|
22
24
|
| `excluded_paths` | No | Exact caller-owned metadata paths that must remain outside the commit and are also excluded by the selected operation's consumer contract. It is not an allowlist for unrelated project changes. |
|
|
23
25
|
| `request_path` | Preparation only | Must equal `{artifact_dir}/runtime-commit-request.json`. |
|
|
24
26
|
|
|
@@ -32,12 +34,14 @@ In preparation mode it must not stage, unstage, commit, amend, reset, merge, or
|
|
|
32
34
|
|
|
33
35
|
## Step 1: Validate Supplied Evidence and Final Change
|
|
34
36
|
|
|
35
|
-
1. Resolve `artifact_dir` and every `evidence_paths` entry exactly as supplied by the caller.
|
|
37
|
+
1. Resolve `artifact_dir` and every `evidence_paths` entry exactly as supplied by the caller. For interactive operation, also resolve every exact `intended_paths` entry without broadening it.
|
|
36
38
|
2. Reject missing, unreadable, stale, contradictory, blocked, or explicitly non-passing evidence.
|
|
37
39
|
3. Inspect staged, unstaged, untracked, deleted, and renamed files with bounded Git status/diff commands.
|
|
38
|
-
4. Confirm every
|
|
39
|
-
5.
|
|
40
|
-
6.
|
|
40
|
+
4. Confirm every intended path belongs to the supplied change, a concrete dependency, its tests, durable documentation, or an explicitly caller-owned support artifact. Unknown or unrelated Git-visible changes block rather than entering the manifest.
|
|
41
|
+
5. For every explicit support path, require one unique `support_validation_evidence` record whose `path` equals that manifest entry, whose `evidence_path` is supplied and readable, and whose named contract, completed validation, and `result=PASS` agree with that evidence. Missing, generic, self-asserted, or non-passing support evidence blocks admission.
|
|
42
|
+
6. Reject unresolved merge state and sensitive files such as real environment files, credentials, secrets, private keys, certificates, or local settings.
|
|
43
|
+
7. Confirm no requested task output remains to be generated after this stage.
|
|
44
|
+
8. Never force-add an ignored file or modify Git/ignore policy. An intended durable documentation path that is not stageable under the project's existing policy blocks with the exact path and policy reason.
|
|
41
45
|
|
|
42
46
|
The caller decides which evidence is required and how the returned commit-stage result is used. This Skill validates the supplied evidence but does not infer a larger stage sequence.
|
|
43
47
|
|
|
@@ -49,32 +53,33 @@ Generate one concise Conventional Commit message:
|
|
|
49
53
|
<type>(<scope>): <description>
|
|
50
54
|
```
|
|
51
55
|
|
|
52
|
-
Classify every observed change before
|
|
56
|
+
Classify every observed change before validating either operation.
|
|
53
57
|
|
|
54
58
|
- **task-owned**: justified source, tests, product/project documentation, configuration, and dependency changes outside recognized support namespaces;
|
|
55
|
-
- **
|
|
56
|
-
- **
|
|
59
|
+
- **durable Prizm documentation**: exact stageable `.prizmkit/prizm-docs/**` paths listed by one supplied `retrospective-result.json` whose `outcome=RETRO_COMPLETE`, `result=DOCS_UPDATED`, non-empty `validation`, and `documentation_paths` exactly authorize those paths;
|
|
60
|
+
- **explicit interactive support**: `AGENTS.md`, `skills-lock.json`, or another support path named by the exact spec/plan, covered one-to-one by passing `support_validation_evidence`, labeled separately in the interactive preview, and included in the user's confirmation;
|
|
61
|
+
- **PrizmKit transient/internal**: `.prizmkit/specs/**`, `.prizmkit/state/**`, `.prizmkit/dev-pipeline/**`, config, plans/status, installed Runtime files, checkpoints, and other framework execution data;
|
|
62
|
+
- **generated platform support**: installed platform directories and local platform settings not explicitly owned by the interactive requirement;
|
|
57
63
|
- **project transient**: data the project already excludes through Git ignore rules;
|
|
58
64
|
- **unknown Git-visible**: any remaining path whose task ownership cannot be proven.
|
|
59
65
|
|
|
60
|
-
|
|
66
|
+
All paths under `.prizmkit/` are framework-internal and remain outside automated task commits.
|
|
61
67
|
|
|
62
|
-
- `.git
|
|
63
|
-
- the complete `.prizmkit/` tree;
|
|
64
|
-
- `AGENTS.md`, `skills-lock.json`, installed platform directories, and local platform settings;
|
|
65
|
-
- sensitive or unrelated files.
|
|
68
|
+
For `operation=interactive-commit`, validate the caller-supplied `intended_paths` as the complete approved manifest. It may contain task-owned paths, evidence-backed durable Prizm documentation, and explicitly owned support paths. Every entry must be exact, unique, project-relative, currently changed, stageable without force, and covered by the applicable evidence above. An instruction support file contract must validate readable structure, referenced project paths, consistency with the exact requirement and applicable project conventions, and secret absence. A lockfile support contract must validate parse/schema integrity and owning-installer or deterministic-regeneration parity. Another support class requires the exact project-native semantic validator named by the spec/plan; if no applicable validator exists, support admission blocks. The following remain prohibited: `.git/**`, every PrizmKit transient/internal path, installed platform payloads, local settings, secrets, temporary files, and unrelated or unknown changes.
|
|
66
69
|
|
|
67
|
-
|
|
70
|
+
For `operation=prepare-runtime-commit`, preserve the existing automated consumer boundary: construct a unique exact set of task-owned changed paths outside recognized support namespaces, and exclude the complete `.prizmkit/` tree plus platform support and sensitive/unrelated files. Preparation mode preserves the Python Runtime's exact path-coverage contract and does not admit the interactive durable-documentation or support exceptions.
|
|
71
|
+
|
|
72
|
+
Unknown Git-visible paths block the selected operation; do not silently classify them as transient. Project-specific transient data belongs in the project's Git ignore rules, not caller-provided exclusions. Do not use wildcard pathspecs, `git add .`, or `git add -A`. In preparation mode, reject an `excluded_paths` entry unless the Python Runtime independently excludes that exact caller-owned metadata class; unrelated or user-authored project changes cannot be hidden from exact-path coverage.
|
|
68
73
|
|
|
69
74
|
## Step 3A: Interactive Commit
|
|
70
75
|
|
|
71
76
|
For `operation=interactive-commit`:
|
|
72
77
|
|
|
73
|
-
1. Present
|
|
78
|
+
1. Present the exact `intended_paths`, change summary, sensitive-file warnings, diff statistics, proposed message, intentionally excluded changes, and a separate label for each admitted durable Prizm documentation or explicit support path.
|
|
74
79
|
2. Ask the current user to confirm that exact local commit.
|
|
75
|
-
3. Only after confirmation, stage tracked changes
|
|
76
|
-
4. Verify the staged diff exactly matches the confirmed path
|
|
77
|
-
5. Create the local commit and verify its hash, committed paths, and remaining workspace changes.
|
|
80
|
+
3. Only after confirmation, stage with `git add -- <exact paths>` semantics: use exact pathspecs for tracked changes, deletions, and explicitly named new files; never stage workspace breadth.
|
|
81
|
+
4. Verify the staged diff exactly matches the confirmed manifest and contains no path added by a hook or incidental operation.
|
|
82
|
+
5. Create the local commit and verify its hash, message, committed paths, and remaining workspace changes against the confirmed manifest.
|
|
78
83
|
6. Return `COMMITTED`, the commit hash/message, committed paths, and intentional remaining changes.
|
|
79
84
|
|
|
80
85
|
If confirmation is declined, return `COMMIT_DECLINED` without Git mutation.
|
|
@@ -27,6 +27,12 @@ Recommended project initialization skill. Scans any brownfield or greenfield pro
|
|
|
27
27
|
|
|
28
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
29
|
|
|
30
|
+
## Host-Neutral Interaction and Discovery
|
|
31
|
+
|
|
32
|
+
- Ask required questions through the current Host's available user-interaction capability. If no structured interaction capability exists, ask directly in ordinary conversation and wait for the user's answer.
|
|
33
|
+
- Describe required filesystem evidence and bounded discovery results semantically. Do not require a specific tool name, shell, command, or operating system.
|
|
34
|
+
- Platform-specific commands may be shown only as non-normative examples after the Host has established that they are available; an unavailable example never blocks an equivalent Host-native operation.
|
|
35
|
+
|
|
30
36
|
## Execution Steps
|
|
31
37
|
|
|
32
38
|
**Phase 1: Platform Detection**
|
|
@@ -77,17 +83,7 @@ BROWNFIELD WORKFLOW (existing project):
|
|
|
77
83
|
- SUB-MODULES: directories INSIDE a top-level module (e.g. `src/routes/`, `src/models/`)
|
|
78
84
|
- A sub-module maps to `.prizmkit/prizm-docs/<M>/<S>.prizm`, never to `.prizmkit/prizm-docs/<S>.prizm` — flattening would create ambiguous paths when two modules have identically-named sub-modules
|
|
79
85
|
- Exclude: `.git/`, `node_modules/`, `vendor/`, `build/`, `dist/`, `__pycache__/`, `target/`, `bin/`, `.agents/`, `.codex/`, `.claude/`, `.codebuddy/`, `.prizmkit/`
|
|
80
|
-
- **
|
|
81
|
-
```bash
|
|
82
|
-
find . -maxdepth 2 -type d \
|
|
83
|
-
-not -path '*/node_modules/*' -not -path '*/.git/*' \
|
|
84
|
-
-not -path '*/dist/*' -not -path '*/build/*' \
|
|
85
|
-
-not -path '*/__pycache__/*' -not -path '*/vendor/*' \
|
|
86
|
-
-not -path '*/.agents/*' -not -path '*/.codex/*' \
|
|
87
|
-
-not -path '*/.claude/*' -not -path '*/.codebuddy/*' \
|
|
88
|
-
-not -path '*/.prizmkit/*' -not -path '*/target/*' \
|
|
89
|
-
| sed -e 's;[^/]*/;|____;g;s;____|; |;g'
|
|
90
|
-
```
|
|
86
|
+
- **Bounded discovery contract** — use the current Host's available directory-listing or file-search capability to enumerate at most two directory levels, apply the exclusions above before analysis, preserve parent/child relationships, and report the resulting project-relative structure. Do not require a POSIX shell pipeline or any other operating-system-specific command.
|
|
91
87
|
3. Identify entry points by language convention
|
|
92
88
|
4. Catalog dependencies (external packages)
|
|
93
89
|
5. Count source files per directory
|
|
@@ -106,7 +102,7 @@ After tech stack detection, determine which development layers exist in the proj
|
|
|
106
102
|
- **backend**: Express/FastAPI/Gin/etc. in dependencies, or `routes/`/`controllers/` with server code
|
|
107
103
|
- **database**: Prisma/TypeORM/SQLAlchemy/etc. in dependencies, or `migrations/`/`prisma/` directory
|
|
108
104
|
- **mobile**: `pubspec.yaml` (Flutter), `react-native` in package.json, or simultaneous `ios/`+`android/` directories
|
|
109
|
-
3. For mobile signals — if ambiguous (e.g., monorepo with web + ios/android dirs),
|
|
105
|
+
3. For mobile signals — if ambiguous (e.g., monorepo with web + ios/android dirs), ask the user directly: "Mobile platform signals detected. Is this project a mobile app?" Offer "Yes, this is a mobile app" and "No, these are for another purpose" as clear choices, using the Host-neutral interaction contract above.
|
|
110
106
|
4. Assemble `detected_layers` array (e.g., `["frontend", "backend", "database"]`). If no layers detected (library/CLI project), array is empty.
|
|
111
107
|
|
|
112
108
|
**Phase 4.6: Infrastructure Quick Scan**
|
|
@@ -120,7 +116,7 @@ Detect database and deployment signals, then ask 1-2 brief questions. This phase
|
|
|
120
116
|
- **Database signals**: ORM/database client dependencies in `package.json`, `requirements.txt`, `go.mod`, `Cargo.toml`, `pyproject.toml` (look for: prisma, typeorm, sequelize, mongoose, sqlalchemy, django, gorm, diesel, sqlx, pg, mysql2, etc.); directories named `migrations/`, `db/`, `schema/`, `prisma/`; environment variables `DATABASE_URL`, `DB_HOST`, `DB_NAME`, `MONGO_URI` in `.env*` files
|
|
121
117
|
- **Deployment signals**: `Dockerfile`, `docker-compose.yml`, `vercel.json`, `fly.toml`, `railway.json`, `netlify.toml`, `cloudflare.json`, `.github/workflows/`, `Procfile`, `app.yaml`, `serverless.yml`, `terraform/`, `pulumi/`
|
|
122
118
|
|
|
123
|
-
2. **Brief inquiry** (
|
|
119
|
+
2. **Brief inquiry** (ask through the Host-neutral interaction contract, max 2 questions):
|
|
124
120
|
|
|
125
121
|
**Question 1 — Database**:
|
|
126
122
|
- If database signals detected: pre-fill with detected info
|
|
@@ -172,14 +168,14 @@ Detect database and deployment signals, then ask 1-2 brief questions. This phase
|
|
|
172
168
|
After Infrastructure Quick Scan completes, check if `detected_layers` is non-empty (from Phase 4.5). If layers were detected, offer a lightweight entry point for rules configuration.
|
|
173
169
|
|
|
174
170
|
1. If `detected_layers` is empty (library/CLI project) → skip this phase entirely, proceed to Phase 5.
|
|
175
|
-
2. If layers detected,
|
|
171
|
+
2. If layers are detected, ask through the Host-neutral interaction contract:
|
|
176
172
|
|
|
177
173
|
**Question**: "Detected **{list detected layers}** code. Would you like to set up custom development rules for AI to follow? This helps AI generate code that matches your conventions."
|
|
178
174
|
- **Configure later (Recommended)** — Record layers and configure rules later
|
|
179
175
|
- **Skip entirely** — no custom rules, AI uses general best practices
|
|
180
176
|
|
|
181
|
-
3. If user picked "Skip entirely" →
|
|
182
|
-
4. If user picked "Configure later" →
|
|
177
|
+
3. If the user picked "Skip entirely" → preserve `detected_layers` as observed project facts, set `enabled_rule_profiles` to an empty array, and proceed to Phase 5.
|
|
178
|
+
4. If the user picked "Configure later" → preserve `detected_layers`, keep `enabled_rule_profiles` unchanged when already configured or initialize it to an empty array, and proceed to Phase 5. Detection never implies rule adoption.
|
|
183
179
|
|
|
184
180
|
**Phase 5: Prizm Documentation Generation**
|
|
185
181
|
Invoke prizmkit-prizm-docs (Init operation), passing the two-tier module structure from Phase 4:
|
|
@@ -192,18 +188,18 @@ Invoke prizmkit-prizm-docs (Init operation), passing the two-tier module structu
|
|
|
192
188
|
|
|
193
189
|
**Phase 6: Workspace Initialization**
|
|
194
190
|
6a. Create `.prizmkit/` directory structure (if missing):
|
|
195
|
-
- `.prizmkit/config.json` (adoption_mode,
|
|
191
|
+
- `.prizmkit/config.json` (adoption_mode, platform installation metadata, detected_layers, enabled_rule_profiles)
|
|
196
192
|
- `.prizmkit/specs/` (empty)
|
|
197
193
|
- `.prizmkit/plans/` (empty — needed by Phase 7 and future pipeline tasks)
|
|
198
194
|
|
|
199
195
|
6b. Write detected tech stack to `.prizmkit/config.json`:
|
|
200
196
|
→ Read `${SKILL_DIR}/references/config-schema.md` for merge strategy, field definitions, and examples.
|
|
201
197
|
|
|
202
|
-
6c. Write
|
|
203
|
-
-
|
|
204
|
-
-
|
|
205
|
-
- For greenfield projects (Phase 4.5 skipped)
|
|
206
|
-
-
|
|
198
|
+
6c. Write observed layers and separate rule adoption to `.prizmkit/config.json` (alongside `tech_stack`):
|
|
199
|
+
- `"detected_layers": ["frontend", "backend"]` records only the observed layers from Phase 4.5 and is never cleared because the user declines rule configuration.
|
|
200
|
+
- `"enabled_rule_profiles": []` records rule adoption separately. Preserve valid existing entries; initialize an empty array when no profiles are enabled.
|
|
201
|
+
- For greenfield projects (Phase 4.5 skipped), write both fields as empty arrays until code exists or the user explicitly enables a rule profile.
|
|
202
|
+
- Future re-detection updates observed layers without silently enabling or disabling rule profiles.
|
|
207
203
|
|
|
208
204
|
**Phase 7: Project Brief Generation**
|
|
209
205
|
|
|
@@ -301,7 +297,7 @@ Tech stack detected:
|
|
|
301
297
|
|
|
302
298
|
Layer Detection:
|
|
303
299
|
Detected layers: frontend, backend, database (from dependency + directory signals)
|
|
304
|
-
→
|
|
300
|
+
→ Observed layers stored in config.json independently from rule-profile adoption
|
|
305
301
|
|
|
306
302
|
Infrastructure Quick Scan:
|
|
307
303
|
Database: PostgreSQL (Prisma) — detected from dependencies
|
|
@@ -309,7 +305,7 @@ Infrastructure Quick Scan:
|
|
|
309
305
|
→ Written to the detected main platform instruction file `### Infrastructure` (not `.private.md`)
|
|
310
306
|
|
|
311
307
|
Rules Quick Entry:
|
|
312
|
-
Matched layers: frontend (React), backend (Express.js), database (Prisma) →
|
|
308
|
+
Matched layers: frontend (React), backend (Express.js), database (Prisma) → no rule profiles enabled yet
|
|
313
309
|
|
|
314
310
|
Modules discovered:
|
|
315
311
|
src/routes/ → .prizmkit/prizm-docs/routes.prizm (12 files)
|
|
@@ -321,7 +317,7 @@ Project brief: inferred from codebase → confirmed by user
|
|
|
321
317
|
→ .prizmkit/plans/project-brief.md
|
|
322
318
|
|
|
323
319
|
Generated: root.prizm + 4 L1 docs
|
|
324
|
-
Saved: .prizmkit/config.json (tech_stack + detected_layers recorded)
|
|
320
|
+
Saved: .prizmkit/config.json (tech_stack + detected_layers + enabled_rule_profiles recorded)
|
|
325
321
|
|
|
326
322
|
Next: Use /prizmkit-plan to start your first feature
|
|
327
323
|
```
|
|
@@ -7,11 +7,12 @@ Handles re-init without losing user edits:
|
|
|
7
7
|
- Read existing `config.json` if present
|
|
8
8
|
- If `tech_stack` field exists AND `_auto_detected` is `false` or absent:
|
|
9
9
|
→ **SKIP** — user has manually configured tech stack, preserve their settings
|
|
10
|
-
- Always update `detected_layers` with
|
|
10
|
+
- Always update `detected_layers` with fresh observed layer-detection results on every init run — detection is based on code that exists, never on whether the user enables custom rules. A rule-configuration choice must not erase detected project facts.
|
|
11
|
+
- Preserve valid `enabled_rule_profiles` entries independently from detection. Initialize `[]` only when the field is absent or the user explicitly disables every rule profile.
|
|
11
12
|
- If `tech_stack` field exists AND `_auto_detected` is `true`:
|
|
12
|
-
→ **MERGE** — overwrite auto-detected values with new detection results, but preserve any keys the user added manually (keys not in the new detection result). Overwrite `detected_layers` with new
|
|
13
|
+
→ **MERGE** — overwrite auto-detected values with new detection results, but preserve any keys the user added manually (keys not in the new detection result). Overwrite `detected_layers` with new observed results and preserve `enabled_rule_profiles` independently.
|
|
13
14
|
- If `tech_stack` field does NOT exist:
|
|
14
|
-
→ **WRITE** full detected tech stack with `"_auto_detected": true`,
|
|
15
|
+
→ **WRITE** full detected tech stack with `"_auto_detected": true`, write `detected_layers` from observed layer detection, and initialize `enabled_rule_profiles` to `[]` unless the user explicitly enabled profiles
|
|
15
16
|
- Only include fields that were actually detected (no empty/null values)
|
|
16
17
|
|
|
17
18
|
## Field Definitions
|
|
@@ -19,12 +20,13 @@ Handles re-init without losing user edits:
|
|
|
19
20
|
| Field | Type | Description |
|
|
20
21
|
|-------|------|-------------|
|
|
21
22
|
| `adoption_mode` | string | `"passive"` \| `"advisory"` \| `"active"` |
|
|
22
|
-
| `platform` | string | `"codebuddy"` \| `"claude"` \| `"codex"` \| `"
|
|
23
|
+
| `platform` | string | Installed payload metadata: `"codebuddy"` \| `"claude"` \| `"codex"` \| `"pi"` \| `"all"`. It records installation, not a canonical behavior allowlist. |
|
|
23
24
|
| `tech_stack` | object | Detected or user-provided tech stack |
|
|
24
25
|
| `tech_stack._auto_detected` | boolean | `true` if auto-detected, `false` if user-provided |
|
|
25
|
-
| `detected_layers` | string[] | Development layers
|
|
26
|
+
| `detected_layers` | string[] | Development layers observed in the project. Written by prizmkit-init Phase 4.5. Values: `frontend` / `backend` / `database` / `mobile`. Empty only when no layers are observed. Always refreshed from code and never cleared by rule-adoption choices. |
|
|
27
|
+
| `enabled_rule_profiles` | string[] | Rule profiles the user explicitly enabled. This is independent from `detected_layers`; an empty array means no custom profile is enabled, not that the project has no detected layers. |
|
|
26
28
|
|
|
27
|
-
Legacy manifests may still contain `both` for read-only migration compatibility. New config writes must use `codebuddy`, `claude`, `codex`, or `all`.
|
|
29
|
+
Legacy manifests may still contain `both` for read-only migration compatibility. New config writes must use `codebuddy`, `claude`, `codex`, `pi`, or `all`.
|
|
28
30
|
|
|
29
31
|
## Examples
|
|
30
32
|
|
|
@@ -34,6 +36,7 @@ Fullstack project:
|
|
|
34
36
|
"adoption_mode": "passive",
|
|
35
37
|
"platform": "claude",
|
|
36
38
|
"detected_layers": ["frontend", "backend", "database"],
|
|
39
|
+
"enabled_rule_profiles": [],
|
|
37
40
|
"tech_stack": {
|
|
38
41
|
"language": "TypeScript",
|
|
39
42
|
"runtime": "Node.js 20",
|
|
@@ -65,6 +68,7 @@ Pure Python backend:
|
|
|
65
68
|
"project_type": "backend",
|
|
66
69
|
"_auto_detected": true
|
|
67
70
|
},
|
|
68
|
-
"detected_layers": ["backend", "database"]
|
|
71
|
+
"detected_layers": ["backend", "database"],
|
|
72
|
+
"enabled_rule_profiles": []
|
|
69
73
|
}
|
|
70
74
|
```
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
|
|
29
29
|
## Mobile Confirmation
|
|
30
30
|
|
|
31
|
-
When mobile signals are detected but ambiguous (e.g., a monorepo with web + mobile), use
|
|
31
|
+
When mobile signals are detected but ambiguous (e.g., a monorepo with web + mobile), ask the user through the current Host's available interaction capability; use ordinary conversation when no structured interaction is available:
|
|
32
32
|
|
|
33
33
|
> "Mobile platform signals detected (ios/ + android/ directories). Is this project
|
|
34
34
|
> a mobile app, or are these directories for another purpose?"
|
|
@@ -37,5 +37,5 @@ When mobile signals are detected but ambiguous (e.g., a monorepo with web + mobi
|
|
|
37
37
|
## Output
|
|
38
38
|
|
|
39
39
|
After detection (signals + your own judgment), assemble `detected_layers` array (e.g., `["frontend", "backend", "database"]`).
|
|
40
|
-
Store in memory for Phase 6 config.json writing.
|
|
41
|
-
If no layers detected (library/CLI project), array is empty.
|
|
40
|
+
Store the observed values in memory for Phase 6 config.json writing. Rule-profile adoption is recorded separately and never changes this detection result.
|
|
41
|
+
If no layers are detected (library/CLI project), the array is empty.
|
|
@@ -83,10 +83,11 @@ Precondition: `spec.md` exists with no unresolved blocker.
|
|
|
83
83
|
|
|
84
84
|
1. Choose an MVP-first, incremental, or safe parallel task strategy.
|
|
85
85
|
2. Append `## Tasks` to `plan.md` using `${SKILL_DIR}/assets/plan-template.md`.
|
|
86
|
-
3. Include setup, foundation, core,
|
|
87
|
-
4.
|
|
88
|
-
5.
|
|
89
|
-
6.
|
|
86
|
+
3. Include setup, foundation, core, and polish phases only when applicable; do not manufacture empty phases for a small plan.
|
|
87
|
+
4. Every formal plan must contain at least one concrete risk with mitigation and at least one verification checkpoint. A small plan may use one final checkpoint instead of artificial phase checkpoints.
|
|
88
|
+
5. Mark `[P]` only for tasks that can safely execute independently.
|
|
89
|
+
6. Include appropriate implementation-local and regression verification tasks without executing them during planning.
|
|
90
|
+
7. Run `${SKILL_DIR}/references/verification-checklist.md` and repair plan defects.
|
|
90
91
|
|
|
91
92
|
## Phase 4: Plan/Spec Review Loop
|
|
92
93
|
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
- E2E: [Approach]
|
|
62
62
|
|
|
63
63
|
## Risk Assessment
|
|
64
|
+
<!-- Every formal plan keeps at least one concrete risk and mitigation. Use a truthful low-impact risk for small changes rather than filler. -->
|
|
64
65
|
| Risk | Impact | Mitigation |
|
|
65
66
|
|------|--------|------------|
|
|
66
67
|
| [Risk] | [H/M/L] | [Plan] |
|
|
@@ -107,12 +108,14 @@
|
|
|
107
108
|
|
|
108
109
|
### Phase: Polish
|
|
109
110
|
- [ ] [T-900] Final verification
|
|
110
|
-
- [ ] [T-901]
|
|
111
|
+
- [ ] [T-901] Update required project/user-facing documentation <!-- Conditional; Prizm memory synchronization is Retrospective-owned, not an implementation task. -->
|
|
111
112
|
|
|
112
113
|
### Checkpoints
|
|
114
|
+
<!-- Every formal plan has at least one verification checkpoint. Keep only checkpoints for phases that actually exist; a small plan may use one final checkpoint. -->
|
|
113
115
|
- [ ] [CP-1] After Setup: project builds and tests pass
|
|
114
116
|
- [ ] [CP-2] After Foundation: base changes verified
|
|
115
117
|
- [ ] [CP-3] After each Core group: acceptance criteria pass
|
|
118
|
+
- [ ] [CP-FINAL] Final: planned acceptance and regression verification passes
|
|
116
119
|
|
|
117
120
|
## Independent Plan Review
|
|
118
121
|
<!-- Append this terminal audit record after the Main-Agent review and the optional independent-review attempt. -->
|
|
@@ -8,7 +8,8 @@ Run this checklist after generating the Tasks section in plan.md. Fix any issues
|
|
|
8
8
|
|
|
9
9
|
- [ ] Every goal (G-N) in spec.md has at least one task in plan.md
|
|
10
10
|
- [ ] Every task has a target file path (`— file: path/to/file`)
|
|
11
|
-
- [ ] Risk assessment contains at least one risk with a mitigation plan
|
|
11
|
+
- [ ] Risk assessment contains at least one concrete risk with a mitigation plan
|
|
12
|
+
- [ ] The plan contains at least one verification checkpoint; a small plan may use one final checkpoint
|
|
12
13
|
- [ ] If spec includes `## Behavior Preservation` → at least one verification task exists
|
|
13
14
|
- [ ] If spec includes `## Root Cause` → at least one reproduction test task exists
|
|
14
15
|
|
|
@@ -36,7 +37,7 @@ Run this checklist after generating the Tasks section in plan.md. Fix any issues
|
|
|
36
37
|
|
|
37
38
|
- [ ] No task references the output of a later task without an explicit dependency note
|
|
38
39
|
- [ ] Foundation tasks precede Core tasks that depend on them
|
|
39
|
-
- [ ]
|
|
40
|
+
- [ ] Checkpoints exist between dependent phases that are present; plans without multiple phases use one final checkpoint
|
|
40
41
|
|
|
41
42
|
## Rules Alignment
|
|
42
43
|
|
|
@@ -96,10 +96,12 @@ Expected transitions:
|
|
|
96
96
|
| `prizmkit-plan` | `PLAN_READY` plus valid `spec.md`/`plan.md` | `prizmkit-implement` |
|
|
97
97
|
| `prizmkit-implement` | `IMPLEMENTED` plus completed task markers | `prizmkit-code-review` |
|
|
98
98
|
| `prizmkit-code-review` | `PASS` plus valid `review-report.md` | `prizmkit-test` |
|
|
99
|
-
| `prizmkit-test` | `TEST_PASS` plus consistent report/result pair | `prizmkit-retrospective` |
|
|
99
|
+
| `prizmkit-test` | `TEST_PASS` plus a consistent report/result pair with `production_changed=false` | `prizmkit-retrospective` |
|
|
100
100
|
| `prizmkit-retrospective` | `RETRO_COMPLETE` plus an artifact whose `outcome` and `result` agree | `prizmkit-committer` |
|
|
101
101
|
| `prizmkit-committer` | `COMMITTED` after explicit interactive confirmation | end |
|
|
102
102
|
|
|
103
|
+
Before accepting a Test transition, require `production_changed` to be a boolean and agree between `test-report.md` and `test-result.json`. A passing result with `production_changed=true` follows the bounded production-repair route below and is not final Test authority for Retrospective.
|
|
104
|
+
|
|
103
105
|
Before invoking `prizmkit-retrospective`, derive the exact changed project paths outside `.prizmkit/` and pass them as `change_paths` with a concise `change_summary`. Do not ask that atomic Skill to infer scope from this composite's state or earlier artifacts.
|
|
104
106
|
|
|
105
107
|
`TEST_NOT_APPLICABLE` is not a valid lifecycle success. Lightweight changes must execute deterministic verification and return `TEST_PASS`.
|
|
@@ -132,6 +134,28 @@ prizmkit-implement
|
|
|
132
134
|
|
|
133
135
|
The Main-Agent review skill owns its internal review repairs and its internal ten-round limit before returning its terminal result. The outer workflow repair counter is separate.
|
|
134
136
|
|
|
137
|
+
### Passing Test with Production Repair
|
|
138
|
+
|
|
139
|
+
A `TEST_PASS` whose consistent final artifacts report `production_changed=true` proves the Test stage repaired production code after prior Code Review. It does not authorize Retrospective or Committer.
|
|
140
|
+
|
|
141
|
+
```text
|
|
142
|
+
TEST_PASS + production_changed=true + repair_round < 3
|
|
143
|
+
→ preserve the Test artifacts as repair evidence
|
|
144
|
+
→ increment the outer repair round
|
|
145
|
+
→ invalidate prior final Code Review/Test completion in coordinator state
|
|
146
|
+
→ clear stale stage_result before re-entry
|
|
147
|
+
→ invoke prizmkit-code-review review_scope=delta
|
|
148
|
+
→ require a fresh prizmkit-test result
|
|
149
|
+
|
|
150
|
+
fresh TEST_PASS + production_changed=false
|
|
151
|
+
→ prizmkit-retrospective
|
|
152
|
+
|
|
153
|
+
TEST_PASS + production_changed=true + repair_round >= 3
|
|
154
|
+
→ WORKFLOW_BLOCKED
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
On re-entry, retain only stages that remain authoritative before Code Review in `completed_stages`, set `repair_scope=production`, and set the next/resume entry to delta Code Review without inventing a new atomic result. Repeated Test production repairs consume the same existing outer repair budget; they do not create an unbounded success loop.
|
|
158
|
+
|
|
135
159
|
### Test Non-Pass
|
|
136
160
|
|
|
137
161
|
`prizmkit-test` already performs bounded test construction, execution-failure repair, mandatory Main-Agent review, and optional independent review before returning. The composite consumes its terminal artifacts without recreating those loops.
|
|
@@ -187,9 +211,17 @@ The internal `prizmkit-code-review` limit of ten completed review rounds remains
|
|
|
187
211
|
|
|
188
212
|
The composite reaches `/prizmkit-committer operation=interactive-commit` but must not silently create a Git commit.
|
|
189
213
|
|
|
190
|
-
The composite must validate all prior stage artifacts, derive exact non-`.prizmkit/` change paths for the retrospective input, and validate its result.
|
|
214
|
+
The composite must validate all prior stage artifacts, derive exact non-`.prizmkit/` change paths for the retrospective input, and validate its result. For interactive commit it then assembles one exact `intended_paths` manifest from:
|
|
215
|
+
|
|
216
|
+
- final validated requirement paths outside default support namespaces;
|
|
217
|
+
- exact `.prizmkit/prizm-docs/**` paths listed by a consistent `RETRO_COMPLETE` + `DOCS_UPDATED` result;
|
|
218
|
+
- exact support paths explicitly owned by the spec/plan, separately labeled in the preview, covered by the support validation below, and subject to the user's confirmation of that exact manifest.
|
|
219
|
+
|
|
220
|
+
For each explicit support path, select and execute its applicable semantic contract before invoking Committer: instruction files require readable structure, resolvable project references, consistency with the exact requirement and applicable project conventions, and secret scanning; lockfiles require parse/schema checks plus owning-installer or deterministic-regeneration parity; any other support class requires an exact project-native semantic validator named by the spec/plan. User confirmation alone is not support validation. If no applicable validator exists or evidence is non-passing, block support admission. Pass one exact `support_validation_evidence` record per admitted support path, including its path, contract, completed validation, `PASS` result, and exact evidence path.
|
|
221
|
+
|
|
222
|
+
All other `.prizmkit/**`, generated support, transient, installed, secret, unknown, or unrelated paths remain excluded or blocking. Invoke the committer with the same `artifact_dir`, exact `evidence_paths`, caller-state paths in `excluded_paths`, the exact `intended_paths`, conditional one-to-one `support_validation_evidence`, and `operation=interactive-commit`. The committer validates the manifest, presents the exact commit, waits for confirmation, and creates it only after approval.
|
|
191
223
|
|
|
192
|
-
External headless orchestration supplies explicit evidence to `operation=prepare-runtime-commit`, maps `COMMIT_REQUEST_READY` to its own pending state, and lets Python Runtime validate and execute the request. Remote publication remains separate.
|
|
224
|
+
External headless orchestration supplies explicit evidence to `operation=prepare-runtime-commit`, maps `COMMIT_REQUEST_READY` to its own pending state, and lets Python Runtime validate and execute the request. Preparation mode preserves the existing automated contract: the complete `.prizmkit/**` tree remains outside Runtime `intended_paths`. Remote publication remains separate.
|
|
193
225
|
|
|
194
226
|
## Automatic Handoff and Manual Fallback
|
|
195
227
|
|
|
@@ -96,7 +96,8 @@ implementation IMPLEMENTED → status=completed, stage_result=IMPLEMENTED
|
|
|
96
96
|
implementation repair/block → status=failed, stage_result=IMPLEMENT_REPAIR or IMPLEMENT_BLOCKED
|
|
97
97
|
review-report PASS → status=completed, stage_result=REVIEW_PASS
|
|
98
98
|
review-report NEEDS_FIXES → status=failed, stage_result=REVIEW_NEEDS_FIXES
|
|
99
|
-
test-result TEST_PASS
|
|
99
|
+
test-result TEST_PASS, production_changed=false → status=completed, stage_result=TEST_PASS
|
|
100
|
+
test-result TEST_PASS, production_changed=true → bounded re-entry; clear stale stage_result before pending delta Code Review
|
|
100
101
|
test-result TEST_NEEDS_FIXES → status=failed, stage_result=TEST_NEEDS_FIXES
|
|
101
102
|
test-result TEST_BLOCKED → status=failed, stage_result=TEST_BLOCKED
|
|
102
103
|
retrospective outcome=RETRO_COMPLETE, result=DOCS_UPDATED → status=completed, stage_result=RETRO_COMPLETE
|
|
@@ -109,7 +110,20 @@ commit blocked → status=failed, stage_result=COMMIT_BLOC
|
|
|
109
110
|
|
|
110
111
|
`DOCS_UPDATED` and `NO_DOC_CHANGE` remain retrospective artifact `result` values. The workflow `stage_result` is the retrospective stage result `RETRO_COMPLETE`.
|
|
111
112
|
|
|
112
|
-
`TEST_PASS` requires both `test-report.md` and a consistent `test-result.json`. No manifest, attestation, evidence package, or test-internal checkpoint is part of this contract.
|
|
113
|
+
`TEST_PASS` requires both `test-report.md` and a consistent `test-result.json`. Their `production_changed` diagnostics must agree. Only `production_changed=false` is final Test authority for Retrospective. No manifest, attestation, evidence package, or test-internal checkpoint is part of this contract.
|
|
114
|
+
|
|
115
|
+
## Passing Production-Repair Re-entry
|
|
116
|
+
|
|
117
|
+
When consistent Test artifacts return `TEST_PASS` with `production_changed=true`, the atomic Test result remains truthful but the prior Code Review no longer covers the final production state. If `repair_round < 3`, the coordinator:
|
|
118
|
+
|
|
119
|
+
1. preserves the Test artifacts as repair evidence;
|
|
120
|
+
2. increments `repair_round`;
|
|
121
|
+
3. removes invalidated `code-review` and `test` entries from `completed_stages` while preserving authoritative predecessors;
|
|
122
|
+
4. sets `stage=code-review`, `status=pending`, and `stage_result=null` so no stale result survives re-entry;
|
|
123
|
+
5. sets `repair_scope=production`, `next_stage=code-review`, and `resume_from=prizmkit-code-review`;
|
|
124
|
+
6. invokes delta Code Review and then a fresh Test.
|
|
125
|
+
|
|
126
|
+
A fresh `TEST_PASS` with `production_changed=false` may complete Test and advance. Another production-changing pass repeats this route within the same outer budget. When `repair_round >= 3`, set `WORKFLOW_BLOCKED` without Retrospective or commit progression.
|
|
113
127
|
|
|
114
128
|
## Non-Pass Results and Routing Boundary
|
|
115
129
|
|
|
@@ -144,11 +158,16 @@ Any outer repair or continuation policy is independently owned by the caller and
|
|
|
144
158
|
Interactive execution:
|
|
145
159
|
|
|
146
160
|
```text
|
|
147
|
-
|
|
161
|
+
coordinator assembles exact intended_paths from final requirement paths
|
|
162
|
+
+ exact validated Retrospective .prizmkit/prizm-docs paths
|
|
163
|
+
+ separately labeled explicitly owned support paths with one-to-one passing support_validation_evidence
|
|
164
|
+
→ committer validates and previews the exact files and message
|
|
148
165
|
→ waits for explicit current-user confirmation
|
|
149
|
-
→ stages, creates, and verifies the local commit
|
|
166
|
+
→ stages exact pathspecs, creates, and verifies the local commit
|
|
150
167
|
```
|
|
151
168
|
|
|
169
|
+
All other `.prizmkit/**`, generated support, transient, installed, secret, unknown, or unrelated paths remain excluded or blocking. Exact durable Prizm documentation admission is an interactive exception backed by the Retrospective result, not a general `.prizmkit` allowlist. User confirmation alone is not support validation: instruction files require structure/reference/requirement-consistency/secret checks, lockfiles require parse/schema plus installer or deterministic-regeneration parity, and any other support class requires the exact project-native semantic validator named by the spec/plan.
|
|
170
|
+
|
|
152
171
|
Pipeline execution:
|
|
153
172
|
|
|
154
173
|
```text
|
|
@@ -159,7 +178,7 @@ external coordinator validates its required gates and supplies exact readiness e
|
|
|
159
178
|
→ remote publication remains separate
|
|
160
179
|
```
|
|
161
180
|
|
|
162
|
-
The preparation request is data for runtime validation, not prompt-level authorization. The committer must not stage, commit, or predeclare COMMITTED in pipeline preparation mode.
|
|
181
|
+
The preparation request is data for runtime validation, not prompt-level authorization. The committer must not stage, commit, or predeclare COMMITTED in pipeline preparation mode. Preparation preserves the existing automated path contract: the complete `.prizmkit/**` tree remains outside Runtime `intended_paths` in this protocol version.
|
|
163
182
|
|
|
164
183
|
## Recovery
|
|
165
184
|
|