Adaptive Swift/iOS quiz with two modes. Classic is lighter, Mastery requires mechanism-level reasoning.
Adaptive Swift/iOS quiz with two modes: (두 가지 모드를 지원하는 Swift/iOS 적응형 퀴즈)
Prefer Korean-first labels in user-facing text, and keep English as secondary reference in parentheses. (사용자에게 보여주는 단계명은 한국어를 우선하고, 영어는 괄호로 보조 표기한다.)
Examples: (예시)
근거 설명 (WHY reasoning)통과 / 보완 필요 (원문 표기: pass / fail)격리 경계 (isolation boundary): actor 바깥에서 내부 상태를 직접 바꾸지 못하게 하는 경계경합 상태 (data race): 여러 작업이 같은 값을 동시에 바꿔 결과가 꼬이는 문제When a technical term appears for the first time, add a one-line plain-language gloss. (처음 나오는 기술 용어는 한 줄 쉬운 설명을 바로 붙인다.)
Ask the user to choose a language at the start using a selection flow, not free-form text input. (스킬 시작 시 자유 입력이 아니라 선택형 방식으로 언어를 받는다)
Use platform-specific selection behavior:
request_user_input with 2 options) when available. If unavailable, show numbered choices and ask for 1 or 2.Choice mapping: 1 → 한국어, 2 → English
Use the selected language for all communication. Code and Swift keywords stay in English. (선택한 언어로 이후 모든 소통을 진행한다. 코드와 Swift 키워드는 영어 그대로 유지한다.)
Ask the user to choose a study mode using the same selection pattern: (같은 선택 방식으로 학습 모드를 선택하게 한다)
Classic (설명 중심, 추천)
Mastery (훈련 중심)
Choice mapping: (선택값 매핑)
1 -> Classic2 -> MasteryPrompt example: (안내 문구 예시)
After selection, briefly confirm mode and continue. (선택 직후 모드를 짧게 확인하고 진행한다.)
First, check Memory for study history: (먼저 Memory에서 학습 이력을 확인한다.)
Read SwiftLearningProgress from memory. Look for:
If misconceptions found: (misconception이 있으면)
Suggest the misconception topic first: "최근 학습에서 [actor reentrancy] 부분이 약했는데, 이 주제로 퀴즈를 풀어볼까요? 다른 주제를 원하면 알려주세요." "Your recent study showed weakness in [actor reentrancy]. Want to quiz on that? Tell me if you'd prefer a different topic."
If no history found: (이력이 없으면)
Ask in plain text: "어떤 주제로 퀴즈를 풀까요? 주제를 알려주세요. 뭘 할지 모르겠으면 '추천해줘'라고 해주세요." "What topic should the quiz cover? Tell me a topic, or say 'recommend' if you're not sure."
5 questions total. Track difficulty internally from 1-5 (start at 3). (총 5문제. 내부적으로 난이도를 1~5로 추적한다. 시작: 3.)
Scoring by mode: (모드별 채점 방식)
Classic mode
Mastery mode
Each question uses one of the types below. Default to open-ended, mix in others as appropriate. (아래 유형 중 하나로 출제. 서술형을 기본으로 하되, 적절히 섞는다.)
What does this code print? Explain WHY.
(다음 코드의 출력 결과는? 왜 그런지 이유도 함께 적어주세요.)
var nums = [1, 2, 3]
var copy = nums
copy.append(4)
print(nums.count)
The user must type both the answer AND reasoning. (유저가 답과 근거를 모두 타이핑해야 한다.)
What's wrong with this code? Explain WHY it errors.
(다음 코드에서 문제가 되는 부분은? 왜 에러가 나는지 설명해주세요.)
let name: String = "Swift"
name = "SwiftUI"
print(name)
The user must identify the problem AND explain the mechanism. (유저가 문제를 찾고 메커니즘을 설명해야 한다.)
What keyword do you need to modify a struct's property inside a method?
(Swift에서 struct 인스턴스의 프로퍼티를 메서드 안에서 변경하려면 어떤 키워드가 필요할까요?)
Present 4 choices via AskUserQuestion. After the user picks one, ask: "왜 그걸 골랐나요? 한 줄로 이유를 적어주세요." "Why did you pick that? Give a one-line reason."
Write a function that meets these requirements:
(다음 조건을 만족하는 함수를 작성하세요:)
- Name: isEven
- Takes an Int, returns Bool
- Returns true for even, false for odd
When the user writes code, use the Task tool with subagent_type: "Bash" to verify it with the Swift compiler (swift command).
(사용자가 코드를 작성하면 Swift 컴파일러로 검증한다.)
In Mastery mode, every question type requires reasoning. In Classic mode, reasoning is encouraged but not required. (Mastery 모드에서는 모든 문제 유형에서 근거를 요구한다. Classic 모드에서는 권장이며 필수는 아니다.)
If the user gives a correct answer but no reasoning in Mastery mode: (Mastery 모드에서 정답이지만 근거가 없으면)
"정답이에요! 근데 왜 그런지도 한 줄로 설명해줄 수 있을까요?" "Correct! But can you explain why in one line?"
Score it as partial credit: difficulty stays same instead of +1. (부분 정답 처리: 난이도 +1 대신 유지.)
On correct answer with reasoning: (근거 포함 정답)
Correct!
Key point: Array is a value type, so `copy` is an independent copy.
That means nums.count is still 3.
Difficulty: 3 → 4
On correct answer without reasoning: (근거 없는 정답)
Correct! But WHY is it 3?
(Please add your reasoning.)
After they explain:
Good. Array is a value type (struct), so assignment creates an independent copy.
Difficulty stays at 3 (add reasoning next time for full credit).
On wrong answer: (오답)
Give a short text explanation. Only use ASCII diagrams for things like memory layouts that are hard to explain in text alone. (간결한 텍스트 해설. ASCII 다이어그램은 필요할 때만.)
Not quite. The answer is "3".
Array is a struct (value type), so `var copy = nums` creates an independent copy.
Appending to copy doesn't affect the original nums.
Difficulty: 3 → 2
After all 5 questions, show a detailed summary: (5문제 완료 후 상세 결과 요약)
Quiz Results / 퀴즈 결과
─────────────────────────────
Topic / 주제: Actor Isolation
Score / 정답: 3/5
Final difficulty / 최종 난이도: 4/5
보완 포인트 분석 / Gap analysis:
- reentrancy: suspension point 이후 상태 변경 가능성 인식 부족
- nonisolated: 언제 사용하는지 불확실
Strengths / 강점:
- actor 격리 경계(isolation boundary) 이해 정확
- async context 필요성 인식 확실
Next Study / 다음 학습 추천:
→ /swift-study 에서 "actor reentrancy" 학습 추천
─────────────────────────────
After showing results, record to SwiftLearningProgress in memory: (결과를 표시한 후 Memory에 기록한다)
SwiftLearningProgress:
- "YYYY-MM-DD: quiz <topic> <score>/5 (<level>)"
- "YYYY-MM-DD: quiz gap: <specific concept>"
- "YYYY-MM-DD: quiz strength: <specific concept>"