Record task completion, update streak, detect recurring mistakes, and write updated state to storage/progress.json and storage/daily_state.json.
Invoke this skill when the learner runs /jp-complete. It is the single write-path for all progress data. No other skill should write to storage/progress.json directly.
| Parameter | Type | Required | Description |
|---|---|---|---|
user_id | string | yes | References users.id |
task_id | string | yes | The task being marked complete (must exist in today's daily_state.assigned_tasks) |
completion | boolean | yes | True if completed, false if skipped |
self_rating | integer | yes | Learner's self-assessment: 1 (very hard) to 5 (very easy) |
note | string |
| no |
| Optional free-text note from the learner |
mistakes_observed | string[] | no | Error patterns noted during the task (from review-answer or learner input) |
| Field | Type | Description |
|---|---|---|
updated_progress | object | The full updated progress record |
streak_value | integer | New streak days count |
mastery_changes | object[] | Items promoted to mastered or demoted (see below) |
recurring_mistake_alerts | object[] | Mistakes that have now hit the promotion threshold |
next_recommendation | string | Suggested focus for the next session |
| Field | Type | Description |
|---|---|---|
item_id | string | Vocab or grammar item ID |
item_type | string | "vocab" or "grammar" |
change | string | "promoted_to_mastered" or "added_to_active" |
When completion: true:
completed_{type}_count based on task type (vocab, grammar, listening, shadowing, speaking).task_id to daily_state.completed_tasks[].progress.last_updated_at.streak_days += 1.streak_days = 1 (streak broken, reset).users.streak_days as well.Track per-item ratings across sessions in daily state:
self_rating >= 4 for 3 consecutive sessions: move from active_vocab_ids → mastered_vocab_ids (or grammar equivalent).self_rating <= 2: move back to active (demotion).When mistakes_observed is non-empty:
recurring_mistakes[] for an existing entry.occurrence_count.occurrence_count: 1.occurrence_count reaches 2–3: set promoted_to_drill: true and add the related item ID to active_vocab_ids or active_grammar_ids for targeted review.recurring_mistake_alerts output.After processing, generate carry_forward_recommendation for daily_state:
self_rating was low (1–2) for the task: recommend repeating the same content.storage/progress.json, update the matching user's record, write back.storage/daily_state.json, update or create today's session record, write back.Input:
{
"user_id": "user_001",
"task_id": "vocab_003_20260413",
"completion": true,
"self_rating": 2,
"note": "Keep confusing すみません and ごめんなさい",
"mistakes_observed": ["すみません vs ごめんなさい usage confusion"]
}
Output:
{
"streak_value": 6,
"mastery_changes": [],
"recurring_mistake_alerts": [
{ "pattern": "すみません vs ごめんなさい usage confusion", "occurrence_count": 2, "promoted_to_drill": true }
],
"next_recommendation": "Repeat vocab_003 tomorrow with production drill. Promoted 'すみません vs ごめんなさい' to active review."
}