Skip to content

Refactor conventional foil comparison architecture#881

Open
google-labs-jules[bot] wants to merge 1 commit into
mainfrom
jules-12343789394489693916-c2261a0b
Open

Refactor conventional foil comparison architecture#881
google-labs-jules[bot] wants to merge 1 commit into
mainfrom
jules-12343789394489693916-c2261a0b

Conversation

@google-labs-jules

Copy link
Copy Markdown
Contributor

This pull request updates the buildExternalFoilComparisonPrompt logic to accept a pre-computed RavenComparisonResult and 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 structured specificDepartures into spoken/written contrast blocks.


PR created automatically by Jules for task 12343789394489693916 started by @DHCross

@google-labs-jules

Copy link
Copy Markdown
Contributor Author

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@vercel

vercel Bot commented Jun 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
shipyard Ready Ready Preview, Comment Jun 28, 2026 8:54pm

@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 RavenComparisonResult with supportedClaims and update the prompt builder to render structured specificDepartures + supported-claim bullets.
  • Update the raven-chat pipeline to compute comparisonResult via compareExternalToRavenMap and pass it into the prompt builder.
  • Return horoscopeContrast from fetchUpstreamContext alongside 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).

Comment on lines +209 to +212
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;
Comment on lines +215 to +217
const supportedText = params.comparisonResult.supportedClaims?.length
? params.comparisonResult.supportedClaims.map(c => `- ${c}`).join('\n')
: "None";
Comment on lines +8122 to 8132
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,
});
Comment on lines 193 to +196
externalArtifactId: "external_artifact",
summary,
specificDepartures,
supportedClaims,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant