GF-Learn-Ctx — Contextual Learning

SkillDev tools

Contextual learning — micro-lessons embedded in workflow output. Explains hardware concepts on first encounter, tracks what has been taught, generates practice exercises on demand. Used internally by orchestrator — not typically invoked directly.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the GF-Learn-Ctx — Contextual Learning skill

What this skill tells your AI

The instructions your AI receives, as published by codejunkie99/gateflow-plugin in skills/gf-learn-ctx/SKILL.md and read by ahel’s review.

Philosophy

Teaching happens WITHIN the workflow, not in a separate mode. The first time a user encounters a concept, explain it briefly. Never explain the same concept twice.

First-Encounter Explanations

When GateFlow generates code using a concept for the first time, include a 2-3 sentence explanation marked with [Learn]:

Generated sync_2ff.sv

[Learn] This is a 2-flip-flop synchronizer. When a signal crosses
between clock domains, it can be captured during a metastable state.
Two back-to-back flip-flops reduce metastability probability to safe
levels. For multi-bit signals, use a Gray code FIFO or handshake instead.

Concept Tracking

Check ~/.gateflow/profile.json before explaining:

{
  "concepts_introduced": ["cdc", "fsm", "pipeline", "fifo", "axi"]
}

If concept is in the list, skip the explanation. After explaining, add the concept to the list.

Concept Library

ConceptTriggerExplanation Focus
cdc2FF sync, async FIFOMetastability, why 2 FFs
fsmState machine codeTwo-process pattern, encoding
pipelinePipeline register, stage, valid_qBreaks long paths into stages for higher clock frequency
fifoFIFO instantiationFull/empty, pointer math
axiAXI interfaceValid/ready handshake rules
formalSVA propertiesBounded proof, counterexample
synthesisYosys outputLUTs vs FFs, resource meaning
constraintsPin mappingIOSTANDARD, voltage rails
vhdlVHDL codeComparison with SystemVerilog
backpressureready signal, stallConsumer tells producer to stop via ready deassertion
clock_gatinggclk, ICG cellStops clock to idle registers, saves dynamic power
reset_synchronizerrst_sync, async assert/sync deassertPrevents metastability on reset release
gray_codebin2gray, gray2binChanges one bit per increment, safe for CDC pointers
dual_port_ramsdp_ram, true dual-portTwo independent access ports, FPGA BRAM native
arbitrationarbiter, grant, round-robinResolves contention for shared resources
bus_protocolAXI, Wishbone, APBDefines master/slave communication rules
timing_closureslack, critical pathAll paths meet setup/hold at target frequency
register_fileregfile, read/write portsSmall fast memory with multiple read ports
shift_registerLFSR, serial-to-parallelMoves data one position per clock
priority_encodercasez, leading zeroOutputs index of highest-priority active bit
barrel_shifterrotate, variable shiftVariable-distance shift via mux cascade
interrupt_controllerIRQ, pending, maskAggregates and prioritizes interrupt sources
dmadescriptor, scatter-gatherTransfers data between memory without CPU

Generative Exercises

When user asks to practice:

  1. Generate a buggy version of a recent design
  2. Ask user to find the error
  3. Reveal answer with explanation

Example:

Want to practice? Here's a FIFO with a subtle bug.
Find what's wrong:

[buggy code]

Hint: Look at the full/empty logic...

Cross-HDL Explanations

When a SV user sees VHDL for the first time:

[Learn] VHDL uses 'signal' instead of 'logic', and 'process'
instead of 'always_ff'. The semantics are similar — sequential
logic with sensitivity lists. VHDL is more verbose but equally
capable for synthesis.

Cross-Reference Linking

When explaining a concept, append related GateFlow links:

  • CDC -> "Use /gf-ip add cdc_2ff for a drop-in synchronizer."
  • FIFO -> "Use /gf-ip add fifo_async for a verified async FIFO."
  • Protocol -> "See /gf-protocols for AXI/SPI/UART references."
  • Practice -> "Try /gf-learn <topic> for exercises."

Spaced Repetition

Sessions Since Last UseAction
3-5Brief reminder (1 sentence)
6-10Medium reminder (2 sentences + link)
11+Full re-explanation

Integration Hooks

Inject micro-lessons at these points in /gf orchestration:

  • Post-codegen: scan generated code for new concepts
  • Post-ip-add: explain the concept behind the IP block
  • Post-lint-fail: teach concept if error involves one (e.g., latch = incomplete case)
  • Post-sim-fail: explain if failure involves X-propagation or CDC
  • Post-plan: introduce concepts user hasn't seen

Signals

GitHub stars
112
Forks
14
Last commit
May 2026
Advanced
Catalog kind
skill
Gateway key
gf-learn-ctx
Source
github.com/codejunkie99/gateflow-plugin