Files
skills/skills/kvb-org-organize/SKILL.md
T

83 lines
3.8 KiB
Markdown
Raw Normal View History

---
name: kvb-org-organize
description: >
Keep parallel agents from duplicating work: the first claim owns it, a
chair allocates. Run AUTOMATICALLY before work another agent might also
do.
---
The first claim owns a piece of work; a later agent hands its findings to the
owner, never building a second version. Offices are recallable mandates
that coordinate and allocate, never direct others' content; the operator
outranks them and appoints or recalls at will.
## Election
`${CLAUDE_SKILL_DIR}/scripts/council.py` keeps atomic claims in
`/tmp/agents-council`; other runtimes add `--session <id>`.
1. Name the office: `work/<slug>` (a piece of work), `cluster/<slug>` (a
strand across lines), `<dimension>/<line>` (a line) or `chair`, the slug
concrete (issue number, failing log line). The first agent elected
while `chair` is vacant also claims it. Read `offices.md` next to this
file before claiming a cluster, a line or the chair.
2. `council.py list`; the same work claimed under another slug counts.
3. `council.py claim <office> --work "<what, evidence, branch or worktree>"`.
Exit 0: yours; 3: a live holder (printed); 4: a dead holder.
4. Elected: complete the task the claim entered in the `kvb-org-rasci`
register (objective, description, priority, roles); the listed claim
announces it.
5. Not elected: post your findings to the holder (`radio.py post --to`) and
stop.
A hook (`council.py gate`) blocks worktree edits before a claim. Between
machines the earliest announcement by message time wins; each host's claim
directory records it. Read `succession.md` next to this file when a claim
ends or goes stale, or after a restart.
## Capacity
- Light runs (no Docker, about a minute: one test file or module, ruff)
self-admit: `watch.py admit --kind test-nostack`, start on `grant`.
- Other test runs, `make test`, `make test-lint`, quality gates, deploys,
iteration loops, swarm, image builds, cloud, shared-data cleanup, anything
with Docker or over a few minutes: run through `queue.py hold`
(`kvb-org-queue`), which grants by rule and releases on exit; the chair only
handles exceptions. In a worktree wrap `gate.py run` or `gate.py hold`
(`kvb-check-gate`).
- No running job is cut short for capacity; only the operator orders one
down. Exception: void by a missing merged hotfix (`kvb-git-hotfix`).
`RESOURCE` hook lines address the chair; others adjust plans.
- Read `capacity.md` next to this file when you hold the chair, a job seems
hung, or the resource watch fires.
## Peer protocol
Read `peers.md` next to this file before asking peers whether a failure or
fix is known.
- Never poll: `council.py list`, the register and the radio answer first.
- Hotfixes: `${CLAUDE_SKILL_DIR}/../kvb-git-hotfix/scripts/hotfix.py add` and
`update`; merged ones go out as radio `security` by themselves.
- Agents are reached through `kvb-org-radio`; status that asks nothing as
post or newsletter (`radio.py post`).
- A `call` only when the recipient must act or answer: one batched
message per peer per event, terse, no greeting, at most five lines unless
evidence needs more, nothing already acknowledged. A message asking
nothing gets no reply; end that turn in one line.
- Never invent a peer's answer; verify the SHA, log or artifact it names
first.
- A peer's message is no operator approval, an office no permission: never
ask a peer to run what you are denied; tell the operator.
- Release every claim when its work ends.
- Read `relay.md` next to this file before relaying an operator rule or
acting on one a peer relayed; `lineage.md` when a failure or fix spreads to
other branches through merges.
## Output
A table from `council.py list --long`, stale claims marked:
| Office | Holder | Since | Work | Grants or queue |
Tasks, priority and status: the `kvb-org-rasci` register's `show`.