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,185 @@
|
|
|
1
|
+
# Clean-Room Process
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Use this process to turn authorized source analysis into clean behavioral specifications without moving source expression into the clean workspace. Treat the wall as a process, filesystem, and profile boundary. Prompt instructions alone are not sufficient.
|
|
6
|
+
|
|
7
|
+
This process reduces engineering risk. It does not resolve patent, trade-secret, license, contract, or jurisdiction-specific legal questions.
|
|
8
|
+
|
|
9
|
+
## Workspace Separation
|
|
10
|
+
|
|
11
|
+
Use separate locations for each trust domain:
|
|
12
|
+
|
|
13
|
+
- Contaminated source workspace: source-readable, read-only where practical, no clean implementation output.
|
|
14
|
+
- Contaminated artifact workspace: source indexes, task manifests, draft behavior specs, coverage ledgers, and abstract delta tickets. Configure it with `CLEAN_ROOM_CONTAMINATED_ARTIFACT_ROOTS`.
|
|
15
|
+
- Clean spec workspace: behavior specs that passed leakage review, skeleton manifests, QC reports, and test plans.
|
|
16
|
+
- Clean allowed reference workspace: public documentation or destination constraints explicitly configured for clean-role reads.
|
|
17
|
+
- Optional implementation workspace: out of scope for this spec-only skill.
|
|
18
|
+
|
|
19
|
+
Prefer separate agent profiles or homes when the host supports them. Do not rely on one chat context with role labels as the only separation control.
|
|
20
|
+
|
|
21
|
+
Use host-level policy where available:
|
|
22
|
+
|
|
23
|
+
- Claude role agents live in `agents/`.
|
|
24
|
+
- Claude hook scaffolding lives in `hooks/`.
|
|
25
|
+
- Codex agent templates live in `examples/codex/.codex/agents/`.
|
|
26
|
+
- Codex plugin hooks may require enabling plugin hook support in the user or project config before they run.
|
|
27
|
+
|
|
28
|
+
For clean roles, configure read hooks as deny-by-default. `CLEAN_ROOM_CLEAN_ROOTS` is the clean artifact allowlist. `CLEAN_ROOM_ALLOWED_READ_ROOTS` is the only extra clean-role read allowlist for public documentation or destination constraints. `CLEAN_ROOM_SOURCE_ROOTS` remains denied even if a source path is also listed elsewhere.
|
|
29
|
+
|
|
30
|
+
For all roles, configure write hooks as deny-by-default. Clean roles may write only under `CLEAN_ROOM_CLEAN_ROOTS`. Contaminated roles may write only under `CLEAN_ROOM_CONTAMINATED_ARTIFACT_ROOTS`. Source roots should remain read-only for contaminated roles.
|
|
31
|
+
|
|
32
|
+
Agent zero/controller is responsible for computing the role environment block and passing it into every new role session. Sessions must not rely on inherited values. The minimum block is:
|
|
33
|
+
|
|
34
|
+
- `CLEAN_ROOM_ROLE`
|
|
35
|
+
- `CLEAN_ROOM_SOURCE_ROOTS`
|
|
36
|
+
- `CLEAN_ROOM_CONTAMINATED_ARTIFACT_ROOTS`
|
|
37
|
+
- `CLEAN_ROOM_CLEAN_ROOTS`
|
|
38
|
+
- `CLEAN_ROOM_SCHEMA_DIR`
|
|
39
|
+
- `CLEAN_ROOM_ALLOWED_READ_ROOTS` for clean roles, even when empty
|
|
40
|
+
|
|
41
|
+
Optional guardrail value:
|
|
42
|
+
|
|
43
|
+
- `CLEAN_ROOM_PRIVATE_IDENTIFIER_DENYLIST`: path-separated, line-oriented files containing private source package, module, function, method, variable, constant, field, or other internal identifiers that must not appear in clean artifacts. Blank lines and `#` comments are ignored. Files are bounded to 1,000,000 bytes each, 20,000 total terms, and 512 characters per term. This is for hook scanning only; keep it outside clean-role readable roots and do not include its contents in clean artifacts.
|
|
44
|
+
|
|
45
|
+
Do not grant shell-style tools to clean-room role sessions. Shell access can bypass path-aware read and write hooks.
|
|
46
|
+
|
|
47
|
+
Run `scripts/build_source_index.py` only as controller preflight before clean-room role sessions. Treat `source-index.json` as contaminated-only: it may record source paths, private import/export identifiers, file metrics, large-file line spans, optional AST/indexing tool status, and dependency relationships. Agent 0 may consume it to create neutral `task-manifest.json` units, but it must not cross to clean roles or clean handoff packages.
|
|
48
|
+
|
|
49
|
+
Use `scripts/clean_room_tool_manager.py --status` when the controller needs to inspect optional AST/indexing helpers before indexing. It checks env overrides, `~/.cache/re-skills/clean-room-tools/`, skill-local tools, and trusted PATH. It does not install anything unless the user explicitly runs `--install-local` with an exact version. Target-project `.local/bin`, `.bin`, and `node_modules/.bin` stay untrusted unless `--allow-working-project-tools` or `RE_SKILLS_TRUST_PROJECT_TOOLS=1` is set.
|
|
50
|
+
|
|
51
|
+
Do not treat skill frontmatter or allowed tool lists as a complete enforcement boundary.
|
|
52
|
+
|
|
53
|
+
The task manifest also records the Agent 0-3 pipeline:
|
|
54
|
+
|
|
55
|
+
- Agent 0 is the contaminated manager/verifier.
|
|
56
|
+
- Agent 1 is the contaminated source analyst and neutral task/spec generator.
|
|
57
|
+
- Agent 2 is the clean architect and selected schema base merge manager.
|
|
58
|
+
- Agent 3 is the clean QA editor and final QC reporter back to Agent 0.
|
|
59
|
+
|
|
60
|
+
Agent 2 and Agent 3 are clean-domain roles. They must not read source workspaces, contaminated ledgers, or contaminated chat history.
|
|
61
|
+
|
|
62
|
+
## Controller Modes
|
|
63
|
+
|
|
64
|
+
`task-manifest.json` may include `controller_policy`. Missing policy means `attended`.
|
|
65
|
+
|
|
66
|
+
- `attended`: agent zero pauses for human review at scope gate, clean handoff, QC delta review, blocked units, and final coverage.
|
|
67
|
+
- `unattended`: agent zero runs a bounded controller loop. It reloads `task-manifest.json`, `coverage-ledger.json`, `evidence-ledger.json`, and clean QC artifacts at the start of each iteration, selects at most one pending or gap unit, starts each role session from fresh context with the required environment block, validates schema and leakage results before state advances, and stops on any configured safety or ambiguity condition.
|
|
68
|
+
|
|
69
|
+
The durable tasklist is `task-manifest.json` `units`, generated by agent zero during decomposition. For multi-file scopes, the task manifest may reference contaminated `source-index.json` batches through `source_index_ref` and per-unit `source_index_refs`. Progress is tracked in contaminated-side `coverage-ledger.json` and `evidence-ledger.json`; clean-side feedback returns through `qc-report.json` and abstract delta tickets only. Prior chat is not a source of truth for the next iteration.
|
|
70
|
+
|
|
71
|
+
## Role Duties
|
|
72
|
+
|
|
73
|
+
Contaminated manager/verifier:
|
|
74
|
+
|
|
75
|
+
- Confirm authorization and source scope.
|
|
76
|
+
- Consume contaminated `source-index.json` when present.
|
|
77
|
+
- Split work into bounded logical units that can map to one source-index batch.
|
|
78
|
+
- Track coverage in `coverage-ledger.json`.
|
|
79
|
+
- Track contaminated evidence references in `evidence-ledger.json`.
|
|
80
|
+
- Compare clean artifacts against source behavior.
|
|
81
|
+
- Return only abstract delta tickets, such as "retry behavior after transient network failure is missing."
|
|
82
|
+
|
|
83
|
+
Contaminated source analyst/spec writer:
|
|
84
|
+
|
|
85
|
+
- Read only the source needed for the assigned unit.
|
|
86
|
+
- Describe observable behavior, public contracts, states, errors, invariants, and compatibility requirements.
|
|
87
|
+
- Mark every claim as `observed`, `derived`, `inferred`, `unknown`, or `error`.
|
|
88
|
+
- Treat package, module, class, function, method, variable, constant, and field names as private identifiers unless they are public compatibility surface.
|
|
89
|
+
- Remove source expression before handoff.
|
|
90
|
+
|
|
91
|
+
Clean architect/skeleton organizer:
|
|
92
|
+
|
|
93
|
+
- Read only approved clean artifacts.
|
|
94
|
+
- Manage the selected clean schema base and merge approved handoff artifacts into it.
|
|
95
|
+
- Map specs to target-neutral modules, packages, components, or service areas.
|
|
96
|
+
- Record target-language constraints supplied by the user or destination repo.
|
|
97
|
+
- Produce `skeleton-manifest.json`.
|
|
98
|
+
|
|
99
|
+
Clean QA/spec editor:
|
|
100
|
+
|
|
101
|
+
- Validate schema conformance.
|
|
102
|
+
- Check for leakage indicators.
|
|
103
|
+
- Normalize terminology.
|
|
104
|
+
- Identify ambiguity, missing edge cases, and untestable claims.
|
|
105
|
+
- Produce `qc-report.json`.
|
|
106
|
+
|
|
107
|
+
## Workflow
|
|
108
|
+
|
|
109
|
+
1. Scope gate:
|
|
110
|
+
- Record requester, target identifier, authorization text, source scope, clean output scope, prohibited actions, and evidence handling.
|
|
111
|
+
- Record the user's selected `format_selection.target_profile` and native artifact expectations from `docs/research-skill-spec.md`.
|
|
112
|
+
- Record `controller_policy` when the task should run in explicit attended or bounded unattended mode.
|
|
113
|
+
- Record the Agent 0-3 pipeline and handoff rules.
|
|
114
|
+
- Record the source roots, contaminated artifact roots, clean roots, schema directory, and clean-role allowed read roots that agent zero/controller will pass to each session.
|
|
115
|
+
- Stop if authorization or ownership is unclear.
|
|
116
|
+
2. Source index preflight:
|
|
117
|
+
- Run `scripts/build_source_index.py` outside clean-room role sessions when source scope is larger than a single obvious unit.
|
|
118
|
+
- Write `source-index.json` under the contaminated artifact workspace.
|
|
119
|
+
- Keep dependency detection pre-loop and bounded; do not install Homebrew, npm, SDK, pip, or local-download tools implicitly.
|
|
120
|
+
- Validate the source index schema before Agent 0 consumes it.
|
|
121
|
+
3. Decompose:
|
|
122
|
+
- Create the tasklist as bounded source units with neutral ids in `task-manifest.json`.
|
|
123
|
+
- Prefer behavior or public surface groupings over source-file mirroring.
|
|
124
|
+
- Use source-index dependency groups, `recommended_batches`, `large_items`, and `file_segments` to keep Agent 1 context small while preserving import/export relationships.
|
|
125
|
+
4. Analyze:
|
|
126
|
+
- Read source in the contaminated workspace.
|
|
127
|
+
- Write behavior specs using the schema fields.
|
|
128
|
+
- Include only compatibility-relevant public names.
|
|
129
|
+
- Record retained public names in `public_surface` with `name`, `kind`, `visibility`, and compatibility reasons.
|
|
130
|
+
5. Scrub:
|
|
131
|
+
- Apply `LEAKAGE-RULES.md`.
|
|
132
|
+
- Remove copied expression and source-shaped structure.
|
|
133
|
+
- Run the leakage hook with `CLEAN_ROOM_PRIVATE_IDENTIFIER_DENYLIST` when a private identifier list exists.
|
|
134
|
+
- Record unresolved questions instead of guessing.
|
|
135
|
+
6. Handoff:
|
|
136
|
+
- Move only clean-approved structured artifacts to the clean workspace.
|
|
137
|
+
- Include coverage summaries or abstract delta tickets, not raw contaminated ledgers.
|
|
138
|
+
- Do not include `source-index.json`, source paths, import/export listings, or dependency graphs.
|
|
139
|
+
- Do not include clean-produced skeleton manifests or QC reports in contaminated-to-clean handoff packages.
|
|
140
|
+
- Preserve producer role and review status.
|
|
141
|
+
- Create `handoff-package.json`.
|
|
142
|
+
7. Organize:
|
|
143
|
+
- Agent 2 builds or merges the clean schema base from approved handoff artifacts, the selected target profile, and target constraints.
|
|
144
|
+
- Build a skeleton manifest from clean specs and target constraints.
|
|
145
|
+
- Avoid implementation code, private algorithm choices, or source-derived layout.
|
|
146
|
+
8. QC:
|
|
147
|
+
- Agent 3 validates schemas and reviews leakage risk.
|
|
148
|
+
- Record artifact hashes, leakage scan summary, coverage status, and contamination incidents.
|
|
149
|
+
- Produce abstract delta tickets for gaps and report them back to Agent 0.
|
|
150
|
+
9. Verify coverage:
|
|
151
|
+
- Contaminated manager checks gaps against source.
|
|
152
|
+
- Return only abstract deltas.
|
|
153
|
+
- In unattended mode, reload durable artifacts and process at most one pending or gap unit per iteration.
|
|
154
|
+
- Repeat analyze, scrub, handoff, organize, and QC until coverage is acceptable or a stop condition is reached.
|
|
155
|
+
|
|
156
|
+
## Stop Conditions
|
|
157
|
+
|
|
158
|
+
Stop the workflow when any of these occur:
|
|
159
|
+
|
|
160
|
+
- Authorization is missing or narrower than the requested analysis.
|
|
161
|
+
- Clean roles were exposed to source, contaminated chat history, raw diffs, or copied source expression.
|
|
162
|
+
- A requested output requires replacement implementation code.
|
|
163
|
+
- Schema validation or leakage scan fails.
|
|
164
|
+
- A unit is blocked, ownership is unclear, or the source scope changes.
|
|
165
|
+
- An unattended loop reaches its configured iteration limit.
|
|
166
|
+
- Patent, trade-secret, license, or contract analysis is needed from counsel.
|
|
167
|
+
- The source scope is too large to keep bounded source index or coverage records.
|
|
168
|
+
|
|
169
|
+
## Final Package
|
|
170
|
+
|
|
171
|
+
Produce a final audit package containing:
|
|
172
|
+
|
|
173
|
+
- `task-manifest.json`
|
|
174
|
+
- contaminated-side `source-index.json`
|
|
175
|
+
- contaminated-side `coverage-ledger.json`
|
|
176
|
+
- contaminated-side `evidence-ledger.json`
|
|
177
|
+
- `handoff-package.json`
|
|
178
|
+
- one or more `behavior-spec.json` files, or a directory of unit-specific behavior specs
|
|
179
|
+
- `skeleton-manifest.json`
|
|
180
|
+
- `qc-report.json`
|
|
181
|
+
- `contamination-incident.json` records when applicable
|
|
182
|
+
- test plan content embedded in behavior specs and skeleton manifest
|
|
183
|
+
- open questions and abstract delta tickets that remain unresolved
|
|
184
|
+
|
|
185
|
+
The clean workspace package must contain only clean-approved artifacts. Keep raw contaminated ledgers in the contaminated artifact workspace unless a separate audit handoff explicitly includes them outside the clean workspace.
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# Spec Schema Guide
|
|
2
|
+
|
|
3
|
+
## Artifact Names
|
|
4
|
+
|
|
5
|
+
Use these canonical artifact names unless the surrounding project already has a stricter convention:
|
|
6
|
+
|
|
7
|
+
- `task-manifest.json`
|
|
8
|
+
- `source-index.json`
|
|
9
|
+
- `coverage-ledger.json`
|
|
10
|
+
- `evidence-ledger.json`
|
|
11
|
+
- `handoff-package.json`
|
|
12
|
+
- `behavior-spec.json`
|
|
13
|
+
- `skeleton-manifest.json`
|
|
14
|
+
- `qc-report.json`
|
|
15
|
+
- `contamination-incident.json`
|
|
16
|
+
|
|
17
|
+
For multiple source units, place unit specs under a clean directory such as `behavior-specs/` and keep each file schema-compatible with `behavior-spec.schema.json`.
|
|
18
|
+
|
|
19
|
+
## Evidence Status
|
|
20
|
+
|
|
21
|
+
Use one of these values on claims:
|
|
22
|
+
|
|
23
|
+
- `observed`: Directly visible in authorized source, public behavior, generated analysis, or runtime output.
|
|
24
|
+
- `derived`: Calculated from observed facts, such as an interface shape inferred from manifest metadata.
|
|
25
|
+
- `inferred`: Reasonable but not directly proven.
|
|
26
|
+
- `unknown`: Material question not answered.
|
|
27
|
+
- `error`: Tooling or analysis failed in a way that affects confidence.
|
|
28
|
+
|
|
29
|
+
Do not upgrade `inferred` or `unknown` claims to `observed` during clean editing.
|
|
30
|
+
|
|
31
|
+
## Task Manifest Content
|
|
32
|
+
|
|
33
|
+
Capture:
|
|
34
|
+
|
|
35
|
+
- authorization and scope
|
|
36
|
+
- target identifier and source acquisition basis
|
|
37
|
+
- source workspace and clean workspace identifiers
|
|
38
|
+
- trust boundary and required profiles
|
|
39
|
+
- controller policy when the run is explicitly attended or unattended
|
|
40
|
+
- user-selected output format profile
|
|
41
|
+
- Agent 0-3 pipeline responsibilities and handoff rules
|
|
42
|
+
- artifact paths and retention policy
|
|
43
|
+
- contaminated artifact roots for `CLEAN_ROOM_CONTAMINATED_ARTIFACT_ROOTS`
|
|
44
|
+
- optional `source_index_ref` for contaminated controller preflight output
|
|
45
|
+
- prohibited actions
|
|
46
|
+
- role assignments
|
|
47
|
+
- handoff policy
|
|
48
|
+
- tool and model policy
|
|
49
|
+
- source units with neutral ids
|
|
50
|
+
- optional per-unit `source_index_refs` such as `source-index:batch-0001` or `source-index:segment-file-000001-0001`
|
|
51
|
+
- expected artifacts
|
|
52
|
+
- audit log refs
|
|
53
|
+
|
|
54
|
+
Use neutral ids such as `unit-auth-flow` or `unit-config-loading`. Avoid source path mirroring unless the path is already a public API or package name.
|
|
55
|
+
|
|
56
|
+
## Source Index Content
|
|
57
|
+
|
|
58
|
+
`source-index.json` is a contaminated-only planning artifact generated before clean-room role sessions. Keep it under `CLEAN_ROOM_CONTAMINATED_ARTIFACT_ROOTS`.
|
|
59
|
+
|
|
60
|
+
Capture:
|
|
61
|
+
|
|
62
|
+
- generator name, version, scanner modes, limits, and source roots
|
|
63
|
+
- file metrics: bytes, lines, words, characters, and estimated tokens
|
|
64
|
+
- best-effort imports, exports, resolved local relationships, and unresolved references
|
|
65
|
+
- logical dependency groups, large word-count indicators, line-span file segments, and recommended Agent 1 batches
|
|
66
|
+
- optional AST/indexing dependency status recorded during preflight
|
|
67
|
+
- skipped files or directories and aggregate metrics
|
|
68
|
+
|
|
69
|
+
Do not send `source-index.json`, file paths, import/export listings, dependency graphs, or private symbols to clean roles. Agent 0 may map recommended batches or segment refs into neutral `task-manifest.json` units, where one unit is one bounded Agent 1 source-reading assignment.
|
|
70
|
+
|
|
71
|
+
## Controller Policy And Todo State
|
|
72
|
+
|
|
73
|
+
`controller_policy` is optional. Missing policy means `attended`.
|
|
74
|
+
|
|
75
|
+
- `attended`: agent zero pauses for human review at scope gate, handoff, QC deltas, blocked units, and final coverage.
|
|
76
|
+
- `unattended`: agent zero runs a bounded controller loop with `max_iterations`, one unit per iteration, fresh role context, schema and leakage validation before advancing state, and hard stop conditions.
|
|
77
|
+
|
|
78
|
+
Agent zero generates the durable tasklist as `task-manifest.json` `units`. It may use `source-index.json` batches to keep assigned source-reading context small while preserving source relationships. It tracks source-side progress in `coverage-ledger.json` `source_units`, source-side evidence in `evidence-ledger.json`, clean-side feedback in `qc-report.json`, and loop-back work as abstract delta tickets. Do not use prior chat history as the source of truth for the next iteration.
|
|
79
|
+
|
|
80
|
+
## Format Selection
|
|
81
|
+
|
|
82
|
+
`task-manifest.json` records the user's output choice in `format_selection`. Use one canonical source model plus one target profile:
|
|
83
|
+
|
|
84
|
+
- `openspec-delta`: OpenSpec delta artifacts with `ADDED`, `MODIFIED`, `REMOVED`, or `RENAMED Requirements`.
|
|
85
|
+
- `gsd-planning-package`: GSD `.planning/` project and phase artifacts.
|
|
86
|
+
- `speckit-feature-folder`: Spec Kit `.specify/` constitution plus `specs/<feature-id>/` artifacts.
|
|
87
|
+
- `kiro-spec-folder`: Kiro `.kiro/specs/<slug>/` requirements, design, and tasks.
|
|
88
|
+
|
|
89
|
+
Every real task must record the user's actual target profile. Do not default silently. Populate `native_artifacts` and `formatting_rules` with short path and formatting notes from `docs/research-skill-spec.md`.
|
|
90
|
+
|
|
91
|
+
## Agent Pipeline
|
|
92
|
+
|
|
93
|
+
`task-manifest.json` records the required Agent 0-3 handoff contract:
|
|
94
|
+
|
|
95
|
+
- Agent 0: `contaminated-manager-verifier`; controller, scope manager, coverage verifier, and receiver of Agent 3's final report.
|
|
96
|
+
- Agent 1: `contaminated-source-analyst`; source reader and neutral task/spec generator.
|
|
97
|
+
- Agent 2: `clean-architect`; clean-domain schema base and merge manager using only approved handoff artifacts.
|
|
98
|
+
- Agent 3: `clean-qa-editor`; final schema, leakage, coverage, and testability QC reporter.
|
|
99
|
+
|
|
100
|
+
Agent 2 and Agent 3 must not read source roots, contaminated ledgers, or contaminated chat history. Agent 3 reports final QC back to Agent 0 with abstract findings or delta tickets only.
|
|
101
|
+
|
|
102
|
+
## Behavior Spec Content
|
|
103
|
+
|
|
104
|
+
Capture behavior rather than source structure:
|
|
105
|
+
|
|
106
|
+
- public surface and compatibility names
|
|
107
|
+
- producer role, source unit refs, evidence refs, confidence, and leakage risk
|
|
108
|
+
- inputs and outputs
|
|
109
|
+
- state transitions
|
|
110
|
+
- error conditions
|
|
111
|
+
- negative behaviors
|
|
112
|
+
- timing or ordering requirements
|
|
113
|
+
- security-relevant behavior
|
|
114
|
+
- invariants
|
|
115
|
+
- persistence, network, concurrency, or timing behavior when observable
|
|
116
|
+
- edge cases
|
|
117
|
+
- non-goals
|
|
118
|
+
- open questions
|
|
119
|
+
- test scenarios
|
|
120
|
+
- leakage review status
|
|
121
|
+
|
|
122
|
+
Do not include code blocks that implement the behavior. Use declarative requirements.
|
|
123
|
+
|
|
124
|
+
Use `evidence_refs` values such as `evidence-ledger:item-001`. They must point to contaminated-side evidence ledger entries and must not carry source text into the clean artifact.
|
|
125
|
+
|
|
126
|
+
Package, namespace, module, class, function, method, variable, constant, field, and internal event names are private identifiers by default. Include a name only when it is public compatibility surface, and then record it in `public_surface` with `name`, `kind`, `visibility`, and `compatibility_reason`. Do not place source-private names in `summary`, claim text, `test_scenarios`, `open_questions`, or `compatibility_notes`.
|
|
127
|
+
|
|
128
|
+
## Coverage and Evidence Ledgers
|
|
129
|
+
|
|
130
|
+
Keep `coverage-ledger.json` and `evidence-ledger.json` in the contaminated artifact workspace. Clean roles may receive abstract coverage summaries or delta tickets only.
|
|
131
|
+
|
|
132
|
+
Capture:
|
|
133
|
+
|
|
134
|
+
- source unit status
|
|
135
|
+
- behavior spec refs
|
|
136
|
+
- evidence refs
|
|
137
|
+
- coverage gaps
|
|
138
|
+
- abstract delta tickets
|
|
139
|
+
- contaminated evidence descriptions that do not include source text in clean handoffs
|
|
140
|
+
|
|
141
|
+
`handoff-package.json` describes contaminated-to-clean transfer only. It may list task manifests, behavior specs, coverage-ledger summaries, open questions, test plans, and abstract delta tickets. Do not list source indexes, clean-produced skeleton manifests, or QC reports in that handoff.
|
|
142
|
+
|
|
143
|
+
## Skeleton Manifest Content
|
|
144
|
+
|
|
145
|
+
Map clean behavior specs to eventual implementation areas without imposing a source-derived design:
|
|
146
|
+
|
|
147
|
+
- destination area name
|
|
148
|
+
- area id naming policy
|
|
149
|
+
- related behavior spec ids
|
|
150
|
+
- public contract refs to preserve
|
|
151
|
+
- target constraints supplied by the user or destination repo
|
|
152
|
+
- dependency constraints
|
|
153
|
+
- forbidden implementation material
|
|
154
|
+
- test mapping
|
|
155
|
+
- tests to create
|
|
156
|
+
- open decision status and owner
|
|
157
|
+
|
|
158
|
+
Keep target language generic unless the user provides one.
|
|
159
|
+
|
|
160
|
+
## QC Report Content
|
|
161
|
+
|
|
162
|
+
Capture:
|
|
163
|
+
|
|
164
|
+
- schema validation status
|
|
165
|
+
- leakage review status
|
|
166
|
+
- artifact hashes
|
|
167
|
+
- validator version
|
|
168
|
+
- leakage scan summary
|
|
169
|
+
- coverage status
|
|
170
|
+
- required rerun status
|
|
171
|
+
- contamination incidents
|
|
172
|
+
- missing behavior
|
|
173
|
+
- ambiguous behavior
|
|
174
|
+
- untestable claims
|
|
175
|
+
- terminology issues
|
|
176
|
+
- clean-side changes made
|
|
177
|
+
- abstract delta tickets for contaminated verification
|
|
178
|
+
|
|
179
|
+
QC may edit clean specs for clarity, but must not introduce facts from source.
|
|
180
|
+
|
|
181
|
+
## Bundled Validator Scope
|
|
182
|
+
|
|
183
|
+
`hooks/validate-json-schema.py` is a lightweight local guardrail for common schema constraints: JSON syntax, artifact kind detection, required fields, type checks, enums, const values, local `$ref`, string length, regex patterns, date-time strings, numeric bounds, array item counts, uniqueness, `allOf`, `if`/`then`, and `additionalProperties: false`.
|
|
184
|
+
|
|
185
|
+
It is not a full JSON Schema 2020-12 implementation. Use a full validator for release-quality assurance, especially before publishing schema changes or accepting third-party artifact packages.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Target Language Guide
|
|
2
|
+
|
|
3
|
+
## Default Posture
|
|
4
|
+
|
|
5
|
+
Keep the skill target-neutral. Do not assume Rust, TypeScript, Python, Java, or any other language. Record a target language only when the user, destination repository, or explicit migration request supplies it.
|
|
6
|
+
|
|
7
|
+
## What To Capture
|
|
8
|
+
|
|
9
|
+
When target constraints exist, record:
|
|
10
|
+
|
|
11
|
+
- language and version policy, if discoverable from the destination repo
|
|
12
|
+
- package, crate, module, or service boundaries
|
|
13
|
+
- public API compatibility requirements
|
|
14
|
+
- serialization and schema constraints
|
|
15
|
+
- error model expectations
|
|
16
|
+
- concurrency or async model expectations
|
|
17
|
+
- persistence and migration constraints
|
|
18
|
+
- testing framework and fixture constraints
|
|
19
|
+
- platform support requirements
|
|
20
|
+
|
|
21
|
+
## What To Avoid
|
|
22
|
+
|
|
23
|
+
Do not choose:
|
|
24
|
+
|
|
25
|
+
- internal module layout based on source layout
|
|
26
|
+
- private type names copied from source
|
|
27
|
+
- algorithms copied from source
|
|
28
|
+
- dependency choices without destination repo evidence or user direction
|
|
29
|
+
- code generation templates
|
|
30
|
+
|
|
31
|
+
## Skeleton Guidance
|
|
32
|
+
|
|
33
|
+
Represent eventual implementation areas as neutral destinations:
|
|
34
|
+
|
|
35
|
+
- `area_id`: stable clean identifier
|
|
36
|
+
- `purpose`: behavior owned by the area
|
|
37
|
+
- `spec_ids`: clean behavior specs covered by the area
|
|
38
|
+
- `public_contracts`: compatibility surfaces to preserve
|
|
39
|
+
- `target_constraints`: destination constraints
|
|
40
|
+
- `test_obligations`: tests needed to verify behavior
|
|
41
|
+
- `open_decisions`: choices intentionally left for a later implementation phase
|
|
42
|
+
|
|
43
|
+
When no target language is supplied, use `target_language: "unspecified"` and keep all design notes language-neutral.
|