Back to Overview
Level 1 — Deep Dive

The Interplay of Modes

How mode detection, data flow, and KG-enhanced scoring work together in the Learning Skill.

On this page
  • Mode Detection — Keywords determine the mode
  • Combined Mode Data Flow — KG data improves courses
  • KG-Enhanced Scoring — Complexity, fan-in, layer data
  • Orchestrator Rules — Sequential vs. parallel
01
Mode Detection
Keywords in the user prompt automatically determine the mode

When a user invokes the Learning Skill, the orchestrator analyzes the prompt for keywordsDefined in skill.md under modes.[mode].keywords. Multilingual — both German and English terms are recognized. In case of ambiguity, the more specific mode wins.. Three keyword groups determine the mode: course words ("course", "tutorial", "HTML"), understand words ("understand", "graph", "analyze"), and combination words ("both", "combined", "everything").

# Mode detection in skill.md mode_detection: course: keywords: ["course", "tutorial", "HTML", "Kurs"] pipeline: Phase 0-6 understand: keywords: ["understand", "graph", "analyze"] pipeline: Phase 0-7 combined: keywords: ["both", "combined", "everything"] pipeline: A0-A7, then B0-B6

The orchestrator scans the user prompt for keywords. On a match, the corresponding mode is activated and its pipeline starts. In case of ambiguity, the combined mode wins since it produces both outputs.

02
Combined Mode Data Flow
KG data flows into HS scoring for more objective courses

In combined mode, the full KG pipeline runs first (Phase A0-A7). Its result — the Knowledge Graph — then serves as input for the course pipeline (Phase B0-B6). The key advantage: KG data makes helpfulness scoring more objective.

Combined Mode Data Flow
A0-2
Scan +
Analyze
A3-7
Assemble
to Save
KG
Knowledge
Graph
B0-2
Bootstrap
+ HS
B3-6
Build +
Polish

Without KG data, HS scoring relies purely on heuristics. With KG data, objective metrics are added: How many files import this one? Which architecture layer does it belong to? How complex is its dependency graph?

03
KG-Enhanced Scoring
How complexity, fan-in, and layer data improve HS

In integration mode, helpfulness scoring receives four additional data points from the Knowledge Graph as bonus factors:

KG Bonus Factors
KG MetricBonusLogic
Complexity+1Node has high cyclomatic complexity or many internal dependencies
Fan-in+1Node is imported by many other nodes (high inbound connectivity)
Core Layer+1Node belongs to Core/Domain layer (architectural center)
Edge Density+1Node has above-average inbound + outbound edges
// KG-enhanced HS scoring function calculateHS(topic, kgData) { let hs = complexity(0-3) + relevance(0-3) + learningValue(0-2) + independence(0-2); if (kgData) { if (node.complexity > threshold) hs += 1; if (node.fanIn > avgFanIn * 1.5) hs += 1; if (node.layer === "Core") hs += 1; if (node.edgeDensity > avg * 2) hs += 1; } return Math.min(hs, 10); }
04
Orchestrator Rules
Sequential vs. parallel, pipeline architecture

The orchestrator in skill.md controls which phases run sequentially and which run in parallel. Core rule: phases with dependencies run sequentially, independent work units within a phase run in parallel.

Orchestration Rules
RuleSequentialParallel
PhasesPhase N must complete before Phase N+1--
AgentsScanner before analyzer, analyzer before assembler5 file-analyzers simultaneously
Audiences--Users, developers, executives simultaneously
Languages--DE and EN simultaneously per audience
ModesCombined: KG pipeline before course pipeline--

In combined mode, the KG pipeline must fully complete before the course pipeline starts, since the course pipeline needs KG data as input. Within each pipeline, as many steps as possible are parallelized to minimize total runtime.

More Developer L1 Pages