diff --git a/CLAUDE.md b/CLAUDE.md index a6d1cb6..63679ec 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -77,6 +77,7 @@ Custom slash commands available in this project: | Command | Description | |---------|-------------| +| `/release ` | Release guide version (CHANGELOG + VERSION + sync + commit + push) | | `/update-infos-release [bump-type]` | Update Claude Code releases tracking + optional guide version bump | | `/version` | Display current guide and Claude Code versions with stats | | `/changelog [count]` | View recent CHANGELOG entries (default: 5) | @@ -84,6 +85,8 @@ Custom slash commands available in this project: **Examples:** ``` +/release patch # Bump patch + release (3.20.4 → 3.20.5) +/release minor # Bump minor + release (3.20.4 → 3.21.0) /update-infos-release # Update CC releases only /update-infos-release patch # Update CC + bump guide (3.9.11 → 3.9.12) /update-infos-release minor # Update CC + bump guide (3.9.11 → 3.10.0) diff --git a/guide/README.md b/guide/README.md index 24ca88d..122405a 100644 --- a/guide/README.md +++ b/guide/README.md @@ -11,6 +11,7 @@ Core documentation for mastering Claude Code. | [claude-code-releases.md](./claude-code-releases.md) | Official release history (condensed) | 10 min | | [known-issues.md](./known-issues.md) | **Critical bugs tracker**: security issues, token consumption, verified community reports | 15 min | | [cheatsheet.md](./cheatsheet.md) | 1-page printable quick reference | 5 min | +| [visual-reference.md](./visual-reference.md) | Visual cheatsheet — ASCII diagrams for key concepts | 5 min | | [architecture.md](./architecture.md) | How Claude Code works internally (master loop, tools, context) | 25 min | | [learning-with-ai.md](./learning-with-ai.md) | Guide for juniors on using AI without losing skills | 15 min | | [adoption-approaches.md](./adoption-approaches.md) | Implementation strategies for teams | 15 min | diff --git a/scripts/compile-questions.sh b/scripts/compile-questions.sh new file mode 100755 index 0000000..8e9cbd0 --- /dev/null +++ b/scripts/compile-questions.sh @@ -0,0 +1,68 @@ +#!/bin/bash +# compile-questions.sh — Compile quiz YAML files into landing questions.json +# Usage: ./scripts/compile-questions.sh +# +# Reads all quiz/questions/*.yaml, merges into a single JSON with categories + questions. +# Output: $LANDING_DIR/questions.json +set -euo pipefail + +GUIDE_DIR="$(cd "$(dirname "$0")/.." && pwd)" +LANDING_DIR="/Users/florianbruniaux/Sites/perso/claude-code-ultimate-guide-landing" +YAML_DIR="$GUIDE_DIR/quiz/questions" +NODE_PATH="$GUIDE_DIR/quiz/node_modules" +OUTPUT="$LANDING_DIR/questions.json" + +if [ ! -d "$YAML_DIR" ]; then + echo "ERROR: Quiz directory not found: $YAML_DIR" >&2 + exit 1 +fi + +if [ ! -d "$NODE_PATH/yaml" ]; then + echo "ERROR: yaml module not found in $NODE_PATH" >&2 + echo "Run: cd quiz && npm install yaml" >&2 + exit 1 +fi + +NODE_PATH="$NODE_PATH" node -e " +const fs = require('fs'); +const path = require('path'); +const YAML = require('yaml'); + +const yamlDir = process.argv[1]; +const files = fs.readdirSync(yamlDir) + .filter(f => f.endsWith('.yaml')) + .sort(); + +const categories = []; +const questions = []; + +for (const file of files) { + const content = fs.readFileSync(path.join(yamlDir, file), 'utf8'); + const data = YAML.parse(content); + + if (!data.category || !data.category_id || !data.questions) { + console.error('Invalid YAML structure in ' + file); + process.exit(1); + } + + categories.push({ id: data.category_id, name: data.category }); + + for (const q of data.questions) { + questions.push({ + id: q.id, + difficulty: q.difficulty, + profiles: q.profiles, + category_id: data.category_id, + question: q.question, + options: q.options, + correct: q.correct, + explanation: q.explanation, + doc_reference: q.doc_reference + }); + } +} + +const output = JSON.stringify({ categories, questions }, null, 2); +fs.writeFileSync(process.argv[2], output + '\n'); +console.log(questions.length + ' questions compiled (' + files.length + ' categories)'); +" "$YAML_DIR" "$OUTPUT"