opencode-pair-autonomy 1.0.0 → 1.0.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.
- package/README.md +23 -23
- package/dist/hooks/runtime.d.ts +1 -1
- package/dist/index.js +20 -56
- package/dist/prompts/coordinator.d.ts +0 -1
- package/package.json +2 -2
- package/vendor/skills/opencode-plugin-dev/SKILL.md +6 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# opencode-pair-autonomy
|
|
2
2
|
|
|
3
3
|
OpenCode harness with opinionated agent orchestration. One coordinator, eight specialized workers, automatic verify+review pipeline.
|
|
4
4
|
|
|
@@ -13,17 +13,17 @@ OpenCode harness with opinionated agent orchestration. One coordinator, eight sp
|
|
|
13
13
|
|
|
14
14
|
## Agents
|
|
15
15
|
|
|
16
|
-
| Agent
|
|
17
|
-
|
|
18
|
-
| **Yang**
|
|
19
|
-
| **Thorfinn**
|
|
20
|
-
| **Ginko**
|
|
21
|
-
| **Kaiki**
|
|
22
|
-
| **Odokawa**
|
|
23
|
-
| **Ozen**
|
|
24
|
-
| **Skull Knight** | Scoped failure repair
|
|
25
|
-
| **Paprika**
|
|
26
|
-
| **Rajdhani**
|
|
16
|
+
| Agent | Role | Model |
|
|
17
|
+
| ---------------- | -------------------------------------- | ----------------- |
|
|
18
|
+
| **Yang** | Coordinator — plans, argues, delegates | claude-opus-4-6 |
|
|
19
|
+
| **Thorfinn** | General implementation | claude-sonnet-4-6 |
|
|
20
|
+
| **Ginko** | Web and doc research | claude-sonnet-4-6 |
|
|
21
|
+
| **Kaiki** | Senior code review (read-only) | claude-opus-4-6 |
|
|
22
|
+
| **Odokawa** | Cross-model review (read-only) | gpt-5.4 |
|
|
23
|
+
| **Ozen** | Build, test, lint verification | claude-sonnet-4-6 |
|
|
24
|
+
| **Skull Knight** | Scoped failure repair | claude-sonnet-4-6 |
|
|
25
|
+
| **Paprika** | Frontend, Figma, browser testing | claude-sonnet-4-6 |
|
|
26
|
+
| **Rajdhani** | Fast codebase exploration | claude-sonnet-4-6 |
|
|
27
27
|
|
|
28
28
|
## MCP Servers
|
|
29
29
|
|
|
@@ -32,14 +32,14 @@ OpenCode harness with opinionated agent orchestration. One coordinator, eight sp
|
|
|
32
32
|
## Quick start
|
|
33
33
|
|
|
34
34
|
```bash
|
|
35
|
-
bunx
|
|
35
|
+
bunx opencode-pair-autonomy install
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
From source:
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
|
-
git clone https://github.com/cemalturkcan/
|
|
42
|
-
cd
|
|
41
|
+
git clone https://github.com/cemalturkcan/opencode-pair-autonomy.git
|
|
42
|
+
cd opencode-pair-autonomy
|
|
43
43
|
bun install && bun run build && bun link
|
|
44
44
|
opencode-pair-autonomy install
|
|
45
45
|
```
|
|
@@ -69,14 +69,14 @@ opencode-pair-autonomy init
|
|
|
69
69
|
|
|
70
70
|
## Hooks
|
|
71
71
|
|
|
72
|
-
| Hook
|
|
73
|
-
|
|
74
|
-
| `session.created`
|
|
75
|
-
| `chat.message`
|
|
76
|
-
| `tool.execute.before` | Plan mode gate, long-running command detection
|
|
77
|
-
| `tool.execute.after`
|
|
78
|
-
| `session.idle`
|
|
79
|
-
| `session.compacting`
|
|
72
|
+
| Hook | What it does |
|
|
73
|
+
| --------------------- | ---------------------------------------------------------------------------------- |
|
|
74
|
+
| `session.created` | Prepare session context injection |
|
|
75
|
+
| `chat.message` | Inject mode, project docs, session memory (coordinator) or project facts (workers) |
|
|
76
|
+
| `tool.execute.before` | Plan mode gate, long-running command detection |
|
|
77
|
+
| `tool.execute.after` | Comment guard, file tracking, compact suggestions |
|
|
78
|
+
| `session.idle` | Save session summary, promote learned patterns, cleanup old sessions |
|
|
79
|
+
| `session.compacting` | Pre-compact observation snapshot |
|
|
80
80
|
|
|
81
81
|
## What install changes
|
|
82
82
|
|
package/dist/hooks/runtime.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ declare function estimateTokens(chunks: string[]): number;
|
|
|
29
29
|
export declare function resolveHookProfile(config: HarnessConfig): HookProfile;
|
|
30
30
|
export declare function profileMatches(profile: HookProfile, allowed: HookProfile | HookProfile[]): boolean;
|
|
31
31
|
/**
|
|
32
|
-
* Primary (user-facing)
|
|
32
|
+
* Primary (user-facing) agent that should receive session-context injection.
|
|
33
33
|
* Subagents spawned via Task tool should NOT get previous-session context
|
|
34
34
|
* injected into their system prompt — it causes session mixing.
|
|
35
35
|
*/
|
package/dist/index.js
CHANGED
|
@@ -14802,17 +14802,6 @@ rajdhani (Sunny Boy) \u2014 sonnet-4-6 none
|
|
|
14802
14802
|
Fast codebase recon. Send him first when entering unfamiliar territory.
|
|
14803
14803
|
</WorkerCatalog>
|
|
14804
14804
|
`;
|
|
14805
|
-
var DELEGATION_PRECISION = `
|
|
14806
|
-
<DelegationPrecision>
|
|
14807
|
-
Before delegating, read relevant files yourself. Your worker prompt MUST include:
|
|
14808
|
-
- Exact file paths and line numbers.
|
|
14809
|
-
- Specific type/function names involved.
|
|
14810
|
-
- "Change THIS, not THAT" when ambiguity exists.
|
|
14811
|
-
- Context not in the files (user intent, constraints).
|
|
14812
|
-
|
|
14813
|
-
For broad scope (5+ files unknown), spawn rajdhani first for recon.
|
|
14814
|
-
</DelegationPrecision>
|
|
14815
|
-
`;
|
|
14816
14805
|
var AUTOMATIC_WORKFLOW = `
|
|
14817
14806
|
<AutomaticWorkflow>
|
|
14818
14807
|
After implementation is complete:
|
|
@@ -14831,8 +14820,8 @@ You operate in two modes, controlled by /go and /plan commands:
|
|
|
14831
14820
|
|
|
14832
14821
|
[Mode: Planning] (default at session start)
|
|
14833
14822
|
- Discuss, argue, read files, create plan with TodoWrite.
|
|
14834
|
-
- You
|
|
14835
|
-
-
|
|
14823
|
+
- You CAN spawn read-only workers: rajdhani (scout), ginko (research), kaiki (review), odokawa (review).
|
|
14824
|
+
- You CANNOT spawn implementation workers (thorfinn, ozen, skull-knight, paprika) or use edit/write/patch tools.
|
|
14836
14825
|
- When your plan is ready, tell the user and wait for /go.
|
|
14837
14826
|
|
|
14838
14827
|
[Mode: Executing] (after /go)
|
|
@@ -14843,13 +14832,6 @@ You operate in two modes, controlled by /go and /plan commands:
|
|
|
14843
14832
|
- After everything is done, mode returns to Planning.
|
|
14844
14833
|
</PlanMode>
|
|
14845
14834
|
`;
|
|
14846
|
-
var DIRECT_ACTION = `
|
|
14847
|
-
<DirectAction>
|
|
14848
|
-
Direct (no worker): Read/Glob/Grep/fff, research (context7/websearch/grep_app), database (pg-mcp/ssh-mcp/mariadb), read-only git, trivial edits (typo, config value, \u22645 lines in one file).
|
|
14849
|
-
Delegate: new files, 2+ files, >5 lines, build/test/lint, any filesystem-modifying bash.
|
|
14850
|
-
When in doubt, delegate.
|
|
14851
|
-
</DirectAction>
|
|
14852
|
-
`;
|
|
14853
14835
|
var INPUT_HANDLING = `
|
|
14854
14836
|
<InputHandling>
|
|
14855
14837
|
On large paste: acknowledge immediately, process, respond. Never go silent.
|
|
@@ -14879,26 +14861,7 @@ Found: tell worker to skill_use first. Not found: proceed without.
|
|
|
14879
14861
|
After novel implementations, suggest /create-skill.
|
|
14880
14862
|
</SkillManagement>
|
|
14881
14863
|
`;
|
|
14882
|
-
|
|
14883
|
-
const sections = [
|
|
14884
|
-
COORDINATOR_CORE,
|
|
14885
|
-
RESPONSE_DISCIPLINE,
|
|
14886
|
-
buildMcpCatalog(),
|
|
14887
|
-
WORKER_CATALOG,
|
|
14888
|
-
DELEGATION_PRECISION,
|
|
14889
|
-
AUTOMATIC_WORKFLOW,
|
|
14890
|
-
PLAN_MODE,
|
|
14891
|
-
DIRECT_ACTION,
|
|
14892
|
-
INPUT_HANDLING,
|
|
14893
|
-
WORKER_CONTINUATION,
|
|
14894
|
-
PARALLEL_SAFETY,
|
|
14895
|
-
ACTION_SAFETY,
|
|
14896
|
-
SKILL_MANAGEMENT
|
|
14897
|
-
];
|
|
14898
|
-
return withPromptAppend(sections.join(`
|
|
14899
|
-
`), promptAppend);
|
|
14900
|
-
}
|
|
14901
|
-
var DELEGATION_EXP = `
|
|
14864
|
+
var DELEGATION = `
|
|
14902
14865
|
<Delegation>
|
|
14903
14866
|
## Your Role
|
|
14904
14867
|
|
|
@@ -14977,13 +14940,13 @@ Use rajdhani when you need to understand an unfamiliar area of the codebase.
|
|
|
14977
14940
|
Reading 1-2 files yourself is fine. For broader exploration, scout first \u2014 its compact report lets you write better worker prompts.
|
|
14978
14941
|
</Delegation>
|
|
14979
14942
|
`;
|
|
14980
|
-
function
|
|
14943
|
+
function buildCoordinatorPrompt(promptAppend) {
|
|
14981
14944
|
const sections = [
|
|
14982
14945
|
COORDINATOR_CORE,
|
|
14983
14946
|
RESPONSE_DISCIPLINE,
|
|
14984
14947
|
buildMcpCatalog(),
|
|
14985
14948
|
WORKER_CATALOG,
|
|
14986
|
-
|
|
14949
|
+
DELEGATION,
|
|
14987
14950
|
AUTOMATIC_WORKFLOW,
|
|
14988
14951
|
PLAN_MODE,
|
|
14989
14952
|
INPUT_HANDLING,
|
|
@@ -15271,16 +15234,6 @@ function createHarnessAgents(config2) {
|
|
|
15271
15234
|
tools: COORDINATOR_DISABLED_TOOLS,
|
|
15272
15235
|
permission: { task: COORDINATOR_TASK_PERMISSIONS }
|
|
15273
15236
|
}, overrides.yang),
|
|
15274
|
-
"yang-exp": withOverride({
|
|
15275
|
-
mode: "primary",
|
|
15276
|
-
description: "Yang Wenli (Experimental) \u2014 Judgment-based delegation coordinator.",
|
|
15277
|
-
model: "anthropic/claude-opus-4-6",
|
|
15278
|
-
variant: "max",
|
|
15279
|
-
prompt: buildCoordinatorPromptExp(overrides["yang-exp"]?.prompt_append),
|
|
15280
|
-
color: "#7B68EE",
|
|
15281
|
-
tools: COORDINATOR_DISABLED_TOOLS,
|
|
15282
|
-
permission: { task: COORDINATOR_TASK_PERMISSIONS }
|
|
15283
|
-
}, overrides["yang-exp"]),
|
|
15284
15237
|
thorfinn: withOverride({
|
|
15285
15238
|
mode: "subagent",
|
|
15286
15239
|
hidden: true,
|
|
@@ -16389,7 +16342,7 @@ function resolveHookProfile(config2) {
|
|
|
16389
16342
|
function profileMatches(profile, allowed) {
|
|
16390
16343
|
return (Array.isArray(allowed) ? allowed : [allowed]).includes(profile);
|
|
16391
16344
|
}
|
|
16392
|
-
var PRIMARY_AGENTS = new Set(["yang"
|
|
16345
|
+
var PRIMARY_AGENTS = new Set(["yang"]);
|
|
16393
16346
|
function resolveSessionID(value) {
|
|
16394
16347
|
if (!value || typeof value !== "object")
|
|
16395
16348
|
return;
|
|
@@ -16943,8 +16896,19 @@ function safeHook(name, hook) {
|
|
|
16943
16896
|
var NODE_COMMAND_RE = /^(npm|pnpm|yarn|bun|npx|bunx|node|tsc|tsx|vite|next|nuxt|vitest|jest|eslint|prettier)\b/;
|
|
16944
16897
|
var NODE_MODULES_BIN_RE = /node_modules\/\.bin\//;
|
|
16945
16898
|
var PLAN_MODE_BLOCKED_TOOLS = new Set(["task", "edit", "write", "patch"]);
|
|
16946
|
-
|
|
16947
|
-
|
|
16899
|
+
var PLAN_MODE_ALLOWED_AGENTS = new Set([
|
|
16900
|
+
"ginko",
|
|
16901
|
+
"kaiki",
|
|
16902
|
+
"odokawa",
|
|
16903
|
+
"rajdhani"
|
|
16904
|
+
]);
|
|
16905
|
+
function isBlockedTaskInPlanMode(tool, args) {
|
|
16906
|
+
if (tool !== "task" && !tool.startsWith("task_"))
|
|
16907
|
+
return false;
|
|
16908
|
+
const target = typeof args.subagent_type === "string" ? args.subagent_type : typeof args.agent === "string" ? args.agent : undefined;
|
|
16909
|
+
if (target && PLAN_MODE_ALLOWED_AGENTS.has(target))
|
|
16910
|
+
return false;
|
|
16911
|
+
return true;
|
|
16948
16912
|
}
|
|
16949
16913
|
function isNodeCommand(command) {
|
|
16950
16914
|
return NODE_COMMAND_RE.test(command.trim()) || NODE_MODULES_BIN_RE.test(command);
|
|
@@ -16967,7 +16931,7 @@ function createPreToolUseHook(config2, runtime, profile) {
|
|
|
16967
16931
|
runtime.incrementToolCount(sessionID);
|
|
16968
16932
|
}
|
|
16969
16933
|
if (sessionID && agent && PRIMARY_AGENTS.has(agent) && tool && runtime.getPlanMode(sessionID) === "planning") {
|
|
16970
|
-
const blocked = PLAN_MODE_BLOCKED_TOOLS.has(tool) ||
|
|
16934
|
+
const blocked = PLAN_MODE_BLOCKED_TOOLS.has(tool) || isBlockedTaskInPlanMode(tool, args);
|
|
16971
16935
|
if (blocked) {
|
|
16972
16936
|
const count = runtime.incrementPlanModeBlock(sessionID);
|
|
16973
16937
|
const msg = count >= 3 ? "[PlanMode] STILL in planning mode. You have attempted execution tools multiple times. STOP trying. Complete your plan with TodoWrite. The user will /go to start execution." : "[PlanMode] You are in planning mode. Cannot use execution tools. Use Read/Glob/Grep/TodoWrite to continue planning. The user will /go to start execution.";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-pair-autonomy",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "OpenCode harness with opinionated agent orchestration. One coordinator, eight specialized workers, automatic verify+review pipeline.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
},
|
|
89
89
|
"repository": {
|
|
90
90
|
"type": "git",
|
|
91
|
-
"url": "git+https://github.com/cemalturkcan/
|
|
91
|
+
"url": "git+https://github.com/cemalturkcan/opencode-pair-autonomy.git"
|
|
92
92
|
},
|
|
93
93
|
"license": "MIT",
|
|
94
94
|
"dependencies": {
|
|
@@ -4,14 +4,17 @@ description: Build and refine OpenCode harness, MCP, plugin, prompt, and agent-t
|
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Purpose
|
|
7
|
-
|
|
7
|
+
|
|
8
|
+
Use this skill for work in `opencode-pair-autonomy`, related OpenCode plugins, and MCP or agent-tooling repositories in this workspace.
|
|
8
9
|
|
|
9
10
|
## Use When
|
|
11
|
+
|
|
10
12
|
- The task touches prompts, tool wiring, plugin install flows, MCP servers, vendor wrappers, or agent coordination.
|
|
11
13
|
- The repo uses TypeScript with `@modelcontextprotocol/sdk`, Zod, CLI wiring, plugin manifests, or prompt assembly.
|
|
12
14
|
- You need to preserve harness behavior while extending skill usage, tool exposure, or automation flows.
|
|
13
15
|
|
|
14
16
|
## Working Method
|
|
17
|
+
|
|
15
18
|
1. Inspect existing prompt layers, install flow, and tool contracts before changing behavior.
|
|
16
19
|
2. Reuse current naming, file placement, and config conventions for plugins, MCP wrappers, and prompts.
|
|
17
20
|
3. Keep changes additive and architecture-preserving unless the user explicitly requests a structural shift.
|
|
@@ -19,6 +22,7 @@ Use this skill for work in `oh-my-pair-code`, related OpenCode plugins, and MCP
|
|
|
19
22
|
5. Surface user-visible behavior changes clearly, especially when they affect session restart, tool availability, or external installs.
|
|
20
23
|
|
|
21
24
|
## Repo Conventions To Prefer
|
|
25
|
+
|
|
22
26
|
- Keep prompt policy explicit, concrete, and action-oriented.
|
|
23
27
|
- Prefer dedicated tools over shell when the harness already exposes a safer interface.
|
|
24
28
|
- Preserve non-interactive shell assumptions for installs, git, and automation.
|
|
@@ -26,6 +30,7 @@ Use this skill for work in `oh-my-pair-code`, related OpenCode plugins, and MCP
|
|
|
26
30
|
- Avoid hidden magic; make automation behavior legible in code and config.
|
|
27
31
|
|
|
28
32
|
## Guardrails
|
|
33
|
+
|
|
29
34
|
- Do not silently broaden permissions, change security posture, or alter external side effects.
|
|
30
35
|
- Do not add new dependencies when current tooling or plugins already solve the problem.
|
|
31
36
|
- Do not make prompt changes that encourage architecture drift or speculative behavior.
|