|
| 1 | +<!-- Keep in sync with AGENTS.md at the repository root. --> |
1 | 2 |
|
2 | | -# Copilot Project Instructions |
| 3 | +# Agent instructions: The Power of Dev Containers and GitHub Codespaces |
3 | 4 |
|
4 | | -This repository contains two main areas: |
| 5 | +This repository holds the slides and demos for Chris Ayers' talk **The Power of Dev Containers and GitHub Codespaces**. The deck is published to <https://chris-ayers.com/dev-containers/>. |
5 | 6 |
|
6 | | -1. **Marp Slide Deck & Static Site** (for "The Power of Dev Containers and GitHub Codespaces") |
7 | | -2. **.NET Aspire Sample Solution** (under `src/aspire/`) |
| 7 | +## Repository layout |
8 | 8 |
|
9 | | ---- |
| 9 | +- `slides/`: Marp deck (`Slides.md` is the single source of truth), images in `slides/img/`, themes in `slides/themes/`. |
| 10 | +- `.devcontainer/<name>/devcontainer.json`: one config per scenario: `slides` (authoring), `codespaces` (lightweight demo), `aspire`, `multicontainer-node`, `multicontainer-python`. |
| 11 | +- `src/aspire/`: minimal Aspire sample. `DevContainers.Aspire.AppHost/` orchestrates `DevContainers.Aspire.Web/` (plus `ServiceDefaults`). `src/go`, `src/node`, `src/python` are small per-language samples. |
| 12 | +- `docs/resources.md` (links) and `docs/runtime-upgrade.md` (how to bump SDK/runtime versions). |
10 | 13 |
|
11 | | -## 1. Marp Slide Deck & Static Site |
| 14 | +## Slides |
12 | 15 |
|
13 | | -- **Source:** `slides/Slides.md` (single source of truth; always edit here) |
14 | | -- **Assets:** `slides/img/` (images), `slides/themes/` (custom Marp CSS themes) |
15 | | -- **Dev Containers:** `.devcontainer/slides/devcontainer.json` (authoring), `.devcontainer/codespaces/devcontainer.json` (lightweight demo) |
16 | | -- **Build/Deploy:** `.github/workflows/marp-pages.yml` (renders Slides.md to `build/index.html` for GitHub Pages) |
| 16 | +- Write the deck in Markdown with [Marp](https://marp.app/). `slides/Slides.md` is the source; `build/` is generated output and is never edited or committed. |
| 17 | +- Keep the frontmatter at the top of the deck: |
17 | 18 |
|
18 | | -**Editing/Rendering:** |
19 | | -- Retain the Marp front-matter block at the top of Slides.md |
20 | | -- Use Marp directives (theme, footer, bg, columns) for layout |
21 | | -- Add images to `slides/img/` and reference as `img/name.png` |
22 | | -- Prefer custom theme files over inline styles |
| 19 | + ```yaml |
| 20 | + --- |
| 21 | + marp: true |
| 22 | + theme: custom-default |
| 23 | + --- |
| 24 | + ``` |
23 | 25 |
|
24 | | -**Multi-deck:** |
25 | | -- Add new decks as `slides/AnotherTalk.md` and update workflow to render |
| 26 | +- Store themes in `slides/themes/` and images and diagram sources in `slides/img/`. Prefer theme classes and CSS variables over inline styles. |
| 27 | +- Write speaker notes as HTML comments (`<!-- -->`). |
| 28 | +- Render locally with the Marp CLI version the Pages workflow uses (v4.5.0): |
26 | 29 |
|
27 | | -**Local Preview:** |
28 | | -```bash |
29 | | -docker run --rm -v "$PWD:/work" -w /work ghcr.io/marp-team/marp-cli/marp-cli --theme-set slides/themes -o build/index.html --html slides/Slides.md |
30 | | -``` |
31 | | - |
32 | | ---- |
| 30 | + ```bash |
| 31 | + npx @marp-team/marp-cli@4.5.0 --theme-set slides/themes --html -o build/index.html -- slides/Slides.md |
| 32 | + npx @marp-team/marp-cli@4.5.0 --theme-set slides/themes --html --pdf --allow-local-files -o build/Slides.pdf -- slides/Slides.md |
| 33 | + ``` |
33 | 34 |
|
34 | | -## 2. .NET Aspire Sample Solution (`src/aspire/`) |
| 35 | +- `.github/workflows/marp-pages.yml` builds the HTML deck and `Slides.pdf` and publishes both to GitHub Pages. If you add slide assets outside `slides/img/` and `slides/themes/`, add them to the workflow's copy step. |
35 | 36 |
|
36 | | -**Architecture:** |
37 | | -- `DevContainers.Aspire.AppHost/`: Orchestrator using .NET Aspire hosting model; launches and manages the web project and any future services |
38 | | -- `DevContainers.Aspire.Web/`: Minimal ASP.NET Core API (expandable) |
39 | | -- `DevContainers.Aspire.ServiceDefaults/`: Shared service defaults (if present) |
| 37 | +## Shared skills |
40 | 38 |
|
41 | | -**Build/Run Workflow:** |
42 | | -- Restore all projects: `dotnet restore` |
43 | | -- Run orchestrator: `dotnet run --project DevContainers.Aspire.AppHost/DevContainers.Aspire.AppHost.csproj` |
44 | | -- The AppHost will launch the Web project and any additional services |
45 | | -- Default web endpoint: http://localhost:5087 (see console output for port) |
| 39 | +Use the shared skills from [codebytes/skills](https://github.com/codebytes/skills) (for Copilot CLI: `copilot plugin install https://github.com/codebytes/skills`). Don't copy their instructions or scripts into this repository. |
46 | 40 |
|
47 | | -**Dev Container Usage:** |
48 | | -- Use `.devcontainer/aspire/devcontainer.json` for Aspire development |
49 | | -- Key tasks: |
50 | | - - `onCreateCommand`: Installs Aspire tooling/workloads |
51 | | - - `postStartCommand`: Trusts HTTPS dev certs (safe on Linux) |
52 | | - - Installs .NET Dev Kit, Copilot, Copilot Chat extensions |
53 | | -- To start: open `src/aspire/` in VS Code, run "Dev Containers: Reopen in Container", select aspire config |
| 41 | +| Task | Skill | |
| 42 | +| ----------------------------------------------------------------------------- | ------------------- | |
| 43 | +| Write or revise slides, notes, order, or layouts | `marp-authoring` | |
| 44 | +| Charts, Mermaid diagrams, or other visuals | `marp-visuals` | |
| 45 | +| Editable `.drawio.svg` diagrams (stored in `slides/img/`) | `drawio-diagrams` | |
| 46 | +| Check overflow, clipping, and HTML/PDF parity before presenting or publishing | `marp-slide-review` | |
54 | 47 |
|
55 | | -**Docker Strategies:** |
56 | | -- Docker-in-Docker (DinD): Full isolation, used by default for CI/Codespaces |
57 | | -- Docker-on-Docker (DoD): Faster, shares host Docker socket; enable by mounting `/var/run/docker.sock` in devcontainer config |
58 | | -- See `src/aspire/README.md` for tradeoffs and details |
| 48 | +## Build and run |
59 | 49 |
|
60 | | -**Extending:** |
61 | | -- Add new services (e.g., databases) via AppHost project |
62 | | -- Extend the devcontainer image as needed for extra tools |
63 | | - |
64 | | -**Patterns/Conventions:** |
65 | | -- Multiple devcontainer configs under `.devcontainer/` (pattern: `.devcontainer/<name>/devcontainer.json`) |
66 | | -- All slide content and images are managed in `slides/` (never edit `build/` directly) |
67 | | -- Aspire solution is intentionally minimal; expand by adding new projects/services under `src/aspire/` |
| 50 | +```bash |
| 51 | +cd src/aspire && dotnet restore && dotnet run --project DevContainers.Aspire.AppHost/DevContainers.Aspire.AppHost.csproj |
| 52 | +npx --yes @devcontainers/cli up --workspace-folder . --config .devcontainer/aspire/devcontainer.json # what devcontainer-validation.yml runs |
| 53 | +``` |
68 | 54 |
|
69 | | ---- |
| 55 | +## Talk-specific rules |
70 | 56 |
|
71 | | -## General Guidance |
72 | | -- Keep changes tightly scoped (content vs. infra) |
73 | | -- Never commit real secrets; placeholder secrets in devcontainer configs are for demo only |
74 | | -- No backend/server code outside `src/aspire/` unless intentionally expanding scope |
| 57 | +- Add a new dev container as `.devcontainer/<name>/devcontainer.json`, matching the existing pattern. |
| 58 | +- The Aspire config uses Docker-in-Docker by default (CI and Codespaces). Docker-outside-of-Docker is faster but shares the host socket; see `src/aspire/README.md` for the trade-offs. |
| 59 | +- Placeholder secrets in dev container configs are for demos only; never commit real ones. |
| 60 | +- Keep backend code inside `src/` and keep changes tightly scoped to either content or infrastructure. |
75 | 61 |
|
76 | | ---- |
| 62 | +## Readme |
77 | 63 |
|
78 | | -## Key References |
79 | | -- [Dev Containers Docs](https://code.visualstudio.com/docs/devcontainers/create-dev-container) |
80 | | -- [Aspire Docs](https://learn.microsoft.com/dotnet/aspire/overview/) |
81 | | -- [Marp CLI](https://marp.app/) |
| 64 | +- Keep the readme sections in this order: Slides, Recordings, Resources, Contact. |
| 65 | +- When a new recording of the talk is published, add it at the top of `## Recordings` as `- [Event Year](https://www.youtube.com/watch?v=VIDEO_ID)`. When the video's title differs from the talk's, add an em dash and the recorded title after the event. Keep the list newest first. |
| 66 | +- The talk also appears on <https://chris-ayers.com/speaking/> (source: `content/speaking.md` in [codebytes/codebytes.github.io](https://github.com/codebytes/codebytes.github.io)); new events and recordings belong there too. |
82 | 67 |
|
83 | | ---- |
| 68 | +## General |
84 | 69 |
|
85 | | -Let me know if any section needs elaboration (e.g., multi-deck support, theme authoring, or extending the workflow) and I can refine further. |
| 70 | +- Keep changes scoped to the request; don't reformat unrelated slides or code. |
| 71 | +- Never commit secrets, keys, or connection strings. Demo placeholders must be obviously fake. |
0 commit comments