@frankzhang2026/opencode-android-orchestrator 0.6.1 → 0.8.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 (77) hide show
  1. package/CHANGELOG.md +28 -1
  2. package/README.md +81 -22
  3. package/THIRD_PARTY_NOTICES.md +15 -11
  4. package/dist/cli.js +2 -0
  5. package/dist/cli.js.map +1 -1
  6. package/dist/config/verification-policy.d.ts +20 -0
  7. package/dist/config/verification-policy.d.ts.map +1 -0
  8. package/dist/config/verification-policy.js +59 -0
  9. package/dist/config/verification-policy.js.map +1 -0
  10. package/dist/doctor/installation.d.ts.map +1 -1
  11. package/dist/doctor/installation.js +46 -3
  12. package/dist/doctor/installation.js.map +1 -1
  13. package/dist/index.d.ts +2 -2
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +2 -2
  16. package/dist/index.js.map +1 -1
  17. package/dist/installer/adaptive-templates.d.ts +9 -6
  18. package/dist/installer/adaptive-templates.d.ts.map +1 -1
  19. package/dist/installer/adaptive-templates.js +13 -0
  20. package/dist/installer/adaptive-templates.js.map +1 -1
  21. package/dist/installer/index.d.ts +1 -1
  22. package/dist/installer/index.d.ts.map +1 -1
  23. package/dist/installer/index.js +1 -1
  24. package/dist/installer/index.js.map +1 -1
  25. package/dist/installer/init.d.ts +1 -1
  26. package/dist/installer/init.d.ts.map +1 -1
  27. package/dist/installer/init.js.map +1 -1
  28. package/dist/installer/install-manifest.d.ts.map +1 -1
  29. package/dist/installer/install-manifest.js +13 -1
  30. package/dist/installer/install-manifest.js.map +1 -1
  31. package/dist/installer/opencode-config.d.ts +3 -4
  32. package/dist/installer/opencode-config.d.ts.map +1 -1
  33. package/dist/installer/opencode-config.js +1 -3
  34. package/dist/installer/opencode-config.js.map +1 -1
  35. package/dist/installer/upgrade.d.ts.map +1 -1
  36. package/dist/installer/upgrade.js +34 -2
  37. package/dist/installer/upgrade.js.map +1 -1
  38. package/dist/plugin/index.d.ts +2 -0
  39. package/dist/plugin/index.d.ts.map +1 -1
  40. package/dist/plugin/index.js +32 -0
  41. package/dist/plugin/index.js.map +1 -1
  42. package/docs/MIGRATION.md +27 -10
  43. package/docs/SECURITY.md +24 -7
  44. package/docs/TROUBLESHOOTING.md +13 -6
  45. package/package.json +3 -1
  46. package/resources/third-party/superpowers-v6.2.0/LICENSE +21 -0
  47. package/resources/third-party/superpowers-v6.2.0/PROVENANCE.md +21 -0
  48. package/resources/third-party/superpowers-v6.2.0/skills/android-orchestrator-brainstorming/SKILL.md +43 -0
  49. package/resources/third-party/superpowers-v6.2.0/skills/android-orchestrator-systematic-debugging/SKILL.md +288 -0
  50. package/resources/third-party/superpowers-v6.2.0/skills/android-orchestrator-systematic-debugging/references/condition-based-waiting-example.ts +158 -0
  51. package/resources/third-party/superpowers-v6.2.0/skills/android-orchestrator-systematic-debugging/references/condition-based-waiting.md +115 -0
  52. package/resources/third-party/superpowers-v6.2.0/skills/android-orchestrator-systematic-debugging/references/defense-in-depth.md +122 -0
  53. package/resources/third-party/superpowers-v6.2.0/skills/android-orchestrator-systematic-debugging/references/root-cause-tracing.md +169 -0
  54. package/resources/third-party/superpowers-v6.2.0/skills/android-orchestrator-systematic-debugging/scripts/find-polluter.sh +72 -0
  55. package/resources/third-party/superpowers-v6.2.0/skills/android-orchestrator-test-driven-development/SKILL.md +327 -0
  56. package/resources/third-party/superpowers-v6.2.0/skills/android-orchestrator-test-driven-development/references/writing-good-tests.md +197 -0
  57. package/resources/third-party/superpowers-v6.2.0/skills/android-orchestrator-verification-before-completion/SKILL.md +125 -0
  58. package/resources/third-party/superpowers-v6.2.0/skills/android-orchestrator-writing-plans/SKILL.md +50 -0
  59. package/templates/.opencode/agents/scheduled-coder.md +3 -4
  60. package/templates/.opencode/agents/scheduled-planner.md +5 -5
  61. package/templates/.opencode/agents/scheduled-reviewer.md +1 -2
  62. package/templates/.opencode/skills/scheduled-quality-coder/SKILL.md +11 -9
  63. package/templates/.opencode/skills/scheduled-quality-orchestrator/SKILL.md +2 -1
  64. package/templates/.opencode/skills/scheduled-quality-reviewer/SKILL.md +4 -3
  65. package/templates/README.md +10 -3
  66. package/templates/automation/config.json +8 -9
  67. package/templates/automation/config.schema.json +6 -11
  68. package/templates/automation/task-contract.schema.json +7 -7
  69. package/templates/automation/tasks/TASK-TEMPLATE.json.example +6 -6
  70. package/templates/scripts/automation/claim-task.sh +23 -8
  71. package/templates/scripts/automation/lib.sh +37 -3
  72. package/templates/scripts/automation/orchestrate-task.sh +1 -1
  73. package/templates/scripts/automation/preflight.sh +0 -3
  74. package/templates/scripts/automation/tests/run-tests.sh +36 -15
  75. package/templates/scripts/automation/validate-contract.sh +7 -2
  76. package/templates/scripts/automation/verify-integration.sh +2 -9
  77. package/templates/scripts/automation/verify-task.sh +2 -9
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugin/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAMlD,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,2BAA2B,CAAC;AAGnC,eAAO,MAAM,0BAA0B,4CACI,CAAC;AAC5C,eAAO,MAAM,yBAAyB,2CACI,CAAC;AAE3C;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,gBAuBpC,CAAC;AAEF,sEAAsE;AACtE,eAAO,MAAM,yBAAyB,EAAE,MACyB,CAAC;AAElE,eAAe,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugin/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAMlD,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,2BAA2B,CAAC;AAGnC,eAAO,MAAM,0BAA0B,4CACI,CAAC;AAC5C,eAAO,MAAM,yBAAyB,2CACI,CAAC;AAC3C,eAAO,MAAM,wBAAwB,QAKpC,CAAC;AACF,eAAO,MAAM,iBAAiB,2OAMpB,CAAC;AAwBX;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,gBAgCpC,CAAC;AAEF,sEAAsE;AACtE,eAAO,MAAM,yBAAyB,EAAE,MACyB,CAAC;AAElE,eAAe,yBAAyB,CAAC"}
@@ -1,18 +1,50 @@
1
+ import { lstatSync } from "node:fs";
1
2
  import { resolve } from "node:path";
3
+ import { fileURLToPath } from "node:url";
2
4
  import { applyLongCommandTimeout, readLongCommandTimeoutMs, } from "../config/long-command-timeout.js";
3
5
  import { defineCompatibleHooks, toCompatiblePluginInput, } from "../compatibility/hooks.js";
4
6
  import { createReadOnlyTools } from "../tools/index.js";
5
7
  export const ORCHESTRATOR_DIRECTORY_ENV = "OPENCODE_ANDROID_ORCHESTRATOR_DIRECTORY";
6
8
  export const ORCHESTRATOR_WORKTREE_ENV = "OPENCODE_ANDROID_ORCHESTRATOR_WORKTREE";
9
+ export const BUNDLED_SKILLS_DIRECTORY = fileURLToPath(new URL("../../resources/third-party/superpowers-v6.2.0/skills/", import.meta.url));
10
+ export const BUNDLED_SKILL_IDS = [
11
+ "android-orchestrator-brainstorming",
12
+ "android-orchestrator-writing-plans",
13
+ "android-orchestrator-test-driven-development",
14
+ "android-orchestrator-systematic-debugging",
15
+ "android-orchestrator-verification-before-completion",
16
+ ];
17
+ function assertBundledSkillsAvailable() {
18
+ for (const skillId of BUNDLED_SKILL_IDS) {
19
+ const entrypoint = resolve(BUNDLED_SKILLS_DIRECTORY, skillId, "SKILL.md");
20
+ try {
21
+ if (!lstatSync(entrypoint).isFile()) {
22
+ throw new Error("entrypoint is not a regular file");
23
+ }
24
+ }
25
+ catch (error) {
26
+ throw new Error(`Bundled Orchestrator skill is unavailable: ${skillId}. Reinstall the exact Orchestrator package.`, { cause: error });
27
+ }
28
+ }
29
+ }
7
30
  /**
8
31
  * Runtime implementation deliberately receives only fields shared by the two
9
32
  * certified OpenCode versions.
10
33
  */
11
34
  export const createCompatiblePlugin = async ({ directory, worktree, $, }) => {
35
+ assertBundledSkillsAvailable();
12
36
  const projectDirectory = resolve(directory);
13
37
  const projectWorktree = resolve(worktree);
14
38
  const longCommandTimeoutMs = readLongCommandTimeoutMs(projectWorktree);
15
39
  return defineCompatibleHooks({
40
+ config: async (config) => {
41
+ const compatibleConfig = config;
42
+ compatibleConfig.skills = compatibleConfig.skills ?? {};
43
+ compatibleConfig.skills.paths = compatibleConfig.skills.paths ?? [];
44
+ if (!compatibleConfig.skills.paths.includes(BUNDLED_SKILLS_DIRECTORY)) {
45
+ compatibleConfig.skills.paths.push(BUNDLED_SKILLS_DIRECTORY);
46
+ }
47
+ },
16
48
  tool: createReadOnlyTools({
17
49
  directory: projectDirectory,
18
50
  worktree: projectWorktree,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/plugin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,OAAO,EACL,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,qBAAqB,EACrB,uBAAuB,GAExB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,MAAM,CAAC,MAAM,0BAA0B,GACrC,yCAAyC,CAAC;AAC5C,MAAM,CAAC,MAAM,yBAAyB,GACpC,wCAAwC,CAAC;AAE3C;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAqB,KAAK,EAAE,EAC7D,SAAS,EACT,QAAQ,EACR,CAAC,GACF,EAAE,EAAE;IACH,MAAM,gBAAgB,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IAC5C,MAAM,eAAe,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC1C,MAAM,oBAAoB,GAAG,wBAAwB,CAAC,eAAe,CAAC,CAAC;IAEvE,OAAO,qBAAqB,CAAC;QAC3B,IAAI,EAAE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gBAAgB,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC;YACpE,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,wBAAwB,CAAC,EAAE,CAAC;gBACtE,gBAAgB,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;YAC/D,CAAC;QACH,CAAC;QACD,IAAI,EAAE,mBAAmB,CAAC;YACxB,SAAS,EAAE,gBAAgB;YAC3B,QAAQ,EAAE,eAAe;YACzB,KAAK,EAAE,CAAC;SACT,CAAC;QACF,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE;YACpC,MAAM,CAAC,GAAG,CAAC,0BAA0B,CAAC,GAAG,gBAAgB,CAAC;YAC1D,MAAM,CAAC,GAAG,CAAC,yBAAyB,CAAC,GAAG,eAAe,CAAC;QAC1D,CAAC;QACD,qBAAqB,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;YAC7C,uBAAuB,CAAC,KAAK,EAAE,MAAM,EAAE,oBAAoB,CAAC,CAAC;QAC/D,CAAC;KACF,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,sEAAsE;AACtE,MAAM,CAAC,MAAM,yBAAyB,GAAW,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,CACxE,sBAAsB,CAAC,uBAAuB,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC;AAElE,eAAe,yBAAyB,CAAC"}
package/docs/MIGRATION.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Migration guide
2
2
 
3
3
  This guide covers migration to
4
- `@frankzhang2026/opencode-android-orchestrator@0.6.1`. Pin the exact version and
4
+ `@frankzhang2026/opencode-android-orchestrator@0.8.0`. Pin the exact version and
5
5
  prove the migration in a disposable clone before changing a long-lived
6
6
  repository.
7
7
 
@@ -9,9 +9,9 @@ repository.
9
9
 
10
10
  | Current state | Correct command after release | Important distinction |
11
11
  | --- | --- | --- |
12
- | No orchestrator files or manifest | `npx @frankzhang2026/opencode-android-orchestrator@0.6.1 init .` | Normal new installation; all detected Android modules and registered debug verification tasks are discovered automatically. |
12
+ | No orchestrator files or manifest | `npx @frankzhang2026/opencode-android-orchestrator@0.8.0 init .` | Normal new installation; all detected Android modules and registered debug verification tasks are discovered automatically. |
13
13
  | Published `0.1.0` scaffold only | Remove any project-local `@0.1.0` plugin reference after review, then run `init`. | `0.1.0` did not create a usable managed installation and cannot be upgraded. |
14
- | Healthy `0.2.0` through `0.6.0` manifest-managed installation | Run the fixed `0.6.1` doctor, then `upgrade`. | Existing module scope and verification tasks are preserved. Pre-`0.6.1` configurations receive the 30-minute long-command timeout default. |
14
+ | Healthy `0.2.0` through `0.7.0` manifest-managed installation | Run the fixed `0.8.0` doctor, then `upgrade`. | Existing module scope, verification tasks, and policy values are preserved. The old managed Superpowers plugin reference is replaced by bundled skills. Pre-`0.6.1` configurations receive the 30-minute long-command timeout default. |
15
15
  | Manually copied V3 files, no `.automation-plugin/manifest.json` | Finish active tasks, preserve historical evidence separately, then run `init`. | Exact files can be reused; differing managed files fail as conflicts. |
16
16
  | Healthy older manifest-managed installation | Run `doctor`, then the fixed target version's `upgrade`. | `upgrade` requires a valid installed manifest and intact original backups. |
17
17
  | Healthy current-version manifest | Run `doctor`; repeated `init` or same-version `upgrade` is verification-only and byte-idempotent. | Do not reinstall or delete the manifest. |
@@ -36,7 +36,7 @@ removes unchanged plugin-created files, and retains drift for manual review.
36
36
  5. If a managed manifest already exists, run:
37
37
 
38
38
  ```sh
39
- npx @frankzhang2026/opencode-android-orchestrator@0.6.1 doctor . --json
39
+ npx @frankzhang2026/opencode-android-orchestrator@0.8.0 doctor . --json
40
40
  ```
41
41
 
42
42
  Do not proceed with `upgrade` unless the installation checks pass.
@@ -52,14 +52,14 @@ scaffold, not as an older managed installation.
52
52
  If the project OpenCode configuration contains an exact
53
53
  `@frankzhang2026/opencode-android-orchestrator@0.1.0` entry, save the file and
54
54
  remove only that obsolete entry in a reviewed Git change before running
55
- `0.6.1 init`. The merger deliberately rejects a different version of the same
55
+ `0.8.0 init`. The merger deliberately rejects a different version of the same
56
56
  managed package; it will not silently replace the reference. A global npm
57
57
  installation of `0.1.0` alone does not require project-file cleanup.
58
58
 
59
59
  After release, initialize with the fixed version:
60
60
 
61
61
  ```sh
62
- npx @frankzhang2026/opencode-android-orchestrator@0.6.1 init .
62
+ npx @frankzhang2026/opencode-android-orchestrator@0.8.0 init .
63
63
  ```
64
64
 
65
65
  New installations default to all-module scope, so multiple application modules
@@ -105,8 +105,8 @@ installer to guess which customization should survive.
105
105
  Use the lifecycle command selected by the active manifest:
106
106
 
107
107
  ```sh
108
- npx @frankzhang2026/opencode-android-orchestrator@0.6.1 doctor . --json
109
- npx @frankzhang2026/opencode-android-orchestrator@0.6.1 upgrade . --json
108
+ npx @frankzhang2026/opencode-android-orchestrator@0.8.0 doctor . --json
109
+ npx @frankzhang2026/opencode-android-orchestrator@0.8.0 upgrade . --json
110
110
  ```
111
111
 
112
112
  `upgrade` verifies the installed manifest, every managed file, and every
@@ -127,6 +127,21 @@ To choose another value during migration, pass
127
127
  `--long-command-timeout-ms <milliseconds>`; the accepted range is `120000`
128
128
  through `7200000`.
129
129
 
130
+ Unit-test and Android lint verification are repository policies in
131
+ `automation/config.json`. Existing boolean values are preserved. Older
132
+ configurations receive `unitTestsEnabled: true` and `lintEnabled: false`.
133
+ After migration, change only those two values in place and commit the
134
+ configuration; there are no `init` or `upgrade` flags for these policies.
135
+
136
+ Upgrading a healthy `0.7.0` installation removes the exact managed Superpowers
137
+ v6.2.0 plugin reference that the older Orchestrator added. Upgrade rebuilds the
138
+ OpenCode merge from the verified original pre-install file, so ownership stays
139
+ bounded: if that exact reference was already present before Orchestrator was
140
+ installed, it remains user-owned and is preserved. Other Superpowers versions,
141
+ plugin entries, options, comments, and configuration fields are not silently
142
+ removed. Version `0.8.0` instead registers its five package-local,
143
+ `android-orchestrator-*` workflow skills through the OpenCode `config` hook.
144
+
130
145
  The command refuses:
131
146
 
132
147
  - a downgrade or malformed semantic version;
@@ -144,8 +159,9 @@ the source of drift and use the recorded recovery data.
144
159
  Run all checks from the detected Git root:
145
160
 
146
161
  ```sh
147
- npx @frankzhang2026/opencode-android-orchestrator@0.6.1 doctor .
162
+ npx @frankzhang2026/opencode-android-orchestrator@0.8.0 doctor .
148
163
  opencode debug config
164
+ opencode debug skill
149
165
  opencode debug agent scheduled-planner
150
166
  opencode debug agent scheduled-coder
151
167
  opencode debug agent scheduled-reviewer
@@ -157,7 +173,8 @@ opencode debug agent scheduled-reviewer
157
173
  Verify all of the following before switching normal work to the plugin:
158
174
 
159
175
  - doctor has no failed check;
160
- - all three agents, five commands, and required skills are discoverable;
176
+ - all three agents, five commands, three scheduled-quality skills, and five
177
+ `android-orchestrator-*` workflow skills are discoverable;
161
178
  - both read-only custom tools resolve for the scheduled agents;
162
179
  - the Shell suite ends with `1..44`;
163
180
  - shadow output contains `"mutationPerformed": false`;
package/docs/SECURITY.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # Security model
2
2
 
3
3
  This document describes the security properties of
4
- `@frankzhang2026/opencode-android-orchestrator@0.6.1`. The lifecycle foundation
4
+ `@frankzhang2026/opencode-android-orchestrator@0.8.0`. The lifecycle foundation
5
5
  completed the real OpenCode `1.14.22` and `1.15.13` release matrix in `0.2.0`;
6
- `0.6.1` retains that compatibility boundary.
6
+ `0.8.0` retains that compatibility boundary.
7
7
 
8
8
  ## Security goals and non-goals
9
9
 
@@ -53,7 +53,7 @@ modify local files; this package does not claim to protect against that actor.
53
53
 
54
54
  OpenCode permission prompts are also not semantic workflow approval. They can
55
55
  be accepted for the remainder of a session and may be auto-approved. For that
56
- reason `0.6.1` exposes only `android_orchestrator_status` and
56
+ reason `0.8.0` exposes only `android_orchestrator_status` and
57
57
  `android_orchestrator_doctor` as custom tools. State-changing wrappers remain a
58
58
  NO-GO until a one-use, non-model-forgeable receipt can bind the approval kind,
59
59
  task, session/message, sealed SHA or branch, time, and nonce.
@@ -91,6 +91,13 @@ value is an integer from `120000` through `7200000` milliseconds, defaults to
91
91
  `1800000`, never shortens a larger caller timeout, and does not rewrite the
92
92
  command or authorize a state change.
93
93
 
94
+ The five namespaced bundled workflow skills are loaded from a fixed directory
95
+ inside the installed npm package. The compatible `config` hook only appends
96
+ that directory to `skills.paths`, and plugin startup verifies that every
97
+ expected `SKILL.md` is a regular file. The package omits the upstream
98
+ `using-superpowers` bootstrap, localhost/browser companion, remote branding,
99
+ telemetry, and unrelated skills.
100
+
94
101
  ## Filesystem and configuration safety
95
102
 
96
103
  The installer never follows a symbolic link at a managed file or required
@@ -119,6 +126,14 @@ while Gradle settings/build files and orchestration resources remain protected.
119
126
  legacy configuration with no scope field as `primary`, preventing an implicit
120
127
  permission expansion.
121
128
 
129
+ `unitTestsEnabled` and `lintEnabled` are the only operator-editable fields in
130
+ the otherwise manifest-managed `automation/config.json`. Upgrade authenticates
131
+ the remaining generated content before preserving those values, and doctor
132
+ validates the resulting adaptive configuration. Task agents still cannot edit
133
+ the protected file. Unit tests default on and lint defaults off; disabling unit
134
+ verification does not remove the mandatory RED evidence step. Assemble, scope,
135
+ evidence, and required device-test gates are unaffected.
136
+
122
137
  The optional repository-root `.automation-worktree-allowlist` is controlled by
123
138
  the local human operator, not by task agents. It accepts at most 256 exact,
124
139
  normalized repository-relative file paths in a regular file no larger than 64
@@ -188,14 +203,16 @@ surface. Review them before running a workflow in an untrusted project.
188
203
 
189
204
  ## Dependencies and network behavior
190
205
 
191
- Use fixed package references. The installer adds the exact orchestrator
192
- version and the configured pinned Superpowers Git tag; it does not use
193
- `latest`. The package is compiled against `@opencode-ai/plugin@1.14.22` and
206
+ Use fixed package references. The installer adds only the exact Orchestrator
207
+ version; it does not use `latest` or install a GitHub-backed Superpowers
208
+ plugin. The five required Superpowers-derived skills and their supporting
209
+ files are part of the reviewed npm tarball with the upstream MIT license and
210
+ provenance. The package is compiled against `@opencode-ai/plugin@1.14.22` and
194
211
  declares the bounded peer range `>=1.14.22 <1.16.0`.
195
212
 
196
213
  The orchestrator does not contain a telemetry uploader and the deterministic
197
214
  Shell flow forbids Git push. Network activity can still occur outside that
198
- code when npm/npx downloads a package, OpenCode resolves a pinned plugin,
215
+ code when npm/npx downloads a package, OpenCode resolves another configured plugin,
199
216
  OpenCode contacts the configured model provider, or project build/test tooling
200
217
  uses the network. Apply the host organization's normal npm, Git, OpenCode,
201
218
  provider, proxy, certificate, and dependency-review policy.
@@ -1,7 +1,7 @@
1
1
  # Troubleshooting
2
2
 
3
3
  Use this guide for
4
- `@frankzhang2026/opencode-android-orchestrator@0.6.1`.
4
+ `@frankzhang2026/opencode-android-orchestrator@0.8.0`.
5
5
 
6
6
  ## Start with read-only evidence
7
7
 
@@ -11,7 +11,7 @@ From the repository root, capture:
11
11
  git status --short --branch
12
12
  git rev-parse HEAD
13
13
  opencode --version
14
- npx @frankzhang2026/opencode-android-orchestrator@0.6.1 doctor . --json
14
+ npx @frankzhang2026/opencode-android-orchestrator@0.8.0 doctor . --json
15
15
  ```
16
16
 
17
17
  If installation never completed, doctor will correctly report a missing or
@@ -43,9 +43,15 @@ remain human-readable on stderr with a stable code such as `[FILE_CONFLICT]`.
43
43
  | `PRIMARY_MODULE_AMBIGUOUS` | Restrictive `primary` scope has multiple possible Android modules. | Supply an exact Gradle path, for example `--module-scope primary --primary-module :mobile`, or use the default `all` scope. |
44
44
  | `PRIMARY_MODULE_NOT_FOUND` | The selected Gradle path was not detected. | Use a module path reported by doctor/project detection; do not pass a filesystem directory. |
45
45
  | `GRADLE_DISCOVERY_FAILED` | The temporary read-only Gradle configuration failed, or registered tasks could not form every required verification group. | Run `./gradlew help --no-configuration-cache --console=plain` and fix the reported project/JDK/dependency issue. Use `--gradle-verification-config` only for an intentional nonstandard task policy, and keep that file inside the target repository. |
46
+ | Unit tests did not run | `unitTestsEnabled` is false. | Set it to `true` in `automation/config.json`, commit the change, and rerun the gate. |
47
+ | Unit tests run but should be skipped | `unitTestsEnabled` is true, which is the default. | Set it to `false` in `automation/config.json`; RED evidence remains mandatory. |
48
+ | Lint did not run | `lintEnabled` is false, which is the default. | Set it to `true` in `automation/config.json`, commit the change, and rerun the gate. |
49
+ | Lint runs but should be skipped | `lintEnabled` is true. | Set it to `false` in `automation/config.json` and commit the change. |
46
50
  | Invalid `--long-command-timeout-ms` | The value is not an integer from `120000` through `7200000`. | Use the `1800000` ms default or pass an intentional bounded value to `init`/`upgrade`; do not edit the generated config directly. |
47
51
  | Android SDK failure | No valid explicit SDK, `ANDROID_HOME`, `ANDROID_SDK_ROOT`, or `local.properties` `sdk.dir` was found. | Configure one real SDK root containing `platforms/` and `build-tools/`. Do not publish `local.properties`. |
48
52
  | Missing `git`, `jq`, `rg`, `shasum`, or Java | Required deterministic command is unavailable on `PATH`. | Install or restore the missing command, record its version, and rerun the read-only checks. |
53
+ | `Bundled Orchestrator skill is unavailable` | The installed `0.8.0` package is incomplete, damaged, or loaded from an unsupported partial copy. | Reinstall the exact package, inspect its `resources/third-party/superpowers-v6.2.0/skills/` entries, restart OpenCode, and rerun `opencode debug skill`. Do not add an external Superpowers plugin as a fallback. |
54
+ | The exact Superpowers v6.2.0 plugin remains after upgrade | That entry existed in the verified pre-install OpenCode file and is therefore user-owned. | Leave it in place or remove it as a separate reviewed configuration change. Upgrade only removes the old Orchestrator-managed entry. |
49
55
 
50
56
  Version `0.6.0` always passes `--no-configuration-cache` to its temporary
51
57
  Gradle task-discovery invocation. This overrides a repository-level
@@ -53,12 +59,12 @@ Gradle task-discovery invocation. This overrides a repository-level
53
59
  the project's files or normal build behavior. Deleting the project's
54
60
  Configuration Cache is therefore neither required nor a durable repair.
55
61
 
56
- Version `0.6.1` raises direct managed long-running lifecycle commands to at
62
+ Version `0.7.0` raises direct managed long-running lifecycle commands to at
57
63
  least `1800000` milliseconds. A higher timeout already supplied by the caller
58
64
  is preserved; unrelated Bash commands are unchanged. To configure one hour,
59
65
  run `upgrade . --long-command-timeout-ms 3600000` on a healthy installation.
60
66
  If a command still reports `120000 ms`, confirm that the project manifest and
61
- OpenCode plugin reference are both `0.6.1`, restart the OpenCode session so the
67
+ OpenCode plugin reference are both `0.8.0`, restart the OpenCode session so the
62
68
  plugin reloads, and rerun doctor before attempting recovery.
63
69
 
64
70
  After installation, inspect OpenCode discovery separately:
@@ -71,8 +77,9 @@ opencode debug agent scheduled-coder
71
77
  opencode debug agent scheduled-reviewer
72
78
  ```
73
79
 
74
- Then run `./scripts/automation/preflight.sh --source`. It validates pinned
75
- plugins, required skills, agent permissions, and both read-only custom tools.
80
+ Then run `./scripts/automation/preflight.sh --source`. It validates resolved
81
+ configuration, required bundled and project skills, agent permissions, and
82
+ both read-only custom tools.
76
83
  If it fails, preserve its exact output. Do not broaden an agent's default-deny
77
84
  permissions to make discovery pass.
78
85
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frankzhang2026/opencode-android-orchestrator",
3
- "version": "0.6.1",
3
+ "version": "0.8.0",
4
4
  "description": "Reusable OpenCode orchestration for Android projects",
5
5
  "license": "MIT",
6
6
  "author": "frankzhang2026",
@@ -31,6 +31,7 @@
31
31
  "files": [
32
32
  "dist/",
33
33
  "docs/",
34
+ "resources/",
34
35
  "templates/",
35
36
  "README.md",
36
37
  "CHANGELOG.md",
@@ -45,6 +46,7 @@
45
46
  "build": "tsc -p tsconfig.json",
46
47
  "typecheck": "tsc -p tsconfig.json --noEmit",
47
48
  "test": "npm run build && node --test tests/*.test.mjs",
49
+ "test:offline-discovery": "npm run build && node --test tests/offline-skill-discovery.integration.mjs",
48
50
  "pack:check": "npm pack --dry-run",
49
51
  "prepack": "npm run build"
50
52
  },
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Jesse Vincent
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.
@@ -0,0 +1,21 @@
1
+ # Bundled Superpowers-derived resources
2
+
3
+ - Upstream: https://github.com/obra/superpowers
4
+ - Upstream version: v6.2.0
5
+ - Upstream copyright: Copyright (c) 2025 Jesse Vincent
6
+ - License: MIT; see `LICENSE` in this directory.
7
+
8
+ This directory contains a curated, Orchestrator-specific derivative of five
9
+ upstream workflow skills. Names are prefixed with `android-orchestrator-` to
10
+ avoid collisions with independently installed skills.
11
+
12
+ Intentional changes:
13
+
14
+ - removed the `using-superpowers` bootstrap dependency;
15
+ - removed brainstorming's visual companion, localhost server, browser launch,
16
+ remote branding, and telemetry resources;
17
+ - replaced Superpowers plan execution handoffs with the sealed Android
18
+ Orchestrator contract/Coder/Reviewer workflow;
19
+ - moved optional supporting documents under `references/` and scripts under
20
+ `scripts/`;
21
+ - rewrote cross-skill references to the bundled namespaced skill IDs.
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: android-orchestrator-brainstorming
3
+ description: Refine one Android Orchestrator coding request into a bounded observable behavior proposal before plan and contract creation
4
+ license: MIT
5
+ compatibility: opencode
6
+ metadata:
7
+ upstream: obra/superpowers@v6.2.0
8
+ workflow: scheduled-coding
9
+ ---
10
+
11
+ # Android Orchestrator brainstorming
12
+
13
+ Turn a rough request into one small, testable behavior change. This is an
14
+ interactive planning aid; it never edits product code, creates planning files,
15
+ starts execution, or grants approval.
16
+
17
+ ## Workflow
18
+
19
+ 1. Inspect the relevant repository code, tests, and project instructions.
20
+ 2. Summarize current observable behavior and the requested behavior.
21
+ 3. Identify ambiguity in scope, acceptance behavior, edge cases, or test
22
+ strategy. Ask one focused question at a time only when the answer changes
23
+ the proposal.
24
+ 4. Consider two or three approaches when a meaningful tradeoff exists. Lead
25
+ with the recommended approach and explain the material tradeoff.
26
+ 5. Converge on exactly one bounded behavior change with:
27
+ - observable acceptance criteria;
28
+ - important edge cases;
29
+ - exact allowed implementation and test paths;
30
+ - maximum changed-file count;
31
+ - focused test filter and device-test policy;
32
+ - protected paths and explicit non-goals.
33
+ 6. Hand the proposal back to `scheduled-quality-orchestrator` for its formal
34
+ `方案确认` boundary.
35
+
36
+ ## Boundaries
37
+
38
+ - Never treat discussion or agreement in prose as approval.
39
+ - Never broaden a request merely to make the implementation cleaner.
40
+ - Never propose dependency, build-system, automation-rule, push, merge, or
41
+ worktree changes unless the user explicitly put them in scope.
42
+ - Use text-only interaction. This bundled skill contains no localhost server,
43
+ browser launcher, remote image, or telemetry path.