Purpose: turn ambiguity into an orientation packet Byron can sell, review, and refine.Mode: not a quiz; reflective intake, pathway recognition, readiness signal.Operator note: if this feels like a tiny advisor living inside the page, good. That is the point.
Step 1 of 3 — Tell me what changed
What's going on?
Write as much or as little as you want. This is for you, not a form.
Something went wrong. Try again in a moment.
Reflecting on what you said…
What I'm hearing
Step 2 of 3 — Go deeper
What feels most true about this right now?
Something went wrong. Try again in a moment.
Reading what you wrote…
Going deeper
Finding what this is pointing at…
What this is
Readiness
Before you decide how to explore this — what feels true about your readiness right now?
What happens next
Guided
Full Orientation — $500
90-minute structured advisory session. Byron translates what surfaced here into a clear mandate and next step.
Begin →
Self-directed
Explore on your own
Use the Discernment diagnostic to map your own signal. Go at your own pace. Free.
Enter →
function showStage(id) {
document.querySelectorAll('.stage').forEach(s => s.classList.remove('active'));
const el = document.getElementById('stage-' + id);
if (el) {
el.classList.add('active');
el.scrollIntoView({ behavior: 'smooth', block: 'start' });
}
currentStage = id;
}
function setLoading(stage, on) {
const btn = document.getElementById('btn-' + stage);
const thinking = document.getElementById('thinking-' + stage);
if (btn) btn.disabled = on;
if (thinking) thinking.classList.toggle('visible', on);
}
function showError(stage, msg) {
const el = document.getElementById('err-' + stage);
if (el) {
el.textContent = msg || 'Something went wrong. Try again.';
el.classList.add('visible');
}
}
function clearError(stage) {
const el = document.getElementById('err-' + stage);
if (el) el.classList.remove('visible');
}
async function submitStage(stage) {
const inputEl = document.getElementById('input-' + stage);
const input = inputEl ? inputEl.value.trim() : '';
if (!input || input.length < 8) {
showError(stage, 'Write a bit more — there\'s no wrong answer.');
return;
}
clearError(stage);
setLoading(stage, true);
try {
const res = await fetch(API, {
method: 'POST',
headers: { 'content-type': 'application/json' },
body: JSON.stringify({ input, stage, history: history.slice(-10) }),
});
const data = await res.json();
if (!data.ok || !data.reflection) {
showError(stage, data.error || 'Reflection unavailable — try again in a moment.');
setLoading(stage, false);
return;
}
// Record in history
history.push({ role: 'user', content: input });
history.push({ role: 'assistant', content: data.reflection });
if (stage === 'initial') {
// Show reflection, move to refine stage
const reflText = document.getElementById('reflection-initial-text');
if (reflText) reflText.textContent = data.reflection;
setLoading(stage, false);
showStage('refine');
} else if (stage === 'refine') {
// Show reflection, auto-submit pathway stage
const reflText = document.getElementById('reflection-refine-text');
if (reflText) reflText.textContent = data.reflection;
setLoading(stage, false);
showStage('pathway');
await submitPathway();
}
} catch (e) {
showError(stage, 'Connection issue — check your network and try again.');
setLoading(stage, false);
}
}
async function submitPathway() {
const thinking = document.getElementById('thinking-pathway');
if (thinking) thinking.classList.add('visible');
// Synthesize the full narrative for pathway detection
const fullNarrative = history
.filter(m => m.role === 'user')
.map(m => m.content)
.join(' // ');
try {
const res = await fetch(API, {
method: 'POST',
headers: { 'content-type': 'application/json' },
body: JSON.stringify({ input: fullNarrative, stage: 'pathway', history: history.slice(-12) }),
});
const data = await res.json();
if (thinking) thinking.classList.remove('visible');
if (!data.ok || !data.reflection) return;
// Parse pathway from reflection (AI weaves it in naturally)
// We present the whole reflection as the pathway insight
const pathwayCard = document.getElementById('pathway-card');
const pathwayName = document.getElementById('pathway-name');
const pathwayText = document.getElementById('pathway-text');
// Extract pathway name if AI named it (look for known patterns)
const text = data.reflection;
const pathwayPatterns = [
{ pattern: /compass|direction|bearing|pointed/i, name: 'Compass — Direction' },
{ pattern: /mandate|authority|executive|built/i, name: 'Executive Mandate — Authority' },
{ pattern: /done|completion|old version|finished/i, name: 'Am I Done? — Completion' },
{ pattern: /crossroads|fork|competing|decision/i, name: 'Crossroads — Decision' },
];
let detectedName = 'What This Is Pointing At';
for (const p of pathwayPatterns) {
if (p.pattern.test(text)) { detectedName = p.name; break; }
}
if (pathwayName) pathwayName.textContent = detectedName;
// Readiness question is woven into AI response — display full reflection as pathway text
// Split at readiness question if present
const readinessIdx = text.indexOf('readiness');
const beforeReadiness = readinessIdx > 80 ? text.slice(0, readinessIdx + 200) : text;
if (pathwayText) pathwayText.textContent = beforeReadiness;
if (pathwayCard) pathwayCard.classList.add('visible');
// Show readiness section
setTimeout(() => {
const rs = document.getElementById('readiness-section');
if (rs) rs.classList.add('visible');
}, 600);
} catch (e) {
if (thinking) thinking.classList.remove('visible');
}
}
function selectReadiness(btn, value) {
document.querySelectorAll('.readiness-opt').forEach(b => b.classList.remove('selected'));
btn.classList.add('selected');
// Show next steps regardless of readiness — framing adjusts
const nextSteps = document.getElementById('next-steps');
if (nextSteps) {
nextSteps.classList.add('visible');
setTimeout(() => nextSteps.scrollIntoView({ behavior: 'smooth', block: 'start' }), 200);
}
// Adjust primary CTA copy based on readiness
const primaryCard = document.querySelector('.step-card.primary h3');
if (primaryCard) {
if (value === 'not-yet') {
primaryCard.textContent = 'Full Orientation — when you\'re ready';
} else if (value === 'almost') {
primaryCard.textContent = 'Full Orientation — let\'s clear the last thing';
}
}
}
// Allow Enter+Shift in textarea, Enter alone doesn't submit
document.addEventListener('DOMContentLoaded', () => {
['initial', 'refine'].forEach(stage => {
const ta = document.getElementById('input-' + stage);
if (ta) {
ta.addEventListener('keydown', e => {
if (e.key === 'Enter' && !e.shiftKey) {
e.preventDefault();
submitStage(stage);
}
});
}
});
});