@markjaquith/agency 2.41.0 → 2.42.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/README.md
CHANGED
|
@@ -91,8 +91,10 @@ can load the hidden file. A customized root file, including a symlink, is
|
|
|
91
91
|
preserved as user-owned content.
|
|
92
92
|
|
|
93
93
|
The OpenCode config loads Agency's hidden instructions in addition to any
|
|
94
|
-
user-owned root `AGENTS.md
|
|
95
|
-
reference
|
|
94
|
+
user-owned root `AGENTS.md`, advertises the complete workbase as one portable
|
|
95
|
+
reference, and replaces the built-in Plan agent with `agency-plan`. That planning
|
|
96
|
+
agent can update `TASK.md`, `PHASE.md`, and `EPIC.md` while other edits remain
|
|
97
|
+
disabled. OpenCode discovers the config from task and epic launch directories.
|
|
96
98
|
Agents receive whole-workbase visibility from that reference. Bash and Agency
|
|
97
99
|
operations must still follow the write authority reported by `agency context`.
|
|
98
100
|
|
package/package.json
CHANGED
|
@@ -40,6 +40,18 @@ describe("init command", () => {
|
|
|
40
40
|
).text()
|
|
41
41
|
const config = JSON.parse(opencode.slice(opencode.indexOf("\n\n") + 2))
|
|
42
42
|
expect(config.instructions).toEqual([".agency/AGENTS.md"])
|
|
43
|
+
expect(config.agent.plan).toEqual({ disable: true })
|
|
44
|
+
expect(config.agent["agency-plan"]).toMatchObject({
|
|
45
|
+
mode: "primary",
|
|
46
|
+
permission: {
|
|
47
|
+
edit: {
|
|
48
|
+
"*": "deny",
|
|
49
|
+
"tasks/*/TASK.md": "allow",
|
|
50
|
+
"tasks/*/phases/*/PHASE.md": "allow",
|
|
51
|
+
"epics/*/EPIC.md": "allow",
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
})
|
|
43
55
|
expect(config.references).toEqual({
|
|
44
56
|
workbase: expect.objectContaining({ path: ".." }),
|
|
45
57
|
})
|
|
@@ -138,10 +138,30 @@ describe("IntegrationService", () => {
|
|
|
138
138
|
expect(body).toContain(".opencode/command/agency.md")
|
|
139
139
|
})
|
|
140
140
|
|
|
141
|
-
test("
|
|
141
|
+
test("configures Agency planning and complete workbase access", () => {
|
|
142
142
|
const config = JSON.parse(managedBody(managedWorkbaseOpencode))
|
|
143
143
|
|
|
144
144
|
expect(config.instructions).toEqual([".agency/AGENTS.md"])
|
|
145
|
+
expect(config.agent).toEqual({
|
|
146
|
+
plan: {
|
|
147
|
+
disable: true,
|
|
148
|
+
},
|
|
149
|
+
"agency-plan": {
|
|
150
|
+
description:
|
|
151
|
+
"Agency planning mode. May edit only Agency planning documents.",
|
|
152
|
+
mode: "primary",
|
|
153
|
+
prompt: expect.stringContaining("You are in Agency Plan mode"),
|
|
154
|
+
permission: {
|
|
155
|
+
question: "allow",
|
|
156
|
+
edit: {
|
|
157
|
+
"*": "deny",
|
|
158
|
+
"tasks/*/TASK.md": "allow",
|
|
159
|
+
"tasks/*/phases/*/PHASE.md": "allow",
|
|
160
|
+
"epics/*/EPIC.md": "allow",
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
})
|
|
145
165
|
expect(config.references).toEqual({
|
|
146
166
|
workbase: {
|
|
147
167
|
path: "..",
|
|
@@ -6,11 +6,35 @@ const managedHeaderPattern =
|
|
|
6
6
|
const checksum = (content: string) =>
|
|
7
7
|
createHash("sha256").update(content).digest("hex")
|
|
8
8
|
|
|
9
|
+
const agencyPlanPrompt = `You are in Agency Plan mode. Think, read, search, and delegate exploration to construct a well-formed plan for the user's goal. Keep the plan comprehensive but concise, and ask clarifying questions when important tradeoffs or intent are unclear.
|
|
10
|
+
|
|
11
|
+
You may edit TASK.md, PHASE.md, and EPIC.md to record the outcome, current approach, and important decisions. Do not edit any other file or use shell commands to modify the system.`
|
|
12
|
+
|
|
9
13
|
const body = () =>
|
|
10
14
|
`${JSON.stringify(
|
|
11
15
|
{
|
|
12
16
|
$schema: "https://opencode.ai/config.json",
|
|
13
17
|
instructions: [".agency/AGENTS.md"],
|
|
18
|
+
agent: {
|
|
19
|
+
plan: {
|
|
20
|
+
disable: true,
|
|
21
|
+
},
|
|
22
|
+
"agency-plan": {
|
|
23
|
+
description:
|
|
24
|
+
"Agency planning mode. May edit only Agency planning documents.",
|
|
25
|
+
mode: "primary",
|
|
26
|
+
prompt: agencyPlanPrompt,
|
|
27
|
+
permission: {
|
|
28
|
+
question: "allow",
|
|
29
|
+
edit: {
|
|
30
|
+
"*": "deny",
|
|
31
|
+
"tasks/*/TASK.md": "allow",
|
|
32
|
+
"tasks/*/phases/*/PHASE.md": "allow",
|
|
33
|
+
"epics/*/EPIC.md": "allow",
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
14
38
|
references: {
|
|
15
39
|
workbase: {
|
|
16
40
|
path: "..",
|