|
| 1 | +<!-- SPDX-License-Identifier: CC-BY-SA-4.0 --> |
| 2 | +--- |
| 3 | +title: K9-SVC |
| 4 | +site: K9-SVC |
| 5 | +date: 2026-06-22 |
| 6 | +--- |
| 7 | + |
| 8 | +# K9-SVC — Self-Validating Components |
| 9 | + |
| 10 | +<p class="lede">A Nickel-based format for configuration and contractiles that carries its own guarantees. Components validate themselves, with a trust model that scales from inert data to cryptographically signed execution.</p> |
| 11 | + |
| 12 | +<div class="badges"> |
| 13 | +<span class="badge">v1.0.0-alpha</span> |
| 14 | +<span class="badge">Nickel contractiles</span> |
| 15 | +<span class="badge">.k9 / .k9.ncl</span> |
| 16 | +<span class="badge">application/vnd.k9+nickel</span> |
| 17 | +<span class="badge">MPL-2.0 / CC-BY-SA-4.0</span> |
| 18 | +</div> |
| 19 | + |
| 20 | +<div class="btn-row"> |
| 21 | +<a class="btn btn-primary" href="/start.html">Get started</a> |
| 22 | +<a class="btn btn-ghost" href="/spec.html">Read the spec</a> |
| 23 | +<a class="btn btn-ghost" href="https://github.com/hyperpolymath/k9-ecosystem">GitHub</a> |
| 24 | +</div> |
| 25 | + |
| 26 | +## The three-level trust model |
| 27 | + |
| 28 | +K9-SVC is safe by construction: a component declares how much trust it requires, and the environment grants no more. |
| 29 | + |
| 30 | +| Level | Name | What's permitted | |
| 31 | +|-------|------|------------------| |
| 32 | +| **1** | Data | Pure data, no execution — safe in all environments. | |
| 33 | +| **2** | Validation | Nickel contract evaluation permitted. | |
| 34 | +| **3** | Execution | Full execution — requires a cryptographic signature. | |
| 35 | + |
| 36 | +## What it does |
| 37 | + |
| 38 | +<div class="cards"> |
| 39 | +<div class="card"> |
| 40 | +<h3>Self-validating</h3> |
| 41 | +<p>A component states its own contract. Validation is intrinsic, not bolted on.</p> |
| 42 | +</div> |
| 43 | +<div class="card"> |
| 44 | +<h3>Contractiles in Nickel</h3> |
| 45 | +<p>Contracts are written in Nickel — composable, evaluable, and precise.</p> |
| 46 | +</div> |
| 47 | +<div class="card"> |
| 48 | +<h3>Signed execution</h3> |
| 49 | +<p>Anything beyond validation requires a cryptographic signature. No silent escalation.</p> |
| 50 | +</div> |
| 51 | +<div class="card"> |
| 52 | +<h3>First-class media type</h3> |
| 53 | +<p><code>application/vnd.k9+nickel</code> — registered, addressable, toolable.</p> |
| 54 | +</div> |
| 55 | +</div> |
| 56 | + |
| 57 | +## A taste |
| 58 | + |
| 59 | +```nickel |
| 60 | +# greeting.k9.ncl — a level-2 self-validating component |
| 61 | +{ |
| 62 | + trust_level = 2, |
| 63 | + contract = fun value => value | { name | String, repeat | Number }, |
| 64 | + data = { name = "world", repeat = 3 }, |
| 65 | +} |
| 66 | +``` |
| 67 | + |
| 68 | +## Part of the standards estate |
| 69 | + |
| 70 | +K9-SVC is coordinated through the [k9-ecosystem](https://github.com/hyperpolymath/k9-ecosystem) hub — implementations (`k9-rs`, `k9_ex`, `k9_gleam`, `k9-deno`, `k9-haskell`), tooling and CI. The normative specification lives in [standards](https://github.com/hyperpolymath/standards). |
0 commit comments