| applyTo | .workshop/** |
|---|---|
| description | Authoring rules for the workshop material under .workshop/. |
These rules apply whenever you edit workshop authoring material under
.workshop/** — the step docs, step_files/, solutions/, and the advance
engine in scripts/. They are for workshop maintainers, not for
participants building travel_assistant/. The guiding principles and the
review checklist in ../copilot-instructions.md
still apply on top of everything here.
.workshop/docs/— step docs (steps/NN-*.md), partials, and assets. Step docs render into the participant's rootREADME.md..workshop/step_files/NN/— the starter files stepNNlays down..workshop/solutions/NN-*/— the complete, runnable end state of stepNN..workshop/scripts/— the advance/init/reset engine, the renderer, the linter, and the test suite (tests/)..workshop_instance/— per-instance runtime state (.workshop-state.json,workshop_backups/,.workshop-initialized). The engine writes and commits it; don't hand-edit it.
Invoke the scripts from the repo root, e.g.
python .workshop/scripts/advance_step.py, python .workshop/scripts/lint_steps.py,
and python -m pytest .workshop/scripts/tests.
- Overlay model. Advancing a step overlays
.workshop/step_files/NN/onto the participant'stravel_assistant/folder and never deletes anything..workshop/step_files/NN/ships only the new files stepNNintroduces (starters/stubs with TODOs, plus itsSTEP_README.md). Files an earlier step delivered and this step merely edits are changed in place by the learner via the step doc — do not re-ship them, so the overlay never clobbers earlier work. .workshop/solutions/NN-*/is the complete, runnable end state of stepNNand must match what the step doc teaches.- Source-of-truth order:
.workshop/docs/steps/*.md>.workshop/solutions/.workshop/step_files/. Change one, update the others so they agree — including code embedded in the step docs. .env.exampleandrequirements.txtare defined once in step 0; do not add them to later.workshop/step_files/NN.- Keep it teaching-quality. Never minify code in
.workshop/step_files/or.workshop/solutions/— keep it clean and expanded (KISS). - Links and images in step docs and partials are source-relative. Author
relative links and image paths relative to the folder the source file lives
in, so they resolve when the file is viewed directly on GitHub. From a step
doc under
.workshop/docs/steps/, that means../assets/NN-*.png,../../solutions/NN-*/, andNN-intro.md#anchorfor a sibling step; from a partial under.workshop/docs/partials/, use../steps/00-intro.md#anchor. The renderer (render_readme.py) rebases these to repo-root-relative when it inlines them into the rootREADME.md, so both the source doc and the rendered README have working links.lint_steps.pycheck K rejects root-relative links and any link/image whose target doesn't exist. For links that must leave the docs, use absolute URLs:https://github.com/{{OWNER}}/{{REPO}}/...when the link must target the participant's own instance (e.g. their Actions workflows), and a hardcodedhttps://github.com/Azure-Samples/foundry-hosted-agents-workshop/...when it must reach the template/upstream repo (e.g. the workshop-feedback issue template).
- Run
python .workshop/scripts/render_readme.py --step <N>for each step this PR touches (use--step 0if you changed shared partials/header/footer) and visually inspect the output. The renderer prints to stdout by default — don't redirect it intoREADME.md. - Smoke-test the advance workflow locally on a fork.
- Run
python -m pytest .workshop/scripts/testsand keep it green; add or update tests where possible. - If you touched
.workshop/step_files/, update the matching.workshop/solutions/(and the step doc) so they stay in sync. - Clean up afterward: rendering to
README.mdor smoke-testing the advance workflow rewrites the participant-facingREADME.mdand.workshop_instance/state. Revert those before committing — the running workshop regenerates them, so they must not land in your PR.