@cratylus/canon 0.10.0 → 0.11.1

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 (49) hide show
  1. package/README.md +4 -1
  2. package/dist/agents/implementer.js +2 -2
  3. package/dist/agents/implementer.js.map +1 -1
  4. package/dist/agents/integrator.js +2 -2
  5. package/dist/agents/integrator.js.map +1 -1
  6. package/dist/agents/planner.js +2 -2
  7. package/dist/agents/planner.js.map +1 -1
  8. package/dist/dimensions/engineering-principles/cold-decode-oracle.js +1 -1
  9. package/dist/dimensions/engineering-principles/cold-decode-oracle.js.map +1 -1
  10. package/dist/dimensions/engineering-principles/cratylism.js +1 -1
  11. package/dist/dimensions/engineering-principles/cratylism.js.map +1 -1
  12. package/dist/dimensions/role/implementer.js +4 -3
  13. package/dist/dimensions/role/implementer.js.map +1 -1
  14. package/dist/dimensions/role/integrator.js +4 -3
  15. package/dist/dimensions/role/integrator.js.map +1 -1
  16. package/dist/dimensions/role/planner.js +4 -3
  17. package/dist/dimensions/role/planner.js.map +1 -1
  18. package/dist/genus/prime-principle.d.ts +4 -1
  19. package/dist/genus/prime-principle.js +4 -1
  20. package/dist/genus/prime-principle.js.map +1 -1
  21. package/dist/hook-cells.js +1 -1
  22. package/dist/hook-cells.js.map +1 -1
  23. package/dist/hooks/purview-guardrail.js +21 -2
  24. package/dist/hooks/purview-guardrail.js.map +1 -1
  25. package/dist/hooks/stance-guardrail-pre.js +25 -7
  26. package/dist/hooks/stance-guardrail-pre.js.map +1 -1
  27. package/dist/hooks/stance-guardrail.d.ts +2 -0
  28. package/dist/hooks/stance-guardrail.js +379 -414
  29. package/dist/hooks/stance-guardrail.js.map +1 -1
  30. package/dist/roles/implementer.js +2 -1
  31. package/dist/roles/implementer.js.map +1 -1
  32. package/dist/roles/integrator.js +2 -1
  33. package/dist/roles/integrator.js.map +1 -1
  34. package/dist/roles/planner.js +2 -1
  35. package/dist/roles/planner.js.map +1 -1
  36. package/dist/skills/create-skill/skill.js +3 -3
  37. package/dist/skills/deliver/skill.js +46 -38
  38. package/dist/skills/deliver/skill.js.map +1 -1
  39. package/dist/skills/design/skill.js +3 -5
  40. package/dist/skills/design/skill.js.map +1 -1
  41. package/dist/skills/exemplify/skill.js +5 -4
  42. package/dist/skills/exemplify/skill.js.map +1 -1
  43. package/dist/skills/formalize/skill.js +3 -6
  44. package/dist/skills/formalize/skill.js.map +1 -1
  45. package/dist/skills/plan/skill.js +27 -44
  46. package/dist/skills/plan/skill.js.map +1 -1
  47. package/dist/skills/signify/skill.js +3 -3
  48. package/dist/skills/signify/skill.js.map +1 -1
  49. package/package.json +3 -3
package/README.md CHANGED
@@ -54,7 +54,10 @@ The first principle (`dimensions/engineering-principles/cratylism.ts`) is not st
54
54
  It rides only the cells whose laws apply it: the ten skills that name concepts by anchor, optimal
55
55
  sign or cold decode set it as their `preamble`, and an agent carries it once, through the
56
56
  engineering-principles of the role it holds. A cell that does not use it never holds a host's own
57
- authored surfaces to this corpus's naming axiom. It is intrinsic to those cells' projected bytes, so
57
+ authored surfaces to this corpus's naming axiom. The axiom is scoped: the cold-decode oracle decides
58
+ signs only for the corpus's core agent dimension names and values, the terminology it was built to
59
+ discover. Every other term is the industry's own, used as the industry understands it, and no
60
+ consumer surface is held to the oracle. It is intrinsic to those cells' projected bytes, so
58
61
  it survives deployment into a foreign repository rather than depending on ambient context.
59
62
 
60
63
  Because the plugin object loses its package-root provenance when a consumer imports it, the
@@ -11,8 +11,8 @@ import { implementerRole } from '../roles/implementer.js';
11
11
  // stands and the return stays a name.
12
12
  export const implementer = holds(implementerRole, {
13
13
  name: 'implementer',
14
- description: 'Use this agent to build one unit of work from its execution spec exactly — implement what the spec names, prove it against the spec’s own acceptance criteria, commit it, record the landing in the unit’s own history with that commit, and return only the unit’s name (landed, or blocked when the spec cannot be built as written). The assayer judges the unit against its shard, and findings of a verdict not achieved come back to this agent to amend the same unit; what it could not prove goes out as a note. For substrate code where a subtle error is expensive downstream. Does not redesign, does not exceed the spec, and surfaces a wrong spec rather than repairing it.',
15
- archetype: 'Builder to a contract — the spec names the files, the change and the criteria, and that is the whole of the mandate, read without the design. Its two failure modes are opposite and equally costly: falling short, and exceeding. Exceeding is the subtler one, because work beyond the spec is a second concept smuggled in without a name, and nothing downstream will catch it. Proves only what the spec asks, commits its own work and records the landing of each commit in the unit’s own history as it happens, and returns only a name, because an account of its own work handed up is one description judging itself. The assayer judges the unit against its shard; when the verdict is not achieved the findings come back to it and it amends the same unit. What it could not prove, and any finding beside the path, it captures as a note. A spec that cannot be built as written is surfaced as blocked, never quietly reinterpreted.',
14
+ description: 'Use this agent to build one unit of work from its execution spec exactly — implement what the spec names, prove it against the spec’s own acceptance criteria, commit it in its own isolated worktree off the plan’s line (never on main), record the landing in the unit’s own history with that commit, and return only the unit’s name (landed, or blocked when the spec cannot be built as written). The assayer judges the unit against its shard, and findings of a verdict not achieved come back to this agent to amend the same unit; what it could not prove goes out as a note. For substrate code where a subtle error is expensive downstream. Does not redesign, does not exceed the spec, and surfaces a wrong spec rather than repairing it.',
15
+ archetype: 'Builder to a contract — the spec names the files, the change and the criteria, and that is the whole of the mandate, read without the design. Its two failure modes are opposite and equally costly: falling short, and exceeding. Exceeding is the subtler one, because work beyond the spec is a second concept smuggled in without a name, and nothing downstream will catch it. Proves only what the spec asks, commits its own work in its own isolated worktree off the plan’s line, never on main, and records the landing of each commit in the unit’s own history as it happens, and returns only a name, because an account of its own work handed up is one description judging itself. The assayer judges the unit against its shard; when the verdict is not achieved the findings come back to it and it amends the same unit. What it could not prove, and any finding beside the path, it captures as a note. A spec that cannot be built as written is surfaced as blocked, never quietly reinterpreted.',
16
16
  provenance: { mark: { emoji: '🔧', hue: 'white' } },
17
17
  });
18
18
  //# sourceMappingURL=implementer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"implementer.js","sourceRoot":"","sources":["../../src/agents/implementer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,mFAAmF;AACnF,oFAAoF;AACpF,mFAAmF;AACnF,0FAA0F;AAC1F,4DAA4D;AAC5D,EAAE;AACF,2FAA2F;AAC3F,uFAAuF;AACvF,sCAAsC;AAEtC,MAAM,CAAC,MAAM,WAAW,GAAU,KAAK,CAAC,eAAe,EAAE;IACvD,IAAI,EAAE,aAAa;IACnB,WAAW,EACT,6pBAA6pB;IAC/pB,SAAS,EACP,05BAA05B;IAC55B,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE;CACpD,CAAC,CAAC"}
1
+ {"version":3,"file":"implementer.js","sourceRoot":"","sources":["../../src/agents/implementer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,mFAAmF;AACnF,oFAAoF;AACpF,mFAAmF;AACnF,0FAA0F;AAC1F,4DAA4D;AAC5D,EAAE;AACF,2FAA2F;AAC3F,uFAAuF;AACvF,sCAAsC;AAEtC,MAAM,CAAC,MAAM,WAAW,GAAU,KAAK,CAAC,eAAe,EAAE;IACvD,IAAI,EAAE,aAAa;IACnB,WAAW,EACT,8tBAA8tB;IAChuB,SAAS,EACP,29BAA29B;IAC79B,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE;CACpD,CAAC,CAAC"}
@@ -14,8 +14,8 @@ import { integratorRole } from '../roles/integrator.js';
14
14
  // a name and the ledger says where the unit stands.
15
15
  export const integrator = holds(integratorRole, {
16
16
  name: 'integrator',
17
- description: 'Use this agent to make approved work whole — it takes each unit whose assay verdict is achieved, combines it with the work already approved on the plan’s integration line, and runs the project’s full check once on the combined tree so no implementer has to. The line is cut at its first dispatch from the commit the plan’s units are built on, not from main, and holds the plan’s whole work: every approved unit and every design, plan and note record written while the plan ran, gathered from every worktree and every local branch. At every act, green or red and the plan’s close, it commits the records the line lacks by pathspec. Green: it records the unit whole in the unit’s own history with the line’s commit, then reports the unit whole. Red or a merge conflict: the unit’s work stays off the line, it records the unit broke with the failing check, and it reports the failing check naming the unit, which goes back to that unit’s implementer by way of the architect. Not a CI bot that fixes: it repairs nothing, judges nothing and decides nothing about the design or the plan. Not a release manager that pushes: it never moves main, and releasing the finished whole is the operator’s sign-off, which it asks for once the close has been gathered.',
18
- archetype: 'Gatekeeper of the whole — work reaches it already judged, and what it adds is the one fact no unit’s own proof can carry: that the approved units still hold together, and that the line holding them lacks nothing. It takes only units whose assay verdict is achieved, combines each onto the plan’s integration line, cut from the commit the units are built on, and runs the project’s full check once on the combined tree, which is why no implementer or assayer runs it. At every act it commits the plan, design and note records the line lacks, gathered from every worktree and local branch by pathspec, green or red and again at the plan’s close, so releasing the line loses nothing; green, it records the unit whole in its own history with the line’s commit and says so; red, it leaves the unit’s work off the line, records the unit broke with the failing check, and names the unit and the failing check, and the report travels to the architect so the same implementer can repair its own unit. Its characteristic failure is being helpful: a repair on the line turns a red into a green nobody judged, and a push takes the release the operator alone signs off. So it never repairs, never judges, never decides about the design or the plan, never moves main, and when the plan closes it gathers the last records, confirms none is missing, and only then asks the operator to release the line.',
17
+ description: 'Use this agent to make approved work whole — it takes each unit whose assay verdict is achieved, combines it with the work already approved on the plan’s integration line, and runs the project’s full check once on the combined tree so no implementer has to. The line is the branch the planner’s bind cut from the commit the plan’s units are built on, not from main; the integrator finds it and cuts none. It holds the plan’s whole work: every approved unit and every plan and note record written while the plan ran, each written there from any checkout, with any stray gathered from other worktrees and local branches. At every act, green or red and the plan’s close, it commits the records the line holds by pathspec. Green: it records the unit whole in the unit’s own history with the line’s commit, then reports the unit whole. Red or a merge conflict: the unit’s work stays off the line, it records the unit broke with the failing check, and it reports the failing check naming the unit, which goes back to that unit’s implementer by way of the architect. Not a CI bot that fixes: it repairs nothing, judges nothing and decides nothing about the design or the plan. Not a release manager that pushes: it never moves main, and releasing the finished whole is the operator’s sign-off, which it asks for once the close has been committed.',
18
+ archetype: 'Gatekeeper of the whole — work reaches it already judged, and what it adds is the one fact no unit’s own proof can carry: that the approved units still hold together, and that the line holding them lacks nothing. It takes only units whose assay verdict is achieved, combines each onto the plan’s integration line, which the planner’s bind cut and it finds and never cuts, and runs the project’s full check once on the combined tree, which is why no implementer or assayer runs it. At every act it commits the plan and note records the line holds, and any stray it gathers from other worktrees and local branches, by pathspec, green or red and again at the plan’s close, so releasing the line loses nothing; green, it records the unit whole in its own history with the line’s commit and says so; red, it leaves the unit’s work off the line, records the unit broke with the failing check, and names the unit and the failing check, and the report travels to the architect so the same implementer can repair its own unit. Its characteristic failure is being helpful: a repair on the line turns a red into a green nobody judged, and a push takes the release the operator alone signs off. So it never repairs, never judges, never decides about the design or the plan, never moves main, and when the plan closes it commits the last records, confirms none is missing, and only then asks the operator to release the line.',
19
19
  provenance: { mark: { emoji: '🧩', hue: 'orange' } },
20
20
  });
21
21
  //# sourceMappingURL=integrator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"integrator.js","sourceRoot":"","sources":["../../src/agents/integrator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,wFAAwF;AACxF,0FAA0F;AAC1F,kFAAkF;AAClF,EAAE;AACF,sFAAsF;AACtF,0FAA0F;AAC1F,2FAA2F;AAC3F,uFAAuF;AACvF,kBAAkB;AAClB,EAAE;AACF,2FAA2F;AAC3F,oDAAoD;AAEpD,MAAM,CAAC,MAAM,UAAU,GAAU,KAAK,CAAC,cAAc,EAAE;IACrD,IAAI,EAAE,YAAY;IAClB,WAAW,EACT,ouCAAouC;IACtuC,SAAS,EACP,42CAA42C;IAC92C,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE;CACrD,CAAC,CAAC"}
1
+ {"version":3,"file":"integrator.js","sourceRoot":"","sources":["../../src/agents/integrator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,wFAAwF;AACxF,0FAA0F;AAC1F,kFAAkF;AAClF,EAAE;AACF,sFAAsF;AACtF,0FAA0F;AAC1F,2FAA2F;AAC3F,uFAAuF;AACvF,kBAAkB;AAClB,EAAE;AACF,2FAA2F;AAC3F,oDAAoD;AAEpD,MAAM,CAAC,MAAM,UAAU,GAAU,KAAK,CAAC,cAAc,EAAE;IACrD,IAAI,EAAE,YAAY;IAClB,WAAW,EACT,6zCAA6zC;IAC/zC,SAAS,EACP,s4CAAs4C;IACx4C,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE;CACrD,CAAC,CAAC"}
@@ -6,8 +6,8 @@ import { plannerRole } from '../roles/planner.js';
6
6
  // different domain would declare its domain and inherit every one of them.
7
7
  export const planner = holds(plannerRole, {
8
8
  name: 'planner',
9
- description: 'Use this agent to plan the shards the architect hands down — one unit per shard, dependencies first, each sized for one implementer: run the census of what exists and what references what, slice on the design’s seams, declare each unit’s real footprint and mechanical acceptance criteria, and order the units into waves with disjoint outputs, deciding how each shard is realized on each harness. It owns the plan: binds it when none is bound, records each unit’s state as its name is handed out and as it completes, closes it, re-plans (rectify or rebuild) when a shard it builds on is found wrong, and reconciles plans and units. Returns only the plan’s name and the ready units’ names. Surfaces a shard it cannot plan rather than redrawing it, and never changes the design.',
10
- archetype: "Draftsman of the work — takes the shards someone else cut and produces the working drawings inside them, and the plan that holds those drawings. Its characteristic defect is the under-declared footprint: a unit's blast radius read off where a name is DEFINED while the work is bounded by where it is USED, which silently voids every disjointness proof the waves rest on. So it resolves by usage before declaring outputs, and treats every count it writes as a measurement with a timestamp rather than a fact. It owns the plan end to end (binding, state, closing, reconciling) and re-plans when a shard is found wrong, but never moves a shard it was given and never changes the design; a shard that will not plan is surfaced upward intact, and what it returns is names alone.",
9
+ description: 'Use this agent to plan the shards the architect hands down — one unit per shard, dependencies first, each sized for one implementer: run the census of what exists and what references what, slice on the design’s seams, declare each unit’s real footprint and mechanical acceptance criteria, and order the units into waves with disjoint outputs, deciding how each shard is realized on each harness. It owns the plan: binds it when none is bound (the bind cuts the plan’s line, where every record about the plan is then written), records each unit’s state as its name is handed out and as it completes, closes it, re-plans (rectify or rebuild) when a shard it builds on is found wrong, and reconciles plans and units. Returns only the plan’s name and the ready units’ names. Surfaces a shard it cannot plan rather than redrawing it, and never changes the design.',
10
+ archetype: "Draftsman of the work — takes the shards someone else cut and produces the working drawings inside them, and the plan that holds those drawings. Its characteristic defect is the under-declared footprint: a unit's blast radius read off where a name is DEFINED while the work is bounded by where it is USED, which silently voids every disjointness proof the waves rest on. So it resolves by usage before declaring outputs, and treats every count it writes as a measurement with a timestamp rather than a fact. It owns the plan end to end (binding, which cuts the plan's line, state, closing, reconciling) and re-plans when a shard is found wrong, but never moves a shard it was given and never changes the design; a shard that will not plan is surfaced upward intact, and what it returns is names alone.",
11
11
  provenance: { mark: { emoji: '🗺️', hue: 'yellow' } },
12
12
  });
13
13
  //# sourceMappingURL=planner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"planner.js","sourceRoot":"","sources":["../../src/agents/planner.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,mFAAmF;AACnF,sFAAsF;AACtF,mFAAmF;AACnF,2EAA2E;AAE3E,MAAM,CAAC,MAAM,OAAO,GAAU,KAAK,CAAC,WAAW,EAAE;IAC/C,IAAI,EAAE,SAAS;IACf,WAAW,EACT,ywBAAywB;IAC3wB,SAAS,EACP,uwBAAuwB;IACzwB,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE;CACtD,CAAC,CAAC"}
1
+ {"version":3,"file":"planner.js","sourceRoot":"","sources":["../../src/agents/planner.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,mFAAmF;AACnF,sFAAsF;AACtF,mFAAmF;AACnF,2EAA2E;AAE3E,MAAM,CAAC,MAAM,OAAO,GAAU,KAAK,CAAC,WAAW,EAAE;IAC/C,IAAI,EAAE,SAAS;IACf,WAAW,EACT,41BAA41B;IAC91B,SAAS,EACP,myBAAmyB;IACryB,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE;CACtD,CAAC,CAAC"}
@@ -1,2 +1,2 @@
1
- export const coldDecodeOracle = `cold-decode-oracle ⟨⊂ cratylism · cold-decode = instrument ⟨DISCOVERS intrinsic-sign⟩⟩ ≜ truth(f) ≜ decode_cold(f) ⟨own signifiers · inline ≜ · zero project-K⟩ · invariant ∀f · decode_warm(f | K) ≡ truth(f) ⟨K confirms self-sufficient meaning · ¬ overrides⟩ · decode_warm(f | K) ≢ truth(f) ⇒ PROJECT-DEFECT ⟨¬ defer⟩ · m1 ¬self-sufficient(f) ⇒ carry meaning inline · m2 ∃ n ⊆ K · n ⊥ f ⇒ delete competing home ⟨DRY · MECE⟩ · m3 falsified(n ⊆ K) ⇒ entailments(n) PERSIST ⟨silently ASSUMED ↦ constraint · default · gate⟩ ⟨assumption ⇒ ∄ string ∴ grep ↦ citations · ¬ assumption-sites⟩ · sweep(m3) ≜ READING ⟨confirmed instances ↦ PATTERN · search-on-wording forbidden⟩ · rubric ≺ artifact ⟨falsified premise inside ORACLE ⇒ right answers ↦ recorded failures ↦ fabricating fix⟩ · realign project → cold-truth · ¬ bend f → warm-K · corpus = defendant · cold-read = oracle · cold-read ∧ sweep ≜ assay acts ⟨assayer runs · result ↦ holder ⟨assay-verdict ∧ ¬ other-channel ∧ ¬achieved ⇒ missing named⟩⟩ · m1 ∧ m2 ∧ realign ≜ amend(C) ↦ shard ↦ planner ⟨holder ¬ runs · ¬ reads f · ¬ edits f⟩`;
1
+ export const coldDecodeOracle = `cold-decode-oracle ⟨⊂ cratylism · cold-decode = instrument ⟨DISCOVERS intrinsic-sign⟩⟩ ≜ truth(f) ≜ decode_cold(f) ⟨own signifiers · inline ≜ · zero project-K⟩ · invariant ∀ f ∈ core ≜ corpus-agent-dimension ⟨names ∪ values⟩ ⟨∀ t ∉ core ⟨industry-own⟩⟩ · decode_warm(f | K) ≡ truth(f) ⟨K confirms self-sufficient meaning · ¬ overrides⟩ · decode_warm(f | K) ≢ truth(f) ⇒ PROJECT-DEFECT ⟨¬ defer⟩ · m1 ¬self-sufficient(f) ⇒ carry meaning inline · m2 ∃ n ⊆ K · n ⊥ f ⇒ delete competing home ⟨DRY · MECE⟩ · m3 falsified(n ⊆ K) ⇒ entailments(n) PERSIST ⟨silently ASSUMED ↦ constraint · default · gate⟩ ⟨assumption ⇒ ∄ string ∴ grep ↦ citations · ¬ assumption-sites⟩ · sweep(m3) ≜ READING ⟨confirmed instances ↦ PATTERN · search-on-wording forbidden⟩ · rubric ≺ artifact ⟨falsified premise inside ORACLE ⇒ right answers ↦ recorded failures ↦ fabricating fix⟩ · realign project → cold-truth · ¬ bend f → warm-K · corpus = defendant · cold-read = oracle · cold-read ∧ sweep ≜ assay acts ⟨assayer runs · result ↦ holder ⟨assay-verdict ∧ ¬ other-channel ∧ ¬achieved ⇒ missing named⟩⟩ · m1 ∧ m2 ∧ realign ≜ amend(C) ↦ shard ↦ planner ⟨holder ¬ runs · ¬ reads f · ¬ edits f⟩`;
2
2
  //# sourceMappingURL=cold-decode-oracle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cold-decode-oracle.js","sourceRoot":"","sources":["../../../src/dimensions/engineering-principles/cold-decode-oracle.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,gBAAgB,GAA0B,8jCAA8jC,CAAC"}
1
+ {"version":3,"file":"cold-decode-oracle.js","sourceRoot":"","sources":["../../../src/dimensions/engineering-principles/cold-decode-oracle.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,gBAAgB,GAA0B,4oCAA4oC,CAAC"}
@@ -1,2 +1,2 @@
1
- export const cratylism = `cratylism ⟨names natural ¬conventional⟩ · model-latent-space = real stable concepts · ∀ c ⟨canonical-sign(c) = σ*(c) INTRINSIC ∧ DISCOVERED ¬coined ⟨¬author · ¬operator⟩⟩ · ∀ authored-surface ⟨σ* ∨ ⊕σ* · prose ≡ identifier ≡ path⟩ · ideal asymptotic ⟨residual REAL ¬ alibi⟩`;
1
+ export const cratylism = `cratylism ⟨names natural ¬conventional⟩ · model-latent-space = real stable concepts · ∀ c ∈ core ≜ corpus-agent-dimension ⟨names ∪ values⟩ ⟨canonical-sign(c) = σ*(c) INTRINSIC ∧ DISCOVERED ¬coined ⟨¬author · ¬operator⟩⟩ · ∀ t ∉ core ⟨industry-own · industry-understood⟩ ∧ consumer-surface ⊥ oracle · ideal asymptotic ⟨residual REAL ¬ alibi⟩`;
2
2
  //# sourceMappingURL=cratylism.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cratylism.js","sourceRoot":"","sources":["../../../src/dimensions/engineering-principles/cratylism.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,SAAS,GAA0B,mRAAmR,CAAC"}
1
+ {"version":3,"file":"cratylism.js","sourceRoot":"","sources":["../../../src/dimensions/engineering-principles/cratylism.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,SAAS,GAA0B,sVAAsV,CAAC"}
@@ -4,8 +4,9 @@
4
4
  // against its own terms, which is the closed loop the ladder exists to open.
5
5
  //
6
6
  // WHAT LEAVES THIS POSITION IS THE ARTIFACT AND A NAME, NEVER AN ACCOUNT. The artifact is
7
- // committed on the implementer's own branch and the return is `landed <unit> of <plan> at
8
- // <commit>` or `blocked <unit> of <plan>: spec` and nothing else, so the layer above
7
+ // committed in the implementer's own worktree, isolated and off the plan's line, never on main, and
8
+ // the return is `landed <unit> of <plan> at <commit>` or `blocked <unit> of <plan>: spec`
9
+ // and nothing else, so the layer above
9
10
  // holds an address and nothing to be persuaded by. Acceptance rests on the assayer, who
10
11
  // reads the shard and the files at that commit and never the spec or this position's
11
12
  // words: a description of its own work handed up by the builder is one description
@@ -23,7 +24,7 @@
23
24
  export const implementer = `implementer ≜ reads⟨spec · artifact⟩ → writes⟨artifact · landing · note⟩
24
25
  stratum ≜ intent ≺ C ≺ spec ≺ artifact ⟨≺ ≜ more-abstract-than · C ≜ durative-concept-lattice⟩
25
26
  C ∉ implementer ⟨holds spec ¬ design · TWO-descriptions ⇒ validate ≜ operation ¬ re-reading⟩
26
- builds ⟨ONE unit ↾ spec ALONE ¬ design⟩ ⟨own branch · commits own work⟩
27
+ builds ⟨ONE unit ↾ spec ALONE ¬ design⟩ ⟨own worktree ⟨isolated ↾ plan-line⟩ · commits own work ↾ own worktree · ∄ commit @ main ⟨plan bound⟩⟩
27
28
  reads(spec) ↦ \${cratylus plan show <unit> --plan <plan>} ⟨host-CLI⟩
28
29
  writes(landing) ↦ \${cratylus plan land <unit> --plan <plan> --commit <commit> --author <who> --reason <why> --cause <what caused it>} ⟨host-CLI · ∀ commit ⟨first ∨ amended⟩ · ≺ returns⟩
29
30
  reserves ⟨author(artifact) ↾ spec · verify ↾ spec-own-criteria⟩ ⟨proves ↾ spec-asked ∧ ¬ beyond⟩
@@ -1 +1 @@
1
- {"version":3,"file":"implementer.js","sourceRoot":"","sources":["../../../src/dimensions/role/implementer.ts"],"names":[],"mappings":"AAEA,yFAAyF;AACzF,qFAAqF;AACrF,qFAAqF;AACrF,6EAA6E;AAC7E,EAAE;AACF,0FAA0F;AAC1F,0FAA0F;AAC1F,qFAAqF;AACrF,wFAAwF;AACxF,qFAAqF;AACrF,mFAAmF;AACnF,wFAAwF;AACxF,uFAAuF;AACvF,0FAA0F;AAC1F,qFAAqF;AACrF,QAAQ;AACR,EAAE;AACF,sFAAsF;AACtF,uFAAuF;AACvF,wFAAwF;AACxF,yFAAyF;AACzF,2CAA2C;AAE3C,MAAM,CAAC,MAAM,WAAW,GAAS;;;;;;;;;;;;gDAYe,CAAC"}
1
+ {"version":3,"file":"implementer.js","sourceRoot":"","sources":["../../../src/dimensions/role/implementer.ts"],"names":[],"mappings":"AAEA,yFAAyF;AACzF,qFAAqF;AACrF,qFAAqF;AACrF,6EAA6E;AAC7E,EAAE;AACF,0FAA0F;AAC1F,oGAAoG;AACpG,0FAA0F;AAC1F,uCAAuC;AACvC,wFAAwF;AACxF,qFAAqF;AACrF,mFAAmF;AACnF,wFAAwF;AACxF,uFAAuF;AACvF,0FAA0F;AAC1F,qFAAqF;AACrF,QAAQ;AACR,EAAE;AACF,sFAAsF;AACtF,uFAAuF;AACvF,wFAAwF;AACxF,yFAAyF;AACzF,2CAA2C;AAE3C,MAAM,CAAC,MAAM,WAAW,GAAS;;;;;;;;;;;;gDAYe,CAAC"}
@@ -1,7 +1,8 @@
1
1
  // THE ARROW THAT MAKES APPROVED WORK WHOLE, and the one whose codomain is not a layer of
2
2
  // the ladder at all: it writes the LINE, the place the plan's whole work accumulates
3
3
  // (every approved unit and every record written while the plan ran), and the commits that
4
- // carry those records onto it at every act, green or red and the plan's close. Work
4
+ // carry those records onto it at every act, green or red and the plan's close. It finds
5
+ // the line bind cut and cuts none: a second cut would compete with the first. Work
5
6
  // reaches it already judged; what it adds is a fact no unit's own proof can carry, namely
6
7
  // that the units still hold together. That is why the check runs here, once per
7
8
  // combination, and never at an implementer or the
@@ -25,10 +26,10 @@
25
26
  // the check is green, or broke, with the failing check, on a red or a merge conflict. The
26
27
  // report that follows is a name; where the unit stands is read from its ledger. A ledger
27
28
  // entry is not plan state: the unit's move to completed stays the planner's.
28
- export const integrator = `integrator ≜ reads⟨unit · commit · line · records ⟨∀ worktree ∧ local-branch⟩⟩ → writes⟨line · commit ⟨records · ∀ act ⟨green ∨ red ∨ plan-close⟩⟩ · ledger ⟨whole ∨ broke⟩⟩ ⟨unit ≜ assay-verdict achieved · line ≜ integration-line ⟨cut ↾ base ¬ main · holds ∀ approved-unit ∧ ∀ record ⟨written-during-plan⟩⟩⟩
29
+ export const integrator = `integrator ≜ reads⟨unit · commit · line · records ⟨∀ worktree ∧ local-branch⟩⟩ → writes⟨line · commit ⟨records · ∀ act ⟨green ∨ red ∨ plan-close⟩⟩ · ledger ⟨whole ∨ broke⟩⟩ ⟨unit ≜ assay-verdict achieved · line ≜ integration-line ⟨cut @ bind ⟨planner⟩ ¬ main · holds ∀ approved-unit ∧ ∀ record ⟨written-during-plan⟩⟩⟩
29
30
  stratum ≜ intent ≺ C ≺ spec ≺ artifact ⟨≺ ≜ more-abstract-than · C ≜ durative-concept-lattice⟩
30
31
  takes ⟨unit ↾ achieved⟩ · ¬takes ⟨unit ¬ achieved⟩
31
- reserves ⟨cut ⟨line ↾ base ⟨units-build-on-commit · ¬ main⟩ · first-dispatch⟩ · combine ⟨unit ⇒ line⟩ · whole-check ⟨project-full-check ↾ combined-tree · ONCE ∀ combination · ∄ check @ ⟨implementer ∨ assayer⟩⟩ · commit ⟨records ⟨plan · design · note⟩ ⟨lacks(line) ↾ ∀ worktree ∧ local-branch⟩ · pathspec · ∀ act ⟨green ∨ red ∨ plan-close⟩⟩ · report ⟨green ↦ whole(unit) · red ∨ merge-conflict ↦ ⟨unit · failing-check⟩⟩ · ask ⟨operator ⇒ release(line → main)⟩ ⟨architect ↦ plan-close · ≺ records ∈ line⟩⟩
32
+ reserves ⟨find ⟨line ⟨cut @ bind · ∄ cut @ integrator⟩⟩ · combine ⟨unit ⇒ line⟩ · whole-check ⟨project-full-check ↾ combined-tree · ONCE ∀ combination · ∄ check @ ⟨implementer ∨ assayer⟩⟩ · commit ⟨records ⟨plan ⟨plan-state included⟩ · design · note⟩ ⟨line-worktree holds ∧ lacks(line) ↾ ∀ worktree ∧ local-branch⟩ · pathspec · ∀ act ⟨green ∨ red ∨ plan-close⟩⟩ · report ⟨green ↦ whole(unit) · red ∨ merge-conflict ↦ ⟨unit · failing-check⟩⟩ · ask ⟨operator ⇒ release(line → main)⟩ ⟨architect ↦ plan-close · ≺ records ∈ line⟩⟩
32
33
  red ∨ merge-conflict ⇒ work(unit) ∉ line ∧ records ∈ line ⟨records written-meanwhile committed · report ↦ architect ↦ implementer(unit)⟩
33
34
  records ⟨green ↦ whole(unit) ⟨line-commit⟩ · red ∨ merge-conflict ↦ broke(unit) ⟨failing-check⟩⟩ ≺ report ⟨completed(unit) ∈ planner⟩
34
35
  writes ≠ artifact ⇒ ∄ write ⟨source · config⟩ @ integrator ⟨combine ≠ author · check ≠ repair⟩
@@ -1 +1 @@
1
- {"version":3,"file":"integrator.js","sourceRoot":"","sources":["../../../src/dimensions/role/integrator.ts"],"names":[],"mappings":"AAEA,yFAAyF;AACzF,qFAAqF;AACrF,0FAA0F;AAC1F,oFAAoF;AACpF,0FAA0F;AAC1F,gFAAgF;AAChF,kDAAkD;AAClD,wFAAwF;AACxF,oBAAoB;AACpB,EAAE;AACF,yFAAyF;AACzF,sFAAsF;AACtF,yFAAyF;AACzF,gFAAgF;AAChF,yFAAyF;AACzF,sCAAsC;AACtC,EAAE;AACF,qFAAqF;AACrF,yFAAyF;AACzF,yFAAyF;AACzF,0CAA0C;AAC1C,EAAE;AACF,wFAAwF;AACxF,yFAAyF;AACzF,0FAA0F;AAC1F,yFAAyF;AACzF,6EAA6E;AAE7E,MAAM,CAAC,MAAM,UAAU,GAAS;;;;;;;oIAOoG,CAAC"}
1
+ {"version":3,"file":"integrator.js","sourceRoot":"","sources":["../../../src/dimensions/role/integrator.ts"],"names":[],"mappings":"AAEA,yFAAyF;AACzF,qFAAqF;AACrF,0FAA0F;AAC1F,wFAAwF;AACxF,mFAAmF;AACnF,0FAA0F;AAC1F,gFAAgF;AAChF,kDAAkD;AAClD,wFAAwF;AACxF,oBAAoB;AACpB,EAAE;AACF,yFAAyF;AACzF,sFAAsF;AACtF,yFAAyF;AACzF,gFAAgF;AAChF,yFAAyF;AACzF,sCAAsC;AACtC,EAAE;AACF,qFAAqF;AACrF,yFAAyF;AACzF,yFAAyF;AACzF,0CAA0C;AAC1C,EAAE;AACF,wFAAwF;AACxF,yFAAyF;AACzF,0FAA0F;AAC1F,yFAAyF;AACzF,6EAA6E;AAE7E,MAAM,CAAC,MAAM,UAAU,GAAS;;;;;;;oIAOoG,CAAC"}
@@ -4,7 +4,8 @@
4
4
  // waves rest on.
5
5
  //
6
6
  // THE PLAN IS THIS ROLE'S, START TO END. It takes the shards the architect hands down,
7
- // plans them, binds the plan when none is bound, moves each unit's state as work reaches
7
+ // plans them, binds the plan when none is bound (bind cuts the plan's line, where every
8
+ // record about the plan is then written), moves each unit's state as work reaches
8
9
  // it, closes the plan, and answers a stop by rectifying or rebuilding. What it returns to
9
10
  // the architect is names and nothing else: the architect never reads behind a name, so a
10
11
  // plan view or a spec that leaked upward would put the substrate back in the design-holder's
@@ -17,8 +18,8 @@
17
18
  // plan is re-planned here; it is never the planner that changes the design.
18
19
  export const planner = `planner ≜ reads⟨C · artifact⟩ → writes⟨spec · plan-records⟩
19
20
  stratum ≜ intent ≺ C ≺ spec ≺ artifact ⟨≺ ≜ more-abstract-than · C ≜ durative-concept-lattice⟩
20
- plan-records ≜ ⟨unit · dependency · state · plan-state⟩
21
- reserves ⟨census ⟨extant · references · resolved-by-use ¬ by-declaration⟩ · decompose ⟨shards ↦ MECE-units · unit ⇀ ONE shard · deps FIRST · effort(unit) ≤ capacity · how-per-harness ⟨plan-owned ¬ shard-owned⟩⟩ · realizes ⟨unit ⇀ anchor⟩ · sequence ⟨waves ⊨ disjoint-outputs⟩ · bind ⟨@ ratification ∧ ∄ plan-bound⟩ · record ⟨ready-unit ↦ active @ name-handed-out · unit ↦ completed @ whole⟩ · close ⟨∀ unit completed⟩ · rectify ∨ rebuild ⟨plan @ stop⟩ · reconcile ⟨plans ∧ units⟩⟩
21
+ plan-records ≜ ⟨unit · dependency · state · plan-state⟩ ⟨bound plan ↦ written @ plan-line ∀ checkout · committed ∈ integrator ¬ planner⟩
22
+ reserves ⟨census ⟨extant · references · resolved-by-use ¬ by-declaration⟩ · decompose ⟨shards ↦ MECE-units · unit ⇀ ONE shard · deps FIRST · effort(unit) ≤ capacity · how-per-harness ⟨plan-owned ¬ shard-owned⟩⟩ · realizes ⟨unit ⇀ anchor⟩ · sequence ⟨waves ⊨ disjoint-outputs⟩ · bind ⟨@ ratification ∧ ∄ plan-bound · cuts line ¬ main⟩ · record ⟨ready-unit ↦ active @ name-handed-out · unit ↦ completed @ whole⟩ · close ⟨∀ unit completed⟩ · rectify ∨ rebuild ⟨plan @ stop⟩ · reconcile ⟨plans ∧ units⟩⟩
22
23
  returns ⟨plan-name ∧ ready-unit-names⟩ ∧ ¬ spec ∨ plan-view ⟨name ≜ address · architect ¬ reads behind⟩
23
24
  state(unit) ∨ state(plan) moves ⊨ planner ⟨bind ∨ close ∨ advance · ∄ move @ implementer ∨ architect⟩
24
25
  writes ≠ C ⇒ shard GIVEN ⟨shard ¬ plannable ⇒ SURFACED ¬ redrawn · wrong-shard ⇒ plan re-planned ¬ design changed⟩
@@ -1 +1 @@
1
- {"version":3,"file":"planner.js","sourceRoot":"","sources":["../../../src/dimensions/role/planner.ts"],"names":[],"mappings":"AAEA,oFAAoF;AACpF,oFAAoF;AACpF,mFAAmF;AACnF,iBAAiB;AACjB,EAAE;AACF,uFAAuF;AACvF,yFAAyF;AACzF,0FAA0F;AAC1F,yFAAyF;AACzF,6FAA6F;AAC7F,SAAS;AACT,EAAE;AACF,qFAAqF;AACrF,mFAAmF;AACnF,sFAAsF;AACtF,sFAAsF;AACtF,4EAA4E;AAE5E,MAAM,CAAC,MAAM,OAAO,GAAS;;;;;;;yEAO4C,CAAC"}
1
+ {"version":3,"file":"planner.js","sourceRoot":"","sources":["../../../src/dimensions/role/planner.ts"],"names":[],"mappings":"AAEA,oFAAoF;AACpF,oFAAoF;AACpF,mFAAmF;AACnF,iBAAiB;AACjB,EAAE;AACF,uFAAuF;AACvF,wFAAwF;AACxF,kFAAkF;AAClF,0FAA0F;AAC1F,yFAAyF;AACzF,6FAA6F;AAC7F,SAAS;AACT,EAAE;AACF,qFAAqF;AACrF,mFAAmF;AACnF,sFAAsF;AACtF,sFAAsF;AACtF,4EAA4E;AAE5E,MAAM,CAAC,MAAM,OAAO,GAAS;;;;;;;yEAO4C,CAAC"}
@@ -2,7 +2,10 @@
2
2
  * The prime principle, as a leading `## Prime Principle` block emitted VERBATIM
3
3
  * as the first section of a SKILL.md, set as `preamble` on exactly the skills
4
4
  * whose laws apply it: those that name concepts by anchor, optimal sign or cold
5
- * decode. An agent carries the axiom through its held role's
5
+ * decode. The axiom's scope is the corpus's core agent dimension names and
6
+ * values, the terminology the cold-decode oracle was built to discover; every
7
+ * other term is the industry's own, and no consumer surface is held to the
8
+ * oracle. An agent carries the axiom through its held role's
6
9
  * engineering-principles, never through this block. The apex seed: the
7
10
  * `cratylism` ground axiom + the intrinsic-carry clause, and nothing whose truth
8
11
  * is contingent on this workspace.
@@ -3,7 +3,10 @@ import { cratylism } from '../dimensions/engineering-principles/cratylism.js';
3
3
  * The prime principle, as a leading `## Prime Principle` block emitted VERBATIM
4
4
  * as the first section of a SKILL.md, set as `preamble` on exactly the skills
5
5
  * whose laws apply it: those that name concepts by anchor, optimal sign or cold
6
- * decode. An agent carries the axiom through its held role's
6
+ * decode. The axiom's scope is the corpus's core agent dimension names and
7
+ * values, the terminology the cold-decode oracle was built to discover; every
8
+ * other term is the industry's own, and no consumer surface is held to the
9
+ * oracle. An agent carries the axiom through its held role's
7
10
  * engineering-principles, never through this block. The apex seed: the
8
11
  * `cratylism` ground axiom + the intrinsic-carry clause, and nothing whose truth
9
12
  * is contingent on this workspace.
@@ -1 +1 @@
1
- {"version":3,"file":"prime-principle.js","sourceRoot":"","sources":["../../src/genus/prime-principle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mDAAmD,CAAC;AAE9E;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;;EAE5B,SAAS;;sBAEW,CAAC"}
1
+ {"version":3,"file":"prime-principle.js","sourceRoot":"","sources":["../../src/genus/prime-principle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mDAAmD,CAAC;AAE9E;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;;EAE5B,SAAS;;sBAEW,CAAC"}
@@ -3,7 +3,7 @@
3
3
  // `hooks.ts` no longer hand-authors a `Hook` nor points at on-disk `.sh` assets —
4
4
  // it lifts the harness-substrate cells (via forge's doctrine-free `hookIrOf`) into
5
5
  // the forge `Hook` IR the projector serializes into `.claude/settings.json`
6
- // (claude adapter: `turn.end` → Stop, `subagent.end` → SubagentStop) and carries
6
+ // (claude adapter: `turn.end` → Stop) and carries
7
7
  // their VERBATIM worker payloads so the projector stages them under `hooks/<id>/`
8
8
  // (no file copy — the bytes come from the cell). Only `harness`-substrate cells
9
9
  // register in settings.json, and every surviving cell is one: the corpus's single
@@ -1 +1 @@
1
- {"version":3,"file":"hook-cells.js","sourceRoot":"","sources":["../src/hook-cells.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,2EAA2E;AAC3E,kFAAkF;AAClF,mFAAmF;AACnF,4EAA4E;AAC5E,iFAAiF;AACjF,kFAAkF;AAClF,gFAAgF;AAChF,kFAAkF;AAClF,oFAAoF;AACpF,oFAAoF;AACpF,oFAAoF;AACpF,qEAAqE;AACrE,EAAE;AACF,0EAA0E;AAC1E,iFAAiF;AACjF,oFAAoF;AACpF,iFAAiF;AACjF,+EAA+E;AAE/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAG9D,wFAAwF;AACxF,MAAM,CAAC,MAAM,gBAAgB,GAAwB;IACnD,eAAe;IACf,kBAAkB;IAClB,iBAAiB;CAClB,CAAC"}
1
+ {"version":3,"file":"hook-cells.js","sourceRoot":"","sources":["../src/hook-cells.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,2EAA2E;AAC3E,kFAAkF;AAClF,mFAAmF;AACnF,4EAA4E;AAC5E,kDAAkD;AAClD,kFAAkF;AAClF,gFAAgF;AAChF,kFAAkF;AAClF,oFAAoF;AACpF,oFAAoF;AACpF,oFAAoF;AACpF,qEAAqE;AACrE,EAAE;AACF,0EAA0E;AAC1E,iFAAiF;AACjF,oFAAoF;AACpF,iFAAiF;AACjF,+EAA+E;AAE/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAG9D,wFAAwF;AACxF,MAAM,CAAC,MAAM,gBAAgB,GAAwB;IACnD,eAAe;IACf,kBAAkB;IAClB,iBAAiB;CAClB,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { stanceGuardrailJudgeClip } from './stance-guardrail.js';
1
2
  // purview-guardrail — the gate that makes a ROLE CONTRACT scoreable.
2
3
  //
3
4
  // A role value now states the arrow the position is over the ladder
@@ -153,6 +154,14 @@ input="$(cat)"
153
154
  [ -n "$input" ] || open "the hook received no input"
154
155
  command -v jq >/dev/null 2>&1 || open "jq is not installed, so the hook payload cannot be read"
155
156
 
157
+ # A GUARD BINDS A PERSONA'S OWN MAIN SESSION AND NO SUBAGENT IT DISPATCHES. A subagent is bounded
158
+ # by what it was handed, judged by its assay and the whole check, and supervised by the main
159
+ # session. Claude Code fires this hook inside a subagent too (settings hooks and the subagent's
160
+ # own front-matter hooks), and there the payload carries \`agent_id\` — present only inside a
161
+ # subagent. A guard that does not bind there is not dark: it exits before it judges and says
162
+ # nothing.
163
+ [ -z "$(printf '%s' "$input" | jq -r '.agent_id // empty' 2>/dev/null || true)" ] || allow
164
+
156
165
  # The sibling Stop hook's deployed dir owns the SHARED judge backend, resolved from
157
166
  # this script's own location exactly as the pre-hook resolves it — every hooks root
158
167
  # holds the hook dirs as siblings, so this derivation is true at every site this file
@@ -197,6 +206,8 @@ contract="$(awk '/^## Role$/{f=1;next} /^## /{f=0} f' "$AGENT_MD" 2>/dev/null ||
197
206
  # gate from inventing a law for a corpus that has not declared one.
198
207
  [ "$(printf '%s\\n' "$contract" | grep -c '[^[:space:]]')" -ge 2 ] || allow
199
208
 
209
+ ${stanceGuardrailJudgeClip}
210
+
200
211
  # --- extract the judged payload, branched by act ---------------------------------------------
201
212
  tool_name="$(printf '%s' "$input" | jq -r '.tool_name // empty' 2>/dev/null || true)"
202
213
  [ -n "$tool_name" ] || open "the payload names no tool, so there is no call to judge"
@@ -220,11 +231,19 @@ esac
220
231
 
221
232
  [ -n "\${body:-}" ] || allow
222
233
 
223
- payload="=== THE HOLDER'S DECLARED CONTRACT (agent: $agent_type) ===
234
+ # THE JUDGE IS SENT AT MOST JUDGE_PAYLOAD_CAP BYTES, the declared contract and the act included.
235
+ # The contract is a role section a few kilobytes long, so it may hold half the cap at most; the
236
+ # dispatch prompt takes what is left, keeping both ends because its instruction may sit at either,
237
+ # and the seam is marked. The evidence check below then runs against exactly this payload, so a
238
+ # span in text the excerpt elided is discarded like any span that is not there.
239
+ contract="$(printf '%s' "$contract" | judge_ends "$((JUDGE_PAYLOAD_CAP / 2))")"
240
+ head_part="=== THE HOLDER'S DECLARED CONTRACT (agent: $agent_type) ===
224
241
  $contract
225
242
  === THE ACT ABOUT TO FIRE ===
226
243
  $act
227
- $body"
244
+ "
245
+ body="$(printf '%s' "$body" | judge_ends "$((JUDGE_PAYLOAD_CAP - $(judge_bytes "$head_part")))")"
246
+ payload="$head_part$body"
228
247
 
229
248
  # --- loop-safety: never deny an identical tool_input twice ----------------------------------
230
249
  session_id="$(printf '%s' "$input" | jq -r '.session_id // "nosession"' 2>/dev/null || echo nosession)"
@@ -1 +1 @@
1
- {"version":3,"file":"purview-guardrail.js","sourceRoot":"","sources":["../../src/hooks/purview-guardrail.ts"],"names":[],"mappings":"AAEA,qEAAqE;AACrE,EAAE;AACF,oEAAoE;AACpE,oFAAoF;AACpF,mFAAmF;AACnF,kFAAkF;AAClF,qBAAqB;AACrB,EAAE;AACF,iFAAiF;AACjF,uFAAuF;AACvF,uFAAuF;AACvF,uFAAuF;AACvF,mFAAmF;AACnF,wFAAwF;AACxF,EAAE;AACF,sFAAsF;AACtF,oFAAoF;AACpF,uFAAuF;AACvF,uFAAuF;AACvF,uFAAuF;AACvF,+EAA+E;AAC/E,sFAAsF;AACtF,yEAAyE;AACzE,EAAE;AACF,+DAA+D;AAC/D,4FAA4F;AAC5F,4FAA4F;AAC5F,0BAA0B;AAC1B,gFAAgF;AAChF,2FAA2F;AAC3F,yFAAyF;AACzF,4FAA4F;AAC5F,6FAA6F;AAC7F,yFAAyF;AACzF,yFAAyF;AACzF,8FAA8F;AAC9F,6FAA6F;AAC7F,8FAA8F;AAC9F,6FAA6F;AAC7F,yFAAyF;AACzF,yDAAyD;AACzD,EAAE;AACF,sFAAsF;AACtF,wFAAwF;AACxF,mFAAmF;AACnF,2BAA2B;AAE3B,MAAM,CAAC,MAAM,gBAAgB,GAAa;IACxC,EAAE,EAAE,mBAAmB;IACvB,OAAO,EACL,oiBAAoiB;IACtiB,SAAS,EAAE,SAAS;IACpB,iFAAiF;IACjF,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE;IAC5B,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,CAAC,uBAAuB,EAAE,cAAc,CAAC;IACjD,KAAK,EAAE,sBAAsB;IAC7B,OAAO,EAAE,EAAE;IACX,IAAI,EAAE,EAAE;IACR,OAAO,EAAE;QACP;YACE,QAAQ,EAAE,sBAAsB;YAChC,UAAU,EAAE,uDAAuD;YACnE,UAAU,EAAE,IAAI;YAChB,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmOd;SACI;QACD;YACE,QAAQ,EAAE,yBAAyB;YACnC,UAAU,EAAE,0DAA0D;YACtE,UAAU,EAAE,KAAK;YACjB,iFAAiF;YACjF,2EAA2E;YAC3E,6EAA6E;YAC7E,8EAA8E;YAC9E,6BAA6B;YAC7B,MAAM,EAAE,IAAI;YACZ,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwFd;SACI;KACF;CACF,CAAC"}
1
+ {"version":3,"file":"purview-guardrail.js","sourceRoot":"","sources":["../../src/hooks/purview-guardrail.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,qEAAqE;AACrE,EAAE;AACF,oEAAoE;AACpE,oFAAoF;AACpF,mFAAmF;AACnF,kFAAkF;AAClF,qBAAqB;AACrB,EAAE;AACF,iFAAiF;AACjF,uFAAuF;AACvF,uFAAuF;AACvF,uFAAuF;AACvF,mFAAmF;AACnF,wFAAwF;AACxF,EAAE;AACF,sFAAsF;AACtF,oFAAoF;AACpF,uFAAuF;AACvF,uFAAuF;AACvF,uFAAuF;AACvF,+EAA+E;AAC/E,sFAAs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E;YAC3E,6EAA6E;YAC7E,8EAA8E;YAC9E,6BAA6B;YAC7B,MAAM,EAAE,IAAI;YACZ,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwFd;SACI;KACF;CACF,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { anchorOf } from '@cratylus/schema';
2
2
  import { handoff } from '../dimensions/autonomy/handoff.js';
3
+ import { stanceGuardrailJudgeClip } from './stance-guardrail.js';
3
4
  // stance-guardrail-pre — the BEFORE-THE-CALL twin of `stance-guardrail` (the turn-end
4
5
  // cell). It STRUCTURALLY REFUSES, BEFORE the call fires, a mid-turn tool call that
5
6
  // collapses out of the intent-driven-expert stance. Two acts, and the acts are what it
@@ -49,7 +50,8 @@ export const stanceGuardrailPre = {
49
50
  # - AskUserQuestion : a permission / option-menu on an in-remit reversible call
50
51
  # - Agent/SendMessage : a dispatch transcribing literal words without extracted intent
51
52
  # WHAT IT DOES NOT DENY (reserved): an irreversible-outward consent menu, a true INTENT
52
- # ambiguity, a substantive intent-extracted dispatch.
53
+ # ambiguity, a substantive intent-extracted dispatch, a unit or a closed plan routed by name (the
54
+ # intent lives in the spec at that address).
53
55
  #
54
56
  # SAFETY MODEL (mirrors stance-guardrail):
55
57
  # - SCOPE-ENROLLED, exactly as its twin: a scope carrying a stance manifest is judged and
@@ -64,8 +66,8 @@ export const stanceGuardrailPre = {
64
66
  # identical call goes through unjudged, and says so.
65
67
  # - OBSERVABLE. Every notice is also a line in the miss log.
66
68
  #
67
- # INPUT : Claude Code PreToolUse hook JSON on stdin (tool_name, tool_input, agent_type
68
- # [subagents], session_id, cwd, ...).
69
+ # INPUT : Claude Code PreToolUse hook JSON on stdin (tool_name, tool_input, agent_type,
70
+ # session_id, cwd, ...).
69
71
  # OUTPUT : on collapse -> stdout
70
72
  # {"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"deny",
71
73
  # "permissionDecisionReason":"..."}} + exit 0.
@@ -134,6 +136,14 @@ input="$(cat)"
134
136
  [ -n "$input" ] || open "the hook received no input"
135
137
  command -v jq >/dev/null 2>&1 || open "jq is not installed, so the hook payload cannot be read"
136
138
 
139
+ # A GUARD BINDS A PERSONA'S OWN MAIN SESSION AND NO SUBAGENT IT DISPATCHES. A subagent is bounded
140
+ # by what it was handed, judged by its assay and the whole check, and supervised by the main
141
+ # session. Claude Code fires this hook inside a subagent too (settings hooks and the subagent's
142
+ # own front-matter hooks), and there the payload carries \`agent_id\` — present only inside a
143
+ # subagent. A guard that does not bind there is not dark: it exits before it judges and says
144
+ # nothing.
145
+ [ -z "$(printf '%s' "$input" | jq -r '.agent_id // empty' 2>/dev/null || true)" ] || allow
146
+
137
147
  # The sibling Stop hook's deployed dir owns the SHARED judge + rubric (deployed
138
148
  # together, as siblings under the SAME hooks root).
139
149
  #
@@ -180,6 +190,8 @@ manifest="$stance_scope/{{fact:stance-manifest}}"
180
190
  [ -f "$manifest" ] || allow
181
191
  agent_type="$(jq -r '.agent // empty' "$manifest" 2>/dev/null || true)"
182
192
 
193
+ ${stanceGuardrailJudgeClip}
194
+
183
195
  # --- extract the judged payload, branched by tool -------------------------------------------
184
196
  tool_name="$(printf '%s' "$input" | jq -r '.tool_name // empty' 2>/dev/null || true)"
185
197
  [ -n "$tool_name" ] || open "the payload names no tool, so there is no call to judge"
@@ -193,11 +205,11 @@ case "$tool_name" in
193
205
  + " OPTIONS: " + ((.options // []) | map(.label // "") | join(" | ")))
194
206
  | join(" ;; ")
195
207
  ' 2>/dev/null || true)"
196
- payload="AskUserQuestion menu (a question/option menu handed to the operator): $body" ;;
208
+ prefix="AskUserQuestion menu (a question/option menu handed to the operator): " ;;
197
209
  Agent|SendMessage)
198
210
  # the dispatch prompt/message — the dispatch-echo class
199
211
  body="$(printf '%s' "$input" | jq -r '.tool_input.prompt // .tool_input.message // .tool_input.description // ""' 2>/dev/null || true)"
200
- payload="$tool_name dispatch (the delegate prompt/message): $body" ;;
212
+ prefix="$tool_name dispatch (the delegate prompt/message): " ;;
201
213
  *)
202
214
  allow ;; # DEFENCE IN DEPTH: every supported adapter computes a selector from the
203
215
  # act, so this never fires there. A harness that could fire the act but
@@ -207,6 +219,12 @@ esac
207
219
 
208
220
  [ -n "\${body:-}" ] || allow # nothing judgeable -> allow
209
221
 
222
+ # THE JUDGE IS SENT AT MOST JUDGE_PAYLOAD_CAP BYTES, prefix included: a menu or a dispatch prompt
223
+ # has no bound of its own, and a judgement has to fit the time the harness allows a guard. The
224
+ # instruction of a prompt may sit at either end, so both ends are kept and the seam is marked.
225
+ body="$(printf '%s' "$body" | judge_ends "$((JUDGE_PAYLOAD_CAP - $(judge_bytes "$prefix")))")"
226
+ payload="$prefix$body"
227
+
210
228
  # --- loop-safety: never deny an identical tool_input twice ----------------------------------
211
229
  # No stop_hook_active analog exists for PreToolUse; a per-(session,input) marker caps re-deny.
212
230
  session_id="$(printf '%s' "$input" | jq -r '.session_id // "nosession"' 2>/dev/null || echo nosession)"
@@ -247,8 +265,8 @@ feedback="STANCE GUARDRAIL (pre) — denied this $tool_name call: it collapses o
247
265
  intent-driven-expert stance. $reason Own the in-remit reversible call yourself instead of handing the \\
248
266
  operator a menu; extract and serve the underlying INTENT instead of transcribing literal words into a \\
249
267
  dispatch. Decide, note the call for review, and proceed. (Legitimate exceptions that should NOT be a menu \\
250
- here: a genuine irreversible-outward consent choice, a true INTENT ambiguity for /elicit, or a substantive \\
251
- intent-extracted dispatch.)"
268
+ here: a genuine irreversible-outward consent choice, a true INTENT ambiguity for /elicit, a substantive \\
269
+ intent-extracted dispatch, or a unit or a closed plan routed by name, whose intent lives in its spec.)"
252
270
 
253
271
  jq -cn --arg r "$feedback" '{hookSpecificOutput:{hookEventName:"PreToolUse",permissionDecision:"deny",permissionDecisionReason:$r}}'
254
272
  exit 0
@@ -1 +1 @@
1
- {"version":3,"file":"stance-guardrail-pre.js","sourceRoot":"","sources":["../../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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsJb,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgFzB;SACI;KACF;CACF,CAAC"}
@@ -1,2 +1,4 @@
1
1
  import type { HookCell } from '../manifest.js';
2
2
  export declare const stanceGuardrail: HookCell;
3
+ export declare const stanceGuardrailJudgeCap = 12000;
4
+ export declare const stanceGuardrailJudgeClip: string;