Skip to content

feat(new-path): DOJ-4431 path authoring command + schema + skill#23

Merged
lapc506 merged 2 commits into
mainfrom
feat/doj-4431-path-authoring-schema
May 27, 2026
Merged

feat(new-path): DOJ-4431 path authoring command + schema + skill#23
lapc506 merged 2 commits into
mainfrom
feat/doj-4431-path-authoring-schema

Conversation

@lapc506

@lapc506 lapc506 commented May 27, 2026

Copy link
Copy Markdown
Collaborator

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-course flow.

What

  • assets/schemas/path.schema.json — JSON Schema for path-overview.md front-matter (matches the dojo-academy schemas/path.schema.yml contract).
  • 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.json contract is unchanged.

🤖 Generated with Claude Code

lapc506 and others added 2 commits May 18, 2026 15:24
…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>
@lapc506 lapc506 marked this pull request as ready for review May 27, 2026 04:11
@lapc506 lapc506 merged commit 98fd986 into main May 27, 2026
1 check passed
@lapc506 lapc506 deleted the feat/doj-4431-path-authoring-schema branch May 27, 2026 04:11

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

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