@brainervirus/workit-pi 8.11.0 → 8.12.1
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/package.json
CHANGED
|
@@ -25,7 +25,7 @@ REPORT: branch, head SHA, files changed, each VERIFY command with its exit code,
|
|
|
25
25
|
each ACCEPTANCE line met / not met, rulings you made (`workit ledger ruling`),
|
|
26
26
|
anything out of scope as a follow-up, not a diff.
|
|
27
27
|
STANDING: <the standing orders, verbatim: `workit ledger standing add` records each one>
|
|
28
|
-
|
|
28
|
+
<identity line, per the lead's host: see "Identity and git rules per host" below>
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
## Worked example
|
|
@@ -97,17 +97,32 @@ is the slice's STUCK threshold in `workit fanout status`. `"fanIn":
|
|
|
97
97
|
}
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
+
## Identity and git rules per host
|
|
101
|
+
|
|
102
|
+
`workit fanout brief` renders the identity line and RULES 1 and 3 for the
|
|
103
|
+
lead's host (`WORKIT_HOST`, or the host's own session variable):
|
|
104
|
+
|
|
105
|
+
| Lead's host | Identity line | RULES 1 and 3 |
|
|
106
|
+
| --- | --- | --- |
|
|
107
|
+
| Claude Code | `Session: your env already has WORKIT_SESSION_ID (the lead's id)`; no `export`, no hand-minted id (SubagentStart issues `<lead>:<agent id>` only to verifiers and reviewers, never to an implementer, so the worker's commits carry the lead's id) | plain git: `git fetch origin && git switch -c <branch> origin/<base>` and `git commit -m <msg> --trailer "Workit-Session: <the env WORKIT_SESSION_ID>" --trailer "<host attribution>" -- <paths in SCOPE>`, because worktree isolation refuses every `workit git` form |
|
|
108
|
+
| OpenCode, Pi, Codex | `Session: your host already sets WORKIT_SESSION_ID in your shell`; export nothing (the host derives the id and an export cannot replace it) | `workit git branch <branch> --base <base>`, `workit git commit -m <msg> -- <paths in SCOPE>` |
|
|
109
|
+
| Cursor, CI, a plain terminal | `export WORKIT_SESSION_ID=<lead>-w-<slice>` (`+try<n>` for a race attempt): declared, not checked | the same `workit git` forms |
|
|
110
|
+
|
|
111
|
+
`MODE: resume` is `git switch <branch>` on every host (the branch exists; the
|
|
112
|
+
lead removed the dead worker's worktree after its exit, so the switch
|
|
113
|
+
succeeds), then continue from its head. A race attempt (`--attempt <n>`)
|
|
114
|
+
follows its host's row with the branch `<branch>-try<n>`.
|
|
115
|
+
|
|
100
116
|
## Worker rules (`workit fanout brief` appends them as RULES)
|
|
101
117
|
|
|
102
|
-
1. First command
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
worker's worktree after its exit, so the switch succeeds), then continue
|
|
106
|
-
from its head.
|
|
118
|
+
1. First command: create the branch (`MODE: new`; the worktree may start on a
|
|
119
|
+
name that breaks branch policy) or `git switch` to it (`MODE: resume`),
|
|
120
|
+
as the table above says for your host.
|
|
107
121
|
2. Decide ambiguities yourself and record them:
|
|
108
122
|
`workit ledger ruling "<what>" --why "<why>" --cost-if-wrong "<cost>"`.
|
|
109
123
|
Stop only for an irreversible action, a security-sensitive one, or a side
|
|
110
124
|
effect outside the worktree.
|
|
111
|
-
3. Commit
|
|
112
|
-
the brief says
|
|
125
|
+
3. Commit as the table says (`workit git commit -m "<msg>" -- <paths in SCOPE>`,
|
|
126
|
+
or plain git with the trailers on Claude Code); push only if the brief says
|
|
127
|
+
so.
|
|
113
128
|
4. Never record a verdict on your own work.
|
|
@@ -73,8 +73,8 @@ Which session id a verdict carries, per host:
|
|
|
73
73
|
- Claude Code: subagents inherit your `WORKIT_SESSION_ID`, so the
|
|
74
74
|
SubagentStart hook names each `verifier` and `reviewer` its own session
|
|
75
75
|
(`<lead>:<agent id>`), passed exactly as `--session`: the hook records the
|
|
76
|
-
ids it issues, and only those are accepted. An `implementer`
|
|
77
|
-
|
|
76
|
+
ids it issues, and only those are accepted. An `implementer` is issued
|
|
77
|
+
none: it keeps your id in its env for its workit commands and commits.
|
|
78
78
|
- Codex: the `workit-verifier` and `workit-reviewer` agents get the same
|
|
79
79
|
issued `--session` from SubagentStart; any other verifier passes
|
|
80
80
|
`--as verifier`.
|
|
@@ -84,8 +84,13 @@ Which session id a verdict carries, per host:
|
|
|
84
84
|
- Cursor (no session id in the shell): the brief sets the verifier's
|
|
85
85
|
`WORKIT_SESSION_ID=<lead>:verifier-<random hex>`, a fresh suffix per
|
|
86
86
|
verifier. Cursor cannot check it: it is declared, not derived.
|
|
87
|
-
- A worker's commits
|
|
88
|
-
|
|
87
|
+
- A worker's commits: on Claude Code the lead's `WORKIT_SESSION_ID` already in
|
|
88
|
+
its env (SubagentStart issues no implementer id; plain git, no export, so the
|
|
89
|
+
lead authored those commits: a verifier or reviewer records the verdict, not
|
|
90
|
+
the lead); on OpenCode, Pi and Codex the id the host already
|
|
91
|
+
puts in its shell; on Cursor, CI and a plain terminal the brief's
|
|
92
|
+
`export WORKIT_SESSION_ID=<lead>-w-<slice>` (see `brief.md`, "Identity and
|
|
93
|
+
git rules per host"). A verdict under an id you made up (`<lead>-v1`,
|
|
89
94
|
`<lead>:v1`) is refused as `forged_session` on Claude Code, Codex,
|
|
90
95
|
OpenCode and Pi.
|
|
91
96
|
|