Skip to content

Commit cd61831

Browse files
committed
Add ATTESTORIUM v0.0.0
Initial release: deterministic attestation utility.
0 parents  commit cd61831

File tree

4 files changed

+271
-0
lines changed

4 files changed

+271
-0
lines changed

ATTESTORIUM.log

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# ATTESTORIUM LOG
2+
# Immutable attestation ledger
3+
# This file contains records, not code.
4+
# Entries are append-only by convention.
5+
# Deletion invalidates historical continuity.
6+
7+
# Format:
8+
# ---
9+
# ATTESTATION
10+
# time: <UTC ISO-8601>
11+
# repo: <path>
12+
# commit: <hash>
13+
# tree: <hash>
14+
# digest: <sha256>
15+
#
16+
# stdin:
17+
# <observed input>
18+
# ---
19+

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
MIT License
2+
3+
Copyright (c) 2026 ATTESTORIUM
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+

README.md

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
# ATTESTORIUM
2+
3+
ATTESTORIUM is a deterministic witness.
4+
5+
It does not decide.
6+
It does not execute.
7+
It does not intervene.
8+
9+
It records **what exists**, exactly as it exists, at the moment it is observed.
10+
11+
---
12+
13+
## Philosophy
14+
15+
ATTESTORIUM exists to preserve truth under pressure.
16+
17+
It is designed for moments where:
18+
19+
* Output must be witnessed, not evaluated
20+
* State must be frozen without alteration
21+
* Accountability depends on *what was*, not *what was claimed*
22+
23+
ATTESTORIUM does not improve reality.
24+
It prevents reality from being rewritten.
25+
26+
---
27+
28+
## What It Is
29+
30+
ATTESTORIUM is an **attestation primitive**.
31+
32+
It binds:
33+
34+
* Observed input (stdin)
35+
* Repository state
36+
* Time
37+
38+
Into a single, immutable record.
39+
40+
The result is evidence.
41+
42+
---
43+
44+
## What It Is Not
45+
46+
* Not a validator
47+
* Not a linter
48+
* Not a judge
49+
* Not a fixer
50+
* Not an executor
51+
52+
Anything that changes state is out of scope.
53+
54+
---
55+
56+
## Behavior
57+
58+
* Consumes input **exclusively** via `stdin`
59+
* Refuses silent invocation
60+
* Captures repository metadata:
61+
62+
* HEAD commit
63+
* tree hash
64+
* dirty state
65+
* Generates a deterministic SHA-256 attestation
66+
* Emits a single, final attestation record
67+
68+
No retries.
69+
No flags.
70+
No configuration.
71+
72+
---
73+
74+
## Output
75+
76+
ATTESTORIUM emits a structured attestation containing:
77+
78+
* Timestamp (UTC)
79+
* Git commit hash (or `UNCOMMITTED`)
80+
* Tree hash
81+
* Working tree state (`CLEAN` / `DIRTY`)
82+
* Input hash
83+
* Attestation hash
84+
85+
This output is the artifact.
86+
87+
---
88+
89+
## Usage
90+
91+
ATTESTORIUM is never run alone.
92+
It must witness output.
93+
94+
```sh
95+
<command-producing-output> | ./attestorium.sh
96+
```
97+
98+
### Example
99+
100+
```sh
101+
echo "build artifact v1" | ./attestorium.sh
102+
```
103+
104+
Produces an immutable attestation tying:
105+
106+
* the text
107+
* the repository state
108+
* the moment of observation
109+
110+
---
111+
112+
## Contract
113+
114+
Once emitted:
115+
116+
* The attestation stands
117+
* Interpretation is external
118+
* Responsibility transfers to the observer
119+
120+
ATTESTORIUM guarantees **record**, not **meaning**.
121+
122+
If you want judgment, use something else.
123+
124+
---
125+
126+
## Design Constraints
127+
128+
These constraints are intentional:
129+
130+
* No configuration → no ambiguity
131+
* No execution → no side effects
132+
* No retries → no narrative drift
133+
134+
Truth is narrow by design.
135+
136+
---
137+
138+
## Relationship to Other Artifacts
139+
140+
* **IRREVOCULL** — decides
141+
* **GUILLOTINE** — destroys
142+
* **ATTESTORIUM** — witnesses
143+
144+
Each performs exactly one irreversible role.
145+
146+
---
147+
148+
## Warning
149+
150+
An attestation can be used against you.
151+
152+
That is the point.
153+
154+
---
155+
156+
## About
157+
158+
ATTESTORIUM is a minimal, irreversible witness for software reality.
159+
160+
If you need flexibility, do not use it.
161+
If you need truth, nothing else will do.

attestorium.sh

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
#!/bin/sh
2+
# ATTESTORIUM v0.0.0
3+
# Deterministic attestation utility
4+
# Witness only. No execution. No mutation. No remediation.
5+
6+
set -euf
7+
8+
# --- Preconditions ---------------------------------------------------------
9+
10+
# Must be inside a git repository
11+
git rev-parse --is-inside-work-tree >/dev/null 2>&1 || {
12+
echo "ATTESTORIUM: not a git repository" >&2
13+
exit 2
14+
}
15+
16+
# --- Input Capture ----------------------------------------------------------
17+
18+
# Read stdin verbatim (stream-safe)
19+
INPUT="$(cat || true)"
20+
21+
# Silence is invalid
22+
[ -z "$INPUT" ] && {
23+
echo "ATTESTORIUM: INVALID";
24+
exit 1
25+
}
26+
27+
# --- Attestation Context ----------------------------------------------------
28+
29+
# Immutable context snapshot
30+
REPO_ROOT="$(git rev-parse --show-toplevel)"
31+
HEAD_COMMIT="$(git rev-parse HEAD)"
32+
HEAD_TREE="$(git rev-parse HEAD^{tree})"
33+
TIMESTAMP="$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
34+
35+
# Working tree status (null-delimited, deterministic ordering)
36+
STATUS="$(git status --porcelain=v1 -z | LC_ALL=C sort -z || true)"
37+
38+
# --- Deterministic Digest ---------------------------------------------------
39+
40+
# Canonical attestation material
41+
ATTESTATION_PAYLOAD=$(printf '%s\n%s\n%s\n%s\n%s' \
42+
"$TIMESTAMP" \
43+
"$HEAD_COMMIT" \
44+
"$HEAD_TREE" \
45+
"$STATUS" \
46+
"$INPUT"
47+
)
48+
49+
# Cryptographic digest (portable)
50+
DIGEST="$(printf '%s' "$ATTESTATION_PAYLOAD" | shasum -a 256 | awk '{print $1}')"
51+
52+
# --- Output ----------------------------------------------------------------
53+
54+
# Emit attestation record (machine-first, human-readable)
55+
cat <<EOF
56+
ATTESTATION
57+
----------
58+
repo: $REPO_ROOT
59+
commit: $HEAD_COMMIT
60+
tree: $HEAD_TREE
61+
time: $TIMESTAMP
62+
digest: $DIGEST
63+
64+
stdin:
65+
$INPUT
66+
EOF
67+
68+
# Exit success: attestation completed
69+
exit 0

0 commit comments

Comments
 (0)