Skip to content

Commit b707d38

Browse files
authored
Initial plan and codebase imported (#1)
Read the .github/PLAN.md for details on initial import
1 parent 0d3951f commit b707d38

116 files changed

Lines changed: 8505 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/Dockerfile

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Contoso Travel Concierge Workshop — dev container image.
2+
#
3+
# Base image is pinned here so we can customize freely later (system packages,
4+
# CLIs, tools) without touching devcontainer.json. Post-create actions (env
5+
# activation, azd extensions, first-time verifications) live in post-create.sh.
6+
7+
FROM mcr.microsoft.com/devcontainers/python:1-3.13-bookworm
8+
9+
ENV DEBIAN_FRONTEND=noninteractive \
10+
PIP_DISABLE_PIP_VERSION_CHECK=1 \
11+
PIP_NO_CACHE_DIR=1
12+
13+
# System tools we use across labs: curl (already present), jq (parsing outputs),
14+
# git (already present), zip/unzip (bundling artifacts).
15+
RUN apt-get update && apt-get install -y --no-install-recommends \
16+
jq \
17+
zip \
18+
unzip \
19+
&& rm -rf /var/lib/apt/lists/*
20+
21+
# Azure CLI
22+
RUN curl -sL https://aka.ms/InstallAzureCLIDeb | bash
23+
24+
# Azure Developer CLI (azd)
25+
RUN curl -fsSL https://aka.ms/install-azd.sh | bash
26+
27+
# GitHub CLI
28+
RUN (type -p wget >/dev/null || apt-get install -y wget) \
29+
&& mkdir -p -m 755 /etc/apt/keyrings \
30+
&& wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg \
31+
| tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
32+
&& chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
33+
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \
34+
| tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
35+
&& apt-get update \
36+
&& apt-get install -y gh \
37+
&& rm -rf /var/lib/apt/lists/*
38+
39+
# Base Python packages (kept small; requirements.txt / requirements-dev.txt
40+
# install lab-specific deps in post-create.sh).
41+
RUN pip install --upgrade pip
42+
43+
WORKDIR /workspaces

.devcontainer/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Devcontainer
2+
3+
Reproducible dev environment for the workshop.
4+
5+
- **Base image:** `mcr.microsoft.com/devcontainers/python:1-3.13-bookworm`
6+
- **Customization:** all in [`Dockerfile`](./Dockerfile) — edit here to add
7+
system packages, CLIs, or tools.
8+
- **First-run setup:** all in [`post-create.sh`](./post-create.sh) — edit here
9+
to add Python deps, `azd` extensions, one-time verifications.
10+
11+
Rebuild the container after editing either file: **VS Code → Command Palette →
12+
Dev Containers: Rebuild Container.**
13+
14+
## What's installed
15+
16+
| Tool | Purpose |
17+
|------|---------|
18+
| Python 3.13 | Runtime |
19+
| `az` (Azure CLI) | Authentication, resource inspection |
20+
| `azd` (Azure Developer CLI) | Provisioning + hosted agent deploy |
21+
| `gh` (GitHub CLI) | Repo operations |
22+
| `jq`, `zip`, `unzip` | Shell utilities |
23+
24+
## Persistent coach state
25+
26+
Coach progress lives at `~/.contoso-coach/progress.json`. The devcontainer
27+
mounts a named volume there so bookmarks and completion history survive
28+
container rebuilds.

.devcontainer/devcontainer.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"name": "Contoso Travel Concierge Workshop",
3+
"build": {
4+
"dockerfile": "Dockerfile",
5+
"context": "."
6+
},
7+
"remoteUser": "vscode",
8+
"postCreateCommand": "bash .devcontainer/post-create.sh",
9+
"customizations": {
10+
"vscode": {
11+
"extensions": [
12+
"ms-python.python",
13+
"ms-python.vscode-pylance",
14+
"ms-azuretools.vscode-docker",
15+
"ms-azuretools.vscode-azurecontainerapps",
16+
"ms-azuretools.vscode-bicep",
17+
"github.copilot",
18+
"github.copilot-chat",
19+
"github.vscode-github-actions",
20+
"davidanson.vscode-markdownlint",
21+
"bierner.markdown-mermaid",
22+
"redhat.vscode-yaml"
23+
],
24+
"settings": {
25+
"python.defaultInterpreterPath": "/usr/local/bin/python",
26+
"python.testing.pytestEnabled": true,
27+
"python.testing.pytestArgs": ["tests"],
28+
"files.trimTrailingWhitespace": true,
29+
"files.insertFinalNewline": true
30+
}
31+
}
32+
},
33+
"forwardPorts": [],
34+
"remoteEnv": {
35+
"PYTHONDONTWRITEBYTECODE": "1"
36+
},
37+
"mounts": [
38+
// Persist coach progress between container rebuilds
39+
"source=${localWorkspaceFolderBasename}-coach,target=/home/vscode/.contoso-coach,type=volume"
40+
]
41+
}

.devcontainer/post-create.sh

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/usr/bin/env bash
2+
# post-create.sh — one-time setup after the devcontainer builds.
3+
#
4+
# Add anything that needs to run once when the container starts for the first
5+
# time. Keep it idempotent — this script may run again on rebuild.
6+
7+
set -euo pipefail
8+
9+
log() { printf "\n▸ %s\n" "$*"; }
10+
11+
log "Installing workshop Python dependencies"
12+
pip install --upgrade pip
13+
if [[ -f requirements.txt ]]; then
14+
pip install -r requirements.txt
15+
fi
16+
if [[ -f requirements-dev.txt ]]; then
17+
pip install -r requirements-dev.txt
18+
fi
19+
20+
log "Ensuring azd extensions are up to date"
21+
if command -v azd >/dev/null 2>&1; then
22+
azd version || true
23+
# Hosted-agents extension used in Fundamentals lab 05.
24+
# TODO(nitya): pin exact extension version once labs stabilize.
25+
azd ext install azure.ai.agents || true
26+
azd ext list || true
27+
else
28+
echo "⚠️ azd not installed — skipping extension setup"
29+
fi
30+
31+
log "Making workshop scripts executable"
32+
chmod +x scripts/*.sh 2>/dev/null || true
33+
34+
log "Preparing coach progress directory"
35+
mkdir -p /home/vscode/.contoso-coach
36+
touch /home/vscode/.contoso-coach/.keep
37+
38+
log "Running spec tests as a smoke check"
39+
if command -v pytest >/dev/null 2>&1; then
40+
pytest -q || echo "⚠️ spec tests reported issues — see output above"
41+
fi
42+
43+
log "Devcontainer ready. Open .github/PLAN.md or README.md to get started."

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: 💬 Ask the Workshop Coach
4+
url: https://github.com/nitya/agent-optimization-workshop/blob/main/.github/agents/workshop-coach.agent.md
5+
about: For questions while you're inside a lab, activate the workshop-coach agent instead of filing an issue.
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
name: 💡 Lab idea or learner question
2+
description: Suggest a new lab, propose a deep-dive topic, or ask a question that could become a future More Lab.
3+
title: "[idea] "
4+
labels: ["lab-idea", "triage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for helping shape the workshop! We review these regularly and turn the
10+
best ones into new **More Labs** (see [`labs/more/`](../tree/main/labs/more)).
11+
12+
- 🎓 **Learners** — use this to ask a question or suggest a topic you'd like a lab on.
13+
- 🛠️ **Maintainers** — use this to capture your own lab ideas so they're tracked.
14+
15+
For in-lab help, activate the [workshop-coach](../blob/main/.github/agents/workshop-coach.agent.md) instead of filing an issue.
16+
17+
- type: dropdown
18+
id: kind
19+
attributes:
20+
label: What kind of submission is this?
21+
options:
22+
- Question I'd like answered as a future lab
23+
- Idea for a new More Lab (deep-dive)
24+
- Idea for a new Core Lab (fundamental to the DevOps loop)
25+
- Improvement to an existing lab
26+
- Something else
27+
validations:
28+
required: true
29+
30+
- type: input
31+
id: summary
32+
attributes:
33+
label: One-line summary
34+
description: Phrase it as the question the lab would answer, if possible.
35+
placeholder: "How do I red-team a hosted agent before shipping it?"
36+
validations:
37+
required: true
38+
39+
- type: textarea
40+
id: problem
41+
attributes:
42+
label: What problem or scenario does this address?
43+
description: What is the learner trying to solve? What made you ask?
44+
placeholder: |
45+
As a learner who just finished the Core Labs, I want to know how to...
46+
because in production I expect to face...
47+
validations:
48+
required: true
49+
50+
- type: dropdown
51+
id: loop_node
52+
attributes:
53+
label: Which part of the Agent DevOps loop does this touch?
54+
description: If you're not sure, pick "Not sure".
55+
options:
56+
- Plan
57+
- Build
58+
- Evaluate
59+
- Deploy
60+
- Monitor
61+
- Optimize
62+
- Multiple / cross-cutting
63+
- Not sure
64+
validations:
65+
required: true
66+
67+
- type: dropdown
68+
id: agent_type
69+
attributes:
70+
label: Which agent does this apply to?
71+
options:
72+
- Prompt Agent
73+
- Hosted Agent
74+
- Both
75+
- Neither / general Foundry topic
76+
validations:
77+
required: true
78+
79+
- type: textarea
80+
id: outcome
81+
attributes:
82+
label: What should a learner be able to do after this lab?
83+
description: Write this as a verifiable outcome. This becomes the lab's `✅ Verify` section.
84+
placeholder: |
85+
- Run an adversarial evaluation against my agent
86+
- Interpret the failure categories
87+
- Add a mitigation and re-run to see it pass
88+
validations:
89+
required: false
90+
91+
- type: textarea
92+
id: prereqs
93+
attributes:
94+
label: Prerequisites the learner should have completed
95+
description: List labs (e.g., `fundamentals/06-verify`) or concepts.
96+
placeholder: |
97+
- fundamentals/06-verify
98+
- core/02-evaluate-portal
99+
validations:
100+
required: false
101+
102+
- type: textarea
103+
id: references
104+
attributes:
105+
label: References, docs, or examples
106+
description: Links to Microsoft Learn, Foundry docs, blog posts, papers, or code.
107+
placeholder: |
108+
- https://learn.microsoft.com/azure/ai-foundry/...
109+
validations:
110+
required: false
111+
112+
- type: dropdown
113+
id: priority
114+
attributes:
115+
label: How urgent does this feel to you?
116+
options:
117+
- Nice-to-have — someday
118+
- Would help me soon
119+
- Blocking me from adopting the workshop
120+
validations:
121+
required: true
122+
123+
- type: checkboxes
124+
id: contribution
125+
attributes:
126+
label: Willing to help?
127+
options:
128+
- label: I'd be willing to draft this lab or co-author it.
129+
- label: I'd be willing to review a draft.
130+
- label: Just filing the idea — no bandwidth to contribute right now.
131+
132+
- type: markdown
133+
attributes:
134+
value: |
135+
---
136+
**What happens next?** Maintainers triage `lab-idea` issues on a regular
137+
cadence, research the top candidates, and promote them to a `labs/more/`
138+
entry via the flow in [`.github/MAINTAINERS.md`](../blob/main/.github/MAINTAINERS.md).

0 commit comments

Comments
 (0)