Purpose. Minimal, implementation-agnostic CLI semantics for SSM-Clock Stamp. All inputs/outputs are plain ASCII; comparisons are string-based.
stamp --file <path> [--kv "k1=v1;..."] [--ledger <path>]
Input. Exact bytes at <path> (binary read).
Compute.h_file = H_algo(file_bytes)wrap360(x) = x - 360*floor(x/360)theta_deg = wrap360( (unix_seconds / 86400) * 360 )rasi_idx = floor(theta_deg / 30)stamp_core = "SSMCLOCK1|" + iso_utc + "|" + rasi_idx + "|" + theta_deg + "|" + h_filechain_k = H_chain( ascii(chain_{k-1} + "|" + stamp_core) ) with chain_0 = "0"*64
Output (stdout, one line).SSMCLOCK1|iso_utc|rasi_idx|theta_deg|sha256(file)|chain[|kv:...]
Side-effects (optional). Append the line to a local ledger and/or write a sidecar next to the file.
Defaults (if no --kv). algo=sha256;chain_algo=sha256;theta_prec=5;float=ieee75464;time_mode=derived_utc
Example (stdout).SSMCLOCK1|2025-10-14T06:12:03Z|3|186.01875|<h64>|<c64>
verify --file <path> --stamp "<line>" [--ledger <path>] [--anchor <note>]
Steps. Recompute h', derive theta'_deg/rasi'_idx, optionally rewalk chain and validate anchor/evidence.
Output (stdout, ASCII).
HASH_OK=<true|false> CLOCK_OK=<true|false> CHAIN_OK=<true|false|na> ANCHOR_OK=<true|false|na> EVIDENCE_OK=<true|false|absent|na>
VERDICT=<PASS|FAIL>
Return code. 0 on PASS, non-zero on FAIL.
Example (stdout).
HASH_OK=true CLOCK_OK=true CHAIN_OK=true ANCHOR_OK=na EVIDENCE_OK=absent
VERDICT=PASS
anchor-make --date YYYY-MM-DD --source <ledger|sidecars> [--witness]
Select. All same-UTC-day stamps; sort canonically by (iso_utc, stamp_core, chain).
Compute. rollup_D = sha256( ascii(Stamp_1 "|" ... "|" Stamp_n) )
Output (stdout, ASCII).
SSM-Clock Stamp (SSM-CS) -- Daily Anchor
date=YYYY-MM-DD
count=<n>
rollup_algo=sha256
rollup_sha256=<64-hex>
sort=iso_utc,stamp_core,chain
source=<ledger|sidecars>
If --witness: also emit witness_chain_tip=<64-hex> and policy_sha256=<64-hex>.
anchor-verify --date YYYY-MM-DD [--both-sources]
Recompute. Canonical roll-ups from the chosen source(s) and compare to the published note.
Output (stdout, ASCII).
VERIFY_DATE=YYYY-MM-DD
LEDGER_RECOMPUTE=<64-hex> COUNT=<n>
SIDECARS_RECOMPUTE=<64-hex> COUNT=<m> # if requested/available
ANCHOR_LEDGER_OK=<true|false>
ANCHOR_SIDECARS_OK=<true|false>
VERDICT=<PASS|FAIL>
verify-all [--today]
Batch run: per-file verify, ledger rewalk, and optional anchor parity for the UTC day (--today default).
Output (stdout, ASCII summary).Verified files: <N> PASS:<p> FAIL:<f> Orphan sidecars:<o>
Canonical behavior (applies to all commands).
- One line per stamp:
SSMCLOCK1|iso_utc|rasi_idx|theta_deg|sha256(file)|chain[|kv:...] - UTC only:
iso_utc = "YYYY-MM-DDThh:mm:ssZ"(no subseconds;23:59:60forbidden). - Angle print: exactly
theta_precdigits (default5), IEEE-754 binary64, round-half-to-even. - Digests: lowercase 64-hex.
- Hash inputs are exact ASCII of the shown concatenations.
Navigation
Back: SSM-Clock Stamp – Reference Interface & Operational Playbook (4)
Next: SSM-Clock Stamp – Canonical Behavior (4.2)