Skip to content

fix(registry): break all 6 investing depends_on cycles (DAG acyclic again) - #259

Merged
npbuilds merged 2 commits into
mainfrom
claude/quizzical-chatterjee-77588f
Aug 13, 2026
Merged

fix(registry): break all 6 investing depends_on cycles (DAG acyclic again)#259
npbuilds merged 2 commits into
mainfrom
claude/quizzical-chatterjee-77588f

Conversation

@npbuilds

Copy link
Copy Markdown
Owner

Summary

full_diagnostic_scan.py reported 6 CRITICAL depends_on cycles, all in the investing domain. This PR dissolves all of them by enforcing the directional-DAG convention (STYLE_GUIDE anti-patterns #6/#7), following the precedent of 3cd9717 and 7082150: orient each mutual pair toward the more-foundational skill (higher in-degree in the dependency map) and drop the redundant reverse edge.

Per the "durable edge removal needs registry + generator both" rule, the fix lands at the source — scripts/wire-investing-graph.py's DEPENDENCY_MAP, the generator that owns investing edges — and is propagated to data/registry.json by running the generator with --apply, which also rebuilds the referenced_by reverse index authoritatively.

Edges dropped (11)

Cycle Foundational sink Dropped edges
regime trio macro-cycles (in-degree 7) macro-cycles → monetary-regime, fiscal-regime
reflexivity quad market-psychology (4), sentiment-signals (3) market-psychology → reflexivity-theory, sentiment-signals; sentiment-signals → alt-data-monitoring
risk trio tail-risk (5, core risk primitive) tail-risk → correlation-regimes, position-sizing
equities pair factor-exposure (4 vs 1) factor-exposure → equities
value pair intrinsic-value (2 vs 1) intrinsic-value → quality-compounders
special-sits trio event-driven (3) event-driven → insider-signals, spinoffs-restructuring

Zero relationship loss: every dropped direction either retains its kept reverse edge or is already documented in the source skill's ## Related Skills prose. No SKILL.md edits needed — sync-registry.py's prose harvester only re-adds cross-domain backticked refs, and all 11 dropped edges are intra-investing.

Composite scores recalibrated for the 8 skills whose connectivity changed (−4 to −6 pts; 2 reclassified healthy → warning) so CI's idempotency check stays green.

Known issue surfaced (not fixed here)

scripts/patch_mentor_suite.py is currently not a safe re-run: its DEPS table has drifted from the registry since the cycle cleanups (its own NOTE comment documents this), and running it unconditionally rewrites all 43 mentor/career depends_on lists, re-adding deliberately-removed edges. It was run once during this work and its write was fully reverted before committing. Reconciliation is tracked as a separate follow-up task.

Verification

  • scripts/test_wire_investing_graph.py: 3/3 passing
  • scripts/sync-registry.py: registry in sync, no drift
  • scripts/wire-all-domains.py: 0 modifications
  • scripts/recalibrate_scores.py --dry-run: "No score changes needed" (idempotent)
  • scripts/full_diagnostic_scan.py: TOTAL ISSUES: 0 (was 6 CRITICAL)

🤖 Generated with Claude Code

…gain)

Resolve every CRITICAL depends_on_cycle reported by full_diagnostic_scan
by enforcing the directional-DAG convention (STYLE_GUIDE #6/#7), following
the precedent of 3cd9717 and 7082150: orient each mutual pair toward the
more-foundational skill (higher in-degree) and drop the redundant reverse.

Fixed at source in scripts/wire-investing-graph.py DEPENDENCY_MAP (the
generator that owns investing edges), then propagated to data/registry.json
via --apply, which also rebuilt the referenced_by reverse index. 11 edges
dropped:

- macro-cycles -> monetary-regime, fiscal-regime (macro-cycles is the sink)
- market-psychology -> reflexivity-theory, sentiment-signals
- sentiment-signals -> alt-data-monitoring
- tail-risk -> correlation-regimes, position-sizing (core risk primitive)
- factor-exposure -> equities
- intrinsic-value -> quality-compounders
- event-driven -> insider-signals, spinoffs-restructuring

Zero relationship loss: every dropped direction keeps its reverse edge or
is already documented in the source skill's Related Skills prose. No
SKILL.md edits needed — sync-registry's prose harvester only re-adds
cross-domain refs, and all 11 edges are intra-investing.

Recalibrated composite scores for the 8 skills whose connectivity changed
(-4 to -6 pts; 2 reclassified healthy -> warning) to keep CI's idempotency
check green.

NOTE: scripts/patch_mentor_suite.py was NOT run — it is currently unsafe
(its DEPS table has drifted from the registry since the cycle cleanups and
rerunning rewrites all 43 mentor/career lists; see the NOTE in that file).

Verified: wire-investing tests 3/3, sync-registry in sync, wire-all-domains
0 modifications, recalibrate idempotent, scan TOTAL ISSUES: 0.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@npbuilds
npbuilds merged commit cbd9ccb into main Aug 13, 2026
5 checks passed
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