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
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix: show character designs to foundation judges
[._.]/ Adam Eivy4915ed72e511
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex e95192bc64..2cf1cbc4af 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -11,6 +11,7 @@- **Foundation structure repair retains shrinking corrective progress.** A broad structure rewrite whose specialized arc verification improved from many blockers to a smaller residual used to get one correction attempt and then roll the entire improvement back. The repair now continues a bounded correction sequence while the blocker count stays monotonic, still restoring the original checkpoint if the set grows or cannot clear within the cap.- **A late structure-repair regression no longer erases an independently verified improvement.** The bounded correction sequence could shrink nine arc blockers to one, then let its final attempt trade that residual for five and restore the entire pre-repair plan—discarding the proven one-blocker checkpoint. It now restores the best verified intermediate state, sends that partial improvement through the harsh foundation re-judge, and leaves the full arc gate dirty so the residual must still clear before beats. Model evidence follows the same transaction boundary: the retained repair runs remain provisional, while the regressive run is immediately scored as rejected; a fully reverted repair is also a rejection rather than a schema-invalid response.- **Character-first planning now includes the cast's visual foundation.** The pre-arc character architect used to complete psychology and relationships while its response contract omitted physical description, silhouette, visual identity, and palette, so a graphic-novel series could settle its plot around characters the image pipeline still had to invent. Those identity-bearing fields now participate in completeness, prompt hashing, harsh foundation scoring, and repair; optional sheets such as props, expressions, gestures, and wardrobes are authored when the character's form supports them.+- **Foundation judges now inspect the character designs they score.** Completed render fields were previously collapsed to the word `ready` in the judge context, so a harsh judge could only see that a value existed and then reasonably report that no anatomy, silhouette, palette, or visual grammar was available for comparison. The bounded context now carries the actual distinguishing details while still excluding unrelated universe assets.- **Series Autopilot can pause without killing productive work.** The live control used to offer only Stop, which terminates the active provider run even when a long foundation judgment is doing useful work. **Pause safely** now records a graceful request, lets the active step and any provisional repair-verification transaction settle, then persists a resumable manual pause; **Stop now** remains available as the immediate emergency control.- **Canon readiness now repairs manuscript-supported blanks before blocking art.** Autopilot's pre-render gate could identify a drawn character, place, or object with no description, but it immediately paused even though the Nouns workflow already had a safe fill-blanks-only service. The gate now runs that strict prose-grounded backfill for each affected issue, rechecks shared canon, and pauses only for locked nouns or visual facts the manuscript genuinely never established—never inventing unsupported design to force a pass.diff --git a/server/services/pipeline/foundationJudge.js b/server/services/pipeline/foundationJudge.jsindex e4ea9236ef..e1f54b18b2 100644--- a/server/services/pipeline/foundationJudge.js+++ b/server/services/pipeline/foundationJudge.js@@ -389,9 +389,11 @@ export function isFoundationStale(snap, currentHash) {// core signal) without dumping the whole record.function renderCharacterLine(c, { core = false } = {}) {const role = c?.role ? ` (${c.role})` : '';- const concise = (value) => (typeof value === 'string' && value.trim()- ? value.trim().replace(/\s+/g, ' ').slice(0, 100)- : '—');+ const concise = (value, maxChars = 100) => {+ if (typeof value !== 'string' || !value.trim()) return '—';+ const compact = value.trim().replace(/\s+/g, ' ');+ return compact.length <= maxChars ? compact : `${compact.slice(0, maxChars - 1).trimEnd()}…`;+ };const framework = FRAMEWORK_STRING_FIELDS.map((field) => `${field}: ${concise(c?.[field])}`).join(' | ');@@ -399,9 +401,20 @@ function renderCharacterLine(c, { core = false } = {}) {.map(concise).slice(0, 3).join('; ');+ // The harsh judge needs the actual render identity, not a presence marker.+ // `ready` proved actively misleading: five complete character sheets were+ // scored as absent because the prompt hid every distinguishing detail. Keep+ // the lines bounded, but show enough anatomy, silhouette, palette, and visual+ // grammar to compare the cast and identify generic or contradictory designs.+ const visualString = (field) => (isBlankString(c?.[field]) ? 'BLANK' : concise(c[field], 320));+ const visualList = (field) => {+ if (isBlankArray(c?.[field])) return 'BLANK';+ const compact = JSON.stringify(c[field]).replace(/\s+/g, ' ');+ return compact.length <= 420 ? compact : `${compact.slice(0, 419).trimEnd()}…`;+ };const visual = [- ...VISUAL_FOUNDATION_STRING_FIELDS.map((field) => `${field}: ${isBlankString(c?.[field]) ? 'BLANK' : 'ready'}`),- ...VISUAL_FOUNDATION_LIST_FIELDS.map((field) => `${field}: ${isBlankArray(c?.[field]) ? 'BLANK' : 'ready'}`),+ ...VISUAL_FOUNDATION_STRING_FIELDS.map((field) => `${field}: ${visualString(field)}`),+ ...VISUAL_FOUNDATION_LIST_FIELDS.map((field) => `${field}: ${visualList(field)}`),].join(' | ');return `- ${core ? '[CORE] ' : ''}**${c?.name || 'Unnamed'}**${role} — ${framework} | arcType: ${c?.arcType || '—'} | secrets: ${secrets || '—'} | visual foundation: ${visual}`;}diff --git a/server/services/pipeline/foundationJudge.test.js b/server/services/pipeline/foundationJudge.test.jsindex cd13a4cc05..981e4fcae1 100644--- a/server/services/pipeline/foundationJudge.test.js+++ b/server/services/pipeline/foundationJudge.test.js@@ -804,6 +804,29 @@ describe('foundation judge context — complete planning altitude', () => {expect(ctx.characterRoster).toContain('wound: Abandoned during the Naming Tax');});+ it('shows actual visual identity details instead of presence-only ready markers', () => {+ const ctx = __testing.buildFoundationContext({+ series: { name: 'Example Series', characterArcs: [{ characterId: 'chr-1' }], seasons: [] },+ universe: {},+ canon: { characters: [{+ id: 'chr-1',+ name: 'Lead',+ physicalDescription: 'A compact young surveyor with copper curls and a patched yellow pressure coat.',+ visualNotes: 'Every tool is repaired with visible blue ceramic staples.',+ silhouetteNotes: 'Compact torso, wide tool belt, tapered boots.',+ visualIdentity: 'Round survey instruments interrupt a narrow triangular silhouette.',+ colorPalette: [{ name: 'survey yellow', hex: '#d9a21b', role: 'coat' }],+ }] },+ issues: [],+ contentMax: 30_000,+ });++ expect(ctx.characterRoster).toContain('patched yellow pressure coat');+ expect(ctx.characterRoster).toContain('Round survey instruments');+ expect(ctx.characterRoster).toContain('survey yellow');+ expect(ctx.characterRoster).not.toContain('physicalDescription: ready');+ });+it('judges the complete story-referenced cast and excludes unrelated universe assets', () => {const storyCast = Array.from({ length: 8 }, (_, index) => ({id: `chr-${index + 1}`,