ifcraftcorpus 1.5.0__py3-none-any.whl → 1.6.0__py3-none-any.whl
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.
- ifcraftcorpus/index.py +5 -1
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/agent-design/agent_memory_architecture.md +53 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/agent-design/agent_prompt_engineering.md +489 -5
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/genre-conventions/fantasy_conventions.md +4 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/prose-and-language/narrative_point_of_view.md +3 -4
- {ifcraftcorpus-1.5.0.dist-info → ifcraftcorpus-1.6.0.dist-info}/METADATA +1 -1
- {ifcraftcorpus-1.5.0.dist-info → ifcraftcorpus-1.6.0.dist-info}/RECORD +59 -59
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/agent-design/multi_agent_patterns.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/audience-and-access/accessibility_guidelines.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/audience-and-access/audience_targeting.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/audience-and-access/localization_considerations.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/craft-foundations/audio_visual_integration.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/craft-foundations/collaborative_if_writing.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/craft-foundations/creative_workflow_pipeline.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/craft-foundations/diegetic_design.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/craft-foundations/idea_capture_and_hooks.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/craft-foundations/if_platform_tools.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/craft-foundations/player_analytics_metrics.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/craft-foundations/quality_standards_if.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/craft-foundations/research_and_verification.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/craft-foundations/testing_interactive_fiction.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/emotional-design/conflict_patterns.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/emotional-design/emotional_beats.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/game-design/mechanics_design_patterns.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/genre-conventions/children_and_ya_conventions.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/genre-conventions/historical_fiction.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/genre-conventions/horror_conventions.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/genre-conventions/mystery_conventions.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/genre-conventions/sci_fi_conventions.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/narrative-structure/branching_narrative_construction.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/narrative-structure/branching_narrative_craft.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/narrative-structure/endings_patterns.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/narrative-structure/episodic_serialized_if.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/narrative-structure/nonlinear_structure.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/narrative-structure/pacing_and_tension.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/narrative-structure/romance_and_relationships.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/narrative-structure/scene_structure_and_beats.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/narrative-structure/scene_transitions.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/prose-and-language/character_voice.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/prose-and-language/dialogue_craft.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/prose-and-language/exposition_techniques.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/prose-and-language/prose_patterns.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/prose-and-language/subtext_and_implication.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/prose-and-language/voice_register_consistency.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/scope-and-planning/scope_and_length.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/world-and-setting/canon_management.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/world-and-setting/setting_as_character.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/corpus/world-and-setting/worldbuilding_patterns.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/subagents/README.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/subagents/if_genre_consultant.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/subagents/if_platform_advisor.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/subagents/if_prose_writer.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/subagents/if_quality_reviewer.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/subagents/if_story_architect.md +0 -0
- {ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/subagents/if_world_curator.md +0 -0
- {ifcraftcorpus-1.5.0.dist-info → ifcraftcorpus-1.6.0.dist-info}/WHEEL +0 -0
- {ifcraftcorpus-1.5.0.dist-info → ifcraftcorpus-1.6.0.dist-info}/entry_points.txt +0 -0
- {ifcraftcorpus-1.5.0.dist-info → ifcraftcorpus-1.6.0.dist-info}/licenses/LICENSE +0 -0
- {ifcraftcorpus-1.5.0.dist-info → ifcraftcorpus-1.6.0.dist-info}/licenses/LICENSE-CONTENT +0 -0
ifcraftcorpus/index.py
CHANGED
|
@@ -84,8 +84,12 @@ def _sanitize_fts_query(query: str) -> str:
|
|
|
84
84
|
# - plus: FTS5 column weight
|
|
85
85
|
# - colon after words could affect column queries, but we preserve it
|
|
86
86
|
# to allow intentional column:value syntax
|
|
87
|
+
# - apostrophe: FTS5 string literal delimiter; deleted rather than
|
|
88
|
+
# replaced with space so contractions stay as whole words
|
|
89
|
+
# (e.g. "character's" → "characters" rather than "character s")
|
|
87
90
|
# Using str.translate is more efficient for replacing multiple single characters.
|
|
88
|
-
|
|
91
|
+
_replace = "-,(){}^+"
|
|
92
|
+
translation_table = str.maketrans(_replace, " " * len(_replace), "'")
|
|
89
93
|
sanitized = query.translate(translation_table)
|
|
90
94
|
# Collapse whitespace
|
|
91
95
|
return " ".join(sanitized.split())
|
|
@@ -552,6 +552,59 @@ class HybridMemoryConfig:
|
|
|
552
552
|
- Replace older messages with summary
|
|
553
553
|
- Continue with bounded context
|
|
554
554
|
|
|
555
|
+
### Tool Call Preservation
|
|
556
|
+
|
|
557
|
+
A critical mistake when trimming or formatting history: stripping tool calls and their results.
|
|
558
|
+
|
|
559
|
+
**The problem:**
|
|
560
|
+
|
|
561
|
+
```python
|
|
562
|
+
# WRONG: Converting to simple text format
|
|
563
|
+
def format_history(messages):
|
|
564
|
+
formatted = []
|
|
565
|
+
for msg in messages:
|
|
566
|
+
if msg.role == "user":
|
|
567
|
+
formatted.append(f"User: {msg.content}")
|
|
568
|
+
elif msg.role == "assistant":
|
|
569
|
+
formatted.append(f"Assistant: {msg.content}")
|
|
570
|
+
# Tool calls and results are silently dropped!
|
|
571
|
+
return formatted
|
|
572
|
+
```
|
|
573
|
+
|
|
574
|
+
**Why this fails:**
|
|
575
|
+
|
|
576
|
+
- Model loses context about what actions were taken
|
|
577
|
+
- Can't reason about results of previous operations
|
|
578
|
+
- May re-execute tools unnecessarily
|
|
579
|
+
- Breaks continuity for multi-step tool sequences
|
|
580
|
+
|
|
581
|
+
**Correct approach:**
|
|
582
|
+
|
|
583
|
+
```python
|
|
584
|
+
# RIGHT: Preserve full message structure
|
|
585
|
+
def format_history(messages):
|
|
586
|
+
"""Preserve tool calls and results in their native format."""
|
|
587
|
+
return [
|
|
588
|
+
{
|
|
589
|
+
"role": msg.role,
|
|
590
|
+
"content": msg.content,
|
|
591
|
+
# Preserve tool call metadata
|
|
592
|
+
**({"tool_calls": msg.tool_calls} if hasattr(msg, 'tool_calls') and msg.tool_calls else {}),
|
|
593
|
+
**({"tool_call_id": msg.tool_call_id} if hasattr(msg, 'tool_call_id') and msg.tool_call_id else {}),
|
|
594
|
+
}
|
|
595
|
+
for msg in messages
|
|
596
|
+
]
|
|
597
|
+
```
|
|
598
|
+
|
|
599
|
+
**Best practice**: Let frameworks handle history formatting. When you must custom-format:
|
|
600
|
+
|
|
601
|
+
| Message Type | Preserve |
|
|
602
|
+
|--------------|----------|
|
|
603
|
+
| User messages | Content |
|
|
604
|
+
| Assistant (text) | Content |
|
|
605
|
+
| Assistant (tool call) | Content + tool_calls array |
|
|
606
|
+
| Tool result | role="tool", content, tool_call_id |
|
|
607
|
+
|
|
555
608
|
---
|
|
556
609
|
|
|
557
610
|
## Multi-Agent Memory Sharing
|
|
@@ -13,6 +13,13 @@ topics:
|
|
|
13
13
|
- list-completeness
|
|
14
14
|
- validation-loops
|
|
15
15
|
- external-validation
|
|
16
|
+
- manifest-first
|
|
17
|
+
- scoped-identifiers
|
|
18
|
+
- error-classification
|
|
19
|
+
- sampling-parameters
|
|
20
|
+
- temperature
|
|
21
|
+
- output-diversity
|
|
22
|
+
- creativity-levels
|
|
16
23
|
cluster: agent-design
|
|
17
24
|
---
|
|
18
25
|
|
|
@@ -437,12 +444,177 @@ Top_p limits sampling to the smallest set of tokens whose cumulative probability
|
|
|
437
444
|
|
|
438
445
|
### Provider Temperature Ranges
|
|
439
446
|
|
|
447
|
+
Temperature ranges and behavior vary significantly across providers:
|
|
448
|
+
|
|
440
449
|
| Provider | Range | Default | Notes |
|
|
441
450
|
|----------|-------|---------|-------|
|
|
442
|
-
| OpenAI | 0.0–2.0 | 1.0 |
|
|
443
|
-
| Anthropic | 0.0–1.0 | 1.0 |
|
|
444
|
-
| Gemini | 0.0–2.0 | 1.0 |
|
|
445
|
-
|
|
|
451
|
+
| OpenAI | 0.0–2.0 | 1.0 | GPT-3.5 was 0.0–1.0; GPT-4+ expanded range |
|
|
452
|
+
| Anthropic | 0.0–1.0 | 1.0 | Hard cap at 1.0; more conservative at same value |
|
|
453
|
+
| Gemini | 0.0–2.0 | 1.0 | Gemini 3 recommends keeping at 1.0 for reasoning |
|
|
454
|
+
| DeepSeek | 0.0–2.0 | 1.0 | API temp 1.0 internally maps to 0.3 (see below) |
|
|
455
|
+
| Ollama | 0.0–1.0+ | 0.7–0.8 | Model-dependent; Qwen recommends 0.7 |
|
|
456
|
+
|
|
457
|
+
**DeepSeek temperature mapping:** DeepSeek implements an internal mapping where API temperature values are transformed before use. Notably, `temperature=1.0` sent via API is internally converted to `0.3`. This means DeepSeek at the "default" temperature behaves significantly more conservatively than other providers at the same nominal value.
|
|
458
|
+
|
|
459
|
+
**Cross-provider equivalence:** Research shows that "optimal settings are wildly model-dependent"—experiments have found nearly opposite configurations work best for the same task on different models. There is no universal cross-provider temperature mapping; the relationship between temperature values and output behavior varies by model architecture and training.
|
|
460
|
+
|
|
461
|
+
### Semantic Creativity Levels
|
|
462
|
+
|
|
463
|
+
Rather than using raw temperature values directly, consider defining semantic creativity levels that map to provider-appropriate values at runtime:
|
|
464
|
+
|
|
465
|
+
| Level | Intent | OpenAI | Anthropic | DeepSeek | Ollama |
|
|
466
|
+
|-------|--------|--------|-----------|----------|--------|
|
|
467
|
+
| Deterministic | Structured output, JSON, tool calls | 0.0 | 0.0 | 0.0 | 0.0 |
|
|
468
|
+
| Focused | Consistent with minimal variation | 0.3 | 0.3 | 1.0 | 0.3 |
|
|
469
|
+
| Balanced | Default for most tasks | 0.7 | 0.5 | 1.3 | 0.7 |
|
|
470
|
+
| Creative | Brainstorming, exploration | 1.0 | 0.8 | 1.5 | 0.9 |
|
|
471
|
+
| Experimental | Maximum diversity (coherence may degrade) | 1.5 | 1.0 | 2.0 | 1.0+ |
|
|
472
|
+
|
|
473
|
+
This abstraction allows code to express intent (`CreativityLevel.CREATIVE`) while handling provider differences in a single mapping layer.
|
|
474
|
+
|
|
475
|
+
**Implementation pattern:**
|
|
476
|
+
|
|
477
|
+
```python
|
|
478
|
+
from enum import Enum
|
|
479
|
+
|
|
480
|
+
class CreativityLevel(Enum):
|
|
481
|
+
DETERMINISTIC = "deterministic"
|
|
482
|
+
FOCUSED = "focused"
|
|
483
|
+
BALANCED = "balanced"
|
|
484
|
+
CREATIVE = "creative"
|
|
485
|
+
EXPERIMENTAL = "experimental"
|
|
486
|
+
|
|
487
|
+
TEMPERATURE_MAP = {
|
|
488
|
+
"openai": {
|
|
489
|
+
CreativityLevel.DETERMINISTIC: 0.0,
|
|
490
|
+
CreativityLevel.FOCUSED: 0.3,
|
|
491
|
+
CreativityLevel.BALANCED: 0.7,
|
|
492
|
+
CreativityLevel.CREATIVE: 1.0,
|
|
493
|
+
CreativityLevel.EXPERIMENTAL: 1.5,
|
|
494
|
+
},
|
|
495
|
+
"anthropic": {
|
|
496
|
+
CreativityLevel.DETERMINISTIC: 0.0,
|
|
497
|
+
CreativityLevel.FOCUSED: 0.3,
|
|
498
|
+
CreativityLevel.BALANCED: 0.5,
|
|
499
|
+
CreativityLevel.CREATIVE: 0.8,
|
|
500
|
+
CreativityLevel.EXPERIMENTAL: 1.0,
|
|
501
|
+
},
|
|
502
|
+
# ... other providers
|
|
503
|
+
}
|
|
504
|
+
```
|
|
505
|
+
|
|
506
|
+
### Provider Parameter Support
|
|
507
|
+
|
|
508
|
+
Not all sampling parameters are available across providers:
|
|
509
|
+
|
|
510
|
+
| Parameter | OpenAI | Anthropic | Gemini | DeepSeek | Ollama |
|
|
511
|
+
|-----------|--------|-----------|--------|----------|--------|
|
|
512
|
+
| temperature | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
513
|
+
| top_p | ✓ | ✓* | ✓ | ✓ | ✓ |
|
|
514
|
+
| top_k | ✗ | ✓ | ✓ | ✗ | ✓ |
|
|
515
|
+
| frequency_penalty | ✓ | ✗ | ✓ | ✓ | ✗ |
|
|
516
|
+
| presence_penalty | ✓ | ✗ | ✓ | ✓ | ✗ |
|
|
517
|
+
| seed | ✓ | ✗ | ✗ | ✓ | ✓ |
|
|
518
|
+
| min_p | ✗ | ✗ | ✗ | ✗ | ✓ |
|
|
519
|
+
| repeat_penalty | ✗ | ✗ | ✗ | ✗ | ✓ |
|
|
520
|
+
|
|
521
|
+
*Claude 4.5+ enforces mutual exclusion: temperature and top_p cannot both be specified.
|
|
522
|
+
|
|
523
|
+
**Anthropic's constraints:** Claude models lack frequency/presence penalties and seed parameters. Anthropic recommends using temperature alone and leaving other parameters at defaults.
|
|
524
|
+
|
|
525
|
+
**Ollama/local models:** Support additional parameters like min_p, repeat_penalty, and mirostat that aren't available via cloud APIs. These can be valuable for fine-tuning local model behavior.
|
|
526
|
+
|
|
527
|
+
### Additional Sampling Parameters
|
|
528
|
+
|
|
529
|
+
Beyond temperature and top_p, several other parameters affect output diversity:
|
|
530
|
+
|
|
531
|
+
**Min_p (local models):** Scales the truncation threshold based on the top token's probability. Unlike top_p's fixed threshold, min_p adapts to model confidence—more restrictive when the model is confident, more permissive when uncertain. This maintains coherence even at higher temperatures.
|
|
532
|
+
|
|
533
|
+
| Min_p | Effect |
|
|
534
|
+
|-------|--------|
|
|
535
|
+
| 0.0 | Disabled (Ollama default) |
|
|
536
|
+
| 0.05–0.1 | Recommended range; balances creativity and coherence |
|
|
537
|
+
| 0.2+ | More restrictive; reduces diversity |
|
|
538
|
+
|
|
539
|
+
**Frequency penalty (OpenAI, Gemini, DeepSeek):** Penalizes tokens proportionally to how often they've appeared. A token appearing 10 times receives a higher penalty than one appearing twice. Range: -2.0 to 2.0, default 0.0.
|
|
540
|
+
|
|
541
|
+
**Presence penalty (OpenAI, Gemini, DeepSeek):** Penalizes any repeated token equally, regardless of frequency. Encourages the model to introduce new topics. Range: -2.0 to 2.0, default 0.0.
|
|
542
|
+
|
|
543
|
+
**Repeat penalty (Ollama):** Similar to frequency penalty but operates on a sliding window of recent tokens. Values >1.0 discourage repetition. Start at 1.0–1.05; avoid exceeding 1.2 as it can degrade coherence.
|
|
544
|
+
|
|
545
|
+
**Mirostat (Ollama):** Adaptive algorithm that maintains target perplexity throughout generation. Dynamically adjusts sampling to balance coherence and diversity. When enabled, disable other sampling parameters (set top_p=1.0, top_k=0, min_p=0.0).
|
|
546
|
+
|
|
547
|
+
### Understanding Output Diversity
|
|
548
|
+
|
|
549
|
+
Temperature controls *token-level* randomness but does not guarantee *conceptual* diversity. Research has documented consistent patterns in LLM creative output:
|
|
550
|
+
|
|
551
|
+
**The "Echoes" phenomenon:** When generating multiple outputs for the same creative prompt, LLMs produce strikingly similar plot elements, narrative structures, and ideas—even at high temperatures. A study examining GPT-4 story continuations found that across 100 generations:
|
|
552
|
+
|
|
553
|
+
- 50/100 had a policeman giving directions to "take the second left"
|
|
554
|
+
- 18/100 directed to "take the second right"
|
|
555
|
+
- 16/100 mentioned a bakery as a landmark
|
|
556
|
+
|
|
557
|
+
These "echoes" repeat across generations at all semantic levels.
|
|
558
|
+
|
|
559
|
+
**Cross-model homogeneity:** LLM responses are more similar to *other LLM responses* than human responses are to each other—even across different model families. This isn't specific to any single model; it appears to be characteristic of how LLMs function.
|
|
560
|
+
|
|
561
|
+
**Why this happens:**
|
|
562
|
+
|
|
563
|
+
- Temperature affects which *tokens* are selected, not which *concepts* are explored
|
|
564
|
+
- Training data contains statistical regularities that models learn and reproduce
|
|
565
|
+
- Smaller models exhibit this more strongly due to narrower "creative paths" in their weights
|
|
566
|
+
- RLHF/preference tuning may further narrow the distribution of "acceptable" outputs
|
|
567
|
+
|
|
568
|
+
**Implications:**
|
|
569
|
+
|
|
570
|
+
- High temperature alone won't produce fundamentally different ideas
|
|
571
|
+
- Multiple generations with the same prompt will converge on similar structures
|
|
572
|
+
- This behavior is predictable and can be useful (consistency) or limiting (creative tasks)
|
|
573
|
+
|
|
574
|
+
### Techniques for Increasing Diversity
|
|
575
|
+
|
|
576
|
+
When varied outputs are desired, several techniques can help—used individually or in combination:
|
|
577
|
+
|
|
578
|
+
**Sampling parameter adjustments:**
|
|
579
|
+
|
|
580
|
+
| Technique | Effect | Trade-off |
|
|
581
|
+
|-----------|--------|-----------|
|
|
582
|
+
| Higher temperature (0.8–1.2) | More varied token selection | Coherence degrades at high values |
|
|
583
|
+
| Higher top_p (0.9–0.95) | Larger candidate pool | May introduce unlikely tokens |
|
|
584
|
+
| Min_p (0.05–0.1) | Maintains coherence at high temps | Local models only |
|
|
585
|
+
| Presence penalty (0.3–0.6) | Discourages concept reuse | May force awkward topic changes |
|
|
586
|
+
| Seed variation | Different random paths | Requires seed support |
|
|
587
|
+
|
|
588
|
+
**Prompt-based techniques:**
|
|
589
|
+
|
|
590
|
+
*Explicit diversity requests:*
|
|
591
|
+
|
|
592
|
+
```text
|
|
593
|
+
Generate an unusual or unexpected approach to this problem.
|
|
594
|
+
Avoid common tropes like [X, Y, Z].
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
*List prompting:*
|
|
598
|
+
|
|
599
|
+
```text
|
|
600
|
+
List 5 different approaches to this story opening, then select
|
|
601
|
+
the most unconventional one to develop.
|
|
602
|
+
```
|
|
603
|
+
|
|
604
|
+
*Verbalized sampling:* Ask the model to generate multiple responses with probabilities, then sample from the distribution's tails:
|
|
605
|
+
|
|
606
|
+
```text
|
|
607
|
+
Generate 5 possible story openings with estimated probability for each.
|
|
608
|
+
Then select one with probability < 0.10 to develop further.
|
|
609
|
+
```
|
|
610
|
+
|
|
611
|
+
This technique achieves 2–3× diversity improvement in benchmarks while maintaining quality, and works with any model via prompting.
|
|
612
|
+
|
|
613
|
+
**Structural approaches:**
|
|
614
|
+
|
|
615
|
+
- Vary the prompt itself across generations (different framings, constraints)
|
|
616
|
+
- Use different system prompts that prime different "creative modes"
|
|
617
|
+
- Chain outputs: use one generation's unexpected element as input for the next
|
|
446
618
|
|
|
447
619
|
### Phase-Specific Temperature
|
|
448
620
|
|
|
@@ -508,7 +680,204 @@ Cons:
|
|
|
508
680
|
Pattern in practice:
|
|
509
681
|
|
|
510
682
|
- Prefer tool-gated finalization when your stack treats tools as first-class.
|
|
511
|
-
- Keep a fallback: if the tool call doesn
|
|
683
|
+
- Keep a fallback: if the tool call doesn't happen, fall back to a serialize-only call using the freeze summary.
|
|
684
|
+
|
|
685
|
+
### Manifest-First Serialization
|
|
686
|
+
|
|
687
|
+
When LLMs must generate decisions for every item in a known set (entities, tensions, threads), **extraction-style prompts fail**. The manifest-first pattern prevents omission by construction.
|
|
688
|
+
|
|
689
|
+
#### The Problem: Extraction Mindset
|
|
690
|
+
|
|
691
|
+
Extraction prompts ask the LLM to find information in the context:
|
|
692
|
+
|
|
693
|
+
```markdown
|
|
694
|
+
# WRONG (extraction mindset)
|
|
695
|
+
Based on the discussion above, extract entity decisions.
|
|
696
|
+
Do NOT include entities not listed in the discussion.
|
|
697
|
+
```
|
|
698
|
+
|
|
699
|
+
**Why it fails:**
|
|
700
|
+
|
|
701
|
+
- Entities discovered via tool calls but not echoed in assistant text are "invisible"
|
|
702
|
+
- The LLM satisfies the prompt by omitting items it can't find
|
|
703
|
+
- Information loss compounds through pipeline stages
|
|
704
|
+
|
|
705
|
+
#### The Solution: Generation Mindset
|
|
706
|
+
|
|
707
|
+
Generation prompts frame each item as a **required output**:
|
|
708
|
+
|
|
709
|
+
```markdown
|
|
710
|
+
# CORRECT (generation mindset)
|
|
711
|
+
## Generation Requirements (CRITICAL)
|
|
712
|
+
|
|
713
|
+
You MUST generate a decision for EVERY entity ID listed below.
|
|
714
|
+
Missing items WILL fail validation.
|
|
715
|
+
|
|
716
|
+
Entity IDs (5 total):
|
|
717
|
+
1. entity::hero
|
|
718
|
+
2. entity::tavern
|
|
719
|
+
3. entity::sword
|
|
720
|
+
4. entity::dragon
|
|
721
|
+
5. entity::treasure
|
|
722
|
+
|
|
723
|
+
For EACH entity above, provide: [retain|cut] - justification
|
|
724
|
+
```
|
|
725
|
+
|
|
726
|
+
**Key differences:**
|
|
727
|
+
|
|
728
|
+
| Extraction Mindset | Generation Mindset |
|
|
729
|
+
|-------------------|-------------------|
|
|
730
|
+
| "Extract entities from context" | "Generate decision for EACH entity below" |
|
|
731
|
+
| "Do NOT include unlisted items" | "Missing items WILL fail validation" |
|
|
732
|
+
| Omission is compliance | Omission is failure |
|
|
733
|
+
| Post-hoc validation catches errors | Prevention by construction |
|
|
734
|
+
|
|
735
|
+
#### The Three Gates
|
|
736
|
+
|
|
737
|
+
Structure prompts with explicit prevention at each stage boundary:
|
|
738
|
+
|
|
739
|
+
| Gate | Stage Boundary | Mechanism |
|
|
740
|
+
|------|----------------|-----------|
|
|
741
|
+
| **Prevention** | Before Summarize | Manifest lists all IDs requiring decisions |
|
|
742
|
+
| **Enforcement** | Before Serialize | Count-based language ("Generate EXACTLY N") |
|
|
743
|
+
| **Validation** | After Serialize | Structural count check before semantic check |
|
|
744
|
+
|
|
745
|
+
**Gate 1: Prevention (Summarize Prompt)**
|
|
746
|
+
|
|
747
|
+
```markdown
|
|
748
|
+
## Required Decisions
|
|
749
|
+
|
|
750
|
+
You must include a decision for EVERY ID below:
|
|
751
|
+
|
|
752
|
+
Entity IDs: entity::hero | entity::tavern | entity::sword
|
|
753
|
+
Thread IDs: thread::host_motive | thread::butler_fidelity
|
|
754
|
+
|
|
755
|
+
Format: `id: [retain|cut] - justification`
|
|
756
|
+
```
|
|
757
|
+
|
|
758
|
+
**Gate 2: Enforcement (Serialize Prompt)**
|
|
759
|
+
|
|
760
|
+
```markdown
|
|
761
|
+
## Generation Requirements
|
|
762
|
+
|
|
763
|
+
Generate EXACTLY:
|
|
764
|
+
- 3 entity decisions (entity::hero, entity::tavern, entity::sword)
|
|
765
|
+
- 2 thread decisions (thread::host_motive, thread::butler_fidelity)
|
|
766
|
+
|
|
767
|
+
Missing items = validation failure. No exceptions.
|
|
768
|
+
```
|
|
769
|
+
|
|
770
|
+
**Gate 3: Validation (Code)**
|
|
771
|
+
|
|
772
|
+
```python
|
|
773
|
+
# Fast structural check BEFORE semantic validation
|
|
774
|
+
def validate_completeness(output, manifest):
|
|
775
|
+
if len(output.entities) != manifest["entity_count"]:
|
|
776
|
+
return CompletenessError(
|
|
777
|
+
f"Expected {manifest['entity_count']} entities, got {len(output.entities)}"
|
|
778
|
+
)
|
|
779
|
+
# Only proceed to semantic validation if counts match
|
|
780
|
+
return validate_semantics(output)
|
|
781
|
+
```
|
|
782
|
+
|
|
783
|
+
#### Count-Based vs String Parsing
|
|
784
|
+
|
|
785
|
+
Count-based validation is more reliable than parsing natural language:
|
|
786
|
+
|
|
787
|
+
```python
|
|
788
|
+
# FRAGILE: String parsing
|
|
789
|
+
if "all entities" in response.lower():
|
|
790
|
+
# Did they really include all?
|
|
791
|
+
|
|
792
|
+
# ROBUST: Count validation
|
|
793
|
+
if len(response.entities) == expected_count:
|
|
794
|
+
# Structural guarantee
|
|
795
|
+
```
|
|
796
|
+
|
|
797
|
+
### Scoped Identifiers
|
|
798
|
+
|
|
799
|
+
When outputs reference multiple ID types (entities, threads, locations, items), use **scoped identifiers** to prevent confusion and enable precise validation.
|
|
800
|
+
|
|
801
|
+
#### Format: `type::raw_id`
|
|
802
|
+
|
|
803
|
+
```
|
|
804
|
+
entity::hero
|
|
805
|
+
thread::host_motive
|
|
806
|
+
location::tavern_basement
|
|
807
|
+
item::rusty_sword
|
|
808
|
+
```
|
|
809
|
+
|
|
810
|
+
**Why scoping matters:**
|
|
811
|
+
|
|
812
|
+
Without scoping, the model (and validators) can confuse IDs across types:
|
|
813
|
+
|
|
814
|
+
```python
|
|
815
|
+
# AMBIGUOUS: Is "hero" an entity, location, or something else?
|
|
816
|
+
ids = ["hero", "tavern", "host_motive"]
|
|
817
|
+
|
|
818
|
+
# UNAMBIGUOUS: Type is explicit
|
|
819
|
+
ids = ["entity::hero", "location::tavern", "thread::host_motive"]
|
|
820
|
+
```
|
|
821
|
+
|
|
822
|
+
#### Benefits
|
|
823
|
+
|
|
824
|
+
| Benefit | Explanation |
|
|
825
|
+
|---------|-------------|
|
|
826
|
+
| **Disambiguation** | "tavern" as entity vs location is clear |
|
|
827
|
+
| **Validation** | Can validate against type-specific manifests |
|
|
828
|
+
| **Error messages** | "Unknown entity::hero" is more actionable than "Unknown ID: hero" |
|
|
829
|
+
| **Grep-ability** | `entity::` finds all entity references |
|
|
830
|
+
| **Model clarity** | Explicit types reduce hallucination of cross-type references |
|
|
831
|
+
|
|
832
|
+
#### Implementation
|
|
833
|
+
|
|
834
|
+
```python
|
|
835
|
+
from dataclasses import dataclass
|
|
836
|
+
from typing import Literal
|
|
837
|
+
|
|
838
|
+
@dataclass
|
|
839
|
+
class ScopedId:
|
|
840
|
+
type: Literal["entity", "thread", "location", "item"]
|
|
841
|
+
raw_id: str
|
|
842
|
+
|
|
843
|
+
def __str__(self) -> str:
|
|
844
|
+
return f"{self.type}::{self.raw_id}"
|
|
845
|
+
|
|
846
|
+
@classmethod
|
|
847
|
+
def parse(cls, scoped: str) -> "ScopedId":
|
|
848
|
+
if "::" not in scoped:
|
|
849
|
+
raise ValueError(f"Invalid scoped ID (missing '::'): {scoped}")
|
|
850
|
+
type_part, raw = scoped.split("::", 1)
|
|
851
|
+
return cls(type=type_part, raw_id=raw)
|
|
852
|
+
|
|
853
|
+
def validate_scoped_ids(output_ids: list[str], manifests: dict[str, set[str]]) -> list[str]:
|
|
854
|
+
"""Validate that all scoped IDs exist in their respective manifests."""
|
|
855
|
+
errors = []
|
|
856
|
+
for scoped in output_ids:
|
|
857
|
+
sid = ScopedId.parse(scoped)
|
|
858
|
+
if sid.type not in manifests:
|
|
859
|
+
errors.append(f"Unknown ID type: {sid.type}")
|
|
860
|
+
elif sid.raw_id not in manifests[sid.type]:
|
|
861
|
+
errors.append(f"Unknown {sid.type}::{sid.raw_id}")
|
|
862
|
+
return errors
|
|
863
|
+
```
|
|
864
|
+
|
|
865
|
+
#### Prompt Integration
|
|
866
|
+
|
|
867
|
+
Include scoping in both manifest and output format instructions:
|
|
868
|
+
|
|
869
|
+
```markdown
|
|
870
|
+
## Valid IDs (use exact format)
|
|
871
|
+
|
|
872
|
+
Entities: entity::hero | entity::tavern | entity::sword
|
|
873
|
+
Threads: thread::host_motive | thread::butler_fidelity
|
|
874
|
+
|
|
875
|
+
## Output Format
|
|
876
|
+
|
|
877
|
+
Each decision must use scoped ID format:
|
|
878
|
+
- `entity::hero: retain - central to plot`
|
|
879
|
+
- `thread::host_motive: cut - resolved in Act 1`
|
|
880
|
+
```
|
|
512
881
|
|
|
513
882
|
---
|
|
514
883
|
|
|
@@ -654,6 +1023,108 @@ Validate → feedback → repair is a general pattern:
|
|
|
654
1023
|
- Works for more informal artifacts (e.g., checklists, outlines) when combined with light-weight structural checks.
|
|
655
1024
|
- Plays well with the structured-output patterns above and with the reflection/self-critique patterns below.
|
|
656
1025
|
|
|
1026
|
+
### Enhanced Error Classification
|
|
1027
|
+
|
|
1028
|
+
Not all validation errors are equal. Categorizing errors by type enables targeted retry strategies and prevents wasted computation.
|
|
1029
|
+
|
|
1030
|
+
#### Error Categories
|
|
1031
|
+
|
|
1032
|
+
| Category | Trigger | Retry Strategy | Context |
|
|
1033
|
+
|----------|---------|----------------|---------|
|
|
1034
|
+
| **INNER** | Schema/format errors (JSON syntax, Pydantic failures) | Inner loop with targeted field hints | Name failing field, suggest fix |
|
|
1035
|
+
| **SEMANTIC** | Invalid references, impossible states | Outer loop—repair source | Valid references list, fuzzy match suggestions |
|
|
1036
|
+
| **COMPLETENESS** | Missing items from manifest | Outer loop with explicit count | Show expected count, list missing IDs |
|
|
1037
|
+
| **FATAL** | Unrecoverable (hallucinated structure, token limit) | Stop, surface error | Clear failure message |
|
|
1038
|
+
|
|
1039
|
+
#### Implementation Pattern
|
|
1040
|
+
|
|
1041
|
+
```python
|
|
1042
|
+
from enum import Enum, auto
|
|
1043
|
+
|
|
1044
|
+
class ErrorCategory(Enum):
|
|
1045
|
+
INNER = auto() # Schema/format - fast retry
|
|
1046
|
+
SEMANTIC = auto() # Invalid references - repair source
|
|
1047
|
+
COMPLETENESS = auto() # Missing manifest items - outer loop
|
|
1048
|
+
FATAL = auto() # Unrecoverable - stop
|
|
1049
|
+
|
|
1050
|
+
def categorize_error(error: ValidationError, manifest: set[str], output_ids: set[str]) -> ErrorCategory:
|
|
1051
|
+
"""Route error to appropriate retry strategy."""
|
|
1052
|
+
|
|
1053
|
+
# Schema errors are always INNER
|
|
1054
|
+
if isinstance(error, (PydanticError, JSONDecodeError)):
|
|
1055
|
+
return ErrorCategory.INNER
|
|
1056
|
+
|
|
1057
|
+
# Check for completeness against manifest
|
|
1058
|
+
missing = manifest - output_ids
|
|
1059
|
+
if missing:
|
|
1060
|
+
return ErrorCategory.COMPLETENESS
|
|
1061
|
+
|
|
1062
|
+
# Check for invented IDs (semantic error)
|
|
1063
|
+
invented = output_ids - manifest
|
|
1064
|
+
if invented:
|
|
1065
|
+
return ErrorCategory.SEMANTIC
|
|
1066
|
+
|
|
1067
|
+
# Unknown errors are FATAL
|
|
1068
|
+
return ErrorCategory.FATAL
|
|
1069
|
+
|
|
1070
|
+
def get_retry_context(category: ErrorCategory, error: ValidationError, valid_refs: list[str]) -> dict:
|
|
1071
|
+
"""Build appropriate context for retry based on error category."""
|
|
1072
|
+
|
|
1073
|
+
if category == ErrorCategory.INNER:
|
|
1074
|
+
return {
|
|
1075
|
+
"failing_field": error.field_name,
|
|
1076
|
+
"expected_type": error.expected_type,
|
|
1077
|
+
"suggestion": error.suggested_fix
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
elif category == ErrorCategory.SEMANTIC:
|
|
1081
|
+
invalid_id = error.invalid_reference
|
|
1082
|
+
fuzzy_matches = find_fuzzy_matches(invalid_id, valid_refs)
|
|
1083
|
+
return {
|
|
1084
|
+
"invalid_reference": invalid_id,
|
|
1085
|
+
"valid_references": valid_refs,
|
|
1086
|
+
"did_you_mean": fuzzy_matches[:3]
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
elif category == ErrorCategory.COMPLETENESS:
|
|
1090
|
+
return {
|
|
1091
|
+
"expected_count": len(manifest),
|
|
1092
|
+
"received_count": len(output_ids),
|
|
1093
|
+
"missing_ids": list(manifest - output_ids)
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
else: # FATAL
|
|
1097
|
+
return {"error": str(error), "action": "surface_to_user"}
|
|
1098
|
+
```
|
|
1099
|
+
|
|
1100
|
+
#### Category-Specific Prompts
|
|
1101
|
+
|
|
1102
|
+
**For INNER errors:**
|
|
1103
|
+
|
|
1104
|
+
```text
|
|
1105
|
+
Field `{failing_field}` has wrong type.
|
|
1106
|
+
Expected: {expected_type}
|
|
1107
|
+
Received: {received_value}
|
|
1108
|
+
Fix only this field and regenerate.
|
|
1109
|
+
```
|
|
1110
|
+
|
|
1111
|
+
**For SEMANTIC errors:**
|
|
1112
|
+
|
|
1113
|
+
```text
|
|
1114
|
+
Reference `{invalid_reference}` does not exist.
|
|
1115
|
+
Valid references: {valid_references}
|
|
1116
|
+
Did you mean: {did_you_mean}?
|
|
1117
|
+
Regenerate the source with a valid reference.
|
|
1118
|
+
```
|
|
1119
|
+
|
|
1120
|
+
**For COMPLETENESS errors:**
|
|
1121
|
+
|
|
1122
|
+
```text
|
|
1123
|
+
Expected {expected_count} decisions, received {received_count}.
|
|
1124
|
+
Missing: {missing_ids}
|
|
1125
|
+
Generate decisions for ALL items, including the missing ones.
|
|
1126
|
+
```
|
|
1127
|
+
|
|
657
1128
|
### Two-Level Feedback Architecture
|
|
658
1129
|
|
|
659
1130
|
Simple validation loops assume errors can be fixed by repairing the output. But some errors originate earlier in the pipeline—the output is wrong because the *input* was wrong. A two-level architecture handles both cases.
|
|
@@ -964,6 +1435,12 @@ See [Sampling Parameters](#sampling-parameters) for detailed temperature guidanc
|
|
|
964
1435
|
| Quantity anchoring | Incomplete list processing | State exact count at start AND end |
|
|
965
1436
|
| Anti-skipping statements | Middle items ignored | Explicit "process all N" constraints |
|
|
966
1437
|
| Two-level validation | Broken input propagation | Outer loop repairs source, inner repairs output |
|
|
1438
|
+
| Manifest-first | Extraction failures, missing items | Provide complete ID list before generation |
|
|
1439
|
+
| Three gates | Item omission in generation | Prevention → Enforcement → Validation |
|
|
1440
|
+
| Error classification | Wasted retry computation | Route INNER/SEMANTIC/COMPLETENESS/FATAL separately |
|
|
1441
|
+
| Scoped identifiers | ID confusion across types | `type::raw_id` format (entity::hero) |
|
|
1442
|
+
| Semantic creativity levels | Cross-provider temperature differences | Abstract intent, map to provider values |
|
|
1443
|
+
| Verbalized sampling | LLM output homogeneity | Generate multiple + sample from tails |
|
|
967
1444
|
|
|
968
1445
|
| Model Class | Max Prompt | Max Tools | Strategy |
|
|
969
1446
|
|-------------|------------|-----------|----------|
|
|
@@ -987,6 +1464,13 @@ See [Sampling Parameters](#sampling-parameters) for detailed temperature guidanc
|
|
|
987
1464
|
| LLM Self-Verification Limitations (2024) | LLMs cannot reliably self-verify; external validation required |
|
|
988
1465
|
| Spotify Verification Loops (2025) | Inner/outer loop architecture; deterministic + semantic validation |
|
|
989
1466
|
| LLMLOOP (ICSME 2025) | First feedback iteration has highest impact (up to 24% improvement) |
|
|
1467
|
+
| QuestFoundry #211 | Manifest-first serialization; extraction mindset fails on generation tasks |
|
|
1468
|
+
| Renze & Guven (EMNLP 2024) | Temperature 0.0–1.0 has no significant impact on problem-solving performance |
|
|
1469
|
+
| "Echoes in AI" (PNAS 2025) | LLM outputs contain repeated plot elements across generations (Sui Generis score) |
|
|
1470
|
+
| "Creative Homogeneity" (2025) | LLM responses more similar to each other than human responses |
|
|
1471
|
+
| Min-p Sampling (2024) | Adaptive truncation maintains coherence at high temperatures |
|
|
1472
|
+
| Verbalized Sampling (CHATS-lab) | 2–3× diversity improvement via prompting technique |
|
|
1473
|
+
| DeepSeek API Docs | Temperature mapping: API 1.0 → internal 0.3 |
|
|
990
1474
|
|
|
991
1475
|
---
|
|
992
1476
|
|
|
@@ -373,6 +373,8 @@ Understand WHY the trope resonates, then fulfill that emotional contract in fres
|
|
|
373
373
|
|
|
374
374
|
**Act 2: Initiation**
|
|
375
375
|
|
|
376
|
+
<!-- markdownlint-disable MD029 -->
|
|
377
|
+
|
|
376
378
|
6. Tests, Allies, Enemies
|
|
377
379
|
7. Approach to Innermost Cave
|
|
378
380
|
8. Ordeal
|
|
@@ -384,6 +386,8 @@ Understand WHY the trope resonates, then fulfill that emotional contract in fres
|
|
|
384
386
|
11. Resurrection
|
|
385
387
|
12. Return with Elixir
|
|
386
388
|
|
|
389
|
+
<!-- markdownlint-enable MD029 -->
|
|
390
|
+
|
|
387
391
|
**For Interactive Fiction:**
|
|
388
392
|
|
|
389
393
|
- Structure accommodates branching
|
|
@@ -139,9 +139,9 @@ Consistency matters more than the exact level. Sudden unmotivated jumps between
|
|
|
139
139
|
|
|
140
140
|
Example:
|
|
141
141
|
|
|
142
|
-
> Lena hated this alley; it always smelled like rot. She wondered if she
|
|
143
|
-
>
|
|
144
|
-
> Marcus watched her approach, both excited and afraid she
|
|
142
|
+
> Lena hated this alley; it always smelled like rot. She wondered if she'd made a mistake coming alone.
|
|
143
|
+
>
|
|
144
|
+
> Marcus watched her approach, both excited and afraid she'd see the knife hidden in his sleeve.
|
|
145
145
|
|
|
146
146
|
Both internal states appear in one continuous moment without transition; the camera leaps from inside Lena to inside Marcus.
|
|
147
147
|
|
|
@@ -282,4 +282,3 @@ This POV guidance connects to several other craft concerns:
|
|
|
282
282
|
- [Voice Register Consistency](voice_register_consistency.md) — Maintaining voice and register
|
|
283
283
|
- [Branching Narrative Construction](../narrative-structure/branching_narrative_construction.md) — Structural patterns, multi-POV arcs
|
|
284
284
|
- [Scene Structure and Beats](../narrative-structure/scene_structure_and_beats.md) — Scene framing and camera movement
|
|
285
|
-
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ifcraftcorpus
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.6.0
|
|
4
4
|
Summary: Interactive fiction craft corpus with search library and MCP server
|
|
5
5
|
Project-URL: Homepage, https://pvliesdonk.github.io/if-craft-corpus
|
|
6
6
|
Project-URL: Repository, https://github.com/pvliesdonk/if-craft-corpus
|
|
@@ -1,68 +1,68 @@
|
|
|
1
1
|
ifcraftcorpus/__init__.py,sha256=sZlp_jM2CGbkQ6R3te-wXH9IkZ7Zp585fj1MMq21WUQ,2087
|
|
2
2
|
ifcraftcorpus/cli.py,sha256=aTLZCuSTZ9884nxvngj2RX1VHl9PXKVMMeYAQIVMU6I,11131
|
|
3
3
|
ifcraftcorpus/embeddings.py,sha256=ChRqB1HSCAImczARQQ0Vg_xS5fMPnvd2cg2tFzVaSDc,12962
|
|
4
|
-
ifcraftcorpus/index.py,sha256=
|
|
4
|
+
ifcraftcorpus/index.py,sha256=GPeI-q98yu0FRHjLHmrj0uwOuuecAXgFVzyv_okJqnk,22496
|
|
5
5
|
ifcraftcorpus/logging_utils.py,sha256=_0c4Y_caKObVRsfgeoi5l5ZvSx0JY_xZDnWa85sBUu0,2179
|
|
6
6
|
ifcraftcorpus/mcp_server.py,sha256=z7JKCfGKzQOypBDly5ou0mnlCOrA5p7NVSj9p0iKbvQ,28069
|
|
7
7
|
ifcraftcorpus/parser.py,sha256=M6iKnj0_bqA8tgl7tg1SLYzlOItS_Bs2M1RTwqTTFbw,10859
|
|
8
8
|
ifcraftcorpus/providers.py,sha256=1cuaB72-fVyt2J441AR7lfn6HuHtM33G6mPZYdYREN0,14508
|
|
9
9
|
ifcraftcorpus/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
ifcraftcorpus/search.py,sha256=hz81U44qXb-ZLbAcgDKsj4H_9t1ESxorRWsGSiuHu2I,20962
|
|
11
|
-
ifcraftcorpus-1.
|
|
12
|
-
ifcraftcorpus-1.
|
|
13
|
-
ifcraftcorpus-1.
|
|
14
|
-
ifcraftcorpus-1.
|
|
15
|
-
ifcraftcorpus-1.
|
|
16
|
-
ifcraftcorpus-1.
|
|
17
|
-
ifcraftcorpus-1.
|
|
18
|
-
ifcraftcorpus-1.
|
|
19
|
-
ifcraftcorpus-1.
|
|
20
|
-
ifcraftcorpus-1.
|
|
21
|
-
ifcraftcorpus-1.
|
|
22
|
-
ifcraftcorpus-1.
|
|
23
|
-
ifcraftcorpus-1.
|
|
24
|
-
ifcraftcorpus-1.
|
|
25
|
-
ifcraftcorpus-1.
|
|
26
|
-
ifcraftcorpus-1.
|
|
27
|
-
ifcraftcorpus-1.
|
|
28
|
-
ifcraftcorpus-1.
|
|
29
|
-
ifcraftcorpus-1.
|
|
30
|
-
ifcraftcorpus-1.
|
|
31
|
-
ifcraftcorpus-1.
|
|
32
|
-
ifcraftcorpus-1.
|
|
33
|
-
ifcraftcorpus-1.
|
|
34
|
-
ifcraftcorpus-1.
|
|
35
|
-
ifcraftcorpus-1.
|
|
36
|
-
ifcraftcorpus-1.
|
|
37
|
-
ifcraftcorpus-1.
|
|
38
|
-
ifcraftcorpus-1.
|
|
39
|
-
ifcraftcorpus-1.
|
|
40
|
-
ifcraftcorpus-1.
|
|
41
|
-
ifcraftcorpus-1.
|
|
42
|
-
ifcraftcorpus-1.
|
|
43
|
-
ifcraftcorpus-1.
|
|
44
|
-
ifcraftcorpus-1.
|
|
45
|
-
ifcraftcorpus-1.
|
|
46
|
-
ifcraftcorpus-1.
|
|
47
|
-
ifcraftcorpus-1.
|
|
48
|
-
ifcraftcorpus-1.
|
|
49
|
-
ifcraftcorpus-1.
|
|
50
|
-
ifcraftcorpus-1.
|
|
51
|
-
ifcraftcorpus-1.
|
|
52
|
-
ifcraftcorpus-1.
|
|
53
|
-
ifcraftcorpus-1.
|
|
54
|
-
ifcraftcorpus-1.
|
|
55
|
-
ifcraftcorpus-1.
|
|
56
|
-
ifcraftcorpus-1.
|
|
57
|
-
ifcraftcorpus-1.
|
|
58
|
-
ifcraftcorpus-1.
|
|
59
|
-
ifcraftcorpus-1.
|
|
60
|
-
ifcraftcorpus-1.
|
|
61
|
-
ifcraftcorpus-1.
|
|
62
|
-
ifcraftcorpus-1.
|
|
63
|
-
ifcraftcorpus-1.
|
|
64
|
-
ifcraftcorpus-1.
|
|
65
|
-
ifcraftcorpus-1.
|
|
66
|
-
ifcraftcorpus-1.
|
|
67
|
-
ifcraftcorpus-1.
|
|
68
|
-
ifcraftcorpus-1.
|
|
11
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/agent-design/agent_memory_architecture.md,sha256=oXI6Iat0Iwj79kG0K9o9HpTbmlIzRecCJEcRHSe3_Y0,24107
|
|
12
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/agent-design/agent_prompt_engineering.md,sha256=n8HSicYx_06xsuJnDBcX5g5HjzKFVSFzTv2i5_OAd1I,55413
|
|
13
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/agent-design/multi_agent_patterns.md,sha256=9bm-q3O9v8_aS2B2CMNJwluTM9w8aAYwt-KvIKQJuO0,13391
|
|
14
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/audience-and-access/accessibility_guidelines.md,sha256=SN8tORkgdYYSIcKNQBV-ju8eL2M7Lij9UEZ3AvuUQbY,9892
|
|
15
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/audience-and-access/audience_targeting.md,sha256=ESZ4fyiCgtWVXXrXZIViCNU0ohIFdNcC8CU9dkRfPSQ,11037
|
|
16
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/audience-and-access/localization_considerations.md,sha256=Mgn2bVN_ugFhsZjRomOstayylzFtrzza-lw-T2p3Lnw,9787
|
|
17
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/craft-foundations/audio_visual_integration.md,sha256=YE6pdZr7FNe9VIodgF0xttmzSjfZf0guQ81N3Rbkui4,9892
|
|
18
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/craft-foundations/collaborative_if_writing.md,sha256=inDHVyqP3zdP-WBWueeKvDb9Ulqu55AUK61lbhIC82w,9929
|
|
19
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/craft-foundations/creative_workflow_pipeline.md,sha256=N5ieILKrKB06hrlegFX-5iOvpXQO8sT5MERiFxxRGZY,10305
|
|
20
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/craft-foundations/diegetic_design.md,sha256=FsLT2o3D8znEZrHRzg0L_z0sbg58yTzUk8O70FtGGcE,9183
|
|
21
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/craft-foundations/idea_capture_and_hooks.md,sha256=wcidi47Elg38Y-1fuVEW6xn68rL_NqPR5x1IcsPu6ZI,8734
|
|
22
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/craft-foundations/if_platform_tools.md,sha256=1Kh_xYjy654RkDxVAw5Ji3pgOKRc1WNdxNu93v9Af3Y,11172
|
|
23
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/craft-foundations/player_analytics_metrics.md,sha256=sUuPYmmLn5LMLUd9E-ExhauqF101vcqh51NYc99yyv8,9064
|
|
24
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/craft-foundations/quality_standards_if.md,sha256=gS6Jr7OWZKmRvtrSrrCkuM8CgqgLCZ1XAHYBSnbEYH8,16432
|
|
25
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/craft-foundations/research_and_verification.md,sha256=WFYaq3boUlHueXWkZygxO9s9astK5aMOaVPE6u-CCeI,9874
|
|
26
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/craft-foundations/testing_interactive_fiction.md,sha256=McnbMEgm_PbaxT-dUu8rTzkOOLkIjECKlxVFzcyr7rc,10504
|
|
27
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/emotional-design/conflict_patterns.md,sha256=hPV78jR8W4rYiW52m4n_Ifn3nMGDW7tPEPik4kekiIE,12056
|
|
28
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/emotional-design/emotional_beats.md,sha256=1yblsg1NLT8CW3qfnQX7WXNflnQhyKYc-_9nb1zgWs4,10229
|
|
29
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/game-design/mechanics_design_patterns.md,sha256=sbBWhX8BQOIMyrYfdBjpjlhLeqE_vOuGQXXGFn-zY0U,4506
|
|
30
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/genre-conventions/children_and_ya_conventions.md,sha256=b5juJi2z3FMYKL5Tkw08E1jjtlvQdMy3sbDoU0PV88w,3680
|
|
31
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/genre-conventions/fantasy_conventions.md,sha256=ugMsf35bsSSGVDOYPUUcYms39_H9S8oOgRp-lA0UWns,13998
|
|
32
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/genre-conventions/historical_fiction.md,sha256=6mAgLSfAD2EV-UCE5WJM1Wk4ARsCuYofKR3Dn0Kcfhg,12016
|
|
33
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/genre-conventions/horror_conventions.md,sha256=449Ik17haBHnlIfGkh6FwDqoes8K-y7WKNimGxSq5yg,12883
|
|
34
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/genre-conventions/mystery_conventions.md,sha256=xZLCcO3MZJ4dghzoMbITZUc1A7xGpSL1B9LtR74Fhj4,12282
|
|
35
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/genre-conventions/sci_fi_conventions.md,sha256=dNkeIipLgtui2Xt6kPlEHT0HHNnCbPDFBQyH_5-1RfQ,5636
|
|
36
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/narrative-structure/branching_narrative_construction.md,sha256=Rv8t7zn4g3K6mF1NaHYXAX_vEAdUFcfa-aDA44bAOqs,22265
|
|
37
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/narrative-structure/branching_narrative_craft.md,sha256=I4APmDwCQ9dVF9blORxgF_YArfj9aSrTP8TpXJYI-jA,10906
|
|
38
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/narrative-structure/endings_patterns.md,sha256=RyxJfZuFyuyEKzmR32H9kBs4jUbeahwylNLkp2oiEjg,10581
|
|
39
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/narrative-structure/episodic_serialized_if.md,sha256=tEGRl-L3gRTXmbfoQZ-fCS2CR9xr-dHQgaQNcI4hHdA,9337
|
|
40
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/narrative-structure/nonlinear_structure.md,sha256=PfomsB5-l7DwGr1udbvgsTNdJaCdXgLhdYDvBUyKq2k,6287
|
|
41
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/narrative-structure/pacing_and_tension.md,sha256=0jlbJwzK2wNLxFQO4zHu6a53vM1Kwb6f5simamexKBU,9530
|
|
42
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/narrative-structure/romance_and_relationships.md,sha256=OW3nO9Qn_lCFWRGNyTKQMEOHnmuAA9rIo7wORaF_73U,4012
|
|
43
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/narrative-structure/scene_structure_and_beats.md,sha256=WL7buciBLTcl0vyTsLZcEgMI0U6ikA2t0EY9QkKpkJk,10094
|
|
44
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/narrative-structure/scene_transitions.md,sha256=Vu33QmpqWRnja4ITvcJepZ2f1NxK6fdwlroJUsczc1c,8500
|
|
45
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/prose-and-language/character_voice.md,sha256=gFQptHphCu9pZ2MzqaCVHvpSiHCefi4vBrwZtsfN0R8,11409
|
|
46
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/prose-and-language/dialogue_craft.md,sha256=4aQed24AQ7-VdYiaxjQ0JlK13qeNe3Gq1QgJiAqNEG4,11591
|
|
47
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/prose-and-language/exposition_techniques.md,sha256=T06IupDgh7MHQDkhHzo5U0ewDqGs5D60nGFn1V2NV-A,10023
|
|
48
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/prose-and-language/narrative_point_of_view.md,sha256=R3e-sU_kyX5QYA5JO122VSlywykzDg85I6QdLV_KHmc,11011
|
|
49
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/prose-and-language/prose_patterns.md,sha256=UFEancpG4_TG3M7KnJGkZCvkafP6TxkhXEKEZgFPWug,10146
|
|
50
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/prose-and-language/subtext_and_implication.md,sha256=jKwBTZx5gVy84AG6x2hHmPwbFIiti419-DaDO4oXlH8,10726
|
|
51
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/prose-and-language/voice_register_consistency.md,sha256=JtY5bwIrrY1Cjy2ITGOGxCepDhoQnr7nzt2pqr2SKtI,9701
|
|
52
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/scope-and-planning/scope_and_length.md,sha256=fF6TDuLSJv5Uf7ov9_Eq0beh8OQF4RBEDmekjZbHkJQ,10315
|
|
53
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/world-and-setting/canon_management.md,sha256=ab1XjWXv3RzEWaChfUJOOSnRKjuQsUDaqYQ3T9bw9o0,10576
|
|
54
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/world-and-setting/setting_as_character.md,sha256=F0kM5EKlDldqPg2UyyfKx05fRyaWIoE-A-sIhl461Cw,9650
|
|
55
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/corpus/world-and-setting/worldbuilding_patterns.md,sha256=IpvZkT6sV3yC23RsICxpeMgb_FT_1mkv1z4NiHKNEIY,11905
|
|
56
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/subagents/README.md,sha256=FI9SqJfOg8hoO-3S_dpeIfepPRcd0fyquM7f5Y1J5eE,5817
|
|
57
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/subagents/if_genre_consultant.md,sha256=QshDQK4HkMNXYigU91r0CTosl5a-lKqvO9tQMFkbUFI,7244
|
|
58
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/subagents/if_platform_advisor.md,sha256=e_uV0vt5Nqah6bUNsiWVhmSuQeF0RIWAZOXJNygpeW8,8515
|
|
59
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/subagents/if_prose_writer.md,sha256=fjOazUCXvW62xrhZAsv7ynaDSpG_f1gGK2NJ0clJ1EQ,5927
|
|
60
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/subagents/if_quality_reviewer.md,sha256=PLPJtf-6t-jugN75k7EG7ln7S47TT0FcVjWVsRLGOz8,6992
|
|
61
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/subagents/if_story_architect.md,sha256=rF_U0Nd3tK0HzaLK6wGL36hRb0B6dfuc6lljAU9pmmo,4936
|
|
62
|
+
ifcraftcorpus-1.6.0.data/data/share/ifcraftcorpus/subagents/if_world_curator.md,sha256=xmbGF--5te8uxfimKFw45bFrhbdRM3LPaYBlhUd4swc,7376
|
|
63
|
+
ifcraftcorpus-1.6.0.dist-info/METADATA,sha256=ZCI4bgyk-OdzRaH1N52VEdhNh5HHwHypqyYdKfL2s64,4989
|
|
64
|
+
ifcraftcorpus-1.6.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
65
|
+
ifcraftcorpus-1.6.0.dist-info/entry_points.txt,sha256=E8DYJ_qWOgPe758ULKth3gcYo-1XkNEvDomhFjJ-B-U,110
|
|
66
|
+
ifcraftcorpus-1.6.0.dist-info/licenses/LICENSE,sha256=7MoRwpgeEClx14esn2SJnOLz4jvxWP1uN_vjnC2XTHQ,1067
|
|
67
|
+
ifcraftcorpus-1.6.0.dist-info/licenses/LICENSE-CONTENT,sha256=jhGwmahhy9rUFJSSrLUrssnrfa-mXotvNEwq74i93x8,639
|
|
68
|
+
ifcraftcorpus-1.6.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ifcraftcorpus-1.5.0.data → ifcraftcorpus-1.6.0.data}/data/share/ifcraftcorpus/subagents/README.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|