@cstack-protocol/pingala 1.0.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 (328) hide show
  1. package/.agent/CSD.md +39 -0
  2. package/.agent/MANIFEST.md +4 -0
  3. package/.agent/MANIFEST.md.template +4 -0
  4. package/.agent/agent-contractor.md +45 -0
  5. package/.agent/architecture/consent-model-fsm.md +77 -0
  6. package/.agent/architecture/governor-maturity-fsm.md +101 -0
  7. package/.agent/architecture/governor-validation-fsm.md +106 -0
  8. package/.agent/architecture/humanized-audit-fsm.md +76 -0
  9. package/.agent/architecture/pingala-csi-fsm.md +81 -0
  10. package/.agent/architecture.md +34 -0
  11. package/.agent/behavior.md +29 -0
  12. package/.agent/compute.md +32 -0
  13. package/.agent/consent-prompts.md +41 -0
  14. package/.agent/governance.yaml +5 -0
  15. package/.agent/identity.md +29 -0
  16. package/.agent/knowledge-lattice.json +96 -0
  17. package/.agent/knowledge-lattice.md +53 -0
  18. package/.agent/lattice-viz.html +157 -0
  19. package/.agent/mission.md +37 -0
  20. package/.agent/pairing-protocol.md +89 -0
  21. package/.agent/pairing.csp +108 -0
  22. package/.agent/personas/reflective-operator.md +67 -0
  23. package/.agent/personas/research.md +62 -0
  24. package/.agent/pingala.md +47 -0
  25. package/.agent/roadmap.md +56 -0
  26. package/.agent/scripts/lattice-extract.py +100 -0
  27. package/.agent/scripts/sync-agents.sh +82 -0
  28. package/.agent/scripts/vault-ingest.py +80 -0
  29. package/.agent/seo-strategy.md +71 -0
  30. package/.agent/skills/agent-orchestrator/SKILL.md +22 -0
  31. package/.agent/skills/agent-orchestrator/scripts/sync-agents.sh +61 -0
  32. package/.agent/skills/knowledge-lattice/SKILL.md +23 -0
  33. package/.agent/skills/knowledge-lattice/scripts/lattice-extract.py +107 -0
  34. package/.agent/skills/resource-vault/SKILL.md +30 -0
  35. package/.agent/skills/resource-vault/scripts/vault-ingest.py +80 -0
  36. package/.agent/skills/sites-integrity/SKILL.md +28 -0
  37. package/.agent/skills/stack-auditor/SKILL.md +25 -0
  38. package/.agent/sources.md +20 -0
  39. package/.agent/stack-auditor.md +47 -0
  40. package/.agent/standards.md +36 -0
  41. package/.agent/strategy.md +65 -0
  42. package/.agent/vault-schema.md +53 -0
  43. package/.agent/voice.md +27 -0
  44. package/.agent/workflows/sync-agents.md +14 -0
  45. package/.env.example +5 -0
  46. package/.env.production +3 -0
  47. package/DISTRIBUTION-PLAN.md +33 -0
  48. package/HOSTED_SETUP.md +54 -0
  49. package/LANDING_PAGE_DESIGN.md +46 -0
  50. package/MANUAL_VERCEL_STEPS.md +39 -0
  51. package/PRODUCT-ROADMAP.md +241 -0
  52. package/PROVISIONING_GUIDE.md +39 -0
  53. package/README.md +38 -0
  54. package/ROADMAP.md +21 -0
  55. package/SYNC-ENGINE-SPEC.md +257 -0
  56. package/build/core/531-protocol.d.ts +26 -0
  57. package/build/core/531-protocol.js +87 -0
  58. package/build/core/531-protocol.js.map +1 -0
  59. package/build/core/531-rule.d.ts +26 -0
  60. package/build/core/531-rule.js +106 -0
  61. package/build/core/531-rule.js.map +1 -0
  62. package/build/core/auth.d.ts +1 -0
  63. package/build/core/auth.js +24 -0
  64. package/build/core/auth.js.map +1 -0
  65. package/build/core/consent-manager.d.ts +17 -0
  66. package/build/core/consent-manager.js +104 -0
  67. package/build/core/consent-manager.js.map +1 -0
  68. package/build/core/csp.d.ts +12 -0
  69. package/build/core/csp.js +20 -0
  70. package/build/core/csp.js.map +1 -0
  71. package/build/core/engagement-analyzer.d.ts +42 -0
  72. package/build/core/engagement-analyzer.js +71 -0
  73. package/build/core/engagement-analyzer.js.map +1 -0
  74. package/build/core/governor.d.ts +106 -0
  75. package/build/core/governor.js +405 -0
  76. package/build/core/governor.js.map +1 -0
  77. package/build/core/life-area-mapper.d.ts +39 -0
  78. package/build/core/life-area-mapper.js +73 -0
  79. package/build/core/life-area-mapper.js.map +1 -0
  80. package/build/core/methodology.d.ts +39 -0
  81. package/build/core/methodology.js +164 -0
  82. package/build/core/methodology.js.map +1 -0
  83. package/build/core/pingala.d.ts +31 -0
  84. package/build/core/pingala.js +56 -0
  85. package/build/core/pingala.js.map +1 -0
  86. package/build/core/sdk-adapter.d.ts +6 -0
  87. package/build/core/sdk-adapter.js +33 -0
  88. package/build/core/sdk-adapter.js.map +1 -0
  89. package/build/cs-agent-core/sdk/index.d.ts +6 -0
  90. package/build/cs-agent-core/sdk/index.js +18 -0
  91. package/build/cs-agent-core/sdk/index.js.map +1 -0
  92. package/build/cs-agent-core/sdk/patterns/index.d.ts +3 -0
  93. package/build/cs-agent-core/sdk/patterns/index.js +37 -0
  94. package/build/cs-agent-core/sdk/patterns/index.js.map +1 -0
  95. package/build/cs-agent-core/sdk/patterns/registry.d.ts +4 -0
  96. package/build/cs-agent-core/sdk/patterns/registry.js +80 -0
  97. package/build/cs-agent-core/sdk/patterns/registry.js.map +1 -0
  98. package/build/cs-agent-core/sdk/telemetry/buffer.d.ts +9 -0
  99. package/build/cs-agent-core/sdk/telemetry/buffer.js +47 -0
  100. package/build/cs-agent-core/sdk/telemetry/buffer.js.map +1 -0
  101. package/build/cs-agent-core/sdk/telemetry/scrubber.d.ts +3 -0
  102. package/build/cs-agent-core/sdk/telemetry/scrubber.js +13 -0
  103. package/build/cs-agent-core/sdk/telemetry/scrubber.js.map +1 -0
  104. package/build/cs-agent-core/sdk/telemetry/types.d.ts +50 -0
  105. package/build/cs-agent-core/sdk/telemetry/types.js +2 -0
  106. package/build/cs-agent-core/sdk/telemetry/types.js.map +1 -0
  107. package/build/cs-agent-core/sdk/types/decision.d.ts +18 -0
  108. package/build/cs-agent-core/sdk/types/decision.js +2 -0
  109. package/build/cs-agent-core/sdk/types/decision.js.map +1 -0
  110. package/build/cs-agent-core/sdk/types/index.d.ts +4 -0
  111. package/build/cs-agent-core/sdk/types/index.js +5 -0
  112. package/build/cs-agent-core/sdk/types/index.js.map +1 -0
  113. package/build/cs-agent-core/sdk/types/pattern.d.ts +17 -0
  114. package/build/cs-agent-core/sdk/types/pattern.js +2 -0
  115. package/build/cs-agent-core/sdk/types/pattern.js.map +1 -0
  116. package/build/cs-agent-core/sdk/types/stack.d.ts +8 -0
  117. package/build/cs-agent-core/sdk/types/stack.js +2 -0
  118. package/build/cs-agent-core/sdk/types/stack.js.map +1 -0
  119. package/build/cs-agent-core/sdk/types/tool.d.ts +9 -0
  120. package/build/cs-agent-core/sdk/types/tool.js +2 -0
  121. package/build/cs-agent-core/sdk/types/tool.js.map +1 -0
  122. package/build/cs-agent-core/sdk/validator/csi.d.ts +2 -0
  123. package/build/cs-agent-core/sdk/validator/csi.js +24 -0
  124. package/build/cs-agent-core/sdk/validator/csi.js.map +1 -0
  125. package/build/cs-agent-core/sdk/validator/index.d.ts +2 -0
  126. package/build/cs-agent-core/sdk/validator/index.js +3 -0
  127. package/build/cs-agent-core/sdk/validator/index.js.map +1 -0
  128. package/build/cs-agent-core/sdk/validator/rules/geometry.d.ts +11 -0
  129. package/build/cs-agent-core/sdk/validator/rules/geometry.js +22 -0
  130. package/build/cs-agent-core/sdk/validator/rules/geometry.js.map +1 -0
  131. package/build/cs-agent-core/sdk/validator/validate.d.ts +2 -0
  132. package/build/cs-agent-core/sdk/validator/validate.js +46 -0
  133. package/build/cs-agent-core/sdk/validator/validate.js.map +1 -0
  134. package/build/index.d.ts +2 -0
  135. package/build/index.js +444 -0
  136. package/build/index.js.map +1 -0
  137. package/build/pingala-mcp/src/core/531-rule.d.ts +26 -0
  138. package/build/pingala-mcp/src/core/531-rule.js +96 -0
  139. package/build/pingala-mcp/src/core/531-rule.js.map +1 -0
  140. package/build/pingala-mcp/src/core/auth.d.ts +1 -0
  141. package/build/pingala-mcp/src/core/auth.js +15 -0
  142. package/build/pingala-mcp/src/core/auth.js.map +1 -0
  143. package/build/pingala-mcp/src/core/consent-manager.d.ts +17 -0
  144. package/build/pingala-mcp/src/core/consent-manager.js +104 -0
  145. package/build/pingala-mcp/src/core/consent-manager.js.map +1 -0
  146. package/build/pingala-mcp/src/core/csp.d.ts +12 -0
  147. package/build/pingala-mcp/src/core/csp.js +20 -0
  148. package/build/pingala-mcp/src/core/csp.js.map +1 -0
  149. package/build/pingala-mcp/src/core/engagement-analyzer.d.ts +42 -0
  150. package/build/pingala-mcp/src/core/engagement-analyzer.js +71 -0
  151. package/build/pingala-mcp/src/core/engagement-analyzer.js.map +1 -0
  152. package/build/pingala-mcp/src/core/governor.d.ts +104 -0
  153. package/build/pingala-mcp/src/core/governor.js +359 -0
  154. package/build/pingala-mcp/src/core/governor.js.map +1 -0
  155. package/build/pingala-mcp/src/core/life-area-mapper.d.ts +39 -0
  156. package/build/pingala-mcp/src/core/life-area-mapper.js +73 -0
  157. package/build/pingala-mcp/src/core/life-area-mapper.js.map +1 -0
  158. package/build/pingala-mcp/src/core/methodology.d.ts +39 -0
  159. package/build/pingala-mcp/src/core/methodology.js +164 -0
  160. package/build/pingala-mcp/src/core/methodology.js.map +1 -0
  161. package/build/pingala-mcp/src/core/pingala.d.ts +25 -0
  162. package/build/pingala-mcp/src/core/pingala.js +56 -0
  163. package/build/pingala-mcp/src/core/pingala.js.map +1 -0
  164. package/build/pingala-mcp/src/core/sdk-adapter.d.ts +6 -0
  165. package/build/pingala-mcp/src/core/sdk-adapter.js +33 -0
  166. package/build/pingala-mcp/src/core/sdk-adapter.js.map +1 -0
  167. package/build/pingala-mcp/src/index.d.ts +1 -0
  168. package/build/pingala-mcp/src/index.js +221 -0
  169. package/build/pingala-mcp/src/index.js.map +1 -0
  170. package/build/pingala-mcp/src/test-l3.d.ts +1 -0
  171. package/build/pingala-mcp/src/test-l3.js +35 -0
  172. package/build/pingala-mcp/src/test-l3.js.map +1 -0
  173. package/build/pingala-mcp/src/tools/audit-workspace.d.ts +16 -0
  174. package/build/pingala-mcp/src/tools/audit-workspace.js +39 -0
  175. package/build/pingala-mcp/src/tools/audit-workspace.js.map +1 -0
  176. package/build/pingala-mcp/src/tools/calculate-csi.d.ts +24 -0
  177. package/build/pingala-mcp/src/tools/calculate-csi.js +29 -0
  178. package/build/pingala-mcp/src/tools/calculate-csi.js.map +1 -0
  179. package/build/pingala-mcp/src/tools/cs-audit.d.ts +54 -0
  180. package/build/pingala-mcp/src/tools/cs-audit.js +310 -0
  181. package/build/pingala-mcp/src/tools/cs-audit.js.map +1 -0
  182. package/build/pingala-mcp/src/tools/get-governance-context.d.ts +11 -0
  183. package/build/pingala-mcp/src/tools/get-governance-context.js +16 -0
  184. package/build/pingala-mcp/src/tools/get-governance-context.js.map +1 -0
  185. package/build/pingala-mcp/src/tools/validate-stack-change.d.ts +41 -0
  186. package/build/pingala-mcp/src/tools/validate-stack-change.js +35 -0
  187. package/build/pingala-mcp/src/tools/validate-stack-change.js.map +1 -0
  188. package/build/sdk/index.d.ts +6 -0
  189. package/build/sdk/index.js +18 -0
  190. package/build/sdk/index.js.map +1 -0
  191. package/build/sdk/patterns/index.d.ts +3 -0
  192. package/build/sdk/patterns/index.js +37 -0
  193. package/build/sdk/patterns/index.js.map +1 -0
  194. package/build/sdk/patterns/registry.d.ts +4 -0
  195. package/build/sdk/patterns/registry.js +80 -0
  196. package/build/sdk/patterns/registry.js.map +1 -0
  197. package/build/sdk/telemetry/buffer.d.ts +9 -0
  198. package/build/sdk/telemetry/buffer.js +47 -0
  199. package/build/sdk/telemetry/buffer.js.map +1 -0
  200. package/build/sdk/telemetry/scrubber.d.ts +3 -0
  201. package/build/sdk/telemetry/scrubber.js +13 -0
  202. package/build/sdk/telemetry/scrubber.js.map +1 -0
  203. package/build/sdk/telemetry/types.d.ts +50 -0
  204. package/build/sdk/telemetry/types.js +2 -0
  205. package/build/sdk/telemetry/types.js.map +1 -0
  206. package/build/sdk/types/decision.d.ts +18 -0
  207. package/build/sdk/types/decision.js +2 -0
  208. package/build/sdk/types/decision.js.map +1 -0
  209. package/build/sdk/types/index.d.ts +4 -0
  210. package/build/sdk/types/index.js +5 -0
  211. package/build/sdk/types/index.js.map +1 -0
  212. package/build/sdk/types/pattern.d.ts +17 -0
  213. package/build/sdk/types/pattern.js +2 -0
  214. package/build/sdk/types/pattern.js.map +1 -0
  215. package/build/sdk/types/stack.d.ts +8 -0
  216. package/build/sdk/types/stack.js +2 -0
  217. package/build/sdk/types/stack.js.map +1 -0
  218. package/build/sdk/types/tool.d.ts +9 -0
  219. package/build/sdk/types/tool.js +2 -0
  220. package/build/sdk/types/tool.js.map +1 -0
  221. package/build/sdk/validator/csi.d.ts +2 -0
  222. package/build/sdk/validator/csi.js +24 -0
  223. package/build/sdk/validator/csi.js.map +1 -0
  224. package/build/sdk/validator/index.d.ts +2 -0
  225. package/build/sdk/validator/index.js +3 -0
  226. package/build/sdk/validator/index.js.map +1 -0
  227. package/build/sdk/validator/rules/geometry.d.ts +11 -0
  228. package/build/sdk/validator/rules/geometry.js +22 -0
  229. package/build/sdk/validator/rules/geometry.js.map +1 -0
  230. package/build/sdk/validator/validate.d.ts +2 -0
  231. package/build/sdk/validator/validate.js +46 -0
  232. package/build/sdk/validator/validate.js.map +1 -0
  233. package/build/src/core/531-rule.d.ts +26 -0
  234. package/build/src/core/531-rule.js +96 -0
  235. package/build/src/core/531-rule.js.map +1 -0
  236. package/build/src/core/auth.d.ts +1 -0
  237. package/build/src/core/auth.js +15 -0
  238. package/build/src/core/auth.js.map +1 -0
  239. package/build/src/core/consent-manager.d.ts +17 -0
  240. package/build/src/core/consent-manager.js +104 -0
  241. package/build/src/core/consent-manager.js.map +1 -0
  242. package/build/src/core/csp.d.ts +12 -0
  243. package/build/src/core/csp.js +20 -0
  244. package/build/src/core/csp.js.map +1 -0
  245. package/build/src/core/engagement-analyzer.d.ts +42 -0
  246. package/build/src/core/engagement-analyzer.js +71 -0
  247. package/build/src/core/engagement-analyzer.js.map +1 -0
  248. package/build/src/core/governor.d.ts +104 -0
  249. package/build/src/core/governor.js +371 -0
  250. package/build/src/core/governor.js.map +1 -0
  251. package/build/src/core/life-area-mapper.d.ts +39 -0
  252. package/build/src/core/life-area-mapper.js +73 -0
  253. package/build/src/core/life-area-mapper.js.map +1 -0
  254. package/build/src/core/methodology.d.ts +39 -0
  255. package/build/src/core/methodology.js +164 -0
  256. package/build/src/core/methodology.js.map +1 -0
  257. package/build/src/core/pingala.d.ts +25 -0
  258. package/build/src/core/pingala.js +56 -0
  259. package/build/src/core/pingala.js.map +1 -0
  260. package/build/src/core/sdk-adapter.d.ts +8 -0
  261. package/build/src/core/sdk-adapter.js +34 -0
  262. package/build/src/core/sdk-adapter.js.map +1 -0
  263. package/build/src/index.d.ts +2 -0
  264. package/build/src/index.js +333 -0
  265. package/build/src/index.js.map +1 -0
  266. package/build/src/test-l3.d.ts +1 -0
  267. package/build/src/test-l3.js +35 -0
  268. package/build/src/test-l3.js.map +1 -0
  269. package/build/src/tools/audit-workspace.d.ts +16 -0
  270. package/build/src/tools/audit-workspace.js +39 -0
  271. package/build/src/tools/audit-workspace.js.map +1 -0
  272. package/build/src/tools/calculate-csi.d.ts +24 -0
  273. package/build/src/tools/calculate-csi.js +29 -0
  274. package/build/src/tools/calculate-csi.js.map +1 -0
  275. package/build/src/tools/cs-audit.d.ts +54 -0
  276. package/build/src/tools/cs-audit.js +310 -0
  277. package/build/src/tools/cs-audit.js.map +1 -0
  278. package/build/src/tools/get-governance-context.d.ts +11 -0
  279. package/build/src/tools/get-governance-context.js +16 -0
  280. package/build/src/tools/get-governance-context.js.map +1 -0
  281. package/build/src/tools/validate-stack-change.d.ts +41 -0
  282. package/build/src/tools/validate-stack-change.js +35 -0
  283. package/build/src/tools/validate-stack-change.js.map +1 -0
  284. package/build/test-l3.d.ts +1 -0
  285. package/build/test-l3.js +35 -0
  286. package/build/test-l3.js.map +1 -0
  287. package/build/tools/analyze-stack.d.ts +40 -0
  288. package/build/tools/analyze-stack.js +121 -0
  289. package/build/tools/analyze-stack.js.map +1 -0
  290. package/build/tools/audit-workspace.d.ts +16 -0
  291. package/build/tools/audit-workspace.js +39 -0
  292. package/build/tools/audit-workspace.js.map +1 -0
  293. package/build/tools/calculate-csi.d.ts +26 -0
  294. package/build/tools/calculate-csi.js +30 -0
  295. package/build/tools/calculate-csi.js.map +1 -0
  296. package/build/tools/cs-audit.d.ts +43 -0
  297. package/build/tools/cs-audit.js +330 -0
  298. package/build/tools/cs-audit.js.map +1 -0
  299. package/build/tools/get-governance-context.d.ts +11 -0
  300. package/build/tools/get-governance-context.js +61 -0
  301. package/build/tools/get-governance-context.js.map +1 -0
  302. package/build/tools/validate-stack-change.d.ts +41 -0
  303. package/build/tools/validate-stack-change.js +54 -0
  304. package/build/tools/validate-stack-change.js.map +1 -0
  305. package/package.json +34 -0
  306. package/scripts/cloud-bridge.js +62 -0
  307. package/scripts/generate-token.js +13 -0
  308. package/src/core/531-rule.ts +148 -0
  309. package/src/core/auth.ts +42 -0
  310. package/src/core/consent-manager.ts +134 -0
  311. package/src/core/csp.ts +40 -0
  312. package/src/core/engagement-analyzer.ts +122 -0
  313. package/src/core/governor.ts +522 -0
  314. package/src/core/life-area-mapper.ts +138 -0
  315. package/src/core/methodology.ts +256 -0
  316. package/src/core/pingala.ts +77 -0
  317. package/src/core/sdk-adapter.ts +52 -0
  318. package/src/index.ts +562 -0
  319. package/src/test-l3.ts +45 -0
  320. package/src/tools/analyze-stack.ts +153 -0
  321. package/src/tools/audit-workspace.ts +50 -0
  322. package/src/tools/calculate-csi.ts +38 -0
  323. package/src/tools/cs-audit.ts +384 -0
  324. package/src/tools/get-governance-context.ts +69 -0
  325. package/src/tools/validate-stack-change.ts +71 -0
  326. package/src/types.d.ts +2 -0
  327. package/tsconfig.json +40 -0
  328. package/vercel.json +15 -0
@@ -0,0 +1,54 @@
1
+ # Pingala Cloud Governance β€” Inner Circle Onboarding
2
+
3
+ Welcome to the **Pingala Cloud Governance** private beta. You are one of the first to test the hosted **Conscious Stack Index (CSI)** and **Stack Drift** governance layer.
4
+
5
+ ---
6
+
7
+ ## 1. Connection Details
8
+
9
+ To connect your agent (Claude Desktop, etc.) to the gated Pingala server, use the following details:
10
+
11
+ * **Transport Type:** SSE (Server-Sent Events)
12
+ * **URL:** `https://pingala.consciousstack.com/sse` (or the provided preview URL)
13
+ * **Authorization:** `Bearer <YOUR_PRIVATE_TOKEN>`
14
+
15
+ ---
16
+
17
+ ## 2. Setup: Claude Desktop
18
+
19
+ 1. Open your `claude_desktop_config.json` (usually in `~/Library/Application Support/Claude/` on macOS).
20
+ 2. Add the following to your `mcpServers` object:
21
+
22
+ ```json
23
+ {
24
+ "mcpServers": {
25
+ "pingala-cloud": {
26
+ "url": "https://pingala.consciousstack.com/sse",
27
+ "headers": {
28
+ "Authorization": "Bearer YOUR_PRIVATE_TOKEN_HERE"
29
+ }
30
+ }
31
+ }
32
+ }
33
+ ```
34
+
35
+ 3. Restart Claude Desktop.
36
+
37
+ ---
38
+
39
+ ## 3. First Conversation
40
+
41
+ Once connected, try asking Pingala:
42
+
43
+ * *"What is my current Stack Drift score?"*
44
+ * *"Audit my current workspace based on the 5:3:1 rule."*
45
+ * *"What is my Conscious Stack Index (CSI) status?"*
46
+
47
+ ---
48
+
49
+ ## 4. Feedback
50
+
51
+ Please record your impressions, bugs, and "aha moments" in the shared group or via the `FEEDBACK.md` template.
52
+
53
+ > [!IMPORTANT]
54
+ > This is a high-sovereignty environment. Your tool names are never captured; only categories and structural metadata are processed to provide governance.
@@ -0,0 +1,46 @@
1
+ # Pingala Cloud: Landing Page Design (`mcp.consciousstack.com`)
2
+
3
+ ## Visual Direction
4
+ - **Aesthetic:** Dark mode, glassmorphism, iridescent gradients (Silicon/Quartz theme).
5
+ - **Typography:** Inter or Outfit (Clean, Tech-Forward).
6
+ - **Hero:** A pulsating geometric lattice (The Silica Unit Cell) that reacts to hover.
7
+
8
+ ---
9
+
10
+ ## Content Structure
11
+
12
+ ### 1. Hero Section
13
+ **Headline:** Bridge the Cognitive Gap.
14
+ **Subhead:** The first Governance Layer for the Post-Clock Era. Hosted. Gated. Sovereign.
15
+ **Call to Action:** [Enter Access Token] (Primary Input) | [View Documentation] (Secondary Link)
16
+
17
+ ### 2. The Core Metric (Stack Drift)
18
+ **Headline:** From Fragmentation to Resonance.
19
+ **Copy:** Stop tool bloat before it starts. Pingala monitors your workspace in real-time, computing your **Conscious Stack Index (CSI)** and **Stack Drift Score**.
20
+ **Visual:** A progress bar or "Speedometer" showing the shift from "Fragmented" to "Aligned."
21
+
22
+ ### 3. The 5:3:1 Protocol
23
+ **Headline:** Architectural Guardrails for AI Autonomy.
24
+ **Copy:** Pingala enforces the 5:3:1 Rule:
25
+ - **1 Anchor Node:** Your center of truth.
26
+ - **3 Active Nodes:** Your current focus.
27
+ - **5 Supporting Nodes:** Your utility layer.
28
+ **Visual:** A 3D representation of the 9-node boundary.
29
+
30
+ ### 4. Inner Circle Setup (The Quick Start)
31
+ **Headline:** Connect in 60 Seconds.
32
+ **Copy:**
33
+ 1. Copy the connection URL: `pingala.consciousstack.com/sse`
34
+ 2. Open Claude Desktop Config.
35
+ 3. Paste your token.
36
+ 4. Pingala is now Governing your sessions.
37
+
38
+ ### 5. Manifesto Footer
39
+ **Copy:** "Technology should amplify human value, not replace it. Pingala is your representative in the machine."
40
+
41
+ ---
42
+
43
+ ## Technical Setup (Vercel)
44
+ - **Domain:** `mcp.consciousstack.com`
45
+ - **Redirects:** `/` (this landing page) | `/sse` (MCP transport)
46
+ - **Framework:** Next.js (recommended for the vibrant UI and serverless MCP integration).
@@ -0,0 +1,39 @@
1
+ # Manual Vercel Deployment Guide
2
+
3
+ To finalize the launch of **Pingala Cloud Governance**, please follow these manual steps in your Vercel Dashboard.
4
+
5
+ ## 1. Create the Project
6
+ 1. Go to your [Vercel Dashboard](https://vercel.com/dashboard).
7
+ 2. Click **"Add New..." > "Project"**.
8
+ 3. Import the `cs-mcp-core` repository.
9
+ - *Note: The `@cstack/sdk` is now bundled internally, so relative path errors are resolved.*
10
+
11
+ ## 2. Configure Build Settings
12
+ - **Framework Preset:** `Other` (or `Node.js`)
13
+ - **Build Command:** `npm run build`
14
+ - **Output Directory:** `build` (Wait, since we use `@vercel/node`, it'll look for matching source, but keeping `build` as the target for our transpiled JS is safer).
15
+ - **Install Command:** `npm install`
16
+
17
+ ## 3. Environment Variables (Critical)
18
+ Add the following variables in **Settings > Environment Variables**:
19
+
20
+ | Variable | Value |
21
+ | :--- | :--- |
22
+ | `VALID_TOKENS` | `a10d64bb88876ddacd80ff4c3fd19f32,a67fb80f1b6bb508cd1149e1dd1c8033,d30c3ef8bb25ced0ddb3c2d954e21f46` |
23
+ | `CSTACK_DATA_DIR` | `/tmp` |
24
+ | `CSTACK_API_KEY` | *Your secret API key for the live registry (if applicable)* |
25
+
26
+ ## 4. Domain Setup
27
+ 1. Go to **Settings > Domains**.
28
+ 2. Add `mcp.consciousstack.com`.
29
+ 3. Follow the DNS instructions provided by Vercel (CNAME record).
30
+
31
+ ## 5. Deploy
32
+ Click **Deploy**. Once finished, visiting `mcp.consciousstack.com` should show the new landing page, and the SSE transport will be live at `/sse`.
33
+
34
+ ---
35
+
36
+ ### Inner Circle Tokens (Reminder)
37
+ - Tester 1: `a10d64bb88876ddacd80ff4c3fd19f32`
38
+ - Tester 2: `a67fb80f1b6bb508cd1149e1dd1c8033`
39
+ - Tester 3: `d30c3ef8bb25ced0ddb3c2d954e21f46`
@@ -0,0 +1,241 @@
1
+ # CSTACK MCP Product Roadmap
2
+
3
+ > **North Star**: Transform from an "Auditor" into a "Governor"β€”an interception layer that validates AI suggestions *before* action, not just reviews *after* the fact.
4
+
5
+ ---
6
+
7
+ ## Vision Architecture (from Notion AI Spec)
8
+
9
+ The target architecture defines CSTACK MCP as a **governance-first** Model Context Protocol server with:
10
+
11
+ | Capability | Description | Horizon |
12
+ |------------|-------------|---------|
13
+ | **Governance Tools** | `validate_stack_change`, `get_governance_context`, `calculate_csi` | H1-H2 |
14
+ | **Specialized Agents** | `surgeon_audit`, `mirror_analysis` | H2-H3 |
15
+ | **Resources** | `cstack://stack-map`, `cstack://csi/latest`, `cstack://maturity/status` | H1-H2 |
16
+ | **Prompts** | `inject_constraints`, `canonical_output`, `augmentation_only` | H1 |
17
+ | **Sincerity Filter** | Output compression and productivity-theater removal | H3 |
18
+ | **Geometry Analysis** | Hexagonal vs. Cubic pattern detection | H3 |
19
+
20
+ ---
21
+
22
+ ## Horizon 1: Foundation (Now)
23
+
24
+ **Constraints**: No external telemetry. Manual/self-reported inputs. Claude Desktop only.
25
+
26
+ ### Tools
27
+
28
+ | Tool | Status | Notes |
29
+ |------|--------|-------|
30
+ | `cs_audit` | βœ… Complete | 6-step Intervention Logic, 5:3:1 validation |
31
+ | `validate_stack_change` | πŸ”² New | Gating toolβ€”call *before* suggesting additions. Extracted from cs_audit logic. |
32
+ | `get_governance_context` | πŸ”² New | Exposes current stack state, maturity level, allowed/blocked actions |
33
+
34
+ ### Resources
35
+
36
+ | Resource | Status | Notes |
37
+ |----------|--------|-------|
38
+ | `cstack://stack-map/current` | πŸ”² New | JSON representation of 5:3:1 hierarchy |
39
+ | `cstack://maturity/status` | πŸ”² New | Level (1-5), stability days, gate requirements |
40
+
41
+ ### Prompts
42
+
43
+ | Prompt | Status | Notes |
44
+ |--------|--------|-------|
45
+ | `inject_constraints` | πŸ”² New | Wraps user requests with governance context |
46
+ | `canonical_output` | πŸ”² New | Forces Pingala structure: Targetβ†’Currentβ†’Recsβ†’Guardrailsβ†’Workflowβ†’Geometryβ†’Notes |
47
+
48
+ ### Core Logic
49
+
50
+ | Rule | Status | Notes |
51
+ |------|--------|-------|
52
+ | 5:3:1 Enforcement | βœ… Complete | Hard limits on Anchor/Active/Supporting |
53
+ | Maturity Gates | πŸ”² New | Block actions based on level + stability days |
54
+ | Substitution Requirement | βœ… Complete | No addition without subtraction at capacity |
55
+
56
+ ### CSI Lite
57
+
58
+ For H1, implement a **proxy-based CSI** without active testing:
59
+
60
+ ```
61
+ CSI-Lite = (0.35 Γ— AD) + (0.35 Γ— DE) + (0.30 Γ— DP-proxy)
62
+
63
+ Where:
64
+ - AD = Attention Depth (from Screen Time screenshot or self-report)
65
+ - DE = Dependency Exposure (self-assessed workflow audit)
66
+ - DP-proxy = Decisions with justification in cs_audit / total cs_audit calls
67
+ ```
68
+
69
+ **Deferred**: Recall Fitness, Augmentation Integrity (require instrumentation).
70
+
71
+ ---
72
+
73
+ ### Horizon 1.5: Functional Scaling (Bāguà Alignment) - IN PROGRESS
74
+ - **Functional Node Clustering**: Transition from counting "Binary Apps" to "Functional Slots."
75
+ - **Contextual Adapters**: Map tools that serve the same purpose across different contexts (Mobile vs. Desktop) as one functional node.
76
+ - **Bridge Coefficients**: Logic to identify "adapter" tools that bridge contexts without increasing cognitive sprawl.
77
+ - **Role Drift Detection**: Identify "Ghost Active" tools where usage (telemetry) contradicts the assigned role (e.g., a "Supporting" tool consuming "Active" levels of time).
78
+
79
+ ---
80
+
81
+ ## Horizon 2: Telemetry Integration
82
+
83
+ **Unlocked by**: FocusMonitor/CSTACK native integration, decision journal, vault parsing.
84
+
85
+ ### Tools
86
+
87
+ | Tool | Status | Notes |
88
+ |------|--------|-------|
89
+ | `calculate_csi` | πŸ”² Planned | Full 5-pillar calculation with telemetry |
90
+ | `surgeon_audit` | πŸ”² Planned | Subtraction recommendations based on usage data |
91
+ | `mirror_analysis` | πŸ”² Planned | Claimed vs. actual usage alignment |
92
+ | `record_intervention` | πŸ”² Planned | Billing ledger for governance actions |
93
+
94
+ ### Resources
95
+
96
+ | Resource | Status | Notes |
97
+ |----------|--------|-------|
98
+ | `cstack://csi/latest` | πŸ”² Planned | Full CSI breakdown with trend |
99
+ | `cstack://telemetry/usage` | πŸ”² Planned | Tool usage time-series from FocusMonitor |
100
+ | `cstack://billing/ledger` | πŸ”² Planned | Monthly intervention log with value delivered |
101
+
102
+ ### CSI Full Formula
103
+
104
+ ```python
105
+ WEIGHTS = {
106
+ "decision_provenance": 0.30,
107
+ "augmentation_integrity": 0.25,
108
+ "attention_depth": 0.20,
109
+ "dependency_exposure": 0.15,
110
+ "recall_fitness": 0.10
111
+ }
112
+
113
+ CSI = (0.30 Γ— DP) + (0.25 Γ— AI) + (0.20 Γ— AD) + (0.15 Γ— DE) + (0.10 Γ— RF)
114
+ ```
115
+
116
+ **Component Data Sources**:
117
+
118
+ | Component | Data Source | H2 Status |
119
+ |-----------|-------------|-----------|
120
+ | Decision Provenance | Decision journal + cs_audit justifications | πŸ”² Requires journal |
121
+ | Augmentation Integrity | Edit-before-accept rate (conversation analysis) | πŸ”² Requires Claude log access |
122
+ | Attention Depth | FocusMonitor deep_work_hours | βœ… Available via FocusMonitor |
123
+ | Dependency Exposure | Workflow completion without AI (self-report + inference) | ⚠️ Partial |
124
+ | Recall Fitness | Deferred to H3 | ❌ Requires active testing |
125
+
126
+ ---
127
+
128
+ ## Horizon 3: Advanced Governance
129
+
130
+ **Unlocked by**: Full telemetry pipeline, graph-based analysis, enterprise features.
131
+
132
+ ### Tools
133
+
134
+ | Tool | Status | Notes |
135
+ |------|--------|-------|
136
+ | `audit_stack_geometry` | πŸ”² Future | Hexagonal vs. Cubic pattern detection |
137
+
138
+ ### Core Logic
139
+
140
+ | Rule | Status | Notes |
141
+ |------|--------|-------|
142
+ | Lattice Geometry Detection | πŸ”² Future | Requires tool-to-tool transition graph |
143
+ | Sincerity Filter | πŸ”² Future | Output compression based on CSI + transparency options |
144
+
145
+ ### Geometry Detection Algorithm
146
+
147
+ ```python
148
+ def analyze_lattice_geometry(usage_graph, anchor_node):
149
+ """
150
+ Classifies stack as:
151
+ - hexagonal_dominant: Healthy exploration with anchor closure
152
+ - cubic_risk: Rigid automation, anchor marginalized
153
+ - quartz: 3D network with strong anchor coordination
154
+ - transitional: Mixed patterns, needs observation
155
+ """
156
+ hex_cycles = count_6_cycles_through_anchor(usage_graph, anchor_node)
157
+ cubic_paths = count_automation_chains_without_review(usage_graph)
158
+ anchor_centrality = betweenness_centrality(usage_graph, anchor_node)
159
+
160
+ # Classification logic...
161
+ ```
162
+
163
+ **Data Requirement**: Sequential tool invocation logs with timestamps. Not available in Claude Desktop alone.
164
+
165
+ ### Recall Fitness (Deferred)
166
+
167
+ Options for H3:
168
+ 1. **Spaced-repetition prompts** built into CSTACK app
169
+ 2. **Weekly micro-quiz** delivered via notification
170
+ 3. **Proxy via search frequency** (more lookups = lower RF)
171
+
172
+ ---
173
+
174
+ ## Horizon 4: Institutional & Marketplace
175
+
176
+ | Feature | Notes |
177
+ |---------|-------|
178
+ | Team-wide CSI aggregation | Org-level sovereignty dashboards |
179
+ | Policy-aware orchestration | Enterprise approved-tool lists |
180
+ | Congestion Alerts | Slack/Notion integrations for erosion warnings |
181
+ | Notion Agent Marketplace | Package for public distribution |
182
+
183
+ ---
184
+
185
+ ## Implementation Principles
186
+
187
+ ### 1. Defense in Depth (Addressing Prompt Injection)
188
+
189
+ LLMs are probabilistic. Governance rules can be "forgotten" or bypassed. Mitigations:
190
+
191
+ - **Redundancy**: Inject rules in system prompt, tool descriptions, *and* required first-call.
192
+ - **Structural Enforcement**: Tools return hard `allowed: false` regardless of LLM obedience.
193
+ - **Audit Trail**: Log bypass attempts when tools are called without validation.
194
+ - **Model Tuning**: Document that this MCP is optimized for Claude; other models may drift.
195
+
196
+ ### 2. Transparency Over Paternalism (Sincerity Filter)
197
+
198
+ When filtering/compressing output:
199
+ - Always show reasoning: "Condensed because CSI is 62."
200
+ - Offer tiers: Full / Condensed / Bullet-only.
201
+ - Allow opt-out: `sincerity_filter: off` setting.
202
+
203
+ ### 3. Proxy First, Instrument Later
204
+
205
+ For metrics without direct data sources:
206
+ - Start with self-report or inferred proxies.
207
+ - Replace with instrumented data when available.
208
+ - Never show a metric you can't defend.
209
+
210
+ ---
211
+
212
+ ## Current Status
213
+
214
+ | Phase | Status | Target |
215
+ |-------|--------|--------|
216
+ | Horizon 1 | πŸ”„ In Progress | Q1 2026 |
217
+ | Horizon 2 | πŸ”² Planned | Q2-Q3 2026 |
218
+ | Horizon 3 | πŸ”² Future | Q4 2026+ |
219
+ | Horizon 4 | πŸ”² Vision | 2027+ |
220
+
221
+ ---
222
+
223
+ ## References
224
+
225
+ - **Notion AI Spec**: Full governance layer specification (internal)
226
+ - **CSI Formula**: 5-pillar weighted calculation (see above)
227
+ - **5:3:1 Protocol**: 1 Anchor + 3 Active + 5 Supporting = 9 max
228
+ - **Pingala Engine**: Core governance logic in `src/core/pingala.ts`
229
+ - **Methodology Loader**: Dynamic rule ingestion from `cs-agent-core`
230
+
231
+ ---
232
+
233
+ ## Release Tech Debt (Inner Circle)
234
+
235
+ - **Bundled SDK**: For the Monday Feb 9 release, `@cstack/sdk` has been manually bundled into `pingala-mcp/sdk` to ensure Vercel deployment stability (avoiding cross-repo relative path issues).
236
+ - **Resolution Path**: After public release, migrate to a private NPM registry (@cstack/sdk) to restore a single source of truth.
237
+ - **Status**: TEMPORARY (Accepted for speed).
238
+
239
+ ---
240
+
241
+ *Last updated: 2026-02-04*
@@ -0,0 +1,39 @@
1
+ # Procedure: Provisioning Inner Circle Access
2
+
3
+ Follow these steps to generate a new token and grant a tester access to the Pingala Cloud Governance server.
4
+
5
+ ## 1. Generate the Token
6
+ Run the generation script from the root of the `pingala-mcp` repository:
7
+
8
+ ```bash
9
+ node scripts/generate-token.js
10
+ ```
11
+
12
+ **Output Example:**
13
+ `7df658500907f854ce76eaf00e995b6a`
14
+
15
+ ## 2. Provision on Vercel
16
+ Access to the hosted server is controlled by the `VALID_TOKENS` environment variable.
17
+
18
+ 1. Log in to your **Vercel Dashboard**.
19
+ 2. Select the **Pingala MCP** project.
20
+ 3. Go to **Settings > Environment Variables**.
21
+ 4. Find the `VALID_TOKENS` variable.
22
+ 5. Edit the value and append the new token using a comma as a separator.
23
+ * *Example:* `token1,token2,7df658500907f854ce76eaf00e995b6a`
24
+ 6. **Save** the variable.
25
+ 7. *(Optional but recommended)* Trigger a redeploy of the latest production deployment to ensure the changes are hot-loaded, although Node.js usually picks these up on the next request in many serverless environments.
26
+
27
+ ## 3. Issue to Tester
28
+ Send the tester the following:
29
+
30
+ 1. Their **Private Token**.
31
+ 2. The **Connection URL**: `https://pingala.consciousstack.com/sse`
32
+ 3. The [HOSTED_SETUP.md](file:///Users/georgesiosi/Documents/GitHub/conscious-stack/_active/pingala-mcp/HOSTED_SETUP.md) guide.
33
+
34
+ ---
35
+
36
+ ## Token Governance Rules
37
+ - **Limit:** Max 5 active tokens for the Inner Circle.
38
+ - **Revocation:** To revoke access, simply remove the token from the `VALID_TOKENS` list on Vercel.
39
+ - **Privacy:** Tokens represent architectural sessions; no personal data is linked to the token itself.
package/README.md ADDED
@@ -0,0 +1,38 @@
1
+ # Pingala MCP (The Reference Governor)
2
+
3
+ The official governance layer for the Conscious Stackβ„’ ecosystem. This MCP server enforces the 5:3:1 protocol and provides diagnostic tools for "Reflective Operators" to maintain cognitive sovereignty.
4
+
5
+ ## Features
6
+ - **5:3:1 Enforcement**: Automated auditing of tool counts and roles.
7
+ - **Cognitive Sovereignty Index (CSI)**: Quantitative assessment based on foundational work by Robert Duran IV.
8
+ - **Stack Alignment Score (SAS)**: Comparative analysis of stack configurations.
9
+ - **Powered by Pingala**: Highly opinionated governance engine with a strategic auditor voice.
10
+
11
+ ## Installation
12
+
13
+ ```bash
14
+ cd pingala-mcp
15
+ npm install
16
+ npm run build
17
+ ```
18
+
19
+ ## Integration with Claude Desktop
20
+
21
+ Add this to your `claude_desktop_config.json`:
22
+
23
+ ```json
24
+ {
25
+ "mcpServers": {
26
+ "pingala": {
27
+ "command": "node",
28
+ "args": ["/Users/georgesiosi/Documents/GitHub/conscious-stack/_active/pingala-mcp/build/index.js"]
29
+ }
30
+ }
31
+ }
32
+ ```
33
+
34
+ ## Tools
35
+ - `audit_workspace`: Scans a directory for `.agent` configuration and evaluates alignment.
36
+
37
+ ---
38
+ Β© 2026 Faiabrand Pte Ltd. High Sovereignty by Design.
package/ROADMAP.md ADDED
@@ -0,0 +1,21 @@
1
+ # CSTACK MCP Roadmap
2
+
3
+ > **πŸ“ See [PRODUCT-ROADMAP.md](./PRODUCT-ROADMAP.md) for the comprehensive, horizon-based roadmap.**
4
+
5
+ This document is retained for historical reference only.
6
+
7
+ ---
8
+
9
+ ## Legacy Milestones
10
+
11
+ ### MVP (Complete - Jan 2026)
12
+ - [x] Repository scaffolding (TypeScript + MCP SDK)
13
+ - [x] Initial `audit_workspace` tool β†’ evolved to `cs_audit`
14
+ - [x] Core 5:3:1 validation logic
15
+ - [x] CSI/SAS metric foundations
16
+ - [x] 6-step Intervention Logic
17
+ - [x] Methodology ingestion from `cs-agent-core`
18
+
19
+ ---
20
+
21
+ *For current roadmap, horizons, and implementation details, see **[PRODUCT-ROADMAP.md](./PRODUCT-ROADMAP.md)**.*