Skip to content

Commit a1d114a

Browse files
feat(demos): Docker-isolated 90s Heavy Coder terminal recording
1 parent 51eefaf commit a1d114a

13 files changed

Lines changed: 274 additions & 1 deletion

.dockerignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Docker demo build context (repo root)
2+
.git
3+
.venv
4+
**/__pycache__
5+
.pytest_cache
6+
.mypy_cache
7+
.ruff_cache
8+
eval/runs
9+
.heavy-coder
10+
demos/vhs/staging
11+
demos/docker/out
12+
*.egg-info
13+
dist
14+
build

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,7 @@ build/
2222
.DS_Store
2323
demos/vhs/out/
2424
demos/vhs/staging/home/
25-
demos/vhs/staging/clean-repo/demos/demo.gif
25+
demos/vhs/staging/clean-repo/
26+
demos/docker/out/
2627
assets/demos/
28+
demos/demo.gif

demos/docker/Dockerfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# syntax=docker/dockerfile:1
2+
FROM python:3.12-slim-bookworm
3+
4+
ARG DEBIAN_FRONTEND=noninteractive
5+
RUN apt-get update && apt-get install -y --no-install-recommends \
6+
bash ca-certificates git ffmpeg asciinema procps rsync \
7+
&& rm -rf /var/lib/apt/lists/* \
8+
&& pip install --no-cache-dir pytest pyyaml
9+
10+
RUN pip install --no-cache-dir asciinema-agg 2>/dev/null || true
11+
12+
RUN useradd -m -s /bin/bash -u 10001 graphtheory
13+
14+
COPY . /home/graphtheory/workspace/heavy-coder
15+
COPY demos/docker/opt /opt/demo
16+
17+
RUN pip install --no-cache-dir -e /home/graphtheory/workspace/heavy-coder \
18+
&& chmod +x /opt/demo/*.sh /opt/demo/bin/*.sh \
19+
&& mkdir -p /home/graphtheory/workspace/heavy-coder/demos/docker/out \
20+
&& chown -R graphtheory:graphtheory /home/graphtheory /opt/demo
21+
22+
USER graphtheory
23+
ENV HOME=/home/graphtheory
24+
ENV USER=graphtheory
25+
ENV LOGNAME=graphtheory
26+
ENV TERM=xterm-256color
27+
ENV COLUMNS=120
28+
ENV LINES=36
29+
WORKDIR /home/graphtheory/workspace/heavy-coder
30+
31+
ENTRYPOINT ["/opt/demo/entrypoint.sh"]
32+
CMD ["/opt/demo/record-asciinema.sh"]

demos/docker/README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Heavy Coder — 90s Docker terminal demo
2+
3+
Uncut **asciinema** recording inside an isolated container (`graphtheory@heavy-coder-demo`, `~/workspace/heavy-coder`). No host `HOME`, no `/Users/...` in scripted output (redacted).
4+
5+
## Prerequisites
6+
7+
- Docker Desktop / engine
8+
- ~2GB disk for image build
9+
10+
## Record
11+
12+
```bash
13+
chmod +x demos/docker/record.sh demos/docker/opt/*.sh demos/docker/opt/bin/*.sh
14+
bash demos/docker/record.sh
15+
```
16+
17+
## Outputs (`demos/docker/out/`)
18+
19+
| File | Description |
20+
|------|-------------|
21+
| `heavy-coder-90s.cast` | **Uncut** asciinema recording |
22+
| `heavy-coder-90s.gif` | Optional (if `asciinema-agg` in image) |
23+
| `heavy-coder-90s.mp4` | Optional |
24+
25+
## What the script shows (~90s)
26+
27+
1. Isolated environment identity
28+
2. `validate_distribution.py`
29+
3. Profile install (Hermes if present, else sanitized transcript + rsync)
30+
4. Skin / SOUL / skills preview
31+
5. Council plan JSON (width 8)
32+
6. Staged `swarm_watch` replay
33+
7. Ship-gate pytest
34+
8. Hook fixture + delegate JSON snippet
35+
36+
## Replay locally
37+
38+
```bash
39+
asciinema play demos/docker/out/heavy-coder-90s.cast
40+
```
41+
42+
## Customize
43+
44+
- `HEAVY_CODER_DEMO_IMAGE=mytag bash demos/docker/record.sh`
45+
- Edit timing: `demos/docker/opt/demo-90s.sh`
46+
47+
**Do not commit** `demos/docker/out/*` (gitignored). Review cast with `strings … | rg -i grey` before any public upload.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Installing Hermes profile: heavy-coder
2+
3+
Distribution: heavy-coder v0.1.0
4+
Terminal-first Hermes profile for Grok Composer council swarms.
5+
Author: CodeGraphTheory
6+
Requires: Hermes >=0.12.0
7+
Source: ~/workspace/heavy-coder
8+
Target: ~/.hermes/profiles/heavy-coder
9+
10+
✓ Installed 'heavy-coder' v0.1.0
11+
Use with: hermes -p heavy-coder chat
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
source /opt/demo/container-env.sh
4+
# shellcheck source=redact.sh
5+
source /opt/demo/bin/redact.sh
6+
7+
PROFILE=heavy-coder
8+
ORG=codegraphtheory
9+
10+
echo "Installing Hermes profile: $PROFILE"
11+
if command -v hermes >/dev/null 2>&1; then
12+
hermes profile install "$REPO_ROOT" --name "$PROFILE" --force -y 2>&1 | redact
13+
else
14+
cat /opt/demo/assets/install-transcript.txt
15+
mkdir -p "$HERMES_HOME/profiles/$PROFILE"
16+
rsync -a "$REPO_ROOT/config.yaml" "$REPO_ROOT/SOUL.md" "$REPO_ROOT/skills" \
17+
"$REPO_ROOT/hooks" "$REPO_ROOT/skins" "$HERMES_HOME/profiles/$PROFILE/" 2>/dev/null || true
18+
fi
19+
echo "Profile ready: hermes -p $PROFILE chat"

demos/docker/opt/bin/redact.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
# Redact host-specific paths from terminal output.
3+
redact() {
4+
sed -E \
5+
-e 's#/Users/[^/[:space:]]+/Projects/[^/[:space:]]+#~/workspace/heavy-coder#g' \
6+
-e 's#/Users/[^/[:space:]]+/#~/#g' \
7+
-e 's#/home/graphtheory/#~/#g' \
8+
-e 's#[Gg]rey[Nn]ewell#GraphTheory#g' \
9+
-e 's#\bgrey@#graphtheory@#g'
10+
}

demos/docker/opt/container-env.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
# Isolated identity for Heavy Coder docker demos (no host paths).
3+
set -euo pipefail
4+
export HOME="${HOME:-/home/graphtheory}"
5+
export USER="${USER:-graphtheory}"
6+
export LOGNAME="${LOGNAME:-graphtheory}"
7+
export HOSTNAME="${HOSTNAME:-heavy-coder-demo}"
8+
export REPO_ROOT="${REPO_ROOT:-$HOME/workspace/heavy-coder}"
9+
export HERMES_HOME="${HERMES_HOME:-$HOME/.hermes}"
10+
export DEMO_REPO="${DEMO_REPO:-$REPO_ROOT/demos/docker/fixture-repo}"
11+
export PYTHONPATH="${REPO_ROOT}/src${PYTHONPATH:+:$PYTHONPATH}"
12+
export PY="${PY:-python3}"
13+
export PS1='graphtheory@heavy-coder-demo:~/workspace/heavy-coder$ '
14+
export HERMES_TUI_THEME=dark
15+
export HERMES_TUI_BACKGROUND=0a0e14
16+
mkdir -p "$HERMES_HOME" "$DEMO_REPO/.heavy-coder"
17+
cd "$REPO_ROOT"

demos/docker/opt/demo-90s.sh

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#!/usr/bin/env bash
2+
# 90-second uncut Heavy Coder feature tour (run inside Docker only).
3+
set -euo pipefail
4+
source /opt/demo/container-env.sh
5+
# shellcheck source=bin/redact.sh
6+
source /opt/demo/bin/redact.sh
7+
8+
section() {
9+
echo ""
10+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
11+
echo " $1"
12+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
13+
sleep 1
14+
}
15+
16+
section "1/8 · Isolated demo environment"
17+
echo "user: $(whoami) host: $(hostname) pwd: ~/workspace/heavy-coder"
18+
sleep 2
19+
20+
section "2/8 · Distribution validate"
21+
"$PY" scripts/validate_distribution.py . 2>&1 | redact | tail -8
22+
sleep 3
23+
24+
section "3/8 · Profile install (Hermes)"
25+
bash /opt/demo/bin/install-profile.sh 2>&1 | redact
26+
sleep 4
27+
28+
section "4/8 · Skin + SOUL + skills"
29+
bash demos/vhs/bin/print-profile-skin-ansi.sh 2>&1 | redact | head -28
30+
sleep 5
31+
32+
section "5/8 · Council plan (width 8, delegate_tasks JSON)"
33+
bash demos/vhs/bin/show-team-plan.sh 2>&1 | redact
34+
sleep 6
35+
36+
section "6/8 · Swarm progress (staged fixture + swarm_watch)"
37+
bash demos/vhs/bin/animate-swarm.sh 2>&1 | redact
38+
sleep 4
39+
40+
section "7/8 · Ship gate (pytest)"
41+
"$PY" -m pytest tests/test_swarm_progress.py -q 2>&1 | redact
42+
sleep 3
43+
44+
section "8/8 · Hook injection preview (DELEGATE_TASKS_JSON)"
45+
"$PY" scripts/demo_vhs_apply_fixture.py --repo "$DEMO_REPO" --scene complete 2>&1 | redact | head -6
46+
head -20 demos/vhs/assets/delegate-tasks-snippet.json 2>/dev/null | redact || true
47+
sleep 2
48+
49+
echo ""
50+
echo "Heavy Coder demo complete · graphtheory.xyz/heavy-coder"
51+
sleep 1

demos/docker/opt/entrypoint.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
exec "$@"

0 commit comments

Comments
 (0)