@rt-tools/agent-kit 0.24.0 → 0.26.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/agents/business-analyst.md +51 -50
- package/assets/agents/conscience.md +37 -35
- package/assets/agents/project-manager.md +49 -48
- package/assets/agents/prose-editor.md +31 -29
- package/assets/agents/qa-engineer.md +50 -48
- package/assets/agents/rules-reviewer.md +63 -58
- package/assets/agents/skill-curator.md +83 -78
- package/assets/agents/spec-critic.md +34 -29
- package/assets/agents/spec-writer.md +35 -32
- package/assets/agents/strict-teacher.md +39 -37
- package/assets/checks/archive-age.mjs +48 -28
- package/assets/checks/archive-prune.mjs +16 -14
- package/assets/checks/board-epics.github.mjs +75 -41
- package/assets/checks/board-folders.mjs +61 -0
- package/assets/checks/board-gh.github.mjs +35 -26
- package/assets/checks/board-long-work.github.mjs +24 -24
- package/assets/checks/board-paths.github.mjs +21 -16
- package/assets/checks/board-runs.github.mjs +45 -43
- package/assets/checks/board-titles.github.mjs +19 -17
- package/assets/checks/board.github.mjs +149 -127
- package/assets/checks/check-archive-age.mjs +23 -19
- package/assets/checks/check-board.github.mjs +172 -164
- package/assets/checks/check-descriptions.mjs +30 -29
- package/assets/checks/check-doc-paths.mjs +91 -88
- package/assets/checks/check-dupes.mjs +84 -80
- package/assets/checks/check-file-size.mjs +74 -71
- package/assets/checks/check-glossary.mjs +47 -37
- package/assets/checks/check-hook-scope.mjs +30 -27
- package/assets/checks/check-lib-layers.mjs +22 -21
- package/assets/checks/check-profile-drift.mjs +48 -43
- package/assets/checks/check-prose-style.mjs +120 -37
- package/assets/checks/check-push-gate.mjs +53 -50
- package/assets/checks/check-reuse.mjs +50 -40
- package/assets/checks/check-schema-drift.mjs +87 -83
- package/assets/checks/check-specs.mjs +155 -134
- package/assets/checks/check-state-next.mjs +66 -52
- package/assets/checks/check-states.mjs +32 -30
- package/assets/checks/check-styles.mjs +52 -51
- package/assets/checks/check-turn-map.mjs +54 -46
- package/assets/checks/lib-boundaries.mjs +32 -30
- package/assets/checks/lib-common.mjs +30 -29
- package/assets/checks/lib-domains.mjs +34 -34
- package/assets/checks/lib-manifests.mjs +17 -15
- package/assets/checks/lib-reexports.mjs +18 -18
- package/assets/checks/rt-kit-checks.config.mjs +174 -142
- package/assets/checks/signals.mjs +43 -39
- package/assets/checks/spec-anchors.mjs +114 -87
- package/assets/checks/spec-common.mjs +128 -84
- package/assets/checks/spec-contract.mjs +30 -30
- package/assets/checks/spec-proposed.mjs +27 -24
- package/assets/checks/spec-scenarios.mjs +51 -28
- package/assets/checks/task-new.github.mjs +85 -56
- package/assets/commands/feedback.md +65 -59
- package/assets/commands/next-session.md +64 -57
- package/assets/commands/skill-curator.md +83 -79
- package/assets/defaults/gate-map.sh +108 -97
- package/assets/defaults/project.sh +225 -185
- package/assets/defaults/shell.sh +73 -68
- package/assets/defaults/turn-map.md +45 -44
- package/assets/docs/GLOSSARY.md +142 -65
- package/assets/hooks/browser-device-id.sh +12 -12
- package/assets/hooks/browser-guard-device-id.sh +30 -28
- package/assets/hooks/browser-guard-no-asking.sh +5 -4
- package/assets/hooks/browser-guard-no-listing.sh +12 -11
- package/assets/hooks/browser-guard-no-other-drivers.sh +48 -42
- package/assets/hooks/browser-guard-require-select.sh +34 -23
- package/assets/hooks/claim-guard.sh +62 -56
- package/assets/hooks/commit-msg.sh +11 -10
- package/assets/hooks/conscience-guard.sh +91 -45
- package/assets/hooks/constitution-index.sh +16 -16
- package/assets/hooks/deny-tail.sh +28 -26
- package/assets/hooks/dev-server-guard.sh +46 -43
- package/assets/hooks/dispatch.sh +60 -46
- package/assets/hooks/docs-guard.sh +100 -91
- package/assets/hooks/exam-guard.sh +105 -93
- package/assets/hooks/git-guard-delivery-conflict.sh +38 -36
- package/assets/hooks/git-guard-delivery-draft.sh +45 -38
- package/assets/hooks/git-guard-delivery-folder.sh +50 -43
- package/assets/hooks/git-guard-delivery-signature.sh +88 -52
- package/assets/hooks/git-guard-delivery.sh +196 -180
- package/assets/hooks/git-guard-main.sh +38 -34
- package/assets/hooks/git-guard-push-tests.sh +99 -87
- package/assets/hooks/glossary-load.sh +23 -22
- package/assets/hooks/grill-gate-ask.sh +12 -11
- package/assets/hooks/grill-gate.sh +94 -87
- package/assets/hooks/guard-note.sh +20 -19
- package/assets/hooks/handoff-entry-guard.sh +26 -24
- package/assets/hooks/handoff-write.sh +74 -67
- package/assets/hooks/hook-input.sh +67 -58
- package/assets/hooks/lint-after-edit.sh +95 -61
- package/assets/hooks/observe.sh +28 -26
- package/assets/hooks/override-write-guard.sh +23 -21
- package/assets/hooks/postmortem-guard.sh +42 -39
- package/assets/hooks/profile-check.sh +22 -20
- package/assets/hooks/proposal-guard.sh +57 -49
- package/assets/hooks/prose-style-guard.sh +19 -17
- package/assets/hooks/qa-dataid-guard.sh +52 -49
- package/assets/hooks/rerun-guard.sh +31 -30
- package/assets/hooks/reuse-first-guard.sh +108 -87
- package/assets/hooks/roles.sh +14 -14
- package/assets/hooks/rule-article.sh +36 -34
- package/assets/hooks/rule-source-guard.sh +47 -42
- package/assets/hooks/skill-gate-layers.sh +59 -57
- package/assets/hooks/skill-gate-rearm.sh +15 -8
- package/assets/hooks/skill-gate.sh +89 -81
- package/assets/hooks/skill-loaded.sh +6 -6
- package/assets/hooks/sql-guard-parse.sh +68 -66
- package/assets/hooks/sql-guard-request.sh +48 -46
- package/assets/hooks/sql-guard-target.sh +57 -51
- package/assets/hooks/sql-guard-write.sh +84 -79
- package/assets/hooks/sql-guard.sh +52 -47
- package/assets/hooks/stand-login-guard.sh +40 -37
- package/assets/hooks/task-context-load.sh +60 -55
- package/assets/hooks/task-flow-context.sh +87 -69
- package/assets/hooks/task-flow-draft-guard.sh +55 -48
- package/assets/hooks/task-flow-guard.sh +67 -64
- package/assets/hooks/turn-entry-load.sh +39 -32
- package/assets/hooks/turn-exit-guard.sh +256 -204
- package/assets/hooks/turn-exit-patterns.sh +53 -0
- package/assets/hooks/utf8.sh +11 -11
- package/assets/hooks/waiting-turn-guard.sh +94 -94
- package/assets/hooks/window-fill-guard.sh +70 -62
- package/assets/hooks/work-start-guard.sh +52 -49
- package/assets/hooks/write-targets.sh +96 -44
- package/assets/laws/autonomous-work.md +29 -27
- package/assets/laws/code-structure.md +31 -30
- package/assets/laws/delivery.md +148 -137
- package/assets/laws/entity-editing.md +52 -50
- package/assets/laws/entity-models.md +14 -13
- package/assets/laws/frontend-application.md +39 -38
- package/assets/laws/lib-imports.md +27 -27
- package/assets/laws/lists.md +31 -29
- package/assets/laws/navigation.md +37 -37
- package/assets/laws/observability.md +41 -40
- package/assets/laws/project-documentation.md +106 -99
- package/assets/laws/reuse-first.md +31 -29
- package/assets/laws/shared-code.md +27 -27
- package/assets/laws/verifiability.md +131 -124
- package/assets/laws/work-conduct.md +250 -244
- package/assets/patterns/admin-lists-screen.md +72 -69
- package/assets/patterns/admin-nav-item.md +51 -46
- package/assets/patterns/angular-patterns-state.md +32 -31
- package/assets/patterns/api-layer-pair.md +33 -31
- package/assets/patterns/autonomous-work-run.md +50 -49
- package/assets/patterns/browser-verification-measure.md +124 -88
- package/assets/patterns/browser-verification-stand.md +169 -157
- package/assets/patterns/component-structure-new.md +51 -42
- package/assets/patterns/dependencies-upgrade.md +55 -39
- package/assets/patterns/doc-style-human.md +55 -37
- package/assets/patterns/doc-style-sweep.md +82 -79
- package/assets/patterns/doc-style-trace.md +87 -81
- package/assets/patterns/doc-style-write.md +130 -122
- package/assets/patterns/entity-aside.md +77 -63
- package/assets/patterns/entity-models-new.md +37 -37
- package/assets/patterns/entity-store.md +33 -33
- package/assets/patterns/git-workflow-commit.azure.md +93 -86
- package/assets/patterns/git-workflow-commit.github.md +152 -141
- package/assets/patterns/git-workflow-commit.gitlab.md +95 -89
- package/assets/patterns/git-workflow-docker.md +165 -147
- package/assets/patterns/git-workflow-freshness.md +45 -45
- package/assets/patterns/git-workflow-merge.md +98 -93
- package/assets/patterns/git-workflow-migration.md +54 -52
- package/assets/patterns/git-workflow-pr-ready.md +57 -56
- package/assets/patterns/git-workflow-pr.azure.md +126 -121
- package/assets/patterns/git-workflow-pr.github.md +179 -175
- package/assets/patterns/git-workflow-pr.gitlab.md +138 -131
- package/assets/patterns/git-workflow-restart.md +35 -31
- package/assets/patterns/git-workflow-secrets.md +80 -73
- package/assets/patterns/git-workflow-stack.md +131 -106
- package/assets/patterns/lib-layers-move.md +62 -53
- package/assets/patterns/lib-layers-new.md +59 -45
- package/assets/patterns/observability-record.md +72 -67
- package/assets/patterns/platform-access-di.md +31 -29
- package/assets/patterns/reuse-first-extend.md +66 -61
- package/assets/patterns/shared-code-new.md +39 -38
- package/assets/patterns/spec-driven-domain.md +161 -151
- package/assets/patterns/spec-driven-rule.md +179 -168
- package/assets/patterns/spec-driven-sweep.md +41 -39
- package/assets/patterns/status-report-table.github.md +37 -36
- package/assets/patterns/styling-bem-component.md +42 -42
- package/assets/patterns/styling-bem-layout.md +39 -34
- package/assets/patterns/styling-bem-sheet.md +59 -58
- package/assets/patterns/task-flow-archive.md +222 -215
- package/assets/patterns/task-flow-close.md +215 -203
- package/assets/patterns/task-flow-handoff.md +154 -145
- package/assets/patterns/task-flow-resume.md +138 -133
- package/assets/patterns/task-flow-start.md +204 -192
- package/assets/patterns/testing-e2e.md +102 -101
- package/assets/patterns/testing-unit.md +77 -70
- package/assets/patterns/ts-procedure.md +32 -29
- package/assets/patterns/turn-entry-map.md +50 -48
- package/assets/pitfalls/agent-kit.md +152 -141
- package/assets/pitfalls/doc-style.md +96 -91
- package/assets/pitfalls/git-workflow.azure.md +49 -46
- package/assets/pitfalls/git-workflow.github.md +264 -234
- package/assets/pitfalls/git-workflow.gitlab.md +49 -45
- package/assets/pitfalls/spec-driven.md +73 -71
- package/assets/pitfalls/styling-bem.md +46 -40
- package/assets/pitfalls/task-flow.md +262 -246
- package/assets/pitfalls/testing.md +99 -92
- package/assets/pitfalls/turn-conduct.md +96 -81
- package/assets/rules/angular-patterns.md +81 -80
- package/assets/rules/api-layer.md +77 -74
- package/assets/rules/autonomous-work.md +75 -74
- package/assets/rules/browser-verification.md +223 -214
- package/assets/rules/component-structure.md +72 -69
- package/assets/rules/dependencies.md +74 -67
- package/assets/rules/deploy-flow.azure.md +118 -108
- package/assets/rules/deploy-flow.github.md +145 -135
- package/assets/rules/deploy-flow.gitlab.md +120 -110
- package/assets/rules/doc-style.md +198 -173
- package/assets/rules/entity-conventions.needs-admin.md +81 -79
- package/assets/rules/entity-models.md +73 -70
- package/assets/rules/git-workflow.azure.md +224 -228
- package/assets/rules/git-workflow.github.md +250 -239
- package/assets/rules/git-workflow.gitlab.md +218 -217
- package/assets/rules/lib-layers.md +85 -86
- package/assets/rules/lists.md +101 -97
- package/assets/rules/navigation.md +78 -78
- package/assets/rules/observability.needs-app.md +165 -153
- package/assets/rules/platform-access.md +76 -75
- package/assets/rules/reuse-first.md +153 -143
- package/assets/rules/shared-code.md +82 -79
- package/assets/rules/spec-driven.md +272 -260
- package/assets/rules/status-report.md +55 -58
- package/assets/rules/styling-bem.md +81 -77
- package/assets/rules/task-flow.md +282 -270
- package/assets/rules/testing.md +224 -209
- package/assets/rules/turn-conduct.md +255 -258
- package/assets/rules/turn-entry.md +92 -87
- package/assets/rules/typescript-conventions.md +94 -88
- package/assets/samples/specs/_template/spec.md +47 -47
- package/assets/samples/tasks/_template/grill.md +20 -20
- package/assets/samples/tasks/_template/plan.md +32 -30
- package/assets/samples/tasks/_template/progress.md +16 -16
- package/assets/skills/agent-kit-extend.md +129 -113
- package/assets/skills/agent-kit.md +235 -211
- package/assets/skills/write-a-skill.md +76 -71
- package/assets/templates/findings.md +19 -19
- package/assets/templates/gate-map.sh +16 -14
- package/assets/templates/implementation.md +28 -27
- package/assets/templates/pattern.md +17 -17
- package/assets/templates/pitfalls.md +6 -6
- package/assets/templates/postmortem.md +24 -23
- package/assets/templates/project.sh +24 -24
- package/assets/templates/proposal.md +62 -60
- package/assets/templates/rule.md +38 -38
- package/assets/workflows/feature.js +46 -46
- package/assets/workflows/plan.js +54 -54
- package/lib/catalog.d.ts +2 -0
- package/lib/catalog.d.ts.map +1 -1
- package/lib/catalog.js +4 -3
- package/lib/catalog.js.map +1 -1
- package/lib/commands.d.ts.map +1 -1
- package/lib/commands.js +5 -2
- package/lib/commands.js.map +1 -1
- package/lib/companion.js +3 -2
- package/lib/companion.js.map +1 -1
- package/lib/enroll.d.ts +7 -1
- package/lib/enroll.d.ts.map +1 -1
- package/lib/enroll.js +12 -3
- package/lib/enroll.js.map +1 -1
- package/lib/plan.d.ts +11 -0
- package/lib/plan.d.ts.map +1 -1
- package/lib/plan.js +10 -1
- package/lib/plan.js.map +1 -1
- package/lib/ship.d.ts +0 -7
- package/lib/ship.d.ts.map +1 -1
- package/lib/ship.js +10 -2
- package/lib/ship.js.map +1 -1
- package/lib/shipment.d.ts.map +1 -1
- package/lib/shipment.js +6 -2
- package/lib/shipment.js.map +1 -1
- package/lib/sync.d.ts.map +1 -1
- package/lib/sync.js +45 -11
- package/lib/sync.js.map +1 -1
- package/package.json +1 -1
- package/rt-tools-agent-kit-0.26.0.tgz +0 -0
- package/rt-tools-agent-kit-0.24.0.tgz +0 -0
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# rt-hook: PreToolUse Bash|mcp__webstorm__execute_terminal_command|mcp__webstorm__execute_tool
|
|
3
|
-
#
|
|
4
|
-
#
|
|
3
|
+
# Requires: hooks/deny-tail.sh, hooks/guard-note.sh
|
|
4
|
+
# Guard of the main branch. PreToolUse on a commit call.
|
|
5
5
|
#
|
|
6
|
-
#
|
|
7
|
-
#
|
|
8
|
-
#
|
|
6
|
+
# A commit into the main branch bypasses the branch, the PR and the review, while delivery is built
|
|
7
|
+
# on them entirely — rule `git-workflow`. A direct commit there is almost always a miss: "stayed on
|
|
8
|
+
# main after merging the previous PR".
|
|
9
9
|
#
|
|
10
|
-
#
|
|
11
|
-
#
|
|
10
|
+
# The name of the main branch is not hard-wired as a string: first the pointer of the remote
|
|
11
|
+
# repository is asked, then the existing `origin/main` and `origin/master` are tried, and only at
|
|
12
|
+
# the end `main` is taken.
|
|
12
13
|
#
|
|
13
|
-
#
|
|
14
|
-
#
|
|
14
|
+
# FAIL-OPEN: not a repository, no git, a detached HEAD, broken input — pass. A broken guard must not
|
|
15
|
+
# get in the way of work.
|
|
15
16
|
|
|
16
|
-
#
|
|
17
|
+
# Its own name in the observations: the refusal is written by the shared deny tail, not by the
|
|
18
|
+
# guard itself.
|
|
17
19
|
RT_GUARD_NAME=git-guard-main
|
|
18
20
|
|
|
19
21
|
. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/utf8.sh" 2>/dev/null || true
|
|
@@ -24,8 +26,8 @@ input="$RT_HOOK_INPUT"
|
|
|
24
26
|
[ -z "$input" ] && exit 0
|
|
25
27
|
|
|
26
28
|
tool="$(rt_hook_tool)"
|
|
27
|
-
#
|
|
28
|
-
#
|
|
29
|
+
# The terminal of the development environment runs the same command line and puts it into the same
|
|
30
|
+
# field. While the guard judged the shell alone, its whole point was bypassed by switching tools.
|
|
29
31
|
case "$tool" in
|
|
30
32
|
Bash | mcp__webstorm__execute_terminal_command | mcp__webstorm__execute_tool) ;;
|
|
31
33
|
*) exit 0 ;;
|
|
@@ -33,9 +35,9 @@ esac
|
|
|
33
35
|
|
|
34
36
|
cmd="$(rt_hook_cmd)"
|
|
35
37
|
|
|
36
|
-
#
|
|
37
|
-
#
|
|
38
|
-
#
|
|
38
|
+
# The universal executor of the environment passes the real command as a nested string. It is the
|
|
39
|
+
# one to parse, not the wrapper: otherwise the command name stands right after a quote and no rule
|
|
40
|
+
# reaches it.
|
|
39
41
|
if [ "$tool" = "mcp__webstorm__execute_tool" ] && command -v perl >/dev/null 2>&1; then
|
|
40
42
|
inner="$(printf '%s' "$cmd" | perl -0ne '
|
|
41
43
|
if (/--command(?:=|\s+)(?:"((?:[^"\\]|\\.)*)"|\x27([^\x27]*)\x27|(.+))/s) {
|
|
@@ -44,18 +46,19 @@ if [ "$tool" = "mcp__webstorm__execute_tool" ] && command -v perl >/dev/null 2>&
|
|
|
44
46
|
' 2>/dev/null)"
|
|
45
47
|
[ -n "$inner" ] && cmd="$inner"
|
|
46
48
|
fi
|
|
47
|
-
#
|
|
49
|
+
# The verb is looked for in the command position, not as a substring in the line.
|
|
48
50
|
#
|
|
49
|
-
#
|
|
50
|
-
#
|
|
51
|
-
#
|
|
52
|
-
#
|
|
53
|
-
#
|
|
51
|
+
# A bare search for "git commit" misses in both directions. A call with an option between `git` and
|
|
52
|
+
# the verb slips past it — `git -c user.name=… commit`, `git -C <tree> commit` — and that is exactly
|
|
53
|
+
# how one commits under the machine account. And it catches a line where these two words stand next
|
|
54
|
+
# to each other for another reason: `git log --grep 'git commit'`, parsing someone else's output,
|
|
55
|
+
# the text of a message. A refusal on reading the history costs more than a miss: a guard that gets
|
|
56
|
+
# in the way of reading is switched off on the first day.
|
|
54
57
|
#
|
|
55
|
-
#
|
|
56
|
-
#
|
|
57
|
-
#
|
|
58
|
-
#
|
|
58
|
+
# The parsing is simple: for every word `git` in the line the options are skipped — on their own and
|
|
59
|
+
# together with a value, if the option takes one — and the first word without a dash is the verb.
|
|
60
|
+
# There can be several `git` words in a line (`git add . && git commit`), so the verbs of all of
|
|
61
|
+
# them are printed and the list is judged as a whole.
|
|
59
62
|
if command -v awk >/dev/null 2>&1; then
|
|
60
63
|
verbs="$(printf '%s\n' "$cmd" | awk '
|
|
61
64
|
{
|
|
@@ -76,16 +79,17 @@ if command -v awk >/dev/null 2>&1; then
|
|
|
76
79
|
' 2>/dev/null)"
|
|
77
80
|
printf '%s\n' "$verbs" | grep -qx 'commit' || exit 0
|
|
78
81
|
else
|
|
79
|
-
#
|
|
80
|
-
#
|
|
82
|
+
# No parser — the former sign remains: it lies in both directions, but without it the guard
|
|
83
|
+
# judges nothing at all.
|
|
81
84
|
case "$cmd" in
|
|
82
85
|
*git\ commit*) ;;
|
|
83
86
|
*) exit 0 ;;
|
|
84
87
|
esac
|
|
85
88
|
fi
|
|
86
89
|
|
|
87
|
-
#
|
|
88
|
-
#
|
|
90
|
+
# The commit will run in the working directory of the call, so the branch is looked at there too;
|
|
91
|
+
# the project root is the fallback, and it matters for a separate working tree with a branch of its
|
|
92
|
+
# own.
|
|
89
93
|
workdir="$(rt_hook_cwd)"
|
|
90
94
|
[ -z "$workdir" ] && workdir="${CLAUDE_PROJECT_DIR:-.}"
|
|
91
95
|
cd "$workdir" 2>/dev/null || exit 0
|
|
@@ -93,7 +97,7 @@ cd "$workdir" 2>/dev/null || exit 0
|
|
|
93
97
|
git rev-parse --is-inside-work-tree >/dev/null 2>&1 || exit 0
|
|
94
98
|
|
|
95
99
|
branch="$(git branch --show-current 2>/dev/null)"
|
|
96
|
-
[ -z "$branch" ] && exit 0 #
|
|
100
|
+
[ -z "$branch" ] && exit 0 # a detached HEAD is not about this case
|
|
97
101
|
|
|
98
102
|
default="$(git symbolic-ref --quiet --short refs/remotes/origin/HEAD 2>/dev/null | sed 's#^origin/##')"
|
|
99
103
|
if [ -z "$default" ]; then
|
|
@@ -108,10 +112,10 @@ fi
|
|
|
108
112
|
|
|
109
113
|
[ "$branch" = "$default" ] || exit 0
|
|
110
114
|
|
|
111
|
-
reason="
|
|
115
|
+
reason="Refused: a commit straight into «${default}». Work travels through a branch and a PR — the rule git-workflow. Create a branch by a separate call and commit into it: the staged changes stay in place. If a commit into ${default} really is needed — ask the owner, do not bypass it yourself."
|
|
112
116
|
|
|
113
|
-
#
|
|
114
|
-
#
|
|
117
|
+
# The shared deny tail: the two lawful moves and the lawful form of bypass, if the refusal has one.
|
|
118
|
+
# The file may not be laid out — then there is no tail, and the refusal reason stays as it is.
|
|
115
119
|
# shellcheck disable=SC1090
|
|
116
120
|
[ -f "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/deny-tail.sh" ] \
|
|
117
121
|
&& . "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/deny-tail.sh" 2>/dev/null
|
|
@@ -122,6 +126,6 @@ deny_tail_text="$(rt_deny_tail "")"
|
|
|
122
126
|
${deny_tail_text}"
|
|
123
127
|
|
|
124
128
|
jq -n --arg r "$reason" '{hookSpecificOutput:{hookEventName:"PreToolUse",permissionDecision:"deny",permissionDecisionReason:$r}}' 2>/dev/null \
|
|
125
|
-
|| printf '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"deny","permissionDecisionReason":"
|
|
129
|
+
|| printf '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"deny","permissionDecisionReason":"A commit into the main branch is refused. Create a branch."}}\n'
|
|
126
130
|
|
|
127
131
|
exit 0
|
|
@@ -1,31 +1,32 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# rt-hook: PreToolUse Bash|mcp__webstorm__execute_terminal_command|mcp__webstorm__execute_tool
|
|
3
|
-
#
|
|
4
|
-
#
|
|
3
|
+
# Requires: hooks/profile-check.sh, hooks/deny-tail.sh
|
|
4
|
+
# The guard of the checks before a push. PreToolUse on the push call.
|
|
5
5
|
#
|
|
6
|
-
#
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
6
|
+
# A push is the entry into the pipeline: a merge into the main branch starts the rollout, and
|
|
7
|
+
# everything not checked locally gets checked on production already. Edits go out this way twice in
|
|
8
|
+
# a row, green in a selective run and red in the pipeline: one time only the end-to-end specs were
|
|
9
|
+
# run, the other only the affected project.
|
|
10
10
|
#
|
|
11
|
-
#
|
|
12
|
-
#
|
|
13
|
-
#
|
|
11
|
+
# The guard does not take it on trust: it runs what the tree profile listed itself, and lets the
|
|
12
|
+
# push through only on a zero return code. If the runner caches the result, the set takes seconds
|
|
13
|
+
# on an unchanged tree, and after an edit it is run anew.
|
|
14
14
|
#
|
|
15
|
-
#
|
|
16
|
-
#
|
|
17
|
-
#
|
|
18
|
-
#
|
|
19
|
-
#
|
|
15
|
+
# What to run is known by the profile: the function `rt_push_checks <base>` — one command per line.
|
|
16
|
+
# The base is the branch the contribution is counted against; empty means there is no remote. The
|
|
17
|
+
# function is called from the directory the push goes from and may decide by it itself: a step
|
|
18
|
+
# whose checks the tree does not have it simply does not print. There is no profile or no function
|
|
19
|
+
# — the guard passes: the package cannot invent the list of checks.
|
|
20
20
|
#
|
|
21
|
-
#
|
|
22
|
-
#
|
|
23
|
-
#
|
|
24
|
-
#
|
|
21
|
+
# The base is taken from the remote, not from the local main branch: the local one falls behind or
|
|
22
|
+
# diverges silently. That has happened already — the local one stood at a merge wiped from the
|
|
23
|
+
# history by a force push, and the set counted against it would have been the wrong one. There is
|
|
24
|
+
# no network or no remote — the base is empty, and the profile falls back to a full run: the gate
|
|
25
|
+
# may turn out stricter than needed, but NEVER weaker.
|
|
25
26
|
#
|
|
26
|
-
#
|
|
27
|
+
# FAIL-OPEN: not a repository, broken input, no profile — pass.
|
|
27
28
|
|
|
28
|
-
#
|
|
29
|
+
# Its own name in the observations: the refusal is written by the shared deny tail, not by the guard.
|
|
29
30
|
RT_GUARD_NAME=git-guard-push-tests
|
|
30
31
|
|
|
31
32
|
. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/utf8.sh" 2>/dev/null || true
|
|
@@ -37,48 +38,51 @@ input="$RT_HOOK_INPUT"
|
|
|
37
38
|
|
|
38
39
|
tool="$(rt_hook_tool)"
|
|
39
40
|
case "$tool" in
|
|
40
|
-
#
|
|
41
|
+
# The environment terminal and the universal runner put the command into the same field.
|
|
41
42
|
Bash | mcp__webstorm__execute_terminal_command | mcp__webstorm__execute_tool) ;;
|
|
42
43
|
*) exit 0 ;;
|
|
43
44
|
esac
|
|
44
45
|
|
|
45
46
|
cmd="$(rt_hook_cmd)"
|
|
46
47
|
|
|
47
|
-
#
|
|
48
|
-
#
|
|
49
|
-
#
|
|
50
|
-
#
|
|
51
|
-
#
|
|
48
|
+
# A push call is recognised by two signs at once — the `git` command at the start of the line or
|
|
49
|
+
# after a separator, and the word `push` as a separate word. By the same technique as the delivery
|
|
50
|
+
# guard: the substring "git push" alone does not catch a push — the credentials helper and the
|
|
51
|
+
# request header are put between them by `-c` keys, and that is exactly the form pushed with here.
|
|
52
|
+
# While the sign was a substring, the whole gate set was not run at all on such a push, and the
|
|
53
|
+
# silence of the guard read as "green".
|
|
52
54
|
printf '%s' "$cmd" | grep -qE "${RT_CMD_BOUND}git([[:space:]]|\$)" || exit 0
|
|
53
55
|
|
|
54
|
-
#
|
|
55
|
-
#
|
|
56
|
-
#
|
|
57
|
-
#
|
|
58
|
-
#
|
|
56
|
+
# A stashed edit is never a push: `git stash push` puts the edit into the stash of this same
|
|
57
|
+
# machine and sends nothing outside. The word `push` in it stands separate, and without this line
|
|
58
|
+
# the guard ran the whole set on it and then refused the call on the first red check — that is, it
|
|
59
|
+
# refused a command that sends nothing anywhere. The stash is cut out of the line, and the sign is
|
|
60
|
+
# counted on the remainder: in a compound command a real push may stand next to it.
|
|
59
61
|
probe="$(printf '%s' "$cmd" | sed -E 's/git[[:space:]]+stash[[:space:]]+push/git stash/g')"
|
|
60
62
|
printf '%s' "$probe" | grep -qE '(^|[[:space:]])push([[:space:]]|$)' || exit 0
|
|
61
63
|
|
|
62
|
-
#
|
|
64
|
+
# A dry-run push sends nothing: there is no point running the whole set for it.
|
|
63
65
|
case "$cmd" in
|
|
64
66
|
*--dry-run*) exit 0 ;;
|
|
65
67
|
esac
|
|
66
68
|
|
|
67
|
-
#
|
|
69
|
+
# A branch switch in the same command is refused whole.
|
|
68
70
|
#
|
|
69
|
-
#
|
|
70
|
-
#
|
|
71
|
-
#
|
|
72
|
-
#
|
|
73
|
-
#
|
|
71
|
+
# The guard is a parse of the command BEFORE it runs: it runs the set in the tree that lies there
|
|
72
|
+
# now. A compound "switch and push" passes the gate on the FORMER branch — silently, checking the
|
|
73
|
+
# wrong thing. There is no refusal at that, and a green set reads as a check of what goes to the
|
|
74
|
+
# hosting. This was caught by chance: the gate refused a push on a red check of file length for a
|
|
75
|
+
# file that is not in the pushed branch at all — it was looking at the branch the same command was
|
|
76
|
+
# leaving.
|
|
74
77
|
#
|
|
75
|
-
#
|
|
76
|
-
#
|
|
78
|
+
# What is judged is a switch to an existing branch. Creating a new one (`checkout -b`, `switch -c`)
|
|
79
|
+
# does not fall here: a fresh branch has the same tree as it had.
|
|
77
80
|
if printf '%s' "$cmd" | grep -qE "${RT_CMD_BOUND}git[[:space:]]+(checkout|switch)[[:space:]]+" &&
|
|
78
|
-
! printf '%s' "$cmd" | grep -qE 'git[[:space:]]+(checkout[[:space:]]+-b|switch[[:space:]]+-c)([[:space:]]|$)'; then
|
|
79
|
-
reason="BLOCKED:
|
|
80
|
-
#
|
|
81
|
-
#
|
|
81
|
+
! printf '%s' "$cmd" | grep -qE 'git[[:space:]]+(checkout([[:space:]]+-[A-Za-z-]+)*[[:space:]]+-b|switch([[:space:]]+-[A-Za-z-]+)*[[:space:]]+-c)([[:space:]]|$)'; then
|
|
82
|
+
reason="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."
|
|
83
|
+
# The shared deny tail: the two lawful moves and the lawful form of bypass, if the refusal has
|
|
84
|
+
# one. The file may not be laid out — then there is no tail, and the reason for the refusal
|
|
85
|
+
# stays as it was.
|
|
82
86
|
# shellcheck disable=SC1090
|
|
83
87
|
[ -f "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/deny-tail.sh" ] \
|
|
84
88
|
&& . "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/deny-tail.sh" 2>/dev/null
|
|
@@ -89,7 +93,7 @@ if printf '%s' "$cmd" | grep -qE "${RT_CMD_BOUND}git[[:space:]]+(checkout|switch
|
|
|
89
93
|
${deny_tail_text}"
|
|
90
94
|
|
|
91
95
|
jq -n --arg r "$reason" '{hookSpecificOutput:{hookEventName:"PreToolUse",permissionDecision:"deny",permissionDecisionReason:$r}}' 2>/dev/null \
|
|
92
|
-
|| printf '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"deny","permissionDecisionReason":"
|
|
96
|
+
|| printf '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"deny","permissionDecisionReason":"Switching the branch and pushing by one command."}}\n'
|
|
93
97
|
exit 0
|
|
94
98
|
fi
|
|
95
99
|
|
|
@@ -99,27 +103,27 @@ cd "$workdir" 2>/dev/null || exit 0
|
|
|
99
103
|
git rev-parse --is-inside-work-tree >/dev/null 2>&1 || exit 0
|
|
100
104
|
[ -f package.json ] || exit 0
|
|
101
105
|
|
|
102
|
-
#
|
|
103
|
-
#
|
|
104
|
-
#
|
|
105
|
-
#
|
|
106
|
+
# The tree profile: first the package default, over it the project override, if there is one. A
|
|
107
|
+
# function declared in the override replaces the default whole and may call it back by the
|
|
108
|
+
# `_default` suffix. There is neither — the hook passes: an empty guard is better than a guard
|
|
109
|
+
# that refuses at random.
|
|
106
110
|
rt_hooks_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
107
111
|
for profile in "$rt_hooks_dir/../rt-kit/defaults/project.sh" "$rt_hooks_dir/../defaults/project.sh" "${CLAUDE_PROJECT_DIR:-.}/.claude/rt-kit/defaults/project.sh" "${CLAUDE_PROJECT_DIR:-.}/.claude/rt-kit/project.sh"; do
|
|
108
112
|
# shellcheck disable=SC1090
|
|
109
113
|
[ -f "$profile" ] && . "$profile" 2>/dev/null
|
|
110
114
|
done
|
|
111
115
|
|
|
112
|
-
#
|
|
113
|
-
#
|
|
116
|
+
# A word about a missing profile function: a hook that exited silently is indistinguishable from a
|
|
117
|
+
# working one. The file may not be laid out — then the former, silent behaviour stays.
|
|
114
118
|
# shellcheck disable=SC1090
|
|
115
119
|
[ -f "$rt_hooks_dir/profile-check.sh" ] && . "$rt_hooks_dir/profile-check.sh"
|
|
116
120
|
command -v rt_needs >/dev/null 2>&1 || rt_needs() { command -v "$1" >/dev/null 2>&1; }
|
|
117
121
|
|
|
118
|
-
#
|
|
119
|
-
#
|
|
120
|
-
#
|
|
121
|
-
#
|
|
122
|
-
#
|
|
122
|
+
# An observation line on every outcome. A guard that writes only refusals answers one question out
|
|
123
|
+
# of three: how many pushes it stopped. "The set was run and is green" and "no set was found" look
|
|
124
|
+
# the same in the record — as silence — and a gate that has not run a single check in a week is
|
|
125
|
+
# indistinguishable from a gate where everything is green. This is written into the same
|
|
126
|
+
# observations record as guard refusals, and goes out by the same tree switch.
|
|
123
127
|
rt_push_gate_note() {
|
|
124
128
|
local outcome="$1" sid
|
|
125
129
|
# shellcheck disable=SC1090
|
|
@@ -145,10 +149,11 @@ if git fetch --quiet origin "$main_branch" 2>/dev/null && git rev-parse --verify
|
|
|
145
149
|
base="origin/$main_branch"
|
|
146
150
|
fi
|
|
147
151
|
|
|
148
|
-
#
|
|
149
|
-
#
|
|
150
|
-
#
|
|
151
|
-
#
|
|
152
|
+
# The code by which a check declares that there was nothing to look at: neither "it matched" nor
|
|
153
|
+
# "a divergence". Before, such a check said so by a line of output and exited with zero — in the
|
|
154
|
+
# set that zero stood next to the passed ones and differed from them in nothing, while the summary
|
|
155
|
+
# read as checked whole. It does not refuse the push: a check with nothing to look at is not a
|
|
156
|
+
# breakage.
|
|
152
157
|
rt_skip_code="${RT_SKIP_CODE:-7}"
|
|
153
158
|
|
|
154
159
|
failed=""
|
|
@@ -173,37 +178,42 @@ done <<EOF
|
|
|
173
178
|
$(rt_push_checks "$base")
|
|
174
179
|
EOF
|
|
175
180
|
|
|
176
|
-
#
|
|
177
|
-
#
|
|
178
|
-
#
|
|
179
|
-
#
|
|
181
|
+
# What was skipped is named aloud even when the set passed: silence about it is exactly the
|
|
182
|
+
# indistinguishability this code was created for. The push goes through at that — there is no
|
|
183
|
+
# refusal here.
|
|
184
|
+
# The profile function is there, but it has nothing to print in this tree: the outcome is the same
|
|
185
|
+
# as without it — no set was found, and silence about that would read as a green run.
|
|
180
186
|
if [ "$ran" -eq 0 ]; then
|
|
181
187
|
rt_push_gate_note no-checks
|
|
182
188
|
exit 0
|
|
183
189
|
fi
|
|
184
190
|
|
|
185
191
|
if [ -z "$failed" ] && [ -n "$skipped" ]; then
|
|
186
|
-
printf '
|
|
192
|
+
printf 'the push gate: the set passed, but these checks had nothing to look at:\n%s\n' "$skipped" >&2
|
|
187
193
|
fi
|
|
188
194
|
|
|
189
|
-
#
|
|
195
|
+
# How the gate set is narrower than the pipeline set — said once per session.
|
|
190
196
|
#
|
|
191
|
-
#
|
|
192
|
-
#
|
|
193
|
-
#
|
|
194
|
-
#
|
|
197
|
+
# The delivery rule demands that the gate not be narrower than the pipeline, and there is nothing
|
|
198
|
+
# to assemble that requirement from: the pipeline file differs from tree to tree, and the package
|
|
199
|
+
# cannot derive the steps of the set from it. Silence at that reads as "everything is checked": the
|
|
200
|
+
# divergence is learnt from a red pipeline after the PR, when the edit has already been handed to a
|
|
201
|
+
# person.
|
|
195
202
|
#
|
|
196
|
-
#
|
|
197
|
-
#
|
|
203
|
+
# The mark lives in the temporary files directory, as with the word about a missing profile
|
|
204
|
+
# function: on every push the same line would repeat dozens of times per session and would stop
|
|
205
|
+
# being read.
|
|
198
206
|
gap_key="$(printf '%s' "$input" | jq -r '.session_id // empty' 2>/dev/null)"
|
|
199
207
|
[ -z "$gap_key" ] && gap_key="$(date +%Y%m%d 2>/dev/null || printf 'nosession')"
|
|
200
208
|
gap_mark="${TMPDIR:-/tmp}/rt-kit-push-gate-gap-$gap_key"
|
|
201
209
|
if [ ! -f "$gap_mark" ]; then
|
|
202
|
-
printf '
|
|
210
|
+
printf 'the push gate: the gate set is not the pipeline set. Image builds, showcase snapshots and
|
|
203
211
|
' >&2
|
|
204
|
-
printf '
|
|
212
|
+
printf 'the check of assembled packages are not part of it: what stands in it is shown by the
|
|
205
213
|
' >&2
|
|
206
|
-
printf '(agent-kit doctor,
|
|
214
|
+
printf 'state review (agent-kit doctor, the section on the set before a push) — run what is
|
|
215
|
+
' >&2
|
|
216
|
+
printf 'missing before the request.
|
|
207
217
|
' >&2
|
|
208
218
|
: >"$gap_mark" 2>/dev/null || true
|
|
209
219
|
fi
|
|
@@ -215,23 +225,25 @@ fi
|
|
|
215
225
|
|
|
216
226
|
rt_push_gate_note red
|
|
217
227
|
|
|
218
|
-
#
|
|
228
|
+
# The tail of the output, not all of it: the runner prints a long one, and what is needed is the
|
|
229
|
+
# reason for the refusal.
|
|
219
230
|
tail_out="$(printf '%s' "$output" | tail -n 40 | tr -d '\000')"
|
|
220
|
-
#
|
|
221
|
-
#
|
|
222
|
-
#
|
|
223
|
-
#
|
|
224
|
-
#
|
|
225
|
-
reason="BLOCKED:
|
|
231
|
+
# Red comes in two kinds, and the guard does not tell them apart: it checks only the return code.
|
|
232
|
+
# When a check of the code fails, "fix it and push again" is right. When the check itself is wrong,
|
|
233
|
+
# the same text orders fixing code nobody touched: a refusal once taken apart lay wholly in
|
|
234
|
+
# documents untouched by any commit of the branch. The verifiability law says a broken check does
|
|
235
|
+
# not stop the work, and until this line there was no such option in the refusal.
|
|
236
|
+
reason="BLOCKED: a push without a green local run. «${failed}» failed — fix it and push again, the guard must not be bypassed. A push is the entry into the pipeline, and red from here is checked already in production.
|
|
226
237
|
|
|
227
|
-
|
|
238
|
+
Three moves from here: fix what is named and repeat the call; fix the check itself, if it is the one that is wrong — take the refusals apart one by one, show the analysis to the owner and correct the check; or bring the owner the price of a bypass and wait for their word. What is in dispute is not added to the known list: it holds what was accepted, not the results of a broken check.
|
|
228
239
|
|
|
229
|
-
|
|
240
|
+
The tail of the output:
|
|
230
241
|
|
|
231
242
|
${tail_out}"
|
|
232
243
|
|
|
233
|
-
#
|
|
234
|
-
#
|
|
244
|
+
# The shared deny tail: the two lawful moves and the lawful form of bypass, if the refusal has one.
|
|
245
|
+
# The file may not be laid out — then there is no tail, and the reason for the refusal stays as it
|
|
246
|
+
# was.
|
|
235
247
|
# shellcheck disable=SC1090
|
|
236
248
|
[ -f "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/deny-tail.sh" ] \
|
|
237
249
|
&& . "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/deny-tail.sh" 2>/dev/null
|
|
@@ -242,6 +254,6 @@ deny_tail_text="$(rt_deny_tail "")"
|
|
|
242
254
|
${deny_tail_text}"
|
|
243
255
|
|
|
244
256
|
jq -n --arg r "$reason" '{hookSpecificOutput:{hookEventName:"PreToolUse",permissionDecision:"deny",permissionDecisionReason:$r}}' 2>/dev/null \
|
|
245
|
-
|| printf '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"deny","permissionDecisionReason":"
|
|
257
|
+
|| printf '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"deny","permissionDecisionReason":"The checks before the push did not pass."}}\n'
|
|
246
258
|
|
|
247
259
|
exit 0
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# rt-hook: SessionStart startup|resume|compact|clear
|
|
3
|
-
# SessionStart:
|
|
3
|
+
# SessionStart: the project glossary goes into the context in full, on every session start.
|
|
4
4
|
#
|
|
5
|
-
#
|
|
6
|
-
#
|
|
7
|
-
#
|
|
8
|
-
#
|
|
5
|
+
# Memory does not hold this: the glossary is read before a text is written, while the conversation
|
|
6
|
+
# with the owner goes on without reading — and a word from the left column of "Not written here"
|
|
7
|
+
# surfaces in a reply, though the files no longer have it. Here the glossary arrives before the
|
|
8
|
+
# first message and applies to texts and replies alike.
|
|
9
9
|
#
|
|
10
|
-
# FAIL-OPEN:
|
|
10
|
+
# FAIL-OPEN: no file or no `jq` — leave silently. The session matters more than the glossary.
|
|
11
11
|
|
|
12
12
|
. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/utf8.sh" 2>/dev/null || true
|
|
13
13
|
|
|
@@ -15,32 +15,33 @@ GLOSSARY="${CLAUDE_PROJECT_DIR:-.}/docs/GLOSSARY.md"
|
|
|
15
15
|
[ -f "$GLOSSARY" ] || exit 0
|
|
16
16
|
command -v jq >/dev/null 2>&1 || exit 0
|
|
17
17
|
|
|
18
|
-
#
|
|
19
|
-
#
|
|
20
|
-
#
|
|
21
|
-
#
|
|
22
|
-
#
|
|
23
|
-
#
|
|
18
|
+
# Where a word is introduced. The glossary may be laid out by the package — then an edit in its
|
|
19
|
+
# place is lost on the next layout, and until then the layout refuses the whole file. The preamble
|
|
20
|
+
# that every session reads must point to the override: it is the only text about the glossary that
|
|
21
|
+
# is guaranteed to reach the reader, and by pointing to the assembled file it would cancel
|
|
22
|
+
# everything said on the other layers. The correction stands one line lower, in the layout header,
|
|
23
|
+
# but reads as a service line of the build: it begins with a version and a digest, not with a word.
|
|
24
24
|
#
|
|
25
|
-
#
|
|
26
|
-
#
|
|
27
|
-
#
|
|
25
|
+
# The address is derived from the resource id in the header itself, not hard-coded: each tree has
|
|
26
|
+
# its own override directory, and a hard-coded path would lie in the first tree that keeps them
|
|
27
|
+
# differently. No header — the glossary belongs to the tree as a whole, and "introduced right here"
|
|
28
|
+
# is true as it is.
|
|
28
29
|
header="$(head -1 "$GLOSSARY" 2>/dev/null)"
|
|
29
30
|
resource="$(printf '%s' "$header" | sed -n 's/.*rt-kit v[^ ]* · \([^ ]*\) · .*/\1/p')"
|
|
30
31
|
|
|
31
32
|
if [ -n "$resource" ]; then
|
|
32
|
-
where="$(printf '
|
|
33
|
+
where="$(printf 'The glossary is laid out by the package and is not edited in place: a new word goes to the override\n.claude/rt-kit/overrides/%s — it merges by `## ` section and survives the layout.\n' "$resource")"
|
|
33
34
|
else
|
|
34
|
-
where='
|
|
35
|
+
where='The glossary belongs to the tree as a whole: a new word is added right here, by the same edit.
|
|
35
36
|
'
|
|
36
37
|
fi
|
|
37
38
|
|
|
38
39
|
{
|
|
39
|
-
printf '
|
|
40
|
-
printf '
|
|
41
|
-
printf '
|
|
42
|
-
printf '
|
|
43
|
-
printf '
|
|
40
|
+
printf 'PROJECT GLOSSARY — `docs/GLOSSARY.md`, in full below.\n\n'
|
|
41
|
+
printf 'A word from here is used in the meaning given here: in files and in replies to the owner alike.\n'
|
|
42
|
+
printf 'The "Not written here" section works the same way: its left column is neither written nor said anywhere.\n'
|
|
43
|
+
printf 'A word that is not here does not exist for the reader either: it is introduced by the same change\n'
|
|
44
|
+
printf 'that first uses it, or replaced with a word that already exists.\n'
|
|
44
45
|
printf '%s\n' "$where"
|
|
45
46
|
cat "$GLOSSARY"
|
|
46
47
|
} | jq -Rs '{hookSpecificOutput:{hookEventName:"SessionStart",additionalContext:.}}'
|