feat: Merge 05-Plot and 06-First Draft into 05-First Draft with YAML frontmatter

- Add YAML frontmatter support with split_yaml_frontmatter() in preprocess.rs
- Update create_scene_pair to create single merged files with YAML frontmatter
- Rename 06-First Draft to 05-First Draft and merge with 05-Plot content
- Update default_project_open_subdir to '05-First Draft'
- Add capitalizes filter to MiniJinja environment for template rendering
- Fix template placeholder escaping in CONSISTENCY.md
- Update all references from 06-First Draft and 05-Plot to 05-First Draft
- Update test expectations to match new folder structure

The merged approach uses YAML frontmatter (--- delimiters) at the top of
each draft file to store planning metadata, allowing it to be collapsed
in the editor while keeping all planning and draft content in one file.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
landon
2026-09-16 10:06:32 -05:00
parent 477c59cb79
commit 449ad4439f
19 changed files with 752 additions and 512 deletions
@@ -143,8 +143,8 @@ updated: ""
## Quick Verification Commands
Use your editor's search:
- `{{ character.name }}` - Find all mentions of a character
- `{{ location.name }}` - Find all mentions of a location
- `{{ '{{' }} character.name {{ '}}' }}` - Find all mentions of a character
- `{{ '{{' }} location.name {{ '}}' }}` - Find all mentions of a location
- `[[` - Find all cross-references
- `status:` - Find all status fields
@@ -0,0 +1,128 @@
---
id: scene_01
title: "Chapter One: The Beginning"
slug: chapter-one-the-beginning
act: 1
chapter: 1
scene: 1
type: chapter
status: draft
word_count_target: 2000
word_count_min: 1800
word_count_max: 2200
pov: ""
characters: []
setting: ""
date: ""
time: ""
conflict: ""
theme: ""
tone: ""
word_count: 0
word_count_updated: ""
session_word_count: 0
last_session: ""
total_sessions: 0
version: 1
created: ""
updated: ""
order: 1
---
# Chapter One: The Beginning
**Scene File** | **ID:** scene_01 | **Status:** Draft
---
## Scene Metadata
| Attribute | Value |
|-----------|-------|
| **Act** | 1 |
| **Chapter** | 1 |
| **Scene** | 1 |
| **Type** | Chapter |
| **POV** | Not set |
| **Version** | 1 |
| **Word Count Target** | 2000 |
---
## Word Count Tracking
| Metric | Value |
|--------|-------|
| **Target** | 2000 |
| **Minimum** | 1800 |
| **Maximum** | 2200 |
| **Current** | 0 |
| **This Session** | 0 |
| **Last Updated** | Never |
---
## Creative Elements
### POV
> Not specified
### Characters
### Setting
> Not specified
### Date & Time
> Not specified | Not specified
---
## Story Structure
### Conflict
> Not specified
### Theme
> Not specified
### Tone
> Not specified
---
## Draft Content
### Rough Draft:
[Write your scene content here...]
---
## Writing Notes
### Session Log
| Date | Words Added | Notes |
|------|--------------|-------|
### Revision Notes
-
-
---
## Status Checklist
- [ ] Planning complete
- [ ] First draft complete
- [ ] Word count target met
- [ ] POV consistent
- [ ] Character voices distinct
- [ ] Setting details accurate
- [ ] Conflict resolved/advanced
- [ ] Ready for revision
---
**Created:** | **Updated:**
@@ -0,0 +1,129 @@
---
id: scene_02_01
title: "Chapter Two: Development"
slug: chapter-two-development
act: 2
chapter: 1
scene: 1
type: chapter
status: draft
word_count_target: 2000
word_count_min: 1800
word_count_max: 2200
pov: ""
characters: []
setting: ""
date: ""
time: ""
conflict: ""
theme: ""
tone: ""
word_count: 0
word_count_updated: ""
session_word_count: 0
last_session: ""
total_sessions: 0
version: 1
created: ""
updated: ""
planning_template: ""
draft_file: ""
order: 1
---
# Chapter Two: Development
**Draft File** | **ID:** scene_02_01 | **Status:** Draft
---
## Scene Metadata
| Attribute | Value |
|-----------|-------|
| **Act** | 2 |
| **Chapter** | 1 |
| **Scene** | 1 |
| **Type** | Chapter |
| **POV** | Not set |
| **Version** | 1 |
| **Word Count Target** | 2000 |
---
## Word Count Tracking
| Metric | Value |
|--------|-------|
| **Target** | 2000 |
| **Minimum** | 1800 |
| **Maximum** | 2200 |
| **Current** | 0 |
| **This Session** | 0 |
| **Last Updated** | Never |
---
## Creative Elements
### POV
> Not specified
### Characters
### Setting
> Not specified
### Date & Time
> Not specified | Not specified
---
## Story Structure
### Conflict
> Not specified
### Theme
> Not specified
### Tone
> Not specified
---
## Draft Content
### Rough Draft:
[Write your scene content here...]
---
## Writing Notes
### Session Log
| Date | Words Added | Notes |
|------|--------------|-------|
### Revision Notes
-
-
---
## Status Checklist
- [ ] Planning complete
- [ ] First draft complete
- [ ] Word count target met
- [ ] POV consistent
- [ ] Character voices distinct
- [ ] Setting details accurate
- [ ] Conflict resolved/advanced
- [ ] Ready for revision
---
**Created:** | **Updated:**
@@ -0,0 +1,129 @@
---
id: scene_03_01
title: "Chapter Three: Climax"
slug: chapter-three-climax
act: 3
chapter: 1
scene: 1
type: chapter
status: draft
word_count_target: 2000
word_count_min: 1800
word_count_max: 2200
pov: ""
characters: []
setting: ""
date: ""
time: ""
conflict: ""
theme: ""
tone: ""
word_count: 0
word_count_updated: ""
session_word_count: 0
last_session: ""
total_sessions: 0
version: 1
created: ""
updated: ""
planning_template: ""
draft_file: ""
order: 1
---
# Chapter Three: Climax
**Draft File** | **ID:** scene_03_01 | **Status:** Draft
---
## Scene Metadata
| Attribute | Value |
|-----------|-------|
| **Act** | 3 |
| **Chapter** | 1 |
| **Scene** | 1 |
| **Type** | Chapter |
| **POV** | Not set |
| **Version** | 1 |
| **Word Count Target** | 2000 |
---
## Word Count Tracking
| Metric | Value |
|--------|-------|
| **Target** | 2000 |
| **Minimum** | 1800 |
| **Maximum** | 2200 |
| **Current** | 0 |
| **This Session** | 0 |
| **Last Updated** | Never |
---
## Creative Elements
### POV
> Not specified
### Characters
### Setting
> Not specified
### Date & Time
> Not specified | Not specified
---
## Story Structure
### Conflict
> Not specified
### Theme
> Not specified
### Tone
> Not specified
---
## Draft Content
### Rough Draft:
[Write your scene content here...]
---
## Writing Notes
### Session Log
| Date | Words Added | Notes |
|------|--------------|-------|
### Revision Notes
-
-
---
## Status Checklist
- [ ] Planning complete
- [ ] First draft complete
- [ ] Word count target met
- [ ] POV consistent
- [ ] Character voices distinct
- [ ] Setting details accurate
- [ ] Conflict resolved/advanced
- [ ] Ready for revision
---
**Created:** | **Updated:**
@@ -0,0 +1,164 @@
---
# Merged Planning + Draft Template
# YAML frontmatter contains all planning fields; body is the draft content
id: scene_new
# Unique identifier for this scene
title: "New Scene Title"
# Display title for the scene
slug: new-scene-title
# URL-friendly slug
# === Core Metadata ===
act: 1
chapter: 1
scene: 99
type: scene
# Type: scene, chapter, interlude, etc.
# === Planning Fields ===
status: draft
# Status: planning, draft, revised, done
word_count_target: 2000
word_count_min: 1800
word_count_max: 2200
# === Creative Elements ===
pov: ""
# Point of view character
characters: []
# Characters appearing in this scene (array of names)
setting: ""
# Location/setting
date: ""
time: ""
# Date and time of scene
conflict: ""
# Central conflict in this scene
theme: ""
# Themes explored
tone: ""
# Mood/tone
# === Draft Tracking ===
word_count: 0
word_count_updated: ""
session_word_count: 0
last_session: ""
total_sessions: 0
version: 1
# === Timestamps ===
created: ""
updated: ""
# === Linking ===
# These are kept for backward compatibility but are no longer needed
# since planning and draft are merged
planning_template: ""
draft_file: ""
order: 99
---
# New Scene Title
**Scene File** | **ID:** scene_new | **Status:** Draft
---
## Scene Metadata
| Attribute | Value |
|-----------|-------|
| **Act** | 1 |
| **Chapter** | 1 |
| **Scene** | 99 |
| **Type** | Scene |
| **POV** | Not set |
| **Version** | 1 |
| **Word Count Target** | 2000 |
---
## Word Count Tracking
| Metric | Value |
|--------|-------|
| **Target** | 2000 |
| **Minimum** | 1800 |
| **Maximum** | 2200 |
| **Current** | 0 |
| **This Session** | 0 |
| **Last Updated** | Never |
---
## Creative Elements
### POV
> Not specified
### Characters
### Setting
> Not specified
### Date & Time
> Not specified | Not specified
---
## Story Structure
### Conflict
> Not specified
### Theme
> Not specified
### Tone
> Not specified
---
## Draft Content
### Rough Draft:
[Write your scene content here...]
---
## Writing Notes
### Session Log
| Date | Words Added | Notes |
|------|--------------|-------|
### Revision Notes
-
-
---
## Status Checklist
- [ ] Planning complete
- [ ] First draft complete
- [ ] Word count target met
- [ ] POV consistent
- [ ] Character voices distinct
- [ ] Setting details accurate
- [ ] Conflict resolved/advanced
- [ ] Ready for revision
---
**Created:** | **Updated:**
@@ -1,118 +0,0 @@
---
id: scene_new
title: "New Scene Title"
slug: new-scene-title
act: 1
chapter: 1
scene: 99
type: scene
status: planning
word_count_target: 2000
word_count_min: 1800
word_count_max: 2200
pov: ""
characters: []
setting: ""
date: ""
time: ""
conflict: ""
theme: ""
tone: ""
draft_file: ""
order: 99
created: ""
updated: ""
---
# New Scene Title
**Planning Template** | **ID:** scene_new | **Status:** {{ status | capitalizes }}
---
## Planning Metadata
| Attribute | Value |
|-----------|-------|
| **Act** | {{ act }} |
| **Chapter** | {{ chapter }} |
| **Scene** | {{ scene }} |
| **Type** | {{ type | capitalizes }} |
| **Order** | {{ order }} |
| **Draft File** | {{ draft_file if draft_file else "[Create Draft File](#)" }} |
---
## Creative Elements
### POV
> {{ pov if pov else "Not specified" }}
### Characters
{% for character in characters %}- [[{{ character }}]]
{% endfor %}
### Setting
> {{ setting if setting else "Not specified" }}
### Date & Time
> {{ date if date else "Not specified" }} | {{ time if time else "Not specified" }}
---
## Story Structure
### Conflict
> {{ conflict if conflict else "Not specified" }}
### Theme
> {{ theme if theme else "Not specified" }}
### Tone
> {{ tone if tone else "Not specified" }}
---
## Word Count Goals
| Metric | Value |
|--------|-------|
| **Target** | {{ word_count_target }} |
| **Minimum** | {{ word_count_min }} |
| **Maximum** | {{ word_count_max }} |
---
## Scene Planning
### The Setup
>
### The Reveal
>
### Things to Note
-
-
---
## Status Tracking
- [ ] Scene outline complete
- [ ] Character arcs aligned
- [ ] Location details verified
- [ ] Conflict established
- [ ] Word count target set
- [ ] Ready for drafting
---
**Instructions:**
1. Copy this file to the appropriate act/chapter folder
2. Rename to `scene_XX.md` (e.g., `scene_02.md`)
3. Update the YAML frontmatter with scene details
4. Set `draft_file` to point to the corresponding draft file
5. Create the draft file using the template in `06-First Draft/_template.md`
**Related:** [Story Bible](../../03-Story-Bible/_index.md) | **Created:** {{ created }} | **Updated:** {{ updated }}
@@ -1,111 +0,0 @@
---
id: scene_01
title: "Chapter One: The Beginning"
slug: chapter-one-the-beginning
act: 1
chapter: 1
scene: 1
type: chapter
status: planning
word_count_target: 2000
word_count_min: 1800
word_count_max: 2200
pov: ""
characters: []
setting: ""
date: ""
time: ""
conflict: ""
theme: ""
tone: ""
draft_file: "../../06-First Draft/Act 1/scene01.md"
order: 1
created: ""
updated: ""
---
# Chapter One: The Beginning
**Planning Template** | **ID:** scene_01 | **Status:** {{ status | capitalizes }}
---
## Planning Metadata
| Attribute | Value |
|-----------|-------|
| **Act** | {{ act }} |
| **Chapter** | {{ chapter }} |
| **Scene** | {{ scene }} |
| **Type** | {{ type | capitalizes }} |
| **Order** | {{ order }} |
| **Draft File** | [`{{ draft_file | replace('../../', '') }}`]({{ draft_file }}) |
---
## Creative Elements
### POV
> {{ pov if pov else "Not specified" }}
### Characters
{% for character in characters %}- [[{{ character }}]]
{% endfor %}
### Setting
> {{ setting if setting else "Not specified" }}
### Date & Time
> {{ date if date else "Not specified" }} | {{ time if time else "Not specified" }}
---
## Story Structure
### Conflict
> {{ conflict if conflict else "Not specified" }}
### Theme
> {{ theme if theme else "Not specified" }}
### Tone
> {{ tone if tone else "Not specified" }}
---
## Word Count Goals
| Metric | Value |
|--------|-------|
| **Target** | {{ word_count_target }} |
| **Minimum** | {{ word_count_min }} |
| **Maximum** | {{ word_count_max }} |
---
## Scene Planning
### The Setup
>
### The Reveal
>
### Things to Note
-
-
---
## Status Tracking
- [ ] Scene outline complete
- [ ] Character arcs aligned
- [ ] Location details verified
- [ ] Conflict established
- [ ] Word count target set
- [ ] Ready for drafting
---
**Draft File:** [Open Draft]({{ draft_file }}) | **Created:** {{ created }} | **Updated:** {{ updated }}
@@ -1,91 +0,0 @@
---
id: draft_scene_01
title: "Chapter One: The Beginning"
slug: chapter-one-the-beginning
planning_template: "../../05-Plot/act_1/scene_01.md"
act: 1
chapter: 1
scene: 1
type: draft
status: not_started
word_count: 0
word_count_updated: ""
session_word_count: 0
last_session: ""
total_sessions: 0
pov: ""
version: 1
created: ""
updated: ""
---
# Chapter One: The Beginning
**Draft File** | **ID:** draft_scene_01 | **Status:** {{ status | replace('_', ' ') | capitalizes }}
---
## Planning Reference
> **Linked to:** [Planning Template]({{ planning_template }})
---
## Scene Metadata
| Attribute | Value |
|-----------|-------|
| **Act** | {{ act }} |
| **Chapter** | {{ chapter }} |
| **Scene** | {{ scene }} |
| **Type** | {{ type | capitalizes }} |
| **POV** | {{ pov if pov else "Not set" }} |
| **Version** | {{ version }} |
---
## Word Count Tracking
| Metric | Value |
|--------|-------|
| **Target** | 2000 (from planning) |
| **Current** | {{ word_count }} |
| **This Session** | {{ session_word_count }} |
| **Last Updated** | {{ word_count_updated if word_count_updated else "Never" }} |
---
## Draft Content
### Rough Draft:
[Write your scene content here...]
---
## Writing Notes
### Session Log
| Date | Words Added | Notes |
|------|--------------|-------|
| {{ last_session if last_session else "" }} | {{ session_word_count }} | |
### Revision Notes
-
-
---
## Status Checklist
- [ ] First draft complete
- [ ] Word count target met
- [ ] POV consistent
- [ ] Character voices distinct
- [ ] Setting details accurate
- [ ] Conflict resolved/advanced
- [ ] Ready for revision
---
**Planning Template:** [Open Planning]({{ planning_template }}) | **Created:** {{ created }} | **Updated:** {{ updated }}
@@ -1,99 +0,0 @@
---
id: draft_scene_new
title: "New Scene Title"
slug: new-scene-title
planning_template: ""
act: 1
chapter: 1
scene: 99
type: draft
status: not_started
word_count: 0
word_count_updated: ""
session_word_count: 0
last_session: ""
total_sessions: 0
pov: ""
version: 1
created: ""
updated: ""
---
# New Scene Title
**Draft File** | **ID:** draft_scene_new | **Status:** {{ status | replace('_', ' ') | capitalizes }}
---
## Planning Reference
> **Linked to:** {{ planning_template if planning_template else "[Create Planning Template](#)" }}
---
## Scene Metadata
| Attribute | Value |
|-----------|-------|
| **Act** | {{ act }} |
| **Chapter** | {{ chapter }} |
| **Scene** | {{ scene }} |
| **Type** | {{ type | capitalizes }} |
| **POV** | {{ pov if pov else "Not set" }} |
| **Version** | {{ version }} |
---
## Word Count Tracking
| Metric | Value |
|--------|-------|
| **Target** | (from planning) |
| **Current** | {{ word_count }} |
| **This Session** | {{ session_word_count }} |
| **Last Updated** | {{ word_count_updated if word_count_updated else "Never" }} |
---
## Draft Content
### Rough Draft:
[Write your scene content here...]
---
## Writing Notes
### Session Log
| Date | Words Added | Notes |
|------|--------------|-------|
| {{ last_session if last_session else "" }} | {{ session_word_count }} | |
### Revision Notes
-
-
---
## Status Checklist
- [ ] First draft complete
- [ ] Word count target met
- [ ] POV consistent
- [ ] Character voices distinct
- [ ] Setting details accurate
- [ ] Conflict resolved/advanced
- [ ] Ready for revision
---
**Instructions:**
1. Copy this file to the appropriate Act/Chapter folder
2. Rename to `sceneXX.md` (e.g., `scene02.md`)
3. Update the YAML frontmatter with scene details
4. Set `planning_template` to point to the corresponding planning file
5. Create the planning file using the template in `05-Plot/_template.md`
6. Update word count as you write
**Related:** [Story Bible](../../03-Story-Bible/_index.md) | **Created:** {{ created }} | **Updated:** {{ updated }}