Skip to content

feat(component): DockerRun.astro + AGENTS.md container section (MR2 site-side) - #37

Merged
filipsajdak merged 2 commits into
mainfrom
feat/dockerrun-component
May 3, 2026
Merged

filipsajdak merged 2 commits into
mainfrom
feat/dockerrun-component

Conversation

@filipsajdak

Copy link
Copy Markdown
Contributor

Summary

Site-side companion of MR2 (containers v1). The C++26 examples repo PR ships 6 GHCR images (cpp-base + cpp-safety + cpp-performance + cpp-security + cpp-compliance + cpp-reflection); this PR ships the site components that surface them on toolset pages.

What lands

  • src/components/DockerRun.astro -- new component. Renders a "Reproduce locally" card with a copy-pastable docker run ... block, container badge (auto-derived from image ref), optional collapsible expected-output. Visual cousin of GodboltEmbed.astro.
    • Placeholder mode when image starts with TODO (mirrors GodboltEmbed pattern for posts that have the slot before the image is wired).
    • Default mount pattern: -v "$PWD":/work -w /work (matches the toolset README convention).
  • src/content/toolset/ai-coding-agents-for-cpp.mdx -- AGENTS.md template gains a "Local reproduction (wro.cpp containers)" section enumerating all 6 images + the standard mount-and-run pattern. Once readers wire AGENTS.md into their projects, their coding agents know to reach for the wro.cpp images rather than installing toolchains by hand.

Schema fields (containerImage, containerEntry, exampleRepo) already shipped in MR1.1; nothing to add here.

Usage example

<DockerRun
  image="ghcr.io/wrocpp/cpp-safety:2026-05"
  command="scripts/run-asan.sh examples/use-after-free.cpp"
  expected="==1234==ERROR: AddressSanitizer: heap-use-after-free"
  title="Catch a use-after-free with AddressSanitizer"
/>

Each toolset section MR (MR3 sanitizers, MR4 safety-profiles, ...) wires up its DockerRun blocks.

Test plan

  • NODE_ENV=production npm run build clean (111 pages, unchanged count)
  • AGENTS.md template renders inside ai-coding-agents-for-cpp page
  • After merge: visit https://wrocpp.github.io/toolset/ai-coding-agents-for-cpp/, scroll to "Local reproduction" section, copy the docker run line, run it locally
  • First real DockerRun block lands with MR3 sanitizers-2026

Sequencing with MR2-c++26

Lands together with the c++26 PR wrocpp/cpp26-reflection-examples#1. Either order works -- this PR has no runtime dependency on the GHCR images (they're just strings in the AGENTS.md template); the C++26 PR has no dependency on the site changes.

🤖 Generated with Claude Code

filipsajdak and others added 2 commits May 3, 2026 21:06
Adds the site-side companion to MR2 (containers v1) on the C++26
examples repo. Renders a copy-pastable docker run block + container
badge + optional collapsible expected-output section. Visual cousin of
GodboltEmbed -- same card grammar, different verb (godbolt opens the
URL; DockerRun shows the command).

Placeholder mode kicks in when image starts with "TODO" -- mirrors the
same affordance in GodboltEmbed for posts that have the slot but not
yet the wired-up id. Cluster name auto-derived from image ref
(ghcr.io/wrocpp/cpp-<cluster>:<tag>) for the badge.

Also updates the AGENTS.md template inside ai-coding-agents-for-cpp.mdx
to enumerate all 6 wro.cpp containers + the standard mount-and-run
pattern. Once readers wire AGENTS.md into their projects, their coding
agents know to pull the matching wro.cpp image rather than installing
toolchains by hand.

Build clean (111 pages).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The AGENTS.md template inside ai-coding-agents-for-cpp.mdx is meant as
a generic, copy-pasteable starter for readers' own projects. Adding a
wro.cpp-specific container enumeration turned it into a self-promo
advert that has nothing to do with how readers configure their own
agents. Container reference belongs in containers/README.md (c++26
repo) and in per-toolset-section DockerRun blocks (which is exactly
what the DockerRun.astro component is for) -- not jammed into the
AI-agents page.

The DockerRun.astro component itself stays; that's the right vehicle.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@filipsajdak
filipsajdak merged commit 8ce52f1 into main May 3, 2026
@filipsajdak
filipsajdak deleted the feat/dockerrun-component branch May 3, 2026 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant