Skip to main content

CurriculumStructure

Curriculum chapter tree β€” traversal / path / audit checklist + verdict aggregation (Pure) (Layer 1 Core).

Status​

KeyValue
Layercore
TierL1
Statuswip
Version0.9.0
PriceFree (free)
CategoryLearning

Overview​

Overview​

CurriculumStructure is a Layer 1 Core Plugin of multi-saas-kit. It provides standard traversal, path builder, structure audit checklist, and audit verdict aggregation for Chapter hierarchy (λŒ€λ‹¨μ› β†’ 쀑단원 β†’ lesson) β€” all model-free Pure services.

Core Components​

ChapterNode (DTO)​

Subset of Eloquent Chapter Model with 6 fields (id, parent_id, name, depth, sort_order, slug).

ChapterTreeTraversal (Pure)​

Extracted from exam.how's ChapterStructureAuditService::getAncestors / getChildren / getSiblings. DB-free β€” accepts ChapterNode array.

MethodResult
ancestors($all, $id)Parent chain (root first)
children($all, $id)Direct children (sort_order asc)
siblings($all, $id)Siblings excluding self
descendants($all, $id)All descendants (recursive depth-first)

ChapterPathBuilder (Pure)​

Builds "λŒ€λ‹¨μ› > 쀑단원 > 레슨" path. Configurable separator.

AuditChecklist (Pure constant)​

6 standard categories:

KeyKorean Label
scope_alignmentν•™οΏ½
οΏ½/ν•™κΈ° λ²”μœ„ 적합성
hierarchy_balance단원-레슨 계측 κ· ν˜•
coverage_gapꡬ성 λˆ„λ½/κ³Όλ‹€ μ—¬λΆ€
naming_clarity단원/레슨 οΏ½
οΏ½
οΏ½
ν™•μ„±
sequence_prerequisiteν•™μŠ΅ μˆœμ„œ/μ„ μˆ˜ν•™μŠ΅
redundancy_overlap쀑볡/κ²ΉμΉ¨ μœ„ν—˜

AuditVerdictAggregator (Pure)​

Aggregates multiple provider verdicts into one β€” priority: fail > warn > pass. Configurable priority.

Configuration​

return [
'enabled' => env('PLG_CURRICULUM_STRUCTURE_ENABLED', true),
'tree' => ['max_depth' => 2, 'path_separator' => ' > '],
'audit_checklist' => [/* 6 keys */],
'verdict_priority' => ['fail' => 0, 'warn' => 1, 'pass' => 2],
];

Usage​

$nodes = Chapter::all()->map(fn ($c) => ChapterNode::fromArray($c->toArray()))->all();

$ancestors = (new ChapterTreeTraversal)->ancestors($nodes, $chapter->id);
$path = ChapterPathBuilder::fromConfig(config('curriculum-structure'))->build($nodes, $chapter->id);
$verdict = AuditVerdictAggregator::fromConfig(config('curriculum-structure'))
->aggregateByChecklist($providerResults);

Origin​

Extracted from exam.how's Chapter Model + ChapterStructureAuditService (562 LOC). Only model-free Pure parts kept; LLM/external API calls remain in project.

Plugin Relationships​

  • Used by QuestionGeneration (Layer 3) for chapter context
  • Used by ContentReview for audit verdict workflow

Roadmap (Phase 3+)​

  • Standard Chapter / Subject / Course Model + Migration (opt-in)
  • Filament Resource (chapter tree editor)
  • LLM provider integration
  • Depth validation + sort_order auto-correction

License​

MIT

Demos​


πŸ›’ View on Plugin Store: store.codebase.how/plugins/curriculum-structure