@dzhechkov/skills-idea2prd 0.1.4 → 0.1.6
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.
- package/.dz-manifest.json +31 -7
- package/README.md +9 -0
- package/package.json +1 -1
- package/sbom.json +66 -6
- package/templates/.claude/skills/explore/SKILL.md +1 -1
- package/templates/.claude/skills/goap-research-ed25519/SKILL.md +144 -11
- package/templates/.claude/skills/goap-research-ed25519/scripts/check_report_evidence.py +363 -0
- package/templates/.claude/skills/goap-research-ed25519/scripts/ed25519_verifier.py +297 -4
- package/templates/.claude/skills/goap-research-ed25519/scripts/evidence_fetch.py +277 -0
- package/templates/.claude/skills/goap-research-ed25519/scripts/fixture_legacy_v1_fact.json +21 -0
- package/templates/.claude/skills/goap-research-ed25519/scripts/learning_bridge.py +502 -0
- package/templates/.claude/skills/goap-research-ed25519/scripts/source_tiers.py +170 -0
- package/templates/.claude/skills/goap-research-ed25519/scripts/test_evidence_provenance.py +830 -0
- package/templates/.claude/skills/problem-solver-enhanced/SKILL.md +1 -1
package/.dz-manifest.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"path": "README.md",
|
|
16
|
-
"sha256": "
|
|
16
|
+
"sha256": "646b19adeddf1d63c0f07eabef2f4dcce49d65a259563dfc6ab6b4248d262191"
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
"path": "bin/cli.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
"path": "package.json",
|
|
24
|
-
"sha256": "
|
|
24
|
+
"sha256": "ee0b0a6cd08b2d962cd3b734369870b434f33eeafe874a7f0f0dd1c10b68f85c"
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
"path": "sources.json",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
63
|
"path": "templates/.claude/skills/explore/SKILL.md",
|
|
64
|
-
"sha256": "
|
|
64
|
+
"sha256": "2473e7961845db0d64566cd42627b374d1830664b9e302058a1b1aa466bc7361"
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
67
|
"path": "templates/.claude/skills/explore/references/questioning-techniques.md",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
75
|
"path": "templates/.claude/skills/goap-research-ed25519/SKILL.md",
|
|
76
|
-
"sha256": "
|
|
76
|
+
"sha256": "95459a1566b2f88b6fb0c1d2f096f7631d698b95fa156afa26444a7c06e76451"
|
|
77
77
|
},
|
|
78
78
|
{
|
|
79
79
|
"path": "templates/.claude/skills/goap-research-ed25519/references/ed25519-verification.md",
|
|
@@ -87,18 +87,42 @@
|
|
|
87
87
|
"path": "templates/.claude/skills/goap-research-ed25519/references/source-evaluation.md",
|
|
88
88
|
"sha256": "d6a19abb6be64dc9e1f539903080029125d2d899da4de3063e75e1afb7e4906f"
|
|
89
89
|
},
|
|
90
|
+
{
|
|
91
|
+
"path": "templates/.claude/skills/goap-research-ed25519/scripts/check_report_evidence.py",
|
|
92
|
+
"sha256": "81dfdb14a868c7d0d72a640cfdf8ae3b2b5a453a17fcc1a3396587f3b488a919"
|
|
93
|
+
},
|
|
90
94
|
{
|
|
91
95
|
"path": "templates/.claude/skills/goap-research-ed25519/scripts/ed25519_verifier.py",
|
|
92
|
-
"sha256": "
|
|
96
|
+
"sha256": "9d0e74bab811a15b5032ec605e66a58081b52129aac873e7402e30b4dc4a2f10"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"path": "templates/.claude/skills/goap-research-ed25519/scripts/evidence_fetch.py",
|
|
100
|
+
"sha256": "5f4d7cb5d6fb3106d64130b6606582eb55a4f633ef969cf7890b1de1c179345b"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"path": "templates/.claude/skills/goap-research-ed25519/scripts/fixture_legacy_v1_fact.json",
|
|
104
|
+
"sha256": "e613de4737145cbfb5f349fbf9f1122801ce3508b62c3a18e2e0cba26b9da5b0"
|
|
93
105
|
},
|
|
94
106
|
{
|
|
95
107
|
"path": "templates/.claude/skills/goap-research-ed25519/scripts/goap_planner.py",
|
|
96
108
|
"sha256": "2ec359e1ddc52ca3118144532ed483dcc609e856a04b29bb191b875c60ff4260"
|
|
97
109
|
},
|
|
110
|
+
{
|
|
111
|
+
"path": "templates/.claude/skills/goap-research-ed25519/scripts/learning_bridge.py",
|
|
112
|
+
"sha256": "6980dd654d77e296f1ab20a9b7a7c43741fd4125ee44727183c63587421d5503"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"path": "templates/.claude/skills/goap-research-ed25519/scripts/source_tiers.py",
|
|
116
|
+
"sha256": "e1aae76fad01693ab35b51466fc4369c04a5ac64230fd307e7b798dc5beeff7a"
|
|
117
|
+
},
|
|
98
118
|
{
|
|
99
119
|
"path": "templates/.claude/skills/goap-research-ed25519/scripts/test_ed25519_verifier.py",
|
|
100
120
|
"sha256": "ea6d888ac53bac3a0fe236c101f90a984edbac044d787d73c8414f1c4fc540d3"
|
|
101
121
|
},
|
|
122
|
+
{
|
|
123
|
+
"path": "templates/.claude/skills/goap-research-ed25519/scripts/test_evidence_provenance.py",
|
|
124
|
+
"sha256": "6825da92d859a299b86bd9bf9910088a95665e0716346e55f0f117d991d25c9b"
|
|
125
|
+
},
|
|
102
126
|
{
|
|
103
127
|
"path": "templates/.claude/skills/idea2prd-manual/SKILL.md",
|
|
104
128
|
"sha256": "64780d15549e8c2c20a83fbb7afa6856cecbb6d7b940b72ea7d57dca83675786"
|
|
@@ -145,9 +169,9 @@
|
|
|
145
169
|
},
|
|
146
170
|
{
|
|
147
171
|
"path": "templates/.claude/skills/problem-solver-enhanced/SKILL.md",
|
|
148
|
-
"sha256": "
|
|
172
|
+
"sha256": "031378aa2e10c98928e35de07d454135e73550cd0c49f0cd886d53e4208d6b9f"
|
|
149
173
|
}
|
|
150
174
|
]
|
|
151
175
|
},
|
|
152
|
-
"signature": "
|
|
176
|
+
"signature": "UhTuxP7abRlbM11LsOmZlKlUfHTEjXUHLQ3d6OmAeJDWvn+AQiJ4k1pj5p2LIKshE3rsGQrckDPa/OQXH92sCw=="
|
|
153
177
|
}
|
package/README.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Idea2PRD Manual — composite skill for [Claude Code](https://claude.com/claude-code) that takes a **problem or an idea** all the way to **Vibe-Coding-ready documentation**, with a user checkpoint between every phase.
|
|
4
4
|
|
|
5
|
+
|
|
6
|
+
> **`goap-research-ed25519` — self-learning (optional, since this release).** When
|
|
7
|
+
> [`@dzhechkov/harness-cli`](https://www.npmjs.com/package/@dzhechkov/harness-cli) is on PATH, the
|
|
8
|
+
> bundled research skill recalls prior METHOD lessons at the start of an investigation and records new
|
|
9
|
+
> ones at four named moments. Without it the skill behaves exactly as before and says so once — it is
|
|
10
|
+
> detected, never required. A guard refuses to record anything shaped like personal data: a method
|
|
11
|
+
> lesson is written in lower case, carries no digits, and holds no identifier. See
|
|
12
|
+
> `skills/goap-research-ed25519/SKILL.md`.
|
|
13
|
+
|
|
5
14
|
## What It Does
|
|
6
15
|
|
|
7
16
|
Auto-detects the input (problem vs idea) and runs up to two pipelines with **9 checkpoints**:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dzhechkov/skills-idea2prd",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Idea2PRD Manual — composite skill for Claude Code: from problem/idea to Vibe-Coding-ready docs (PRD + ADR + DDD + C4 + Pseudocode + Test Scenarios + Completion) with 9 checkpoints",
|
|
5
5
|
"main": "src/cli.js",
|
|
6
6
|
"bin": {
|
package/sbom.json
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"hashes": [
|
|
36
36
|
{
|
|
37
37
|
"alg": "SHA-256",
|
|
38
|
-
"content": "
|
|
38
|
+
"content": "646b19adeddf1d63c0f07eabef2f4dcce49d65a259563dfc6ab6b4248d262191"
|
|
39
39
|
}
|
|
40
40
|
]
|
|
41
41
|
},
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"hashes": [
|
|
56
56
|
{
|
|
57
57
|
"alg": "SHA-256",
|
|
58
|
-
"content": "
|
|
58
|
+
"content": "ee0b0a6cd08b2d962cd3b734369870b434f33eeafe874a7f0f0dd1c10b68f85c"
|
|
59
59
|
}
|
|
60
60
|
]
|
|
61
61
|
},
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
"hashes": [
|
|
156
156
|
{
|
|
157
157
|
"alg": "SHA-256",
|
|
158
|
-
"content": "
|
|
158
|
+
"content": "2473e7961845db0d64566cd42627b374d1830664b9e302058a1b1aa466bc7361"
|
|
159
159
|
}
|
|
160
160
|
]
|
|
161
161
|
},
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
"hashes": [
|
|
186
186
|
{
|
|
187
187
|
"alg": "SHA-256",
|
|
188
|
-
"content": "
|
|
188
|
+
"content": "95459a1566b2f88b6fb0c1d2f096f7631d698b95fa156afa26444a7c06e76451"
|
|
189
189
|
}
|
|
190
190
|
]
|
|
191
191
|
},
|
|
@@ -219,13 +219,43 @@
|
|
|
219
219
|
}
|
|
220
220
|
]
|
|
221
221
|
},
|
|
222
|
+
{
|
|
223
|
+
"type": "file",
|
|
224
|
+
"name": "templates/.claude/skills/goap-research-ed25519/scripts/check_report_evidence.py",
|
|
225
|
+
"hashes": [
|
|
226
|
+
{
|
|
227
|
+
"alg": "SHA-256",
|
|
228
|
+
"content": "81dfdb14a868c7d0d72a640cfdf8ae3b2b5a453a17fcc1a3396587f3b488a919"
|
|
229
|
+
}
|
|
230
|
+
]
|
|
231
|
+
},
|
|
222
232
|
{
|
|
223
233
|
"type": "file",
|
|
224
234
|
"name": "templates/.claude/skills/goap-research-ed25519/scripts/ed25519_verifier.py",
|
|
225
235
|
"hashes": [
|
|
226
236
|
{
|
|
227
237
|
"alg": "SHA-256",
|
|
228
|
-
"content": "
|
|
238
|
+
"content": "9d0e74bab811a15b5032ec605e66a58081b52129aac873e7402e30b4dc4a2f10"
|
|
239
|
+
}
|
|
240
|
+
]
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"type": "file",
|
|
244
|
+
"name": "templates/.claude/skills/goap-research-ed25519/scripts/evidence_fetch.py",
|
|
245
|
+
"hashes": [
|
|
246
|
+
{
|
|
247
|
+
"alg": "SHA-256",
|
|
248
|
+
"content": "5f4d7cb5d6fb3106d64130b6606582eb55a4f633ef969cf7890b1de1c179345b"
|
|
249
|
+
}
|
|
250
|
+
]
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"type": "file",
|
|
254
|
+
"name": "templates/.claude/skills/goap-research-ed25519/scripts/fixture_legacy_v1_fact.json",
|
|
255
|
+
"hashes": [
|
|
256
|
+
{
|
|
257
|
+
"alg": "SHA-256",
|
|
258
|
+
"content": "e613de4737145cbfb5f349fbf9f1122801ce3508b62c3a18e2e0cba26b9da5b0"
|
|
229
259
|
}
|
|
230
260
|
]
|
|
231
261
|
},
|
|
@@ -239,6 +269,26 @@
|
|
|
239
269
|
}
|
|
240
270
|
]
|
|
241
271
|
},
|
|
272
|
+
{
|
|
273
|
+
"type": "file",
|
|
274
|
+
"name": "templates/.claude/skills/goap-research-ed25519/scripts/learning_bridge.py",
|
|
275
|
+
"hashes": [
|
|
276
|
+
{
|
|
277
|
+
"alg": "SHA-256",
|
|
278
|
+
"content": "6980dd654d77e296f1ab20a9b7a7c43741fd4125ee44727183c63587421d5503"
|
|
279
|
+
}
|
|
280
|
+
]
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"type": "file",
|
|
284
|
+
"name": "templates/.claude/skills/goap-research-ed25519/scripts/source_tiers.py",
|
|
285
|
+
"hashes": [
|
|
286
|
+
{
|
|
287
|
+
"alg": "SHA-256",
|
|
288
|
+
"content": "e1aae76fad01693ab35b51466fc4369c04a5ac64230fd307e7b798dc5beeff7a"
|
|
289
|
+
}
|
|
290
|
+
]
|
|
291
|
+
},
|
|
242
292
|
{
|
|
243
293
|
"type": "file",
|
|
244
294
|
"name": "templates/.claude/skills/goap-research-ed25519/scripts/test_ed25519_verifier.py",
|
|
@@ -249,6 +299,16 @@
|
|
|
249
299
|
}
|
|
250
300
|
]
|
|
251
301
|
},
|
|
302
|
+
{
|
|
303
|
+
"type": "file",
|
|
304
|
+
"name": "templates/.claude/skills/goap-research-ed25519/scripts/test_evidence_provenance.py",
|
|
305
|
+
"hashes": [
|
|
306
|
+
{
|
|
307
|
+
"alg": "SHA-256",
|
|
308
|
+
"content": "6825da92d859a299b86bd9bf9910088a95665e0716346e55f0f117d991d25c9b"
|
|
309
|
+
}
|
|
310
|
+
]
|
|
311
|
+
},
|
|
252
312
|
{
|
|
253
313
|
"type": "file",
|
|
254
314
|
"name": "templates/.claude/skills/idea2prd-manual/SKILL.md",
|
|
@@ -365,7 +425,7 @@
|
|
|
365
425
|
"hashes": [
|
|
366
426
|
{
|
|
367
427
|
"alg": "SHA-256",
|
|
368
|
-
"content": "
|
|
428
|
+
"content": "031378aa2e10c98928e35de07d454135e73550cd0c49f0cd886d53e4208d6b9f"
|
|
369
429
|
}
|
|
370
430
|
]
|
|
371
431
|
}
|
|
@@ -10,7 +10,7 @@ description: >
|
|
|
10
10
|
provide solutions until task is fully explored.
|
|
11
11
|
trust_tier: 1
|
|
12
12
|
trust_tier_label: "Structured"
|
|
13
|
-
trust_tier_path: "Run
|
|
13
|
+
trust_tier_path: "Run a BTO evaluation (see the skills-bto package) to promote to Tier 2"
|
|
14
14
|
---
|
|
15
15
|
|
|
16
16
|
# Explore: Adaptive Task Clarification
|
|
@@ -3,7 +3,7 @@ name: goap-research-ed25519
|
|
|
3
3
|
description: GOAP research system with Ed25519 provenance and tamper-evidence under pinned trusted-issuer keys. Use for high-stakes research that needs cited sources, explicit confidence, signed audit trails, or cryptographic proof of who signed a fact. Ed25519 does not prove truthfulness or prevent hallucination.
|
|
4
4
|
trust_tier: 1
|
|
5
5
|
trust_tier_label: "Structured"
|
|
6
|
-
trust_tier_path: "Run
|
|
6
|
+
trust_tier_path: "Run a BTO evaluation (see the skills-bto package) to promote to Tier 2"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# GOAP Research with Ed25519 Provenance
|
|
@@ -28,6 +28,107 @@ Ed25519 provides cryptographic provenance and tamper-evidence under pinned trust
|
|
|
28
28
|
| `SELF_ATTESTED` | Researcher signature verifies against the embedded researcher key | The research record was not altered after self-signing | up to `0.60` |
|
|
29
29
|
| `UNVERIFIED` | Unknown issuer, missing pin, revoked key, key mismatch, malformed key, or invalid signature | No cryptographic provenance | `0.0` |
|
|
30
30
|
|
|
31
|
+
## Evidence Classes — the second, independent axis
|
|
32
|
+
|
|
33
|
+
Trust classes answer **"was this record altered after signing?"**. They say nothing about whether
|
|
34
|
+
anyone opened the source. That second question caused every content error in real operation, so it
|
|
35
|
+
gets its own axis. A fact can be `ISSUER_SIGNED` **and** `ASSERTED` — a cryptographically perfect
|
|
36
|
+
record of something recited from memory. That combination is legal, expressible, and the dangerous one.
|
|
37
|
+
|
|
38
|
+
| Evidence class | Requirement | What it proves | Ceiling |
|
|
39
|
+
|---|---|---|---|
|
|
40
|
+
| `FETCH_VERIFIED` | `evidence_fetch.fetch_source()` performed the request and got a 2xx body | This script issued an HTTP request and received a body with this byte hash on this date | `1.0` |
|
|
41
|
+
| `LISTING_ONLY` | URL known from a listing, or a body supplied by hand, or the fetch failed | The URL is known; nobody opened it through this tool | `0.50` |
|
|
42
|
+
| `ASSERTED` | Stated from model memory, source never opened | Nothing about the source | `0.0` |
|
|
43
|
+
| *(absent)* | Fact predates this axis | Evidence is **unknown** — neither asserted nor verified | no ceiling of its own |
|
|
44
|
+
|
|
45
|
+
**`FETCH_VERIFIED` cannot be self-declared.** It is minted only by `create_fetched_fact()`, which
|
|
46
|
+
requires a `FetchRecord` — the byte hash, HTTP status and date of a request that actually happened.
|
|
47
|
+
The manual constructors (`create_listing_fact`, `create_asserted_fact`) have no way to produce it.
|
|
48
|
+
The restriction lives in the API shape, not in the author's discipline.
|
|
49
|
+
|
|
50
|
+
**Honest scope of `FETCH_VERIFIED`:** it means the bytes were received. It does **not** mean the
|
|
51
|
+
source is authoritative, that the claim follows from it, or that the reader understood it.
|
|
52
|
+
Provenance, not truth.
|
|
53
|
+
|
|
54
|
+
### The report gate
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
python3 scripts/check_report_evidence.py --report report.md --facts facts.json
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
`ASSERTED` claims must not appear in a report at all. `LISTING_ONLY` claims may appear only with a
|
|
61
|
+
visible marker next to the claim. This is an exit code, not advice — exit `1` on violation, exit `2`
|
|
62
|
+
when the inputs cannot be read (a gate that could not evaluate has cleared nothing).
|
|
63
|
+
|
|
64
|
+
## Self-learning (optional — needs `dz` on PATH)
|
|
65
|
+
|
|
66
|
+
The most valuable signal in research is the moment a conclusion turned out to be
|
|
67
|
+
WRONG. `scripts/learning_bridge.py` records those as METHOD lessons in the shared
|
|
68
|
+
`dz` store and replays them at the start of the next investigation.
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
python3 scripts/learning_bridge.py status # is the loop on at all?
|
|
72
|
+
python3 scripts/learning_bridge.py recall "transferrin saturation" # traps already caught
|
|
73
|
+
python3 scripts/learning_bridge.py teach "total testosterone is uninterpretable without SHBG"
|
|
74
|
+
python3 scripts/learning_bridge.py check "<candidate>" # privacy guard alone
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**Recall at the START of an investigation** — before interpreting anything, ask what
|
|
78
|
+
this analyte has already fooled us with. **Teach at four moments**, not at random:
|
|
79
|
+
|
|
80
|
+
| Moment | Why it is the signal |
|
|
81
|
+
|---|---|
|
|
82
|
+
| a conclusion was RETRACTED | the single most valuable lesson available |
|
|
83
|
+
| a population check flipped a conclusion | the effect did not transfer, and now we know the shape |
|
|
84
|
+
| a preanalytical finding explained an alarming value | the value was an artifact; the rule generalises |
|
|
85
|
+
| an open question was closed | the answer, not the waiting |
|
|
86
|
+
|
|
87
|
+
**PRIVACY IS AN INVARIANT, NOT A PREFERENCE.** A lesson describes a METHOD, never a
|
|
88
|
+
person. `teach` REFUSES the wrong shape before any store is touched:
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
good "a fast lowers total testosterone by roughly a third, LH down, FSH normal"
|
|
92
|
+
bad "testosterone 8.04 nmol/l in this patient turned out to be a fasting artifact"
|
|
93
|
+
bad "John Smith has HIV" — a capitalised word after the first is refused
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
The accepted form has three properties, all checkable: **no digits** (spelled-out
|
|
97
|
+
values count — `eight point zero four` is a value), **no identifiers**, and **lower
|
|
98
|
+
case** after the first word. The last one replaced an attempt to detect names: a name
|
|
99
|
+
is any word, no list of them exists, and the attempt let `John Smith has HIV` through.
|
|
100
|
+
Lower case costs a keystroke and closes that hole. Acronyms are unaffected — a token
|
|
101
|
+
passes if it is fully upper (`SHBG`, `TSH`) or opens lower (`apoB`, `mmHg`); only Title
|
|
102
|
+
Case is refused, because Title Case is the shape of a name. A token mixing letters with
|
|
103
|
+
a long digit run (`ab1234567`, `NCT04368728`) is an identifier and is refused however it
|
|
104
|
+
is punctuated, while a short lab acronym carrying a digit (`hba1c`) is not.
|
|
105
|
+
|
|
106
|
+
Pass `--allow-numbers` when the number IS the knowledge (a guideline threshold) and
|
|
107
|
+
you take responsibility for it. It never waves through a person beside a number.
|
|
108
|
+
|
|
109
|
+
The refusal is not bureaucracy — the method form is the more useful lesson: a reading
|
|
110
|
+
helps once, a rule helps every time. Honest scope: this is a SHAPE detector, not a
|
|
111
|
+
de-identifier. A lower-case sentence that names nobody and quotes no figure can still
|
|
112
|
+
describe one person, and no regular expression can see that. The shape rule plus the
|
|
113
|
+
four METHOD moments is what keeps the store clean; the guard alone is not a guarantee.
|
|
114
|
+
|
|
115
|
+
Without `dz` installed the package behaves exactly as before and says so once. An
|
|
116
|
+
older `dz` does **not** reject `--domain` — it ignores the flag and exits 0 — so recall
|
|
117
|
+
makes ONE call and detects the older CLI by the ABSENCE of the boost note in the
|
|
118
|
+
output, then states that results may mix other domains. A degraded loop that says so
|
|
119
|
+
beats a silent one. A real failure (non-zero exit) is reported as itself: proceeding
|
|
120
|
+
without prior lessons, never as "your CLI is old".
|
|
121
|
+
|
|
122
|
+
## Source Tiers
|
|
123
|
+
|
|
124
|
+
`source_tiers.classify_source(url)` assigns a class ceiling: A `0.90` (guideline bodies, WHO,
|
|
125
|
+
registries) · B `0.80` (peer-reviewed literature) · C `0.60` (preprints, trial registries) ·
|
|
126
|
+
D `0.40` (everything else, including unknown domains). A tier is a claim about the CLASS a domain
|
|
127
|
+
belongs to — it is **not** a cryptographic statement and must never be confused with issuer pinning.
|
|
128
|
+
|
|
129
|
+
`source_tiers.is_stale(source_date, kind)` flags sources past their TTL. A **missing** `source_date`
|
|
130
|
+
is flagged too: freshness that cannot be established is not freshness.
|
|
131
|
+
|
|
31
132
|
## Signed Message
|
|
32
133
|
|
|
33
134
|
`sign_fact()` and `verify_fact()` use the same deterministic JSON message containing:
|
|
@@ -39,6 +140,16 @@ Ed25519 provides cryptographic provenance and tamper-evidence under pinned trust
|
|
|
39
140
|
- `timestamp`
|
|
40
141
|
- optional `research_context` / nonce
|
|
41
142
|
|
|
143
|
+
**Schema v2** additionally covers `evidence_class`, `fetch_date` and `source_date`, plus a
|
|
144
|
+
`"schema": "fact-v2"` self-description marker. Version is chosen by the presence of
|
|
145
|
+
`evidence_class`: legacy facts keep verifying against the six-field v1 message forever.
|
|
146
|
+
|
|
147
|
+
Because the three evidence fields are part of the signed text, **both** tamper directions fail:
|
|
148
|
+
stripping `evidence_class` makes the verifier build the v1 text, which no longer matches the signed
|
|
149
|
+
v2 text; adding it to a legacy fact makes it build the v2 text, which does not match the signed v1
|
|
150
|
+
text. (The marker is self-description and the growth point for a future v3 — it is not itself the
|
|
151
|
+
protection; a discrimination run proved that.)
|
|
152
|
+
|
|
42
153
|
Changing the issuer or moving the source URL after signing invalidates the signature. The code signs the raw canonical message bytes; Ed25519 performs its own internal hashing. Do not pre-hash with SHA-512 before signing.
|
|
43
154
|
|
|
44
155
|
## Pinned Issuers
|
|
@@ -77,25 +188,43 @@ Reordering, substituting, editing, relabeling, or moving a signed fact fails ver
|
|
|
77
188
|
## Confidence Formula
|
|
78
189
|
|
|
79
190
|
```
|
|
80
|
-
confidence =
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
191
|
+
confidence = min(
|
|
192
|
+
trust_ceiling, # UNVERIFIED 0.0 · SELF_ATTESTED 0.60 · ISSUER_SIGNED 0.95
|
|
193
|
+
evidence_ceiling, # FETCH_VERIFIED 1.0 · LISTING_ONLY 0.50 · ASSERTED 0.0 · absent → no cap
|
|
194
|
+
tier_ceiling, # A 0.90 · B 0.80 · C 0.60 · D 0.40
|
|
195
|
+
)
|
|
84
196
|
```
|
|
85
197
|
|
|
198
|
+
The **weakest link decides**, never the average. An `ISSUER_SIGNED` fact that nobody read is capped
|
|
199
|
+
at `0.0` by its evidence class — which is the whole point of the second axis.
|
|
200
|
+
|
|
86
201
|
Invalid signatures are rejected with confidence `0.0`; they are never a recoverable `0.5` penalty.
|
|
87
202
|
|
|
88
203
|
## Research Workflow
|
|
89
204
|
|
|
90
205
|
1. Define the research goal and required evidence threshold.
|
|
91
206
|
2. Configure pinned issuer keys when issuer-grade provenance is required.
|
|
92
|
-
3. Search and
|
|
207
|
+
3. Search and locate candidate sources.
|
|
93
208
|
4. Extract claims and source URLs.
|
|
94
|
-
5.
|
|
95
|
-
|
|
209
|
+
5. **Fetch each source through the tool, not by hand:**
|
|
210
|
+
```python
|
|
211
|
+
from evidence_fetch import fetch_source, FetchRecord
|
|
212
|
+
record = fetch_source(url) # real HTTP, stdlib only
|
|
213
|
+
if isinstance(record, FetchRecord):
|
|
214
|
+
fact = verifier.create_fetched_fact(claim, record, issuer, source_date="2024-03-01")
|
|
215
|
+
else: # offline, 404, oversize, refused scheme…
|
|
216
|
+
fact = verifier.create_listing_fact(claim, url, reason=record.reason)
|
|
217
|
+
```
|
|
218
|
+
A claim you never opened a source for is `verifier.create_asserted_fact(claim)` — record it
|
|
219
|
+
honestly and let the gate refuse it. Never hand-label a class you did not earn.
|
|
220
|
+
6. Add facts to the research ledger; issuer-signed facts only when a pinned issuer key actually
|
|
221
|
+
signed the message.
|
|
96
222
|
7. Verify facts and citation chains.
|
|
97
223
|
8. Cross-check claims through ordinary source evaluation.
|
|
98
|
-
9.
|
|
224
|
+
9. **Run the report gate before delivering:**
|
|
225
|
+
`python3 scripts/check_report_evidence.py --report <report.md> --facts <facts.json>` — exit 0 required.
|
|
226
|
+
10. Report confidence, evidence-class mix, unsigned claims, rejected signatures, and limitations
|
|
227
|
+
explicitly.
|
|
99
228
|
|
|
100
229
|
## Output Expectations
|
|
101
230
|
|
|
@@ -103,10 +232,14 @@ Reports should include:
|
|
|
103
232
|
|
|
104
233
|
- Research objective and GOAP plan executed.
|
|
105
234
|
- Findings with source URLs.
|
|
106
|
-
- Verification status per claim (`ISSUER_SIGNED
|
|
235
|
+
- Verification status per claim on BOTH axes: trust (`ISSUER_SIGNED` / `SELF_ATTESTED` /
|
|
236
|
+
`UNVERIFIED`) and evidence (`FETCH_VERIFIED` / `LISTING_ONLY` / `ASSERTED` / unknown-legacy).
|
|
237
|
+
- The evidence-class mix as a count — the share of `ASSERTED` should be zero.
|
|
238
|
+
- A visible marker next to every `LISTING_ONLY` claim ("source not opened directly — verify").
|
|
107
239
|
- Chain integrity result when citation chains are used.
|
|
108
240
|
- Unsigned and rejected claims.
|
|
109
|
-
- Explicit caveat that cryptographic provenance is not truth verification
|
|
241
|
+
- Explicit caveat that cryptographic provenance is not truth verification, and that
|
|
242
|
+
`FETCH_VERIFIED` means the bytes arrived — not that the source is right.
|
|
110
243
|
|
|
111
244
|
## Implementation
|
|
112
245
|
|