Show the current learning progress for a research domain. Displays stage completion, activity counts, and note count. Use when the user says "status", "progress", "学习进度", "查看进度", or wants to know how far they are in a domain.
Domain: $ARGUMENTS
workspace/. Override with AUTO_RESEARCH_WORKSPACE.Parse $ARGUMENTS to get the domain name.
WORKSPACE="${AUTO_RESEARCH_WORKSPACE:-workspace}"
DOMAIN_DIR="$WORKSPACE/DOMAIN"
If $DOMAIN_DIR does not exist, stop and print:
❌ Domain workspace not found: Run first.
DOMAIN_DIR/init-domain DOMAINIf $DOMAIN_DIR/pipeline.json does not exist, stop and print:
❌
pipeline.jsonnot found inDOMAIN_DIR.
Run/init-domain DOMAINto initialize.
python3 - <<'PYEOF'
import json, os, datetime
domain_dir = "DOMAIN_DIR"
pipeline_path = os.path.join(domain_dir, "pipeline.json")
with open(pipeline_path, "r", encoding="utf-8") as f:
p = json.load(f)
domain = p["domain"]
created_at = p.get("created_at", "unknown")
updated_at = p.get("updated_at", "unknown")
total_stages = len(p["stages"])
completed = sum(1 for s in p["stages"] if s["status"] == "completed")
status_icon = {"completed": "✅", "in_progress": "🔄", "pending": "⏳"}
lines = [
f"",
f"{'='*60}",
f"📊 Research Status — {domain}",
f"{'='*60}",
f" Created : {created_at[:10]}",
f" Updated : {updated_at[:10]}",
f" Progress : {completed}/{total_stages} stages complete",
f"",
]
for stage in p["stages"]:
icon = status_icon.get(stage["status"], "❓")
done = len(stage["completed_activities"])
total = len(stage["activities"])
notes = len(stage["notes"])
lines.append(f" {icon} Stage {stage['id']}: {stage['name']} [{stage['status']}]")
if stage["status"] != "pending":
lines.append(f" Activities : {done}/{total} complete")
if notes:
lines.append(f" Notes : {notes} file(s)")
lines.append("")
# Count papers saved
papers_dir = os.path.join(domain_dir, "papers")
paper_files = [f for f in os.listdir(papers_dir) if f.endswith(".json") and not f.startswith("search_")]
lines.append(f" 📄 Papers saved : {len(paper_files)}")
notes_dir = os.path.join(domain_dir, "notes")
note_files = [f for f in os.listdir(notes_dir) if f.endswith(".md")]
lines.append(f" 📝 Notes written: {len(note_files)}")
lines.append(f"")
lines.append(f"{'='*60}")
# Recommend next action
current_stage = next((s for s in p["stages"] if s["status"] == "in_progress"), None)
if current_stage:
pending_acts = [a for a in current_stage["activities"] if a not in current_stage["completed_activities"]]
if pending_acts:
lines.append(f"Next → /progressive-learn {domain} (continue Stage {current_stage['id']})")
else:
lines.append(f"Next → /progressive-learn {domain} --advance (advance to next stage)")