axstack 0.31.0 → 0.33.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/docs/host-operations.md +72 -24
- package/docs/workflows.md +194 -35
- package/package.json +1 -1
- package/skills/axstack/references/automations.md +9 -12
- package/skills/axstack/references/autopilot.md +19 -4
- package/skills/axstack/references/pr-shape.md +6 -5
- package/skills/axstack/references/run-record.md +8 -16
- package/skills/axstack/references/t3-runtime.md +17 -20
- package/skills/axstack/scripts/dispatch-plan.js +56 -27
- package/skills/axstack/scripts/pr-shape.js +134 -0
- package/skills/axstack/scripts/readiness-run.js +161 -0
- package/skills/axstack/scripts/readiness.js +420 -0
- package/skills/axstack/scripts/run-init.js +105 -0
- package/skills/axstack-audit/SKILL.md +1 -1
- package/skills/axstack-implement/SKILL.md +20 -9
- package/skills/axstack-improve/SKILL.md +17 -0
- package/skills/axstack-relay/SKILL.md +196 -42
- package/skills/axstack-relay/hermes/hermes-skill.md +52 -11
- package/skills/axstack-review/SKILL.md +12 -3
- package/skills/axstack-watch/SKILL.md +137 -47
- package/skills/axstack-watch/references/watch-runtime.md +13 -4
- package/skills/axstack-relay/hermes/axstack-reply.sh +0 -49
|
@@ -130,15 +130,25 @@ Historical provenance still follows §5's merge-card rule.
|
|
|
130
130
|
A handled wake has an acknowledged event ID, an observation or action bound to
|
|
131
131
|
the current revision, and a recorded hold or next owner where work remains.
|
|
132
132
|
|
|
133
|
-
Under a recorded `Notification policy`, the owner
|
|
134
|
-
[axstack-relay](../axstack-relay/SKILL.md)
|
|
135
|
-
|
|
136
|
-
|
|
133
|
+
Under a recorded `Notification policy`, the owner uses
|
|
134
|
+
[axstack-relay](../axstack-relay/SKILL.md) for user-decision holds, serious-risk
|
|
135
|
+
holds, the 60-minute blocked ping, unresolved-rating notice and capped peer PR milestones.
|
|
136
|
+
Serious risks relay immediately; genuine blocked operations needing user
|
|
137
|
+
intervention relay after bounded safe recovery.
|
|
137
138
|
Routine questions stay in the T3 driver thread. Progress, CI pending, and completion always stay
|
|
138
139
|
in the T3 driver thread.
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
Relay eligibility is limited to user-decision holds, serious-risk holds, the
|
|
141
|
+
60-minute blocked ping, unresolved-rating notice and capped peer PR milestones
|
|
142
|
+
under the Notification policy.
|
|
143
|
+
Under the recorded Notification policy, `verification not proven` is a
|
|
144
|
+
user-decision hold. The 60-minute blocked ping is a notification-only category
|
|
145
|
+
under the Notification policy. The unresolved-rating notice is a notification-only
|
|
146
|
+
category under the Notification policy, deduplicated per comment and head.
|
|
147
|
+
The unresolved-rating notice grants no reply authority.
|
|
148
|
+
The unresolved-rating notice never clears the hold.
|
|
149
|
+
Never send routine merge-ready or merged relays
|
|
150
|
+
for own PRs. Notifications for peer PRs are unchanged, including at most two
|
|
151
|
+
merge-ready/merged milestones per run, deduplicated across implementation and release.
|
|
142
152
|
The standalone monitor never sends; the chat-run schedule resumes the driver. Deduplicate
|
|
143
153
|
authorized notifications;
|
|
144
154
|
absent policy or failed relay uses the current T3 driver thread and leaves
|
|
@@ -159,9 +169,12 @@ Observation-only and peer watches never merge.
|
|
|
159
169
|
Workers, reviewers, monitors, managers, and the nightly triage never merge.
|
|
160
170
|
A current diligence `PASS` at the exact head is required before any merge-ready statement.
|
|
161
171
|
|
|
162
|
-
Record approval mode from the collaborator readback
|
|
163
|
-
|
|
164
|
-
|
|
172
|
+
Record approval mode from the collaborator readback.
|
|
173
|
+
A repository is personal (`solo`) only when it is outside `defi-com` and a
|
|
174
|
+
complete collaborator readback lists the user alone with write, maintain, or
|
|
175
|
+
admin permission. A `defi-com` repository, an extra writer, or an incomplete or
|
|
176
|
+
failed readback classes as work (`team`).
|
|
177
|
+
Every other repository is work (`team`).
|
|
165
178
|
Base classification uses repository docs and workflows, never the branch name
|
|
166
179
|
alone, and unknown means `deploying`.
|
|
167
180
|
A base is `integration` only when repository docs or workflows show it does not
|
|
@@ -201,22 +214,37 @@ For each current head and base SHA, every merge-ready term must hold:
|
|
|
201
214
|
- Feedback and revision: the PR is not draft and is mergeable against the
|
|
202
215
|
current base; no unresolved blocking agent-authored thread, top-level blocking comment, or
|
|
203
216
|
effective blocking review remains. Authored review `APPROVE` and diligence
|
|
204
|
-
`PASS` are bound to the current head and base. No `Escalate to user
|
|
217
|
+
`PASS` are bound to the current head and base. No `Escalate to user`
|
|
218
|
+
(apart from the settled verification cause below),
|
|
205
219
|
unsettled author Dispatch, or task, PR, dependency, run-wide, or serious-risk
|
|
206
220
|
hold affects this merge. Apply the comment holds below.
|
|
207
221
|
The current target base head must be an ancestor of the singleton head or
|
|
208
222
|
bottom stack member head; unknown ancestry holds. A CI re-run does not restore
|
|
209
223
|
this freshness after the base moves. Update the branch and refresh head-bound
|
|
210
224
|
evidence instead.
|
|
225
|
+
- Proven verification: apply every receipt and acceptance term below, or its
|
|
226
|
+
head-and-base-bound user acceptance, while every other gate still holds.
|
|
211
227
|
- Veto: no `do-not-merge` label and no chat `hold` applies.
|
|
212
228
|
|
|
213
229
|
Only comments and threads whose IDs are recorded in an agent receipt count as agent-authored.
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
230
|
+
The authored reviewer rates each non-agent review thread, review body, or
|
|
231
|
+
top-level comment from a human or a bot at the current head as `above low`,
|
|
232
|
+
`low`, `addressed` or `uncertain`. Re-rate every non-agent item at each new head.
|
|
233
|
+
Reviewer-rated `low` or `addressed` items do not hold automatic merge.
|
|
234
|
+
An `above low`, unrated or `uncertain` item holds automatic merge.
|
|
235
|
+
Human `CHANGES_REQUESTED` holds automatic merge until resolved.
|
|
236
|
+
A comment arriving after the receipt triggers a fresh review dispatch for rating
|
|
237
|
+
as gap closing.
|
|
238
|
+
An item still unrated or uncertain after one fresh rating dispatch keeps holding
|
|
239
|
+
the merge and posts a report-only decision-style card bound to head and base.
|
|
240
|
+
The rating card names the comment, why it remains unrated or uncertain, and the
|
|
241
|
+
action that settles it: re-rating by the reviewer, the commenter resolving or
|
|
242
|
+
replying, or the author addressing it.
|
|
243
|
+
The report-only rating card is a notification of an unsettled rating,
|
|
244
|
+
deduplicated per comment and head.
|
|
245
|
+
A report-only rating card never offers a user-acceptance path.
|
|
246
|
+
A user reply never clears a comment rating hold.
|
|
247
|
+
Agents never resolve or dismiss non-agent items.
|
|
220
248
|
Agent-authored threads with only `low` findings can stay open.
|
|
221
249
|
Apply any repository rule that requires conversation resolution.
|
|
222
250
|
|
|
@@ -230,63 +258,125 @@ If the forge dismissed it or requires last-push approval, hold and tell the user
|
|
|
230
258
|
without auto-requesting re-review.
|
|
231
259
|
Initial review requests before any human approval remain allowed.
|
|
232
260
|
|
|
233
|
-
###
|
|
261
|
+
### Proven verification
|
|
262
|
+
|
|
263
|
+
Proven verification is required for every own PR. Use the authored receipt:
|
|
264
|
+
|
|
265
|
+
- Verification requires `Verdict: APPROVE`, `Coverage: COMPLETE`, and
|
|
266
|
+
`Escalate to user: no`.
|
|
267
|
+
- Verification requires a `Safety fact` about the change that is not `unproven`.
|
|
268
|
+
- Verification requires diligence `PASS` at the exact head and base.
|
|
269
|
+
- Verification requires `Final-head check: <command> -> <log path>` for a check
|
|
270
|
+
the reviewer ran at the final head, with its log kept in the run's evidence folder.
|
|
271
|
+
- Each acceptance check requires passing evidence from the ticket or spec
|
|
272
|
+
criteria, or the PR body for adopted and ticketless PRs.
|
|
273
|
+
Earlier-head red-to-green evidence in the PR's patch lineage counts only when
|
|
274
|
+
the reviewer records that it still applies to the final change.
|
|
275
|
+
An applicable `verify-<app>` passing result is required for the changed behavior.
|
|
276
|
+
- Verification requires no limitation tagged `changed-behavior: unproven`.
|
|
277
|
+
The reviewer tags every limitation leaving changed behavior unexercised or
|
|
278
|
+
unverified, in whatever words, `changed-behavior: unproven`.
|
|
279
|
+
Other limitations do not hold.
|
|
280
|
+
- When the PR removes or weakens a check, test-runner setting or ruleset that
|
|
281
|
+
gates its own merge, verification requires the reviewer ran the base's checks
|
|
282
|
+
against the head.
|
|
283
|
+
|
|
284
|
+
The driver first closes a verification gap itself: run the check, re-dispatch
|
|
285
|
+
review, or return the work to the author. Only a gap the driver cannot close
|
|
286
|
+
becomes a `verification not proven` card bound to head and base.
|
|
287
|
+
The card names what is unproven, why, and the action that would settle it.
|
|
288
|
+
|
|
289
|
+
For `verification not proven`, the driver must follow [Relay](../axstack-relay/SKILL.md)'s decision-card procedure,
|
|
290
|
+
binding the sent run receipt and each option's scope to the exact PR head and base.
|
|
291
|
+
For a verification decision, a forwarded choice must pass [Relay](../axstack-relay/SKILL.md)'s four reply checks
|
|
292
|
+
and acknowledgement-before-action rule before settling only its bound cause.
|
|
293
|
+
A changed PR head or base must supersede its open verification decision card,
|
|
294
|
+
reissuing only if a decision is still needed.
|
|
295
|
+
|
|
296
|
+
The user's reply in the driver thread or on the forge clears only that
|
|
297
|
+
verification cause. Record `user-accepted unproven: <item>`, never as a pass.
|
|
298
|
+
Treat the accepted item as settled for this head and base and merge when every
|
|
299
|
+
other gate and hold permits it. A reply never waives `APPROVE`, diligence `PASS`
|
|
300
|
+
or green CI. A new head or base voids the acceptance.
|
|
301
|
+
Settle an `Escalate to user` for the user-accepted verification cause at its
|
|
302
|
+
accepted head and base while other escalation holds still apply.
|
|
303
|
+
In a work repository a reply never replaces counted collaborator approval.
|
|
304
|
+
|
|
305
|
+
### Escalation
|
|
306
|
+
|
|
307
|
+
Personal PRs merge when the gates pass and verification is proven or
|
|
308
|
+
user-accepted at this head and base. Personal PRs on any base, including
|
|
309
|
+
promotion, `deploying` and unknown bases, are eligible under the watch predicate.
|
|
310
|
+
Work PRs merge when the gates pass, verification is proven or user-accepted,
|
|
311
|
+
and a counted collaborator approval exists, on an `integration` base.
|
|
312
|
+
Work promotion PRs and `deploying` or unknown bases are merged by the user on
|
|
313
|
+
the forge. The existing serious-risk hold applies at once to both personal and
|
|
314
|
+
work PRs.
|
|
315
|
+
Personal and work PRs remain eligible whatever files they change, including
|
|
316
|
+
`.github/`, workflow-invoked files, package.json, lockfiles, test-runner config,
|
|
317
|
+
branch-protection or ruleset config, `CODEOWNERS`, `AGENTS.md`, and non-clean
|
|
318
|
+
revert lines such as `Revert: steps`.
|
|
234
319
|
|
|
235
|
-
Team mode targets only `dev` when repository docs or workflows prove it is
|
|
236
|
-
non-production.
|
|
237
|
-
Solo mode targets `main` or any other `integration` base.
|
|
238
320
|
For a `gh stack`, only the bottom member's base must be eligible.
|
|
239
321
|
Each other member's base must be the next-lower member's branch at its reviewed head.
|
|
240
|
-
Every member must meet every other term
|
|
322
|
+
Every member must meet every other term.
|
|
241
323
|
A stack holds until every member of its approved plan (the ticket map or the
|
|
242
324
|
adopted stack's recorded members) is published.
|
|
243
325
|
Reviewed members are never retargeted to become eligible.
|
|
244
326
|
|
|
245
327
|
Never auto-merge PRs authored by anyone other than the user or the user's agents.
|
|
246
|
-
Never auto-merge promotion PRs (`dev` to `staging`, `staging` to `prod`).
|
|
247
|
-
Never auto-merge PRs with a `deploying` or unknown base.
|
|
248
|
-
Never auto-merge PRs changing anything under `.github/`.
|
|
249
|
-
Never auto-merge PRs changing a file a workflow step invokes by path.
|
|
250
|
-
Never auto-merge PRs changing package.json beyond `version` and `files`.
|
|
251
|
-
Never auto-merge PRs changing lockfiles.
|
|
252
|
-
Never auto-merge PRs changing test-runner config.
|
|
253
|
-
Never auto-merge PRs changing branch-protection or ruleset config.
|
|
254
|
-
Never auto-merge PRs changing `CODEOWNERS`.
|
|
255
|
-
Never auto-merge PRs changing `AGENTS.md`.
|
|
256
328
|
Test sources stay eligible.
|
|
257
329
|
Axstack skill and merge-rule text are eligible under the watch predicate.
|
|
258
|
-
Changes to package.json
|
|
259
|
-
the watch predicate.
|
|
330
|
+
Changes to package.json are eligible under the watch predicate.
|
|
260
331
|
Release PRs are eligible under the watch predicate.
|
|
261
|
-
|
|
262
|
-
Read the revert gate from the declaration whose line starts with `Revert:`
|
|
332
|
+
Read the rollback declaration whose line starts with `Revert:`
|
|
263
333
|
at line start in the PR description.
|
|
264
334
|
A quoted format inside a bullet never counts as the declaration.
|
|
265
|
-
Never auto-merge PRs held under the comment rules above.
|
|
266
335
|
`--admin` and rule bypass are never used.
|
|
267
336
|
`Auto-merge: off` for a run or PR makes the merge card wait, and it waits for the user.
|
|
268
337
|
|
|
269
|
-
Post a merge card for every nonqualifying approval, base,
|
|
338
|
+
Post a merge card for every nonqualifying approval, base, verification, or off case.
|
|
270
339
|
Bind it to the PR head and base SHA; list CI, authored review and diligence at
|
|
271
340
|
those SHAs, counted collaborator approvals and bot votes with each vote's SHA
|
|
272
341
|
and stale flag, and the causes holding this merge.
|
|
273
|
-
A card that needs the user's decision
|
|
274
|
-
|
|
342
|
+
A card that needs the user's decision (work promotion or work deploying/unknown base,
|
|
343
|
+
`Auto-merge: off`, provenance, or an unclosable verification gap) is a decision
|
|
344
|
+
hold under the recorded Notification policy with one deduplicated relay;
|
|
345
|
+
relay text never supplies approval. Person-wait cards follow the clock below.
|
|
275
346
|
A changed head or base requires a refreshed card.
|
|
276
347
|
For an own PR on an `integration` base, the user's reply to the card authorizes
|
|
277
348
|
the merge actor to merge under the guarded path, subject to the exceptions below.
|
|
278
349
|
In `solo` mode the user's merge-card reply authorizes the guarded merge of
|
|
279
350
|
user-written PRs or PRs with unknown or mixed provenance.
|
|
280
351
|
In `team` mode a reply never replaces counted collaborator approval.
|
|
281
|
-
|
|
282
|
-
and an
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
forge, and the card only reports readiness.
|
|
352
|
+
A reply can clear auto-merge turned off; verification acceptance follows the
|
|
353
|
+
head-and-base-bound rule above. It never clears an ineligible work base or a
|
|
354
|
+
reviewer-rated `above low` finding. A user reply never clears a comment rating hold.
|
|
355
|
+
Peer PRs are merged by the user on the forge,
|
|
356
|
+
and the card only reports readiness.
|
|
357
|
+
Work promotion, deploying-base and unknown-base cards only report readiness.
|
|
288
358
|
User merges are bottom-up for a stack.
|
|
289
359
|
|
|
360
|
+
### Blocked on a person
|
|
361
|
+
|
|
362
|
+
A PR is ready-except-human when every term other than collaborator approval,
|
|
363
|
+
human `CHANGES_REQUESTED` and open findings from a person holds.
|
|
364
|
+
Each blocker has a key: `approval:<PR>`, `changes:<review id>` or
|
|
365
|
+
`comment:<comment id>`. A missing approval's clock starts at the first observed
|
|
366
|
+
ready-except-human time, including no review requested.
|
|
367
|
+
Other clocks start at the later of that ready-except-human time and the item's
|
|
368
|
+
forge time. A `comment:` clock starts only once the reviewer rates the item
|
|
369
|
+
`above low`. An unrated or uncertain item waits on the reviewer and does not
|
|
370
|
+
count as ready-except-human.
|
|
371
|
+
A clock resets when the PR stops being ready-except-human or its patch-id
|
|
372
|
+
changes. A same-patch-id rebase keeps the clock.
|
|
373
|
+
Each key is sent at most once, even when readiness is lost and regained or the
|
|
374
|
+
patch changes. After 60 minutes, send one relay per key, including simultaneous
|
|
375
|
+
blockers and a new key.
|
|
376
|
+
Send `<repo>#<n> waiting <age> on @<login|no reviewer>: <approval|changes|comment>; ready at <sha7>.`
|
|
377
|
+
The check runs on existing watch wakes with no new schedule.
|
|
378
|
+
The ping is a notification only: when the blocker clears, the PR merges with no reply.
|
|
379
|
+
|
|
290
380
|
Immediately before each automated merge, re-read every term from the forge.
|
|
291
381
|
Confirm merge commits are allowed, `delete_branch_on_merge` is false, and the
|
|
292
382
|
base has no merge queue; otherwise hold for the user. For a singleton PR, use
|
|
@@ -106,10 +106,19 @@ Reconcile prior tasks, thread/run identities, receipts and GitHub before retryin
|
|
|
106
106
|
an uncertain wake. Wake only the exact live original driver.
|
|
107
107
|
A busy, missing, protected (user-taken-over) or permission-held driver is never interrupted or replaced.
|
|
108
108
|
|
|
109
|
-
The driver records one Notification policy
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
109
|
+
The driver records one Notification policy for `axstack-relay` Telegram home.
|
|
110
|
+
Relay eligibility is limited to user-decision holds, serious-risk holds, the
|
|
111
|
+
60-minute blocked ping, unresolved-rating notice and capped peer PR milestones
|
|
112
|
+
under the Notification policy.
|
|
113
|
+
Under the recorded Notification policy, `verification not proven` is a
|
|
114
|
+
user-decision hold. The 60-minute blocked ping is a notification-only category
|
|
115
|
+
under the Notification policy. The unresolved-rating notice is a notification-only
|
|
116
|
+
category under the Notification policy, deduplicated per comment and head.
|
|
117
|
+
The unresolved-rating notice grants no reply authority.
|
|
118
|
+
The unresolved-rating notice never clears the hold.
|
|
119
|
+
Never send routine merge-ready or merged relays
|
|
120
|
+
for own PRs. Notifications for peer PRs are unchanged, including at most two
|
|
121
|
+
merge-ready/merged milestones per run, deduplicated across implementation and release.
|
|
113
122
|
Quiet ticks never notify.
|
|
114
123
|
|
|
115
124
|
The driver alone routes repair.
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# stdin is data. Python handles parsing, hashing and JSON encoding without a shell.
|
|
3
|
-
set -eu
|
|
4
|
-
umask 077
|
|
5
|
-
exec python3 -c '
|
|
6
|
-
import datetime, fcntl, hashlib, json, os, re, sys
|
|
7
|
-
|
|
8
|
-
message = sys.stdin.read()
|
|
9
|
-
match = re.fullmatch(r"\[Replying to: \"(.*?)\"\]\r?\n\r?\n(.*)", message, re.S)
|
|
10
|
-
if not match:
|
|
11
|
-
sys.exit("reply rejected: missing quoted reply envelope")
|
|
12
|
-
quoted, reply = match.groups()
|
|
13
|
-
body = quoted.rstrip()
|
|
14
|
-
tags = re.findall(r"^T3 reply:.*$", body, re.M)
|
|
15
|
-
tag = re.fullmatch(r"T3 reply: ([A-Za-z0-9._-]+) thread ([A-Za-z0-9:._-]+)", tags[0]) if len(tags) == 1 else None
|
|
16
|
-
if not tag or body.splitlines()[-1] != tags[0]:
|
|
17
|
-
sys.exit("reply rejected: expected exactly one final reply tag")
|
|
18
|
-
env, thread = tag.groups()
|
|
19
|
-
if env in (".", "..") or thread.startswith(".") or ".." in thread:
|
|
20
|
-
sys.exit("reply rejected: unsafe identity")
|
|
21
|
-
entry = dict(receivedAt=datetime.datetime.now(datetime.timezone.utc).isoformat(),
|
|
22
|
-
env=env, threadId=thread, quotedSha256=hashlib.sha256(body.encode()).hexdigest(),
|
|
23
|
-
quoted=quoted, reply=reply)
|
|
24
|
-
path = os.path.join(os.environ["HOME"], ".local", "share")
|
|
25
|
-
os.makedirs(path, mode=0o700, exist_ok=True)
|
|
26
|
-
for part in ("axstack", "relay-inbox", env):
|
|
27
|
-
path = os.path.join(path, part)
|
|
28
|
-
if os.path.islink(path):
|
|
29
|
-
sys.exit("reply rejected: inbox directory is a symlink")
|
|
30
|
-
os.makedirs(path, mode=0o700, exist_ok=True)
|
|
31
|
-
os.chmod(path, 0o700)
|
|
32
|
-
fd = os.open(os.path.join(path, thread + ".jsonl"),
|
|
33
|
-
os.O_WRONLY | os.O_APPEND | os.O_CREAT | os.O_NOFOLLOW, 0o600)
|
|
34
|
-
try:
|
|
35
|
-
os.fchmod(fd, 0o600)
|
|
36
|
-
payload = (json.dumps(entry, ensure_ascii=False) + "\n").encode()
|
|
37
|
-
# Serialize append and rollback so a short write cannot poison the next line.
|
|
38
|
-
fcntl.flock(fd, fcntl.LOCK_EX)
|
|
39
|
-
start = os.lseek(fd, 0, os.SEEK_END)
|
|
40
|
-
try:
|
|
41
|
-
if os.write(fd, payload) != len(payload):
|
|
42
|
-
raise OSError("incomplete append")
|
|
43
|
-
except OSError:
|
|
44
|
-
os.ftruncate(fd, start)
|
|
45
|
-
raise
|
|
46
|
-
finally:
|
|
47
|
-
os.close(fd)
|
|
48
|
-
print("Reply saved for T3 driver " + env + " thread " + thread)
|
|
49
|
-
'
|