fix(rectification): split D4/D5 stages and recast after adopt
Keep family on D12+D7 instead of mixing it into D4, score D5 on education, and show a natal recast plus technique audit after adopt without unique-minute claims. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -89,4 +89,4 @@ export function evidenceWritesAllowed(
|
||||
export const MAX_RESUMABLE_CASES_PER_USER = 1;
|
||||
|
||||
export const RECTIFICATION_SKILL_NAME = "jyotish-birth-time-rectification";
|
||||
export const RECTIFICATION_SKILL_VERSION = "10.0.4";
|
||||
export const RECTIFICATION_SKILL_VERSION = "10.0.5";
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* 1. Dasha + dated events — any confirmed dated event
|
||||
* 2. D9 relationship — confirmed relationship evidence; no sign labels
|
||||
* 3. D10 career — confirmed career evidence; same event also scores D1 10th house
|
||||
* 4. Relatives — confirmed family evidence (D12 + 六亲 houses)
|
||||
* 4. Relatives — confirmed family evidence (D12 + D7 + 六亲 houses)
|
||||
* 5. Appearance / constitution — ask; dated answers are auxiliary 1st-house scores
|
||||
* 6. Birthmarks / scars — ask; dated answers are auxiliary 1st-house scores
|
||||
* 7. Occupation / 10th house — folded into method 3 (D10 + D1 10th)
|
||||
@@ -45,9 +45,9 @@ export type MethodCoverage = Readonly<{
|
||||
}>;
|
||||
|
||||
export type MethodFollowup = Readonly<{
|
||||
method_id: "dasha_events" | "d9_relationship" | "d10_career" | "relatives" | "appearance" | "marks" | "active_focus" | "nakshatra_boundary" | "oos_blind";
|
||||
method_id: "dasha_events" | "d9_relationship" | "d10_career" | "d4_home" | "d5_education" | "relatives" | "appearance" | "marks" | "active_focus" | "nakshatra_boundary" | "oos_blind";
|
||||
intent: string;
|
||||
ask_theme: "dated_event" | "relationship_style" | "career_style" | "family_event" | "appearance" | "marks" | "active_focus" | "nakshatra_trait" | "oos_blind";
|
||||
ask_theme: "dated_event" | "relationship_style" | "career_style" | "home_change" | "education_style" | "family_event" | "appearance" | "marks" | "active_focus" | "nakshatra_trait" | "oos_blind";
|
||||
domain: string | null;
|
||||
kind_hint: string | null;
|
||||
user_prompt_hint: string;
|
||||
@@ -322,14 +322,24 @@ export function buildMethodFollowupPlan(input: {
|
||||
user_prompt_hint: "事业盘仍会换升。可以再补一件记得大概时间的工作变化;同一件事会同时对照本命第 10 宫和 D10,不要描述类型标签。",
|
||||
source: "precision_stage",
|
||||
});
|
||||
} else if (stage === "theme_refine" && !declined.has("family")) {
|
||||
} else if ((stage === "d4_refine" || stage === "theme_refine") && !declined.has("relocation")) {
|
||||
next = followup({
|
||||
method_id: "relatives",
|
||||
method_id: "d4_home",
|
||||
intent: "distinguish_candidates",
|
||||
ask_theme: "family_event",
|
||||
domain: "family",
|
||||
kind_hint: "family_event",
|
||||
user_prompt_hint: "若还想继续收窄,可以再补一件记得大概时间的家人变化;也可以先采用代表性时间。",
|
||||
ask_theme: "home_change",
|
||||
domain: "relocation",
|
||||
kind_hint: "home_change",
|
||||
user_prompt_hint: "居所盘仍会换升。可以再补一件记得大概时间的搬家或住处变化。",
|
||||
source: "precision_stage",
|
||||
});
|
||||
} else if (stage === "d5_refine" && !declined.has("education")) {
|
||||
next = followup({
|
||||
method_id: "d5_education",
|
||||
intent: "distinguish_candidates",
|
||||
ask_theme: "education_style",
|
||||
domain: "education",
|
||||
kind_hint: "education_milestone",
|
||||
user_prompt_hint: "成就盘仍会换升。可以再补一件记得大概时间的学业、考试或被委以责任的变化;同一件事会对照本命五宫和 D5,不要贴类型标签。",
|
||||
source: "precision_stage",
|
||||
});
|
||||
} else if (!relationshipCovered && !declined.has("relationship")) {
|
||||
@@ -359,7 +369,7 @@ export function buildMethodFollowupPlan(input: {
|
||||
ask_theme: "family_event",
|
||||
domain: "family",
|
||||
kind_hint: "family_event",
|
||||
user_prompt_hint: "可以先说一段记得大概时间的家人相关变化。",
|
||||
user_prompt_hint: "可以先说一段记得大概时间的家人相关变化。同一件事会对照 D12 父母盘和 D7 子女盘。",
|
||||
source: "method_coverage",
|
||||
});
|
||||
} else if (!appearanceCovered && !declined.has("appearance")) {
|
||||
@@ -385,6 +395,9 @@ export function buildMethodFollowupPlan(input: {
|
||||
} else {
|
||||
const d9 = input.observations?.find((item) => item.layer === "d9");
|
||||
const d10 = input.observations?.find((item) => item.layer === "d10");
|
||||
const d4 = input.observations?.find((item) => item.layer === "d4");
|
||||
const d5 = input.observations?.find((item) => item.layer === "d5");
|
||||
const d7 = input.observations?.find((item) => item.layer === "d7");
|
||||
const d12 = input.observations?.find((item) => item.layer === "d12");
|
||||
if (d9?.candidates_differ && !declined.has("relationship")) {
|
||||
next = followup({
|
||||
@@ -406,14 +419,34 @@ export function buildMethodFollowupPlan(input: {
|
||||
user_prompt_hint: "当前候选在事业主题上仍分不开,可以再补一件记得大概时间的工作变化;不要描述类型标签。同一件事会同时对照本命第 10 宫和 D10。",
|
||||
source: "varga_observation",
|
||||
});
|
||||
} else if (d12?.candidates_differ && !declined.has("family")) {
|
||||
} else if (d4?.candidates_differ && !declined.has("relocation")) {
|
||||
next = followup({
|
||||
method_id: "d4_home",
|
||||
intent: "distinguish_candidates",
|
||||
ask_theme: "home_change",
|
||||
domain: "relocation",
|
||||
kind_hint: "home_change",
|
||||
user_prompt_hint: "当前候选在居所主题上仍分不开,可以再补一件记得大概时间的搬家或住处变化。",
|
||||
source: "varga_observation",
|
||||
});
|
||||
} else if (d5?.candidates_differ && !declined.has("education")) {
|
||||
next = followup({
|
||||
method_id: "d5_education",
|
||||
intent: "distinguish_candidates",
|
||||
ask_theme: "education_style",
|
||||
domain: "education",
|
||||
kind_hint: "education_milestone",
|
||||
user_prompt_hint: "当前候选在学业或成就主题上仍分不开,可以再补一件记得大概时间的学业、考试或被委以责任的变化;不要贴类型标签。",
|
||||
source: "varga_observation",
|
||||
});
|
||||
} else if ((d12?.candidates_differ || d7?.candidates_differ) && !declined.has("family")) {
|
||||
next = followup({
|
||||
method_id: "relatives",
|
||||
intent: "distinguish_candidates",
|
||||
ask_theme: "family_event",
|
||||
domain: "family",
|
||||
kind_hint: "family_event",
|
||||
user_prompt_hint: "当前候选在家人主题上仍分不开,可以再补一件记得大概时间的家人变化。",
|
||||
user_prompt_hint: "当前候选在家人主题上仍分不开,可以再补一件记得大概时间的家人变化。同一件事会对照 D12 和 D7。",
|
||||
source: "varga_observation",
|
||||
});
|
||||
} else if (input.nakshatraBoundary?.near_boundary) {
|
||||
|
||||
@@ -53,6 +53,8 @@ export const PUBLIC_RECTIFICATION_METHODS = [
|
||||
"d1-rashi",
|
||||
"d2-hora",
|
||||
"d4-chaturthamsha",
|
||||
"d5-panchamsha",
|
||||
"d7-saptamsha",
|
||||
"d9-navamsa",
|
||||
"d10-dashamsa",
|
||||
"d11-labhamsha",
|
||||
|
||||
@@ -13,10 +13,12 @@ const LAYER_LABEL: Record<WindowScanLayer, string> = {
|
||||
d9: "D9",
|
||||
d10: "D10",
|
||||
d4: "D4",
|
||||
d5: "D5",
|
||||
d7: "D7",
|
||||
d12: "D12",
|
||||
};
|
||||
|
||||
export type WindowScanLayer = "d1" | "d9" | "d10" | "d4" | "d12";
|
||||
export type WindowScanLayer = "d1" | "d9" | "d10" | "d4" | "d5" | "d7" | "d12";
|
||||
|
||||
export type WindowScanTransition = Readonly<{
|
||||
layer: WindowScanLayer;
|
||||
@@ -68,6 +70,8 @@ export type PrecisionStageId =
|
||||
| "lagna_frame"
|
||||
| "d9_refine"
|
||||
| "d10_refine"
|
||||
| "d4_refine"
|
||||
| "d5_refine"
|
||||
| "theme_refine"
|
||||
| "ready_to_adopt";
|
||||
|
||||
@@ -113,7 +117,7 @@ export function parseWindowScanTransitions(value: unknown): readonly WindowScanT
|
||||
const at = asTime(row?.at);
|
||||
if (
|
||||
!row
|
||||
|| (layer !== "d1" && layer !== "d9" && layer !== "d10" && layer !== "d4" && layer !== "d12")
|
||||
|| (layer !== "d1" && layer !== "d9" && layer !== "d10" && layer !== "d4" && layer !== "d5" && layer !== "d7" && layer !== "d12")
|
||||
|| !at
|
||||
) continue;
|
||||
const key = `${layer}:${at}`;
|
||||
@@ -252,6 +256,8 @@ export function parsePrecisionStage(value: unknown): PrecisionStage | null {
|
||||
&& current !== "lagna_frame"
|
||||
&& current !== "d9_refine"
|
||||
&& current !== "d10_refine"
|
||||
&& current !== "d4_refine"
|
||||
&& current !== "d5_refine"
|
||||
&& current !== "theme_refine"
|
||||
&& current !== "ready_to_adopt"
|
||||
)
|
||||
|
||||
@@ -19,19 +19,23 @@ export type WindowScan = Readonly<{
|
||||
d9_lagna_count: number;
|
||||
d10_lagna_count: number;
|
||||
d4_lagna_count: number;
|
||||
d5_lagna_count: number;
|
||||
d7_lagna_count: number;
|
||||
d12_lagna_count: number;
|
||||
d1_candidates_differ: boolean;
|
||||
d9_candidates_differ: boolean;
|
||||
d10_candidates_differ: boolean;
|
||||
d4_candidates_differ: boolean;
|
||||
d5_candidates_differ: boolean;
|
||||
d7_candidates_differ: boolean;
|
||||
d12_candidates_differ: boolean;
|
||||
transitions: readonly WindowScanTransition[];
|
||||
}>;
|
||||
|
||||
export type InternalVargaObservation = Readonly<{
|
||||
layer: "d9" | "d10" | "d12";
|
||||
layer: "d9" | "d10" | "d4" | "d5" | "d7" | "d12";
|
||||
candidates_differ: boolean;
|
||||
ask_theme: "relationship_style" | "career_style" | "family_event" | null;
|
||||
ask_theme: "relationship_style" | "career_style" | "home_change" | "education_style" | "family_event" | null;
|
||||
}>;
|
||||
|
||||
function asRecord(value: unknown): Readonly<Record<string, unknown>> | null {
|
||||
@@ -65,11 +69,15 @@ export function parseWindowScan(value: unknown): WindowScan | null {
|
||||
if (d9Count === null || d10Count === null) return null;
|
||||
const d1Count = optionalCount(row.d1_lagna_count);
|
||||
const d4Count = optionalCount(row.d4_lagna_count);
|
||||
const d5Count = optionalCount(row.d5_lagna_count);
|
||||
const d7Count = optionalCount(row.d7_lagna_count);
|
||||
const d12Count = optionalCount(row.d12_lagna_count);
|
||||
const d9Differ = row.d9_candidates_differ === true || d9Count > 1;
|
||||
const d10Differ = row.d10_candidates_differ === true || d10Count > 1;
|
||||
const d1Differ = row.d1_candidates_differ === true || d1Count > 1;
|
||||
const d4Differ = row.d4_candidates_differ === true || d4Count > 1;
|
||||
const d5Differ = row.d5_candidates_differ === true || d5Count > 1;
|
||||
const d7Differ = row.d7_candidates_differ === true || d7Count > 1;
|
||||
const d12Differ = row.d12_candidates_differ === true || d12Count > 1;
|
||||
return {
|
||||
scanned: true,
|
||||
@@ -79,11 +87,15 @@ export function parseWindowScan(value: unknown): WindowScan | null {
|
||||
d9_lagna_count: d9Count,
|
||||
d10_lagna_count: d10Count,
|
||||
d4_lagna_count: d4Count,
|
||||
d5_lagna_count: d5Count,
|
||||
d7_lagna_count: d7Count,
|
||||
d12_lagna_count: d12Count,
|
||||
d1_candidates_differ: d1Differ,
|
||||
d9_candidates_differ: d9Differ,
|
||||
d10_candidates_differ: d10Differ,
|
||||
d4_candidates_differ: d4Differ,
|
||||
d5_candidates_differ: d5Differ,
|
||||
d7_candidates_differ: d7Differ,
|
||||
d12_candidates_differ: d12Differ,
|
||||
transitions: parseWindowScanTransitions(row.transitions),
|
||||
};
|
||||
@@ -110,6 +122,21 @@ export function internalObservationsFromWindowScan(
|
||||
candidates_differ: scan.d10_candidates_differ,
|
||||
ask_theme: scan.d10_candidates_differ ? "career_style" : null,
|
||||
},
|
||||
{
|
||||
layer: "d4",
|
||||
candidates_differ: scan.d4_candidates_differ,
|
||||
ask_theme: scan.d4_candidates_differ ? "home_change" : null,
|
||||
},
|
||||
{
|
||||
layer: "d5",
|
||||
candidates_differ: scan.d5_candidates_differ,
|
||||
ask_theme: scan.d5_candidates_differ ? "education_style" : null,
|
||||
},
|
||||
{
|
||||
layer: "d7",
|
||||
candidates_differ: scan.d7_candidates_differ,
|
||||
ask_theme: scan.d7_candidates_differ ? "family_event" : null,
|
||||
},
|
||||
{
|
||||
layer: "d12",
|
||||
candidates_differ: scan.d12_candidates_differ,
|
||||
|
||||
Reference in New Issue
Block a user