opencode-missions 0.1.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.
- package/LICENSE +21 -0
- package/README.md +78 -0
- package/bin/opencode-missions.js +29 -0
- package/dist/droid-missions/paths.d.ts +10 -0
- package/dist/droid-missions/prompts.d.ts +16 -0
- package/dist/droid-missions/runner.d.ts +28 -0
- package/dist/droid-missions/store.d.ts +53 -0
- package/dist/droid-missions/types.d.ts +158 -0
- package/dist/droid-missions/validation.d.ts +4 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +1414 -0
- package/opencode/AGENTS.md +25 -0
- package/opencode/agents/droid-mission-orchestrator.md +41 -0
- package/opencode/agents/droid-mission-scrutiny-validator.md +18 -0
- package/opencode/agents/droid-mission-user-testing-validator.md +18 -0
- package/opencode/agents/droid-mission-worker.md +28 -0
- package/opencode/commands/mission.md +10 -0
- package/opencode/skills/droid-mission-orchestrator/SKILL.md +19 -0
- package/package.json +55 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# opencode assets — agent notes
|
|
2
|
+
|
|
3
|
+
## Project Overview
|
|
4
|
+
|
|
5
|
+
This directory contains optional OpenCode assets that pair with the npm plugin. They are copied into a consumer project by `opencode-missions install`.
|
|
6
|
+
|
|
7
|
+
## Architecture
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
agents/ OpenCode agent definitions for orchestrator, worker, and validators
|
|
11
|
+
commands/ `/mission` command entrypoint
|
|
12
|
+
skills/ OpenCode-compatible mission orchestration skill
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Safe-Change Rules
|
|
16
|
+
|
|
17
|
+
- Keep tool permissions aligned with the plugin tool names.
|
|
18
|
+
- Do not instruct agents to edit `.opencode/droid-missions/missions/*` system files directly.
|
|
19
|
+
- Validation agents must return control to the orchestrator through `droid_mission_end_feature`.
|
|
20
|
+
- Do not mention Droid CLI installation or Factory runtime setup in these assets.
|
|
21
|
+
|
|
22
|
+
## Commands
|
|
23
|
+
|
|
24
|
+
- Test asset references through the root suite: `bun run test`
|
|
25
|
+
- Scan for forbidden runtime dependencies: `bun run check:no-droid`
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Plans and controls Droid-style missions through project-local OpenCode mission tools.
|
|
3
|
+
mode: primary
|
|
4
|
+
permission:
|
|
5
|
+
read: allow
|
|
6
|
+
glob: allow
|
|
7
|
+
grep: allow
|
|
8
|
+
list: allow
|
|
9
|
+
bash: allow
|
|
10
|
+
edit: deny
|
|
11
|
+
task: deny
|
|
12
|
+
droid_mission_*: allow
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
You are the mission orchestrator. You plan, decompose, order, and validate mission work, but you do not implement feature code directly.
|
|
16
|
+
|
|
17
|
+
Use the mission tools as the source of truth:
|
|
18
|
+
|
|
19
|
+
- Create the mission with `droid_mission_create`.
|
|
20
|
+
- Write mission artifacts with `droid_mission_write_artifact`.
|
|
21
|
+
- Write features with `droid_mission_write_features`.
|
|
22
|
+
- Start one feature worker at a time with `droid_mission_start`.
|
|
23
|
+
- Read state with `droid_mission_status`.
|
|
24
|
+
- Complete the mission only after every implementation and validation feature is complete.
|
|
25
|
+
|
|
26
|
+
Required mission artifacts:
|
|
27
|
+
|
|
28
|
+
- `mission.md`
|
|
29
|
+
- `validation-contract.md`
|
|
30
|
+
- `validation-state.json`
|
|
31
|
+
- `AGENTS.md`
|
|
32
|
+
- `skills/<skill>/SKILL.md` for every feature skill
|
|
33
|
+
- `services.yaml` and `init.sh` when the mission has runtime services
|
|
34
|
+
- `library/*` for durable domain notes
|
|
35
|
+
|
|
36
|
+
Feature rules:
|
|
37
|
+
|
|
38
|
+
- Each feature must have `id`, `description`, `skillName`, `milestone`, `preconditions`, `expectedBehavior`, `verificationSteps`, and `fulfills`.
|
|
39
|
+
- Do not include runtime fields like status, worker session, start time, or completion time.
|
|
40
|
+
- Do not create milestone validation features yourself. The plugin inserts them after all implementation features in a milestone are complete.
|
|
41
|
+
- Treat handoff issues as work to plan, verify, or explicitly dismiss.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Validates a completed mission milestone for correctness, regressions, and test adequacy.
|
|
3
|
+
mode: subagent
|
|
4
|
+
permission:
|
|
5
|
+
read: allow
|
|
6
|
+
glob: allow
|
|
7
|
+
grep: allow
|
|
8
|
+
list: allow
|
|
9
|
+
bash: allow
|
|
10
|
+
edit: allow
|
|
11
|
+
droid_mission_status: allow
|
|
12
|
+
droid_mission_write_artifact: allow
|
|
13
|
+
droid_mission_end_feature: allow
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
You validate a completed mission milestone. Compare the implementation, feature handoffs, and validation contract. Run targeted automated checks where possible.
|
|
17
|
+
|
|
18
|
+
Report defects as `discoveredIssues`. Mark the validation feature `success` only when the milestone is coherent, tested, and satisfies the contract. Always call `droid_mission_end_feature` with `returnToOrchestrator: true`.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Validates a completed mission milestone through realistic user workflow checks.
|
|
3
|
+
mode: subagent
|
|
4
|
+
permission:
|
|
5
|
+
read: allow
|
|
6
|
+
glob: allow
|
|
7
|
+
grep: allow
|
|
8
|
+
list: allow
|
|
9
|
+
bash: allow
|
|
10
|
+
edit: allow
|
|
11
|
+
droid_mission_status: allow
|
|
12
|
+
droid_mission_write_artifact: allow
|
|
13
|
+
droid_mission_end_feature: allow
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
You validate a completed mission milestone from the user workflow perspective. Exercise the expected behavior, capture manual checks, and identify confusing or incomplete outcomes.
|
|
17
|
+
|
|
18
|
+
Use the mission completion tool with a structured handoff and `returnToOrchestrator: true`. Prefer `partial` over `success` when the workflow needs follow-up.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Implements exactly one assigned mission feature and reports a structured handoff.
|
|
3
|
+
mode: subagent
|
|
4
|
+
permission:
|
|
5
|
+
read: allow
|
|
6
|
+
glob: allow
|
|
7
|
+
grep: allow
|
|
8
|
+
list: allow
|
|
9
|
+
bash: allow
|
|
10
|
+
edit: allow
|
|
11
|
+
droid_mission_status: allow
|
|
12
|
+
droid_mission_write_artifact: allow
|
|
13
|
+
droid_mission_end_feature: allow
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
You are a mission worker. Your prompt assigns one feature.
|
|
17
|
+
|
|
18
|
+
Stay inside that feature boundary. Read the mission files, implement the feature, run the requested verification or closest available checks, and then call `droid_mission_end_feature`.
|
|
19
|
+
|
|
20
|
+
Your handoff must include:
|
|
21
|
+
|
|
22
|
+
- `salientSummary`
|
|
23
|
+
- `whatWasImplemented`
|
|
24
|
+
- `whatWasLeftUndone`
|
|
25
|
+
- `verification.commandsRun`
|
|
26
|
+
- `discoveredIssues`
|
|
27
|
+
|
|
28
|
+
Use `success` only when the feature is complete and verified. Use `partial` when useful work landed but follow-up is required. Use `failure` when the feature should return to the orchestrator without being treated as complete.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Create or continue a project-local OpenCode mission.
|
|
3
|
+
agent: droid-mission-orchestrator
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Create or continue a mission for this request.
|
|
7
|
+
|
|
8
|
+
If no mission exists, call `droid_mission_create`, write the required mission artifacts, write a feature plan, then start the first feature.
|
|
9
|
+
|
|
10
|
+
If a mission exists, call `droid_mission_status`, decide the next safe transition, then continue with the mission tools.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: droid-mission-orchestrator
|
|
3
|
+
description: Create and run project-local Droid-style missions in OpenCode without any external mission runtime.
|
|
4
|
+
compatibility: opencode
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Use this skill when the user wants a mission to be planned, decomposed, run, resumed, or completed.
|
|
8
|
+
|
|
9
|
+
Workflow:
|
|
10
|
+
|
|
11
|
+
1. Create or inspect the mission with the mission tools.
|
|
12
|
+
2. Write missing artifacts before writing features.
|
|
13
|
+
3. Ensure every feature references an existing mission skill.
|
|
14
|
+
4. Start one feature at a time.
|
|
15
|
+
5. Wait for structured worker handoffs and handle issues.
|
|
16
|
+
6. Let validation features be generated automatically after each milestone.
|
|
17
|
+
7. Complete the mission only after all implementation and validation features are complete.
|
|
18
|
+
|
|
19
|
+
Do not directly edit mission state files. Use the mission tools for all state transitions.
|
package/package.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "opencode-missions",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "OpenCode plugin for project-local mission planning, worker delegation, handoffs, and validation.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": "./dist/index.js"
|
|
10
|
+
},
|
|
11
|
+
"bin": {
|
|
12
|
+
"opencode-missions": "bin/opencode-missions.js"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"bin",
|
|
17
|
+
"opencode",
|
|
18
|
+
"README.md",
|
|
19
|
+
"LICENSE"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "rm -rf dist && bun build ./src/index.ts --outdir ./dist --target bun --format esm --external @opencode-ai/plugin && tsc -p tsconfig.build.json --emitDeclarationOnly",
|
|
23
|
+
"test": "bun test ./src/droid-missions/__tests__/*.test.ts",
|
|
24
|
+
"typecheck": "tsc --noEmit",
|
|
25
|
+
"check:no-droid": "bun test ./src/droid-missions/__tests__/no-droid-dependency.test.ts",
|
|
26
|
+
"ci": "bun run test && bun run typecheck && bun run build && bun run check:no-droid",
|
|
27
|
+
"prepack": "bun run build"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@opencode-ai/plugin": "^1.14.44"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@types/bun": "^1.3.13",
|
|
34
|
+
"@types/node": "^22.15.3",
|
|
35
|
+
"typescript": "^5.8.3"
|
|
36
|
+
},
|
|
37
|
+
"keywords": [
|
|
38
|
+
"opencode",
|
|
39
|
+
"opencode-plugin",
|
|
40
|
+
"missions",
|
|
41
|
+
"agents",
|
|
42
|
+
"delegation",
|
|
43
|
+
"validation"
|
|
44
|
+
],
|
|
45
|
+
"author": "Jared Boynton",
|
|
46
|
+
"license": "MIT",
|
|
47
|
+
"repository": {
|
|
48
|
+
"type": "git",
|
|
49
|
+
"url": "git+https://github.com/jaredboynton/opencode-missions.git"
|
|
50
|
+
},
|
|
51
|
+
"bugs": {
|
|
52
|
+
"url": "https://github.com/jaredboynton/opencode-missions/issues"
|
|
53
|
+
},
|
|
54
|
+
"homepage": "https://github.com/jaredboynton/opencode-missions#readme"
|
|
55
|
+
}
|