Files
ironclaw/scripts/render-architecture-video.sh
Illia Polosukhin 7f5b02d7f0 feat(docs): animated architecture overview video for contributors (#2365)
* feat(docs): animated architecture overview video for contributors

Adds a Remotion-based animated video (82s, 12 scenes at 30fps) that
visualizes the IronClaw architecture for new contributors. Covers engine
v2 primitives, CodeAct execution, thread state machine, skills pipeline,
tool dispatch, channel routing, trait implementations, and LLM decorator
chain.

- docs/architecture-video/ — Remotion project with 12 animated scenes
- scripts/render-architecture-video.sh — render script
- .claude/skills/architecture-video/ — Claude Code skill to update the
  video when architecture changes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(docs): address PR review feedback and fix cargo-deny CI

- Resolve relative output paths in render script before cd
- Use npm ci when package-lock.json exists for reproducible builds
- Fix file paths in TraitsScene, ChannelImplsScene, CodeActScene
- Label Channel trait code as simplified in ChannelsRoutingScene
- Fix TypeScript version (5.9.3 → 5.7.3) and update lockfile
- Add dom/esnext to tsconfig lib for React 19 compatibility
- Fix license to MIT OR Apache-2.0 to match repo
- Fix TOTAL_DURATION to count only scenes with transitions
- Fix cargo-deny: add publish = false, ignore RUSTSEC-2026-0097

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(docs): address remaining PR review feedback

- Remove `publish = false` from Cargo.toml (unrelated build policy change,
  should be a separate PR if desired)
- Add `--` before output path in render script to prevent argument injection

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(docs): address second round of PR review feedback

- Add npm command check to render script (was only checking node/npx)
- Memoize highlight() tokenization in CodeBlock — Remotion re-renders every
  frame and code is static per instance, so useMemo avoids repeated work
- Rewrite README to describe the IronClaw architecture video project instead
  of the default Remotion template

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 16:43:54 +09:00

42 lines
1.0 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
VIDEO_DIR="$PROJECT_ROOT/docs/architecture-video"
OUTPUT="${1:-$PROJECT_ROOT/ironclaw-architecture.mp4}"
case "$OUTPUT" in
/*) ;;
*) OUTPUT="$PROJECT_ROOT/$OUTPUT" ;;
esac
if ! command -v node &>/dev/null; then
echo "Error: node is required. Install Node.js >= 18." >&2
exit 1
fi
if ! command -v npx &>/dev/null; then
echo "Error: npx is required (comes with npm)." >&2
exit 1
fi
if ! command -v npm &>/dev/null; then
echo "Error: npm is required to install dependencies." >&2
exit 1
fi
if [ ! -d "$VIDEO_DIR/node_modules" ]; then
echo "Installing dependencies..."
if [ -f "$VIDEO_DIR/package-lock.json" ]; then
(cd "$VIDEO_DIR" && npm ci --no-fund --no-audit)
else
(cd "$VIDEO_DIR" && npm install --no-fund --no-audit)
fi
fi
echo "Rendering IronClaw architecture video..."
(cd "$VIDEO_DIR" && npx remotion render IronClawArchitecture -- "$OUTPUT")
echo ""
echo "Done: $OUTPUT"