From ab79a2a72ba1c267dc1ab43c35d6bb77b114edaa Mon Sep 17 00:00:00 2001 From: Hana Date: Fri, 19 Jun 2026 11:43:34 +0900 Subject: [PATCH] self-study-agent: self-driving loop, no memory format details, auto_repeat config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace static pipeline diagram with self-driving loop (check memory → decide → execute → repeat) - Remove detailed memory structure JSON schemas from all files - Remove honcho-specific storage strategy from skill (storage is caller's responsibility) - Add auto_repeat section to config.yaml (enabled, max_sessions_per_chat, stop_conditions) - Add rule 8 (auto-repeat) and rule 9 (termination conditions) to execution rules - Add session transition logic to adaptation.md (due cards → review, incomplete → study) --- skills/self-study-agent/SKILL.md | 116 ++++++------------ skills/self-study-agent/config.yaml | 9 ++ .../self-study-agent/feedback/adaptation.md | 46 ++----- .../self-study-agent/feedback/interleaving.md | 25 +--- .../self-study-agent/feedback/self-testing.md | 28 +---- .../feedback/spaced-repetition.md | 26 +--- .../pipeline/05-session-report.md | 26 +--- 7 files changed, 65 insertions(+), 211 deletions(-) diff --git a/skills/self-study-agent/SKILL.md b/skills/self-study-agent/SKILL.md index 4f42c34..6615484 100644 --- a/skills/self-study-agent/SKILL.md +++ b/skills/self-study-agent/SKILL.md @@ -13,34 +13,30 @@ dependencies: [websearch, webfetch] **이 스킬은 학습과 평가만 담당합니다.** 메모리 저장은 에이전트가 처리합니다. -## 전체 루프 +## 실행 구조 + +한 번의 실행으로 에이전트가 메모리 상태에 따라 자동으로 다음을 반복합니다: ``` -┌─────────────────────────────────────────────────────────────────────────┐ -│ SELF-STUDY LOOP (최대 20회) │ -├─────────────────────────────────────────────────────────────────────────┤ -│ │ -│ [Phase 1: 학습 세션] │ -│ │ │ -│ ▼ │ -│ 주제 선택 → 소스 발견 → 추출 → 종합 → 메모리 저장 │ -│ │ -│ [Phase 2: 자기 평가 루프] (최대 20회) │ -│ │ │ -│ ▼ │ -│ 문제 생성 → 답변 시도 → 피드백 → 메모리 업데이트 → 다음 문제 │ -│ │ │ -│ ├── 정답 → 신뢰도 ↑, 간격 증가 │ -│ │ │ -│ └── 오답 → 피드백, 약점 분석, 재학습 → 메모리 보강 │ -│ │ -│ [종료 조건] │ -│ - 정답률 95% 이상 │ -│ - 또는 20회 완료 │ -│ │ -└─────────────────────────────────────────────────────────────────────────┘ +[시작] + │ + ├─ 1. 메모리 확인 + │ ├─ due 카드 존재 → 복습 세션 실행 + │ ├─ 미완료 주제 존재 → 새 학습 세션 실행 + │ └─ 모두 완료 → 새 주제 탐색 + │ + ├─ 2. 학습/복습 세션 + │ ├─ Phase 1: 주제 선택 → 소스 발견 → 추출 → 종합 + │ └─ Phase 2: 자기 평가 루프 (최대 20회) + │ + ├─ 3. 결과를 메모리에 저장 + │ + └─ 4. 다시 1번으로 → 반복 + (종료 조건 충족 시까지) ``` +**종료 조건**: due 카드 0, 미완료 주제 0, 최대 세션 도달 + ## 파이프라인 단계 | 단계 | 파일 | 설명 | @@ -64,68 +60,34 @@ dependencies: [websearch, webfetch] 1. **능동적 회상** — 문제를 풀 때 메모리에서만 꺼냄 (소스 접근 금지) 2. **피드백은 에이전트가 생성** — 정오 판정 + 설명 + 관련 개념 링크 -3. **모든 학습은 메모리에 저장** — 구조화된 지식 베이스로 유지 +3. **모든 학습 결과는 메모리에 저장** 4. **간격 반복 적용** — FSRS 알고리즘으로 복습 스케줄 관리 5. **교차 학습** — 한 세션에서 여러 주제 문제를 혼합 출제 6. **바람직한 난이도** — 정답률에 따라 난이도 자동 조절 7. **루프 20회 제한** — 충분한 학습 기회 보장 - -## 메모리 구조 (지식 베이스) - -``` -Memory Store -├── Concepts (개념) -│ ├── id, title, definition, examples -│ ├── connections: [related_concept_ids] -│ ├── confidence: 0.0-1.0 -│ └── source_refs: [출처 참조] -│ -├── Facts (팩트) -│ ├── id, statement, evidence -│ ├── confidence: 0.0-1.0 -│ └── source_refs: [출처 참조] -│ -├── Procedures (절차) -│ ├── id, name, steps -│ ├── proficiency: 0.0-1.0 -│ └── practice_count: int -│ -├── Code Patterns (코드 패턴) -│ ├── id, language, code, explanation -│ └── use_cases: [list] -│ -├── Test History (평가 이력) -│ ├── session_id, timestamp -│ ├── questions: [question_id, type, difficulty, user_answer, is_correct] -│ └── metrics: {accuracy, retention_rate, ...} -│ -└── Adaptation Log (적응 기록) - ├── timestamp - ├── strategy_changes: [list] - └── parameter_adjustments: [list] -``` +8. **자동 반복** — 세션 종료 후 메모리를 확인하여 due 카드/미완료 주제가 있으면 즉시 다음 세션을 자동으로 실행 +9. **종료 조건** — due 카드 0, 미완료 주제 0, 최대 세션 도달 시 종료 ## 예시 흐름 ``` -[세션 1: 학습] -주제: Rust Async -소스: rust-lang.org, tokio.rs, 블로그 -추출: 12개 개념, 8개 팩트, 3개 절차, 5개 코드 패턴 -메모리 저장: 지식 베이스 구축 +[실행 시작] + → 메모리 확인: due 카드 없음, 미완료 주제 "Rust Async" + → 새 학습 세션 시작 + +[학습 세션] + 주제: Rust Async + 소스: rust-lang.org, tokio.rs + 추출 → 종합 → 메모리에 저장 [자기 평가 루프] -1회: "Rust의 Future란?" → 정답 (신뢰도 0.6) -2회: "Tokio에서 spawn은?" → 정답 (신뢰도 0.7) -3회: "Async/Await의 차이점은?" → 오답 → 피드백 → 메모리 보강 -4회: "Polling이란?" → 정답 (신뢰도 0.65) -... -20회: 정답률 92% → 종료 + 1회: "Rust의 Future란?" → 정답 + 2회: "Tokio에서 spawn은?" → 정답 + 3회: "Async/Await의 차이점은?" → 오답 → 피드백 → 재학습 + ... + 20회: 정답률 92% → 종료 → 메모리에 저장 -[최종 메모리] -- 12개 개념 (평균 신뢰도 0.85) -- 8개 팩트 (평균 신뢰도 0.90) -- 3개 절차 (숙련도 0.75) -- 5개 코드 패턴 -- 20회 평가 이력 +[자동 반복] + → 메모리 확인: due 카드 3개 (복습 필요) + → 복습 세션 자동 실행 ``` diff --git a/skills/self-study-agent/config.yaml b/skills/self-study-agent/config.yaml index c869098..3c91db9 100644 --- a/skills/self-study-agent/config.yaml +++ b/skills/self-study-agent/config.yaml @@ -68,6 +68,15 @@ interleaving: mix_previous_sessions: 3 # 이전 세션 주제 포함 수 mix_ratio: 0.3 # 이전 주제 비중 +# 자동 반복 설정 +auto_repeat: + enabled: true + max_sessions_per_chat: 5 + stop_conditions: + - no_due_cards + - no_incomplete_topics + - max_sessions_reached + # 적응 adaptation: # 정답률 기반 적응 diff --git a/skills/self-study-agent/feedback/adaptation.md b/skills/self-study-agent/feedback/adaptation.md index 28e204d..285c166 100644 --- a/skills/self-study-agent/feedback/adaptation.md +++ b/skills/self-study-agent/feedback/adaptation.md @@ -129,44 +129,16 @@ for each 주제 in 메모리: → easy=0.35, medium=0.45, hard=0.20 ``` -## 적응 이력 +## 세션 간 전이 -적응 변경 시 메모리에 기록: +세션 종료 시 메모리 상태에 따라 다음 행동을 자동으로 결정합니다: -```json -{ - "adaptation_log": [ - { - "timestamp": "2024-01-10T10:00:00Z", - "trigger": "low_accuracy_variation", - "changes": { - "type_distribution.variation": {"old": 0.2, "new": 0.25} - }, - "reason": "변형 질문 정답률 0.45 (기준 미달)" - } - ] -} +``` +[세션 종료 → 다음 행동 결정] +├── due 카드 > 0 → 복습 세션 실행 +├── 미완료 주제 존재 → 새 학습 세션 실행 +├── 모든 주제 마스터 완료 → 새 주제 탐색 +└── 모두 완료 → 종료 ``` -## 메모리 저장 형식 - -```json -{ - "current_strategy": { - "type_distribution": {...}, - "difficulty_distribution": {...}, - "interleaving_ratio": 0.3 - }, - "adaptation_history": [...], - "metrics_history": [ - { - "iteration": 1, - "accuracy": 0.60 - }, - { - "iteration": 5, - "accuracy": 0.75 - } - ] -} -``` +적응 변경 내역과 메트릭 이력을 메모리에 저장합니다. diff --git a/skills/self-study-agent/feedback/interleaving.md b/skills/self-study-agent/feedback/interleaving.md index e1de244..06254ea 100644 --- a/skills/self-study-agent/feedback/interleaving.md +++ b/skills/self-study-agent/feedback/interleaving.md @@ -69,27 +69,4 @@ interleaving: - 현재 주제 정답률 50%↓ → 이전 주제 비중 0.2로 감소 - 특정 이전 주제 오답률 높음 → 해당 주제 비중 증가 -## 메모리 저장 형식 - -```json -{ - "session_topics": [ - { - "topic_id": "rust_async", - "source_session": 1, - "question_count": 7, - "correct_count": 6 - }, - { - "topic_id": "tokio_internals", - "source_session": 2, - "question_count": 3, - "correct_count": 2 - } - ], - "interleaving_stats": { - "mix_ratio": 0.3, - "cross_session_accuracy": 0.83 - } -} -``` +교차 학습 세션 구성을 메모리에 저장합니다. diff --git a/skills/self-study-agent/feedback/self-testing.md b/skills/self-study-agent/feedback/self-testing.md index 097fd63..dfa14d9 100644 --- a/skills/self-study-agent/feedback/self-testing.md +++ b/skills/self-study-agent/feedback/self-testing.md @@ -122,33 +122,7 @@ ## Step 4: 메모리 업데이트 -### 정답 시 - -```json -{ - "concept_id": "concept_001", - "confidence": 0.85, - "last_reviewed": "timestamp", - "next_review": "FSRS 알고리즘으로 계산", - "correct_count": 5, - "total_count": 6 -} -``` - -### 오답 시 - -```json -{ - "concept_id": "concept_001", - "confidence": 0.4, - "last_reviewed": "timestamp", - "next_review": "1일 후 (간격 초기화)", - "correct_count": 2, - "total_count": 6, - "weak_points": ["관련 개념1", "관련 개념2"], - "review_notes": "추가 학습 필요" -} -``` +정답 시에는 해당 개념의 신뢰도를 높이고 간격을 늘립니다. 오답 시에는 신뢰도를 낮추고 간격을 초기화하며 약점을 기록합니다. 결과를 메모리에 저장합니다. ## Step 5: 적응 diff --git a/skills/self-study-agent/feedback/spaced-repetition.md b/skills/self-study-agent/feedback/spaced-repetition.md index 09a348a..24b2c5a 100644 --- a/skills/self-study-agent/feedback/spaced-repetition.md +++ b/skills/self-study-agent/feedback/spaced-repetition.md @@ -113,28 +113,4 @@ interval = max(min_interval, min(interval, max_interval)) └── 카드 간격 업데이트 ``` -## 메모리 저장 형식 - -```json -{ - "cards": [ - { - "id": "card_001", - "front": "...", - "back": "...", - "interval_days": 7, - "due_date": "2024-01-15", - "reps": 3, - "lapses": 0, - "stability": 2.5 - } - ], - "stats": { - "total_cards": 100, - "due_today": 15, - "due_this_week": 45, - "overdue": 5, - "retention_rate": 0.88 - } -} -``` +카드 데이터와 통계를 메모리에 저장합니다. diff --git a/skills/self-study-agent/pipeline/05-session-report.md b/skills/self-study-agent/pipeline/05-session-report.md index 619c16b..c0ea98a 100644 --- a/skills/self-study-agent/pipeline/05-session-report.md +++ b/skills/self-study-agent/pipeline/05-session-report.md @@ -35,26 +35,10 @@ 2. {question3} 3. ... -### 다음 단계 -- 자기 평가 루프 시작 -- 예상 문제 수: {count}개 -- 예상 소요 시간: {minutes}분 +### 다음 단계 (자동) +- 복습 예정 카드: {count}개 → 복습 세션 자동 시작 +- 또는 미완료 주제: {topic} → 새 학습 세션 자동 시작 +- 또는 모든 완료 → 새 주제 탐색 ``` -## 메모리 저장 형식 - -리포트 생성 후, 다음 형식으로 메모리에 저장: - -```json -{ - "session_id": "session_id", - "topic": "topic_title", - "concepts": [...], - "facts": [...], - "procedures": [...], - "code_patterns": [...], - "connections": [...], - "source_refs": [...], - "timestamp": "ISO timestamp" -} -``` +리포트와 세션 결과를 메모리에 저장합니다.