Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .devcontainer/03-azure-01-04-ai-01-agentic-sdlc/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM mcr.microsoft.com/devcontainers/base:ubuntu
# Ubuntu 24.04: Playwright (Challenge 4) does not support newer releases yet.
FROM mcr.microsoft.com/devcontainers/base:ubuntu-24.04

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@
],
"settings": {
"terminal.integrated.defaultProfile.linux": "bash",
"git.openRepositoryInParentFolders": "always",
"workbench.editorAssociations": {
"**/01_Agentic_SDLC/Readme.md": "vscode.markdown.preview.editor",
"**/01_Agentic_SDLC/challenges/*.md": "vscode.markdown.preview.editor",
"**/01_Agentic_SDLC/walkthrough/**/*.md": "vscode.markdown.preview.editor"
},
"editor.inlineSuggest.experimentalInlineEditsEnabled": true,
"github.copilot.chat.advanced.inlineEdits.enabled": true,
"github.copilot.chat.agent.enabled": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"extensions": [
"ms-azuretools.vscode-docker",
"GitHub.copilot",
"GitHub.copilot-chat",
"ms-vscode.extension-test-runner",
"vitest.explorer",
"ms-vscode.vscode-speech",
Expand Down
2 changes: 2 additions & 0 deletions 03-Azure/01-04-AI/01_Agentic_SDLC/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Shell scripts run inside Linux containers and Codespaces. Keep LF endings on Windows checkouts.
*.sh text eol=lf
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ When generating suggestions:
- Build and test via the `src/Makefile` (run targets from `src/`): `make build` / `make test` / `make dev` cover all variants, and per-language targets like `make build-ts`, `make test-ts`, `make dev-ts` scope to one implementation.
- Install dependencies with the install targets: `make install` (everything) or per-language `make install-ts`, `make install-cs`, `make install-py`, `make install-java`, `make install-frontend`.
- Keep PRs scoped: code + tests + docs (architecture or build notes) when behavior changes.
- Change only the API track the task names. If a task names none, change the TypeScript API (`src/api-ts`) and the frontend only; do not port the change to the C#, Python or Java APIs unless asked.
- Update related instruction files if new folders or architectural slices are introduced.

## Do Not Repeat
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ jobs:
deploy:
name: Provision & deploy
runs-on: ubuntu-latest
# The app lives in the hack folder of your MicroHack fork, so every `run` step starts there.
defaults:
run:
working-directory: 03-Azure/01-04-AI/01_Agentic_SDLC
# TODO: Consider binding to a GitHub Environment (e.g. `environment: dev`) so
# you can add reviewers/approval gates and environment-scoped secrets.
steps:
Expand All @@ -81,14 +85,14 @@ jobs:
# (b) let the Bicep create it, then read ACR_NAME from a deployment output
# and split this into "provision infra" -> "build/push" -> "update apps".
# The two build contexts and their Dockerfiles are:
# - API: context src/api-ts Dockerfile src/api-ts/Dockerfile (port 3000)
# - API: context src Dockerfile src/api-ts/Dockerfile (port 3000; needs src/database)
# - Frontend: context src/frontend Dockerfile src/frontend/Dockerfile (port 80)
- name: Build & push images to ACR
run: |
echo "TODO: build and push both images"
# az acr login --name "$ACR_NAME"
# LOGIN_SERVER="$ACR_NAME.azurecr.io"
# docker build -t "$LOGIN_SERVER/api:$IMAGE_TAG" -f src/api-ts/Dockerfile src/api-ts
# docker build -t "$LOGIN_SERVER/api:$IMAGE_TAG" -f src/api-ts/Dockerfile src
# docker build -t "$LOGIN_SERVER/frontend:$IMAGE_TAG" -f src/frontend/Dockerfile src/frontend
# docker push "$LOGIN_SERVER/api:$IMAGE_TAG"
# docker push "$LOGIN_SERVER/frontend:$IMAGE_TAG"
Expand Down
4 changes: 2 additions & 2 deletions 03-Azure/01-04-AI/01_Agentic_SDLC/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "node",
"request": "launch",
"name": "Debug API",
"cwd": "${workspaceFolder}/api",
"cwd": "${workspaceFolder}/src/api-ts",
"runtimeExecutable": "npm",
"runtimeArgs": ["run", "dev"],
"console": "integratedTerminal",
Expand All @@ -14,7 +14,7 @@
"type": "node",
"request": "launch",
"name": "Start Frontend",
"cwd": "${workspaceFolder}/frontend",
"cwd": "${workspaceFolder}/src/frontend",
"runtimeExecutable": "npm",
"runtimeArgs": ["run", "dev"],
"console": "integratedTerminal",
Expand Down
3 changes: 2 additions & 1 deletion 03-Azure/01-04-AI/01_Agentic_SDLC/.vscode/mcp.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"command": "npx",
"args": [
"@playwright/mcp@latest",
"--browser=msedge"
"--browser=chromium",
"--headless"
],
"type": "stdio"
},
Expand Down
10 changes: 5 additions & 5 deletions 03-Azure/01-04-AI/01_Agentic_SDLC/.vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build"
],
"options": {
"cwd": "${workspaceFolder}"
"cwd": "${workspaceFolder}/src"
},
"group": {
"kind": "build",
Expand All @@ -22,10 +22,10 @@
"type": "shell",
"command": "make",
"args": [
"build-api"
"build-ts"
],
"options": {
"cwd": "${workspaceFolder}"
"cwd": "${workspaceFolder}/src"
},
"presentation": {
"reveal": "always",
Expand All @@ -43,7 +43,7 @@
"build-frontend"
],
"options": {
"cwd": "${workspaceFolder}"
"cwd": "${workspaceFolder}/src"
},
"presentation": {
"reveal": "always",
Expand All @@ -52,7 +52,7 @@
"problemMatcher": [
"$tsc"
]
},
}
],
"inputs": [
]
Expand Down
27 changes: 18 additions & 9 deletions 03-Azure/01-04-AI/01_Agentic_SDLC/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ flowchart LR
F --> G[Maintain]
G -.-> A
subgraph Agents
Copilot[GitHub Copilot / Copilot App]
Copilot[GitHub Copilot: agent mode, cloud agent, code review]
Actions[GitHub Actions CI/CD]
SRE[Azure SRE Agent]
GHAW[GitHub Agentic Workflows]
Expand All @@ -43,7 +43,7 @@ This lab is **not** a full explanation of GitHub Copilot or Azure as technologie
- [Azure Container Apps](https://learn.microsoft.com/en-us/azure/container-apps/)
- [Azure SRE Agent](https://learn.microsoft.com/en-us/azure/sre-agent/)

> **What's included.** This MicroHack folder is **self-contained** — everything you need ships with it: the **Octocat Supply** application source ([`src/`](src/README.md)), the Azure infrastructure scaffold ([`infra/`](infra/README.md)), helper [`scripts/`](scripts/README.md), the dev containers ([`.devcontainer/`](.devcontainer/)), the editor config ([`.vscode/`](.vscode/)), and the repo custom instructions, custom agents, and workflows ([`.github/`](.github/)). The Challenge 3 inputs — the product backlog and the mock **WorkIQ** organizational knowledge (Teams thread, support-ticket digest, stakeholder email) — live under [`assets/`](assets/). Facilitators create a copy/fork of this MicroHack per team before the event; participants work in their team's copy.
> **What's included.** This MicroHack folder is **self-contained**: everything you need ships with it: the **Octocat Supply** application source ([`src/`](src/README.md)), the Azure infrastructure scaffold ([`infra/`](infra/README.md)), helper [`scripts/`](scripts/README.md), the dev containers ([`.devcontainer/`](.devcontainer/)), the editor config ([`.vscode/`](.vscode/)), and the repo custom instructions, custom agents, and workflows ([`.github/`](.github/)). The Challenge 3 inputs (the product backlog and the mock **WorkIQ** organizational knowledge (Teams thread, support-ticket digest, stakeholder email) live under [`assets/`](assets/). In Challenge 1 each participant forks the `microhack` repository in the event organization, opens it in a Codespace with the **Azure / AI / Agentic SDLC** configuration, and runs `scripts/setup-fork.sh` once.

## MicroHack context

Expand All @@ -70,16 +70,25 @@ This MicroHack has a few but important prerequisites. Completing them before the

In summary:

- A **GitHub account** with access to your team's copy of this MicroHack repo and an **active GitHub Copilot seat** (Copilot Business/Enterprise, with Chat, agents, CLI, and MCP policies enabled).
- Either **GitHub Codespaces** (recommended — nothing to install) **or** local **VS Code** with the **Dev Container** plus the **GitHub Copilot / Copilot Chat** extensions. The container preinstalls **Node.js 24, Python 3.13, .NET 10, Java 17**.
- For **Challenges 5 & 6**, **Azure access**:
- An **Azure subscription** with budget.
- The **hackathon-provided GitHub account** from your lab credentials. For each event the MicroHack platform creates a GitHub organization and allocates Copilot seats to lab accounts, which are Entra managed users (EMU). You fork the `microhack` repository inside that organization in [Challenge 1](challenges/challenge-01.md). Running the hack outside the platform? Any GitHub account with an active Copilot license (Business, Enterprise, Pro or Pro+) works; for Business and Enterprise your admin must enable the policies in the coach checklist below.
- **GitHub Codespaces** in the event organization (recommended, nothing to install) **or** local **VS Code** with the **Dev Containers** extension and Docker. The dev container preinstalls **Node.js 24, Python 3.13, .NET 10, Java 17**, the GitHub CLI, the Azure CLI, and the GitHub Copilot and Copilot Chat extensions.
- For **Challenges 5 & 6** only, **Azure access**:
- An **Azure subscription** with budget. On the MicroHack platform each lab gets an empty resource group with Owner rights (lab credentials **ResourceGroupName** and **AzureRegion**, see [`labautomation/`](labautomation/README.md)).
- A **Resource Group** for the team.
- **Contributor** permissions on that scope (plus any roles the Azure SRE Agent needs on the monitored resources).
- A GitHub ↔ Azure **OIDC federated credential** for pipeline authentication.
- **Owner** on that scope, or **Contributor** plus **User Access Administrator**. The OIDC setup and the Azure SRE Agent both create role assignments.
- A GitHub ↔ Azure **OIDC federated credential** for pipeline authentication (`scripts/setup-oidc.sh` creates it).
- **Azure SRE Agent** available in the team's region/subscription.

> Facilitators: work through the pre-event admin checklist (Copilot enablement, repo access, backlog issue seeding, Azure prerequisites) before running the event.
> **Running with Copilot licenses only.** Challenges 1 to 4 and 7 need no Azure. Challenge 5 has a [no-Azure path](challenges/challenge-05.md#no-azure-path) (green CI run plus a compiling template), and Challenge 6 has a local detect, diagnose, remediate loop. The full day works without an Azure subscription.

### Coach checklist (before the event)

- Every participant has received a hackathon-provided GitHub account (lab account) with a Copilot seat, and can sign in to it on the event network.
- The MicroHack platform assigns the Copilot seats. Confirm in the event organization (**Settings** > **Copilot** > **Policies**, or ask the platform team) that these are enabled, because a seat alone does not turn them on: **Copilot in the IDE** (Chat and agent mode), **MCP servers in Copilot**, **Copilot cloud agent** (formerly coding agent, Challenge 3), **Copilot code review** (Challenge 4), and **Copilot CLI** (Challenge 3 stretch and the GitHub Copilot app).
- Lab accounts can create repositories and **Codespaces** in the event organization. Forks must be owned by the organization, not by the lab account itself: lab accounts are Entra managed users, and the Copilot cloud agent is not available in repositories a managed user owns personally. Forking of the `microhack` repository within the organization must be allowed.
- **GitHub Actions** is allowed for those repositories (Challenges 3, 5, and 7 run in Actions).
- Do a dry run **with one lab account**, a day before: fork `microhack` in the event organization, open a Codespace with the **Azure / AI / Agentic SDLC** configuration, run `bash scripts/setup-fork.sh`, `bash scripts/seed-backlog.sh`, `cd src && make dev` and `make test`, assign one issue to Copilot, and request a Copilot review on a pull request.
- If you run the Azure path: the platform creates one resource group per lab with Owner rights in an SRE Agent region. Check that `sre.azure.com` and `*.azuresre.ai` are reachable on the event network, and delete the SRE Agents afterwards.

### Challenges

Expand Down
29 changes: 17 additions & 12 deletions 03-Azure/01-04-AI/01_Agentic_SDLC/challenges/challenge-01.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

**[Home](../Readme.md)** - [Next Challenge](challenge-02.md)

> **⚠️ Important — before you start.** Log into GitHub using the **hackathon-provided GitHub account** (labuser-0000_ms000000 — not your personal or corporate account), then **fork the MicroHack repo** in the MngEnvMCAP000000 organization with MngEnvMCAP000000 account as the **owner** of the fork. Remember to append "-labuser-0000" to the fork name to avoid conflicts. All later challenges — commits, pull requests, Actions runs, and OIDC federation — assume you're working from that fork under the hackathon account.
>
> When you create your Codespace, the repo offers **many** dev container configurations (one per MicroHack track). Do **not** create a Codespace with default settings. Select **"New with options..."**, then be sure to select **"Azure / AI / Agentic SDLC"** from the configuration picker — picking the wrong one (or the default) leaves you without the tools this track needs.
> **Before you start.** Sign in to GitHub with the **hackathon-provided GitHub account** from your lab credentials (for example `labuser-0000_ms000000`), not your personal or corporate account. That account has a GitHub Copilot seat and belongs to the **event organization** assigned to your lab. You work in your own fork of the `microhack` repository in that organization.

## Goal

Expand All @@ -14,23 +12,29 @@ The Octocat team is behind schedule and adopting Agentic Development practices.

## Actions

* **Get the code** — Open your team's copy of this MicroHack in **GitHub Codespaces** (recommended), a local **VS Code Dev Container** (`.devcontainer/`), or locally. Confirm you're on the intended working branch.
* **Verify runtimes** — Confirm the runtimes for your chosen API track are available (TypeScript, Python, .NET, or Java) plus Node.js for the frontend. In Codespaces / the Dev Container these are preinstalled.
* **Enable GitHub Copilot** — Sign in and confirm your Copilot entitlement is active in your IDE; install the GitHub Copilot / Copilot Chat extensions.
* **Explore the repo** — Review the structure: `src/` (the app, with `src/docs/` architecture guidance), `infra/` + `scripts/` (Azure setup and deployment), `assets/` (Challenge 3 backlog & WorkIQ inputs), and `.github/` (Copilot custom instructions & agents). Identify where the frontend, APIs, and database live. Read `src/README.md` for the code structure and build commands.
* **Run the app locally** — Start the frontend and one API to confirm the application builds and runs before you begin changing it.
* **Fork the repository**: on github.com, open the event organization assigned to your lab account (your avatar > **Organizations**), then open the `microhack` repository and select **Fork**. Choose the organization as the owner and give the fork a unique name by appending your lab user, for example `microhack-labuser-0000`. On the fork, open **Settings** > **General** > **Features** and tick **Issues**, then open the **Actions** tab and select **I understand my workflows, go ahead and enable them**. Forks start with both turned off.
* **Open a Codespace**: on your fork, select **Code** > **Codespaces** > **...** > **New with options**. For **Dev container configuration** select **Azure / AI / Agentic SDLC**, not the default, then select **Create codespace**. The first start takes about 5 to 10 minutes because it runs `make install` and `make build`.
* **Set up your fork**: in the Codespace terminal run `bash scripts/setup-fork.sh`. It points the GitHub CLI at your fork, checks that Issues are on, and copies this hack's Copilot instructions, custom agents, skills and workflows to the root `.github/` folder of the fork, because the Copilot cloud agent, Copilot code review and GitHub Actions only read the repository root. It commits and pushes that change for you.
* **Seed the backlog**: run `bash scripts/seed-backlog.sh`. It creates the 8 backlog items from `assets/backlog.md` as labelled GitHub Issues in your fork, which you use in Challenge 3. Use `--dry-run` first if you want to preview.

> If `gh` reports that it is not signed in or a permission error, run `unset GITHUB_TOKEN`, then `gh auth login` (GitHub.com, HTTPS, log in with a web browser, using the lab account), and run the script again.
* **Verify runtimes**: confirm `node --version`, `python --version`, `dotnet --version`, and `java -version` work. The dev container preinstalls Node.js 24, Python 3.13, .NET 10, and Java 17. You only need the runtime of the API track you pick plus Node.js for the frontend.
* **Enable GitHub Copilot**: open the **Chat** view in VS Code, switch the mode picker to **Agent**, and ask a question about a file. A real answer proves your license works.
* **Explore the repo**: review `src/` (the app, with `src/docs/` architecture guidance), `infra/` and `scripts/` (Azure setup and deployment), `assets/` (Challenge 3 backlog and WorkIQ inputs), and `.github/` (Copilot custom instructions, custom agents, and workflows). Read `src/README.md` for the code structure and build commands.
* **Run the app**: in a terminal run `cd src && make dev`. It starts the TypeScript API on port **3000** and the frontend on port **5137**. Open port 5137 from the **Ports** tab. In a Codespace the browser calls the API through the forwarded URL of port 3000, so port 3000 must be **Public** (the dev container sets this; if the Products page stays empty, right-click port 3000 in the **Ports** tab and set **Port Visibility** > **Public**). To run another API track use `make dev-cs`, `make dev-py`, or `make dev-java` (run `make install-cs`, `make install-py`, or `make install-java` once first). Stop the app with `Ctrl+C`.

## Success criteria

* Your team's repo copy is open in your environment and Copilot is active and responding in your IDE.
* You can build and run the frontend and at least one API locally.
* Your fork is open in a Codespace with the **Azure / AI / Agentic SDLC** configuration, and Copilot Chat in agent mode is responding.
* `setup-fork.sh` has run and the backlog issues exist in your fork.
* You can build and run the frontend and at least one API.
* You can describe, at a high level, how the frontend, APIs, and database fit together.

### Optional stretch — repo-wide agent context

Give Copilot persistent, repo-wide context so later challenges start with your conventions loaded.

* Create an `AGENTS.md` and/or `.github/copilot-instructions.md` recording coding conventions, naming, and preferred patterns.
* Extend `.github/copilot-instructions.md` (it already exists; after editing, run `bash scripts/setup-fork.sh` again to copy it to the repository root) and/or add an `AGENTS.md` recording coding conventions, naming, and preferred patterns.
* Record the exact **build and test commands** for your API track (and the frontend) so an agent can verify its own work.
* Add explicit **scope rules** (e.g. don't touch generated files, infra, unrelated services) to keep agent diffs minimal.
* In a fresh Copilot Chat, ask a question that relies on those conventions **without restating them** and confirm they're applied.
Expand All @@ -39,5 +43,6 @@ Give Copilot persistent, repo-wide context so later challenges start with your c

* [Setting up GitHub Copilot](https://docs.github.com/en/copilot/quickstart)
* [GitHub Codespaces](https://docs.github.com/en/codespaces/overview)
* [Fork a repository](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo)
* [Development Containers](https://containers.dev/)
* [Adding repository custom instructions for Copilot](https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot)
* [Adding repository custom instructions for Copilot](https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot)
Loading