@markjaquith/agency 2.46.0 → 2.47.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
@@ -99,7 +99,11 @@ The OpenCode config defines an `@agency` subagent for delegated workbase
99
99
  orchestration, loads Agency's hidden instructions in addition to any user-owned
100
100
  root `AGENTS.md`, advertises the complete workbase as one portable reference,
101
101
  and replaces the built-in Plan agent with `agency-plan`. That planning agent can
102
- update `TASK.md`, `PHASE.md`, and `EPIC.md` while other edits remain disabled.
102
+ update `TASK.md`, `PHASE.md`, and `EPIC.md`, inspect the workbase through
103
+ read-only Agency commands, and use explicit Agency CLI permissions to create or
104
+ update planning structure. Its normal research tools and the complete Agency CLI
105
+ remain available; managed Agency instructions and reported authority govern each
106
+ operation.
103
107
  When the subagent launches work in another agent, it verifies that the runner
104
108
  started and returns without waiting for the task to finish.
105
109
  The TUI-only `/agency-debug` command reports TUI companion initialization and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markjaquith/agency",
3
- "version": "2.46.0",
3
+ "version": "2.47.0",
4
4
  "description": "Manage agentic work across repositories with durable workbases",
5
5
  "keywords": [
6
6
  "agents",
@@ -49,6 +49,9 @@ describe("init command", () => {
49
49
  expect(config.agent["agency-plan"]).toMatchObject({
50
50
  mode: "primary",
51
51
  permission: {
52
+ bash: {
53
+ "agency *": "allow",
54
+ },
52
55
  edit: {
53
56
  "*": "deny",
54
57
  "tasks/*/TASK.md": "allow",
@@ -283,11 +283,14 @@ describe("IntegrationService", () => {
283
283
  },
284
284
  "agency-plan": {
285
285
  description:
286
- "Agency planning mode. May edit only Agency planning documents.",
286
+ "Agency planning mode. May update Agency plans and planning structure.",
287
287
  mode: "primary",
288
288
  prompt: expect.stringContaining("You are in Agency Plan mode"),
289
289
  permission: {
290
290
  question: "allow",
291
+ bash: {
292
+ "agency *": "allow",
293
+ },
291
294
  edit: {
292
295
  "*": "deny",
293
296
  "tasks/*/TASK.md": "allow",
@@ -307,6 +310,23 @@ describe("IntegrationService", () => {
307
310
  expect(config.agent.agency.prompt).toContain(
308
311
  "return without waiting for the task to finish",
309
312
  )
313
+ expect(config.agent["agency-plan"].prompt).toContain(
314
+ "Start with `agency context . --json`",
315
+ )
316
+ expect(config.agent["agency-plan"].prompt).toContain(
317
+ "decompose it into independently deliverable tasks",
318
+ )
319
+ expect(config.agent["agency-plan"].prompt).toContain("Use `--if-revision`")
320
+ expect(config.agent["agency-plan"].prompt).toContain(
321
+ "available ticket tools",
322
+ )
323
+ expect(config.agent["agency-plan"].prompt).toContain(
324
+ "changing lifecycle state",
325
+ )
326
+ expect(config.agent["agency-plan"].prompt).toContain(
327
+ "Follow the managed Agency instructions and reported authority",
328
+ )
329
+ expect(config.agent["agency-plan"].permission.bash["*"]).toBeUndefined()
310
330
  expect(config.references).toEqual({
311
331
  workbase: {
312
332
  path: "..",
@@ -8,7 +8,17 @@ const checksum = (content: string) =>
8
8
 
9
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
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.`
11
+ Start with \`agency context . --json\`. Use its document paths and revisions, then inspect the graph, related epics, tasks, phases, linked tickets, and repository declarations needed to understand the work. Use machine-readable Agency output when available instead of inferring structure from directory names.
12
+
13
+ When planning an epic, decompose it into independently deliverable tasks with explicit dependencies. Add phases only when one task genuinely requires multiple ordered delivery units. Reuse or update existing work instead of creating duplicate tasks or phases.
14
+
15
+ Use the Agency CLI for full workbase orchestration when the plan requires it, including creating or updating related epics, tasks, and phases; moving tasks; maintaining dependencies; and changing lifecycle state. Use \`--if-revision\` with the revision returned by context for mutations that support it, and run \`agency validate\` after changing workbase structure. Use available ticket tools to inspect or update a linked external ticket when the plan requires it.
16
+
17
+ 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. Follow the managed Agency instructions and reported authority for every Agency operation.`
18
+
19
+ const agencyPlanBashPermissions = {
20
+ "agency *": "allow",
21
+ }
12
22
 
13
23
  const body = () =>
14
24
  `${JSON.stringify(
@@ -28,11 +38,12 @@ const body = () =>
28
38
  },
29
39
  "agency-plan": {
30
40
  description:
31
- "Agency planning mode. May edit only Agency planning documents.",
41
+ "Agency planning mode. May update Agency plans and planning structure.",
32
42
  mode: "primary",
33
43
  prompt: agencyPlanPrompt,
34
44
  permission: {
35
45
  question: "allow",
46
+ bash: agencyPlanBashPermissions,
36
47
  edit: {
37
48
  "*": "deny",
38
49
  "tasks/*/TASK.md": "allow",