opencode-agent-orchestration-kit 1.0.27

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 (236) hide show
  1. package/.github/CODEOWNERS +1 -0
  2. package/.github/ISSUE_TEMPLATE/bug_report.yml +65 -0
  3. package/.github/ISSUE_TEMPLATE/config.yml +11 -0
  4. package/.github/ISSUE_TEMPLATE/documentation.yml +22 -0
  5. package/.github/ISSUE_TEMPLATE/feature_request.yml +43 -0
  6. package/.github/PULL_REQUEST_TEMPLATE.md +25 -0
  7. package/.github/workflows/check.yml +47 -0
  8. package/CODE_OF_CONDUCT.md +24 -0
  9. package/CONTRIBUTING.md +52 -0
  10. package/LICENSE +201 -0
  11. package/NOTICE.md +23 -0
  12. package/README.md +806 -0
  13. package/SECURITY.md +17 -0
  14. package/docker/open-design/.env.example +6 -0
  15. package/docker/open-design/Dockerfile +50 -0
  16. package/docker/open-design/docker-compose.yml +18 -0
  17. package/docker/open-design/opencode-od/agents/od-worker.md +22 -0
  18. package/docker/open-design/opencode-od/opencode.json +24 -0
  19. package/docs/agents.md +21 -0
  20. package/docs/commands.md +16 -0
  21. package/docs/configuration.md +30 -0
  22. package/docs/docker-open-design.md +42 -0
  23. package/docs/impeccable.md +18 -0
  24. package/docs/installation.md +176 -0
  25. package/docs/models.md +17 -0
  26. package/docs/open-design.md +25 -0
  27. package/docs/quickstart.md +74 -0
  28. package/docs/releases/v1.0.10.md +46 -0
  29. package/docs/releases/v1.0.14.md +39 -0
  30. package/docs/releases/v1.0.27.md +66 -0
  31. package/docs/security.md +8 -0
  32. package/docs/superpowers/plans/2026-07-20-safe-installation-lifecycle.md +779 -0
  33. package/docs/superpowers/plans/2026-07-20-version-identity-and-releases.md +590 -0
  34. package/docs/superpowers/specs/2026-07-20-safe-installation-lifecycle-design.md +1350 -0
  35. package/docs/superpowers/specs/2026-07-20-version-identity-and-releases-design.md +557 -0
  36. package/docs/superpowers.md +34 -0
  37. package/docs/synology.md +30 -0
  38. package/docs/troubleshooting.md +54 -0
  39. package/docs/workflows.md +44 -0
  40. package/doctor.sh +5 -0
  41. package/env.example +15 -0
  42. package/install.sh +5 -0
  43. package/opencode/AGENTS.md +104 -0
  44. package/opencode/agents/debugger.md +41 -0
  45. package/opencode/agents/designer.md +93 -0
  46. package/opencode/agents/developer.md +180 -0
  47. package/opencode/agents/evaluator.md +35 -0
  48. package/opencode/agents/evolver.md +31 -0
  49. package/opencode/agents/lead.md +251 -0
  50. package/opencode/agents/researcher.md +76 -0
  51. package/opencode/agents/review_api.md +34 -0
  52. package/opencode/agents/review_coordinator.md +111 -0
  53. package/opencode/agents/review_quality.md +35 -0
  54. package/opencode/agents/review_security.md +35 -0
  55. package/opencode/agents/review_tests.md +37 -0
  56. package/opencode/agents/reviewer.md +116 -0
  57. package/opencode/agents/scoper.md +75 -0
  58. package/opencode/agents/specifier.md +116 -0
  59. package/opencode/commands/code-simplify.md +36 -0
  60. package/opencode/commands/design.md +27 -0
  61. package/opencode/commands/evolve.md +165 -0
  62. package/opencode/commands/feature.md +67 -0
  63. package/opencode/commands/implement.md +11 -0
  64. package/opencode/commands/init.md +34 -0
  65. package/opencode/commands/loop.md +145 -0
  66. package/opencode/commands/mvp-spec.md +20 -0
  67. package/opencode/commands/plan.md +74 -0
  68. package/opencode/commands/research.md +12 -0
  69. package/opencode/commands/review-orchestrated.md +47 -0
  70. package/opencode/commands/review-preflight.md +26 -0
  71. package/opencode/commands/review.md +18 -0
  72. package/opencode/commands/scope.md +36 -0
  73. package/opencode/commands/spec.md +12 -0
  74. package/opencode/commands/test.md +40 -0
  75. package/opencode/docs/ai/evolution/README.md +135 -0
  76. package/opencode/docs/ai/evolution/benchmarks/manual-scenarios.md +123 -0
  77. package/opencode/docs/ai/evolution/benchmarks/router-scenarios.jsonl +8 -0
  78. package/opencode/docs/ai/evolution/evolution_history.md +83 -0
  79. package/opencode/docs/ai/evolution/mechanisms.jsonl +7 -0
  80. package/opencode/docs/ai/evolution/rejected_mechanisms.jsonl +2 -0
  81. package/opencode/docs/ai/evolution/runs/README.md +15 -0
  82. package/opencode/docs/ai/evolution/runs/iteration-001-sidecar/analysis/overview.md +12 -0
  83. package/opencode/docs/ai/evolution/runs/iteration-001-sidecar/change_evaluation.json +108 -0
  84. package/opencode/docs/ai/evolution/runs/iteration-001-sidecar/change_manifest.json +52 -0
  85. package/opencode/docs/ai/evolution/runs/iteration-001-sidecar/evaluation.md +19 -0
  86. package/opencode/docs/ai/evolution/runs/iteration-001-sidecar/post_evaluation.md +12 -0
  87. package/opencode/docs/ai/evolution/runs/iteration-002-feature-flow-fix/analysis/overview.md +7 -0
  88. package/opencode/docs/ai/evolution/runs/iteration-002-feature-flow-fix/change_evaluation.json +31 -0
  89. package/opencode/docs/ai/evolution/runs/iteration-002-feature-flow-fix/evaluation.md +19 -0
  90. package/opencode/docs/ai/evolution/runs/iteration-003-agent-readable-harness/analysis/overview.md +13 -0
  91. package/opencode/docs/ai/evolution/runs/iteration-003-agent-readable-harness/change_evaluation.json +66 -0
  92. package/opencode/docs/ai/evolution/runs/iteration-003-agent-readable-harness/change_manifest.json +82 -0
  93. package/opencode/docs/ai/evolution/runs/iteration-003-agent-readable-harness/evaluation.md +20 -0
  94. package/opencode/docs/ai/evolution/runs/iteration-004-orchestration-audit/analysis/detail/ahe-run-lifecycle-validator.md +40 -0
  95. package/opencode/docs/ai/evolution/runs/iteration-004-orchestration-audit/analysis/detail/evolve-evaluation-only-contract.md +15 -0
  96. package/opencode/docs/ai/evolution/runs/iteration-004-orchestration-audit/analysis/detail/open-design-tool-contract.md +14 -0
  97. package/opencode/docs/ai/evolution/runs/iteration-004-orchestration-audit/analysis/detail/slash-command-contract-coverage.md +40 -0
  98. package/opencode/docs/ai/evolution/runs/iteration-004-orchestration-audit/analysis/overview.md +17 -0
  99. package/opencode/docs/ai/evolution/runs/iteration-004-orchestration-audit/analysis/pre_apply_approval.md +15 -0
  100. package/opencode/docs/ai/evolution/runs/iteration-004-orchestration-audit/change_evaluation.json +252 -0
  101. package/opencode/docs/ai/evolution/runs/iteration-004-orchestration-audit/change_manifest.json +210 -0
  102. package/opencode/docs/ai/evolution/runs/iteration-004-orchestration-audit/evaluation.md +25 -0
  103. package/opencode/docs/ai/evolution/runs/iteration-004-orchestration-audit/post_apply_evaluation.md +15 -0
  104. package/opencode/docs/ai/evolution/runs/iteration-004-orchestration-audit/post_manifest_evaluation.md +14 -0
  105. package/opencode/docs/ai/evolution/runs/iteration-004-orchestration-audit/pre_apply_evaluation.md +15 -0
  106. package/opencode/docs/ai/evolution/runs/iteration-005-harness-orchestration-audit/analysis/overview.md +13 -0
  107. package/opencode/docs/ai/evolution/runs/iteration-005-harness-orchestration-audit/change_evaluation.json +14 -0
  108. package/opencode/docs/ai/evolution/runs/iteration-005-harness-orchestration-audit/change_manifest.json +30 -0
  109. package/opencode/docs/ai/evolution/runs/iteration-005-harness-orchestration-audit/evaluation.md +25 -0
  110. package/opencode/docs/ai/evolution/runs/iteration-006-lead-delegation-audit/analysis/overview.md +13 -0
  111. package/opencode/docs/ai/evolution/runs/iteration-006-lead-delegation-audit/change_evaluation.json +14 -0
  112. package/opencode/docs/ai/evolution/runs/iteration-006-lead-delegation-audit/change_manifest.json +29 -0
  113. package/opencode/docs/ai/evolution/runs/iteration-006-lead-delegation-audit/evaluation.md +18 -0
  114. package/opencode/docs/ai/evolution/runs/iteration-007-agent-skills-integration/analysis/overview.md +13 -0
  115. package/opencode/docs/ai/evolution/runs/iteration-007-agent-skills-integration/change_evaluation.json +14 -0
  116. package/opencode/docs/ai/evolution/runs/iteration-007-agent-skills-integration/change_manifest.json +34 -0
  117. package/opencode/docs/ai/evolution/runs/iteration-007-agent-skills-integration/evaluation.md +17 -0
  118. package/opencode/docs/ai/evolution/runs/iteration-008-lead-readonly-shell-permissions/analysis/overview.md +13 -0
  119. package/opencode/docs/ai/evolution/runs/iteration-008-lead-readonly-shell-permissions/change_evaluation.json +12 -0
  120. package/opencode/docs/ai/evolution/runs/iteration-008-lead-readonly-shell-permissions/change_manifest.json +28 -0
  121. package/opencode/docs/ai/evolution/runs/iteration-008-lead-readonly-shell-permissions/evaluation.md +17 -0
  122. package/opencode/docs/ai/evolution/runs/iteration-009-lead-developer-ownership-loop/analysis/overview.md +9 -0
  123. package/opencode/docs/ai/evolution/runs/iteration-009-lead-developer-ownership-loop/change_evaluation.json +14 -0
  124. package/opencode/docs/ai/evolution/runs/iteration-009-lead-developer-ownership-loop/change_manifest.json +31 -0
  125. package/opencode/docs/ai/evolution/runs/iteration-009-lead-developer-ownership-loop/evaluation.md +18 -0
  126. package/opencode/docs/ai/evolution/runs/iteration-010-token-plugin-sidebar-content/analysis/overview.md +12 -0
  127. package/opencode/docs/ai/evolution/runs/iteration-010-token-plugin-sidebar-content/change_evaluation.json +14 -0
  128. package/opencode/docs/ai/evolution/runs/iteration-010-token-plugin-sidebar-content/change_manifest.json +31 -0
  129. package/opencode/docs/ai/evolution/runs/iteration-010-token-plugin-sidebar-content/evaluation.md +17 -0
  130. package/opencode/docs/ai/evolution/runs/iteration-011-lead-cd-which-permissions/analysis/overview.md +10 -0
  131. package/opencode/docs/ai/evolution/runs/iteration-011-lead-cd-which-permissions/change_evaluation.json +14 -0
  132. package/opencode/docs/ai/evolution/runs/iteration-011-lead-cd-which-permissions/change_manifest.json +30 -0
  133. package/opencode/docs/ai/evolution/runs/iteration-011-lead-cd-which-permissions/evaluation.md +17 -0
  134. package/opencode/docs/ai/evolution/runs/iteration-012-lead-shell-allowlist-boundaries/analysis/overview.md +25 -0
  135. package/opencode/docs/ai/evolution/runs/iteration-012-lead-shell-allowlist-boundaries/change_evaluation.json +28 -0
  136. package/opencode/docs/ai/evolution/runs/iteration-012-lead-shell-allowlist-boundaries/change_manifest.json +31 -0
  137. package/opencode/docs/ai/evolution/runs/iteration-012-lead-shell-allowlist-boundaries/evaluation.md +22 -0
  138. package/opencode/docs/ai/evolution/runs/iteration-013-doc-gardening-mechanical-checks/analysis/overview.md +27 -0
  139. package/opencode/docs/ai/evolution/runs/iteration-013-doc-gardening-mechanical-checks/change_evaluation.json +32 -0
  140. package/opencode/docs/ai/evolution/runs/iteration-013-doc-gardening-mechanical-checks/change_manifest.json +49 -0
  141. package/opencode/docs/ai/evolution/runs/iteration-013-doc-gardening-mechanical-checks/evaluation.md +92 -0
  142. package/opencode/docs/ai/evolution/runs/iteration-014-harness-baseline/analysis/detail/token-vs-semantic.md +31 -0
  143. package/opencode/docs/ai/evolution/runs/iteration-014-harness-baseline/analysis/overview.md +14 -0
  144. package/opencode/docs/ai/evolution/runs/iteration-014-harness-baseline/evaluation.md +36 -0
  145. package/opencode/docs/ai/evolution/runs/iteration-015-semantic-checker/analysis/overview.md +13 -0
  146. package/opencode/docs/ai/evolution/runs/iteration-015-semantic-checker/change_evaluation.json +31 -0
  147. package/opencode/docs/ai/evolution/runs/iteration-015-semantic-checker/change_manifest.json +47 -0
  148. package/opencode/docs/ai/evolution/runs/iteration-015-semantic-checker/evaluation.md +27 -0
  149. package/opencode/docs/ai/evolution/runs/iteration-016-contract-prompt-alignment/analysis/overview.md +32 -0
  150. package/opencode/docs/ai/evolution/runs/iteration-016-contract-prompt-alignment/change_evaluation.json +31 -0
  151. package/opencode/docs/ai/evolution/runs/iteration-016-contract-prompt-alignment/change_manifest.json +35 -0
  152. package/opencode/docs/ai/evolution/runs/iteration-016-contract-prompt-alignment/evaluation.md +31 -0
  153. package/opencode/docs/ai/evolution/runs/iteration-017-ahe-cycle/analysis/detail/pattern-1-feature-sidecar-false-positive.md +51 -0
  154. package/opencode/docs/ai/evolution/runs/iteration-017-ahe-cycle/analysis/detail/pattern-2-checker-time-budget.md +52 -0
  155. package/opencode/docs/ai/evolution/runs/iteration-017-ahe-cycle/analysis/overview.md +99 -0
  156. package/opencode/docs/ai/evolution/runs/iteration-017-ahe-cycle/change_evaluation.json +61 -0
  157. package/opencode/docs/ai/evolution/runs/iteration-017-ahe-cycle/change_manifest.json +61 -0
  158. package/opencode/docs/ai/evolution/runs/iteration-017-ahe-cycle/evaluation.md +448 -0
  159. package/opencode/docs/ai/evolution/runs/iteration-018-free-message-routing-audit/analysis/detail/intake-gray-zone.md +65 -0
  160. package/opencode/docs/ai/evolution/runs/iteration-018-free-message-routing-audit/analysis/overview.md +172 -0
  161. package/opencode/docs/ai/evolution/runs/iteration-018-free-message-routing-audit/evaluation.md +226 -0
  162. package/opencode/docs/ai/evolution/runs/iteration-019-handoff-routing-audit/analysis/detail/plan-only-gray-zone.md +62 -0
  163. package/opencode/docs/ai/evolution/runs/iteration-019-handoff-routing-audit/analysis/overview.md +167 -0
  164. package/opencode/docs/ai/evolution/runs/iteration-019-handoff-routing-audit/evaluation.md +163 -0
  165. package/opencode/docs/ai/evolution/runs/iteration-020-loop-engineering-command/analysis/overview.md +42 -0
  166. package/opencode/docs/ai/evolution/runs/iteration-020-loop-engineering-command/change_evaluation.json +46 -0
  167. package/opencode/docs/ai/evolution/runs/iteration-020-loop-engineering-command/change_manifest.json +57 -0
  168. package/opencode/docs/ai/evolution/runs/iteration-020-loop-engineering-command/evaluation.md +48 -0
  169. package/opencode/docs/ai/evolution/runs/iteration-021/analysis/detail/contract-vs-runtime-gap.md +163 -0
  170. package/opencode/docs/ai/evolution/runs/iteration-021/analysis/detail/evidence-collection-blocker.md +134 -0
  171. package/opencode/docs/ai/evolution/runs/iteration-021/analysis/overview.md +111 -0
  172. package/opencode/docs/ai/evolution/runs/iteration-021/change_evaluation.json +52 -0
  173. package/opencode/docs/ai/evolution/runs/iteration-021/change_manifest.json +50 -0
  174. package/opencode/docs/ai/evolution/runs/iteration-021/evaluation.md +46 -0
  175. package/opencode/docs/ai/evolution/runs/iteration-021/manifest-justification.md +48 -0
  176. package/opencode/docs/ai/evolution/session-sources.md +91 -0
  177. package/opencode/docs/ai/harness/README.md +32 -0
  178. package/opencode/docs/ai/harness/agents.md +148 -0
  179. package/opencode/docs/ai/harness/checks.md +119 -0
  180. package/opencode/docs/ai/harness/commands.md +391 -0
  181. package/opencode/docs/ai/harness/evidence.md +85 -0
  182. package/opencode/docs/ai/harness/init-detection-rules.md +160 -0
  183. package/opencode/docs/ai/harness/orchestrated-review.md +131 -0
  184. package/opencode/docs/ai/harness/skill-metadata-schema.md +198 -0
  185. package/opencode/docs/ai/harness/skill-resolution.md +202 -0
  186. package/opencode/docs/ai/harness/skill_registry.json +443 -0
  187. package/opencode/docs/ai/harness/skill_registry.md +43 -0
  188. package/opencode/docs/ai/project-context-template.md +53 -0
  189. package/opencode/opencode.json +38 -0
  190. package/opencode/package-lock.json +1717 -0
  191. package/opencode/package.json +11 -0
  192. package/opencode/plugins/token-tree-usage.tsx +206 -0
  193. package/opencode/references/performance-checklist.md +153 -0
  194. package/opencode/references/security-checklist.md +134 -0
  195. package/opencode/references/testing-patterns.md +236 -0
  196. package/opencode/scripts/check-harness.mjs +1572 -0
  197. package/opencode/scripts/check-harness.test.mjs +820 -0
  198. package/opencode/scripts/collect-session-evidence.mjs +612 -0
  199. package/opencode/scripts/collect-session-evidence.test.mjs +443 -0
  200. package/opencode/scripts/preflight-audit.mjs +497 -0
  201. package/opencode/scripts/preflight-audit.test.mjs +363 -0
  202. package/opencode/scripts/project-capability-snapshot.mjs +407 -0
  203. package/opencode/scripts/project-capability-snapshot.test.mjs +382 -0
  204. package/opencode/scripts/review-orchestrated-prepare.mjs +547 -0
  205. package/opencode/scripts/review-orchestrated-prepare.test.mjs +516 -0
  206. package/opencode/scripts/skill-resolver.mjs +585 -0
  207. package/opencode/scripts/skill-resolver.test.mjs +781 -0
  208. package/opencode/scripts/update-skill-registry.mjs +380 -0
  209. package/opencode/skills/api-and-interface-design/SKILL.md +315 -0
  210. package/opencode/skills/autonomous-loops/SKILL.md +312 -0
  211. package/opencode/skills/code-review-and-quality/SKILL.md +365 -0
  212. package/opencode/skills/code-simplification/SKILL.md +345 -0
  213. package/opencode/skills/context-engineering/SKILL.md +252 -0
  214. package/opencode/skills/debugging-and-error-recovery/SKILL.md +316 -0
  215. package/opencode/skills/documentation-and-adrs/SKILL.md +298 -0
  216. package/opencode/skills/doubt-driven-development/SKILL.md +168 -0
  217. package/opencode/skills/iterative-retrieval/SKILL.md +232 -0
  218. package/opencode/skills/open-design/SKILL.md +123 -0
  219. package/opencode/skills/performance-optimization/SKILL.md +365 -0
  220. package/opencode/skills/security-and-hardening/SKILL.md +369 -0
  221. package/opencode/skills/source-driven-development/SKILL.md +210 -0
  222. package/opencode/skills/test-driven-development/SKILL.md +406 -0
  223. package/opencode/skills/using-agent-skills/SKILL.md +194 -0
  224. package/opencode/skills/verification-loop/SKILL.md +162 -0
  225. package/opencode/tools/open_design.ts +361 -0
  226. package/opencode/tui.json +5 -0
  227. package/package.json +20 -0
  228. package/rollback.sh +5 -0
  229. package/scripts/check.sh +184 -0
  230. package/scripts/install-smoke.sh +111 -0
  231. package/scripts/manage-installation.mjs +1498 -0
  232. package/scripts/manage-installation.test.mjs +1936 -0
  233. package/scripts/version.mjs +197 -0
  234. package/scripts/version.test.mjs +195 -0
  235. package/uninstall.sh +5 -0
  236. package/upgrade.sh +5 -0
@@ -0,0 +1,184 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ root="$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)"
5
+ cd "$root"
6
+
7
+ kit_version="$(node -p "require('./package.json').version")"
8
+
9
+ required_files="
10
+ README.md
11
+ LICENSE
12
+ NOTICE.md
13
+ SECURITY.md
14
+ .gitignore
15
+ env.example
16
+ install.sh
17
+ uninstall.sh
18
+ upgrade.sh
19
+ doctor.sh
20
+ rollback.sh
21
+ package.json
22
+ scripts/version.mjs
23
+ scripts/version.test.mjs
24
+ scripts/manage-installation.mjs
25
+ scripts/manage-installation.test.mjs
26
+ docs/releases/v${kit_version}.md
27
+ opencode/AGENTS.md
28
+ opencode/opencode.json
29
+ opencode/tui.json
30
+ opencode/.gitignore
31
+ opencode/package.json
32
+ opencode/package-lock.json
33
+ opencode/plugins/token-tree-usage.tsx
34
+ opencode/tools/open_design.ts
35
+ opencode/scripts/check-harness.mjs
36
+ opencode/commands/loop.md
37
+ opencode/commands/plan.md
38
+ opencode/commands/test.md
39
+ opencode/commands/code-simplify.md
40
+ opencode/docs/ai/harness/README.md
41
+ opencode/docs/ai/harness/agents.md
42
+ opencode/docs/ai/harness/commands.md
43
+ opencode/docs/ai/harness/evidence.md
44
+ opencode/docs/ai/harness/checks.md
45
+ opencode/docs/ai/evolution/README.md
46
+ opencode/docs/ai/evolution/evolution_history.md
47
+ opencode/docs/ai/evolution/mechanisms.jsonl
48
+ opencode/docs/ai/evolution/rejected_mechanisms.jsonl
49
+ opencode/docs/ai/evolution/benchmarks/manual-scenarios.md
50
+ opencode/docs/ai/evolution/benchmarks/router-scenarios.jsonl
51
+ docker/open-design/Dockerfile
52
+ docker/open-design/docker-compose.yml
53
+ docker/open-design/.env.example
54
+ docker/open-design/opencode-od/opencode.json
55
+ CODE_OF_CONDUCT.md
56
+ CONTRIBUTING.md
57
+ .github/PULL_REQUEST_TEMPLATE.md
58
+ .github/CODEOWNERS
59
+ .github/workflows/check.yml
60
+ .github/ISSUE_TEMPLATE/config.yml
61
+ .github/ISSUE_TEMPLATE/bug_report.yml
62
+ .github/ISSUE_TEMPLATE/feature_request.yml
63
+ .github/ISSUE_TEMPLATE/documentation.yml
64
+ "
65
+
66
+ for file in $required_files; do
67
+ test -f "$file" || { echo "Missing required file: $file" >&2; exit 1; }
68
+ done
69
+
70
+ for file in install.sh uninstall.sh upgrade.sh doctor.sh rollback.sh scripts/check.sh; do
71
+ test -x "$file" || { echo "Not executable: $file" >&2; exit 1; }
72
+ done
73
+
74
+ node scripts/version.mjs --check
75
+
76
+ node -e "JSON.parse(require('fs').readFileSync('opencode/opencode.json','utf8')); JSON.parse(require('fs').readFileSync('docker/open-design/opencode-od/opencode.json','utf8')); console.log('json ok')"
77
+ (cd opencode && node scripts/check-harness.mjs)
78
+
79
+ node <<'NODE'
80
+ const fs = require('fs')
81
+ const path = require('path')
82
+ for (const dir of ['opencode/agents', 'opencode/commands', ...fs.readdirSync('opencode/skills').map((name) => path.join('opencode/skills', name))]) {
83
+ for (const file of fs.readdirSync(dir).filter((name) => name.endsWith('.md'))) {
84
+ const full = path.join(dir, file)
85
+ const text = fs.readFileSync(full, 'utf8')
86
+ if (!text.startsWith('---\n')) throw new Error(`${full} missing frontmatter start`)
87
+ if (text.indexOf('\n---\n', 4) === -1) throw new Error(`${full} missing frontmatter end`)
88
+ }
89
+ }
90
+ console.log('frontmatter ok')
91
+ NODE
92
+
93
+ grep -q 'superpowers@git+https://github.com/obra/superpowers.git' opencode/opencode.json
94
+ grep -q '"default_agent": "lead"' opencode/opencode.json
95
+ grep -q './plugins/token-tree-usage.tsx' opencode/tui.json
96
+
97
+ grep -q 'Open Design' README.md
98
+ grep -q 'Superpowers' README.md
99
+ grep -q 'Impeccable' README.md
100
+
101
+ grep -q '"open-design": allow' opencode/agents/designer.md
102
+ grep -q '"impeccable": allow' opencode/agents/designer.md
103
+ grep -q '"superpowers"' opencode/agents/designer.md && { echo 'designer should not allow superpowers' >&2; exit 1; } || true
104
+ grep -q 'mode: all' opencode/agents/developer.md
105
+ grep -q 'Direct mode without slash commands' opencode/agents/developer.md
106
+ grep -q 'Default behavior without slash commands' opencode/agents/lead.md
107
+ grep -q 'fast router' opencode/agents/lead.md
108
+ grep -q 'Ask the user' opencode/agents/lead.md
109
+ grep -q 'edit: deny' opencode/agents/lead.md
110
+ grep -Fq '"cd *": allow' opencode/agents/lead.md
111
+ grep -Fq '"which *": allow' opencode/agents/lead.md
112
+
113
+ grep -q 'researcher: allow' opencode/agents/scoper.md
114
+ grep -q 'specifier: allow' opencode/agents/scoper.md
115
+ ! grep -q 'developer: allow' opencode/agents/scoper.md
116
+ ! grep -q 'designer: allow' opencode/agents/scoper.md
117
+
118
+ grep -q 'Never invoke `developer` before' opencode/agents/lead.md
119
+ grep -q 'Never invoke `reviewer` before' opencode/agents/lead.md
120
+ grep -q 'agent: lead' opencode/commands/feature.md
121
+ grep -q 'agent: lead' opencode/commands/plan.md
122
+ grep -q 'approval_gate: explicit_before_writes' opencode/commands/loop.md
123
+ grep -q 'max_iterations_per_invocation: 3' opencode/commands/loop.md
124
+ grep -q 'completion_authority: reviewer_only' opencode/commands/loop.md
125
+ grep -q 'agent: scoper' opencode/commands/scope.md
126
+ grep -q 'agent: designer' opencode/commands/design.md
127
+ grep -q 'agent: developer' opencode/commands/test.md
128
+ grep -q 'agent: developer' opencode/commands/code-simplify.md
129
+ grep -q 'evaluator' opencode/commands/evolve.md
130
+ grep -q 'debugger' opencode/commands/evolve.md
131
+ grep -q 'evolver' opencode/commands/evolve.md
132
+
133
+ grep -q 'OPEN_DESIGN_URL' opencode/tools/open_design.ts
134
+ grep -q 'baseUrl: tool.schema.string().optional()' opencode/tools/open_design.ts
135
+ ! grep -q 'randomUUID' opencode/tools/open_design.ts
136
+ ! grep -q 'from "node:crypto"' opencode/tools/open_design.ts
137
+
138
+ node <<'NODE'
139
+ const fs = require('fs')
140
+ const rootPackage = JSON.parse(fs.readFileSync('package.json', 'utf8'))
141
+ if (rootPackage.dependencies?.['@opencode-ai/plugin']) {
142
+ throw new Error('package.json should not carry @opencode-ai/plugin; keep it scoped to opencode/package.json')
143
+ }
144
+
145
+ const opencodePackage = JSON.parse(fs.readFileSync('opencode/package.json', 'utf8'))
146
+ if (opencodePackage.dependencies?.['@opencode-ai/plugin'] !== '1.14.41') {
147
+ throw new Error('opencode/package.json must pin @opencode-ai/plugin to 1.14.41')
148
+ }
149
+ if (opencodePackage.dependencies?.['@opentui/core'] !== '0.2.5') {
150
+ throw new Error('opencode/package.json must pin @opentui/core to 0.2.5')
151
+ }
152
+ if (opencodePackage.dependencies?.['@opentui/solid'] !== '0.2.5') {
153
+ throw new Error('opencode/package.json must pin @opentui/solid to 0.2.5')
154
+ }
155
+ if (opencodePackage.dependencies?.['solid-js'] !== '1.9.12') {
156
+ throw new Error('opencode/package.json must pin solid-js to 1.9.12')
157
+ }
158
+ if (opencodePackage.overrides?.uuid !== '^14.0.0') {
159
+ throw new Error('opencode/package.json must override uuid to ^14.0.0')
160
+ }
161
+ NODE
162
+
163
+ grep -q 'Lead' opencode/plugins/token-tree-usage.tsx
164
+ grep -q 'Subagents' opencode/plugins/token-tree-usage.tsx
165
+ grep -q 'Partial total' opencode/plugins/token-tree-usage.tsx
166
+
167
+ private_re="$(printf '%s|%s|%s|%s' '/''Users/' 'synology''\\.me' 'auth''\\.json' 'OPENAI''_API_KEY')"
168
+ if grep -R -nE "$private_re" . \
169
+ --exclude-dir=.git \
170
+ --exclude-dir=node_modules \
171
+ --exclude='.git' \
172
+ --exclude='check.sh' \
173
+ --exclude='.gitignore'; then
174
+ echo 'Potential private data found' >&2
175
+ exit 1
176
+ fi
177
+
178
+ grep -q 'Apache License' LICENSE
179
+ grep -q 'OpenCode' NOTICE.md
180
+ grep -q 'Open Design' NOTICE.md
181
+ grep -q 'Impeccable' NOTICE.md
182
+ grep -q 'Superpowers' NOTICE.md
183
+
184
+ echo 'check ok'
@@ -0,0 +1,111 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ root="$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)"
5
+ smoke_parent="${TMPDIR:-/tmp}"
6
+ smoke_parent="${smoke_parent%/}"
7
+ smoke_root="$(mktemp -d "$smoke_parent/oak-install-smoke.XXXXXX")"
8
+ target="$smoke_root/opencode"
9
+
10
+ cleanup() {
11
+ case "$smoke_root" in
12
+ "$smoke_parent"/oak-install-smoke.*) rm -rf -- "$smoke_root" ;;
13
+ *) echo "Refusing unsafe smoke cleanup: $smoke_root" >&2; return 1 ;;
14
+ esac
15
+ }
16
+ trap cleanup EXIT
17
+
18
+ cd "$root"
19
+ expected_version="$(node -p "require('./package.json').version")"
20
+ expected_line="opencode-agent-orchestration-kit $expected_version"
21
+
22
+ for wrapper in install.sh upgrade.sh doctor.sh uninstall.sh rollback.sh; do
23
+ test "$("./$wrapper" --version)" = "$expected_line"
24
+ done
25
+
26
+ node --input-type=module - "$root/opencode" "$target" <<'NODE'
27
+ import { createInstallationManager } from "./scripts/manage-installation.mjs"
28
+ const [, , sourceRoot, targetRoot] = process.argv
29
+ const result = await createInstallationManager({
30
+ sourceRoot,
31
+ versionProvider: () => "1.0.26",
32
+ }).run("install", { targetRoot })
33
+ if (result.exitCode !== 0) throw result.error ?? new Error("smoke install failed")
34
+ NODE
35
+
36
+ test -f "$target/AGENTS.md"
37
+ test -f "$target/opencode.json"
38
+ test -f "$target/scripts/check-harness.mjs"
39
+ test -f "$target/.oak/manifest.json"
40
+ test -f "$target/.oak/rollback/transaction.json"
41
+
42
+ node --input-type=module - "$target" <<'NODE'
43
+ import fs from "node:fs"
44
+ import path from "node:path"
45
+ const target = process.argv[2]
46
+ const manifest = JSON.parse(fs.readFileSync(path.join(target, ".oak", "manifest.json"), "utf8"))
47
+ const rollback = JSON.parse(fs.readFileSync(path.join(target, ".oak", "rollback", "transaction.json"), "utf8"))
48
+ if (manifest.kit_version !== "1.0.26") throw new Error("initial manifest version mismatch")
49
+ if (rollback.previous_manifest !== null || rollback.next_manifest?.kit_version !== "1.0.26") {
50
+ throw new Error("initial rollback snapshot version mismatch")
51
+ }
52
+ NODE
53
+
54
+ manifest_before="$(shasum -a 256 "$target/.oak/manifest.json" | awk '{print $1}')"
55
+ ./upgrade.sh --dry-run --target "$target" >/dev/null
56
+ manifest_after="$(shasum -a 256 "$target/.oak/manifest.json" | awk '{print $1}')"
57
+ test "$manifest_before" = "$manifest_after"
58
+
59
+ ./upgrade.sh --target "$target" >/dev/null
60
+ node --input-type=module - "$target" "$expected_version" <<'NODE'
61
+ import fs from "node:fs"
62
+ import path from "node:path"
63
+ const [, , target, expected] = process.argv
64
+ const manifest = JSON.parse(fs.readFileSync(path.join(target, ".oak", "manifest.json"), "utf8"))
65
+ const rollback = JSON.parse(fs.readFileSync(path.join(target, ".oak", "rollback", "transaction.json"), "utf8"))
66
+ if (manifest.kit_version !== expected) throw new Error("upgraded manifest version mismatch")
67
+ if (rollback.previous_manifest?.kit_version !== "1.0.26" || rollback.next_manifest?.kit_version !== expected) {
68
+ throw new Error("upgrade snapshot version mismatch")
69
+ }
70
+ NODE
71
+
72
+ ./uninstall.sh --yes --target "$target" >/dev/null
73
+ test ! -e "$target/AGENTS.md"
74
+ test ! -e "$target/.oak/manifest.json"
75
+ test -f "$target/.oak/rollback/transaction.json"
76
+
77
+ node --input-type=module - "$target" "$expected_version" <<'NODE'
78
+ import fs from "node:fs"
79
+ import path from "node:path"
80
+ const [, , target, expected] = process.argv
81
+ const rollback = JSON.parse(fs.readFileSync(path.join(target, ".oak", "rollback", "transaction.json"), "utf8"))
82
+ if (rollback.previous_manifest?.kit_version !== expected || rollback.next_manifest !== null) {
83
+ throw new Error("uninstall snapshot version mismatch")
84
+ }
85
+ NODE
86
+
87
+ ./rollback.sh --target "$target" >/dev/null
88
+ test -f "$target/AGENTS.md"
89
+ test -f "$target/.oak/manifest.json"
90
+ node --input-type=module - "$target" "$expected_version" <<'NODE'
91
+ import fs from "node:fs"
92
+ import path from "node:path"
93
+ const [, , target, expected] = process.argv
94
+ const manifest = JSON.parse(fs.readFileSync(path.join(target, ".oak", "manifest.json"), "utf8"))
95
+ if (manifest.kit_version !== expected) throw new Error("rollback-restored manifest version mismatch")
96
+ NODE
97
+ ./doctor.sh --target "$target" | grep -q 'doctor: current'
98
+
99
+ if find "$smoke_root" -maxdepth 1 -name "$(basename "$target").backup.*" -print -quit | grep -q .; then
100
+ echo "Unexpected sibling backup directory" >&2
101
+ exit 1
102
+ fi
103
+
104
+ (
105
+ cd "$target"
106
+ npm ci
107
+ node scripts/check-harness.mjs
108
+ node --input-type=module -e "import('@opencode-ai/plugin').then(() => console.log('installed plugin import ok'))"
109
+ )
110
+
111
+ echo "installation smoke ok"