feat(zoology): upgrade to v1.4.0 with Memetic Superclass Registry (M1-M6 & M7+ lifecycle) and Exemplar Dossier 69 (Vampiric Memetics)
This commit is contained in:
1 parent
3409e1e651
commit
18df3ff585
4 files changed
+392
-4
No files matched your search
@@ -790,10 +790,179 @@ def scan_harvest_for_revisions(
|
||||
}
|
||||
|
||||
|
||||
def scan_memetic_superclass_lifecycle(
|
||||
harvest_path: str,
|
||||
memetic_registry_path: str,
|
||||
base_report: dict[str, Any],
|
||||
update_registry: bool = False,
|
||||
) -> dict[str, Any]:
|
||||
"""
|
||||
Evaluate the Memetic Superclass (M1-M6) and Emergent Subclass Lifecycle (M7+, Run N -> Run N+1):
|
||||
1. State-Gated Inheritance: Scans each headline in `harvest_path` for observable thermodynamic/affective
|
||||
state triggers (`M1` Vampiric/Entropic, `M2` Hyper-Kinetic, `M3` Leviathan, `M4` Mimetic, `M5` Oracle, `M6` Abyssal)
|
||||
and unlocks only the state-matched memetic subclass pools for those headlines.
|
||||
2. Three-Gate Unsupervised Nucleation (Run N -> Provisional Candidate):
|
||||
- Gate 1: Collects UNCLASSIFIED words from headlines that contain S1-S6 technocapital keywords.
|
||||
- Gate 2: Checks whether >= 3 unclassified words collide (AQ_Ing == N, Gen 1 variance = 0) with S1-S6
|
||||
entities, including at least one Isometric (Δ = 0) or Prime ([Nth PRIME]) anchor.
|
||||
- Gate 3: Checks cross-story persistence (>= 2 distinct stories).
|
||||
3. Two-Execution Promotion Lifecycle (Run N+1 -> Canonical Promotion or Dormant Archival):
|
||||
- Checks any existing `provisional_candidates` in `memetic-superclass-registry.json`. If confirmed on Run N+1
|
||||
(`persistence_count >= promotion_threshold`), promotes to `canonical_subclasses`; if inactive past
|
||||
`dormancy_window_runs`, moves to `dormant_episodic`.
|
||||
"""
|
||||
harvest = json.loads(Path(harvest_path).read_text(encoding="utf-8"))
|
||||
reg = json.loads(Path(memetic_registry_path).read_text(encoding="utf-8"))
|
||||
canonical = reg.get("canonical_subclasses", {})
|
||||
provisional = reg.get("provisional_candidates", {})
|
||||
dormant = reg.get("dormant_episodic", {})
|
||||
promo_thresh = reg.get("promotion_threshold", 2)
|
||||
dormancy_win = reg.get("dormancy_window_runs", 3)
|
||||
|
||||
# Map S1-S6 entities by Ingglish AQ
|
||||
s_by_aq: dict[int, list[dict[str, Any]]] = {}
|
||||
s_keywords = set()
|
||||
for cid, cinfo in TAXONOMY_CLASSES.items():
|
||||
for kw in cinfo["keywords"]:
|
||||
s_keywords.add(kw.lower())
|
||||
for ent in base_report.get("entities", []):
|
||||
s_by_aq.setdefault(ent["ing_aq"], []).append(ent)
|
||||
|
||||
known_memetic_words = set()
|
||||
for m_info in canonical.values():
|
||||
for kw in m_info.get("keywords", []):
|
||||
known_memetic_words.add(kw.lower())
|
||||
|
||||
# 1. State-Gated Inheritance across headlines
|
||||
state_activated_stories = []
|
||||
tech_stories = set()
|
||||
for idx, h in enumerate(harvest.get("headlines", [])):
|
||||
hl_eng = h.get("headline_eng", "")
|
||||
hl_low = hl_eng.lower()
|
||||
story_id = f"H{idx+1:02d}:{h.get('source', '')}"
|
||||
matched_s = [cid for cid, cinfo in TAXONOMY_CLASSES.items() if any(kw in hl_low for kw in cinfo["keywords"])]
|
||||
if matched_s:
|
||||
tech_stories.add(story_id)
|
||||
activated_m = []
|
||||
for mid, minfo in canonical.items():
|
||||
trig_hits = [tr for tr in minfo.get("state_triggers", []) if tr in hl_low]
|
||||
if trig_hits:
|
||||
activated_m.append(
|
||||
{
|
||||
"subclass_id": mid,
|
||||
"subclass_name": minfo["name"],
|
||||
"triggers_matched": trig_hits,
|
||||
"unlocked_coordinates": minfo["signature_coordinates"][:8],
|
||||
}
|
||||
)
|
||||
if activated_m:
|
||||
state_activated_stories.append(
|
||||
{
|
||||
"story": story_id,
|
||||
"headline": hl_eng,
|
||||
"material_classes": matched_s if matched_s else ["GENERAL_WIRE"],
|
||||
"activated_memetic_superclasses": activated_m,
|
||||
}
|
||||
)
|
||||
|
||||
# 2. Check existing provisional_candidates for Run N+1 promotion
|
||||
promoted_on_this_run = []
|
||||
moved_to_dormant = []
|
||||
for cand_id, cand in list(provisional.items()):
|
||||
hits = []
|
||||
for idx, h in enumerate(harvest.get("headlines", [])):
|
||||
hl_low = h.get("headline_eng", "").lower()
|
||||
if any(w in hl_low for w in cand.get("keywords", [])):
|
||||
hits.append(f"H{idx+1:02d}")
|
||||
if hits:
|
||||
cand["persistence_count"] = cand.get("persistence_count", 1) + 1
|
||||
cand["runs_since_last_seen"] = 0
|
||||
if cand["persistence_count"] >= promo_thresh:
|
||||
cand["status"] = "canonical"
|
||||
canonical[cand_id] = cand
|
||||
del provisional[cand_id]
|
||||
promoted_on_this_run.append(cand_id)
|
||||
else:
|
||||
cand["runs_since_last_seen"] = cand.get("runs_since_last_seen", 0) + 1
|
||||
if cand["runs_since_last_seen"] >= dormancy_win:
|
||||
cand["status"] = "dormant_episodic"
|
||||
dormant[cand_id] = cand
|
||||
del provisional[cand_id]
|
||||
moved_to_dormant.append(cand_id)
|
||||
|
||||
# 3. Three-Gate Unsupervised Nucleation for residual unclassified words in tech_stories
|
||||
residual_collisions = []
|
||||
residual_stories = set()
|
||||
for ent in harvest.get("entities", []):
|
||||
w_low = ent["eng"].lower()
|
||||
st = ent.get("story", "")
|
||||
if st not in tech_stories:
|
||||
continue
|
||||
if w_low in s_keywords or w_low in known_memetic_words:
|
||||
continue
|
||||
ing_aq = ent["ing_aq"]
|
||||
if ing_aq in s_by_aq:
|
||||
s_partners = [f"{x['ing']} ({x['eng']}, {x['taxonomy_classes']})" for x in s_by_aq[ing_aq]]
|
||||
residual_collisions.append(
|
||||
{
|
||||
"eng": ent["eng"],
|
||||
"ing": ent["ing"],
|
||||
"ing_aq": ing_aq,
|
||||
"isometric": ent.get("isometric", False),
|
||||
"is_prime": ent.get("is_prime", False),
|
||||
"story": st,
|
||||
"s1_s6_partners": s_partners,
|
||||
}
|
||||
)
|
||||
residual_stories.add(st)
|
||||
|
||||
has_iso_or_prime = any(r["isometric"] or r["is_prime"] for r in residual_collisions)
|
||||
nucleation_passed = (len(residual_collisions) >= 3) and has_iso_or_prime and (len(residual_stories) >= 2)
|
||||
|
||||
newly_nucleated = None
|
||||
if nucleation_passed:
|
||||
target_date = harvest.get("temporal_metadata", {}).get("target_date_utc", "unknown")
|
||||
cand_id = f"M7_candidate_{target_date.replace('-', '_')}"
|
||||
newly_nucleated = {
|
||||
"id": cand_id,
|
||||
"status": "provisional_candidate",
|
||||
"discovered_on_date_utc": target_date,
|
||||
"persistence_count": 1,
|
||||
"runs_since_last_seen": 0,
|
||||
"gate1_residual_count": len(residual_collisions),
|
||||
"gate2_iso_or_prime_anchor": has_iso_or_prime,
|
||||
"gate3_distinct_stories": len(residual_stories),
|
||||
"signature_coordinates": sorted(list({r["ing_aq"] for r in residual_collisions}), reverse=True)[:10],
|
||||
"keywords": [r["eng"].lower() for r in residual_collisions[:12]],
|
||||
"sample_locks": residual_collisions[:8],
|
||||
"next_execution_expectation": "Registered as provisional_candidate for Run N+1; if its keywords/coordinates recur on the next harvest (persistence_count >= 2), it auto-promotes to canonical M7 and emits a 30-equation dossier.",
|
||||
}
|
||||
if update_registry and cand_id not in provisional and cand_id not in canonical:
|
||||
provisional[cand_id] = newly_nucleated
|
||||
|
||||
if update_registry:
|
||||
reg["canonical_subclasses"] = canonical
|
||||
reg["provisional_candidates"] = provisional
|
||||
reg["dormant_episodic"] = dormant
|
||||
Path(memetic_registry_path).write_text(json.dumps(reg, indent=2, ensure_ascii=False), encoding="utf-8")
|
||||
|
||||
return {
|
||||
"harvest_file": harvest_path,
|
||||
"target_date_utc": harvest.get("temporal_metadata", {}).get("target_date_utc"),
|
||||
"canonical_memetic_subclasses": list(canonical.keys()),
|
||||
"state_gated_activations_count": len(state_activated_stories),
|
||||
"state_gated_story_activations": state_activated_stories[:10],
|
||||
"run_n_plus_1_promotions": promoted_on_this_run,
|
||||
"moved_to_dormant_episodic": moved_to_dormant,
|
||||
"unsupervised_m7_nucleation": {
|
||||
"all_three_gates_passed": nucleation_passed,
|
||||
"provisional_candidate": newly_nucleated,
|
||||
},
|
||||
}
|
||||
def main() -> int:
|
||||
import re
|
||||
ap = argparse.ArgumentParser(description="Identify, taxonomize, and revise Landian-Deleuzean technocapital singularities (S1-S6).")
|
||||
ap.add_argument("--terms", nargs="*", help="Custom list of terms to analyze (defaults to canonical S1-S6 corpus).")
|
||||
ap = argparse.ArgumentParser(description="Identify, taxonomize, and revise Landian-Deleuzean technocapital singularities (S1-S6 & Memetic Superclass M1-M6).")
|
||||
ap.add_argument("--terms", nargs="*", help="Custom list of terms to analyze (defaults to canonical S1-S6 + M1 corpus).")
|
||||
ap.add_argument(
|
||||
"--quant-mode",
|
||||
choices=["off", "spoken", "digit", "dual"],
|
||||
@@ -806,6 +975,11 @@ def main() -> int:
|
||||
default="/workspace/technocapital-singularity-zoology/taxonomy/quantitative-economic-anchors.json",
|
||||
help="Path to quantitative-economic-anchors.json registry.",
|
||||
)
|
||||
ap.add_argument(
|
||||
"--memetic-registry",
|
||||
default="/workspace/technocapital-singularity-zoology/taxonomy/memetic-superclass-registry.json",
|
||||
help="Path to memetic-superclass-registry.json (M1-M6 & provisional M7+ candidates).",
|
||||
)
|
||||
ap.add_argument(
|
||||
"--revise-anchor",
|
||||
nargs=3,
|
||||
@@ -815,7 +989,12 @@ def main() -> int:
|
||||
ap.add_argument(
|
||||
"--scan-harvest",
|
||||
default=None,
|
||||
help="Optional path to news-aq-harvest-latest.json to scan for quantitative revisions and new S1-S6 anchors.",
|
||||
help="Optional path to news-aq-harvest-latest.json to scan for quantitative revisions, state-gated M1-M6 activations, and M7+ nucleation.",
|
||||
)
|
||||
ap.add_argument(
|
||||
"--update-memetic-registry",
|
||||
action="store_true",
|
||||
help="Persist newly nucleated M7+ provisional candidates or Run N+1 promotions to memetic-superclass-registry.json.",
|
||||
)
|
||||
ap.add_argument("--out", default=None, help="Optional JSON output file path.")
|
||||
args = ap.parse_args()
|
||||
@@ -864,6 +1043,13 @@ def main() -> int:
|
||||
quant_mode=eff_mode,
|
||||
workdir=args.workdir,
|
||||
)
|
||||
if Path(args.memetic_registry).exists():
|
||||
scan_res["memetic_superclass_lifecycle"] = scan_memetic_superclass_lifecycle(
|
||||
harvest_path=args.scan_harvest,
|
||||
memetic_registry_path=args.memetic_registry,
|
||||
base_report=report,
|
||||
update_registry=args.update_memetic_registry,
|
||||
)
|
||||
out_str = json.dumps(scan_res, indent=2, ensure_ascii=False)
|
||||
else:
|
||||
out_str = json.dumps(report, indent=2, ensure_ascii=False)
|
||||
|
||||
Reference in new issue
Block a user