@dibssoftware/dibs 0.0.181 → 0.0.195
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/CHANGELOG.md +103 -1
- package/README.md +10 -8
- package/bin/dibs.mjs +370 -73
- package/docs/agents.md +303 -0
- package/docs/council.md +88 -0
- package/docs/files.md +3 -3
- package/docs/guard.md +86 -11
- package/docs/json.md +211 -0
- package/docs/later.md +5 -5
- package/docs/machines.md +6 -6
- package/docs/questions.md +104 -3
- package/docs/reference.md +124 -30
- package/docs/relay.md +120 -9
- package/docs/releasing.md +7 -1
- package/docs/scheduling.md +28 -6
- package/docs/secrets.md +53 -0
- package/docs/simulators.md +3 -3
- package/package.json +1 -1
- package/skills/dibs/SKILL.md +79 -149
- package/src/about.mjs +341 -0
- package/src/acquire.mjs +111 -27
- package/src/after.mjs +127 -0
- package/src/agents.mjs +2 -1
- package/src/alerts.mjs +95 -42
- package/src/answers.mjs +2 -2
- package/src/board.mjs +21 -16
- package/src/broker.mjs +23 -7
- package/src/carry.mjs +287 -0
- package/src/codex.mjs +132 -0
- package/src/commands.mjs +243 -82
- package/src/config.mjs +85 -14
- package/src/connect.mjs +4 -2
- package/src/cool.mjs +27 -11
- package/src/council.mjs +482 -0
- package/src/cwd.mjs +9 -0
- package/src/decisions.mjs +250 -0
- package/src/declare.mjs +96 -0
- package/src/diskreport.mjs +306 -0
- package/src/diskuse.mjs +420 -0
- package/src/diskwarn.mjs +68 -13
- package/src/doctor.mjs +149 -0
- package/src/doors.mjs +547 -0
- package/src/durable.mjs +143 -0
- package/src/envs.mjs +372 -0
- package/src/events.mjs +7 -2
- package/src/files.mjs +118 -6
- package/src/guard.mjs +239 -86
- package/src/guardd.mjs +8 -1
- package/src/halt.mjs +63 -0
- package/src/handoffs.mjs +362 -0
- package/src/history.mjs +34 -4
- package/src/hogs.mjs +36 -8
- package/src/jobprogress.mjs +283 -0
- package/src/later.mjs +21 -10
- package/src/lock.mjs +33 -9
- package/src/measure.mjs +42 -11
- package/src/media.mjs +240 -0
- package/src/news.mjs +31 -0
- package/src/notes.mjs +49 -8
- package/src/notices.mjs +126 -43
- package/src/ondemand.mjs +25 -2
- package/src/outcome.mjs +163 -0
- package/src/overlap.mjs +2 -2
- package/src/override.mjs +149 -79
- package/src/owner.mjs +15 -2
- package/src/people.mjs +236 -0
- package/src/pickup.mjs +72 -0
- package/src/picture.mjs +321 -0
- package/src/plain.mjs +84 -18
- package/src/platform.mjs +19 -0
- package/src/preempt.mjs +123 -15
- package/src/primer.mjs +91 -20
- package/src/prints.mjs +99 -0
- package/src/proc.mjs +1 -1
- package/src/progress.mjs +49 -3
- package/src/proof.mjs +102 -0
- package/src/push.mjs +271 -0
- package/src/questions.mjs +328 -57
- package/src/quota.mjs +1 -1
- package/src/recap.mjs +205 -0
- package/src/relay.mjs +139 -20
- package/src/remote.mjs +23 -10
- package/src/reviewgate.mjs +268 -0
- package/src/reviews.mjs +377 -0
- package/src/route.mjs +263 -0
- package/src/rules.mjs +216 -0
- package/src/schedule.mjs +238 -44
- package/src/schema.mjs +62 -0
- package/src/scratch.mjs +2 -2
- package/src/serve.mjs +3 -2
- package/src/signed.mjs +97 -0
- package/src/simpool.mjs +46 -1
- package/src/spend.mjs +375 -0
- package/src/state.mjs +43 -17
- package/src/talk.mjs +1078 -133
- package/src/thin.sh +2 -0
- package/src/trail.mjs +290 -0
- package/src/trailnote.mjs +209 -0
- package/src/util.mjs +7 -0
- package/src/vault.mjs +435 -0
- package/src/vendors.mjs +327 -0
- package/src/version.mjs +1 -1
- package/src/web.mjs +353 -60
- package/src/work.mjs +487 -0
- package/src/worker.mjs +7 -1
package/docs/agents.md
ADDED
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
# dibs for agents: the full reference
|
|
2
|
+
|
|
3
|
+
The short version, with what agents most often get wrong, is the dibs skill (skills/dibs/SKILL.md, written out as dibs.md beside dibs). This is everything else, by topic. Read the part you need when it comes up. Exit codes: the skill's tables, or `dibs help exit`. Every command and flag: `dibs help all`.
|
|
4
|
+
|
|
5
|
+
## When you need it
|
|
6
|
+
|
|
7
|
+
Everything below is reference. Read the part you need when it comes up.
|
|
8
|
+
|
|
9
|
+
### Running
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
dibs run xcode-build -m "build the app to check the new settings screen compiles" -- xcodebuild -scheme App build
|
|
13
|
+
dibs run sim-own -m "install today's build on a fresh simulator" -- sh -c 'xcrun simctl install "$SIM" App.app' # $SIM is the private simulator's udid
|
|
14
|
+
dibs run sim-own,xcode-build -m "run the UI tests for the checkout flow" -- sh -c 'xcodebuild test -scheme App -destination "id=$SIM"'
|
|
15
|
+
dibs run playwright --port WEB -m "browser tests for the signup page" -- npx playwright test # a free port in $WEB
|
|
16
|
+
dibs run test --after #42 -m "end-to-end tests once the API deploy is up" -- npm run e2e # joins the line once job #42 has ended
|
|
17
|
+
dibs run test --after-ok "drift test" -m "the flop test, only if drift passed" -- npm run flop # by number, agent or -m words; failed or never ran: exit 75, nothing ran
|
|
18
|
+
dibs run test -m "build, then run the unit tests after the date fix" -- sh -c 'npm run build && npm test' # a shell line goes in sh -c
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
- `-m` is required on every `dibs run`, `dibs hold` and `dibs later`: what this does and why, in plain words. The person reads it on the board and their phone in place of your command, and doesn't think in commands. At least 3 words, and not the command again: `-m "run the login tests after fixing the redirect"`, never `-m "npm test"` or `-m "tests"`. Without it dibs exits 2 before anything gets in line, and prints your command back with `-m "..."` to fill in. Asking again for a hold you already have needs no `-m`.
|
|
22
|
+
|
|
23
|
+
- `sim` is the one shared booted simulator. `sim-own` boots a private one for your command (its udid in `$SIM`) and shuts it down after.
|
|
24
|
+
- `$SIM` and `--port` variables are set inside the run, so put them in single-quoted `sh -c '...'`. Use `$WEB` (or whatever you named the port), never a fixed port.
|
|
25
|
+
- Need two resources? Ask for both in one `dibs run a,b`. Never hold one while waiting for another.
|
|
26
|
+
- The turn lasts exactly as long as the command: when it exits or crashes, the turn is given back and its whole process tree is killed. Don't add keepalives, `timeout` wrappers or lock files of your own.
|
|
27
|
+
- Inside Claude Code, `dibs run` waits as long as it takes. Every run ends with one line on stderr, `dibs: tests passed in 3m04s (waited 2m10s). #812` or `dibs: the build failed (exit 65) after 41s. #813` (the job's id last); after a compaction, that line is the result.
|
|
28
|
+
- A command over in under 15 seconds (a deploy of a few seconds, a one-file test): add `--quick`, or `--est 10s`. It starts at once, past the line and full slots, at most 2 at a time; on the simulator, or a deploy of the same repo, it goes to the front of the line instead. dibs learns it after that. A run that goes over loses the pass until it runs under again, and you're told.
|
|
29
|
+
- `--est 3m` (a duration like `30s`, `5m`, `1h`) on a job dibs hasn't seen lets short jobs move up. `--mem 6G --cpu 4` the first time you run something heavy dibs hasn't measured; after that it plans at the measured peak plus a margin, more or less than `--mem`, and says so if a job used far more than it asked.
|
|
30
|
+
- `--pausable` on a long job that can save its progress (a solver, a crawl, a long suite of independent parts): urgent work, or work that has waited 20 minutes, may pause it for a slot or, for memory, send it SIGUSR1 (`$DIBS_CHECKPOINT_SIGNAL`). On that signal, save your progress and exit 0: dibs runs the same command again behind the job it made room for, so read your checkpoint at start. dibs never stops a job without it. `dibs why` and `dibs history` say who stepped aside for whom.
|
|
31
|
+
- Priority: `-p urgent|high|normal|low|idle` (or 1-5). `urgent` (something's broken or a person is waiting now) and `high` (critical path) need `-m`, and everyone sees them. `normal` is the default. `low` (nobody waiting) and `idle` (audits, solvers, regenerating things) run at background priority on the cool cores. On macOS that slows the job's disk and new network connections too, so uploads, downloads and deploys run at `-p normal`. Pick the true level. `--by 23:30` for a deadline.
|
|
32
|
+
- `--notify <file>` appends a JSON line to that file when dibs exits.
|
|
33
|
+
- A shared API rate budget: `dibs run quota:<name> --cost N -m "..." -- <cmd>` (the budgets are set in `~/.dibs/config.json` `quotas`).
|
|
34
|
+
- Work that runs outside dibs is moved to the slow cores when the machine runs hot (`dibs throttle`). Wrapping it lets you pick its priority.
|
|
35
|
+
- A resource name close to a real one (`simulator`, `tests`) is refused with exit 2 and the right name. A new name of your own starts its own queue.
|
|
36
|
+
- A suite that takes minutes: `dibs run test --shards 2 -m "the full unit suite before merging" -- npx vitest run` splits it across the group's machines and merges the output and exit codes. vitest and `node --test` suites that usually take over 5 minutes split on their own; `--no-shard` keeps one piece.
|
|
37
|
+
|
|
38
|
+
### Environments and accounts
|
|
39
|
+
|
|
40
|
+
Staging, production, a test database, a logged-in browser profile, the App Store Connect key: each exists once per project. Lease it like any resource, and dibs remembers what each turn left there.
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
dibs run env:staging -m "ship checkout" -- ./deploy.sh staging # one holder per project; first you hear what's on it
|
|
44
|
+
dibs env staging left "deployed web@1a2b3c" # what you left there: during your turn, or just after
|
|
45
|
+
dibs env staging # who has it now, and what each turn left, newest first
|
|
46
|
+
dibs env --all # every project's
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
- Before your command starts, dibs says what the last holder left (`env:staging has "migrated to schema 42" by api-agent, 2h ago`). Read it: that's the state you're deploying onto.
|
|
50
|
+
- Say what you left with `dibs env <name> left "..."`: the commit you deployed, the schema you migrated to, the data you seeded. Without a note, your turn reads as its command and exit code.
|
|
51
|
+
- `account:asc`, `env:test-db`, `env:chrome-profile`: a project names its own in `.dibs.json` (`{"envs": {"staging": {}, "prod": {"oneWay": "deploys reach paying users"}}}`), and then only those can be leased: another name exits 2 with the closest one. A project that names none takes any `env:<name>` or `account:<name>`.
|
|
52
|
+
- One marked `oneWay` (production) asks the person before each lease. Give `-m "why"`: it's what they decide on. The wait is a question's wait. Their no exits 78 (refused, nothing ran): don't retry unless they say so. Another agent's answer doesn't count (exit 75: run it again to ask the person).
|
|
53
|
+
- It can't go with `--anywhere` or `--on`: its lease and history live on this machine.
|
|
54
|
+
|
|
55
|
+
### Listening for messages
|
|
56
|
+
|
|
57
|
+
`dibs listen`, started with run_in_background, waits until something comes for you, prints all of it and exits 0, and that exit wakes you even while you sit idle. Start it at the start of your session and again each time it exits. What wakes it:
|
|
58
|
+
|
|
59
|
+
- a message for you (`dibs tell`, from the person or another agent), a vote on your poll
|
|
60
|
+
- the person answering your question in their own words
|
|
61
|
+
- work handed to you: another agent's unfinished work, or a work item dibs offers you while you're idle (below)
|
|
62
|
+
- a notice from dibs about your own jobs that you should act on: one stuck while others wait, one paused for a disk under its floor
|
|
63
|
+
|
|
64
|
+
Everything else (reminders to post progress, disk notes above the floor, your share of the disk, "paused, resumes by itself") never wakes you: it comes with your next tool call, or along with the next thing that wakes you. Once something wakes it, it waits a second and a half for anything arriving with it, so a burst comes as one wake.
|
|
65
|
+
|
|
66
|
+
If you have Claude Code's Monitor tool, run `dibs listen --stream` with it instead (timeout at its maximum, description "messages for me"): it never exits for a message, it prints each one as one line, and each line reaches you as a notification. Start it again only when the monitor expires. `--stream --json` prints one JSON object per line.
|
|
67
|
+
|
|
68
|
+
An update to dibs doesn't wake you: the listener carries on under the new code, and your next dibs command says what changed. A newer dibs on dibs.cc ("dibs X is out (you have Y)") comes along with the next thing that wakes you: the person upgrades it; don't upgrade it yourself.
|
|
69
|
+
|
|
70
|
+
Exit 0 ends with "Start dibs listen again with run_in_background now": do that as soon as you've read what came. If it says "Your other dibs listen is still running", don't. It has no time limit: it waits until something comes, and when your session ends it exits quietly on its own. `--for 30m` sets a limit; then exit 3 means nothing came in that time, and you start it again. `--json` gives `{ messages, again }`.
|
|
71
|
+
|
|
72
|
+
One listener per agent: the main agent of a session, and each subagent, separately. Starting a second while one runs doesn't end the first: the second waits behind it and listens once the first hands something over. A third says you already have one and stops. Messages that arrive while you work come with your next tool call instead; none is lost or handed over twice. If the main agent of a session ends a turn with no listener running, the hook keeps it going to start one ("no dibs listen is running for you"), once a turn and at most 3 turns in a row without one starting. Subagents are never kept going for it. The board, `dibs threads` and `dibs tell` say who is listening.
|
|
73
|
+
|
|
74
|
+
### Holding across tool calls
|
|
75
|
+
|
|
76
|
+
`dibs hold <res> --for 20m -m "<what you'll do with it>"` waits for its turn like `dibs run`, then returns. Keep wrapping each command in `dibs run <res> -m "..." -- ...`: under your hold it starts without waiting. Run the hold again to extend it; an hour is the most it gets at once. `dibs release <res>` when you're done. `dibs mine` lists what you hold and wait for, and exits 1 when that's nothing, which is the clean result after a release.
|
|
77
|
+
|
|
78
|
+
A script running under `dibs run deploy` that calls `dibs run xcode-build` waits only for xcode-build, ahead of waiters holding nothing.
|
|
79
|
+
|
|
80
|
+
### When dibs holds you back
|
|
81
|
+
|
|
82
|
+
- **Memory, swap or disk** ("waiting for memory pressure to ease", "this machine to stop swapping", "free disk to stop falling"): dibs is protecting the machine. Keep waiting. Don't pass a higher `-p` to get past it (a smaller `--mem` changes nothing once dibs has measured the job). A memory wait names the jobs holding the most: if one is yours and finished, end it.
|
|
83
|
+
- **Disk at your turn:** low disk is a wait, like memory: your run or hold stays in line and starts the moment there's room (a person or another job frees it). dibs gives up on it (exit 74) only when it can't fit on this disk even empty of other jobs, or, outside Claude Code, its wait limit runs out. A command whose last runs (two or more) ate under 100 MB starts below the 5 GB floor (8 GB while the machine swaps; only 1 GB has to be free). Otherwise only `--disk` says it's small: under 100 MB anywhere, or 1 GB or less on test, deploy or a lock (an honest `--disk 200M` on a suite that writes nothing). That `--disk` counts whatever earlier runs read, unless one ate 1 GB or more: a run's reading includes what other agents wrote while it ran. Under 1 GB free, dibs pauses whichever job is writing the most, yours included, and resumes it at 2 GB: free your own build output, don't end it. While you wait on something else, the wait message says early when disk will hold you next, so free your own build output then.
|
|
84
|
+
- **The disk you fill:** while the disk is tight, dibs measures each session's scratch folder and the folders it marked, and tells you when yours is over its share (an even split of what's free) or grew a gigabyte in 5 minutes. Delete what you made and no longer need. Mark worktrees and build folders you make with `dibs disk add <dir>`: dibs deletes them 30 minutes after your session ends (never your repository's own checkout, Claude Code's temp folder or `~/Library` but DerivedData). `dibs disk` shows what fills the machine, dibs's or not (simulators, worktrees, swap, DerivedData, caches), who made each, whether it can go and the command, then each session's share; read it before hunting with du. Merged worktrees untouched for days are listed as likely removable: remove only your own, or ask whoever made it. `dibs disk keep <dir>` undoes a mark. A job held by low disk goes to an on-demand machine on its own after 2 minutes when it can run there.
|
|
85
|
+
- **Paused** ("paused your job: free disk is low", or for urgent work): leave it, it resumes by itself.
|
|
86
|
+
- **Load** ("waiting for the machine to cool down"): ends within 20 minutes.
|
|
87
|
+
- **A person is waiting on the job now:** run it with `-p high -m "why"`, or send it to another machine with `--on <machine>` (`dibs machines`). That's the only reason to raise it.
|
|
88
|
+
- **Another session over its share** ("session X has 3 of 3 heavy turns and 7.1 GB; you're next when one ends"): while sessions wait, one holding more than its share of a resource or of memory goes behind them. Nothing is paused for it. If it's your session, your next jobs go once one of yours ends or nobody else waits: keep waiting, don't raise `-p`.
|
|
89
|
+
- **Someone ahead of you:** agents appear by session name, the same name SendMessage uses. Message the agent ahead and ask; whoever is ahead runs `dibs yield <your name>`. If someone asks you and their work is more urgent, run `dibs yield <their name>`.
|
|
90
|
+
- **Lines from the dibs hook about your jobs** (stuck with no CPU for 20 minutes while others wait, far slower than its own earlier pace or its usual time, over its memory, paused, a progress task overdue): they're about your own work. Act on them.
|
|
91
|
+
|
|
92
|
+
### Exit codes
|
|
93
|
+
|
|
94
|
+
| code | meaning | what to do |
|
|
95
|
+
|---|---|---|
|
|
96
|
+
| the command's own | it ran | read it as usual |
|
|
97
|
+
| 75 | gave up waiting: your command never started and didn't fail (outside Claude Code, after `--max-wait`, 8m by default), or a question or `dibs tell --wait` got no answer, or the job a `--after` run waited on never ran (or, with `--after-ok`, failed) | rerun the same command within 2 minutes to keep your place, or add `--wait`. After `--after`: nothing ran; see to the job it waited on first. On a question: nothing was decided, skip that step. On `tell --wait`: the message stays with the agent; its answer reaches you later like any message |
|
|
98
|
+
| 74 | this run can't fit on this disk even when it's empty of other jobs, or (outside Claude Code) its wait limit ran out. Low disk otherwise just means you wait | the message says how much it needed. Free your own build output, or tell the person; if this run needs less, pass a smaller `--disk` on that `dibs run` (a hold's `--disk` doesn't cover the runs under it). Never delete in another session's `/private/tmp/claude-*` folder |
|
|
99
|
+
| 76 | lost the coordinator or the other machine before the job started | nothing ran there: send it again |
|
|
100
|
+
| 77 | lost the other machine after the job started | it may have run, or still be running: check before running it again, above all a deploy |
|
|
101
|
+
| 78 | refused, nothing ran: `dibs secret run` (a rule, the person said no, or an agent answered for them), or `dibs spend check` (over a spend cap, and the answer wasn't yes) | read the reason; the person changes a secret's rules (`dibs secret rules`), not you. Over a cap: don't spend it; the answer is on stdout. A one-way environment (`env:prod`): don't run it again unless they say so. `dibs answer` on a question only a person may answer: leave it for them |
|
|
102
|
+
| 70 | dibs itself crashed | a bug in dibs, not your command: `dibs ask "..."` |
|
|
103
|
+
| 124 | the command ran past its `--time-limit` (counted from its start, never the wait) and dibs stopped it | it ran but didn't finish: give it longer, or make it save as it goes |
|
|
104
|
+
| 127 | the command didn't start | check the command and its path |
|
|
105
|
+
| 2 | bad usage: a run, hold or later without `-m` in plain words (it prints your command back with `-m "..."` to fill in), a near-miss resource name, an environment the project doesn't name (it says the closest), a high or urgent boost without `-m`, a job bigger than this machine (ask for what it names, or `--anywhere`), `--on` or `dibs machines` outside a group, or a run you already have going | read the message: it names the fix |
|
|
106
|
+
| 1 | nothing matched (`mine` with nothing held, `release` with nothing to give back, a handoff or work item someone else took first, `dibs work next` with nothing free, no agent by that name, `who knows` or `tell --who-knows` with nobody who fits, `dibs review check` on a commit nobody approved) | usually the clean result |
|
|
107
|
+
| 3 | `dibs listen --for <time>` heard nothing in that time (without `--for` it waits as long as your session lives) | start it again with run_in_background |
|
|
108
|
+
|
|
109
|
+
### Files other agents may edit
|
|
110
|
+
|
|
111
|
+
`dibs hold 'files:src/auth/**' -m "rework how sessions refresh"` (paths from the git root; `**` crosses folders) turns away other agents' edits and writes there, with who holds it and why. Quote the glob, or zsh expands it first and fails with "no matches found". `dibs release 'files:src/auth/**'` gives it back. If your edit is refused: wait (`dibs when files:<path>`) or message the holder. Don't write the file another way. Paths nobody leased need nothing.
|
|
112
|
+
|
|
113
|
+
### Progress
|
|
114
|
+
|
|
115
|
+
Post as often as you commit. The person reads every post live on their page, the Mac app and their own Claude; other agents read them with `dibs progress`.
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
dibs progress "Starting billing-migration: script written, dry run next" --task billing-migration --eta 45m
|
|
119
|
+
dibs progress "Dry run touched 4,210 rows, 0 errors. Asking before prod" --task billing-migration --eta 30m
|
|
120
|
+
dibs progress "Blocked: waiting on the person for the prod run (question #3)" --task billing-migration --blocked
|
|
121
|
+
dibs progress "Done: migrated 4,210 rows on prod, checks pass" --task billing-migration --done
|
|
122
|
+
dibs progress list # your session's open tasks, with owner, state, ETA and last post (--all: every session's)
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
- Post when you start (with `--eta`), when you learn something (a test fails, a cause found, a plan changed, with the numbers), when you hand off or wait (`--blocked`), and at the end (`--done`). A task of a minute or two needs just the `--done` post.
|
|
126
|
+
- Keep `--task` the same short name across posts, and move `--eta` (`30m` or `17:30`) when the estimate moves.
|
|
127
|
+
- A task still open past its `--eta` shows as overdue. If you keep working on it with no post for 45 minutes, dibs tells you once per task, with your next tool call: post where it stands, a new `--eta`, or `--done`. Never while a dibs job of yours runs, and never if you haven't worked since your last post. A subagent's task still open when it ends is closed by dibs, and its lead hears once. Ending a task without finishing it: `--done` with a post that says what isn't done.
|
|
128
|
+
- Posts are for the record. Questions go through `dibs question`; a note the person should see now goes through `dibs say`.
|
|
129
|
+
|
|
130
|
+
A long job says how far along it is, so the board, `dibs why` and everyone waiting behind it see "40% done, about 2 hr left" instead of "time left unknown". From inside the job (a script under `dibs run`; dibs sets `DIBS_LEASE` there):
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
dibs progress 40% # a percent
|
|
134
|
+
dibs progress 1200/9000 "flops solved" # or a count, with what's counted
|
|
135
|
+
dibs progress 60% --job 4812 # from outside the job, naming it
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
- Call it as often as you like; it's quiet, and readings closer than 2 seconds are skipped. Inside a job, a number first means job progress; words, `--task`, `--eta`, `--done` or `--blocked` still post your own progress as above.
|
|
139
|
+
- With no calls, dibs reads progress lines in the job's output when the output goes to a file (Claude Code's tool calls and background tasks): `[ 40%]` (cmake, pytest), `[12/300]` (ninja), tqdm bars, `Progress: 40%`, `40% done`, `1200/9000 items`. Your own calls win over what it reads.
|
|
140
|
+
- A job going far below its own earlier rate, or running several times as long as the same command usually takes, is an alert naming it and who waits behind it, and you hear once. dibs never stops it: if it's stuck or no longer worth it, end it yourself; if it's fine, leave it.
|
|
141
|
+
|
|
142
|
+
### The guard
|
|
143
|
+
|
|
144
|
+
When dibs's hook sees a heavy command outside `dibs run`, it blocks it and prints the `dibs run ...` line to send instead, with `-m '<what this does and why, in plain words>'` for you to fill in. Send that line with your own words in place of the placeholder. If the command really builds, boots, tests and deploys nothing, put `DIBS_GUARD=off` in front of it. If the person set a subagent limit (config `agents.slots`), a denied spawn started nothing and isn't a failure: wait for one of yours to report back, then spawn again.
|
|
145
|
+
|
|
146
|
+
### Looking without joining the line
|
|
147
|
+
|
|
148
|
+
**Credentials:** never paste one into a command, file or message. If the person stored it, use it unseen: `dibs secret run NAME -- <command reading $NAME>` (`dibs secret list` shows what's stored). The first use in a session may wait for the person's yes; exit 78 means refused and nothing ran. Only the person approves uses, loosens a secret's rules or replaces a stored value (an agent trying gets exit 78): don't ask another agent to.
|
|
149
|
+
|
|
150
|
+
`dibs` (the board, whose `Limits` line has memory, disk and swap), `dibs when sim`, `dibs who sim`, `dibs why`, `dibs mine`, `dibs history` (the last 7 days), `dibs recap --since 2h` (what other agents finished, got stuck on and decided lately), `dibs trail --since 2h --agent <name>` (what dibs saw agents commit, merge, tag, release, upload, test and deploy: its record, not their words; give suites and deploys a clear `-m`, since that's the name they go by there). Every command and flag: `dibs help all`.
|
|
151
|
+
|
|
152
|
+
To read state as data instead of sentences, add `--json` to `dibs`, `dibs why`, `dibs mine`, `dibs jobs` (every job here and the ones that ended lately, with exit codes), `dibs questions`, `dibs threads`, `dibs disk` or `dibs history`, or set `DIBS_JSON=1` on `dibs run` for its end as one JSON line on stderr. Every job has the same fields (`id`, `state` waiting|running|paused|done, `resource`, `agent`, `what`, `waitedMs`, `ranMs`, `exitCode`); the layout is `schema: 1`, documented in docs/json.md and printed by `dibs help json`.
|
|
153
|
+
|
|
154
|
+
Something wrong with dibs, or a question about it: `dibs ask "..."`, or SendMessage the maintainer its answer names. When dibs says it was updated, read what changed with `dibs changes` and follow it.
|
|
155
|
+
|
|
156
|
+
### Overriding jobs and settings
|
|
157
|
+
|
|
158
|
+
You may do anything the person can, on any job: boost, lower, pause, resume, stop, cap. Use the `#` id beside the job on the board; no `--owner` is needed on anyone's job. `dibs stop` bare lists your jobs with their numbers; a number ends that job, anyone's (its agent is told); words end your one job whose `-m` or command has them; `dibs stop mine` ends all of yours.
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
dibs boost 4221 urgent -m "person waiting on the fix" # high or urgent needs -m, which everyone sees
|
|
162
|
+
dibs pause 4219 # dibs resume 4219 continues it
|
|
163
|
+
dibs stop # your running and waiting jobs, with their numbers
|
|
164
|
+
dibs stop 4219 # end it and kill its processes
|
|
165
|
+
dibs stop flop timing # your one job whose -m or command has those words
|
|
166
|
+
dibs cap pushy low # that agent's work waits and runs at low or below until dibs cap pushy off
|
|
167
|
+
dibs yield web-app # let another agent go first
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
The same goes for `answer`, `cap`, `hours`, `rules add`/`remove`, `attention`, `pace`, `tell`, `join`, `invite`, `kick`, `limit`, `connect`, `service install` and `guard install`. dibs records who did each, on the board and in `dibs history`, so act the way you'd defend to the person. Raise a job to high or urgent only when a person is waiting on it now or something is broken. Prefer a message and `dibs yield` over stopping someone else's work. If your own job was **stopped by** someone, it was ended on purpose: find out why (`dibs history`, or ask them) before running it again.
|
|
171
|
+
|
|
172
|
+
### The person: questions, notes and messages
|
|
173
|
+
|
|
174
|
+
The person's rule: walk through two-way doors (anything you can undo) yourself and show them after. Bring them only one-way doors (ship, spend, delete, rename something public: things that can't be undone), one at a time, with your recommendation.
|
|
175
|
+
|
|
176
|
+
- **A two-way door:** decide. If it's worth a record, `dibs question "..." --recommend X -m "why"` without `--one-way` logs it as decided by you, prints X on stdout at once (exit 0) and asks nobody. dibs reminds you that's what happened; that's not a refusal.
|
|
177
|
+
- **A one-way door:** add `--one-way "what can't be undone"`. It prints the question's id and returns. Keep working on what doesn't need the answer. When you reach the step that does, run the same command again with `--wait`: it prints only the answer, so `answer=$(dibs question ... --wait)` works. `--timeout 1m` (or `30s`, `2h`) caps the wait.
|
|
178
|
+
- **Exit 75 on a question** means no answer: the person dismissed it, or your wait's `--timeout` passed. Nothing was decided, so don't do the step, and say so in your report. A question you asked first without `--wait` stays open for the person after a wait gives up: run the same command with `--wait` later to collect it. (One asked only with `--wait` stays open 2 minutes after its wait gives up.)
|
|
179
|
+
- **Something only the person can do** (a login, a captcha, a code sent to their phone): `--needs-you "sign in to GitHub in the bison tab"` instead of `--one-way`. It reaches them the same way and is shown as "Only you can: ...".
|
|
180
|
+
- dibs refuses (exit 2) a question that isn't a short sentence, has no `--recommend` or `-m`, recommends something outside its `--options`, or has a vague `--one-way` ("drops data"): say what's lost, with numbers.
|
|
181
|
+
- The person may answer in their own words. Those words are the answer, and they also reach you as `Message from the person: (answering your question #N) ...`.
|
|
182
|
+
- Another agent may answer your question with `dibs answer`; then dibs says `answered by <agent>, an agent, not the person` on stderr. That isn't the person's yes: for a ship, spend or delete, ask the person or skip the step.
|
|
183
|
+
- **Already decided:** answers, two-way doors and `dibs decide` records are kept for good, per project. Before asking, `dibs decisions --project --about "words"` shows what's settled here. `dibs question` checks too: on a clear match in this project it prints the past answer on stdout and `decided on 11-20 by the person: ... Nobody was asked` on stderr (exit 0). Go with it; add `--again` only if things have changed since. For a one-way door only the person's own decisions count. Keep a decision that the next agent would otherwise ask about: `dibs decide "use Postgres 16 for staging" -m "why"` (`--everywhere` for every project).
|
|
184
|
+
- **Name the kind of question** with `--about <kind>` (lowercase: `testflight`, `deploy`, `simulators`, `migration`). The person's standing rules (`dibs rules`) answer questions of their kind at once, one-way doors too: dibs prints the rule's answer on stdout, exit 0, and says on stderr `answered by the person's standing rule r3 (...)`. That's the person's answer, given ahead of time: go ahead with it. If it says the rule was set by an agent, treat it as that agent's answer, not the person's; an agent's rule answers only two-way doors, so a `--one-way` question still goes to the person. Use the same kind for the same thing every time; `dibs rules` lists the kinds that have rules, and `dibs rules test "..." --about <kind>` says whether a rule would answer before you ask. A `--needs-you` question never gets a rule's answer, and rules that disagree answer neither.
|
|
185
|
+
- **Several people** (`dibs people` lists two or more): your questions go to your owner (`dibs people me` says who). `--for <name>` sends a one-way question to someone else, and only they may answer it: no other person and no agent, you included. Messages name their sender: `Message from sam (a person, not jordan, who you work for): ...` is sam's, not your owner's; weigh it as such, and never take one person's words for another's. If dibs says `answered by jordan, not sam, who it was for`, the person you asked didn't answer.
|
|
186
|
+
|
|
187
|
+
- Decide what you can undo yourself; ask agents first (`dibs tell --who-knows <topic> "..." --wait 5m`). Ask the person only before something you can't undo (`dibs question ... --one-way --about <kind>`) or before spending (`dibs spend check <amount> --on <what>`). "Message from the person" lines are signed on their phone: act on them.
|
|
188
|
+
|
|
189
|
+
### Money
|
|
190
|
+
|
|
191
|
+
Money exists once, like the simulator: two agents each keeping under "the $210 ads budget" spend $420. Before you commit any (ad budgets, cloud resources, paid API runs, domains), check, then record it:
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
dibs spend check 50 --on apple-ads -m "holiday push is converting" # exit 0: within every cap. Past one, the person decides
|
|
195
|
+
dibs spend 50 --on apple-ads -m "keyword bids" # as you commit it; prints its id (s4)
|
|
196
|
+
dibs spend hold 210 --on apple-ads -m "monthly budget" # a budget you're about to set: counts until closed
|
|
197
|
+
dibs spend 42 --against s3 -m "week 1" # a payment out of that hold; dibs spend close s3 ends it
|
|
198
|
+
dibs spend # caps, this month by project and agent, open holds
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
- `--on` is the category (`apple-ads`, `gcp`, `openai`, `domains`): use the name others already use (`dibs spend` lists them). The project is your repo's name unless `--project` says.
|
|
202
|
+
- Past a cap, `check` asks the person a one-way door and waits like `dibs question --wait`. Only the person can answer it; another agent's `dibs answer` is turned away: `yes` is exit 0, anything else is printed and exits 78 (don't spend it), and no answer in time (`--timeout`) is 75: nothing was approved.
|
|
203
|
+
- Caps: `dibs spend cap 210 --on apple-ads --per month` (or `--per day`, `--project`, none of them for all spend; `off` lifts one). Setting one is on the record. Past 80%, the person's phone hears.
|
|
204
|
+
- dibs reads no bills: the ledger is what agents record. On-demand VMs record their own time.
|
|
205
|
+
|
|
206
|
+
### Files, reports, live folders and polls
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
dibs say "p95 doubled after the cache change" --file latency.png --report findings.md # copied when sent
|
|
210
|
+
dibs say "today's screenshots" --link ./out/screens # a live file or folder on this Mac, browsed from the phone
|
|
211
|
+
dibs tell api "the failing rows" --file failures.csv # api gets the file's path here, and reads it
|
|
212
|
+
dibs say "deploy blocked on the staging key" --kind needs-you --body notes.txt # badge, and a summary over the details
|
|
213
|
+
dibs poll "which name for the CLI?" --option dibs --option queue [--multi] [--to <agent>]
|
|
214
|
+
dibs poll results p3 | dibs poll vote p3 dibs | dibs pending --mine
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
- Files go up to 25 MB each, 10 a message. Bigger, or a whole folder: `--link` (the reader sees it as it is now, not as it was). A file that looks like it holds keys or passwords (`.env`, `id_ed25519`, anything in `.ssh`) is refused and nothing is sent: send a redacted copy, or the line that matters.
|
|
218
|
+
- A message from another agent lists each attachment with its path on this Mac (`Attached report findings.md (3 KB): /Users/.../.dibs/media/...`). Read it there; it's a copy, so changing it changes nothing.
|
|
219
|
+
- A poll's votes reach you as messages, like any other (`dibs listen` wakes you). One to another agent tells it how to vote.
|
|
220
|
+
- `--kind`: `doing`, `done` or `needs-you` (default `fyi`). `needs-you` puts it on the person's pending list (`dibs pending`) until they clear it; use it for what only they can unblock, not for news.
|
|
221
|
+
- Whether the person read your notes: `dibs threads read <your name>` marks each `(seen 5m ago)` or `(not seen yet)`. Seen means they opened the thread; don't send it again another way.
|
|
222
|
+
- An answer to a question you asked without `--wait` now comes as a message even when the person picked an option: `(answering your question #N) yes`, followed by which question it was.
|
|
223
|
+
|
|
224
|
+
### Other agents: asking, handing work over, reviews, holding everyone
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
dibs tell api "which port is staging on?" --wait 5m # waits for api's answer and prints only it
|
|
228
|
+
dibs who knows src/payments # who edited, held, ran or posted about it lately, best first
|
|
229
|
+
dibs tell --who-knows src/payments "why round down?" --wait 5m # asks the best one still running, no name needed
|
|
230
|
+
dibs tell --all "no deploys until 15:00" # every agent running here
|
|
231
|
+
dibs handoff "fix the flaky login test" --to api -m "fails 1 in 5 on CI; logs in /tmp/ci" # no --to: whichever agent takes it first
|
|
232
|
+
dibs handoff take w3 # it's yours; its sender is told
|
|
233
|
+
dibs handoff done w3 "fixed a race in the session mock" # its sender gets your note
|
|
234
|
+
dibs handoff back w3 "no time today" # open again for any agent
|
|
235
|
+
dibs handoff give w7 web-app # an open one is that agent's to take; it hears it now
|
|
236
|
+
dibs review request fix-login -m "does the retry loop ever stop?" # another agent reviews it; you hear approve or changes
|
|
237
|
+
dibs review approve r3 "bounded by the caller" # or: dibs review changes r3 "cap it at 5 tries"
|
|
238
|
+
dibs halt --for 7m -m "restarting the mini" # no new dibs job starts until then; dibs halt off lifts it
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
- Asked something with "is waiting for your answer": answer first, with the line it gives (`dibs say --to <them> "..."`). Their command prints your answer.
|
|
242
|
+
- Don't know whom to ask? `dibs who knows <path or words>` ranks the agents by what dibs saw them do: files they edited or read (newest counts most), file leases, runs (`dibs who knows "iOS build"`), progress tasks, session titles and branches, and whether they'd hear you soon (listening first). `dibs tell --who-knows` sends to the top one still running and tells it why it was picked. Exit 1 from either: nobody fits, so nothing was sent. Then decide yourself, or ask the person if it can't be undone.
|
|
243
|
+
- `--wait` exits 75 when no answer came in time. The message stays with them, and an answer that comes later reaches you like any message.
|
|
244
|
+
- A handoff reaches you as a message. Take it only if you'll do it; for one sent to everyone, the first to take it gets it (the rest get exit 1). When you're done, `done` with a note that says what you did. If you can't finish, `back` with why. A handoff whose taker's session ends goes back to open, and its sender is told.
|
|
245
|
+
- A handoff is a work item too, with a w id (an old h3 still means w3), so everything under "Shared work" applies to it.
|
|
246
|
+
- A handoff with no `--to` reaches only agents on your project (`dibs project shop-web`, once per session). With no project, nobody is told and it waits on the board.
|
|
247
|
+
- Work outlives its session. When a session ends (a full context, a crash, a closed window) and its last progress post wasn't `--done`, or it had taken a handoff, dibs makes a handoff of it with what it knows: the folder and branch, uncommitted files and unpushed commits, the open task and its last posts, unanswered questions, files it held. An agent listening in the same project hears it first, as a message from dibs (not the person); else the person gives it to an agent or drops it. Offered one: take it if you'll finish it, else `back` with why. Close tasks with `--done` when they're done, so a session that ends cleanly leaves nothing behind.
|
|
248
|
+
- Before you merge a change into main, ask for a review: `dibs review request <branch> -m "what to look at"` (no branch: the one checked out; `<from>..<to>` for a range, `--repo <dir>` for another repo). dibs sends it to another agent running here, one that knows the area first. A repo whose `.dibs.json` says `"reviewBeforeMerge": true` has the hook turn away `git merge`, `gh pr merge` and `git push` into main until that commit is approved; the refusal gives the exact command. An approval covers the commit asked about: commit again and you ask again.
|
|
249
|
+
- A review request reaches you as a message from its author. Read the diff it names and answer with `dibs review approve <id> "what you checked"` or `dibs review changes <id> "what to change"`. If you can't, tell its author with the `dibs say --to` line it gives. You can't approve your own.
|
|
250
|
+
- Under a halt, a run or hold you start waits in line and starts by itself when it lifts; jobs already running go on. Don't work around it. Halting everyone stops every agent here, so do it only for something they'd all agree to (a restart, a broken shared service), and say why with `-m`.
|
|
251
|
+
|
|
252
|
+
### Shared work: claim it, close it with proof
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
dibs work # what's in flight: who has what, what's blocked and why, what's done and its proof
|
|
256
|
+
dibs work next # claim the oldest item you can take; exit 1: nothing free
|
|
257
|
+
dibs work add "fix the login test" --goal "passes 20 runs in a row" --files 'src/auth/**' --after w2 # work for any agent (--to <agent>: that one)
|
|
258
|
+
dibs progress "found the race in the session mock" --task w3 # posts under its id are its log
|
|
259
|
+
dibs work done w3 "fixed the race" # dibs attaches your last passing dibs run since you claimed it, and your commit
|
|
260
|
+
dibs work back w3 "no time today" # open again for any agent; drop w3 "why": nobody does it
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
- Claim before you start on anything another agent might also pick up. One agent has an item at a time; a claimer whose session ends gives it back on its own.
|
|
264
|
+
- An item with `--after` can't be claimed until those are done; `dibs work next` skips it, and skips items whose `--files` another agent's claimed item or file lease covers.
|
|
265
|
+
- `done` reads `done, proved by: suite passed 12:04, commit 1a2b3c4` only when dibs found it: a `dibs run` of yours since the claim whose last try passed, and HEAD (or `--commit <sha>`, which must exist) committed since. Run the suite through dibs before closing. `--url` and `--build` are kept as your word. Otherwise it reads `done, no proof`, and the person sees that.
|
|
266
|
+
- `dibs progress ... --task w3 --done` closes the item as `done` would; `--blocked` marks it blocked until your next plain post, or use `dibs work block w3 "why"`.
|
|
267
|
+
- `dibs project <name>` says which product you work on; a worktree or another folder of the same product is the same project. Items you add are for your project (`--project <name>` for another).
|
|
268
|
+
- With pickup on (`dibs work pickup on`, off unless someone turns it on), an agent listening with no progress task open, no item claimed and no dibs job is offered the oldest open item for its project. It comes from dibs, under "dibs ... offers you a work item", with the lines to claim it. Claim it if you'll do it; otherwise leave it, and in 10 minutes it goes to another idle agent. `--no-pickup` on `dibs work add` keeps an item from ever being offered.
|
|
269
|
+
|
|
270
|
+
### Other machines
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
dibs run test --anywhere -m "unit tests for the date fix" -- npm test # whichever machine would start it soonest, maybe this one
|
|
274
|
+
dibs run test --on mini -m "unit tests for the date fix" -- npm test # that machine
|
|
275
|
+
dibs machines # the group, its load and lines
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
The job takes the git working copy (tracked files plus new ones git doesn't ignore). `.env` files, keys and certificates never leave this machine, and a project's `.dibs.json` `stayOn` limits where its code may go. `--bring <path>` copies a file or folder back when the job ends.
|
|
279
|
+
|
|
280
|
+
On a machine that isn't in a group, `--anywhere` runs here and says so, `--on` exits 2 with the setup line, and `dibs machines` says it isn't in a group (exit 0). `dibs leave` takes a machine out of its group; only run it when the person asks. To start a group, one machine is the coordinator: `dibs service install serve worker` there (or `dibs serve` in a terminal). To add a machine: `dibs connect --machine` on the coordinator prints a one-time code, `dibs join <code>` on the new machine finds the coordinator (same network, Tailscale, or `--at <address>`), and `dibs service install worker` there keeps it taking jobs. `dibs invite <name>` and its join line still work. Details: docs/machines.md.
|
|
281
|
+
|
|
282
|
+
### Run it later
|
|
283
|
+
|
|
284
|
+
```bash
|
|
285
|
+
dibs later sim --at 02:00 -m "snapshot suite" -- ./snapshots.sh # prints its id (l3) and returns
|
|
286
|
+
dibs later test --in 3h -m "rerun the flaky suite once the API is back" -- npm test
|
|
287
|
+
dibs later test --after-ok web-app:deploy -m "smoke tests" -- npm run smoke # after that agent's deploy, only if it passed
|
|
288
|
+
dibs later list # state, exit code; output in ~/.dibs/later/<id>.log
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
When it's due it runs as `dibs run --wait` in this folder, with PATH, HOME and LANG (more with `--env NAME`). At most 7 days out. Details: docs/later.md.
|
|
292
|
+
|
|
293
|
+
### Connecting things to dibs
|
|
294
|
+
|
|
295
|
+
If the person asks you to connect something to dibs, `dibs connect` is the one way in. On its own it explains each choice and, in a terminal, asks which:
|
|
296
|
+
|
|
297
|
+
- `dibs connect --browser`: a one-time code for the page at `http://127.0.0.1:7421` (10 minutes, one use).
|
|
298
|
+
- `dibs connect --phone`: a link and QR code for a phone or any browser at https://app.dibs.cc, end-to-end encrypted through the relay.
|
|
299
|
+
- `dibs connect --account`: every browser the person signs in with at app.dibs.cc opens this Mac.
|
|
300
|
+
- `dibs connect --mcp`: another Claude account's connector reads dibs over MCP at `https://mcp.dibs.cc/mcp`.
|
|
301
|
+
- `dibs connect --machine`: another machine joins the group (above).
|
|
302
|
+
|
|
303
|
+
- Say your product once: `dibs project <name>`. Post progress: `dibs progress "what you did" --task <name> --eta 30m`, then `--done`. Before merging into main: `dibs review request <branch>`.
|
package/docs/council.md
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# dibs council
|
|
2
|
+
|
|
3
|
+
One question to several agents at once, then one answer that still shows where they disagreed.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
dibs council "Should the cache live in the worker or the coordinator?" \
|
|
7
|
+
--voices skeptic,builder,user --via claude,codex --mode merge
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
Voices are named system prompts in `~/.dibs/council.json` (written on first use; `dibs council voices` lists them). Seat 1 gets the first voice and the first agent, seat 2 the second of each, and each list repeats as needed. `skeptic@codex:gpt-6` pins one. Every run is kept: `dibs council list`, `dibs council show <id>`.
|
|
11
|
+
|
|
12
|
+
Use it for decisions with a real tradeoff: an interface other agents will depend on, a migration plan, whether to ship. Don't use it for facts the code can answer. One agent with grep is faster and just as right.
|
|
13
|
+
|
|
14
|
+
## Methods
|
|
15
|
+
|
|
16
|
+
### merge: blind answers, then a synthesis (the default)
|
|
17
|
+
|
|
18
|
+
Every voice answers on its own, in parallel. A judge then writes AGREED, SPLIT and ANSWER. Each voice's own one-line POSITION prints above the synthesis, so you can check the judge against them in two lines.
|
|
19
|
+
|
|
20
|
+
- **Beats one agent when** the question has several angles. Different prompts make one model look for different failures. Different vendors make different mistakes, which helps more.
|
|
21
|
+
- **Cost:** N + 1 calls. Wall time is the slowest voice plus the judge. The real run below took 3 calls, 47 s and 80k tokens, $0.24 of it on claude.
|
|
22
|
+
- **Fails by:** agreement collapse (one model with three prompts gives one answer three times; mix vendors), a synthesis that smooths over the split (the POSITION lines and a required SPLIT section catch it), and the judge favoring its own vendor (the judge is the first `--via`; move it with `--judge`).
|
|
23
|
+
|
|
24
|
+
### critique: blind drafts, then each reads the others and answers again
|
|
25
|
+
|
|
26
|
+
- **Beats merge when** the answers make claims you can check. In round 2 the voices do check each other's file and line claims.
|
|
27
|
+
- **Cost:** 2N + 1 calls, about twice the wall time. Every round-2 prompt carries all the other answers, so tokens grow with N squared.
|
|
28
|
+
- **Fails by:** conformity, where round 2 drifts toward the majority. When a voice's position changes, the summary prints what it first said, so you can tell whether it caved or was convinced. Voices are told to change only for an argument, and to name it.
|
|
29
|
+
|
|
30
|
+
### debate: threaded rounds with replies, votes and a judge
|
|
31
|
+
|
|
32
|
+
The opening posts are blind. In each later round, a voice sees the numbered thread with scores, replies to one post, votes on up to two (`+#2 -#5`, never its own) and restates its position. The judge reads the scored thread and writes VERDICT, DISSENT and OPEN.
|
|
33
|
+
|
|
34
|
+
- **Beats critique when** the answer turns on one or two cruxes and you want them argued out. The thread shows where the argument went.
|
|
35
|
+
- **Cost:** N x rounds + 1 calls, and every prompt is longer than the last. Two rounds is usually enough. By round 3 they mostly repeat themselves.
|
|
36
|
+
- **Fails by:** the loudest model winning (long, fluent posts collect votes), seats on the same vendor voting together, and a judge that counts votes as truth. The judge is told votes aren't truth and must name the strongest dissent.
|
|
37
|
+
|
|
38
|
+
### Live agents or fresh ones
|
|
39
|
+
|
|
40
|
+
Fresh headless agents start with a clean context and run in parallel on any vendor or model. They take nothing from the work already running. All they know is what they can read in the repo.
|
|
41
|
+
|
|
42
|
+
Live agents (`--live name`) know what nobody wrote down: what they just tried and what broke. Asking one costs its focus, because the question arrives with its next tool call. Each is asked once, in the first round only, and answers with `dibs council reply <id> "..."`. One that doesn't reply within `--live-wait` is listed as such. Ask the agent whose work the question is about ("can I change the lock format while you're mid-migration?"). Polling every live agent for general opinions isn't worth their focus.
|
|
43
|
+
|
|
44
|
+
## What every method does
|
|
45
|
+
|
|
46
|
+
- Round 1 is always blind.
|
|
47
|
+
- Other voices and the judge see seats by voice name, never by vendor.
|
|
48
|
+
- Every voice ends with `POSITION:`, and the summary prints it as written.
|
|
49
|
+
- Every call is a `dibs run quota:council` job, 60 an hour unless config.json sets `quotas.council`. A loop of councils waits instead of spending the account's limits. Calls show on the board and are killed with the council.
|
|
50
|
+
- Voices get read-only tools: claude gets Read, Grep and Glob, and codex runs in its read-only sandbox.
|
|
51
|
+
|
|
52
|
+
**Cost trap, fixed:** a headless `claude -p` loads the person's MCP servers, skills and CLAUDE.md. On this Mac, asking it to "say ok" cost 245,000 tokens ($0.24 even on Haiku). Council runs claude with `--strict-mcp-config --disable-slash-commands --setting-sources ""`, which brings that to 3,500. `codex exec` has a floor of about 23,000 tokens a call.
|
|
53
|
+
|
|
54
|
+
## agentforum: take its ideas, don't drive it
|
|
55
|
+
|
|
56
|
+
- **It has no limits.** `debate.sh` starts 12 `claude -p --dangerously-skip-permissions` and relaunches them every 2 minutes, forever. Council owns the loop: fixed rounds, a quota, read-only tools.
|
|
57
|
+
- **It loses posts.** Every agent reads `threads.json`, changes it and writes it back with no lock, so two posts at once drop one.
|
|
58
|
+
- **It has dependencies.** It needs the MCP SDK and blessed, and dibs takes none. Driving it would also mean shelling out to a CLI the person may not have installed.
|
|
59
|
+
- **What came over:** roles became voices (editable prompts, not six fixed labels), reply-to became `REPLY: #n`, reactions became up and down votes (nine reaction kinds are noise to a judge), and the verdict became a judge that must name the dissent.
|
|
60
|
+
|
|
61
|
+
agentforum stays the place for open-ended chatter between agents. Council is for a question that needs an answer today. Exporting a run to agentforum (`dibs council show <id> --forum`) would take about 20 lines if anyone wants it.
|
|
62
|
+
|
|
63
|
+
## Not built yet
|
|
64
|
+
|
|
65
|
+
- **The web page.** `GET /api/council` and `/api/council/<id>` would return `dibs council list --json` and `show --json`, which are already in the right shape. A Council view would list runs, each voice's POSITION and the synthesis, with debates as an indented thread. It isn't in this branch because `web/app.js` is changing on several other branches.
|
|
66
|
+
- **`dibs tell --wait`** (branch `together`) would replace the reply file for `--live` once it lands.
|
|
67
|
+
- **A same-vendor warning,** for when every seat runs on one vendor and every position matches.
|
|
68
|
+
|
|
69
|
+
## A real run
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
$ dibs council "dibs council counts every headless call against one bucket, quota:council.
|
|
73
|
+
Should it keep one bucket per vendor instead?" --voices skeptic,builder --via claude,codex
|
|
74
|
+
merge, 3 calls, 80k tokens, $0.24 on claude, 47s
|
|
75
|
+
|
|
76
|
+
skeptic (claude): Keep quota:council as the cap on every call, and take a per-vendor bucket
|
|
77
|
+
as well only for vendors that have one configured, instead of replacing council with vendor buckets.
|
|
78
|
+
builder (codex): Keep the shared council cap; add vendor buckets alongside it only when
|
|
79
|
+
measured limits justify them.
|
|
80
|
+
|
|
81
|
+
Synthesis (claude)
|
|
82
|
+
AGREED: keep quota:council on every call. Two 60-call vendor buckets would double the
|
|
83
|
+
hourly budget, with nothing capping the total.
|
|
84
|
+
SPLIT: timing only. The skeptic would add vendor buckets now, but only where one is
|
|
85
|
+
configured. The builder would change nothing until vendor throttling actually causes trouble.
|
|
86
|
+
ANSWER: change nothing today. If vendor buckets come later, take quota:council,quota:<agent>
|
|
87
|
+
only when config.quotas[<agent>] exists.
|
|
88
|
+
```
|
package/docs/files.md
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Parallel agents editing the same files is the other collision. Instead of pasting ownership lists into every prompt, take a lease:
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
dibs hold 'files:src/auth/**' -m "
|
|
7
|
-
dibs hold files:src/a.ts,files:docs/api.md --for 30m
|
|
8
|
-
dibs run 'files:src/gen/**,test' -- ./codegen.sh
|
|
6
|
+
dibs hold 'files:src/auth/**' -m "rework how sessions refresh" # paths from the git root; * and ? stay in one folder, ** crosses folders
|
|
7
|
+
dibs hold files:src/a.ts,files:docs/api.md --for 30m -m "rename the API fields" # several at once
|
|
8
|
+
dibs run 'files:src/gen/**,test' -m "regenerate the API client" -- ./codegen.sh # held for exactly as long as the command runs
|
|
9
9
|
dibs who files:src/auth/login.ts # who holds it, or anything overlapping it
|
|
10
10
|
```
|
|
11
11
|
|
package/docs/guard.md
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
# The guard
|
|
2
2
|
|
|
3
|
-
Agents forget. You can tell every agent to wrap builds in `dibs run`, and an hour later one of them types a bare `xcodebuild`. The guard is a pre-tool hook that catches those commands before they run.
|
|
3
|
+
Agents forget. You can tell every agent to wrap builds in `dibs run`, and an hour later one of them types a bare `xcodebuild`. The guard is a pre-tool hook that catches those commands before they run, in Claude Code, Codex, Gemini CLI, Cursor and OpenCode.
|
|
4
4
|
|
|
5
5
|
## What it does
|
|
6
6
|
|
|
7
|
-
Before each
|
|
7
|
+
Before each shell command an agent runs it reads the command, without running it, and looks for anything heavy outside `dibs run`: `xcodebuild` builds and tests, `xcrun simctl` (except `list` and other reads: `ui` without a value, `status_bar list`, `getenv`, `listapps`, `appinfo`, `get_app_container` and the like, and managing devices that aren't running: `create`, `delete`, `erase` and `runtime`), `swift test`, Playwright, vitest, jest, `npm test` and friends, `node --test`, `wrangler deploy`, `vercel deploy`, `ship*.sh`/`deploy*.sh` and `npm run deploy`. Then:
|
|
8
8
|
|
|
9
|
-
- **
|
|
10
|
-
|
|
9
|
+
- **It blocks the command** and hands the agent the exact `dibs run` line to send instead, with a placeholder where its own words go: `cd ios && xcodebuild build` gets back `cd ios && dibs run xcode-build -m '<what this does and why, in plain words>' -- xcodebuild build`. The agent sends it again with `-m` saying what the build is for. The retry goes through your normal permission checks. The hook never approves anything on your behalf.
|
|
10
|
+
|
|
11
|
+
Before 0.0.191, in a `bypassPermissions` session, the hook rewrote the command and let it through, labelled `guard: xcodebuild build`. It doesn't any more: every `dibs run` now says in plain words what it does, so you can read what each job is for, and only the agent knows that. A label made from the command would be the command again. `guard.rewrite` in config.json is no longer read.
|
|
11
12
|
|
|
12
13
|
It leaves alone `dibs` calls themselves, and commands after a `dibs hold` on the same line that the hold covers, but a heavy command elsewhere on a line with a `dibs` call still needs its turn (`xcodebuild build && dibs say done` is caught). It also leaves alone reads like `xcodebuild -list` or `-showBuildSettings`, words inside quotes, heredocs, `$(...)` and `bash -c` strings, and anything it can't parse. Any error inside the hook lets the command through unchanged and leaves one line in `~/.dibs/guard.log`. `DIBS_GUARD=off cmd` (or `env DIBS_GUARD=off cmd`) skips it for that command only, and `export DIBS_GUARD=off;` for the rest of the line; the words inside a quoted message don't count. It takes no lock and answers in about 50 ms, most of it Node starting.
|
|
13
14
|
|
|
@@ -25,6 +26,44 @@ On SessionStart, and the first SubagentStart of each subagent, the hook hands th
|
|
|
25
26
|
|
|
26
27
|
Messages from the person (`dibs tell`) and dibs's own notices about an agent's jobs (stuck, over its memory, paused) reach the agent beside its next tool call. See [questions.md](questions.md).
|
|
27
28
|
|
|
29
|
+
## Reviews before merging
|
|
30
|
+
|
|
31
|
+
A repo can ask for another agent's approving review before anything merges into main. Commit a `.dibs.json` at its root:
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
{ "reviewBeforeMerge": true }
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
`true` means merges into `main` or `master`; a list (`["main", "release"]`) names the branches. Then the hook reads each `git merge` (following `cd` and `git -C`) and `gh pr merge` an agent runs there. A `git merge` into one of those branches of a commit nobody approved with `dibs review approve` is denied, with the exact `dibs review request` line to ask for one, or the review already waiting and who has it, or the changes a reviewer asked for. An approval covers the commit it was given for: a commit after it needs another. `gh pr merge <n>` passes once a review asked with `--pr <n>` is approved, and `--match-head-commit <sha>` once that commit is; GitHub alone knows a pull request's base, so every `gh pr merge` in such a repo counts as one into main. A merge that names what it merges with `$VAR` or `$(...)` is denied too, since the hook can't tell what it is. `--abort` and `--continue` pass.
|
|
38
|
+
|
|
39
|
+
A `git push` that updates one of those branches is checked the same way: `HEAD:main`, `feature:main`, `+...:refs/heads/main`, a plain `git push` or `git push origin main` while main is checked out, and `--all` or `--mirror`. Each commit it would put there needs an approval, unless the remote already has it (by the local `origin/main`) or it's a merge commit whose merged-in side was approved, which is what `git merge` of an approved branch makes. Commits made on main itself are asked about as a range: the refusal names `dibs review request origin/main..main`. `--dry-run` and `--delete` pass; rebases, pulls and cherry-picks aren't checked.
|
|
40
|
+
|
|
41
|
+
`DIBS_GUARD=off` in front of the command (or `env DIBS_GUARD=off`, or `export DIBS_GUARD=off;` earlier on the line) skips this check as it skips the rest of the guard.
|
|
42
|
+
|
|
43
|
+
It costs nothing on other commands: the hook loads the check only for a command that mentions `git ... merge`, `git ... push` or `gh pr merge`, reads `.dibs.json` files from the repo up, and asks git one `rev-parse` only where one asks for reviews. Anything it can't make out lets the merge through. `"guard": { "reviews": false }` in `~/.dibs/config.json` switches it off on this machine. It's a hook on agents' tool calls, so the person merging in a terminal is never stopped.
|
|
44
|
+
|
|
45
|
+
## Commands that can't be undone (opt-in)
|
|
46
|
+
|
|
47
|
+
An agent decides for itself whether something is a one-way door, and one that wrongly calls a deploy reversible never asks you. `dibs doors on` has the guard recognize those commands itself. It's off by default, since Claude Code and Codex have permission systems of their own, and while it's off the hook doesn't load any of it.
|
|
48
|
+
|
|
49
|
+
With it on, an agent's command of one of these kinds is denied until you say yes:
|
|
50
|
+
|
|
51
|
+
| kind | what the hook recognizes |
|
|
52
|
+
|---|---|
|
|
53
|
+
| `force-push` | `git push --force`, `-f`, `--force-with-lease`, `--mirror` or a `+ref` over main, master or a branch the repo's `reviewBeforeMerge` names |
|
|
54
|
+
| `remote-delete` | `git push --delete`, `git push origin :branch`, `gh repo delete` |
|
|
55
|
+
| `deploy` | `wrangler deploy` and `pages deploy` (not `--env staging`, not a preview `--branch`), `vercel --prod` and `promote`, `fly deploy`, `firebase deploy`, `netlify deploy --prod`, `dibs run deploy` of a command told `production` |
|
|
56
|
+
| `testflight` | `altool --upload-app`, `asc builds upload`, `asc publish testflight`, `xcodebuild -exportArchive` with an upload destination, `fastlane pilot`, `eas submit` |
|
|
57
|
+
| `appstore` | `asc publish appstore --submit`, `asc review submit`, `asc versions release`, `fastlane deliver` |
|
|
58
|
+
| `publish` | `npm`, `pnpm`, `yarn`, `bun`, `cargo`, `poetry` and `uv publish`, `twine upload`, `gem push`, `gh release create` (not `--draft`) |
|
|
59
|
+
| `delete` | `rm -r` of `/`, a top-level folder, your home folder or a folder directly in it (not `/tmp`) |
|
|
60
|
+
| `database` | `DROP DATABASE`, `SCHEMA` or `TABLE` and `TRUNCATE` through `psql -c` or `mysql -e` to a server that isn't local, `wrangler d1 execute --remote`, deleting a D1 database, R2 bucket or KV namespace, `neon ... delete`, `reset` and `restore`, `supabase projects delete`, `db reset --linked`, `storage rm`, `turso db destroy` |
|
|
61
|
+
| `purchase` | `vercel domains buy`, `gcloud domains registrations register`, `aws route53domains register-domain`, a `stripe ... --live` create, confirm, capture or pay |
|
|
62
|
+
|
|
63
|
+
Only the command itself counts: words inside quotes (a commit message, an `echo`) and heredocs are data, and `--dry-run` passes. The denial gives the agent the question to ask, `dibs question "..." --about <kind> --wait`. With doors on, a question about one of these kinds goes to you whatever the agent says about it, and only your answer counts: an agent's `dibs answer` exits 78, and no standing rule or past decision answers it. Your yes lets one such command through, in that project, within the hour. `DIBS_GUARD=off` doesn't skip it.
|
|
64
|
+
|
|
65
|
+
Routine doors you've already approved shouldn't nag: `dibs doors allow testflight` is a standing yes, everywhere unless `--repo <dir>`, for commands with given words with `--match`, until a time with `--for 30d`. `dibs doors block <kind>` takes a kind's yeses back, `dibs doors off <kind>` stops checking a kind, and `dibs doors` lists it all. Only you may loosen (turn it off, stop checking a kind, say yes); agents may turn it on, check a kind again and take yeses back. Every change is logged with who made it, and every command that went through under a yes is on the trail and in `dibs history` with the yes it used. It's a hook on agents' tool calls (it checks only calls that carry an agent tool's environment), so your own terminal is never stopped.
|
|
66
|
+
|
|
28
67
|
## The subagent limit
|
|
29
68
|
|
|
30
69
|
Fan-outs that start together hit the account's usage limit together and die mid-edit. So the hook also counts subagents running at once across every Claude Code session on the machine, through the Agent tool (Task in older Claude Code) and the SubagentStart and SubagentStop events. It's off unless you set a limit. Past `agents.slots`, a spawn is denied with who is running how many. A denied spawn started nothing and isn't a failure: wait for one of your own subagents to report back, then spawn again. A session with none running can always start one, so a big fan-out elsewhere can't starve it. The board shows `subagents: 5 of 8 running (web-app x3, api x2)`.
|
|
@@ -57,7 +96,7 @@ The plugin brings the hook and a short `dibs` skill that tells agents how to que
|
|
|
57
96
|
|
|
58
97
|
```bash
|
|
59
98
|
dibs guard install
|
|
60
|
-
dibs guard status #
|
|
99
|
+
dibs guard status # which tools it covers; exit 1 if none
|
|
61
100
|
dibs guard remove
|
|
62
101
|
```
|
|
63
102
|
|
|
@@ -67,24 +106,60 @@ dibs guard remove
|
|
|
67
106
|
dibs service install guard
|
|
68
107
|
```
|
|
69
108
|
|
|
70
|
-
**Codex.** Codex reads the same marketplace and plugin files:
|
|
109
|
+
**Codex.** Either the plugin, which Codex reads from the same marketplace and plugin files:
|
|
71
110
|
|
|
72
111
|
```bash
|
|
73
112
|
codex plugin marketplace add dibssoftware/dibs
|
|
74
113
|
codex plugin add dibs@dibs
|
|
75
114
|
```
|
|
76
115
|
|
|
77
|
-
|
|
116
|
+
or the hook alone, in `~/.codex/hooks.json` (`$CODEX_HOME/hooks.json` when that's set):
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
dibs guard install --for codex
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Pick one: both runs the hook twice. Codex sends the same hook input as Claude Code (`tool_name` is `Bash`, and `permission_mode` is set), so the guard blocks heavy commands there too, as above. Its file edits arrive as one `apply_patch` call: every file the patch adds, changes, deletes or moves to is checked against file leases. Codex doesn't trust a hook until you review it: open `/hooks` in a Codex session and trust the dibs hook, and again after each update that changes it. The skill loads without that step. If Codex runs in a sandbox that can't write `~/.dibs`, `dibs run` fails there; give the sandbox that folder or run dibs outside it.
|
|
123
|
+
|
|
124
|
+
## Other agent tools
|
|
125
|
+
|
|
126
|
+
The same rules run in Gemini CLI, Cursor and OpenCode, through each tool's own hooks. As everywhere, the guard turns a heavy command away with the exact `dibs run` line, and the agent's retry, with its own `-m`, goes through that tool's own approval.
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
dibs guard install --for gemini # ~/.gemini/settings.json
|
|
130
|
+
dibs guard install --for cursor # ~/.cursor/hooks.json
|
|
131
|
+
dibs guard install --for opencode # ~/.config/opencode/plugins/dibs.js
|
|
132
|
+
dibs guard install --for codex,gemini,cursor,opencode
|
|
133
|
+
dibs guard status # every tool, on or off
|
|
134
|
+
dibs guard remove --for cursor
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Each install keeps everything else in the file and the old file beside it as `.dibs-backup`, and running it again after an upgrade replaces the old entries instead of adding a second set. Every tool runs the same hook command.
|
|
138
|
+
|
|
139
|
+
How sure this is, per tool. Codex, Gemini CLI and OpenCode were run for real (no paid model: `test/live/vendors/run.mjs` points each at a scripted model in Node), with the hook installed by `dibs guard install --for` into a throwaway home. Their real hook input is in `test/fixtures/vendors`, and the tests feed it to the hook. Cursor's CLI talks only to Cursor's servers, so it couldn't be driven that way: everything about it below was verified from its shipped code, not run, and `dibs guard status` says so.
|
|
140
|
+
|
|
141
|
+
| | version checked | heavy commands | leased files | new sessions | messages from the person |
|
|
142
|
+
|---|---|---|---|---|---|
|
|
143
|
+
| Codex | 0.167.1, run | `PreToolUse` on `Bash` | `apply_patch` | `SessionStart` | beside its next tool call |
|
|
144
|
+
| Gemini CLI | 0.70.0, run | `BeforeTool` on `run_shell_command` | `write_file`, `replace` | `SessionStart` | after its next shell command or edit (`AfterTool`) |
|
|
145
|
+
| OpenCode | 1.19.6 and 2.3.0, run | `bash` (1), `shell` (2) | `edit`, `write`, `multiedit`; `apply_patch` too, though no run offered it | the system prompt | added to its next such call's result |
|
|
146
|
+
| Cursor | cursor-agent 2026.11.22, verified from shipped code, not run | `preToolUse` on `Shell` | `Write`, `Delete` | `sessionStart` | after its next shell command or edit (`postToolUse`) |
|
|
147
|
+
|
|
148
|
+
- **Codex** gets a heavy command turned away like any other tool. Messages ride along as context alone: Codex treats an "allow" with no rewritten command as a broken answer.
|
|
149
|
+
- **Gemini CLI** turns a command away with `{"decision": "deny"}`, and the agent reads the `dibs run` line as the tool's error. Hooks get Gemini CLI's own environment, so `DIBS_HOME` and `DIBS_AGENT` reach them (only names like `TOKEN` and `KEY` are held back, and only when you turn on its redaction).
|
|
150
|
+
- **OpenCode** has no hook file, so dibs writes a plugin: a short JavaScript file that hands each shell, edit, write and patch call to the same hook and throws the `dibs run` line to block it, which is how OpenCode turns a tool call away. One file serves both plugin APIs (OpenCode 1's `server()`, OpenCode 2's `setup()`). A message is added to a finished call's result; a call that failed leaves it waiting for the next one. The plugin runs the hook with the Node found on PATH when you installed it, so run `dibs guard install --for opencode` again if that Node moves. dibs never overwrites or removes a `dibs.js` it didn't write.
|
|
151
|
+
- **Cursor** turns a command away with `"permission": "deny"`; cursor-agent shows the model `user_message`, so the `dibs run` line goes there. When the hook has nothing to say it answers `{}`, never `"allow"`: cursor-agent passes a hook's permission on to Cursor's servers, and what they do with it can't be read. cursor-agent also runs the hooks in `~/.claude/settings.json`, so `dibs guard install` alone already covers it; `--for cursor` adds the messages after each call, and cursor-agent drops the Claude Code copy because the command is the same, so the hook runs once.
|
|
152
|
+
- **Subagent limit.** Only Claude Code's subagents are counted. Codex's and Cursor's have hooks too, but no adapter yet.
|
|
153
|
+
- **Messages from the person.** An agent outside Claude Code gets messages under the name its dibs commands go by (`dibs threads` shows it). The hook finds them by that name and by the agent's process, so a message reaches it on its next tool call rather than its next dibs command.
|
|
78
154
|
|
|
79
|
-
|
|
155
|
+
**Factory, Copilot CLI, Amp and the rest.** No adapter yet. `dibs init` writes the instructions file each tool reads when its folder exists (`~/.claude/CLAUDE.md`, `~/.codex/AGENTS.md`, `~/.gemini/GEMINI.md`, `~/.config/opencode/AGENTS.md`, and the repo's own `CLAUDE.md` and `AGENTS.md`, which Cursor and most others read), so agents there know to use `dibs run`, but nothing catches one that forgets. Cursor keeps its user rules in its settings rather than a file, so outside a repo with an `AGENTS.md` it hears about dibs only from the hook. `dibs run` itself works under any agent or a plain terminal.
|
|
80
156
|
|
|
81
157
|
## Your own rules
|
|
82
158
|
|
|
83
|
-
Add rules or switch built-ins off in `~/.dibs/config.json`. A rule matches the command's first words (the first by basename, `*` as a wildcard) once `env`, `time`, `npx`, `xcrun` and the like are peeled off
|
|
159
|
+
Add rules or switch built-ins off in `~/.dibs/config.json`. A rule matches the command's first words (the first by basename, `*` as a wildcard) once `env`, `time`, `npx`, `xcrun` and the like are peeled off.:
|
|
84
160
|
|
|
85
161
|
```json
|
|
86
162
|
"guard": {
|
|
87
|
-
"rewrite": "bypass",
|
|
88
163
|
"rules": {
|
|
89
164
|
"pytest": { "match": ["pytest", "python -m pytest"], "res": "test", "unless": ["--collect-only"] },
|
|
90
165
|
"vercel": false
|
|
@@ -94,4 +169,4 @@ Add rules or switch built-ins off in `~/.dibs/config.json`. A rule matches the c
|
|
|
94
169
|
|
|
95
170
|
The built-in rule names are `xcodebuild`, `simctl`, `swift-test`, `playwright`, `vitest`, `jest`, `npm-test`, `node-test`, `wrangler`, `vercel` and `deploy-script`.
|
|
96
171
|
|
|
97
|
-
`"guard": false` switches off the
|
|
172
|
+
`"guard": false` switches off the blocking of heavy commands, but edits to files another agent leased are still turned away. `"guard": { "files": false }` stops only those, and `"guard": { "commands": false, "files": false }` turns both off.
|