@markjaquith/agency 2.61.2 → 2.61.3

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
@@ -527,6 +527,12 @@ and reference authority, local checkout and resolved-commit state, recorded PR
527
527
  state, and validation warnings. Only `done` satisfies a dependency; `dropped` is
528
528
  terminal but remains a blocker.
529
529
 
530
+ `authority.writable` identifies the writable repository checkout, while
531
+ `authority.documents.writable` lists the absolute paths of Agency documents the
532
+ target may maintain. A single-phase task lists its `TASK.md`; a phase lists its
533
+ owning `TASK.md` and active `PHASE.md`; orchestration targets list none. Use
534
+ Agency commands rather than direct edits for structural frontmatter mutations.
535
+
530
536
  Complete output is the default for entity targets. Pass `--compact` explicitly
531
537
  to omit document prose and low-level Git details while retaining identity,
532
538
  hashes, authority, paths, graph state, materialization state, and validation
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markjaquith/agency",
3
- "version": "2.61.2",
3
+ "version": "2.61.3",
4
4
  "description": "Manage agentic work across repositories with durable workbases",
5
5
  "keywords": [
6
6
  "agents",
@@ -208,6 +208,10 @@ Phase prose.
208
208
  expect(result.documents.task.body).toContain("Task prose.")
209
209
  expect(result.documents.phase.body).toContain("Phase prose.")
210
210
  expect(result.documents.phase.sha256).toMatch(/^[a-f0-9]{64}$/)
211
+ expect(result.authority.documents.writable).toEqual([
212
+ join(root, "tasks/agent-contract/TASK.md"),
213
+ join(root, "tasks/agent-contract/phases/context-command/PHASE.md"),
214
+ ])
211
215
  expect(result.workspace.writable.branchCommit).toMatch(/^[a-f0-9]{40}$/)
212
216
  expect(result.workspace.writable.baseCommit).toMatch(/^[a-f0-9]{40}$/)
213
217
  expect(result.workspace.references[0].resolvedCommit).toMatch(
@@ -232,6 +236,10 @@ Phase prose.
232
236
  registered: true,
233
237
  })
234
238
  expect(result.authority.writable.checkoutPath).toContain("code/agency")
239
+ expect(result.authority.documents.writable).toEqual([
240
+ join(root, "tasks/agent-contract/TASK.md"),
241
+ join(root, "tasks/agent-contract/phases/context-command/PHASE.md"),
242
+ ])
235
243
  })
236
244
 
237
245
  test("reports dependency and validation blockers deterministically", async () => {
@@ -275,6 +283,12 @@ status: dropped
275
283
  taskId: "agent-contract",
276
284
  })
277
285
  expect(task.graph.parent).toEqual({ kind: "epic", id: "contract" })
286
+ expect(task.authority.documents.writable).toEqual([])
287
+
288
+ const executionTask = await readContext(root, "foundations")
289
+ expect(executionTask.authority.documents.writable).toEqual([
290
+ join(root, "tasks/foundations/TASK.md"),
291
+ ])
278
292
 
279
293
  const workbase = await readContext(root, ".")
280
294
  expect(workbase).toMatchObject({
@@ -784,6 +784,15 @@ export class ContextService extends Effect.Service<ContextService>()(
784
784
  : null
785
785
  const reviewData =
786
786
  task?.data && "review" in task.data ? task.data.review : null
787
+ const writableDocuments = reviewData
788
+ ? task
789
+ ? [task.path]
790
+ : []
791
+ : executionData && task
792
+ ? phase
793
+ ? [task.path, phase.path]
794
+ : [task.path]
795
+ : []
787
796
  const references: readonly RepositoryReference[] = reviewData
788
797
  ? [{ repo: reviewData.repo, ref: reviewData.commit }]
789
798
  : executionData
@@ -1078,7 +1087,7 @@ export class ContextService extends Effect.Service<ContextService>()(
1078
1087
  checkoutPath: reference.checkoutPath,
1079
1088
  })),
1080
1089
  documents: {
1081
- writable: reviewData && task ? [task.path] : [],
1090
+ writable: writableDocuments,
1082
1091
  },
1083
1092
  },
1084
1093
  workspace: options.compact
@@ -418,6 +418,7 @@ describe("IntegrationService", () => {
418
418
  expect(body).toContain("agency next --json")
419
419
  expect(body).toContain("agency <command> --help")
420
420
  expect(body).toContain("authority.writable.checkoutPath")
421
+ expect(body).toContain("authority.documents.writable")
421
422
  expect(body).toContain("Only `done` satisfies a dependency")
422
423
  expect(body).toContain("Require explicit user intent")
423
424
  expect(body).toContain(
@@ -48,10 +48,11 @@ agency validate --json
48
48
  - A single-phase task or phase is an execution unit with one writable `repo` and
49
49
  optional read-only `repos`. Only `done` satisfies a dependency; `dropped` is
50
50
  terminal but leaves dependents blocked.
51
- - For an execution unit, write code only at
51
+ - For an execution unit, write repository content only at
52
52
  `authority.writable.checkoutPath`. Every `authority.references` checkout is
53
53
  read-only, even if filesystem permissions allow writes.
54
- - Keep task-wide decisions in `TASK.md` and phase-specific delivery context in
54
+ - Maintain only the Agency documents listed in `authority.documents.writable`:
55
+ keep task-wide decisions in `TASK.md` and phase-specific delivery context in
55
56
  `PHASE.md`. Use Agency commands for structural frontmatter mutations.
56
57
 
57
58
  ## Consent Boundaries