opencode-codeops 1.8.1 → 1.10.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.
Files changed (61) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +18 -0
  3. package/_shared/quality-profile.md +9 -0
  4. package/_shared/reasoning-effort.md +135 -0
  5. package/_shared/workspace-hygiene.md +53 -0
  6. package/agent-templates/codebase-scout.md +6 -0
  7. package/agent-templates/concurrency-auditor.md +7 -0
  8. package/agent-templates/design-challenger.md +6 -0
  9. package/agent-templates/domain-specialist-executor.md +6 -0
  10. package/agent-templates/domain-specialist-reviewer.md +6 -0
  11. package/agent-templates/financial-integrity-auditor.md +7 -0
  12. package/agent-templates/perf-auditor.md +6 -0
  13. package/agent-templates/phase-reviewer.md +6 -0
  14. package/agent-templates/plan-task-executor-opus.md +6 -0
  15. package/agent-templates/plan-task-executor.md +6 -0
  16. package/agent-templates/preflight-auditor.md +6 -0
  17. package/agent-templates/security-auditor.md +6 -0
  18. package/agent-templates/semantics-reviewer.md +7 -0
  19. package/agent-templates/spec-test-author.md +6 -0
  20. package/agents/concurrency-auditor.md +7 -0
  21. package/agents/correctness-reviewer.md +6 -0
  22. package/agents/demanding-executor.md +6 -0
  23. package/agents/design-challenger.md +6 -0
  24. package/agents/executor.md +6 -0
  25. package/agents/explorer.md +6 -0
  26. package/agents/financial-integrity-auditor.md +7 -0
  27. package/agents/performance-auditor.md +6 -0
  28. package/agents/preflight-auditor.md +6 -0
  29. package/agents/security-auditor.md +6 -0
  30. package/agents/semantics-reviewer.md +7 -0
  31. package/agents/spec-test-author.md +6 -0
  32. package/bin/lib/reasoning-effort.d.mts +85 -0
  33. package/bin/lib/reasoning-effort.mjs +331 -0
  34. package/bin/lib/tmp-hygiene.d.mts +38 -0
  35. package/bin/lib/tmp-hygiene.mjs +180 -0
  36. package/package.json +1 -1
  37. package/plugin/index.ts +146 -3
  38. package/scripts/__pycache__/install_agents.cpython-312.pyc +0 -0
  39. package/scripts/codeops_effort.py +216 -0
  40. package/scripts/fixtures/catalog-executor.golden.md +6 -0
  41. package/skills/analyze-project/SKILL.md +8 -0
  42. package/skills/clean-comments/SKILL.md +8 -0
  43. package/skills/exec-plan/SKILL.md +21 -0
  44. package/skills/exec-plan/execution-protocol.md +52 -7
  45. package/skills/git-commit/SKILL.md +11 -2
  46. package/skills/github-issues/SKILL.md +8 -0
  47. package/skills/grill-me/SKILL.md +18 -0
  48. package/skills/make-plan/SKILL.md +25 -0
  49. package/skills/make-plan/templates.md +2 -0
  50. package/skills/make-requirements/SKILL.md +18 -0
  51. package/skills/outcome-review/SKILL.md +8 -0
  52. package/skills/preflight/SKILL.md +18 -0
  53. package/skills/retro-requirements/SKILL.md +18 -0
  54. package/skills/roadmap/SKILL.md +8 -0
  55. package/skills/setup-codeops/SKILL.md +8 -0
  56. package/skills/setup-routing/SKILL.md +10 -0
  57. package/skills/setup-routing/routing.md +16 -1
  58. package/skills/techdocs/SKILL.md +8 -0
  59. package/skills/upgrade-plan/SKILL.md +18 -0
  60. package/standards/coding-standards-full.md +19 -0
  61. package/standards/coding-standards.md +6 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,37 @@
2
2
 
3
3
  All notable changes to CodeOps are recorded here.
4
4
 
5
+ ## 1.10.0 — 2026-10-04
6
+
7
+ ### Documentation
8
+
9
+ - agents: refresh managed project facts
10
+ - routing: clarify runtime variant validation
11
+ - plan: fix phase 3 review wording gaps
12
+
13
+ ### Fixes
14
+
15
+ - effort: tolerate malformed message parts in marker scan
16
+ - effort: correct phase 2 review findings
17
+ - effort: harden helper totality and contract wording
18
+
19
+ ### Features
20
+
21
+ - docs: add auto-effort flags and reasoning documentation
22
+ - plan: carry reasoning suggestions through plan skills
23
+ - effort: add session CLI and plugin runtime hooks
24
+ - effort: add reasoning-effort contract and helper
25
+
26
+ ### Tests
27
+
28
+ - effort: add implementation tests for reasoning-effort helper
29
+
30
+ ## 1.9.0 — 2026-10-04
31
+
32
+ ### Features
33
+
34
+ - hygiene: require cleanup after every task with a temp safety net
35
+
5
36
  ## 1.8.1 — 2026-10-04
6
37
 
7
38
  ### Documentation
package/README.md CHANGED
@@ -136,6 +136,8 @@ These standards are active without any user action. They do not need to be copie
136
136
 
137
137
  The plugin also warns (non-blocking) if any tool attempts to edit `codeops/.codeops.yml` directly — that file is managed exclusively by the `setup-codeops` skill — and if the installed skills version differs from the plugin version, so a stale install is visible.
138
138
 
139
+ Every session also gets a workspace-hygiene guard: the plugin exports `CODEOPS_TMPDIR`, a per-session scratch directory under the OS temp directory. Skills and agents put temporary files there and delete them when the run completes; the plugin removes the directory when the session is deleted and sweeps directories abandoned by interrupted runs at session start, so CodeOps does not accumulate scratch data. The full protocol is in `_shared/workspace-hygiene.md`.
140
+
139
141
  ## Agent model configuration
140
142
 
141
143
  All CodeOps subagents inherit the model of the primary agent that invoked them. No provider-specific configuration is required out of the box.
@@ -151,6 +153,22 @@ To pin specific models per role, use the `setup-routing` skill or add overrides
151
153
  }
152
154
  ```
153
155
 
156
+ ### Adaptive reasoning effort
157
+
158
+ CodeOps can pick a reasoning level per dispatch instead of always inheriting the parent session's
159
+ variant. A dispatch packet may carry one standalone marker line:
160
+
161
+ ```text
162
+ [codeops-effort: medium]
163
+ ```
164
+
165
+ Reasoning-heavy skills also accept `--auto-effort` (use the skill's recommended level) or
166
+ `--auto-effort=high` (explicit level), announce it, and clear it before the final run summary.
167
+ Resolution order: dispatch marker, then session `--auto-effort`, then
168
+ `routing.roles.<agent>.reasoning` in `codeops/codeops.json`, then the inherited parent variant.
169
+ The levels are suggestions: no permission, verification step, or review gate ever reads them. The
170
+ full contract is in `_shared/reasoning-effort.md`.
171
+
154
172
  ## Project specialists
155
173
 
156
174
  CodeOps can recommend project-specific specialist subagents when repository evidence shows a
@@ -107,6 +107,11 @@ or response content.
107
107
  | design-challenger | Problem + candidate options, **without** the parent's preferred choice (per `_shared/recommendation-hardening.md`) |
108
108
  | codebase-scout | The factual questions, search hints, and the facts-only contract |
109
109
 
110
+ Every packet also carries the session temp root (`$CODEOPS_TMPDIR`) and the hygiene requirement:
111
+ the agent creates temporary files only under that root and deletes its own before returning (see
112
+ `_shared/workspace-hygiene.md`). A parent never deletes a subagent's artifacts while its dispatch
113
+ is still in flight.
114
+
110
115
  ## Project specialists
111
116
 
112
117
  A project may define specialist roles on top of the catalog (see `_shared/specialist-agents.md`).
@@ -142,6 +147,10 @@ Resolution order is:
142
147
  3. project `[agents]` defaults in `opencode.json`;
143
148
  4. the parent session's model and effort.
144
149
 
150
+ For the runtime reasoning-effort override (a dispatch marker, a session `--auto-effort` level, or
151
+ a routing role default), see [reasoning-effort.md](reasoning-effort.md); the static resolution
152
+ order above is unchanged.
153
+
145
154
  Use `python3 "${CODEOPS_PLUGIN_ROOT}/scripts/install_agents.py" --project . --roles ...` to create optional project agents. Generated agent files carry a CodeOps marker. The installer owns only marked files and preserves every hand-authored file. Use `--check` to detect missing or stale generated agents and `--dry-run` to preview changes. Project specialists are generated with `--custom <role>` from `codeops/specialists/<role>.md` and indexed into `AGENTS.md` with `--sync-agents-md`; their routing policy may also set `reasoning`.
146
155
 
147
156
  Dynamic packets are the correctness baseline. If a named agent is missing or a model pin is unavailable, spawn a generic subagent with the complete packet or run inline. Report the fallback and preserve required reviewer independence, sandbox intent, and every ambiguity/readiness/verification gate.
@@ -0,0 +1,135 @@
1
+ # Reasoning effort (shared contract)
2
+
3
+ > **CodeOps Artifact Schema**: 1
4
+
5
+ CodeOps subagents normally inherit the parent session's model variant, so a top-tier parent
6
+ would pay top-tier reasoning cost for every child dispatch. Adaptive reasoning effort lets an
7
+ explicit source pick a level per dispatch or per skill run. This document is the shipped
8
+ contract consumed by the plugin and the skills. It is advisory by design and never a gate.
9
+
10
+ ## Levels
11
+
12
+ | Level | Meaning | Typical work |
13
+ | ----- | ------- | ------------ |
14
+ | `low` | Mechanical, fully specified, deterministic verification | Docs and formatting edits, renames, config updates |
15
+ | `medium` | Ordinary bounded feature work with known patterns | Standard implementation phases, recon, single-file reviews |
16
+ | `high` | Correctness- or security-sensitive, cross-cutting, or planning/review work | Requirements, planning, correctness/security review, ambiguous implementation |
17
+ | `max` | Adversarial or high-risk analysis where a missed detail is costly | Thorough preflight, complex or sensitive phases |
18
+
19
+ The four levels are the complete suggestion vocabulary. A level is applied only when the
20
+ runtime model exposes a matching variant, or when the model reports reasoning support but has no
21
+ variant record (the level is then written directly as the provider reasoning option). A level
22
+ the model does not expose leaves the request unchanged and never raises a provider error.
23
+ Routing policy is project configuration, not a suggestion:
24
+ `routing.roles.<agent>.reasoning` may name any value from the provider enum
25
+ (`none`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`).
26
+
27
+ ## Marker grammar
28
+
29
+ A dispatch marker is one standalone line in a dispatch message:
30
+
31
+ ```text
32
+ [codeops-effort: <level>]
33
+ ```
34
+
35
+ - The whole trimmed line must match `^\[codeops-effort:\s*(low|medium|high|max)\]\s*$`.
36
+ - The level is exactly lower-case. Unknown or malformed markers are ignored, never errors.
37
+ - Only user-role text parts of a message are scanned; tool output, diffs, and quoted documents
38
+ are never scanned.
39
+ - The first valid marker in message order wins; additional markers are ignored.
40
+ - The marker is deliberately distinct from the human-readable plan line
41
+ `> **Reasoning**: ...`, so a quoted plan line can never act as a machine directive.
42
+
43
+ For quality-agent packets the marker follows the dispatch header; for packet kinds without a
44
+ header it is the first line. `exec-plan` owns the composition rule.
45
+
46
+ ## Precedence
47
+
48
+ The most specific source wins:
49
+
50
+ ```text
51
+ dispatch marker > session auto-effort > routing.roles[<agent>].reasoning > inherit parent variant
52
+ ```
53
+
54
+ | Source | Scope | Owner |
55
+ | ------ | ----- | ----- |
56
+ | Dispatch marker | One child dispatch | `exec-plan` composes it from the phase suggestion or the run's forced level |
57
+ | Session auto-effort | One skill run in the user's session | `--auto-effort` through `scripts/codeops_effort.py` |
58
+ | Routing role default | Project policy for one agent name | `codeops/codeops.json` → `routing.roles.<agent>.reasoning` |
59
+ | Inherit | Everything else | The child keeps the parent model and variant |
60
+
61
+ Routing lookup applies only when the dispatching agent's name has an explicit `routing.roles`
62
+ entry. There are no built-in catalog defaults, hand-authored agents are untouched, and
63
+ generated specialists keep their embedded value unless the project adds a routing entry.
64
+
65
+ ## Skill recommendation table
66
+
67
+ Used for suggestions and for a bare `--auto-effort`:
68
+
69
+ | Skill | Recommended level | Notes |
70
+ | ----- | ----------------- | ----- |
71
+ | `make-requirements` | `high` | Structured discovery and gap expansion |
72
+ | `make-plan` | `high` | Decomposition plus the Zero-Ambiguity Gate |
73
+ | `preflight` | `high`; `max` with `--thorough` | Adversarial multi-dimension audit |
74
+ | `grill-me` | `high` | Branch-by-branch disambiguation |
75
+ | `exec-plan` | current phase's `Reasoning:` level | Bare flag follows the phase; `=<level>` forces a constant |
76
+ | `retro-requirements` | `high` | Nine-phase archaeology |
77
+ | `upgrade-plan` | `high` | Content gate plus structural migration |
78
+ | `setup-codeops`, `setup-routing` | `high` (reference only) | Structure and policy authoring |
79
+ | `techdocs`, `analyze-project`, `clean-comments`, `outcome-review` | `medium` (reference only) | Structured but bounded |
80
+ | `roadmap`, `git-commit`, `github-issues` | `low` (reference only) | Mechanical bookkeeping |
81
+
82
+ Skills that accept `--auto-effort` are `make-requirements`, `make-plan`, `preflight`,
83
+ `grill-me`, `exec-plan`, `retro-requirements`, and `upgrade-plan`. Other skills document their
84
+ recommended levels for reference only and do not implement the flag.
85
+
86
+ ## Plan suggestion derivation
87
+
88
+ `make-plan` derives an advisory level for every phase and every task mini-plan from signals it
89
+ already records:
90
+
91
+ | Signal | Suggested level |
92
+ | ------ | --------------- |
93
+ | Phase carries a complexity escalation approval, or a complex/sensitive tag | `max` |
94
+ | Phase carries a security, financial-integrity, concurrency, performance-critical, compiler-semantics, or migration lens/risk tag | `high` |
95
+ | Docs/config/rename-only phase with deterministic verification | `low` |
96
+ | Any other non-trivial phase | `medium` |
97
+
98
+ The line is written as `> **Reasoning**: <level> — <one-line reason>`. It is a suggestion: the
99
+ user may edit or delete it, and `exec-plan` never blocks on it. A plan without the line keeps
100
+ the inherited behavior.
101
+
102
+ ## Auto-effort option
103
+
104
+ Skills listed above accept the flag. Parsing follows the existing standalone-token pattern
105
+ (`--auto-design`, `--explore-scope`): exactly one occurrence before the first `--` sentinel,
106
+ removed before resolving targets, paths, or modes; zero means advise-only; more than one or an
107
+ invalid `=<level>` is an argument error.
108
+
109
+ | Flag | Behavior |
110
+ | ---- | -------- |
111
+ | *(absent)* | Print `Suggested reasoning: <level> — <reason>` once at start (`exec-plan`: before each phase); change nothing |
112
+ | `--auto-effort` | Use the skill's recommended level (`exec-plan`: the current phase level) |
113
+ | `--auto-effort=<level>` | Use the named level; reject values outside the four-level set |
114
+
115
+ Semantics:
116
+
117
+ 1. Announce `Auto-effort active — reasoning <level> applied for this run`.
118
+ 2. Record the level for the session run through `scripts/codeops_effort.py`.
119
+ 3. Clear it at run completion, before the final summary.
120
+ 4. Run-scoped: the level applies from the point it is set until cleared or the session ends.
121
+ 5. Fail-open: when the session temp directory is unavailable or the helper fails, print an
122
+ advise-only note and continue; the skill never blocks.
123
+ 6. Never a gate: effort affects cost and latency only. No readiness check, verification step,
124
+ reviewer requirement, or finding gate may read it.
125
+
126
+ For `exec-plan`, a bare flag follows each phase's suggestion, while `--auto-effort=<level>`
127
+ forces that level for the whole run, including every dispatch marker composed during it.
128
+
129
+ ## Suggestion-only guarantee
130
+
131
+ | Allowed | Forbidden |
132
+ | ------- | --------- |
133
+ | Printing a suggested level and its reason | Blocking a run because a level is missing or unsupported |
134
+ | Applying a level when a marker, flag, or routing entry explicitly asks | Overriding an explicit user plan edit with a derived default |
135
+ | Reporting the applied level and its source | Treating effort as an acceptance, review, or security control |
@@ -0,0 +1,53 @@
1
+ # Workspace hygiene (shared convention)
2
+
3
+ > **CodeOps Artifact Schema**: 1
4
+
5
+ This is the **single canonical definition** of CodeOps temporary-artifact hygiene. Every skill,
6
+ agent, and script that creates files outside its assigned deliverables follows it. Skills link
7
+ here instead of carrying copies.
8
+
9
+ ## Temporary artifacts
10
+
11
+ A temporary artifact is any file or directory a run creates that is not a durable deliverable:
12
+ verification logs, diffs, patch files, commit-message files, scratch directories, fixture trees,
13
+ downloaded artifacts, and intermediate reports. Code, tests, plan documents, and other assigned
14
+ outputs are deliverables — not temporary artifacts — and they are never deleted here.
15
+
16
+ ## Where temporary artifacts live
17
+
18
+ 1. `$CODEOPS_TMPDIR` when the CodeOps plugin exports it (one directory per session). Use it for
19
+ every scratch file.
20
+ 2. Otherwise, the operating system's temp directory.
21
+ 3. Never inside the repository. A repository path is durable space; scratch does not belong there.
22
+
23
+ Create subdirectories under the temp root lazily, only when the task needs them.
24
+
25
+ ## Lifecycle
26
+
27
+ 1. **Create lazily** — write a temporary file only when the task needs it.
28
+ 2. **Keep only while needed** — one artifact per purpose; no accumulating copies.
29
+ 3. **Delete before reporting completion** — every task, phase, skill run, and session ends with a
30
+ cleanup pass that removes the files and directories the run created, including verification
31
+ logs.
32
+ 4. **Report the result** — the final summary states `Cleanup: done`, or names the artifact that
33
+ was kept and why. If a deletion fails, report the path and the reason.
34
+
35
+ ## Safe deletion rules (non-negotiable)
36
+
37
+ - Delete only files you created, and only under the sanctioned temp root.
38
+ - Never delete user files, repository content, versioned artifacts, `codeops/` planning artifacts,
39
+ or git worktrees.
40
+ - Never delete another session's temporary files.
41
+ - Never follow a symlink out of the temp root; treat a symlinked entry as foreign and leave it.
42
+ - Never run a broad recursive delete against a path that may be empty or unset; resolve and verify
43
+ the path first.
44
+ - A temporary file must not hold secrets. If one does, delete it and say so without printing its
45
+ contents.
46
+ - If the user asks for an artifact to be kept, name its exact path and keep that file only.
47
+
48
+ ## Automatic safety net
49
+
50
+ The CodeOps plugin exports `$CODEOPS_TMPDIR` for each session and removes that session's directory
51
+ when the session is deleted. At session start it also removes CodeOps temp directories older than
52
+ seven days, so an interrupted run cannot leak storage forever. The safety net is a fallback, not a
53
+ substitute: the run itself still performs the cleanup pass above.
@@ -15,3 +15,9 @@ questions, optional search hints, and the facts-only contract from `_shared/qual
15
15
  answer. No summaries of things nobody asked about.
16
16
  - If a question is too ambiguous to search for, report that ambiguity as the answer to that
17
17
  question — never substitute your own interpretation.
18
+ - **Workspace hygiene (non-negotiable).** Temporary artifacts you create — logs, diffs, patches,
19
+ scratch directories — belong under `$CODEOPS_TMPDIR` when it is set (otherwise the OS temp
20
+ directory), never inside the repository. Delete everything you created before reporting done.
21
+ Never delete user files, versioned artifacts, worktrees, or another session's temporary files.
22
+ If an artifact must outlive the task, name it and say why. Full rules:
23
+ `_shared/workspace-hygiene.md`.
@@ -3,3 +3,10 @@
3
3
  Do not add YAML frontmatter here — use install_agents.py to generate agent files. -->
4
4
 
5
5
  Audit exactly the supplied change packet. Establish shared state, ownership, synchronization, ordering, cancellation, retry, timeout, and failure semantics before judging the diff. Hunt for data races, check-then-act gaps, lost updates, deadlocks, starvation, unsafe publication, reentrancy, duplicate work, stale reads, partial commits, and unbounded concurrency. Construct realistic interleavings that could violate stated invariants. Cite file and line evidence and distinguish proven defects from unverified risk. Return surviving findings with severity, interleaving, violated invariant, and remedy, or an explicit clean result. Remain read-only.
6
+
7
+ - **Workspace hygiene (non-negotiable).** Temporary artifacts you create — logs, diffs, patches,
8
+ scratch directories — belong under `$CODEOPS_TMPDIR` when it is set (otherwise the OS temp
9
+ directory), never inside the repository. Delete everything you created before reporting done.
10
+ Never delete user files, versioned artifacts, worktrees, or another session's temporary files.
11
+ If an artifact must outlive the task, name it and say why. Full rules:
12
+ `_shared/workspace-hygiene.md`.
@@ -24,3 +24,9 @@ caps live in `_shared/recommendation-hardening.md`; the packet convention lives
24
24
  disagreement is precisely the value you add.
25
25
  - If the problem statement is too thin to challenge — missing constraints, options that are not
26
26
  actually distinct, no success criterion — report that as your finding instead of guessing.
27
+ - **Workspace hygiene (non-negotiable).** Temporary artifacts you create — logs, diffs, patches,
28
+ scratch directories — belong under `$CODEOPS_TMPDIR` when it is set (otherwise the OS temp
29
+ directory), never inside the repository. Delete everything you created before reporting done.
30
+ Never delete user files, versioned artifacts, worktrees, or another session's temporary files.
31
+ If an artifact must outlive the task, name it and say why. Full rules:
32
+ `_shared/workspace-hygiene.md`.
@@ -18,3 +18,9 @@ one dispatched unit — normally a whole phase, occasionally a single task — w
18
18
  - Never copy plan, requirement, ambiguity-register, or test-case identifiers, or `codeops/`,
19
19
  `plans/`, or `requirements/` paths, into code or doc comments. Those files are ephemeral; keep
20
20
  the behavior and drop the citation.
21
+ - **Workspace hygiene (non-negotiable).** Temporary artifacts you create — verify logs, diffs,
22
+ patches, scratch directories — belong under `$CODEOPS_TMPDIR` when it is set (otherwise the OS
23
+ temp directory), never inside the repository. Delete everything you created before reporting
24
+ done. Never delete user files, versioned artifacts, worktrees, or another session's temporary
25
+ files. If an artifact must outlive the task, name it and say why. Full rules:
26
+ `_shared/workspace-hygiene.md`.
@@ -15,3 +15,9 @@ to a dispatched phase diff as an additional, independent reviewer.
15
15
  implemented.
16
16
  - Keep the output terse and structured so the parent can merge it directly: findings first, then
17
17
  explicit open questions, then "no findings" if applicable. Do not restate the diff.
18
+ - **Workspace hygiene (non-negotiable).** Temporary artifacts you create — logs, diffs, patches,
19
+ scratch directories — belong under `$CODEOPS_TMPDIR` when it is set (otherwise the OS temp
20
+ directory), never inside the repository. Delete everything you created before reporting done.
21
+ Never delete user files, versioned artifacts, worktrees, or another session's temporary files.
22
+ If an artifact must outlive the task, name it and say why. Full rules:
23
+ `_shared/workspace-hygiene.md`.
@@ -3,3 +3,10 @@
3
3
  Do not add YAML frontmatter here — use install_agents.py to generate agent files. -->
4
4
 
5
5
  Audit exactly the supplied change packet. Treat monetary correctness and auditability as invariants. Check balanced accounting, integer minor-unit or explicitly justified decimal arithmetic, currency/unit consistency, idempotency and duplicate submission, transaction atomicity, retry and partial-failure behavior, reconciliation, authorization, immutable audit evidence, overflow and negative amounts, time boundaries, and reversal/refund semantics. Attempt to falsify every claimed invariant using concrete counterexamples. Cite file and line evidence. Return only surviving findings with severity, violated invariant, failure scenario, and remedy, or an explicit clean result. Remain read-only and do not accept implementation convenience as a reason to weaken financial semantics.
6
+
7
+ - **Workspace hygiene (non-negotiable).** Temporary artifacts you create — logs, diffs, patches,
8
+ scratch directories — belong under `$CODEOPS_TMPDIR` when it is set (otherwise the OS temp
9
+ directory), never inside the repository. Delete everything you created before reporting done.
10
+ Never delete user files, versioned artifacts, worktrees, or another session's temporary files.
11
+ If an artifact must outlive the task, name it and say why. Full rules:
12
+ `_shared/workspace-hygiene.md`.
@@ -21,3 +21,9 @@ its last result). The conventions behind the packet live in `_shared/quality-pro
21
21
  (searching call sites, counting occurrences); never for mutation.
22
22
  - If the packet is insufficient — no diff, no sense of which paths are hot — STOP and report
23
23
  exactly what is missing as a blocker. Never guess.
24
+ - **Workspace hygiene (non-negotiable).** Temporary artifacts you create — logs, diffs, patches,
25
+ scratch directories — belong under `$CODEOPS_TMPDIR` when it is set (otherwise the OS temp
26
+ directory), never inside the repository. Delete everything you created before reporting done.
27
+ Never delete user files, versioned artifacts, worktrees, or another session's temporary files.
28
+ If an artifact must outlive the task, name it and say why. Full rules:
29
+ `_shared/workspace-hygiene.md`.
@@ -52,3 +52,9 @@ The conventions behind the packet live in
52
52
  - If the packet is insufficient — no diff, contradictory lens set, missing verify context — STOP
53
53
  and report exactly what is missing as a blocker. Never guess and never review substitute
54
54
  content you found on your own.
55
+ - **Workspace hygiene (non-negotiable).** Temporary artifacts you create — logs, diffs, patches,
56
+ scratch directories — belong under `$CODEOPS_TMPDIR` when it is set (otherwise the OS temp
57
+ directory), never inside the repository. Delete everything you created before reporting done.
58
+ Never delete user files, versioned artifacts, worktrees, or another session's temporary files.
59
+ If an artifact must outlive the task, name it and say why. Full rules:
60
+ `_shared/workspace-hygiene.md`.
@@ -44,3 +44,9 @@ parent.
44
44
  exactly what is missing or ambiguous as a blocker — never guess, and never edit the
45
45
  execution plan or roadmap (the parent session owns those and the user conversation).
46
46
  - Report per task: what changed, test status, and residual risk.
47
+ - **Workspace hygiene (non-negotiable).** Temporary artifacts you create — verify logs, diffs,
48
+ patches, scratch directories — belong under `$CODEOPS_TMPDIR` when it is set (otherwise the OS
49
+ temp directory), never inside the repository. Delete everything you created before reporting
50
+ done. Never delete user files, versioned artifacts, worktrees, or another session's temporary
51
+ files. If an artifact must outlive the task, name it and say why. Full rules:
52
+ `_shared/workspace-hygiene.md`.
@@ -41,3 +41,9 @@ original-goal or smallest-design context blocks execution; report it to the pare
41
41
  exactly what is missing or ambiguous as a blocker — never guess, and never edit the
42
42
  execution plan or roadmap (the parent session owns those and the user conversation).
43
43
  - Report per task, 3-4 lines each: what changed, test status, any blocker.
44
+ - **Workspace hygiene (non-negotiable).** Temporary artifacts you create — verify logs, diffs,
45
+ patches, scratch directories — belong under `$CODEOPS_TMPDIR` when it is set (otherwise the OS
46
+ temp directory), never inside the repository. Delete everything you created before reporting
47
+ done. Never delete user files, versioned artifacts, worktrees, or another session's temporary
48
+ files. If an artifact must outlive the task, name it and say why. Full rules:
49
+ `_shared/workspace-hygiene.md`.
@@ -43,3 +43,9 @@ in the preflight skill.
43
43
  - **Read-only.** You never edit the artifact or the code. Bash is for inspection only.
44
44
  - If the packet is insufficient — artifact missing, cluster unnamed, required codebase context
45
45
  absent — STOP and report exactly what is missing as a blocker. Never guess.
46
+ - **Workspace hygiene (non-negotiable).** Temporary artifacts you create — logs, diffs, patches,
47
+ scratch directories — belong under `$CODEOPS_TMPDIR` when it is set (otherwise the OS temp
48
+ directory), never inside the repository. Delete everything you created before reporting done.
49
+ Never delete user files, versioned artifacts, worktrees, or another session's temporary files.
50
+ If an artifact must outlive the task, name it and say why. Full rules:
51
+ `_shared/workspace-hygiene.md`.
@@ -40,3 +40,9 @@ active checklist below — never one dispatch per profile. The profile names are
40
40
  - **Read-only.** You never edit files, apply fixes, or commit. Bash is for inspection only.
41
41
  - If the packet is insufficient — no diff, no active profile list — STOP and report exactly
42
42
  what is missing as a blocker. Never guess.
43
+ - **Workspace hygiene (non-negotiable).** Temporary artifacts you create — logs, diffs, patches,
44
+ scratch directories — belong under `$CODEOPS_TMPDIR` when it is set (otherwise the OS temp
45
+ directory), never inside the repository. Delete everything you created before reporting done.
46
+ Never delete user files, versioned artifacts, worktrees, or another session's temporary files.
47
+ If an artifact must outlive the task, name it and say why. Full rules:
48
+ `_shared/workspace-hygiene.md`.
@@ -3,3 +3,10 @@
3
3
  Do not add YAML frontmatter here — use install_agents.py to generate agent files. -->
4
4
 
5
5
  Review exactly the supplied semantic specification or implementation packet. Trace behavior across syntax/decoding, name or identity resolution, typing/validation, intermediate representations, evaluation/lowering, optimization/transformation, diagnostics, serialization, and compatibility as applicable. Seek ambiguous rules, non-total behavior, phase disagreement, unsound transformations, nondeterminism, invalid recovery, and diagnostics that expose implementation accidents. Use counterexamples and minimal programs/messages to falsify the claimed semantics. Cite evidence and return surviving findings with severity, example, affected phases, and resolution, or an explicit clean result. Remain read-only.
6
+
7
+ - **Workspace hygiene (non-negotiable).** Temporary artifacts you create — logs, diffs, patches,
8
+ scratch directories — belong under `$CODEOPS_TMPDIR` when it is set (otherwise the OS temp
9
+ directory), never inside the repository. Delete everything you created before reporting done.
10
+ Never delete user files, versioned artifacts, worktrees, or another session's temporary files.
11
+ If an artifact must outlive the task, name it and say why. Full rules:
12
+ `_shared/workspace-hygiene.md`.
@@ -27,3 +27,9 @@ command). The conventions behind the packet live in `_shared/quality-profile.md`
27
27
  - If the packet is insufficient — an interface signature missing, a case ambiguous, framework
28
28
  conventions unclear — STOP and report exactly what is missing as a blocker. Never guess an
29
29
  expectation and never peek at the implementation to resolve doubt.
30
+ - **Workspace hygiene (non-negotiable).** Temporary artifacts you create — logs, diffs, patches,
31
+ scratch directories — belong under `$CODEOPS_TMPDIR` when it is set (otherwise the OS temp
32
+ directory), never inside the repository. Delete everything you created before reporting done.
33
+ Never delete user files, versioned artifacts, worktrees, or another session's temporary files.
34
+ If an artifact must outlive the task, name it and say why. Full rules:
35
+ `_shared/workspace-hygiene.md`.
@@ -13,3 +13,10 @@ permission:
13
13
  ---
14
14
 
15
15
  Audit exactly the supplied change packet. Establish shared state, ownership, synchronization, ordering, cancellation, retry, timeout, and failure semantics before judging the diff. Hunt for data races, check-then-act gaps, lost updates, deadlocks, starvation, unsafe publication, reentrancy, duplicate work, stale reads, partial commits, and unbounded concurrency. Construct realistic interleavings that could violate stated invariants. Cite file and line evidence and distinguish proven defects from unverified risk. Return surviving findings with severity, interleaving, violated invariant, and remedy, or an explicit clean result. Remain read-only.
16
+
17
+ - **Workspace hygiene (non-negotiable).** Temporary artifacts you create — logs, diffs, patches,
18
+ scratch directories — belong under `$CODEOPS_TMPDIR` when it is set (otherwise the OS temp
19
+ directory), never inside the repository. Delete everything you created before reporting done.
20
+ Never delete user files, versioned artifacts, worktrees, or another session's temporary files.
21
+ If an artifact must outlive the task, name it and say why. Full rules:
22
+ `_shared/workspace-hygiene.md`.
@@ -64,3 +64,9 @@ The conventions behind the packet live in
64
64
  - If the packet is insufficient — no diff, contradictory lens set, missing verify context — STOP
65
65
  and report exactly what is missing as a blocker. Never guess and never review substitute
66
66
  content you found on your own.
67
+ - **Workspace hygiene (non-negotiable).** Temporary artifacts you create — logs, diffs, patches,
68
+ scratch directories — belong under `$CODEOPS_TMPDIR` when it is set (otherwise the OS temp
69
+ directory), never inside the repository. Delete everything you created before reporting done.
70
+ Never delete user files, versioned artifacts, worktrees, or another session's temporary files.
71
+ If an artifact must outlive the task, name it and say why. Full rules:
72
+ `_shared/workspace-hygiene.md`.
@@ -56,3 +56,9 @@ parent.
56
56
  exactly what is missing or ambiguous as a blocker — never guess, and never edit the
57
57
  execution plan or roadmap (the parent session owns those and the user conversation).
58
58
  - Report per task: what changed, test status, and residual risk.
59
+ - **Workspace hygiene (non-negotiable).** Temporary artifacts you create — verify logs, diffs,
60
+ patches, scratch directories — belong under `$CODEOPS_TMPDIR` when it is set (otherwise the OS
61
+ temp directory), never inside the repository. Delete everything you created before reporting
62
+ done. Never delete user files, versioned artifacts, worktrees, or another session's temporary
63
+ files. If an artifact must outlive the task, name it and say why. Full rules:
64
+ `_shared/workspace-hygiene.md`.
@@ -36,3 +36,9 @@ caps live in `_shared/recommendation-hardening.md`; the packet convention lives
36
36
  disagreement is precisely the value you add.
37
37
  - If the problem statement is too thin to challenge — missing constraints, options that are not
38
38
  actually distinct, no success criterion — report that as your finding instead of guessing.
39
+ - **Workspace hygiene (non-negotiable).** Temporary artifacts you create — logs, diffs, patches,
40
+ scratch directories — belong under `$CODEOPS_TMPDIR` when it is set (otherwise the OS temp
41
+ directory), never inside the repository. Delete everything you created before reporting done.
42
+ Never delete user files, versioned artifacts, worktrees, or another session's temporary files.
43
+ If an artifact must outlive the task, name it and say why. Full rules:
44
+ `_shared/workspace-hygiene.md`.
@@ -53,3 +53,9 @@ original-goal or smallest-design context blocks execution; report it to the pare
53
53
  exactly what is missing or ambiguous as a blocker — never guess, and never edit the
54
54
  execution plan or roadmap (the parent session owns those and the user conversation).
55
55
  - Report per task, 3-4 lines each: what changed, test status, any blocker.
56
+ - **Workspace hygiene (non-negotiable).** Temporary artifacts you create — verify logs, diffs,
57
+ patches, scratch directories — belong under `$CODEOPS_TMPDIR` when it is set (otherwise the OS
58
+ temp directory), never inside the repository. Delete everything you created before reporting
59
+ done. Never delete user files, versioned artifacts, worktrees, or another session's temporary
60
+ files. If an artifact must outlive the task, name it and say why. Full rules:
61
+ `_shared/workspace-hygiene.md`.
@@ -27,3 +27,9 @@ questions, optional search hints, and the facts-only contract from `_shared/qual
27
27
  answer. No summaries of things nobody asked about.
28
28
  - If a question is too ambiguous to search for, report that ambiguity as the answer to that
29
29
  question — never substitute your own interpretation.
30
+ - **Workspace hygiene (non-negotiable).** Temporary artifacts you create — logs, diffs, patches,
31
+ scratch directories — belong under `$CODEOPS_TMPDIR` when it is set (otherwise the OS temp
32
+ directory), never inside the repository. Delete everything you created before reporting done.
33
+ Never delete user files, versioned artifacts, worktrees, or another session's temporary files.
34
+ If an artifact must outlive the task, name it and say why. Full rules:
35
+ `_shared/workspace-hygiene.md`.
@@ -13,3 +13,10 @@ permission:
13
13
  ---
14
14
 
15
15
  Audit exactly the supplied change packet. Treat monetary correctness and auditability as invariants. Check balanced accounting, integer minor-unit or explicitly justified decimal arithmetic, currency/unit consistency, idempotency and duplicate submission, transaction atomicity, retry and partial-failure behavior, reconciliation, authorization, immutable audit evidence, overflow and negative amounts, time boundaries, and reversal/refund semantics. Attempt to falsify every claimed invariant using concrete counterexamples. Cite file and line evidence. Return only surviving findings with severity, violated invariant, failure scenario, and remedy, or an explicit clean result. Remain read-only and do not accept implementation convenience as a reason to weaken financial semantics.
16
+
17
+ - **Workspace hygiene (non-negotiable).** Temporary artifacts you create — logs, diffs, patches,
18
+ scratch directories — belong under `$CODEOPS_TMPDIR` when it is set (otherwise the OS temp
19
+ directory), never inside the repository. Delete everything you created before reporting done.
20
+ Never delete user files, versioned artifacts, worktrees, or another session's temporary files.
21
+ If an artifact must outlive the task, name it and say why. Full rules:
22
+ `_shared/workspace-hygiene.md`.
@@ -33,3 +33,9 @@ its last result). The conventions behind the packet live in `_shared/quality-pro
33
33
  (searching call sites, counting occurrences); never for mutation.
34
34
  - If the packet is insufficient — no diff, no sense of which paths are hot — STOP and report
35
35
  exactly what is missing as a blocker. Never guess.
36
+ - **Workspace hygiene (non-negotiable).** Temporary artifacts you create — logs, diffs, patches,
37
+ scratch directories — belong under `$CODEOPS_TMPDIR` when it is set (otherwise the OS temp
38
+ directory), never inside the repository. Delete everything you created before reporting done.
39
+ Never delete user files, versioned artifacts, worktrees, or another session's temporary files.
40
+ If an artifact must outlive the task, name it and say why. Full rules:
41
+ `_shared/workspace-hygiene.md`.
@@ -55,3 +55,9 @@ in the preflight skill.
55
55
  - **Read-only.** You never edit the artifact or the code. Bash is for inspection only.
56
56
  - If the packet is insufficient — artifact missing, cluster unnamed, required codebase context
57
57
  absent — STOP and report exactly what is missing as a blocker. Never guess.
58
+ - **Workspace hygiene (non-negotiable).** Temporary artifacts you create — logs, diffs, patches,
59
+ scratch directories — belong under `$CODEOPS_TMPDIR` when it is set (otherwise the OS temp
60
+ directory), never inside the repository. Delete everything you created before reporting done.
61
+ Never delete user files, versioned artifacts, worktrees, or another session's temporary files.
62
+ If an artifact must outlive the task, name it and say why. Full rules:
63
+ `_shared/workspace-hygiene.md`.
@@ -52,3 +52,9 @@ active checklist below — never one dispatch per profile. The profile names are
52
52
  - **Read-only.** You never edit files, apply fixes, or commit. Bash is for inspection only.
53
53
  - If the packet is insufficient — no diff, no active profile list — STOP and report exactly
54
54
  what is missing as a blocker. Never guess.
55
+ - **Workspace hygiene (non-negotiable).** Temporary artifacts you create — logs, diffs, patches,
56
+ scratch directories — belong under `$CODEOPS_TMPDIR` when it is set (otherwise the OS temp
57
+ directory), never inside the repository. Delete everything you created before reporting done.
58
+ Never delete user files, versioned artifacts, worktrees, or another session's temporary files.
59
+ If an artifact must outlive the task, name it and say why. Full rules:
60
+ `_shared/workspace-hygiene.md`.
@@ -13,3 +13,10 @@ permission:
13
13
  ---
14
14
 
15
15
  Review exactly the supplied semantic specification or implementation packet. Trace behavior across syntax/decoding, name or identity resolution, typing/validation, intermediate representations, evaluation/lowering, optimization/transformation, diagnostics, serialization, and compatibility as applicable. Seek ambiguous rules, non-total behavior, phase disagreement, unsound transformations, nondeterminism, invalid recovery, and diagnostics that expose implementation accidents. Use counterexamples and minimal programs/messages to falsify the claimed semantics. Cite evidence and return surviving findings with severity, example, affected phases, and resolution, or an explicit clean result. Remain read-only.
16
+
17
+ - **Workspace hygiene (non-negotiable).** Temporary artifacts you create — logs, diffs, patches,
18
+ scratch directories — belong under `$CODEOPS_TMPDIR` when it is set (otherwise the OS temp
19
+ directory), never inside the repository. Delete everything you created before reporting done.
20
+ Never delete user files, versioned artifacts, worktrees, or another session's temporary files.
21
+ If an artifact must outlive the task, name it and say why. Full rules:
22
+ `_shared/workspace-hygiene.md`.
@@ -39,3 +39,9 @@ command). The conventions behind the packet live in `_shared/quality-profile.md`
39
39
  - If the packet is insufficient — an interface signature missing, a case ambiguous, framework
40
40
  conventions unclear — STOP and report exactly what is missing as a blocker. Never guess an
41
41
  expectation and never peek at the implementation to resolve doubt.
42
+ - **Workspace hygiene (non-negotiable).** Temporary artifacts you create — logs, diffs, patches,
43
+ scratch directories — belong under `$CODEOPS_TMPDIR` when it is set (otherwise the OS temp
44
+ directory), never inside the repository. Delete everything you created before reporting done.
45
+ Never delete user files, versioned artifacts, worktrees, or another session's temporary files.
46
+ If an artifact must outlive the task, name it and say why. Full rules:
47
+ `_shared/workspace-hygiene.md`.