clean-room-skill 0.1.13 → 0.1.14
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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/README.md +4 -4
- package/docs/HOOKS.md +1 -0
- package/hooks/agent3-verification-runner.py +2 -0
- package/hooks/agent4-polish-runner.py +2 -0
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/skills/attended/SKILL.md +2 -2
- package/skills/clean-room/SKILL.md +2 -2
- package/skills/clean-room/references/PREFLIGHT.md +1 -1
- package/skills/clean-room/references/PROCESS.md +1 -1
- package/skills/clean-room/references/SPEC-SCHEMA.md +1 -1
- package/skills/{resume → resume-cr}/SKILL.md +1 -1
- package/skills/unattended/SKILL.md +2 -2
package/README.md
CHANGED
|
@@ -99,7 +99,7 @@ In Claude Code, invoke skills with the plugin namespace:
|
|
|
99
99
|
/clean-room
|
|
100
100
|
/clean-room:attended
|
|
101
101
|
/clean-room:unattended
|
|
102
|
-
/clean-room:resume
|
|
102
|
+
/clean-room:resume-cr
|
|
103
103
|
/clean-room:start-over
|
|
104
104
|
/clean-room:refocus
|
|
105
105
|
```
|
|
@@ -114,7 +114,7 @@ In Pi, invoke package skills with `/skill:<name>`:
|
|
|
114
114
|
/skill:clean-room
|
|
115
115
|
/skill:attended
|
|
116
116
|
/skill:unattended
|
|
117
|
-
/skill:resume
|
|
117
|
+
/skill:resume-cr
|
|
118
118
|
/skill:start-over
|
|
119
119
|
/skill:refocus
|
|
120
120
|
```
|
|
@@ -156,7 +156,7 @@ In strict context-management mode, every `agent-commands.json` stage must set `c
|
|
|
156
156
|
|
|
157
157
|
Use recovery skills instead of chat history:
|
|
158
158
|
|
|
159
|
-
- `/clean-room:resume`: continue from durable artifacts.
|
|
159
|
+
- `/clean-room:resume-cr`: continue from durable artifacts.
|
|
160
160
|
- `/clean-room:start-over`: archive or quarantine current artifacts without deletion, then restart with a fresh neutral task id.
|
|
161
161
|
- `/clean-room:refocus`: audit current artifacts against declared scope without expanding scope.
|
|
162
162
|
|
|
@@ -190,7 +190,7 @@ Use recovery skills instead of chat history:
|
|
|
190
190
|
|
|
191
191
|
| Skill | Use it for |
|
|
192
192
|
| --- | --- |
|
|
193
|
-
| `/clean-room:resume` | Continue an existing run from durable artifacts. |
|
|
193
|
+
| `/clean-room:resume-cr` | Continue an existing run from durable artifacts. |
|
|
194
194
|
| `/clean-room:start-over` | Non-destructively archive or quarantine current artifacts and restart. |
|
|
195
195
|
| `/clean-room:refocus` | Audit a run and route it back to missed gates without adding scope. |
|
|
196
196
|
|
package/docs/HOOKS.md
CHANGED
|
@@ -68,6 +68,7 @@ Role sessions must provide the full clean-room environment block so the hooks ca
|
|
|
68
68
|
| `CLEAN_ROOM_PRIVATE_IDENTIFIER_DENYLIST` | Optional path-separated denylist files for leakage scanning. |
|
|
69
69
|
| `CLEAN_ROOM_AUXILIARY_JSON_ALLOWLIST` | Optional path-separated allowlist for unrecognized auxiliary JSON files under clean roots. |
|
|
70
70
|
| `CLEAN_ROOM_ALLOW_AGENT3_SHELL` | Must be `1` before Agent 3 can invoke the verification runner through a shell-style tool. |
|
|
71
|
+
| `CLEAN_ROOM_ALLOW_AGENT4_SHELL` | Must be `1` before Agent 4 can invoke the polish runner through a shell-style tool. |
|
|
71
72
|
| `CLEAN_ROOM_HOOK_ENFORCE` | Forces enforcement in `safe` mode when truthy. |
|
|
72
73
|
| `CLEAN_ROOM_HOOK_CHECK_TIMEOUT_SECONDS` | Optional per-check wrapper timeout. Defaults to 10 seconds. |
|
|
73
74
|
|
|
@@ -138,6 +138,8 @@ def run_command(argv: list[str], cwd: Path, timeout: int, blocked_roots: list[Pa
|
|
|
138
138
|
cwd=cwd,
|
|
139
139
|
env=safe_env(blocked_roots),
|
|
140
140
|
text=True,
|
|
141
|
+
encoding="utf-8",
|
|
142
|
+
errors="replace",
|
|
141
143
|
stdout=subprocess.PIPE,
|
|
142
144
|
stderr=subprocess.PIPE,
|
|
143
145
|
shell=False,
|
package/package.json
CHANGED
package/plugin.json
CHANGED
package/skills/attended/SKILL.md
CHANGED
|
@@ -13,7 +13,7 @@ In Pi, this entry point is invoked as `/skill:attended`.
|
|
|
13
13
|
|
|
14
14
|
Use the canonical `clean-room` skill workflow and references in this plugin. Preserve the same clean-room boundary, role separation, artifact schemas, leakage rules, implementation-root rules, and hook expectations.
|
|
15
15
|
|
|
16
|
-
Before asking setup or preflight questions, use the canonical `clean-room` "Run State Discovery Before Wizard" rules. Resolve explicit artifact paths first, then configured clean-room roots, then bounded `~/Documents/CleanRoom/task-*` candidates. If a valid `task-manifest.json` exists, route to `resume`. If a valid canonical `preflight-goal.json` exists without a manifest, continue at source/destination discovery and manifest creation. If a preflight artifact exists but is invalid, stop with schema errors instead of restarting preflight. If multiple candidates are found without an explicit path, list them and stop for selection.
|
|
16
|
+
Before asking setup or preflight questions, use the canonical `clean-room` "Run State Discovery Before Wizard" rules. Resolve explicit artifact paths first, then configured clean-room roots, then bounded `~/Documents/CleanRoom/task-*` candidates. If a valid `task-manifest.json` exists, route to `resume-cr`. If a valid canonical `preflight-goal.json` exists without a manifest, continue at source/destination discovery and manifest creation. If a preflight artifact exists but is invalid, stop with schema errors instead of restarting preflight. If multiple candidates are found without an explicit path, list them and stop for selection.
|
|
17
17
|
|
|
18
18
|
Load or create `preflight-goal.json` first. Attended mode may continue with unresolved questions only when they are recorded as `open_questions`; blocking questions become pause gates before affected work starts.
|
|
19
19
|
|
|
@@ -30,4 +30,4 @@ Before indexing or artifact generation, confirm that source roots, contaminated
|
|
|
30
30
|
|
|
31
31
|
Record `preflight_goal_ref`, `preflight_goal_sha256`, required `handoff_sequence`, and `controller_policy.mode` as `attended`. Pause for human review at preflight open questions, scope gate, clean handoff, terminal implementation or polish deltas, blocked units, and final coverage. Include stop conditions for `authorization-missing`, `scope-change`, `contamination-suspected`, `schema-validation-failed`, `leakage-scan-failed`, `unit-blocked`, `implementation-complete`, and `coverage-complete`; attended mode does not add an iteration-limit stop unless the user explicitly sets one.
|
|
32
32
|
|
|
33
|
-
For multi-file source scope, guide agent zero/controller to run `skills/clean-room/scripts/build_source_index.py` as preflight outside clean-room role sessions. Store `source-index.json` only under the contaminated artifact root and never include it in clean handoff packages. If no indexable source code exists and screenshots/images are the only authorized evidence, guide agent zero/controller to run `skills/clean-room/scripts/build_visual_index.py` instead, store `visual-index.json` only under the contaminated artifact root, include visual roots in `CLEAN_ROOM_SOURCE_ROOTS
|
|
33
|
+
For multi-file source scope, guide agent zero/controller to run `skills/clean-room/scripts/build_source_index.py` as preflight outside clean-room role sessions. Store `source-index.json` only under the contaminated artifact root and never include it in clean handoff packages. If no indexable source code exists and screenshots/images are the only authorized evidence, guide agent zero/controller to run `skills/clean-room/scripts/build_visual_index.py` instead, store `visual-index.json` only under the contaminated artifact root, include visual roots in `CLEAN_ROOM_SOURCE_ROOTS` (ensuring screenshot evidence directories are explicitly added to `CLEAN_ROOM_SOURCE_ROOTS` during execution so that path-aware read hooks such as `hooks/deny-clean-source-read.py` can protect them as expected), and pause before decomposition to clarify the product goal, target user flow, screenshot coverage, target stack, UI exactness boundary, and public-compatibility status of visible words.
|
|
@@ -62,7 +62,7 @@ Post-write hook failures are policy failures, not implementation guidance. If a
|
|
|
62
62
|
|
|
63
63
|
Use the recovery skills when a run already has durable artifacts:
|
|
64
64
|
|
|
65
|
-
- `resume`: reload `task-manifest.json`, its `initialization_snapshot`, ledgers, `implementation-plan.json`, `implementation-report.json`, `qc-report.json`, and abstract delta tickets, then continue from the earliest incomplete gate using the recorded `controller_policy`. If `init-config.json` differs from the snapshot, report drift and wait for explicit confirmation.
|
|
65
|
+
- `resume-cr`: reload `task-manifest.json`, its `initialization_snapshot`, ledgers, `implementation-plan.json`, `implementation-report.json`, `qc-report.json`, and abstract delta tickets, then continue from the earliest incomplete gate using the recorded `controller_policy`. If `init-config.json` differs from the snapshot, report drift and wait for explicit confirmation.
|
|
66
66
|
- `start-over`: after explicit confirmation, non-destructively archive or quarantine existing artifacts and restart from the scope gate with a fresh `task_id`.
|
|
67
67
|
- `refocus`: audit declared scope against current artifacts and steer the workflow back to missed gates without expanding scope.
|
|
68
68
|
|
|
@@ -84,7 +84,7 @@ If more than one candidate run is found without an explicit user path, list the
|
|
|
84
84
|
|
|
85
85
|
Classify the selected candidate before starting the wizard:
|
|
86
86
|
|
|
87
|
-
- Valid `task-manifest.json`: route to `resume` and continue from the earliest incomplete gate.
|
|
87
|
+
- Valid `task-manifest.json`: route to `resume-cr` and continue from the earliest incomplete gate.
|
|
88
88
|
- Valid canonical `preflight-goal.json` without `task-manifest.json`: continue at source/destination discovery and manifest creation. Do not ask the preflight wizard again.
|
|
89
89
|
- `clean-room-bootstrap.json` only: run preflight using the bootstrap roots.
|
|
90
90
|
- Invalid `preflight-goal.json`: stop, report canonical schema or required-field errors, and do not create a replacement preflight.
|
|
@@ -75,6 +75,6 @@ When `context_management.enforcement` is `strict`, no role can start until Agent
|
|
|
75
75
|
|
|
76
76
|
## Recovery
|
|
77
77
|
|
|
78
|
-
`resume` and `refocus` must stop when new-run artifacts lack `preflight_goal_ref`, `preflight_goal_sha256`, or a complete `handoff_sequence`. Report this as legacy or incomplete preflight state; do not infer intent from prior chat or source.
|
|
78
|
+
`resume-cr` and `refocus` must stop when new-run artifacts lack `preflight_goal_ref`, `preflight_goal_sha256`, or a complete `handoff_sequence`. Report this as legacy or incomplete preflight state; do not infer intent from prior chat or source.
|
|
79
79
|
|
|
80
80
|
`start-over` must create a new preflight goal or explicitly reuse a reviewed goal contract before recreating active artifacts.
|
|
@@ -104,7 +104,7 @@ The durable tasklist is `task-manifest.json` `units`, generated by agent zero du
|
|
|
104
104
|
|
|
105
105
|
Use recovery entry points only when durable artifacts already exist:
|
|
106
106
|
|
|
107
|
-
- `resume`: reload the manifest, referenced preflight goal, initialization snapshot, ledgers, clean run context, handoff artifacts, implementation plan, implementation report, QC report, and abstract delta tickets; validate schema and leakage state; continue from the earliest incomplete gate under the recorded controller policy. Agent 0 may write or refresh `controller-status.json`, then create the next role-specific `role-session-brief.json`. Clean roles must receive the brief and clean artifact refs, not full resume state. If reusable `init-config.json` differs from the manifest snapshot, report drift and stop before applying changes. If new-run artifacts lack preflight refs or handoff sequence, stop for reviewed preflight migration.
|
|
107
|
+
- `resume-cr`: reload the manifest, referenced preflight goal, initialization snapshot, ledgers, clean run context, handoff artifacts, implementation plan, implementation report, QC report, and abstract delta tickets; validate schema and leakage state; continue from the earliest incomplete gate under the recorded controller policy. Agent 0 may write or refresh `controller-status.json`, then create the next role-specific `role-session-brief.json`. Clean roles must receive the brief and clean artifact refs, not full resume state. If reusable `init-config.json` differs from the manifest snapshot, report drift and stop before applying changes. If new-run artifacts lack preflight refs or handoff sequence, stop for reviewed preflight migration.
|
|
108
108
|
- `start-over`: require explicit confirmation, archive or quarantine current artifacts without deletion, then return to the preflight gate with a fresh `task_id`.
|
|
109
109
|
- `refocus`: compare current artifacts to declared scope and preflight goal, identify missed gates or open deltas, and steer Agent 0 back to the earliest required gate without expanding scope.
|
|
110
110
|
|
|
@@ -112,7 +112,7 @@ Capture:
|
|
|
112
112
|
- user rules split into `clean_safe` and `contaminated_only`
|
|
113
113
|
- reconfiguration policy requiring confirmation for root, schema, and model changes
|
|
114
114
|
|
|
115
|
-
`clean-run-context.json` is the only run context Agent 2, Agent 3, and Agent 4 should read. It may contain clean artifact paths, implementation root environment references, target profile, native artifact expectations, clean-safe goal contract fields, code hygiene policy, approved public references, clean-safe rules, clean-side model preferences, optional Agent 4 local commit policy, and the artifact-only coordination boundary. It must not contain source roots, visual roots, contaminated artifact roots, source index refs, visual index refs, coverage ledgers, evidence ledgers, contaminated-only rules, full `preflight-goal.json`, or the full `task-manifest.json`.
|
|
115
|
+
`clean-run-context.json` is the only run context Agent 2, Agent 3, and Agent 4 should read. It may contain clean artifact paths, implementation root environment references, target profile, native artifact expectations, clean-safe goal contract fields, code hygiene policy, approved public references, clean-safe rules, clean-side model preferences, optional Agent 4 local commit policy (e.g. `implementation.polish_commit` with `agent4_shell_allowed`, `cwd_policy`, and `git_policy`), and the artifact-only coordination boundary. It must not contain source roots, visual roots, contaminated artifact roots, source index refs, visual index refs, coverage ledgers, evidence ledgers, contaminated-only rules, full `preflight-goal.json`, or the full `task-manifest.json`.
|
|
116
116
|
|
|
117
117
|
`context_management` is optional on `task-manifest.json` and `clean-run-context.json`. When present with `mode: "role-session-briefs"`, it records advisory or strict enforcement plus budgets for prompt characters, brief characters, artifact refs, and referenced artifact bytes. Strict mode requires a fresh role session and a valid `role-session-brief.json` for each stage.
|
|
118
118
|
|
|
@@ -13,7 +13,7 @@ In Pi, this entry point is invoked as `/skill:unattended`.
|
|
|
13
13
|
|
|
14
14
|
Use the canonical `clean-room` skill workflow and references in this plugin. Read `skills/clean-room/references/CONTROLLER-LOOP.md` before defining unattended loop behavior. Preserve the same clean-room boundary, role separation, artifact schemas, leakage rules, implementation-root rules, and hook expectations.
|
|
15
15
|
|
|
16
|
-
Before asking setup or preflight questions, use the canonical `clean-room` "Run State Discovery Before Wizard" rules. Resolve explicit artifact paths first, then configured clean-room roots, then bounded `~/Documents/CleanRoom/task-*` candidates. If a valid `task-manifest.json` exists, route to `resume`. If a valid canonical `preflight-goal.json` exists without a manifest, continue at source/destination discovery and manifest creation. If a preflight artifact exists but is invalid, stop with schema errors instead of restarting preflight. If multiple candidates are found without an explicit path, list them and stop for selection.
|
|
16
|
+
Before asking setup or preflight questions, use the canonical `clean-room` "Run State Discovery Before Wizard" rules. Resolve explicit artifact paths first, then configured clean-room roots, then bounded `~/Documents/CleanRoom/task-*` candidates. If a valid `task-manifest.json` exists, route to `resume-cr`. If a valid canonical `preflight-goal.json` exists without a manifest, continue at source/destination discovery and manifest creation. If a preflight artifact exists but is invalid, stop with schema errors instead of restarting preflight. If multiple candidates are found without an explicit path, list them and stop for selection.
|
|
17
17
|
|
|
18
18
|
Load or create `preflight-goal.json` first. Unattended mode requires a complete goal contract with no blocking or non-blocking `open_questions`, `controller_policy.unattended_allowed_after_preflight: true`, and a finite `controller_policy.max_iterations`.
|
|
19
19
|
|
|
@@ -36,4 +36,4 @@ Record `preflight_goal_ref`, `preflight_goal_sha256`, required `handoff_sequence
|
|
|
36
36
|
|
|
37
37
|
The inner loop returns only after Agent 0 consumes the terminal Agent 3 report, any configured Agent 4 `polish-report.json`, and completes contaminated-side coverage verification. Write `clean-room-result.json` before returning control to the outer spec loop.
|
|
38
38
|
|
|
39
|
-
For multi-file source scope, guide agent zero/controller to run `skills/clean-room/scripts/build_source_index.py` as preflight outside clean-room role sessions. Store `source-index.json` only under the contaminated artifact root and never include it in clean handoff packages. If no indexable source code exists and screenshots/images are the only authorized evidence, unattended mode may use `skills/clean-room/scripts/build_visual_index.py` only after preflight already answers the visual-fallback questions with no open questions. Store `visual-index.json` only under the contaminated artifact root and include visual roots in `CLEAN_ROOM_SOURCE_ROOTS
|
|
39
|
+
For multi-file source scope, guide agent zero/controller to run `skills/clean-room/scripts/build_source_index.py` as preflight outside clean-room role sessions. Store `source-index.json` only under the contaminated artifact root and never include it in clean handoff packages. If no indexable source code exists and screenshots/images are the only authorized evidence, unattended mode may use `skills/clean-room/scripts/build_visual_index.py` only after preflight already answers the visual-fallback questions with no open questions. Store `visual-index.json` only under the contaminated artifact root and include visual roots in `CLEAN_ROOM_SOURCE_ROOTS` (ensuring screenshot evidence directories are explicitly added to `CLEAN_ROOM_SOURCE_ROOTS` during execution so that path-aware read hooks such as `hooks/deny-clean-source-read.py` can protect them as expected).
|