proofpress 0.0.1 → 0.1.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,105 @@
1
+ [//]: # (ob:df70df88)
2
+ # Proofpress harness adapters
3
+
4
+ [//]: # (ob:93121540)
5
+ The skill captures rich decision context when an accepted Markdown or static
6
+ HTML artifact version is still fresh. The hook is only a best-effort fallback. `ingest`
7
+ backfills Git history, and the embedded capsule carries portable history beyond
8
+ Git.
9
+
10
+ [//]: # (ob:1744e48a)
11
+ | Layer | What it knows | Attribution rule |
12
+ |---|---|---|
13
+ | Skill | accepted version, claims, why, consequential rejection | supplies known actor roles and basis |
14
+ | Hook / `capture` | changed, staged, and untracked Markdown or static HTML | supplies only `recorded_by` |
15
+ | `ingest` | committed content and Git author | attributes from Git metadata |
16
+ | Portable capsule | admitted records attached to the artifact | preserves recorded fields; invents none |
17
+
18
+ [//]: # (ob:50c32349)
19
+ ## Shared contract
20
+
21
+ [//]: # (ob:a2f15f7d)
22
+ 1. Work only on Markdown or static HTML knowledge artifacts, never source code.
23
+ 2. Read the artifact policy. Enable `portable` once when requested; it stays on
24
+
25
+ [//]: # (ob:23c62cea)
26
+ until explicitly changed.
27
+
28
+ [//]: # (ob:7109fe56)
29
+ 3. Preserve carrier-native block anchors (Markdown `ob` markers; static HTML
30
+
31
+ [//]: # (ob:f8ee70a6)
32
+ `data-proofpress-id`), run `anchor`, and write honest claims for touched or
33
+ removed blocks.
34
+
35
+ [//]: # (ob:9d481ea6)
36
+ 4. Snapshot accepted, meaningful versions—not every turn or save—with `--why`
37
+
38
+ [//]: # (ob:9710997f)
39
+ and explicit known actors.
40
+
41
+ [//]: # (ob:c8f43a25)
42
+ 5. Use `--rejected` only for consequential dead branches. Never infer rejected
43
+
44
+ [//]: # (ob:41bb2485)
45
+ paths from casual discussion or store raw prompts/transcripts.
46
+
47
+ [//]: # (ob:3991a868)
48
+ 6. Run `verify` and report its output verbatim. A mismatch is evidence, not a
49
+
50
+ [//]: # (ob:a08bfb00)
51
+ reason to manufacture another snapshot.
52
+
53
+ [//]: # (ob:a8bc86e1)
54
+ 7. On receipt of a portable artifact, run `inspect` before `import`.
55
+
56
+ [//]: # (ob:f5f3a858)
57
+ ## Install
58
+
59
+ [//]: # (ob:8a9fcf71)
60
+ The npm installer is the recommended path. It installs package-aware adapters
61
+ that use `npx --no-install`, so agents never download the package implicitly:
62
+
63
+ [//]: # (ob:5ee2d540)
64
+ ```sh
65
+ npm install --save-dev proofpress@next
66
+ npx --no-install proofpress setup --agent codex
67
+ ```
68
+
69
+ [//]: # (ob:3328131b)
70
+ Use `--agent claude`, `--agent cursor`, or `--agent all` for the other supported
71
+ harnesses. Add `--badge README.md` only when the repository owner wants a
72
+ visible Proofpress provenance mark.
73
+
74
+ [//]: # (ob:041482f5)
75
+ For a vendored `proofpress.py`, install adapters manually:
76
+
77
+ [//]: # (ob:0e468706)
78
+ - Claude Code: copy `claude-code/proofpress/` to `.claude/skills/` and merge
79
+
80
+ [//]: # (ob:225dd61c)
81
+ `claude-code/hooks-example.json` into `.claude/settings.json`.
82
+
83
+ [//]: # (ob:3e5fba6b)
84
+ - Codex: append `codex/AGENTS-snippet.md` to `AGENTS.md` and merge
85
+
86
+ [//]: # (ob:3ef5e70c)
87
+ `codex/config-hooks.toml` into the Codex configuration.
88
+
89
+ [//]: # (ob:9d561c7d)
90
+ - Cursor: copy `cursor/proofpress/` to `.cursor/skills/proofpress/` or
91
+
92
+ [//]: # (ob:9cddddf2)
93
+ `.agents/skills/proofpress/`, then start a new Agent chat.
94
+
95
+ [//]: # (ob:2202e132)
96
+ - Pi: install `pi/proofpress-skill.md`; `pi/extension-skeleton.ts` is an
97
+
98
+ [//]: # (ob:cc2d6144)
99
+ intentionally untested extension sketch whose event API should be checked
100
+ against the installed Pi version.
101
+
102
+ [//]: # (ob:c883ac9d)
103
+ Adapters expect `proofpress.py` at the repository root.
104
+
105
+ [//]: # (proofpress:meta:eyJhcnRpZmFjdF9pZCI6InBwX2U3NGJlMDlhOWQyOGYxODU1ZGI0YTAwNyIsInBvbGljeSI6ImxvY2FsIiwicHJvb2ZwcmVzcyI6MX0)
@@ -0,0 +1,16 @@
1
+ {
2
+ "//": "Merge into .claude/settings.json. This is a best-effort fallback over changed, staged, and untracked Markdown and static HTML. It records only the hook identity as recorded_by; it does not infer who authored the content or why.",
3
+ "hooks": {
4
+ "Stop": [
5
+ {
6
+ "matcher": "",
7
+ "hooks": [
8
+ {
9
+ "type": "command",
10
+ "command": "cd \"$CLAUDE_PROJECT_DIR\" && test -f proofpress.py && python3 proofpress.py capture --recorder claude-code-hook; exit 0"
11
+ }
12
+ ]
13
+ }
14
+ ]
15
+ }
16
+ }
@@ -0,0 +1,63 @@
1
+ ---
2
+ name: proofpress
3
+ description: Preserve decision history for Markdown and static HTML knowledge artifacts with Proofpress. Use when creating or accepting a meaningful revision to an ADR, design doc, PRD, README, strategy note, portable .md artifact, or static .html/.htm artifact in a repository containing proofpress.py; never use for source-code files.
4
+ ---
5
+
6
+ [//]: # (ob:25f10229)
7
+ # Proofpress
8
+
9
+ [//]: # (ob:cb25a041)
10
+ Record accepted Markdown or static HTML artifact versions with structured
11
+ testimony and verification. Do not snapshot every conversational turn.
12
+
13
+ [//]: # (ob:d8284708)
14
+ ## Workflow
15
+
16
+ [//]: # (ob:04e1285c)
17
+ 1. Read `python3 proofpress.py policy <file>`. If the user asks for portability,
18
+
19
+ [//]: # (ob:0fab4251)
20
+ run `policy <file> portable` once; it remains sticky. If Git history exists
21
+ without a ledger, run `ingest <file>`.
22
+
23
+ [//]: # (ob:a5e7461c)
24
+ 2. Preserve carrier-native anchors while editing: Markdown uses
25
+
26
+ [//]: # (ob:01348595)
27
+ `[//]: # (ob:xxxxxxxx)`; static HTML uses `data-proofpress-id`. Run
28
+ `anchor <file>` and inspect inherited/new/gone IDs.
29
+
30
+ [//]: # (ob:ac191e68)
31
+ 3. Write claims JSON with one honest entry per touched or removed block; do not
32
+
33
+ [//]: # (ob:29b54f6f)
34
+ enumerate untouched blocks.
35
+
36
+ [//]: # (ob:4623b792)
37
+ 4. Snapshot the accepted version with `--why`, claims, and explicit actors:
38
+
39
+ [//]: # (ob:c89d4269)
40
+ ```sh
41
+ python3 proofpress.py snapshot <file> --kind agent --author claude \
42
+ --produced-by claude --recorded-by claude \
43
+ --attribution-basis harness_attested --note "<changelog>" \
44
+ --claims <claims.json> --why "<actual reason>" \
45
+ --rejected "<consequential dead branch — reason>"
46
+ ```
47
+
48
+ [//]: # (ob:3b3f299e)
49
+ Omit `--rejected` unless the dead branch matters to future collaborators.
50
+ Never infer it from casual discussion or include raw prompts/transcripts.
51
+
52
+ [//]: # (ob:64c98298)
53
+ 5. Run `verify <file>` and report its output verbatim. Never re-snapshot merely
54
+
55
+ [//]: # (ob:0928adea)
56
+ to force green.
57
+
58
+ [//]: # (ob:e96a23df)
59
+ For incoming portable files, run `inspect` and then `import`. Fallback `capture`
60
+ records only `recorded_by`; it cannot know authorship or reasoning. Never
61
+ snapshot source-code files.
62
+
63
+ [//]: # (proofpress:meta:eyJhcnRpZmFjdF9pZCI6InBwXzhmOWYxNjA4MjZlMzM2YTQ2ZWI2MmJkNCIsInBvbGljeSI6ImxvY2FsIiwicHJvb2ZwcmVzcyI6MX0)
@@ -0,0 +1,58 @@
1
+ [//]: # (ob:c350cb3a)
2
+ <!-- Append to AGENTS.md — the Proofpress contract for Codex agents. -->
3
+
4
+ [//]: # (ob:51ac24b5)
5
+ ## Proofpress: ledger Markdown and static HTML knowledge artifacts
6
+
7
+ [//]: # (ob:10265f5d)
8
+ For accepted, meaningful revisions to Markdown or static HTML knowledge
9
+ artifacts—never source code—close this loop. Do not snapshot every
10
+ conversational turn.
11
+
12
+ [//]: # (ob:d181cc6e)
13
+ 1. Read `python3 proofpress.py policy <file>`. If the user asks for portability,
14
+
15
+ [//]: # (ob:6c0f813b)
16
+ run `policy <file> portable` once; it remains sticky. Use `ingest <file>` for
17
+ Git history not yet represented in the ledger.
18
+
19
+ [//]: # (ob:0ba00342)
20
+ 2. Preserve carrier-native block anchors while editing: Markdown uses invisible
21
+
22
+ [//]: # (ob:0b96e11b)
23
+ `ob` markers; static HTML uses `data-proofpress-id`. Then run `anchor <file>`
24
+ and inspect inherited/new/gone IDs.
25
+
26
+ [//]: # (ob:55bb7174)
27
+ 3. Write claims JSON with one honest item per touched or removed block. Do not
28
+
29
+ [//]: # (ob:3b3c1156)
30
+ enumerate untouched blocks.
31
+
32
+ [//]: # (ob:311b1408)
33
+ 4. Snapshot with `--why`, claims, and explicit actors:
34
+
35
+ [//]: # (ob:08f435e4)
36
+ ```sh
37
+ python3 proofpress.py snapshot <file> --kind agent --author codex \
38
+ --produced-by codex --recorded-by codex \
39
+ --attribution-basis harness_attested --note "<changelog>" \
40
+ --claims <claims.json> --why "<actual reason>" \
41
+ --rejected "<consequential dead branch — reason>"
42
+ ```
43
+
44
+ [//]: # (ob:b521eb3e)
45
+ Omit `--rejected` unless the dead branch matters later. Never infer it from
46
+ casual discussion or capture raw prompts/transcripts.
47
+
48
+ [//]: # (ob:cd72eb83)
49
+ 5. Run `verify <file>` and report its output verbatim. Never re-snapshot just to
50
+
51
+ [//]: # (ob:358e67a9)
52
+ force green.
53
+
54
+ [//]: # (ob:bc88257e)
55
+ For incoming portable files, run `inspect` and then `import`. Fallback `capture`
56
+ records only `recorded_by`; it cannot know authorship or reasoning.
57
+
58
+ [//]: # (proofpress:meta:eyJhcnRpZmFjdF9pZCI6InBwXzcwM2MzZmE5MjZhYmI1MTJlNzE5OTMzMiIsInBvbGljeSI6ImxvY2FsIiwicHJvb2ZwcmVzcyI6MX0)
@@ -0,0 +1,10 @@
1
+ # Merge into ~/.codex/config.toml (Codex hooks GA since v0.124).
2
+ # Best-effort fallback: capture changed, staged, and untracked Markdown and static HTML files.
3
+ # The hook identifies itself only as recorded_by; it does not pretend to know
4
+ # who wrote the content or why.
5
+
6
+ [[hooks]]
7
+ event = "Stop"
8
+ command = """
9
+ sh -c 'test -f proofpress.py || exit 0; python3 proofpress.py capture --recorder codex-hook; exit 0'
10
+ """
@@ -0,0 +1,66 @@
1
+ ---
2
+ name: proofpress
3
+ description: Preserve decision history for Markdown and static HTML knowledge artifacts with Proofpress. Use when creating or accepting a meaningful revision to an ADR, design doc, PRD, README, strategy note, portable .md artifact, or static .html/.htm artifact in a repository containing proofpress.py; never use for source-code files.
4
+ ---
5
+
6
+ [//]: # (ob:233b766d)
7
+ # Proofpress
8
+
9
+ [//]: # (ob:b2ec6ff5)
10
+ Record accepted Markdown or static HTML artifact versions with structured
11
+ testimony and verification. Do not snapshot every conversational turn.
12
+
13
+ [//]: # (ob:e14e12ad)
14
+ ## Workflow
15
+
16
+ [//]: # (ob:42fd42e7)
17
+ 1. Read `python3 proofpress.py policy <file>`. If the user asks for a portable
18
+
19
+ [//]: # (ob:ffa6ae00)
20
+ artifact, run `python3 proofpress.py policy <file> portable` once; portability
21
+ remains sticky. If Git history exists without a ledger, run `ingest <file>`.
22
+
23
+ [//]: # (ob:6d23ae8f)
24
+ 2. Preserve carrier-native anchors during editing: Markdown uses
25
+
26
+ [//]: # (ob:35ce54f2)
27
+ `[//]: # (ob:xxxxxxxx)`; static HTML uses `data-proofpress-id`. Remove an
28
+ anchor with its deleted block and invent none for new blocks.
29
+
30
+ [//]: # (ob:f119601b)
31
+ 3. Run `anchor <file>` and read the inherited/new/gone inventory.
32
+ 4. Write claims JSON with one honest entry per touched or removed block. Kinds
33
+
34
+ [//]: # (ob:6b88d004)
35
+ are `added`, `removed`, `modified`, `moved`, and `unchanged`. Do not enumerate
36
+ untouched blocks.
37
+
38
+ [//]: # (ob:f381d919)
39
+ 5. Snapshot only after a meaningful version is accepted:
40
+
41
+ [//]: # (ob:f42cb113)
42
+ ```sh
43
+ python3 proofpress.py snapshot <file> --kind agent --author cursor \
44
+ --produced-by cursor --recorded-by cursor \
45
+ --attribution-basis harness_attested \
46
+ --session "<session-id>" --note "<changelog>" --claims <claims.json> \
47
+ --why "<actual reason>" --rejected "<consequential dead branch — reason>"
48
+ ```
49
+
50
+ [//]: # (ob:790c5dda)
51
+ `--why` is required. Omit `--rejected` unless the rejected path is important
52
+ enough to keep future collaborators from repeating it. Never infer it from
53
+ casual discussion or include raw prompts/transcripts.
54
+
55
+ [//]: # (ob:e3c56875)
56
+ 6. Run `verify <file>` and report its output verbatim. Never re-snapshot merely
57
+
58
+ [//]: # (ob:6ad53003)
59
+ to turn a mismatch green.
60
+
61
+ [//]: # (ob:355446e0)
62
+ For an incoming portable file, run `inspect` before trusting it and `import` to
63
+ restore its history locally. Fallback `capture` supplies only `recorded_by`; it
64
+ cannot know who authored the content or why. Never snapshot source-code files.
65
+
66
+ [//]: # (proofpress:meta:eyJhcnRpZmFjdF9pZCI6InBwXzBjOWVkZjdkMzE1YWIwM2UwY2EwNmM4OCIsInBvbGljeSI6ImxvY2FsIiwicHJvb2ZwcmVzcyI6MX0)
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Proofpress"
3
+ short_description: "Ledger Markdown and static HTML artifact changes with verified claims"
4
+ default_prompt: "Close the Proofpress ledger loop for the supported knowledge artifacts changed in this task."
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Proofpress deterministic layer for Pi — UNTESTED SKELETON.
3
+ *
4
+ * Pi extensions are in-process TypeScript subscribing to AgentSession
5
+ * lifecycle events (25+ hooks; see pi's extension docs — the API surface
6
+ * moves fast, verify event names against your installed version).
7
+ *
8
+ * Intent: on session end, run best-effort capture across changed, staged, and
9
+ * untracked Markdown and static HTML. The hook records only recorded_by, never an inferred
10
+ * author or reason. Content-addressed duplicate runs are no-ops.
11
+ */
12
+ import { execFileSync } from "node:child_process";
13
+
14
+ export default function proofpress(session: any) {
15
+ session.on("session_end", () => {
16
+ try {
17
+ execFileSync("test", ["-f", "proofpress.py"]);
18
+ execFileSync("python3", [
19
+ "proofpress.py", "capture", "--recorder", "pi-hook",
20
+ ], { stdio: "inherit" });
21
+ } catch { /* no proofpress.py here, or nothing changed — fine */ }
22
+ });
23
+ }
@@ -0,0 +1,55 @@
1
+ [//]: # (ob:5cd87791)
2
+ # proofpress
3
+
4
+ [//]: # (ob:095b959e)
5
+ For accepted, meaningful revisions to Markdown or static HTML knowledge
6
+ artifacts—never source code—close this loop. Do not snapshot every
7
+ conversational turn.
8
+
9
+ [//]: # (ob:87ce54bb)
10
+ 1. Read `python3 proofpress.py policy <file>`. If the user asks for portability,
11
+
12
+ [//]: # (ob:72f291a2)
13
+ run `policy <file> portable` once; it remains sticky. Use `ingest <file>` for
14
+ Git history not yet represented in the ledger.
15
+
16
+ [//]: # (ob:85972ea6)
17
+ 2. Preserve carrier-native block anchors while editing: Markdown uses invisible
18
+
19
+ [//]: # (ob:b9f8ef49)
20
+ `ob` markers; static HTML uses `data-proofpress-id`. Then run `anchor <file>`
21
+ and inspect inherited/new/gone IDs.
22
+
23
+ [//]: # (ob:6f0d23b1)
24
+ 3. Write claims JSON with one honest item per touched or removed block. Do not
25
+
26
+ [//]: # (ob:28f53262)
27
+ enumerate untouched blocks.
28
+
29
+ [//]: # (ob:abd7c833)
30
+ 4. Snapshot with `--why`, claims, and explicit actors:
31
+
32
+ [//]: # (ob:2c10e48d)
33
+ ```sh
34
+ python3 proofpress.py snapshot <file> --kind agent --author pi \
35
+ --produced-by pi --recorded-by pi \
36
+ --attribution-basis harness_attested --note "<changelog>" \
37
+ --claims <claims.json> --why "<actual reason>" \
38
+ --rejected "<consequential dead branch — reason>"
39
+ ```
40
+
41
+ [//]: # (ob:4386e1e7)
42
+ Omit `--rejected` unless the dead branch matters later. Never infer it from
43
+ casual discussion or capture raw prompts/transcripts.
44
+
45
+ [//]: # (ob:dd7291a6)
46
+ 5. Run `verify <file>` and report its output verbatim. Never re-snapshot just to
47
+
48
+ [//]: # (ob:8ac28d76)
49
+ force green.
50
+
51
+ [//]: # (ob:2f7730eb)
52
+ For incoming portable files, run `inspect` and then `import`. Fallback `capture`
53
+ records only `recorded_by`; it cannot know authorship or reasoning.
54
+
55
+ [//]: # (proofpress:meta:eyJhcnRpZmFjdF9pZCI6InBwX2M3Y2UwZDE1Yjg2YmI0MmJkMjg0MzRmYyIsInBvbGljeSI6ImxvY2FsIiwicHJvb2ZwcmVzcyI6MX0)
package/.npmrc-tmp DELETED
@@ -1 +0,0 @@
1
- //registry.npmjs.org/:_authToken=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
package/index.js DELETED
@@ -1 +0,0 @@
1
- module.exports = { name: "proofpress", status: "placeholder" };