Orchestrate the 7-step INSIGHT pipeline for deep gap analysis
The 7 steps are:
Each step's output is input to the next. Skipping a step produces garbage downstream.
If a step fails or produces low-quality output:
{ gap, evidence, knowledge }RootCauseResult — surfaceGap, whyChain[], rootCause, hiddenAssumptions[], unexploredAngles[]{ gap, rootCauseOutput: JSON.stringify(step1) }StakeholderResult — stakeholders[], underservedStakeholder, conflictingNeeds{ gap, stakeholderOutput: JSON.stringify(step2) }TensionResult — tensions[], primaryTension, tensionInsight{ tensions: JSON.stringify(step3) }HmwResult — hmwQuestions[], rankedQuestions[], rankingRationale{ hmwQuestions: JSON.stringify(step4) }AbstractionResult — ladder[], insightFromLadder, reframedProblem{ insightSoFar: JSON.stringify({ step1, step2, step3, step4, step5 }) }AssumptionResult — assumptions[], criticalAssumptions[], safeAssumptions[], recommendation{ fullInsight: JSON.stringify({ step1, step2, step3, step4, step5, step6 }) }ValidationResult — gates[], overallVerdict (PASS|FAIL|REVISE), failedGates[], revisionGuidance?IF overallVerdict == PASS:
→ Return complete ValidatedInsight to caller
IF overallVerdict == REVISE AND attempt < 2:
→ Read revisionGuidance.fromStep (1-6)
→ Re-run pipeline from that step forward, carrying prior outputs for unchanged steps
→ Increment attempt counter
→ Go to Step 7 again
IF overallVerdict == REVISE AND attempt >= 2:
→ Report partial insight to caller with status: REVISE_EXHAUSTED
→ Include best available output and failedGates[] for caller to decide
IF overallVerdict == FAIL:
→ Report failure to caller with failedGates[] and reasoning
→ Do NOT return an insight — structural failure cannot be revised
fromStep: 1 — re-run all 7 stepsfromStep: 2 — re-run Steps 2-7, carry Step 1 outputfromStep: 3 — re-run Steps 3-7, carry Steps 1-2 outputsfromStep: 4 — re-run Steps 4-7, carry Steps 1-3 outputsfromStep: 5 — re-run Steps 5-7, carry Steps 1-4 outputsfromStep: 6 — re-run Steps 6-7, carry Steps 1-5 outputs{
"status": "PASS | REVISE_EXHAUSTED | FAIL",
"gap": "<original gap input>",
"insightChain": {
"rootCause": {
"surfaceGap": "...",
"whyChain": ["why1", "why2", "why3", "why4", "why5"],
"rootCause": "...",
"hiddenAssumptions": ["..."],
"unexploredAngles": ["..."]
},
"stakeholders": {
"stakeholders": [{ "name": "...", "goals": "...", "painPoints": "..." }],
"underservedStakeholder": "...",
"conflictingNeeds": "..."
},
"tensions": {
"tensions": ["..."],
"primaryTension": "...",
"tensionInsight": "..."
},
"hmwQuestions": {
"hmwQuestions": ["..."],
"rankedQuestions": ["..."],
"rankingRationale": "..."
},
"abstraction": {
"ladder": ["..."],
"insightFromLadder": "...",
"reframedProblem": "..."
},
"assumptions": {
"assumptions": ["..."],
"criticalAssumptions": ["..."],
"safeAssumptions": ["..."],
"recommendation": "..."
}
},
"validation": {
"gates": [{ "name": "...", "status": "PASS|FAIL", "rationale": "..." }],
"overallVerdict": "PASS",
"failedGates": []
},
"attempts": 1
}