sneakoscope 8.3.2 → 8.4.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 (105) hide show
  1. package/README.md +1 -1
  2. package/config/architecture-map-policy.v1.json +168 -0
  3. package/crates/sks-core/Cargo.lock +1 -1
  4. package/crates/sks-core/Cargo.toml +1 -1
  5. package/dist/commands/bridge.js +19 -1
  6. package/dist/commands/doctor-profile.js +1 -1
  7. package/dist/commands/doctor.js +33 -1
  8. package/dist/config/skills-manifest.json +1 -1
  9. package/dist/core/align/align-route.js +8 -2
  10. package/dist/core/align/code-navigation-align.js +88 -32
  11. package/dist/core/architecture-map-pipeline.js +172 -0
  12. package/dist/core/architecture-map-review.js +180 -0
  13. package/dist/core/codex-app/codex-app-fast-ui-repair.js +2 -1
  14. package/dist/core/codex-app/menubar/constants.js +1 -0
  15. package/dist/core/codex-lb/codex-lb-env.js +25 -3
  16. package/dist/core/codex-lb/combined-catalog/builder.js +7 -2
  17. package/dist/core/codex-lb/combined-catalog/model-selection.js +71 -0
  18. package/dist/core/codex-lb/combined-catalog/normalize.js +20 -3
  19. package/dist/core/codex-lb/desktop-controller-v3/catalog.js +75 -4
  20. package/dist/core/codex-lb/desktop-controller-v3.js +5 -1
  21. package/dist/core/commands/triwiki-atlas-command.js +372 -0
  22. package/dist/core/commands/triwiki-command.js +12 -1
  23. package/dist/core/fsx.js +14 -0
  24. package/dist/core/git-hygiene/git-policy.js +4 -0
  25. package/dist/core/git-hygiene/gitignore-writer.js +2 -0
  26. package/dist/core/gx-renderer.js +2 -1
  27. package/dist/core/managed-paths.js +1 -0
  28. package/dist/core/perf/release-latency-slo.js +57 -11
  29. package/dist/core/pipeline-internals/pipeline-stage-builder.js +181 -0
  30. package/dist/core/pipeline-internals/runtime-core.js +13 -172
  31. package/dist/core/pipeline-internals/runtime-gates.js +12 -1
  32. package/dist/core/release/content-digest-cache.js +70 -0
  33. package/dist/core/release/gate-manifest.js +9 -0
  34. package/dist/core/release/main-push-guard.js +4 -3
  35. package/dist/core/release/package-dist-snapshot.js +18 -2
  36. package/dist/core/release/physical-release-gates.js +26 -3
  37. package/dist/core/release/release-authorization-snapshot.js +4 -0
  38. package/dist/core/release/release-gate-cache-v2.js +27 -3
  39. package/dist/core/release/release-gate-contract.js +2 -0
  40. package/dist/core/release/release-gate-dag.js +3 -0
  41. package/dist/core/release/release-inspection-memo.js +69 -0
  42. package/dist/core/release/release-pack-content-scanner.js +5 -0
  43. package/dist/core/release/release-pack-receipt.js +28 -18
  44. package/dist/core/release/release-pack-tarball.js +10 -0
  45. package/dist/core/release/release-upgrade-baseline.js +4 -0
  46. package/dist/core/routes.js +1 -1
  47. package/dist/core/safety/ssot-authority-inventory.js +114 -0
  48. package/dist/core/safety/ssot-guard.js +2 -44
  49. package/dist/core/triwiki/context-graph/architecture/baseline.js +81 -0
  50. package/dist/core/triwiki/context-graph/architecture/capsule.js +34 -0
  51. package/dist/core/triwiki/context-graph/architecture/contracts.js +67 -0
  52. package/dist/core/triwiki/context-graph/architecture/delta.js +149 -0
  53. package/dist/core/triwiki/context-graph/architecture/finding-factory.js +28 -0
  54. package/dist/core/triwiki/context-graph/architecture/findings.js +173 -0
  55. package/dist/core/triwiki/context-graph/architecture/fingerprint.js +75 -0
  56. package/dist/core/triwiki/context-graph/architecture/index.js +15 -0
  57. package/dist/core/triwiki/context-graph/architecture/input-bundle.js +66 -0
  58. package/dist/core/triwiki/context-graph/architecture/metrics.js +137 -0
  59. package/dist/core/triwiki/context-graph/architecture/policy.js +321 -0
  60. package/dist/core/triwiki/context-graph/architecture/slice.js +100 -0
  61. package/dist/core/triwiki/context-graph/architecture/ssot-analysis.js +59 -0
  62. package/dist/core/triwiki/context-graph/architecture/topology-overlay.js +106 -0
  63. package/dist/core/triwiki/context-graph/architecture/validation.js +145 -0
  64. package/dist/core/triwiki/context-graph/architecture/voxel-context.js +39 -0
  65. package/dist/core/triwiki/context-graph/extractors/index.js +4 -0
  66. package/dist/core/triwiki/context-graph/projections/index.js +2 -0
  67. package/dist/core/triwiki/context-graph/projections/mermaid/architecture-delta.js +68 -0
  68. package/dist/core/triwiki/context-graph/projections/mermaid/ast.js +49 -0
  69. package/dist/core/triwiki/context-graph/projections/mermaid/change-impact.js +43 -0
  70. package/dist/core/triwiki/context-graph/projections/mermaid/contracts.js +5 -0
  71. package/dist/core/triwiki/context-graph/projections/mermaid/escape.js +45 -0
  72. package/dist/core/triwiki/context-graph/projections/mermaid/ids.js +73 -0
  73. package/dist/core/triwiki/context-graph/projections/mermaid/index.js +113 -0
  74. package/dist/core/triwiki/context-graph/projections/mermaid/manifest.js +37 -0
  75. package/dist/core/triwiki/context-graph/projections/mermaid/module-dependency.js +21 -0
  76. package/dist/core/triwiki/context-graph/projections/mermaid/ownership-workstream.js +21 -0
  77. package/dist/core/triwiki/context-graph/projections/mermaid/project-topology.js +13 -0
  78. package/dist/core/triwiki/context-graph/projections/mermaid/public-surface.js +17 -0
  79. package/dist/core/triwiki/context-graph/projections/mermaid/reduce.js +44 -0
  80. package/dist/core/triwiki/context-graph/projections/mermaid/risk-domains.js +23 -0
  81. package/dist/core/triwiki/context-graph/projections/mermaid/runtime-control.js +20 -0
  82. package/dist/core/triwiki/context-graph/projections/mermaid/selection-ledger.js +94 -0
  83. package/dist/core/triwiki/context-graph/projections/mermaid/serializer.js +81 -0
  84. package/dist/core/triwiki/context-graph/projections/mermaid/ssot-provenance.js +17 -0
  85. package/dist/core/triwiki/context-graph/projections/mermaid/verification-coverage.js +17 -0
  86. package/dist/core/triwiki/context-graph/projections/mermaid/view-builder-common.js +1 -0
  87. package/dist/core/triwiki/context-graph/projections/mermaid/view-builder.js +173 -0
  88. package/dist/core/triwiki/context-graph/projections/mermaid/view-specs.js +33 -0
  89. package/dist/core/triwiki/context-graph/store/architecture-map-store.js +71 -0
  90. package/dist/core/triwiki/triwiki-proof-bank-index.js +26 -1
  91. package/dist/core/triwiki/triwiki-proof-bank.js +82 -2
  92. package/dist/core/version.js +1 -1
  93. package/dist/native/sks-menubar/Sources/OverviewViewController.swift +2 -2
  94. package/dist/native/sks-menubar/Sources/ProvidersModelExposure.swift +178 -0
  95. package/dist/native/sks-menubar/Sources/ProvidersViewController.swift +10 -1
  96. package/dist/scripts/architecture-map-check.js +299 -0
  97. package/dist/scripts/lib/ensure-dist-fresh.js +48 -1
  98. package/dist/scripts/release-metadata-check.js +2 -0
  99. package/package.json +6 -3
  100. package/release-gates.v2.json +204 -0
  101. package/schemas/architecture-baseline.v1.schema.json +47 -0
  102. package/schemas/architecture-map-manifest.v1.schema.json +40 -0
  103. package/schemas/architecture-map-policy.v1.schema.json +147 -0
  104. package/schemas/architecture-review.v1.schema.json +46 -0
  105. package/schemas/mermaid-projection.v1.schema.json +47 -0
@@ -0,0 +1,47 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://sneakoscope.local/schemas/architecture-baseline.v1.schema.json",
4
+ "title": "SKS Architecture Baseline V1",
5
+ "type": "object",
6
+ "additionalProperties": true,
7
+ "required": [
8
+ "schema",
9
+ "missionId",
10
+ "required",
11
+ "capturedBeforeMutation",
12
+ "worktreeFingerprintHash",
13
+ "graphHash",
14
+ "policyHash",
15
+ "analyzerVersion",
16
+ "serializerVersion",
17
+ "metrics",
18
+ "findings",
19
+ "canonicalPayloadHash",
20
+ "seal"
21
+ ],
22
+ "properties": {
23
+ "schema": { "const": "sks.architecture-baseline.v1" },
24
+ "missionId": { "type": "string", "minLength": 1 },
25
+ "routeId": { "type": "string" },
26
+ "taskProfile": { "type": "string" },
27
+ "required": { "const": true },
28
+ "capturedAt": { "type": "string", "minLength": 1 },
29
+ "capturedBeforeMutation": { "const": true },
30
+ "repositoryHead": { "type": ["string", "null"] },
31
+ "worktreeFingerprintHash": { "type": "string", "minLength": 1 },
32
+ "preexistingDirtyPaths": { "type": "array", "items": { "type": "string" } },
33
+ "graphHash": { "type": "string", "minLength": 1 },
34
+ "topologyHash": { "type": "string" },
35
+ "ssotInventoryHash": { "type": "string" },
36
+ "voxelContextHash": { "type": "string" },
37
+ "policyHash": { "type": "string", "minLength": 1 },
38
+ "analyzerVersion": { "type": "string", "minLength": 1 },
39
+ "serializerVersion": { "type": "string", "minLength": 1 },
40
+ "scope": { "type": "object" },
41
+ "metrics": { "type": "object" },
42
+ "findings": { "type": "array" },
43
+ "viewHashes": { "type": "object" },
44
+ "canonicalPayloadHash": { "type": "string", "minLength": 1 },
45
+ "seal": { "type": "string", "minLength": 1 }
46
+ }
47
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://sneakoscope.local/schemas/architecture-map-manifest.v1.schema.json",
4
+ "title": "SKS Architecture Map Manifest V1",
5
+ "type": "object",
6
+ "additionalProperties": true,
7
+ "required": [
8
+ "schema",
9
+ "graphHash",
10
+ "policyHash",
11
+ "serializerVersion",
12
+ "views",
13
+ "projectionAccounting"
14
+ ],
15
+ "properties": {
16
+ "schema": { "const": "sks.architecture-map-manifest.v1" },
17
+ "missionId": { "type": ["string", "null"] },
18
+ "graphHash": { "type": "string", "minLength": 1 },
19
+ "topologyHash": { "type": "string" },
20
+ "policyHash": { "type": "string", "minLength": 1 },
21
+ "inputBundleHash": { "type": "string" },
22
+ "analyzerVersion": { "type": "string", "minLength": 1 },
23
+ "serializerVersion": { "type": "string", "minLength": 1 },
24
+ "views": {
25
+ "type": "array",
26
+ "minItems": 1,
27
+ "items": {
28
+ "type": "object",
29
+ "required": ["viewId", "contentHash", "byteLength"],
30
+ "properties": {
31
+ "viewId": { "type": "string", "minLength": 1 },
32
+ "contentHash": { "type": "string", "minLength": 1 },
33
+ "byteLength": { "type": "integer", "minimum": 0 }
34
+ }
35
+ }
36
+ },
37
+ "projectionAccounting": { "type": "object" },
38
+ "sourceBinding": { "type": "object" }
39
+ }
40
+ }
@@ -0,0 +1,147 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://sneakoscope.local/schemas/architecture-map-policy.v1.schema.json",
4
+ "title": "SKS Architecture Map Policy V1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schema", "layers", "boundaries", "thresholds", "exceptions"],
8
+ "properties": {
9
+ "schema": { "const": "sks.architecture-map-policy.v1" },
10
+ "version": { "type": "integer", "minimum": 1 },
11
+ "module_id_source": { "type": "string", "minLength": 1 },
12
+ "layers": {
13
+ "type": "array",
14
+ "minItems": 1,
15
+ "items": {
16
+ "type": "object",
17
+ "additionalProperties": false,
18
+ "required": ["id", "purpose", "modules"],
19
+ "properties": {
20
+ "id": { "type": "string", "minLength": 1 },
21
+ "purpose": { "type": "string", "minLength": 1 },
22
+ "modules": {
23
+ "type": "array",
24
+ "minItems": 1,
25
+ "items": { "type": "string", "minLength": 1 }
26
+ }
27
+ }
28
+ }
29
+ },
30
+ "boundaries": {
31
+ "type": "object",
32
+ "additionalProperties": false,
33
+ "required": ["mode", "allow"],
34
+ "properties": {
35
+ "mode": { "const": "allow-list" },
36
+ "allow": {
37
+ "type": "array",
38
+ "items": {
39
+ "type": "object",
40
+ "additionalProperties": false,
41
+ "required": ["from", "to"],
42
+ "properties": {
43
+ "from": { "type": "string", "minLength": 1 },
44
+ "to": { "type": "array", "items": { "type": "string", "minLength": 1 } }
45
+ }
46
+ }
47
+ }
48
+ }
49
+ },
50
+ "thresholds": {
51
+ "type": "object",
52
+ "additionalProperties": false,
53
+ "required": [
54
+ "max_diagram_nodes",
55
+ "max_diagram_edges",
56
+ "max_diagram_bytes",
57
+ "max_module_fan_out",
58
+ "max_module_fan_in"
59
+ ],
60
+ "properties": {
61
+ "max_diagram_nodes": { "type": "integer", "minimum": 1 },
62
+ "max_diagram_edges": { "type": "integer", "minimum": 1 },
63
+ "max_diagram_bytes": { "type": "integer", "minimum": 1 },
64
+ "max_module_fan_out": { "type": "integer", "minimum": 1 },
65
+ "max_module_fan_in": { "type": "integer", "minimum": 1 }
66
+ }
67
+ },
68
+ "profiles": { "type": "object", "additionalProperties": true },
69
+ "absoluteTokenCeiling": { "type": "integer", "minimum": 0 },
70
+ "globalAtlasMaxBytes": { "type": "integer", "minimum": 1 },
71
+ "missionArtifactsMaxBytes": { "type": "integer", "minimum": 1 },
72
+ "accuracyFloors": {
73
+ "type": "object",
74
+ "additionalProperties": false,
75
+ "properties": {
76
+ "changedPathAccounting": { "type": "number", "minimum": 0, "maximum": 1 },
77
+ "projectionAccounting": { "type": "number", "minimum": 0, "maximum": 1 },
78
+ "protectedRelationRecall": { "type": "number", "minimum": 0, "maximum": 1 },
79
+ "eligibleExtractionSuccess": { "type": "number", "minimum": 0, "maximum": 1 },
80
+ "deterministicHashRuns": { "type": "integer", "minimum": 1 }
81
+ }
82
+ },
83
+ "dependencyRules": {
84
+ "type": "array",
85
+ "items": {
86
+ "type": "object",
87
+ "additionalProperties": true,
88
+ "required": ["id", "effect", "severity"],
89
+ "properties": {
90
+ "id": { "type": "string", "minLength": 1 },
91
+ "from": { "type": "string" },
92
+ "to": { "type": "string" },
93
+ "effect": { "enum": ["deny", "allow"] },
94
+ "severity": { "enum": ["blocking", "warning", "info"] },
95
+ "description": { "type": "string" }
96
+ }
97
+ }
98
+ },
99
+ "viewBudgets": {
100
+ "type": "object",
101
+ "additionalProperties": {
102
+ "type": "object",
103
+ "properties": {
104
+ "maxNodes": { "type": "integer", "minimum": 1 },
105
+ "maxEdges": { "type": "integer", "minimum": 1 }
106
+ }
107
+ }
108
+ },
109
+ "blockingCodes": {
110
+ "type": "array",
111
+ "items": { "type": "string", "minLength": 1 }
112
+ },
113
+ "exceptions": {
114
+ "type": "object",
115
+ "additionalProperties": false,
116
+ "required": ["mode", "entries"],
117
+ "properties": {
118
+ "mode": { "const": "shrink-only" },
119
+ "entries": {
120
+ "type": "array",
121
+ "items": {
122
+ "type": "object",
123
+ "additionalProperties": false,
124
+ "required": [
125
+ "id",
126
+ "reason",
127
+ "edges",
128
+ "baseline_module_edges",
129
+ "ceiling_module_edges"
130
+ ],
131
+ "properties": {
132
+ "id": { "type": "string", "minLength": 1 },
133
+ "reason": { "type": "string", "minLength": 1 },
134
+ "edges": {
135
+ "type": "array",
136
+ "minItems": 1,
137
+ "items": { "type": "string", "minLength": 1 }
138
+ },
139
+ "baseline_module_edges": { "type": "integer", "minimum": 1 },
140
+ "ceiling_module_edges": { "type": "integer", "minimum": 1 }
141
+ }
142
+ }
143
+ }
144
+ }
145
+ }
146
+ }
147
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://sneakoscope.local/schemas/architecture-review.v1.schema.json",
4
+ "title": "SKS Architecture Review V1",
5
+ "type": "object",
6
+ "additionalProperties": true,
7
+ "required": [
8
+ "schema",
9
+ "missionId",
10
+ "baselineSeal",
11
+ "baselineHash",
12
+ "afterInputHash",
13
+ "changedPaths",
14
+ "accountedChangedPaths",
15
+ "unaccountedChangedPaths",
16
+ "beforeMetrics",
17
+ "afterMetrics",
18
+ "newFindings",
19
+ "verdict",
20
+ "blockingFindingIds",
21
+ "canonicalPayloadHash"
22
+ ],
23
+ "properties": {
24
+ "schema": { "const": "sks.architecture-review.v1" },
25
+ "missionId": { "type": "string", "minLength": 1 },
26
+ "baselineSeal": { "type": "string", "minLength": 1 },
27
+ "baselineHash": { "type": "string", "minLength": 1 },
28
+ "afterInputHash": { "type": "string", "minLength": 1 },
29
+ "changedPaths": { "type": "array" },
30
+ "accountedChangedPaths": { "type": "array", "items": { "type": "string" } },
31
+ "unaccountedChangedPaths": { "type": "array", "items": { "type": "string" } },
32
+ "beforeMetrics": { "type": "object" },
33
+ "afterMetrics": { "type": "object" },
34
+ "metricDelta": { "type": "object" },
35
+ "newFindings": { "type": "array" },
36
+ "resolvedFindings": { "type": "array" },
37
+ "persistentFindings": { "type": "array" },
38
+ "acceptedExceptions": { "type": "array" },
39
+ "projectionAccounting": { "type": "object" },
40
+ "verification": { "type": "object" },
41
+ "verdict": { "enum": ["pass", "block"] },
42
+ "blockingFindingIds": { "type": "array", "items": { "type": "string" } },
43
+ "canonicalPayloadHash": { "type": "string", "minLength": 1 },
44
+ "generatedAt": { "type": "string" }
45
+ }
46
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://sneakoscope.local/schemas/mermaid-projection.v1.schema.json",
4
+ "title": "SKS Mermaid Projection V1",
5
+ "type": "object",
6
+ "additionalProperties": true,
7
+ "required": [
8
+ "schema",
9
+ "viewId",
10
+ "direction",
11
+ "title",
12
+ "source",
13
+ "accounting",
14
+ "contentHash"
15
+ ],
16
+ "properties": {
17
+ "schema": { "const": "sks.mermaid-projection.v1" },
18
+ "viewId": { "type": "string", "minLength": 1 },
19
+ "direction": { "enum": ["LR", "TD"] },
20
+ "title": { "type": "string", "minLength": 1 },
21
+ "source": { "type": "string", "minLength": 1 },
22
+ "accounting": {
23
+ "type": "object",
24
+ "required": [
25
+ "selectedNodeIds",
26
+ "emittedNodeIds",
27
+ "omittedNodes",
28
+ "selectedEdgeIds",
29
+ "emittedEdgeIds",
30
+ "omittedEdges"
31
+ ],
32
+ "properties": {
33
+ "selectedNodeIds": { "type": "array", "items": { "type": "string" } },
34
+ "emittedNodeIds": { "type": "array", "items": { "type": "string" } },
35
+ "aggregatedNodeMembers": { "type": "object" },
36
+ "omittedNodes": { "type": "array" },
37
+ "selectedEdgeIds": { "type": "array", "items": { "type": "string" } },
38
+ "emittedEdgeIds": { "type": "array", "items": { "type": "string" } },
39
+ "aggregatedEdgeMembers": { "type": "object" },
40
+ "omittedEdges": { "type": "array" }
41
+ }
42
+ },
43
+ "contentHash": { "type": "string", "minLength": 1 },
44
+ "byteLength": { "type": "integer", "minimum": 0 },
45
+ "omissions": { "type": "array" }
46
+ }
47
+ }