@eir-labs/coltrane 0.7.5 → 0.8.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 (77) hide show
  1. package/agents/change-verifier.json +40 -0
  2. package/agents/code-implementer.json +42 -0
  3. package/agents/contract-definer.json +31 -0
  4. package/agents/defect-investigator.json +60 -0
  5. package/agents/grounder.json +38 -0
  6. package/agents/pr-publisher.json +48 -0
  7. package/agents/red-spec-drafter.json +46 -0
  8. package/agents/spec-publisher.json +48 -0
  9. package/agents/spec-reviewer.json +32 -0
  10. package/dist/src/bifrost_invoker.js +53 -52
  11. package/dist/src/bifrost_invoker.js.map +1 -1
  12. package/dist/src/change_set_branch.d.ts +131 -0
  13. package/dist/src/change_set_branch.js +179 -0
  14. package/dist/src/change_set_branch.js.map +1 -0
  15. package/dist/src/claude_invoker.d.ts +79 -2
  16. package/dist/src/claude_invoker.js +377 -36
  17. package/dist/src/claude_invoker.js.map +1 -1
  18. package/dist/src/cli.d.ts +1 -1
  19. package/dist/src/cli.js +26 -3
  20. package/dist/src/cli.js.map +1 -1
  21. package/dist/src/composition.d.ts +11 -0
  22. package/dist/src/composition.js +3 -1
  23. package/dist/src/composition.js.map +1 -1
  24. package/dist/src/genome_schema.d.ts +473 -12
  25. package/dist/src/genome_schema.js +269 -5
  26. package/dist/src/genome_schema.js.map +1 -1
  27. package/dist/src/genome_store.d.ts +16 -1
  28. package/dist/src/genome_store.js +68 -0
  29. package/dist/src/genome_store.js.map +1 -1
  30. package/dist/src/gig_tracker.js +4 -0
  31. package/dist/src/gig_tracker.js.map +1 -1
  32. package/dist/src/hosted_tools.js +19 -0
  33. package/dist/src/hosted_tools.js.map +1 -1
  34. package/dist/src/institution_enforcement.d.ts +68 -0
  35. package/dist/src/institution_enforcement.js +417 -0
  36. package/dist/src/institution_enforcement.js.map +1 -0
  37. package/dist/src/institution_loader.d.ts +43 -0
  38. package/dist/src/institution_loader.js +157 -0
  39. package/dist/src/institution_loader.js.map +1 -0
  40. package/dist/src/loader.d.ts +3 -1
  41. package/dist/src/loader.js +12 -1
  42. package/dist/src/loader.js.map +1 -1
  43. package/dist/src/mcp.js +8 -1
  44. package/dist/src/mcp.js.map +1 -1
  45. package/dist/src/runtime.d.ts +66 -0
  46. package/dist/src/runtime.js +202 -2
  47. package/dist/src/runtime.js.map +1 -1
  48. package/dist/src/server.d.ts +7 -0
  49. package/dist/src/server.js +90 -1
  50. package/dist/src/server.js.map +1 -1
  51. package/dist/src/venue_realize.d.ts +90 -0
  52. package/dist/src/venue_realize.js +129 -0
  53. package/dist/src/venue_realize.js.map +1 -0
  54. package/dist/src/version.d.ts +1 -1
  55. package/dist/src/version.js +1 -1
  56. package/dist/src/worker.d.ts +45 -3
  57. package/dist/src/worker.js +67 -2
  58. package/dist/src/worker.js.map +1 -1
  59. package/domain_types/change-request.json +2 -1
  60. package/domain_types/class-sweep.json +34 -0
  61. package/domain_types/defect-class.json +25 -0
  62. package/domain_types/defect-location.json +28 -0
  63. package/domain_types/defect-report.json +28 -0
  64. package/domain_types/fix-spec.json +28 -0
  65. package/domain_types/fix-verification.json +28 -0
  66. package/domain_types/grounding-dossier.json +95 -0
  67. package/domain_types/pull-request.json +43 -0
  68. package/domain_types/red-spec.json +76 -0
  69. package/domain_types/reproduction.json +28 -0
  70. package/domain_types/root-cause.json +28 -0
  71. package/domain_types/subsystem-contract.json +106 -0
  72. package/institutions/coltrane.json +166 -0
  73. package/institutions/quartet.json +183 -26
  74. package/package.json +2 -1
  75. package/standards/defect-investigation-v1.json +156 -0
  76. package/standards/software-change-pr-v1.json +151 -0
  77. package/standards/spec-drafting-v1.json +125 -0
@@ -541,6 +541,18 @@ export declare const ChairSchema: z.ZodObject<{
541
541
  * value that fills it. An institution-bound `required` slot on a skill the seated agent holds
542
542
  * and nothing here (or on the institutional chair) fills is refused at compose. */
543
543
  supplies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
544
+ /** The guaranteed turn floor, declared on the WORK (the chair) rather than the player (the
545
+ * agent's `max_tool_calls`). Resolves chair > agent > engine default at invocation. OPTIONAL
546
+ * so every existing chair record parses byte-equivalent — a Zod object DROPS an undeclared key,
547
+ * so the field must be declared here to be RETAINED. A non-negative INTEGER: a negative or
548
+ * non-integer cap fails closed at load, never reaching resolution. 0 is a deliberate hard floor,
549
+ * parsed as 0 and kept DISTINCT from absent (which falls through to the agent tier). */
550
+ turn_budget: z.ZodOptional<z.ZodNumber>;
551
+ /** The per-chair elasticity ceiling on the shared per-gig reserve pool: the most this chair may
552
+ * ever draw when it exhausts its budget — no theft even when the pool is larger. Same additive,
553
+ * fail-closed, integer discipline as `turn_budget`. May be declared WITHOUT `turn_budget`: the
554
+ * budget then falls through the resolution tiers while the reserve still bounds the draw. */
555
+ turn_reserve: z.ZodOptional<z.ZodNumber>;
544
556
  }, "strip", z.ZodTypeAny, {
545
557
  role: string;
546
558
  depends_on: string[];
@@ -553,6 +565,8 @@ export declare const ChairSchema: z.ZodObject<{
553
565
  skill_slug?: string | undefined;
554
566
  human?: boolean | undefined;
555
567
  supplies?: Record<string, unknown> | undefined;
568
+ turn_budget?: number | undefined;
569
+ turn_reserve?: number | undefined;
556
570
  }, {
557
571
  role: string;
558
572
  agent_slug?: string | undefined;
@@ -565,6 +579,8 @@ export declare const ChairSchema: z.ZodObject<{
565
579
  required_skills?: string[] | undefined;
566
580
  preferred_skills?: string[] | undefined;
567
581
  supplies?: Record<string, unknown> | undefined;
582
+ turn_budget?: number | undefined;
583
+ turn_reserve?: number | undefined;
568
584
  }>;
569
585
  export declare const PhaseSchema: z.ZodObject<{
570
586
  name: z.ZodString;
@@ -593,6 +609,18 @@ export declare const PhaseSchema: z.ZodObject<{
593
609
  * value that fills it. An institution-bound `required` slot on a skill the seated agent holds
594
610
  * and nothing here (or on the institutional chair) fills is refused at compose. */
595
611
  supplies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
612
+ /** The guaranteed turn floor, declared on the WORK (the chair) rather than the player (the
613
+ * agent's `max_tool_calls`). Resolves chair > agent > engine default at invocation. OPTIONAL
614
+ * so every existing chair record parses byte-equivalent — a Zod object DROPS an undeclared key,
615
+ * so the field must be declared here to be RETAINED. A non-negative INTEGER: a negative or
616
+ * non-integer cap fails closed at load, never reaching resolution. 0 is a deliberate hard floor,
617
+ * parsed as 0 and kept DISTINCT from absent (which falls through to the agent tier). */
618
+ turn_budget: z.ZodOptional<z.ZodNumber>;
619
+ /** The per-chair elasticity ceiling on the shared per-gig reserve pool: the most this chair may
620
+ * ever draw when it exhausts its budget — no theft even when the pool is larger. Same additive,
621
+ * fail-closed, integer discipline as `turn_budget`. May be declared WITHOUT `turn_budget`: the
622
+ * budget then falls through the resolution tiers while the reserve still bounds the draw. */
623
+ turn_reserve: z.ZodOptional<z.ZodNumber>;
596
624
  }, "strip", z.ZodTypeAny, {
597
625
  role: string;
598
626
  depends_on: string[];
@@ -605,6 +633,8 @@ export declare const PhaseSchema: z.ZodObject<{
605
633
  skill_slug?: string | undefined;
606
634
  human?: boolean | undefined;
607
635
  supplies?: Record<string, unknown> | undefined;
636
+ turn_budget?: number | undefined;
637
+ turn_reserve?: number | undefined;
608
638
  }, {
609
639
  role: string;
610
640
  agent_slug?: string | undefined;
@@ -617,6 +647,8 @@ export declare const PhaseSchema: z.ZodObject<{
617
647
  required_skills?: string[] | undefined;
618
648
  preferred_skills?: string[] | undefined;
619
649
  supplies?: Record<string, unknown> | undefined;
650
+ turn_budget?: number | undefined;
651
+ turn_reserve?: number | undefined;
620
652
  }>, "many">;
621
653
  }, "strip", z.ZodTypeAny, {
622
654
  name: string;
@@ -632,6 +664,8 @@ export declare const PhaseSchema: z.ZodObject<{
632
664
  skill_slug?: string | undefined;
633
665
  human?: boolean | undefined;
634
666
  supplies?: Record<string, unknown> | undefined;
667
+ turn_budget?: number | undefined;
668
+ turn_reserve?: number | undefined;
635
669
  }[];
636
670
  }, {
637
671
  name: string;
@@ -647,6 +681,8 @@ export declare const PhaseSchema: z.ZodObject<{
647
681
  required_skills?: string[] | undefined;
648
682
  preferred_skills?: string[] | undefined;
649
683
  supplies?: Record<string, unknown> | undefined;
684
+ turn_budget?: number | undefined;
685
+ turn_reserve?: number | undefined;
650
686
  }[];
651
687
  }>;
652
688
  /** Lifecycle status, shared by domain types and standards (#203). */
@@ -684,6 +720,18 @@ export declare const StandardSchema: z.ZodObject<{
684
720
  * value that fills it. An institution-bound `required` slot on a skill the seated agent holds
685
721
  * and nothing here (or on the institutional chair) fills is refused at compose. */
686
722
  supplies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
723
+ /** The guaranteed turn floor, declared on the WORK (the chair) rather than the player (the
724
+ * agent's `max_tool_calls`). Resolves chair > agent > engine default at invocation. OPTIONAL
725
+ * so every existing chair record parses byte-equivalent — a Zod object DROPS an undeclared key,
726
+ * so the field must be declared here to be RETAINED. A non-negative INTEGER: a negative or
727
+ * non-integer cap fails closed at load, never reaching resolution. 0 is a deliberate hard floor,
728
+ * parsed as 0 and kept DISTINCT from absent (which falls through to the agent tier). */
729
+ turn_budget: z.ZodOptional<z.ZodNumber>;
730
+ /** The per-chair elasticity ceiling on the shared per-gig reserve pool: the most this chair may
731
+ * ever draw when it exhausts its budget — no theft even when the pool is larger. Same additive,
732
+ * fail-closed, integer discipline as `turn_budget`. May be declared WITHOUT `turn_budget`: the
733
+ * budget then falls through the resolution tiers while the reserve still bounds the draw. */
734
+ turn_reserve: z.ZodOptional<z.ZodNumber>;
687
735
  }, "strip", z.ZodTypeAny, {
688
736
  role: string;
689
737
  depends_on: string[];
@@ -696,6 +744,8 @@ export declare const StandardSchema: z.ZodObject<{
696
744
  skill_slug?: string | undefined;
697
745
  human?: boolean | undefined;
698
746
  supplies?: Record<string, unknown> | undefined;
747
+ turn_budget?: number | undefined;
748
+ turn_reserve?: number | undefined;
699
749
  }, {
700
750
  role: string;
701
751
  agent_slug?: string | undefined;
@@ -708,6 +758,8 @@ export declare const StandardSchema: z.ZodObject<{
708
758
  required_skills?: string[] | undefined;
709
759
  preferred_skills?: string[] | undefined;
710
760
  supplies?: Record<string, unknown> | undefined;
761
+ turn_budget?: number | undefined;
762
+ turn_reserve?: number | undefined;
711
763
  }>, "many">;
712
764
  }, "strip", z.ZodTypeAny, {
713
765
  name: string;
@@ -723,6 +775,8 @@ export declare const StandardSchema: z.ZodObject<{
723
775
  skill_slug?: string | undefined;
724
776
  human?: boolean | undefined;
725
777
  supplies?: Record<string, unknown> | undefined;
778
+ turn_budget?: number | undefined;
779
+ turn_reserve?: number | undefined;
726
780
  }[];
727
781
  }, {
728
782
  name: string;
@@ -738,6 +792,8 @@ export declare const StandardSchema: z.ZodObject<{
738
792
  required_skills?: string[] | undefined;
739
793
  preferred_skills?: string[] | undefined;
740
794
  supplies?: Record<string, unknown> | undefined;
795
+ turn_budget?: number | undefined;
796
+ turn_reserve?: number | undefined;
741
797
  }[];
742
798
  }>, "many">;
743
799
  eval_slugs: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString, "many">>>;
@@ -745,6 +801,11 @@ export declare const StandardSchema: z.ZodObject<{
745
801
  output_types: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString, "many">>>;
746
802
  max_examine_rounds: z.ZodOptional<z.ZodNumber>;
747
803
  description: z.ZodOptional<z.ZodString>;
804
+ /** The DEFAULT gig-level reserve pool: a per-gig quantity of turns a budget-exhausted chair may
805
+ * draw from, capped per chair by its own `turn_reserve`. The DISPATCH payload's `pool` (on the
806
+ * budget input) is the primary source and OVERRIDES this default deterministically when both are
807
+ * present (no max, no sum). Optional + non-negative integer, additive like the chair fields. */
808
+ reserve_pool: z.ZodOptional<z.ZodNumber>;
748
809
  }, "strip", z.ZodTypeAny, {
749
810
  slug: string;
750
811
  domain: string;
@@ -762,6 +823,8 @@ export declare const StandardSchema: z.ZodObject<{
762
823
  skill_slug?: string | undefined;
763
824
  human?: boolean | undefined;
764
825
  supplies?: Record<string, unknown> | undefined;
826
+ turn_budget?: number | undefined;
827
+ turn_reserve?: number | undefined;
765
828
  }[];
766
829
  }[];
767
830
  status?: "active" | "retired" | "deprecated" | undefined;
@@ -772,6 +835,7 @@ export declare const StandardSchema: z.ZodObject<{
772
835
  agent_slugs?: string[] | undefined;
773
836
  eval_slugs?: readonly string[] | undefined;
774
837
  max_examine_rounds?: number | undefined;
838
+ reserve_pool?: number | undefined;
775
839
  }, {
776
840
  slug: string;
777
841
  domain: string;
@@ -789,6 +853,8 @@ export declare const StandardSchema: z.ZodObject<{
789
853
  required_skills?: string[] | undefined;
790
854
  preferred_skills?: string[] | undefined;
791
855
  supplies?: Record<string, unknown> | undefined;
856
+ turn_budget?: number | undefined;
857
+ turn_reserve?: number | undefined;
792
858
  }[];
793
859
  }[];
794
860
  status?: "active" | "retired" | "deprecated" | undefined;
@@ -799,6 +865,7 @@ export declare const StandardSchema: z.ZodObject<{
799
865
  agent_slugs?: string[] | undefined;
800
866
  eval_slugs?: readonly string[] | undefined;
801
867
  max_examine_rounds?: number | undefined;
868
+ reserve_pool?: number | undefined;
802
869
  }>;
803
870
  export type StandardInput = z.input<typeof StandardSchema>;
804
871
  export type StandardOutput = z.output<typeof StandardSchema>;
@@ -882,12 +949,352 @@ export declare const LineageRecordRefSchema: z.ZodObject<{
882
949
  sealed_at?: string | undefined;
883
950
  }>;
884
951
  export type LineageRecordRefOutput = z.output<typeof LineageRecordRefSchema>;
952
+ /** A CITATION of external published work, shaped so it can be checked rather than admired.
953
+ *
954
+ * The genome had no way to say "this schema class implements that paper." `ForebearSchema` is
955
+ * person-shaped (it carries a working disposition taken from a named figure, not a bibliographic
956
+ * record) and `LineageEdgeSchema.source` is `z.record(z.unknown())`, so a presence check on it
957
+ * passes on `{}`. The gate in `default_genome_quartet.test.ts` already states the bar — "an
958
+ * uncited attribution is a claim, not a record" — but had no shape able to enforce it.
959
+ *
960
+ * The refinement below is the citation's analogue of `InstitutionalLawCheckSchema`: an
961
+ * institutional law is authorable only if it reduces to an evaluable predicate over typed inputs,
962
+ * and a citation stands only if it reduces to a resolvable identifier. Prose that cannot be
963
+ * checked does not get to be a record — same refusal, same grounds, both enforced at authorship.
964
+ *
965
+ * `evidence_grade` types the distinction the diplomatics tradition draws and this codebase had
966
+ * only ever narrated: ARCHIVE — the primary was fetched, and `retrieved_at` says when — versus
967
+ * ATTESTATION — someone declared it. The grade is recorded and never laundered upward. */
968
+ export declare const CitationSchema: z.ZodEffects<z.ZodObject<{
969
+ /** Author names as cited, e.g. "Crawford, S.E.S.". At least one — an anonymous citation is a rumour. */
970
+ authors: z.ZodArray<z.ZodString, "many">;
971
+ year: z.ZodNumber;
972
+ title: z.ZodString;
973
+ /** Journal, publisher, or conference. */
974
+ venue: z.ZodString;
975
+ /** Volume/issue/pages or equivalent, e.g. "89(3): 582–600". */
976
+ locator: z.ZodOptional<z.ZodString>;
977
+ doi: z.ZodOptional<z.ZodString>;
978
+ url: z.ZodOptional<z.ZodString>;
979
+ /** ARCHIVE = the primary was fetched. ATTESTATION = it was declared. Never laundered upward. */
980
+ evidence_grade: z.ZodEnum<["archive", "attestation"]>;
981
+ /** When the primary was fetched. An archive-grade claim is a claim about a fetch that happened. */
982
+ retrieved_at: z.ZodOptional<z.ZodString>;
983
+ }, "strict", z.ZodTypeAny, {
984
+ authors: string[];
985
+ year: number;
986
+ title: string;
987
+ venue: string;
988
+ evidence_grade: "archive" | "attestation";
989
+ locator?: string | undefined;
990
+ doi?: string | undefined;
991
+ url?: string | undefined;
992
+ retrieved_at?: string | undefined;
993
+ }, {
994
+ authors: string[];
995
+ year: number;
996
+ title: string;
997
+ venue: string;
998
+ evidence_grade: "archive" | "attestation";
999
+ locator?: string | undefined;
1000
+ doi?: string | undefined;
1001
+ url?: string | undefined;
1002
+ retrieved_at?: string | undefined;
1003
+ }>, {
1004
+ authors: string[];
1005
+ year: number;
1006
+ title: string;
1007
+ venue: string;
1008
+ evidence_grade: "archive" | "attestation";
1009
+ locator?: string | undefined;
1010
+ doi?: string | undefined;
1011
+ url?: string | undefined;
1012
+ retrieved_at?: string | undefined;
1013
+ }, {
1014
+ authors: string[];
1015
+ year: number;
1016
+ title: string;
1017
+ venue: string;
1018
+ evidence_grade: "archive" | "attestation";
1019
+ locator?: string | undefined;
1020
+ doi?: string | undefined;
1021
+ url?: string | undefined;
1022
+ retrieved_at?: string | undefined;
1023
+ }>;
1024
+ /** How a genome schema class stands to the published work behind it.
1025
+ *
1026
+ * Deliberately NOT `LineageEdgeTypeSchema`. That enum is the CAPABILITY vocabulary — "Caps grant
1027
+ * these" — and widening it to fit scholarship would widen what a capability grant can scope. The
1028
+ * two are different acts: `anchored-in` says nothing about a paper, `diverges-from` says nothing
1029
+ * as a permission. This enum mirrors the `lineage-map` domain type's relations exactly, so a
1030
+ * lineage pass's connection becomes an attribution with no translation step and no finding that
1031
+ * the genome cannot write down.
1032
+ *
1033
+ * `diverges-from` is load-bearing, not decorative: this codebase HAS a deliberate divergence
1034
+ * (chair obligations are stated and never verified, against Fuller's congruence principle), and a
1035
+ * vocabulary that can only express descent would force that either into silence or into a false
1036
+ * claim of alignment. */
1037
+ export declare const AttributionRelationSchema: z.ZodEnum<["descends-from", "aligns-with", "diverges-from", "supersedes", "informed-by"]>;
1038
+ /** Binds one genome schema class to the published work behind it. `what_taken` keeps
1039
+ * `ForebearSchema`'s word: an attribution names what was taken, not merely what was read. */
1040
+ export declare const SchemaAttributionSchema: z.ZodObject<{
1041
+ /** The attributed schema class, by its exported name, e.g. "InstitutionalLawSchema". */
1042
+ subject: z.ZodString;
1043
+ relation: z.ZodEnum<["descends-from", "aligns-with", "diverges-from", "supersedes", "informed-by"]>;
1044
+ what_taken: z.ZodString;
1045
+ citation: z.ZodEffects<z.ZodObject<{
1046
+ /** Author names as cited, e.g. "Crawford, S.E.S.". At least one — an anonymous citation is a rumour. */
1047
+ authors: z.ZodArray<z.ZodString, "many">;
1048
+ year: z.ZodNumber;
1049
+ title: z.ZodString;
1050
+ /** Journal, publisher, or conference. */
1051
+ venue: z.ZodString;
1052
+ /** Volume/issue/pages or equivalent, e.g. "89(3): 582–600". */
1053
+ locator: z.ZodOptional<z.ZodString>;
1054
+ doi: z.ZodOptional<z.ZodString>;
1055
+ url: z.ZodOptional<z.ZodString>;
1056
+ /** ARCHIVE = the primary was fetched. ATTESTATION = it was declared. Never laundered upward. */
1057
+ evidence_grade: z.ZodEnum<["archive", "attestation"]>;
1058
+ /** When the primary was fetched. An archive-grade claim is a claim about a fetch that happened. */
1059
+ retrieved_at: z.ZodOptional<z.ZodString>;
1060
+ }, "strict", z.ZodTypeAny, {
1061
+ authors: string[];
1062
+ year: number;
1063
+ title: string;
1064
+ venue: string;
1065
+ evidence_grade: "archive" | "attestation";
1066
+ locator?: string | undefined;
1067
+ doi?: string | undefined;
1068
+ url?: string | undefined;
1069
+ retrieved_at?: string | undefined;
1070
+ }, {
1071
+ authors: string[];
1072
+ year: number;
1073
+ title: string;
1074
+ venue: string;
1075
+ evidence_grade: "archive" | "attestation";
1076
+ locator?: string | undefined;
1077
+ doi?: string | undefined;
1078
+ url?: string | undefined;
1079
+ retrieved_at?: string | undefined;
1080
+ }>, {
1081
+ authors: string[];
1082
+ year: number;
1083
+ title: string;
1084
+ venue: string;
1085
+ evidence_grade: "archive" | "attestation";
1086
+ locator?: string | undefined;
1087
+ doi?: string | undefined;
1088
+ url?: string | undefined;
1089
+ retrieved_at?: string | undefined;
1090
+ }, {
1091
+ authors: string[];
1092
+ year: number;
1093
+ title: string;
1094
+ venue: string;
1095
+ evidence_grade: "archive" | "attestation";
1096
+ locator?: string | undefined;
1097
+ doi?: string | undefined;
1098
+ url?: string | undefined;
1099
+ retrieved_at?: string | undefined;
1100
+ }>;
1101
+ }, "strict", z.ZodTypeAny, {
1102
+ subject: string;
1103
+ relation: "descends-from" | "aligns-with" | "diverges-from" | "supersedes" | "informed-by";
1104
+ what_taken: string;
1105
+ citation: {
1106
+ authors: string[];
1107
+ year: number;
1108
+ title: string;
1109
+ venue: string;
1110
+ evidence_grade: "archive" | "attestation";
1111
+ locator?: string | undefined;
1112
+ doi?: string | undefined;
1113
+ url?: string | undefined;
1114
+ retrieved_at?: string | undefined;
1115
+ };
1116
+ }, {
1117
+ subject: string;
1118
+ relation: "descends-from" | "aligns-with" | "diverges-from" | "supersedes" | "informed-by";
1119
+ what_taken: string;
1120
+ citation: {
1121
+ authors: string[];
1122
+ year: number;
1123
+ title: string;
1124
+ venue: string;
1125
+ evidence_grade: "archive" | "attestation";
1126
+ locator?: string | undefined;
1127
+ doi?: string | undefined;
1128
+ url?: string | undefined;
1129
+ retrieved_at?: string | undefined;
1130
+ };
1131
+ }>;
1132
+ export type AttributionRelation = z.output<typeof AttributionRelationSchema>;
1133
+ export type CitationOutput = z.output<typeof CitationSchema>;
1134
+ export type SchemaAttributionOutput = z.output<typeof SchemaAttributionSchema>;
1135
+ /** An institutional LAW as an invocable, machine-checkable contract rather than prose.
1136
+ *
1137
+ * Descends from Crawford, S.E.S. & Ostrom, E. (1995), "A Grammar of Institutions," American
1138
+ * Political Science Review 89(3): 582–600, doi:10.2307/2082975 — the ADICO grammar: Attributes
1139
+ * (who it binds), Deontic (permitted | obliged | forbidden), aIm (the action or state governed),
1140
+ * Conditions (when it applies), Or-else (the consequence on breach). Or-else is the slot that
1141
+ * separates a RULE (ADICO) from a norm (ADIC) and a strategy (AIC), which is why it is required
1142
+ * here: a statement with no consequence on breach is not a law in this genome. The formal
1143
+ * attribution is carried as data in GENOME_ATTRIBUTIONS below, not only in this comment.
1144
+ * `check` is the machine-checkable surface: a normalized, serializable predicate an evaluator can
1145
+ * invoke plus the typed inputs it reads (design-by-contract). The evaluator that RUNS the
1146
+ * predicate is a follow-on; this is the shape it consumes. STRICT: an ADICO record with an unknown
1147
+ * field fails to parse. Each law carries its OWN `content_hash` (over its canonical ADICO
1148
+ * content), which canonical_form.ts already lists in EXCLUDED_FIELDS, so a law never moves the
1149
+ * institution's structural genome_hash — laws are hashed as content, not folded into structure. */
1150
+ export declare const DeonticSchema: z.ZodEnum<["permitted", "obliged", "forbidden"]>;
1151
+ export declare const InstitutionalLawCheckSchema: z.ZodObject<{
1152
+ /** A normalized, serializable predicate (e.g. an s-expression) an evaluator invokes. */
1153
+ predicate: z.ZodString;
1154
+ /** The typed inputs the predicate reads: input name → its type name. */
1155
+ inputs: z.ZodRecord<z.ZodString, z.ZodString>;
1156
+ }, "strict", z.ZodTypeAny, {
1157
+ predicate: string;
1158
+ inputs: Record<string, string>;
1159
+ }, {
1160
+ predicate: string;
1161
+ inputs: Record<string, string>;
1162
+ }>;
1163
+ export declare const InstitutionalLawSchema: z.ZodObject<{
1164
+ attributes: z.ZodString;
1165
+ deontic: z.ZodEnum<["permitted", "obliged", "forbidden"]>;
1166
+ aim: z.ZodString;
1167
+ conditions: z.ZodString;
1168
+ or_else: z.ZodString;
1169
+ check: z.ZodObject<{
1170
+ /** A normalized, serializable predicate (e.g. an s-expression) an evaluator invokes. */
1171
+ predicate: z.ZodString;
1172
+ /** The typed inputs the predicate reads: input name → its type name. */
1173
+ inputs: z.ZodRecord<z.ZodString, z.ZodString>;
1174
+ }, "strict", z.ZodTypeAny, {
1175
+ predicate: string;
1176
+ inputs: Record<string, string>;
1177
+ }, {
1178
+ predicate: string;
1179
+ inputs: Record<string, string>;
1180
+ }>;
1181
+ content_hash: z.ZodString;
1182
+ }, "strict", z.ZodTypeAny, {
1183
+ attributes: string;
1184
+ deontic: "permitted" | "obliged" | "forbidden";
1185
+ aim: string;
1186
+ conditions: string;
1187
+ or_else: string;
1188
+ check: {
1189
+ predicate: string;
1190
+ inputs: Record<string, string>;
1191
+ };
1192
+ content_hash: string;
1193
+ }, {
1194
+ attributes: string;
1195
+ deontic: "permitted" | "obliged" | "forbidden";
1196
+ aim: string;
1197
+ conditions: string;
1198
+ or_else: string;
1199
+ check: {
1200
+ predicate: string;
1201
+ inputs: Record<string, string>;
1202
+ };
1203
+ content_hash: string;
1204
+ }>;
1205
+ /** A chair OBLIGATION as a deontic NORM PAIR — the deliberate structural SUBSET of ADICO the
1206
+ * change-request specifies for obligations: who it binds (`attributes`) and the action or state
1207
+ * governed (`aim`), with `deontic` defaulting to `obliged` (an obligation is obliged unless it
1208
+ * says otherwise). Not the full law: conditions / or_else / check are institution-level, not a
1209
+ * burden every chair obligation carries.
1210
+ *
1211
+ * The pair is I/O logic's — Makinson, D. & van der Torre, L. (2000), "Input/Output Logics,"
1212
+ * Journal of Philosophical Logic 29(4): 383–408, doi:10.1023/A:1004748624537 — which writes a norm
1213
+ * as (a, x): body `a` the input condition (here the chair and its situation) and head `x` the
1214
+ * deontic output, read O(x|a), "x is obligatory given a." That is why obligations can drop the
1215
+ * law's other three slots without becoming prose: the pair is already the complete normative unit.
1216
+ * Formal attribution in GENOME_ATTRIBUTIONS below. */
1217
+ export declare const NormPairSchema: z.ZodObject<{
1218
+ attributes: z.ZodString;
1219
+ aim: z.ZodString;
1220
+ deontic: z.ZodDefault<z.ZodEnum<["permitted", "obliged", "forbidden"]>>;
1221
+ /** ADDITIVE, OPTIONAL obligation-tier mark. An obligation states whether it is a stated norm or
1222
+ * a verified rule: "declared" says there is no runtime verifier, "enforced" claims a verifier
1223
+ * backs it. ABSENT-parses-fine, so every pre-existing file round-trips byte-equivalent (a Zod
1224
+ * object drops an undeclared key, so the field must be declared HERE to be retained). The
1225
+ * admissibility check (checkInstitutionAdmissibility in institution_enforcement.ts) refuses an
1226
+ * UNMARKED obligation — the marking is how a document states its enforced/declared split
1227
+ * rather than leaving silence to pass a norm off as a rule. */
1228
+ tier: z.ZodOptional<z.ZodEnum<["declared", "enforced"]>>;
1229
+ }, "strict", z.ZodTypeAny, {
1230
+ attributes: string;
1231
+ deontic: "permitted" | "obliged" | "forbidden";
1232
+ aim: string;
1233
+ tier?: "declared" | "enforced" | undefined;
1234
+ }, {
1235
+ attributes: string;
1236
+ aim: string;
1237
+ tier?: "declared" | "enforced" | undefined;
1238
+ deontic?: "permitted" | "obliged" | "forbidden" | undefined;
1239
+ }>;
1240
+ export type DeonticOperator = z.output<typeof DeonticSchema>;
1241
+ export type InstitutionalLawOutput = z.output<typeof InstitutionalLawSchema>;
1242
+ export type NormPairOutput = z.output<typeof NormPairSchema>;
1243
+ /** Where a genome schema class implements published prior art, the attribution lives HERE as data
1244
+ * — parseable, dereferenceable, and gradeable — rather than only as a name-drop in a comment a
1245
+ * reader must take on faith. Both entries below were fetched from publisher/registry on the
1246
+ * recorded date, which is what earns them `archive` rather than `attestation`.
1247
+ *
1248
+ * Additive and read-only: nothing in dispatch or hashing consumes this, so an entry here moves no
1249
+ * genome_hash. It is a record of descent, held to the same bar as any other record in this repo. */
1250
+ export declare const GENOME_ATTRIBUTIONS: readonly SchemaAttributionOutput[];
885
1251
  export declare const InstitutionSchema: z.ZodObject<{
886
1252
  id: z.ZodOptional<z.ZodString>;
887
1253
  slug: z.ZodString;
888
1254
  name: z.ZodString;
889
1255
  kind: z.ZodEnum<["institution", "personal"]>;
890
- laws: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1256
+ laws: z.ZodDefault<z.ZodArray<z.ZodObject<{
1257
+ attributes: z.ZodString;
1258
+ deontic: z.ZodEnum<["permitted", "obliged", "forbidden"]>;
1259
+ aim: z.ZodString;
1260
+ conditions: z.ZodString;
1261
+ or_else: z.ZodString;
1262
+ check: z.ZodObject<{
1263
+ /** A normalized, serializable predicate (e.g. an s-expression) an evaluator invokes. */
1264
+ predicate: z.ZodString;
1265
+ /** The typed inputs the predicate reads: input name → its type name. */
1266
+ inputs: z.ZodRecord<z.ZodString, z.ZodString>;
1267
+ }, "strict", z.ZodTypeAny, {
1268
+ predicate: string;
1269
+ inputs: Record<string, string>;
1270
+ }, {
1271
+ predicate: string;
1272
+ inputs: Record<string, string>;
1273
+ }>;
1274
+ content_hash: z.ZodString;
1275
+ }, "strict", z.ZodTypeAny, {
1276
+ attributes: string;
1277
+ deontic: "permitted" | "obliged" | "forbidden";
1278
+ aim: string;
1279
+ conditions: string;
1280
+ or_else: string;
1281
+ check: {
1282
+ predicate: string;
1283
+ inputs: Record<string, string>;
1284
+ };
1285
+ content_hash: string;
1286
+ }, {
1287
+ attributes: string;
1288
+ deontic: "permitted" | "obliged" | "forbidden";
1289
+ aim: string;
1290
+ conditions: string;
1291
+ or_else: string;
1292
+ check: {
1293
+ predicate: string;
1294
+ inputs: Record<string, string>;
1295
+ };
1296
+ content_hash: string;
1297
+ }>, "many">>;
891
1298
  wiki_space: z.ZodOptional<z.ZodString>;
892
1299
  sovereign: z.ZodDefault<z.ZodBoolean>;
893
1300
  /** First-class lineage: references to approved lineage-records that ground this institution.
@@ -919,7 +1326,18 @@ export declare const InstitutionSchema: z.ZodObject<{
919
1326
  slug: string;
920
1327
  name: string;
921
1328
  kind: "institution" | "personal";
922
- laws: string[];
1329
+ laws: {
1330
+ attributes: string;
1331
+ deontic: "permitted" | "obliged" | "forbidden";
1332
+ aim: string;
1333
+ conditions: string;
1334
+ or_else: string;
1335
+ check: {
1336
+ predicate: string;
1337
+ inputs: Record<string, string>;
1338
+ };
1339
+ content_hash: string;
1340
+ }[];
923
1341
  sovereign: boolean;
924
1342
  lineage: {
925
1343
  record_ref: string;
@@ -934,7 +1352,18 @@ export declare const InstitutionSchema: z.ZodObject<{
934
1352
  name: string;
935
1353
  kind: "institution" | "personal";
936
1354
  id?: string | undefined;
937
- laws?: string[] | undefined;
1355
+ laws?: {
1356
+ attributes: string;
1357
+ deontic: "permitted" | "obliged" | "forbidden";
1358
+ aim: string;
1359
+ conditions: string;
1360
+ or_else: string;
1361
+ check: {
1362
+ predicate: string;
1363
+ inputs: Record<string, string>;
1364
+ };
1365
+ content_hash: string;
1366
+ }[] | undefined;
938
1367
  wiki_space?: string | undefined;
939
1368
  sovereign?: boolean | undefined;
940
1369
  lineage?: {
@@ -1118,7 +1547,29 @@ export declare const InstitutionalChairSchema: z.ZodObject<{
1118
1547
  standards: readonly string[];
1119
1548
  expires?: string | null | undefined;
1120
1549
  }>]>, "many">>;
1121
- obligations: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1550
+ obligations: z.ZodDefault<z.ZodArray<z.ZodObject<{
1551
+ attributes: z.ZodString;
1552
+ aim: z.ZodString;
1553
+ deontic: z.ZodDefault<z.ZodEnum<["permitted", "obliged", "forbidden"]>>;
1554
+ /** ADDITIVE, OPTIONAL obligation-tier mark. An obligation states whether it is a stated norm or
1555
+ * a verified rule: "declared" says there is no runtime verifier, "enforced" claims a verifier
1556
+ * backs it. ABSENT-parses-fine, so every pre-existing file round-trips byte-equivalent (a Zod
1557
+ * object drops an undeclared key, so the field must be declared HERE to be retained). The
1558
+ * admissibility check (checkInstitutionAdmissibility in institution_enforcement.ts) refuses an
1559
+ * UNMARKED obligation — the marking is how a document states its enforced/declared split
1560
+ * rather than leaving silence to pass a norm off as a rule. */
1561
+ tier: z.ZodOptional<z.ZodEnum<["declared", "enforced"]>>;
1562
+ }, "strict", z.ZodTypeAny, {
1563
+ attributes: string;
1564
+ deontic: "permitted" | "obliged" | "forbidden";
1565
+ aim: string;
1566
+ tier?: "declared" | "enforced" | undefined;
1567
+ }, {
1568
+ attributes: string;
1569
+ aim: string;
1570
+ tier?: "declared" | "enforced" | undefined;
1571
+ deontic?: "permitted" | "obliged" | "forbidden" | undefined;
1572
+ }>, "many">>;
1122
1573
  }, "strip", z.ZodTypeAny, {
1123
1574
  function: "SENSE" | "INTERPRET" | "JUDGE" | "PLAN" | "CREATE" | "VERIFY";
1124
1575
  role: string;
@@ -1135,7 +1586,12 @@ export declare const InstitutionalChairSchema: z.ZodObject<{
1135
1586
  grant: "dispatch";
1136
1587
  standards: readonly string[];
1137
1588
  })[];
1138
- obligations: string[];
1589
+ obligations: {
1590
+ attributes: string;
1591
+ deontic: "permitted" | "obliged" | "forbidden";
1592
+ aim: string;
1593
+ tier?: "declared" | "enforced" | undefined;
1594
+ }[];
1139
1595
  human?: boolean | undefined;
1140
1596
  supplies?: Record<string, unknown> | undefined;
1141
1597
  id?: string | undefined;
@@ -1158,7 +1614,12 @@ export declare const InstitutionalChairSchema: z.ZodObject<{
1158
1614
  standards: readonly string[];
1159
1615
  expires?: string | null | undefined;
1160
1616
  })[] | undefined;
1161
- obligations?: string[] | undefined;
1617
+ obligations?: {
1618
+ attributes: string;
1619
+ aim: string;
1620
+ tier?: "declared" | "enforced" | undefined;
1621
+ deontic?: "permitted" | "obliged" | "forbidden" | undefined;
1622
+ }[] | undefined;
1162
1623
  }>;
1163
1624
  /** What a seating cited: a source and the claim read from it. Both required — a source with no
1164
1625
  * claim cites nothing in particular, and a claim with no source is a recollection. */
@@ -1330,15 +1791,15 @@ export declare const ForebearSchema: z.ZodObject<{
1330
1791
  name: string;
1331
1792
  institution_slug: string;
1332
1793
  domain?: string | undefined;
1333
- kind?: string | undefined;
1334
1794
  what_taken?: string | undefined;
1795
+ kind?: string | undefined;
1335
1796
  }, {
1336
1797
  slug: string;
1337
1798
  name: string;
1338
1799
  institution_slug: string;
1339
1800
  domain?: string | undefined;
1340
- kind?: string | undefined;
1341
1801
  what_taken?: string | undefined;
1802
+ kind?: string | undefined;
1342
1803
  }>;
1343
1804
  export declare const NorthstarSchema: z.ZodObject<{
1344
1805
  slug: z.ZodString;
@@ -1351,8 +1812,8 @@ export declare const NorthstarSchema: z.ZodObject<{
1351
1812
  quote: z.ZodOptional<z.ZodString>;
1352
1813
  }, "strip", z.ZodTypeAny, {
1353
1814
  slug: string;
1354
- institution_slug: string;
1355
1815
  title: string;
1816
+ institution_slug: string;
1356
1817
  statement: string;
1357
1818
  kind?: string | undefined;
1358
1819
  source?: Record<string, unknown> | undefined;
@@ -1360,8 +1821,8 @@ export declare const NorthstarSchema: z.ZodObject<{
1360
1821
  quote?: string | undefined;
1361
1822
  }, {
1362
1823
  slug: string;
1363
- institution_slug: string;
1364
1824
  title: string;
1825
+ institution_slug: string;
1365
1826
  statement: string;
1366
1827
  kind?: string | undefined;
1367
1828
  source?: Record<string, unknown> | undefined;
@@ -1731,10 +2192,10 @@ export declare const ChartSchema: z.ZodObject<{
1731
2192
  before_movement: string;
1732
2193
  prompt?: string | undefined;
1733
2194
  }[];
2195
+ venue?: string | undefined;
1734
2196
  budget_envelope?: {
1735
2197
  total_usd: number;
1736
2198
  } | undefined;
1737
- venue?: string | undefined;
1738
2199
  }, {
1739
2200
  slug: string;
1740
2201
  movements: {
@@ -1750,6 +2211,7 @@ export declare const ChartSchema: z.ZodObject<{
1750
2211
  }[] | undefined;
1751
2212
  }[] | undefined;
1752
2213
  }[];
2214
+ venue?: string | undefined;
1753
2215
  edges?: {
1754
2216
  output_type: string;
1755
2217
  from_movement: string;
@@ -1766,7 +2228,6 @@ export declare const ChartSchema: z.ZodObject<{
1766
2228
  budget_envelope?: {
1767
2229
  total_usd: number;
1768
2230
  } | undefined;
1769
- venue?: string | undefined;
1770
2231
  }>;
1771
2232
  export type ChartInput = z.input<typeof ChartSchema>;
1772
2233
  export type ChartOutput = z.output<typeof ChartSchema>;