| name | tutorial-check |
| description | Homework validator โ checks that user completed the QUICKSTART tutorial
correctly. Runs 5 SQL/file checks (routing.db populated, project registered,
demo workspace, skill invocations logged, task folder structure) plus an
optional 6th self-audit step. Reports โ
/โ per check with remediation hints.
Use when: after completing QUICKSTART ยง 5 walkthrough, "/tutorial-check",
"check my setup", "ะฟัะพะฒะตัั ะผะพั ัััะฐะฝะพะฒะบั", "run homework checks".
|
Tutorial-Check Protocol
Homework validator for the QUICKSTART walkthrough. Runs 5 checks against
the user's workspace to confirm they set up their first real project
correctly. Reports โ
/โ per step with a one-line remediation hint.
Read-only โ never modifies files or DB.
When to invoke
After the user completes the 5-step homework in docs/QUICKSTART.md ยง 5:
- Create a project named
my-tutorial
- Start a task in that project (
/go-start + /go-fast)
- Approve the full chain (ok, ok, 1)
- Verify 5 artifact files exist in
tasks/log/{slug}/
- Confirm the task appears in Flow UI
Then the user runs /tutorial-check and gets pass/fail per step.
Step 0 โ Detect workspace root
Find the workspace root by walking up from CWD until we find framework.yml
or manifest.yml at the same level. If none found within 5 levels โ abort:
โ ๏ธ Not inside a framework workspace. Run this from anywhere inside your
framework directory (where framework.yml lives).
Set {workspace_root} for all subsequent checks.
Step 1 โ Run the 5 checks
Each check is independent โ a failure in one doesn't skip the others.
Check 1: Project my-tutorial created
test -d "{workspace_root}/projects/my-tutorial" && D1=โ
|| D1=โ
grep -q "id: my-tutorial" "{workspace_root}/aihub/projects.yml" && D2=โ
|| D2=โ
test -L "{workspace_root}/projects/my-tutorial/.claude/skills" && D3=โ
|| D3=โ
Pass = D1 AND D2 AND D3.
Remediation: bash bin/new-project my-tutorial
Check 2: Task started in that project
COUNT=$(sqlite3 "{workspace_root}/tasks/routing.db" \
"SELECT COUNT(*) FROM artifacts WHERE project = 'my-tutorial'")
test "$COUNT" -gt 0 && CHECK2=โ
|| CHECK2=โ
Pass = at least one artifact row exists.
Remediation: cd projects/my-tutorial && claude, then /go-start and /go-fast "...".
Check 3: Chain approved (plan-first artifact exists)
COUNT=$(sqlite3 "{workspace_root}/tasks/routing.db" \
"SELECT COUNT(*) FROM task_artifacts ta
JOIN artifacts a ON ta.task_id = a.id
WHERE a.project = 'my-tutorial' AND ta.artifact_type = 'plan-first'")
test "$COUNT" -gt 0 && CHECK3=โ
|| CHECK3=โ
Pass = plan-first ran, meaning user approved flow-first + library-first gates.
Remediation: rerun /go-fast and reply ok/ok/1 at each gate.
Check 4: 5 artifact files exist on disk
For each task folder under {workspace_root}/tasks/log/ where task belongs to
project my-tutorial, count files matching these 5 patterns:
flow-first-*.md
library-first-*.md
plan-first-*.md
report-*.md
user-note-*.md
Pass = all 5 files present.
Remediation: chain likely errored mid-execution. Check for empty/missing artifacts, rerun /go-fast.
Check 5: Task visible in Flow UI
Flow UI reads from routing.db. If the task registered โ it's visible.
COUNT=$(sqlite3 "{workspace_root}/tasks/routing.db" \
"SELECT COUNT(*) FROM artifacts
WHERE project = 'my-tutorial'
AND datetime(created_at) > datetime('now', '-24 hours')")
test "$COUNT" -gt 0 && CHECK5=โ
|| CHECK5=โ
Pass = recent activity registered in DB โ Flow UI will show it.
Remediation: check sqlite3 tasks/routing.db "SELECT * FROM artifacts WHERE project='my-tutorial'". If empty โ task never registered. Rerun /go-start.
Check 6 (optional): Self-audit โ tutorial-check invocation logged
COUNT=$(sqlite3 "{workspace_root}/tasks/routing.db" \
"SELECT COUNT(*) FROM skill_invocations
WHERE skill_name = 'tutorial-check'
AND datetime(invoked_at) > datetime('now', '-5 minutes')")
test "$COUNT" -gt 0 && CHECK6=โ
|| CHECK6=โ ๏ธ
Not required for pass โ informational only.
Step 2 โ Report
Output a compact table:
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ Tutorial-Check Report โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
1. Project my-tutorial created โ
โ โ
2. Task started โ
โ โ 3. Chain approved โ plan-first missing โ
โ โ 4. Artifacts exist โ 3/5 found โ
โ โ
5. Task in Flow UI โ
โ โ
6. Self-audit (invocation logged) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Score: 3/5 core checks + 1 self-audit โ
โ Status: โ Homework incomplete โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
If all 5 pass โ congratulate the user and point at CONCEPTS.md +
next-step suggestion (try /go-fast on a real change).
Step 3 โ Exit
Don't invoke other skills. Don't modify files. Report only.
Anti-patterns
โ Auto-fixing failures
The skill diagnoses; it doesn't repair. Auto-remediation hides the learning
opportunity โ the user needs to see what step failed and do it themselves.
Rule: report only. Suggest commands, don't run them.
โ Running on non-my-tutorial projects
Someone runs /tutorial-check in a real production project โ the skill
reports 5 โ because it hardcodes my-tutorial. Confusing.
Rule: the report explicitly names my-tutorial and mentions
QUICKSTART.md ยง 5 so context is unambiguous.
โ Silent failure on missing DB
If tasks/routing.db doesn't exist yet (fresh workspace, never ran
init-demo or any task) โ each SQL check will error, and users see raw
sqlite errors.
Rule: Step 0 detects workspace root; if tasks/routing.db missing,
show explicit "Workspace not initialized โ run bash bin/init first"
message.
โ Modifying routing.db during check
Read-only guarantee. Never INSERT, never UPDATE, never DELETE
except the Step 99 self-invocation log.
Related skills
- plan-first โ the skill that produces the artifact Check 3 verifies
- flow-first, library-first โ sibling skills the tutorial exercises
- ship-first โ closes tasks the tutorial creates
- check-first โ sibling coverage validator with similar report-and-exit shape
Step 99 โ Log invocation
sqlite3 "{workspace_root}/tasks/routing.db" \
"INSERT INTO skill_invocations (task_id, block_num, skill_name, invoked_at)
VALUES ('tutorial-check', NULL, 'tutorial-check', datetime('now'))" 2>/dev/null || true
The || true guard prevents failure if DB is missing or table doesn't
exist yet (fresh workspace).