methodproof 0.2.1__tar.gz → 0.3.1__tar.gz

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.
Files changed (48) hide show
  1. {methodproof-0.2.1 → methodproof-0.3.1}/CHANGELOG.md +5 -0
  2. methodproof-0.3.1/PKG-INFO +222 -0
  3. methodproof-0.3.1/README.md +206 -0
  4. {methodproof-0.2.1 → methodproof-0.3.1}/methodproof/agents/base.py +2 -0
  5. methodproof-0.3.1/methodproof/analysis.py +748 -0
  6. {methodproof-0.2.1 → methodproof-0.3.1}/methodproof/cli.py +45 -5
  7. {methodproof-0.2.1 → methodproof-0.3.1}/methodproof/config.py +6 -2
  8. {methodproof-0.2.1 → methodproof-0.3.1}/methodproof/graph.py +17 -0
  9. {methodproof-0.2.1 → methodproof-0.3.1}/methodproof/hooks/claude_code.py +6 -0
  10. {methodproof-0.2.1 → methodproof-0.3.1}/methodproof/hooks/claude_code.sh +5 -0
  11. {methodproof-0.2.1 → methodproof-0.3.1}/methodproof/sync.py +32 -5
  12. {methodproof-0.2.1 → methodproof-0.3.1}/pyproject.toml +1 -1
  13. methodproof-0.3.1/tests/test_analysis.py +491 -0
  14. methodproof-0.2.1/PKG-INFO +0 -177
  15. methodproof-0.2.1/README.md +0 -161
  16. {methodproof-0.2.1 → methodproof-0.3.1}/.github/workflows/ci.yml +0 -0
  17. {methodproof-0.2.1 → methodproof-0.3.1}/.gitignore +0 -0
  18. {methodproof-0.2.1 → methodproof-0.3.1}/LICENSE +0 -0
  19. {methodproof-0.2.1 → methodproof-0.3.1}/methodproof/__init__.py +0 -0
  20. {methodproof-0.2.1 → methodproof-0.3.1}/methodproof/__main__.py +0 -0
  21. {methodproof-0.2.1 → methodproof-0.3.1}/methodproof/agents/__init__.py +0 -0
  22. {methodproof-0.2.1 → methodproof-0.3.1}/methodproof/agents/music.py +0 -0
  23. {methodproof-0.2.1 → methodproof-0.3.1}/methodproof/agents/terminal.py +0 -0
  24. {methodproof-0.2.1 → methodproof-0.3.1}/methodproof/agents/watcher.py +0 -0
  25. {methodproof-0.2.1 → methodproof-0.3.1}/methodproof/bridge.py +0 -0
  26. {methodproof-0.2.1 → methodproof-0.3.1}/methodproof/crypto.py +0 -0
  27. {methodproof-0.2.1 → methodproof-0.3.1}/methodproof/hook.py +0 -0
  28. {methodproof-0.2.1 → methodproof-0.3.1}/methodproof/hooks/__init__.py +0 -0
  29. {methodproof-0.2.1 → methodproof-0.3.1}/methodproof/hooks/install.py +0 -0
  30. {methodproof-0.2.1 → methodproof-0.3.1}/methodproof/hooks/openclaw/HOOK.md +0 -0
  31. {methodproof-0.2.1 → methodproof-0.3.1}/methodproof/hooks/openclaw/handler.ts +0 -0
  32. {methodproof-0.2.1 → methodproof-0.3.1}/methodproof/hooks/openclaw_install.py +0 -0
  33. {methodproof-0.2.1 → methodproof-0.3.1}/methodproof/hooks/wrappers.py +0 -0
  34. {methodproof-0.2.1 → methodproof-0.3.1}/methodproof/integrity.py +0 -0
  35. {methodproof-0.2.1 → methodproof-0.3.1}/methodproof/live.py +0 -0
  36. {methodproof-0.2.1 → methodproof-0.3.1}/methodproof/mcp.py +0 -0
  37. {methodproof-0.2.1 → methodproof-0.3.1}/methodproof/repos.py +0 -0
  38. {methodproof-0.2.1 → methodproof-0.3.1}/methodproof/skills/methodproof/SKILL.md +0 -0
  39. {methodproof-0.2.1 → methodproof-0.3.1}/methodproof/store.py +0 -0
  40. {methodproof-0.2.1 → methodproof-0.3.1}/methodproof/viewer.py +0 -0
  41. {methodproof-0.2.1 → methodproof-0.3.1}/test_windows_compat.py +0 -0
  42. {methodproof-0.2.1 → methodproof-0.3.1}/tests/__init__.py +0 -0
  43. {methodproof-0.2.1 → methodproof-0.3.1}/tests/test_graph.py +0 -0
  44. {methodproof-0.2.1 → methodproof-0.3.1}/tests/test_hooks.py +0 -0
  45. {methodproof-0.2.1 → methodproof-0.3.1}/tests/test_openclaw_hooks.py +0 -0
  46. {methodproof-0.2.1 → methodproof-0.3.1}/tests/test_store.py +0 -0
  47. {methodproof-0.2.1 → methodproof-0.3.1}/tests/test_wrappers.py +0 -0
  48. {methodproof-0.2.1 → methodproof-0.3.1}/uv.lock +0 -0
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026-04-04
4
+
5
+ ### Changed
6
+ - **README rebrand** — OG dark banner, hero process graph illustration, brand-colored badges (gold/purple/green). Value prop and features up front. Consent, integrity, and encryption details in collapsible `<details>` blocks. Added `review` and `update` to command reference.
7
+
3
8
  ## 2026-04-02
4
9
 
5
10
  ### Added
@@ -0,0 +1,222 @@
1
+ Metadata-Version: 2.4
2
+ Name: methodproof
3
+ Version: 0.3.1
4
+ Summary: See how you code. Capture and visualize your engineering process.
5
+ License-Expression: Apache-2.0
6
+ License-File: LICENSE
7
+ Requires-Python: >=3.11
8
+ Requires-Dist: watchdog>=4.0
9
+ Provides-Extra: e2e
10
+ Requires-Dist: cryptography>=43.0; extra == 'e2e'
11
+ Provides-Extra: live
12
+ Requires-Dist: websocket-client>=1.7; extra == 'live'
13
+ Provides-Extra: signing
14
+ Requires-Dist: cryptography>=43.0; extra == 'signing'
15
+ Description-Content-Type: text/markdown
16
+
17
+ <p align="center">
18
+ <img src="https://cdn.methodproof.com/og/og-primary-dark.png" alt="MethodProof — Engineering Process Intelligence" width="720" />
19
+ </p>
20
+
21
+ <p align="center">
22
+ <a href="https://pypi.org/project/methodproof/"><img src="https://img.shields.io/pypi/v/methodproof?color=%23c9a84c&style=flat-square" alt="PyPI"></a>
23
+ <a href="https://pypi.org/project/methodproof/"><img src="https://img.shields.io/pypi/pyversions/methodproof?color=%23803794&style=flat-square" alt="Python"></a>
24
+ <a href="https://github.com/MethodProof/methodproof-cli/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-%232d7a42?style=flat-square" alt="License"></a>
25
+ </p>
26
+
27
+ # MethodProof
28
+
29
+ **Your engineering process, visualized as a knowledge graph.**
30
+
31
+ MethodProof captures how you work — terminal commands, file edits, git commits, AI interactions — and renders it as an interactive process graph you can explore, share, and prove.
32
+
33
+ No account required. Fully offline. Your data stays on your machine unless you explicitly push it.
34
+
35
+ <p align="center">
36
+ <img src="https://cdn.methodproof.com/illustrations/hero-light.png" alt="Process graph — every action connected as a timeline" width="720" />
37
+ </p>
38
+
39
+ ## Install
40
+
41
+ ```bash
42
+ pip install methodproof
43
+ ```
44
+
45
+ ## Quick Start
46
+
47
+ ```bash
48
+ methodproof init # choose what to capture, install hooks
49
+ methodproof start # begin recording
50
+ # ... code normally ...
51
+ methodproof stop # stop recording, build process graph
52
+ methodproof view # explore your session in the browser
53
+ ```
54
+
55
+ `methodproof view` opens a D3-powered interactive graph: every action is a node, every relationship is an edge. You see exactly how your session unfolded — which commands led to which edits, when you consulted AI, where you hit dead ends and recovered.
56
+
57
+ ## Features
58
+
59
+ - **Process graph** — D3 interactive visualization of your entire session as a knowledge graph
60
+ - **Prompt analysis** — 35 structural metadata dimensions extracted from every AI prompt (intent, cognitive level, specificity, context dependency) — no content stored
61
+ - **Environment profiling** — structural analysis of your AI dev environment (instruction files, tool counts, MCP servers) captured at session start
62
+ - **Outcome metrics** — first-shot apply rate, follow-up sequences, phase transitions computed at session end
63
+ - **Granular consent** — 10 standard capture categories + 1 premium, each independently toggled. Nothing records without your opt-in
64
+ - **Local-first** — SQLite database at `~/.methodproof/`, `chmod 600`. No network calls unless you choose
65
+ - **Live streaming** — `methodproof start --live` streams events to the platform in real-time over WebSocket
66
+ - **Integrity verification** — hash-chained events + Ed25519 attestation prove sessions haven't been tampered with
67
+ - **E2E encryption** — optional company-held AES-256-GCM encryption the platform cannot decrypt
68
+ - **Auto-detection** — hooks for shell, Claude Code, OpenClaw, codex, gemini, aider installed automatically
69
+ - **Platform sync** — `methodproof push` uploads sessions. `methodproof publish` makes them public and shareable
70
+
71
+ ## Commands
72
+
73
+ | Command | What it does |
74
+ |---------|-------------|
75
+ | `init` | Interactive consent selector, install hooks, create data directory |
76
+ | `start [--dir .] [--tags t1,t2] [--public] [--live]` | Start recording |
77
+ | `stop` | Stop recording, build process graph |
78
+ | `view [session_id]` | Open session graph in browser |
79
+ | `log` | List sessions with sync status, visibility, tags |
80
+ | `login` | Authenticate with the platform |
81
+ | `push [session_id]` | Upload session |
82
+ | `publish [session_id]` | Set public + push |
83
+ | `tag <session_id> <tags>` | Add tags |
84
+ | `delete <session_id> [-f]` | Delete session and all its data |
85
+ | `consent` | Change capture categories |
86
+ | `review` | Inspect session data before pushing |
87
+ | `update` | Check for and install CLI updates |
88
+
89
+ ## Privacy & Consent
90
+
91
+ <details>
92
+ <summary>How consent works</summary>
93
+
94
+ On first `init`, you choose exactly which categories to capture:
95
+
96
+ ```
97
+ MethodProof — Full Spectrum
98
+
99
+ All data stays local in ~/.methodproof/. Nothing leaves your
100
+ machine unless you explicitly run `mp push` or `mp publish`.
101
+
102
+ [x] 1. terminal_commands Commands you run and their exit codes
103
+ [x] 2. command_output First 500 chars of command output (secrets auto filtered)
104
+ [x] 3. test_results Pass/fail counts from pytest, jest, go test, cargo test
105
+ [x] 4. file_changes File create, edit, and delete events with paths and line counts
106
+ [x] 5. git_commits Commit hashes, messages, and changed file lists
107
+ [x] 6. ai_prompts Your interactions with AI agents: prompts, slash commands,
108
+ mode switches, and tool management. Captured as graph nodes
109
+ [x] 7. ai_responses AI agent responses, tool calls, and results
110
+ [x] 8. browser Page visits, tab switches, searches, copy events (via extension)
111
+ [x] 9. music Now Playing track and artist (Spotify, Apple Music, etc.)
112
+ [x] 10. environment_analysis Structural profile of your AI dev environment: instruction file
113
+ sizes, tool counts, config fingerprints (no file content stored)
114
+
115
+ [ ] 0. code_capture Full file diffs and git patches (Pro only, encrypted, private)
116
+
117
+ Toggle: enter number (0 for code capture) | a = all 10 on | n = all off | done = confirm
118
+ ```
119
+
120
+ Categories are enforced at three levels:
121
+ - **Agent level** — disabled agents don't start
122
+ - **Event level** — events from disabled categories are dropped
123
+ - **Field level** — specific fields stripped from events that are otherwise captured
124
+
125
+ Change anytime with `methodproof consent`. Inspect data before pushing with `methodproof review`.
126
+
127
+ </details>
128
+
129
+ <details>
130
+ <summary>Capture categories reference</summary>
131
+
132
+ | Category | Events | Details |
133
+ |----------|--------|---------|
134
+ | `terminal_commands` | `terminal_cmd` | Command text, exit code, duration. Sensitive commands auto-filtered |
135
+ | `command_output` | field in `terminal_cmd` | First 500 chars of stdout. Redacted for sensitive patterns |
136
+ | `test_results` | `test_run` | Framework name, pass/fail counts, duration |
137
+ | `file_changes` | `file_create`, `file_edit`, `file_delete` | File paths, language, line counts |
138
+ | `git_commits` | `git_commit` | Short hash, commit message, changed file list |
139
+ | `ai_prompts` | `user_prompt`, `llm_prompt`, `agent_prompt` | Prompt metadata + 35 structural analysis fields (intent, cognitive level, specificity, etc.) |
140
+ | `ai_responses` | `llm_completion`, `agent_completion`, tool events | Response metadata, tool calls, latency |
141
+ | `browser` | browser events | Metadata only — no page content, no search text, no copied text |
142
+ | `music` | `music_playing` | Track, artist, source, player |
143
+ | `environment_analysis` | `environment_profile` | Instruction file sizes/sections/fingerprints, hook/plugin/MCP counts |
144
+ | `code_capture` | field in `file_edit`, `git_commit` | Full diffs (Pro only, AES-256-GCM encrypted, private by default) |
145
+
146
+ </details>
147
+
148
+ <details>
149
+ <summary>Prompt analysis — what gets extracted</summary>
150
+
151
+ Every AI prompt is structurally analyzed at capture time. The full prompt text is read to extract metadata, then discarded — no content is stored. Fields include:
152
+
153
+ | Dimension | Fields | Examples |
154
+ |-----------|--------|---------|
155
+ | **Intent** | `sa_intent` | `instruction`, `strategic_question`, `bug_report`, `correction`, `selection`, `verification` |
156
+ | **Cognitive level** | `sa_cognitive_level` | `information`, `analysis`, `synthesis`, `evaluation`, `execution`, `decision` |
157
+ | **Specificity** | `sa_specificity_score`, `sa_named_files`, `sa_named_functions`, `sa_named_technologies` | 0.0 (vague) to 1.0 (precise) |
158
+ | **Context dependency** | `sa_context_dependency`, `sa_pronoun_count`, `sa_is_follow_up` | `total` (e.g. "Option B"), `low` (self-contained) |
159
+ | **Collaboration mode** | `sa_collaboration_mode` | `delegating`, `thinking_together`, `reviewing`, `selecting`, `correcting` |
160
+ | **Structure** | `sa_has_code_blocks`, `sa_has_error_trace`, `sa_has_constraints`, `sa_is_compound` | Booleans and counts |
161
+
162
+ At session end, outcome metrics are computed: first-shot apply rate, follow-up sequences, phase transitions, and correction counts.
163
+
164
+ </details>
165
+
166
+ ## Integrity & Encryption
167
+
168
+ <details>
169
+ <summary>Integrity verification</summary>
170
+
171
+ Three layers ensure session data hasn't been tampered with:
172
+
173
+ **Hash-chained events** — every event includes a SHA-256 hash linking to the previous event. Any modification breaks the chain, detectable via `GET /sessions/{id}/chain/verify`.
174
+
175
+ **Ed25519 attestation** — on `methodproof push`, the CLI signs a session summary with your private key. Install with `pip install methodproof[signing]`. Key generated during `methodproof init`, stored in `~/.methodproof/config.json`.
176
+
177
+ **Binary hash self-reporting** — the CLI reports its own binary hash on push. The platform compares against known release hashes to detect modified builds.
178
+
179
+ </details>
180
+
181
+ <details>
182
+ <summary>E2E encryption</summary>
183
+
184
+ For company-managed encryption where the platform cannot read your data:
185
+
186
+ ```bash
187
+ pip install methodproof[e2e]
188
+ ```
189
+
190
+ Set your company's key in `~/.methodproof/config.json`:
191
+
192
+ ```json
193
+ { "e2e_key": "<64-char-hex-key>" }
194
+ ```
195
+
196
+ All sensitive metadata (prompts, completions, commands, output, diffs) is encrypted with AES-256-GCM before storage and before any platform sync.
197
+
198
+ </details>
199
+
200
+ ## Integrations
201
+
202
+ `methodproof init` auto-detects and installs hooks for:
203
+
204
+ - **Shell** — bash/zsh preexec/precmd hooks
205
+ - **Claude Code** — prompt, tool, agent, and session event hooks (structural analysis on prompts)
206
+ - **OpenClaw** — hook + skill for agent telemetry
207
+ - **AI CLIs** — codex, gemini, aider command wrappers
208
+ - **MCP server** — registered with Claude Code for session/graph queries
209
+
210
+ ## Data Directory
211
+
212
+ `~/.methodproof/`
213
+
214
+ | File | Purpose |
215
+ |------|---------|
216
+ | `config.json` | API URL, auth token, consent settings, E2E key (chmod 600) |
217
+ | `methodproof.db` | Sessions, events, graph (chmod 600) |
218
+ | `commands.jsonl` | Shell command log |
219
+
220
+ ## License
221
+
222
+ [Apache 2.0](LICENSE)
@@ -0,0 +1,206 @@
1
+ <p align="center">
2
+ <img src="https://cdn.methodproof.com/og/og-primary-dark.png" alt="MethodProof — Engineering Process Intelligence" width="720" />
3
+ </p>
4
+
5
+ <p align="center">
6
+ <a href="https://pypi.org/project/methodproof/"><img src="https://img.shields.io/pypi/v/methodproof?color=%23c9a84c&style=flat-square" alt="PyPI"></a>
7
+ <a href="https://pypi.org/project/methodproof/"><img src="https://img.shields.io/pypi/pyversions/methodproof?color=%23803794&style=flat-square" alt="Python"></a>
8
+ <a href="https://github.com/MethodProof/methodproof-cli/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-%232d7a42?style=flat-square" alt="License"></a>
9
+ </p>
10
+
11
+ # MethodProof
12
+
13
+ **Your engineering process, visualized as a knowledge graph.**
14
+
15
+ MethodProof captures how you work — terminal commands, file edits, git commits, AI interactions — and renders it as an interactive process graph you can explore, share, and prove.
16
+
17
+ No account required. Fully offline. Your data stays on your machine unless you explicitly push it.
18
+
19
+ <p align="center">
20
+ <img src="https://cdn.methodproof.com/illustrations/hero-light.png" alt="Process graph — every action connected as a timeline" width="720" />
21
+ </p>
22
+
23
+ ## Install
24
+
25
+ ```bash
26
+ pip install methodproof
27
+ ```
28
+
29
+ ## Quick Start
30
+
31
+ ```bash
32
+ methodproof init # choose what to capture, install hooks
33
+ methodproof start # begin recording
34
+ # ... code normally ...
35
+ methodproof stop # stop recording, build process graph
36
+ methodproof view # explore your session in the browser
37
+ ```
38
+
39
+ `methodproof view` opens a D3-powered interactive graph: every action is a node, every relationship is an edge. You see exactly how your session unfolded — which commands led to which edits, when you consulted AI, where you hit dead ends and recovered.
40
+
41
+ ## Features
42
+
43
+ - **Process graph** — D3 interactive visualization of your entire session as a knowledge graph
44
+ - **Prompt analysis** — 35 structural metadata dimensions extracted from every AI prompt (intent, cognitive level, specificity, context dependency) — no content stored
45
+ - **Environment profiling** — structural analysis of your AI dev environment (instruction files, tool counts, MCP servers) captured at session start
46
+ - **Outcome metrics** — first-shot apply rate, follow-up sequences, phase transitions computed at session end
47
+ - **Granular consent** — 10 standard capture categories + 1 premium, each independently toggled. Nothing records without your opt-in
48
+ - **Local-first** — SQLite database at `~/.methodproof/`, `chmod 600`. No network calls unless you choose
49
+ - **Live streaming** — `methodproof start --live` streams events to the platform in real-time over WebSocket
50
+ - **Integrity verification** — hash-chained events + Ed25519 attestation prove sessions haven't been tampered with
51
+ - **E2E encryption** — optional company-held AES-256-GCM encryption the platform cannot decrypt
52
+ - **Auto-detection** — hooks for shell, Claude Code, OpenClaw, codex, gemini, aider installed automatically
53
+ - **Platform sync** — `methodproof push` uploads sessions. `methodproof publish` makes them public and shareable
54
+
55
+ ## Commands
56
+
57
+ | Command | What it does |
58
+ |---------|-------------|
59
+ | `init` | Interactive consent selector, install hooks, create data directory |
60
+ | `start [--dir .] [--tags t1,t2] [--public] [--live]` | Start recording |
61
+ | `stop` | Stop recording, build process graph |
62
+ | `view [session_id]` | Open session graph in browser |
63
+ | `log` | List sessions with sync status, visibility, tags |
64
+ | `login` | Authenticate with the platform |
65
+ | `push [session_id]` | Upload session |
66
+ | `publish [session_id]` | Set public + push |
67
+ | `tag <session_id> <tags>` | Add tags |
68
+ | `delete <session_id> [-f]` | Delete session and all its data |
69
+ | `consent` | Change capture categories |
70
+ | `review` | Inspect session data before pushing |
71
+ | `update` | Check for and install CLI updates |
72
+
73
+ ## Privacy & Consent
74
+
75
+ <details>
76
+ <summary>How consent works</summary>
77
+
78
+ On first `init`, you choose exactly which categories to capture:
79
+
80
+ ```
81
+ MethodProof — Full Spectrum
82
+
83
+ All data stays local in ~/.methodproof/. Nothing leaves your
84
+ machine unless you explicitly run `mp push` or `mp publish`.
85
+
86
+ [x] 1. terminal_commands Commands you run and their exit codes
87
+ [x] 2. command_output First 500 chars of command output (secrets auto filtered)
88
+ [x] 3. test_results Pass/fail counts from pytest, jest, go test, cargo test
89
+ [x] 4. file_changes File create, edit, and delete events with paths and line counts
90
+ [x] 5. git_commits Commit hashes, messages, and changed file lists
91
+ [x] 6. ai_prompts Your interactions with AI agents: prompts, slash commands,
92
+ mode switches, and tool management. Captured as graph nodes
93
+ [x] 7. ai_responses AI agent responses, tool calls, and results
94
+ [x] 8. browser Page visits, tab switches, searches, copy events (via extension)
95
+ [x] 9. music Now Playing track and artist (Spotify, Apple Music, etc.)
96
+ [x] 10. environment_analysis Structural profile of your AI dev environment: instruction file
97
+ sizes, tool counts, config fingerprints (no file content stored)
98
+
99
+ [ ] 0. code_capture Full file diffs and git patches (Pro only, encrypted, private)
100
+
101
+ Toggle: enter number (0 for code capture) | a = all 10 on | n = all off | done = confirm
102
+ ```
103
+
104
+ Categories are enforced at three levels:
105
+ - **Agent level** — disabled agents don't start
106
+ - **Event level** — events from disabled categories are dropped
107
+ - **Field level** — specific fields stripped from events that are otherwise captured
108
+
109
+ Change anytime with `methodproof consent`. Inspect data before pushing with `methodproof review`.
110
+
111
+ </details>
112
+
113
+ <details>
114
+ <summary>Capture categories reference</summary>
115
+
116
+ | Category | Events | Details |
117
+ |----------|--------|---------|
118
+ | `terminal_commands` | `terminal_cmd` | Command text, exit code, duration. Sensitive commands auto-filtered |
119
+ | `command_output` | field in `terminal_cmd` | First 500 chars of stdout. Redacted for sensitive patterns |
120
+ | `test_results` | `test_run` | Framework name, pass/fail counts, duration |
121
+ | `file_changes` | `file_create`, `file_edit`, `file_delete` | File paths, language, line counts |
122
+ | `git_commits` | `git_commit` | Short hash, commit message, changed file list |
123
+ | `ai_prompts` | `user_prompt`, `llm_prompt`, `agent_prompt` | Prompt metadata + 35 structural analysis fields (intent, cognitive level, specificity, etc.) |
124
+ | `ai_responses` | `llm_completion`, `agent_completion`, tool events | Response metadata, tool calls, latency |
125
+ | `browser` | browser events | Metadata only — no page content, no search text, no copied text |
126
+ | `music` | `music_playing` | Track, artist, source, player |
127
+ | `environment_analysis` | `environment_profile` | Instruction file sizes/sections/fingerprints, hook/plugin/MCP counts |
128
+ | `code_capture` | field in `file_edit`, `git_commit` | Full diffs (Pro only, AES-256-GCM encrypted, private by default) |
129
+
130
+ </details>
131
+
132
+ <details>
133
+ <summary>Prompt analysis — what gets extracted</summary>
134
+
135
+ Every AI prompt is structurally analyzed at capture time. The full prompt text is read to extract metadata, then discarded — no content is stored. Fields include:
136
+
137
+ | Dimension | Fields | Examples |
138
+ |-----------|--------|---------|
139
+ | **Intent** | `sa_intent` | `instruction`, `strategic_question`, `bug_report`, `correction`, `selection`, `verification` |
140
+ | **Cognitive level** | `sa_cognitive_level` | `information`, `analysis`, `synthesis`, `evaluation`, `execution`, `decision` |
141
+ | **Specificity** | `sa_specificity_score`, `sa_named_files`, `sa_named_functions`, `sa_named_technologies` | 0.0 (vague) to 1.0 (precise) |
142
+ | **Context dependency** | `sa_context_dependency`, `sa_pronoun_count`, `sa_is_follow_up` | `total` (e.g. "Option B"), `low` (self-contained) |
143
+ | **Collaboration mode** | `sa_collaboration_mode` | `delegating`, `thinking_together`, `reviewing`, `selecting`, `correcting` |
144
+ | **Structure** | `sa_has_code_blocks`, `sa_has_error_trace`, `sa_has_constraints`, `sa_is_compound` | Booleans and counts |
145
+
146
+ At session end, outcome metrics are computed: first-shot apply rate, follow-up sequences, phase transitions, and correction counts.
147
+
148
+ </details>
149
+
150
+ ## Integrity & Encryption
151
+
152
+ <details>
153
+ <summary>Integrity verification</summary>
154
+
155
+ Three layers ensure session data hasn't been tampered with:
156
+
157
+ **Hash-chained events** — every event includes a SHA-256 hash linking to the previous event. Any modification breaks the chain, detectable via `GET /sessions/{id}/chain/verify`.
158
+
159
+ **Ed25519 attestation** — on `methodproof push`, the CLI signs a session summary with your private key. Install with `pip install methodproof[signing]`. Key generated during `methodproof init`, stored in `~/.methodproof/config.json`.
160
+
161
+ **Binary hash self-reporting** — the CLI reports its own binary hash on push. The platform compares against known release hashes to detect modified builds.
162
+
163
+ </details>
164
+
165
+ <details>
166
+ <summary>E2E encryption</summary>
167
+
168
+ For company-managed encryption where the platform cannot read your data:
169
+
170
+ ```bash
171
+ pip install methodproof[e2e]
172
+ ```
173
+
174
+ Set your company's key in `~/.methodproof/config.json`:
175
+
176
+ ```json
177
+ { "e2e_key": "<64-char-hex-key>" }
178
+ ```
179
+
180
+ All sensitive metadata (prompts, completions, commands, output, diffs) is encrypted with AES-256-GCM before storage and before any platform sync.
181
+
182
+ </details>
183
+
184
+ ## Integrations
185
+
186
+ `methodproof init` auto-detects and installs hooks for:
187
+
188
+ - **Shell** — bash/zsh preexec/precmd hooks
189
+ - **Claude Code** — prompt, tool, agent, and session event hooks (structural analysis on prompts)
190
+ - **OpenClaw** — hook + skill for agent telemetry
191
+ - **AI CLIs** — codex, gemini, aider command wrappers
192
+ - **MCP server** — registered with Claude Code for session/graph queries
193
+
194
+ ## Data Directory
195
+
196
+ `~/.methodproof/`
197
+
198
+ | File | Purpose |
199
+ |------|---------|
200
+ | `config.json` | API URL, auth token, consent settings, E2E key (chmod 600) |
201
+ | `methodproof.db` | Sessions, events, graph (chmod 600) |
202
+ | `commands.jsonl` | Shell command log |
203
+
204
+ ## License
205
+
206
+ [Apache 2.0](LICENSE)
@@ -45,6 +45,8 @@ _EVENT_GATES: dict[str, str] = {
45
45
  "browser_copy": "browser",
46
46
  "browser_ai_chat": "browser",
47
47
  "music_playing": "music",
48
+ "environment_profile": "environment_analysis",
49
+ "prompt_outcomes": "ai_prompts",
48
50
  }
49
51
 
50
52
  # Maps capture categories to (event_type, field) pairs for field-level gating.