Skip to content

Commit 4d46134

Browse files
ilblackdragonclaude
andcommitted
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>
1 parent 0fd31d5 commit 4d46134

File tree

3 files changed

+38
-27
lines changed

3 files changed

+38
-27
lines changed

docs/architecture-video/README.md

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,58 @@
1-
# Remotion video
1+
# IronClaw Architecture Overview Video
22

3-
<p align="center">
4-
<a href="https://github.com/remotion-dev/logo">
5-
<picture>
6-
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/remotion-dev/logo/raw/main/animated-logo-banner-dark.apng">
7-
<img alt="Animated Remotion Logo" src="https://github.com/remotion-dev/logo/raw/main/animated-logo-banner-light.gif">
8-
</picture>
9-
</a>
10-
</p>
3+
A Remotion-based animated video that walks new contributors through IronClaw's
4+
internals — the five primitives, execution loop, CodeAct, thread state machine,
5+
skills pipeline, tool dispatcher, channels, extensibility traits, and the LLM
6+
provider decorator chain.
117

12-
Welcome to your Remotion project!
8+
See the project-level render script and Claude skill for end-to-end use:
9+
10+
- `scripts/render-architecture-video.sh` — one-command MP4 render
11+
- `.claude/skills/architecture-video/SKILL.md` — how to update scenes when
12+
architecture changes
1313

1414
## Commands
1515

16-
**Install Dependencies**
16+
Install dependencies (first time only):
1717

1818
```console
19-
npm i
19+
npm ci
2020
```
2121

22-
**Start Preview**
22+
Preview in browser (Remotion Studio with hot reload):
2323

2424
```console
2525
npm run dev
2626
```
2727

28-
**Render video**
28+
Render to MP4 from this directory:
2929

3030
```console
31-
npx remotion render
31+
npx remotion render IronClawArchitecture out.mp4
3232
```
3333

34-
**Upgrade Remotion**
34+
Or from the repository root:
3535

3636
```console
37-
npx remotion upgrade
37+
./scripts/render-architecture-video.sh output.mp4
3838
```
3939

40-
## Docs
41-
42-
Get started with Remotion by reading the [fundamentals page](https://www.remotion.dev/docs/the-fundamentals).
43-
44-
## Help
40+
Type-check and lint:
4541

46-
We provide help on our [Discord server](https://discord.gg/6VzzNDwUwV).
42+
```console
43+
npm run lint
44+
```
4745

48-
## Issues
46+
## Structure
4947

50-
Found an issue with Remotion? [File an issue here](https://github.com/remotion-dev/remotion/issues/new).
48+
- `src/IronClawArchitecture.tsx` — scene sequencing, durations, transitions
49+
- `src/scenes/*.tsx` — one file per scene (12 total)
50+
- `src/components/Code.tsx` — shared syntax-highlighted code block
51+
- `src/theme.ts` — shared colors and fonts
52+
- `src/Root.tsx` — Remotion composition registration
5153

5254
## License
5355

54-
Note that for some entities a company license is needed. [Read the terms here](https://github.com/remotion-dev/remotion/blob/main/LICENSE.md).
56+
This video project is part of IronClaw and dual-licensed MIT OR Apache-2.0.
57+
Remotion itself has a [custom license](https://github.com/remotion-dev/remotion/blob/main/LICENSE.md);
58+
use is covered under the open-source free tier for this project.

docs/architecture-video/src/components/Code.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import React, { useMemo } from "react";
12
import { COLORS, FONTS } from "../theme";
23

34
type Token = { text: string; color?: string };
@@ -79,7 +80,8 @@ export const CodeBlock: React.FC<{
7980
opacity?: number;
8081
style?: React.CSSProperties;
8182
}> = ({ code, fontSize = 15, opacity = 1, style = {} }) => {
82-
const lines = highlight(code);
83+
// Memoize tokenization — Remotion re-renders every frame and `code` is static.
84+
const lines = useMemo(() => highlight(code), [code]);
8385
return (
8486
<div
8587
style={{

scripts/render-architecture-video.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ if ! command -v npx &>/dev/null; then
2020
exit 1
2121
fi
2222

23+
if ! command -v npm &>/dev/null; then
24+
echo "Error: npm is required to install dependencies." >&2
25+
exit 1
26+
fi
27+
2328
if [ ! -d "$VIDEO_DIR/node_modules" ]; then
2429
echo "Installing dependencies..."
2530
if [ -f "$VIDEO_DIR/package-lock.json" ]; then

0 commit comments

Comments
 (0)