CurriculumStructure
교육과정 Chapter 트리 — 트래버설 / path / 구조 감사 checklist + verdict 집계 (Pure)
상태
| 항목 | 값 |
|---|---|
| Layer | core |
| Tier | L1 |
| Status | wip |
| Version | 0.9.0 |
| 가격 | Free (free) |
| **카� | |
| �고리** | Learning |
개요
개요
CurriculumStructure 는 multi-saas-kit 의 Layer 1 Core Plugin � 니다. 교육과정의 Chapter 계층 구조 (대단원 → 중단원 → 레슨) 를 다루는 표준 트래버설, path builder, 구조 감사 checklist, audit verdict 집계를 모델 의존 없이 Pure 로 제공합니다.
핵심 컴포넌트
ChapterNode (DTO)
Eloquent Chapter Model 의 부분집합. 트리 처리에 필요한 6개 필드만 보유 (id, parent_id, name, depth, sort_order, slug). fromArray() / toArray() 변환 helper.
ChapterTreeTraversal (Pure)
exam.how ChapterStructureAuditService::getAncestors / getChildren / getSiblings 추출. DB 의존 제거 — �
력으로 ChapterNode 배열을 받아 처리:
| 메서드 | 결과 |
|---|---|
ancestors($all, $id) | root 우선 정렬된 부모 체인 |
children($all, $id) | 직접 자식 (sort_order asc) |
siblings($all, $id) | 자기 자신 제외 형제 (sort_order asc) |
descendants($all, $id) | 모든 후손 (재귀, 깊이우선) |
ChapterPathBuilder (Pure)
exam.how Chapter::getFullPathAttribute 추출. "대단원 > 중단원 > 레슨" 형식 path 생성. separator config 으로 변경 가능.
$path = $builder->build($allNodes, $chapterId);
// 예: '수와 연산 > 덧�
� > 두 자릿수 덧�
�'
AuditChecklist (Pure constant)
exam.how ChapterStructureAuditService::getChecklistLabels 추출. 6개 표준 카�
�고리:
| Key | 한국어 라벨 |
|---|---|
scope_alignment | 학� |
| �/학기 범위 적합성 | |
hierarchy_balance | 단원-레슨 계층 균형 |
coverage_gap | 구성 누락/과다 여부 |
naming_clarity | 단원/레슨 � |
| � | |
| � | |
| 확성 | |
sequence_prerequisite | 학습 순서/선수학습 |
redundancy_overlap | 중복/겹침 위험 |
LLM 결과를 6개 카� �고리로 분류해 운영자가 일관된 형식으로 검토.
AuditVerdictAggregator (Pure)
exam.how ChapterStructureAuditService::aggregateProviderAudits 의 핵심 로직 추출.
여러 provider 의 verdict 을 하나로 집계 — 우선순위: fail > warn > pass. 즉 provider 중 하나라도 fail 이면 fail, 그 외 warn 이 있으면 warn, 모두 pass 면 pass. config 으로 우선순위 변경 가능.
$aggregator->aggregate(['pass', 'pass', 'fail']); // 'fail'
$aggregator->aggregate(['pass', 'warn', 'pass']); // 'warn'
// 체크리스트별 집계
$aggregator->aggregateByChecklist([
'scope_alignment' => ['pass', 'pass'],
'hierarchy_balance' => ['warn', 'fail'],
]);
// ['scope_alignment' => 'pass', 'hierarchy_balance' => 'fail']