@markjaquith/agency 1.11.0 → 2.0.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 +302 -113
- package/cli.ts +123 -415
- package/index.ts +1 -1
- package/package.json +12 -17
- package/skills/agency/SKILL.md +258 -0
- package/src/cli.test.ts +290 -0
- package/src/commands/description.test.ts +103 -0
- package/src/commands/epic.test.ts +103 -0
- package/src/commands/epic.ts +101 -0
- package/src/commands/init.test.ts +42 -290
- package/src/commands/init.ts +15 -123
- package/src/commands/phase.ts +120 -0
- package/src/commands/pr.test.ts +19 -170
- package/src/commands/pr.ts +23 -179
- package/src/commands/repo.test.ts +80 -0
- package/src/commands/repo.ts +83 -0
- package/src/commands/status.test.ts +35 -477
- package/src/commands/status.ts +24 -213
- package/src/commands/task-phase.test.ts +206 -0
- package/src/commands/task.ts +83 -1285
- package/src/commands/validate.test.ts +91 -0
- package/src/commands/validate.ts +50 -0
- package/src/commands/work.test.ts +172 -419
- package/src/commands/work.ts +47 -166
- package/src/services/EpicService.test.ts +71 -0
- package/src/services/EpicService.ts +135 -0
- package/src/services/FileSystemService.ts +61 -92
- package/src/services/PhaseService.ts +323 -0
- package/src/services/PullRequestService.test.ts +386 -0
- package/src/services/PullRequestService.ts +143 -0
- package/src/services/RepositoryService.test.ts +106 -0
- package/src/services/RepositoryService.ts +159 -0
- package/src/services/TaskPhaseService.test.ts +217 -0
- package/src/services/TaskService.ts +192 -0
- package/src/services/WorkbaseService.test.ts +446 -0
- package/src/services/WorkbaseService.ts +493 -0
- package/src/services/WorktreeService.test.ts +599 -0
- package/src/services/WorktreeService.ts +357 -0
- package/src/test-utils.ts +41 -438
- package/src/types.ts +1 -215
- package/src/utils/command.ts +1 -5
- package/src/utils/effect.test.ts +24 -0
- package/src/utils/effect.ts +3 -273
- package/src/utils/process.test.ts +0 -15
- package/src/utils/process.ts +1 -60
- package/src/workbase/frontmatter.test.ts +50 -0
- package/src/workbase/frontmatter.ts +77 -0
- package/src/workbase/repository-reference.test.ts +25 -0
- package/src/workbase/repository-reference.ts +18 -0
- package/src/workbase/schemas.test.ts +146 -0
- package/src/workbase/schemas.ts +78 -0
- package/src/workbase/worktree-command.test.ts +61 -0
- package/src/workbase/worktree-command.ts +52 -0
- package/src/commands/base.test.ts +0 -198
- package/src/commands/base.ts +0 -198
- package/src/commands/clean.test.ts +0 -299
- package/src/commands/clean.ts +0 -274
- package/src/commands/completions.test.ts +0 -51
- package/src/commands/completions.ts +0 -308
- package/src/commands/emit.integration.test.ts +0 -549
- package/src/commands/emit.test.ts +0 -576
- package/src/commands/emit.ts +0 -700
- package/src/commands/emitted.test.ts +0 -226
- package/src/commands/emitted.ts +0 -57
- package/src/commands/loop.test.ts +0 -621
- package/src/commands/loop.ts +0 -406
- package/src/commands/merge.integration.test.ts +0 -195
- package/src/commands/merge.test.ts +0 -246
- package/src/commands/merge.ts +0 -244
- package/src/commands/pull.test.ts +0 -395
- package/src/commands/pull.ts +0 -205
- package/src/commands/push.test.ts +0 -518
- package/src/commands/push.ts +0 -434
- package/src/commands/rebase.test.ts +0 -521
- package/src/commands/rebase.ts +0 -232
- package/src/commands/save.test.ts +0 -247
- package/src/commands/save.ts +0 -162
- package/src/commands/source.test.ts +0 -195
- package/src/commands/source.ts +0 -72
- package/src/commands/switch.test.ts +0 -194
- package/src/commands/switch.ts +0 -84
- package/src/commands/task-branching.test.ts +0 -633
- package/src/commands/task-continue.test.ts +0 -311
- package/src/commands/task-edit.test.ts +0 -235
- package/src/commands/task-main.test.ts +0 -1066
- package/src/commands/task-squash.test.ts +0 -266
- package/src/commands/tasks.test.ts +0 -391
- package/src/commands/tasks.ts +0 -161
- package/src/commands/template-delete.test.ts +0 -178
- package/src/commands/template-delete.ts +0 -98
- package/src/commands/template-list.test.ts +0 -135
- package/src/commands/template-list.ts +0 -87
- package/src/commands/template-view.test.ts +0 -158
- package/src/commands/template-view.ts +0 -86
- package/src/commands/template.test.ts +0 -32
- package/src/commands/template.ts +0 -96
- package/src/commands/use.test.ts +0 -87
- package/src/commands/use.ts +0 -97
- package/src/constants.ts +0 -10
- package/src/errors.ts +0 -17
- package/src/schemas.ts +0 -33
- package/src/services/AgencyMetadataService.ts +0 -311
- package/src/services/ClaudeService.test.ts +0 -184
- package/src/services/ClaudeService.ts +0 -91
- package/src/services/ConfigService.ts +0 -115
- package/src/services/FilterRepoService.ts +0 -164
- package/src/services/FormatterService.test.ts +0 -432
- package/src/services/FormatterService.ts +0 -219
- package/src/services/GitService.ts +0 -1183
- package/src/services/MockFilterRepoService.ts +0 -140
- package/src/services/OpencodeService.ts +0 -263
- package/src/services/PromptService.ts +0 -183
- package/src/services/TemplateService.ts +0 -81
- package/src/types/native-exec.d.ts +0 -8
- package/src/utils/colors.ts +0 -178
- package/src/utils/git-path.ts +0 -6
- package/src/utils/glob.test.ts +0 -161
- package/src/utils/glob.ts +0 -78
- package/src/utils/paths.ts +0 -51
- package/src/utils/pr-branch.test.ts +0 -376
- package/src/utils/pr-branch.ts +0 -508
- package/src/utils/spinner.test.ts +0 -45
- package/src/utils/spinner.ts +0 -96
- package/src/utils/task-parser.test.ts +0 -172
- package/src/utils/task-parser.ts +0 -93
- package/templates/AGENCY.md +0 -22
- package/templates/AGENTS.md +0 -11
- package/templates/CLAUDE.md +0 -3
- package/templates/TASK.md +0 -5
- package/templates/opencode.json +0 -4
package/README.md
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
# @markjaquith/agency
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Agency manages durable agentic work across repositories. Epics, tasks, and
|
|
4
|
+
phases live as Markdown documents in a filesystem-backed workbase. Repository
|
|
5
|
+
aliases and Git worktrees provide each execution unit with the code it may read
|
|
6
|
+
or write.
|
|
7
|
+
|
|
8
|
+
## Requirements
|
|
9
|
+
|
|
10
|
+
- [Bun](https://bun.sh) 1.0 or newer
|
|
11
|
+
- Git
|
|
12
|
+
- [GitHub CLI](https://cli.github.com/) for `agency pr create`
|
|
13
|
+
- OpenCode or Claude Code for `agency work`
|
|
4
14
|
|
|
5
15
|
## Installation
|
|
6
16
|
|
|
@@ -8,170 +18,349 @@ Smuggle project-level LLM instruction into any Git repo. Plan your tasks. Commit
|
|
|
8
18
|
bun install -g @markjaquith/agency
|
|
9
19
|
```
|
|
10
20
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
**
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
**
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
For development, run `bun link` from this repository.
|
|
22
|
+
|
|
23
|
+
## Core Model
|
|
24
|
+
|
|
25
|
+
- A **workbase** is the root containing durable documents and local repository
|
|
26
|
+
state.
|
|
27
|
+
- An **epic** orchestrates tasks, may inspect repositories, and never writes
|
|
28
|
+
code.
|
|
29
|
+
- A **task** describes one durable outcome and may stand alone or belong to an
|
|
30
|
+
epic.
|
|
31
|
+
- A **phase** belongs to a multi-phase task and represents one PR or intended
|
|
32
|
+
PR.
|
|
33
|
+
- An **execution unit** is either a single-phase task or a phase. It has exactly
|
|
34
|
+
one writable `repo`, optional read-only `repos`, a branch, a base, and a
|
|
35
|
+
`string | null` PR URL.
|
|
36
|
+
|
|
37
|
+
Entity IDs come from directory names. Structured metadata lives in YAML 1.2
|
|
38
|
+
frontmatter; prose below it supplies human and agent context.
|
|
39
|
+
|
|
40
|
+
## Workbase Layout
|
|
41
|
+
|
|
42
|
+
```text
|
|
43
|
+
workbase/
|
|
44
|
+
agency.json
|
|
45
|
+
repos/
|
|
46
|
+
frontend/ # bare Git repository or symlink
|
|
47
|
+
backend/
|
|
48
|
+
epics/
|
|
49
|
+
checkout/
|
|
50
|
+
EPIC.md
|
|
51
|
+
tasks/
|
|
52
|
+
refresh-copy/ # single-phase task
|
|
53
|
+
TASK.md
|
|
54
|
+
code/ # created by agency work
|
|
55
|
+
frontend/
|
|
56
|
+
build-checkout/ # multi-phase task
|
|
57
|
+
TASK.md
|
|
58
|
+
phases/
|
|
59
|
+
backend-api/
|
|
60
|
+
PHASE.md
|
|
61
|
+
code/
|
|
62
|
+
backend/
|
|
63
|
+
frontend-ui/
|
|
64
|
+
PHASE.md
|
|
65
|
+
code/
|
|
66
|
+
frontend/
|
|
67
|
+
backend/
|
|
30
68
|
```
|
|
31
69
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
70
|
+
Repository metadata comes directly from Git under `repos/{alias}`. Workbase
|
|
71
|
+
configuration may provide a custom writable-worktree creation command.
|
|
72
|
+
|
|
73
|
+
### Custom Worktree Command
|
|
74
|
+
|
|
75
|
+
By default, Agency creates worktrees with Git. Set `worktreeCreateCommand` to an
|
|
76
|
+
argv template when another tool should create writable worktrees:
|
|
77
|
+
|
|
78
|
+
```json
|
|
79
|
+
{
|
|
80
|
+
"version": 2,
|
|
81
|
+
"worktreeCreateCommand": [
|
|
82
|
+
"my-worktree-tool",
|
|
83
|
+
"--repo",
|
|
84
|
+
"{repo}",
|
|
85
|
+
"--destination",
|
|
86
|
+
"{worktree}",
|
|
87
|
+
"--branch",
|
|
88
|
+
"{branch}"
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
```
|
|
37
92
|
|
|
38
|
-
|
|
93
|
+
Available placeholders are:
|
|
94
|
+
|
|
95
|
+
- `{repo}`: absolute repository alias path under `repos/`
|
|
96
|
+
- `{worktree}`: absolute checkout path Agency requires
|
|
97
|
+
- `{branch}`: execution branch the custom command must create or check out
|
|
98
|
+
- `{base}`: configured execution base
|
|
99
|
+
|
|
100
|
+
`{repo}` and `{worktree}` are required. Agency invokes the command directly
|
|
101
|
+
without a shell, sets matching `AGENCY_REPO`, `AGENCY_WORKTREE`,
|
|
102
|
+
`AGENCY_BRANCH`, and `AGENCY_BASE` environment variables, and verifies that the
|
|
103
|
+
requested destination exists afterward.
|
|
104
|
+
|
|
105
|
+
Worktrunk can be configured per workbase without changing the user's Worktrunk
|
|
106
|
+
path settings:
|
|
107
|
+
|
|
108
|
+
```json
|
|
109
|
+
{
|
|
110
|
+
"version": 2,
|
|
111
|
+
"worktreeCreateCommand": [
|
|
112
|
+
"wt",
|
|
113
|
+
"-C",
|
|
114
|
+
"{repo}",
|
|
115
|
+
"-y",
|
|
116
|
+
"--config-set",
|
|
117
|
+
"worktree-path=\"{worktree}\"",
|
|
118
|
+
"switch",
|
|
119
|
+
"--create",
|
|
120
|
+
"--base",
|
|
121
|
+
"{base}",
|
|
122
|
+
"{branch}",
|
|
123
|
+
"--no-cd",
|
|
124
|
+
"--format",
|
|
125
|
+
"json"
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
```
|
|
39
129
|
|
|
40
|
-
|
|
130
|
+
Custom commands own writable branch creation. Agency checks for conflicting
|
|
131
|
+
worktrees first, invokes the command only when the branch is not checked out,
|
|
132
|
+
and verifies that `{worktree}` exists afterward.
|
|
133
|
+
|
|
134
|
+
The configured command applies only to the writable checkout. Supplemental
|
|
135
|
+
read-only repositories remain detached Git worktrees at their declared refs so
|
|
136
|
+
they do not acquire writable branches.
|
|
137
|
+
|
|
138
|
+
## Frontmatter
|
|
139
|
+
|
|
140
|
+
### Epic
|
|
141
|
+
|
|
142
|
+
```yaml
|
|
143
|
+
---
|
|
144
|
+
ticketUrl: https://example.com/tickets/checkout
|
|
145
|
+
description: Coordinate the checkout experience across frontend and backend.
|
|
146
|
+
repos:
|
|
147
|
+
- repo: frontend
|
|
148
|
+
ref: main
|
|
149
|
+
- repo: backend
|
|
150
|
+
ref: main
|
|
151
|
+
tasks:
|
|
152
|
+
- id: backend-api
|
|
153
|
+
- id: frontend-ui
|
|
154
|
+
dependsOn:
|
|
155
|
+
- backend-api
|
|
156
|
+
---
|
|
157
|
+
```
|
|
41
158
|
|
|
42
|
-
|
|
43
|
-
|
|
159
|
+
### Single-Phase Task
|
|
160
|
+
|
|
161
|
+
```yaml
|
|
162
|
+
---
|
|
163
|
+
ticketUrl: https://example.com/tickets/refresh-copy
|
|
164
|
+
description: Refresh user-facing checkout copy.
|
|
165
|
+
epic: checkout
|
|
166
|
+
repo: frontend
|
|
167
|
+
repos:
|
|
168
|
+
- repo: backend
|
|
169
|
+
ref: main
|
|
170
|
+
branch: task/refresh-copy
|
|
171
|
+
base: main
|
|
172
|
+
pr: null
|
|
173
|
+
---
|
|
174
|
+
```
|
|
44
175
|
|
|
45
|
-
|
|
176
|
+
### Multi-Phase Task
|
|
177
|
+
|
|
178
|
+
```yaml
|
|
179
|
+
---
|
|
180
|
+
ticketUrl: https://example.com/tickets/build-checkout
|
|
181
|
+
description: Deliver checkout through sequenced backend and frontend changes.
|
|
182
|
+
epic: checkout
|
|
183
|
+
phases:
|
|
184
|
+
- id: backend-api
|
|
185
|
+
- id: frontend-ui
|
|
186
|
+
dependsOn:
|
|
187
|
+
- backend-api
|
|
188
|
+
---
|
|
189
|
+
```
|
|
46
190
|
|
|
47
|
-
|
|
191
|
+
Each listed phase has a `phases/{id}/PHASE.md` containing its execution fields:
|
|
192
|
+
|
|
193
|
+
```yaml
|
|
194
|
+
---
|
|
195
|
+
description: Build the checkout interface against the new backend API.
|
|
196
|
+
repo: frontend
|
|
197
|
+
repos:
|
|
198
|
+
- repo: backend
|
|
199
|
+
ref: main
|
|
200
|
+
branch: task/checkout-ui
|
|
201
|
+
base: task/checkout-api
|
|
202
|
+
pr: null
|
|
203
|
+
---
|
|
204
|
+
```
|
|
48
205
|
|
|
49
|
-
|
|
50
|
-
|
|
206
|
+
Epic task dependencies belong in `EPIC.md`. Phase dependencies belong in the
|
|
207
|
+
owning `TASK.md`. Stable IDs do not encode ordering in directory names.
|
|
51
208
|
|
|
52
|
-
|
|
209
|
+
## Quick Start
|
|
53
210
|
|
|
54
211
|
```bash
|
|
55
|
-
agency
|
|
212
|
+
agency init ~/work
|
|
213
|
+
cd ~/work
|
|
214
|
+
|
|
215
|
+
agency repo add frontend git@github.com:example/frontend.git
|
|
216
|
+
agency repo link backend ~/Dev/backend
|
|
217
|
+
|
|
218
|
+
agency task create refresh-copy \
|
|
219
|
+
--ticket-url https://example.com/tickets/refresh-copy \
|
|
220
|
+
--description "Refresh user-facing checkout copy" \
|
|
221
|
+
--repo frontend \
|
|
222
|
+
--reference backend:main \
|
|
223
|
+
--branch task/refresh-copy \
|
|
224
|
+
--base main
|
|
225
|
+
|
|
226
|
+
agency validate
|
|
227
|
+
agency work refresh-copy
|
|
228
|
+
agency pr create refresh-copy
|
|
56
229
|
```
|
|
57
230
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
Create an emit branch with smuggled files reverted to their merge-base state (removes additions/modifications to those files made on feature branch). Default branch name is current branch with `--PR` suffix.
|
|
231
|
+
## Commands
|
|
61
232
|
|
|
62
|
-
###
|
|
233
|
+
### Workbase and Repositories
|
|
63
234
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
- `--branch <name>` - Custom name for emit branch
|
|
71
|
-
|
|
72
|
-
### `agency merge`
|
|
73
|
-
|
|
74
|
-
Runs `agency emit`, and then merges the PR back into the base branch locally.
|
|
75
|
-
|
|
76
|
-
**Options:**
|
|
235
|
+
```text
|
|
236
|
+
agency init [path] [--json]
|
|
237
|
+
agency repo add <alias> <remote> [--json]
|
|
238
|
+
agency repo link <alias> <path> [--json]
|
|
239
|
+
agency repo list [--json]
|
|
240
|
+
```
|
|
77
241
|
|
|
78
|
-
|
|
79
|
-
|
|
242
|
+
`repo add` creates a bare clone. `repo link` creates a symlink to an existing Git
|
|
243
|
+
repository. Alias names are then used by all documents and commands.
|
|
80
244
|
|
|
81
|
-
|
|
245
|
+
Commands that print Agency-owned results accept `--json`, including initialization,
|
|
246
|
+
repository mutations, entity creation/list/show, status, validation, and PR creation.
|
|
82
247
|
|
|
83
|
-
###
|
|
248
|
+
### Epics
|
|
84
249
|
|
|
85
|
-
|
|
250
|
+
```text
|
|
251
|
+
agency epic create <id> --ticket-url <url> [--description <text>] [--json]
|
|
252
|
+
--repo <alias>:<ref> [--repo <alias>:<ref>...]
|
|
253
|
+
agency epic list [--json]
|
|
254
|
+
agency epic show <id> [--json]
|
|
255
|
+
```
|
|
86
256
|
|
|
87
|
-
|
|
257
|
+
Creating a task with `--epic <id>` adds the task to the epic and writes the task
|
|
258
|
+
back-reference.
|
|
88
259
|
|
|
89
|
-
|
|
260
|
+
### Tasks
|
|
90
261
|
|
|
91
|
-
|
|
262
|
+
Create a single-phase task:
|
|
92
263
|
|
|
93
|
-
|
|
264
|
+
```text
|
|
265
|
+
agency task create <id> --ticket-url <url> --repo <alias>
|
|
266
|
+
--branch <name> --base <name>
|
|
267
|
+
[--description <text>] [--epic <id>] [--reference <alias>:<ref>...] [--json]
|
|
268
|
+
```
|
|
94
269
|
|
|
95
|
-
|
|
270
|
+
Create a multi-phase task container:
|
|
96
271
|
|
|
97
|
-
|
|
272
|
+
```text
|
|
273
|
+
agency task create <id> --ticket-url <url> --multi-phase
|
|
274
|
+
[--description <text>] [--epic <id>] [--json]
|
|
275
|
+
```
|
|
98
276
|
|
|
99
|
-
|
|
277
|
+
Inspect tasks:
|
|
100
278
|
|
|
101
|
-
|
|
279
|
+
```text
|
|
280
|
+
agency task list [--json]
|
|
281
|
+
agency task show <id> [--json]
|
|
282
|
+
```
|
|
102
283
|
|
|
103
|
-
|
|
284
|
+
To add a phase to an existing single-phase task, name the phase that will own
|
|
285
|
+
the task's current execution fields with `--first-phase`:
|
|
104
286
|
|
|
105
|
-
|
|
287
|
+
```text
|
|
288
|
+
agency phase create refresh-copy verification
|
|
289
|
+
--first-phase implementation
|
|
290
|
+
--repo frontend --branch task/refresh-copy-verification --base main
|
|
291
|
+
--depends-on implementation
|
|
292
|
+
```
|
|
106
293
|
|
|
107
|
-
|
|
294
|
+
Agency converts `TASK.md` to the multi-phase shape, creates both phase documents,
|
|
295
|
+
and moves existing worktrees from the task's `code/` directory into the first
|
|
296
|
+
phase. Dependencies remain explicit through `--depends-on`.
|
|
108
297
|
|
|
109
|
-
|
|
298
|
+
### Phases
|
|
110
299
|
|
|
111
|
-
|
|
300
|
+
```text
|
|
301
|
+
agency phase create <task-id> <phase-id>
|
|
302
|
+
--repo <alias> --branch <name> --base <name>
|
|
303
|
+
[--description <text>] [--reference <alias>:<ref>...]
|
|
304
|
+
[--depends-on <phase-id>...] [--first-phase <phase-id>] [--json]
|
|
112
305
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
agency completions zsh > ~/.zsh/completions/_agency
|
|
306
|
+
agency phase list <task-id> [--json]
|
|
307
|
+
agency phase show <task-id> <phase-id> [--json]
|
|
116
308
|
```
|
|
117
309
|
|
|
118
|
-
|
|
310
|
+
### Work and Pull Requests
|
|
119
311
|
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
|
|
312
|
+
```text
|
|
313
|
+
agency work <task-id> [phase-id] [--opencode | --claude]
|
|
314
|
+
agency pr create <task-id> [phase-id] [--draft] [--json]
|
|
123
315
|
```
|
|
124
316
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
mkdir -p ~/.local/share/bash-completion/completions
|
|
129
|
-
agency completions bash > ~/.local/share/bash-completion/completions/agency
|
|
130
|
-
```
|
|
317
|
+
`agency work` fetches repositories, creates or reuses worktrees under `code/`,
|
|
318
|
+
and launches an agent in the writable checkout with absolute task and phase
|
|
319
|
+
context paths.
|
|
131
320
|
|
|
132
|
-
|
|
321
|
+
Each writable `(repo, branch)` pair may belong to only one task or phase. Agency
|
|
322
|
+
validation reports duplicate ownership, and `agency work` checks Git's worktree
|
|
323
|
+
registry before creating or reusing a checkout. It reuses only an exact
|
|
324
|
+
path/branch match; if the branch is checked out elsewhere or the target path has
|
|
325
|
+
the wrong branch, the command fails with the conflicting path instead of forcing
|
|
326
|
+
another checkout.
|
|
133
327
|
|
|
134
|
-
-
|
|
135
|
-
|
|
328
|
+
Read-only references use `<alias>:<ref>` on the CLI and `{ repo, ref }` in YAML.
|
|
329
|
+
Agency resolves the ref to a commit and creates a detached worktree. Existing
|
|
330
|
+
reference worktrees are reused only while their commit still matches the declared
|
|
331
|
+
ref; use a commit SHA as `ref` when reproducibility matters.
|
|
136
332
|
|
|
137
|
-
|
|
333
|
+
`agency pr create` requires a clean writable worktree. It pushes the branch,
|
|
334
|
+
runs `gh pr create --fill`, and writes the returned GitHub PR URL into `pr` in
|
|
335
|
+
the owning `TASK.md` or `PHASE.md`.
|
|
138
336
|
|
|
139
|
-
|
|
337
|
+
### Status and Validation
|
|
140
338
|
|
|
141
|
-
```
|
|
142
|
-
|
|
339
|
+
```text
|
|
340
|
+
agency status [--json]
|
|
341
|
+
agency validate [--json]
|
|
143
342
|
```
|
|
144
343
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
```
|
|
344
|
+
Validation checks JSON and YAML parsing, Effect Schema conformance, repository
|
|
345
|
+
aliases, parent/child backlinks, phase directories, duplicate references,
|
|
346
|
+
unknown dependencies, and dependency cycles. YAML duplicate keys, anchors,
|
|
347
|
+
aliases, and custom tags are rejected.
|
|
150
348
|
|
|
151
|
-
|
|
349
|
+
## Agent Skill
|
|
152
350
|
|
|
153
|
-
|
|
351
|
+
`skills/agency/SKILL.md` contains an agent-oriented operating guide for Agency.
|
|
352
|
+
Install or link that directory into your agent's skill location when you want
|
|
353
|
+
Agency workflows to be discovered automatically.
|
|
154
354
|
|
|
155
|
-
|
|
355
|
+
## Development
|
|
156
356
|
|
|
157
357
|
```bash
|
|
158
|
-
|
|
358
|
+
bun install
|
|
359
|
+
bun link
|
|
360
|
+
bun run build
|
|
159
361
|
```
|
|
160
362
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
- Prettier formatting
|
|
164
|
-
- Knip (unused code detection)
|
|
165
|
-
- TypeScript type checking
|
|
166
|
-
|
|
167
|
-
**Commit-msg hook validates:**
|
|
168
|
-
|
|
169
|
-
- Conventional commits format
|
|
170
|
-
- Commit message history
|
|
171
|
-
|
|
172
|
-
**Pre-push hook runs the same checks as pre-commit.**
|
|
173
|
-
|
|
174
|
-
Note: Tests are intentionally excluded from git hooks as they are slow. Run them manually with `bun test`.
|
|
363
|
+
Run focused tests with `bun test <test-file>`. Run formatting with `bun format`.
|
|
175
364
|
|
|
176
365
|
## License
|
|
177
366
|
|