Skip to content

Commit 7fdcd47

Browse files
hyperpolymathclaude
andcommitted
docs(readme): convert README.adoc -> Markdown README.md
README must be real Markdown to render in GitHub community-health, the GitHub profile, and external MCP directories (Glama) — AsciiDoc shows as raw markup there. pandoc asciidoc->GFM, badges fixed to clickable, SPDX header kept as an HTML comment, duplicate README.adoc removed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 8767a17 commit 7fdcd47

2 files changed

Lines changed: 71 additions & 77 deletions

File tree

README.adoc

Lines changed: 0 additions & 77 deletions
This file was deleted.

README.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<!--
2+
SPDX-License-Identifier: CC-BY-SA-4.0
3+
SPDX-FileCopyrightText: 2025-2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
4+
-->
5+
6+
# Overview
7+
8+
**Pre-commit hook for validating K9 configuration files.**
9+
10+
K9 is a Nickel-based configuration contract format used for deployment
11+
validation and policy enforcement. This hook validates `.k9` and
12+
`.k9.ncl` files on commit.
13+
14+
# Checks Performed
15+
16+
1. **K9! magic number** — First non-empty line must be exactly `K9!`
17+
18+
2. **SPDX header**`SPDX-License-Identifier` in the first 10 lines
19+
20+
3. **Pedigree block**`pedigree` `=` `{` `` `}` with `name` and
21+
`version` fields
22+
23+
4. **Security level**`leash`/`security_level` must be `kennel`,
24+
`yard`, or `hunt`
25+
26+
5. **Hunt-level signature** — Hunt files must include `signature` or
27+
`signature_required`
28+
29+
# Installation
30+
31+
Add to your `.pre-commit-config.yaml`:
32+
33+
```yaml
34+
repos:
35+
- repo: https://github.com/hyperpolymath/k9-pre-commit
36+
rev: v1.0.0
37+
hooks:
38+
- id: validate-k9
39+
```
40+
41+
Then install:
42+
43+
```bash
44+
pre-commit install
45+
```
46+
47+
# Manual Usage
48+
49+
You can also run the hook script directly:
50+
51+
```bash
52+
./hooks/validate-k9.sh path/to/file.k9.ncl [more-files.k9 ...]
53+
```
54+
55+
# Security Levels
56+
57+
| Level | Trust | Requirements |
58+
|----------|-------------|---------------------------|
59+
| `kennel` | Data-only | No signature required |
60+
| `yard` | Validated | Nickel contracts enforced |
61+
| `hunt` | Full access | Signature required |
62+
63+
# Author
64+
65+
Jonathan D.A. Jewell \<[j.d.a.jewell@open.ac](j.d.a.jewell@open.ac).uk\>
66+
67+
# License
68+
69+
SPDX-License-Identifier: CC-BY-SA-4.0
70+
71+
See [LICENSE](LICENSE) for details.

0 commit comments

Comments
 (0)