Clean em-dashes and smart quotes from markdown files
This commit is contained in:
@@ -9,11 +9,11 @@ Inja is a C++ Jinja2-inspired template engine. It looks similar but is **strictl
|
||||
### Key differences from Jinja2 worth knowing
|
||||
|
||||
- **Limited filter set.** Standard Jinja filters like `default`, `upper`, `length`, `join`, `sort` are present; less common ones may not be.
|
||||
- **`{% set %}` only affects render context** — does NOT mutate input data.
|
||||
- **Array manipulation functions return new arrays** — `append`, `extend`, etc. don't modify originals.
|
||||
- **`{% set %}` only affects render context** - does NOT mutate input data.
|
||||
- **Array manipulation functions return new arrays** - `append`, `extend`, etc. don't modify originals.
|
||||
- **Template inheritance is limited:** `{% extends "..." %}` + `{% block name %}...{% endblock %}` works; multiple inheritance does not.
|
||||
- **No macros** in the Jinja2 sense.
|
||||
- **Backslashed paths in includes:** `render_template("components\\event_history_compact")` — the `\\` is the path separator in include calls.
|
||||
- **Backslashed paths in includes:** `render_template("components\\event_history_compact")` - the `\\` is the path separator in include calls.
|
||||
|
||||
### SkyrimNet-specific Inja extensions
|
||||
|
||||
@@ -33,19 +33,19 @@ Inja is a C++ Jinja2-inspired template engine. It looks similar but is **strictl
|
||||
```
|
||||
|
||||
**Special blocks:**
|
||||
- `[ raw ] ... [ end raw ]` — prevents Inja parsing of `{{...}}` etc. Used for embedded examples that contain template syntax literally.
|
||||
- `[ cache ] ... [ end cache ]` — marks a block as cacheable for prompt caching across requests.
|
||||
- `[ raw ] ... [ end raw ]` - prevents Inja parsing of `{{...}}` etc. Used for embedded examples that contain template syntax literally.
|
||||
- `[ cache ] ... [ end cache ]` - marks a block as cacheable for prompt caching across requests.
|
||||
|
||||
**Include functions:**
|
||||
- `render_template("path\\with\\backslashes")` — include another `.prompt` from `prompts/`.
|
||||
- `render_subcomponent("subdir", render_mode)` — render numbered submodules from a subdir in load order.
|
||||
- `render_character_profile("mode", uuid)` — render an NPC's bio with a render mode (`full`, `target`, `transform`, `thoughts`, `short_inline`, `interject_inline`).
|
||||
- `render_template("path\\with\\backslashes")` - include another `.prompt` from `prompts/`.
|
||||
- `render_subcomponent("subdir", render_mode)` - render numbered submodules from a subdir in load order.
|
||||
- `render_character_profile("mode", uuid)` - render an NPC's bio with a render mode (`full`, `target`, `transform`, `thoughts`, `short_inline`, `interject_inline`).
|
||||
|
||||
**Decorators** (DLL-registered functions callable from templates):
|
||||
- `decnpc(uuid)` — universal NPC info accessor; returns object with `name`, `firstName`, `lastName`, `race`, `gender`, pronouns (`subjectivePronoun`, `objectivePronoun`, `possessivePronoun`, `reflexivePronoun`), `level`, `health`, `magicka`, `stamina`, `faction[]`, `isInCombat`, `isHostile`, `isDead`, `isBusy`, all skill values.
|
||||
- `decnpc(uuid)` - universal NPC info accessor; returns object with `name`, `firstName`, `lastName`, `race`, `gender`, pronouns (`subjectivePronoun`, `objectivePronoun`, `possessivePronoun`, `reflexivePronoun`), `level`, `health`, `magicka`, `stamina`, `faction[]`, `isInCombat`, `isHostile`, `isDead`, `isBusy`, all skill values.
|
||||
- 30+ other decorators observed in trace dump: `is_in_faction`, `is_player`, `get_arousal_state`, `format_event`, `short_time`, `get_name`, `get_nearby_npc_list`, `get_recent_events`, `get_quest_stage`, `is_narration_enabled`, `get_relevant_memories`, `get_scene_context`, `get_world_knowledge`, `papyrus_util`, `outfit_context`, etc.
|
||||
|
||||
`[unknown]` Full decorator list with signatures — dynamically generated by the DLL via `prompts/documentation/main.prompt`. Would require dumping the in-game web UI's `/api/documentation` endpoint to enumerate.
|
||||
`[unknown]` Full decorator list with signatures - dynamically generated by the DLL via `prompts/documentation/main.prompt`. Would require dumping the in-game web UI's `/api/documentation` endpoint to enumerate.
|
||||
|
||||
---
|
||||
|
||||
@@ -59,7 +59,7 @@ Load priority **high → low** (later layers shadow earlier ones for the same pa
|
||||
| 2 | `mods/SkyrimNet/SKSE/Plugins/SkyrimNet/prompts/` | **Shipped baseline + dev/user edits.** | Where our `gamemaster_action_selector.prompt` fix lives. The `.backup` from the fix is here too: `gamemaster_action_selector.prompt.backup`. |
|
||||
| 3 | `mods/SkyrimNet/SKSE/Plugins/SkyrimNet/original_prompts/` | **Pristine upstream baseline.** Useful for diffing to detect upstream changes. | `[hypothesis]` Only `characters/` and `submodules/system_head/` are populated; the rest of upstream prompts may be assumed copied to `prompts/` at install time, or this directory only holds pristine *overrideable* defaults. |
|
||||
|
||||
**Practical implication:** before editing any prompt, check if a runtime override exists in `overwrite/prompts/`. If it does, *that* is the active version — editing in `mods/prompts/` will be silently shadowed.
|
||||
**Practical implication:** before editing any prompt, check if a runtime override exists in `overwrite/prompts/`. If it does, *that* is the active version - editing in `mods/prompts/` will be silently shadowed.
|
||||
|
||||
`[verified]` overlay pattern is the same shape as Linux `/etc/foo.conf` + `/etc/foo.conf.d/` + package defaults.
|
||||
|
||||
@@ -76,7 +76,7 @@ Submodules in `prompts/submodules/<category>/` are loaded in numerical filename
|
||||
| `0500_…0799_` | Guidelines and behavioral rules | `0750_embedded_actions.prompt` (the ACTION: format spec) |
|
||||
| `0800_…0999_` | Late instructions and special toggles | direct narration, recent state changes |
|
||||
| `7000_…7999_` | Memories and progression | NPC memory blocks |
|
||||
| `9990_` | Speech style — rendered last to override earlier voice instructions | speech style submodules |
|
||||
| `9990_` | Speech style - rendered last to override earlier voice instructions | speech style submodules |
|
||||
|
||||
Earlier numbers establish baseline; higher numbers customize/override. Fits the late-binding-wins pattern.
|
||||
|
||||
@@ -107,10 +107,10 @@ Earlier numbers establish baseline; higher numbers customize/override. Fits the
|
||||
|
||||
---
|
||||
|
||||
## Editing prompts safely — checklist
|
||||
## Editing prompts safely - checklist
|
||||
|
||||
1. **Is there an override in `overwrite/prompts/`?** If yes, that's the active version. Edit it (the in-game UI does this) or delete it to fall back to `mods/prompts/`.
|
||||
2. **Diff against `original_prompts/`** to see what the upstream baseline says.
|
||||
3. **Make a `.backup` next to the file** before significant edits — SkyrimNet itself does this convention with epoch-stamped backups; we use the simpler `.backup` suffix.
|
||||
4. **Hot-reload picks up changes** — no need to restart Skyrim for prompt edits, but model behavior may take effect on the next agent firing.
|
||||
5. **Test against logs** — watch `openrouter_input.log` to see what prompt text the model actually receives after your edit.
|
||||
3. **Make a `.backup` next to the file** before significant edits - SkyrimNet itself does this convention with epoch-stamped backups; we use the simpler `.backup` suffix.
|
||||
4. **Hot-reload picks up changes** - no need to restart Skyrim for prompt edits, but model behavior may take effect on the next agent firing.
|
||||
5. **Test against logs** - watch `openrouter_input.log` to see what prompt text the model actually receives after your edit.
|
||||
|
||||
Reference in New Issue
Block a user