@rt-tools/agent-kit 0.38.0 → 0.39.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/assets/checks/check-turn-map.mjs +4 -4
- package/assets/checks/decision-table.json +91 -24
- package/assets/checks/flow-data.mjs +22 -23
- package/assets/checks/flow-forecast.mjs +12 -8
- package/assets/checks/flow-guard.mjs +365 -163
- package/assets/checks/flow-step.mjs +188 -58
- package/assets/checks/flow-verdict.mjs +124 -9
- package/assets/checks/record-count.mjs +27 -0
- package/assets/checks/task-flow-script.mjs +33 -7
- package/assets/checks/work-result.mjs +92 -11
- package/assets/commands/night.md +3 -3
- package/assets/defaults/turn-map.md +4 -2
- package/assets/docs/GLOSSARY.md +1 -1
- package/assets/hooks/ask-judge.md +4 -2
- package/assets/hooks/facts.sh +66 -0
- package/assets/hooks/git-guard-delivery-epic.sh +2 -2
- package/assets/hooks/git-guard-delivery-rerun.sh +17 -5
- package/assets/hooks/git-guard-push-ahead.sh +24 -2
- package/assets/hooks/git-guard-push-marks.sh +209 -12
- package/assets/hooks/git-guard-push-tests.sh +29 -2
- package/assets/hooks/pre-push.sh +26 -2
- package/assets/hooks/push-ahead-call-guard.sh +447 -0
- package/assets/hooks/push-set.sh +31 -8
- package/assets/hooks/turn-exit-guard.sh +1 -1
- package/assets/hooks/turn-judge.md +16 -6
- package/assets/patterns/doc-style-human.md +36 -76
- package/assets/pitfalls/doc-style-human.md +112 -0
- package/assets/pitfalls/epic-flow.md +92 -0
- package/assets/pitfalls/mockups.needs-mockups.md +87 -0
- package/assets/pitfalls/observability.needs-app.md +186 -0
- package/assets/pitfalls/platform-access.md +94 -0
- package/assets/pitfalls/queue-audit.github.md +78 -0
- package/assets/pitfalls/task-flow-archive.md +2 -1
- package/assets/pitfalls/task-flow-close.2.md +2 -1
- package/assets/pitfalls/task-flow-owner.md +29 -0
- package/assets/pitfalls/task-flow-resume.md +2 -2
- package/assets/pitfalls/task-flow-start.md +1 -1
- package/assets/pitfalls/turn-conduct.md +1 -1
- package/assets/rules/autonomous-work.md +1 -1
- package/assets/rules/epic-flow.md +24 -63
- package/assets/rules/mockups.needs-mockups.md +25 -64
- package/assets/rules/observability.needs-app.md +43 -172
- package/assets/rules/platform-access.md +28 -75
- package/assets/rules/queue-audit.github.md +25 -52
- package/assets/rules/task-flow-owner.md +6 -6
- package/assets/rules/turn-conduct.md +22 -19
- package/assets/task-flow/flow.js +10 -14
- package/assets/task-flow/flow.md +7 -8
- package/assets/task-flow/measure/ci.mjs +184 -0
- package/assets/task-flow/measure/owner.mjs +13 -6
- package/assets/task-flow/measure/session.mjs +92 -15
- package/assets/task-flow/source/git.mjs +179 -11
- package/assets/task-flow/source/host.mjs +105 -0
- package/assets/task-flow/source/owner.mjs +33 -13
- package/assets/task-flow/source/session.mjs +47 -10
- package/lib/agent-checks.d.ts.map +1 -1
- package/lib/agent-checks.js +14 -2
- package/lib/agent-checks.js.map +1 -1
- package/package.json +1 -1
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
* Four things are checked:
|
|
16
16
|
* the size — the bytes of the laid-out map against the declared limit;
|
|
17
17
|
* the states — the names from the table of the rule against the names in the map, both ways;
|
|
18
|
-
* the exits — both ends of a turn are named: the end of the scenario and the owner's
|
|
19
|
-
* the old exits — none of the former
|
|
18
|
+
* the exits — both ends of a turn are named: the end of the scenario and the owner's Esc;
|
|
19
|
+
* the old exits — none of the former exits is named as an item of the map.
|
|
20
20
|
*
|
|
21
21
|
* FAIL-OPEN: there is no map in the tree — nothing to check, a zero code. The tree may leave it
|
|
22
22
|
* unlaid. An empty table of states in the map counts as a refusal: that is not «there is nothing
|
|
@@ -88,13 +88,13 @@ function statesOf(text, { listed: readListed = false } = {}) {
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
/**
|
|
91
|
-
* The ends of a turn: the scenario is over, or the owner
|
|
91
|
+
* The ends of a turn: the scenario is over, or the owner pressed Esc. Each has two
|
|
92
92
|
* names: the English one is brought by the package, the Russian one is held by a tree whose map is
|
|
93
93
|
* still its own. Either of the two is enough.
|
|
94
94
|
*/
|
|
95
95
|
const EXITS = [
|
|
96
96
|
['the end of the scenario', 'конец сценария'],
|
|
97
|
-
['
|
|
97
|
+
['the owner interrupted the turn', 'прерывание владельца'],
|
|
98
98
|
];
|
|
99
99
|
|
|
100
100
|
/**
|
|
@@ -182,6 +182,14 @@
|
|
|
182
182
|
"steps_remeasured": [
|
|
183
183
|
"yes",
|
|
184
184
|
"no"
|
|
185
|
+
],
|
|
186
|
+
"push_ahead_code_visible": [
|
|
187
|
+
"yes",
|
|
188
|
+
"no"
|
|
189
|
+
],
|
|
190
|
+
"push_node_pinned": [
|
|
191
|
+
"yes",
|
|
192
|
+
"no"
|
|
185
193
|
]
|
|
186
194
|
},
|
|
187
195
|
"actions": [
|
|
@@ -232,7 +240,9 @@
|
|
|
232
240
|
"edit_doc",
|
|
233
241
|
"ask_owner",
|
|
234
242
|
"pr_create_side_base",
|
|
235
|
-
"load_rule"
|
|
243
|
+
"load_rule",
|
|
244
|
+
"push_ahead_run",
|
|
245
|
+
"install_node"
|
|
236
246
|
],
|
|
237
247
|
"ask": "ask_owner"
|
|
238
248
|
},
|
|
@@ -926,6 +936,10 @@
|
|
|
926
936
|
"file": "write-targets.sh",
|
|
927
937
|
"kind": "helper",
|
|
928
938
|
"reason": "hooks into no agent event; guards source it"
|
|
939
|
+
},
|
|
940
|
+
{
|
|
941
|
+
"file": "push-ahead-call-guard.sh",
|
|
942
|
+
"kind": "guard"
|
|
929
943
|
}
|
|
930
944
|
],
|
|
931
945
|
"rows": [
|
|
@@ -1304,12 +1318,12 @@
|
|
|
1304
1318
|
"action": "push_skip_hooks",
|
|
1305
1319
|
"decision": "deny",
|
|
1306
1320
|
"move": "push_ahead",
|
|
1307
|
-
"says": "Before the push without the skip run the heavy steps by `bash [^`]*git-guard-push-ahead\\.sh` \\(the Bash call with run_in_background
|
|
1321
|
+
"says": "Before the push without the skip run the heavy steps by `bash [^`]*git-guard-push-ahead\\.sh > [^`]*push-ahead-[^`]*\\.log\" 2>&1` \\(the Bash call with run_in_background, nothing after it",
|
|
1308
1322
|
"probe": {
|
|
1309
1323
|
"setup": "T=\"$(fixture_repo_branched main RT-7-probe)\"\ncd \"$T\"\nprintf \".p/\\n.tmp/\\n.claude/\\ntools/\\n\" > .gitignore\ngit add .gitignore && git -c user.name=probe -c user.email=probe@example.com -c commit.gpgsign=false commit -q -m \"chore: ignore\"\ngit update-ref refs/remotes/origin/main main\nmkdir -p .claude/rt-kit/defaults .p .tmp/claude-skill-gate\ncp \"$DEFAULTS/gate-map.sh\" .claude/rt-kit/defaults/\nfor r in git-workflow task-flow epic-flow turn-conduct; do mkdir -p .claude/skills/$r; printf -- \"---\\nname: %s\\nkind: rule\\n---\\n\" $r > .claude/skills/$r/SKILL.md; done\nprintf '%s' '{\"exists\":true,\"open\":true,\"onBoard\":true,\"assigned\":true,\"numbered\":true,\"status\":\"In progress\"}' > .p/state\ncat > .claude/rt-kit/project.sh <<'PROFILE'\nrt_task_state() { if [ -f \"$CLAUDE_PROJECT_DIR/.p/state-$1\" ]; then cat \"$CLAUDE_PROJECT_DIR/.p/state-$1\"; else cat \"$CLAUDE_PROJECT_DIR/.p/state\"; fi; }\nrt_pull_state() { cat \"$CLAUDE_PROJECT_DIR/.p/pull\" 2>/dev/null || return 1; }\nrt_conflicting_pulls() { cat \"$CLAUDE_PROJECT_DIR/.p/conflicts\" 2>/dev/null; return 0; }\nrt_pull_merged() { cat \"$CLAUDE_PROJECT_DIR/.p/merged\" 2>/dev/null; }\nrt_report_body() { :; }\nrt_push_checks() { printf \"%s\\n\" true; }\n[ -f \"$CLAUDE_PROJECT_DIR/.p/extra.sh\" ] && . \"$CLAUDE_PROJECT_DIR/.p/extra.sh\"\nPROFILE\nexport CLAUDE_PROJECT_DIR=\"$T\" TMPDIR=\"$T/.tmp/\"\nprintf '%s\\n' git-workflow task-flow epic-flow turn-conduct > .tmp/claude-skill-gate/tests.loaded\nturn() { : > .tmp/turn.jsonl; jq -cn '{type:\"assistant\",message:{content:[{type:\"tool_use\",name:\"Skill\",input:{skill:\"git-workflow\"}}]}}' >> .tmp/turn.jsonl; [ -n \"$1\" ] && jq -cn --arg t \"EXAM: passed $1 of 5\" '{type:\"user\",message:{content:[{type:\"tool_result\",content:$t}]}}' >> .tmp/turn.jsonl; return 0; }\nturn 5",
|
|
1310
1324
|
"input": "input_cmd 'git push --no-verify origin RT-7-probe' Bash \"$T\" | jq --arg r \"$T/.tmp/turn.jsonl\" '. + {transcript_path: $r}'"
|
|
1311
1325
|
},
|
|
1312
|
-
"text": "BLOCKED by git-guard-no-verify: «{what}» skips the git hooks of the tree. The commit hooks check the message, the formatting and the document pair, and the push gate does not read commit messages: a commit made past the hooks reaches the host unchecked. An amend goes through the same hooks as a commit, a one-letter typo included. Run the same command without the skip; when a hook refuses, fix what it names. A commit already made past the hooks is redone without the skip before the push — the rule git-workflow. Before the push without the skip run the heavy steps by `{ahead_cmd}` (the Bash call with run_in_background) and push after their end: the push is refused until they have a green mark.",
|
|
1326
|
+
"text": "BLOCKED by git-guard-no-verify: «{what}» skips the git hooks of the tree. The commit hooks check the message, the formatting and the document pair, and the push gate does not read commit messages: a commit made past the hooks reaches the host unchecked. An amend goes through the same hooks as a commit, a one-letter typo included. Run the same command without the skip; when a hook refuses, fix what it names. A commit already made past the hooks is redone without the skip before the push — the rule git-workflow. Before the push without the skip run the heavy steps by `{ahead_cmd} > \"${TMPDIR:-/tmp}/push-ahead-$(basename \"$PWD\").log\" 2>&1` (the Bash call with run_in_background, nothing after it; the verdict is the code of the notice and the last `push ahead:` line of the log) and push after their end: the push is refused until they have a green mark.",
|
|
1313
1327
|
"tail": true
|
|
1314
1328
|
},
|
|
1315
1329
|
{
|
|
@@ -1322,12 +1336,12 @@
|
|
|
1322
1336
|
"action": "push",
|
|
1323
1337
|
"decision": "deny",
|
|
1324
1338
|
"move": "push_ahead",
|
|
1325
|
-
"says": "Run them in the background by `bash .*git-guard-push-ahead\\.sh`",
|
|
1339
|
+
"says": "Run them in the background by `bash .*git-guard-push-ahead\\.sh > [^`]*push-ahead-[^`]*\\.log\" 2>&1`",
|
|
1326
1340
|
"probe": {
|
|
1327
1341
|
"setup": "T=\"$(fixture_repo_branched main RT-7-probe)\"\ncd \"$T\"\nprintf \".p/\\n.tmp/\\n.claude/\\ntools/\\n\" > .gitignore\ngit add .gitignore && git -c user.name=probe -c user.email=probe@example.com -c commit.gpgsign=false commit -q -m \"chore: ignore\"\ngit update-ref refs/remotes/origin/main main\nmkdir -p .claude/rt-kit/defaults .p .tmp/claude-skill-gate\ncp \"$DEFAULTS/gate-map.sh\" .claude/rt-kit/defaults/\nfor r in git-workflow task-flow epic-flow turn-conduct; do mkdir -p .claude/skills/$r; printf -- \"---\\nname: %s\\nkind: rule\\n---\\n\" $r > .claude/skills/$r/SKILL.md; done\nprintf '%s' '{\"exists\":true,\"open\":true,\"onBoard\":true,\"assigned\":true,\"numbered\":true,\"status\":\"In progress\"}' > .p/state\ncat > .claude/rt-kit/project.sh <<'PROFILE'\nrt_task_state() { if [ -f \"$CLAUDE_PROJECT_DIR/.p/state-$1\" ]; then cat \"$CLAUDE_PROJECT_DIR/.p/state-$1\"; else cat \"$CLAUDE_PROJECT_DIR/.p/state\"; fi; }\nrt_pull_state() { cat \"$CLAUDE_PROJECT_DIR/.p/pull\" 2>/dev/null || return 1; }\nrt_conflicting_pulls() { cat \"$CLAUDE_PROJECT_DIR/.p/conflicts\" 2>/dev/null; return 0; }\nrt_pull_merged() { cat \"$CLAUDE_PROJECT_DIR/.p/merged\" 2>/dev/null; }\nrt_report_body() { :; }\nrt_push_checks() { printf \"%s\\n\" true; }\n[ -f \"$CLAUDE_PROJECT_DIR/.p/extra.sh\" ] && . \"$CLAUDE_PROJECT_DIR/.p/extra.sh\"\nPROFILE\nexport CLAUDE_PROJECT_DIR=\"$T\" TMPDIR=\"$T/.tmp/\"\nprintf '%s\\n' git-workflow task-flow epic-flow turn-conduct > .tmp/claude-skill-gate/tests.loaded\nturn() { : > .tmp/turn.jsonl; jq -cn '{type:\"assistant\",message:{content:[{type:\"tool_use\",name:\"Skill\",input:{skill:\"git-workflow\"}}]}}' >> .tmp/turn.jsonl; [ -n \"$1\" ] && jq -cn --arg t \"EXAM: passed $1 of 5\" '{type:\"user\",message:{content:[{type:\"tool_result\",content:$t}]}}' >> .tmp/turn.jsonl; return 0; }\nturn 5\nprintf '%s\\n' 'RT_PUSH_HEAVY_AHEAD=1' 'rt_push_check_heavy() { case \"$1\" in *heavy*) return 0 ;; esac; return 1; }' 'rt_push_checks() { printf \"%s\\n\" true \"echo heavy\"; }' >> .p/extra.sh",
|
|
1328
1342
|
"input": "input_cmd 'git push origin RT-7-probe' Bash \"$T\" | jq --arg r \"$T/.tmp/turn.jsonl\" '. + {transcript_path: $r}'"
|
|
1329
1343
|
},
|
|
1330
|
-
"text": "BLOCKED: the heavy steps of this tree run ahead, not inside the guard — inside it they hit the hook limit, and a guard cut by the limit lets the call through with no verdict. No green mark for this tree and base:\n\n{ahead}\n\nRun them in the background by `{ahead_cmd}` (the Bash call with run_in_background), wait for its end and push again: the push then passes from the marks.{dirty_line}{red_line}",
|
|
1344
|
+
"text": "BLOCKED: the heavy steps of this tree run ahead, not inside the guard — inside it they hit the hook limit, and a guard cut by the limit lets the call through with no verdict. No green mark for this tree and base:\n\n{ahead}\n\nRun them in the background by `{ahead_cmd} > \"${TMPDIR:-/tmp}/push-ahead-$(basename \"$PWD\").log\" 2>&1` (the Bash call with run_in_background, nothing after it; the verdict is the code of the notice and the last `push ahead:` line of the log), wait for its end and push again: the push then passes from the marks.{base_line}{dirty_line}{red_line}",
|
|
1331
1345
|
"tail": true
|
|
1332
1346
|
},
|
|
1333
1347
|
{
|
|
@@ -1358,12 +1372,12 @@
|
|
|
1358
1372
|
"action": "push_multi",
|
|
1359
1373
|
"decision": "deny",
|
|
1360
1374
|
"move": "push_ahead",
|
|
1361
|
-
"says": "Push each branch by a separate call, after switching to it. Before that push run the heavy steps by `bash [^`]*git-guard-push-ahead\\.sh` \\(the Bash call with run_in_background
|
|
1375
|
+
"says": "Push each branch by a separate call, after switching to it. Before that push run the heavy steps by `bash [^`]*git-guard-push-ahead\\.sh > [^`]*push-ahead-[^`]*\\.log\" 2>&1` \\(the Bash call with run_in_background, nothing after it",
|
|
1362
1376
|
"probe": {
|
|
1363
1377
|
"setup": "T=\"$(fixture_repo_branched main RT-7-probe)\"\ncd \"$T\"\nprintf \".p/\\n.tmp/\\n.claude/\\ntools/\\n\" > .gitignore\ngit add .gitignore && git -c user.name=probe -c user.email=probe@example.com -c commit.gpgsign=false commit -q -m \"chore: ignore\"\ngit update-ref refs/remotes/origin/main main\nmkdir -p .claude/rt-kit/defaults .p .tmp/claude-skill-gate\ncp \"$DEFAULTS/gate-map.sh\" .claude/rt-kit/defaults/\nfor r in git-workflow task-flow epic-flow turn-conduct; do mkdir -p .claude/skills/$r; printf -- \"---\\nname: %s\\nkind: rule\\n---\\n\" $r > .claude/skills/$r/SKILL.md; done\nprintf '%s' '{\"exists\":true,\"open\":true,\"onBoard\":true,\"assigned\":true,\"numbered\":true,\"status\":\"In progress\"}' > .p/state\ncat > .claude/rt-kit/project.sh <<'PROFILE'\nrt_task_state() { if [ -f \"$CLAUDE_PROJECT_DIR/.p/state-$1\" ]; then cat \"$CLAUDE_PROJECT_DIR/.p/state-$1\"; else cat \"$CLAUDE_PROJECT_DIR/.p/state\"; fi; }\nrt_pull_state() { cat \"$CLAUDE_PROJECT_DIR/.p/pull\" 2>/dev/null || return 1; }\nrt_conflicting_pulls() { cat \"$CLAUDE_PROJECT_DIR/.p/conflicts\" 2>/dev/null; return 0; }\nrt_pull_merged() { cat \"$CLAUDE_PROJECT_DIR/.p/merged\" 2>/dev/null; }\nrt_report_body() { :; }\nrt_push_checks() { printf \"%s\\n\" true; }\n[ -f \"$CLAUDE_PROJECT_DIR/.p/extra.sh\" ] && . \"$CLAUDE_PROJECT_DIR/.p/extra.sh\"\nPROFILE\nexport CLAUDE_PROJECT_DIR=\"$T\" TMPDIR=\"$T/.tmp/\"\nprintf '%s\\n' git-workflow task-flow epic-flow turn-conduct > .tmp/claude-skill-gate/tests.loaded\nturn() { : > .tmp/turn.jsonl; jq -cn '{type:\"assistant\",message:{content:[{type:\"tool_use\",name:\"Skill\",input:{skill:\"git-workflow\"}}]}}' >> .tmp/turn.jsonl; [ -n \"$1\" ] && jq -cn --arg t \"EXAM: passed $1 of 5\" '{type:\"user\",message:{content:[{type:\"tool_result\",content:$t}]}}' >> .tmp/turn.jsonl; return 0; }\nturn 5",
|
|
1364
1378
|
"input": "input_cmd 'git push origin RT-7-probe && git push origin main' Bash \"$T\" | jq --arg r \"$T/.tmp/turn.jsonl\" '. + {transcript_path: $r}'"
|
|
1365
1379
|
},
|
|
1366
|
-
"text": "BLOCKED: several pushes by one command. The gate set runs once per call, on the tree that lies there — every other branch leaves for the hosting unchecked. Push each branch by a separate call, after switching to it. Before that push run the heavy steps by `{ahead_cmd}` (the Bash call with run_in_background) and push after their end: the push is refused until they have a green mark.",
|
|
1380
|
+
"text": "BLOCKED: several pushes by one command. The gate set runs once per call, on the tree that lies there — every other branch leaves for the hosting unchecked. Push each branch by a separate call, after switching to it. Before that push run the heavy steps by `{ahead_cmd} > \"${TMPDIR:-/tmp}/push-ahead-$(basename \"$PWD\").log\" 2>&1` (the Bash call with run_in_background, nothing after it; the verdict is the code of the notice and the last `push ahead:` line of the log) and push after their end: the push is refused until they have a green mark.",
|
|
1367
1381
|
"tail": true
|
|
1368
1382
|
},
|
|
1369
1383
|
{
|
|
@@ -1380,7 +1394,7 @@
|
|
|
1380
1394
|
"setup": "T=\"$(fixture_repo_branched main RT-7-probe)\"\ncd \"$T\"\nprintf \".p/\\n.tmp/\\n.claude/\\ntools/\\n\" > .gitignore\ngit add .gitignore && git -c user.name=probe -c user.email=probe@example.com -c commit.gpgsign=false commit -q -m \"chore: ignore\"\ngit update-ref refs/remotes/origin/main main\nmkdir -p .claude/rt-kit/defaults .p .tmp/claude-skill-gate\ncp \"$DEFAULTS/gate-map.sh\" .claude/rt-kit/defaults/\nfor r in git-workflow task-flow epic-flow turn-conduct; do mkdir -p .claude/skills/$r; printf -- \"---\\nname: %s\\nkind: rule\\n---\\n\" $r > .claude/skills/$r/SKILL.md; done\nprintf '%s' '{\"exists\":true,\"open\":true,\"onBoard\":true,\"assigned\":true,\"numbered\":true,\"status\":\"In progress\"}' > .p/state\ncat > .claude/rt-kit/project.sh <<'PROFILE'\nrt_task_state() { if [ -f \"$CLAUDE_PROJECT_DIR/.p/state-$1\" ]; then cat \"$CLAUDE_PROJECT_DIR/.p/state-$1\"; else cat \"$CLAUDE_PROJECT_DIR/.p/state\"; fi; }\nrt_pull_state() { cat \"$CLAUDE_PROJECT_DIR/.p/pull\" 2>/dev/null || return 1; }\nrt_conflicting_pulls() { cat \"$CLAUDE_PROJECT_DIR/.p/conflicts\" 2>/dev/null; return 0; }\nrt_pull_merged() { cat \"$CLAUDE_PROJECT_DIR/.p/merged\" 2>/dev/null; }\nrt_report_body() { :; }\nrt_push_checks() { printf \"%s\\n\" true; }\n[ -f \"$CLAUDE_PROJECT_DIR/.p/extra.sh\" ] && . \"$CLAUDE_PROJECT_DIR/.p/extra.sh\"\nPROFILE\nexport CLAUDE_PROJECT_DIR=\"$T\" TMPDIR=\"$T/.tmp/\"\nprintf '%s\\n' git-workflow task-flow epic-flow turn-conduct > .tmp/claude-skill-gate/tests.loaded\nturn() { : > .tmp/turn.jsonl; jq -cn '{type:\"assistant\",message:{content:[{type:\"tool_use\",name:\"Skill\",input:{skill:\"git-workflow\"}}]}}' >> .tmp/turn.jsonl; [ -n \"$1\" ] && jq -cn --arg t \"EXAM: passed $1 of 5\" '{type:\"user\",message:{content:[{type:\"tool_result\",content:$t}]}}' >> .tmp/turn.jsonl; return 0; }\nturn 5",
|
|
1381
1395
|
"input": "input_cmd 'printf \"git push origin RT-7-probe\" | bash' Bash \"$T\" | jq --arg r \"$T/.tmp/turn.jsonl\" '. + {transcript_path: $r}'"
|
|
1382
1396
|
},
|
|
1383
|
-
"text": "BLOCKED: the command names a push, and the guard cannot read what it runs — a shell reading commands from its input, `source` of a substitution, or function calls that grow without bound. Run the push as a separate plain command: `git push <remote> <branch>`. Before that push run the heavy steps by `{ahead_cmd}` (the Bash call with run_in_background) and push after their end: the push is refused until they have a green mark.",
|
|
1397
|
+
"text": "BLOCKED: the command names a push, and the guard cannot read what it runs — a shell reading commands from its input, `source` of a substitution, or function calls that grow without bound. Run the push as a separate plain command: `git push <remote> <branch>`. Before that push run the heavy steps by `{ahead_cmd} > \"${TMPDIR:-/tmp}/push-ahead-$(basename \"$PWD\").log\" 2>&1` (the Bash call with run_in_background, nothing after it; the verdict is the code of the notice and the last `push ahead:` line of the log) and push after their end: the push is refused until they have a green mark.",
|
|
1384
1398
|
"tail": true
|
|
1385
1399
|
},
|
|
1386
1400
|
{
|
|
@@ -1392,12 +1406,12 @@
|
|
|
1392
1406
|
"action": "push_switch",
|
|
1393
1407
|
"decision": "deny",
|
|
1394
1408
|
"move": "push_ahead",
|
|
1395
|
-
"says": "then push by a separate command. Before that push run the heavy steps by `bash [^`]*git-guard-push-ahead\\.sh` \\(the Bash call with run_in_background
|
|
1409
|
+
"says": "then push by a separate command. Before that push run the heavy steps by `bash [^`]*git-guard-push-ahead\\.sh > [^`]*push-ahead-[^`]*\\.log\" 2>&1` \\(the Bash call with run_in_background, nothing after it",
|
|
1396
1410
|
"probe": {
|
|
1397
1411
|
"setup": "T=\"$(fixture_repo_branched main RT-7-probe)\"\ncd \"$T\"\nprintf \".p/\\n.tmp/\\n.claude/\\ntools/\\n\" > .gitignore\ngit add .gitignore && git -c user.name=probe -c user.email=probe@example.com -c commit.gpgsign=false commit -q -m \"chore: ignore\"\ngit update-ref refs/remotes/origin/main main\nmkdir -p .claude/rt-kit/defaults .p .tmp/claude-skill-gate\ncp \"$DEFAULTS/gate-map.sh\" .claude/rt-kit/defaults/\nfor r in git-workflow task-flow epic-flow turn-conduct; do mkdir -p .claude/skills/$r; printf -- \"---\\nname: %s\\nkind: rule\\n---\\n\" $r > .claude/skills/$r/SKILL.md; done\nprintf '%s' '{\"exists\":true,\"open\":true,\"onBoard\":true,\"assigned\":true,\"numbered\":true,\"status\":\"In progress\"}' > .p/state\ncat > .claude/rt-kit/project.sh <<'PROFILE'\nrt_task_state() { if [ -f \"$CLAUDE_PROJECT_DIR/.p/state-$1\" ]; then cat \"$CLAUDE_PROJECT_DIR/.p/state-$1\"; else cat \"$CLAUDE_PROJECT_DIR/.p/state\"; fi; }\nrt_pull_state() { cat \"$CLAUDE_PROJECT_DIR/.p/pull\" 2>/dev/null || return 1; }\nrt_conflicting_pulls() { cat \"$CLAUDE_PROJECT_DIR/.p/conflicts\" 2>/dev/null; return 0; }\nrt_pull_merged() { cat \"$CLAUDE_PROJECT_DIR/.p/merged\" 2>/dev/null; }\nrt_report_body() { :; }\nrt_push_checks() { printf \"%s\\n\" true; }\n[ -f \"$CLAUDE_PROJECT_DIR/.p/extra.sh\" ] && . \"$CLAUDE_PROJECT_DIR/.p/extra.sh\"\nPROFILE\nexport CLAUDE_PROJECT_DIR=\"$T\" TMPDIR=\"$T/.tmp/\"\nprintf '%s\\n' git-workflow task-flow epic-flow turn-conduct > .tmp/claude-skill-gate/tests.loaded\nturn() { : > .tmp/turn.jsonl; jq -cn '{type:\"assistant\",message:{content:[{type:\"tool_use\",name:\"Skill\",input:{skill:\"git-workflow\"}}]}}' >> .tmp/turn.jsonl; [ -n \"$1\" ] && jq -cn --arg t \"EXAM: passed $1 of 5\" '{type:\"user\",message:{content:[{type:\"tool_result\",content:$t}]}}' >> .tmp/turn.jsonl; return 0; }\nturn 5",
|
|
1398
1412
|
"input": "input_cmd 'git checkout RT-7-probe && git push origin RT-7-probe' Bash \"$T\" | jq --arg r \"$T/.tmp/turn.jsonl\" '. + {transcript_path: $r}'"
|
|
1399
1413
|
},
|
|
1400
|
-
"text": "BLOCKED: switching the branch and pushing by one command. The gate set runs on the tree that lies there at the minute the command is parsed — that is, on the FORMER branch, not the one that leaves for the hosting. A green set then reads as a check of what left, though it checked something else. Split the calls: switch first, then push by a separate command. Before that push run the heavy steps by `{ahead_cmd}` (the Bash call with run_in_background) and push after their end: the push is refused until they have a green mark.",
|
|
1414
|
+
"text": "BLOCKED: switching the branch and pushing by one command. The gate set runs on the tree that lies there at the minute the command is parsed — that is, on the FORMER branch, not the one that leaves for the hosting. A green set then reads as a check of what left, though it checked something else. Split the calls: switch first, then push by a separate command. Before that push run the heavy steps by `{ahead_cmd} > \"${TMPDIR:-/tmp}/push-ahead-$(basename \"$PWD\").log\" 2>&1` (the Bash call with run_in_background, nothing after it; the verdict is the code of the notice and the last `push ahead:` line of the log) and push after their end: the push is refused until they have a green mark.",
|
|
1401
1415
|
"tail": true
|
|
1402
1416
|
},
|
|
1403
1417
|
{
|
|
@@ -1409,12 +1423,29 @@
|
|
|
1409
1423
|
"action": "push_second_copy",
|
|
1410
1424
|
"decision": "deny",
|
|
1411
1425
|
"move": "push_ahead",
|
|
1412
|
-
"says": "send from the copy the session stands in. Before that push run the heavy steps by `bash [^`]*git-guard-push-ahead\\.sh` \\(the Bash call with run_in_background
|
|
1426
|
+
"says": "send from the copy the session stands in. Before that push run the heavy steps by `bash [^`]*git-guard-push-ahead\\.sh > [^`]*push-ahead-[^`]*\\.log\" 2>&1` \\(the Bash call with run_in_background, nothing after it",
|
|
1413
1427
|
"probe": {
|
|
1414
1428
|
"setup": "T=\"$(fixture_repo_branched main RT-7-probe)\"\ncd \"$T\"\nprintf \".p/\\n.tmp/\\n.claude/\\ntools/\\n\" > .gitignore\ngit add .gitignore && git -c user.name=probe -c user.email=probe@example.com -c commit.gpgsign=false commit -q -m \"chore: ignore\"\ngit update-ref refs/remotes/origin/main main\nmkdir -p .claude/rt-kit/defaults .p .tmp/claude-skill-gate\ncp \"$DEFAULTS/gate-map.sh\" .claude/rt-kit/defaults/\nfor r in git-workflow task-flow epic-flow turn-conduct; do mkdir -p .claude/skills/$r; printf -- \"---\\nname: %s\\nkind: rule\\n---\\n\" $r > .claude/skills/$r/SKILL.md; done\nprintf '%s' '{\"exists\":true,\"open\":true,\"onBoard\":true,\"assigned\":true,\"numbered\":true,\"status\":\"In progress\"}' > .p/state\ncat > .claude/rt-kit/project.sh <<'PROFILE'\nrt_task_state() { if [ -f \"$CLAUDE_PROJECT_DIR/.p/state-$1\" ]; then cat \"$CLAUDE_PROJECT_DIR/.p/state-$1\"; else cat \"$CLAUDE_PROJECT_DIR/.p/state\"; fi; }\nrt_pull_state() { cat \"$CLAUDE_PROJECT_DIR/.p/pull\" 2>/dev/null || return 1; }\nrt_conflicting_pulls() { cat \"$CLAUDE_PROJECT_DIR/.p/conflicts\" 2>/dev/null; return 0; }\nrt_pull_merged() { cat \"$CLAUDE_PROJECT_DIR/.p/merged\" 2>/dev/null; }\nrt_report_body() { :; }\nrt_push_checks() { printf \"%s\\n\" true; }\n[ -f \"$CLAUDE_PROJECT_DIR/.p/extra.sh\" ] && . \"$CLAUDE_PROJECT_DIR/.p/extra.sh\"\nPROFILE\nexport CLAUDE_PROJECT_DIR=\"$T\" TMPDIR=\"$T/.tmp/\"\nprintf '%s\\n' git-workflow task-flow epic-flow turn-conduct > .tmp/claude-skill-gate/tests.loaded\nturn() { : > .tmp/turn.jsonl; jq -cn '{type:\"assistant\",message:{content:[{type:\"tool_use\",name:\"Skill\",input:{skill:\"git-workflow\"}}]}}' >> .tmp/turn.jsonl; [ -n \"$1\" ] && jq -cn --arg t \"EXAM: passed $1 of 5\" '{type:\"user\",message:{content:[{type:\"tool_result\",content:$t}]}}' >> .tmp/turn.jsonl; return 0; }\nturn 5\nH=\"$(mktemp -d)\"; git worktree add -q -b RT-7-second \"$H/second\" main 2>/dev/null",
|
|
1415
1429
|
"input": "input_cmd \"cd \\\"$H/second\\\" && git push origin RT-7-second\" Bash \"$T\" | jq --arg r \"$T/.tmp/turn.jsonl\" '. + {transcript_path: $r}'"
|
|
1416
1430
|
},
|
|
1417
|
-
"text": "BLOCKED: the call goes from a second working copy — «{moved_root}», while the session stands in «{here_root}». The gate set runs where the session was started, not where the call was made: someone else's uncommitted work refuses it, and the contribution actually leaving passes unchecked. The second copy is for reading; bring the result of the merge back and send from the copy the session stands in. Before that push run the heavy steps by `{ahead_cmd}` (the Bash call with run_in_background) and push after their end: the push is refused until they have a green mark.",
|
|
1431
|
+
"text": "BLOCKED: the call goes from a second working copy — «{moved_root}», while the session stands in «{here_root}». The gate set runs where the session was started, not where the call was made: someone else's uncommitted work refuses it, and the contribution actually leaving passes unchecked. The second copy is for reading; bring the result of the merge back and send from the copy the session stands in. Before that push run the heavy steps by `{ahead_cmd} > \"${TMPDIR:-/tmp}/push-ahead-$(basename \"$PWD\").log\" 2>&1` (the Bash call with run_in_background, nothing after it; the verdict is the code of the notice and the last `push ahead:` line of the log) and push after their end: the push is refused until they have a green mark.",
|
|
1432
|
+
"tail": true
|
|
1433
|
+
},
|
|
1434
|
+
{
|
|
1435
|
+
"area": "delivery",
|
|
1436
|
+
"hook": "push-ahead-call-guard.sh",
|
|
1437
|
+
"when": {
|
|
1438
|
+
"push_ahead_code_visible": "no"
|
|
1439
|
+
},
|
|
1440
|
+
"action": "push_ahead_run",
|
|
1441
|
+
"decision": "deny",
|
|
1442
|
+
"move": "push_ahead",
|
|
1443
|
+
"says": "Run it in the ready form",
|
|
1444
|
+
"probe": {
|
|
1445
|
+
"setup": "T=\"$(fixture_tree)\"\ncd \"$T\"",
|
|
1446
|
+
"input": "input_cmd 'bash .claude/hooks/git-guard-push-ahead.sh | tail -5' Bash \"$T\" | jq -c '.tool_input.run_in_background = true'"
|
|
1447
|
+
},
|
|
1448
|
+
"text": "BLOCKED by push-ahead-call-guard: this call runs the push set ahead, and the call does not end with its exit code — {tail}. A background notice carries the code of the last command of the call, not of the set: a red set followed by `echo \"exit=$?\"` or `| tail` comes back as «exit code 0», and a code printed into the output is no substitute for it. Run it in the ready form: `{ahead_cmd} > {log} 2>&1` as the Bash call with run_in_background, nothing after it. The log lies outside the working copy: a file in the tree makes the copy dirty, and the set does not start. The verdict is the code of the notice; the log says it in its last `push ahead:` line, and on red the lines after that line name the red checks.",
|
|
1418
1449
|
"tail": true
|
|
1419
1450
|
},
|
|
1420
1451
|
{
|
|
@@ -1427,12 +1458,12 @@
|
|
|
1427
1458
|
"action": "branch_create",
|
|
1428
1459
|
"decision": "deny",
|
|
1429
1460
|
"move": "push_ahead",
|
|
1430
|
-
"says": "resolve the conflict and send it — the push there is refused until the heavy steps have a green mark, so run them first by `bash [^`]*git-guard-push-ahead\\.sh` \\(the Bash call with run_in_background
|
|
1461
|
+
"says": "resolve the conflict and send it — the push there is refused until the heavy steps have a green mark, so run them first by `bash [^`]*git-guard-push-ahead\\.sh > [^`]*push-ahead-[^`]*\\.log\" 2>&1` \\(the Bash call with run_in_background, nothing after it",
|
|
1431
1462
|
"probe": {
|
|
1432
1463
|
"setup": "T=\"$(fixture_repo_branched main RT-7-probe)\"\ncd \"$T\"\nprintf \".p/\\n.tmp/\\n.claude/\\ntools/\\n\" > .gitignore\ngit add .gitignore && git -c user.name=probe -c user.email=probe@example.com -c commit.gpgsign=false commit -q -m \"chore: ignore\"\ngit update-ref refs/remotes/origin/main main\nmkdir -p .claude/rt-kit/defaults .p .tmp/claude-skill-gate\ncp \"$DEFAULTS/gate-map.sh\" .claude/rt-kit/defaults/\nfor r in git-workflow task-flow epic-flow turn-conduct; do mkdir -p .claude/skills/$r; printf -- \"---\\nname: %s\\nkind: rule\\n---\\n\" $r > .claude/skills/$r/SKILL.md; done\nprintf '%s' '{\"exists\":true,\"open\":true,\"onBoard\":true,\"assigned\":true,\"numbered\":true,\"status\":\"In progress\"}' > .p/state\ncat > .claude/rt-kit/project.sh <<'PROFILE'\nrt_task_state() { if [ -f \"$CLAUDE_PROJECT_DIR/.p/state-$1\" ]; then cat \"$CLAUDE_PROJECT_DIR/.p/state-$1\"; else cat \"$CLAUDE_PROJECT_DIR/.p/state\"; fi; }\nrt_pull_state() { cat \"$CLAUDE_PROJECT_DIR/.p/pull\" 2>/dev/null || return 1; }\nrt_conflicting_pulls() { cat \"$CLAUDE_PROJECT_DIR/.p/conflicts\" 2>/dev/null; return 0; }\nrt_pull_merged() { cat \"$CLAUDE_PROJECT_DIR/.p/merged\" 2>/dev/null; }\nrt_report_body() { :; }\nrt_push_checks() { printf \"%s\\n\" true; }\n[ -f \"$CLAUDE_PROJECT_DIR/.p/extra.sh\" ] && . \"$CLAUDE_PROJECT_DIR/.p/extra.sh\"\nPROFILE\nexport CLAUDE_PROJECT_DIR=\"$T\" TMPDIR=\"$T/.tmp/\"\nprintf '%s\\n' git-workflow task-flow epic-flow turn-conduct > .tmp/claude-skill-gate/tests.loaded\nturn() { : > .tmp/turn.jsonl; jq -cn '{type:\"assistant\",message:{content:[{type:\"tool_use\",name:\"Skill\",input:{skill:\"git-workflow\"}}]}}' >> .tmp/turn.jsonl; [ -n \"$1\" ] && jq -cn --arg t \"EXAM: passed $1 of 5\" '{type:\"user\",message:{content:[{type:\"tool_result\",content:$t}]}}' >> .tmp/turn.jsonl; return 0; }\nturn 5\nprintf '%s\\n' \"#5 RT-7-probe\" > .p/conflicts",
|
|
1433
1464
|
"input": "input_cmd 'git checkout -b RT-8-next origin/main' Bash \"$T\" | jq --arg r \"$T/.tmp/turn.jsonl\" '. + {transcript_path: $r}'"
|
|
1434
1465
|
},
|
|
1435
|
-
"text": "BLOCKED: {taking} while a conflicting request of your own stands. What was handed over conflicts with the main branch, and a person cannot merge it:\n\n{listed}\n\nThe conflict arrives by someone else's merge, without a single action by the author of the request: it stands until it is caught up with. New work does not fix it — it adds one more branch to the queue, growing from the same main and falling behind the same way.\n\nThere is one move from here: pull the main branch, merge it into the named branch, resolve the conflict and send it — the push there is refused until the heavy steps have a green mark, so run them first by `{ahead_cmd}` (the Bash call with run_in_background) and push after its end — and only then take new work. What is fixed by what — the pattern git-workflow-freshness.",
|
|
1466
|
+
"text": "BLOCKED: {taking} while a conflicting request of your own stands. What was handed over conflicts with the main branch, and a person cannot merge it:\n\n{listed}\n\nThe conflict arrives by someone else's merge, without a single action by the author of the request: it stands until it is caught up with. New work does not fix it — it adds one more branch to the queue, growing from the same main and falling behind the same way.\n\nThere is one move from here: pull the main branch, merge it into the named branch, resolve the conflict and send it — the push there is refused until the heavy steps have a green mark, so run them first by `{ahead_cmd} > \"${TMPDIR:-/tmp}/push-ahead-$(basename \"$PWD\").log\" 2>&1` (the Bash call with run_in_background, nothing after it; the verdict is the code of the notice and the last `push ahead:` line of the log) and push after its end — and only then take new work. What is fixed by what — the pattern git-workflow-freshness.",
|
|
1436
1467
|
"tail": true
|
|
1437
1468
|
},
|
|
1438
1469
|
{
|
|
@@ -1445,12 +1476,12 @@
|
|
|
1445
1476
|
"action": "pr_create",
|
|
1446
1477
|
"decision": "deny",
|
|
1447
1478
|
"move": "push_ahead",
|
|
1448
|
-
"says": "resolve the conflict and send it — the push there is refused until the heavy steps have a green mark, so run them first by `bash [^`]*git-guard-push-ahead\\.sh` \\(the Bash call with run_in_background
|
|
1479
|
+
"says": "resolve the conflict and send it — the push there is refused until the heavy steps have a green mark, so run them first by `bash [^`]*git-guard-push-ahead\\.sh > [^`]*push-ahead-[^`]*\\.log\" 2>&1` \\(the Bash call with run_in_background, nothing after it",
|
|
1449
1480
|
"probe": {
|
|
1450
1481
|
"setup": "T=\"$(fixture_repo_branched main RT-7-probe)\"\ncd \"$T\"\nprintf \".p/\\n.tmp/\\n.claude/\\ntools/\\n\" > .gitignore\ngit add .gitignore && git -c user.name=probe -c user.email=probe@example.com -c commit.gpgsign=false commit -q -m \"chore: ignore\"\ngit update-ref refs/remotes/origin/main main\nmkdir -p .claude/rt-kit/defaults .p .tmp/claude-skill-gate\ncp \"$DEFAULTS/gate-map.sh\" .claude/rt-kit/defaults/\nfor r in git-workflow task-flow epic-flow turn-conduct; do mkdir -p .claude/skills/$r; printf -- \"---\\nname: %s\\nkind: rule\\n---\\n\" $r > .claude/skills/$r/SKILL.md; done\nprintf '%s' '{\"exists\":true,\"open\":true,\"onBoard\":true,\"assigned\":true,\"numbered\":true,\"status\":\"In progress\"}' > .p/state\ncat > .claude/rt-kit/project.sh <<'PROFILE'\nrt_task_state() { if [ -f \"$CLAUDE_PROJECT_DIR/.p/state-$1\" ]; then cat \"$CLAUDE_PROJECT_DIR/.p/state-$1\"; else cat \"$CLAUDE_PROJECT_DIR/.p/state\"; fi; }\nrt_pull_state() { cat \"$CLAUDE_PROJECT_DIR/.p/pull\" 2>/dev/null || return 1; }\nrt_conflicting_pulls() { cat \"$CLAUDE_PROJECT_DIR/.p/conflicts\" 2>/dev/null; return 0; }\nrt_pull_merged() { cat \"$CLAUDE_PROJECT_DIR/.p/merged\" 2>/dev/null; }\nrt_report_body() { :; }\nrt_push_checks() { printf \"%s\\n\" true; }\n[ -f \"$CLAUDE_PROJECT_DIR/.p/extra.sh\" ] && . \"$CLAUDE_PROJECT_DIR/.p/extra.sh\"\nPROFILE\nexport CLAUDE_PROJECT_DIR=\"$T\" TMPDIR=\"$T/.tmp/\"\nprintf '%s\\n' git-workflow task-flow epic-flow turn-conduct > .tmp/claude-skill-gate/tests.loaded\nturn() { : > .tmp/turn.jsonl; jq -cn '{type:\"assistant\",message:{content:[{type:\"tool_use\",name:\"Skill\",input:{skill:\"git-workflow\"}}]}}' >> .tmp/turn.jsonl; [ -n \"$1\" ] && jq -cn --arg t \"EXAM: passed $1 of 5\" '{type:\"user\",message:{content:[{type:\"tool_result\",content:$t}]}}' >> .tmp/turn.jsonl; return 0; }\nturn 5\nprintf '%s\\n' \"#5 RT-7-probe\" > .p/conflicts",
|
|
1451
1482
|
"input": "input_cmd 'gh pr create --title \"[RT-7] Done\" --body x' Bash \"$T\" | jq --arg r \"$T/.tmp/turn.jsonl\" '. + {transcript_path: $r}'"
|
|
1452
1483
|
},
|
|
1453
|
-
"text": "BLOCKED: {taking} while a conflicting request of your own stands. What was handed over conflicts with the main branch, and a person cannot merge it:\n\n{listed}\n\nThe conflict arrives by someone else's merge, without a single action by the author of the request: it stands until it is caught up with. New work does not fix it — it adds one more branch to the queue, growing from the same main and falling behind the same way.\n\nThere is one move from here: pull the main branch, merge it into the named branch, resolve the conflict and send it — the push there is refused until the heavy steps have a green mark, so run them first by `{ahead_cmd}` (the Bash call with run_in_background) and push after its end — and only then take new work. What is fixed by what — the pattern git-workflow-freshness.",
|
|
1484
|
+
"text": "BLOCKED: {taking} while a conflicting request of your own stands. What was handed over conflicts with the main branch, and a person cannot merge it:\n\n{listed}\n\nThe conflict arrives by someone else's merge, without a single action by the author of the request: it stands until it is caught up with. New work does not fix it — it adds one more branch to the queue, growing from the same main and falling behind the same way.\n\nThere is one move from here: pull the main branch, merge it into the named branch, resolve the conflict and send it — the push there is refused until the heavy steps have a green mark, so run them first by `{ahead_cmd} > \"${TMPDIR:-/tmp}/push-ahead-$(basename \"$PWD\").log\" 2>&1` (the Bash call with run_in_background, nothing after it; the verdict is the code of the notice and the last `push ahead:` line of the log) and push after its end — and only then take new work. What is fixed by what — the pattern git-workflow-freshness.",
|
|
1454
1485
|
"tail": true
|
|
1455
1486
|
},
|
|
1456
1487
|
{
|
|
@@ -1463,12 +1494,12 @@
|
|
|
1463
1494
|
"action": "task_new",
|
|
1464
1495
|
"decision": "deny",
|
|
1465
1496
|
"move": "push_ahead",
|
|
1466
|
-
"says": "resolve the conflict and send it — the push there is refused until the heavy steps have a green mark, so run them first by `bash [^`]*git-guard-push-ahead\\.sh` \\(the Bash call with run_in_background
|
|
1497
|
+
"says": "resolve the conflict and send it — the push there is refused until the heavy steps have a green mark, so run them first by `bash [^`]*git-guard-push-ahead\\.sh > [^`]*push-ahead-[^`]*\\.log\" 2>&1` \\(the Bash call with run_in_background, nothing after it",
|
|
1467
1498
|
"probe": {
|
|
1468
1499
|
"setup": "T=\"$(fixture_repo_branched main RT-7-probe)\"\ncd \"$T\"\nprintf \".p/\\n.tmp/\\n.claude/\\ntools/\\n\" > .gitignore\ngit add .gitignore && git -c user.name=probe -c user.email=probe@example.com -c commit.gpgsign=false commit -q -m \"chore: ignore\"\ngit update-ref refs/remotes/origin/main main\nmkdir -p .claude/rt-kit/defaults .p .tmp/claude-skill-gate\ncp \"$DEFAULTS/gate-map.sh\" .claude/rt-kit/defaults/\nfor r in git-workflow task-flow epic-flow turn-conduct; do mkdir -p .claude/skills/$r; printf -- \"---\\nname: %s\\nkind: rule\\n---\\n\" $r > .claude/skills/$r/SKILL.md; done\nprintf '%s' '{\"exists\":true,\"open\":true,\"onBoard\":true,\"assigned\":true,\"numbered\":true,\"status\":\"In progress\"}' > .p/state\ncat > .claude/rt-kit/project.sh <<'PROFILE'\nrt_task_state() { if [ -f \"$CLAUDE_PROJECT_DIR/.p/state-$1\" ]; then cat \"$CLAUDE_PROJECT_DIR/.p/state-$1\"; else cat \"$CLAUDE_PROJECT_DIR/.p/state\"; fi; }\nrt_pull_state() { cat \"$CLAUDE_PROJECT_DIR/.p/pull\" 2>/dev/null || return 1; }\nrt_conflicting_pulls() { cat \"$CLAUDE_PROJECT_DIR/.p/conflicts\" 2>/dev/null; return 0; }\nrt_pull_merged() { cat \"$CLAUDE_PROJECT_DIR/.p/merged\" 2>/dev/null; }\nrt_report_body() { :; }\nrt_push_checks() { printf \"%s\\n\" true; }\n[ -f \"$CLAUDE_PROJECT_DIR/.p/extra.sh\" ] && . \"$CLAUDE_PROJECT_DIR/.p/extra.sh\"\nPROFILE\nexport CLAUDE_PROJECT_DIR=\"$T\" TMPDIR=\"$T/.tmp/\"\nprintf '%s\\n' git-workflow task-flow epic-flow turn-conduct > .tmp/claude-skill-gate/tests.loaded\nturn() { : > .tmp/turn.jsonl; jq -cn '{type:\"assistant\",message:{content:[{type:\"tool_use\",name:\"Skill\",input:{skill:\"git-workflow\"}}]}}' >> .tmp/turn.jsonl; [ -n \"$1\" ] && jq -cn --arg t \"EXAM: passed $1 of 5\" '{type:\"user\",message:{content:[{type:\"tool_result\",content:$t}]}}' >> .tmp/turn.jsonl; return 0; }\nturn 5\nprintf '%s\\n' \"#5 RT-7-probe\" > .p/conflicts",
|
|
1469
1500
|
"input": "input_cmd 'npm run task:new -- --title t --slug s' Bash \"$T\" | jq --arg r \"$T/.tmp/turn.jsonl\" '. + {transcript_path: $r}'"
|
|
1470
1501
|
},
|
|
1471
|
-
"text": "BLOCKED: {taking} while a conflicting request of your own stands. What was handed over conflicts with the main branch, and a person cannot merge it:\n\n{listed}\n\nThe conflict arrives by someone else's merge, without a single action by the author of the request: it stands until it is caught up with. New work does not fix it — it adds one more branch to the queue, growing from the same main and falling behind the same way.\n\nThere is one move from here: pull the main branch, merge it into the named branch, resolve the conflict and send it — the push there is refused until the heavy steps have a green mark, so run them first by `{ahead_cmd}` (the Bash call with run_in_background) and push after its end — and only then take new work. What is fixed by what — the pattern git-workflow-freshness.",
|
|
1502
|
+
"text": "BLOCKED: {taking} while a conflicting request of your own stands. What was handed over conflicts with the main branch, and a person cannot merge it:\n\n{listed}\n\nThe conflict arrives by someone else's merge, without a single action by the author of the request: it stands until it is caught up with. New work does not fix it — it adds one more branch to the queue, growing from the same main and falling behind the same way.\n\nThere is one move from here: pull the main branch, merge it into the named branch, resolve the conflict and send it — the push there is refused until the heavy steps have a green mark, so run them first by `{ahead_cmd} > \"${TMPDIR:-/tmp}/push-ahead-$(basename \"$PWD\").log\" 2>&1` (the Bash call with run_in_background, nothing after it; the verdict is the code of the notice and the last `push ahead:` line of the log) and push after its end — and only then take new work. What is fixed by what — the pattern git-workflow-freshness.",
|
|
1472
1503
|
"tail": true
|
|
1473
1504
|
},
|
|
1474
1505
|
{
|
|
@@ -1480,12 +1511,12 @@
|
|
|
1480
1511
|
"action": "task_move",
|
|
1481
1512
|
"decision": "deny",
|
|
1482
1513
|
"move": "push_ahead",
|
|
1483
|
-
"says": "resolve the conflict and send it — the push there is refused until the heavy steps have a green mark, so run them first by `bash [^`]*git-guard-push-ahead\\.sh` \\(the Bash call with run_in_background
|
|
1514
|
+
"says": "resolve the conflict and send it — the push there is refused until the heavy steps have a green mark, so run them first by `bash [^`]*git-guard-push-ahead\\.sh > [^`]*push-ahead-[^`]*\\.log\" 2>&1` \\(the Bash call with run_in_background, nothing after it",
|
|
1484
1515
|
"probe": {
|
|
1485
1516
|
"setup": "T=\"$(fixture_repo_branched main RT-7-probe)\"\ncd \"$T\"\nprintf \".p/\\n.tmp/\\n.claude/\\ntools/\\n\" > .gitignore\ngit add .gitignore && git -c user.name=probe -c user.email=probe@example.com -c commit.gpgsign=false commit -q -m \"chore: ignore\"\ngit update-ref refs/remotes/origin/main main\nmkdir -p .claude/rt-kit/defaults .p .tmp/claude-skill-gate\ncp \"$DEFAULTS/gate-map.sh\" .claude/rt-kit/defaults/\nfor r in git-workflow task-flow epic-flow turn-conduct; do mkdir -p .claude/skills/$r; printf -- \"---\\nname: %s\\nkind: rule\\n---\\n\" $r > .claude/skills/$r/SKILL.md; done\nprintf '%s' '{\"exists\":true,\"open\":true,\"onBoard\":true,\"assigned\":true,\"numbered\":true,\"status\":\"In progress\"}' > .p/state\ncat > .claude/rt-kit/project.sh <<'PROFILE'\nrt_task_state() { if [ -f \"$CLAUDE_PROJECT_DIR/.p/state-$1\" ]; then cat \"$CLAUDE_PROJECT_DIR/.p/state-$1\"; else cat \"$CLAUDE_PROJECT_DIR/.p/state\"; fi; }\nrt_pull_state() { cat \"$CLAUDE_PROJECT_DIR/.p/pull\" 2>/dev/null || return 1; }\nrt_conflicting_pulls() { cat \"$CLAUDE_PROJECT_DIR/.p/conflicts\" 2>/dev/null; return 0; }\nrt_pull_merged() { cat \"$CLAUDE_PROJECT_DIR/.p/merged\" 2>/dev/null; }\nrt_report_body() { :; }\nrt_push_checks() { printf \"%s\\n\" true; }\n[ -f \"$CLAUDE_PROJECT_DIR/.p/extra.sh\" ] && . \"$CLAUDE_PROJECT_DIR/.p/extra.sh\"\nPROFILE\nexport CLAUDE_PROJECT_DIR=\"$T\" TMPDIR=\"$T/.tmp/\"\nprintf '%s\\n' git-workflow task-flow epic-flow turn-conduct > .tmp/claude-skill-gate/tests.loaded\nturn() { : > .tmp/turn.jsonl; jq -cn '{type:\"assistant\",message:{content:[{type:\"tool_use\",name:\"Skill\",input:{skill:\"git-workflow\"}}]}}' >> .tmp/turn.jsonl; [ -n \"$1\" ] && jq -cn --arg t \"EXAM: passed $1 of 5\" '{type:\"user\",message:{content:[{type:\"tool_result\",content:$t}]}}' >> .tmp/turn.jsonl; return 0; }\nturn 5\nprintf '%s\\n' \"#5 RT-7-probe\" > .p/conflicts",
|
|
1486
1517
|
"input": "input_cmd 'npm run task:move -- 7 in-progress' Bash \"$T\" | jq --arg r \"$T/.tmp/turn.jsonl\" '. + {transcript_path: $r}'"
|
|
1487
1518
|
},
|
|
1488
|
-
"text": "BLOCKED: {taking} while a conflicting request of your own stands. What was handed over conflicts with the main branch, and a person cannot merge it:\n\n{listed}\n\nThe conflict arrives by someone else's merge, without a single action by the author of the request: it stands until it is caught up with. New work does not fix it — it adds one more branch to the queue, growing from the same main and falling behind the same way.\n\nThere is one move from here: pull the main branch, merge it into the named branch, resolve the conflict and send it — the push there is refused until the heavy steps have a green mark, so run them first by `{ahead_cmd}` (the Bash call with run_in_background) and push after its end — and only then take new work. What is fixed by what — the pattern git-workflow-freshness.",
|
|
1519
|
+
"text": "BLOCKED: {taking} while a conflicting request of your own stands. What was handed over conflicts with the main branch, and a person cannot merge it:\n\n{listed}\n\nThe conflict arrives by someone else's merge, without a single action by the author of the request: it stands until it is caught up with. New work does not fix it — it adds one more branch to the queue, growing from the same main and falling behind the same way.\n\nThere is one move from here: pull the main branch, merge it into the named branch, resolve the conflict and send it — the push there is refused until the heavy steps have a green mark, so run them first by `{ahead_cmd} > \"${TMPDIR:-/tmp}/push-ahead-$(basename \"$PWD\").log\" 2>&1` (the Bash call with run_in_background, nothing after it; the verdict is the code of the notice and the last `push ahead:` line of the log) and push after its end — and only then take new work. What is fixed by what — the pattern git-workflow-freshness.",
|
|
1489
1520
|
"tail": true
|
|
1490
1521
|
},
|
|
1491
1522
|
{
|
|
@@ -1712,7 +1743,7 @@
|
|
|
1712
1743
|
"action": "branch_create",
|
|
1713
1744
|
"decision": "deny",
|
|
1714
1745
|
"move": "push_ahead",
|
|
1715
|
-
"says": "Take it from the fresh main branch, run the heavy steps by `bash [^`]*git-guard-push-ahead\\.sh` \\(the Bash call with run_in_background
|
|
1746
|
+
"says": "Take it from the fresh main branch, run the heavy steps by `bash [^`]*git-guard-push-ahead\\.sh > [^`]*push-ahead-[^`]*\\.log\" 2>&1` \\(the Bash call with run_in_background, nothing after it",
|
|
1716
1747
|
"probe": {
|
|
1717
1748
|
"setup": "T=\"$(fixture_repo_branched main RT-7-probe)\"\ncd \"$T\"\nprintf \".p/\\n.tmp/\\n.claude/\\ntools/\\n\" > .gitignore\ngit add .gitignore && git -c user.name=probe -c user.email=probe@example.com -c commit.gpgsign=false commit -q -m \"chore: ignore\"\ngit update-ref refs/remotes/origin/main main\nmkdir -p .claude/rt-kit/defaults .p .tmp/claude-skill-gate\ncp \"$DEFAULTS/gate-map.sh\" .claude/rt-kit/defaults/\nfor r in git-workflow task-flow epic-flow turn-conduct; do mkdir -p .claude/skills/$r; printf -- \"---\\nname: %s\\nkind: rule\\n---\\n\" $r > .claude/skills/$r/SKILL.md; done\nprintf '%s' '{\"exists\":true,\"open\":true,\"onBoard\":true,\"assigned\":true,\"numbered\":true,\"status\":\"In progress\"}' > .p/state\ncat > .claude/rt-kit/project.sh <<'PROFILE'\nrt_task_state() { if [ -f \"$CLAUDE_PROJECT_DIR/.p/state-$1\" ]; then cat \"$CLAUDE_PROJECT_DIR/.p/state-$1\"; else cat \"$CLAUDE_PROJECT_DIR/.p/state\"; fi; }\nrt_pull_state() { cat \"$CLAUDE_PROJECT_DIR/.p/pull\" 2>/dev/null || return 1; }\nrt_conflicting_pulls() { cat \"$CLAUDE_PROJECT_DIR/.p/conflicts\" 2>/dev/null; return 0; }\nrt_pull_merged() { cat \"$CLAUDE_PROJECT_DIR/.p/merged\" 2>/dev/null; }\nrt_report_body() { :; }\nrt_push_checks() { printf \"%s\\n\" true; }\n[ -f \"$CLAUDE_PROJECT_DIR/.p/extra.sh\" ] && . \"$CLAUDE_PROJECT_DIR/.p/extra.sh\"\nPROFILE\nexport CLAUDE_PROJECT_DIR=\"$T\" TMPDIR=\"$T/.tmp/\"\nprintf '%s\\n' git-workflow task-flow epic-flow turn-conduct > .tmp/claude-skill-gate/tests.loaded\nturn() { : > .tmp/turn.jsonl; jq -cn '{type:\"assistant\",message:{content:[{type:\"tool_use\",name:\"Skill\",input:{skill:\"git-workflow\"}}]}}' >> .tmp/turn.jsonl; [ -n \"$1\" ] && jq -cn --arg t \"EXAM: passed $1 of 5\" '{type:\"user\",message:{content:[{type:\"tool_result\",content:$t}]}}' >> .tmp/turn.jsonl; return 0; }\nturn 5\njq -c '. + {\"epic\":50}' .p/state > .p/state.n && mv .p/state.n .p/state",
|
|
1718
1749
|
"input": "input_cmd 'git checkout -b RT-8-next origin/main' Bash \"$T\" | jq --arg r \"$T/.tmp/turn.jsonl\" '. + {transcript_path: $r}'"
|
|
@@ -1753,7 +1784,7 @@
|
|
|
1753
1784
|
"action": "branch_create",
|
|
1754
1785
|
"decision": "deny",
|
|
1755
1786
|
"move": "push_ahead",
|
|
1756
|
-
"says": "git merge origin/main, run the heavy steps by `bash [^`]*git-guard-push-ahead\\.sh` \\(the Bash call with run_in_background
|
|
1787
|
+
"says": "git merge origin/main, run the heavy steps by `bash [^`]*git-guard-push-ahead\\.sh > [^`]*push-ahead-[^`]*\\.log\" 2>&1` \\(the Bash call with run_in_background, nothing after it",
|
|
1757
1788
|
"probe": {
|
|
1758
1789
|
"setup": "T=\"$(fixture_repo_branched main RT-7-probe)\"\ncd \"$T\"\nprintf \".p/\\n.tmp/\\n.claude/\\ntools/\\n\" > .gitignore\ngit add .gitignore && git -c user.name=probe -c user.email=probe@example.com -c commit.gpgsign=false commit -q -m \"chore: ignore\"\ngit update-ref refs/remotes/origin/main main\nmkdir -p .claude/rt-kit/defaults .p .tmp/claude-skill-gate\ncp \"$DEFAULTS/gate-map.sh\" .claude/rt-kit/defaults/\nfor r in git-workflow task-flow epic-flow turn-conduct; do mkdir -p .claude/skills/$r; printf -- \"---\\nname: %s\\nkind: rule\\n---\\n\" $r > .claude/skills/$r/SKILL.md; done\nprintf '%s' '{\"exists\":true,\"open\":true,\"onBoard\":true,\"assigned\":true,\"numbered\":true,\"status\":\"In progress\"}' > .p/state\ncat > .claude/rt-kit/project.sh <<'PROFILE'\nrt_task_state() { if [ -f \"$CLAUDE_PROJECT_DIR/.p/state-$1\" ]; then cat \"$CLAUDE_PROJECT_DIR/.p/state-$1\"; else cat \"$CLAUDE_PROJECT_DIR/.p/state\"; fi; }\nrt_pull_state() { cat \"$CLAUDE_PROJECT_DIR/.p/pull\" 2>/dev/null || return 1; }\nrt_conflicting_pulls() { cat \"$CLAUDE_PROJECT_DIR/.p/conflicts\" 2>/dev/null; return 0; }\nrt_pull_merged() { cat \"$CLAUDE_PROJECT_DIR/.p/merged\" 2>/dev/null; }\nrt_report_body() { :; }\nrt_push_checks() { printf \"%s\\n\" true; }\n[ -f \"$CLAUDE_PROJECT_DIR/.p/extra.sh\" ] && . \"$CLAUDE_PROJECT_DIR/.p/extra.sh\"\nPROFILE\nexport CLAUDE_PROJECT_DIR=\"$T\" TMPDIR=\"$T/.tmp/\"\nprintf '%s\\n' git-workflow task-flow epic-flow turn-conduct > .tmp/claude-skill-gate/tests.loaded\nturn() { : > .tmp/turn.jsonl; jq -cn '{type:\"assistant\",message:{content:[{type:\"tool_use\",name:\"Skill\",input:{skill:\"git-workflow\"}}]}}' >> .tmp/turn.jsonl; [ -n \"$1\" ] && jq -cn --arg t \"EXAM: passed $1 of 5\" '{type:\"user\",message:{content:[{type:\"tool_result\",content:$t}]}}' >> .tmp/turn.jsonl; return 0; }\nturn 5\njq -c '. + {\"epic\":50}' .p/state > .p/state.n && mv .p/state.n .p/state\ngit update-ref refs/remotes/origin/RT-50-epic main\ngit update-ref refs/remotes/origin/main \"$(git -c user.name=probe -c user.email=probe@example.com -c commit.gpgsign=false commit-tree -p main -m ahead \"main^{tree}\")\"",
|
|
1759
1790
|
"input": "input_cmd 'git checkout -b RT-8-next origin/RT-50-epic' Bash \"$T\" | jq --arg r \"$T/.tmp/turn.jsonl\" '. + {transcript_path: $r}'"
|
|
@@ -2656,12 +2687,12 @@
|
|
|
2656
2687
|
"action": "push",
|
|
2657
2688
|
"decision": "deny",
|
|
2658
2689
|
"move": "push_ahead",
|
|
2659
|
-
"says": "moving the commits of a merged branch into a new task while .*resolve the conflict and send it — the push there is refused until the heavy steps have a green mark, so run them first by `bash [^`]*git-guard-push-ahead\\.sh` \\(the Bash call with run_in_background
|
|
2690
|
+
"says": "moving the commits of a merged branch into a new task while .*resolve the conflict and send it — the push there is refused until the heavy steps have a green mark, so run them first by `bash [^`]*git-guard-push-ahead\\.sh > [^`]*push-ahead-[^`]*\\.log\" 2>&1` \\(the Bash call with run_in_background, nothing after it",
|
|
2660
2691
|
"probe": {
|
|
2661
2692
|
"setup": "T=\"$(fixture_repo_branched main RT-7-probe)\"\ncd \"$T\"\nprintf \".p/\\n.tmp/\\n.claude/\\ntools/\\n\" > .gitignore\ngit add .gitignore && git -c user.name=probe -c user.email=probe@example.com -c commit.gpgsign=false commit -q -m \"chore: ignore\"\ngit update-ref refs/remotes/origin/main main\nmkdir -p .claude/rt-kit/defaults .p .tmp/claude-skill-gate\ncp \"$DEFAULTS/gate-map.sh\" .claude/rt-kit/defaults/\nfor r in git-workflow task-flow epic-flow turn-conduct; do mkdir -p .claude/skills/$r; printf -- \"---\\nname: %s\\nkind: rule\\n---\\n\" $r > .claude/skills/$r/SKILL.md; done\nprintf '%s' '{\"exists\":true,\"open\":true,\"onBoard\":true,\"assigned\":true,\"numbered\":true,\"status\":\"In progress\"}' > .p/state\ncat > .claude/rt-kit/project.sh <<'PROFILE'\nrt_task_state() { if [ -f \"$CLAUDE_PROJECT_DIR/.p/state-$1\" ]; then cat \"$CLAUDE_PROJECT_DIR/.p/state-$1\"; else cat \"$CLAUDE_PROJECT_DIR/.p/state\"; fi; }\nrt_pull_state() { cat \"$CLAUDE_PROJECT_DIR/.p/pull\" 2>/dev/null || return 1; }\nrt_conflicting_pulls() { cat \"$CLAUDE_PROJECT_DIR/.p/conflicts\" 2>/dev/null; return 0; }\nrt_pull_merged() { cat \"$CLAUDE_PROJECT_DIR/.p/merged\" 2>/dev/null; }\nrt_report_body() { :; }\nrt_push_checks() { printf \"%s\\n\" true; }\n[ -f \"$CLAUDE_PROJECT_DIR/.p/extra.sh\" ] && . \"$CLAUDE_PROJECT_DIR/.p/extra.sh\"\nPROFILE\nexport CLAUDE_PROJECT_DIR=\"$T\" TMPDIR=\"$T/.tmp/\"\nprintf '%s\\n' git-workflow task-flow epic-flow turn-conduct > .tmp/claude-skill-gate/tests.loaded\nturn() { : > .tmp/turn.jsonl; jq -cn '{type:\"assistant\",message:{content:[{type:\"tool_use\",name:\"Skill\",input:{skill:\"git-workflow\"}}]}}' >> .tmp/turn.jsonl; [ -n \"$1\" ] && jq -cn --arg t \"EXAM: passed $1 of 5\" '{type:\"user\",message:{content:[{type:\"tool_result\",content:$t}]}}' >> .tmp/turn.jsonl; return 0; }\nturn 5\nprintf '%s' 12 > .p/merged\nprintf '%s\\n' \"#5 RT-7-probe\" > .p/conflicts",
|
|
2662
2693
|
"input": "input_cmd 'git push origin RT-7-probe' Bash \"$T\" | jq --arg r \"$T/.tmp/turn.jsonl\" '. + {transcript_path: $r}'"
|
|
2663
2694
|
},
|
|
2664
|
-
"text": "BLOCKED: {taking} while a conflicting request of your own stands. What was handed over conflicts with the main branch, and a person cannot merge it:\n\n{listed}\n\nThe conflict arrives by someone else's merge, without a single action by the author of the request: it stands until it is caught up with. New work does not fix it — it adds one more branch to the queue, growing from the same main and falling behind the same way.\n\nThere is one move from here: pull the main branch, merge it into the named branch, resolve the conflict and send it — the push there is refused until the heavy steps have a green mark, so run them first by `{ahead_cmd}` (the Bash call with run_in_background) and push after its end — and only then take new work. What is fixed by what — the pattern git-workflow-freshness.",
|
|
2695
|
+
"text": "BLOCKED: {taking} while a conflicting request of your own stands. What was handed over conflicts with the main branch, and a person cannot merge it:\n\n{listed}\n\nThe conflict arrives by someone else's merge, without a single action by the author of the request: it stands until it is caught up with. New work does not fix it — it adds one more branch to the queue, growing from the same main and falling behind the same way.\n\nThere is one move from here: pull the main branch, merge it into the named branch, resolve the conflict and send it — the push there is refused until the heavy steps have a green mark, so run them first by `{ahead_cmd} > \"${TMPDIR:-/tmp}/push-ahead-$(basename \"$PWD\").log\" 2>&1` (the Bash call with run_in_background, nothing after it; the verdict is the code of the notice and the last `push ahead:` line of the log) and push after its end — and only then take new work. What is fixed by what — the pattern git-workflow-freshness.",
|
|
2665
2696
|
"tail": true
|
|
2666
2697
|
},
|
|
2667
2698
|
{
|
|
@@ -15077,6 +15108,42 @@
|
|
|
15077
15108
|
"input": "printf 'refs/heads/RT-7-probe %s refs/heads/RT-7-probe 0000000000000000000000000000000000000000\\n' \"$(git rev-parse RT-7-probe)\""
|
|
15078
15109
|
}
|
|
15079
15110
|
},
|
|
15111
|
+
{
|
|
15112
|
+
"area": "delivery",
|
|
15113
|
+
"hook": "pre-push.sh",
|
|
15114
|
+
"action": "push",
|
|
15115
|
+
"when": {
|
|
15116
|
+
"push_sends_tip": "yes",
|
|
15117
|
+
"push_node_pinned": "no"
|
|
15118
|
+
},
|
|
15119
|
+
"decision": "deny",
|
|
15120
|
+
"move": "install_node",
|
|
15121
|
+
"tail": false,
|
|
15122
|
+
"says": "No step of the set ran",
|
|
15123
|
+
"text": "pre-push: refused — {node_line}. No step of the set ran: on another node the steps turn red for a reason that is not in the code. Install the pinned node by that command and push again.",
|
|
15124
|
+
"probe": {
|
|
15125
|
+
"setup": "T=\"$(fixture_repo_branched main RT-7-probe)\"\ncd \"$T\"\nprintf \".p/\\n.tmp/\\n.claude/\\ntools/\\n\" > .gitignore\ngit add .gitignore && git -c user.name=probe -c user.email=probe@example.com -c commit.gpgsign=false commit -q -m \"chore: ignore\"\ngit update-ref refs/remotes/origin/main main\nmkdir -p .claude/rt-kit/defaults .p .tmp/claude-skill-gate\ncp \"$DEFAULTS/gate-map.sh\" .claude/rt-kit/defaults/\nfor r in git-workflow task-flow epic-flow turn-conduct; do mkdir -p .claude/skills/$r; printf -- \"---\\nname: %s\\nkind: rule\\n---\\n\" $r > .claude/skills/$r/SKILL.md; done\nprintf '%s' '{\"exists\":true,\"open\":true,\"onBoard\":true,\"assigned\":true,\"numbered\":true,\"status\":\"In progress\"}' > .p/state\ncat > .claude/rt-kit/project.sh <<'PROFILE'\nrt_task_state() { if [ -f \"$CLAUDE_PROJECT_DIR/.p/state-$1\" ]; then cat \"$CLAUDE_PROJECT_DIR/.p/state-$1\"; else cat \"$CLAUDE_PROJECT_DIR/.p/state\"; fi; }\nrt_pull_state() { cat \"$CLAUDE_PROJECT_DIR/.p/pull\" 2>/dev/null || return 1; }\nrt_conflicting_pulls() { cat \"$CLAUDE_PROJECT_DIR/.p/conflicts\" 2>/dev/null; return 0; }\nrt_pull_merged() { cat \"$CLAUDE_PROJECT_DIR/.p/merged\" 2>/dev/null; }\nrt_report_body() { :; }\nrt_push_checks() { printf \"%s\\n\" true; }\n[ -f \"$CLAUDE_PROJECT_DIR/.p/extra.sh\" ] && . \"$CLAUDE_PROJECT_DIR/.p/extra.sh\"\nPROFILE\nexport CLAUDE_PROJECT_DIR=\"$T\" TMPDIR=\"$T/.tmp/\"\nprintf '%s\\n' git-workflow task-flow epic-flow turn-conduct > .tmp/claude-skill-gate/tests.loaded\nturn() { : > .tmp/turn.jsonl; jq -cn '{type:\"assistant\",message:{content:[{type:\"tool_use\",name:\"Skill\",input:{skill:\"git-workflow\"}}]}}' >> .tmp/turn.jsonl; [ -n \"$1\" ] && jq -cn --arg t \"EXAM: passed $1 of 5\" '{type:\"user\",message:{content:[{type:\"tool_result\",content:$t}]}}' >> .tmp/turn.jsonl; return 0; }\nturn 5\nprintf x > own.txt && printf '99.0.0\\n' > .nvmrc && git add own.txt .nvmrc && git -c user.name=probe -c user.email=probe@example.com -c commit.gpgsign=false commit -q -m \"feat: own\"\nmkdir -p .nvm-empty\nexport NVM_DIR=\"$T/.nvm-empty\"",
|
|
15126
|
+
"input": "printf 'refs/heads/RT-7-probe %s refs/heads/RT-7-probe 0000000000000000000000000000000000000000\\n' \"$(git rev-parse RT-7-probe)\""
|
|
15127
|
+
}
|
|
15128
|
+
},
|
|
15129
|
+
{
|
|
15130
|
+
"area": "delivery",
|
|
15131
|
+
"hook": "git-guard-push-tests.sh",
|
|
15132
|
+
"when": {
|
|
15133
|
+
"rule_loaded": "yes",
|
|
15134
|
+
"push_node_pinned": "no"
|
|
15135
|
+
},
|
|
15136
|
+
"action": "push",
|
|
15137
|
+
"decision": "deny",
|
|
15138
|
+
"move": "install_node",
|
|
15139
|
+
"says": "No step of the push set ran",
|
|
15140
|
+
"probe": {
|
|
15141
|
+
"setup": "T=\"$(fixture_repo_branched main RT-7-probe)\"\ncd \"$T\"\nprintf \".p/\\n.tmp/\\n.claude/\\ntools/\\n\" > .gitignore\ngit add .gitignore && git -c user.name=probe -c user.email=probe@example.com -c commit.gpgsign=false commit -q -m \"chore: ignore\"\ngit update-ref refs/remotes/origin/main main\nmkdir -p .claude/rt-kit/defaults .p .tmp/claude-skill-gate\ncp \"$DEFAULTS/gate-map.sh\" .claude/rt-kit/defaults/\nfor r in git-workflow task-flow epic-flow turn-conduct; do mkdir -p .claude/skills/$r; printf -- \"---\\nname: %s\\nkind: rule\\n---\\n\" $r > .claude/skills/$r/SKILL.md; done\nprintf '%s' '{\"exists\":true,\"open\":true,\"onBoard\":true,\"assigned\":true,\"numbered\":true,\"status\":\"In progress\"}' > .p/state\ncat > .claude/rt-kit/project.sh <<'PROFILE'\nrt_task_state() { if [ -f \"$CLAUDE_PROJECT_DIR/.p/state-$1\" ]; then cat \"$CLAUDE_PROJECT_DIR/.p/state-$1\"; else cat \"$CLAUDE_PROJECT_DIR/.p/state\"; fi; }\nrt_pull_state() { cat \"$CLAUDE_PROJECT_DIR/.p/pull\" 2>/dev/null || return 1; }\nrt_conflicting_pulls() { cat \"$CLAUDE_PROJECT_DIR/.p/conflicts\" 2>/dev/null; return 0; }\nrt_pull_merged() { cat \"$CLAUDE_PROJECT_DIR/.p/merged\" 2>/dev/null; }\nrt_report_body() { :; }\nrt_push_checks() { printf \"%s\\n\" true; }\n[ -f \"$CLAUDE_PROJECT_DIR/.p/extra.sh\" ] && . \"$CLAUDE_PROJECT_DIR/.p/extra.sh\"\nPROFILE\nexport CLAUDE_PROJECT_DIR=\"$T\" TMPDIR=\"$T/.tmp/\"\nprintf '%s\\n' git-workflow task-flow epic-flow turn-conduct > .tmp/claude-skill-gate/tests.loaded\nturn() { : > .tmp/turn.jsonl; jq -cn '{type:\"assistant\",message:{content:[{type:\"tool_use\",name:\"Skill\",input:{skill:\"git-workflow\"}}]}}' >> .tmp/turn.jsonl; [ -n \"$1\" ] && jq -cn --arg t \"EXAM: passed $1 of 5\" '{type:\"user\",message:{content:[{type:\"tool_result\",content:$t}]}}' >> .tmp/turn.jsonl; return 0; }\nturn 5\nprintf '99.0.0\\n' > .nvmrc && git add .nvmrc && git -c user.name=probe -c user.email=probe@example.com -c commit.gpgsign=false commit -q -m \"chore: pin\"\nmkdir -p .nvm-empty\nexport NVM_DIR=\"$T/.nvm-empty\"",
|
|
15142
|
+
"input": "input_cmd 'git push origin RT-7-probe' Bash \"$T\" | jq --arg r \"$T/.tmp/turn.jsonl\" '. + {transcript_path: $r}'"
|
|
15143
|
+
},
|
|
15144
|
+
"text": "BLOCKED: {node_line}. No step of the push set ran: on another node the steps turn red for a reason that is not in the code, and an empty set would read as a green one. Install the pinned node by that command and push again; nvm puts it where the set finds it.",
|
|
15145
|
+
"tail": true
|
|
15146
|
+
},
|
|
15080
15147
|
{
|
|
15081
15148
|
"area": "delivery",
|
|
15082
15149
|
"hook": "commit-msg.sh",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
3
|
* The data of the task flow description: the literals of `words`, the forms of `expect` and the
|
|
4
|
-
* order of the release cases. A new
|
|
4
|
+
* order of the release cases. A new nudge, a new write command, a new menu option or a new form
|
|
5
5
|
* of the expected result is a line of the description, not an edit of a guard.
|
|
6
6
|
*
|
|
7
7
|
* `words` holds only the keys of `WORD_KEYS`: lists of non-empty strings, and `nudge` — the pattern
|
|
@@ -15,7 +15,22 @@
|
|
|
15
15
|
import { Call, Ref } from './flow-syntax.mjs';
|
|
16
16
|
|
|
17
17
|
/** The keys of `words`; `nudge` is a pattern, the rest are lists of strings. */
|
|
18
|
-
export const WORD_KEYS = ['
|
|
18
|
+
export const WORD_KEYS = ['nudge', 'write', 'menu', 'legacyBranches'];
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The keys of `words` the package retired: the owner stops a turn by Esc, and a typed word releases
|
|
22
|
+
* none. A tree override written for an older edition may still set them; the engine reads them as
|
|
23
|
+
* nothing and names them, and the description builds — a refusal would leave the exit guard failing
|
|
24
|
+
* open with no message.
|
|
25
|
+
*/
|
|
26
|
+
export const RETIRED_WORD_KEYS = ['stop', 'stopExcept', 'holdAfter'];
|
|
27
|
+
|
|
28
|
+
/** The lines the engine prints for the retired word keys the description still sets. */
|
|
29
|
+
export function retiredLines(model) {
|
|
30
|
+
return RETIRED_WORD_KEYS.filter((key) => key in (model.words ?? {})).map(
|
|
31
|
+
(key) => `retired by the package: words.${key} — the owner stops a turn by Esc, and the key does nothing`,
|
|
32
|
+
);
|
|
33
|
+
}
|
|
19
34
|
|
|
20
35
|
/** The ways a form of the expected result is compared with a run. */
|
|
21
36
|
export const COMPARE = ['exit', 'line', 'regex', 'number'];
|
|
@@ -34,6 +49,7 @@ const pattern = (text, flags, where, fail) => {
|
|
|
34
49
|
/** Checks the section `words`. */
|
|
35
50
|
export function checkWords(words, fail) {
|
|
36
51
|
for (const [key, value] of Object.entries(words)) {
|
|
52
|
+
if (RETIRED_WORD_KEYS.includes(key)) continue;
|
|
37
53
|
if (!WORD_KEYS.includes(key)) fail(`words.${key}: not a word list of the description — ${WORD_KEYS.join(', ')}`);
|
|
38
54
|
if (key === 'nudge') {
|
|
39
55
|
if (typeof value !== 'string' || value === '') fail('words.nudge: the pattern is a non-empty string');
|
|
@@ -69,25 +85,6 @@ export function releaseOrder(release, fail) {
|
|
|
69
85
|
.sort((a, b) => a.order - b.order);
|
|
70
86
|
}
|
|
71
87
|
|
|
72
|
-
const alternatives = (list) => list.map((w) => w.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')).join('|');
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* A message of the owner says stop: it begins with a word of `words.stop`, and the rest of it does
|
|
76
|
-
* not hold the turn — no word of `words.stopExcept` without «не» before it, and no word beginning
|
|
77
|
-
* with an entry of `words.holdAfter` («хватит останавливаться» asks to go on).
|
|
78
|
-
*/
|
|
79
|
-
export function saysStop(message, words) {
|
|
80
|
-
const stop = words.stop ?? [];
|
|
81
|
-
if (stop.length === 0) return false;
|
|
82
|
-
const text = message.trim().replace(/^[\s\p{P}]+/u, '');
|
|
83
|
-
const head = text.match(new RegExp(`^(?:${alternatives(stop)})(?![\\p{L}])`, 'iu'));
|
|
84
|
-
if (!head) return false;
|
|
85
|
-
const rest = text.slice(head[0].length);
|
|
86
|
-
const hold = words.holdAfter ?? [];
|
|
87
|
-
if (hold.length > 0 && new RegExp(`(?<![\\p{L}])(?:${alternatives(hold)})`, 'iu').test(rest)) return false;
|
|
88
|
-
const except = words.stopExcept ?? [];
|
|
89
|
-
return except.length === 0 || !new RegExp(`(?<![\\p{L}])(?<!не )(?:${alternatives(except)})(?![\\p{L}])`, 'iu').test(rest);
|
|
90
|
-
}
|
|
91
88
|
|
|
92
89
|
/**
|
|
93
90
|
* A part of a shell command as it is judged: the leading assignments of variables (`NAME=value`) and
|
|
@@ -127,8 +124,10 @@ export function compareExpected(expect, expected, code, output) {
|
|
|
127
124
|
if (code !== 0) return { form, matched: false };
|
|
128
125
|
if (compare === 'line') return { form, matched: last === m[1] };
|
|
129
126
|
if (compare === 'regex') return { form, matched: new RegExp(m[1]).test(last) };
|
|
130
|
-
|
|
131
|
-
const
|
|
127
|
+
// A number is read with the blanks before it: `wc -l` of macOS pads its count on the left.
|
|
128
|
+
const number = last.trim();
|
|
129
|
+
if (!/^-?\d+$/.test(number)) return { form, matched: false };
|
|
130
|
+
const got = Number(number);
|
|
132
131
|
const want = Number(m[2]);
|
|
133
132
|
return { form, matched: m[1] === '=' ? got === want : m[1] === '>=' ? got >= want : got <= want };
|
|
134
133
|
}
|
|
@@ -38,7 +38,7 @@ import { callsOf, readCopies, windowOf } from './owner-nudges.mjs';
|
|
|
38
38
|
|
|
39
39
|
/** The measurers a record answers. */
|
|
40
40
|
const FROM_RECORD = new Set([
|
|
41
|
-
'measure.owner.
|
|
41
|
+
'measure.owner.interrupted',
|
|
42
42
|
'measure.owner.nudged',
|
|
43
43
|
'measure.session.wrote',
|
|
44
44
|
'measure.session.role',
|
|
@@ -47,6 +47,7 @@ const FROM_RECORD = new Set([
|
|
|
47
47
|
'measure.session.idle',
|
|
48
48
|
'measure.session.unread',
|
|
49
49
|
'measure.session.waiting',
|
|
50
|
+
'measure.session.hung',
|
|
50
51
|
]);
|
|
51
52
|
|
|
52
53
|
/** The calls the guard of the course of work judges. */
|
|
@@ -233,12 +234,14 @@ export async function forecastCopies({ copies, window, model, base, openReaders,
|
|
|
233
234
|
if (/· совпало/.test(text) && !/не совпало/.test(text)) marks.add(`${branch}:${pending.get(part.tool_use_id)}`);
|
|
234
235
|
pending.delete(part.tool_use_id);
|
|
235
236
|
}
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
237
|
+
}
|
|
238
|
+
// A queued message is an entry of its own, not of the type `user`: the word is read
|
|
239
|
+
// from every entry, as the owner source of the engine reads it.
|
|
240
|
+
const word = wordOf(entry);
|
|
241
|
+
if (word !== null) {
|
|
242
|
+
live.last = word;
|
|
243
|
+
if (!entry.toolUseResult) live.messages.push(word);
|
|
244
|
+
run = 0;
|
|
242
245
|
}
|
|
243
246
|
|
|
244
247
|
if (!isStopEntry(entry)) continue;
|
|
@@ -272,7 +275,8 @@ export async function forecastCopies({ copies, window, model, base, openReaders,
|
|
|
272
275
|
counts.longest = Math.max(counts.longest, run);
|
|
273
276
|
// A named unread task is a move, not the menu: the next stop is judged as usual.
|
|
274
277
|
const cause = menuCause(answer);
|
|
275
|
-
|
|
278
|
+
// A hung task, like an unread one, names a move, not the owner's menu.
|
|
279
|
+
menuNamed = cause !== null && !cause.unread && !cause.hung;
|
|
276
280
|
}
|
|
277
281
|
}
|
|
278
282
|
}
|