@lucern/pack-host 0.1.0-alpha.2

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 (104) hide show
  1. package/README.md +64 -0
  2. package/dist/contracts.d.ts +77 -0
  3. package/dist/contracts.js +21 -0
  4. package/dist/contracts.js.map +1 -0
  5. package/dist/convex.config.d.ts +5 -0
  6. package/dist/convex.config.js +9 -0
  7. package/dist/convex.config.js.map +1 -0
  8. package/dist/dependencyResolution.d.ts +18 -0
  9. package/dist/dependencyResolution.js +131 -0
  10. package/dist/dependencyResolution.js.map +1 -0
  11. package/dist/domain-pack/authoring.d.ts +172 -0
  12. package/dist/domain-pack/authoring.js +1896 -0
  13. package/dist/domain-pack/authoring.js.map +1 -0
  14. package/dist/domain-pack/contracts.d.ts +183 -0
  15. package/dist/domain-pack/contracts.js +65 -0
  16. package/dist/domain-pack/contracts.js.map +1 -0
  17. package/dist/domain-pack/index.d.ts +8 -0
  18. package/dist/domain-pack/index.js +3813 -0
  19. package/dist/domain-pack/index.js.map +1 -0
  20. package/dist/domain-pack/ontology/software-entities-v1.d.ts +102 -0
  21. package/dist/domain-pack/ontology/software-entities-v1.js +104 -0
  22. package/dist/domain-pack/ontology/software-entities-v1.js.map +1 -0
  23. package/dist/domain-pack/packs/developer-reasoning.d.ts +14 -0
  24. package/dist/domain-pack/packs/developer-reasoning.js +339 -0
  25. package/dist/domain-pack/packs/developer-reasoning.js.map +1 -0
  26. package/dist/domain-pack/packs/engineering-accelerator.d.ts +11 -0
  27. package/dist/domain-pack/packs/engineering-accelerator.js +1348 -0
  28. package/dist/domain-pack/packs/engineering-accelerator.js.map +1 -0
  29. package/dist/domain-pack/packs/index.d.ts +18 -0
  30. package/dist/domain-pack/packs/index.js +2653 -0
  31. package/dist/domain-pack/packs/index.js.map +1 -0
  32. package/dist/domain-pack/shaping.d.ts +54 -0
  33. package/dist/domain-pack/shaping.js +1013 -0
  34. package/dist/domain-pack/shaping.js.map +1 -0
  35. package/dist/domain-pack/validation.d.ts +26 -0
  36. package/dist/domain-pack/validation.js +775 -0
  37. package/dist/domain-pack/validation.js.map +1 -0
  38. package/dist/domain-pack.d.ts +8 -0
  39. package/dist/domain-pack.js +3813 -0
  40. package/dist/domain-pack.js.map +1 -0
  41. package/dist/index.d.ts +29 -0
  42. package/dist/index.js +5520 -0
  43. package/dist/index.js.map +1 -0
  44. package/dist/lifecycle.d.ts +27 -0
  45. package/dist/lifecycle.js +98 -0
  46. package/dist/lifecycle.js.map +1 -0
  47. package/dist/manifestValidation.d.ts +28 -0
  48. package/dist/manifestValidation.js +253 -0
  49. package/dist/manifestValidation.js.map +1 -0
  50. package/dist/manifests/chat-v1.d.ts +10 -0
  51. package/dist/manifests/chat-v1.js +87 -0
  52. package/dist/manifests/chat-v1.js.map +1 -0
  53. package/dist/manifests/deals-v1.d.ts +10 -0
  54. package/dist/manifests/deals-v1.js +107 -0
  55. package/dist/manifests/deals-v1.js.map +1 -0
  56. package/dist/manifests/decisions-v1.d.ts +10 -0
  57. package/dist/manifests/decisions-v1.js +103 -0
  58. package/dist/manifests/decisions-v1.js.map +1 -0
  59. package/dist/manifests/documents-v1.d.ts +10 -0
  60. package/dist/manifests/documents-v1.js +88 -0
  61. package/dist/manifests/documents-v1.js.map +1 -0
  62. package/dist/manifests/epistemic-algorithms-v1.d.ts +10 -0
  63. package/dist/manifests/epistemic-algorithms-v1.js +107 -0
  64. package/dist/manifests/epistemic-algorithms-v1.js.map +1 -0
  65. package/dist/manifests/graph-visualization-v1.d.ts +10 -0
  66. package/dist/manifests/graph-visualization-v1.js +88 -0
  67. package/dist/manifests/graph-visualization-v1.js.map +1 -0
  68. package/dist/manifests/index.d.ts +23 -0
  69. package/dist/manifests/index.js +955 -0
  70. package/dist/manifests/index.js.map +1 -0
  71. package/dist/manifests/news-v1.d.ts +10 -0
  72. package/dist/manifests/news-v1.js +93 -0
  73. package/dist/manifests/news-v1.js.map +1 -0
  74. package/dist/manifests/philosophy-mode-v1.d.ts +10 -0
  75. package/dist/manifests/philosophy-mode-v1.js +100 -0
  76. package/dist/manifests/philosophy-mode-v1.js.map +1 -0
  77. package/dist/manifests/task-management-v1.d.ts +10 -0
  78. package/dist/manifests/task-management-v1.js +86 -0
  79. package/dist/manifests/task-management-v1.js.map +1 -0
  80. package/dist/manifests/team-analysis-v1.d.ts +10 -0
  81. package/dist/manifests/team-analysis-v1.js +93 -0
  82. package/dist/manifests/team-analysis-v1.js.map +1 -0
  83. package/dist/manifests/themes-v1.d.ts +10 -0
  84. package/dist/manifests/themes-v1.js +118 -0
  85. package/dist/manifests/themes-v1.js.map +1 -0
  86. package/dist/manifests/user-profiles-v1.d.ts +10 -0
  87. package/dist/manifests/user-profiles-v1.js +100 -0
  88. package/dist/manifests/user-profiles-v1.js.map +1 -0
  89. package/dist/manifests.d.ts +14 -0
  90. package/dist/manifests.js +955 -0
  91. package/dist/manifests.js.map +1 -0
  92. package/dist/namespacePolicy.d.ts +26 -0
  93. package/dist/namespacePolicy.js +129 -0
  94. package/dist/namespacePolicy.js.map +1 -0
  95. package/dist/registry.d.ts +13 -0
  96. package/dist/registry.js +1710 -0
  97. package/dist/registry.js.map +1 -0
  98. package/dist/runtime.d.ts +19 -0
  99. package/dist/runtime.js +638 -0
  100. package/dist/runtime.js.map +1 -0
  101. package/dist/serviceContracts.d.ts +18 -0
  102. package/dist/serviceContracts.js +64 -0
  103. package/dist/serviceContracts.js.map +1 -0
  104. package/package.json +48 -0
@@ -0,0 +1,102 @@
1
+ /**
2
+ * Software Entities Ontology Snapshot v1.0.0
3
+ *
4
+ * Reference ontology snapshot for turnkey engineering packs. This gives
5
+ * engineering-focused domain packs a real typed bundle to bind and seed.
6
+ */
7
+ type OntologyEntityTypeSnapshot = {
8
+ value: string;
9
+ label: string;
10
+ description: string;
11
+ };
12
+ type OntologyEdgeTypeSnapshot = {
13
+ value: string;
14
+ label: string;
15
+ description: string;
16
+ sourceTypes?: string[];
17
+ targetTypes?: string[];
18
+ };
19
+ declare const SOFTWARE_ENTITIES_V1: {
20
+ readonly ontologyId: "software-entities";
21
+ readonly version: "1.0.0";
22
+ readonly name: "Software Entities";
23
+ readonly description: "Core software-delivery ontology for repositories, services, modules, changes, incidents, and agent-assisted engineering workflows.";
24
+ readonly entityTypes: readonly [{
25
+ readonly value: "repository";
26
+ readonly label: "Repository";
27
+ readonly description: "Source repository or monorepo boundary under active ownership.";
28
+ }, {
29
+ readonly value: "service";
30
+ readonly label: "Service";
31
+ readonly description: "Deployable service, application, or runtime surface.";
32
+ }, {
33
+ readonly value: "module";
34
+ readonly label: "Module";
35
+ readonly description: "Logical code module, package, or subsystem within a service.";
36
+ }, {
37
+ readonly value: "workflow";
38
+ readonly label: "Workflow";
39
+ readonly description: "Repeatable engineering workflow such as review, migration, or incident response.";
40
+ }, {
41
+ readonly value: "migration";
42
+ readonly label: "Migration";
43
+ readonly description: "Schema, API, or rollout change with sequencing and rollback concerns.";
44
+ }, {
45
+ readonly value: "incident";
46
+ readonly label: "Incident";
47
+ readonly description: "Operational incident, outage, or regression requiring triage and mitigation.";
48
+ }, {
49
+ readonly value: "decision_record";
50
+ readonly label: "Decision Record";
51
+ readonly description: "Architecture decision, rationale record, or precedent artifact.";
52
+ }, {
53
+ readonly value: "agent";
54
+ readonly label: "Agent";
55
+ readonly description: "Configured AI worker or assistant participating in engineering workflows.";
56
+ }];
57
+ readonly edgeTypes: readonly [{
58
+ readonly value: "depends_on";
59
+ readonly label: "Depends On";
60
+ readonly description: "A repository, service, module, or workflow depends on another surface.";
61
+ readonly sourceTypes: ["repository", "service", "module", "workflow", "migration"];
62
+ readonly targetTypes: ["repository", "service", "module", "workflow", "migration"];
63
+ }, {
64
+ readonly value: "owns";
65
+ readonly label: "Owns";
66
+ readonly description: "An agent or service owns a module, workflow, or decision record.";
67
+ readonly sourceTypes: ["agent", "service"];
68
+ readonly targetTypes: ["module", "workflow", "decision_record"];
69
+ }, {
70
+ readonly value: "calls";
71
+ readonly label: "Calls";
72
+ readonly description: "A repository, service, or module invokes another service or module.";
73
+ readonly sourceTypes: ["repository", "service", "module"];
74
+ readonly targetTypes: ["service", "module"];
75
+ }, {
76
+ readonly value: "blocks";
77
+ readonly label: "Blocks";
78
+ readonly description: "An incident, migration, or workflow blocks another engineering surface.";
79
+ readonly sourceTypes: ["incident", "migration", "workflow"];
80
+ readonly targetTypes: ["migration", "workflow", "service", "decision_record"];
81
+ }, {
82
+ readonly value: "reviews";
83
+ readonly label: "Reviews";
84
+ readonly description: "An agent or workflow reviews a change, module, or migration.";
85
+ readonly sourceTypes: ["agent", "workflow"];
86
+ readonly targetTypes: ["module", "migration", "decision_record"];
87
+ }, {
88
+ readonly value: "mitigates";
89
+ readonly label: "Mitigates";
90
+ readonly description: "A workflow or migration mitigates an incident or risky change.";
91
+ readonly sourceTypes: ["workflow", "migration"];
92
+ readonly targetTypes: ["incident", "service", "module"];
93
+ }, {
94
+ readonly value: "supersedes";
95
+ readonly label: "Supersedes";
96
+ readonly description: "A newer decision record, migration, or workflow replaces an earlier one.";
97
+ readonly sourceTypes: ["decision_record", "migration", "workflow"];
98
+ readonly targetTypes: ["decision_record", "migration", "workflow"];
99
+ }];
100
+ };
101
+
102
+ export { type OntologyEdgeTypeSnapshot, type OntologyEntityTypeSnapshot, SOFTWARE_ENTITIES_V1 };
@@ -0,0 +1,104 @@
1
+ // src/domain-pack/ontology/software-entities-v1.ts
2
+ var SOFTWARE_ENTITIES_V1 = {
3
+ ontologyId: "software-entities",
4
+ version: "1.0.0",
5
+ name: "Software Entities",
6
+ description: "Core software-delivery ontology for repositories, services, modules, changes, incidents, and agent-assisted engineering workflows.",
7
+ entityTypes: [
8
+ {
9
+ value: "repository",
10
+ label: "Repository",
11
+ description: "Source repository or monorepo boundary under active ownership."
12
+ },
13
+ {
14
+ value: "service",
15
+ label: "Service",
16
+ description: "Deployable service, application, or runtime surface."
17
+ },
18
+ {
19
+ value: "module",
20
+ label: "Module",
21
+ description: "Logical code module, package, or subsystem within a service."
22
+ },
23
+ {
24
+ value: "workflow",
25
+ label: "Workflow",
26
+ description: "Repeatable engineering workflow such as review, migration, or incident response."
27
+ },
28
+ {
29
+ value: "migration",
30
+ label: "Migration",
31
+ description: "Schema, API, or rollout change with sequencing and rollback concerns."
32
+ },
33
+ {
34
+ value: "incident",
35
+ label: "Incident",
36
+ description: "Operational incident, outage, or regression requiring triage and mitigation."
37
+ },
38
+ {
39
+ value: "decision_record",
40
+ label: "Decision Record",
41
+ description: "Architecture decision, rationale record, or precedent artifact."
42
+ },
43
+ {
44
+ value: "agent",
45
+ label: "Agent",
46
+ description: "Configured AI worker or assistant participating in engineering workflows."
47
+ }
48
+ ],
49
+ edgeTypes: [
50
+ {
51
+ value: "depends_on",
52
+ label: "Depends On",
53
+ description: "A repository, service, module, or workflow depends on another surface.",
54
+ sourceTypes: ["repository", "service", "module", "workflow", "migration"],
55
+ targetTypes: ["repository", "service", "module", "workflow", "migration"]
56
+ },
57
+ {
58
+ value: "owns",
59
+ label: "Owns",
60
+ description: "An agent or service owns a module, workflow, or decision record.",
61
+ sourceTypes: ["agent", "service"],
62
+ targetTypes: ["module", "workflow", "decision_record"]
63
+ },
64
+ {
65
+ value: "calls",
66
+ label: "Calls",
67
+ description: "A repository, service, or module invokes another service or module.",
68
+ sourceTypes: ["repository", "service", "module"],
69
+ targetTypes: ["service", "module"]
70
+ },
71
+ {
72
+ value: "blocks",
73
+ label: "Blocks",
74
+ description: "An incident, migration, or workflow blocks another engineering surface.",
75
+ sourceTypes: ["incident", "migration", "workflow"],
76
+ targetTypes: ["migration", "workflow", "service", "decision_record"]
77
+ },
78
+ {
79
+ value: "reviews",
80
+ label: "Reviews",
81
+ description: "An agent or workflow reviews a change, module, or migration.",
82
+ sourceTypes: ["agent", "workflow"],
83
+ targetTypes: ["module", "migration", "decision_record"]
84
+ },
85
+ {
86
+ value: "mitigates",
87
+ label: "Mitigates",
88
+ description: "A workflow or migration mitigates an incident or risky change.",
89
+ sourceTypes: ["workflow", "migration"],
90
+ targetTypes: ["incident", "service", "module"]
91
+ },
92
+ {
93
+ value: "supersedes",
94
+ label: "Supersedes",
95
+ description: "A newer decision record, migration, or workflow replaces an earlier one.",
96
+ sourceTypes: ["decision_record", "migration", "workflow"],
97
+ targetTypes: ["decision_record", "migration", "workflow"]
98
+ }
99
+ ]
100
+ };
101
+
102
+ export { SOFTWARE_ENTITIES_V1 };
103
+ //# sourceMappingURL=software-entities-v1.js.map
104
+ //# sourceMappingURL=software-entities-v1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/domain-pack/ontology/software-entities-v1.ts"],"names":[],"mappings":";AAqBO,IAAM,oBAAA,GAAuB;AAAA,EAClC,UAAA,EAAY,mBAAA;AAAA,EACZ,OAAA,EAAS,OAAA;AAAA,EACT,IAAA,EAAM,mBAAA;AAAA,EACN,WAAA,EACE,oIAAA;AAAA,EACF,WAAA,EAAa;AAAA,IACX;AAAA,MACE,KAAA,EAAO,YAAA;AAAA,MACP,KAAA,EAAO,YAAA;AAAA,MACP,WAAA,EACE;AAAA,KACJ;AAAA,IACA;AAAA,MACE,KAAA,EAAO,SAAA;AAAA,MACP,KAAA,EAAO,SAAA;AAAA,MACP,WAAA,EAAa;AAAA,KACf;AAAA,IACA;AAAA,MACE,KAAA,EAAO,QAAA;AAAA,MACP,KAAA,EAAO,QAAA;AAAA,MACP,WAAA,EACE;AAAA,KACJ;AAAA,IACA;AAAA,MACE,KAAA,EAAO,UAAA;AAAA,MACP,KAAA,EAAO,UAAA;AAAA,MACP,WAAA,EACE;AAAA,KACJ;AAAA,IACA;AAAA,MACE,KAAA,EAAO,WAAA;AAAA,MACP,KAAA,EAAO,WAAA;AAAA,MACP,WAAA,EACE;AAAA,KACJ;AAAA,IACA;AAAA,MACE,KAAA,EAAO,UAAA;AAAA,MACP,KAAA,EAAO,UAAA;AAAA,MACP,WAAA,EACE;AAAA,KACJ;AAAA,IACA;AAAA,MACE,KAAA,EAAO,iBAAA;AAAA,MACP,KAAA,E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,MACF,WAAA,EAAa,CAAC,OAAA,EAAS,UAAU,CAAA;AAAA,MACjC,WAAA,EAAa,CAAC,QAAA,EAAU,WAAA,EAAa,iBAAiB;AAAA,KACxD;AAAA,IACA;AAAA,MACE,KAAA,EAAO,WAAA;AAAA,MACP,KAAA,EAAO,WAAA;AAAA,MACP,WAAA,EACE,gEAAA;AAAA,MACF,WAAA,EAAa,CAAC,UAAA,EAAY,WAAW,CAAA;AAAA,MACrC,WAAA,EAAa,CAAC,UAAA,EAAY,SAAA,EAAW,QAAQ;AAAA,KAC/C;AAAA,IACA;AAAA,MACE,KAAA,EAAO,YAAA;AAAA,MACP,KAAA,EAAO,YAAA;AAAA,MACP,WAAA,EACE,0EAAA;AAAA,MACF,WAAA,EAAa,CAAC,iBAAA,EAAmB,WAAA,EAAa,UAAU,CAAA;AAAA,MACxD,WAAA,EAAa,CAAC,iBAAA,EAAmB,WAAA,EAAa,UAAU;AAAA;AAC1D;AAEJ","file":"software-entities-v1.js","sourcesContent":["/**\n * Software Entities Ontology Snapshot v1.0.0\n *\n * Reference ontology snapshot for turnkey engineering packs. This gives\n * engineering-focused domain packs a real typed bundle to bind and seed.\n */\n\nexport type OntologyEntityTypeSnapshot = {\n value: string;\n label: string;\n description: string;\n};\n\nexport type OntologyEdgeTypeSnapshot = {\n value: string;\n label: string;\n description: string;\n sourceTypes?: string[];\n targetTypes?: string[];\n};\n\nexport const SOFTWARE_ENTITIES_V1 = {\n ontologyId: \"software-entities\",\n version: \"1.0.0\",\n name: \"Software Entities\",\n description:\n \"Core software-delivery ontology for repositories, services, modules, changes, incidents, and agent-assisted engineering workflows.\",\n entityTypes: [\n {\n value: \"repository\",\n label: \"Repository\",\n description:\n \"Source repository or monorepo boundary under active ownership.\",\n },\n {\n value: \"service\",\n label: \"Service\",\n description: \"Deployable service, application, or runtime surface.\",\n },\n {\n value: \"module\",\n label: \"Module\",\n description:\n \"Logical code module, package, or subsystem within a service.\",\n },\n {\n value: \"workflow\",\n label: \"Workflow\",\n description:\n \"Repeatable engineering workflow such as review, migration, or incident response.\",\n },\n {\n value: \"migration\",\n label: \"Migration\",\n description:\n \"Schema, API, or rollout change with sequencing and rollback concerns.\",\n },\n {\n value: \"incident\",\n label: \"Incident\",\n description:\n \"Operational incident, outage, or regression requiring triage and mitigation.\",\n },\n {\n value: \"decision_record\",\n label: \"Decision Record\",\n description:\n \"Architecture decision, rationale record, or precedent artifact.\",\n },\n {\n value: \"agent\",\n label: \"Agent\",\n description:\n \"Configured AI worker or assistant participating in engineering workflows.\",\n },\n ] as const satisfies readonly OntologyEntityTypeSnapshot[],\n edgeTypes: [\n {\n value: \"depends_on\",\n label: \"Depends On\",\n description:\n \"A repository, service, module, or workflow depends on another surface.\",\n sourceTypes: [\"repository\", \"service\", \"module\", \"workflow\", \"migration\"],\n targetTypes: [\"repository\", \"service\", \"module\", \"workflow\", \"migration\"],\n },\n {\n value: \"owns\",\n label: \"Owns\",\n description:\n \"An agent or service owns a module, workflow, or decision record.\",\n sourceTypes: [\"agent\", \"service\"],\n targetTypes: [\"module\", \"workflow\", \"decision_record\"],\n },\n {\n value: \"calls\",\n label: \"Calls\",\n description:\n \"A repository, service, or module invokes another service or module.\",\n sourceTypes: [\"repository\", \"service\", \"module\"],\n targetTypes: [\"service\", \"module\"],\n },\n {\n value: \"blocks\",\n label: \"Blocks\",\n description:\n \"An incident, migration, or workflow blocks another engineering surface.\",\n sourceTypes: [\"incident\", \"migration\", \"workflow\"],\n targetTypes: [\"migration\", \"workflow\", \"service\", \"decision_record\"],\n },\n {\n value: \"reviews\",\n label: \"Reviews\",\n description:\n \"An agent or workflow reviews a change, module, or migration.\",\n sourceTypes: [\"agent\", \"workflow\"],\n targetTypes: [\"module\", \"migration\", \"decision_record\"],\n },\n {\n value: \"mitigates\",\n label: \"Mitigates\",\n description:\n \"A workflow or migration mitigates an incident or risky change.\",\n sourceTypes: [\"workflow\", \"migration\"],\n targetTypes: [\"incident\", \"service\", \"module\"],\n },\n {\n value: \"supersedes\",\n label: \"Supersedes\",\n description:\n \"A newer decision record, migration, or workflow replaces an earlier one.\",\n sourceTypes: [\"decision_record\", \"migration\", \"workflow\"],\n targetTypes: [\"decision_record\", \"migration\", \"workflow\"],\n },\n ] as const satisfies readonly OntologyEdgeTypeSnapshot[],\n} as const;\n"]}
@@ -0,0 +1,14 @@
1
+ import { DomainPack } from '../contracts.js';
2
+
3
+ /**
4
+ * Domain Pack: Developer Reasoning
5
+ *
6
+ * Reference domain pack for AI-assisted software development reasoning.
7
+ * This is the pack Lucern uses internally — a generic reasoning harness
8
+ * for code development with beliefs, evidence, and structured workflows.
9
+ *
10
+ * Domain-neutral: demonstrates the contract without tenant-specific IP.
11
+ */
12
+ declare const DEVELOPER_REASONING_PACK: DomainPack;
13
+
14
+ export { DEVELOPER_REASONING_PACK };
@@ -0,0 +1,339 @@
1
+ // src/domain-pack/contracts.ts
2
+ function dedupeStrings(values) {
3
+ return Array.from(
4
+ new Set(values.map((v) => v.trim()).filter((v) => v.length > 0))
5
+ );
6
+ }
7
+ function normalizeRuntimeTargets(values) {
8
+ return values ? dedupeStrings(values) : void 0;
9
+ }
10
+ function normalizeOntologyBinding(binding) {
11
+ return {
12
+ ...binding,
13
+ requiredEntityTypes: binding.requiredEntityTypes ? dedupeStrings(binding.requiredEntityTypes) : void 0,
14
+ requiredEdgeTypes: binding.requiredEdgeTypes ? dedupeStrings(binding.requiredEdgeTypes) : void 0
15
+ };
16
+ }
17
+ function normalizeOperatingSystem(layer) {
18
+ if (!layer) {
19
+ return;
20
+ }
21
+ return {
22
+ prompts: layer.prompts?.map((prompt) => ({
23
+ ...prompt,
24
+ runtimeTargets: normalizeRuntimeTargets(prompt.runtimeTargets)
25
+ })),
26
+ tools: layer.tools?.map((tool) => ({
27
+ ...tool,
28
+ runtimeTargets: normalizeRuntimeTargets(tool.runtimeTargets)
29
+ })),
30
+ setupAssets: layer.setupAssets?.map((asset) => ({
31
+ ...asset,
32
+ runtimeTargets: normalizeRuntimeTargets(asset.runtimeTargets)
33
+ })),
34
+ topicTemplates: layer.topicTemplates,
35
+ installProfiles: layer.installProfiles?.map((profile) => ({
36
+ ...profile,
37
+ promptIds: dedupeStrings(profile.promptIds),
38
+ toolIds: dedupeStrings(profile.toolIds),
39
+ assetIds: dedupeStrings(profile.assetIds),
40
+ defaultTopicSlugs: dedupeStrings(profile.defaultTopicSlugs)
41
+ }))
42
+ };
43
+ }
44
+ function defineDomainPack(input) {
45
+ return {
46
+ ...input,
47
+ ontologyBindings: input.ontologyBindings.map(normalizeOntologyBinding),
48
+ appPackKeys: input.appPackKeys ? dedupeStrings(input.appPackKeys) : void 0,
49
+ operatingSystem: normalizeOperatingSystem(input.operatingSystem),
50
+ workflows: input.workflows.map((w) => ({
51
+ ...w,
52
+ requiredArtifacts: dedupeStrings(w.requiredArtifacts),
53
+ gateCheckpoints: dedupeStrings(w.gateCheckpoints),
54
+ steps: w.steps.map((s) => ({
55
+ ...s,
56
+ requiredRoles: dedupeStrings(s.requiredRoles),
57
+ produces: s.produces ? dedupeStrings(s.produces) : void 0
58
+ }))
59
+ }))
60
+ };
61
+ }
62
+
63
+ // src/domain-pack/packs/developer-reasoning.ts
64
+ var DEVELOPER_REASONING_PACK = defineDomainPack({
65
+ packId: "developer-reasoning",
66
+ name: "Developer Reasoning",
67
+ version: "1.0.0",
68
+ ontologyBindings: [
69
+ {
70
+ ontologyId: "software-entities",
71
+ versionConstraint: "^1.0.0",
72
+ required: true
73
+ }
74
+ ],
75
+ topicRoots: [
76
+ {
77
+ slug: "architecture",
78
+ name: "Architecture",
79
+ description: "System architecture decisions and trade-offs",
80
+ ontologyId: "software-entities"
81
+ },
82
+ {
83
+ slug: "implementation",
84
+ name: "Implementation",
85
+ description: "Active implementation work and worktrees",
86
+ ontologyId: "software-entities"
87
+ },
88
+ {
89
+ slug: "operations",
90
+ name: "Operations",
91
+ description: "Deployment, observability, and operational concerns"
92
+ }
93
+ ],
94
+ workflows: [
95
+ {
96
+ workflowId: "worktree-lifecycle",
97
+ name: "Worktree Lifecycle",
98
+ description: "Structured development cycle from scoping through implementation and review",
99
+ steps: [
100
+ {
101
+ stepId: "scope",
102
+ name: "Scope & Context",
103
+ description: "Read graph context, identify constraints and prior decisions",
104
+ requiredRoles: ["investigator"],
105
+ produces: ["scope-artifact"]
106
+ },
107
+ {
108
+ stepId: "plan",
109
+ name: "Plan",
110
+ description: "Design implementation approach informed by graph beliefs",
111
+ requiredRoles: ["investigator", "critic"],
112
+ produces: ["plan-artifact"],
113
+ gateId: "plan-reviewed"
114
+ },
115
+ {
116
+ stepId: "build",
117
+ name: "Build",
118
+ description: "Implement with in-flight graph writeback",
119
+ requiredRoles: ["implementer"],
120
+ produces: ["implementation-artifact"]
121
+ },
122
+ {
123
+ stepId: "review",
124
+ name: "Review",
125
+ description: "Validate implementation against plan, tests, and type safety",
126
+ requiredRoles: ["critic"],
127
+ produces: ["review-artifact"],
128
+ gateId: "review-passed"
129
+ }
130
+ ],
131
+ requiredArtifacts: ["scope-artifact", "implementation-artifact"],
132
+ gateCheckpoints: ["plan-reviewed", "review-passed"]
133
+ }
134
+ ],
135
+ gates: [
136
+ {
137
+ gateId: "plan-reviewed",
138
+ name: "Plan Reviewed",
139
+ description: "Implementation plan has been reviewed for feasibility",
140
+ criteria: [
141
+ {
142
+ criterionId: "constraints-checked",
143
+ description: "Plan respects high-credence beliefs (>= 0.90) as constraints",
144
+ metric: "constraint_violations",
145
+ threshold: 0,
146
+ operator: "eq"
147
+ },
148
+ {
149
+ criterionId: "scope-bounded",
150
+ description: "Plan stays within declared file and concern scope",
151
+ metric: "scope_bounded",
152
+ threshold: 1,
153
+ operator: "eq"
154
+ }
155
+ ],
156
+ severity: "blocking"
157
+ },
158
+ {
159
+ gateId: "review-passed",
160
+ name: "Review Passed",
161
+ description: "Implementation passes type checks, tests, and review",
162
+ criteria: [
163
+ {
164
+ criterionId: "types-clean",
165
+ description: "TypeScript check passes (npx tsc --noEmit)",
166
+ metric: "tsc_errors",
167
+ threshold: 0,
168
+ operator: "eq"
169
+ },
170
+ {
171
+ criterionId: "tests-passing",
172
+ description: "All relevant tests pass",
173
+ metric: "test_pass_ratio",
174
+ threshold: 1,
175
+ operator: "eq"
176
+ }
177
+ ],
178
+ severity: "blocking"
179
+ }
180
+ ],
181
+ artifacts: [
182
+ {
183
+ artifactId: "scope-artifact",
184
+ name: "Scope Context",
185
+ description: "Graph context summary \u2014 beliefs, questions, constraints informing this work",
186
+ stage: "scope",
187
+ contentSchema: {
188
+ type: "object",
189
+ properties: {
190
+ beliefs: { type: "array", items: { type: "string" } },
191
+ questions: { type: "array", items: { type: "string" } },
192
+ constraints: { type: "array", items: { type: "string" } }
193
+ },
194
+ required: ["beliefs", "constraints"]
195
+ },
196
+ requiredFields: ["beliefs", "constraints"]
197
+ },
198
+ {
199
+ artifactId: "plan-artifact",
200
+ name: "Implementation Plan",
201
+ description: "Files to create/modify, approach, and test strategy",
202
+ stage: "plan",
203
+ contentSchema: {
204
+ type: "object",
205
+ properties: {
206
+ files: { type: "array", items: { type: "string" } },
207
+ approach: { type: "string" },
208
+ testStrategy: { type: "string" }
209
+ },
210
+ required: ["files", "approach"]
211
+ },
212
+ requiredFields: ["files", "approach"]
213
+ },
214
+ {
215
+ artifactId: "implementation-artifact",
216
+ name: "Implementation Summary",
217
+ description: "What was built, files changed, decisions made",
218
+ stage: "build",
219
+ contentSchema: {
220
+ type: "object",
221
+ properties: {
222
+ filesChanged: { type: "array", items: { type: "string" } },
223
+ decisions: { type: "array", items: { type: "string" } },
224
+ deferredWork: { type: "array", items: { type: "string" } }
225
+ },
226
+ required: ["filesChanged"]
227
+ },
228
+ requiredFields: ["filesChanged"]
229
+ },
230
+ {
231
+ artifactId: "review-artifact",
232
+ name: "Review Summary",
233
+ description: "Review findings, type check results, test results",
234
+ stage: "review",
235
+ contentSchema: {
236
+ type: "object",
237
+ properties: {
238
+ verdict: { type: "string", enum: ["approve", "request-changes"] },
239
+ findings: { type: "array", items: { type: "string" } },
240
+ testsPassing: { type: "boolean" },
241
+ typesClean: { type: "boolean" }
242
+ },
243
+ required: ["verdict", "testsPassing", "typesClean"]
244
+ },
245
+ requiredFields: ["verdict", "testsPassing", "typesClean"]
246
+ }
247
+ ],
248
+ roles: [
249
+ {
250
+ roleId: "investigator",
251
+ name: "Investigator",
252
+ description: "Reads graph context and identifies relevant prior knowledge",
253
+ perspective: "Context-aware, evidence-driven scoping",
254
+ optimizesFor: "thoroughness of context retrieval and constraint identification",
255
+ mayBlock: false
256
+ },
257
+ {
258
+ roleId: "implementer",
259
+ name: "Implementer",
260
+ description: "Writes code and records decisions in the graph",
261
+ perspective: "Pragmatic, focused on working code within constraints",
262
+ optimizesFor: "correctness and simplicity",
263
+ mayBlock: false
264
+ },
265
+ {
266
+ roleId: "critic",
267
+ name: "Critic",
268
+ description: "Challenges assumptions, finds edge cases, and surfaces risks",
269
+ perspective: "Skeptical, detail-oriented, adversarial testing",
270
+ optimizesFor: "identifying weaknesses before they reach production",
271
+ mayBlock: true
272
+ // Epistemic Invariant #13
273
+ }
274
+ ],
275
+ inquiryShaping: {
276
+ questionTemplates: [
277
+ {
278
+ templateId: "developer-boundary-falsifier",
279
+ questionType: "falsification",
280
+ priority: "high",
281
+ template: "Which interface, contract, or boundary would fail first if {{objective}} is wrong?",
282
+ whenObjectiveIncludes: [
283
+ "build",
284
+ "implement",
285
+ "refactor",
286
+ "integrate",
287
+ "algorithm",
288
+ "handler",
289
+ "workflow"
290
+ ]
291
+ },
292
+ {
293
+ templateId: "developer-regression-counterfactual",
294
+ questionType: "counterfactual",
295
+ priority: "high",
296
+ template: "What existing behavior or verification path would regress if {{hypothesis}} is false?",
297
+ whenObjectiveIncludes: ["build", "implement", "add", "extend", "support"]
298
+ }
299
+ ],
300
+ taskTemplates: [
301
+ {
302
+ templateId: "developer-contract-audit",
303
+ title: "Audit adjacent contracts and invariants for {{objective}}",
304
+ description: "Inspect the existing MCP, schema, and worktree contracts that constrain {{objective}} before changing runtime behavior.",
305
+ taskType: "analysis",
306
+ priority: "high",
307
+ whenObjectiveIncludes: ["build", "implement", "extend", "support"]
308
+ },
309
+ {
310
+ templateId: "developer-verification-pass",
311
+ title: "Run focused verification for {{objective}}",
312
+ description: "Add or update targeted tests and type-safety checks that would fail if {{hypothesis}} is wrong.",
313
+ taskType: "review",
314
+ priority: "medium",
315
+ whenObjectiveIncludes: ["build", "implement", "algorithm", "workflow"],
316
+ whenQuestionTypes: ["falsification", "counterfactual"]
317
+ }
318
+ ],
319
+ frameworkHints: [
320
+ {
321
+ frameworkName: "Boundary Audit",
322
+ whenObjectiveIncludes: ["handler", "contract", "api", "workflow"],
323
+ boost: 0.25,
324
+ reason: "Developer reasoning work benefits from explicit boundary checks."
325
+ },
326
+ {
327
+ frameworkName: "Pre-mortem",
328
+ whenQuestionTypes: ["falsification", "counterfactual"],
329
+ boost: 0.2,
330
+ reason: "Stress-testing likely failure modes improves worktree shaping quality."
331
+ }
332
+ ]
333
+ },
334
+ methodologyPackId: "developer"
335
+ });
336
+
337
+ export { DEVELOPER_REASONING_PACK };
338
+ //# sourceMappingURL=developer-reasoning.js.map
339
+ //# sourceMappingURL=developer-reasoning.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/domain-pack/contracts.ts","../../../src/domain-pack/packs/developer-reasoning.ts"],"names":[],"mappings":";AAoSA,SAAS,cAAc,MAAA,EAA4B;AACjD,EAAA,OAAO,KAAA,CAAM,IAAA;AAAA,IACX,IAAI,GAAA,CAAI,MAAA,CAAO,GAAA,CAAI,CAAC,MAAM,CAAA,CAAE,IAAA,EAAM,CAAA,CAAE,OAAO,CAAC,CAAA,KAAM,CAAA,CAAE,MAAA,GAAS,CAAC,CAAC;AAAA,GACjE;AACF;AAMA,SAAS,wBACP,MAAA,EAC6B;AAC7B,EAAA,OAAO,MAAA,GAAU,aAAA,CAAc,MAAM,CAAA,GAAwB,MAAA;AAC/D;AAEA,SAAS,yBAAyB,OAAA,EAA2C;AAC3E,EAAA,OAAO;AAAA,I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AAA;AAAA,QACF,QAAA,EAAU,UAAA;AAAA,QACV,QAAA,EAAU,MAAA;AAAA,QACV,qBAAA,EAAuB,CAAC,OAAA,EAAS,WAAA,EAAa,UAAU,SAAS;AAAA,OACnE;AAAA,MACA;AAAA,QACE,UAAA,EAAY,6BAAA;AAAA,QACZ,KAAA,EAAO,4CAAA;AAAA,QACP,WAAA,EACE,iGAAA;AAAA,QACF,QAAA,EAAU,QAAA;AAAA,QACV,QAAA,EAAU,QAAA;AAAA,QACV,qBAAA,EAAuB,CAAC,OAAA,EAAS,WAAA,EAAa,aAAa,UAAU,CAAA;AAAA,QACrE,iBAAA,EAAmB,CAAC,eAAA,EAAiB,gBAAgB;AAAA;AACvD,KACF;AAAA,IACA,cAAA,EAAgB;AAAA,MACd;AAAA,QACE,aAAA,EAAe,gBAAA;AAAA,QACf,qBAAA,EAAuB,CAAC,SAAA,EAAW,UAAA,EAAY,OAAO,UAAU,CAAA;AAAA,QAChE,KAAA,EAAO,IAAA;AAAA,QACP,MAAA,EAAQ;AAAA,OACV;AAAA,MACA;AAAA,QACE,aAAA,EAAe,YAAA;AAAA,QACf,iBAAA,EAAmB,CAAC,eAAA,EAAiB,gBAAgB,CAAA;AAAA,QACrD,KAAA,EAAO,GAAA;AAAA,QACP,MAAA,EAAQ;AAAA;AACV;AACF,GACF;AAAA,EAEA,iBAAA,EAAmB;AACrB,CAAC","file":"developer-reasoning.js","sourcesContent":["/**\n * Domain Pack Contracts\n *\n * A DomainPack is a self-contained reasoning context bundle that defines\n * how reasoning works in a specific domain. It binds ontology versions,\n * defines topic structure, declares workflow templates, gate schemas,\n * artifact schemas, and reasoning roles.\n *\n * This is the THIRD pack type in Lucern's architecture:\n * - AppPackManifest: UI routes, surfaces, policy profiles (app-level)\n * - MethodologyPack: Agent workflow phases, gates, enforcement (process-level)\n * - DomainPack: Reasoning domain context (domain-level)\n *\n * All fields are internal until RS-5+ external authoring certification.\n */\n\n// ---------------------------------------------------------------------------\n// Ontology Binding — ties a pack to specific ontology versions\n// ---------------------------------------------------------------------------\n\nexport type OntologyProvisionMode = \"bind\" | \"seed\" | \"extend\";\n\nexport type OntologyBinding = {\n ontologyId: string;\n versionConstraint: string; // semver range, e.g., \"^1.0.0\"\n required: boolean;\n provisionMode?: OntologyProvisionMode;\n seedRef?: string;\n requiredEntityTypes?: string[];\n requiredEdgeTypes?: string[];\n};\n\n// ---------------------------------------------------------------------------\n// Topic Root — defines the domain's top-level topic tree structure\n// ---------------------------------------------------------------------------\n\nexport type TopicRoot = {\n slug: string;\n name: string;\n description: string;\n ontologyId?: string; // which ontology governs this root\n};\n\n// ---------------------------------------------------------------------------\n// Workflow Template — shape of a workflow (not execution logic)\n// ---------------------------------------------------------------------------\n\nexport type WorkflowStep = {\n stepId: string;\n name: string;\n description: string;\n requiredRoles: string[]; // roleId references\n produces?: string[]; // artifactId references\n gateId?: string; // gate checked after this step\n};\n\nexport type WorkflowTemplate = {\n workflowId: string;\n name: string;\n description: string;\n steps: WorkflowStep[];\n requiredArtifacts: string[]; // artifactId references\n gateCheckpoints: string[]; // gateId references\n};\n\n// ---------------------------------------------------------------------------\n// Gate Schema — declarative description of what must be true\n// ---------------------------------------------------------------------------\n\nexport type GateCriterionOperator = \"gte\" | \"lte\" | \"eq\" | \"gt\" | \"lt\";\n\nexport type GateCriterion = {\n criterionId: string;\n description: string;\n metric: string;\n threshold?: number;\n operator?: GateCriterionOperator;\n};\n\nexport type GateSeverity = \"blocking\" | \"warning\" | \"informational\";\n\nexport type GateSchema = {\n gateId: string;\n name: string;\n description: string;\n criteria: GateCriterion[];\n severity: GateSeverity;\n};\n\n// ---------------------------------------------------------------------------\n// Artifact Schema — what artifacts workflows produce\n// ---------------------------------------------------------------------------\n\nexport type ArtifactSchema = {\n artifactId: string;\n name: string;\n description: string;\n stage: string; // workflow step that produces this\n contentSchema: Record<string, unknown>; // JSON Schema for content\n requiredFields: string[];\n};\n\n// ---------------------------------------------------------------------------\n// Reasoning Role — epistemic actors in the domain\n// ---------------------------------------------------------------------------\n\nexport type ReasoningRole = {\n roleId: string;\n name: string;\n description: string;\n perspective: string;\n optimizesFor: string;\n mayBlock: boolean; // Epistemic Invariant #13: agents may block progress\n};\n\n// ---------------------------------------------------------------------------\n// Inquiry Shaping — pack-level hooks for RS-3 auto-shaping\n// ---------------------------------------------------------------------------\n\nexport type InquiryShapingQuestionTemplate = {\n templateId: string;\n questionType:\n | \"validation\"\n | \"falsification\"\n | \"assumption_probe\"\n | \"counterfactual\"\n | \"scope\"\n | \"comparison\"\n | \"mechanism\"\n | \"general\";\n priority?: \"critical\" | \"high\" | \"medium\" | \"low\";\n template: string; // Supports {{objective}} and {{hypothesis}}\n whenObjectiveIncludes?: string[];\n};\n\nexport type InquiryShapingTaskTemplate = {\n templateId: string;\n title: string; // Supports {{objective}} and {{hypothesis}}\n description?: string; // Supports {{objective}} and {{hypothesis}}\n taskType?:\n | \"general\"\n | \"find_evidence\"\n | \"verify_claim\"\n | \"research\"\n | \"review\"\n | \"interview\"\n | \"analysis\"\n | \"track_metrics\";\n priority?: \"urgent\" | \"high\" | \"medium\" | \"low\";\n whenObjectiveIncludes?: string[];\n whenQuestionTypes?: string[];\n};\n\nexport type InquiryShapingFrameworkHint = {\n frameworkName: string;\n whenObjectiveIncludes?: string[];\n whenQuestionTypes?: string[];\n boost?: number;\n reason?: string;\n};\n\nexport type InquiryShapingConfig = {\n questionTemplates?: InquiryShapingQuestionTemplate[];\n taskTemplates?: InquiryShapingTaskTemplate[];\n frameworkHints?: InquiryShapingFrameworkHint[];\n};\n\n// ---------------------------------------------------------------------------\n// Operating System Layer — prompts, tools, topic bootstrap, install surfaces\n// ---------------------------------------------------------------------------\n\nexport type RuntimeTarget = \"claude-code\" | \"codex\" | \"hybrid\" | \"portable\";\n\nexport type PromptSource = \"langfuse\" | \"file\";\nexport type PromptChannel =\n | \"bootstrap\"\n | \"workflow\"\n | \"analysis\"\n | \"review\"\n | \"tool\";\n\nexport type PromptBinding = {\n promptId: string;\n description: string;\n source: PromptSource;\n ref: string;\n fallbackRef?: string;\n channel: PromptChannel;\n required: boolean;\n runtimeTargets?: RuntimeTarget[];\n};\n\nexport type ToolKind = \"mcp\" | \"cli\" | \"script\" | \"hook\" | \"ai-tool\";\n\nexport type ToolBinding = {\n toolId: string;\n description: string;\n kind: ToolKind;\n entrypoint: string;\n required: boolean;\n runtimeTargets?: RuntimeTarget[];\n};\n\nexport type SetupAssetKind =\n | \"instruction\"\n | \"settings\"\n | \"hook\"\n | \"skill\"\n | \"agent\"\n | \"manifest\"\n | \"template\"\n | \"inbox\"\n | \"script\"\n | \"ui\";\n\nexport type SetupAsset = {\n assetId: string;\n kind: SetupAssetKind;\n description: string;\n path: string;\n required: boolean;\n runtimeTargets?: RuntimeTarget[];\n};\n\nexport type TopicTemplate = {\n slug: string;\n name: string;\n description: string;\n parentSlug?: string;\n ontologyId?: string;\n};\n\nexport type InstallProfile = {\n profileId: string;\n name: string;\n description: string;\n runtimeTarget: RuntimeTarget;\n promptIds: string[];\n toolIds: string[];\n assetIds: string[];\n defaultTopicSlugs: string[];\n};\n\nexport type OperatingSystemLayer = {\n prompts?: PromptBinding[];\n tools?: ToolBinding[];\n setupAssets?: SetupAsset[];\n topicTemplates?: TopicTemplate[];\n installProfiles?: InstallProfile[];\n};\n\n// ---------------------------------------------------------------------------\n// Domain Pack — the top-level contract\n// ---------------------------------------------------------------------------\n\nexport type DomainPack = {\n // Identity\n packId: string;\n name: string;\n version: string; // semver\n\n // Scope\n ontologyBindings: OntologyBinding[];\n topicRoots: TopicRoot[];\n\n // Workflow Templates\n workflows: WorkflowTemplate[];\n\n // Gate Schemas\n gates: GateSchema[];\n\n // Artifact Schemas\n artifacts: ArtifactSchema[];\n\n // Reasoning Roles\n roles: ReasoningRole[];\n\n // Inquiry shaping hooks\n inquiryShaping?: InquiryShapingConfig;\n\n // Runtime/install packaging layer\n operatingSystem?: OperatingSystemLayer;\n\n // Composition — optional references to other pack types\n appPackKeys?: string[]; // AppPackManifest keys this domain uses\n methodologyPackId?: string; // MethodologyPack for agent behavior\n};\n\n// ---------------------------------------------------------------------------\n// Builder helper — normalizes arrays and validates basic structure\n// ---------------------------------------------------------------------------\n\nfunction dedupeStrings(values: string[]): string[] {\n return Array.from(\n new Set(values.map((v) => v.trim()).filter((v) => v.length > 0))\n );\n}\n\nexport type DomainPackInput = Omit<DomainPack, \"appPackKeys\"> & {\n appPackKeys?: string[];\n};\n\nfunction normalizeRuntimeTargets(\n values: RuntimeTarget[] | undefined\n): RuntimeTarget[] | undefined {\n return values ? (dedupeStrings(values) as RuntimeTarget[]) : undefined;\n}\n\nfunction normalizeOntologyBinding(binding: OntologyBinding): OntologyBinding {\n return {\n ...binding,\n requiredEntityTypes: binding.requiredEntityTypes\n ? dedupeStrings(binding.requiredEntityTypes)\n : undefined,\n requiredEdgeTypes: binding.requiredEdgeTypes\n ? dedupeStrings(binding.requiredEdgeTypes)\n : undefined,\n };\n}\n\nfunction normalizeOperatingSystem(\n layer: OperatingSystemLayer | undefined\n): OperatingSystemLayer | undefined {\n if (!layer) {\n return;\n }\n\n return {\n prompts: layer.prompts?.map((prompt) => ({\n ...prompt,\n runtimeTargets: normalizeRuntimeTargets(prompt.runtimeTargets),\n })),\n tools: layer.tools?.map((tool) => ({\n ...tool,\n runtimeTargets: normalizeRuntimeTargets(tool.runtimeTargets),\n })),\n setupAssets: layer.setupAssets?.map((asset) => ({\n ...asset,\n runtimeTargets: normalizeRuntimeTargets(asset.runtimeTargets),\n })),\n topicTemplates: layer.topicTemplates,\n installProfiles: layer.installProfiles?.map((profile) => ({\n ...profile,\n promptIds: dedupeStrings(profile.promptIds),\n toolIds: dedupeStrings(profile.toolIds),\n assetIds: dedupeStrings(profile.assetIds),\n defaultTopicSlugs: dedupeStrings(profile.defaultTopicSlugs),\n })),\n };\n}\n\nexport function defineDomainPack(input: DomainPackInput): DomainPack {\n return {\n ...input,\n ontologyBindings: input.ontologyBindings.map(normalizeOntologyBinding),\n appPackKeys: input.appPackKeys\n ? dedupeStrings(input.appPackKeys)\n : undefined,\n operatingSystem: normalizeOperatingSystem(input.operatingSystem),\n workflows: input.workflows.map((w) => ({\n ...w,\n requiredArtifacts: dedupeStrings(w.requiredArtifacts),\n gateCheckpoints: dedupeStrings(w.gateCheckpoints),\n steps: w.steps.map((s) => ({\n ...s,\n requiredRoles: dedupeStrings(s.requiredRoles),\n produces: s.produces ? dedupeStrings(s.produces) : undefined,\n })),\n })),\n };\n}\n","/**\n * Domain Pack: Developer Reasoning\n *\n * Reference domain pack for AI-assisted software development reasoning.\n * This is the pack Lucern uses internally — a generic reasoning harness\n * for code development with beliefs, evidence, and structured workflows.\n *\n * Domain-neutral: demonstrates the contract without tenant-specific IP.\n */\n\nimport { defineDomainPack } from \"../contracts\";\n\nexport const DEVELOPER_REASONING_PACK = defineDomainPack({\n packId: \"developer-reasoning\",\n name: \"Developer Reasoning\",\n version: \"1.0.0\",\n\n ontologyBindings: [\n {\n ontologyId: \"software-entities\",\n versionConstraint: \"^1.0.0\",\n required: true,\n },\n ],\n\n topicRoots: [\n {\n slug: \"architecture\",\n name: \"Architecture\",\n description: \"System architecture decisions and trade-offs\",\n ontologyId: \"software-entities\",\n },\n {\n slug: \"implementation\",\n name: \"Implementation\",\n description: \"Active implementation work and worktrees\",\n ontologyId: \"software-entities\",\n },\n {\n slug: \"operations\",\n name: \"Operations\",\n description: \"Deployment, observability, and operational concerns\",\n },\n ],\n\n workflows: [\n {\n workflowId: \"worktree-lifecycle\",\n name: \"Worktree Lifecycle\",\n description:\n \"Structured development cycle from scoping through implementation and review\",\n steps: [\n {\n stepId: \"scope\",\n name: \"Scope & Context\",\n description:\n \"Read graph context, identify constraints and prior decisions\",\n requiredRoles: [\"investigator\"],\n produces: [\"scope-artifact\"],\n },\n {\n stepId: \"plan\",\n name: \"Plan\",\n description:\n \"Design implementation approach informed by graph beliefs\",\n requiredRoles: [\"investigator\", \"critic\"],\n produces: [\"plan-artifact\"],\n gateId: \"plan-reviewed\",\n },\n {\n stepId: \"build\",\n name: \"Build\",\n description: \"Implement with in-flight graph writeback\",\n requiredRoles: [\"implementer\"],\n produces: [\"implementation-artifact\"],\n },\n {\n stepId: \"review\",\n name: \"Review\",\n description:\n \"Validate implementation against plan, tests, and type safety\",\n requiredRoles: [\"critic\"],\n produces: [\"review-artifact\"],\n gateId: \"review-passed\",\n },\n ],\n requiredArtifacts: [\"scope-artifact\", \"implementation-artifact\"],\n gateCheckpoints: [\"plan-reviewed\", \"review-passed\"],\n },\n ],\n\n gates: [\n {\n gateId: \"plan-reviewed\",\n name: \"Plan Reviewed\",\n description: \"Implementation plan has been reviewed for feasibility\",\n criteria: [\n {\n criterionId: \"constraints-checked\",\n description:\n \"Plan respects high-credence beliefs (>= 0.90) as constraints\",\n metric: \"constraint_violations\",\n threshold: 0,\n operator: \"eq\",\n },\n {\n criterionId: \"scope-bounded\",\n description: \"Plan stays within declared file and concern scope\",\n metric: \"scope_bounded\",\n threshold: 1,\n operator: \"eq\",\n },\n ],\n severity: \"blocking\",\n },\n {\n gateId: \"review-passed\",\n name: \"Review Passed\",\n description: \"Implementation passes type checks, tests, and review\",\n criteria: [\n {\n criterionId: \"types-clean\",\n description: \"TypeScript check passes (npx tsc --noEmit)\",\n metric: \"tsc_errors\",\n threshold: 0,\n operator: \"eq\",\n },\n {\n criterionId: \"tests-passing\",\n description: \"All relevant tests pass\",\n metric: \"test_pass_ratio\",\n threshold: 1.0,\n operator: \"eq\",\n },\n ],\n severity: \"blocking\",\n },\n ],\n\n artifacts: [\n {\n artifactId: \"scope-artifact\",\n name: \"Scope Context\",\n description:\n \"Graph context summary — beliefs, questions, constraints informing this work\",\n stage: \"scope\",\n contentSchema: {\n type: \"object\",\n properties: {\n beliefs: { type: \"array\", items: { type: \"string\" } },\n questions: { type: \"array\", items: { type: \"string\" } },\n constraints: { type: \"array\", items: { type: \"string\" } },\n },\n required: [\"beliefs\", \"constraints\"],\n },\n requiredFields: [\"beliefs\", \"constraints\"],\n },\n {\n artifactId: \"plan-artifact\",\n name: \"Implementation Plan\",\n description: \"Files to create/modify, approach, and test strategy\",\n stage: \"plan\",\n contentSchema: {\n type: \"object\",\n properties: {\n files: { type: \"array\", items: { type: \"string\" } },\n approach: { type: \"string\" },\n testStrategy: { type: \"string\" },\n },\n required: [\"files\", \"approach\"],\n },\n requiredFields: [\"files\", \"approach\"],\n },\n {\n artifactId: \"implementation-artifact\",\n name: \"Implementation Summary\",\n description: \"What was built, files changed, decisions made\",\n stage: \"build\",\n contentSchema: {\n type: \"object\",\n properties: {\n filesChanged: { type: \"array\", items: { type: \"string\" } },\n decisions: { type: \"array\", items: { type: \"string\" } },\n deferredWork: { type: \"array\", items: { type: \"string\" } },\n },\n required: [\"filesChanged\"],\n },\n requiredFields: [\"filesChanged\"],\n },\n {\n artifactId: \"review-artifact\",\n name: \"Review Summary\",\n description: \"Review findings, type check results, test results\",\n stage: \"review\",\n contentSchema: {\n type: \"object\",\n properties: {\n verdict: { type: \"string\", enum: [\"approve\", \"request-changes\"] },\n findings: { type: \"array\", items: { type: \"string\" } },\n testsPassing: { type: \"boolean\" },\n typesClean: { type: \"boolean\" },\n },\n required: [\"verdict\", \"testsPassing\", \"typesClean\"],\n },\n requiredFields: [\"verdict\", \"testsPassing\", \"typesClean\"],\n },\n ],\n\n roles: [\n {\n roleId: \"investigator\",\n name: \"Investigator\",\n description: \"Reads graph context and identifies relevant prior knowledge\",\n perspective: \"Context-aware, evidence-driven scoping\",\n optimizesFor: \"thoroughness of context retrieval and constraint identification\",\n mayBlock: false,\n },\n {\n roleId: \"implementer\",\n name: \"Implementer\",\n description: \"Writes code and records decisions in the graph\",\n perspective: \"Pragmatic, focused on working code within constraints\",\n optimizesFor: \"correctness and simplicity\",\n mayBlock: false,\n },\n {\n roleId: \"critic\",\n name: \"Critic\",\n description:\n \"Challenges assumptions, finds edge cases, and surfaces risks\",\n perspective: \"Skeptical, detail-oriented, adversarial testing\",\n optimizesFor: \"identifying weaknesses before they reach production\",\n mayBlock: true, // Epistemic Invariant #13\n },\n ],\n\n inquiryShaping: {\n questionTemplates: [\n {\n templateId: \"developer-boundary-falsifier\",\n questionType: \"falsification\",\n priority: \"high\",\n template:\n \"Which interface, contract, or boundary would fail first if {{objective}} is wrong?\",\n whenObjectiveIncludes: [\n \"build\",\n \"implement\",\n \"refactor\",\n \"integrate\",\n \"algorithm\",\n \"handler\",\n \"workflow\",\n ],\n },\n {\n templateId: \"developer-regression-counterfactual\",\n questionType: \"counterfactual\",\n priority: \"high\",\n template:\n \"What existing behavior or verification path would regress if {{hypothesis}} is false?\",\n whenObjectiveIncludes: [\"build\", \"implement\", \"add\", \"extend\", \"support\"],\n },\n ],\n taskTemplates: [\n {\n templateId: \"developer-contract-audit\",\n title: \"Audit adjacent contracts and invariants for {{objective}}\",\n description:\n \"Inspect the existing MCP, schema, and worktree contracts that constrain {{objective}} before changing runtime behavior.\",\n taskType: \"analysis\",\n priority: \"high\",\n whenObjectiveIncludes: [\"build\", \"implement\", \"extend\", \"support\"],\n },\n {\n templateId: \"developer-verification-pass\",\n title: \"Run focused verification for {{objective}}\",\n description:\n \"Add or update targeted tests and type-safety checks that would fail if {{hypothesis}} is wrong.\",\n taskType: \"review\",\n priority: \"medium\",\n whenObjectiveIncludes: [\"build\", \"implement\", \"algorithm\", \"workflow\"],\n whenQuestionTypes: [\"falsification\", \"counterfactual\"],\n },\n ],\n frameworkHints: [\n {\n frameworkName: \"Boundary Audit\",\n whenObjectiveIncludes: [\"handler\", \"contract\", \"api\", \"workflow\"],\n boost: 0.25,\n reason: \"Developer reasoning work benefits from explicit boundary checks.\",\n },\n {\n frameworkName: \"Pre-mortem\",\n whenQuestionTypes: [\"falsification\", \"counterfactual\"],\n boost: 0.2,\n reason: \"Stress-testing likely failure modes improves worktree shaping quality.\",\n },\n ],\n },\n\n methodologyPackId: \"developer\",\n});\n"]}
@@ -0,0 +1,11 @@
1
+ import { DomainPack } from '../contracts.js';
2
+
3
+ /**
4
+ * Domain Pack: Engineering Accelerator
5
+ *
6
+ * First concrete engineering domain pack for proving that pack-host can
7
+ * turn first-hour workflows into reusable reasoning scaffolding.
8
+ */
9
+ declare const ENGINEERING_ACCELERATOR_PACK: DomainPack;
10
+
11
+ export { ENGINEERING_ACCELERATOR_PACK };