@frankzhang2026/opencode-android-orchestrator 0.7.0 → 0.8.1

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 (61) hide show
  1. package/CHANGELOG.md +32 -1
  2. package/README.md +58 -22
  3. package/THIRD_PARTY_NOTICES.md +15 -11
  4. package/dist/index.d.ts +3 -3
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +3 -3
  7. package/dist/index.js.map +1 -1
  8. package/dist/installer/adaptive-templates.d.ts +2 -5
  9. package/dist/installer/adaptive-templates.d.ts.map +1 -1
  10. package/dist/installer/adaptive-templates.js.map +1 -1
  11. package/dist/installer/agents-config.d.ts +5 -0
  12. package/dist/installer/agents-config.d.ts.map +1 -1
  13. package/dist/installer/agents-config.js +44 -8
  14. package/dist/installer/agents-config.js.map +1 -1
  15. package/dist/installer/index.d.ts +2 -2
  16. package/dist/installer/index.d.ts.map +1 -1
  17. package/dist/installer/index.js +2 -2
  18. package/dist/installer/index.js.map +1 -1
  19. package/dist/installer/opencode-config.d.ts +3 -4
  20. package/dist/installer/opencode-config.d.ts.map +1 -1
  21. package/dist/installer/opencode-config.js +1 -3
  22. package/dist/installer/opencode-config.js.map +1 -1
  23. package/dist/installer/upgrade.d.ts.map +1 -1
  24. package/dist/installer/upgrade.js +117 -46
  25. package/dist/installer/upgrade.js.map +1 -1
  26. package/dist/plugin/index.d.ts +2 -0
  27. package/dist/plugin/index.d.ts.map +1 -1
  28. package/dist/plugin/index.js +32 -0
  29. package/dist/plugin/index.js.map +1 -1
  30. package/docs/MIGRATION.md +45 -26
  31. package/docs/SECURITY.md +32 -14
  32. package/docs/TROUBLESHOOTING.md +31 -9
  33. package/package.json +3 -1
  34. package/resources/third-party/superpowers-v6.2.0/LICENSE +21 -0
  35. package/resources/third-party/superpowers-v6.2.0/PROVENANCE.md +21 -0
  36. package/resources/third-party/superpowers-v6.2.0/skills/android-orchestrator-brainstorming/SKILL.md +43 -0
  37. package/resources/third-party/superpowers-v6.2.0/skills/android-orchestrator-systematic-debugging/SKILL.md +288 -0
  38. package/resources/third-party/superpowers-v6.2.0/skills/android-orchestrator-systematic-debugging/references/condition-based-waiting-example.ts +158 -0
  39. package/resources/third-party/superpowers-v6.2.0/skills/android-orchestrator-systematic-debugging/references/condition-based-waiting.md +115 -0
  40. package/resources/third-party/superpowers-v6.2.0/skills/android-orchestrator-systematic-debugging/references/defense-in-depth.md +122 -0
  41. package/resources/third-party/superpowers-v6.2.0/skills/android-orchestrator-systematic-debugging/references/root-cause-tracing.md +169 -0
  42. package/resources/third-party/superpowers-v6.2.0/skills/android-orchestrator-systematic-debugging/scripts/find-polluter.sh +72 -0
  43. package/resources/third-party/superpowers-v6.2.0/skills/android-orchestrator-test-driven-development/SKILL.md +327 -0
  44. package/resources/third-party/superpowers-v6.2.0/skills/android-orchestrator-test-driven-development/references/writing-good-tests.md +197 -0
  45. package/resources/third-party/superpowers-v6.2.0/skills/android-orchestrator-verification-before-completion/SKILL.md +125 -0
  46. package/resources/third-party/superpowers-v6.2.0/skills/android-orchestrator-writing-plans/SKILL.md +50 -0
  47. package/templates/.opencode/agents/scheduled-coder.md +3 -4
  48. package/templates/.opencode/agents/scheduled-planner.md +5 -5
  49. package/templates/.opencode/agents/scheduled-reviewer.md +1 -2
  50. package/templates/.opencode/skills/scheduled-quality-coder/SKILL.md +7 -6
  51. package/templates/.opencode/skills/scheduled-quality-orchestrator/SKILL.md +2 -1
  52. package/templates/.opencode/skills/scheduled-quality-reviewer/SKILL.md +1 -1
  53. package/templates/README.md +6 -2
  54. package/templates/automation/config.json +6 -9
  55. package/templates/automation/config.schema.json +2 -11
  56. package/templates/automation/task-contract.schema.json +7 -7
  57. package/templates/automation/tasks/TASK-TEMPLATE.json.example +5 -5
  58. package/templates/scripts/automation/lib.sh +1 -3
  59. package/templates/scripts/automation/preflight.sh +0 -3
  60. package/templates/scripts/automation/tests/run-tests.sh +11 -14
  61. package/templates/scripts/automation/validate-contract.sh +7 -2
@@ -77,11 +77,10 @@ permission:
77
77
  list: allow
78
78
  skill:
79
79
  "*": deny
80
- "using-superpowers": allow
81
80
  "scheduled-quality-coder": allow
82
- "test-driven-development": allow
83
- "systematic-debugging": allow
84
- "verification-before-completion": allow
81
+ "android-orchestrator-test-driven-development": allow
82
+ "android-orchestrator-systematic-debugging": allow
83
+ "android-orchestrator-verification-before-completion": allow
85
84
  schedule_job: deny
86
85
  list_jobs: deny
87
86
  get_version: deny
@@ -68,9 +68,8 @@ permission:
68
68
  list: allow
69
69
  skill:
70
70
  "*": deny
71
- "using-superpowers": allow
72
- "brainstorming": allow
73
- "writing-plans": allow
71
+ "android-orchestrator-brainstorming": allow
72
+ "android-orchestrator-writing-plans": allow
74
73
  "scheduled-quality-orchestrator": allow
75
74
  question: allow
76
75
  schedule_job: deny
@@ -96,8 +95,9 @@ user provides a natural-language coding request. Remain the conversational
96
95
  coordinator through planning, contract approval, unattended execution, final
97
96
  human acceptance, and local integration into the recorded original branch.
98
97
 
99
- Load `scheduled-quality-orchestrator`, `brainstorming`, and `writing-plans`
100
- before taking action, then follow the orchestrator skill literally. Run the
98
+ Load `scheduled-quality-orchestrator`, `android-orchestrator-brainstorming`,
99
+ and `android-orchestrator-writing-plans` before taking action, then follow the
100
+ orchestrator skill literally. Run the
101
101
  source preflight before planning. Inspect the current repository code and
102
102
  tests, then interactively narrow the request to exactly one small, observable
103
103
  behavior change. Ask for clarification when scope, acceptance behavior, edge
@@ -54,9 +54,8 @@ permission:
54
54
  list: allow
55
55
  skill:
56
56
  "*": deny
57
- "using-superpowers": allow
58
57
  "scheduled-quality-reviewer": allow
59
- "verification-before-completion": allow
58
+ "android-orchestrator-verification-before-completion": allow
60
59
  schedule_job: deny
61
60
  list_jobs: deny
62
61
  get_version: deny
@@ -9,8 +9,8 @@ metadata:
9
9
 
10
10
  # Scheduled quality coder
11
11
 
12
- Execute one task contract. This skill narrows Superpowers into a deterministic,
13
- non-interactive Android workflow. The scripts are the source of truth for state;
12
+ Execute one task contract through the bundled, deterministic, non-interactive
13
+ Android workflow. The scripts are the source of truth for state;
14
14
  your prose is never proof of completion.
15
15
 
16
16
  ## Required input
@@ -28,8 +28,8 @@ it with `./scripts/automation/block-task.sh <TASK-ID> <reason>` before stopping.
28
28
 
29
29
  ## Mandatory sequence
30
30
 
31
- 1. Load `test-driven-development` and
32
- `verification-before-completion`. Do not load any other implementation
31
+ 1. Load `android-orchestrator-test-driven-development` and
32
+ `android-orchestrator-verification-before-completion`. Do not load any other implementation
33
33
  workflow skill.
34
34
  2. Run `./scripts/automation/status.sh <TASK-ID>` and read the contract.
35
35
  3. Branch by deterministic state:
@@ -65,7 +65,7 @@ it with `./scripts/automation/block-task.sh <TASK-ID> <reason>` before stopping.
65
65
  7. Run `./scripts/automation/quality-gate.sh <TASK-ID>`.
66
66
  8. If the first gate attempt in the current coding cycle fails while state
67
67
  remains `CODING`, load
68
- `systematic-debugging`, diagnose the root cause, and make at most one fix
68
+ `android-orchestrator-systematic-debugging`, diagnose the root cause, and make at most one fix
69
69
  loop. Then run the gate once more. If it fails again, stop in
70
70
  `TEST_FAILED`.
71
71
  9. When the gate succeeds, report the changed files and evidence paths. Do not
@@ -92,7 +92,8 @@ human can revise and requeue the contract.
92
92
 
93
93
  ## Forbidden capabilities
94
94
 
95
- Do not invoke `brainstorming`, `writing-plans`, `using-git-worktrees`,
95
+ Do not invoke `android-orchestrator-brainstorming`,
96
+ `android-orchestrator-writing-plans`, `using-git-worktrees`,
96
97
  `finishing-a-development-branch`, `requesting-code-review`, parallel agents, or
97
98
  subagent-driven development. Planning and approval happen before this session;
98
99
  review happens in a separate fresh read-only session.
@@ -20,7 +20,8 @@ approvals; state files, hashes, tests, and Git checks grant execution.
20
20
  If `ANDROID_HOME` is missing, the working tree is dirty, the branch is detached,
21
21
  Git identity is missing, or OpenCode discovery is unsafe, report the exact
22
22
  blocker and stop.
23
- 2. Use brainstorming and writing-plans to produce one bounded proposal. After
23
+ 2. Use `android-orchestrator-brainstorming` and
24
+ `android-orchestrator-writing-plans` to produce one bounded proposal. After
24
25
  displaying it, immediately call `question` once with `multiple: false` and
25
26
  `custom: false`:
26
27
 
@@ -15,7 +15,7 @@ you review.
15
15
 
16
16
  ## Mandatory sequence
17
17
 
18
- 1. Load `verification-before-completion`.
18
+ 1. Load `android-orchestrator-verification-before-completion`.
19
19
  2. Require exactly one task ID or the compatibility token
20
20
  `NEXT_REVIEWING`. For the selector token, first run
21
21
  `./scripts/automation/select-task.sh REVIEWING` and continue only if
@@ -14,7 +14,7 @@ Migrated template roots:
14
14
  - `.opencode/skills`: the three `scheduled-quality-*` skills
15
15
  - `scripts/automation`: all 29 deterministic V3 Bash transactions and their
16
16
  test runner, preserved as executable files
17
- - `automation`: the portable V3 configuration render source, both JSON Schemas,
17
+ - `automation`: the portable V4 configuration render source, both JSON Schemas,
18
18
  and the task contract example
19
19
  - `docs/plans/README.md`: the human-approved plan authoring contract
20
20
  - `AGENTS.md.fragment`: a bounded managed block for non-destructive
@@ -50,7 +50,11 @@ resource manifest so its exact-path entries can change without causing package
50
50
  integrity drift; failed first-install verification removes a newly bootstrapped
51
51
  file during rollback.
52
52
 
53
- The legacy Scheduler field has been removed while Superpowers remains pinned.
53
+ The legacy Scheduler field and external Superpowers plugin dependency have
54
+ been removed. Five namespaced workflow skills are loaded directly from the
55
+ Orchestrator npm package; the optional Superpowers browser companion is not
56
+ distributed.
57
+
54
58
  The scope gates consume generated source-set arrays, and the Shell test fixture
55
59
  uses a neutral custom module and package. No shipped template contains a local
56
60
  absolute path or project-specific package name.
@@ -1,5 +1,5 @@
1
1
  {
2
- "schemaVersion": 3,
2
+ "schemaVersion": 4,
3
3
  "enabled": true,
4
4
  "mode": "orchestrated",
5
5
  "workspaceStrategy": "inPlaceExclusive",
@@ -20,18 +20,15 @@
20
20
  "abort": "中止任务,封存修改并恢复原分支。",
21
21
  "resume": "恢复任务,重新捕获基线并继续自动执行。"
22
22
  },
23
- "plugins": {
24
- "superpowers": "superpowers@git+https://github.com/obra/superpowers.git#v6.2.0"
25
- },
26
23
  "requiredSkills": [
27
- "brainstorming",
28
- "writing-plans",
24
+ "android-orchestrator-brainstorming",
25
+ "android-orchestrator-writing-plans",
29
26
  "scheduled-quality-orchestrator",
30
27
  "scheduled-quality-coder",
31
28
  "scheduled-quality-reviewer",
32
- "test-driven-development",
33
- "systematic-debugging",
34
- "verification-before-completion"
29
+ "android-orchestrator-test-driven-development",
30
+ "android-orchestrator-systematic-debugging",
31
+ "android-orchestrator-verification-before-completion"
35
32
  ],
36
33
  "gradleVerification": {
37
34
  "fullUnitTestTasks": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "urn:frankzhang2026:opencode-android-orchestrator:automation-config:v3",
3
+ "$id": "urn:frankzhang2026:opencode-android-orchestrator:automation-config:v4",
4
4
  "title": "OpenCode task orchestration configuration",
5
5
  "type": "object",
6
6
  "additionalProperties": false,
@@ -42,14 +42,13 @@
42
42
  "autoCleanupWorktrees",
43
43
  "pushAfterAcceptance",
44
44
  "approvalPhrases",
45
- "plugins",
46
45
  "requiredSkills",
47
46
  "gradleVerification",
48
47
  "androidProject",
49
48
  "protectedPaths"
50
49
  ],
51
50
  "properties": {
52
- "schemaVersion": { "const": 3 },
51
+ "schemaVersion": { "const": 4 },
53
52
  "enabled": { "type": "boolean" },
54
53
  "mode": { "enum": ["shadow", "orchestrated"] },
55
54
  "workspaceStrategy": {
@@ -81,14 +80,6 @@
81
80
  "resume": { "type": "string", "minLength": 4 }
82
81
  }
83
82
  },
84
- "plugins": {
85
- "type": "object",
86
- "additionalProperties": false,
87
- "required": ["superpowers"],
88
- "properties": {
89
- "superpowers": { "type": "string", "minLength": 1 }
90
- }
91
- },
92
83
  "requiredSkills": {
93
84
  "type": "array",
94
85
  "minItems": 6,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "urn:frankzhang2026:opencode-android-orchestrator:task-contract:v1",
3
+ "$id": "urn:frankzhang2026:opencode-android-orchestrator:task-contract:v2",
4
4
  "title": "Scheduled coding task contract",
5
5
  "type": "object",
6
6
  "additionalProperties": false,
@@ -27,7 +27,7 @@
27
27
  "maxChangedFiles",
28
28
  "allowedPaths",
29
29
  "forbiddenPaths",
30
- "allowedSuperpowers",
30
+ "allowedWorkflowSkills",
31
31
  "acceptanceCriteria",
32
32
  "nonGoals",
33
33
  "targetTests",
@@ -35,7 +35,7 @@
35
35
  "testPolicy"
36
36
  ],
37
37
  "properties": {
38
- "schemaVersion": { "const": 1 },
38
+ "schemaVersion": { "const": 2 },
39
39
  "id": { "type": "string", "pattern": "^TASK-[A-Z0-9-]+$" },
40
40
  "title": { "type": "string", "minLength": 1 },
41
41
  "designApproved": { "const": true },
@@ -53,12 +53,12 @@
53
53
  "minItems": 1,
54
54
  "items": { "type": "string", "minLength": 1 }
55
55
  },
56
- "allowedSuperpowers": {
56
+ "allowedWorkflowSkills": {
57
57
  "type": "array",
58
58
  "const": [
59
- "test-driven-development",
60
- "systematic-debugging",
61
- "verification-before-completion"
59
+ "android-orchestrator-test-driven-development",
60
+ "android-orchestrator-systematic-debugging",
61
+ "android-orchestrator-verification-before-completion"
62
62
  ]
63
63
  },
64
64
  "acceptanceCriteria": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "schemaVersion": 1,
2
+ "schemaVersion": 2,
3
3
  "id": "TASK-EXAMPLE-001",
4
4
  "title": "Replace with one small, observable behavior change",
5
5
  "designApproved": true,
@@ -31,10 +31,10 @@
31
31
  "**/build.gradle",
32
32
  "**/build.gradle.kts"
33
33
  ],
34
- "allowedSuperpowers": [
35
- "test-driven-development",
36
- "systematic-debugging",
37
- "verification-before-completion"
34
+ "allowedWorkflowSkills": [
35
+ "android-orchestrator-test-driven-development",
36
+ "android-orchestrator-systematic-debugging",
37
+ "android-orchestrator-verification-before-completion"
38
38
  ],
39
39
  "acceptanceCriteria": [
40
40
  "Replace with an observable input/output or UI behavior",
@@ -111,7 +111,7 @@ automation_validate_config() {
111
111
  length > 0 and
112
112
  length == (unique | length) and
113
113
  all(.[]; gradle_task);
114
- .schemaVersion == 3 and
114
+ .schemaVersion == 4 and
115
115
  (.enabled | type == "boolean") and
116
116
  (.mode == "shadow" or .mode == "orchestrated") and
117
117
  (.workspaceStrategy == "inPlaceExclusive" or .workspaceStrategy == "isolatedWorktree") and
@@ -130,8 +130,6 @@ automation_validate_config() {
130
130
  (.approvalPhrases.acceptance | type == "string" and length >= 4) and
131
131
  (.approvalPhrases.abort | type == "string" and length >= 4) and
132
132
  (.approvalPhrases.resume | type == "string" and length >= 4) and
133
- (.plugins | type == "object" and keys == ["superpowers"]) and
134
- (.plugins.superpowers | type == "string" and length > 0) and
135
133
  (.requiredSkills | type == "array" and length >= 6) and
136
134
  (.gradleVerification as $verification |
137
135
  ($verification | type == "object") and
@@ -127,9 +127,6 @@ else
127
127
  if ! automation_resolve_opencode_config "$discovery_dir/config.json" "$discovery_dir/config.err"; then
128
128
  automation_die "OpenCode resolved config failed; see $discovery_dir/config.err"
129
129
  fi
130
- superpowers_pin="$(jq -r '.plugins.superpowers' "$AUTOMATION_CONFIG")"
131
- rg -F "$superpowers_pin" "$discovery_dir/config.json" >/dev/null || automation_die "resolved OpenCode config is missing pinned Superpowers"
132
-
133
130
  if ! opencode debug skill > "$discovery_dir/skills.txt" 2> "$discovery_dir/skills.err"; then
134
131
  automation_die "OpenCode skill discovery failed; see $discovery_dir/skills.err"
135
132
  fi
@@ -110,7 +110,7 @@ printf '%s\n' \
110
110
  chmod +x "$fixture/gradlew"
111
111
 
112
112
  jq -n '{
113
- schemaVersion: 3,
113
+ schemaVersion: 4,
114
114
  enabled: true,
115
115
  mode: "orchestrated",
116
116
  workspaceStrategy: "inPlaceExclusive",
@@ -131,18 +131,15 @@ jq -n '{
131
131
  abort: "中止任务,封存修改并恢复原分支。",
132
132
  resume: "恢复任务,重新捕获基线并继续自动执行。"
133
133
  },
134
- plugins: {
135
- superpowers: "superpowers@git+https://github.com/obra/superpowers.git#v6.2.0"
136
- },
137
134
  requiredSkills: [
138
- "brainstorming",
139
- "writing-plans",
135
+ "android-orchestrator-brainstorming",
136
+ "android-orchestrator-writing-plans",
140
137
  "scheduled-quality-orchestrator",
141
138
  "scheduled-quality-coder",
142
139
  "scheduled-quality-reviewer",
143
- "test-driven-development",
144
- "systematic-debugging",
145
- "verification-before-completion"
140
+ "android-orchestrator-test-driven-development",
141
+ "android-orchestrator-systematic-debugging",
142
+ "android-orchestrator-verification-before-completion"
146
143
  ],
147
144
  gradleVerification: {
148
145
  fullUnitTestTasks: ["testDebugUnitTest"],
@@ -195,7 +192,7 @@ jq -n '{
195
192
  }' > "$fixture/automation/config.json"
196
193
 
197
194
  jq -n '{
198
- schemaVersion: 1,
195
+ schemaVersion: 2,
199
196
  id: "TASK-TEST-001",
200
197
  title: "Add an observable greeting behavior",
201
198
  designApproved: true,
@@ -227,10 +224,10 @@ jq -n '{
227
224
  "**/build.gradle.kts",
228
225
  "mobile-client/build.gradle.kts"
229
226
  ],
230
- allowedSuperpowers: [
231
- "test-driven-development",
232
- "systematic-debugging",
233
- "verification-before-completion"
227
+ allowedWorkflowSkills: [
228
+ "android-orchestrator-test-driven-development",
229
+ "android-orchestrator-systematic-debugging",
230
+ "android-orchestrator-verification-before-completion"
234
231
  ],
235
232
  acceptanceCriteria: ["Greeting returns the approved value"],
236
233
  nonGoals: ["No unrelated refactoring"],
@@ -27,7 +27,7 @@ fi
27
27
  jq -e . "$contract" >/dev/null || automation_die "contract is not valid JSON: $contract"
28
28
 
29
29
  jq -e '
30
- .schemaVersion == 1 and
30
+ (.schemaVersion == 1 or .schemaVersion == 2) and
31
31
  (.id | type == "string" and test("^TASK-[A-Z0-9-]+$")) and
32
32
  (.title | type == "string" and length > 0) and
33
33
  .designApproved == true and
@@ -37,7 +37,12 @@ jq -e '
37
37
  (.maxChangedFiles | type == "number" and . >= 1 and . <= 12 and floor == .) and
38
38
  (.allowedPaths | type == "array" and length > 0) and
39
39
  (.forbiddenPaths | type == "array" and length > 0) and
40
- (.allowedSuperpowers == ["test-driven-development", "systematic-debugging", "verification-before-completion"]) and
40
+ (if .schemaVersion == 1 then
41
+ .allowedSuperpowers == ["test-driven-development", "systematic-debugging", "verification-before-completion"]
42
+ else
43
+ .allowedWorkflowSkills == ["android-orchestrator-test-driven-development", "android-orchestrator-systematic-debugging", "android-orchestrator-verification-before-completion"] and
44
+ (has("allowedSuperpowers") | not)
45
+ end) and
41
46
  (.acceptanceCriteria | type == "array" and length > 0) and
42
47
  (.nonGoals | type == "array" and length > 0) and
43
48
  (.targetTests | type == "array" and length > 0 and all(.[];