CurriculumStructure
Curriculum chapter tree β traversal / path / audit checklist + verdict aggregation (Pure) (Layer 1 Core).
Statusβ
| Key | Value |
|---|---|
| Layer | core |
| Tier | L1 |
| Status | wip |
| Version | 0.9.0 |
| Price | Free (free) |
| Category | Learning |
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.
| Method | Result |
|---|---|
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:
| Key | Korean 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/CourseModel + Migration (opt-in) - Filament Resource (chapter tree editor)
- LLM provider integration
- Depth validation + sort_order auto-correction
Licenseβ
MIT
Demosβ
- Platform κ΄λ¦¬μ ν¨λμμ λ©ν νμΈ π Login required
- μ¬μ© μμ (PHP)
π View on Plugin Store: store.codebase.how/plugins/curriculum-structure