opencode-agent-skill 7.7.0 → 10.0.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 (68) hide show
  1. package/CHANGELOG.md +112 -3
  2. package/README.md +396 -281
  3. package/bin/ocskill.mjs +382 -156
  4. package/docs/DETERMINISTIC-TOOLS.md +25 -8
  5. package/docs/ENGINEERING-DESIGN.md +31 -13
  6. package/docs/EVALS.md +34 -12
  7. package/docs/NPM-PUBLISH.md +6 -6
  8. package/docs/OPENCODE-COMPAT.md +11 -8
  9. package/docs/TRACE-SCHEMA.md +15 -2
  10. package/docs/V8-INTELLIGENCE-RELIABILITY.md +206 -0
  11. package/docs/V9-SPEED-INTELLIGENCE.md +102 -0
  12. package/evals/live/tasks.json +6 -6
  13. package/evals/polyglot/fixtures/polyglot-bench/api/generated/client.ts +2 -0
  14. package/evals/polyglot/fixtures/polyglot-bench/api/openapi.json +25 -0
  15. package/evals/polyglot/fixtures/polyglot-bench/db/migrations/20260920_add_order_key.sql +1 -0
  16. package/evals/polyglot/fixtures/polyglot-bench/dotnet/OrderService.cs +8 -0
  17. package/evals/polyglot/fixtures/polyglot-bench/java/PriceService.java +5 -0
  18. package/evals/polyglot/fixtures/polyglot-bench/monorepo/package.json +6 -0
  19. package/evals/polyglot/fixtures/polyglot-bench/monorepo/packages/api/package.json +4 -0
  20. package/evals/polyglot/fixtures/polyglot-bench/monorepo/packages/web/package.json +7 -0
  21. package/evals/polyglot/fixtures/polyglot-bench/monorepo/pnpm-lock.yaml +5 -0
  22. package/evals/polyglot/fixtures/polyglot-bench/next/app/api/products/route.ts +7 -0
  23. package/evals/polyglot/fixtures/polyglot-bench/python/tenant_auth.py +4 -0
  24. package/evals/polyglot/fixtures/polyglot-bench/react-native/keyboard.ts +3 -0
  25. package/evals/polyglot/graders/polyglot-bench.mjs +101 -0
  26. package/evals/polyglot/tasks.json +54 -0
  27. package/global-config/AGENTS.md +78 -160
  28. package/global-config/agents/integration-verifier.md +1 -1
  29. package/global-config/agents/plan-checker.md +1 -1
  30. package/global-config/commands/run.md +9 -5
  31. package/global-config/plugins/ues-router/capabilities.js +4 -0
  32. package/global-config/plugins/ues-router/index.js +784 -37
  33. package/global-config/plugins/ues-router/router.js +175 -23
  34. package/global-config/plugins/ues-router/runtime-guard.js +265 -0
  35. package/global-config/skills/engineering-orchestrator/references/long-horizon.md +6 -4
  36. package/lib/aci.mjs +128 -0
  37. package/lib/benchmark-confidence.mjs +173 -0
  38. package/lib/cli-utils.mjs +41 -0
  39. package/lib/container-sandbox.mjs +102 -0
  40. package/lib/context-manifest.mjs +300 -22
  41. package/lib/control-center.mjs +36 -3
  42. package/lib/eval-ablation.mjs +104 -0
  43. package/lib/eval-order.mjs +9 -0
  44. package/lib/eval-report.mjs +11 -0
  45. package/lib/eval-telemetry.mjs +8 -2
  46. package/lib/gate-receipt.mjs +52 -0
  47. package/lib/installer.mjs +39 -25
  48. package/lib/learning-engine.mjs +236 -38
  49. package/lib/model-policy.mjs +6 -0
  50. package/lib/opencode-compat.mjs +25 -10
  51. package/lib/orchestrator-policy.mjs +195 -21
  52. package/lib/process-runner.mjs +30 -9
  53. package/lib/runtime-events.mjs +31 -0
  54. package/lib/semantic-index.mjs +318 -0
  55. package/lib/task-engine.mjs +557 -28
  56. package/lib/trajectory.mjs +89 -0
  57. package/lib/windows-shim.mjs +227 -0
  58. package/lib/worktree-sandbox.mjs +85 -3
  59. package/package.json +11 -4
  60. package/scripts/check-release-tag.mjs +22 -0
  61. package/scripts/control-center.mjs +25 -0
  62. package/scripts/eval-ablation.mjs +44 -0
  63. package/scripts/eval-live.mjs +39 -58
  64. package/scripts/eval-matrix.mjs +166 -0
  65. package/scripts/smoke-packed-install.mjs +138 -4
  66. package/scripts/smoke-plain-install.mjs +91 -0
  67. package/scripts/validate-live-suite.mjs +3 -3
  68. package/scripts/validate.mjs +27 -5
package/CHANGELOG.md CHANGED
@@ -6,12 +6,118 @@ The project follows Semantic Versioning.
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [10.0.0] - 2026-09-22
10
+
11
+ ### Released
12
+ - Promoted V10 RC.2 to stable after the local full gate passed with 182 tests passing, 0 failing, 2 platform-specific skips, plus package and install smoke validation.
13
+ - Stable npm installs use the default `latest` dist-tag, so users install with `npm install -g opencode-agent-skill`.
14
+ - Includes adaptive context/routing, weak-model recovery, no-progress watchdog, duplicate/loop guards, bounded exploration output, durable compaction checkpoints, provider recovery and retryable lease recovery.
15
+
16
+ ### Changed
17
+ - Package version is 10.0.0.
18
+ - V10 stable keeps FAST at 8k, STANDARD at 20k and DEEP at 48k while preserving configured executor capability and correctness-first verification gates.
19
+
20
+ ## [10.0.0-rc.2] - 2026-09-22
21
+
22
+ ### Added
23
+ - No-progress watchdog for fresh executor sessions with active-tool grace so legitimate long-running tools are not killed merely for being quiet.
24
+ - Duplicate exploration guard and loop detector for repeated read/grep/glob-style calls without new workspace/evidence progress.
25
+ - Runtime tool-output budgets for large grep/glob/read/repo-graph style outputs.
26
+ - Durable pre-compaction checkpoints containing current task, runId, plan hash, workspace fingerprint, evidence pointers and a structured next action.
27
+ - Post-compaction resume enforcement with automatic fresh-session recovery when the next action is not executed.
28
+ - Provider failure classification and recovery for no-token, timeout, rate-limit, upstream, quota, auth and context-overflow failures.
29
+ - Periodic lease supervisor that recovers expired running executors to an explicit retryable state.
30
+
9
31
  ### Changed
10
- - The public npm distribution name is now the unscoped `opencode-agent-skill`, so users install it with `npm install -g opencode-agent-skill`.
32
+ - Provider stalls retry once in a fresh session with the same model; repeated retryable provider failures use the configured escalation model/provider when available.
33
+ - Stale lease recovery now records `retryable` instead of overloading terminal/logical `failed`.
34
+ - Explicit `long/high-risk`, `high-risk`, and structured long/high-risk facts hard-override FAST/light routing to DEEP/heavy.
35
+ - Package version is 10.0.0-rc.2.
36
+ - npm tag releases publish prereleases under `next`; stable versions continue to use `latest`.
11
37
 
12
38
  ### Fixed
13
- - Packed global-install smoke derives the package install path from package metadata instead of assuming the former scoped npm name.
14
- - The installer accepts the former `@laivannha0202/opencode-agent-skill` state owner as legacy UES ownership and re-owns it as `opencode-agent-skill` during the next install.
39
+ - A post-compaction session that only emits narrative text without executing the persisted next action is treated as stalled instead of silently completing.
40
+
41
+ ## [10.0.0-rc.1] - 2026-09-22
42
+
43
+ ### Added
44
+ - Initial-input token telemetry and aggregate reporting for baseline-vs-UES evaluation.
45
+ - Attempt-aware recovery policy with bounded context/skill escalation from initial execution to diagnosis and deep recovery.
46
+ - Policy-aware FAST runtime routing that prioritizes direct domain/debug/review skills over generic orchestration.
47
+ - Benchmark efficiency gates for initial input tokens and total tokens.
48
+ - Reference-vs-candidate ablation CLI that requires pass-rate preservation and measurable initial-context reduction.
49
+
50
+ ### Changed
51
+ - FAST context budget is 8k and STANDARD is 20k; DEEP remains 48k to preserve high-risk/long-horizon capability.
52
+ - Always-loaded global engineering instructions are compressed while retaining exact-contract, evidence, verification, safety and durable-work invariants.
53
+ - Retry context expands only after failure; repeated failures add graph/critic evidence instead of repeating speculative patches.
54
+ - Adaptive model policy exposes recovery stage and does not silently downshift the configured/default executor tier for FAST tasks.
55
+ - OpenCode V2 router metadata is versioned for the V10 policy-aware path.
56
+ - Package version is 10.0.0-rc.1; npm publication/tagging is intentionally deferred until RC verification passes.
57
+
58
+ ## [9.0.0] - 2026-09-22
59
+
60
+ ### Added
61
+ - Persistent incremental source index with bounded syntax-aware symbol/reference evidence and deterministic cache reuse.
62
+ - Weak-model-oriented ACI commands for semantic search, exact text search, bounded file viewing and reference lookup.
63
+ - FAST / STANDARD / DEEP execution profiles with adaptive context budgets, skill caps and verification depth.
64
+ - Redacted operational trajectory JSONL for replay/debugging without recording hidden chain-of-thought.
65
+ - Optional Docker/Podman verification sandbox with network-off, dropped capabilities, no-new-privileges and resource bounds.
66
+ - Paired baseline-vs-UES confidence analysis with exact sign-test evidence, per-suite no-regression checks and speed limits.
67
+ - Fail-closed `npm run evals:matrix:gate -- --model provider/model` release benchmark gate.
68
+ - Regression tests for semantic index, ACI, trajectory redaction, sandbox arguments, benchmark confidence and stale lock takeover.
69
+
70
+ ### Changed
71
+ - Context Manifest v4 consumes the incremental evidence index before broader graph expansion and keeps evidence labels explicit.
72
+ - Learning promotion now requires complete paired benchmark evidence, statistically supported uplift and no suite regression.
73
+ - OpenCode V2 dispatch records bounded redacted operational traces and adaptive execution-profile metadata.
74
+ - Hardened live benchmark fairness by making previously implicit hidden-grader contract details explicit in task prompts without weakening hidden graders.
75
+ - Clarified webhook stale/duplicate handling to require returning the exact original state reference, matching the hidden contract.
76
+ - Counterbalanced paired live-eval execution order across tasks and trials to reduce provider order/throttling bias.
77
+ - Focused small/FAST fixes now follow literal acceptance-contract discipline and avoid repo-wide discovery unless evidence requires it.
78
+ - OpenCode live-eval telemetry now reads native `part.tokens` / `tokens` payloads in addition to `usage` payloads.
79
+ - Extracted shared CLI parsing/read/truncation/error helpers into `lib/cli-utils.mjs` and added smoke/unit regression coverage.
80
+ - Preserved documented CLI edge semantics while removing ad-hoc option parsing and unifying bounded output clipping.
81
+ - Resolved README version drift and documented V9 capabilities.
82
+ - Package version is 9.0.0.
83
+
84
+ ### Fixed
85
+ - State locks use unique ownership tokens, heartbeat refresh and rename-based stale takeover so an expired owner cannot delete a replacement lock.
86
+ - Generated `.ues-cache/` and `.ues-traces/` state no longer invalidates workspace verification fingerprints.
87
+ - Windows CLI/router execution no longer falls back to shell-based `.cmd/.bat` invocation for unrecognized shims.
88
+ - Windows doctor/OpenCode compatibility probing safely resolves extensionless Node-backed npm shims and fails closed instead of invoking `cmd.exe`.
89
+ - Live benchmark execution now uses the same shell-free Windows resolver as `doctor`, skips unsupported batch shims in favor of safe native executables, and normalizes shim paths cross-platform.
90
+ - Windows npm shim resolution can recover from non-standard `.cmd` formatting by resolving only an adjacent package's explicit `package.json` bin mapping, including extensionless Node launchers such as OpenCode.
91
+ - Windows shim resolution also accepts validated native PE targets declared by npm package metadata, covering `opencode-ai` installs whose `bin.opencode` points to `bin/opencode.exe`.
92
+
93
+
94
+ ## [8.0.0] - 2026-09-20
95
+
96
+ ### Added
97
+ - Structured plan and integration gate receipts bound to the current plan hash or workspace fingerprint, with gate receipts persisted in `EVIDENCE.json`.
98
+ - Strict long/high-risk task completion that requires a successful verification receipt for the active `runId` and the current workspace fingerprint.
99
+ - Append-only `EVENTS.jsonl` runtime journal for work initialization, plan import/approval, task start/heartbeat/session binding, verification receipts, failure/recovery, integration verification and finalization.
100
+ - Task-scoped stale recovery and OpenCode V2 runtime tools for bounded executor cancellation/recovery.
101
+ - Context manifest v3 with multilingual task terms, Git-change awareness, symbol hits, TF-IDF-style relevance scoring, related tests/instructions and adaptive centered excerpts.
102
+ - Conflict-aware Git worktree integration plus automatic isolation support for concurrent writing executors.
103
+ - Learning v2 with recurring failure clustering, explicit acceptance and shadow-benchmark promotion gates.
104
+ - UES benchmark matrix runner for baseline-vs-UES comparison across standard, long-horizon and polyglot suites.
105
+ - Eight polyglot benchmark tasks spanning Python, Java/Spring-style code, .NET, Next.js, React Native, SQL migration, monorepo boundaries and generated-contract discipline.
106
+ - Control Center runtime-event visibility, receipt inspection and stale-task recovery control.
107
+ - CodeQL, dependency review, Dependabot maintenance and release-tag/version consistency checks.
108
+
109
+ ### Changed
110
+ - Fresh OpenCode V2 executor sessions now use bounded waits and `session.interrupt` on timeout, with capability probing and graceful degradation when optional hooks are unavailable.
111
+ - Process execution escalates Unix process-tree cancellation from SIGTERM to SIGKILL after a bounded grace period and always reports cancelled runs as nonzero.
112
+ - Router/task policy adds multilingual and framework-aware signals while preserving deterministic caps.
113
+ - Managed resource ownership now uses `managed-by: opencode-agent-skill` while automatically recognizing and migrating the former scoped marker.
114
+ - Package version is 8.0.0. Existing `opencode-agent-skill@7.7.0` users remain on the same package name and can update normally.
115
+
116
+ ### Fixed
117
+ - Strict verification no longer accepts a receipt after the workspace changed.
118
+ - Sandbox cleanup refuses to delete non-UES branches and removes temporary UES branches after successful integration.
119
+ - Learning proposals cannot be promoted before explicit acceptance.
120
+ - Plain npm-install smoke now reports lifecycle-script auto-sync versus explicit `ocskill install` recovery accurately.
15
121
 
16
122
  ## [7.7.0] - 2026-09-20
17
123
 
@@ -27,12 +133,15 @@ The project follows Semantic Versioning.
27
133
  - V2 runtime capability probing tool and fail-closed fresh-dispatch checks.
28
134
 
29
135
  ### Changed
136
+ - The public npm distribution name is the unscoped `opencode-agent-skill`, so users install it with `npm install -g opencode-agent-skill`.
30
137
  - Live evaluation runs are asynchronous and observable: start messages, periodic heartbeats, hard timeout, idle timeout and Ctrl+C process-tree cancellation are supported.
31
138
  - V2 fresh task dispatch refreshes durable task leases while the executor session runs and reports task policy/runId alongside model policy.
32
139
  - Workspace fingerprints ignore UES runtime-only learning/dashboard/sandbox directories in addition to `.ues-work`.
33
140
  - Package version is 7.7.0.
34
141
 
35
142
  ### Fixed
143
+ - Packed global-install smoke derives the package install path from package metadata instead of assuming the former scoped npm name.
144
+ - The installer accepts the former `@laivannha0202/opencode-agent-skill` state owner as legacy UES ownership and re-owns it as `opencode-agent-skill` during the next install.
36
145
  - Live baseline/UES evaluation detects the OpenCode major version: OpenCode 1.x omits the V2-only `--standalone` flag, while OpenCode 2.x+ keeps it. Eval JSON records the detected OpenCode version/major for reproducibility.
37
146
  - The V2 automatic router retains domain/impact skills and `ues-engineering-orchestrator` ahead of generic process skills when the configured skill cap is exceeded.
38
147