opencode-codeops 1.4.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 (102) hide show
  1. package/CHANGELOG.md +179 -0
  2. package/LICENSE +21 -0
  3. package/README.md +171 -0
  4. package/_shared/auto-design.md +129 -0
  5. package/_shared/layout-convention.md +198 -0
  6. package/_shared/quality-profile.md +134 -0
  7. package/_shared/recommendation-hardening.md +166 -0
  8. package/_shared/scope-expansion-control.md +176 -0
  9. package/_shared/spec-first-ordering.md +79 -0
  10. package/_shared/zero-ambiguity-gate.md +311 -0
  11. package/agent-templates/codebase-scout.md +17 -0
  12. package/agent-templates/concurrency-auditor.md +5 -0
  13. package/agent-templates/design-challenger.md +26 -0
  14. package/agent-templates/financial-integrity-auditor.md +5 -0
  15. package/agent-templates/perf-auditor.md +23 -0
  16. package/agent-templates/phase-reviewer.md +54 -0
  17. package/agent-templates/plan-task-executor-opus.md +46 -0
  18. package/agent-templates/plan-task-executor.md +43 -0
  19. package/agent-templates/preflight-auditor.md +45 -0
  20. package/agent-templates/security-auditor.md +42 -0
  21. package/agent-templates/semantics-reviewer.md +5 -0
  22. package/agent-templates/spec-test-author.md +29 -0
  23. package/agents/concurrency-auditor.md +15 -0
  24. package/agents/correctness-reviewer.md +66 -0
  25. package/agents/demanding-executor.md +58 -0
  26. package/agents/design-challenger.md +38 -0
  27. package/agents/executor.md +55 -0
  28. package/agents/explorer.md +29 -0
  29. package/agents/financial-integrity-auditor.md +15 -0
  30. package/agents/performance-auditor.md +35 -0
  31. package/agents/preflight-auditor.md +57 -0
  32. package/agents/security-auditor.md +54 -0
  33. package/agents/semantics-reviewer.md +15 -0
  34. package/agents/spec-test-author.md +41 -0
  35. package/bin/codeops-worktree +244 -0
  36. package/bin/index.mjs +106 -0
  37. package/bin/install-agents.mjs +453 -0
  38. package/bin/install-skills.mjs +466 -0
  39. package/bin/lib/opencode-install.mjs +185 -0
  40. package/install.sh +55 -0
  41. package/package.json +73 -0
  42. package/plugin/index.ts +181 -0
  43. package/references/domains/compiler-and-language.md +28 -0
  44. package/references/domains/data-and-migration.md +22 -0
  45. package/references/domains/distributed-and-concurrent.md +26 -0
  46. package/references/domains/financial-system.md +28 -0
  47. package/references/domains/selection.md +19 -0
  48. package/references/domains/web-application.md +23 -0
  49. package/schemas/codeops-config.schema.json +56 -0
  50. package/scripts/check-version.mjs +163 -0
  51. package/scripts/codeops-migrate.sh +355 -0
  52. package/scripts/codeops-roadmap-compact.sh +232 -0
  53. package/scripts/codeops-roadmap-sync.sh +275 -0
  54. package/scripts/codeops_outcomes.py +155 -0
  55. package/scripts/codeops_plan.py +239 -0
  56. package/scripts/codeops_plan_migrate.py +318 -0
  57. package/scripts/codeops_worktree_snapshot.py +99 -0
  58. package/scripts/install_agents.py +288 -0
  59. package/scripts/release.mjs +533 -0
  60. package/skills/analyze-project/SKILL.md +28 -0
  61. package/skills/clean-comments/SKILL.md +22 -0
  62. package/skills/exec-plan/SKILL.md +267 -0
  63. package/skills/exec-plan/commit-modes.md +113 -0
  64. package/skills/exec-plan/execution-protocol.md +471 -0
  65. package/skills/git-commit/SKILL.md +35 -0
  66. package/skills/github-issues/SKILL.md +38 -0
  67. package/skills/grill-me/SKILL.md +342 -0
  68. package/skills/make-plan/SKILL.md +282 -0
  69. package/skills/make-plan/quality-checklist.md +96 -0
  70. package/skills/make-plan/templates.md +535 -0
  71. package/skills/make-plan/zero-ambiguity-gate.md +19 -0
  72. package/skills/make-requirements/SKILL.md +268 -0
  73. package/skills/make-requirements/discovery-phases.md +255 -0
  74. package/skills/make-requirements/review-and-add.md +73 -0
  75. package/skills/make-requirements/templates.md +296 -0
  76. package/skills/make-requirements/zero-ambiguity-gate.md +18 -0
  77. package/skills/outcome-review/SKILL.md +34 -0
  78. package/skills/preflight/SKILL.md +310 -0
  79. package/skills/preflight/dimensions.md +181 -0
  80. package/skills/preflight/report-format.md +300 -0
  81. package/skills/retro-requirements/SKILL.md +218 -0
  82. package/skills/retro-requirements/confidence-classification.md +45 -0
  83. package/skills/retro-requirements/phases.md +609 -0
  84. package/skills/retro-requirements/triage-gate.md +135 -0
  85. package/skills/roadmap/SKILL.md +381 -0
  86. package/skills/roadmap/stage-hooks.md +80 -0
  87. package/skills/roadmap/template.md +200 -0
  88. package/skills/setup-codeops/SKILL.md +94 -0
  89. package/skills/setup-codeops/migration.md +106 -0
  90. package/skills/setup-codeops/scaffold.md +99 -0
  91. package/skills/setup-routing/SKILL.md +102 -0
  92. package/skills/setup-routing/routing.md +44 -0
  93. package/skills/techdocs/SKILL.md +199 -0
  94. package/skills/techdocs/authoring-and-update.md +178 -0
  95. package/skills/techdocs/templates.md +655 -0
  96. package/skills/techdocs/vitepress-setup.md +143 -0
  97. package/skills/upgrade-plan/SKILL.md +75 -0
  98. package/skills/upgrade-plan/content-quality-gate.md +35 -0
  99. package/skills/upgrade-plan/upgrade-checklists.md +107 -0
  100. package/standards/coding-standards-full.md +124 -0
  101. package/standards/coding-standards.md +64 -0
  102. package/standards/output-style.md +17 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,179 @@
1
+ # Changelog
2
+
3
+ All notable changes to CodeOps are recorded here.
4
+
5
+ ## 1.4.0 — 2026-09-19
6
+
7
+ ### Features
8
+
9
+ - installer: add npm-first install, agents installer, and release tooling
10
+
11
+ ## 1.3.1 — 2026-09-15
12
+
13
+ - Refuse to install or uninstall through a symlinked skills directory unless `--force` is passed,
14
+ so a symlinked target cannot silently rewrite the tree it points at. `status` stays read-only.
15
+ - Ignore the local install marker and development skill link under `skills/`.
16
+
17
+ ## 1.3.0 — 2026-09-15
18
+
19
+ - Add a one-line curl installer (`install.sh`) that downloads the repository tarball and runs the
20
+ skills installer. Pin a version with `CODEOPS_REF`.
21
+ - Add `status` and `uninstall` subcommands to `bin/install-skills.mjs`.
22
+ - Record owned skills and the installed version in `<skills-dir>/.opencode-codeops.json`, and
23
+ replace managed skills atomically on upgrade. Skills not owned by this package are never touched.
24
+ - Add specification tests for the installer, run with `node --test`.
25
+
26
+ ## 1.2.0 — OpenCode port — 2026-09-12
27
+
28
+ Port from `codex-codeops` (Codex plugin) to `opencode-codeops` (OpenCode plugin).
29
+
30
+ ### Breaking changes
31
+ - Plugin is now loaded via OpenCode's plugin system (`"plugin": ["opencode-codeops"]` in `opencode.json`) instead of Codex's marketplace mechanism.
32
+ - `PLUGIN_ROOT` environment variable renamed to `CODEOPS_PLUGIN_ROOT` to avoid collisions with other plugins.
33
+ - Agent files are now OpenCode Markdown format (`.opencode/agents/<role>.md`) instead of Codex TOML (`.codex/agents/<role>.toml`). Regenerate with `scripts/install_agents.py`.
34
+ - `setup-routing` now targets `opencode.json` instead of `.codex/config.toml`.
35
+
36
+ ### Changes
37
+ - All 16 skills ported verbatim with Codex-specific terminology updated to OpenCode.
38
+ - All 12 subagents ship with no hardcoded `model` field — agents inherit the user's active model automatically. Pin models per-role via `opencode.json` or the `setup-routing` skill.
39
+ - `bin/codeops-worktree --launch` now starts `opencode` instead of `codex`.
40
+ - Standards are now injected into sessions via OpenCode's `session.created`, `session.compacted`, and `experimental.session.compacting` hooks — providing stronger coverage than the Codex equivalent.
41
+ - `scripts/install_agents.py` rewritten to generate OpenCode `.md` agent files instead of Codex `.toml` files.
42
+
43
+ ---
44
+
45
+ ## 1.2.0 — 2026-09-04
46
+
47
+ - Add an always-active Complexity Escalation Gate that requires a visible cost-and-evidence packet,
48
+ an independent challenger, and explicit user approval before material support machinery enters
49
+ requirements, plans, or implementation.
50
+ - Make escaped complexity a blocking major finding, reserve escalation approval to the user even
51
+ under `--auto-design`, and reuse existing ambiguity and finding records instead of adding a new
52
+ lifecycle or configuration system.
53
+ - Use plain international English in user-facing CodeOps responses.
54
+
55
+ ## 1.1.0 — 2026-08-30
56
+
57
+ - Show a deterministic ten-cell progress bar after every verified `exec-plan` task, including exact
58
+ task counts and percentage for accessibility.
59
+ - Derive the display directly from authoritative Markdown task markers without adding mutable
60
+ progress state or changing the execution-plan artifact format.
61
+ - Add specification and implementation coverage for rendering, verification-pending tasks,
62
+ read-only behavior, boundary states, invalid inputs, and conflicting CLI output modes.
63
+
64
+ ## 1.0.1 — 2026-08-26
65
+
66
+ - Direct planning and implementation toward the simplest solution that satisfies authorized
67
+ requirements, existing project conventions, and demonstrated risks.
68
+ - Guard the minimum-sufficient-design instruction in plan quality checks and deterministic plugin
69
+ validation without changing existing workflow gates or artifact formats.
70
+
71
+ ## 1.0.0 — 2026-08-08
72
+
73
+ - Make Markdown plans the sole authoritative owner of execution progress and requirement delivery,
74
+ removing the mutable traceability graph, transition API, journal, lock, and shadow state.
75
+ - Add a read-only plan parser that derives lifecycle, next task, and RD delivery directly from
76
+ `00-index.md` ownership metadata and `99-execution-plan.md` checklist markers.
77
+ - Add an all-or-nothing migrator for existing nested projects that preserves checklist progress,
78
+ recovers lightweight and plan-local ownership, and deletes obsolete `traceability.json` files.
79
+ - Make `setup-codeops --yes` automatically detect, migrate, and verify legacy workflow state in an
80
+ already-configured project while retaining clean-tree and ambiguity safeguards.
81
+ - Validate the migration on JSVision with 21 active plans, deletion of five legacy graphs, and a
82
+ passing Windows, macOS, and Linux CI matrix on Node.js 22 and 24.
83
+
84
+ ## 0.4.0 — 2026-07-31
85
+
86
+ - Keep planning, preflight, and execution inside strict product scope by default, suppressing
87
+ optional feature suggestions without hiding necessary correctness, safety, or feasibility work.
88
+ - Add invocation-scoped `--explore-scope` with durable, user-owned `Keep`, `Defer`, and `Discard`
89
+ decisions for optional additions.
90
+ - Keep scope authority separate from auto-design, finding resolution, fix permission, and commit
91
+ modes, with collision-free registers and resume-safe invalidation rules.
92
+
93
+ ## 0.3.1 — 2026-07-24
94
+
95
+ - Make junior-readable source documentation a non-negotiable implementation standard.
96
+ - Require language-appropriate documentation for public APIs and non-trivial internal entities
97
+ while avoiding comments that merely restate trivial private code.
98
+ - Block execution-task completion when required documentation is missing, and make omissions an
99
+ explicit phase-review finding even when builds, tests, and linters pass.
100
+ - Add conformance coverage that preserves the executor, reviewer, and completion-gate contracts.
101
+
102
+ ## 0.3.0 — 2026-07-23
103
+
104
+ - Add invocation-scoped `--auto-design` to requirements, planning, preflight, and execution.
105
+ - Select eligible technical decisions through a documented strongest-option rubric with durable
106
+ provenance, bounded escalation, invalidation, and independent challenge for high-impact choices.
107
+ - Preserve user authority over product direction, risk acceptance, permissions, destructive or
108
+ external actions, and keep commit behavior independent from design delegation.
109
+ - Add deterministic contract, boundary, hostile-argument, and collection coverage.
110
+
111
+ ## 0.2.0 — 2026-07-23
112
+
113
+ - Promote the Codex plugin from beta to the first stable 0.2 release.
114
+ - Add dependency-aware, target-scoped readiness across requirements, audit, planning, execution,
115
+ roadmap, feature acceptance, and release workflows.
116
+ - Add schema-2 semantic revisions, validation snapshots, atomic lifecycle transitions, explicit
117
+ recovery, and safe schema-1 graph upgrades.
118
+ - Keep the broader 1.0 comparative and external complex-project pilot gate explicitly open.
119
+ - Adopt Semantic Versioning for all subsequent releases.
120
+
121
+ ## 0.2.0-beta.7 — 2026-07-23
122
+
123
+ - Add schema-2 target-scoped readiness, atomic lifecycle transitions, and recoverable graph
124
+ upgrades across requirements, audit, planning, execution, roadmap, acceptance, and release.
125
+ - Scope readiness gates to the selected feature so unrelated draft work does
126
+ not block planning or execution.
127
+ - Treat traceability node IDs as feature-local and require explicit
128
+ qualification for cross-feature links.
129
+ - Add planning target, context, and modification boundaries plus bounded
130
+ post-gate ambiguity discovery.
131
+ - Align make-plan with the shared named-deferral contract.
132
+ - Review complete phase changes in every commit mode using worktree snapshots
133
+ that include staged, unstaged, committed, and newly created files.
134
+ - Escalate repeated identical verification failures instead of retrying
135
+ indefinitely.
136
+
137
+ ## 0.2.0-beta.6 — 2026-07-23
138
+
139
+ - Keep single-document preflight audits scoped to their selected target while
140
+ using related artifacts only as context.
141
+ - Bound corrective rescans, preserve finding identity by root cause, and stop
142
+ cleanly when minor findings are explicitly accepted.
143
+ - Store narrow preflight evidence separately so sibling requirements and whole
144
+ plans cannot advance from an out-of-scope pass.
145
+ - Add deterministic validation for preflight scope and convergence contracts.
146
+
147
+ ## 0.2.0-beta.5 — 2026-07-23
148
+
149
+ - Make `status` a successful observation for structurally valid projects whose
150
+ requirements or plans are not yet execution-ready.
151
+ - Treat migrated Claude roadmap, requirement, and plan documents as first-class
152
+ Codex schema-1 artifacts during roadmap presentation.
153
+ - Add regression coverage for valid-but-blocked status and invalid status data.
154
+
155
+ ## 0.2.0-beta.4 — 2026-07-23
156
+
157
+ - Exclude `codeops/_archive` traceability graphs and execution plans from live
158
+ readiness, lifecycle, and task-progress reports.
159
+ - Add regression coverage for repositories with large archived project histories.
160
+
161
+ ## 0.2.0-beta.3 — 2026-07-23
162
+
163
+ - Enforce per-node lifecycle status vocabularies and reopened-ambiguity invalidation.
164
+ - Make the migration layout marker the final commit point after required artifacts.
165
+ - Retain versioned ambiguity-benchmark, installation-lifecycle, and independent-review evidence.
166
+ - Reconcile release claims, platform boundaries, and governing plan state with evidence.
167
+
168
+ ## 0.2.0-beta.2 — 2026-07-23
169
+
170
+ - Add deterministic traceability, readiness, lifecycle, drift, and strict-config validation.
171
+ - Add Codex-native capability roles and optional project agent installation.
172
+ - Add compiler, financial, web, distributed, and migration ambiguity lenses.
173
+ - Add retained adversarial scenario and Claude 3.12.0 parity evidence.
174
+ - Add install, migration, concepts, troubleshooting, CI, and release documentation.
175
+
176
+ ## 0.2.0-beta.1 — 2026-07-23
177
+
178
+ - First installable Codex-native beta with requirements, planning, execution,
179
+ review, roadmap, migration, documentation, routing, and utility skills.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 blendsdk
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,171 @@
1
+ # opencode-codeops
2
+
3
+ **Specification-first engineering for complex systems — CodeOps plugin for OpenCode.**
4
+
5
+ Turn an idea or existing system into ambiguity-free requirements, grounded specifications, executable plans, verified code, and durable project state.
6
+
7
+ ## Skills
8
+
9
+ | Skill | Purpose |
10
+ |---|---|
11
+ | `make-requirements` | Formal requirements from an idea — multi-phase discovery, Zero-Ambiguity Gate |
12
+ | `retro-requirements` | Reverse-engineer an existing codebase into structured requirements |
13
+ | `grill-me` | Deep disambiguation interview before planning or requirements |
14
+ | `make-plan` | Multi-document implementation plan from requirements |
15
+ | `preflight` | 13-dimension quality audit of any plan, requirements, or artifact |
16
+ | `exec-plan` | Execute a plan — implement → verify → commit loop with quality reviews |
17
+ | `roadmap` | Live feature-set roadmap — make, update, review, archive |
18
+ | `analyze-project` | Analyze repo and create/refresh CodeOps-aware `AGENTS.md` guidance |
19
+ | `setup-codeops` | Set up or migrate CodeOps in a git repo |
20
+ | `setup-routing` | Configure per-role subagent model and policy routing |
21
+ | `upgrade-plan` | Upgrade legacy CodeOps artifacts to current schema |
22
+ | `techdocs` | VitePress-compatible architecture docs and ADRs |
23
+ | `github-issues` | Read and manage GitHub issues via `gh` CLI |
24
+ | `clean-comments` | Audit and clean source comments without changing behavior |
25
+ | `git-commit` | Guarded commit — verify, stage deliberately, Conventional Commit message |
26
+ | `outcome-review` | Review local opt-in outcome metrics (requires `metrics.enabled: true`) |
27
+
28
+ ## Installation
29
+
30
+ CodeOps has two parts that OpenCode loads differently: the **plugin** (standards and hooks) is
31
+ installed by OpenCode from npm, and the **skills** and **subagents** must be copied onto the
32
+ filesystem because OpenCode only discovers those from disk.
33
+
34
+ ### 1. Add the plugin
35
+
36
+ Add to your `opencode.json`:
37
+
38
+ ```json
39
+ {
40
+ "$schema": "https://opencode.ai/config.json",
41
+ "plugin": ["opencode-codeops"]
42
+ }
43
+ ```
44
+
45
+ OpenCode installs the plugin automatically via Bun on next startup. A global config
46
+ (`~/.config/opencode/opencode.json`) is recommended so CodeOps is active in every project.
47
+
48
+ ### 2. Install the skills
49
+
50
+ OpenCode discovers skills only from the filesystem (`.opencode/skills/` or
51
+ `~/.config/opencode/skills/`); it never reads them from a plugin package. The installer is a thin
52
+ `npx` wrapper around this package, so the skills always match the published version:
53
+
54
+ ```bash
55
+ # Global (recommended) — available in every OpenCode project
56
+ curl -fsSL https://cdn.jsdelivr.net/npm/opencode-codeops@latest/install.sh | bash
57
+
58
+ # Project-only — skills live in ./.opencode/skills and are committed with the repo
59
+ curl -fsSL https://cdn.jsdelivr.net/npm/opencode-codeops@latest/install.sh | bash -s -- --project
60
+ ```
61
+
62
+ The same installer runs directly through npm:
63
+
64
+ ```bash
65
+ npx -y opencode-codeops@latest install-skills
66
+ ```
67
+
68
+ Pin a version with `CODEOPS_VERSION` (an npm dist-tag or exact version; defaults to `latest`):
69
+
70
+ ```bash
71
+ CODEOPS_VERSION=1.4.0 curl -fsSL https://cdn.jsdelivr.net/npm/opencode-codeops@latest/install.sh | bash
72
+ ```
73
+
74
+ Pin the plugin to the same version so the two cannot drift apart:
75
+
76
+ ```json
77
+ { "plugin": ["opencode-codeops@1.4.0"] }
78
+ ```
79
+
80
+ Re-running the installer upgrades an existing install in place. It replaces only the files this
81
+ package owns, recorded in `<skills-dir>/.opencode-codeops.json`. Skills you author yourself, or
82
+ install with another tool, are left untouched.
83
+
84
+ Check or remove an install:
85
+
86
+ ```bash
87
+ npx -y opencode-codeops@latest status
88
+ npx -y opencode-codeops@latest uninstall
89
+ ```
90
+
91
+ `status` reports the installed version next to the current package version, so a plugin/skills
92
+ mismatch is visible. Use `--dry-run` to preview an install; a same-named directory the package
93
+ does not own is skipped with a warning, and `--force` replaces it.
94
+
95
+ ### 3. Install the subagents
96
+
97
+ The 12 CodeOps subagents install into `.opencode/agents/` (project) or `~/.config/opencode/agents/`
98
+ (global). The `/setup-codeops` skill does this for a project; do it manually with:
99
+
100
+ ```bash
101
+ npx -y opencode-codeops@latest install-agents --project
102
+ ```
103
+
104
+ ### Local development
105
+
106
+ Symlink the plugin into your OpenCode plugin directory and link the skills to a checkout, so edits
107
+ are picked up without reinstalling:
108
+
109
+ ```bash
110
+ # Plugin (project or global plugin directory)
111
+ ln -s /path/to/opencode-codeops/plugin/index.ts ~/.config/opencode/plugins/codeops.ts
112
+
113
+ # Skills and agents — link instead of copy
114
+ node /path/to/opencode-codeops/bin/index.mjs install-skills --link --global
115
+ node /path/to/opencode-codeops/bin/index.mjs install-agents --link --global
116
+ ```
117
+
118
+ ## Setup
119
+
120
+ After installing the plugin and the skills, initialize CodeOps in your project:
121
+
122
+ ```
123
+ /setup-codeops
124
+ ```
125
+
126
+ This creates the `codeops/` layout, scaffolds `codeops/codeops.json` and `codeops/.codeops.yml`, installs the 12 CodeOps subagent files into `.opencode/agents/`, and adds a managed section to `AGENTS.md`.
127
+
128
+ Commit the result:
129
+
130
+ ```bash
131
+ git add codeops/ .opencode/agents/ AGENTS.md
132
+ git commit -m "chore: initialize CodeOps"
133
+ ```
134
+
135
+ ## What the plugin does automatically
136
+
137
+ On every OpenCode session start and after every compaction, the plugin injects:
138
+ - `standards/coding-standards.md` — coding quality, security, testing, and working-style rules
139
+ - `standards/output-style.md` — how to report findings, format tables, and recommend next steps
140
+
141
+ These standards are active without any user action. They do not need to be copied into `AGENTS.md`.
142
+
143
+ 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.
144
+
145
+ ## Agent model configuration
146
+
147
+ All CodeOps subagents inherit the model of the primary agent that invoked them. No provider-specific configuration is required out of the box.
148
+
149
+ To pin specific models per role, use the `setup-routing` skill or add overrides directly in `opencode.json`:
150
+
151
+ ```json
152
+ {
153
+ "agent": {
154
+ "demanding-executor": { "model": "anthropic/claude-opus-4-5" },
155
+ "executor": { "model": "anthropic/claude-haiku-4" }
156
+ }
157
+ }
158
+ ```
159
+
160
+ ## Requirements
161
+
162
+ - OpenCode (current)
163
+ - Bash
164
+ - Python 3.8+
165
+ - Git
166
+ - Node.js 18+ (for the `npx` installer; Bun is used by OpenCode to load the plugin)
167
+ - `gh` CLI (for the `github-issues` skill only)
168
+
169
+ ## License
170
+
171
+ MIT
@@ -0,0 +1,129 @@
1
+ # Auto-Design Authority Policy
2
+
3
+ > **Policy version**: 1
4
+ > **CodeOps Artifact Schema**: 1
5
+
6
+ `--auto-design` delegates eligible technical design decisions to CodeOps for one workflow chain.
7
+ It preserves ambiguity closure: it changes who may resolve an eligible ambiguity, never whether
8
+ the ambiguity must be found, recorded, traced, challenged, and verified.
9
+
10
+ ## Invocation contract
11
+
12
+ Only exactly one standalone token `--auto-design` before the first `--` end-of-options sentinel
13
+ activates this policy. Zero occurrences means Default mode; more than one is invalid and must stop
14
+ with a usage correction. A token at or after the sentinel is target content, not an option.
15
+ Lookalikes such as `--auto-designer`, `--auto-design=true`, or bare `auto-design` do not activate
16
+ it. A supporting skill removes the one recognized token before resolving feature names, paths,
17
+ targets, or other options, announces activation, and assigns a root invocation ID. Explicitly
18
+ invoked supporting children inherit a downward-only context:
19
+
20
+ ```text
21
+ mode: auto-design
22
+ root invocation ID: <stable ID for this workflow chain>
23
+ parent workflow: <invoking supported workflow>
24
+ policy version: 1
25
+ delegated categories: <parent's eligible classes or a strict subset>
26
+ reserved categories: <the complete reserved set>
27
+ permission state: <unchanged action and commit permissions>
28
+ ```
29
+
30
+ A child may narrow authority but never widen it. An unsupported child fails closed and uses normal
31
+ authority rules. A later independent invocation is in **Default mode** unless its own arguments
32
+ contain `--auto-design`. The mode is never persisted as a repository or global default.
33
+
34
+ ## Default mode
35
+
36
+ Without `--auto-design`, existing behavior is unchanged: every material semantic choice requires
37
+ an explicit user decision or explicit named deferral.
38
+
39
+ ## Eligibility boundary
40
+
41
+ CodeOps may decide only when a choice stays within confirmed goals, product behavior, scope,
42
+ constraints, and acceptance criteria; concerns an implementation mechanism; contradicts no user
43
+ decision or governing artifact; and creates no reserved-authority consequence.
44
+
45
+ Eligible classes include algorithms, data structures, internal architecture and interfaces,
46
+ compiler and optimizer mechanisms, failure and recovery design, concurrency and consistency,
47
+ persistence and reversible migration mechanisms, security mechanisms within an approved policy,
48
+ testing strategy, performance engineering, and implementation sequencing.
49
+
50
+ ## Reserved authority
51
+
52
+ Always escalate product behavior or scope, priorities and acceptance criteria, access and security policy,
53
+ data ownership or retention, legal/ethical/compliance or risk acceptance, financial exposure,
54
+ budget/deadline commitments, paid-vendor choices, public compatibility breaks,
55
+ destructive migration, credentials, spending, deployment/publication, destructive or irreversible
56
+ external actions, external communication, and equally defensible designs that create materially
57
+ different products.
58
+
59
+ The shared Complexity Escalation Gate is also reserved authority. Auto-design may select the
60
+ smallest viable implementation, but it cannot approve a larger layer, dependency, harness,
61
+ framework, infrastructure surface, or other escalation. Only the user's explicit approval of the
62
+ gate packet authorizes that larger option.
63
+
64
+ `--auto-design` does not grant action permission. It does not authorize implementation outside the
65
+ invoked workflow, file-scope expansion, commits, pushes, `--auto-commit`, installation, purchases,
66
+ deployment, publication, destructive operations, credentials use, or external-system changes.
67
+
68
+ Scope expansion remains separately user-owned under
69
+ [`scope-expansion-control.md`](scope-expansion-control.md). Auto-design cannot activate optional
70
+ scope exploration, choose `Keep` for an `SE-*` proposal, revive discarded scope, or reinterpret an
71
+ optional addition as an eligible technical decision.
72
+
73
+ ## Strongest-option procedure
74
+
75
+ 1. Gather repository evidence, domain knowledge, constraints, and failure conditions.
76
+ 2. Generate every genuinely viable option, actively searching for a non-obvious alternative.
77
+ When only one option survives evidence, name rejected candidates and why; never invent a
78
+ strawman merely to create a comparison.
79
+ 3. Apply forced reframing: 10× budget, contrarian expert, obsolescence, and pre-emptive challenge.
80
+ 4. Compare correctness, soundness and safety, objective fit, maintainability, verifiability,
81
+ performance, compatibility, operational recovery, delivery risk, proportional complexity, and
82
+ future evolution.
83
+ 5. State the strongest counterargument and set confidence.
84
+ 6. Require a blind independent challenger for complex, sensitive, high-impact, or
85
+ difficult-to-reverse choices. Material divergence, unavailable required review, or insufficient
86
+ confidence triggers bounded escalation; it never silently accepts or waives risk.
87
+ 7. Select the best-supported option. Strongest means most likely to make the whole project
88
+ succeed, not the most sophisticated design.
89
+
90
+ ## Durable resolution
91
+
92
+ The owning ambiguity or decision artifact records complete eligibility and provenance, including
93
+ rejected alternatives and reopen triggers:
94
+
95
+ ```text
96
+ Authority: AI — delegated by --auto-design
97
+ Eligibility: <class and boundary rationale>
98
+ Objective: <governing success objective>
99
+ Decision: <selected option>
100
+ Evidence: <repository/domain facts and constraints>
101
+ Rejected alternatives: <viable alternatives and reasons>
102
+ Strongest counterargument: <best case against the choice>
103
+ Confidence: High | Med | Low — <what would change it>
104
+ Hardening: <result and challenger verdict when required>
105
+ Policy version: 1
106
+ Root invocation ID: <ID>
107
+ Reopen triggers: <observable invalidation conditions>
108
+ ```
109
+
110
+ The canonical delegated marker may occupy an existing `User Decision` column for backward
111
+ compatibility. Do not create a parallel decision database or duplicate rationale in traceability.
112
+
113
+ ## Bounded escalation
114
+
115
+ Research and challenge first. If a choice is reserved, constraints conflict, material evidence
116
+ remains unavailable, concerns cannot be separated, or no option is defensible, stop once per root
117
+ cause with the exact decision, boundary/evidence failure, strongest available recommendation, and
118
+ minimum user input needed. It must never guess or loop repeatedly over the same evidence.
119
+
120
+ ## Invalidation
121
+
122
+ When new evidence breaks an assumption or a reopen trigger fires, reopen the owning decision,
123
+ mark affected downstream specifications, tests, tasks, implementation, and verification stale,
124
+ repeat this policy, and rerun applicable readiness and semantic gates.
125
+
126
+ ## Supported workflows
127
+
128
+ The closed allowlist is `make-requirements`, `make-plan`, `preflight`, and `exec-plan`. Adding a
129
+ workflow requires specification coverage and deterministic integration checks.