@markjaquith/agency 2.73.2 → 2.74.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
|
@@ -631,7 +631,7 @@ included in generated or executed pull request commands.
|
|
|
631
631
|
|
|
632
632
|
### Target Context
|
|
633
633
|
|
|
634
|
-
`agency context [target] --json` returns
|
|
634
|
+
`agency context [target] --json` returns compact bootstrap context without
|
|
635
635
|
modifying the workbase or fetching repositories. At the workbase root it returns
|
|
636
636
|
a discovery catalog of all epics, tasks, and phases, including frontmatter,
|
|
637
637
|
paths, and document revisions. Elsewhere it returns context for an epic, task,
|
|
@@ -642,15 +642,15 @@ explicitly marked with `target.archived: true` and never grants writable
|
|
|
642
642
|
document, repository checkout, or reference authority; restore the item before
|
|
643
643
|
attempting mutation or execution.
|
|
644
644
|
|
|
645
|
-
Root discovery
|
|
646
|
-
. --full --json` when document prose is needed.
|
|
647
|
-
|
|
645
|
+
Root discovery and entity context are compact by default. Root discovery includes
|
|
646
|
+
a hint to run `agency context . --full --json` when document prose is needed.
|
|
647
|
+
`--compact` remains available as an explicit request for the compact projection.
|
|
648
648
|
|
|
649
|
-
The result includes workbase and target identity, ancestor frontmatter
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
649
|
+
The result includes workbase and target identity, ancestor frontmatter with
|
|
650
|
+
SHA-256 hashes, dependency and readiness state, aggregate status, writable and
|
|
651
|
+
reference authority, local materialization state, recorded PR state, and
|
|
652
|
+
validation warnings. Only `done` satisfies a dependency; `dropped` is terminal
|
|
653
|
+
but remains a blocker.
|
|
654
654
|
|
|
655
655
|
`authority.writable` identifies the writable repository checkout, while
|
|
656
656
|
`authority.documents.writable` lists the absolute paths of Agency documents the
|
|
@@ -658,10 +658,9 @@ target may maintain. A single-phase task lists its `TASK.md`; a phase lists its
|
|
|
658
658
|
owning `TASK.md` and active `PHASE.md`; orchestration targets list none. Use
|
|
659
659
|
Agency commands rather than direct edits for structural frontmatter mutations.
|
|
660
660
|
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
warnings.
|
|
661
|
+
Pass `--full` to include document prose and low-level VCS details. Compact output
|
|
662
|
+
retains identity, hashes, authority, paths, graph state, materialization state,
|
|
663
|
+
recorded PR state, and validation warnings.
|
|
665
664
|
|
|
666
665
|
### Workbase Graph
|
|
667
666
|
|
package/package.json
CHANGED
|
@@ -161,9 +161,9 @@ Phase prose.
|
|
|
161
161
|
await cleanupTempDir(root)
|
|
162
162
|
})
|
|
163
163
|
|
|
164
|
-
test("returns
|
|
164
|
+
test("returns full phase context with graph, authority, Git, and validation state", async () => {
|
|
165
165
|
const target = "tasks/agent-contract/phases/context-command"
|
|
166
|
-
const result = await readContext(root, target)
|
|
166
|
+
const result = await readContext(root, target, false, true)
|
|
167
167
|
|
|
168
168
|
expect(result).toMatchObject({
|
|
169
169
|
projection: "complete",
|
|
@@ -273,7 +273,7 @@ status: working
|
|
|
273
273
|
const currentCommit = (await new Response(current.stdout).text()).trim()
|
|
274
274
|
expect(await current.exited).toBe(0)
|
|
275
275
|
|
|
276
|
-
const result = await readContext(root, "tasks/example")
|
|
276
|
+
const result = await readContext(root, "tasks/example", false, true)
|
|
277
277
|
expect(result.workspace.writable).toMatchObject({
|
|
278
278
|
branchCommit: null,
|
|
279
279
|
checkoutCommit: currentCommit,
|
|
@@ -286,14 +286,19 @@ status: working
|
|
|
286
286
|
)
|
|
287
287
|
})
|
|
288
288
|
|
|
289
|
-
test("
|
|
289
|
+
test("defaults to compact while preserving explicit compact compatibility", async () => {
|
|
290
290
|
const result = await readContext(
|
|
291
291
|
root,
|
|
292
292
|
"tasks/agent-contract/phases/context-command/code/agency",
|
|
293
|
+
)
|
|
294
|
+
const explicit = await readContext(
|
|
295
|
+
root,
|
|
296
|
+
"tasks/agent-contract/phases/context-command/code/agency",
|
|
293
297
|
true,
|
|
294
298
|
)
|
|
295
299
|
|
|
296
300
|
expect(result.projection).toBe("compact")
|
|
301
|
+
expect(explicit).toEqual(result)
|
|
297
302
|
expect(result.target.kind).toBe("phase")
|
|
298
303
|
expect(result.documents.phase.body).toBeUndefined()
|
|
299
304
|
expect(result.documents.phase.data.branch).toBe("feat/context")
|
|
@@ -441,7 +446,7 @@ status: dropped
|
|
|
441
446
|
join(root, "archive/tasks/foundations"),
|
|
442
447
|
)
|
|
443
448
|
|
|
444
|
-
const result = await readContext(root, "foundations")
|
|
449
|
+
const result = await readContext(root, "foundations", false, true)
|
|
445
450
|
|
|
446
451
|
expect(result.target).toMatchObject({
|
|
447
452
|
kind: "task",
|
|
@@ -488,6 +493,8 @@ status: dropped
|
|
|
488
493
|
const result = await readContext(
|
|
489
494
|
root,
|
|
490
495
|
"archive/tasks/agent-contract/phases/context-command",
|
|
496
|
+
false,
|
|
497
|
+
true,
|
|
491
498
|
)
|
|
492
499
|
|
|
493
500
|
expect(result.target).toMatchObject({
|
|
@@ -529,7 +536,7 @@ status: dropped
|
|
|
529
536
|
)
|
|
530
537
|
}
|
|
531
538
|
|
|
532
|
-
const result = await readContext(root, "epics/contract")
|
|
539
|
+
const result = await readContext(root, "epics/contract", false, true)
|
|
533
540
|
|
|
534
541
|
expect(result.target).toMatchObject({
|
|
535
542
|
kind: "epic",
|
package/src/commands/context.ts
CHANGED
|
@@ -21,16 +21,16 @@ export const context = (options: ContextOptions = {}) =>
|
|
|
21
21
|
export const help = `
|
|
22
22
|
Usage: agency context [target] [options]
|
|
23
23
|
|
|
24
|
-
Return
|
|
25
|
-
target defaults to the current directory and may be the workbase
|
|
26
|
-
path, or a task ID. Archived entities are inspectable but never
|
|
27
|
-
or execution authority. Workbase context catalogs all active
|
|
28
|
-
phases.
|
|
24
|
+
Return read-only context for a workbase, epic, task, or phase. Compact output is
|
|
25
|
+
the default. The target defaults to the current directory and may be the workbase
|
|
26
|
+
root, an entity path, or a task ID. Archived entities are inspectable but never
|
|
27
|
+
receive mutation or execution authority. Workbase context catalogs all active
|
|
28
|
+
epics, tasks, and phases.
|
|
29
29
|
|
|
30
30
|
Options:
|
|
31
31
|
--json Output a versioned machine result
|
|
32
|
-
--compact
|
|
33
|
-
--full Include prose bodies
|
|
32
|
+
--compact Use compact output (default)
|
|
33
|
+
--full Include prose bodies and low-level VCS details
|
|
34
34
|
--epic <id> Select an epic
|
|
35
35
|
--task <id> Select a task
|
|
36
36
|
--phase <id> Select a phase together with --task
|
|
@@ -1239,9 +1239,10 @@ export class ContextService extends Effect.Service<ContextService>()(
|
|
|
1239
1239
|
? "complete"
|
|
1240
1240
|
: "partial"
|
|
1241
1241
|
|
|
1242
|
+
const compact = !options.full
|
|
1242
1243
|
const projectDocument = <T>(document: Document<T> | null) =>
|
|
1243
1244
|
document
|
|
1244
|
-
?
|
|
1245
|
+
? compact
|
|
1245
1246
|
? {
|
|
1246
1247
|
id: document.id,
|
|
1247
1248
|
path: document.path,
|
|
@@ -1255,7 +1256,7 @@ export class ContextService extends Effect.Service<ContextService>()(
|
|
|
1255
1256
|
(task?.data && "repo" in task.data ? task.data : null)
|
|
1256
1257
|
|
|
1257
1258
|
return {
|
|
1258
|
-
projection:
|
|
1259
|
+
projection: compact ? "compact" : "complete",
|
|
1259
1260
|
workbase: {
|
|
1260
1261
|
root,
|
|
1261
1262
|
configPath: join(root, "agency.json"),
|
|
@@ -1308,7 +1309,7 @@ export class ContextService extends Effect.Service<ContextService>()(
|
|
|
1308
1309
|
writable: writableDocuments,
|
|
1309
1310
|
},
|
|
1310
1311
|
},
|
|
1311
|
-
workspace:
|
|
1312
|
+
workspace: compact
|
|
1312
1313
|
? {
|
|
1313
1314
|
codePath,
|
|
1314
1315
|
materialization,
|
|
@@ -186,6 +186,10 @@ describe("IntegrationService", () => {
|
|
|
186
186
|
}
|
|
187
187
|
expect(managedWorkbaseAgents).toContain("agency push --json")
|
|
188
188
|
expect(managedWorkbaseAgents).toContain("agency-execution-v1")
|
|
189
|
+
expect(managedWorkbaseAgents).toContain("agency context . --full --json")
|
|
190
|
+
expect(managedWorkbaseAgents).toContain(
|
|
191
|
+
"Workers use full context here because they need the assigned document prose",
|
|
192
|
+
)
|
|
189
193
|
expect(managedWorkbaseAgents).toContain(
|
|
190
194
|
"Never pass `--work` or `--auto` to `agency task create`",
|
|
191
195
|
)
|
package/src/workbase/AGENTS.md
CHANGED
|
@@ -79,10 +79,11 @@ commands without prescribing an execution environment.
|
|
|
79
79
|
Start every session with one read-only command:
|
|
80
80
|
|
|
81
81
|
```bash
|
|
82
|
-
agency context . --json
|
|
82
|
+
agency context . --full --json
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
Workers use full context here because they need the assigned document prose. Use
|
|
86
|
+
the returned target, document paths and revisions, dependency readiness,
|
|
86
87
|
authority, checkout state, PR state, and validation result. Do not infer these
|
|
87
88
|
from directory names or stale prose.
|
|
88
89
|
|