clean-room-skill 0.1.0
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 +19 -0
- package/.claude-plugin/plugin.json +20 -0
- package/.codex-plugin/plugin.json +36 -0
- package/LICENSE +21 -0
- package/README.md +376 -0
- package/agents/clean-architect.md +27 -0
- package/agents/clean-qa-editor.md +27 -0
- package/agents/contaminated-manager-verifier.md +35 -0
- package/agents/contaminated-source-analyst.md +26 -0
- package/bin/install.js +535 -0
- package/examples/codex/.codex/agents/clean-architect.toml +17 -0
- package/examples/codex/.codex/agents/clean-qa-editor.toml +17 -0
- package/examples/codex/.codex/agents/contaminated-manager-verifier.toml +21 -0
- package/examples/codex/.codex/agents/contaminated-source-analyst.toml +17 -0
- package/hooks/check-artifact-leakage.py +317 -0
- package/hooks/clean-room-hook.py +88 -0
- package/hooks/clean_room_paths.py +130 -0
- package/hooks/deny-clean-room-shell.py +30 -0
- package/hooks/deny-clean-source-read.py +104 -0
- package/hooks/deny-contaminated-clean-write.py +134 -0
- package/hooks/hooks.json +44 -0
- package/hooks/require-clean-room-env.py +127 -0
- package/hooks/validate-handoff-package.py +140 -0
- package/hooks/validate-json-schema.py +283 -0
- package/lib/fs-utils.cjs +123 -0
- package/lib/hooks.cjs +214 -0
- package/package.json +49 -0
- package/plugin.json +20 -0
- package/skills/attended/SKILL.md +25 -0
- package/skills/clean-room/SKILL.md +134 -0
- package/skills/clean-room/assets/behavior-spec.schema.json +367 -0
- package/skills/clean-room/assets/contamination-incident.schema.json +60 -0
- package/skills/clean-room/assets/coverage-ledger.schema.json +139 -0
- package/skills/clean-room/assets/evidence-ledger.schema.json +80 -0
- package/skills/clean-room/assets/handoff-package.schema.json +114 -0
- package/skills/clean-room/assets/qc-report.schema.json +248 -0
- package/skills/clean-room/assets/skeleton-manifest.schema.json +239 -0
- package/skills/clean-room/assets/source-index.schema.json +622 -0
- package/skills/clean-room/assets/task-manifest.schema.json +593 -0
- package/skills/clean-room/examples/README.md +18 -0
- package/skills/clean-room/examples/minimal-spec-package/behavior-spec.json +61 -0
- package/skills/clean-room/examples/minimal-spec-package/coverage-ledger.json +27 -0
- package/skills/clean-room/examples/minimal-spec-package/evidence-ledger.json +17 -0
- package/skills/clean-room/examples/minimal-spec-package/handoff-package.json +26 -0
- package/skills/clean-room/examples/minimal-spec-package/qc-report.json +25 -0
- package/skills/clean-room/examples/minimal-spec-package/skeleton-manifest.json +45 -0
- package/skills/clean-room/examples/minimal-spec-package/source-index.json +156 -0
- package/skills/clean-room/examples/minimal-spec-package/task-manifest.json +220 -0
- package/skills/clean-room/references/LEAKAGE-RULES.md +92 -0
- package/skills/clean-room/references/PROCESS.md +185 -0
- package/skills/clean-room/references/SPEC-SCHEMA.md +185 -0
- package/skills/clean-room/references/TARGET-LANGUAGE-GUIDE.md +43 -0
- package/skills/clean-room/scripts/build_source_index.py +1253 -0
- package/skills/clean-room/scripts/clean_room_tool_manager.py +199 -0
- package/skills/clean-room/scripts/clean_room_tooling.py +370 -0
- package/skills/unattended/SKILL.md +26 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: attended
|
|
3
|
+
description: Starts the Clean Room startup wizard in attended controller mode for authorized spec-only source-to-spec work with human review pauses at clean-room gates.
|
|
4
|
+
argument-hint: [authorized source scope and separated output roots]
|
|
5
|
+
disable-model-invocation: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Clean Room Attended
|
|
9
|
+
|
|
10
|
+
Start the clean-room startup wizard with `controller_policy.mode` fixed to `attended`.
|
|
11
|
+
|
|
12
|
+
Use the canonical `clean-room` skill workflow and references in this plugin. Preserve the same spec-only boundary, role separation, artifact schemas, leakage rules, and hook expectations.
|
|
13
|
+
|
|
14
|
+
Gather only required setup facts:
|
|
15
|
+
|
|
16
|
+
- Authorization statement, requester, allowed actions, prohibited actions, and evidence handling.
|
|
17
|
+
- Source roots, contaminated artifact root, clean root, and optional public or destination reference roots.
|
|
18
|
+
- Target language or destination constraints, if known.
|
|
19
|
+
- Target schema profile: `openspec-delta`, `gsd-planning-package`, `speckit-feature-folder`, or `kiro-spec-folder`.
|
|
20
|
+
|
|
21
|
+
Before indexing or artifact generation, confirm that source roots, contaminated artifact roots, and clean roots are separate paths. Stop if authorization is unclear, if the requested output includes replacement implementation code, or if clean and contaminated roots overlap.
|
|
22
|
+
|
|
23
|
+
Record `controller_policy.mode` as `attended`. Pause for human review at scope gate, clean handoff, QC deltas, blocked units, and final coverage.
|
|
24
|
+
|
|
25
|
+
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.
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: clean-room
|
|
3
|
+
description: Use for authorized clean-room, reverse-engineering, source-to-spec, compatibility rewrite, or migration tasks. Produces spec-only behavioral artifacts, skeleton manifests, QC reports, open questions, and test plans without replacement implementation code.
|
|
4
|
+
compatibility: Designed for Claude Code, Codex, and Antigravity. Requires separate contaminated and clean workspaces or profiles for real clean-room use.
|
|
5
|
+
metadata:
|
|
6
|
+
phase: spec-only
|
|
7
|
+
legal_posture: risk-reduction-not-legal-advice
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Clean Room
|
|
11
|
+
|
|
12
|
+
## Overview
|
|
13
|
+
|
|
14
|
+
Produce clean behavioral specifications from authorized source analysis while keeping contaminated source access separate from clean specification organization and QA. Stop at specs, skeleton manifests, compatibility notes, and test plans unless a separate clean implementation phase is explicitly designed.
|
|
15
|
+
|
|
16
|
+
This skill is not legal advice and does not create a legal safe harbor. Treat it as an engineering risk-reduction workflow for preserving a documented separation between source analysis and clean artifacts.
|
|
17
|
+
|
|
18
|
+
## Required Gates
|
|
19
|
+
|
|
20
|
+
1. Confirm authorization, source scope, destination scope, allowed actions, prohibited actions, and evidence handling rules.
|
|
21
|
+
2. Separate contaminated and clean work into different workspaces, worktrees, or repositories. Prefer separate agent profiles or homes when platform support exists.
|
|
22
|
+
3. Keep contaminated chat history, raw source, raw diffs, source excerpts, comments, distinctive identifiers, and implementation-shaped pseudocode out of clean artifacts.
|
|
23
|
+
4. Produce structured artifacts only: source index, task manifest, evidence ledger references, coverage ledger summaries, behavioral spec, handoff package, skeleton manifest, QC report, open questions, incident records, and test plan.
|
|
24
|
+
5. Do not generate replacement implementation code in the spec-only phase.
|
|
25
|
+
6. Treat `allowed-tools` and skill frontmatter as convenience, not as a security boundary. Enforce separation with workspace paths, profiles, role agents, hooks, schema validation, and artifact quarantine.
|
|
26
|
+
|
|
27
|
+
## Role Model
|
|
28
|
+
|
|
29
|
+
Use these roles conceptually. If the host supports subagents, map each role to a separate agent or profile. If not, run the phases manually and keep artifacts separated.
|
|
30
|
+
|
|
31
|
+
- Agent 0 / contaminated manager/verifier: consumes the contaminated source index, decomposes the source scope into logical batches, tracks coverage, assigns source-reading work, and checks final spec coverage against source. It may read source but must send only abstract delta tickets across the wall.
|
|
32
|
+
- Agent 1 / contaminated source analyst/spec writer: reads source in a read-only manner and writes neutral tasks and behavioral specs. It must avoid code, copied comments, distinctive identifiers unless public API compatibility requires them, and source-shaped pseudocode.
|
|
33
|
+
- Agent 2 / clean architect/skeleton organizer: reads only approved clean handoff artifacts, manages the selected clean schema base, organizes specs into a target-neutral skeleton manifest, and records target-language constraints without choosing a default language.
|
|
34
|
+
- Agent 3 / clean QA/spec editor: reads only clean artifacts, checks schema conformance, terminology consistency, leakage risk, gaps, and testability, then reports abstract findings back to Agent 0.
|
|
35
|
+
|
|
36
|
+
## Workflow
|
|
37
|
+
|
|
38
|
+
Read `references/PROCESS.md` before running the workflow. Read `references/LEAKAGE-RULES.md` before writing or reviewing any artifact that crosses from contaminated to clean work. Read `references/SPEC-SCHEMA.md` when creating or validating artifact contents. Read `references/TARGET-LANGUAGE-GUIDE.md` when a destination language, framework, or public compatibility target is part of the request.
|
|
39
|
+
|
|
40
|
+
Agent zero/controller must set and pass the clean-room environment block into every role session before tool use. Do not assume a new agent session inherits prior values. Required values are `CLEAN_ROOM_ROLE`, `CLEAN_ROOM_SOURCE_ROOTS`, `CLEAN_ROOM_CONTAMINATED_ARTIFACT_ROOTS`, `CLEAN_ROOM_CLEAN_ROOTS`, `CLEAN_ROOM_SCHEMA_DIR`, and, for clean roles, `CLEAN_ROOM_ALLOWED_READ_ROOTS`.
|
|
41
|
+
|
|
42
|
+
When source scope is larger than a single obvious unit, run `scripts/build_source_index.py` as a controller preflight before starting clean-room role sessions. The resulting `source-index.json` is contaminated-only input for Agent 0. It may contain source paths, import/export names, dependency relationships, large-file segment spans, and optional local AST/indexing tool status, so do not place it in clean handoff packages or expose it to Agent 2 or Agent 3.
|
|
43
|
+
|
|
44
|
+
Optional AST/indexing helpers are detected before the controller loop through `scripts/clean_room_tool_manager.py --status` or through the dependency report embedded by `build_source_index.py`. No dependency is installed implicitly. Local installs require an explicit exact version, for example `scripts/clean_room_tool_manager.py --install-local ast-grep --version <exact-version>`, and write under `~/.cache/re-skills/clean-room-tools/`. Target-project `.local/bin`, `.bin`, and `node_modules/.bin` are ignored unless `--allow-working-project-tools` or `RE_SKILLS_TRUST_PROJECT_TOOLS=1` is set.
|
|
45
|
+
|
|
46
|
+
Controller mode defaults to `attended` when `task-manifest.json` has no `controller_policy`. In `attended` mode, agent zero pauses for human review at scope gate, handoff, QC deltas, blocked units, and final coverage. In `unattended` mode, agent zero may run a bounded controller loop: reload durable artifacts for each iteration, select at most one pending or gap unit, start each role from fresh context with the required environment block, validate before advancing, and stop on any configured safety or ambiguity condition.
|
|
47
|
+
|
|
48
|
+
Do not grant shell-style tools to clean-room role sessions. Use the bundled hooks to fail closed if shell tools are invoked under a clean-room role.
|
|
49
|
+
|
|
50
|
+
## Startup Wizard
|
|
51
|
+
|
|
52
|
+
Use the startup wizard when the user invokes this skill directly, such as `/clean-room` or `/clean-room:clean-room`, and does not provide an existing `task-manifest.json` or specific artifact review task.
|
|
53
|
+
|
|
54
|
+
Gather only the setup facts needed to decide whether the workflow may start:
|
|
55
|
+
|
|
56
|
+
- Authorization statement, requester, allowed actions, prohibited actions, and evidence handling.
|
|
57
|
+
- Source roots, contaminated artifact root, clean root, and optional public or destination reference roots.
|
|
58
|
+
- Target language or destination constraints, if known.
|
|
59
|
+
- Target schema profile: `openspec-delta`, `gsd-planning-package`, `speckit-feature-folder`, or `kiro-spec-folder`.
|
|
60
|
+
- Controller mode. If unspecified, use `attended`.
|
|
61
|
+
|
|
62
|
+
Before indexing or artifact generation, confirm that source roots, contaminated artifact roots, and clean roots are separate paths. Stop if authorization is unclear, if the requested output includes replacement implementation code, or if clean and contaminated roots overlap.
|
|
63
|
+
|
|
64
|
+
For `attended` mode, record a `controller_policy` that pauses for human review at scope gate, clean handoff, QC deltas, blocked units, and final coverage.
|
|
65
|
+
|
|
66
|
+
For `unattended` mode, require explicit authorization, separated roots, and finite bounds before work starts. Record `controller_policy.mode` as `unattended`, `max_units_per_iteration` as `1`, `max_iterations` as `10` unless the user supplied another finite value, and include these stop conditions: `authorization-missing`, `scope-change`, `contamination-suspected`, `schema-validation-failed`, `leakage-scan-failed`, `unit-blocked`, `coverage-complete`, and `iteration-limit-reached`.
|
|
67
|
+
|
|
68
|
+
Default sequence:
|
|
69
|
+
|
|
70
|
+
1. Scope gate: record authorization and boundaries in `task-manifest.json`.
|
|
71
|
+
2. Format and pipeline gate: record the user's selected canonical-plus-target profile and Agent 0-3 handoff contract in `task-manifest.json`.
|
|
72
|
+
3. Controller preflight source index: run the bundled source indexer outside clean-room role sessions and write contaminated `source-index.json`.
|
|
73
|
+
4. Source decomposition: Agent 0 uses `source-index.json` to create `task-manifest.json` `units` with stable, non-source task identifiers. Prefer dependency groups and `recommended_batches`; when `large_items` or `file_segments` are present, narrow the unit to the relevant segment or batch before Agent 1 reads source. Unit descriptions must remain neutral.
|
|
74
|
+
5. Contaminated spec writing: Agent 1 produces one or more `behavior-spec.json` artifacts from observed behavior, public API contracts, error conditions, invariants, state transitions, and compatibility requirements.
|
|
75
|
+
6. Leakage review: remove raw source expression, copied comments, raw diffs, source-shaped pseudocode, and nonessential distinctive names before clean handoff.
|
|
76
|
+
7. Clean handoff: move only approved structured artifacts to the clean workspace.
|
|
77
|
+
8. Clean schema and skeleton organization: Agent 2 merges approved handoff artifacts into the selected clean schema base and produces `skeleton-manifest.json` from the clean specs, target constraints, and public compatibility requirements.
|
|
78
|
+
9. Clean QC: Agent 3 produces `qc-report.json`, including schema status, leakage status, missing behavior, ambiguous behavior, testability, and recommended abstract delta tickets.
|
|
79
|
+
10. Contaminated coverage verification: Agent 0 compares clean specs and QC results against source coverage in `coverage-ledger.json`, `evidence-ledger.json`, `qc-report.json`, and abstract delta tickets. Send only abstract delta tickets back to clean work.
|
|
80
|
+
11. Stop when coverage is complete enough for the requested spec package. Do not implement replacement code.
|
|
81
|
+
|
|
82
|
+
## Artifact Set
|
|
83
|
+
|
|
84
|
+
Use the JSON schemas in `assets/` as the contract for machine-readable artifacts:
|
|
85
|
+
|
|
86
|
+
- `task-manifest.schema.json`
|
|
87
|
+
- `source-index.schema.json`
|
|
88
|
+
- `coverage-ledger.schema.json`
|
|
89
|
+
- `evidence-ledger.schema.json`
|
|
90
|
+
- `handoff-package.schema.json`
|
|
91
|
+
- `behavior-spec.schema.json`
|
|
92
|
+
- `skeleton-manifest.schema.json`
|
|
93
|
+
- `qc-report.schema.json`
|
|
94
|
+
- `contamination-incident.schema.json`
|
|
95
|
+
|
|
96
|
+
Use `hooks/` as optional guardrail and audit scaffolding. Configure the host with explicit role and path environment variables before relying on the scripts:
|
|
97
|
+
|
|
98
|
+
- `CLEAN_ROOM_ROLE`
|
|
99
|
+
- `CLEAN_ROOM_SOURCE_ROOTS`
|
|
100
|
+
- `CLEAN_ROOM_CONTAMINATED_ARTIFACT_ROOTS`
|
|
101
|
+
- `CLEAN_ROOM_CLEAN_ROOTS`
|
|
102
|
+
- `CLEAN_ROOM_ALLOWED_READ_ROOTS`
|
|
103
|
+
- `CLEAN_ROOM_SCHEMA_DIR`
|
|
104
|
+
- Optional `CLEAN_ROOM_PRIVATE_IDENTIFIER_DENYLIST` for hook-only scanning of private source identifiers.
|
|
105
|
+
|
|
106
|
+
For clean roles, read access is deny-by-default: allow only `CLEAN_ROOM_CLEAN_ROOTS` and explicit public or destination constraint roots in `CLEAN_ROOM_ALLOWED_READ_ROOTS`. Write access is also deny-by-default: clean roles write only under `CLEAN_ROOM_CLEAN_ROOTS`; contaminated roles write only under `CLEAN_ROOM_CONTAMINATED_ARTIFACT_ROOTS`. Prefer one artifact directory for contaminated outputs and a separate artifact directory for clean outputs. Mark every behavioral claim as `observed`, `derived`, `inferred`, `unknown`, or `error`.
|
|
107
|
+
|
|
108
|
+
## Output Rules
|
|
109
|
+
|
|
110
|
+
Allowed clean-side content:
|
|
111
|
+
|
|
112
|
+
- Neutral behavior descriptions.
|
|
113
|
+
- Public interface names only when needed for compatibility.
|
|
114
|
+
- Inputs, outputs, state transitions, invariants, errors, timing expectations, and test scenarios.
|
|
115
|
+
- Abstract implementation constraints such as "must preserve stable sort order" or "must reject malformed input before persistence."
|
|
116
|
+
|
|
117
|
+
Blocked clean-side content:
|
|
118
|
+
|
|
119
|
+
- Source files, source excerpts, copied comments, raw diffs, stack traces containing source lines, and decompiled output.
|
|
120
|
+
- Pseudocode that mirrors source structure, function ordering, private helper names, or distinctive control flow.
|
|
121
|
+
- Nonessential package, module, class, function, method, variable, constant, field, internal identifiers, magic strings, log messages, UI copy, formatting, and naming schemes.
|
|
122
|
+
- Patent, trade-secret, or licensing conclusions presented as verified legal findings.
|
|
123
|
+
|
|
124
|
+
Identifier rule: package names, namespace/module paths, class names, function or method names, variable names, constants, fields, and internal event names are contaminated unless they are public compatibility surface. If retained, list the name in `public_surface` or `public_contracts` with `name`, `kind`, `visibility`, and a concrete compatibility reason; otherwise rewrite to neutral behavior.
|
|
125
|
+
|
|
126
|
+
## Completion Criteria
|
|
127
|
+
|
|
128
|
+
Finish the spec-only phase when:
|
|
129
|
+
|
|
130
|
+
- `task-manifest.json` defines source scope, clean scope, selected target profile, Agent 0-3 pipeline, handoff rules, optional `source_index_ref`, and units.
|
|
131
|
+
- Every in-scope unit has a behavior spec or an explicit out-of-scope record.
|
|
132
|
+
- `skeleton-manifest.json` maps clean specs to target-neutral implementation areas and tests.
|
|
133
|
+
- `qc-report.json` records schema status, leakage review, unresolved gaps, and abstract delta tickets.
|
|
134
|
+
- No replacement code has been generated.
|
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "Clean-Room Behavior Spec",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": [
|
|
7
|
+
"spec_id",
|
|
8
|
+
"unit_id",
|
|
9
|
+
"producer_role",
|
|
10
|
+
"created_at",
|
|
11
|
+
"source_unit_refs",
|
|
12
|
+
"evidence_refs",
|
|
13
|
+
"evidence_status",
|
|
14
|
+
"confidence",
|
|
15
|
+
"leakage_risk",
|
|
16
|
+
"summary",
|
|
17
|
+
"observable_surface",
|
|
18
|
+
"public_surface",
|
|
19
|
+
"compatibility_level",
|
|
20
|
+
"observable_behaviors",
|
|
21
|
+
"inputs",
|
|
22
|
+
"outputs",
|
|
23
|
+
"state_transitions",
|
|
24
|
+
"edge_cases",
|
|
25
|
+
"error_conditions",
|
|
26
|
+
"negative_behaviors",
|
|
27
|
+
"timing_or_ordering",
|
|
28
|
+
"security_relevant_behavior",
|
|
29
|
+
"invariants",
|
|
30
|
+
"non_goals",
|
|
31
|
+
"test_scenarios",
|
|
32
|
+
"open_questions",
|
|
33
|
+
"leakage_review",
|
|
34
|
+
"review_history"
|
|
35
|
+
],
|
|
36
|
+
"properties": {
|
|
37
|
+
"spec_id": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"minLength": 1
|
|
40
|
+
},
|
|
41
|
+
"unit_id": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"minLength": 1
|
|
44
|
+
},
|
|
45
|
+
"producer_role": {
|
|
46
|
+
"const": "contaminated-source-analyst"
|
|
47
|
+
},
|
|
48
|
+
"created_at": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"format": "date-time"
|
|
51
|
+
},
|
|
52
|
+
"source_unit_refs": {
|
|
53
|
+
"type": "array",
|
|
54
|
+
"items": {
|
|
55
|
+
"type": "string"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"evidence_refs": {
|
|
59
|
+
"type": "array",
|
|
60
|
+
"items": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"pattern": "^evidence-ledger:"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"evidence_status": {
|
|
66
|
+
"$ref": "#/$defs/evidence_status"
|
|
67
|
+
},
|
|
68
|
+
"confidence": {
|
|
69
|
+
"$ref": "#/$defs/confidence"
|
|
70
|
+
},
|
|
71
|
+
"leakage_risk": {
|
|
72
|
+
"$ref": "#/$defs/leakage_risk"
|
|
73
|
+
},
|
|
74
|
+
"summary": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"minLength": 1
|
|
77
|
+
},
|
|
78
|
+
"observable_surface": {
|
|
79
|
+
"type": "array",
|
|
80
|
+
"items": {
|
|
81
|
+
"$ref": "#/$defs/claim"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"public_surface": {
|
|
85
|
+
"type": "array",
|
|
86
|
+
"items": {
|
|
87
|
+
"$ref": "#/$defs/public_surface_item"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"compatibility_level": {
|
|
91
|
+
"enum": [
|
|
92
|
+
"exact-public-contract",
|
|
93
|
+
"behavior-compatible",
|
|
94
|
+
"best-effort",
|
|
95
|
+
"unspecified"
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
"observable_behaviors": {
|
|
99
|
+
"type": "array",
|
|
100
|
+
"items": {
|
|
101
|
+
"$ref": "#/$defs/claim"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"inputs": {
|
|
105
|
+
"type": "array",
|
|
106
|
+
"items": {
|
|
107
|
+
"$ref": "#/$defs/claim"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"outputs": {
|
|
111
|
+
"type": "array",
|
|
112
|
+
"items": {
|
|
113
|
+
"$ref": "#/$defs/claim"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"state_transitions": {
|
|
117
|
+
"type": "array",
|
|
118
|
+
"items": {
|
|
119
|
+
"$ref": "#/$defs/claim"
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"edge_cases": {
|
|
123
|
+
"type": "array",
|
|
124
|
+
"items": {
|
|
125
|
+
"$ref": "#/$defs/claim"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"error_conditions": {
|
|
129
|
+
"type": "array",
|
|
130
|
+
"items": {
|
|
131
|
+
"$ref": "#/$defs/claim"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"negative_behaviors": {
|
|
135
|
+
"type": "array",
|
|
136
|
+
"items": {
|
|
137
|
+
"$ref": "#/$defs/claim"
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"timing_or_ordering": {
|
|
141
|
+
"type": "array",
|
|
142
|
+
"items": {
|
|
143
|
+
"$ref": "#/$defs/claim"
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"security_relevant_behavior": {
|
|
147
|
+
"type": "array",
|
|
148
|
+
"items": {
|
|
149
|
+
"$ref": "#/$defs/claim"
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"invariants": {
|
|
153
|
+
"type": "array",
|
|
154
|
+
"items": {
|
|
155
|
+
"$ref": "#/$defs/claim"
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"compatibility_notes": {
|
|
159
|
+
"type": "array",
|
|
160
|
+
"items": {
|
|
161
|
+
"$ref": "#/$defs/claim"
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"non_goals": {
|
|
165
|
+
"type": "array",
|
|
166
|
+
"items": {
|
|
167
|
+
"type": "string"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"test_scenarios": {
|
|
171
|
+
"type": "array",
|
|
172
|
+
"items": {
|
|
173
|
+
"$ref": "#/$defs/test_scenario"
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"open_questions": {
|
|
177
|
+
"type": "array",
|
|
178
|
+
"items": {
|
|
179
|
+
"type": "string"
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"leakage_review": {
|
|
183
|
+
"$ref": "#/$defs/leakage_review"
|
|
184
|
+
},
|
|
185
|
+
"review_history": {
|
|
186
|
+
"type": "array",
|
|
187
|
+
"items": {
|
|
188
|
+
"$ref": "#/$defs/review_event"
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"$defs": {
|
|
193
|
+
"evidence_status": {
|
|
194
|
+
"enum": [
|
|
195
|
+
"observed",
|
|
196
|
+
"derived",
|
|
197
|
+
"inferred",
|
|
198
|
+
"unknown",
|
|
199
|
+
"error"
|
|
200
|
+
]
|
|
201
|
+
},
|
|
202
|
+
"confidence": {
|
|
203
|
+
"enum": [
|
|
204
|
+
"high",
|
|
205
|
+
"medium",
|
|
206
|
+
"low"
|
|
207
|
+
]
|
|
208
|
+
},
|
|
209
|
+
"leakage_risk": {
|
|
210
|
+
"enum": [
|
|
211
|
+
"low",
|
|
212
|
+
"medium",
|
|
213
|
+
"high",
|
|
214
|
+
"blocked"
|
|
215
|
+
]
|
|
216
|
+
},
|
|
217
|
+
"claim": {
|
|
218
|
+
"type": "object",
|
|
219
|
+
"additionalProperties": false,
|
|
220
|
+
"required": [
|
|
221
|
+
"claim_id",
|
|
222
|
+
"claim",
|
|
223
|
+
"evidence_status",
|
|
224
|
+
"evidence_refs",
|
|
225
|
+
"confidence"
|
|
226
|
+
],
|
|
227
|
+
"properties": {
|
|
228
|
+
"claim_id": {
|
|
229
|
+
"type": "string",
|
|
230
|
+
"minLength": 1
|
|
231
|
+
},
|
|
232
|
+
"claim": {
|
|
233
|
+
"type": "string",
|
|
234
|
+
"minLength": 1
|
|
235
|
+
},
|
|
236
|
+
"evidence_status": {
|
|
237
|
+
"$ref": "#/$defs/evidence_status"
|
|
238
|
+
},
|
|
239
|
+
"evidence_refs": {
|
|
240
|
+
"type": "array",
|
|
241
|
+
"items": {
|
|
242
|
+
"type": "string",
|
|
243
|
+
"pattern": "^evidence-ledger:"
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
"confidence": {
|
|
247
|
+
"$ref": "#/$defs/confidence"
|
|
248
|
+
},
|
|
249
|
+
"rationale": {
|
|
250
|
+
"type": "string"
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
"public_surface_item": {
|
|
255
|
+
"type": "object",
|
|
256
|
+
"additionalProperties": false,
|
|
257
|
+
"required": [
|
|
258
|
+
"name",
|
|
259
|
+
"kind",
|
|
260
|
+
"visibility",
|
|
261
|
+
"compatibility_reason"
|
|
262
|
+
],
|
|
263
|
+
"properties": {
|
|
264
|
+
"name": {
|
|
265
|
+
"type": "string",
|
|
266
|
+
"minLength": 1
|
|
267
|
+
},
|
|
268
|
+
"kind": {
|
|
269
|
+
"type": "string",
|
|
270
|
+
"minLength": 1
|
|
271
|
+
},
|
|
272
|
+
"visibility": {
|
|
273
|
+
"enum": [
|
|
274
|
+
"public",
|
|
275
|
+
"destination",
|
|
276
|
+
"protocol",
|
|
277
|
+
"user-required"
|
|
278
|
+
]
|
|
279
|
+
},
|
|
280
|
+
"compatibility_reason": {
|
|
281
|
+
"type": "string",
|
|
282
|
+
"minLength": 1
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
"test_scenario": {
|
|
287
|
+
"type": "object",
|
|
288
|
+
"additionalProperties": false,
|
|
289
|
+
"required": [
|
|
290
|
+
"scenario_id",
|
|
291
|
+
"scenario",
|
|
292
|
+
"expected_result",
|
|
293
|
+
"coverage"
|
|
294
|
+
],
|
|
295
|
+
"properties": {
|
|
296
|
+
"scenario_id": {
|
|
297
|
+
"type": "string",
|
|
298
|
+
"minLength": 1
|
|
299
|
+
},
|
|
300
|
+
"scenario": {
|
|
301
|
+
"type": "string",
|
|
302
|
+
"minLength": 1
|
|
303
|
+
},
|
|
304
|
+
"expected_result": {
|
|
305
|
+
"type": "string",
|
|
306
|
+
"minLength": 1
|
|
307
|
+
},
|
|
308
|
+
"coverage": {
|
|
309
|
+
"type": "array",
|
|
310
|
+
"items": {
|
|
311
|
+
"type": "string"
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
"leakage_review": {
|
|
317
|
+
"type": "object",
|
|
318
|
+
"additionalProperties": false,
|
|
319
|
+
"required": [
|
|
320
|
+
"status",
|
|
321
|
+
"reviewer_role",
|
|
322
|
+
"notes"
|
|
323
|
+
],
|
|
324
|
+
"properties": {
|
|
325
|
+
"status": {
|
|
326
|
+
"enum": [
|
|
327
|
+
"pending",
|
|
328
|
+
"passed",
|
|
329
|
+
"failed",
|
|
330
|
+
"quarantined"
|
|
331
|
+
]
|
|
332
|
+
},
|
|
333
|
+
"reviewer_role": {
|
|
334
|
+
"enum": [
|
|
335
|
+
"contaminated-source-analyst",
|
|
336
|
+
"clean-qa-editor"
|
|
337
|
+
]
|
|
338
|
+
},
|
|
339
|
+
"notes": {
|
|
340
|
+
"type": "string"
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
"review_event": {
|
|
345
|
+
"type": "object",
|
|
346
|
+
"additionalProperties": false,
|
|
347
|
+
"required": [
|
|
348
|
+
"reviewer_role",
|
|
349
|
+
"status",
|
|
350
|
+
"notes"
|
|
351
|
+
],
|
|
352
|
+
"properties": {
|
|
353
|
+
"reviewer_role": {
|
|
354
|
+
"type": "string",
|
|
355
|
+
"minLength": 1
|
|
356
|
+
},
|
|
357
|
+
"status": {
|
|
358
|
+
"type": "string",
|
|
359
|
+
"minLength": 1
|
|
360
|
+
},
|
|
361
|
+
"notes": {
|
|
362
|
+
"type": "string"
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "Clean-Room Contamination Incident",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": [
|
|
7
|
+
"incident_id",
|
|
8
|
+
"detected_at",
|
|
9
|
+
"artifact",
|
|
10
|
+
"blocked_material_type",
|
|
11
|
+
"action",
|
|
12
|
+
"clean_context_invalidated",
|
|
13
|
+
"reported_by_role",
|
|
14
|
+
"notes"
|
|
15
|
+
],
|
|
16
|
+
"properties": {
|
|
17
|
+
"incident_id": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"minLength": 1
|
|
20
|
+
},
|
|
21
|
+
"detected_at": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"format": "date-time"
|
|
24
|
+
},
|
|
25
|
+
"artifact": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"minLength": 1
|
|
28
|
+
},
|
|
29
|
+
"blocked_material_type": {
|
|
30
|
+
"enum": [
|
|
31
|
+
"source_excerpt",
|
|
32
|
+
"raw_diff",
|
|
33
|
+
"private_identifier",
|
|
34
|
+
"source_shaped_pseudocode",
|
|
35
|
+
"other"
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"action": {
|
|
39
|
+
"enum": [
|
|
40
|
+
"quarantined",
|
|
41
|
+
"deleted",
|
|
42
|
+
"regenerated"
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
"clean_context_invalidated": {
|
|
46
|
+
"type": "boolean"
|
|
47
|
+
},
|
|
48
|
+
"reported_by_role": {
|
|
49
|
+
"enum": [
|
|
50
|
+
"contaminated-manager-verifier",
|
|
51
|
+
"contaminated-source-analyst",
|
|
52
|
+
"clean-architect",
|
|
53
|
+
"clean-qa-editor"
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
"notes": {
|
|
57
|
+
"type": "string"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|