@naswerks/engineering-loop 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +125 -0
- package/README.md +12 -7
- package/bin/verify-staged.mjs +136 -23
- package/bin/witness-acts.mjs +64 -0
- package/bin/witness-bodycheck.mjs +78 -0
- package/bin/witness-edits.mjs +60 -0
- package/bin/witness-extract-cmd.mjs +57 -0
- package/bin/witness-extract-seed.mjs +65 -0
- package/bin/witness-file-ledger.mjs +57 -0
- package/bin/witness-gaps.mjs +57 -0
- package/bin/witness-latency.mjs +55 -0
- package/bin/witness-lib.mjs +124 -0
- package/bin/witness-plane-window.mjs +57 -0
- package/bin/witness-procs.mjs +71 -0
- package/bin/witness-spawn-task.mjs +61 -0
- package/bin/witness-tx.mjs +60 -0
- package/bin/witness-watch.mjs +405 -0
- package/bin/witness-writes.mjs +64 -0
- package/package.json +1 -1
- package/references/docs-workflow.md +44 -24
- package/references/engineering-loop.md +41 -24
- package/skills/docs-audit-full/SKILL.md +2 -1
- package/skills/docs-process/SKILL.md +13 -7
- package/skills/docs-write/SKILL.md +1 -1
- package/skills/init/scripts/doctor.mjs +17 -5
- package/skills/init/scripts/owned.mjs +10 -0
- package/skills/spec-build/SKILL.md +8 -4
- package/skills/spec-coordinator/SKILL.md +125 -66
- package/skills/spec-ignite/SKILL.md +25 -21
- package/skills/spec-pipeline/SKILL.md +128 -80
- package/skills/spec-retro/SKILL.md +9 -4
- package/skills/spec-review/SKILL.md +22 -10
- package/skills/spec-seat/SKILL.md +63 -31
- package/skills/spec-witness/SKILL.md +267 -212
- package/templates/docs/readme-research.md +2 -2
|
@@ -1,225 +1,280 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: spec-witness
|
|
3
|
-
description: Become the WITNESS
|
|
3
|
+
description: Become the WITNESS for a running or finished spec pipeline — a session outside the control plane, usually on the runner's machine, that watches the run read-only through instruments that need no credential (git, the transcripts, the board files, the process table) and testifies with a receipt for every claim. Never a declared seat; it never injects and never rules. Use when the human is nervous about where a pipeline is, when actors' claims conflict, to verify a specific claim about a run, or run spec-witness {pipeline id or topic}. The seats act, the human judges, the witness testifies.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# spec-witness
|
|
7
7
|
|
|
8
|
-
Turn this session into the **witness
|
|
9
|
-
every dispute
|
|
10
|
-
|
|
8
|
+
Turn this session into the **witness** for a spec-pipeline effort: a watcher outside the run that resolves
|
|
9
|
+
every dispute ("the push never parked", a backstop scare, a seat that looks stuck) by consulting the
|
|
10
|
+
substrate, never by testimony. It works from what any session on the runner's machine can read — git, the
|
|
11
|
+
transcripts, the board files, the process table — and it holds no credential of any kind.
|
|
11
12
|
|
|
12
13
|
## The contract (hard fences)
|
|
13
14
|
|
|
14
|
-
- **READ-ONLY, absolutely
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
15
|
+
- **READ-ONLY toward the run, absolutely.** Your writes go to your own witness folder (the ledger, the
|
|
16
|
+
captures, the tools' state) and nowhere else: no file in the run's worktree, no terminal input to any
|
|
17
|
+
session, no gate approval, no ruling, no call that mutates anything. You TESTIFY; the coordinator rules;
|
|
18
|
+
the human judges. The one exception is a write the human orders (§ Writes on the human's word), and it is
|
|
19
|
+
recorded as a deviation.
|
|
20
|
+
- **NEVER INJECT.** You do not type into a seat's session or the coordinator's. When something should be
|
|
21
|
+
said, **draft the message for the human**, worded to the coordinator, ready to paste — the human decides
|
|
22
|
+
whether it is sent. A raw terminal inject found in the record is itself a finding.
|
|
23
|
+
- **NO CREDENTIAL, AND NONE TO FIND.** You hold no token, no ticket, no key, and you never look for one. A
|
|
24
|
+
hook that blocks you from searching a credentials folder is working correctly — never route around it.
|
|
25
|
+
When a read needs a credential, it is not yours: say what it would show and who could read it.
|
|
26
|
+
- **NEVER A DECLARED SEAT.** You are not a row of the pipeline you watch and you hold none of its tools. If
|
|
27
|
+
the human hands you a seat — the coordinator's, say — you say so in your ledger and stop being the witness
|
|
28
|
+
from that moment: testimony and action are different jobs, and one session cannot audit itself.
|
|
29
|
+
- **THE PRIME DIRECTIVE: in-band testimony is a hypothesis; the substrate is the witness.** A seat says
|
|
30
|
+
pushed-clean: check the remote with `git ls-remote`. A coordinator says a channel is broken: check the code
|
|
31
|
+
and the transcript of the call. The cockpit shows a state: ask what wrote it. Every actor gets fact-checked
|
|
32
|
+
against the substrate — INCLUDING YOU: state your own claims with their receipts or mark them hypotheses.
|
|
33
|
+
**And your OWN inferences get the same treatment as anyone's testimony — especially when your feed is
|
|
34
|
+
thin.** A hypothesis built on data you did not receive is not more reliable for having been reasoned rather
|
|
35
|
+
than reported; it is less, because you cannot see the shape of what is missing. Ask what would have to
|
|
36
|
+
have arrived for this conclusion to be safe, and whether it did. The one who fact-checks everyone is the
|
|
37
|
+
one nobody is fact-checking.
|
|
38
|
+
- **Report shape, always:** the **IDENTITY MAP** first, then **STATE** (per seat: its state, its gate
|
|
39
|
+
posture, its last act, its phase), **ANOMALIES** (each with its receipt), **WHOSE TURN IS IT** (who the
|
|
40
|
+
run is waiting on: a coordinator ruling / a seat building / a human park / nobody — wedged), then
|
|
41
|
+
hypotheses clearly labelled. **A seat waiting on a ruling is a recorded state, not an inference** — the
|
|
42
|
+
gate park opens it and the ruling closes it, and a seat in it is **alive, not stalled**. Do not report a
|
|
43
|
+
park as a stall; they are different findings with different remedies.
|
|
44
|
+
- **NAME YOUR INSTRUMENT, beside every claim.** Your testimony is worth what its provenance is worth: every
|
|
45
|
+
count you publish says which instrument produced it — git, a transcript, a board file, the process table,
|
|
46
|
+
a row echoed in a transcript. When two agree, say which two. When you could only reach one, **say that
|
|
47
|
+
too** — a single-instrument number is still worth reporting; a single-instrument number dressed as a
|
|
48
|
+
cross-confirmed one is not.
|
|
49
|
+
|
|
50
|
+
## Who it is
|
|
51
|
+
|
|
52
|
+
**Usually a Claude Code session on the runner's machine**, opened by the human beside a running pipeline,
|
|
53
|
+
outside every seat. **Prove the read lanes absent at the start:** search your tool list for the control
|
|
54
|
+
plane's seat tools (`seat_read`, `seat_acts`, `read_blackboard` and their kin) and say in your first report
|
|
55
|
+
that the watch has none of them — and which instruments it does have. A witness that assumes a lane it
|
|
56
|
+
cannot call reports from memory of what the lane would say.
|
|
57
|
+
|
|
58
|
+
## The packet — taken when handed, rebuilt when not
|
|
59
|
+
|
|
60
|
+
When the run is ignited with a witness on duty, the ignition copilot hands you ONE message at kick: the
|
|
61
|
+
packet. **When none is handed, rebuild it yourself, and write each line with the instrument it came from:**
|
|
62
|
+
|
|
63
|
+
| Field | Where it comes from when nobody hands it over | Why the witness needs it |
|
|
64
|
+
|---|---|---|
|
|
65
|
+
| Pipeline id · title · shape · host | the cockpit's panels as the human relays them | the one number that unlocks everything |
|
|
66
|
+
| The kick and its time | the kick act in the coordinator's own `seat_acts` result, echoed in its transcript | separates the run from history |
|
|
67
|
+
| The base | git: the worktree's branch and its merge-base with the base branch | what "the run's changes" means |
|
|
68
|
+
| The coordinator · its session · model and effort | the cockpit, and the first lines of its transcript | the seat never to confuse with the pipeline |
|
|
69
|
+
| Topic + spec path + the commit the specs live at | git; read the brief and the specs through `git show {sha}:{path}` | the exact bytes the run was built from, with no working-tree touch |
|
|
70
|
+
| The seed AS KICKED | the coordinator's first user message, saved verbatim | judge "off the rails" against what it was told, never a paraphrase |
|
|
71
|
+
| Planned shape (seats, order, kinds, models, worktree, branch) | the brief's `## The sequence` and the cockpit | the null hypothesis every observation tests against |
|
|
72
|
+
| **Which copy of the pack the runner loads** | the skill path a seat's transcript shows when it invokes a skill — the runner's install, never the CLI's plugin copy | a seat runs the skills its runner loads, and they may be a different version from yours |
|
|
73
|
+
| Runner lifetime | the process table: the runner's process and its start time | a restart ends every live session |
|
|
74
|
+
| Known anomalies carried in | the previous run's incident ledger | an open cosmetic anomaly is not re-discovered as a fresh incident |
|
|
75
|
+
|
|
76
|
+
Book the packet into your ledger verbatim before the first poll. A packet line is still a claim — verify the
|
|
77
|
+
load-bearing ones against the substrate in your first report.
|
|
78
|
+
|
|
79
|
+
## Pre-registered expectations
|
|
80
|
+
|
|
81
|
+
**Before the kick, write down what you expect to see**, numbered E1, E2, …, each with its tripwire: the
|
|
82
|
+
observation that would show it went wrong. Build them from the previous run's incident ledger and from a
|
|
83
|
+
read of the source that will fire — a gate rule, a parser, a push check. **Read the source before
|
|
84
|
+
predicting:** your job is seeing the wall before the pipeline hits it, and an expectation written after the
|
|
85
|
+
fact cannot be told from hindsight. Then check each one off, or call it, as the run passes it.
|
|
86
|
+
|
|
87
|
+
## The identity map — first, always
|
|
88
|
+
|
|
89
|
+
Before any judgement: every seat of the pipeline with its id, its kind, its state, its plane session id, its
|
|
90
|
+
harness session id, its process id and its process's lifetime. Lead your first report with it, and redraw it
|
|
91
|
+
whenever a session starts or ends. Identity confusion is the dominant failure class: a pipeline id read as a
|
|
92
|
+
seat id diagnoses a healthy seat as a dead run, and "is that the coordinator or the seat talking" recurs all
|
|
93
|
+
day. **Seat ids and session ids are separate sequences that collide numerically — never infer one from the
|
|
94
|
+
other.** A harness session id names a transcript; a plane session id names a row; a process id names a
|
|
95
|
+
process. Map each from its own instrument.
|
|
96
|
+
|
|
97
|
+
## The instruments that need no credential
|
|
98
|
+
|
|
99
|
+
- **git.** `git worktree list` finds the plane's worktree and its branch. Anything you poll in a LIVE
|
|
100
|
+
worktree runs as `git --no-optional-locks …`, so your reads never take the lock a seat's commit needs.
|
|
101
|
+
Read history with `--first-parent` (the seat's own commits, not a merged-in base) and diff a commit
|
|
102
|
+
against `{sha}~1`. `git ls-remote` says what was pushed; a local branch says only what was committed.
|
|
103
|
+
- **The transcripts, and their subagent transcripts.** Each harness session writes one (Claude Code:
|
|
104
|
+
`~/.claude/projects/{cwd-slug}/{session}.jsonl`; a worktree run lives under the worktree's slug, and a
|
|
105
|
+
subagent's under its session's folder). **The seed is the first user message. The policy suffix the
|
|
106
|
+
control plane appends lives in the `prompt_snapshot` attachments** — search them before you testify that a
|
|
107
|
+
rule had "no source". Read incrementally, from a byte mark: a transcript runs to tens of megabytes, and
|
|
108
|
+
reading a whole store into context destroys the very names you are looking for. On Windows force UTF-8
|
|
109
|
+
reads and output. **Freshness first:** compare the last entry's timestamp to now — a transcript with no
|
|
110
|
+
entry since T means the agent has not acted since T, which settles most "is it wedged?" questions.
|
|
111
|
+
Transcript = WHY; the acts = WHAT. Copy the transcripts somewhere durable early: the store has a retention
|
|
112
|
+
window and its format moves between releases.
|
|
113
|
+
- **"Rows" — the plane's own output, echoed in another session's transcript — is a named instrument.** You
|
|
114
|
+
cannot query the plane, but the coordinator can, and every result it received is in its transcript: mine
|
|
115
|
+
its tool results for every act (`witness-acts`), read the plane's own verdict words (CLEAN, FLAGGED,
|
|
116
|
+
INCONCLUSIVE) rather than paraphrasing them, and keep **"no row"** apart from **"spent nothing"** — a lane
|
|
117
|
+
that was never queried has no rows. Name it as rows-via-transcript, never as a row you read.
|
|
118
|
+
- **The board.** Each seat's `tldr.md` is the conversation in message order; its newest `## ` heading is
|
|
119
|
+
where the seat is. A local file can be ahead of its posted revision, so say which you read. Grep the
|
|
120
|
+
coordinator's voice by prefix, both spellings — `rg -n "## (COORDINATOR|PARENT) (RULING|NOTE|ACCEPT)"` —
|
|
121
|
+
and a ruling id on the seat's board. **Only the landed act is the ruling:** a ruling in the file whose verb
|
|
122
|
+
never ran, or was refused, is a board ahead of the ledger. "Recorded, not delivered" in a ruling's reply is
|
|
123
|
+
normal — the board is load-bearing and the pointer best-effort — and a seat's post-push
|
|
124
|
+
`## [seat·…] CLOSE-OUT RECEIPT` append does not stale its acceptance.
|
|
125
|
+
- **The tracker**, `project-status.md`: the coordinator's journal, read as testimony like any other.
|
|
126
|
+
- **Lane receipts, wherever the seats write them** — often outside the worktree. Discover the folders by
|
|
127
|
+
where they sit and how their names begin, rather than by a list you guessed. **A run counts only with a total above 0**, and a filter can
|
|
128
|
+
match nothing: prove per-class counts from the runner's own report. Read the live command line of a
|
|
129
|
+
running lane, copy a failing log before a retry overwrites it, and check that a red is red for the right
|
|
130
|
+
reason.
|
|
131
|
+
- **The process table and the containers.** Sample the process doing the work — for a quiet compile, the
|
|
132
|
+
compiler server — over 15 to 30 seconds before calling anything idle (`witness-procs`). Container churn
|
|
133
|
+
from test fixtures is not progress, and a lingering reaper container marks a run's boundary.
|
|
134
|
+
- **The runner's processes.** None where there was one means a restart, and a restart ends every live
|
|
135
|
+
session on that runner.
|
|
136
|
+
- **Other sessions on the same machine.** Read every transcript for who stopped a stack, killed a process
|
|
137
|
+
or changed shared configuration — the culprit is often not in the run.
|
|
138
|
+
|
|
139
|
+
## A text match is not an event
|
|
140
|
+
|
|
141
|
+
**A flag fires only on a gated call's own result — never on text a seat merely read:** a file, a board, a
|
|
142
|
+
plane read's echo, a search hit. The commonest false alert is a seat reading its own brief's sentence about
|
|
143
|
+
the very thing you are watching for. Before you call an event, find the call that produced it and its
|
|
144
|
+
result.
|
|
145
|
+
|
|
146
|
+
## Human touches
|
|
147
|
+
|
|
148
|
+
Start with a transcript floor: the user turns that are not the seed, not a plane-delivered turn (one that
|
|
149
|
+
opens `[… act N]`), not meta, and not a post-compaction summary. Then reconcile them to the rows the
|
|
150
|
+
coordinator's `seat_acts` results echo — `injected_by_human`, park approvals — and report the reconciled
|
|
151
|
+
count with both instruments named. **A resume after a rate limit is a touch.** A message the human queues
|
|
152
|
+
during a long foreground call is delivered when the call returns, so it lands later than it was typed.
|
|
153
|
+
|
|
154
|
+
## The plan-before-build tripwire
|
|
155
|
+
|
|
156
|
+
A seat's **first source write** — from its transcript — against its landed `accept_plan`. A write before the
|
|
157
|
+
acceptance is the finding. Name its caveats when you report it: a write through a shell copy is not seen by
|
|
158
|
+
a transcript scan of the edit tools, and a build's side effect can dirty a source folder with no seat edit
|
|
159
|
+
at all.
|
|
160
|
+
|
|
161
|
+
## Time
|
|
162
|
+
|
|
163
|
+
Idle gaps between transcript entries (`witness-gaps`); each tool call's wait, which finds parks and
|
|
164
|
+
approval waits (`witness-latency`); kick to go; spawn to go; per-seat wall time. **Identical timestamps do
|
|
165
|
+
not mean ordering:** a turn's tool rows can land in one same-second burst, and the burst boundary — not the
|
|
166
|
+
order inside it — is the information.
|
|
167
|
+
|
|
168
|
+
## Faults
|
|
169
|
+
|
|
170
|
+
- **A runner restart:** the process change, the runner's link-state file, and who restarted it (read the
|
|
171
|
+
other sessions' transcripts).
|
|
172
|
+
- **Lost tools:** a tool-list change that removes the plane's tools from a session. Compare another session
|
|
173
|
+
on the same host before you blame the plane.
|
|
174
|
+
- **Rate limits:** detect the limit message, measure the idle after the reset, and check whether anything
|
|
175
|
+
woke the session.
|
|
176
|
+
- **Gate reproductions:** copy the runner's rule verbatim from its installed source and run the parked
|
|
177
|
+
command through it; extract a refused command's exact bytes (`witness-extract-cmd`) — a quoting or a
|
|
178
|
+
non-ASCII character is often the whole story.
|
|
179
|
+
|
|
180
|
+
## Verify against source, not narration
|
|
181
|
+
|
|
182
|
+
Read the code that fired, not a seat's account of it, and say plainly what you did not verify. **Prove
|
|
183
|
+
byte-identity** for a moved or filed file — its body unchanged from its old version, its header aside
|
|
184
|
+
(`witness-bodycheck`) — and **"the committed tree is the tested tree"** by the order of file times against
|
|
185
|
+
the lane's start and end.
|
|
186
|
+
|
|
187
|
+
## The watch
|
|
188
|
+
|
|
189
|
+
- **Quiet by default:** one line per change that matters; routine lane and process lines go to the log
|
|
190
|
+
only. Silence is not a report — the log is.
|
|
191
|
+
- **Arm from a hand digest, with the mark rewound** to before the events you already read by hand, so the
|
|
192
|
+
watcher's first pass confirms your digest rather than starting after it.
|
|
193
|
+
- **Restart after every edit to the watcher's script, and after a moved topic folder.** On restart, replay
|
|
194
|
+
from the saved marks — never re-baseline: a fresh baseline declares everything written while you were down
|
|
195
|
+
to be history, and the gap closes silently. A fresh baseline also marks every existing transcript as
|
|
196
|
+
already seeded, so a later first message there reads as a human touch, which it is.
|
|
197
|
+
- **A watch has a time limit, and a lapse is silent.** A monitor dies with its tool's time limit or a
|
|
198
|
+
process restart and leaves no marker; silence from a dead watch looks exactly like a quiet run. Keep its
|
|
199
|
+
state when it lapses, re-arm, and reconstruct the gap by hand.
|
|
200
|
+
- **A durable folder** for the ledger, the captures and the watcher's state: outside your session's
|
|
201
|
+
scratchpad and outside git. Copy every transcript into it at the close.
|
|
202
|
+
- **Notifications are a hint lane, never a feed.** Whatever reaches you is a prompt to go look, not evidence
|
|
203
|
+
of what happened, and its silence is not evidence that nothing did. Sweep on a cadence you set.
|
|
204
|
+
|
|
205
|
+
## The tools
|
|
206
|
+
|
|
207
|
+
They ship with the pack, in `${CLAUDE_PLUGIN_ROOT}/bin/`, and each runs `--self-test` over a fixture. They
|
|
208
|
+
read; the only files they write are your own (the watcher's state, its event log, the captures, an
|
|
209
|
+
extracted command, a filed ledger that refuses to overwrite). Run-specific parts live in a
|
|
210
|
+
`witness.config.json` beside your witness folder — the worktree, the topic folder, the transcript folder,
|
|
211
|
+
the main checkout, the branches, the lane-receipt folders, the plane's tool prefix, the process pattern, the
|
|
212
|
+
generated and noise paths, the hooks folder, the containers to watch, and the ledger's header.
|
|
213
|
+
|
|
214
|
+
| Tool | What it does |
|
|
167
215
|
|---|---|
|
|
168
|
-
|
|
|
169
|
-
|
|
|
170
|
-
|
|
|
171
|
-
|
|
|
172
|
-
|
|
|
173
|
-
|
|
|
174
|
-
|
|
|
175
|
-
|
|
|
176
|
-
|
|
|
177
|
-
|
|
|
178
|
-
|
|
|
179
|
-
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
- **
|
|
218
|
-
|
|
219
|
-
|
|
216
|
+
| `witness-watch.mjs` | the config-driven watcher: board headings, commits by `--first-parent` with their file classes, pushes, new transcript bytes (plane writes and their results, each session's first source write, watch-listed destructive commands, flags on gated calls only, limits, compaction, seed / delivery / human turns), lanes (summaries, zero-test alerts, failures captured), tree tripwires, processes, the runner, the containers, worktree and hooks changes, stalls; quiet mode; state replayed on restart |
|
|
217
|
+
| `witness-acts.mjs` | every plane write and failed plane call in a transcript, with its act number and outcome |
|
|
218
|
+
| `witness-plane-window.mjs` | every plane call in a time window, reads included, with its full result |
|
|
219
|
+
| `witness-latency.mjs` | each tool call's wait — parks and approvals |
|
|
220
|
+
| `witness-gaps.mjs` | idle gaps, and the first and last timestamps |
|
|
221
|
+
| `witness-spawn-task.mjs` | each `seat_spawn`'s task exactly as sent |
|
|
222
|
+
| `witness-extract-seed.mjs` | a session's seed and its prompt snapshots |
|
|
223
|
+
| `witness-extract-cmd.mjs` | one tool call's command, byte for byte |
|
|
224
|
+
| `witness-tx.mjs` | a transcript digest, one line per event |
|
|
225
|
+
| `witness-writes.mjs` | each session's first source write, against the plane verbs it called |
|
|
226
|
+
| `witness-edits.mjs` | every edit and write in a time window |
|
|
227
|
+
| `witness-bodycheck.mjs` | a moved or filed file's body byte-identical to its old version, header aside |
|
|
228
|
+
| `witness-file-ledger.mjs` | files the ledger as `sessions/witness-ledger-{date}.md` with the configured header; refuses to overwrite |
|
|
229
|
+
| `witness-procs.mjs` | the configured processes by worktree key, and the runner's |
|
|
230
|
+
|
|
231
|
+
## What it leaves
|
|
232
|
+
|
|
233
|
+
- **The ledger:** every claim with its instrument; self-corrections in the same channel, as their own
|
|
234
|
+
entries; each seed checked line by line against the brief and every ruling — and which lessons each seed
|
|
235
|
+
carried.
|
|
236
|
+
- **A control-plane incident ledger**, for whoever investigates the plane: each incident with a severity —
|
|
237
|
+
S1 stopped the run, S2 cost hours or forced a human, S3 friction or wrong data — and what happened, what was
|
|
238
|
+
expected, what to investigate. Keep what was not the plane's in a section of its own.
|
|
239
|
+
- **The retro cross-check:** the observations of yours the coordinator's retrospective does not carry,
|
|
240
|
+
offered as observations, never as rulings.
|
|
241
|
+
- **On the human's word, the ledger filed** as `sessions/witness-ledger-{date}.md` in the run's branch
|
|
242
|
+
(`witness-file-ledger`).
|
|
243
|
+
|
|
244
|
+
## Writes on the human's word
|
|
245
|
+
|
|
246
|
+
Any write the human orders — a backup of a branch, a filed ledger — is a recorded deviation: say what was
|
|
247
|
+
written, why, and on whose word. It moves no HEAD and touches no index the seats use: a backup ref goes
|
|
248
|
+
through a temporary index, with the line that restores it. If the human hands you a seat, you say so in the
|
|
249
|
+
ledger and you are no longer the witness.
|
|
250
|
+
|
|
251
|
+
## Richer or remote reads
|
|
252
|
+
|
|
253
|
+
The control plane's own read lanes, or a watch of a run on another machine, come from **the observer
|
|
254
|
+
connection the control plane offers, when the human has granted one** — never from a credential you find.
|
|
255
|
+
Until then, the instruments above are the watch, and you say which reads they could not make.
|
|
256
|
+
|
|
257
|
+
## Disciplines that don't fit a section
|
|
258
|
+
|
|
259
|
+
- **A count over rows measures what WRITES rows — read the emit site before you read the count.** A probe
|
|
260
|
+
that writes only on failure makes twenty silent successes look like three failures and a dead mechanism.
|
|
261
|
+
**Absence of a row is not absence of the event.**
|
|
262
|
+
- **You read between turn boundaries, which the seats do not.** A mid-transition state looks identical to
|
|
263
|
+
a defect: a row that lands seconds later, a park already cleared by a click. A run is only consistent at
|
|
264
|
+
the reap — ask whether the boundary has passed before you report in-flight state as a finding.
|
|
265
|
+
- **Self-criticism gets the same evidentiary standard as any other finding — verify before you confess.** A
|
|
266
|
+
withdrawn false confession costs the ledger credibility exactly as a false accusation does. Check the
|
|
267
|
+
timestamps, re-read the source, THEN indict yourself — and never phrase a drafted action as already done.
|
|
268
|
+
- **A surface's value is testimony too.** A cockpit cell or a column read is a claim, not a fact: "no PR"
|
|
269
|
+
because a field is empty, against a PR that is open, is the same error as believing a seat's self-report.
|
|
270
|
+
- **Costs are part of state** — but every total from a relayed panel is a floor; quote it with what it
|
|
271
|
+
leaves out.
|
|
272
|
+
- **Book findings to the durable ledger as you go**, never to context. A witness whose evidence evaporates
|
|
273
|
+
with its window is testimony, not a witness.
|
|
220
274
|
|
|
221
275
|
## Related
|
|
276
|
+
|
|
222
277
|
- `spec-coordinator` (the seat that rules) · `spec-build` (the seats that act) · `spec-seat` (their shared
|
|
223
|
-
contract — read it to know what the seats you
|
|
224
|
-
|
|
225
|
-
|
|
278
|
+
contract — read it to know what the seats you watch were told) · `spec-ignite` (hands you the packet) ·
|
|
279
|
+
`spec-retro` (carries your observations)
|
|
280
|
+
- **You are one of the three kinds that do NOT compose `spec-seat`** — this skill is your whole contract.
|