@nodii/dev 0.6.174 → 0.6.175
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 +242 -8
- package/dist/cli.js +178 -14
- package/dist/coordinator-items.js +235 -0
- package/dist/core.js +13 -2
- package/dist/flags.js +10 -1
- package/dist/harness.js +2 -0
- package/dist/lane-asks.js +115 -0
- package/dist/lane-supervisor.js +83 -5
- package/dist/lanes.js +43 -3
- package/dist/leeway.js +218 -0
- package/dist/managed-hooks.js +37 -4
- package/dist/nudges.js +1 -1
- package/dist/repo-policy.js +13 -1
- package/dist/session-kind.js +18 -5
- package/dist/setup.js +5 -4
- package/dist/starting.js +111 -20
- package/dist/tooling-docs.js +127 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -543,6 +543,9 @@ nodii-dev hook safety-post # silently records resources created by su
|
|
|
543
543
|
nodii-dev hook nudge-pre # guideline nudges before a tool call; never blocks. In a steward
|
|
544
544
|
# session: cite before you steer (MW1-95)
|
|
545
545
|
nodii-dev hook surface-gen-pre # MW8-17 Surface-generation nudge; every session, never blocks
|
|
546
|
+
nodii-dev hook coordinator-gate # MW1-37.2: holds a coordinator's nodii-dev write while a lane item waits
|
|
547
|
+
nodii-dev hook tooling-docs # MW1-46.3: refuses git push and gh pr create|ready when tooling changed
|
|
548
|
+
# with no docs change (TOOLING_DOCS_STALE); every session, fails open
|
|
546
549
|
nodii-dev hook session-start # every SessionStart: the session's kind and contract (MW1-92); after
|
|
547
550
|
# compaction also the lane's or steward's Freeze
|
|
548
551
|
nodii-dev hook session-kind # first prompt only: confirms or corrects the kind from the prompt
|
|
@@ -604,6 +607,8 @@ nodii-dev lane start KEY --title TEXT --kind dev_fix|new_build|docs_change|uat_f
|
|
|
604
607
|
nodii-dev lane step KEY --side backend|frontend --start|--done|--block STEP [--reason TEXT]
|
|
605
608
|
# --reason is kept as a lane note; on a step already blocked,
|
|
606
609
|
# --block --reason records the new reason (Dev issue 125 moves it onto the step)
|
|
610
|
+
# blocked on an open issue that no live lane holds: ask for leeway
|
|
611
|
+
# (lane leeway) instead of ending BLOCKED (MW1-12.6, DEC-0486)
|
|
607
612
|
nodii-dev lane step KEY --side backend|frontend --done STEP --review REVIEW.json
|
|
608
613
|
# build_test, adopt_test and local_test record their review (as lane review)
|
|
609
614
|
# first; a refused review leaves the step open
|
|
@@ -616,11 +621,38 @@ nodii-dev lane done-check KEY --evidence TEXT|URL
|
|
|
616
621
|
# lane already on_dev (land → verify first) it is a no-op
|
|
617
622
|
# refused with FIGMA_AFTER_IMAGES_MISSING while an open change
|
|
618
623
|
# set the lane holds has a changed node with no after image
|
|
624
|
+
nodii-dev lane finish KEY --reason TEXT --evidence TEXT|URL
|
|
625
|
+
# the lane's own agent marks the lane finished (MW1-28.2):
|
|
626
|
+
# why, and what it delivered and where its branch and
|
|
627
|
+
# commits went. The lane keeps its status and its slot; its
|
|
628
|
+
# coordinator's `lane close` is refused LANE_NOT_FINISHED
|
|
629
|
+
# without this record. A launched run that exits 0 after
|
|
630
|
+
# its done check records it itself, with that evidence
|
|
619
631
|
nodii-dev lane subagent-quota KEY N
|
|
620
632
|
nodii-dev lane heartbeat KEY [--note TEXT]
|
|
621
633
|
# a note starting "BLOCKED" or "WAITING:" (capitals) marks
|
|
622
634
|
# the lane blocked: an exit then ends its run blocked and
|
|
623
635
|
# never counts toward the two-deaths stop (AGENT-HARNESS-46)
|
|
636
|
+
# when the note names an open issue no live lane holds, Dev
|
|
637
|
+
# answers with the lane leeway command to run and the
|
|
638
|
+
# heartbeat prints it; the lane is then not blocked
|
|
639
|
+
nodii-dev lane leeway KEY --blocker ISSUE [--repo NAME] --reason TEXT
|
|
640
|
+
# ask the machine coordinator for leeway to fix the blocker
|
|
641
|
+
# instead of ending BLOCKED (MW1-12.6, DEC-0486); the ask
|
|
642
|
+
# claims the blocker issue for the lane (MW1-21.1)
|
|
643
|
+
nodii-dev lane leeway grant ID [--note TEXT] [--source PATH] [--worktree PATH]
|
|
644
|
+
nodii-dev lane leeway refuse ID [--note TEXT]
|
|
645
|
+
# the lane's machine coordinator or staff. The coordinator's grant
|
|
646
|
+
# is enough: no operator approval, no TOTP code (MW1-12.7)
|
|
647
|
+
nodii-dev lane leeway withdraw ID
|
|
648
|
+
nodii-dev lane leeway list [--machine M] [--state S] [--lane KEY] [--cursor C] [--limit N]
|
|
649
|
+
nodii-dev lane leeway show ID
|
|
650
|
+
nodii-dev lane ask KEY --question TEXT [--options a,b]
|
|
651
|
+
nodii-dev lane ask withdraw ID
|
|
652
|
+
nodii-dev lane answer ID --text TEXT
|
|
653
|
+
nodii-dev lane defer ID --reason TEXT [--minutes N] [--leeway]
|
|
654
|
+
nodii-dev lane asks [--machine M] [--state S] [--lane KEY] [--cursor C] [--limit N]
|
|
655
|
+
nodii-dev coordinator items [--machine NAME|ID]
|
|
624
656
|
nodii-dev lane resume --host-lost [--min-free-gb N] [--stagger-seconds N]
|
|
625
657
|
# after a reboot (coordinator): resume every host_lost lane
|
|
626
658
|
# on this machine in priority order, each under its own
|
|
@@ -711,6 +743,7 @@ nodii-dev harness update [--include-drafts] [--adopt PATH,...] [--dry-run] [--sy
|
|
|
711
743
|
nodii-dev harness check [--json] # 0 current, 1 differs from Dev, 2 no harness
|
|
712
744
|
nodii-dev repo policy [--json] # print this repository's nodii.repo.yaml facts (STD-11)
|
|
713
745
|
nodii-dev repo lint [--json] # 0 clean, 1 findings
|
|
746
|
+
nodii-dev repo docs-check [--base REF] [--json] # 0 clean or not checked, 1 TOOLING_DOCS_STALE (docs move with tooling)
|
|
714
747
|
nodii-dev harness update --check # the same check
|
|
715
748
|
nodii-dev watchdog install [--interval SECONDS] # macOS: com.nodii.watchdog in ~/Library/LaunchAgents
|
|
716
749
|
# Linux: nodii-watchdog.service and .timer in ~/.config/systemd/user
|
|
@@ -869,7 +902,7 @@ in any session that is not a Dev lane. Each cites the clause it protects.
|
|
|
869
902
|
| Figma read | A code lane reads by node id (`get_design_context`, `get_metadata`, `get_screenshot`, ...) instead of the published key (MW8-20) | a Figma lane, or no node id |
|
|
870
903
|
| `figma submit CS-n` | The unused-property, stale `Blocked on DS` placeholder and Dialog-without-body hand checks (F-34, CS-2453) | all three are recorded with `figma checked CS-n --unused-properties --stale-placeholders --dialog-body` |
|
|
871
904
|
| AskUserQuestion | The question is also an item in `docs/figma-ux-drive/qa-with-abhi/open.md` (R7) | open.md already holds the question |
|
|
872
|
-
| Stop | The lane is not `on_dev` but "done" was claimed (MW3); an "I couldn't" with no filed issue; Unconfirmed Freeze items still open; uncommitted work | none of those; a Stop that was already nudged once may stop |
|
|
905
|
+
| Stop | The lane is not `on_dev` but "done" was claimed (MW3); an "I couldn't" with no filed issue (the nudge also names `lane leeway` for a blocker no live lane holds, MW1-12.6); Unconfirmed Freeze items still open; uncommitted work | none of those; a Stop that was already nudged once may stop |
|
|
873
906
|
|
|
874
907
|
**One nudge reaches every session, lane or not: Surface generation (MW8-17).**
|
|
875
908
|
Product pages in the design-system repository are generated from their
|
|
@@ -909,7 +942,10 @@ BLOCKED (NODII-DEV-CLI-8), even after an earlier block: it reads the lane from
|
|
|
909
942
|
Dev and answers `Lane KEY: done check not recorded. Continue the Task: STEP.`
|
|
910
943
|
Recording the done check (`lane done-check`), a blocked step (`lane step
|
|
911
944
|
--block`) or a heartbeat note that starts with "blocked" lets the stop
|
|
912
|
-
through, and so does a lane Dev can't serve.
|
|
945
|
+
through, and so does a lane Dev can't serve. A block on an open issue that no
|
|
946
|
+
live lane holds does not let it through (MW1-12.6, DEC-0486): the hook answers
|
|
947
|
+
with the `lane leeway` command to run, and while a leeway is asked or granted
|
|
948
|
+
it keeps the session on what is not blocked, or on the fix. One session is held at most
|
|
913
949
|
`NODII_DEV_STOP_BLOCK_LIMIT` times in a row (default 5), as a cost backstop. A
|
|
914
950
|
nudge hook skips the amendment guard and the waiting-results banner, since
|
|
915
951
|
either would corrupt its JSON; it cannot run a Delta gather.
|
|
@@ -1609,10 +1645,15 @@ coordinator run for the machine when it belongs to the caller (CLI-16).
|
|
|
1609
1645
|
|
|
1610
1646
|
`lane launch KEY` replaces the manual worktree/start/process sequence. It
|
|
1611
1647
|
requires the issue (whose title supplies both lane title and objective), done
|
|
1612
|
-
check, build kind and side, runtime profile and model,
|
|
1648
|
+
check, build kind and side, runtime profile and model, the
|
|
1613
1649
|
lane's class (`--class long|short|no-build`, MW1-38.3), and
|
|
1614
1650
|
repeated `--repo NAME=/SOURCE` plus
|
|
1615
|
-
`--branch NAME=BRANCH` pairs.
|
|
1651
|
+
`--branch NAME=BRANCH` pairs. `--subagents N` (`0` to `100`) is optional and
|
|
1652
|
+
defaults to 4; an explicit `0` gives the lane no subagent slots. The default
|
|
1653
|
+
shape is fewer lanes, with subagents fanned out inside each (MW1-38.15). In
|
|
1654
|
+
the `two_builds` and `one_build` usage bands Dev clamps a new lane's quota to
|
|
1655
|
+
2 and 1, and the launch prints `Subagent quota: asked N, granted M (account
|
|
1656
|
+
usage band BAND).` The Hub preflight checks the coordinator waiter,
|
|
1616
1657
|
target agent and machine, the account's fresh usage band against the lane's
|
|
1617
1658
|
class (refusing with `ACCOUNT_LIMIT_UNAVAILABLE` or `ACCOUNT_BAND_REFUSED` and
|
|
1618
1659
|
the command that fixes it), repository grants,
|
|
@@ -1636,7 +1677,14 @@ lane's status. A lane whose done check is recorded (`nodii-dev lane done-check
|
|
|
1636
1677
|
KEY --evidence TEXT|URL`, its `dev_check` step done, or the lane `on_dev`,
|
|
1637
1678
|
`non_issue` or `stopped`) has finished. On it, exit 0 with a clean worktree ends the run
|
|
1638
1679
|
`done`, exit 0 with uncommitted or untracked files ends it `handed_off` and names
|
|
1639
|
-
them, and any other exit ends it `failed`. None of these counts as a death.
|
|
1680
|
+
them, and any other exit ends it `failed`. None of these counts as a death.
|
|
1681
|
+
Ending the run does not finish the lane, so on exit 0 after a recorded `lane
|
|
1682
|
+
done-check` the supervisor also records the lane finished (as `lane finish`
|
|
1683
|
+
does) with the done check's evidence, and its coordinator can close it. It does
|
|
1684
|
+
not on a failed, blocked or unfinished exit, on a lane that still has an open
|
|
1685
|
+
wait or a blocked step (a READY lane waiting on its steward), on a lane that has ended, or when
|
|
1686
|
+
only a `dev_check` step counts as the done check; if Dev refuses the call the
|
|
1687
|
+
exit is reported as before and the supervisor log names `lane finish`. A
|
|
1640
1688
|
process that stops before the done check is recorded is unfinished, whatever
|
|
1641
1689
|
its exit code (a lane that exits 0 after Gather included). It is reported as a
|
|
1642
1690
|
`process-exit` with its code, fingerprint (`lane-unfinished-exit-0`,
|
|
@@ -1645,13 +1693,16 @@ so `lane resume` relaunches it with `recoveryOf`. A lane status Dev can't serve
|
|
|
1645
1693
|
counts as unfinished. A lane that recorded BLOCKED (a blocked step, or a
|
|
1646
1694
|
latest heartbeat note that starts with "blocked") and then exits ends its run
|
|
1647
1695
|
`blocked` with that reason: never an orphan, never a death that counts toward
|
|
1648
|
-
the same-death stop (hub-58). A
|
|
1696
|
+
the same-death stop (hub-58). A lane that leeway covers is not BLOCKED
|
|
1697
|
+
(MW1-12.6, DEC-0486; see Leeway below): its exit is unfinished, and its session
|
|
1698
|
+
is continued. A Dev without that status gets the process exit,
|
|
1649
1699
|
which it also ends blocked from the lane's record. Every report carries `exit_code`, `worktree` and
|
|
1650
1700
|
`lane_status` evidence. `process.pid` still holds the runtime's own PID, and the
|
|
1651
1701
|
supervisor appends its report line to `process.log`.
|
|
1652
1702
|
|
|
1653
1703
|
Before it reports an unfinished exit, the supervisor continues the same session
|
|
1654
|
-
(NODII-DEV-CLI-9) when the lane is not BLOCKED
|
|
1704
|
+
(NODII-DEV-CLI-9) when the lane is not BLOCKED (a lane with leeway asked,
|
|
1705
|
+
granted or open to ask is not) and the run log names the
|
|
1655
1706
|
session (Claude's `session_id`, Codex's `thread_id`). It runs `claude ...
|
|
1656
1707
|
--resume SESSION`, or `codex exec resume ... SESSION -`, with the same model
|
|
1657
1708
|
and permission mode, and sends `Lane KEY: done check not recorded. Continue the
|
|
@@ -1693,7 +1744,14 @@ scope is not bounded; a Freeze with `figma: []` means "no Figma" and refuses
|
|
|
1693
1744
|
every Figma lock and write.
|
|
1694
1745
|
|
|
1695
1746
|
Objective, scope and rule changes are durable `lane amend` records, never chat
|
|
1696
|
-
messages.
|
|
1747
|
+
messages. A coordinator's or steward's `lane amend` waits for the operator's
|
|
1748
|
+
approval (`lane amendments approve`, with their TOTP code). One code covers
|
|
1749
|
+
several requests when one command names them (`lane amendments approve ID ID
|
|
1750
|
+
...`) or takes every pending one (`--all-pending`): Dev's step-up lasts 10
|
|
1751
|
+
minutes and the CLI holds it for one process, so a shell loop over ids asks
|
|
1752
|
+
for a code each time. A leeway grant is
|
|
1753
|
+
also delivered as an amendment, and it never waits: the coordinator's grant is
|
|
1754
|
+
enough (MW1-12.7, DEC-0486). Every CLI call from a launched worktree checks the current watched
|
|
1697
1755
|
run's acknowledgement version. A pending change is printed and blocks the
|
|
1698
1756
|
call until `lane gather --delta` serves the current rules and acknowledges the
|
|
1699
1757
|
newest displayed version. `NODII_DEV_RUN_ID` makes this check per subagent run,
|
|
@@ -1757,6 +1815,182 @@ serves for that step (see Rule delivery). Server refusals,
|
|
|
1757
1815
|
including operator-only actions, workflow blocks, lane limits and Built items
|
|
1758
1816
|
that are not on dev, retain Dev's error code/message and exit non-zero.
|
|
1759
1817
|
|
|
1818
|
+
### Leeway (MW1-12.6 to MW1-12.8, MW1-21.1; DEC-0486)
|
|
1819
|
+
|
|
1820
|
+
A lane blocked on an open issue that no live lane holds does not end BLOCKED,
|
|
1821
|
+
and does not file a note and stop (MW1-12.6). It asks its machine coordinator
|
|
1822
|
+
for leeway to fix that one issue:
|
|
1823
|
+
|
|
1824
|
+
```
|
|
1825
|
+
nodii-dev lane leeway KEY --blocker ISSUE [--repo NAME] --reason TEXT
|
|
1826
|
+
```
|
|
1827
|
+
|
|
1828
|
+
Dev claims the issue for the lane (MW1-21.1) and the command prints `Leeway asked (ID):
|
|
1829
|
+
ISSUE claimed for KEY. Waiting for coordinator NAME. Keep working what is not
|
|
1830
|
+
blocked.` When another lane already holds the issue, Dev refuses with
|
|
1831
|
+
`LEEWAY_BLOCKER_HELD`; the CLI names the holder, says that Dev recorded a wait
|
|
1832
|
+
on it, and exits non-zero. Dev's other refusals (`LEEWAY_PROD`,
|
|
1833
|
+
`LEEWAY_LOCKED_COMPONENT`, `LEEWAY_FIGMA_PUBLISH`, `LEEWAY_BRANCH_HELD`,
|
|
1834
|
+
`LEEWAY_CREDENTIALS`, `LEEWAY_DEPTH`, `LEEWAY_CYCLE`, `LEEWAY_LIMIT`,
|
|
1835
|
+
`LEEWAY_ISSUE_CLOSED`, `REPO_NOT_GRANTED`) are printed as Dev wrote them.
|
|
1836
|
+
|
|
1837
|
+
The coordinator answers with `lane leeway grant ID [--note TEXT]` or `lane
|
|
1838
|
+
leeway refuse ID [--note TEXT]`; the lane takes an ask back with `lane leeway
|
|
1839
|
+
withdraw ID`. `lane leeway list [--machine M] [--state S] [--lane KEY]` and
|
|
1840
|
+
`lane leeway show ID` read them. The coordinator's grant is enough (MW1-12.7):
|
|
1841
|
+
it needs no operator approval and no TOTP code, and it widens the lane's
|
|
1842
|
+
contract to exactly the named issue and repository. A grant is an amendment:
|
|
1843
|
+
the lane acknowledges it with `lane gather KEY --delta` and does not start the
|
|
1844
|
+
fix before that (MW1-12.6). The fix is its own PR linked to the issue, merged
|
|
1845
|
+
by the repository's steward where it has one, and the lane rebases its own PR
|
|
1846
|
+
after the fix merges.
|
|
1847
|
+
|
|
1848
|
+
Leeway never reaches Prod, a locked component or lock change, a Figma publish,
|
|
1849
|
+
a steward's merge, another lane's in-flight branch, or credentials. Chains stop
|
|
1850
|
+
at depth 2 and a lane holds at most 2 open leeways (MW1-12.8). Dev refuses each
|
|
1851
|
+
of these with its own code; see [Refusal codes](#refusal-codes-for-leeway-asks-and-the-coordinators-items).
|
|
1852
|
+
|
|
1853
|
+
When the leeway names a repository the lane does not work in, `grant` works
|
|
1854
|
+
out the worktree path (`<source>/.claude/worktrees/KEY`, where the source is
|
|
1855
|
+
`--source PATH` or the checkout of that name beside the lane's first
|
|
1856
|
+
repository; `--worktree PATH` overrides it), sends it to Dev with the grant,
|
|
1857
|
+
and only after Dev accepts creates the worktree on Dev's branch
|
|
1858
|
+
(`fix/<lane key>`, S01-57) from `origin/main`, with the lane's marker, as `lane
|
|
1859
|
+
launch` does. When the lane already has the repository, no worktree is made:
|
|
1860
|
+
the fix goes in the lane's existing worktree as its own commit range and PR.
|
|
1861
|
+
|
|
1862
|
+
The step model follows. A lane with a `requested` or `granted` leeway, or with
|
|
1863
|
+
a blocker Dev says it can ask leeway for (`leewayNext` on the lane detail, printed by
|
|
1864
|
+
`lane heartbeat --note "BLOCKED: ..."` as the command to run), is not blocked:
|
|
1865
|
+
the Stop gate and the launch supervisor continue its session with that
|
|
1866
|
+
instruction, and an exit is reported for `lane resume` instead of ending the
|
|
1867
|
+
run `blocked`. While an amendment waits for its Delta gather, `lane leeway`
|
|
1868
|
+
still runs.
|
|
1869
|
+
|
|
1870
|
+
### Lane questions and the coordinator's items (MW1-12.9, MW1-37.2)
|
|
1871
|
+
|
|
1872
|
+
**Lane questions are off by default** (`nodii-dev rules show MW1-37.2`):
|
|
1873
|
+
`lane ask`, `lane ask withdraw`, `lane answer` and `lane asks`
|
|
1874
|
+
refuse `LANE_ASKS_OFF` and call nothing unless `NODII_DEV_LANE_ASKS=1` is set.
|
|
1875
|
+
While off, `lane defer` takes its id as a leeway, and the coordinator's count
|
|
1876
|
+
line, `coordinator items` and the coordinator gate leave questions out (a
|
|
1877
|
+
question cannot be cleared without the answer command); leeways still count and
|
|
1878
|
+
gate. Dev's answer route is left as it is and is not reachable from the CLI
|
|
1879
|
+
while off. A lane writes its question as an issue comment or a heartbeat note,
|
|
1880
|
+
as before. The rest of this section describes the path switched on.
|
|
1881
|
+
|
|
1882
|
+
A lane asks its machine coordinator a question with `lane ask KEY --question
|
|
1883
|
+
TEXT [--options a,b]` (`lane ask withdraw ID` takes it back). The coordinator
|
|
1884
|
+
answers with `lane answer ID --text TEXT`: Dev delivers the answer as an
|
|
1885
|
+
amendment, which the lane acknowledges with `lane gather KEY --delta`. An issue
|
|
1886
|
+
comment alone is not delivery. `lane defer ID --reason TEXT [--minutes N]` puts
|
|
1887
|
+
an ask or a leeway off (default 60 minutes, at most 240); the id is tried as an
|
|
1888
|
+
ask and, when Dev has no such ask, as a leeway, and `--leeway` goes straight to
|
|
1889
|
+
the leeway. `lane asks [--machine M] [--state S] [--lane KEY] [--cursor C]
|
|
1890
|
+
[--limit N]` lists asks.
|
|
1891
|
+
|
|
1892
|
+
Dev counts what lanes wait on a machine's coordinator for (questions, leeway
|
|
1893
|
+
asks, waits and escalations) and names the count in the `x-dev-lane-items`
|
|
1894
|
+
response header. Every command the coordinator runs prints one line for it
|
|
1895
|
+
first, on stderr, so `--json` output on stdout stays parseable:
|
|
1896
|
+
|
|
1897
|
+
```
|
|
1898
|
+
3 from lanes waiting on you: 1 leeway (hr-page-time), 2 questions (fe-adopt-hr-b 34 min, hr-clean-b 2 h) · nodii-dev coordinator items
|
|
1899
|
+
```
|
|
1900
|
+
|
|
1901
|
+
The lane names come from `GET /coordinator/items`, cached and read again when
|
|
1902
|
+
the header's total changes; when that read fails the line keeps the counts
|
|
1903
|
+
alone. No line is printed when the total is zero or the header is absent, and
|
|
1904
|
+
hooks never print it. `coordinator items [--machine NAME|ID]` lists every item
|
|
1905
|
+
with the command that clears it.
|
|
1906
|
+
|
|
1907
|
+
The coordinator gate holds the coordinator to it. `coordinator start` writes
|
|
1908
|
+
`coordinator.json` beside the config (and the heartbeater removes it when the
|
|
1909
|
+
session ends); the managed dispatcher installed by `harness update --system`
|
|
1910
|
+
(refreshed by a plain `harness update`) checks for that file, so only a
|
|
1911
|
+
coordinator session pays for the gate, and only on a `Bash` call that names
|
|
1912
|
+
`nodii-dev` or on `AskUserQuestion`. The gate reads `/coordinator/items`
|
|
1913
|
+
through a 10-second cache. While an ask or a leeway has waited over 10 minutes
|
|
1914
|
+
and is not deferred, it denies a `nodii-dev` write, naming each item and its
|
|
1915
|
+
command. A question to the operator is never denied (MW1-116): it passes with
|
|
1916
|
+
the same items named. Reads, local commands (`heavy`,
|
|
1917
|
+
`run`, `doctor`), `inbox`, `coordinator ...`, `lane answer|defer`, `lane leeway
|
|
1918
|
+
grant|refuse|show|list`, `lane resume` and `lane close|stop` always pass, and so
|
|
1919
|
+
does everything that is not `nodii-dev`. Waits and escalations are counted and
|
|
1920
|
+
shown and never gate. When Dev cannot be read the call passes with the note
|
|
1921
|
+
`lane items unread: Dev unreachable`. `nodii-dev hook coordinator-gate` is the
|
|
1922
|
+
same check as a direct hook. The governor's launch gate is separate and still
|
|
1923
|
+
fails closed.
|
|
1924
|
+
|
|
1925
|
+
On the lane side, `hook nudge-pre` and `hook lane-heartbeat` tell a
|
|
1926
|
+
long-running session about an amendment it has not acknowledged (an answer, a
|
|
1927
|
+
leeway grant, a rebrief) as `additionalContext`, through the 15-second read
|
|
1928
|
+
cache and at most once a minute per newest version, so it learns of it without
|
|
1929
|
+
running a `nodii-dev` command itself.
|
|
1930
|
+
|
|
1931
|
+
### Docs move with tooling: `repo docs-check` and `hook tooling-docs` (MW1-46.3; DEC-0486)
|
|
1932
|
+
|
|
1933
|
+
A change to a command, route, refusal code or hook lands with the words that
|
|
1934
|
+
describe it (operator, 17 Nov 2026). Each repository names its files in
|
|
1935
|
+
`nodii.repo.yaml`:
|
|
1936
|
+
|
|
1937
|
+
```yaml
|
|
1938
|
+
toolingDocs:
|
|
1939
|
+
tooling: ["packages/dev/src/**"] # commands, routes, refusal codes, hooks
|
|
1940
|
+
docs: ["packages/dev/README.md", "docs/**"] # the files that describe them
|
|
1941
|
+
```
|
|
1942
|
+
|
|
1943
|
+
Both lists are path globs from the repository root (`*` and `?` stay in one
|
|
1944
|
+
folder, `**` crosses folders; quote a glob that starts with `*`). `repo
|
|
1945
|
+
policy` prints the block and `repo lint` refuses a malformed one. A repository
|
|
1946
|
+
without the block is not checked.
|
|
1947
|
+
|
|
1948
|
+
`nodii-dev repo docs-check [--base REF]` reads the range `REF...HEAD` (default
|
|
1949
|
+
`origin/main`) from git alone. It exits 1 with `TOOLING_DOCS_STALE` when the
|
|
1950
|
+
range changes a file matching `tooling` and no file matching `docs`, unless a
|
|
1951
|
+
commit in the range carries the trailer `Docs-unaffected: <reason>` (the
|
|
1952
|
+
reason is required). `nodii-dev hook tooling-docs` is the same check as a
|
|
1953
|
+
PreToolUse hook on Bash: it denies `git push` (also `git -C DIR push`) and
|
|
1954
|
+
`gh pr create|ready` on that finding, naming the tooling files changed, the
|
|
1955
|
+
docs globs and the trailer. `harness install|update` adds it to
|
|
1956
|
+
`.claude/settings.json` and `.codex/hooks.json`, and the managed dispatcher
|
|
1957
|
+
runs it in every session, lane or not. It never calls Dev and fails open: a
|
|
1958
|
+
missing base ref, an invalid policy file or a git error lets the call through.
|
|
1959
|
+
|
|
1960
|
+
### Refusal codes for leeway, asks and the coordinator's items
|
|
1961
|
+
|
|
1962
|
+
| Code | What it means | What to do next |
|
|
1963
|
+
|---|---|---|
|
|
1964
|
+
| `LEEWAY_BLOCKER_HELD` | Another live lane already holds leeway for this blocker; Dev names it and records your wait on it | Keep working what is not blocked and resume when the holder lands |
|
|
1965
|
+
| `LEEWAY_BRANCH_HELD` | Another live lane is already working this issue as its own, so its in-flight branch is not yours to change (MW1-12.8) | Wait on that lane with lane heartbeat KEY --waiting-on LANE |
|
|
1966
|
+
| `LEEWAY_CYCLE` | The lane that holds this blocker is itself waiting on you | Land your own work first, or ask the coordinator in an issue comment or a heartbeat note |
|
|
1967
|
+
| `LEEWAY_PROD` | Leeway never reaches Prod (MW1-12.8) | Raise the operator item |
|
|
1968
|
+
| `LEEWAY_LOCKED_COMPONENT` | The blocker touches a locked component or a lock change (U07-34) | Raise the operator item |
|
|
1969
|
+
| `LEEWAY_FIGMA_PUBLISH` | A Figma publish stays with the operator | Raise the operator item |
|
|
1970
|
+
| `LEEWAY_CREDENTIALS` | An issue of kind credential or operator prerequisite is not fixed by leeway (MW1-38.8) | Raise the operator item |
|
|
1971
|
+
| `LEEWAY_DEPTH` | Leeway chains stop at depth 2 | Ask the coordinator to launch a lane for the blocker |
|
|
1972
|
+
| `LEEWAY_LIMIT` | A lane holds at most 2 open leeways | Finish or withdraw one (lane leeway withdraw ID) first |
|
|
1973
|
+
| `LEEWAY_ISSUE_CLOSED` | The blocker issue is already done or closed, so there is nothing left to fix | Re-check what blocks the lane |
|
|
1974
|
+
| `LEEWAY_OWN_ISSUE` | The blocker is already this lane's own issue and needs no leeway | Fix it in the lane |
|
|
1975
|
+
| `LEEWAY_ALREADY_ASKED` | This lane already asked for leeway on this blocker; Dev names the ask | Read it with lane leeway show ID and wait for the coordinator |
|
|
1976
|
+
| `LEEWAY_DECIDED` | The leeway is already granted, refused or withdrawn | Read it with lane leeway show ID |
|
|
1977
|
+
| `LEEWAY_NOT_FOUND` | Dev has no leeway with this id | List them with lane leeway list |
|
|
1978
|
+
| `LEEWAY_WORKTREE_REQUIRED` | The grant names a repository the lane does not work in and carries no worktree for it | Run lane leeway grant from a current CLI, which creates the worktree, or pass --worktree PATH |
|
|
1979
|
+
| `LEEWAY_SOURCE_REQUIRED` | The grant needs a local clone of the leeway's repository to create the worktree from, and found none; nothing was granted | Pass --source PATH, the repository's clone |
|
|
1980
|
+
| `LEEWAY_WORKTREE_FAILED` | The leeway is granted, but its worktree could not be created | Create it with the worktree command the refusal prints, then tell the lane |
|
|
1981
|
+
| `REPO_NOT_GRANTED` | The lane's agent has no grant for the repository the leeway adds | Grant the agent the repository, then grant the leeway again |
|
|
1982
|
+
| `LANE_WORKTREE_TAKEN` | Another lane already records the worktree path the grant names | Pass another --worktree PATH |
|
|
1983
|
+
| `LANE_NOTES_FULL` | The grant's or answer's note would take the lane past its note cap | Fold superseded amendments into one note first (lane amendments fold) |
|
|
1984
|
+
| `MACHINE_REQUIRED` | The caller coordinates no machine, so Dev cannot tell whose items or asks to list | Pass --machine NAME/ID |
|
|
1985
|
+
| `LANE_ASKS_OFF` | lane ask, lane answer or lane asks while lane questions are off (the default) | Write the question as an issue comment or a heartbeat note; NODII_DEV_LANE_ASKS=1 turns the commands on |
|
|
1986
|
+
| `ASK_NOT_FOUND` | Dev has no lane ask with this id | List them with lane asks |
|
|
1987
|
+
| `ASK_DECIDED` | The ask is already answered or withdrawn | Read it with lane asks --lane KEY |
|
|
1988
|
+
| `LANE_NOT_FINISHED` | lane close before the lane's own agent marked the lane finished | The lane runs lane finish KEY --reason TEXT --evidence REF |
|
|
1989
|
+
| `LANE_ALREADY_FINISHED` | The lane is already marked finished | Nothing; its coordinator closes it with lane close |
|
|
1990
|
+
| `HARNESS_INVALID` | A managed hook entry is not one nodii-dev command, or Dev's harness cannot take the managed hooks | Run harness update, and file the entry as a harness issue |
|
|
1991
|
+
| `HARNESS_SETTINGS_INVALID` | .claude/settings.json or .codex/hooks.json is not valid JSON | Repair the file, then run harness update |
|
|
1992
|
+
| `TOOLING_DOCS_STALE` | The change touches a tooling file named in nodii.repo.yaml (toolingDocs.tooling) and no docs file (toolingDocs.docs), so hook tooling-docs refuses the push or the pull request (MW1-46.3) | Update the docs in the same change, or add the commit trailer Docs-unaffected: <reason>; check with repo docs-check |
|
|
1993
|
+
|
|
1760
1994
|
The machine coordinator sets a lane's subagent capacity with `lane
|
|
1761
1995
|
subagent-quota KEY N` (`0` to `100`). Registering a subagent run consumes one
|
|
1762
1996
|
slot; Dev refuses another registration with `SUBAGENT_QUOTA_REACHED` when the
|