Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: render untagged scenes in head-hopping POV map; tidy prompt wording (#1311)

Adam Eivy05bc060a512a
diff --git a/data.reference/prompts/stages/pipeline-editorial-head-hopping.md b/data.reference/prompts/stages/pipeline-editorial-head-hopping.md
index ecdfee25c7..90ff491a3e 100644
--- a/data.reference/prompts/stages/pipeline-editorial-head-hopping.md
+++ b/data.reference/prompts/stages/pipeline-editorial-head-hopping.md
@@ -7,7 +7,7 @@ only what that character can see, hear, and know. A discipline break is when the
prose slips out of that anchor without a scene break.
The point of view in force for this story is **{{povPerson}}**. Judge every scene
-against that limited anchor.
+against its established point-of-view anchor.
For each limited-POV scene, flag:
@@ -40,8 +40,10 @@ a perception is a reasonable inference, do not flag — favor under-flagging.
The reverse outline below records each scene's anchored POV character and the
other characters on-stage (the candidate heads a head-hop would slip into). A
scene whose narration reports the interior of an "others present" character is a
-strong head-hop candidate — confirm it against the prose. Judge the POV anchor
-from the prose itself, not from this list alone.
+strong head-hop candidate — confirm it against the prose. Some scenes may show
+`POV: (not recorded — infer from the prose)`; for those, determine the anchor
+from the text itself. Judge the POV anchor from the prose itself, not from this
+list alone.
```
{{povMap}}
diff --git a/server/lib/editorial/checkRegistry.js b/server/lib/editorial/checkRegistry.js
index 217d9fb7c9..de3c1ddd93 100644
--- a/server/lib/editorial/checkRegistry.js
+++ b/server/lib/editorial/checkRegistry.js
@@ -1070,31 +1070,37 @@ const POV_PERSON_LABELS = Object.freeze({
// Render the reverse-outline scenes into a compact POV-focused block the
// head-hopping check (#1311) passes alongside the manuscript so the model knows
// WHOSE head each limited-POV scene is anchored to — and which other characters
-// are on-stage (candidate heads a head-hop would slip into). Pure + deterministic
-// so it's unit-testable and its token cost can be counted into the per-chunk
-// overhead. Returns '' when no scene carries a POV character (the prompt's
-// `{{#povMap}}` section then renders nothing and the check degrades to a plain
-// whole-issue scan). Type-guarded throughout — the reverse outline rides peer
-// sync (#1348), so a hand-edited / older-peer scene could carry a non-string
-// field that a bare `.trim()` would throw on.
+// are on-stage (candidate heads a head-hop would slip into). EVERY scene is
+// rendered: a scene with no recorded POV character is marked "POV: (not recorded
+// — infer from the prose)" rather than dropped, so a PARTIALLY-tagged outline
+// doesn't silently omit scenes and let the model assume the list is exhaustive of
+// POV-bearing scenes (the model still confirms each anchor against the prose).
+// Pure + deterministic so it's unit-testable and its token cost can be counted
+// into the per-chunk overhead. Returns '' only when there are NO scenes at all
+// (the prompt's `{{#povMap}}` section then renders nothing and the check degrades
+// to a plain whole-issue scan). Type-guarded throughout — the reverse outline
+// rides peer sync (#1348), so a hand-edited / older-peer scene could carry a
+// non-string field that a bare `.trim()` would throw on.
export function scenePovSummary(scenes) {
const list = Array.isArray(scenes) ? scenes : [];
const lines = list.map((s) => {
if (!s || typeof s !== 'object') return '';
- const pov = scenePov(s);
- if (!pov) return '';
const label = sceneLabel(s);
const issueNumber = Number.isInteger(s.issueNumber) ? s.issueNumber : null;
const where = issueNumber != null ? `Issue ${issueNumber}` : 'Scene';
+ const pov = scenePov(s);
// Other on-stage characters are the candidate heads a head-hop slips into —
- // exclude the POV holder themselves so the list names only "other" heads.
- const povKey = normalizeName(pov);
+ // exclude the POV holder themselves (by normalized name) so the list names
+ // only "other" heads. When the scene has no recorded POV holder there's no
+ // one to exclude, so every present character is a candidate.
+ const povKey = pov ? normalizeName(pov) : '';
const others = Array.isArray(s.charactersPresent)
? s.charactersPresent
.filter((n) => typeof n === 'string' && n.trim() && normalizeName(n) !== povKey)
.map((n) => n.trim())
: [];
- const parts = [`- ${where}: ${label} — POV: ${pov}`];
+ const povText = pov ? `POV: ${pov}` : 'POV: (not recorded — infer from the prose)';
+ const parts = [`- ${where}: ${label} — ${povText}`];
if (others.length) parts.push(`others present: ${others.join(', ')}`);
return parts.join(' — ');
}).filter(Boolean);
diff --git a/server/lib/editorial/checkRegistry.test.js b/server/lib/editorial/checkRegistry.test.js
index 7d51ef7eb3..e79dfcd640 100644
--- a/server/lib/editorial/checkRegistry.test.js
+++ b/server/lib/editorial/checkRegistry.test.js
@@ -331,8 +331,12 @@ describe('scenePovSummary (#1311)', () => {
expect(summary).not.toContain('Issue 2: Alone — POV: Joss — others present');
});
- it('drops scenes with no POV character (nothing to police) and returns "" when none are tagged', () => {
- expect(scenePovSummary([{ sequence: 0, issueNumber: 1, heading: 'Untagged', charactersPresent: ['Mara'] }])).toBe('');
+ it('renders an untagged scene as "infer from the prose" instead of dropping it (partial-outline coverage)', () => {
+ const summary = scenePovSummary([{ sequence: 0, issueNumber: 1, heading: 'Untagged', charactersPresent: ['Mara', 'Joss'] }]);
+ expect(summary).toContain('Issue 1: Untagged — POV: (not recorded — infer from the prose) — others present: Mara, Joss');
+ });
+
+ it('returns "" only when there are no scenes at all', () => {
expect(scenePovSummary([])).toBe('');
expect(scenePovSummary(null)).toBe('');
expect(scenePovSummary(undefined)).toBe('');