Lesson scaffold

From hartphoenix/weft · View interactive version

Lesson scaffold is an AI agent skill from the GitHub repository hartphoenix/weft. Restructures external learning materials into a conceptual scaffold tailored to the learner's current level. Reads learning state (current-state, goals, session logs) to classify concepts and shape the scaffold. Writes a persistent scaffold file to learning/scaffolds/. Use when the user provides lea

How to use this skill

Skill file

Lesson Scaffold

Restructure procedural material by conceptual dependency, shaped to the

learner's current state. The scaffold is a map, not a lecture.

Inputs

  1. Source material (required). URL, file path, or pasted text — any

learning content.

  1. Context (optional). Energy, time, emotional context, what they

need. Shapes scope.

Phase 1: Gather

Read local learning state. Fail fast and degrade gracefully — every

source is optional.

Step 1: Learning state check

Check whether learning/current-state.md and learning/goals.md exist.

scaffold from the material alone. Run /intake for a personalized

scaffold." Proceed with concepts classified as new.

Step 2: Recent session context

List files in learning/session-logs/. For the most recent 1-2 log

files, read the YAML frontmatter. Extract:

date: YYYY-MM-DD
project: project-name
concepts:
  - name: concept-name
    score: N
    gap: type
arcs:
  - arc-name

Also scan the body of the most recent log for "remaining work" or

"next steps" — material that connects to unfinished threads gets

extra relevance.

From the collected frontmatter, build a picture of:

gaps remain

connect to

If no session logs exist, skip silently.

Step 3: Learning state files

If the learning state files exist, read them:

learning/current-state.md — concept inventory. Extract:

scaffold each concept

estimates (see .claude/references/scoring-rubric.md)

learning/goals.md — active goals. Extract:

Reference files consulted as needed:


Phase 2: Analyze and Scaffold

Step 1: Fetch the source material

Read or fetch the source material provided by the user.

Step 2: Extract concepts

Extract every concept the material teaches or assumes — explicit and

implicit. Implicit concepts (things the lesson takes for granted) are

often where the real learning edges are.

Step 3: Classify each concept using gathered state

For each extracted concept, assign a classification:

concepts to these. Brief mention only.

type: conceptual gaps need framing, procedural gaps need reps,

recall gaps need spaced exposure.

nearest known concept as a bridge.

it) — flag as risk. Suggest pre-work or flag for extra attention

during execution.

If no learning state exists, classify all concepts as new.

Step 4: Connect to goals

If learning/goals.md exists, note:

Step 5: Produce the scaffold

Six sections, each shaped by the concept classifications:

What this material covers — one paragraph connecting the material

to the learner's goals and current state. What it teaches, why it

matters now.

Concepts to understand — each concept with:

Execution sequence — the instructor's steps reordered by

conceptual dependency. Group steps that share a concept. Mark which

concepts each step exercises. Weight time toward growing and new

concepts — solid concepts need less attention.

Resurfaced gaps — low-scoring concepts from current-state.md that

this material happens to touch. Spaced repetition for free.

Goal connection — one line: what this material moves forward in

the learner's trajectory.

Pre-work (only if prerequisite gaps were found) — specific

concepts to review or brush up on before starting.

Step 6: Write the scaffold file

Write the scaffold to learning/scaffolds/YYYY-MM-DD-<topic-slug>.md.

Derive the topic slug from the source material title, URL path, or

filename. If the learning/scaffolds/ directory doesn't exist, create

it.

File format:

---
date: YYYY-MM-DD
source: <URL, file path, or "pasted text">
arcs: [list of arcs this material touches]
concepts: [list of concepts extracted]
---

# Scaffold: <topic>

## What this material covers
<paragraph connecting to learner's goals>

## Concepts
<classified concept list with bridges, gaps, and status>

## Execution sequence
<reordered steps grouped by concept, weighted toward growth edges>

## Resurfaced gaps
<low-scoring concepts this material touches>

## Goal connection
<one line: what this moves forward>

## Pre-work
<only if prerequisite gaps found>

Step 7: Link to session log

Check whether learning/session-logs/YYYY-MM-DD.md exists for today.

If it exists: add a scaffold: field to its YAML frontmatter

pointing to the scaffold file.

If it doesn't exist: create it with minimal frontmatter:

---
date: YYYY-MM-DD
scaffold: scaffolds/YYYY-MM-DD-<topic-slug>.md
---

This creates a breadcrumb so session-review can connect the scaffold's

predictions to session evidence. Session-review will merge its own

frontmatter (project, concepts, arcs) into this file later — don't

duplicate those fields here.

Step 8: Present and confirm

Present the scaffold to the user. Ask whether the scope and

classification feel right. If they adjust, update the file.

They drive.


Graceful Degradation

| Missing | Effect |

|---------|--------|

| All learning state | Scaffold from material alone. All concepts classified as new. Suggest /intake. |

| current-state.md only | No concept scoring. Goals still provide trajectory connection. |

| goals.md only | No trajectory connection. Concepts still scored from current-state. |

| Session logs empty | No recent session context. Scaffold still works. |


Boundaries

walkthrough.

learning/scaffolds/ and session log frontmatter only.

Session-review owns all state updates.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.