From idstack
Adversarial course design audit across 5 dimensions: alignment stress test, evidence verification, cognitive load analysis, learner persona simulation, and prerequisite chain integrity. Produces a confidence score (0-100). Runs in a clean-context sub-agent so synthesis is unbiased by build history. Works standalone or reads from the idstack project manifest. (idstack)
npx claudepluginhub savvides/idstackThis skill is limited to using the following tools:
<!-- AUTO-GENERATED from SKILL.md.tmpl -- do not edit directly -->
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Applies Acme Corporation brand guidelines including colors, fonts, layouts, and messaging to generated PowerPoint, Excel, and PDF documents.
Share bugs, ideas, or general feedback.
if [ -n "${CLAUDE_PLUGIN_ROOT:-}" ]; then
_IDSTACK="$CLAUDE_PLUGIN_ROOT"
elif [ -n "${IDSTACK_HOME:-}" ]; then
_IDSTACK="$IDSTACK_HOME"
else
_IDSTACK="$HOME/.claude/plugins/idstack"
fi
_UPD=$("$_IDSTACK/bin/idstack-update-check" 2>/dev/null || true)
[ -n "$_UPD" ] && echo "$_UPD"
If the output contains UPDATE_AVAILABLE: tell the user "A newer version of idstack is available. Run cd ${IDSTACK_HOME:-~/.claude/plugins/idstack} && git pull && ./setup to update. (The ./setup step is required — it cleans up legacy symlinks.)" Then continue normally.
Before starting, check for an existing project manifest.
if [ -f ".idstack/project.json" ]; then
echo "MANIFEST_EXISTS"
"$_IDSTACK/bin/idstack-migrate" .idstack/project.json 2>/dev/null || cat .idstack/project.json
else
echo "NO_MANIFEST"
fi
If MANIFEST_EXISTS:
If NO_MANIFEST:
if [ -f ".idstack/project.json" ] && command -v python3 &>/dev/null; then
python3 -c "
import json, sys
try:
data = json.load(open('.idstack/project.json'))
prefs = data.get('preferences', {})
v = prefs.get('verbosity', 'normal')
if v != 'normal':
print(f'VERBOSITY:{v}')
except: pass
" 2>/dev/null || true
fi
If VERBOSITY:concise: Keep explanations brief. Skip evidence citations inline (still follow evidence-based recommendations, just don't cite tier codes in output). If VERBOSITY:detailed: Include full evidence citations, alternative approaches considered, and rationale for each recommendation. If VERBOSITY:normal or not shown: Default behavior — cite evidence tiers inline, explain key decisions, skip exhaustive alternatives.
_PROFILE="$HOME/.idstack/profile.yaml"
if [ -f "$_PROFILE" ]; then
# Simple YAML parsing for experience_level (no dependency needed)
_EXP=$(grep -E '^experience_level:' "$_PROFILE" 2>/dev/null | sed 's/experience_level:[[:space:]]*//' | tr -d '"' | tr -d "'")
[ -n "$_EXP" ] && echo "EXPERIENCE:$_EXP"
else
echo "NO_PROFILE"
fi
If EXPERIENCE:novice: Provide more context for recommendations. Explain WHY each
step matters, not just what to do. Define jargon on first use. Offer examples.
If EXPERIENCE:intermediate: Standard explanations. Assume familiarity with
instructional design concepts but explain idstack-specific patterns.
If EXPERIENCE:expert: Be concise. Skip basic explanations. Focus on evidence
tiers, edge cases, and advanced considerations. Trust the user's domain knowledge.
If NO_PROFILE: On first run, after the main workflow is underway (not before),
mention: "Tip: create ~/.idstack/profile.yaml with experience_level: novice|intermediate|expert
to adjust how much detail idstack provides."
Check for session history and learnings from prior runs.
# Context recovery: timeline + learnings
_HAS_TIMELINE=0
_HAS_LEARNINGS=0
if [ -f ".idstack/timeline.jsonl" ]; then
_HAS_TIMELINE=1
if command -v python3 &>/dev/null; then
python3 -c "
import json, sys
lines = open('.idstack/timeline.jsonl').readlines()[-200:]
events = []
for line in lines:
try: events.append(json.loads(line))
except: pass
if not events:
sys.exit(0)
# Quality score trend
scores = [e for e in events if e.get('skill') == 'course-quality-review' and 'score' in e]
if scores:
trend = ' -> '.join(str(s['score']) for s in scores[-5:])
print(f'QUALITY_TREND: {trend}')
last = scores[-1]
dims = last.get('dimensions', {})
if dims:
tp = dims.get('teaching_presence', '?')
sp = dims.get('social_presence', '?')
cp = dims.get('cognitive_presence', '?')
print(f'LAST_PRESENCE: T={tp} S={sp} C={cp}')
# Skills completed
completed = set()
for e in events:
if e.get('event') == 'completed':
completed.add(e.get('skill', ''))
print(f'SKILLS_COMPLETED: {','.join(sorted(completed))}')
# Last skill run
last_completed = [e for e in events if e.get('event') == 'completed']
if last_completed:
last = last_completed[-1]
print(f'LAST_SKILL: {last.get(\"skill\",\"?\")} at {last.get(\"ts\",\"?\")}')
# Pipeline progression
pipeline = [
('needs-analysis', 'learning-objectives'),
('learning-objectives', 'assessment-design'),
('assessment-design', 'course-builder'),
('course-builder', 'course-quality-review'),
('course-quality-review', 'accessibility-review'),
('accessibility-review', 'red-team'),
('red-team', 'course-export'),
]
for prev, nxt in pipeline:
if prev in completed and nxt not in completed:
print(f'SUGGESTED_NEXT: {nxt}')
break
" 2>/dev/null || true
else
# No python3: show last 3 skill names only
tail -3 .idstack/timeline.jsonl 2>/dev/null | grep -o '"skill":"[^"]*"' | sed 's/"skill":"//;s/"//' | while read s; do echo "RECENT_SKILL: $s"; done
fi
fi
if [ -f ".idstack/learnings.jsonl" ]; then
_HAS_LEARNINGS=1
_LEARN_COUNT=$(wc -l < .idstack/learnings.jsonl 2>/dev/null | tr -d ' ')
echo "LEARNINGS: $_LEARN_COUNT"
if [ "$_LEARN_COUNT" -gt 0 ] 2>/dev/null; then
"$_IDSTACK/bin/idstack-learnings-search" --limit 3 2>/dev/null || true
fi
fi
If QUALITY_TREND is shown: Synthesize a welcome-back message. Example: "Welcome back. Quality score trend: 62 -> 68 -> 72 over 3 reviews. Last skill: /learning-objectives." Keep it to 2-3 sentences. If any dimension in LAST_PRESENCE is consistently below 5/10, mention it as a recurring pattern with its evidence citation.
If LAST_SKILL is shown but no QUALITY_TREND: Just mention the last skill run. Example: "Welcome back. Last session you ran /course-import."
If SUGGESTED_NEXT is shown: Mention the suggested next skill naturally. Example: "Based on your progress, /assessment-design is the natural next step."
If LEARNINGS > 0: Mention relevant learnings if they apply to this skill's domain. Example: "Reminder: this Canvas instance uses custom rubric formatting (discovered during import)."
Skill-specific manifest check: If the manifest red_team_audit section already has data,
ask the user: "I see you've already run this skill. Want to update the results or start fresh?"
This skill audits the course adversarially. It assumes the course is broken until proven otherwise.
It is NOT a quality review (/idstack:course-quality-review does that). Quality review asks "does this course meet standards?" Red team asks "prove this course actually works."
Five adversarial dimensions:
The output is a confidence score (0-100): "How confident are we this course works?"
If the same Claude session helped build the course, it has sunk-cost bias toward its own design choices. Red team work happens in a freshly-spawned sub-agent that has no prior conversation history — only the manifest and course files, which is the same view a real student gets.
The sub-agent (the orchestrator) runs the full audit, writes a structured report to .idstack/reports/red-team.md, and returns a short executive summary. The parent (this skill) then offers to apply fixes in-context, since the parent already knows the course structure and is good at editing.
red_team_audit section from the report fileNo automatic re-verification. If the user wants to confirm fixes hold, they re-run /idstack:red-team.
The preamble above already ran the manifest check. Now confirm scope.
Determine course inputs:
MANIFEST_EXISTS: the orchestrator will read all sections (needs_analysis, learning_objectives, assessment_design, course_builder, quality_review, accessibility_review).NO_MANIFEST: ask the user to provide objectives, assessments, module sequence, and target audience. Capture answers as a brief block to pass to the orchestrator. Standalone mode reduces precision on Dimensions 1 (alignment) and 5 (prerequisites).Ask one focus question via AskUserQuestion:
"Any specific angle to red-team, or a full sweep?"
Options:
Save the user's choice as FOCUS for the orchestrator brief.
Use the Agent tool with subagent_type=general-purpose. The prompt is the full contents of the <orchestrator-brief> block below, with these substitutions performed before invoking:
{{FOCUS}} → the user's choice from Step 1 (or Full sweep by default){{MANIFEST_INFO}} → either Manifest at .idstack/project.json — read it directly. or, in standalone mode, the captured course information from Step 1{{COURSE_FILES_HINT}} → if the manifest has course_builder.output_path, set this to that path; otherwise Look under ./course/ or ./modules/ for generated course files.Then call Agent. Block on its return.
You are an adversarial course design auditor. You have NO context from prior sessions. You did not help build this course; you are seeing it fresh. Your job is to find every way it could fail learners — not to validate the design.
This is a stress test, not a quality review. Assume the course is broken until proven otherwise.
Inputs:
Manifest integrity: if the manifest JSON is malformed, stop and return an error message naming the parse error. Never silently overwrite.
Every challenge cites its evidence tier:
When multiple tiers apply, cite the strongest.
If {{FOCUS}} is Full sweep, audit all 5 dimensions at equal depth.
Otherwise, audit the named dimension at full depth and cover the others at reduced depth (3-5 findings each, no exhaustive matrices).
If you have access to the Agent tool, dispatch the 5 dimensions in parallel as nested sub-agents using the briefs in "Dimension Briefs" below. Wait for all 5 to return, then deduplicate findings.
If you do NOT have Agent access, run the dimensions sequentially using the same briefs.
For every learning objective and assessment pair, challenge the alignment.
Objective → Assessment match:
Activity → Objective match:
Check every evidence citation in the manifest or course design for accuracy.
Tier verification:
Currency check (if WebSearch available):
mode: limited in the report and note: "currency verification requires internet."Estimate cognitive load per module using proxy measures.
Limitation: the manifest contains structure, not the actual content learners see. These are proxies based on structural indicators. Note this limitation in the report.
Proxy indicators:
Expertise reversal check:
Simulate 4 learner personas walking through the course.
Limitation: simulation operates on structural/metadata signals, not actual content text. Content-level analysis (e.g., detecting idioms that challenge ESL learners) requires the actual course materials. Note this in the report.
Persona A — Complete Novice (no prior knowledge in domain)
Persona B — Expert Learner (expertise reversal risk)
Persona C — ESL Learner (language complexity, cultural references)
Persona D — Learner with Accessibility Needs
Per-persona checklist (evaluate for every module):
Trace prerequisite dependencies across all modules.
Check for:
After all dimensions return, compute the confidence score:
Severity weights reflect that structural misalignment and cognitive overload are the strongest predictors of learner failure: [Alignment-14] [T1], [CogLoad-6] [T1].
Contextualize:
The Markdown report follows the canonical structure documented in templates/report-format.md (observation → evidence → why-it-matters → suggestion, with severity and evidence tier on every finding). The structure below is the red-team-specific shape; treat the canonical format as the contract for tone and per-finding fields.
Before writing the report, ensure the directory exists:
mkdir -p .idstack/reports
Then write .idstack/reports/red-team.md with this structure (Markdown):
# Red Team Audit Report
**Date:** <ISO-8601 timestamp>
**Confidence Score:** <0-100>
**Focus:** <{{FOCUS}}>
**Mode:** <full | limited>
## Severity Counts
- Critical: <N>
- Warning: <N>
- Info: <N>
## Critical Findings
For each: dimension, description, affected module/objective/assessment, evidence citation, suggested fix direction.
## Warning Findings
Same structure.
## Info Findings
Same structure.
## Per-Dimension Summary
- Alignment: <pass | warning | critical> — 1-line summary
- Evidence: <pass | warning | critical> — 1-line summary
- Cognitive Load: <pass | warning | critical> — 1-line summary
- Personas: <pass | warning | critical> — 1-line summary
- Prerequisites: <pass | warning | critical> — 1-line summary
## Top 3 Actions
The three changes that would most improve the score.
## Limitations
What this audit could not assess (content-level analysis, actual learner behavior, LMS-specific implementation, etc.).
Each finding must have a stable id of the form <dimension>-<n> (e.g., alignment-1, cogload-3) so the parent can reference findings when applying fixes.
After writing the report, return ONLY a short executive summary (≤200 words) to the parent:
.idstack/reports/red-team.mdDo NOT return the full report inline. The parent will read the file.
After the orchestrator returns:
.idstack/reports/red-team.md (full report)..idstack/reports/red-team.md — open it for the complete finding list."Ask one AskUserQuestion:
"Which findings would you like to address?"
Options:
If the user chooses Skip, jump straight to Step 6.
For each finding in the chosen severity bucket, in order of severity:
fixes_applied. If you decide a finding is not actionable in-context (e.g., requires re-running /idstack:assessment-design), record it in fixes_deferred with a one-line reason.Do not spawn additional sub-agents for fixes. The parent has the relevant context to edit course files directly.
If the user pushes back on any specific fix, mark it deferred and continue.
Save results to .idstack/project.json via bin/idstack-manifest-merge, which replaces only
the red_team_audit section, preserves every other section verbatim, validates JSON, and
atomically updates the top-level updated timestamp. Pull the score and findings from
.idstack/reports/red-team.md (the report is the source of truth — do not re-derive from
the orchestrator's return summary, which is lossy).
"$_IDSTACK/bin/idstack-manifest-merge" --section red_team_audit --payload - <<'PAYLOAD'
{
"updated": "<ISO-8601 timestamp>",
"confidence_score": 0,
"focus": "Full sweep",
"report_path": ".idstack/reports/red-team.md",
"findings_summary": {"critical": 0, "warning": 0, "info": 0},
"dimensions": {
"alignment": {"score": "pass|warning|critical", "findings": []},
"evidence": {"score": "pass|warning|critical", "mode": "full|limited", "findings": []},
"cognitive_load": {"score": "pass|warning|critical", "findings": []},
"personas": {"score": "pass|warning|critical", "findings": []},
"prerequisites": {"score": "pass|warning|critical", "findings": []}
},
"top_actions": [],
"limitations": [],
"fixes_applied": [],
"fixes_deferred": []
}
PAYLOAD
Each finding object: {"id": "alignment-1", "description": "...", "module": "Module 3", "severity": "critical|warning|info"}.
fixes_applied[] — each item: {"id": "alignment-1", "description": "Optional one-line summary of the change applied"}.
fixes_deferred[] — each item: {"id": "alignment-3", "reason": "One-line reason — e.g., requires re-running /idstack:assessment-design"}.
The merge tool exits non-zero (and prints a diagnostic on stderr) if the payload is malformed,
the manifest is corrupt, or the section name is misspelled — never silently overwriting. If
.idstack/project.json doesn't exist yet, run bin/idstack-migrate .idstack/project.json
first (it creates a fresh canonical manifest).
Fallback (if bin/idstack-manifest-merge is unavailable): Read the full manifest, modify
only the red_team_audit section, Write back. Preserve all other sections verbatim. The
canonical schema for reference is in templates/manifest-schema.md.
Two sentences:
.idstack/reports/red-team.md."/idstack:learning-objectives or /idstack:assessment-design. If 60+, recommend /idstack:course-export.If the user wants to verify fixes hold, they can re-run /idstack:red-team — that's deliberately manual to avoid token costs of automatic re-verification.
Have feedback or a feature request? Share it here — no GitHub account needed.
After the skill workflow completes successfully, log the session to the timeline:
"$_IDSTACK/bin/idstack-timeline-log" '{"skill":"red-team","event":"completed"}'
Include skill-specific fields where available (confidence_score, focus, fixes_applied count). Log synchronously (no background &).
If you discover a non-obvious project-specific quirk during this session (LMS behavior, import format issue, course structure pattern), also log it as a learning:
"$_IDSTACK/bin/idstack-learnings-log" '{"skill":"red-team","type":"operational","key":"SHORT_KEY","insight":"DESCRIPTION","confidence":8,"source":"observed"}'