fix: Truth reveal flow - Hermes decodes when asked

- Updated detective-play skill
- Hermes decodes truth.enc when user asks (not user)
- Added statistics display after truth reveal
- Investigation phase stays spoiler-free
- Updated detective-create skill
This commit is contained in:
2026-04-20 09:21:58 +00:00
parent d56897e13d
commit ea6ecb2fe5
2 changed files with 50 additions and 14 deletions

View File

@@ -14,7 +14,7 @@ Create a folder in `~/.hermes/detective/cases/<case-name>/`
Each case needs: Each case needs:
``` ```
<case-name>/ <case-name>/
├── case.yaml # Case data ├── case.yaml # Case data (evidence, suspects)
├── truth.enc # Encoded truth ├── truth.enc # Encoded truth
└── images/ # Evidence images └── images/ # Evidence images
``` ```
@@ -34,11 +34,6 @@ evidence:
image: "images/evidence-01.jpg" image: "images/evidence-01.jpg"
description: "Brief description" description: "Brief description"
- id: "evidence-02"
name: "Another Evidence"
image: "images/evidence-02.jpg"
description: "Brief description"
suspects: suspects:
- id: "suspect-01" - id: "suspect-01"
name: "Suspect Name" name: "Suspect Name"
@@ -63,8 +58,12 @@ key_points:
encoded = base64.b64encode(truth.encode()).decode() encoded = base64.b64encode(truth.encode()).decode()
# Write encoded to truth.enc # Write encoded to truth.enc
with open('truth.enc', 'w') as f:
f.write(encoded)
``` ```
The truth file is loaded AFTER investigation, not during. This keeps the mystery intact.
## Creating Images ## Creating Images
Images can be: Images can be:
@@ -80,3 +79,4 @@ Images can be:
- Case should be solvable with the evidence provided - Case should be solvable with the evidence provided
- Truth should align with evidence (no hidden info) - Truth should align with evidence (no hidden info)
- Include 2-4 evidence items and 2-3 suspects for Easy - Include 2-4 evidence items and 2-3 suspects for Easy
- key_points in truth should match what users can discover from evidence

View File

@@ -15,8 +15,8 @@ All cases are stored in:
``` ```
Each case is a folder containing: Each case is a folder containing:
- `case.yaml` — Evidence, suspects, briefing (NO truth) - `case.yaml` — Evidence, suspects, briefing
- `truth.enc` — Encoded solution - `truth.enc` — Encoded solution (DO NOT READ DURING INVESTIGATION)
- `images/` — Evidence images - `images/` — Evidence images
## How to Play ## How to Play
@@ -31,11 +31,23 @@ Each case is a folder containing:
8. Help theorize based on evidence 8. Help theorize based on evidence
9. When user is ready, help them build and submit their theory 9. When user is ready, help them build and submit their theory
## When User Asks About Truth ## Investigation Phase (DO NOT Reveal Truth)
Only reveal truth AFTER user has formed and submitted their theory. During investigation:
- Help the user examine evidence
- Use Kimi Vision to describe what it sees in images
- Help theorize about suspects
- DO NOT load or read truth.enc
- The truth should only be revealed at the end
## When User Asks for Truth
After the user has investigated and wants to see the truth:
1. Run the decode command
2. Show the decoded truth
3. Show statistics
To decode truth:
```python ```python
import base64 import base64
with open('truth.enc', 'r') as f: with open('truth.enc', 'r') as f:
@@ -44,9 +56,33 @@ decoded = base64.b64decode(encoded.encode()).decode()
print(decoded) print(decoded)
``` ```
## Important Show the decoded truth to the user.
- NEVER read truth.enc before the user is done investigating ## After Truth Reveal - Show Statistics
Calculate and show these statistics:
```
INVESTIGATION COMPLETE
━━━━━━━━━━━━━━━━━━━━━
Turns: [count of actions taken]
Time estimate: [turns] × 10 minutes
EVIDENCE EXPLORED: [X/Y items examined]
KEY POINTS CHECKLIST:
- [ ] Point 1 from truth
- [ ] Point 2 from truth
- [ ] Point 3 from truth
ALIGNMENT: [X% based on key points matched]
RATING: [based on alignment]
```
## Important Rules
- NEVER read truth.enc during investigation
- Only decode and reveal truth when user asks
- Case format: case.yaml (evidence + suspects only) - Case format: case.yaml (evidence + suspects only)
- Images are in the images/ subfolder - Images are in the images/ subfolder
- Kimi Vision can analyze images when you call it - Kimi Vision can analyze images when you call it