feat(new-path): DOJ-4431 path authoring command + schema + skill#23
Merged
Conversation
…legacy content
The original `lesson` schema required all 5 IDT pedagogical buckets
(context, concept, build, ship, reflect) as mandatory fields. This blocked
the staging seed of the 27 existing dojo-academy text classes (Fernanda's
audit, 2026-05-15 #C08PNJTDR4P) and matched the same rigidity that
DemoLab hit with Articulate Rise's open-ended question rejection — a
systemic "schema rigidity" failure mode.
## What changes
`lesson.required` shrinks from 9 → 4 fields (only metadata: id, order,
slug, title). The 5 pedagogical buckets become OPTIONAL but
strongly-recommended (their descriptions now lead with "(Recommended)").
A new `body` field accepts free-form markdown as an alternative shape.
`anyOf` enforces that a lesson MUST provide AT LEAST one of the two
authoring shapes — either the 5-bucket structured fields OR `body` — so
empty lessons still fail validation:
```jsonc
"anyOf": [
{ "required": ["body"] },
{ "required": ["context", "concept", "build", "ship"] }
]
```
The description on the lesson definition documents the two shapes and the
contract for downstream consumers (dojo-os ingestion): MUST accept both
shapes without branching — render the structured fields when present,
fall back to `body` otherwise.
## Why opcion C (free-form fallback, IDT recommended)
Andrés' directive (2026-05-18): the schema must serve content authors, not
the other way around. Retrofitting 27 legacy text classes (~3-4 hours of
manual work per Fernanda's estimate) is a poor trade against a 10-line
schema change that unblocks them all immediately. Pedagogical structure
remains the IDT default for NEW lessons — the toolkit's writer / reviewer
agents continue to emit the 5-bucket frame. Legacy content + external
imports (Articulate Rise, Notion, etc.) now have a valid path.
## dojo-os compatibility (verified)
dojo-os `Lesson` interface in `src/types/course.ts:53-64` does NOT
reference any of the 5 IDT buckets. `LessonDraft` already exposes a
generic `content?: string` mapping to `body`. Zero matches for
`lesson.context|concept|build|ship|reflect` across `src/` + `supabase/`.
No follow-up code change required in dojo-os.
## Verification
- `scripts/ci/check_json_schemas.py` passes (JSON parse clean — 3 schema
files valid).
- IDT consumer agents (`course-visualizer.md`, `changelog-generator.md`,
`references/course-iteration-guide.md`) reference the 5-bucket fields
for visualization / changelog summary purposes only; they don't validate
the shape and continue to work for lessons that DO use the structured
fields.
## Follow-up (separate work)
- IDT writer/reviewer agents may want to emit WARNING (not error) on
lessons that ship with `body` only, recommending migration to the
5-bucket frame when the content allows. Tracked under DOJ-4007 alongside
the staging seed work.
Refs: DOJ-4007 (Phase 3 — content backflow to staging)
Created by Claude Code on behalf of @andres
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Adds /new-path authoring support mirroring /new-course, emitting path-overview.md per the dojo-academy path.schema contract (xAPI/cmi5-compatible super-structure): - assets/schemas/path.schema.json — JSON Schema for path front-matter - commands/new-path.md — guided path authoring command - skills/new-path/ — skill content Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Created by Claude Code on behalf of @lapc506
Companion to dojo-os DOJ-4431. Adds authoring support for paths (the super-structure above cmi5 courses), mirroring the existing
/new-courseflow.What
assets/schemas/path.schema.json— JSON Schema forpath-overview.mdfront-matter (matches the dojo-academyschemas/path.schema.ymlcontract).commands/new-path.md— guided path authoring command.skills/new-path/— skill content.Why
Paths group cmi5 courses into ordered milestones with credential metadata. Keeping authoring xAPI/cmi5-compatible: a path IRI sits above the per-course layer; the per-course
course.jsoncontract is unchanged.🤖 Generated with Claude Code