@dzhechkov/skills-presentation-storyteller 0.1.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.
- package/LICENSE +21 -0
- package/README.md +53 -0
- package/bin/cli.js +5 -0
- package/package.json +47 -0
- package/sources.json +19 -0
- package/src/cli.js +107 -0
- package/src/commands/doctor.js +340 -0
- package/src/commands/init.js +168 -0
- package/src/commands/list.js +146 -0
- package/src/commands/remove.js +182 -0
- package/src/commands/update.js +170 -0
- package/src/utils.js +149 -0
- package/templates/.claude/commands/presentation-storyteller.md +23 -0
- package/templates/.claude/skills/explore/SKILL.md +218 -0
- package/templates/.claude/skills/explore/references/questioning-techniques.md +151 -0
- package/templates/.claude/skills/explore/references/task-brief-templates.md +355 -0
- package/templates/.claude/skills/goap-research-ed25519/SKILL.md +418 -0
- package/templates/.claude/skills/goap-research-ed25519/references/ed25519-verification.md +658 -0
- package/templates/.claude/skills/goap-research-ed25519/references/research-actions.md +544 -0
- package/templates/.claude/skills/goap-research-ed25519/references/source-evaluation.md +560 -0
- package/templates/.claude/skills/goap-research-ed25519/scripts/ed25519_verifier.py +662 -0
- package/templates/.claude/skills/goap-research-ed25519/scripts/goap_planner.py +720 -0
- package/templates/.claude/skills/presentation-storyteller/SKILL.md +374 -0
- package/templates/.claude/skills/presentation-storyteller/references/example-presentation.md +273 -0
- package/templates/.claude/skills/presentation-storyteller/references/slide-types.md +426 -0
- package/templates/.claude/skills/presentation-storyteller/references/sources-index-template.md +213 -0
- package/templates/.claude/skills/presentation-storyteller/references/speaker-script-patterns.md +324 -0
- package/templates/.claude/skills/presentation-storyteller/references/storytelling-frameworks.md +270 -0
|
@@ -0,0 +1,544 @@
|
|
|
1
|
+
# Research Actions Reference (Ed25519 Enhanced)
|
|
2
|
+
|
|
3
|
+
Complete specifications for GOAP research actions with cryptographic verification extensions.
|
|
4
|
+
|
|
5
|
+
## Setup Actions (NEW)
|
|
6
|
+
|
|
7
|
+
### configure_trusted_issuers
|
|
8
|
+
**Purpose:** Initialize trusted issuer whitelist for verified research
|
|
9
|
+
**Preconditions:** None
|
|
10
|
+
**Effects:** `whitelist_active`, `verification_ready`
|
|
11
|
+
**Cost:** 0
|
|
12
|
+
**Implementation:**
|
|
13
|
+
```python
|
|
14
|
+
# Load default trusted issuers
|
|
15
|
+
verifier = Ed25519Verifier()
|
|
16
|
+
|
|
17
|
+
# Add custom issuers
|
|
18
|
+
verifier.trusted_issuers["custom.org"] = "ed25519:pubkey_base64"
|
|
19
|
+
|
|
20
|
+
# Set verification threshold
|
|
21
|
+
verifier.verification_threshold = 0.95 # strict mode
|
|
22
|
+
```
|
|
23
|
+
**Success criteria:** Whitelist loaded, verification system initialized
|
|
24
|
+
|
|
25
|
+
### generate_research_keypair
|
|
26
|
+
**Purpose:** Generate Ed25519 keypair for signing research artifacts
|
|
27
|
+
**Preconditions:** None
|
|
28
|
+
**Effects:** `keypair_available`, `signing_ready`
|
|
29
|
+
**Cost:** 1
|
|
30
|
+
**Implementation:**
|
|
31
|
+
```python
|
|
32
|
+
private_key, public_key = verifier.generate_keypair()
|
|
33
|
+
# Store securely - never commit private key
|
|
34
|
+
```
|
|
35
|
+
**Success criteria:** Keypair generated and stored securely
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Search Actions
|
|
40
|
+
|
|
41
|
+
### web_search_broad
|
|
42
|
+
**Purpose:** Initial exploration to identify landscape and key subtopics
|
|
43
|
+
**Preconditions:** `topic_defined`
|
|
44
|
+
**Effects:** `candidates_found`, `subtopics_identified`
|
|
45
|
+
**Cost:** 1
|
|
46
|
+
**Verification:** None (discovery phase)
|
|
47
|
+
**Implementation:**
|
|
48
|
+
```
|
|
49
|
+
Query strategy:
|
|
50
|
+
1. Start with core topic terms
|
|
51
|
+
2. Add qualifiers: "overview", "guide", "comprehensive"
|
|
52
|
+
3. Note recurring subtopics in results
|
|
53
|
+
4. Identify authoritative domains appearing frequently
|
|
54
|
+
5. Flag sources from trusted issuers for priority processing
|
|
55
|
+
```
|
|
56
|
+
**Success criteria:** ≥5 relevant results, ≥3 subtopics identified
|
|
57
|
+
|
|
58
|
+
### web_search_verified (NEW)
|
|
59
|
+
**Purpose:** Search with priority to trusted issuer sources
|
|
60
|
+
**Preconditions:** `topic_defined`, `whitelist_active`
|
|
61
|
+
**Effects:** `verified_candidates_found`, `trusted_sources_identified`
|
|
62
|
+
**Cost:** 2
|
|
63
|
+
**Verification:** Domain matching against whitelist
|
|
64
|
+
**Implementation:**
|
|
65
|
+
```
|
|
66
|
+
Query strategy:
|
|
67
|
+
1. Include site: operators for trusted domains
|
|
68
|
+
- site:reuters.com OR site:ap.org OR site:nature.com
|
|
69
|
+
2. Rank results by issuer trust level
|
|
70
|
+
3. Mark trusted vs untrusted sources
|
|
71
|
+
4. Prioritize .gov, .edu domains
|
|
72
|
+
5. Note signature availability if present
|
|
73
|
+
```
|
|
74
|
+
**Success criteria:** ≥3 results from trusted issuers
|
|
75
|
+
|
|
76
|
+
### web_search_specific
|
|
77
|
+
**Purpose:** Targeted search for specific information
|
|
78
|
+
**Preconditions:** `subtopic_identified` OR `specific_question_formed`
|
|
79
|
+
**Effects:** `detail_found`, `sources_identified`
|
|
80
|
+
**Cost:** 1
|
|
81
|
+
**Verification:** None
|
|
82
|
+
**Implementation:**
|
|
83
|
+
```
|
|
84
|
+
Query strategy:
|
|
85
|
+
1. Use exact phrases for specific claims
|
|
86
|
+
2. Include domain qualifiers ("site:gov", "site:edu")
|
|
87
|
+
3. Add date constraints for temporal queries
|
|
88
|
+
4. Use boolean operators for precision
|
|
89
|
+
```
|
|
90
|
+
**Success criteria:** Direct answers or clear source paths found
|
|
91
|
+
|
|
92
|
+
### web_search_expert
|
|
93
|
+
**Purpose:** Find authoritative voices and expert sources
|
|
94
|
+
**Preconditions:** `domain_known`
|
|
95
|
+
**Effects:** `authorities_found`, `expert_opinions_available`
|
|
96
|
+
**Cost:** 2
|
|
97
|
+
**Verification:** Credential verification
|
|
98
|
+
**Implementation:**
|
|
99
|
+
```
|
|
100
|
+
Query patterns:
|
|
101
|
+
- "[topic] expert interview"
|
|
102
|
+
- "[topic] researcher [institution]"
|
|
103
|
+
- "[topic] author [book/paper]"
|
|
104
|
+
- "[domain] professor"
|
|
105
|
+
|
|
106
|
+
Credential verification:
|
|
107
|
+
- Check institutional affiliation
|
|
108
|
+
- Verify publication history
|
|
109
|
+
- Cross-reference expert claims
|
|
110
|
+
```
|
|
111
|
+
**Success criteria:** ≥2 credentialed experts identified
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Content Retrieval Actions
|
|
116
|
+
|
|
117
|
+
### fetch_source
|
|
118
|
+
**Purpose:** Retrieve full content from identified URL
|
|
119
|
+
**Preconditions:** `url_known`, `source_accessible`
|
|
120
|
+
**Effects:** `content_retrieved`, `full_context_available`
|
|
121
|
+
**Cost:** 2
|
|
122
|
+
**Verification:** TLS certificate validation
|
|
123
|
+
**Implementation:**
|
|
124
|
+
- Use web_fetch tool with appropriate URL
|
|
125
|
+
- Verify TLS certificate validity
|
|
126
|
+
- Handle paywalls by noting limitation
|
|
127
|
+
- Extract key sections if full content unavailable
|
|
128
|
+
- Note retrieval timestamp
|
|
129
|
+
- Calculate content hash for integrity
|
|
130
|
+
|
|
131
|
+
### fetch_signed_source (NEW)
|
|
132
|
+
**Purpose:** Retrieve content with Ed25519 signature verification
|
|
133
|
+
**Preconditions:** `url_known`, `issuer_pubkey_available`
|
|
134
|
+
**Effects:** `signed_content_retrieved`, `signature_verified`
|
|
135
|
+
**Cost:** 3
|
|
136
|
+
**Verification:** Ed25519 signature
|
|
137
|
+
**Implementation:**
|
|
138
|
+
```python
|
|
139
|
+
# Fetch content
|
|
140
|
+
content = web_fetch(url)
|
|
141
|
+
|
|
142
|
+
# Check for signature header or metadata
|
|
143
|
+
signature = get_signature_from_response(response)
|
|
144
|
+
pubkey = get_issuer_pubkey(issuer_domain)
|
|
145
|
+
|
|
146
|
+
# Verify signature
|
|
147
|
+
verified = verifier.verify_signature(content, signature, pubkey)
|
|
148
|
+
|
|
149
|
+
if verified:
|
|
150
|
+
result.effects.add("signature_verified")
|
|
151
|
+
result.confidence = 0.95
|
|
152
|
+
else:
|
|
153
|
+
result.effects.add("signature_invalid")
|
|
154
|
+
result.confidence = 0.5 # Proceed with caution
|
|
155
|
+
```
|
|
156
|
+
**Success criteria:** Content retrieved, signature verified (if available)
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## Extraction Actions
|
|
161
|
+
|
|
162
|
+
### extract_facts
|
|
163
|
+
**Purpose:** Systematically extract verifiable claims
|
|
164
|
+
**Preconditions:** `content_retrieved`
|
|
165
|
+
**Effects:** `facts_cataloged`, `claims_identified`
|
|
166
|
+
**Cost:** 1
|
|
167
|
+
**Verification:** None (raw extraction)
|
|
168
|
+
**Implementation:**
|
|
169
|
+
```
|
|
170
|
+
Extraction protocol:
|
|
171
|
+
1. Identify all factual claims (dates, numbers, names, events)
|
|
172
|
+
2. Note source attribution for each fact
|
|
173
|
+
3. Flag claims needing verification
|
|
174
|
+
4. Record exact quotes with page/section reference
|
|
175
|
+
5. Distinguish facts from opinions/interpretations
|
|
176
|
+
6. Mark each fact with source_hash for integrity
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### sign_extracted_facts (NEW)
|
|
180
|
+
**Purpose:** Cryptographically sign extracted facts
|
|
181
|
+
**Preconditions:** `facts_cataloged`, `keypair_available`
|
|
182
|
+
**Effects:** `signed_facts`, `researcher_signature_attached`
|
|
183
|
+
**Cost:** 2
|
|
184
|
+
**Verification:** Self-signature
|
|
185
|
+
**Implementation:**
|
|
186
|
+
```python
|
|
187
|
+
signed_facts = []
|
|
188
|
+
for fact in extracted_facts:
|
|
189
|
+
signed_fact = verifier.create_signed_fact(
|
|
190
|
+
claim=fact.claim,
|
|
191
|
+
source_url=fact.source_url,
|
|
192
|
+
source_content=fact.source_content,
|
|
193
|
+
issuer=researcher_identity
|
|
194
|
+
)
|
|
195
|
+
signed_facts.append(signed_fact)
|
|
196
|
+
```
|
|
197
|
+
**Output:** List of SignedFact objects with Ed25519 signatures
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## Verification Actions
|
|
202
|
+
|
|
203
|
+
### verify_claim
|
|
204
|
+
**Purpose:** Confirm or refute specific assertion
|
|
205
|
+
**Preconditions:** `claim_identified`, `verification_source_available`
|
|
206
|
+
**Effects:** `claim_verified` OR `claim_refuted` OR `claim_uncertain`
|
|
207
|
+
**Cost:** 3
|
|
208
|
+
**Verification:** Cross-reference (traditional)
|
|
209
|
+
**Implementation:**
|
|
210
|
+
```
|
|
211
|
+
Verification protocol:
|
|
212
|
+
1. Locate original/primary source
|
|
213
|
+
2. Cross-check with ≥2 independent sources
|
|
214
|
+
3. Check for retractions/corrections
|
|
215
|
+
4. Verify quoted individuals confirm quotes
|
|
216
|
+
5. For statistics: verify methodology, sample, timeframe
|
|
217
|
+
```
|
|
218
|
+
**Output:** Confidence rating (verified/likely/uncertain/unlikely/refuted)
|
|
219
|
+
|
|
220
|
+
### verify_claim_cryptographic (NEW)
|
|
221
|
+
**Purpose:** Verify claim with cryptographic proof
|
|
222
|
+
**Preconditions:** `claim_identified`, `signature_available`, `issuer_pubkey_known`
|
|
223
|
+
**Effects:** `cryptographically_verified` OR `signature_invalid`
|
|
224
|
+
**Cost:** 4
|
|
225
|
+
**Verification:** Ed25519 signature verification
|
|
226
|
+
**Implementation:**
|
|
227
|
+
```python
|
|
228
|
+
def verify_claim_cryptographic(fact: SignedFact) -> VerificationResult:
|
|
229
|
+
# Verify signature
|
|
230
|
+
result = verifier.verify_fact(fact)
|
|
231
|
+
|
|
232
|
+
if result.verified:
|
|
233
|
+
# Check if issuer is trusted
|
|
234
|
+
if verifier.is_trusted_issuer(fact.issuer):
|
|
235
|
+
result.confidence = 0.95
|
|
236
|
+
else:
|
|
237
|
+
result.confidence = 0.80
|
|
238
|
+
else:
|
|
239
|
+
result.confidence = 0.0
|
|
240
|
+
result.error = "Cryptographic verification failed"
|
|
241
|
+
|
|
242
|
+
# Log to verification ledger
|
|
243
|
+
verifier.verification_ledger.append(result)
|
|
244
|
+
|
|
245
|
+
return result
|
|
246
|
+
```
|
|
247
|
+
**Output:** VerificationResult with confidence score
|
|
248
|
+
|
|
249
|
+
### cross_reference
|
|
250
|
+
**Purpose:** Check consistency across multiple sources
|
|
251
|
+
**Preconditions:** `multiple_sources` (≥3)
|
|
252
|
+
**Effects:** `consistency_checked`, `contradictions_identified`
|
|
253
|
+
**Cost:** 2
|
|
254
|
+
**Verification:** None
|
|
255
|
+
**Implementation:**
|
|
256
|
+
```
|
|
257
|
+
Cross-reference matrix:
|
|
258
|
+
1. List key claims from each source
|
|
259
|
+
2. Mark agreement/disagreement for each claim
|
|
260
|
+
3. Note source reliability weighting
|
|
261
|
+
4. Identify majority consensus
|
|
262
|
+
5. Flag significant contradictions for resolution
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
### cross_reference_signed (NEW)
|
|
266
|
+
**Purpose:** Cross-reference with signed source verification
|
|
267
|
+
**Preconditions:** `multiple_signed_sources` (≥3)
|
|
268
|
+
**Effects:** `signed_consistency_checked`, `multi_source_verified`
|
|
269
|
+
**Cost:** 3
|
|
270
|
+
**Verification:** Multi-signature verification
|
|
271
|
+
**Implementation:**
|
|
272
|
+
```python
|
|
273
|
+
def cross_reference_signed(facts: List[SignedFact]) -> CrossReferenceResult:
|
|
274
|
+
verified_facts = []
|
|
275
|
+
|
|
276
|
+
for fact in facts:
|
|
277
|
+
result = verifier.verify_fact(fact)
|
|
278
|
+
if result.verified:
|
|
279
|
+
verified_facts.append(fact)
|
|
280
|
+
|
|
281
|
+
if len(verified_facts) >= 3:
|
|
282
|
+
# Check claim consistency
|
|
283
|
+
claims = [f.claim for f in verified_facts]
|
|
284
|
+
consistent = check_semantic_consistency(claims)
|
|
285
|
+
|
|
286
|
+
if consistent:
|
|
287
|
+
return CrossReferenceResult(
|
|
288
|
+
verified=True,
|
|
289
|
+
confidence=min(f.confidence for f in verified_facts) * 1.1,
|
|
290
|
+
sources_count=len(verified_facts)
|
|
291
|
+
)
|
|
292
|
+
|
|
293
|
+
return CrossReferenceResult(verified=False, confidence=0.0)
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
### find_primary_source
|
|
297
|
+
**Purpose:** Trace claim to original source
|
|
298
|
+
**Preconditions:** `secondary_source_cites_claim`
|
|
299
|
+
**Effects:** `primary_located` OR `primary_unavailable`
|
|
300
|
+
**Cost:** 3
|
|
301
|
+
**Verification:** None (discovery)
|
|
302
|
+
**Implementation:**
|
|
303
|
+
```
|
|
304
|
+
Tracing protocol:
|
|
305
|
+
1. Check footnotes/bibliography of secondary source
|
|
306
|
+
2. Search for original publication
|
|
307
|
+
3. For statistics: find original study/dataset
|
|
308
|
+
4. For quotes: find original interview/speech
|
|
309
|
+
5. For events: find contemporaneous reporting
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
## Citation Chain Actions (NEW)
|
|
315
|
+
|
|
316
|
+
### build_citation_chain
|
|
317
|
+
**Purpose:** Construct linked chain of cited facts
|
|
318
|
+
**Preconditions:** `facts_cataloged`
|
|
319
|
+
**Effects:** `citation_chain_complete`
|
|
320
|
+
**Cost:** 2
|
|
321
|
+
**Verification:** Chain hash integrity
|
|
322
|
+
**Implementation:**
|
|
323
|
+
```python
|
|
324
|
+
def build_citation_chain(facts: List[SignedFact], chain_id: str) -> CitationChain:
|
|
325
|
+
chain = CitationChain(chain_id=chain_id)
|
|
326
|
+
|
|
327
|
+
for fact in facts:
|
|
328
|
+
chain.add_fact(fact) # Auto-sets parent_citation
|
|
329
|
+
|
|
330
|
+
# Calculate chain hash
|
|
331
|
+
chain_hash = chain.get_chain_hash()
|
|
332
|
+
|
|
333
|
+
return chain
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
### verify_citation_chain
|
|
337
|
+
**Purpose:** Verify entire citation chain integrity
|
|
338
|
+
**Preconditions:** `citation_chain_complete`
|
|
339
|
+
**Effects:** `chain_verified` OR `chain_broken`
|
|
340
|
+
**Cost:** 3
|
|
341
|
+
**Verification:** Full Ed25519 chain verification
|
|
342
|
+
**Implementation:**
|
|
343
|
+
```python
|
|
344
|
+
def verify_citation_chain(chain: CitationChain) -> Tuple[bool, float]:
|
|
345
|
+
all_verified, aggregate_confidence = verifier.verify_citation_chain(chain)
|
|
346
|
+
|
|
347
|
+
if all_verified and aggregate_confidence >= verifier.verification_threshold:
|
|
348
|
+
return True, aggregate_confidence
|
|
349
|
+
|
|
350
|
+
# Identify break point
|
|
351
|
+
for i, fact in enumerate(chain.facts):
|
|
352
|
+
result = verifier.verify_fact(fact)
|
|
353
|
+
if not result.verified:
|
|
354
|
+
return False, 0.0, f"Chain broken at fact {i}: {result.error}"
|
|
355
|
+
|
|
356
|
+
return all_verified, aggregate_confidence
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
---
|
|
360
|
+
|
|
361
|
+
## Analysis Actions
|
|
362
|
+
|
|
363
|
+
### identify_patterns
|
|
364
|
+
**Purpose:** Discover recurring themes and connections
|
|
365
|
+
**Preconditions:** `facts_cataloged` (≥10 facts)
|
|
366
|
+
**Effects:** `patterns_identified`, `themes_emerged`
|
|
367
|
+
**Cost:** 2
|
|
368
|
+
**Verification:** None
|
|
369
|
+
**Implementation:**
|
|
370
|
+
- Group related facts
|
|
371
|
+
- Identify temporal patterns
|
|
372
|
+
- Note causal relationships
|
|
373
|
+
- Map entity connections
|
|
374
|
+
|
|
375
|
+
### timeline_construction
|
|
376
|
+
**Purpose:** Establish chronological sequence
|
|
377
|
+
**Preconditions:** `events_found` (≥3 dated events)
|
|
378
|
+
**Effects:** `chronology_established`, `sequence_clear`
|
|
379
|
+
**Cost:** 2
|
|
380
|
+
**Verification:** None
|
|
381
|
+
**Implementation:**
|
|
382
|
+
- Order events by date
|
|
383
|
+
- Identify causation vs correlation
|
|
384
|
+
- Note gaps in timeline
|
|
385
|
+
- Mark uncertain dates
|
|
386
|
+
|
|
387
|
+
### compare_perspectives
|
|
388
|
+
**Purpose:** Document different viewpoints
|
|
389
|
+
**Preconditions:** `multiple_perspectives_found`
|
|
390
|
+
**Effects:** `viewpoints_mapped`, `disagreements_clarified`
|
|
391
|
+
**Cost:** 2
|
|
392
|
+
**Verification:** None
|
|
393
|
+
**Implementation:**
|
|
394
|
+
- Identify distinct positions
|
|
395
|
+
- Note supporting evidence for each
|
|
396
|
+
- Identify source biases
|
|
397
|
+
- Map areas of consensus vs disagreement
|
|
398
|
+
|
|
399
|
+
---
|
|
400
|
+
|
|
401
|
+
## Synthesis Actions
|
|
402
|
+
|
|
403
|
+
### synthesize_findings
|
|
404
|
+
**Purpose:** Integrate research into coherent conclusions
|
|
405
|
+
**Preconditions:** `facts_verified` (sufficient coverage), `patterns_identified`
|
|
406
|
+
**Effects:** `conclusions_formed`, `confidence_assigned`
|
|
407
|
+
**Cost:** 3
|
|
408
|
+
**Verification:** None (synthesis)
|
|
409
|
+
**Implementation:**
|
|
410
|
+
```
|
|
411
|
+
Synthesis protocol:
|
|
412
|
+
1. Review all verified facts
|
|
413
|
+
2. Weight by source reliability AND signature status
|
|
414
|
+
3. Address contradictions
|
|
415
|
+
4. Form conclusions supported by evidence
|
|
416
|
+
5. Assign confidence levels (higher for signed sources)
|
|
417
|
+
6. Note remaining uncertainties
|
|
418
|
+
7. Ensure 100% citation coverage
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
### generate_report
|
|
422
|
+
**Purpose:** Produce structured research output
|
|
423
|
+
**Preconditions:** `conclusions_formed`
|
|
424
|
+
**Effects:** `report_delivered`
|
|
425
|
+
**Cost:** 2
|
|
426
|
+
**Verification:** None
|
|
427
|
+
**Implementation:**
|
|
428
|
+
- Follow standard report structure
|
|
429
|
+
- Include methodology section
|
|
430
|
+
- Cite all sources
|
|
431
|
+
- Present confidence assessments
|
|
432
|
+
- Document research path
|
|
433
|
+
|
|
434
|
+
### generate_signed_report (NEW)
|
|
435
|
+
**Purpose:** Produce cryptographically signed research report
|
|
436
|
+
**Preconditions:** `conclusions_formed`, `keypair_available`
|
|
437
|
+
**Effects:** `signed_report_delivered`, `verification_ledger_attached`
|
|
438
|
+
**Cost:** 3
|
|
439
|
+
**Verification:** Report signature
|
|
440
|
+
**Implementation:**
|
|
441
|
+
```python
|
|
442
|
+
def generate_signed_report(
|
|
443
|
+
findings: ResearchFindings,
|
|
444
|
+
keypair: Keypair
|
|
445
|
+
) -> SignedReport:
|
|
446
|
+
# Generate report content
|
|
447
|
+
report = format_report(findings)
|
|
448
|
+
|
|
449
|
+
# Sign report
|
|
450
|
+
signature, report_hash = verifier.sign_content(report)
|
|
451
|
+
|
|
452
|
+
# Sign verification ledger
|
|
453
|
+
ledger_sig = verifier.sign_ledger()
|
|
454
|
+
|
|
455
|
+
return SignedReport(
|
|
456
|
+
content=report,
|
|
457
|
+
signature=signature,
|
|
458
|
+
content_hash=report_hash,
|
|
459
|
+
verification_ledger=verifier.get_verification_ledger(),
|
|
460
|
+
ledger_signature=ledger_sig,
|
|
461
|
+
timestamp=datetime.utcnow().isoformat()
|
|
462
|
+
)
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
---
|
|
466
|
+
|
|
467
|
+
## Recovery Actions
|
|
468
|
+
|
|
469
|
+
### expand_search
|
|
470
|
+
**Purpose:** Broaden search when stuck
|
|
471
|
+
**Preconditions:** `dead_end_reached`
|
|
472
|
+
**Effects:** `new_candidates_found` OR `topic_exhausted`
|
|
473
|
+
**Cost:** 1
|
|
474
|
+
**Verification:** None
|
|
475
|
+
**Implementation:**
|
|
476
|
+
- Use synonym expansion
|
|
477
|
+
- Try related topics
|
|
478
|
+
- Search in different languages
|
|
479
|
+
- Check academic databases
|
|
480
|
+
- Explore adjacent domains
|
|
481
|
+
- **Try non-trusted sources with caution**
|
|
482
|
+
|
|
483
|
+
### pivot_approach
|
|
484
|
+
**Purpose:** Change research strategy
|
|
485
|
+
**Preconditions:** `current_approach_ineffective`
|
|
486
|
+
**Effects:** `new_approach_active`
|
|
487
|
+
**Cost:** 1
|
|
488
|
+
**Verification:** None
|
|
489
|
+
**Implementation:**
|
|
490
|
+
- Document why current approach failed
|
|
491
|
+
- Identify alternative information paths
|
|
492
|
+
- **Consider relaxing verification threshold temporarily**
|
|
493
|
+
- Update research plan
|
|
494
|
+
- Resume with new strategy
|
|
495
|
+
|
|
496
|
+
### recover_from_verification_failure (NEW)
|
|
497
|
+
**Purpose:** Handle failed signature verification
|
|
498
|
+
**Preconditions:** `signature_invalid`
|
|
499
|
+
**Effects:** `alternative_source_found` OR `unverified_but_documented`
|
|
500
|
+
**Cost:** 2
|
|
501
|
+
**Verification:** None
|
|
502
|
+
**Implementation:**
|
|
503
|
+
```python
|
|
504
|
+
def recover_from_verification_failure(fact: SignedFact) -> RecoveryResult:
|
|
505
|
+
# Try to find alternative signed source
|
|
506
|
+
alternatives = search_for_alternatives(fact.claim)
|
|
507
|
+
|
|
508
|
+
for alt in alternatives:
|
|
509
|
+
if verifier.verify_fact(alt).verified:
|
|
510
|
+
return RecoveryResult(
|
|
511
|
+
success=True,
|
|
512
|
+
alternative_fact=alt
|
|
513
|
+
)
|
|
514
|
+
|
|
515
|
+
# Document as unverified with lower confidence
|
|
516
|
+
return RecoveryResult(
|
|
517
|
+
success=False,
|
|
518
|
+
original_fact=fact,
|
|
519
|
+
confidence=0.5,
|
|
520
|
+
warning="Claim could not be cryptographically verified"
|
|
521
|
+
)
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
---
|
|
525
|
+
|
|
526
|
+
## Action Cost Summary
|
|
527
|
+
|
|
528
|
+
| Action | Base Cost | Verification Overhead | Total |
|
|
529
|
+
|--------|-----------|----------------------|-------|
|
|
530
|
+
| web_search_broad | 1 | 0 | 1 |
|
|
531
|
+
| web_search_verified | 1 | +1 | 2 |
|
|
532
|
+
| web_search_specific | 1 | 0 | 1 |
|
|
533
|
+
| fetch_source | 2 | 0 | 2 |
|
|
534
|
+
| fetch_signed_source | 2 | +1 | 3 |
|
|
535
|
+
| extract_facts | 1 | 0 | 1 |
|
|
536
|
+
| sign_extracted_facts | 1 | +1 | 2 |
|
|
537
|
+
| verify_claim | 3 | 0 | 3 |
|
|
538
|
+
| verify_claim_cryptographic | 3 | +1 | 4 |
|
|
539
|
+
| cross_reference | 2 | 0 | 2 |
|
|
540
|
+
| cross_reference_signed | 2 | +1 | 3 |
|
|
541
|
+
| build_citation_chain | 2 | 0 | 2 |
|
|
542
|
+
| verify_citation_chain | 2 | +1 | 3 |
|
|
543
|
+
| generate_report | 2 | 0 | 2 |
|
|
544
|
+
| generate_signed_report | 2 | +1 | 3 |
|