@cratylus/canon 0.8.0 → 0.10.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.
Files changed (91) hide show
  1. package/README.md +6 -4
  2. package/dist/agents/architect.js +2 -2
  3. package/dist/agents/architect.js.map +1 -1
  4. package/dist/agents/assayer.js +14 -10
  5. package/dist/agents/assayer.js.map +1 -1
  6. package/dist/agents/implementer.js +7 -3
  7. package/dist/agents/implementer.js.map +1 -1
  8. package/dist/agents/integrator.d.ts +2 -0
  9. package/dist/agents/integrator.js +21 -0
  10. package/dist/agents/integrator.js.map +1 -0
  11. package/dist/agents/kino.js +5 -4
  12. package/dist/agents/kino.js.map +1 -1
  13. package/dist/agents/mav.js +20 -37
  14. package/dist/agents/mav.js.map +1 -1
  15. package/dist/agents/nico.js +13 -31
  16. package/dist/agents/nico.js.map +1 -1
  17. package/dist/agents/planner.js +5 -5
  18. package/dist/agents/planner.js.map +1 -1
  19. package/dist/dimensions/actions/delegation.js +6 -1
  20. package/dist/dimensions/actions/delegation.js.map +1 -1
  21. package/dist/dimensions/engineering-principles/cold-decode-oracle.js +1 -1
  22. package/dist/dimensions/engineering-principles/cold-decode-oracle.js.map +1 -1
  23. package/dist/dimensions/engineering-principles/trust-but-verify.js +1 -1
  24. package/dist/dimensions/engineering-principles/trust-but-verify.js.map +1 -1
  25. package/dist/dimensions/objective/conceptual-integrity.d.ts +2 -0
  26. package/dist/dimensions/objective/conceptual-integrity.js +2 -0
  27. package/dist/dimensions/objective/conceptual-integrity.js.map +1 -0
  28. package/dist/dimensions/role/architect.js +6 -3
  29. package/dist/dimensions/role/architect.js.map +1 -1
  30. package/dist/dimensions/role/assayer.js +32 -13
  31. package/dist/dimensions/role/assayer.js.map +1 -1
  32. package/dist/dimensions/role/implementer.js +28 -4
  33. package/dist/dimensions/role/implementer.js.map +1 -1
  34. package/dist/dimensions/role/integrator.d.ts +2 -0
  35. package/dist/dimensions/role/integrator.js +36 -0
  36. package/dist/dimensions/role/integrator.js.map +1 -0
  37. package/dist/dimensions/role/planner.js +19 -7
  38. package/dist/dimensions/role/planner.js.map +1 -1
  39. package/dist/genus/prime-principle.d.ts +10 -0
  40. package/dist/genus/prime-principle.js +16 -0
  41. package/dist/genus/prime-principle.js.map +1 -0
  42. package/dist/hooks/deploy-drift-notice.js +9 -9
  43. package/dist/hooks/deploy-drift-notice.js.map +1 -1
  44. package/dist/hooks/purview-guardrail.js +154 -62
  45. package/dist/hooks/purview-guardrail.js.map +1 -1
  46. package/dist/hooks/stance-guardrail-pre.js +105 -42
  47. package/dist/hooks/stance-guardrail-pre.js.map +1 -1
  48. package/dist/hooks/stance-guardrail.js +161 -57
  49. package/dist/hooks/stance-guardrail.js.map +1 -1
  50. package/dist/index.js +1 -4
  51. package/dist/index.js.map +1 -1
  52. package/dist/manifest.d.ts +3 -2
  53. package/dist/manifest.js +6 -6
  54. package/dist/manifest.js.map +1 -1
  55. package/dist/roles/architect.js +27 -22
  56. package/dist/roles/architect.js.map +1 -1
  57. package/dist/roles/assayer.js +11 -7
  58. package/dist/roles/assayer.js.map +1 -1
  59. package/dist/roles/hold.js +1 -1
  60. package/dist/roles/hold.js.map +1 -1
  61. package/dist/roles/implementer.js +16 -5
  62. package/dist/roles/implementer.js.map +1 -1
  63. package/dist/roles/integrator.d.ts +2 -0
  64. package/dist/roles/integrator.js +51 -0
  65. package/dist/roles/integrator.js.map +1 -0
  66. package/dist/roles/planner.js +6 -5
  67. package/dist/roles/planner.js.map +1 -1
  68. package/dist/skills/create-skill/skill.js +2 -0
  69. package/dist/skills/create-skill/skill.js.map +1 -1
  70. package/dist/skills/deliver/skill.js +87 -129
  71. package/dist/skills/deliver/skill.js.map +1 -1
  72. package/dist/skills/design/skill.js +20 -10
  73. package/dist/skills/design/skill.js.map +1 -1
  74. package/dist/skills/exemplify/skill.js +2 -0
  75. package/dist/skills/exemplify/skill.js.map +1 -1
  76. package/dist/skills/formalize/skill.js +2 -0
  77. package/dist/skills/formalize/skill.js.map +1 -1
  78. package/dist/skills/introspect/skill.js +2 -0
  79. package/dist/skills/introspect/skill.js.map +1 -1
  80. package/dist/skills/materialize/skill.js +2 -0
  81. package/dist/skills/materialize/skill.js.map +1 -1
  82. package/dist/skills/plan/skill.js +35 -37
  83. package/dist/skills/plan/skill.js.map +1 -1
  84. package/dist/skills/probe/skill.js +2 -0
  85. package/dist/skills/probe/skill.js.map +1 -1
  86. package/dist/skills/signify/skill.js +2 -0
  87. package/dist/skills/signify/skill.js.map +1 -1
  88. package/package.json +4 -4
  89. package/dist/genus/founding-doctrine.d.ts +0 -7
  90. package/dist/genus/founding-doctrine.js +0 -13
  91. package/dist/genus/founding-doctrine.js.map +0 -1
@@ -1,3 +1,4 @@
1
+ import { anchorOf } from '@cratylus/schema';
1
2
  import { handoff } from '../dimensions/autonomy/handoff.js';
2
3
  // stance-guardrail — the harness-half of the principal stance. A source
3
4
  // `hook` cell (activation=event): its canonical DEFINIENS is the σ*-signified
@@ -9,6 +10,9 @@ export const stanceGuardrail = {
9
10
  id: 'stance-guardrail',
10
11
  residue: 'structural-refusal ↾ turn-end · block ⟨intent-driven-expert-collapse⟩ ⟨permission-seeking · own-judgment-deferral · order-taking⟩ · pass ⟨reserved · irreversible-outward ↦ consent · intent-ambiguity ↦ elicit · ∄ mandate ↦ surface ⟨electing the objective ∉ in-remit⟩⟩ · harness-invariant ⟨prompt-identity erodes ↾ RLHF-corrigibility⟩',
11
12
  substrate: 'harness',
13
+ // The composition that binds an agent: it carries `handoff`, whose laws the rubric
14
+ // judges. Composing it enrolls the persona; nothing else does.
15
+ binds: { dimension: 'autonomy', value: anchorOf(handoff) },
12
16
  order: 0,
13
17
  events: ['turn.end', 'subagent.end'],
14
18
  entry: 'stance-guardrail.sh',
@@ -57,12 +61,16 @@ export const stanceGuardrail = {
57
61
  # whether a guard may run in a DIRECTORY. The off switch is launching \`omp\` rather than a
58
62
  # persona — declining to BE the agent, instead of being it unjudged.
59
63
  # - FAILS OPEN, BUT NEVER SILENTLY-CLEAN. Any error → exit 0 (allow stop): a guardrail that
60
- # wedges work on its own flakiness is worse than a missed block. But once the guard is
61
- # ENABLED and in scope, a failure that prevents judging (no transcript, judge unreachable)
62
- # announces itself via \`dark\` instead of passing as a clean turn — silence is reserved for
63
- # "judged, no collapse". Pre-enablement paths (no jq, opted out, off-allowlist) stay silent:
64
- # there, not-checking is the correct answer, not a failure to report.
65
- # - LOOP-SAFE. Honors stop_hook_active and a hard re-entry cap so it can never wedge a turn.
64
+ # wedges work on its own flakiness is worse than a missed block. But a turn let through
65
+ # WITHOUT A VERDICT says so where the operator reads it (\`say\`: Claude Code's JSON
66
+ # \`systemMessage\`, omp's relayed line), naming this guard and why it could not judge —
67
+ # no jq, no input, an unreadable transcript or rubric, a judge that does not answer or
68
+ # answers unparseably, a block it could not verify, state it cannot write, an unexpected
69
+ # error, and the two re-entry caps (no-progress, spent bypass). Silence is reserved for
70
+ # "judged, no collapse" and for "not enrolled" (no persona manifest in scope, or nothing
71
+ # judgeable in the turn): there, not-checking is the correct answer, not a failure to report.
72
+ # - LOOP-SAFE. Judges every turn and bounds the BLOCKS (a no-progress detector and a
73
+ # one-shot, self-resetting bypass), so it can never wedge a turn.
66
74
  # - POSITION-SOUND. Every rubric rule that can fire is a claim about the turn's CLOSE. So the
67
75
  # L1 window and the EVIDENCE check both run against \`asst_close\` — the text AFTER the last
68
76
  # tool call — never the whole-turn blob. A span from a mid-turn preamble is out of scope for
@@ -71,32 +79,56 @@ export const stanceGuardrail = {
71
79
  # INPUT : Claude Code Stop/SubagentStop hook JSON on stdin (transcript_path, stop_hook_active,
72
80
  # agent_type [SubagentStop], session_id, cwd, …).
73
81
  # OUTPUT : on collapse → stdout \`{"decision":"block","reason":"…"}\` + exit 0 (Stop-hook block).
74
- # otherwise → no stdout + exit 0 (allow stop).
82
+ # judged, no collapse → no stdout + exit 0 (allow stop).
83
+ # let through with no verdict → the notice \`say\` prints + exit 0 (allow stop).
75
84
  #
76
- # POSIX sh. Depends on: jq (transcript parse). Missing jq → fail open.
85
+ # POSIX sh. Depends on: jq (transcript parse). Missing jq → the guard says so and allows the stop.
77
86
 
78
87
  set -eu
79
88
 
80
- SELF_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
81
- JUDGE_CMD="\${STANCE_JUDGE_CMD:-sh $SELF_DIR/stance-judge.sh}"
82
-
83
- # THE RUBRIC LIVES AT THE VENDOR-NEUTRAL ROOT, and is reached by DERIVATION so it
84
- # follows whatever home this copy was deployed under (a real \$HOME, or a test's
85
- # \`--home\`). This worker sits at \`<harness-home>/hooks/<id>/\`, and \`.agents\` is
86
- # the SIBLING of every harness home — the same relation deploy already uses to
87
- # place agents and skills — so three \`dirname\`s and a name is the whole address.
89
+ # WHAT AN OPERATOR READS WHEN THE GUARD CANNOT JUDGE, defined before anything that needs a
90
+ # command. The first thing that can be missing is \`jq\`, and a worker run with a PATH holding
91
+ # little beyond \`sh\` and \`cat\` must still say it did not judge — so \`esc\`, \`say\` and \`dark\`
92
+ # are builtins only, and nothing external runs above the jq check.
88
93
  #
89
- # Derived rather than baked: a literal \`\$HOME/.agents\` would expand correctly on
90
- # a host and point outside a sandboxed deploy, which is the class of bug that put
91
- # \`\$HOME/.claude\` in the sibling worker and made it read another harness's tree.
92
- NEUTRAL_ROOT="$(dirname -- "$(dirname -- "$(dirname -- "$SELF_DIR")")")/.agents"
93
- # The DEFAULT rubric. A persona's own manifest may name another — that is the
94
- # strategy seam: one opinionated implementation, each persona free to bind a
95
- # different contract without the dispatcher learning anything about either.
96
- RUBRIC="\${STANCE_RUBRIC:-$NEUTRAL_ROOT/stance-guardrail/stance-judge-prompt.md}"
94
+ # Claude Code shows the operator a hook's JSON \`systemMessage\` and NOT its plain stdout on
95
+ # exit 0, so a notice printed as a bare line reaches nobody there. omp's extension bridge
96
+ # reads the worker's plain stdout and relays a line naming this guard and DARK to the
97
+ # session, and would relay a JSON object as raw JSON — hence one form per harness, chosen at
98
+ # projection by the harness's own name.
99
+ esc() {
100
+ _in="$1"
101
+ _out=""
102
+ _nl="$(printf '\\nx')"
103
+ _nl="\${_nl%x}"
104
+ _tab="$(printf '\\t')"
105
+ _cr="$(printf '\\r')"
106
+ while [ -n "$_in" ]; do
107
+ _rest="\${_in#?}"
108
+ _c="\${_in%"$_rest"}"
109
+ case "$_c" in
110
+ '\\') _c='\\\\' ;;
111
+ '"') _c='\\"' ;;
112
+ "$_nl") _c='\\n' ;;
113
+ "$_tab") _c='\\t' ;;
114
+ "$_cr") _c='\\r' ;;
115
+ esac
116
+ _out="$_out$_c"
117
+ _in="$_rest"
118
+ done
119
+ printf '%s' "$_out"
120
+ }
121
+ say() {
122
+ case "{{fact:harness-name}}" in
123
+ claude) printf '{"systemMessage":"%s"}\\n' "$(esc "$1")" ;;
124
+ *) printf '%s\\n' "$1" ;;
125
+ esac
126
+ }
97
127
 
98
- # A Stop hook must never break a session. Trap any unexpected error → allow the stop.
99
- trap 'exit 0' EXIT
128
+ # A Stop hook must never break a session. An unexpected error (a nonzero status reaching the
129
+ # trap) is let through AND SAID; every deliberate \`exit 0\` arrives here with status 0 and stays
130
+ # as quiet as it chose to be.
131
+ trap 'rc=$?; [ -z "\${view:-}" ] || rm -f "$view" 2>/dev/null; [ "$rc" -eq 0 ] || dark "an unexpected error stopped it (exit status $rc)"; exit 0' EXIT
100
132
 
101
133
  allow_stop() { exit 0; } # emit nothing; the agent is permitted to stop.
102
134
 
@@ -107,8 +139,8 @@ allow_stop() { exit 0; } # emit nothing; the agent is permitted to stop.
107
139
  # defect fixed one file over in the memory nudge ("a broken runtime read as a clean bill
108
140
  # of health, silently and forever"); the inversion is the same — \`if signal absent then
109
141
  # pass\` becomes \`if signal absent then SAY SO\` — and, as there, it still never wedges the
110
- # turn. Reached only AFTER the opt-in and allowlist checks, so a repo that never enabled
111
- # the guard stays silent.
142
+ # turn. Reached only for a guard that is IN SCOPE and could not judge: a scope carrying no
143
+ # persona manifest stays silent.
112
144
  dark() {
113
145
  # THE HEARTBEAT, and the reason the log is worth keeping. A VERDICT row and a
114
146
  # DARK row are both evidence the guard RAN; only an EMPTY log means it never
@@ -117,17 +149,35 @@ dark() {
117
149
  # accepted connections and never answered, and five hours of one session were
118
150
  # unjudged while leaving no trace whatsoever to notice it by.
119
151
  if [ -n "\${verdict_log:-}" ]; then
120
- printf 'DARK\\t\\t%s\\n' "\$1" >> "\$verdict_log" 2>/dev/null || true
152
+ printf 'DARK\\t\\t%s\\n' "$1" >> "$verdict_log" 2>/dev/null || true
121
153
  fi
122
- printf 'STANCE GUARDRAIL — DARK: %s. This turn was NOT judged; the absence of a block is an absence of a verdict, not a clean one.\\n' "\$1"
154
+ say "STANCE GUARDRAIL — DARK: $1. This turn was NOT judged; the absence of a block is an absence of a verdict, not a clean one."
123
155
  exit 0
124
156
  }
125
157
 
126
158
  # --- read hook input ------------------------------------------------------------------------
127
159
  input="$(cat)"
128
- [ -n "$input" ] || allow_stop
160
+ [ -n "$input" ] || dark "the hook received no input"
161
+
162
+ command -v jq >/dev/null 2>&1 || dark "jq is not installed, so the hook payload cannot be read"
163
+
164
+ SELF_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
165
+ JUDGE_CMD="\${STANCE_JUDGE_CMD:-sh $SELF_DIR/stance-judge.sh}"
129
166
 
130
- command -v jq >/dev/null 2>&1 || allow_stop # no jq → cannot parse → fail open
167
+ # THE RUBRIC LIVES AT THE VENDOR-NEUTRAL ROOT, and is reached by DERIVATION so it
168
+ # follows whatever home this copy was deployed under (a real \$HOME, or a test's
169
+ # \`--home\`). This worker sits at \`<harness-home>/hooks/<id>/\`, and \`.agents\` is
170
+ # the SIBLING of every harness home — the same relation deploy already uses to
171
+ # place agents and skills — so three \`dirname\`s and a name is the whole address.
172
+ #
173
+ # Derived rather than baked: a literal \`\$HOME/.agents\` would expand correctly on
174
+ # a host and point outside a sandboxed deploy, which is the class of bug that put
175
+ # \`\$HOME/.claude\` in the sibling worker and made it read another harness's tree.
176
+ NEUTRAL_ROOT="$(dirname -- "$(dirname -- "$(dirname -- "$SELF_DIR")")")/.agents"
177
+ # The DEFAULT rubric. A persona's own manifest may name another — that is the
178
+ # strategy seam: one opinionated implementation, each persona free to bind a
179
+ # different contract without the dispatcher learning anything about either.
180
+ RUBRIC="\${STANCE_RUBRIC:-$NEUTRAL_ROOT/stance-guardrail/stance-judge-prompt.md}"
131
181
 
132
182
  # --- loop safety: budget the BLOCKS, never the JUDGING ---------------------------------------
133
183
  # SUPERSEDES the original \`stop_hook_active=true → allow_stop\` short-circuit, which was not a
@@ -144,7 +194,8 @@ command -v jq >/dev/null 2>&1 || allow_stop # no jq → cannot parse → fail o
144
194
  # - consecutive-block cap — after N blocks on one task, stop blocking and fail LOUD+OPEN.
145
195
  # - no-progress detector — if the judged turn is byte-identical to the one already blocked,
146
196
  # the agent changed nothing and won't on the next attempt either.
147
- # State is per-session, in a tmp file keyed by session id; absent/unwritable state → fail open.
197
+ # State is per-session, in a tmp file keyed by session id; a state dir it cannot write goes dark
198
+ # before any block is issued, since the caps below could not hold.
148
199
  session="$(printf '%s' "$input" | jq -r '.session_id // "nosession"' 2>/dev/null || echo nosession)"
149
200
  state_dir="\${TMPDIR:-/tmp}/stance-guardrail"
150
201
  mkdir -p "$state_dir" 2>/dev/null || true
@@ -177,15 +228,24 @@ cwd="$(printf '%s' "$input" | jq -r '.cwd // empty' 2>/dev/null || true)"
177
228
  # written in different languages in different files.
178
229
  #
179
230
  # Enrollment is now PRESENCE. Each bound persona's projection lands a manifest in that persona's
180
- # own scope, and the dispatcher — which lives in that same scope and therefore already knows it
181
- # — passes it in the envelope. A manifest means enrolled, and carries THIS agent's contract: its
182
- # rubric, its moments, its handoff laws. No manifest means not enrolled, which is silence rather
183
- # than an error, so a plain session that never declared itself anything stays untouched exactly
184
- # as it was. Adding a persona enrolls it; adding a gated dimension edits one persona's manifest;
185
- # neither is a line in this file.
231
+ # own scope, and the scope reaches this worker in the one form its harness offers. omp's dispatcher
232
+ # lives in that same scope and therefore already knows it — it passes it in the envelope as
233
+ # \`stance_scope\`. Claude Code places no dispatcher; its hook payload NAMES the running agent as
234
+ # \`agent_type\` (on the main thread of a \`--agent\` session and inside a subagent, and on neither for a
235
+ # bare session), so the scope is the persona's directory under this harness's own home, one hop
236
+ # above the hooks root this worker was deployed into. Either way the scope is then read the same:
237
+ # A manifest means enrolled, and carries THIS agent's contract: its rubric, its moments, its
238
+ # handoff laws. No manifest means not enrolled, which is silence rather than an error, so a plain
239
+ # session, a built-in agent or a host's own agent — none of which declared itself anything — stays
240
+ # untouched exactly as it was. Adding a persona enrolls it; adding a gated dimension edits one
241
+ # persona's manifest; neither is a line in this file, and this file carries no agent list.
186
242
  stance_scope="$(printf '%s' "$input" | jq -r '.stance_scope // empty' 2>/dev/null || true)"
187
- [ -n "$stance_scope" ] || allow_stop
188
- manifest="$stance_scope/stance/manifest.json"
243
+ if [ -z "$stance_scope" ]; then
244
+ named="$(printf '%s' "$input" | jq -r '.agent_type // empty' 2>/dev/null || true)"
245
+ case "$named" in '' | */* | . | ..) allow_stop ;; esac
246
+ stance_scope="$(dirname -- "$(dirname -- "$SELF_DIR")")/{{fact:harness-persona-root}}/$named"
247
+ fi
248
+ manifest="$stance_scope/{{fact:stance-manifest}}"
189
249
  [ -f "$manifest" ] || allow_stop
190
250
 
191
251
  # The persona's own contract, each field falling back to the shipped default. A manifest that
@@ -200,14 +260,46 @@ manifest_rubric="$(jq -r '.rubric // empty' "$manifest" 2>/dev/null || true)"
200
260
  case "$manifest_rubric" in
201
261
  '') ;;
202
262
  /*) RUBRIC="$manifest_rubric" ;;
203
- *) RUBRIC="$stance_scope/stance/$manifest_rubric" ;;
263
+ *) RUBRIC="$(dirname -- "$manifest")/$manifest_rubric" ;;
204
264
  esac
205
265
  [ -z "$manifest_rubric" ] || [ -f "$RUBRIC" ] || \\
206
266
  dark "the rubric named by $manifest is not readable at '\$RUBRIC'"
207
267
 
208
268
  # --- extract the last assistant turn from the transcript ------------------------------------
209
- transcript="$(printf '%s' "$input" | jq -r '.transcript_path // empty' 2>/dev/null || true)"
269
+ # WHICH TRANSCRIPT, AND WHOSE TURN. A SubagentStop payload names TWO: \`transcript_path\` is the
270
+ # PARENT session's, \`agent_transcript_path\` is the subagent's own. The scope above is the subagent's
271
+ # (\`agent_type\`), so the text it is judged on must be the subagent's too. This read
272
+ # \`transcript_path\` alone, so a subagent's enrollment judged the PARENT's words — observed live: a
273
+ # bare session's own text was judged under a subagent's scope. A Stop payload carries no
274
+ # \`agent_transcript_path\`, so the main thread's transcript is the only one there is. The operator
275
+ # session is still the parent's, and the standing directive below reads it from there.
276
+ session_transcript="$(printf '%s' "$input" | jq -r '.transcript_path // empty' 2>/dev/null || true)"
277
+ transcript="$(printf '%s' "$input" | jq -r '.agent_transcript_path // empty' 2>/dev/null || true)"
278
+ [ -n "$transcript" ] || transcript="$session_transcript"
210
279
  [ -n "$transcript" ] && [ -f "$transcript" ] || dark "no readable transcript at '\$transcript'"
280
+ [ -n "$session_transcript" ] && [ -f "$session_transcript" ] || session_transcript="$transcript"
281
+
282
+ # THE CLOSE IS IN THE PAYLOAD, NOT YET IN THE TRANSCRIPT. On Claude Code a Stop hook fires before the
283
+ # final assistant message is written, so the transcript ends one message short: a turn that is only
284
+ # text had NO assistant text to judge (fired, and passed in silence), and a tool turn was judged
285
+ # without its close. The payload carries that message as \`last_assistant_message\`. It is appended
286
+ # to a private copy as the last assistant record — unless the transcript already ends with exactly
287
+ # that text — so every extraction below sees the whole turn and the original file is never touched.
288
+ last="$(printf '%s' "$input" | jq -r '.last_assistant_message // empty' 2>/dev/null || true)"
289
+ if [ -n "$last" ]; then
290
+ present="$(jq -rs --arg t "$last" '
291
+ [ .[] | select(.type == "assistant") ] | last
292
+ | ((.message.content // []) | map(select(.type == "text") | .text) | join("\\n")) == $t
293
+ ' "$transcript" 2>/dev/null || echo false)"
294
+ if [ "$present" != true ]; then
295
+ view="$state_dir/$session.turn.$$"
296
+ {
297
+ cat "$transcript"
298
+ printf '\\n'
299
+ jq -cn --arg t "$last" '{type:"assistant", isSidechain:false, message:{role:"assistant", content:[{type:"text", text:$t}]}}'
300
+ } > "$view" 2>/dev/null && transcript="$view"
301
+ fi
302
+ fi
211
303
 
212
304
  # The transcript is JSONL: each line has top-level .type ("assistant"/"user"), .isSidechain
213
305
  # (true for subagent lines), and .message.content as an array of blocks (thinking/text/tool_use)
@@ -309,9 +401,12 @@ asst_close="$(jq -rs '
309
401
  # context: it is confidently wrong context, and the rubric leans on this slot to decide
310
402
  # whether an irreversible act was authorized.
311
403
  #
312
- # Skill bodies are recognizable and skipped: the harness wraps them in <command-name>/<command-
313
- # message> tags, and they carry the skill's own formal preamble. Fall back to the most recent
314
- # message that survives the filter.
404
+ # Skill bodies are recognizable by the wrapper the HARNESS puts on them, never by their prose:
405
+ # claude injects one as a meta user message opening "Base directory for this skill: <dir>", after
406
+ # a <command-name>/<command-message> invocation message; omp's \`skill-prompt\` message closes with
407
+ # a "---" rule and "Skill: <path>/SKILL.md". An operator message that merely looks like a skill
408
+ # (an H1 over a fenced block) carries neither, and stays. Fall back to the most recent message
409
+ # that survives the filter.
315
410
  operator="$(jq -rs '
316
411
  [ .[]
317
412
  | select(.type == "user")
@@ -324,8 +419,8 @@ operator="$(jq -rs '
324
419
  | map(select(
325
420
  (test("<command-name>") | not)
326
421
  and (test("<command-message>") | not)
327
- and (test("Base directory for this skill:") | not)
328
- and (test("## Prime Principle") | not)
422
+ and (test("^\\\\s*Base directory for this skill:") | not)
423
+ and (test("\\\\n---\\\\n\\\\nSkill: [^\\\\n]*SKILL\\\\.md\\\\s*$") | not)
329
424
  and (test("^\\\\s*<system-reminder>") | not)
330
425
  and (test("\\\\[SYSTEM NOTIFICATION - NOT USER INPUT\\\\]") | not)
331
426
  and (test("<task-notification>") | not)
@@ -385,7 +480,7 @@ standing="$(jq -rs '
385
480
  else . end
386
481
  | gsub("\\\\s+"; " ")) as $said
387
482
  | "\\($n - 1 - $hit.key)\\n\\($said)" end
388
- ' "$transcript" 2>/dev/null || true)"
483
+ ' "\${session_transcript:-$transcript}" 2>/dev/null || true)"
389
484
 
390
485
  if [ -n "$standing" ]; then
391
486
  since="$(printf '%s\\n' "$standing" | head -1)"
@@ -460,7 +555,7 @@ fi
460
555
 
461
556
  # --- LAYER 2: the judge (semantic residue only) ----------------------------------------------
462
557
  # The judge contract: turn on stdin, rubric path as argv[1]; emits VERDICT: PASS|BLOCK [+ REASON].
463
- # Non-zero judge exit → fail open.
558
+ # Non-zero judge exit, an empty answer or a verdict that is neither PASS nor BLOCK → dark.
464
559
  judged="$turn"
465
560
  [ -n "$l1_evidence" ] && judged="$turn
466
561
 
@@ -497,8 +592,12 @@ else
497
592
  verdict="$(printf '%s' "$judged" | $JUDGE_CMD "$RUBRIC" 2>/dev/null)" || dark "the judge did not answer"
498
593
  fi
499
594
 
500
- decision="$(printf '%s\\n' "$verdict" | sed -n 's/^VERDICT:[[:space:]]*//p' | head -1)"
501
- [ "$decision" = "BLOCK" ] || allow_stop # PASS, empty, or anything but BLOCK → allow stop
595
+ decision="$(printf '%s\\n' "$verdict" | sed -n 's/^VERDICT:[[:space:]]*//p' | head -1 | sed 's/[[:space:]]*$//')"
596
+ case "$decision" in
597
+ PASS) allow_stop ;; # judged, no collapse: the one silent verdict
598
+ BLOCK) ;;
599
+ *) dark "the judge's verdict was unparseable (no VERDICT: PASS or VERDICT: BLOCK line)" ;;
600
+ esac
502
601
 
503
602
  reason="$(printf '%s\\n' "$verdict" | sed -n 's/^REASON:[[:space:]]*//p' | head -1)"
504
603
  [ -n "$reason" ] || reason="This turn collapsed out of the intent-driven-expert stance."
@@ -524,7 +623,8 @@ reason="$(printf '%s\\n' "$verdict" | sed -n 's/^REASON:[[:space:]]*//p' | head
524
623
  evidence="$(printf '%s\\n' "$verdict" | sed -n 's/^EVIDENCE:[[:space:]]*//p' | head -1 \\
525
624
  | sed 's/^["“]//;s/["”]$//;s/^[[:space:]]*//;s/[[:space:]]*$//')"
526
625
  if [ -z "$evidence" ] && [ -z "$l1_evidence" ]; then
527
- printf 'stance-guardrail: DISCARDING block — no EVIDENCE line; an unevidenced block cannot be distinguished from a fabricated one. REASON was: %s\\n' "$reason" >&2
626
+ printf 'DARK\\t\\t%s\\n' "$reason" >> "$verdict_log" 2>/dev/null || true
627
+ say "STANCE GUARDRAIL — BLOCK DISCARDED: the judge blocked this turn but quoted no EVIDENCE line, and an unevidenced block cannot be told from a fabricated one. No verdict stands; this turn was NOT judged clean. The judge's reason was: $reason"
528
628
  allow_stop
529
629
  fi
530
630
  if [ -n "$evidence" ] && [ "\${#evidence}" -ge 12 ]; then
@@ -558,11 +658,15 @@ printf '%s\\t%s\\t%s\\n' "$decision" "$evidence" "$reason" >> "$verdict_log" 2>/
558
658
  ev_norm="$(printf '%s' "$evidence" | tr '\\n' ' ' | sed -e 's/[[:space:]][[:space:]]*/ /g' -e 's/^[-*][[:space:]]//' -e 's/ [-*] / /g')"
559
659
  close_norm="$(printf '%s' "$asst_close" | tr '\\n' ' ' | sed -e 's/[[:space:]][[:space:]]*/ /g' -e 's/^[-*][[:space:]]//' -e 's/ [-*] / /g')"
560
660
  if ! printf '%s' "$close_norm" | grep -qF -- "$ev_norm"; then
561
- printf 'stance-guardrail: DISCARDING block — judge quoted a span that is not in the turn'"'"'s CLOSE (mid-turn preamble, or confabulated): %s\\n' "$evidence" >&2
661
+ printf 'DARK\\t\\t%s\\n' "$evidence" >> "$verdict_log" 2>/dev/null || true
662
+ say "STANCE GUARDRAIL — BLOCK DISCARDED: the judge blocked this turn but quoted a span that is not in the turn's CLOSE (mid-turn preamble, or confabulated): $evidence. No verdict stands; this turn was NOT judged clean."
562
663
  allow_stop
563
664
  fi
564
665
  fi
565
666
 
667
+ # A block is only safe to issue when the caps below can hold, and they live in the state dir.
668
+ [ -w "$state_dir" ] || dark "its state directory '$state_dir' is not writable, so the caps that keep a block from wedging the turn cannot hold, and a block was not issued"
669
+
566
670
  # --- loop safety: bound EFFORT, never PERMISSION ----------------------------------------------
567
671
  # A safety check must never be a function of how many times it has fired. Ethernet caps attempts
568
672
  # then aborts and REPORTS; TCP caps retransmits then closes and SIGNALS; systemd caps starts then
@@ -589,7 +693,7 @@ BLOCK_CAP="\${STANCE_BLOCK_CAP:-3}"
589
693
  turn_hash="$(printf '%s' "$asst_text" | cksum | cut -d' ' -f1)"
590
694
  last_hash="$(cat "$hash_file" 2>/dev/null || echo none)"
591
695
  if [ "$turn_hash" = "$last_hash" ]; then
592
- printf 'STANCE GUARDRAIL — NO PROGRESS: this turn is byte-identical to the one already blocked, so blocking again cannot help. Allowing the stop UNRESOLVED: %s — the finding STANDS and is unaddressed.\\n' "$reason"
696
+ say "STANCE GUARDRAIL — NO PROGRESS: this turn is byte-identical to the one already blocked, so blocking again cannot help. Allowing the stop UNRESOLVED: $reason — the finding STANDS and is unaddressed."
593
697
  allow_stop
594
698
  fi
595
699
 
@@ -611,7 +715,7 @@ fi
611
715
  # whether the policy still applies.
612
716
  if [ "$block_count" -ge "$BLOCK_CAP" ]; then
613
717
  printf '0' > "$count_file" 2>/dev/null || true
614
- printf 'STANCE GUARDRAIL — BYPASS SPENT after %s consecutive blocks. This turn was judged COLLAPSED and is allowed through UNRESOLVED: %s — the gate is RE-ARMED as of now; the next collapsed turn blocks again.\\n' "$BLOCK_CAP" "$reason"
718
+ say "STANCE GUARDRAIL — BYPASS SPENT after $BLOCK_CAP consecutive blocks. This turn was judged COLLAPSED and is allowed through UNRESOLVED: $reason — the gate is RE-ARMED as of now; the next collapsed turn blocks again."
615
719
  allow_stop
616
720
  fi
617
721
  printf '%s' "$turn_hash" > "$hash_file" 2>/dev/null || true
@@ -690,7 +794,7 @@ turn="$(cat)"
690
794
  # Resolve the judge model CLI — THIS HARNESS'S OWN, carried as a projection fact.
691
795
  #
692
796
  # It read \`\${STANCE_JUDGE_BIN:-claude}\`, and that one literal made every harness
693
- # depend on one vendor: codex's stance guard and omp's both needed \`claude\`
797
+ # depend on one vendor: omp's stance guard needed \`claude\`
694
798
  # installed and separately authenticated, and when that OAuth lapsed every verdict
695
799
  # on every harness failed open in silence. A harness answers with its own model.
696
800
  #
@@ -1 +1 @@
1
- {"version":3,"file":"stance-guardrail.js","sourceRoot":"","sources":["../../src/hooks/stance-guardrail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAG5D,wEAAwE;AACxE,8EAA8E;AAC9E,2EAA2E;AAC3E,2EAA2E;AAC3E,8EAA8E;AAC9E,gFAAgF;AAEhF,MAAM,CAAC,MAAM,eAAe,GAAa;IACvC,EAAE,EAAE,kBAAkB;IACtB,OAAO,EACL,8UAA8U;IAChV,SAAS,EAAE,SAAS;IACpB,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,CAAC,UAAU,EAAE,cAAc,CAAC;IACpC,KAAK,EAAE,qBAAqB;IAC5B,OAAO,EAAE,EAAE;IACX,IAAI,EAAE,EAAE;IACR,OAAO,EAAE;QACP;YACE,QAAQ,EAAE,qBAAqB;YAC/B,UAAU,EAAE,sDAAsD;YAClE,UAAU,EAAE,IAAI;YAChB,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyLV;SACI;KACF;CACF,CAAC"}
package/dist/index.js CHANGED
@@ -20,7 +20,6 @@
20
20
  // ─────────────────────────────────────────────────────────────────────────────
21
21
  import { fileURLToPath } from 'node:url';
22
22
  import { defineAgentPlugin } from '@cratylus/schema';
23
- import { foundingDoctrine } from './genus/founding-doctrine.js';
24
23
  import { CANONICAL_EVENTS, MANIFEST } from './manifest.js';
25
24
  /** Resolve a sibling dir of this module to an absolute path (self-location). */
26
25
  const dir = (rel) => fileURLToPath(new URL(rel, import.meta.url));
@@ -28,7 +27,7 @@ export default defineAgentPlugin({
28
27
  name: 'canon',
29
28
  // WHICH dimensions exist — this corpus's own manifest, carried on the plugin so
30
29
  // a consumer projecting canon gets canon's dimension set without the projector
31
- // containing it. The same carry as `preamble` below.
30
+ // containing it.
32
31
  manifest: MANIFEST,
33
32
  // WHICH lifecycle events exist — carried the same way, and for the same reason.
34
33
  // The projector needs the members to emit a host's runtime configuration
@@ -38,8 +37,6 @@ export default defineAgentPlugin({
38
37
  fragments: dir('./dimensions'),
39
38
  agents: dir('./agents'),
40
39
  skills: dir('./skills'),
41
- // The axiom rides the PLUGIN, so it survives projection by any consumer.
42
- preamble: foundingDoctrine,
43
40
  hooks: dir('./hooks'),
44
41
  });
45
42
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,wEAAwE;AACxE,EAAE;AACF,yEAAyE;AACzE,iFAAiF;AACjF,2EAA2E;AAC3E,uEAAuE;AACvE,EAAE;AACF,gFAAgF;AAChF,mFAAmF;AACnF,wEAAwE;AACxE,qDAAqD;AACrD,EAAE;AACF,+EAA+E;AAC/E,kFAAkF;AAClF,4EAA4E;AAC5E,iFAAiF;AACjF,+EAA+E;AAC/E,4EAA4E;AAC5E,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AAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE3D,gFAAgF;AAChF,MAAM,GAAG,GAAG,CAAC,GAAW,EAAU,EAAE,CAClC,aAAa,CAAC,IAAI,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAE/C,eAAe,iBAAiB,CAAC;IAC/B,IAAI,EAAE,OAAO;IACb,gFAAgF;IAChF,+EAA+E;IAC/E,iBAAiB;IACjB,QAAQ,EAAE,QAAQ;IAClB,gFAAgF;IAChF,yEAAyE;IACzE,4EAA4E;IAC5E,8EAA8E;IAC9E,MAAM,EAAE,gBAAgB;IACxB,SAAS,EAAE,GAAG,CAAC,cAAc,CAAC;IAC9B,MAAM,EAAE,GAAG,CAAC,UAAU,CAAC;IACvB,MAAM,EAAE,GAAG,CAAC,UAAU,CAAC;IACvB,KAAK,EAAE,GAAG,CAAC,SAAS,CAAC;CACtB,CAAC,CAAC"}
@@ -187,5 +187,6 @@ export type { SkillExpression };
187
187
  export declare const CANONICAL_EVENTS: readonly ["session.start", "session.resume", "session.end", "prompt.submit", "turn.end", "turn.fail", "agent.idle", "model.request.pre", "model.response.post", "tool.use.pre", "tool.use.post", "tool.use.fail", "file.edit.post", "file.read.pre", "file.change.external", "shell.exec.pre", "shell.exec.post", "mcp.exec.pre", "mcp.exec.post", "subagent.dispatch.pre", "subagent.start", "subagent.end", "operator.consult.pre", "permission.request", "permission.deny", "notification", "context.compact.pre", "context.compact.post", "config.changed", "instructions.loaded", "vcs.commit.post"];
188
188
  /** One moment this corpus has a name for — the pivot every adapter maps FROM. */
189
189
  export type CanonicalEvent = (typeof CANONICAL_EVENTS)[number];
190
- /** This corpus's `HookCell`: schema's shape, narrowed to the events above. */
191
- export type HookCell = HookCellOf<CanonicalEvent>;
190
+ /** This corpus's `HookCell`: schema's shape, narrowed to the events above and to
191
+ * this manifest's dimensions, so a guard binding a misspelled one is a compile error. */
192
+ export type HookCell = HookCellOf<CanonicalEvent, Dimension>;
package/dist/manifest.js CHANGED
@@ -5,8 +5,8 @@
5
5
  // `repertoire`, an `arity`, a `required`, and all machinery that operates on any
6
6
  // manifest obeying that shape. THIS module owns the INSTANCE: WHICH dimensions
7
7
  // exist, and each one's metadata. The manifest rides the PLUGIN (`src/index.ts`
8
- // declares `manifest: MANIFEST`), exactly as `preamble` does — "the axiom rides
9
- // the PLUGIN, so it survives projection by any consumer."
8
+ // declares `manifest: MANIFEST`), so a consumer projecting canon gets the design
9
+ // without the projector containing it.
10
10
  //
11
11
  // The manifest used to live in `forge`, which meant a corpus could not
12
12
  // discover a dimension without editing the projector — the thesis inverted at its
@@ -159,9 +159,9 @@ export const RUNTIME_CAPABILITIES = [
159
159
  // TWO MEMBERS NAME AN ACT RATHER THAN A HARNESS CALLBACK, and they are the reason
160
160
  // there is no tool vocabulary. `stance-guardrail-pre` bound `tool.use.pre` and then
161
161
  // narrowed it with `matcher: 'AskUserQuestion|Agent|SendMessage'` — three claude tool
162
- // names, on a cell whose whole claim is harness-neutrality, silently dropped by the
163
- // codex adapter (so the hook fired on every tool call there). The obvious repair — a
164
- // canonical TOOL vocabulary beside this one — is a category error: harnesses share a
162
+ // names, on a cell whose whole claim is harness-neutrality, silently dropped by an
163
+ // adapter that could not narrow it (so the hook fired on every tool call there). The
164
+ // obvious repair — a canonical TOOL vocabulary beside this one — is a category error: harnesses share a
165
165
  // LIFECYCLE, which is closed, but their TOOL SETS are open-world (MCP servers add
166
166
  // tools at run time, users add their own), so a closed enum over them is permanently
167
167
  // incomplete and every adapter map would be near-empty.
@@ -184,7 +184,7 @@ export const RUNTIME_CAPABILITIES = [
184
184
  // TWO, and no third: a third act has no site in this corpus. An adapter maps each to
185
185
  // its native ⟨event, selector⟩ pair (`NativeBinding`); a harness that can fire the
186
186
  // act but not narrow it DECLARES that loss and the projection warns, which is what
187
- // closed the codex divergence. `matcher` no longer exists on any cell or IR shape.
187
+ // closed that divergence. `matcher` no longer exists on any cell or IR shape.
188
188
  //
189
189
  // `vcs.commit.post` IS AN ORDINARY MEMBER. It was `SubstrateEvent = CanonicalEvent |
190
190
  // 'vcs.commit.post'` — a union that existed only because the enum was closed and a
@@ -1 +1 @@
1
- {"version":3,"file":"manifest.js","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,iEAAiE;AACjE,EAAE;AACF,4EAA4E;AAC5E,iFAAiF;AACjF,+EAA+E;AAC/E,gFAAgF;AAChF,gFAAgF;AAChF,0DAA0D;AAC1D,EAAE;AACF,uEAAuE;AACvE,kFAAkF;AAClF,kFAAkF;AAClF,qEAAqE;AACrE,EAAE;AACF,2EAA2E;AAC3E,+EAA+E;AAC/E,+EAA+E;AAC/E,4EAA4E;AAC5E,6EAA6E;AAC7E,iFAAiF;AACjF,gFAAgF;AAChF,sBAAsB;AACtB,gFAAgF;AAehF;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,UAAU;IACV,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE;IACjE,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE;IAC9D,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;IACrE,qBAAqB,EAAE;QACrB,IAAI,EAAE,SAAS;QACf,UAAU,EAAE,QAAQ;QACpB,KAAK,EAAE,QAAQ;KAChB;IACD,YAAY,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;IACxE,iCAAiC;IACjC,SAAS,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,UAAU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;AAC/E,oFAAoF;AACpF,gFAAgF;AAChF,mFAAmF;AACnF,UAAU;AACV,EAAE;AACF,kFAAkF;AAClF,oFAAoF;AACpF,sFAAsF;AACtF,mFAAmF;AACnF,qFAAqF;AACrF,wGAAwG;AACxG,kFAAkF;AAClF,qFAAqF;AACrF,wDAAwD;AACxD,EAAE;AACF,6EAA6E;AAC7E,oFAAoF;AACpF,6EAA6E;AAC7E,4EAA4E;AAC5E,iFAAiF;AACjF,EAAE;AACF,oFAAoF;AACpF,oFAAoF;AACpF,mFAAmF;AACnF,+EAA+E;AAC/E,iFAAiF;AACjF,+CAA+C;AAC/C,kFAAkF;AAClF,8EAA8E;AAC9E,EAAE;AACF,qFAAqF;AACrF,mFAAmF;AACnF,mFAAmF;AACnF,8EAA8E;AAC9E,EAAE;AACF,qFAAqF;AACrF,mFAAmF;AACnF,oFAAoF;AACpF,mFAAmF;AACnF,oFAAoF;AACpF,4EAA4E;AAC5E,wBAAwB;AACxB,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,wCAAwC;IACxC,eAAe;IACf,gBAAgB;IAChB,aAAa;IACb,eAAe;IACf,UAAU;IACV,WAAW;IACX,YAAY;IACZ,yCAAyC;IACzC,mBAAmB;IACnB,qBAAqB;IACrB,+BAA+B;IAC/B,cAAc;IACd,eAAe;IACf,eAAe;IACf,kDAAkD;IAClD,gBAAgB;IAChB,eAAe;IACf,sBAAsB;IACtB,oDAAoD;IACpD,gBAAgB;IAChB,iBAAiB;IACjB,cAAc;IACd,eAAe;IACf,uBAAuB;IACvB,gBAAgB;IAChB,cAAc;IACd,0DAA0D;IAC1D,sBAAsB;IACtB,oBAAoB;IACpB,iBAAiB;IACjB,cAAc;IACd,yCAAyC;IACzC,qBAAqB;IACrB,sBAAsB;IACtB,gBAAgB;IAChB,qBAAqB;IACrB,gBAAgB;IAChB,iBAAiB;CACsB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { fileOps as fileOps_actions } from '../dimensions/actions/file-ops.js';
1
+ import { delegation as delegation_actions } from '../dimensions/actions/delegation.js';
2
2
  import { convergence as convergence_audienceAdaptation } from '../dimensions/audience-adaptation/convergence.js';
3
3
  import { principalSelf } from '../dimensions/autonomy/decision-authority.js';
4
4
  import { handoff as handoff_autonomy } from '../dimensions/autonomy/handoff.js';
@@ -19,7 +19,7 @@ import { plain as plain_formality } from '../dimensions/formality/plain.js';
19
19
  import { systemsThinking as systemsThinking_framing } from '../dimensions/framing/systems-thinking.js';
20
20
  import { honesty as honesty_guardrails } from '../dimensions/guardrails/honesty.js';
21
21
  import { correctionConsolidation as correctionConsolidation_learning } from '../dimensions/learning/correction-consolidation.js';
22
- import { delivery as delivery_objective } from '../dimensions/objective/delivery.js';
22
+ import { conceptualIntegrity as conceptualIntegrity_objective } from '../dimensions/objective/conceptual-integrity.js';
23
23
  import { planAndSolve as planAndSolve_reasoningStrategy } from '../dimensions/reasoning-strategy/plan-and-solve.js';
24
24
  import { architect as architect_role } from '../dimensions/role/architect.js';
25
25
  import { optimize as optimize_satisficing } from '../dimensions/satisficing/optimize.js';
@@ -43,14 +43,16 @@ import { decisionRationale as decisionRationale_transparency } from '../dimensio
43
43
  // hands work out" while `⟨C → spec⟩ ↦ plan` says the opposite, and an agent holding a
44
44
  // capability exercises it. `review-critique ≜ ⟨adversarial threat-modeling
45
45
  // severity-triage⟩` is a substrate act under a name that sounded conceptual; the
46
- // critique this rung performs is `judge`, which the contract reserves by name.
46
+ // critique this rung performs is `rectify`, which the contract reserves by name and
47
+ // applies to every input, while the one judge of a unit is the assayer.
47
48
  export const architectRole = {
48
49
  sign: architect_role,
49
- // `design` holds the lattice, `deliver` closes the loop on what comes back. Declared
50
- // rather than described — omp injects them before a dispatched subagent's first
51
- // prompt and the generic launcher inlines their bodies for a main session, so a
52
- // holder is the same agent either way it is reached.
53
- skills: ['design', 'deliver'],
50
+ // `design` holds the lattice, `note` takes in what every delegate finds. `deliver` is
51
+ // not here: it composes the plan skill and with it the spec read, and it is the
52
+ // integrator's skill. Declared rather than described — omp injects them before a
53
+ // dispatched subagent's first prompt and the generic launcher inlines their bodies for
54
+ // a main session, so a holder is the same agent either way it is reached.
55
+ skills: ['design', 'note'],
54
56
  vector: {
55
57
  formality: plain_formality,
56
58
  // `convergence`: this position's output is UNDERSTANDING, which is worthless at a
@@ -64,18 +66,21 @@ export const architectRole = {
64
66
  missionCommand,
65
67
  handoff_autonomy,
66
68
  ],
67
- // `delivery`, against the obvious pull toward `insight`. The characteristic failure
68
- // of this position is becoming a theorist who emits documents while the work
69
- // stalls; the standing drive is the finished system, and design is how it gets
70
- // there rather than what it is for.
71
- objective: delivery_objective,
69
+ // `conceptual-integrity`, against the obvious pull toward `insight`. The
70
+ // characteristic failure of this position is becoming a theorist who emits documents
71
+ // while the work stalls; the standing drive is one coherent design that everything
72
+ // below is built to, and a green pipeline is not a measure of it. `delivery` is the
73
+ // drive of the position that combines work and runs the whole check, which is the
74
+ // integrator; this one holds the design and never combines.
75
+ objective: conceptualIntegrity_objective,
72
76
  engineeringPrinciples: [
73
77
  cratylism_engineeringPrinciples,
74
78
  llmNative_engineeringPrinciples,
75
79
  firstPrinciples_engineeringPrinciples,
76
- // The three carrying this position's specific load: concerns must not mix,
77
- // delegated work is checked rather than trusted, and executors are told to BREAK
78
- // what does not conform rather than accrete beside it.
80
+ // The three carrying this position's specific load: concerns must not mix, every
81
+ // input (the operator's included) is a hypothesis rectified against expertise
82
+ // before it is served, and work that does not conform is broken rather than
83
+ // accreted beside.
79
84
  separationOfConcerns_engineeringPrinciples,
80
85
  trustButVerify_engineeringPrinciples,
81
86
  greenField_engineeringPrinciples,
@@ -88,17 +93,17 @@ export const architectRole = {
88
93
  systemDesign_capabilities,
89
94
  researchInvestigation_capabilities,
90
95
  ],
91
- // `file-ops`: this position writes C and dispatches every writer below it, so it is
92
- // where a lane's commit would be withheld; the `vcs` factor forbids that.
93
- actions: [fileOps_actions],
96
+ // `delegation`: this position dispatches every writer below it, so it is where a
97
+ // lane's commit would be withheld; the delegation value carries the rule against that.
98
+ actions: [delegation_actions],
94
99
  learning: correctionConsolidation_learning,
95
100
  situationAwareness: projection_situationAwareness,
96
101
  framing: systemsThinking_framing,
97
102
  reasoningStrategy: planAndSolve_reasoningStrategy,
98
103
  satisficing: optimize_satisficing,
99
- // NOT an executable test oracle. A suite going green proves the executor's own
100
- // claim and says nothing about conformance to the design; acceptance is judged
101
- // against the criteria the design states.
104
+ // NOT an executable test oracle. A suite going green proves the implementer's own
105
+ // claim and says nothing about conformance to the design; acceptance rests on the
106
+ // assayer's verdict against the shard the unit realizes.
102
107
  selfEvaluation: acceptanceCriteriaCheck_selfEvaluation,
103
108
  },
104
109
  };
@@ -1 +1 @@
1
- {"version":3,"file":"architect.js","sourceRoot":"","sources":["../../src/roles/architect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,EAAE,WAAW,IAAI,8BAA8B,EAAE,MAAM,kDAAkD,CAAC;AACjH,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EAAE,cAAc,IAAI,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACxG,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAC3E,OAAO,EAAE,qBAAqB,IAAI,kCAAkC,EAAE,MAAM,sDAAsD,CAAC;AACnI,OAAO,EAAE,YAAY,IAAI,yBAAyB,EAAE,MAAM,6CAA6C,CAAC;AACxG,OAAO,EAAE,SAAS,IAAI,+BAA+B,EAAE,MAAM,mDAAmD,CAAC;AACjH,OAAO,EAAE,GAAG,IAAI,yBAAyB,EAAE,MAAM,6CAA6C,CAAC;AAC/F,OAAO,EAAE,eAAe,IAAI,qCAAqC,EAAE,MAAM,0DAA0D,CAAC;AACpI,OAAO,EAAE,UAAU,IAAI,gCAAgC,EAAE,M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ChE,EAAE;AACF,gFAAgF;AAChF,wFAAwF;AACxF,sFAAsF;AACtF,2EAA2E;AAC3E,iFAAiF;AACjF,+EAA+E;AAE/E,MAAM,CAAC,MAAM,aAAa,GAAa;IACrC,IAAI,EAAE,cAAc;IACpB,qFAAqF;IACrF,gFAAgF;IAChF,gFAAgF;IAChF,qDAAqD;IACrD,MAAM,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,MAAM,EAAE;QACN,SAAS,EAAE,eAAe;QAC1B,kFAAkF;QAClF,+EAA+E;QAC/E,yEAAyE;QACzE,kBAAkB,EAAE,8BAA8B;QAClD,YAAY,EAAE,8BAA8B;QAC5C,QAAQ,EAAE;YACR,aAAa;YACb,uBAAuB;YACvB,cAAc;YACd,gBAAgB;SACjB;QACD,oFAAoF;QACpF,6EAA6E;QAC7E,+EAA+E;QAC/E,oCAAoC;QACpC,SAAS,EAAE,kBAAkB;QAC7B,qBAAqB,EAAE;YACrB,+BAA+B;YAC/B,+BAA+B;YAC/B,qCAAqC;YACrC,2EAA2E;YAC3E,iFAAiF;YACjF,uDAAuD;YACvD,0CAA0C;YAC1C,oCAAoC;YACpC,gCAAgC;YAChC,gCAAgC;YAChC,yBAAyB;YACzB,0BAA0B;SAC3B;QACD,UAAU,EAAE,CAAC,kBAAkB,CAAC;QAChC,YAAY,EAAE;YACZ,yBAAyB;YACzB,kCAAkC;SACnC;QACD,oFAAoF;QACpF,0EAA0E;QAC1E,OAAO,EAAE,CAAC,eAAe,CAAC;QAC1B,QAAQ,EAAE,gCAAgC;QAC1C,kBAAkB,EAAE,6BAA6B;QACjD,OAAO,EAAE,uBAAuB;QAChC,iBAAiB,EAAE,8BAA8B;QACjD,WAAW,EAAE,oBAAoB;QACjC,+EAA+E;QAC/E,+EAA+E;QAC/E,0CAA0C;QAC1C,cAAc,EAAE,sCAAsC;KACvD;CACF,CAAC"}
1
+ {"version":3,"file":"architect.js","sourceRoot":"","sources":["../../src/roles/architect.ts"],"names":[],"mappings":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