File size: 6,093 Bytes
3176379
06078ee
 
 
 
3176379
a11681a
 
06078ee
 
7d0daa2
b25b0fb
06078ee
 
 
 
 
 
 
b25b0fb
06078ee
3176379
06078ee
 
b25b0fb
06078ee
b25b0fb
06078ee
b25b0fb
06078ee
 
 
 
b25b0fb
06078ee
b25b0fb
 
 
06078ee
b25b0fb
06078ee
 
 
 
 
 
 
 
b25b0fb
06078ee
b25b0fb
06078ee
b25b0fb
 
06078ee
b25b0fb
 
06078ee
b25b0fb
06078ee
b25b0fb
06078ee
 
b25b0fb
 
06078ee
 
d4e6ccd
06078ee
 
 
d4e6ccd
 
 
 
 
 
 
b25b0fb
 
06078ee
b25b0fb
06078ee
b25b0fb
 
 
 
06078ee
 
 
 
 
 
 
 
b25b0fb
 
06078ee
 
 
b25b0fb
06078ee
 
 
 
 
 
d4e6ccd
06078ee
 
 
b25b0fb
06078ee
b25b0fb
 
06078ee
b25b0fb
 
06078ee
e3268e8
 
 
06078ee
5657f3b
06078ee
 
 
d4e6ccd
06078ee
 
 
 
 
 
5657f3b
06078ee
5657f3b
d4e6ccd
5657f3b
06078ee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
---
title: amaru  Memory Attestation (Cardano-Anchored)
emoji: 🐍
colorFrom: yellow
colorTo: indigo
sdk: docker
pinned: true
license: apache-2.0
short_description: "memory cortex — Cardano-anchored receipt chain"
ecosystem-stage: operational
tags:
  - doctrine-v11
  - memory
  - formal-verification
  - szl-holdings
  - agentic-ai
  - dsse
  - governance
  - provenance
  - apache-2.0
  - rag
---
<!-- HF Space front-matter is REQUIRED (sdk: docker). Injected by hf-sync
     so the Space builds the Dockerfile. Do not remove. -->

## Live

**HF Space (one-click, no login):** [![Open in Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Open%20in%20Spaces-amaru-FF9D00?style=flat-square)](https://huggingface.co/spaces/SZLHOLDINGS/amaru)

- Space URL: https://szlholdings-amaru.hf.space
- Health: `curl -s https://szlholdings-amaru.hf.space/api/amaru/v1/honest | jq '{doctrine,declarations}'``{"doctrine":"v11","declarations":749}`
- Docs: https://docs.szlholdings.com/flagships/amaru
- Release: [v1.0.0](https://github.com/szl-holdings/amaru/releases/tag/v1.0.0)

---

## What it does

**amaru is the reasoning cortex.** It answers questions with citations and refuses when evidence is absent — it never invents a justification. This is the trust layer for any commander-facing readiness or assessment dashboard: automation bias kills trust; amaru produces reasoning an operator can act on.

Key capabilities:
- **Cited reasoning** — every answer tied to a chunk-level source; refuses to fabricate when evidence is absent
- **FAISS RAG memory** — provenance receipts on every memory read/write; COSE_Sign1-wrapped (RFC 9052) per op
- **7-Chakra scheduler** — ASCEND/DESCEND pipeline; each chakra emits a receipt trace entry
- **Cardano L1 anchor** — checkpoint hashes as transaction metadata (hash anchoring only — not a token)
- **Competitive parity** — Splunk-style analytics, Credo AI-style bias detection (live, HTTP 200)

**NATO Explainability/Traceability fit:** amaru produces the cited rationale doctrine requires. When an operator asks *why* the system flagged a track, amaru produces a cited answer or refuses — it never invents a justification.

---

## Verify it yourself

```bash
# 1. Confirm live doctrine numbers
curl -s https://szlholdings-amaru.hf.space/api/amaru/v1/honest \
  | jq '{doctrine, declarations, axioms_unique, sorries_total}'
# => {"doctrine":"v11","declarations":749,"axioms_unique":14,"sorries_total":163}

# 2. Sign a Khipu receipt and verify the DSSE envelope
DSSE=$(curl -s -X POST https://szlholdings-amaru.hf.space/api/amaru/khipu/sign \
  -H 'content-type: application/json' \
  -d '{"receipt":{"action_id":"demo"}}' | jq .dsse)
curl -s -X POST https://szlholdings-amaru.hf.space/api/amaru/khipu/verify \
  -H 'content-type: application/json' -d "{\"dsse\":$DSSE}" | jq '{verified, signatures}'
# => {"verified": true, "signatures": [{"keyid":"szlholdings-cosign","verified":true}]}

# 3. Verify cosign keyless signature on the published image (SLSA L1 honest)
cosign verify ghcr.io/szl-holdings/amaru:uds-v0.2.0 \
  --certificate-identity-regexp="^https://github.com/szl-holdings/" \
  --certificate-oidc-issuer="https://token.actions.githubusercontent.com"
# => Verified OK (Rekor index 1723784350)

# 4. SLSA L2 provenance attestation is roadmap (Wire D), not yet earned.
#    Currently returns "no matching attestations":
# cosign verify-attestation --type slsaprovenance ghcr.io/szl-holdings/amaru:uds-v0.2.0 \
#   --certificate-identity-regexp="^https://github.com/szl-holdings/" \
#   --certificate-oidc-issuer="https://token.actions.githubusercontent.com"
```

**Full guide:** [developers/VERIFY.md](https://github.com/szl-holdings/developers/blob/main/VERIFY.md)

---

## Architecture

```mermaid
graph TD
    Q[Query] --> FAISS[FAISS RAG\nchunk-level retrieval\nprovenance hash per chunk]
    FAISS --> CH[7-Chakra scheduler\nASCEND/DESCEND\neach chakra emits receipt]
    CH --> ANS{Evidence found?}
    ANS --> |Yes| CITE[Cited answer\nreceipt signed\nChakra trace entry]
    ANS --> |No| REFUSE[Explicit refusal\nreceipt signed\nnever fabricates]
    CITE & REFUSE --> KD[Khipu DAG\nDSSE P-256 signed\nCOSE_Sign1 per op]
    KD --> CARD[Cardano anchor\ncheckpoint hash\ntx metadata only]
```

---

## Parity vs. leaders

| Capability | Palantir / Splunk | amaru | Differentiator |
|---|---|---|---|
| RAG / retrieval | ✅ | ✅ FAISS chunk-level | — |
| Citation of sources | partial | ✅ **chunk-level provenance** | Every claim tied to a verifiable source chunk |
| Refusal when no evidence | — | ✅ **explicit refusal** | Never fabricates; Palantir doesn't guarantee this |
| Receipt per reasoning op | — | ✅ **COSE_Sign1 per op** | — |
| Supply-chain provenance | — | ✅ **cosign-signed (SLSA L1 honest; L2 roadmap)** | Individually verifiable via `cosign verify` |
| Bias detection | ✅ (Credo AI) | ✅ parity endpoint | — |

---

## Quickstart

```bash
docker run --rm -p 7860:7860 ghcr.io/szl-holdings/amaru:uds-v0.2.0
```

> Note: in-Space Khipu DSSE receipts are signed with real ECDSA-P256 when `SZL_COSIGN_PRIVATE_PEM` runtime secret is present; otherwise receipts are emitted unsigned and labelled — never silently fabricated.

---

## Honest status

| Claim | Status |
|---|---|
| Live HF Space (HTTP 200) | ✅ |
| SLSA Build L1 honest (L2 roadmap via Wire D) | ✅ L1 — cosign-signed, Rekor [1723784350](https://search.sigstore.dev/?logIndex=1723784350). L2 attestation not yet earned (`cosign verify-attestation` returns "no matching attestations"). |
| cosign keyless signed | ✅ |
| DSSE Khipu receipts | ✅ — ECDSA P-256-SHA256 when secret present; labelled UNSIGNED otherwise |
| Cardano anchor | ⚠️ Demo-seeded; not on mainnet |
| Lean 749/14/163 @ `c7c0ba17` | ✅ |
| Λ-uniqueness | ⚠️ Conjecture 1 — not a theorem |
| SLSA L3 | ❌ Not claimed |

---

<sub>Doctrine v11 LOCKED · 749/14/163 · kernel `c7c0ba17` · SLSA L1 honest (L2 roadmap) · Λ = Conjecture 1 · Apache-2.0</sub>

Signed-off-by: stephenlutar2-hash <stephenlutar2@gmail.com>