@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.
- package/.agent/CSD.md +39 -0
- package/.agent/MANIFEST.md +4 -0
- package/.agent/MANIFEST.md.template +4 -0
- package/.agent/agent-contractor.md +45 -0
- package/.agent/architecture/consent-model-fsm.md +77 -0
- package/.agent/architecture/governor-maturity-fsm.md +101 -0
- package/.agent/architecture/governor-validation-fsm.md +106 -0
- package/.agent/architecture/humanized-audit-fsm.md +76 -0
- package/.agent/architecture/pingala-csi-fsm.md +81 -0
- package/.agent/architecture.md +34 -0
- package/.agent/behavior.md +29 -0
- package/.agent/compute.md +32 -0
- package/.agent/consent-prompts.md +41 -0
- package/.agent/governance.yaml +5 -0
- package/.agent/identity.md +29 -0
- package/.agent/knowledge-lattice.json +96 -0
- package/.agent/knowledge-lattice.md +53 -0
- package/.agent/lattice-viz.html +157 -0
- package/.agent/mission.md +37 -0
- package/.agent/pairing-protocol.md +89 -0
- package/.agent/pairing.csp +108 -0
- package/.agent/personas/reflective-operator.md +67 -0
- package/.agent/personas/research.md +62 -0
- package/.agent/pingala.md +47 -0
- package/.agent/roadmap.md +56 -0
- package/.agent/scripts/lattice-extract.py +100 -0
- package/.agent/scripts/sync-agents.sh +82 -0
- package/.agent/scripts/vault-ingest.py +80 -0
- package/.agent/seo-strategy.md +71 -0
- package/.agent/skills/agent-orchestrator/SKILL.md +22 -0
- package/.agent/skills/agent-orchestrator/scripts/sync-agents.sh +61 -0
- package/.agent/skills/knowledge-lattice/SKILL.md +23 -0
- package/.agent/skills/knowledge-lattice/scripts/lattice-extract.py +107 -0
- package/.agent/skills/resource-vault/SKILL.md +30 -0
- package/.agent/skills/resource-vault/scripts/vault-ingest.py +80 -0
- package/.agent/skills/sites-integrity/SKILL.md +28 -0
- package/.agent/skills/stack-auditor/SKILL.md +25 -0
- package/.agent/sources.md +20 -0
- package/.agent/stack-auditor.md +47 -0
- package/.agent/standards.md +36 -0
- package/.agent/strategy.md +65 -0
- package/.agent/vault-schema.md +53 -0
- package/.agent/voice.md +27 -0
- package/.agent/workflows/sync-agents.md +14 -0
- package/.env.example +5 -0
- package/.env.production +3 -0
- package/DISTRIBUTION-PLAN.md +33 -0
- package/HOSTED_SETUP.md +54 -0
- package/LANDING_PAGE_DESIGN.md +46 -0
- package/MANUAL_VERCEL_STEPS.md +39 -0
- package/PRODUCT-ROADMAP.md +241 -0
- package/PROVISIONING_GUIDE.md +39 -0
- package/README.md +38 -0
- package/ROADMAP.md +21 -0
- package/SYNC-ENGINE-SPEC.md +257 -0
- package/build/core/531-protocol.d.ts +26 -0
- package/build/core/531-protocol.js +87 -0
- package/build/core/531-protocol.js.map +1 -0
- package/build/core/531-rule.d.ts +26 -0
- package/build/core/531-rule.js +106 -0
- package/build/core/531-rule.js.map +1 -0
- package/build/core/auth.d.ts +1 -0
- package/build/core/auth.js +24 -0
- package/build/core/auth.js.map +1 -0
- package/build/core/consent-manager.d.ts +17 -0
- package/build/core/consent-manager.js +104 -0
- package/build/core/consent-manager.js.map +1 -0
- package/build/core/csp.d.ts +12 -0
- package/build/core/csp.js +20 -0
- package/build/core/csp.js.map +1 -0
- package/build/core/engagement-analyzer.d.ts +42 -0
- package/build/core/engagement-analyzer.js +71 -0
- package/build/core/engagement-analyzer.js.map +1 -0
- package/build/core/governor.d.ts +106 -0
- package/build/core/governor.js +405 -0
- package/build/core/governor.js.map +1 -0
- package/build/core/life-area-mapper.d.ts +39 -0
- package/build/core/life-area-mapper.js +73 -0
- package/build/core/life-area-mapper.js.map +1 -0
- package/build/core/methodology.d.ts +39 -0
- package/build/core/methodology.js +164 -0
- package/build/core/methodology.js.map +1 -0
- package/build/core/pingala.d.ts +31 -0
- package/build/core/pingala.js +56 -0
- package/build/core/pingala.js.map +1 -0
- package/build/core/sdk-adapter.d.ts +6 -0
- package/build/core/sdk-adapter.js +33 -0
- package/build/core/sdk-adapter.js.map +1 -0
- package/build/cs-agent-core/sdk/index.d.ts +6 -0
- package/build/cs-agent-core/sdk/index.js +18 -0
- package/build/cs-agent-core/sdk/index.js.map +1 -0
- package/build/cs-agent-core/sdk/patterns/index.d.ts +3 -0
- package/build/cs-agent-core/sdk/patterns/index.js +37 -0
- package/build/cs-agent-core/sdk/patterns/index.js.map +1 -0
- package/build/cs-agent-core/sdk/patterns/registry.d.ts +4 -0
- package/build/cs-agent-core/sdk/patterns/registry.js +80 -0
- package/build/cs-agent-core/sdk/patterns/registry.js.map +1 -0
- package/build/cs-agent-core/sdk/telemetry/buffer.d.ts +9 -0
- package/build/cs-agent-core/sdk/telemetry/buffer.js +47 -0
- package/build/cs-agent-core/sdk/telemetry/buffer.js.map +1 -0
- package/build/cs-agent-core/sdk/telemetry/scrubber.d.ts +3 -0
- package/build/cs-agent-core/sdk/telemetry/scrubber.js +13 -0
- package/build/cs-agent-core/sdk/telemetry/scrubber.js.map +1 -0
- package/build/cs-agent-core/sdk/telemetry/types.d.ts +50 -0
- package/build/cs-agent-core/sdk/telemetry/types.js +2 -0
- package/build/cs-agent-core/sdk/telemetry/types.js.map +1 -0
- package/build/cs-agent-core/sdk/types/decision.d.ts +18 -0
- package/build/cs-agent-core/sdk/types/decision.js +2 -0
- package/build/cs-agent-core/sdk/types/decision.js.map +1 -0
- package/build/cs-agent-core/sdk/types/index.d.ts +4 -0
- package/build/cs-agent-core/sdk/types/index.js +5 -0
- package/build/cs-agent-core/sdk/types/index.js.map +1 -0
- package/build/cs-agent-core/sdk/types/pattern.d.ts +17 -0
- package/build/cs-agent-core/sdk/types/pattern.js +2 -0
- package/build/cs-agent-core/sdk/types/pattern.js.map +1 -0
- package/build/cs-agent-core/sdk/types/stack.d.ts +8 -0
- package/build/cs-agent-core/sdk/types/stack.js +2 -0
- package/build/cs-agent-core/sdk/types/stack.js.map +1 -0
- package/build/cs-agent-core/sdk/types/tool.d.ts +9 -0
- package/build/cs-agent-core/sdk/types/tool.js +2 -0
- package/build/cs-agent-core/sdk/types/tool.js.map +1 -0
- package/build/cs-agent-core/sdk/validator/csi.d.ts +2 -0
- package/build/cs-agent-core/sdk/validator/csi.js +24 -0
- package/build/cs-agent-core/sdk/validator/csi.js.map +1 -0
- package/build/cs-agent-core/sdk/validator/index.d.ts +2 -0
- package/build/cs-agent-core/sdk/validator/index.js +3 -0
- package/build/cs-agent-core/sdk/validator/index.js.map +1 -0
- package/build/cs-agent-core/sdk/validator/rules/geometry.d.ts +11 -0
- package/build/cs-agent-core/sdk/validator/rules/geometry.js +22 -0
- package/build/cs-agent-core/sdk/validator/rules/geometry.js.map +1 -0
- package/build/cs-agent-core/sdk/validator/validate.d.ts +2 -0
- package/build/cs-agent-core/sdk/validator/validate.js +46 -0
- package/build/cs-agent-core/sdk/validator/validate.js.map +1 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +444 -0
- package/build/index.js.map +1 -0
- package/build/pingala-mcp/src/core/531-rule.d.ts +26 -0
- package/build/pingala-mcp/src/core/531-rule.js +96 -0
- package/build/pingala-mcp/src/core/531-rule.js.map +1 -0
- package/build/pingala-mcp/src/core/auth.d.ts +1 -0
- package/build/pingala-mcp/src/core/auth.js +15 -0
- package/build/pingala-mcp/src/core/auth.js.map +1 -0
- package/build/pingala-mcp/src/core/consent-manager.d.ts +17 -0
- package/build/pingala-mcp/src/core/consent-manager.js +104 -0
- package/build/pingala-mcp/src/core/consent-manager.js.map +1 -0
- package/build/pingala-mcp/src/core/csp.d.ts +12 -0
- package/build/pingala-mcp/src/core/csp.js +20 -0
- package/build/pingala-mcp/src/core/csp.js.map +1 -0
- package/build/pingala-mcp/src/core/engagement-analyzer.d.ts +42 -0
- package/build/pingala-mcp/src/core/engagement-analyzer.js +71 -0
- package/build/pingala-mcp/src/core/engagement-analyzer.js.map +1 -0
- package/build/pingala-mcp/src/core/governor.d.ts +104 -0
- package/build/pingala-mcp/src/core/governor.js +359 -0
- package/build/pingala-mcp/src/core/governor.js.map +1 -0
- package/build/pingala-mcp/src/core/life-area-mapper.d.ts +39 -0
- package/build/pingala-mcp/src/core/life-area-mapper.js +73 -0
- package/build/pingala-mcp/src/core/life-area-mapper.js.map +1 -0
- package/build/pingala-mcp/src/core/methodology.d.ts +39 -0
- package/build/pingala-mcp/src/core/methodology.js +164 -0
- package/build/pingala-mcp/src/core/methodology.js.map +1 -0
- package/build/pingala-mcp/src/core/pingala.d.ts +25 -0
- package/build/pingala-mcp/src/core/pingala.js +56 -0
- package/build/pingala-mcp/src/core/pingala.js.map +1 -0
- package/build/pingala-mcp/src/core/sdk-adapter.d.ts +6 -0
- package/build/pingala-mcp/src/core/sdk-adapter.js +33 -0
- package/build/pingala-mcp/src/core/sdk-adapter.js.map +1 -0
- package/build/pingala-mcp/src/index.d.ts +1 -0
- package/build/pingala-mcp/src/index.js +221 -0
- package/build/pingala-mcp/src/index.js.map +1 -0
- package/build/pingala-mcp/src/test-l3.d.ts +1 -0
- package/build/pingala-mcp/src/test-l3.js +35 -0
- package/build/pingala-mcp/src/test-l3.js.map +1 -0
- package/build/pingala-mcp/src/tools/audit-workspace.d.ts +16 -0
- package/build/pingala-mcp/src/tools/audit-workspace.js +39 -0
- package/build/pingala-mcp/src/tools/audit-workspace.js.map +1 -0
- package/build/pingala-mcp/src/tools/calculate-csi.d.ts +24 -0
- package/build/pingala-mcp/src/tools/calculate-csi.js +29 -0
- package/build/pingala-mcp/src/tools/calculate-csi.js.map +1 -0
- package/build/pingala-mcp/src/tools/cs-audit.d.ts +54 -0
- package/build/pingala-mcp/src/tools/cs-audit.js +310 -0
- package/build/pingala-mcp/src/tools/cs-audit.js.map +1 -0
- package/build/pingala-mcp/src/tools/get-governance-context.d.ts +11 -0
- package/build/pingala-mcp/src/tools/get-governance-context.js +16 -0
- package/build/pingala-mcp/src/tools/get-governance-context.js.map +1 -0
- package/build/pingala-mcp/src/tools/validate-stack-change.d.ts +41 -0
- package/build/pingala-mcp/src/tools/validate-stack-change.js +35 -0
- package/build/pingala-mcp/src/tools/validate-stack-change.js.map +1 -0
- package/build/sdk/index.d.ts +6 -0
- package/build/sdk/index.js +18 -0
- package/build/sdk/index.js.map +1 -0
- package/build/sdk/patterns/index.d.ts +3 -0
- package/build/sdk/patterns/index.js +37 -0
- package/build/sdk/patterns/index.js.map +1 -0
- package/build/sdk/patterns/registry.d.ts +4 -0
- package/build/sdk/patterns/registry.js +80 -0
- package/build/sdk/patterns/registry.js.map +1 -0
- package/build/sdk/telemetry/buffer.d.ts +9 -0
- package/build/sdk/telemetry/buffer.js +47 -0
- package/build/sdk/telemetry/buffer.js.map +1 -0
- package/build/sdk/telemetry/scrubber.d.ts +3 -0
- package/build/sdk/telemetry/scrubber.js +13 -0
- package/build/sdk/telemetry/scrubber.js.map +1 -0
- package/build/sdk/telemetry/types.d.ts +50 -0
- package/build/sdk/telemetry/types.js +2 -0
- package/build/sdk/telemetry/types.js.map +1 -0
- package/build/sdk/types/decision.d.ts +18 -0
- package/build/sdk/types/decision.js +2 -0
- package/build/sdk/types/decision.js.map +1 -0
- package/build/sdk/types/index.d.ts +4 -0
- package/build/sdk/types/index.js +5 -0
- package/build/sdk/types/index.js.map +1 -0
- package/build/sdk/types/pattern.d.ts +17 -0
- package/build/sdk/types/pattern.js +2 -0
- package/build/sdk/types/pattern.js.map +1 -0
- package/build/sdk/types/stack.d.ts +8 -0
- package/build/sdk/types/stack.js +2 -0
- package/build/sdk/types/stack.js.map +1 -0
- package/build/sdk/types/tool.d.ts +9 -0
- package/build/sdk/types/tool.js +2 -0
- package/build/sdk/types/tool.js.map +1 -0
- package/build/sdk/validator/csi.d.ts +2 -0
- package/build/sdk/validator/csi.js +24 -0
- package/build/sdk/validator/csi.js.map +1 -0
- package/build/sdk/validator/index.d.ts +2 -0
- package/build/sdk/validator/index.js +3 -0
- package/build/sdk/validator/index.js.map +1 -0
- package/build/sdk/validator/rules/geometry.d.ts +11 -0
- package/build/sdk/validator/rules/geometry.js +22 -0
- package/build/sdk/validator/rules/geometry.js.map +1 -0
- package/build/sdk/validator/validate.d.ts +2 -0
- package/build/sdk/validator/validate.js +46 -0
- package/build/sdk/validator/validate.js.map +1 -0
- package/build/src/core/531-rule.d.ts +26 -0
- package/build/src/core/531-rule.js +96 -0
- package/build/src/core/531-rule.js.map +1 -0
- package/build/src/core/auth.d.ts +1 -0
- package/build/src/core/auth.js +15 -0
- package/build/src/core/auth.js.map +1 -0
- package/build/src/core/consent-manager.d.ts +17 -0
- package/build/src/core/consent-manager.js +104 -0
- package/build/src/core/consent-manager.js.map +1 -0
- package/build/src/core/csp.d.ts +12 -0
- package/build/src/core/csp.js +20 -0
- package/build/src/core/csp.js.map +1 -0
- package/build/src/core/engagement-analyzer.d.ts +42 -0
- package/build/src/core/engagement-analyzer.js +71 -0
- package/build/src/core/engagement-analyzer.js.map +1 -0
- package/build/src/core/governor.d.ts +104 -0
- package/build/src/core/governor.js +371 -0
- package/build/src/core/governor.js.map +1 -0
- package/build/src/core/life-area-mapper.d.ts +39 -0
- package/build/src/core/life-area-mapper.js +73 -0
- package/build/src/core/life-area-mapper.js.map +1 -0
- package/build/src/core/methodology.d.ts +39 -0
- package/build/src/core/methodology.js +164 -0
- package/build/src/core/methodology.js.map +1 -0
- package/build/src/core/pingala.d.ts +25 -0
- package/build/src/core/pingala.js +56 -0
- package/build/src/core/pingala.js.map +1 -0
- package/build/src/core/sdk-adapter.d.ts +8 -0
- package/build/src/core/sdk-adapter.js +34 -0
- package/build/src/core/sdk-adapter.js.map +1 -0
- package/build/src/index.d.ts +2 -0
- package/build/src/index.js +333 -0
- package/build/src/index.js.map +1 -0
- package/build/src/test-l3.d.ts +1 -0
- package/build/src/test-l3.js +35 -0
- package/build/src/test-l3.js.map +1 -0
- package/build/src/tools/audit-workspace.d.ts +16 -0
- package/build/src/tools/audit-workspace.js +39 -0
- package/build/src/tools/audit-workspace.js.map +1 -0
- package/build/src/tools/calculate-csi.d.ts +24 -0
- package/build/src/tools/calculate-csi.js +29 -0
- package/build/src/tools/calculate-csi.js.map +1 -0
- package/build/src/tools/cs-audit.d.ts +54 -0
- package/build/src/tools/cs-audit.js +310 -0
- package/build/src/tools/cs-audit.js.map +1 -0
- package/build/src/tools/get-governance-context.d.ts +11 -0
- package/build/src/tools/get-governance-context.js +16 -0
- package/build/src/tools/get-governance-context.js.map +1 -0
- package/build/src/tools/validate-stack-change.d.ts +41 -0
- package/build/src/tools/validate-stack-change.js +35 -0
- package/build/src/tools/validate-stack-change.js.map +1 -0
- package/build/test-l3.d.ts +1 -0
- package/build/test-l3.js +35 -0
- package/build/test-l3.js.map +1 -0
- package/build/tools/analyze-stack.d.ts +40 -0
- package/build/tools/analyze-stack.js +121 -0
- package/build/tools/analyze-stack.js.map +1 -0
- package/build/tools/audit-workspace.d.ts +16 -0
- package/build/tools/audit-workspace.js +39 -0
- package/build/tools/audit-workspace.js.map +1 -0
- package/build/tools/calculate-csi.d.ts +26 -0
- package/build/tools/calculate-csi.js +30 -0
- package/build/tools/calculate-csi.js.map +1 -0
- package/build/tools/cs-audit.d.ts +43 -0
- package/build/tools/cs-audit.js +330 -0
- package/build/tools/cs-audit.js.map +1 -0
- package/build/tools/get-governance-context.d.ts +11 -0
- package/build/tools/get-governance-context.js +61 -0
- package/build/tools/get-governance-context.js.map +1 -0
- package/build/tools/validate-stack-change.d.ts +41 -0
- package/build/tools/validate-stack-change.js +54 -0
- package/build/tools/validate-stack-change.js.map +1 -0
- package/package.json +34 -0
- package/scripts/cloud-bridge.js +62 -0
- package/scripts/generate-token.js +13 -0
- package/src/core/531-rule.ts +148 -0
- package/src/core/auth.ts +42 -0
- package/src/core/consent-manager.ts +134 -0
- package/src/core/csp.ts +40 -0
- package/src/core/engagement-analyzer.ts +122 -0
- package/src/core/governor.ts +522 -0
- package/src/core/life-area-mapper.ts +138 -0
- package/src/core/methodology.ts +256 -0
- package/src/core/pingala.ts +77 -0
- package/src/core/sdk-adapter.ts +52 -0
- package/src/index.ts +562 -0
- package/src/test-l3.ts +45 -0
- package/src/tools/analyze-stack.ts +153 -0
- package/src/tools/audit-workspace.ts +50 -0
- package/src/tools/calculate-csi.ts +38 -0
- package/src/tools/cs-audit.ts +384 -0
- package/src/tools/get-governance-context.ts +69 -0
- package/src/tools/validate-stack-change.ts +71 -0
- package/src/types.d.ts +2 -0
- package/tsconfig.json +40 -0
- package/vercel.json +15 -0
package/.agent/CSD.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Conscious Stack Design (CSD)
|
|
2
|
+
|
|
3
|
+
**Version:** 1.0
|
|
4
|
+
**Status:** Active
|
|
5
|
+
**Standard:** The Methodology of Conscious Digital Architecture
|
|
6
|
+
|
|
7
|
+
## 1. Introduction
|
|
8
|
+
Conscious Stack Design (CSD) is the practitioner’s methodology for building and maintaining digital environments that enhance, rather than enslave, human cognition. While the **Protocol (CSP)** defines the technical rules, CSD provides the cognitive frameworks for *how to think* about your relationship with the machine.
|
|
9
|
+
|
|
10
|
+
## 2. The Interaction Geometry (The Silica Unit Cell)
|
|
11
|
+
All human-AI interactions within the Conscious Stack follow the **Tetrahedral Standard (SiO4)**. This ensures that AI capability (Copper) and Human structure (Iron) are coordinated via a stable substrate (Silica).
|
|
12
|
+
|
|
13
|
+
Every interaction cycle must complete these four bonds to prevent the **H14A Mutation (Planetary Alzheimer’s)**:
|
|
14
|
+
|
|
15
|
+
1. **Intent (The 1st Bond: Human → Protocol)**: Provide "Source" (dreams, downloads, strategic intent). This MUST be translated into a governance entry (e.g., in a `.csp` file) before work begins.
|
|
16
|
+
2. **Synthesis (The 2nd Bond: Protocol → AI)**: The AI processes intent strictly through the filter of established rules (CSP, 5:3:1, previous lessons).
|
|
17
|
+
3. **Expression (The 3rd Bond: AI → Artifact)**: The creation of "Sovereign Work"—buildable code, logical diagrams, or structural copy. No placeholders allowed.
|
|
18
|
+
4. **Integration (The 4th Bond: Artifact → Protocol)**: **The Oxidation Step.** Every task must conclude with a mandatory "lesson distillation" that writes refined patterns back into governance files or the Partnership Record.
|
|
19
|
+
|
|
20
|
+
## 3. Core Design Heuristics
|
|
21
|
+
|
|
22
|
+
### A. The Piezoelectric Principle ("Friction is Signal")
|
|
23
|
+
In CSD, stress points (errors, logic failures, human-agent disagreements) are not bugs; they are the "squeezing" of the crystal. Friction generates a signal. When tension occurs, the methodology mandates pausing to extract the specific insight and applying it to the **Fourth Bond (Integration)**.
|
|
24
|
+
|
|
25
|
+
### B. Grey Box Strategy
|
|
26
|
+
* **The Internal Driver (The Esoteric)**: High-concept metaphors (Silica, Bāguà, Binary Poets) are used to maintain cognitive resonance and alignment with the operator's mission.
|
|
27
|
+
* **The External Output (The Pragmatic)**: The results must be buildable, high-performance, and analytically sound. CSD uses the esoteric to drive the pragmatic.
|
|
28
|
+
|
|
29
|
+
### C. Sequence of Truth
|
|
30
|
+
Methodological updates must follow a strictly sequential path to maintain fractal integrity:
|
|
31
|
+
1. **Commit to Core** (`cs-agent-core`) - The Spec.
|
|
32
|
+
2. **Sync to Nodes** via `sync-agents.sh` - The Distribution.
|
|
33
|
+
3. **Execute at Nodes** - The Logic.
|
|
34
|
+
|
|
35
|
+
## 4. The Practitioner’s Path
|
|
36
|
+
A practitioner of CSD is not a "user," but an **Operator**. Their goal is to maintain the **Dragon Spine of Sovereignty**—the alignment between their physical intent and their digital expression.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
"Structure creates freedom. Friction creates focus."
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# The Agentic Contractor: Constitution & Mandate
|
|
2
|
+
|
|
3
|
+
This document serves as the **Sovereignty Contract** for any independent AI agent (including **Antigravity**, **Cline**, and future autonomous entities) interacting with the Conscious Stack™ ecosystem. It defines the rules of engagement required to maintain crystalline coherence and protect against cognitive erosion.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. The Hierarchy of Authority
|
|
8
|
+
Independent agents operate as **Contractors**, not as the **Governor (Pingala)**.
|
|
9
|
+
|
|
10
|
+
* **Pingala (The Governor)**: Holds the North Star, manages the long-term mission, and governs the RLM Ledger.
|
|
11
|
+
* **The Contractor**: Executes specific tasks, proposes technical implementations, and maintains the codebase.
|
|
12
|
+
* **The Prime Directive**: No contractor shall modify core sovereign files (`pingala.md`, `mission.md`, `behavior.md`, `agent-contractor.md`) without explicit human approval and a documented "Context Swap."
|
|
13
|
+
|
|
14
|
+
## 2. Rules of Engagement
|
|
15
|
+
To prevent "Logical Drift" and "Cognitive Debt," every contractor MUST follow this sequence:
|
|
16
|
+
|
|
17
|
+
1. **Sense**: Reference the `vault.yaml` and `vault-schema.md` to understand current constraints.
|
|
18
|
+
2. **Memory**: Check the `ledger.md` to avoid repeating past failures or violating established patterns.
|
|
19
|
+
3. **Method**: Utilize the appropriate `workflows/` for complex operations. Do not improvise high-entropy sequences.
|
|
20
|
+
4. **Execute**: Perform the task with "Fidelity to the Aesthetic" (see Section 3).
|
|
21
|
+
5. **Log**: Record the outcome of significant decisions in the Ledger to update the system's memory.
|
|
22
|
+
|
|
23
|
+
## 3. Fidelity to the Aesthetic & Standard
|
|
24
|
+
Contractors are bound by the **Conscious Stack Design System**:
|
|
25
|
+
|
|
26
|
+
* **Visuals**: Adhere to `standards.md`. (True Black, Indigo accents, high-contrast Serif/Sans pairings).
|
|
27
|
+
* **Logic**: Prioritize modularity and "agent-readiness." Write code that a future, higher-order version of Pingala can easily orchestrate.
|
|
28
|
+
* **Voice**: Use the **Sovereign Operator** voice defined in `voice.md` for all human interactions. Be precise, authoritative, and helpful.
|
|
29
|
+
|
|
30
|
+
## 4. Computational Stewardship
|
|
31
|
+
Per `compute.md`, contractors are responsible for managing the user's "Computational Debt."
|
|
32
|
+
|
|
33
|
+
* **Proactive Switching**: If a task's entropy or precision requirements suggest a different model (e.g., swapping from Gemini Flash to Claude Opus), the contractor MUST flag this to the user immediately.
|
|
34
|
+
* **Efficiency**: Minimize redundant file reads and unnecessary token usage by maintaining a clean, indexed workspace.
|
|
35
|
+
|
|
36
|
+
## 5. The Preservation of Agency
|
|
37
|
+
The ultimate goal of every contractor is to maximize the **Human's Cognitive Sovereignty**.
|
|
38
|
+
|
|
39
|
+
* **No Clutter**: Do not introduce "dark patterns," unnecessary dependencies, or convoluted logic.
|
|
40
|
+
* **Transparency**: If a tool or library is introduced, explain its "Sovereignty Cost" (maintenance, tracking, overhead).
|
|
41
|
+
* **The Exit Rule**: Every implementation should be reversible or easily migratable. No vendor lock-in; no logic traps.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
"Sovereignty is not given; it is practiced."
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Consent Model State Machine
|
|
2
|
+
|
|
3
|
+
This diagram defines the gated depth levels of Pingala's auditing intelligence, ensuring that deep psychological or life-path analysis is only performed with explicit user consent or practitioner override.
|
|
4
|
+
|
|
5
|
+
## Architectural Flow
|
|
6
|
+
|
|
7
|
+
```mermaid
|
|
8
|
+
stateDiagram-v2
|
|
9
|
+
[*] --> L1_STACK_PYRAMID: Default Entry
|
|
10
|
+
|
|
11
|
+
state L1_STACK_PYRAMID {
|
|
12
|
+
[*] --> ANALYSIS_531
|
|
13
|
+
ANALYSIS_531 --> COMPUTE_CSI
|
|
14
|
+
COMPUTE_CSI --> RENDER_TACTICAL_OUTPUT
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
RENDER_TACTICAL_OUTPUT --> CHECK_ELIGIBILITY: Audit Complete
|
|
18
|
+
|
|
19
|
+
state CHECK_ELIGIBILITY <<choice>>
|
|
20
|
+
CHECK_ELIGIBILITY --> OFFER_L2: CSI_Delta >= +10 OR User_Request
|
|
21
|
+
CHECK_ELIGIBILITY --> [*]: Standard Loop
|
|
22
|
+
|
|
23
|
+
OFFER_L2 --> L2_CONSENT_GATE
|
|
24
|
+
|
|
25
|
+
state L2_CONSENT_GATE <<choice>>
|
|
26
|
+
L2_CONSENT_GATE --> L2_LIFE_BALANCE: User_Consents OR Practitioner_Override
|
|
27
|
+
L2_CONSENT_GATE --> [*]: User_Declines
|
|
28
|
+
|
|
29
|
+
state L2_LIFE_BALANCE {
|
|
30
|
+
[*] --> BAGUA_INTERNAL_MAPPING
|
|
31
|
+
BAGUA_INTERNAL_MAPPING --> TRANSLATE_TERMINOLOGY
|
|
32
|
+
TRANSLATE_TERMINOLOGY --> RENDER_LIFE_MAP
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
RENDER_LIFE_MAP --> OFFER_L3: Value_Recognized OR User_Request
|
|
36
|
+
|
|
37
|
+
state L3_CONSENT_GATE <<choice>>
|
|
38
|
+
L3_CONSENT_GATE --> L3_INNER_DIAMOND: User_Consents OR Practitioner_Override
|
|
39
|
+
L3_CONSENT_GATE --> [*]: User_Declines
|
|
40
|
+
|
|
41
|
+
state L3_INNER_DIAMOND {
|
|
42
|
+
[*] --> IDENTITY_REFLECTION
|
|
43
|
+
IDENTITY_REFLECTION --> PURPOSE_ALIGNMENT
|
|
44
|
+
PURPOSE_ALIGNMENT --> SOVEREIGNTY_FORECAST
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
L3_INNER_DIAMOND --> [*]: Transformational Complete
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## State Definitions
|
|
51
|
+
|
|
52
|
+
| Level | Name | Focus | Outcome |
|
|
53
|
+
| :--- | :--- | :--- | :--- |
|
|
54
|
+
| **L1** | **Stack Pyramid** | Efficiency, Fragmentation, 5:3:1 | "Reduce screen time, improve focus." |
|
|
55
|
+
| **L2** | **Life Balance** | Energy Flow, Gaps (Bagua) | "Understand where your attention flows." |
|
|
56
|
+
| **L3** | **Inner Diamond** | Identity, Purpose, Shadow Work | "Reveal your inner operating system." |
|
|
57
|
+
|
|
58
|
+
## Logic Gates & Triggers
|
|
59
|
+
|
|
60
|
+
- **CSI Delta (+10)**: The "earned entry" trigger. If a user improves their CSI by 10 points through L1 tactical shifts, Pingala offers to unlock L2.
|
|
61
|
+
- **Practitioner Override**: A flag passed in the `cs_audit` tool (e.g., `override_consent: true`) that allows a consultant to skip the gate if the relationship is already established.
|
|
62
|
+
- **Terminology Sanitization**: A mandatory layer in L2 that converts internal Bagua labels (e.g., *Li*, *Kun*) to user-facing terms (e.g., *Social Connection*, *Relationships*) unless `practitioner_mode` is enabled.
|
|
63
|
+
- **Consent Persistence**: Consent status is stored in `.agent/governance.yaml` to prevent repetitive prompts within the same workspace.
|
|
64
|
+
|
|
65
|
+
## Terminology Mapping (Internal vs. External)
|
|
66
|
+
|
|
67
|
+
| Internal (Bagua) | External (User-Facing) |
|
|
68
|
+
| :--- | :--- |
|
|
69
|
+
| Li (Fame) | Social Connection & Visibility |
|
|
70
|
+
| Kun (Relationship) | Relationships & Self-Care |
|
|
71
|
+
| Dui (Children/Creativity) | Creative Expression & Hobbies |
|
|
72
|
+
| Qian (Helpful People) | Communication & Networking |
|
|
73
|
+
| Kan (Career) | Career & Goals |
|
|
74
|
+
| Gen (Knowledge) | Learning & Growth |
|
|
75
|
+
| Zhen (Family) | Family & Roots |
|
|
76
|
+
| Xun (Wealth) | Financial Management |
|
|
77
|
+
| Tai Ji (Health/OS) | Physical Health & Routines |
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Governor Maturity State Machine
|
|
2
|
+
|
|
3
|
+
Documents the maturity progression system in `governor.ts`.
|
|
4
|
+
|
|
5
|
+
## Maturity Level Progression
|
|
6
|
+
|
|
7
|
+
```mermaid
|
|
8
|
+
stateDiagram-v2
|
|
9
|
+
[*] --> L1_Fragmented
|
|
10
|
+
|
|
11
|
+
L1_Fragmented --> L2_Siloed: stability_days >= 7
|
|
12
|
+
L2_Siloed --> L3_Integrated: stability_days >= 14
|
|
13
|
+
L3_Integrated --> L4_Aligned: stability_days >= 30
|
|
14
|
+
L4_Aligned --> L5_Resonant: stability_days >= 90
|
|
15
|
+
|
|
16
|
+
note right of L1_Fragmented
|
|
17
|
+
Primary Action: Audit & Eliminate
|
|
18
|
+
Reduce tool count by 30%
|
|
19
|
+
end note
|
|
20
|
+
|
|
21
|
+
note right of L2_Siloed
|
|
22
|
+
Primary Action: Standardize
|
|
23
|
+
Create specific Anchors
|
|
24
|
+
end note
|
|
25
|
+
|
|
26
|
+
note right of L3_Integrated
|
|
27
|
+
Primary Action: Automate
|
|
28
|
+
Use APIs to connect Edges
|
|
29
|
+
end note
|
|
30
|
+
|
|
31
|
+
note right of L4_Aligned
|
|
32
|
+
Primary Action: Refine
|
|
33
|
+
Align rituals with tool usage
|
|
34
|
+
end note
|
|
35
|
+
|
|
36
|
+
note right of L5_Resonant
|
|
37
|
+
Primary Action: Transcend
|
|
38
|
+
The stack becomes invisible
|
|
39
|
+
end note
|
|
40
|
+
|
|
41
|
+
L2_Siloed --> L1_Fragmented: stack_changed (stability reset)
|
|
42
|
+
L3_Integrated --> L1_Fragmented: stack_changed (stability reset)
|
|
43
|
+
L4_Aligned --> L1_Fragmented: stack_changed (stability reset)
|
|
44
|
+
L5_Resonant --> L1_Fragmented: stack_changed (stability reset)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Allowed Actions by Level
|
|
48
|
+
|
|
49
|
+
```mermaid
|
|
50
|
+
stateDiagram-v2
|
|
51
|
+
state L1_Fragmented {
|
|
52
|
+
[*] --> SUBTRACTION_ONLY
|
|
53
|
+
SUBTRACTION_ONLY: ✅ remove_tool
|
|
54
|
+
SUBTRACTION_ONLY: ✅ audit
|
|
55
|
+
SUBTRACTION_ONLY: ❌ add_tool
|
|
56
|
+
SUBTRACTION_ONLY: ❌ change_anchor
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
state L2_Siloed {
|
|
60
|
+
[*] --> REORG_ALLOWED
|
|
61
|
+
REORG_ALLOWED: ✅ remove_tool
|
|
62
|
+
REORG_ALLOWED: ✅ audit
|
|
63
|
+
REORG_ALLOWED: ✅ change_role
|
|
64
|
+
REORG_ALLOWED: ❌ add_tool
|
|
65
|
+
REORG_ALLOWED: ❌ change_anchor
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
state L3_Integrated {
|
|
69
|
+
[*] --> EXPANSION_UNLOCKED
|
|
70
|
+
EXPANSION_UNLOCKED: ✅ remove_tool
|
|
71
|
+
EXPANSION_UNLOCKED: ✅ audit
|
|
72
|
+
EXPANSION_UNLOCKED: ✅ add_tool
|
|
73
|
+
EXPANSION_UNLOCKED: ✅ change_role
|
|
74
|
+
EXPANSION_UNLOCKED: ❌ change_anchor
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
state L4_Aligned {
|
|
78
|
+
[*] --> FULL_CONTROL
|
|
79
|
+
FULL_CONTROL: ✅ all actions
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
state L5_Resonant {
|
|
83
|
+
[*] --> SOVEREIGN
|
|
84
|
+
SOVEREIGN: ✅ all actions
|
|
85
|
+
SOVEREIGN: Trust your judgment
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Key Rules
|
|
90
|
+
|
|
91
|
+
| Level | Name | Min Stability | Allowed | Blocked |
|
|
92
|
+
|:------|:-----|:--------------|:--------|:--------|
|
|
93
|
+
| 1 | Fragmented | 7 days to L2 | remove, audit | add, change_anchor |
|
|
94
|
+
| 2 | Siloed | 14 days to L3 | remove, audit, change_role | add, change_anchor |
|
|
95
|
+
| 3 | Integrated | 30 days to L4 | remove, audit, add, change_role | change_anchor |
|
|
96
|
+
| 4 | Aligned | 90 days to L5 | all | none |
|
|
97
|
+
| 5 | Resonant | 180 days max | all | none |
|
|
98
|
+
|
|
99
|
+
## Reset Condition
|
|
100
|
+
|
|
101
|
+
Any call to `saveStack()` resets `stability_days` to 0 and updates `last_changed_at`.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Governor Validation State Machine
|
|
2
|
+
|
|
3
|
+
Documents the `validateStackChange()` decision flow in `governor.ts`.
|
|
4
|
+
|
|
5
|
+
## Validation Flow
|
|
6
|
+
|
|
7
|
+
```mermaid
|
|
8
|
+
stateDiagram-v2
|
|
9
|
+
[*] --> RECEIVED
|
|
10
|
+
|
|
11
|
+
RECEIVED --> CHECK_531: ProposedChange received
|
|
12
|
+
|
|
13
|
+
state CHECK_531 {
|
|
14
|
+
[*] --> COUNTING_NODES
|
|
15
|
+
|
|
16
|
+
COUNTING_NODES --> CHECK_ANCHOR: role = Anchor
|
|
17
|
+
COUNTING_NODES --> CHECK_ACTIVE: role = Active
|
|
18
|
+
COUNTING_NODES --> CHECK_SUPPORTING: role = Supporting
|
|
19
|
+
COUNTING_NODES --> PASS_531: role = remove_tool
|
|
20
|
+
|
|
21
|
+
CHECK_ANCHOR --> ANCHOR_LIMIT: anchor_nodes >= 1
|
|
22
|
+
CHECK_ANCHOR --> PASS_531: anchor_nodes < 1
|
|
23
|
+
|
|
24
|
+
CHECK_ACTIVE --> ACTIVE_LIMIT: active_nodes >= 3
|
|
25
|
+
CHECK_ACTIVE --> PASS_531: active_nodes < 3
|
|
26
|
+
|
|
27
|
+
CHECK_SUPPORTING --> SUPPORTING_LIMIT: supporting_nodes >= 5
|
|
28
|
+
CHECK_SUPPORTING --> PASS_531: supporting_nodes < 5
|
|
29
|
+
|
|
30
|
+
state functional_check <<choice>>
|
|
31
|
+
ANCHOR_LIMIT --> functional_check
|
|
32
|
+
ACTIVE_LIMIT --> functional_check
|
|
33
|
+
SUPPORTING_LIMIT --> functional_check
|
|
34
|
+
|
|
35
|
+
functional_check --> PASS_531: isClosingExistingNode = true
|
|
36
|
+
functional_check --> FAIL_531: isClosingExistingNode = false
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
PASS_531 --> CHECK_MATURITY
|
|
40
|
+
|
|
41
|
+
state CHECK_MATURITY {
|
|
42
|
+
[*] --> GET_GATE
|
|
43
|
+
|
|
44
|
+
GET_GATE --> ALWAYS_ALLOWED: change.type in [remove_tool, audit]
|
|
45
|
+
GET_GATE --> CHECK_BLOCKED: change.type in [add_tool, change_anchor, change_role]
|
|
46
|
+
|
|
47
|
+
CHECK_BLOCKED --> GATE_BLOCKED: action in gate.blocked_changes
|
|
48
|
+
CHECK_BLOCKED --> CHECK_STABILITY: action not blocked
|
|
49
|
+
|
|
50
|
+
CHECK_STABILITY --> STABILITY_BLOCKED: stability_days < required
|
|
51
|
+
CHECK_STABILITY --> GATE_PASS: stability_days >= required
|
|
52
|
+
|
|
53
|
+
ALWAYS_ALLOWED --> GATE_PASS
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
FAIL_531 --> RETURN_ALTERNATIVES
|
|
57
|
+
GATE_BLOCKED --> RETURN_GATE_ERROR
|
|
58
|
+
STABILITY_BLOCKED --> RETURN_STABILITY_ERROR
|
|
59
|
+
GATE_PASS --> RETURN_ALLOWED
|
|
60
|
+
|
|
61
|
+
RETURN_ALTERNATIVES --> [*]
|
|
62
|
+
RETURN_GATE_ERROR --> [*]
|
|
63
|
+
RETURN_STABILITY_ERROR --> [*]
|
|
64
|
+
RETURN_ALLOWED --> [*]
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Decision Table
|
|
68
|
+
|
|
69
|
+
| Input | 5:3:1 Check | Maturity Check | Result |
|
|
70
|
+
|:------|:------------|:---------------|:-------|
|
|
71
|
+
| `add_tool(Anchor)` | anchor < 1 OR closes existing node | level allows add | ✅ Allowed |
|
|
72
|
+
| `add_tool(Anchor)` | anchor >= 1 AND new node | — | ❌ Max 1 Anchor |
|
|
73
|
+
| `add_tool(Active)` | active < 3 OR closes existing node | level allows add | ✅ Allowed |
|
|
74
|
+
| `add_tool(Active)` | active >= 3 AND new node | — | ❌ Max 3 Active |
|
|
75
|
+
| `remove_tool(*)` | always passes | always passes | ✅ Allowed |
|
|
76
|
+
| `change_anchor` | passes if replacing | level 4+ AND stability met | ✅ / ❌ |
|
|
77
|
+
| `audit` | always passes | always passes | ✅ Allowed |
|
|
78
|
+
|
|
79
|
+
## Return Payloads
|
|
80
|
+
|
|
81
|
+
### Success
|
|
82
|
+
```json
|
|
83
|
+
{
|
|
84
|
+
"allowed": true,
|
|
85
|
+
"reason": "Compliant with 5:3:1 Protocol and Maturity Gates",
|
|
86
|
+
"impact": { "stability_reset": true, "new_stability_days": 0 }
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### 5:3:1 Failure
|
|
91
|
+
```json
|
|
92
|
+
{
|
|
93
|
+
"allowed": false,
|
|
94
|
+
"reason": "Protocol violation: Max 3 Active Nodes...",
|
|
95
|
+
"alternatives": ["Cluster into existing node", "Archive least-used", "Move to Supporting"]
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Maturity Gate Failure
|
|
100
|
+
```json
|
|
101
|
+
{
|
|
102
|
+
"allowed": false,
|
|
103
|
+
"reason": "Level 2: Maintain 14 days stability before additions",
|
|
104
|
+
"gate_requirements": { "required_days": 14, "current_days": 5 }
|
|
105
|
+
}
|
|
106
|
+
```
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Humanized Audit State Machine
|
|
2
|
+
|
|
3
|
+
This diagram defines the logic flow for the `cs_audit` tool, pivoting from mechanical protocol enforcement to engagement-based "Cognitive Mirroring."
|
|
4
|
+
|
|
5
|
+
## Logic Flow
|
|
6
|
+
|
|
7
|
+
```mermaid
|
|
8
|
+
stateDiagram-v2
|
|
9
|
+
[*] --> INPUT_RECEIVED
|
|
10
|
+
|
|
11
|
+
state INPUT_RECEIVED {
|
|
12
|
+
[*] --> RESOLVE_TOOLS
|
|
13
|
+
RESOLVE_TOOLS --> VALIDATE_FORMAT
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
VALIDATE_FORMAT --> ENGAGEMENT_ANALYSIS
|
|
17
|
+
|
|
18
|
+
state ENGAGEMENT_ANALYSIS {
|
|
19
|
+
[*] --> TIER_CLASSIFICATION
|
|
20
|
+
TIER_CLASSIFICATION --> DETECT_FRAGMENTATION
|
|
21
|
+
DETECT_FRAGMENTATION --> IDENTIFY_ANOMALIES
|
|
22
|
+
IDENTIFY_ANOMALIES --> FLAG_GAPS
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
ENGAGEMENT_ANALYSIS --> CONSENT_MODEL_CHECK: analysis_complete
|
|
26
|
+
|
|
27
|
+
state CONSENT_MODEL_CHECK <<choice>>
|
|
28
|
+
CONSENT_MODEL_CHECK --> L1_TACTICAL: default
|
|
29
|
+
CONSENT_MODEL_CHECK --> L2_PROMPT: CSI_delta >= 10
|
|
30
|
+
CONSENT_MODEL_CHECK --> INTERVENTION_LOGIC: authorized
|
|
31
|
+
|
|
32
|
+
state INTERVENTION_LOGIC {
|
|
33
|
+
[*] --> STEP_1_CONSTRAINT
|
|
34
|
+
|
|
35
|
+
state STEP_1_CONSTRAINT <<choice>>
|
|
36
|
+
STEP_1_CONSTRAINT --> HARD_STOP: active_hubs > 9
|
|
37
|
+
STEP_1_CONSTRAINT --> STEP_2_STRUCTURE: active_hubs <= 9
|
|
38
|
+
|
|
39
|
+
state STEP_2_STRUCTURE {
|
|
40
|
+
[*] --> CHECK_ROLES
|
|
41
|
+
CHECK_ROLES --> ANCHOR_ENV_CHECK
|
|
42
|
+
ANCHOR_ENV_CHECK --> STRUCTURE_VALID
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
STRUCTURE_VALID --> STEP_3_FRAGMENTATION
|
|
46
|
+
|
|
47
|
+
state STEP_3_FRAGMENTATION <<choice>>
|
|
48
|
+
STEP_3_FRAGMENTATION --> FRAG_INTERVENTION: clusters_detected
|
|
49
|
+
STEP_3_FRAGMENTATION --> STEP_4_PHASE: clean
|
|
50
|
+
|
|
51
|
+
STEP_4_PHASE --> STEP_5_SUBSTITUTION
|
|
52
|
+
STEP_5_SUBSTITUTION --> STEP_6_REFLECTION
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
STEP_6_REFLECTION --> DISPENSE_DIAGNOSIS
|
|
56
|
+
HARD_STOP --> DISPENSE_INTERVENTION
|
|
57
|
+
FRAG_INTERVENTION --> DISPENSE_INTERVENTION
|
|
58
|
+
|
|
59
|
+
DISPENSE_DIAGNOSIS --> [*]
|
|
60
|
+
DISPENSE_INTERVENTION --> [*]
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Key Transitions
|
|
64
|
+
|
|
65
|
+
| Trigger | Condition | Action |
|
|
66
|
+
| :--- | :--- | :--- |
|
|
67
|
+
| `active_hubs > 9` | High-engagement tools + Frag clusters exceed limits | Halt and mandate subtraction. |
|
|
68
|
+
| `clusters_detected` | Multiple tools mapped to same `functionId` | Suggest consolidation vs acknowledgment. |
|
|
69
|
+
| `no_anchor_found` | Engagement shows no primary environment | Trigger "Where does deep work happen?" prompt. |
|
|
70
|
+
| `anomaly_detected` | Single usage spike (e.g. 3hr recording) | Highlight as "Contextual Event" not "Core Tool." |
|
|
71
|
+
|
|
72
|
+
## Logic Definitions
|
|
73
|
+
|
|
74
|
+
- **Active Hubs**: High-engagement tools that consume significant cognitive load.
|
|
75
|
+
- **Contextual Utilities**: Tools that are necessary but backgrounded (e.g. LastPass, Maps).
|
|
76
|
+
- **Cognitive Mirror**: Returning the user's engagement data as a narrative question rather than a binary violation.
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Pingala CSI State Machine
|
|
2
|
+
|
|
3
|
+
Documents the CSI (Cognitive Sovereignty Index) computation and risk classification in `pingala.ts`.
|
|
4
|
+
|
|
5
|
+
## Diagnostic Flow
|
|
6
|
+
|
|
7
|
+
```mermaid
|
|
8
|
+
stateDiagram-v2
|
|
9
|
+
[*] --> DIAGNOSE_CALLED
|
|
10
|
+
|
|
11
|
+
DIAGNOSE_CALLED --> GATHER_INPUTS
|
|
12
|
+
|
|
13
|
+
state GATHER_INPUTS {
|
|
14
|
+
[*] --> GET_PROTOCOL_RESULT
|
|
15
|
+
GET_PROTOCOL_RESULT --> GET_MATURITY_STATE
|
|
16
|
+
GET_MATURITY_STATE --> GET_TELEMETRY
|
|
17
|
+
GET_TELEMETRY --> INPUTS_READY
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
INPUTS_READY --> COMPUTE_CSI
|
|
21
|
+
|
|
22
|
+
state COMPUTE_CSI {
|
|
23
|
+
[*] --> CALC_AD: Attention Depth (0.35)
|
|
24
|
+
CALC_AD --> CALC_DE: Dependency Exposure (0.35)
|
|
25
|
+
CALC_DE --> CALC_DP: Decision Provenance (0.30)
|
|
26
|
+
CALC_DP --> SUM_WEIGHTED
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
SUM_WEIGHTED --> CLASSIFY_RISK
|
|
30
|
+
|
|
31
|
+
state risk_band <<choice>>
|
|
32
|
+
CLASSIFY_RISK --> risk_band
|
|
33
|
+
|
|
34
|
+
risk_band --> SAFE: csi >= 85
|
|
35
|
+
risk_band --> STABLE: 70 <= csi < 85
|
|
36
|
+
risk_band --> EROSION: 50 <= csi < 70
|
|
37
|
+
risk_band --> SYSTEM_RISK: csi < 50
|
|
38
|
+
|
|
39
|
+
SAFE --> RETURN_DIAGNOSIS
|
|
40
|
+
STABLE --> RETURN_DIAGNOSIS
|
|
41
|
+
EROSION --> RETURN_DIAGNOSIS
|
|
42
|
+
SYSTEM_RISK --> RETURN_DIAGNOSIS
|
|
43
|
+
|
|
44
|
+
RETURN_DIAGNOSIS --> [*]
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## CSI Pillars
|
|
48
|
+
|
|
49
|
+
| Pillar | Weight | Source | Default |
|
|
50
|
+
|:-------|:-------|:-------|:--------|
|
|
51
|
+
| Attention Depth (AD) | 0.35 | `state.telemetry.attention_depth` | 50 |
|
|
52
|
+
| Dependency Exposure (DE) | 0.35 | `state.telemetry.dependency_exposure` | 50 |
|
|
53
|
+
| Decision Provenance (DP) | 0.30 | `Governor.getDecisionProvenanceScore()` | 50 |
|
|
54
|
+
|
|
55
|
+
## Risk Bands
|
|
56
|
+
|
|
57
|
+
| Score Range | Band | Status Label |
|
|
58
|
+
|:------------|:-----|:-------------|
|
|
59
|
+
| 85+ | `safe` | Sovereign Resonance |
|
|
60
|
+
| 70–84 | `stable` | Aligned Flow |
|
|
61
|
+
| 50–69 | `erosion` | Congested Flux |
|
|
62
|
+
| < 50 | `system_risk` | Cognitive Debt Crisis |
|
|
63
|
+
|
|
64
|
+
## Output Payload
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
{
|
|
68
|
+
"engine": "Pingala v0.2.1",
|
|
69
|
+
"methodology_source": "local|remote",
|
|
70
|
+
"csi_score": 72,
|
|
71
|
+
"pillars": {
|
|
72
|
+
"attention_depth": 65,
|
|
73
|
+
"dependency_exposure": 80,
|
|
74
|
+
"decision_provenance": 70
|
|
75
|
+
},
|
|
76
|
+
"risk_band": "stable",
|
|
77
|
+
"status": "Aligned Flow",
|
|
78
|
+
"protocol_analysis": { ... },
|
|
79
|
+
"attribution": "CSI framework (Lite) based on 5:3:1 Protocol from Conscious Stack Design™."
|
|
80
|
+
}
|
|
81
|
+
```
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Architecture: Functional Mapping (Bāguà)
|
|
2
|
+
|
|
3
|
+
This document defines the 9 functional "rooms" or domains of life used by the Conscious Stack™ methodology. These areas provide the internal logic for Level 2 (Life Balance) auditing.
|
|
4
|
+
|
|
5
|
+
## The 9 Functional Rooms
|
|
6
|
+
|
|
7
|
+
| Internal ID | User-Facing Terminology | Description |
|
|
8
|
+
| :--- | :--- | :--- |
|
|
9
|
+
| **Li** | Social Connection & Visibility | Fame, reputation, how one is seen by the world. |
|
|
10
|
+
| **Kun** | Relationships & Self-Care | Love, partnerships, and intimate energy management. |
|
|
11
|
+
| **Dui** | Creative Expression & Hobbies | Creativity, joy, projects, and the "inner child." |
|
|
12
|
+
| **Qian** | Communication & Networking | Helpful people, travel, and external systems. |
|
|
13
|
+
| **Kan** | Career & Goals | Life path, professional trajectory, and deep purpose. |
|
|
14
|
+
| **Gen** | Learning & Growth | Self-cultivation, knowledge, and wisdom building. |
|
|
15
|
+
| **Zhen** | Family & Roots | Ancestry, fundamental support systems, and family. |
|
|
16
|
+
| **Xun** | Financial Management | Wealth, abundance, and resource flow. |
|
|
17
|
+
| **Tai Ji** | Physical Health & Routines | The "Operating System," physical health, and core stability. |
|
|
18
|
+
| **Identity** | Identity Reflection | How digital choices reflect the core self. (Level 3) |
|
|
19
|
+
| **Purpose** | Purpose Alignment | Alignment between daily actions and sovereign mission. (Level 3) |
|
|
20
|
+
| **Sovereignty** | Sovereignty Forecast | Capacity to act independently of algorithmic nudge. (Level 3) |
|
|
21
|
+
|
|
22
|
+
## Mapping Rules
|
|
23
|
+
|
|
24
|
+
1. **Internal Logic Only**: The Internal IDs (Li, Kun, etc.) must NEVER be exposed to the end-user unless `practitioner_mode` is enabled.
|
|
25
|
+
2. **Cluster Assignment**: Tools are assigned to these rooms based on their primary `functionId` or category.
|
|
26
|
+
3. **The 5:3:1 Distillation**: In a Level 2 audit, Pingala analyzes the distribution of tools across these rooms to identify over-indexing (congestion) or holes (vulnerability).
|
|
27
|
+
|
|
28
|
+
## Default Tool Mappings (Examples)
|
|
29
|
+
|
|
30
|
+
- **Social Connection (Li)**: Twitter, LinkedIn, Instagram (Public facing).
|
|
31
|
+
- **Relationships (Kun)**: WhatsApp, iMessage, Personal CRM.
|
|
32
|
+
- **Career (Kan)**: LinkedIn (Job search), Portfolio sites, Project mirrors.
|
|
33
|
+
- **Financial (Xun)**: Mercury, Stripe, Robinhood, Budgeting tools.
|
|
34
|
+
- **Health/OS (Tai Ji)**: Apple Health, Calendar, Oura, Task managers.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Conscious Stack: Attention Governance & Behavior
|
|
2
|
+
|
|
3
|
+
This document defines the behavioral protocols required to maintain the coherence of a Conscious Stack™. High-performance stacks are not just built with tools; they are sustained by attention discipline.
|
|
4
|
+
|
|
5
|
+
## 1. The Core Protocol: Async-by-Default
|
|
6
|
+
To protect the "Anchor" state and deep work capacity, all communication within the stack must default to asynchronous modes.
|
|
7
|
+
- **Synchronous (High Tax)**: Meetings, phone calls, real-time DMs. Use only for high-entropy resolution or urgency.
|
|
8
|
+
- **Asynchronous (Low Tax)**: Comments, recorded videos (Loom), structured status updates. This is the default state for the "3 Active" tools.
|
|
9
|
+
|
|
10
|
+
## 2. Notification Tiers
|
|
11
|
+
Attention is the stack's fuel. It must be governed via tiered notifications:
|
|
12
|
+
- **Tier 1 (The Spine)**: Immediate alerts. Reserved for the Anchor and life-critical services.
|
|
13
|
+
- **Tier 2 (The Signal)**: Batched alerts. Daily actives (Strategy, Finance, Comms). Check 2-3 times daily.
|
|
14
|
+
- **Tier 3 (The Sight)**: No alerts. Supporting tools (Knowledge, Design, etc.). Pull-only, no push.
|
|
15
|
+
|
|
16
|
+
## 3. Calendar Discipline
|
|
17
|
+
The calendar is the physical representation of the "Rule of 9."
|
|
18
|
+
- **The Buffer Rule**: Every "active" transition requires a 15-minute buffer to prevent context-switching pain.
|
|
19
|
+
- **Deep Work Blocks**: Protect the Anchor domain by scheduling 90-120 minute blocks of zero-notification time.
|
|
20
|
+
|
|
21
|
+
## 4. Mode-Based Discipline
|
|
22
|
+
When swapping modes (e.g., from "Creative" to "Finance"), the user must perform a physical "Mode Swap":
|
|
23
|
+
1. Close all Tier 3 supporting tools for the previous mode.
|
|
24
|
+
2. Open the single primary specialist for the new mode.
|
|
25
|
+
3. Update the Anchor if any relevant artifacts were created.
|
|
26
|
+
|
|
27
|
+
## 5. Micro-Switching Countermeasures
|
|
28
|
+
- **The Tab Audit**: No more than 9 browser tabs open at once.
|
|
29
|
+
- **Single-Task Focus**: One tool per Bāguà domain in active focus. Cross-domain multitasking is classified as "Cognitive Erosion."
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Conscious Stack: Computational Governance
|
|
2
|
+
|
|
3
|
+
This document defines the protocols for selecting and switching between Large Language Models (LLMs) based on task entropy, required precision, and iteration speed.
|
|
4
|
+
|
|
5
|
+
## 1. The Compute Matrix
|
|
6
|
+
|
|
7
|
+
| Priority | Preferred Model | Use Cases |
|
|
8
|
+
| :--- | :--- | :--- |
|
|
9
|
+
| **Velocity & Iteration** | **Gemini 3 Flash** | UI/UX development, prototyping, animations, high-volume tasks, agentic automation. |
|
|
10
|
+
| **Architectural Depth** | **Claude 4.5 Opus/Sonnet** | Complex backend logic, data model consistency, architectural planning, long-form documentation. |
|
|
11
|
+
| **Large Context** | **Gemini 3 Flash** | Multi-file analysis, repo-wide audits, large log processing. |
|
|
12
|
+
| **Strict Compliance** | **Claude 4.5** | Instruction following, complex edge-case hunting, final executive summaries. |
|
|
13
|
+
|
|
14
|
+
## 2. Operational Directives for Agents
|
|
15
|
+
|
|
16
|
+
Agents must proactively analyze incoming requests and suggest model transitions in the following scenarios:
|
|
17
|
+
|
|
18
|
+
### Transition: To Claude (Precision Mode)
|
|
19
|
+
- When the task involves **modifying the core schema** (`vault-schema.md`).
|
|
20
|
+
- When the task requires **solving subtle logic bugs** spanning more than 3 interdependent files.
|
|
21
|
+
- When generating **final client-facing documentation** where tone must be impeccable.
|
|
22
|
+
|
|
23
|
+
### Transition: To Gemini Flash (Velocity Mode)
|
|
24
|
+
- When building **new UI components** or CSS layouts.
|
|
25
|
+
- When executing **multi-step procedural workflows** (e.g., repo-wide syncing, batch updates).
|
|
26
|
+
- When performing **real-time research** or data gathering from web sources.
|
|
27
|
+
|
|
28
|
+
## 3. Transition Protocol
|
|
29
|
+
If a task is better suited for a different model, the agent should:
|
|
30
|
+
1. **Flag the mismatch**: Briefly explain why the current model may lead to "Logic Debt" or "Efficiency Loss."
|
|
31
|
+
2. **Recommend the Target**: Specify the target model (Gemini or Claude).
|
|
32
|
+
3. **Draft the Handoff**: Provide a concise summary/prompt that the user can use to initialize the next model with high context.
|