Refactor conventional foil comparison architecture#881
Refactor conventional foil comparison architecture#881google-labs-jules[bot] wants to merge 1 commit into
Conversation
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
There was a problem hiding this comment.
Pull request overview
This PR refactors the conventional-foil comparison flow so the prompt builder (buildExternalFoilComparisonPrompt) consumes a pre-computed RavenComparisonResult (computed in compareExternalToRavenMap) instead of injecting raw sealed-geometry JSON and unstructured claim blocks into the LLM prompt. It also wires the updated flow into the raven-chat route and updates upstream context to return horoscopeContrast.
Changes:
- Extend
RavenComparisonResultwithsupportedClaimsand update the prompt builder to render structuredspecificDepartures+ supported-claim bullets. - Update the raven-chat pipeline to compute
comparisonResultviacompareExternalToRavenMapand pass it into the prompt builder. - Return
horoscopeContrastfromfetchUpstreamContextalongside existing upstream context fields.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| vessel/src/lib/raven/externalFoilLayer.ts | Adds supportedClaims, refactors prompt assembly to use structured comparison output instead of raw sealed geometry / active-claims blocks. |
| vessel/src/app/api/raven-chat/upstreamContext.ts | Includes horoscopeContrast in the returned upstream context object. |
| vessel/src/app/api/raven-chat/route.ts | Computes comparisonResult and passes it into the refactored foil prompt builder. |
| vessel/sherlog-velocity/data/session-log.jsonl | Adds a Sherlog session log entry for this refactor. |
| .sherlog-doctor.lock | Removes the lock file content (file deletion). |
| const departuresText = params.comparisonResult.specificDepartures.map(d => { | ||
| let text = `- Conventional Claim: "${d.conventionalClaim}"\n Raven Position: ${d.ravenPosition}\n Why: ${d.why}\n Geometry Basis: ${d.geometryBasis}`; | ||
| if (d.safetyBasis) text += `\n Safety Basis: ${d.safetyBasis}`; | ||
| return text; |
| const supportedText = params.comparisonResult.supportedClaims?.length | ||
| ? params.comparisonResult.supportedClaims.map(c => `- ${c}`).join('\n') | ||
| : "None"; |
| const comparisonResult = compareExternalToRavenMap({ | ||
| externalClaims: foilArtifact.claimUnits, | ||
| sealedRavenMap: telemetryProfile.natalChart ?? profile.natalChart ?? null, | ||
| ravenRead: finalReply | ||
| }); | ||
|
|
||
| const promptData = buildExternalFoilComparisonPrompt({ | ||
| sealedMap: telemetryProfile.natalChart ?? profile.natalChart ?? null, | ||
| primaryRavenRead: finalReply, | ||
| externalFoilArtifact: foilArtifact, | ||
| comparisonResult, | ||
| userQuestion: message, | ||
| }); |
| externalArtifactId: "external_artifact", | ||
| summary, | ||
| specificDepartures, | ||
| supportedClaims, |



This pull request updates the
buildExternalFoilComparisonPromptlogic to accept a pre-computedRavenComparisonResultand removes raw[SEALED GEOMETRY]and unstructured[ACTIVE CLAIMS]blocks from the Prompt.This directly fulfills the "Clear Line" architectural goal of having the semantic engine perform geometry mapping (inside
compareExternalToRavenMap), while asking the LLM merely to translate the resulting structuredspecificDeparturesinto spoken/written contrast blocks.PR created automatically by Jules for task 12343789394489693916 started by @DHCross