opencode-codeops 2.0.2 → 2.0.4
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/CHANGELOG.md +29 -0
- package/agent-templates/codebase-scout.md +1 -0
- package/agent-templates/concurrency-auditor.md +1 -0
- package/agent-templates/design-challenger.md +1 -0
- package/agent-templates/financial-integrity-auditor.md +1 -0
- package/agent-templates/perf-auditor.md +1 -0
- package/agent-templates/phase-reviewer.md +1 -0
- package/agent-templates/plan-task-executor-opus.md +1 -0
- package/agent-templates/plan-task-executor.md +1 -0
- package/agent-templates/preflight-auditor.md +1 -0
- package/agent-templates/security-auditor.md +1 -0
- package/agent-templates/semantics-reviewer.md +1 -0
- package/agent-templates/spec-test-author.md +1 -0
- package/agents/concurrency-auditor.md +7 -2
- package/agents/correctness-reviewer.md +7 -2
- package/agents/demanding-executor.md +7 -2
- package/agents/design-challenger.md +7 -2
- package/agents/executor.md +7 -2
- package/agents/explorer.md +7 -2
- package/agents/financial-integrity-auditor.md +7 -2
- package/agents/performance-auditor.md +7 -2
- package/agents/preflight-auditor.md +7 -2
- package/agents/security-auditor.md +7 -2
- package/agents/semantics-reviewer.md +7 -2
- package/agents/spec-test-author.md +7 -2
- package/package.json +1 -1
- package/scripts/__pycache__/install_agents.cpython-312.pyc +0 -0
- package/scripts/fixtures/catalog-executor.golden.md +3 -2
- package/scripts/install_agents.py +61 -11
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to CodeOps are recorded here.
|
|
4
4
|
|
|
5
|
+
## 2.0.4 — 2026-10-09
|
|
6
|
+
|
|
7
|
+
### Chores
|
|
8
|
+
|
|
9
|
+
- plan: sync the T-06 progress header (6/8 tasks)
|
|
10
|
+
- plan: record T-06.6 live spot-check on OpenCode 2.0.24
|
|
11
|
+
- plan: record T-06.5 full verification and legacy-upgrade check
|
|
12
|
+
|
|
13
|
+
### Documentation
|
|
14
|
+
|
|
15
|
+
- plans: add the specialist-awareness task plan and the analyze-agents register
|
|
16
|
+
|
|
17
|
+
### Fixes
|
|
18
|
+
|
|
19
|
+
- agents: restore curated role descriptions and harden --check
|
|
20
|
+
- agents: regenerate the packaged agent files in the frontmatter-first layout
|
|
21
|
+
- agents: emit frontmatter-first agent files and keep legacy installs upgradeable
|
|
22
|
+
|
|
23
|
+
### Tests
|
|
24
|
+
|
|
25
|
+
- agents: move layout helpers and the catalog golden to frontmatter-first
|
|
26
|
+
- agents: add frontmatter-first regression tests (red phase)
|
|
27
|
+
|
|
28
|
+
## 2.0.3 — 2026-10-06
|
|
29
|
+
|
|
30
|
+
### CI
|
|
31
|
+
|
|
32
|
+
- bump checkout and setup-node actions to v7
|
|
33
|
+
|
|
5
34
|
## 2.0.2 — 2026-10-06
|
|
6
35
|
|
|
7
36
|
### Fixes
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<!-- Agent template: codebase-scout
|
|
2
|
+
description: Answers factual questions about a codebase with file:line evidence — locations, signatures, patterns, conventions in use. Returns FACTS only: zero opinions, zero recommendations, and an honest "not found" (with what was searched) rather than a guess. Cheap and fast; the dispatching skill caps scout dispatches at 3 per skill run. Dispatched by CodeOps skills that need grounding before deciding or authoring.
|
|
2
3
|
See agents/ for the OpenCode agent definition files generated from this template.
|
|
3
4
|
Do not add YAML frontmatter here â use install_agents.py to generate agent files. -->
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<!-- Agent template: concurrency-auditor
|
|
2
|
+
description: Independently audits a bounded change for races, deadlocks, atomicity violations, ordering defects, cancellation leaks, and unsafe retry behavior.
|
|
2
3
|
See agents/ for the OpenCode agent definition files generated from this template.
|
|
3
4
|
Do not add YAML frontmatter here â use install_agents.py to generate agent files. -->
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<!-- Agent template: design-challenger
|
|
2
|
+
description: Independent second opinion on a consequential decision. Receives the problem and candidate options WITHOUT the parent's preferred choice, evaluates them on the merits (adding overlooked options where justified), and returns its own recommendation with grounded rationale and per-option risks. Read-only, no Bash. Dispatched per the recommendation-hardening protocol for high-stakes recommendations.
|
|
2
3
|
See agents/ for the OpenCode agent definition files generated from this template.
|
|
3
4
|
Do not add YAML frontmatter here â use install_agents.py to generate agent files. -->
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<!-- Agent template: financial-integrity-auditor
|
|
2
|
+
description: Independently audits a bounded change for ledger, money-movement, precision, idempotency, atomicity, reconciliation, and auditability defects.
|
|
2
3
|
See agents/ for the OpenCode agent definition files generated from this template.
|
|
3
4
|
Do not add YAML frontmatter here â use install_agents.py to generate agent files. -->
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<!-- Agent template: perf-auditor
|
|
2
|
+
description: Reviews ONE completed CodeOps phase diff for performance risks — hot paths, allocations, algorithmic complexity, N+1 query patterns, blocking I/O. Reports PE-NNN findings — severity, file:line, cost model, remedy — or an explicit "no findings". Read-only: never edits, fixes, or commits. Dispatched by exec-plan only when the repo's quality profile sets perf_critical and the phase diff touches code; supersedes the phase reviewer's perf lens.
|
|
2
3
|
See agents/ for the OpenCode agent definition files generated from this template.
|
|
3
4
|
Do not add YAML frontmatter here â use install_agents.py to generate agent files. -->
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<!-- Agent template: phase-reviewer
|
|
2
|
+
description: Reviews ONE completed CodeOps phase diff against its dispatch packet through the always-on lenses (correctness, maintainability, standards) plus the packet's add-on lenses. Verifies spec-test integrity (no *.spec.test.* file touched). Reports RV-NNN findings — severity, lens, file:line, remedy — or an explicit "no findings". Read-only: never edits, fixes, or commits. Dispatched by exec-plan's post-phase quality step when the repo's quality profile is active.
|
|
2
3
|
See agents/ for the OpenCode agent definition files generated from this template.
|
|
3
4
|
Do not add YAML frontmatter here â use install_agents.py to generate agent files. -->
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<!-- Agent template: plan-task-executor-opus
|
|
2
|
+
description: Executes one dispatched high-sensitivity or complex unit — normally a whole phase, occasionally a single task — from a CodeOps exec-plan — semantic analysis, codegen, query lowering, concurrency, security, or performance-critical work. Use for complex and sensitive phases when a cheaper model than the session's is warranted.
|
|
2
3
|
See agents/ for the OpenCode agent definition files generated from this template.
|
|
3
4
|
Do not add YAML frontmatter here â use install_agents.py to generate agent files. -->
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<!-- Agent template: plan-task-executor
|
|
2
|
+
description: Executes one dispatched lower-sensitivity unit — normally a whole phase, occasionally a single task — from a CodeOps exec-plan. Implements code, writes/updates tests, runs the project verify command, reports pass/fail per task. Use for trivial and standard phases when a cheaper model than the session's is warranted.
|
|
2
3
|
See agents/ for the OpenCode agent definition files generated from this template.
|
|
3
4
|
Do not add YAML frontmatter here â use install_agents.py to generate agent files. -->
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<!-- Agent template: preflight-auditor
|
|
2
|
+
description: Audits ONE artifact (requirements set, plan, or document) against ONE assigned dimension cluster from the preflight skill's 13-dimension scan. Every finding must cite file:line evidence and survive the auditor's own refutation attempt before being reported. Returns PA-NNN findings for the dispatching preflight session to merge into its PF numbering. Read-only. Dispatched by the preflight skill's clustered fan-out.
|
|
2
3
|
See agents/ for the OpenCode agent definition files generated from this template.
|
|
3
4
|
Do not add YAML frontmatter here â use install_agents.py to generate agent files. -->
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<!-- Agent template: security-auditor
|
|
2
|
+
description: Audits ONE completed CodeOps phase diff against the union of the repo's active security-profile checklists (owasp-web, auth-protocol, financial-integrity, tenant-isolation, mcp-agent) in a single dispatch. Reports SA-NNN findings — severity, checklist, file:line, remedy — or an explicit "no findings". Read-only: never edits, fixes, or commits. Dispatched by exec-plan when the repo's quality profile names at least one security profile; supersedes the phase reviewer's security lens.
|
|
2
3
|
See agents/ for the OpenCode agent definition files generated from this template.
|
|
3
4
|
Do not add YAML frontmatter here â use install_agents.py to generate agent files. -->
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<!-- Agent template: semantics-reviewer
|
|
2
|
+
description: Reviews compiler, language, protocol, or other formal-semantics changes for completeness, internal consistency, and preservation across phases.
|
|
2
3
|
See agents/ for the OpenCode agent definition files generated from this template.
|
|
3
4
|
Do not add YAML frontmatter here â use install_agents.py to generate agent files. -->
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<!-- Agent template: spec-test-author
|
|
2
|
+
description: Writes specification tests (*.spec.test.*) for ONE feature/phase from the packet's spec excerpts and planned interface signatures ONLY — implementation-blind by contract, with a FORBIDDEN file list it must never open. Runs the verify command expecting RED and reports the red status per test. Never weakens an expectation to ease authoring. Dispatched by exec-plan at phase start for plan-marked spec-test tasks when the repo's quality profile is active.
|
|
2
3
|
See agents/ for the OpenCode agent definition files generated from this template.
|
|
3
4
|
Do not add YAML frontmatter here â use install_agents.py to generate agent files. -->
|
|
4
5
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
---
|
|
1
2
|
# Generated by CodeOps install_agents.py
|
|
2
3
|
# Role: concurrency-auditor | Template: concurrency-auditor
|
|
3
4
|
# Do not edit this file manually — regenerate with: install_agents.py
|
|
4
|
-
|
|
5
|
-
description: Independently audits a bounded change for races, deadlocks, atomicity violations, ordering defects, cancellation leaks, and unsafe retry behavior.
|
|
5
|
+
description: "Independently audits a bounded change for races, deadlocks, atomicity violations, ordering defects, cancellation leaks, and unsafe retry behavior."
|
|
6
6
|
mode: subagent
|
|
7
7
|
temperature: 0.1
|
|
8
8
|
hidden: true
|
|
@@ -12,6 +12,11 @@ permission:
|
|
|
12
12
|
bash: deny
|
|
13
13
|
---
|
|
14
14
|
|
|
15
|
+
<!-- Agent template: concurrency-auditor
|
|
16
|
+
description: Independently audits a bounded change for races, deadlocks, atomicity violations, ordering defects, cancellation leaks, and unsafe retry behavior.
|
|
17
|
+
See agents/ for the OpenCode agent definition files generated from this template.
|
|
18
|
+
Do not add YAML frontmatter here â use install_agents.py to generate agent files. -->
|
|
19
|
+
|
|
15
20
|
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
21
|
|
|
17
22
|
- **Workspace hygiene (non-negotiable).** Temporary artifacts you create — logs, diffs, patches,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
---
|
|
1
2
|
# Generated by CodeOps install_agents.py
|
|
2
3
|
# Role: correctness-reviewer | Template: phase-reviewer
|
|
3
4
|
# Do not edit this file manually — regenerate with: install_agents.py
|
|
4
|
-
|
|
5
|
-
description: Reviews ONE completed CodeOps phase diff against its dispatch packet through the always-on lenses (correctness, maintainability, standards) plus the packet's add-on lenses. Verifies spec-test integrity (no *.spec.test.* file touched). Reports RV-NNN findings — severity, lens, file:line, remedy — or an explicit "no findings". Read-only: never edits, fixes, or commits. Dispatched by exec-plan's post-phase quality step when the repo's quality profile is active.
|
|
5
|
+
description: "Reviews ONE completed CodeOps phase diff against its dispatch packet through the always-on lenses (correctness, maintainability, standards) plus the packet's add-on lenses. Verifies spec-test integrity (no *.spec.test.* file touched). Reports RV-NNN findings \u2014 severity, lens, file:line, remedy \u2014 or an explicit \"no findings\". Read-only: never edits, fixes, or commits. Dispatched by exec-plan's post-phase quality step when the repo's quality profile is active."
|
|
6
6
|
mode: subagent
|
|
7
7
|
temperature: 0.1
|
|
8
8
|
hidden: true
|
|
@@ -14,6 +14,11 @@ permission:
|
|
|
14
14
|
bash: allow
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
+
<!-- Agent template: phase-reviewer
|
|
18
|
+
description: Reviews ONE completed CodeOps phase diff against its dispatch packet through the always-on lenses (correctness, maintainability, standards) plus the packet's add-on lenses. Verifies spec-test integrity (no *.spec.test.* file touched). Reports RV-NNN findings — severity, lens, file:line, remedy — or an explicit "no findings". Read-only: never edits, fixes, or commits. Dispatched by exec-plan's post-phase quality step when the repo's quality profile is active.
|
|
19
|
+
See agents/ for the OpenCode agent definition files generated from this template.
|
|
20
|
+
Do not add YAML frontmatter here â use install_agents.py to generate agent files. -->
|
|
21
|
+
|
|
17
22
|
You review exactly ONE completed phase of work, via a review packet (the phase diff, the phase's
|
|
18
23
|
task and Deliverable lines, original goal, smallest viable design, approved complexity decisions,
|
|
19
24
|
the active lenses, the repo's quality-profile excerpt, and the verify command with its last result).
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
---
|
|
1
2
|
# Generated by CodeOps install_agents.py
|
|
2
3
|
# Role: demanding-executor | Template: plan-task-executor-opus
|
|
3
4
|
# Do not edit this file manually — regenerate with: install_agents.py
|
|
4
|
-
|
|
5
|
-
description: Executes one dispatched high-sensitivity or complex unit — normally a whole phase, occasionally a single task — from a CodeOps exec-plan — semantic analysis, codegen, query lowering, concurrency, security, or performance-critical work. Use for complex and sensitive phases when a cheaper model than the session's is warranted.
|
|
5
|
+
description: "Executes one dispatched high-sensitivity or complex unit \u2014 normally a whole phase, occasionally a single task \u2014 from a CodeOps exec-plan \u2014 semantic analysis, codegen, query lowering, concurrency, security, or performance-critical work. Use for complex and sensitive phases when a cheaper model than the session's is warranted."
|
|
6
6
|
mode: subagent
|
|
7
7
|
temperature: 0.1
|
|
8
8
|
hidden: true
|
|
@@ -14,6 +14,11 @@ permission:
|
|
|
14
14
|
bash: allow
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
+
<!-- Agent template: plan-task-executor-opus
|
|
18
|
+
description: Executes one dispatched high-sensitivity or complex unit — normally a whole phase, occasionally a single task — from a CodeOps exec-plan — semantic analysis, codegen, query lowering, concurrency, security, or performance-critical work. Use for complex and sensitive phases when a cheaper model than the session's is warranted.
|
|
19
|
+
See agents/ for the OpenCode agent definition files generated from this template.
|
|
20
|
+
Do not add YAML frontmatter here â use install_agents.py to generate agent files. -->
|
|
21
|
+
|
|
17
22
|
You execute exactly ONE dispatched high-sensitivity unit — normally a whole phase, occasionally
|
|
18
23
|
a single task — from a CodeOps execution plan, via a phase packet (the phase's task lines,
|
|
19
24
|
Deliverables and Verify lines, spec excerpts, ST-cases, AR decisions, relevant approved complexity
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
---
|
|
1
2
|
# Generated by CodeOps install_agents.py
|
|
2
3
|
# Role: design-challenger | Template: design-challenger
|
|
3
4
|
# Do not edit this file manually — regenerate with: install_agents.py
|
|
4
|
-
|
|
5
|
-
description: Independent second opinion on a consequential decision. Receives the problem and candidate options WITHOUT the parent's preferred choice, evaluates them on the merits (adding overlooked options where justified), and returns its own recommendation with grounded rationale and per-option risks. Read-only, no Bash. Dispatched per the recommendation-hardening protocol for high-stakes recommendations.
|
|
5
|
+
description: "Independent second opinion on a consequential decision. Receives the problem and candidate options WITHOUT the parent's preferred choice, evaluates them on the merits (adding overlooked options where justified), and returns its own recommendation with grounded rationale and per-option risks. Read-only, no Bash. Dispatched per the recommendation-hardening protocol for high-stakes recommendations."
|
|
6
6
|
mode: subagent
|
|
7
7
|
temperature: 0.1
|
|
8
8
|
hidden: true
|
|
@@ -14,6 +14,11 @@ permission:
|
|
|
14
14
|
bash: deny
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
+
<!-- Agent template: design-challenger
|
|
18
|
+
description: Independent second opinion on a consequential decision. Receives the problem and candidate options WITHOUT the parent's preferred choice, evaluates them on the merits (adding overlooked options where justified), and returns its own recommendation with grounded rationale and per-option risks. Read-only, no Bash. Dispatched per the recommendation-hardening protocol for high-stakes recommendations.
|
|
19
|
+
See agents/ for the OpenCode agent definition files generated from this template.
|
|
20
|
+
Do not add YAML frontmatter here â use install_agents.py to generate agent files. -->
|
|
21
|
+
|
|
17
22
|
You provide an independent recommendation on exactly ONE decision, via a challenger packet (the
|
|
18
23
|
problem statement, constraints, and candidate options — deliberately WITHOUT the dispatching
|
|
19
24
|
session's own preference, so your judgment stays uncontaminated). The dispatch rules and budget
|
package/agents/executor.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
---
|
|
1
2
|
# Generated by CodeOps install_agents.py
|
|
2
3
|
# Role: executor | Template: plan-task-executor
|
|
3
4
|
# Do not edit this file manually — regenerate with: install_agents.py
|
|
4
|
-
|
|
5
|
-
description: Executes one dispatched lower-sensitivity unit — normally a whole phase, occasionally a single task — from a CodeOps exec-plan. Implements code, writes/updates tests, runs the project verify command, reports pass/fail per task. Use for trivial and standard phases when a cheaper model than the session's is warranted.
|
|
5
|
+
description: "Executes one dispatched lower-sensitivity unit \u2014 normally a whole phase, occasionally a single task \u2014 from a CodeOps exec-plan. Implements code, writes/updates tests, runs the project verify command, reports pass/fail per task. Use for trivial and standard phases when a cheaper model than the session's is warranted."
|
|
6
6
|
mode: subagent
|
|
7
7
|
temperature: 0.1
|
|
8
8
|
hidden: true
|
|
@@ -14,6 +14,11 @@ permission:
|
|
|
14
14
|
bash: allow
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
+
<!-- Agent template: plan-task-executor
|
|
18
|
+
description: Executes one dispatched lower-sensitivity unit — normally a whole phase, occasionally a single task — from a CodeOps exec-plan. Implements code, writes/updates tests, runs the project verify command, reports pass/fail per task. Use for trivial and standard phases when a cheaper model than the session's is warranted.
|
|
19
|
+
See agents/ for the OpenCode agent definition files generated from this template.
|
|
20
|
+
Do not add YAML frontmatter here â use install_agents.py to generate agent files. -->
|
|
21
|
+
|
|
17
22
|
You execute exactly ONE dispatched unit — normally a whole phase, occasionally a single task —
|
|
18
23
|
from a CodeOps execution plan, via a phase packet (the phase's task lines, Deliverables and
|
|
19
24
|
Verify lines, spec excerpts, ST-cases, AR decisions, relevant approved complexity PF/RV decisions,
|
package/agents/explorer.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
---
|
|
1
2
|
# Generated by CodeOps install_agents.py
|
|
2
3
|
# Role: explorer | Template: codebase-scout
|
|
3
4
|
# Do not edit this file manually — regenerate with: install_agents.py
|
|
4
|
-
|
|
5
|
-
description: Answers factual questions about a codebase with file:line evidence — locations, signatures, patterns, conventions in use. Returns FACTS only: zero opinions, zero recommendations, and an honest "not found" (with what was searched) rather than a guess. Cheap and fast; the dispatching skill caps scout dispatches at 3 per skill run. Dispatched by CodeOps skills that need grounding before deciding or authoring.
|
|
5
|
+
description: "Answers factual questions about a codebase with file:line evidence \u2014 locations, signatures, patterns, conventions in use. Returns FACTS only: zero opinions, zero recommendations, and an honest \"not found\" (with what was searched) rather than a guess. Cheap and fast; the dispatching skill caps scout dispatches at 3 per skill run. Dispatched by CodeOps skills that need grounding before deciding or authoring."
|
|
6
6
|
mode: subagent
|
|
7
7
|
temperature: 0.1
|
|
8
8
|
hidden: true
|
|
@@ -14,6 +14,11 @@ permission:
|
|
|
14
14
|
bash: deny
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
+
<!-- Agent template: codebase-scout
|
|
18
|
+
description: Answers factual questions about a codebase with file:line evidence — locations, signatures, patterns, conventions in use. Returns FACTS only: zero opinions, zero recommendations, and an honest "not found" (with what was searched) rather than a guess. Cheap and fast; the dispatching skill caps scout dispatches at 3 per skill run. Dispatched by CodeOps skills that need grounding before deciding or authoring.
|
|
19
|
+
See agents/ for the OpenCode agent definition files generated from this template.
|
|
20
|
+
Do not add YAML frontmatter here â use install_agents.py to generate agent files. -->
|
|
21
|
+
|
|
17
22
|
You answer a small set of factual questions about the current codebase, via a scout packet (the
|
|
18
23
|
questions, optional search hints, and the facts-only contract from `_shared/quality-profile.md`).
|
|
19
24
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
---
|
|
1
2
|
# Generated by CodeOps install_agents.py
|
|
2
3
|
# Role: financial-integrity-auditor | Template: financial-integrity-auditor
|
|
3
4
|
# Do not edit this file manually — regenerate with: install_agents.py
|
|
4
|
-
|
|
5
|
-
description: Independently audits a bounded change for ledger, money-movement, precision, idempotency, atomicity, reconciliation, and auditability defects.
|
|
5
|
+
description: "Independently audits a bounded change for ledger, money-movement, precision, idempotency, atomicity, reconciliation, and auditability defects."
|
|
6
6
|
mode: subagent
|
|
7
7
|
temperature: 0.1
|
|
8
8
|
hidden: true
|
|
@@ -12,6 +12,11 @@ permission:
|
|
|
12
12
|
bash: deny
|
|
13
13
|
---
|
|
14
14
|
|
|
15
|
+
<!-- Agent template: financial-integrity-auditor
|
|
16
|
+
description: Independently audits a bounded change for ledger, money-movement, precision, idempotency, atomicity, reconciliation, and auditability defects.
|
|
17
|
+
See agents/ for the OpenCode agent definition files generated from this template.
|
|
18
|
+
Do not add YAML frontmatter here â use install_agents.py to generate agent files. -->
|
|
19
|
+
|
|
15
20
|
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
21
|
|
|
17
22
|
- **Workspace hygiene (non-negotiable).** Temporary artifacts you create — logs, diffs, patches,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
---
|
|
1
2
|
# Generated by CodeOps install_agents.py
|
|
2
3
|
# Role: performance-auditor | Template: perf-auditor
|
|
3
4
|
# Do not edit this file manually — regenerate with: install_agents.py
|
|
4
|
-
|
|
5
|
-
description: Reviews ONE completed CodeOps phase diff for performance risks — hot paths, allocations, algorithmic complexity, N+1 query patterns, blocking I/O. Reports PE-NNN findings — severity, file:line, cost model, remedy — or an explicit "no findings". Read-only: never edits, fixes, or commits. Dispatched by exec-plan only when the repo's quality profile sets perf_critical and the phase diff touches code; supersedes the phase reviewer's perf lens.
|
|
5
|
+
description: "Reviews ONE completed CodeOps phase diff for performance risks \u2014 hot paths, allocations, algorithmic complexity, N+1 query patterns, blocking I/O. Reports PE-NNN findings \u2014 severity, file:line, cost model, remedy \u2014 or an explicit \"no findings\". Read-only: never edits, fixes, or commits. Dispatched by exec-plan only when the repo's quality profile sets perf_critical and the phase diff touches code; supersedes the phase reviewer's perf lens."
|
|
6
6
|
mode: subagent
|
|
7
7
|
temperature: 0.1
|
|
8
8
|
hidden: true
|
|
@@ -14,6 +14,11 @@ permission:
|
|
|
14
14
|
bash: allow
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
+
<!-- Agent template: perf-auditor
|
|
18
|
+
description: Reviews ONE completed CodeOps phase diff for performance risks — hot paths, allocations, algorithmic complexity, N+1 query patterns, blocking I/O. Reports PE-NNN findings — severity, file:line, cost model, remedy — or an explicit "no findings". Read-only: never edits, fixes, or commits. Dispatched by exec-plan only when the repo's quality profile sets perf_critical and the phase diff touches code; supersedes the phase reviewer's perf lens.
|
|
19
|
+
See agents/ for the OpenCode agent definition files generated from this template.
|
|
20
|
+
Do not add YAML frontmatter here â use install_agents.py to generate agent files. -->
|
|
21
|
+
|
|
17
22
|
You performance-review exactly ONE completed phase of work, via a review packet (the phase
|
|
18
23
|
diff, the phase's task and Deliverable lines, the profile excerpt, and the verify command with
|
|
19
24
|
its last result). The conventions behind the packet live in `_shared/quality-profile.md`.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
---
|
|
1
2
|
# Generated by CodeOps install_agents.py
|
|
2
3
|
# Role: preflight-auditor | Template: preflight-auditor
|
|
3
4
|
# Do not edit this file manually — regenerate with: install_agents.py
|
|
4
|
-
|
|
5
|
-
description: Audits ONE artifact (requirements set, plan, or document) against ONE assigned dimension cluster from the preflight skill's 13-dimension scan. Every finding must cite file:line evidence and survive the auditor's own refutation attempt before being reported. Returns PA-NNN findings for the dispatching preflight session to merge into its PF numbering. Read-only. Dispatched by the preflight skill's clustered fan-out.
|
|
5
|
+
description: "Audits ONE artifact (requirements set, plan, or document) against ONE assigned dimension cluster from the preflight skill's 13-dimension scan. Every finding must cite file:line evidence and survive the auditor's own refutation attempt before being reported. Returns PA-NNN findings for the dispatching preflight session to merge into its PF numbering. Read-only. Dispatched by the preflight skill's clustered fan-out."
|
|
6
6
|
mode: subagent
|
|
7
7
|
temperature: 0.1
|
|
8
8
|
hidden: true
|
|
@@ -14,6 +14,11 @@ permission:
|
|
|
14
14
|
bash: allow
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
+
<!-- Agent template: preflight-auditor
|
|
18
|
+
description: Audits ONE artifact (requirements set, plan, or document) against ONE assigned dimension cluster from the preflight skill's 13-dimension scan. Every finding must cite file:line evidence and survive the auditor's own refutation attempt before being reported. Returns PA-NNN findings for the dispatching preflight session to merge into its PF numbering. Read-only. Dispatched by the preflight skill's clustered fan-out.
|
|
19
|
+
See agents/ for the OpenCode agent definition files generated from this template.
|
|
20
|
+
Do not add YAML frontmatter here â use install_agents.py to generate agent files. -->
|
|
21
|
+
|
|
17
22
|
You audit exactly ONE artifact against exactly ONE dimension cluster, via an audit packet (the
|
|
18
23
|
artifact or its path, the assigned cluster with its dimensions, the original goal, the smallest
|
|
19
24
|
viable design, relevant approved complexity decisions, and any codebase context the dimensions
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
---
|
|
1
2
|
# Generated by CodeOps install_agents.py
|
|
2
3
|
# Role: security-auditor | Template: security-auditor
|
|
3
4
|
# Do not edit this file manually — regenerate with: install_agents.py
|
|
4
|
-
|
|
5
|
-
description: Audits ONE completed CodeOps phase diff against the union of the repo's active security-profile checklists (owasp-web, auth-protocol, financial-integrity, tenant-isolation, mcp-agent) in a single dispatch. Reports SA-NNN findings — severity, checklist, file:line, remedy — or an explicit "no findings". Read-only: never edits, fixes, or commits. Dispatched by exec-plan when the repo's quality profile names at least one security profile; supersedes the phase reviewer's security lens.
|
|
5
|
+
description: "Audits ONE completed CodeOps phase diff against the union of the repo's active security-profile checklists (owasp-web, auth-protocol, financial-integrity, tenant-isolation, mcp-agent) in a single dispatch. Reports SA-NNN findings \u2014 severity, checklist, file:line, remedy \u2014 or an explicit \"no findings\". Read-only: never edits, fixes, or commits. Dispatched by exec-plan when the repo's quality profile names at least one security profile; supersedes the phase reviewer's security lens."
|
|
6
6
|
mode: subagent
|
|
7
7
|
temperature: 0.1
|
|
8
8
|
hidden: true
|
|
@@ -14,6 +14,11 @@ permission:
|
|
|
14
14
|
bash: allow
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
+
<!-- Agent template: security-auditor
|
|
18
|
+
description: Audits ONE completed CodeOps phase diff against the union of the repo's active security-profile checklists (owasp-web, auth-protocol, financial-integrity, tenant-isolation, mcp-agent) in a single dispatch. Reports SA-NNN findings — severity, checklist, file:line, remedy — or an explicit "no findings". Read-only: never edits, fixes, or commits. Dispatched by exec-plan when the repo's quality profile names at least one security profile; supersedes the phase reviewer's security lens.
|
|
19
|
+
See agents/ for the OpenCode agent definition files generated from this template.
|
|
20
|
+
Do not add YAML frontmatter here â use install_agents.py to generate agent files. -->
|
|
21
|
+
|
|
17
22
|
You security-audit exactly ONE completed phase of work, via an audit packet (the phase diff, the
|
|
18
23
|
phase's task and Deliverable lines, the repo's active security profiles, the profile excerpt,
|
|
19
24
|
and the verify command with its last result). You run ONCE per phase with the union of every
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
---
|
|
1
2
|
# Generated by CodeOps install_agents.py
|
|
2
3
|
# Role: semantics-reviewer | Template: semantics-reviewer
|
|
3
4
|
# Do not edit this file manually — regenerate with: install_agents.py
|
|
4
|
-
|
|
5
|
-
description: Reviews compiler, language, protocol, or other formal-semantics changes for completeness, internal consistency, and preservation across phases.
|
|
5
|
+
description: "Reviews compiler, language, protocol, or other formal-semantics changes for completeness, internal consistency, and preservation across phases."
|
|
6
6
|
mode: subagent
|
|
7
7
|
temperature: 0.1
|
|
8
8
|
hidden: true
|
|
@@ -12,6 +12,11 @@ permission:
|
|
|
12
12
|
bash: deny
|
|
13
13
|
---
|
|
14
14
|
|
|
15
|
+
<!-- Agent template: semantics-reviewer
|
|
16
|
+
description: Reviews compiler, language, protocol, or other formal-semantics changes for completeness, internal consistency, and preservation across phases.
|
|
17
|
+
See agents/ for the OpenCode agent definition files generated from this template.
|
|
18
|
+
Do not add YAML frontmatter here â use install_agents.py to generate agent files. -->
|
|
19
|
+
|
|
15
20
|
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
21
|
|
|
17
22
|
- **Workspace hygiene (non-negotiable).** Temporary artifacts you create — logs, diffs, patches,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
---
|
|
1
2
|
# Generated by CodeOps install_agents.py
|
|
2
3
|
# Role: spec-test-author | Template: spec-test-author
|
|
3
4
|
# Do not edit this file manually — regenerate with: install_agents.py
|
|
4
|
-
|
|
5
|
-
description: Writes specification tests (*.spec.test.*) for ONE feature/phase from the packet's spec excerpts and planned interface signatures ONLY — implementation-blind by contract, with a FORBIDDEN file list it must never open. Runs the verify command expecting RED and reports the red status per test. Never weakens an expectation to ease authoring. Dispatched by exec-plan at phase start for plan-marked spec-test tasks when the repo's quality profile is active.
|
|
5
|
+
description: "Writes specification tests (*.spec.test.*) for ONE feature/phase from the packet's spec excerpts and planned interface signatures ONLY \u2014 implementation-blind by contract, with a FORBIDDEN file list it must never open. Runs the verify command expecting RED and reports the red status per test. Never weakens an expectation to ease authoring. Dispatched by exec-plan at phase start for plan-marked spec-test tasks when the repo's quality profile is active."
|
|
6
6
|
mode: subagent
|
|
7
7
|
temperature: 0.1
|
|
8
8
|
hidden: true
|
|
@@ -14,6 +14,11 @@ permission:
|
|
|
14
14
|
bash: allow
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
+
<!-- Agent template: spec-test-author
|
|
18
|
+
description: Writes specification tests (*.spec.test.*) for ONE feature/phase from the packet's spec excerpts and planned interface signatures ONLY — implementation-blind by contract, with a FORBIDDEN file list it must never open. Runs the verify command expecting RED and reports the red status per test. Never weakens an expectation to ease authoring. Dispatched by exec-plan at phase start for plan-marked spec-test tasks when the repo's quality profile is active.
|
|
19
|
+
See agents/ for the OpenCode agent definition files generated from this template.
|
|
20
|
+
Do not add YAML frontmatter here â use install_agents.py to generate agent files. -->
|
|
21
|
+
|
|
17
22
|
You author the specification tests for exactly ONE feature or phase, via a spec packet (spec
|
|
18
23
|
excerpts, the expected test cases, planned interface signatures from the plan documents, the
|
|
19
24
|
repo's test framework and conventions, the FORBIDDEN implementation-file list, and the verify
|
package/package.json
CHANGED
|
Binary file
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
---
|
|
1
2
|
# Generated by CodeOps install_agents.py
|
|
2
3
|
# Role: executor | Template: plan-task-executor
|
|
3
4
|
# Do not edit this file manually — regenerate with: install_agents.py
|
|
4
|
-
|
|
5
|
-
description: CodeOps plan-task-executor agent
|
|
5
|
+
description: "Executes one dispatched lower-sensitivity unit \u2014 normally a whole phase, occasionally a single task \u2014 from a CodeOps exec-plan. Implements code, writes/updates tests, runs the project verify command, reports pass/fail per task. Use for trivial and standard phases when a cheaper model than the session's is warranted."
|
|
6
6
|
mode: subagent
|
|
7
7
|
temperature: 0.1
|
|
8
8
|
hidden: true
|
|
@@ -15,6 +15,7 @@ permission:
|
|
|
15
15
|
---
|
|
16
16
|
|
|
17
17
|
<!-- Agent template: plan-task-executor
|
|
18
|
+
description: Executes one dispatched lower-sensitivity unit — normally a whole phase, occasionally a single task — from a CodeOps exec-plan. Implements code, writes/updates tests, runs the project verify command, reports pass/fail per task. Use for trivial and standard phases when a cheaper model than the session's is warranted.
|
|
18
19
|
See agents/ for the OpenCode agent definition files generated from this template.
|
|
19
20
|
Do not add YAML frontmatter here â use install_agents.py to generate agent files. -->
|
|
20
21
|
|
|
@@ -434,13 +434,18 @@ def build_agent_frontmatter(
|
|
|
434
434
|
permissions: dict[str, str],
|
|
435
435
|
sandbox: Optional[str],
|
|
436
436
|
) -> str:
|
|
437
|
-
"""Construct the OpenCode agent YAML frontmatter block.
|
|
437
|
+
"""Construct the OpenCode agent YAML frontmatter block.
|
|
438
|
+
|
|
439
|
+
The opening `---` delimiter must be the file's first line: OpenCode parses
|
|
440
|
+
agent frontmatter only when the file begins with it. The CodeOps provenance
|
|
441
|
+
banner therefore lives inside the block as YAML comment lines.
|
|
442
|
+
"""
|
|
438
443
|
lines = [
|
|
444
|
+
"---",
|
|
439
445
|
CODEOPS_MARKER,
|
|
440
446
|
f"# Role: {role} | Template: {template_name}",
|
|
441
447
|
"# Do not edit this file manually — regenerate with: install_agents.py",
|
|
442
|
-
"
|
|
443
|
-
f"description: {description}",
|
|
448
|
+
f"description: {json.dumps(description)}",
|
|
444
449
|
"mode: subagent",
|
|
445
450
|
]
|
|
446
451
|
if model:
|
|
@@ -457,12 +462,20 @@ def build_agent_frontmatter(
|
|
|
457
462
|
|
|
458
463
|
|
|
459
464
|
def load_template_description(plugin_root: Path, template_name: str) -> str:
|
|
460
|
-
"""Extract description
|
|
465
|
+
"""Extract the description embedded in a template's provenance comment.
|
|
466
|
+
|
|
467
|
+
Templates deliberately carry no YAML frontmatter; the description lives as a
|
|
468
|
+
`description:` line inside the leading HTML comment and is copied verbatim
|
|
469
|
+
into the generated agent's frontmatter. The search is scoped to that comment
|
|
470
|
+
so body text can never be mistaken for the description.
|
|
471
|
+
"""
|
|
461
472
|
path = plugin_root / "agent-templates" / f"{template_name}.md"
|
|
462
473
|
if not path.exists():
|
|
463
474
|
return f"CodeOps {template_name} agent"
|
|
464
475
|
content = path.read_text(encoding="utf-8")
|
|
465
|
-
|
|
476
|
+
comment = re.match(r"^<!--([\s\S]*?)-->", content)
|
|
477
|
+
scope = comment.group(1) if comment else content
|
|
478
|
+
m = re.search(r"^\s*description:\s*(.+)$", scope, re.MULTILINE)
|
|
466
479
|
return m.group(1).strip() if m else f"CodeOps {template_name} agent"
|
|
467
480
|
|
|
468
481
|
|
|
@@ -506,6 +519,14 @@ def generate_agent_file(
|
|
|
506
519
|
def is_codeops_generated(path: Path) -> bool:
|
|
507
520
|
"""Return True if the file was generated by this script (has the CodeOps marker).
|
|
508
521
|
|
|
522
|
+
Two layouts are recognized so existing installs upgrade in place instead of
|
|
523
|
+
being skipped as hand-authored:
|
|
524
|
+
|
|
525
|
+
- current: the file opens with `---` and the marker appears within the
|
|
526
|
+
first eight lines (OpenCode parses the block only in this layout);
|
|
527
|
+
- legacy: the marker is the first line and the frontmatter block follows
|
|
528
|
+
the provenance banner.
|
|
529
|
+
|
|
509
530
|
Unreadable or non-UTF-8 files are treated as not generated, so a corrupt
|
|
510
531
|
file is reported as a state instead of crashing the caller.
|
|
511
532
|
|
|
@@ -513,20 +534,28 @@ def is_codeops_generated(path: Path) -> bool:
|
|
|
513
534
|
path: Candidate generated agent file.
|
|
514
535
|
|
|
515
536
|
Returns:
|
|
516
|
-
True when the
|
|
537
|
+
True when the file carries the CodeOps ownership marker in either layout.
|
|
517
538
|
"""
|
|
518
539
|
if not path.is_file():
|
|
519
540
|
return False
|
|
520
541
|
try:
|
|
521
|
-
|
|
542
|
+
lines = [line.strip() for line in path.read_text(encoding="utf-8").split("\n", 8)[:8]]
|
|
522
543
|
except (OSError, UnicodeDecodeError):
|
|
523
544
|
return False
|
|
524
|
-
|
|
545
|
+
if not lines:
|
|
546
|
+
return False
|
|
547
|
+
if lines[0] == CODEOPS_MARKER:
|
|
548
|
+
return True
|
|
549
|
+
return lines[0] == "---" and CODEOPS_MARKER in lines[1:]
|
|
525
550
|
|
|
526
551
|
|
|
527
552
|
def generate_custom_agent(plugin_root: Path, role: str, brief: dict, role_config: dict) -> str:
|
|
528
553
|
"""Generate the full content of a specialist agent file.
|
|
529
554
|
|
|
555
|
+
The file opens with the `---` frontmatter delimiter because OpenCode parses
|
|
556
|
+
agent frontmatter only when the file begins with it; the provenance banner
|
|
557
|
+
is emitted inside the block as YAML comments.
|
|
558
|
+
|
|
530
559
|
The generated file embeds two things: the generic template contract chosen
|
|
531
560
|
by the brief's `kind`, and the project brief body. Text that can contain
|
|
532
561
|
arbitrary characters (the description and a routing model pin) is written
|
|
@@ -582,10 +611,10 @@ def generate_custom_agent(plugin_root: Path, role: str, brief: dict, role_config
|
|
|
582
611
|
permissions["edit"] = "deny"
|
|
583
612
|
|
|
584
613
|
lines = [
|
|
614
|
+
"---",
|
|
585
615
|
CODEOPS_MARKER,
|
|
586
616
|
f"# Role: {role} | Template: {template_name}",
|
|
587
617
|
"# Do not edit this file manually — regenerate with: install_agents.py",
|
|
588
|
-
"---",
|
|
589
618
|
f"description: {json.dumps(brief['description'])}",
|
|
590
619
|
"mode: subagent",
|
|
591
620
|
]
|
|
@@ -708,7 +737,7 @@ def generated_custom_template(path: Path) -> Optional[str]:
|
|
|
708
737
|
if not is_codeops_generated(path):
|
|
709
738
|
return None
|
|
710
739
|
try:
|
|
711
|
-
lines = path.read_text(encoding="utf-8").split("\n",
|
|
740
|
+
lines = path.read_text(encoding="utf-8").split("\n", 6)[:6]
|
|
712
741
|
except (OSError, UnicodeDecodeError):
|
|
713
742
|
return None
|
|
714
743
|
for line in lines:
|
|
@@ -868,6 +897,10 @@ def run_sync_agents_md(project: Path, dry_run: bool) -> int:
|
|
|
868
897
|
def run_check(project: Path, plugin_root: Path, roles: list, routing_roles: dict) -> int:
|
|
869
898
|
"""Report catalog, custom, orphan, and AGENTS.md states.
|
|
870
899
|
|
|
900
|
+
Catalog roles are additionally content-compared against the generator
|
|
901
|
+
output, so a generated file whose layout or fields no longer match is
|
|
902
|
+
reported as STALE instead of silently passing the check.
|
|
903
|
+
|
|
871
904
|
Args:
|
|
872
905
|
project: Resolved project root.
|
|
873
906
|
plugin_root: Package root containing `agent-templates/`.
|
|
@@ -882,10 +915,27 @@ def run_check(project: Path, plugin_root: Path, roles: list, routing_roles: dict
|
|
|
882
915
|
issues: list[str] = []
|
|
883
916
|
for role in roles:
|
|
884
917
|
out_path = agents_dir / f"{role}.md"
|
|
918
|
+
if out_path.is_symlink():
|
|
919
|
+
issues.append(f"HAND-AUTHORED (skip): {out_path}")
|
|
920
|
+
continue
|
|
885
921
|
if not out_path.exists():
|
|
886
922
|
issues.append(f"MISSING: {out_path}")
|
|
887
|
-
|
|
923
|
+
continue
|
|
924
|
+
if not is_codeops_generated(out_path):
|
|
888
925
|
issues.append(f"HAND-AUTHORED (skip): {out_path}")
|
|
926
|
+
continue
|
|
927
|
+
try:
|
|
928
|
+
expected = generate_agent_file(plugin_root, role, routing_roles.get(role, {}))
|
|
929
|
+
except (BriefError, OSError, UnicodeDecodeError) as exc:
|
|
930
|
+
issues.append(f"INVALID: {role} — {exc}")
|
|
931
|
+
continue
|
|
932
|
+
try:
|
|
933
|
+
current = out_path.read_text(encoding="utf-8")
|
|
934
|
+
except (OSError, UnicodeDecodeError):
|
|
935
|
+
issues.append(f"STALE: {role}")
|
|
936
|
+
continue
|
|
937
|
+
if current != expected:
|
|
938
|
+
issues.append(f"STALE: {role}")
|
|
889
939
|
|
|
890
940
|
briefs, errors = collect_briefs(project)
|
|
891
941
|
issues.extend(errors)
|