arkgate 4.7.6 → 4.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/CHANGELOG.md +28 -3
  2. package/README.md +8 -9
  3. package/bin/lib/analysis-engine.mjs +6 -6
  4. package/bin/lib/ark-order-error.mjs +18 -0
  5. package/bin/lib/ark-order-facts.mjs +53 -0
  6. package/bin/lib/ark-order-invariants.mjs +160 -0
  7. package/bin/lib/ark-order-sensors.mjs +118 -0
  8. package/bin/lib/ark-order-types.mjs +11 -0
  9. package/bin/lib/ark-run-sensors.mjs +13 -5
  10. package/bin/lib/config-contract.mjs +16 -72
  11. package/bin/lib/config-extras.mjs +151 -0
  12. package/bin/lib/diagnostic-catalog.mjs +7 -2
  13. package/bin/lib/extra-merge-teeth.mjs +8 -2
  14. package/bin/lib/install-migrate.mjs +4 -2
  15. package/bin/lib/managed-upgrade.mjs +1 -1
  16. package/bin/lib/mcp-adoption.mjs +9 -3
  17. package/bin/lib/remediation.mjs +48 -9
  18. package/bin/lib/resolved-candidate-facts.mjs +43 -0
  19. package/bin/lib/skill-install.mjs +17 -2
  20. package/bin/lib/start-preview.mjs +1 -0
  21. package/bin/lib/status-manifest.mjs +1 -1
  22. package/bin/lib/write-path-capabilities.mjs +2 -2
  23. package/dist/{configTypes-CgJimx9o.d.ts → configTypes-BdCe_gvv.d.ts} +22 -6
  24. package/dist/diagnosticCatalog-RiKPUFRG.d.ts +2307 -0
  25. package/dist/eslint/index.cjs +7 -6
  26. package/dist/eslint/index.d.ts +33 -2
  27. package/dist/eslint/index.js +7 -6
  28. package/dist/index.cjs +35 -35
  29. package/dist/index.d.ts +271 -2554
  30. package/dist/index.js +35 -35
  31. package/dist/nestjs/index.cjs +18 -0
  32. package/dist/nestjs/index.d.ts +24 -0
  33. package/dist/nestjs/index.js +18 -0
  34. package/dist/order/index.cjs +1 -0
  35. package/dist/order/index.d.ts +79 -0
  36. package/dist/order/index.js +1 -0
  37. package/dist/runtime/index.cjs +25 -0
  38. package/dist/runtime/index.d.ts +497 -0
  39. package/dist/runtime/index.js +25 -0
  40. package/dist/types-C9KApBzX.d.ts +1237 -0
  41. package/dist/types-DCSlrRnV.d.ts +181 -0
  42. package/docs/README.md +4 -4
  43. package/docs/agent-guide.md +1 -1
  44. package/docs/ai-gates.md +9 -2
  45. package/docs/configuration.md +13 -6
  46. package/docs/develop.md +4 -3
  47. package/docs/diagnostics.md +57 -3
  48. package/docs/package-surface.md +20 -16
  49. package/docs/product-voice.md +2 -1
  50. package/package.json +21 -2
  51. package/schemas/ark.config.schema.json +54 -2
  52. package/schemas/ark.resolved-candidate-facts.schema.json +1 -1
  53. package/server.json +2 -2
  54. package/templates/agent-skills/README.md +1 -1
  55. package/templates/agent-skills/ark-adopt/SKILL.md +2 -2
  56. package/templates/agent-skills/ark-contract/SKILL.md +1 -1
  57. package/templates/agent-skills/ark-place/SKILL.md +15 -6
  58. package/templates/agent-skills/ark-runtime/SKILL.md +10 -15
  59. package/templates/skills/ark-adopt.md +2 -2
  60. package/templates/skills/ark-contract.md +1 -1
  61. package/templates/skills/ark-place.md +15 -6
  62. package/templates/skills/ark-runtime.md +10 -15
@@ -21,8 +21,8 @@
21
21
  },
22
22
  "schemaVersion": {
23
23
  "type": "string",
24
- "const": "1.2",
25
- "default": "1.2"
24
+ "const": "1.3",
25
+ "default": "1.3"
26
26
  },
27
27
  "name": {
28
28
  "type": "string",
@@ -636,6 +636,9 @@
636
636
  "arkRun": {
637
637
  "$ref": "#/$defs/arkRun"
638
638
  },
639
+ "arkOrder": {
640
+ "$ref": "#/$defs/arkOrder"
641
+ },
639
642
  "stewards": {
640
643
  "type": "array",
641
644
  "items": {
@@ -818,6 +821,14 @@
818
821
  "uniqueItems": true,
819
822
  "default": []
820
823
  },
824
+ "kernelRoots": {
825
+ "type": "array",
826
+ "items": {
827
+ "type": "string",
828
+ "minLength": 1
829
+ },
830
+ "uniqueItems": true
831
+ },
821
832
  "managedLayers": {
822
833
  "type": "array",
823
834
  "items": {
@@ -830,6 +841,47 @@
830
841
  "requireDeclarations": {
831
842
  "type": "boolean",
832
843
  "default": true
844
+ },
845
+ "ignoreDirectNewForErrors": {
846
+ "type": "boolean",
847
+ "default": true
848
+ }
849
+ }
850
+ },
851
+ "arkOrder": {
852
+ "type": "object",
853
+ "additionalProperties": false,
854
+ "properties": {
855
+ "mode": {
856
+ "type": "string",
857
+ "enum": [
858
+ "advisory",
859
+ "enforced"
860
+ ],
861
+ "default": "advisory"
862
+ },
863
+ "planeRoots": {
864
+ "type": "array",
865
+ "items": {
866
+ "type": "string",
867
+ "minLength": 1
868
+ },
869
+ "uniqueItems": true,
870
+ "default": []
871
+ },
872
+ "managedLayers": {
873
+ "type": "array",
874
+ "items": {
875
+ "type": "string",
876
+ "minLength": 1
877
+ },
878
+ "uniqueItems": true,
879
+ "default": []
880
+ },
881
+ "maxXiKeys": {
882
+ "type": "integer",
883
+ "minimum": 1,
884
+ "default": 7
833
885
  }
834
886
  }
835
887
  }
@@ -1 +1 @@
1
- {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://unpkg.com/arkgate@3/schemas/ark.resolved-candidate-facts.schema.json","title":"ArkGate resolved candidate facts","type":"object","additionalProperties":false,"required":["schemaVersion","completeness","completenessReasons","resolverIdentity","compilerIdentity","compilerOptionsHash","tsconfigHash","candidateTreeHash","evidenceRequirementsHash","files","dependencies","capabilityUses","ambientUses","publishCalls","intentReferences","safetyUses","factsHash"],"properties":{"schemaVersion":{"enum":["1.0","1.1","1.2"]},"completeness":{"enum":["complete","partial","unavailable"]},"completenessReasons":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"file":{"type":"string","minLength":1,"pattern":"^(?!/)(?![A-Za-z]:/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$"}}}},"resolverIdentity":{"type":"string","minLength":1},"compilerIdentity":{"type":"string","minLength":1},"compilerOptionsHash":{"type":"string","minLength":1},"tsconfigHash":{"type":"string","minLength":1},"candidateTreeHash":{"type":"string","minLength":1},"evidenceRequirementsHash":{"type":"string","minLength":1},"projectPackageName":{"type":"string","minLength":1},"files":{"type":"array","uniqueItems":true,"items":{"type":"object","additionalProperties":false,"required":["path","contentHash","parseStatus","parseDiagnosticCount","exportsOnlyTypes","typeOnlyExportNames","hasTopLevelSideEffects"],"properties":{"path":{"type":"string","minLength":1,"pattern":"^(?!/)(?![A-Za-z]:/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$"},"contentHash":{"type":"string","minLength":1},"parseStatus":{"enum":["parsed","invalid"]},"parseDiagnosticCount":{"type":"integer","minimum":0},"exportsOnlyTypes":{"type":"boolean"},"typeOnlyExportNames":{"type":"array","items":{"type":"string","minLength":1}},"hasTopLevelSideEffects":{"type":"boolean"}},"allOf":[{"if":{"properties":{"parseStatus":{"const":"parsed"}}},"then":{"properties":{"parseDiagnosticCount":{"const":0}}}},{"if":{"properties":{"parseStatus":{"const":"invalid"}}},"then":{"properties":{"parseDiagnosticCount":{"minimum":1}}}}]}},"dependencies":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["from","kind","typeOnly","line","resolution"],"properties":{"from":{"type":"string","minLength":1,"pattern":"^(?!/)(?![A-Za-z]:/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$"},"specifier":{"type":"string","minLength":1},"kind":{"enum":["import","export","dynamic-import","require"]},"typeOnly":{"type":"boolean"},"line":{"type":"integer","minimum":1},"resolution":{"enum":["resolved-project","resolved-external","unresolved","dynamic"]},"target":{"type":"string","minLength":1,"pattern":"^(?!/)(?![A-Za-z]:/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$"},"namedBindings":{"type":"array","items":{"type":"string","minLength":1}},"targetTypeOnlyExports":{"type":"boolean"},"sourcePureTypeModule":{"type":"boolean"},"namedBindingsTypeOnly":{"type":"boolean"},"portProofEligible":{"type":"boolean"}},"allOf":[{"if":{"properties":{"resolution":{"const":"resolved-project"}}},"then":{"required":["target"]},"else":{"not":{"required":["target"]}}},{"if":{"properties":{"resolution":{"const":"dynamic"}}},"else":{"required":["specifier"]}}]}},"capabilityUses":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["file","line","symbol","capability","source"],"properties":{"file":{"type":"string","minLength":1,"pattern":"^(?!/)(?![A-Za-z]:/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$"},"line":{"type":"integer","minimum":1},"symbol":{"type":"string","minLength":1},"capability":{"enum":["network","filesystem","clock","randomness","environment","process","persistence"]},"source":{"enum":["ambient-global","import-based"]}}}},"ambientUses":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["file","line","symbol"],"properties":{"file":{"type":"string","minLength":1,"pattern":"^(?!/)(?![A-Za-z]:/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$"},"line":{"type":"integer","minimum":1},"symbol":{"type":"string","minLength":1}}}},"publishCalls":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["file","line","objectHasIntent","arkPublishCandidate","hasSource"],"properties":{"file":{"type":"string","minLength":1,"pattern":"^(?!/)(?![A-Za-z]:/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$"},"line":{"type":"integer","minimum":1},"rawIntentName":{"type":"string","minLength":1},"objectHasIntent":{"type":"boolean"},"arkPublishCandidate":{"type":"boolean"},"hasSource":{"type":"boolean"},"sourceIntent":{"type":"string","minLength":1}}}},"intentReferences":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["file","line","intent"],"properties":{"file":{"type":"string","minLength":1,"pattern":"^(?!/)(?![A-Za-z]:/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$"},"line":{"type":"integer","minimum":1},"intent":{"type":"string","minLength":1}}}},"safetyUses":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["file","line","kind"],"properties":{"file":{"type":"string","minLength":1,"pattern":"^(?!/)(?![A-Za-z]:/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$"},"line":{"type":"integer","minimum":1},"kind":{"enum":["ts-suppression","any-cast","dynamic-import","dynamic-require","in-memory-store"]},"symbol":{"type":"string","minLength":1}},"allOf":[{"if":{"properties":{"kind":{"const":"in-memory-store"}}},"then":{"required":["symbol"]},"else":{"not":{"required":["symbol"]}}}]}},"classShapes":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["file","className","exported","hasPublicMutableFields","hasPublicSetters","hasPublicConstructor","hasStaticFactory","mutatingMethods"],"properties":{"file":{"type":"string","minLength":1,"pattern":"^(?!/)(?![A-Za-z]:/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$"},"className":{"type":"string","minLength":1},"exported":{"type":"boolean"},"hasPublicMutableFields":{"type":"boolean"},"hasPublicSetters":{"type":"boolean"},"hasPublicConstructor":{"type":"boolean"},"hasStaticFactory":{"type":"boolean"},"dataOnly":{"type":"boolean"},"mutatingMethods":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["name","referencesGuardOrPublish"],"properties":{"name":{"type":"string","minLength":1},"referencesGuardOrPublish":{"type":"boolean"}}}}}}},"arkRunKernelCalls":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["file","line","kind","callee","viaImport"],"properties":{"file":{"type":"string","minLength":1,"pattern":"^(?!/)(?![A-Za-z]:/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$"},"line":{"type":"integer","minimum":1},"kind":{"enum":["factory","publisher","publish","raise","send","subscribe","register-handler","resolve","resolve-singleton"]},"callee":{"type":"string","minLength":1},"viaImport":{"type":"boolean"},"receiver":{"type":"string","minLength":1},"nameLiteral":{"type":"string","minLength":1}}}},"arkRunManagedNews":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["file","line","typeName"],"properties":{"file":{"type":"string","minLength":1,"pattern":"^(?!/)(?![A-Za-z]:/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$"},"line":{"type":"integer","minimum":1},"typeName":{"type":"string","minLength":1},"importedFrom":{"type":"string","minLength":1}}}},"arkRunCompositionRootHits":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["file","matchedRoot","hasKernelFactory"],"properties":{"file":{"type":"string","minLength":1,"pattern":"^(?!/)(?![A-Za-z]:/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$"},"matchedRoot":{"type":"string","minLength":1},"hasKernelFactory":{"type":"boolean"}}}},"arkRunDeclarations":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["file","line","uses","reactsTo","raises","sends"],"properties":{"file":{"type":"string","minLength":1,"pattern":"^(?!/)(?![A-Za-z]:/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$"},"line":{"type":"integer","minimum":1},"uses":{"type":"array","items":{"type":"string","minLength":1}},"reactsTo":{"type":"array","items":{"type":"string","minLength":1}},"raises":{"type":"array","items":{"type":"string","minLength":1}},"sends":{"type":"array","items":{"type":"string","minLength":1}}}}},"factsHash":{"type":"string","minLength":1}},"allOf":[{"if":{"properties":{"completeness":{"const":"complete"}}},"then":{"properties":{"completenessReasons":{"maxItems":0},"files":{"items":{"properties":{"parseStatus":{"const":"parsed"}}}}}}},{"if":{"properties":{"completeness":{"enum":["partial","unavailable"]}}},"then":{"properties":{"completenessReasons":{"minItems":1}}}}]}
1
+ {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://unpkg.com/arkgate@3/schemas/ark.resolved-candidate-facts.schema.json","title":"ArkGate resolved candidate facts","type":"object","additionalProperties":false,"required":["schemaVersion","completeness","completenessReasons","resolverIdentity","compilerIdentity","compilerOptionsHash","tsconfigHash","candidateTreeHash","evidenceRequirementsHash","files","dependencies","capabilityUses","ambientUses","publishCalls","intentReferences","safetyUses","factsHash"],"properties":{"schemaVersion":{"enum":["1.0","1.1","1.2"]},"completeness":{"enum":["complete","partial","unavailable"]},"completenessReasons":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"file":{"type":"string","minLength":1,"pattern":"^(?!/)(?![A-Za-z]:/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$"}}}},"resolverIdentity":{"type":"string","minLength":1},"compilerIdentity":{"type":"string","minLength":1},"compilerOptionsHash":{"type":"string","minLength":1},"tsconfigHash":{"type":"string","minLength":1},"candidateTreeHash":{"type":"string","minLength":1},"evidenceRequirementsHash":{"type":"string","minLength":1},"projectPackageName":{"type":"string","minLength":1},"files":{"type":"array","uniqueItems":true,"items":{"type":"object","additionalProperties":false,"required":["path","contentHash","parseStatus","parseDiagnosticCount","exportsOnlyTypes","typeOnlyExportNames","hasTopLevelSideEffects"],"properties":{"path":{"type":"string","minLength":1,"pattern":"^(?!/)(?![A-Za-z]:/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$"},"contentHash":{"type":"string","minLength":1},"parseStatus":{"enum":["parsed","invalid"]},"parseDiagnosticCount":{"type":"integer","minimum":0},"exportsOnlyTypes":{"type":"boolean"},"typeOnlyExportNames":{"type":"array","items":{"type":"string","minLength":1}},"hasTopLevelSideEffects":{"type":"boolean"}},"allOf":[{"if":{"properties":{"parseStatus":{"const":"parsed"}}},"then":{"properties":{"parseDiagnosticCount":{"const":0}}}},{"if":{"properties":{"parseStatus":{"const":"invalid"}}},"then":{"properties":{"parseDiagnosticCount":{"minimum":1}}}}]}},"dependencies":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["from","kind","typeOnly","line","resolution"],"properties":{"from":{"type":"string","minLength":1,"pattern":"^(?!/)(?![A-Za-z]:/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$"},"specifier":{"type":"string","minLength":1},"kind":{"enum":["import","export","dynamic-import","require"]},"typeOnly":{"type":"boolean"},"line":{"type":"integer","minimum":1},"resolution":{"enum":["resolved-project","resolved-external","unresolved","dynamic"]},"target":{"type":"string","minLength":1,"pattern":"^(?!/)(?![A-Za-z]:/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$"},"namedBindings":{"type":"array","items":{"type":"string","minLength":1}},"targetTypeOnlyExports":{"type":"boolean"},"sourcePureTypeModule":{"type":"boolean"},"namedBindingsTypeOnly":{"type":"boolean"},"portProofEligible":{"type":"boolean"}},"allOf":[{"if":{"properties":{"resolution":{"const":"resolved-project"}}},"then":{"required":["target"]},"else":{"not":{"required":["target"]}}},{"if":{"properties":{"resolution":{"const":"dynamic"}}},"else":{"required":["specifier"]}}]}},"capabilityUses":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["file","line","symbol","capability","source"],"properties":{"file":{"type":"string","minLength":1,"pattern":"^(?!/)(?![A-Za-z]:/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$"},"line":{"type":"integer","minimum":1},"symbol":{"type":"string","minLength":1},"capability":{"enum":["network","filesystem","clock","randomness","environment","process","persistence"]},"source":{"enum":["ambient-global","import-based"]}}}},"ambientUses":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["file","line","symbol"],"properties":{"file":{"type":"string","minLength":1,"pattern":"^(?!/)(?![A-Za-z]:/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$"},"line":{"type":"integer","minimum":1},"symbol":{"type":"string","minLength":1}}}},"publishCalls":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["file","line","objectHasIntent","arkPublishCandidate","hasSource"],"properties":{"file":{"type":"string","minLength":1,"pattern":"^(?!/)(?![A-Za-z]:/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$"},"line":{"type":"integer","minimum":1},"rawIntentName":{"type":"string","minLength":1},"objectHasIntent":{"type":"boolean"},"arkPublishCandidate":{"type":"boolean"},"hasSource":{"type":"boolean"},"sourceIntent":{"type":"string","minLength":1}}}},"intentReferences":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["file","line","intent"],"properties":{"file":{"type":"string","minLength":1,"pattern":"^(?!/)(?![A-Za-z]:/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$"},"line":{"type":"integer","minimum":1},"intent":{"type":"string","minLength":1}}}},"safetyUses":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["file","line","kind"],"properties":{"file":{"type":"string","minLength":1,"pattern":"^(?!/)(?![A-Za-z]:/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$"},"line":{"type":"integer","minimum":1},"kind":{"enum":["ts-suppression","any-cast","dynamic-import","dynamic-require","in-memory-store"]},"symbol":{"type":"string","minLength":1}},"allOf":[{"if":{"properties":{"kind":{"const":"in-memory-store"}}},"then":{"required":["symbol"]},"else":{"not":{"required":["symbol"]}}}]}},"classShapes":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["file","className","exported","hasPublicMutableFields","hasPublicSetters","hasPublicConstructor","hasStaticFactory","mutatingMethods"],"properties":{"file":{"type":"string","minLength":1,"pattern":"^(?!/)(?![A-Za-z]:/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$"},"className":{"type":"string","minLength":1},"exported":{"type":"boolean"},"hasPublicMutableFields":{"type":"boolean"},"hasPublicSetters":{"type":"boolean"},"hasPublicConstructor":{"type":"boolean"},"hasStaticFactory":{"type":"boolean"},"dataOnly":{"type":"boolean"},"mutatingMethods":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["name","referencesGuardOrPublish"],"properties":{"name":{"type":"string","minLength":1},"referencesGuardOrPublish":{"type":"boolean"}}}}}}},"arkRunKernelCalls":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["file","line","kind","callee","viaImport"],"properties":{"file":{"type":"string","minLength":1,"pattern":"^(?!/)(?![A-Za-z]:/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$"},"line":{"type":"integer","minimum":1},"kind":{"enum":["factory","publisher","publish","raise","send","subscribe","register-handler","resolve","resolve-singleton"]},"callee":{"type":"string","minLength":1},"viaImport":{"type":"boolean"},"receiver":{"type":"string","minLength":1},"nameLiteral":{"type":"string","minLength":1}}}},"arkRunManagedNews":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["file","line","typeName"],"properties":{"file":{"type":"string","minLength":1,"pattern":"^(?!/)(?![A-Za-z]:/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$"},"line":{"type":"integer","minimum":1},"typeName":{"type":"string","minLength":1},"importedFrom":{"type":"string","minLength":1}}}},"arkRunCompositionRootHits":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["file","matchedRoot","hasKernelFactory"],"properties":{"file":{"type":"string","minLength":1,"pattern":"^(?!/)(?![A-Za-z]:/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$"},"matchedRoot":{"type":"string","minLength":1},"hasKernelFactory":{"type":"boolean"}}}},"arkRunDeclarations":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["file","line","uses","reactsTo","raises","sends"],"properties":{"file":{"type":"string","minLength":1,"pattern":"^(?!/)(?![A-Za-z]:/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$"},"line":{"type":"integer","minimum":1},"uses":{"type":"array","items":{"type":"string","minLength":1}},"reactsTo":{"type":"array","items":{"type":"string","minLength":1}},"raises":{"type":"array","items":{"type":"string","minLength":1}},"sends":{"type":"array","items":{"type":"string","minLength":1}}}}},"arkOrderPlaneCalls":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["file","line","callee"],"properties":{"file":{"type":"string","minLength":1,"pattern":"^(?!/)(?![A-Za-z]:/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$"},"line":{"type":"integer","minimum":1},"callee":{"type":"string","minLength":1}}}},"arkOrderGenericUpdates":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["file","line","method"],"properties":{"file":{"type":"string","minLength":1,"pattern":"^(?!/)(?![A-Za-z]:/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$"},"line":{"type":"integer","minimum":1},"method":{"type":"string","minLength":1}}}},"arkOrderRootHits":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["file","matchedRoot","hasPlaneFactory"],"properties":{"file":{"type":"string","minLength":1,"pattern":"^(?!/)(?![A-Za-z]:/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$"},"matchedRoot":{"type":"string","minLength":1},"hasPlaneFactory":{"type":"boolean"}}}},"factsHash":{"type":"string","minLength":1}},"allOf":[{"if":{"properties":{"completeness":{"const":"complete"}}},"then":{"properties":{"completenessReasons":{"maxItems":0},"files":{"items":{"properties":{"parseStatus":{"const":"parsed"}}}}}}},{"if":{"properties":{"completeness":{"enum":["partial","unavailable"]}}},"then":{"properties":{"completenessReasons":{"minItems":1}}}}]}
package/server.json CHANGED
@@ -6,12 +6,12 @@
6
6
  "url": "https://github.com/pedroknigge/arkgate",
7
7
  "source": "github"
8
8
  },
9
- "version": "4.7.6",
9
+ "version": "4.8.0",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "arkgate",
14
- "version": "4.7.6",
14
+ "version": "4.8.0",
15
15
  "runtimeHint": "npx",
16
16
  "transport": {
17
17
  "type": "stdio"
@@ -7,7 +7,7 @@
7
7
  This directory is the **Agent Skills–compatible** packaging of the same **13**
8
8
  `/ark-*` skills shipped as flat templates for Ark install. **No new skill names.**
9
9
 
10
- Package version when last generated context: **arkgate@4.7.5**
10
+ Package version when last generated context: **arkgate@4.8.0**
11
11
  Schema: agent-skills package contract `1.0`
12
12
 
13
13
  ## Skills (frozen catalog)
@@ -124,7 +124,7 @@ ArkGate has **two opt-in planes**. The user chooses which to use; you **always l
124
124
  |-------|------------------|----------------|-----------------|
125
125
  | **Layers** (inter-layer) | Who may import whom, capabilities, pure/forbiddenGlobals, peerIsolation | `ark.config.json` → `layers[]`, `rules[]` | graph check, baseline edges, doctor coverage % |
126
126
  | **ArkRules** (intra-layer) | Structure inside a layer + domain invariants as data | `arkRules` map + `arkrules/<ExactLayerName>.json` | structure sensors, invariant coverage, `--rules-inventory`, doctor `rulesUnderContract` |
127
- | **ArkRun** (extra) | Kernel usage + complete declarations | `arkRun` on `ark.config.json` (schema `1.2+`) + companion `@arkgate/runtime` | `ARKRUN_*`, doctor `arkRun` (`notAScore`) |
127
+ | **ArkRun** (extra) | Kernel usage + complete declarations | `arkRun` on `ark.config.json` (schema `1.2+`); factory `arkgate/runtime` | `ARKRUN_*`, doctor `arkRun` (`notAScore`) |
128
128
 
129
129
  **Rules for every report / answer:**
130
130
  1. Prefix each finding or next step with **`[Layer]`** or **`[ArkRules]`** or **`[ArkRun]`** (or a two-column table with those headers).
@@ -145,7 +145,7 @@ ArkGate has **two opt-in planes**. The user chooses which to use; you **always l
145
145
  - Required shape: `compositionRoots` (real files; empty + enforced fails closed), `managedLayers` (existing `layers[].name` only), `requireDeclarations` (default true).
146
146
  - Do **not** put `arkRun` on the compact starter / `ark start` scaffold. Brownfield stays advisory until the team promotes.
147
147
  - Absence is valid and **silent** — never force the extra. Never force the kernel over existing Nest/DI. Do not invent `/ark-run`.
148
- - Import the companion from `@arkgate/runtime` (factory `createStrictArkKernel`, per instance, no process-wide singleton). Never a removed `arkgate/runtime` shim. No shipped cloud broker SDKs.
148
+ - Import from `arkgate/runtime` (factory `createStrictArkKernel`, per instance, no process-wide singleton). `@arkgate/runtime` is deprecated. No shipped cloud broker SDKs.
149
149
  - In-memory stores are **not** production durability. Branding ArkRun is not a durability claim. Doctor / status `arkRun` is `notAScore`.
150
150
  - Demoting enforced → advisory or deleting the extra is policy-delta **weakening**.
151
151
  - After the extra is honest: handoff `/ark-runtime` to wire one candidate, `/ark-place` for new kernel-managed files. Skills never enforce.
@@ -19,7 +19,7 @@ preview-only. Never weaken the architecture config.
19
19
  |------------------------------|----------------|
20
20
  | Layers / include / ArkRules / **ArkRun extra** need an edit | **`/ark-adopt`** (path, first `arkRun`) or **`/ark-autopilot`** (tighten) |
21
21
  | False-green / concentrated edge | **`/ark-adopt`** — write the honest config |
22
- | Companion install / one kernel candidate | **`/ark-runtime`** — this leftover name does not wire `@arkgate/runtime` |
22
+ | Kernel extra / one kernel candidate | **`/ark-runtime`** — leftover name; wires `arkgate/runtime`, not a second package |
23
23
 
24
24
  ## Dual engine (mandatory)
25
25
 
@@ -100,23 +100,25 @@ retain `projectIdentity.projectId`, then pass both `expectedRoot` and `expectedP
100
100
  uncertain, do not consume MCP analysis: use the workspace-local CLI and report that MCP
101
101
  restart/retargeting is required. `ark://manifest` never satisfies this preflight.
102
102
 
103
- ## Dual plane — layers + ArkRules (mandatory, except /ark-runtime)
103
+ ## Dual plane — layers + extras (mandatory, except /ark-runtime)
104
104
 
105
- ArkGate has **two opt-in planes**. The user chooses which to use; you **always label** findings so they never blur.
105
+ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; you **always label** findings so they never blur. ArkOrder is an extra **inside** the `arkgate` package (`arkgate/order`), not a second install.
106
106
 
107
107
  | Plane | What it protects | Where it lives | Sensors / tools |
108
108
  |-------|------------------|----------------|-----------------|
109
109
  | **Layers** (inter-layer) | Who may import whom, capabilities, pure/forbiddenGlobals, peerIsolation | `ark.config.json` → `layers[]`, `rules[]` | graph check, baseline edges, doctor coverage % |
110
110
  | **ArkRules** (intra-layer) | Structure inside a layer + domain invariants as data | `arkRules` map + `arkrules/<ExactLayerName>.json` | structure sensors, invariant coverage, `--rules-inventory`, doctor `rulesUnderContract` |
111
- | **ArkRun** (extra) | Kernel usage + complete declarations | `arkRun` on `ark.config.json` (schema `1.2+`) + companion `@arkgate/runtime` | `ARKRUN_*`, doctor `arkRun` (`notAScore`) |
111
+ | **ArkRun** (extra) | Kernel usage + complete declarations | `arkRun` on `ark.config.json` (schema `1.2+`); factory `arkgate/runtime` | `ARKRUN_*`, doctor `arkRun` (`notAScore`) |
112
+ | **ArkOrder** (extra) | Operational pattern (ξ vs s) | `arkOrder` on `ark.config.json` (schema `1.3+`); factory `arkgate/order` | `ARKORDER_*` |
112
113
 
113
114
  **Rules for every report / answer:**
114
- 1. Prefix each finding or next step with **`[Layer]`** or **`[ArkRules]`** or **`[ArkRun]`** (or a two-column table with those headers).
115
+ 1. Prefix each finding or next step with **`[Layer]`** or **`[ArkRules]`** or **`[ArkRun]`** or **`[ArkOrder]`** (or a table with those headers).
115
116
  2. Never call an import-edge violation an “invariant” or an aggregate sensor a “layer deny.”
116
117
  3. Absence of `arkRules` is **valid** — do not force ArkRules unless the user wants them or residual inventory clearly wants a pilot.
117
118
  4. Missing layer home: add it via **`/ark-adopt`** in this session if needed, then write the file; never invent `mechanical-safe`.
118
119
  5. CLI helpers: `ark-check --rules-inventory --json`, doctor JSON `rulesUnderContract`, sensors emit `ARKRULE_*` / `INVARIANT_UNCOVERED` with `evidence.arkruleId`.
119
120
  6. Absence of `arkRun` is **valid**. Do not introduce the kernel speculatively. Skills never enforce this extra.
121
+ 7. Absence of `arkOrder` is **valid**. When on: Domain stays plane-free; freeze ξ with `release()`; never `update`/`patch`/`set` the pattern. Import `createOrderPlane` from `arkgate/order` (same npm package). No `/ark-order` skill.
120
122
 
121
123
 
122
124
  ### Place + ArkRules
@@ -127,13 +129,20 @@ ArkGate has **two opt-in planes**. The user chooses which to use; you **always l
127
129
  When `arkRun` is present on the architecture config:
128
130
  - Scaffold kernel-managed artifacts **through the kernel**, not `new` of an admitted type (`ARKRUN_DIRECT_NEW`).
129
131
  - Call `createStrictArkKernel` (or an admission sibling) only inside `arkRun.compositionRoots`. Each call is a new instance — no process-wide `getKernel()`.
130
- - Domain-role files stay kernel-free (`ARKRUN_KERNEL_IN_DOMAIN`). Import from `@arkgate/runtime` (or `/nestjs`), never a removed `arkgate/runtime` shim.
132
+ - Domain-role files stay kernel-free (`ARKRUN_KERNEL_IN_DOMAIN`). Import from `arkgate/runtime` (or `arkgate/nestjs`). `@arkgate/runtime` is deprecated.
131
133
  - List `uses` / `reactsTo` / `raises` / `sends` when `requireDeclarations` is on. Adding an existing call-site literal to the declaration list is the only mechanical-safe ArkRun edit; inventing a new emit / handle / depend is judgment.
132
134
  - Do not import a homemade bus (`EventEmitter`, queue clients) in `managedLayers` — send on the kernel transport (`local` / `localBlocking` / `broker`; `ephemeral` defaults true). No shipped cloud SDKs.
133
135
  - In-memory stores are **not** production durability. Doctor `arkRun` is `notAScore`.
134
136
  - Absence of the extra: place with **[Layer]** + **[ArkRules]** only. Enable advisory extra via `/ark-adopt`; evaluate a hand-rolled bus via `/ark-runtime`. Do not invent `/ark-run`.
135
137
  - Skills never enforce.
136
138
 
139
+ ### Place + ArkOrder
140
+ When `arkOrder` is present on the architecture config:
141
+ - Import `createOrderPlane` from `arkgate/order` (same npm package). Domain-role files stay plane-free.
142
+ - Freeze ξ with `release()`; derive s with `project()`; field `ingest()` never mints a pattern; `proposeRelease()` needs a non-empty blast. There is no `update`/`patch`/`set`.
143
+ - Call the factory only inside `arkOrder.planeRoots`. Empty roots in `enforced` mode is `ARKORDER_MISSING_PLANE`.
144
+ - Absence of the extra is valid. Do not invent `/ark-order`. Skills never enforce.
145
+
137
146
  ## Subagent fan-out (optional, host-dependent)
138
147
 
139
148
  If the host supports **parallel subagents** and the task splits cleanly (e.g. multiple
@@ -231,7 +240,7 @@ End with **exactly** these headings (markdown `###`):
231
240
  - **Sensor:** commands/tools run
232
241
  - **Opened:** real paths read (or `n/a` only if pure install/upgrade with no source analysis)
233
242
  - **Result:** one-line outcome
234
- - **Planes:** one-line split of residual **[Layer]** vs **[ArkRules]** vs **[ArkRun]** (or `n/a` if unused)
243
+ - **Planes:** one-line split of residual **[Layer]** vs **[ArkRules]** vs **[ArkRun]** vs **[ArkOrder]** (or `n/a` if unused)
235
244
  - **Compass:** top residual lenses | `n/a`
236
245
  - **Done axes:** architecture residual (status/doctor/compass) | feature/ticket residual (outside package). Enforce green ≠ feature done
237
246
  - **Handoff:** `/ark-…` / CLI / `none`
@@ -1,26 +1,26 @@
1
1
  ---
2
2
  name: ark-runtime
3
- description: Wire the optional ArkRun extra (@arkgate/runtime). One candidate. Extra on via /ark-adopt.
3
+ description: Wire the optional ArkRun extra (arkgate/runtime). One candidate. Extra on via /ark-adopt.
4
4
  ---
5
5
 
6
6
  # /ark-runtime — Evaluate and wire ArkRun (experimental opt-in)
7
7
 
8
- The ArkRun companion (`@arkgate/runtime`) is currently **experimental**. It is **not** required
8
+ The ArkRun kernel (`arkgate/runtime`) is currently **experimental**. It is **not** required
9
9
  for ArkGate enforcement and is **not** production durability. Use this skill when the user wants
10
10
  to evaluate or wire the kernel. **This skill never enforces** — the write / CI / ESLint plane
11
- does when the `arkRun` extra is on. Do **not** invent `/ark-run`.
11
+ does when the `arkRun` extra is on. Do **not** invent `/ark-run`. `@arkgate/runtime` is deprecated.
12
12
 
13
13
  **When:** evaluate a hand-rolled bus / outbox / saga / projection / policy / Nest adapter against
14
- the companion, or wire an extra that is already on (composition root, declarations, transport).
14
+ the kernel, or wire an extra that is already on (composition root, declarations, transport).
15
15
  **Not when:** session 0 / extra not chosen (`/ark-adopt`); one new file (`/ark-place`); skip-violation
16
16
  grind (`/ark-autopilot` / leftover `/ark-fix`).
17
17
 
18
- ## Extra vs companion (mandatory)
18
+ ## Extra vs kernel (mandatory)
19
19
 
20
20
  | Piece | What it is | What it is not |
21
21
  |-------|------------|----------------|
22
22
  | **ArkRun extra** (`arkRun` on `ark.config.json`, schema `1.2+`) | Gate contract: kernel usage + complete declarations | A score; Layers / ArkRules replacement; merge teeth while `advisory` |
23
- | **Companion** `@arkgate/runtime` | Kernel you construct with `createStrictArkKernel` (one instance per call) | Bundled in the `arkgate` tarball; a process-wide `getKernel()`; shipped cloud broker SDKs |
23
+ | **Kernel** `arkgate/runtime` | Kernel you construct with `createStrictArkKernel` (one instance per call) | A process-wide `getKernel()`; shipped cloud broker SDKs; production durability |
24
24
 
25
25
  Absence of the extra is **silent** — Layers and ArkRules verdicts stay identical. Doctor / status
26
26
  `arkRun` is always `notAScore`. Never invent 0–10 scores or pass/fail from this skill.
@@ -71,7 +71,7 @@ the same files or weaken the gate.
71
71
  - saga/workflow orchestration (multi-step processes with compensation)
72
72
  - read-model/projection builders
73
73
  - policy/authorization checks scattered across use cases
74
- Also check whether `@nestjs/common` is present → the `@arkgate/runtime/nestjs`
74
+ Also check whether `@nestjs/common` is present → the `arkgate/nestjs`
75
75
  adapters apply.
76
76
  2. **Read the extra** — open `ark.config.json`. If `arkRun` is absent and the user wants the extra,
77
77
  **STOP — do not continue this skill as complete.** Handoff **`/ark-adopt`** to write **advisory**
@@ -81,13 +81,8 @@ the same files or weaken the gate.
81
81
  3. **Pick ONE target** — the smallest, most self-contained candidate (fewest
82
82
  call sites). Migrating everything at once is how adoptions die. List the
83
83
  rest as follow-ups in the report. New files after the extra is on go through **`/ark-place`**.
84
- 4. **Resolve availability** — run `npm view @arkgate/runtime dist-tags --json`. If an
85
- `experimental` tag exists, install that exact companion. Otherwise continue only from an
86
- ArkGate source checkout: run `npm run build:runtime` at its root and install its local
87
- `packages/runtime` folder into the target. Outside a source checkout, stop and report that the
88
- runtime is unavailable; never fall back to the deprecated root shims as if they contained it.
89
- Import from `@arkgate/runtime` (or `@arkgate/runtime/nestjs`) — never a removed `arkgate/runtime`
90
- shim.
84
+ 4. **Resolve availability** — `npm install arkgate` already ships `arkgate/runtime`.
85
+ Import from `arkgate/runtime` (or `arkgate/nestjs`). `@arkgate/runtime` is deprecated.
91
86
  5. **Wire through the kernel** — read the
92
87
  [runtime package guide](https://github.com/pedroknigge/arkgate/blob/main/packages/runtime/README.md)
93
88
  plus the [experimental surface policy](https://github.com/pedroknigge/arkgate/blob/main/docs/package-surface.md#experimental-opt-in-surfaces) before
@@ -122,7 +117,7 @@ the same files or weaken the gate.
122
117
  - No static gates yet: **STOP — do not continue this skill as complete.** Run `/ark-adopt` first (`ark-check --recommend` / leftover `/ark-architect`).
123
118
  - Extra absent and the user wants it: **STOP — do not continue this skill as complete.** **`/ark-adopt`** writes advisory `arkRun`.
124
119
  - Skip cluster (`new` of managed types, homemade bus, kernel in Domain) after the extra is on: leftover **`/ark-fix`** / **`/ark-loop`** or **`/ark-autopilot`** — this skill still wires one candidate.
125
- - Runtime companion unavailable from npm and no ArkGate source checkout: **STOP** and report the distribution boundary.
120
+ - `arkgate` not installed and no local checkout: **STOP** and report the distribution boundary.
126
121
  - Inventory finds nothing: stop; do not introduce kernel speculatively.
127
122
 
128
123
  ## Operating rules
@@ -124,7 +124,7 @@ ArkGate has **two opt-in planes**. The user chooses which to use; you **always l
124
124
  |-------|------------------|----------------|-----------------|
125
125
  | **Layers** (inter-layer) | Who may import whom, capabilities, pure/forbiddenGlobals, peerIsolation | `ark.config.json` → `layers[]`, `rules[]` | graph check, baseline edges, doctor coverage % |
126
126
  | **ArkRules** (intra-layer) | Structure inside a layer + domain invariants as data | `arkRules` map + `arkrules/<ExactLayerName>.json` | structure sensors, invariant coverage, `--rules-inventory`, doctor `rulesUnderContract` |
127
- | **ArkRun** (extra) | Kernel usage + complete declarations | `arkRun` on `ark.config.json` (schema `1.2+`) + companion `@arkgate/runtime` | `ARKRUN_*`, doctor `arkRun` (`notAScore`) |
127
+ | **ArkRun** (extra) | Kernel usage + complete declarations | `arkRun` on `ark.config.json` (schema `1.2+`); factory `arkgate/runtime` | `ARKRUN_*`, doctor `arkRun` (`notAScore`) |
128
128
 
129
129
  **Rules for every report / answer:**
130
130
  1. Prefix each finding or next step with **`[Layer]`** or **`[ArkRules]`** or **`[ArkRun]`** (or a two-column table with those headers).
@@ -145,7 +145,7 @@ ArkGate has **two opt-in planes**. The user chooses which to use; you **always l
145
145
  - Required shape: `compositionRoots` (real files; empty + enforced fails closed), `managedLayers` (existing `layers[].name` only), `requireDeclarations` (default true).
146
146
  - Do **not** put `arkRun` on the compact starter / `ark start` scaffold. Brownfield stays advisory until the team promotes.
147
147
  - Absence is valid and **silent** — never force the extra. Never force the kernel over existing Nest/DI. Do not invent `/ark-run`.
148
- - Import the companion from `@arkgate/runtime` (factory `createStrictArkKernel`, per instance, no process-wide singleton). Never a removed `arkgate/runtime` shim. No shipped cloud broker SDKs.
148
+ - Import from `arkgate/runtime` (factory `createStrictArkKernel`, per instance, no process-wide singleton). `@arkgate/runtime` is deprecated. No shipped cloud broker SDKs.
149
149
  - In-memory stores are **not** production durability. Branding ArkRun is not a durability claim. Doctor / status `arkRun` is `notAScore`.
150
150
  - Demoting enforced → advisory or deleting the extra is policy-delta **weakening**.
151
151
  - After the extra is honest: handoff `/ark-runtime` to wire one candidate, `/ark-place` for new kernel-managed files. Skills never enforce.
@@ -19,7 +19,7 @@ preview-only. Never weaken the architecture config.
19
19
  |------------------------------|----------------|
20
20
  | Layers / include / ArkRules / **ArkRun extra** need an edit | **`/ark-adopt`** (path, first `arkRun`) or **`/ark-autopilot`** (tighten) |
21
21
  | False-green / concentrated edge | **`/ark-adopt`** — write the honest config |
22
- | Companion install / one kernel candidate | **`/ark-runtime`** — this leftover name does not wire `@arkgate/runtime` |
22
+ | Kernel extra / one kernel candidate | **`/ark-runtime`** — leftover name; wires `arkgate/runtime`, not a second package |
23
23
 
24
24
  ## Dual engine (mandatory)
25
25
 
@@ -100,23 +100,25 @@ retain `projectIdentity.projectId`, then pass both `expectedRoot` and `expectedP
100
100
  uncertain, do not consume MCP analysis: use the workspace-local CLI and report that MCP
101
101
  restart/retargeting is required. `ark://manifest` never satisfies this preflight.
102
102
 
103
- ## Dual plane — layers + ArkRules (mandatory, except /ark-runtime)
103
+ ## Dual plane — layers + extras (mandatory, except /ark-runtime)
104
104
 
105
- ArkGate has **two opt-in planes**. The user chooses which to use; you **always label** findings so they never blur.
105
+ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; you **always label** findings so they never blur. ArkOrder is an extra **inside** the `arkgate` package (`arkgate/order`), not a second install.
106
106
 
107
107
  | Plane | What it protects | Where it lives | Sensors / tools |
108
108
  |-------|------------------|----------------|-----------------|
109
109
  | **Layers** (inter-layer) | Who may import whom, capabilities, pure/forbiddenGlobals, peerIsolation | `ark.config.json` → `layers[]`, `rules[]` | graph check, baseline edges, doctor coverage % |
110
110
  | **ArkRules** (intra-layer) | Structure inside a layer + domain invariants as data | `arkRules` map + `arkrules/<ExactLayerName>.json` | structure sensors, invariant coverage, `--rules-inventory`, doctor `rulesUnderContract` |
111
- | **ArkRun** (extra) | Kernel usage + complete declarations | `arkRun` on `ark.config.json` (schema `1.2+`) + companion `@arkgate/runtime` | `ARKRUN_*`, doctor `arkRun` (`notAScore`) |
111
+ | **ArkRun** (extra) | Kernel usage + complete declarations | `arkRun` on `ark.config.json` (schema `1.2+`); factory `arkgate/runtime` | `ARKRUN_*`, doctor `arkRun` (`notAScore`) |
112
+ | **ArkOrder** (extra) | Operational pattern (ξ vs s) | `arkOrder` on `ark.config.json` (schema `1.3+`); factory `arkgate/order` | `ARKORDER_*` |
112
113
 
113
114
  **Rules for every report / answer:**
114
- 1. Prefix each finding or next step with **`[Layer]`** or **`[ArkRules]`** or **`[ArkRun]`** (or a two-column table with those headers).
115
+ 1. Prefix each finding or next step with **`[Layer]`** or **`[ArkRules]`** or **`[ArkRun]`** or **`[ArkOrder]`** (or a table with those headers).
115
116
  2. Never call an import-edge violation an “invariant” or an aggregate sensor a “layer deny.”
116
117
  3. Absence of `arkRules` is **valid** — do not force ArkRules unless the user wants them or residual inventory clearly wants a pilot.
117
118
  4. Missing layer home: add it via **`/ark-adopt`** in this session if needed, then write the file; never invent `mechanical-safe`.
118
119
  5. CLI helpers: `ark-check --rules-inventory --json`, doctor JSON `rulesUnderContract`, sensors emit `ARKRULE_*` / `INVARIANT_UNCOVERED` with `evidence.arkruleId`.
119
120
  6. Absence of `arkRun` is **valid**. Do not introduce the kernel speculatively. Skills never enforce this extra.
121
+ 7. Absence of `arkOrder` is **valid**. When on: Domain stays plane-free; freeze ξ with `release()`; never `update`/`patch`/`set` the pattern. Import `createOrderPlane` from `arkgate/order` (same npm package). No `/ark-order` skill.
120
122
 
121
123
 
122
124
  ### Place + ArkRules
@@ -127,13 +129,20 @@ ArkGate has **two opt-in planes**. The user chooses which to use; you **always l
127
129
  When `arkRun` is present on the architecture config:
128
130
  - Scaffold kernel-managed artifacts **through the kernel**, not `new` of an admitted type (`ARKRUN_DIRECT_NEW`).
129
131
  - Call `createStrictArkKernel` (or an admission sibling) only inside `arkRun.compositionRoots`. Each call is a new instance — no process-wide `getKernel()`.
130
- - Domain-role files stay kernel-free (`ARKRUN_KERNEL_IN_DOMAIN`). Import from `@arkgate/runtime` (or `/nestjs`), never a removed `arkgate/runtime` shim.
132
+ - Domain-role files stay kernel-free (`ARKRUN_KERNEL_IN_DOMAIN`). Import from `arkgate/runtime` (or `arkgate/nestjs`). `@arkgate/runtime` is deprecated.
131
133
  - List `uses` / `reactsTo` / `raises` / `sends` when `requireDeclarations` is on. Adding an existing call-site literal to the declaration list is the only mechanical-safe ArkRun edit; inventing a new emit / handle / depend is judgment.
132
134
  - Do not import a homemade bus (`EventEmitter`, queue clients) in `managedLayers` — send on the kernel transport (`local` / `localBlocking` / `broker`; `ephemeral` defaults true). No shipped cloud SDKs.
133
135
  - In-memory stores are **not** production durability. Doctor `arkRun` is `notAScore`.
134
136
  - Absence of the extra: place with **[Layer]** + **[ArkRules]** only. Enable advisory extra via `/ark-adopt`; evaluate a hand-rolled bus via `/ark-runtime`. Do not invent `/ark-run`.
135
137
  - Skills never enforce.
136
138
 
139
+ ### Place + ArkOrder
140
+ When `arkOrder` is present on the architecture config:
141
+ - Import `createOrderPlane` from `arkgate/order` (same npm package). Domain-role files stay plane-free.
142
+ - Freeze ξ with `release()`; derive s with `project()`; field `ingest()` never mints a pattern; `proposeRelease()` needs a non-empty blast. There is no `update`/`patch`/`set`.
143
+ - Call the factory only inside `arkOrder.planeRoots`. Empty roots in `enforced` mode is `ARKORDER_MISSING_PLANE`.
144
+ - Absence of the extra is valid. Do not invent `/ark-order`. Skills never enforce.
145
+
137
146
  ## Subagent fan-out (optional, host-dependent)
138
147
 
139
148
  If the host supports **parallel subagents** and the task splits cleanly (e.g. multiple
@@ -231,7 +240,7 @@ End with **exactly** these headings (markdown `###`):
231
240
  - **Sensor:** commands/tools run
232
241
  - **Opened:** real paths read (or `n/a` only if pure install/upgrade with no source analysis)
233
242
  - **Result:** one-line outcome
234
- - **Planes:** one-line split of residual **[Layer]** vs **[ArkRules]** vs **[ArkRun]** (or `n/a` if unused)
243
+ - **Planes:** one-line split of residual **[Layer]** vs **[ArkRules]** vs **[ArkRun]** vs **[ArkOrder]** (or `n/a` if unused)
235
244
  - **Compass:** top residual lenses | `n/a`
236
245
  - **Done axes:** architecture residual (status/doctor/compass) | feature/ticket residual (outside package). Enforce green ≠ feature done
237
246
  - **Handoff:** `/ark-…` / CLI / `none`
@@ -1,26 +1,26 @@
1
1
  ---
2
2
  name: ark-runtime
3
- description: Wire the optional ArkRun extra (@arkgate/runtime). One candidate. Extra on via /ark-adopt.
3
+ description: Wire the optional ArkRun extra (arkgate/runtime). One candidate. Extra on via /ark-adopt.
4
4
  ---
5
5
 
6
6
  # /ark-runtime — Evaluate and wire ArkRun (experimental opt-in)
7
7
 
8
- The ArkRun companion (`@arkgate/runtime`) is currently **experimental**. It is **not** required
8
+ The ArkRun kernel (`arkgate/runtime`) is currently **experimental**. It is **not** required
9
9
  for ArkGate enforcement and is **not** production durability. Use this skill when the user wants
10
10
  to evaluate or wire the kernel. **This skill never enforces** — the write / CI / ESLint plane
11
- does when the `arkRun` extra is on. Do **not** invent `/ark-run`.
11
+ does when the `arkRun` extra is on. Do **not** invent `/ark-run`. `@arkgate/runtime` is deprecated.
12
12
 
13
13
  **When:** evaluate a hand-rolled bus / outbox / saga / projection / policy / Nest adapter against
14
- the companion, or wire an extra that is already on (composition root, declarations, transport).
14
+ the kernel, or wire an extra that is already on (composition root, declarations, transport).
15
15
  **Not when:** session 0 / extra not chosen (`/ark-adopt`); one new file (`/ark-place`); skip-violation
16
16
  grind (`/ark-autopilot` / leftover `/ark-fix`).
17
17
 
18
- ## Extra vs companion (mandatory)
18
+ ## Extra vs kernel (mandatory)
19
19
 
20
20
  | Piece | What it is | What it is not |
21
21
  |-------|------------|----------------|
22
22
  | **ArkRun extra** (`arkRun` on `ark.config.json`, schema `1.2+`) | Gate contract: kernel usage + complete declarations | A score; Layers / ArkRules replacement; merge teeth while `advisory` |
23
- | **Companion** `@arkgate/runtime` | Kernel you construct with `createStrictArkKernel` (one instance per call) | Bundled in the `arkgate` tarball; a process-wide `getKernel()`; shipped cloud broker SDKs |
23
+ | **Kernel** `arkgate/runtime` | Kernel you construct with `createStrictArkKernel` (one instance per call) | A process-wide `getKernel()`; shipped cloud broker SDKs; production durability |
24
24
 
25
25
  Absence of the extra is **silent** — Layers and ArkRules verdicts stay identical. Doctor / status
26
26
  `arkRun` is always `notAScore`. Never invent 0–10 scores or pass/fail from this skill.
@@ -71,7 +71,7 @@ the same files or weaken the gate.
71
71
  - saga/workflow orchestration (multi-step processes with compensation)
72
72
  - read-model/projection builders
73
73
  - policy/authorization checks scattered across use cases
74
- Also check whether `@nestjs/common` is present → the `@arkgate/runtime/nestjs`
74
+ Also check whether `@nestjs/common` is present → the `arkgate/nestjs`
75
75
  adapters apply.
76
76
  2. **Read the extra** — open `ark.config.json`. If `arkRun` is absent and the user wants the extra,
77
77
  **STOP — do not continue this skill as complete.** Handoff **`/ark-adopt`** to write **advisory**
@@ -81,13 +81,8 @@ the same files or weaken the gate.
81
81
  3. **Pick ONE target** — the smallest, most self-contained candidate (fewest
82
82
  call sites). Migrating everything at once is how adoptions die. List the
83
83
  rest as follow-ups in the report. New files after the extra is on go through **`/ark-place`**.
84
- 4. **Resolve availability** — run `npm view @arkgate/runtime dist-tags --json`. If an
85
- `experimental` tag exists, install that exact companion. Otherwise continue only from an
86
- ArkGate source checkout: run `npm run build:runtime` at its root and install its local
87
- `packages/runtime` folder into the target. Outside a source checkout, stop and report that the
88
- runtime is unavailable; never fall back to the deprecated root shims as if they contained it.
89
- Import from `@arkgate/runtime` (or `@arkgate/runtime/nestjs`) — never a removed `arkgate/runtime`
90
- shim.
84
+ 4. **Resolve availability** — `npm install arkgate` already ships `arkgate/runtime`.
85
+ Import from `arkgate/runtime` (or `arkgate/nestjs`). `@arkgate/runtime` is deprecated.
91
86
  5. **Wire through the kernel** — read the
92
87
  [runtime package guide](https://github.com/pedroknigge/arkgate/blob/main/packages/runtime/README.md)
93
88
  plus the [experimental surface policy](https://github.com/pedroknigge/arkgate/blob/main/docs/package-surface.md#experimental-opt-in-surfaces) before
@@ -122,7 +117,7 @@ the same files or weaken the gate.
122
117
  - No static gates yet: **STOP — do not continue this skill as complete.** Run `/ark-adopt` first (`ark-check --recommend` / leftover `/ark-architect`).
123
118
  - Extra absent and the user wants it: **STOP — do not continue this skill as complete.** **`/ark-adopt`** writes advisory `arkRun`.
124
119
  - Skip cluster (`new` of managed types, homemade bus, kernel in Domain) after the extra is on: leftover **`/ark-fix`** / **`/ark-loop`** or **`/ark-autopilot`** — this skill still wires one candidate.
125
- - Runtime companion unavailable from npm and no ArkGate source checkout: **STOP** and report the distribution boundary.
120
+ - `arkgate` not installed and no local checkout: **STOP** and report the distribution boundary.
126
121
  - Inventory finds nothing: stop; do not introduce kernel speculatively.
127
122
 
128
123
  ## Operating rules