datapulse-my
AGENTS.md3 starsChanged 3 months agoMITView on GitHub
Working agreement for AI agents touching the Ed25519-signed attestation chain. .attestations/ contains the signed daily probe attestation chain — every datapulse-my release carries a chain_head.json that cryptographically proves which datasets were probed at the time of release. Each release's chain head = the SHA-256 of (previous chain head || dataset_links_sha256 || dataset_count || date). Each chain head is signed with the project's Ed25519 keypair. Why this matters: M8ven grades this positively (secret flow analysis, signed probe attestation chain checks). The…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,439 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- mcp/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
The file
We split this AGENTS.md into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
The Ed25519 keypair is generated by
scripts/init_keys.py: Don't re-roll keys without operator approval. - Very specific: line 96
When writing a codex brief that touches .attestations/ or gen_attestations.py:
- Distinctive: line 99
What's the backwards-compat plan?: every external verifier depends on the current shape
- Distinctive: line 101
Does the change affect canonical JSON form?: STOP and surface to operator first.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md — .attestations/ (signed probe attestation chain)
Working agreement for AI agents touching the Ed25519-signed attestation chain.
What this is
.attestations/ contains the signed daily probe attestation chain — every datapulse-my release carries a chain_head.json that cryptographically proves which datasets were probed at the time of release. Each release's chain head = the SHA-256 of (previous chain head || dataset_links_sha256 || dataset_count || date). Each chain head is signed with the project's Ed25519 keypair.
Why this matters: M8ven grades this positively (secret flow analysis, signed probe attestation chain checks). The release pipeline (.github/workflows/release-please.yml) asserts the chain head is stamped on each release; a broken chain breaks release attestation.
Public verification: anyone with the public key (in .well-known/datapulse-probe-keys.json) can verify a release's attestation. The keypair is split: private key in DATAPULSE_ATTESTATION_PRIVATE_KEY_FILE (a GitHub Actions secret), public key in the repo.
Hard rules
chain_head.jsonis generated, never hand-edited. Manual edits will not match the cryptographic history; the release pipeline will detect the inconsistency and reject the release.- The only writer to
.attestations/isscripts/gen_attestations.py. Don't write new scripts that touch this directory; extendgen_attestations.pyif new outputs are needed. - Re-running
gen_attestations.pywith different inputs produces a different chain head. That's expected and correct. The chain advances on every daily run; the previous chain head is the input to the next. - The Ed25519 keypair is generated by
scripts/init_keys.py. Don't re-roll keys without operator approval. Key rotation breaks all historical attestation verification — the public key in.well-known/would need to be updated in lockstep, AND any external verifiers would need to migrate. - All chain outputs are deterministic given (private_key, date, previous_chain_head, dataset_set). If two runs of the same input produce different chain heads, the keypair was rolled mid-run — surface this to the operator immediately.
File map
.attestations/
├── AGENTS.md # this file
├── chain_head.json # current head: { date, previous_chain_head, dataset_count, dataset_links_sha256, signature }
└── latest/ # daily digest envelopes (one per day, immutable)
├── 2026-08-15.json # { date, attestations: [...], chain_head }
├── 2026-08-16.json
└── ...Chain structure (canonical)
{
"schema": "datapulse/v1/daily-chain-head-envelope",
"payload": {
"schema": "datapulse/v1/daily-chain-head",
"date": "2026-08-15",
"previous_chain_head": "0000...0000", // "0" * 64 for the genesis
"dataset_count": 389,
"dataset_links_sha256": "e3852d..." // hash of sorted manifest links
},
"signature": "<base64 Ed25519 over canonical(payload)>"
}Canonical form: json.dumps(payload, ensure_ascii=False, sort_keys=True, separators=(",", ":")). Any change to this canonical form breaks signature verification across all historical attestations.
Regeneration contract
scripts/gen_attestations.py is invoked daily by the datapulse-attest-daily systemd timer via ~/dotfiles/scripts/datapulse-attest-daily.sh (after datapulse-health.service). It:
- Reads
health/latest.json(current probe results) - Reads the current
chain_head.json(previous_chain_head input) - Reads the Ed25519 private key from
DATAPULSE_ATTESTATION_PRIVATE_KEY_FILE - Computes the new chain head
- Signs it
- Writes
.attestations/latest/<date>.json(immutable daily digest) - Updates
.attestations/chain_head.json(mutable head pointer)
Never: re-run for the same date (overwrites the daily digest, breaks the audit trail). The --quick-test flag skips signing and uses a known-private test key — never run --quick-test against production chain_head.json.
Public verification
External verifiers can verify a release's attestation with:
# Pseudocode for an external verifier
public_key_pem = requests.get("https://data-pulse.my/.well-known/datapulse-probe-keys.json").json()["active"]
envelope = json.loads(open(".attestations/latest/<release-date>.json").read())
verify(
public_key_pem,
canonical(envelope["payload"]), # canonical form, NOT pretty-printed
base64.b64decode(envelope["signature"])
)The canonical(payload) form is the same as gen_attestations.py uses. External verifiers depend on this exact form being stable. Any change to canonical-JSON serialisation breaks compatibility.
What is NOT in .attestations/
- The public key registry — that's
.well-known/datapulse-probe-keys.jsonat the public endpoint, generated byinit_keys.pyand committed to the repo root - Historical chain heads — they're captured in the daily digests (
latest/<date>.json) asprevious_chain_head; the currentchain_head.jsononly holds the latest - The signing key itself —
DATAPULSE_ATTESTATION_PRIVATE_KEY_FILE(GitHub Actions secret), never in the repo
Out of scope
- Switching the signature algorithm (Ed25519 → ECDSA, RSA, etc.) — would break every external verifier. Operator decision only.
- Adding per-dataset attestation granularity — the current chain is one digest per day across all datasets. Per-dataset attestation is a separate feature.
- Tampering with the chain head to "fix" a release — that's the trust claim this entire repo depends on. Surface any apparent chain-head inconsistency to the operator; do not patch.
Pre-flight checklist (for dispatch briefs)
When writing a codex brief that touches .attestations/ or gen_attestations.py:
- What's the cryptographic change? brief must describe the algorithm/serialisation/canonical-form change
- What's the backwards-compat plan? every external verifier depends on the current shape
- Does the brief involve the signing key? brief must name the env var path and forbid
print(private_key_bytes)/print(signature_bytes)etc. - Does the change affect canonical JSON form? STOP and surface to operator first; this breaks external verifiers
- What does the release pipeline assertion need to know? brief must mention
assert_and_publish_attestation_anchorin.github/workflows/release-please.yml - Workdir: absolute path to this repo
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

