Skip to content

Commit 3e49361

Browse files
committed
Enrich material
1 parent c5e0e14 commit 3e49361

51 files changed

Lines changed: 496 additions & 62 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.

.squad/agents/zoe/history-archive-20260721-064206.md

Lines changed: 165 additions & 0 deletions
Large diffs are not rendered by default.

docs/assets/js/challenge.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,8 @@
8686
// Attribution
8787
const attr = document.getElementById('attribution');
8888
if (attr && c.source_repo) {
89-
const sourceUrl = FP.githubSourceUrl(c.source_repo, c.source_path, c.source_ref);
90-
const sourceLabel = FP.esc(c.source_repo + (c.source_path ? ` / ${c.source_path}` : ''));
91-
attr.innerHTML = `Origin: <a href="${sourceUrl}" target="_blank" rel="noopener">${sourceLabel}</a> · ${FP.esc(c.license || 'MIT')} License`;
89+
const sourceUrl = FP.githubSourceUrl(c.source_repo);
90+
attr.innerHTML = `Origin: <a href="${sourceUrl}" target="_blank" rel="noopener">${FP.esc(c.source_repo)}</a>`;
9291
}
9392
}
9493

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ <h1 id="heroHeading">Build Your<br><span class="accent">Agentic DevOps Practice<
8484
<p class="lede byo-lede">
8585
<strong>Bring your own.</strong> This runs on <em>your</em> tenant — work each
8686
activity against your own apps, repos, and data so the result keeps running in
87-
production. The sample apps are only a fallback so no one is blocked.
87+
production.
8888
</p>
8989
<div class="hero-actions">
9090
<a class="btn btn-primary" href="#outcomes">

modules/ghec/challenges/ch03-codespaces-dev-containers/COACH.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ This is a concise review overlay. Apply the [Delivery Assurance Standard](../../
1111

1212
## Session-specific reviewer focus
1313

14-
- Customer adoption outcome: the customer implementation owner makes "clone and code in 60 seconds" real — a committed, reproducible dev container, a prebuild for speed, and an...
15-
- Implementation risks to verify:
16-
- Delivery lead prompts: ask "what should every teammate get identically, and what's just your preference?" (→ devcontainer vs dotfiles), and "where did the time go on first...
14+
- Prebuild-aware setup belongs in `onCreateCommand` or `updateContentCommand`; do not accept dependency installation only in `postCreateCommand`.
15+
- Confirm the recorded trigger, regions, retained versions, and freshness behavior match the customer team's cost and dependency-freshness needs.
16+
- Inspect the successful prebuild workflow and a new **Prebuild ready** Codespace, then confirm both development rows are recorded in the governance register.

modules/ghec/challenges/ch03-codespaces-dev-containers/README.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
This delivery engagement establishes:
3131
- Author a `devcontainer.json` that pins a base image, installs features, and runs setup commands.
3232
- Launch a Codespace from the UI and the CLI, and understand the create/stop/delete lifecycle.
33-
- Add lifecycle scripts (`postCreateCommand`, `postStartCommand`) and dev-container Features.
33+
- Use prebuild-aware lifecycle scripts (`onCreateCommand`, `postStartCommand`) and dev-container Features.
3434
- Forward and label ports, set port visibility, and run the seeded app inside the Codespace.
3535
- Apply personalization (dotfiles) vs project config, and understand the precedence.
3636
- Configure org-level Codespaces policy (machine-type limits, retention) and create a prebuild to cut start time.
@@ -72,11 +72,11 @@ What setup creates (all artifacts namespaced `ghec-ch03-*`, idempotent, prefix-g
7272
### Part A — Author the dev container
7373
1. Inspect and extend `.devcontainer/devcontainer.json`. The fallback sample includes a minimal baseline with a pinned Node image, dependency install, and port 3000 forwarding. Keep the pinned base image suitable for the app (e.g., `mcr.microsoft.com/devcontainers/javascript-node:22`) and improve it.
7474
2. Add Features. Include at least two dev-container Features, e.g. `ghcr.io/devcontainers/features/github-cli:1` and `ghcr.io/devcontainers/features/node:1`. Understand Features vs baking tools into a custom Dockerfile.
75-
3. Add lifecycle commands. Set `postCreateCommand` to install dependencies (`npm ci`) and `postStartCommand` to print a ready message. Add a `customizations.vscode.extensions` list with at least one extension.
75+
3. Add lifecycle commands. Keep deterministic shared setup in `onCreateCommand` (`npm install` for the seeded app) and add `postStartCommand` to print a ready message. Prebuilds run `onCreateCommand`, but not `postCreateCommand`, so do not put the dependency install in `postCreateCommand`. Add a `customizations.vscode.extensions` list with at least one extension.
7676

7777
### Part B — Launch & run
7878
4. Open a Codespace from the repo's Code → Codespaces menu *and* from the CLI: `gh codespace create -R <org>/ghec-ch03-codespaces-dev-containers -m basicLinux32gb` (use the smallest available). List it with `gh codespace list`.
79-
5. Verify the environment inside the Codespace: `node -v` matches the pinned image, `gh --version` works (proves the Feature installed), and `npm ci` already ran (proves `postCreateCommand`).
79+
5. Verify the environment inside the Codespace: `node -v` matches the pinned image, `gh --version` works (proves the Feature installed), and `node_modules/express` exists (proves `onCreateCommand` installed dependencies).
8080
6. Run the app (`npm start`). Confirm it boots.
8181

8282
### Part C — Ports
@@ -88,18 +88,28 @@ What setup creates (all artifacts namespaced `ghec-ch03-*`, idempotent, prefix-g
8888

8989
### Part E — Org policy & prebuilds
9090
10. Set an org Codespaces policy. In Org settings → Codespaces, restrict the allowed machine types (e.g., disallow the largest) and set a retention period. Confirm the policy is visible via `gh api /orgs/<org>/codespaces` or the settings UI.
91-
11. Create a prebuild. Configure a Codespaces prebuild for the repo's default branch (Settings → Codespaces → Set up prebuild). Trigger it, wait for the prebuild Action run to succeed, then create a *new* Codespace and confirm it reports "prebuilt" and starts noticeably faster.
92-
12. Clean up running Codespaces with `gh codespace delete` to stop billing.
91+
11. Design the prebuild before creating it. In `docs/prebuild-decision.md`, record the repository branch and `devcontainer.json` you are targeting; the developer regions; the trigger you choose; the number of versions to retain; the owner for failed-prebuild notifications; and the rationale. Select the settings for this customer:
92+
- **Every push** keeps dependencies current but consumes more Actions minutes.
93+
- **On configuration change** reduces Actions usage but may leave dependencies stale until a developer updates them.
94+
- **Scheduled** suits a deliberate refresh cadence, with the same freshness trade-off.
95+
- Limit regions to where the delivery team works. Each enabled region and retained version consumes prebuild storage.
96+
- Retain only the number of versions needed for rollback or investigation (1–5). Decide whether developers should be blocked from a fallback when the latest prebuild is running or failed.
97+
12. Create the prebuild from the recorded decision (Settings → Codespaces → Set up prebuild). Select the branch and configuration file, trigger, regions, retained versions, failure-notification owner, and advanced freshness behavior. Wait for the GitHub Actions prebuild workflow to succeed.
98+
13. Validate the result. Create a *new* Codespace for the configured branch and configuration. Confirm the machine picker shows **Prebuild ready**, `node_modules/express` is already present, and the repository settings show the successful configuration and its next update trigger. Record the workflow URL or run ID in `docs/prebuild-decision.md`.
99+
14. Clean up running Codespaces with `gh codespace delete` to stop billing.
100+
15. Update the governance register initialized in Ch06. Add two `development` rows: **dev-container standardization** (effective level: `repo`; evidence: `.devcontainer/devcontainer.json` and a successful Codespace) and **prebuild strategy** (effective level: `org`/`repo`; evidence: `docs/prebuild-decision.md`, the prebuild workflow run, and the policy setting). Record the platform owner, implementation path (`approved pilot` or `inspect-and-propose`), review cadence, and next decision.
93101

94102
## Validation / Definition of Done
95103
You are done when ALL of the following are true:
96-
- [ ] `.devcontainer/devcontainer.json` exists, pins a base image, includes ≥2 Features, and sets `postCreateCommand` + `postStartCommand`.
104+
- [ ] `.devcontainer/devcontainer.json` exists, pins a base image, includes ≥2 Features, and sets `onCreateCommand` + `postStartCommand`.
97105
- [ ] A Codespace was launched from both the UI and the CLI (`gh codespace list` showed it).
98106
- [ ] Inside the Codespace, the pinned Node version, the gh CLI Feature, and the post-create install are all verifiable.
99107
- [ ] The app runs and its port is forwarded + labeled, with `forwardPorts`/`portsAttributes` committed to config.
100108
- [ ] `docs/devcontainer-notes.md` explains dotfiles vs devcontainer.json precedence.
101109
- [ ] An org Codespaces policy restricts machine types and sets retention.
102-
- [ ] A prebuild is configured and a new Codespace reports prebuilt.
110+
- [ ] `docs/prebuild-decision.md` records the branch/configuration, trigger, regions, retained versions, failure-notification owner, freshness behavior, and customer-specific cost/freshness rationale.
111+
- [ ] A prebuild is configured; its GitHub Actions workflow succeeds; and a new Codespace reports **Prebuild ready** with dependencies already installed.
112+
- [ ] The governance register contains development rows for the dev-container standard and prebuild strategy, with effective level, evidence, owner, implementation path, and next decision.
103113
- [ ] All your Codespaces are stopped/deleted at the end.
104114
- [ ] Real-outcome check — if you brought your own repo, it now has a Codespace/devcontainer path that reduces real onboarding friction; if you used the sample, you can name the repo whose setup you will standardize next.
105115
- [ ] Adoption handover — name the repository owner, onboarding bottleneck, approved dev-container change, and next rollout action.
@@ -118,5 +128,6 @@ You are done when ALL of the following are true:
118128
- Forwarding ports in your codespace — https://docs.github.com/en/codespaces/developing-in-a-codespace/forwarding-ports-in-your-codespace
119129
- Managing Codespaces for your organization — https://docs.github.com/en/codespaces/managing-codespaces-for-your-organization/managing-repository-access-for-your-organizations-codespaces
120130
- Configuring prebuilds — https://docs.github.com/en/codespaces/prebuilding-your-codespaces/configuring-prebuilds
131+
- About Codespaces prebuilds — https://docs.github.com/en/codespaces/prebuilding-your-codespaces/about-github-codespaces-prebuilds
121132
- Personalizing Codespaces with dotfiles — https://docs.github.com/en/codespaces/customizing-your-codespace/personalizing-github-codespaces-for-your-account
122133
- `gh codespace` CLI manual — https://cli.github.com/manual/gh_codespace

modules/ghec/challenges/ch03-codespaces-dev-containers/meta.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,18 @@ prerequisite_capabilities:
1111
- git installed
1212
- jq installed
1313
- Repository provisioned via activity setup script
14-
description: "Implement an authorized customer reproducible development environment with `devcontainer.json`, Codespaces, port forwarding, organization-level Codespaces policy, and prebuilds. Preserve the configuration, operating owner, cost controls, and rollout decision."
14+
description: "Implement an authorized customer reproducible development environment with `devcontainer.json`, Codespaces, port forwarding, organization-level Codespaces policy, and tuned prebuilds. Preserve the configuration, prebuild operating decision, cost controls, and rollout decision."
1515
success_criteria:
16-
- '`.devcontainer/devcontainer.json` exists, **pins a base image**, includes **≥2 Features**, and sets `postCreateCommand` + `postStartCommand`.'
16+
- '`.devcontainer/devcontainer.json` exists, **pins a base image**, includes **≥2 Features**, and sets `onCreateCommand` + `postStartCommand`.'
1717
- A Codespace was launched from **both** the UI and the CLI (`gh codespace list` showed it).
1818
- Inside the Codespace, the pinned **Node version**, the **gh CLI Feature**, and the **post-create install** are all verifiable.
1919
- The app **runs** and its port is **forwarded + labeled**, with `forwardPorts`/`portsAttributes` committed to config.
2020
- '`docs/devcontainer-notes.md` explains **dotfiles vs devcontainer.json** precedence.'
2121
- An **org Codespaces policy** restricts machine types and sets retention.
22-
- A **prebuild** is configured and a new Codespace reports **prebuilt**.
22+
- '`docs/prebuild-decision.md` records the branch/configuration, trigger, regions, retained versions, failure-notification owner, freshness behavior, and customer-specific cost/freshness rationale.'
23+
- A **prebuild** is configured, its workflow succeeds, and a new Codespace reports **Prebuild ready** with dependencies already installed.
2324
- All your Codespaces are **stopped/deleted** at the end.
25+
- '**Governance register updated:** Added rows for development (dev-container standardization and prebuild strategy) with links to `devcontainer.json`, `docs/prebuild-decision.md`, and org Codespaces policy.'
2426
- Customer-owned implementation evidence identifies the authorized scope, accountable owner, relevant risk controls, handover artefact, and next adoption, cutover, or rollout decision.
2527
tags:
2628
- codespaces
@@ -44,6 +46,7 @@ references:
4446
- https://docs.github.com/en/codespaces/overview
4547
- https://docs.github.com/en/codespaces/developing-in-a-codespace/forwarding-ports-in-your-codespace
4648
- https://docs.github.com/en/codespaces/prebuilding-your-codespaces/configuring-prebuilds
49+
- https://docs.github.com/en/codespaces/prebuilding-your-codespaces/about-github-codespaces-prebuilds
4750
- https://docs.github.com/en/codespaces/managing-codespaces-for-your-organization/managing-repository-access-for-your-organizations-codespaces
4851
- https://docs.github.com/en/codespaces/customizing-your-codespace/personalizing-github-codespaces-for-your-account
4952
- https://containers.dev/implementors/json_reference/

modules/ghec/challenges/ch04-actions-ci-fundamentals/COACH.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ This is a concise review overlay. Apply the [Delivery Assurance Standard](../../
1111

1212
## Session-specific reviewer focus
1313

14-
- Customer adoption outcome: the customer implementation owner builds a real CI pipeline that runs across a matrix, caches deps, publishes artifacts, and — the key outcome —...
15-
- Implementation risks to verify:
16-
- Delivery lead prompts: ask "what exact string does the merge gate look for?" (→ check name), and "what makes the second run faster than the first?" (→ cache hit).
14+
- Customer adoption outcome: the customer implementation owner builds a real CI pipeline that runs across a matrix, caches deps, publishes artifacts, and sets default token permissions (`read-only` for workflows).
15+
- **Governance register row:** Confirm one register row added for Actions workflow default permissions (set to `read` at org level so workflows cannot write code/secrets by default). Row uses `approved pilot` status with link to org Settings > Actions > Workflow permissions.
16+
- Implementation risks to verify: ask "what exact string does the merge gate look for?" (→ check name) and "what makes the second run faster than the first?" (→ cache hit + cache scope).
17+
- Delivery lead prompts: ask "what's the risk if a workflow can write a token back to the repo?" (→ supply-chain attack) and "how long should Actions cache survive?" (→ org policy).

modules/ghec/challenges/ch04-actions-ci-fundamentals/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,18 @@ What setup creates (all artifacts namespaced `ghec-ch04-*`, idempotent, prefix-g
9494
10. Create an environment named `staging` with a required reviewer protection rule. Add an environment variable and a secret; have the `package` job reference the `staging` environment and echo the variable (never the secret).
9595
11. Make CI required. In branch protection / a ruleset on `main`, mark the `build-test` status check as required. Then flip the seeded failing test on, push, and confirm the PR is blocked from merging. Flip it back to green and confirm the block clears.
9696

97+
### Part G — Governance register: Actions policy & CI posture
98+
99+
Capture the governance decisions that make CI repeatable and safe across the org. This activity is 4 steps: inspect enterprise/org policy override, make one approved pilot decision on the allowed-actions boundary, prove CI compatibility, and record the decision.
100+
101+
1. **Inspect effective Actions policy & dependencies.** Read the enterprise and org Actions policy by checking Org Settings → Actions → General → Allowed actions and reusable workflows. Record whether the setting reads "All actions and reusable workflows" (permissive) or "Allow specified actions and reusable workflows" (restricted). List the Actions and reusable-workflow dependencies in `.github/workflows/ci.yml` (e.g., `actions/setup-node`, `actions/upload-artifact`, `actions/cache`, any custom actions). Record which ones are first-party (owned by GitHub) vs third-party.
102+
103+
2. **Make ONE approved policy pilot.** Choose and execute exactly one: **(a) Approved pilot:** If your org policy will restrict Actions, document the approved allowlist in the `Allowed actions` field. Include every dependency the workflow needs, for example `actions/checkout`, `actions/setup-*`, `actions/upload-*`, `actions/cache`, and any custom actions you identified. Record the effective level (`org`), implementation path (`approved pilot`), and customer-owned evidence (a screenshot or API dump showing the restricted setting + its value). **OR (b) Inspect-and-propose fallback:** If you lack authority to change the policy, record the current org policy, the identified Actions dependencies, and a one-paragraph rationale for a proposed allowlist in `docs/ACTIONS-POLICY.md`, with the effective level (`org`), implementation path (`inspect-and-propose`), and customer owner name.
104+
105+
3. **Prove CI compatibility & capture token posture.** Run the workflow twice (push a branch and open a PR). Confirm both runs complete successfully and all steps execute (setup, lint, test, build, cache, artifacts all pass). Document the `GITHUB_TOKEN` permission scope used in the workflow (check the `permissions:` block in `.github/workflows/ci.yml`) and whether fork PRs have the same token scope. Record artifact retention (default or custom) and whether logs are retained or deleted.
106+
107+
4. **Write the governance-register decision record.** Open the governance register you initialized in Ch06 (or create one now from `modules/ghec/resources/GOVERNANCE-SETTINGS-REGISTER-TEMPLATE.md`). Add rows for: (i) **Actions policy / allowed-actions boundary** (domain: `workflow`, effective level: `org`, implementation path from step 2, customer owner name, evidence: policy screenshot + `docs/ACTIONS-POLICY.md` or allowlist export); (ii) **Workflow token permissions** (domain: `workflow`, effective level: `org`, implementation path: `approved pilot`, desired value: `read` for standard workflows, evidence: workflow run with read-only token confirmed in logs); (iii) **Artifact/log retention** (domain: `workflow`, effective level: `org`/`repo`, implementation path: `approved pilot` if custom, evidence: retention setting + test artifact download evidence). Leave Next Decision blank for the next review.
108+
97109
## Validation / Definition of Done
98110
You are done when ALL of the following are true:
99111
- [ ] `.github/workflows/ci.yml` triggers on push and pull_request and runs lint + test + build as distinct steps.
@@ -103,6 +115,7 @@ You are done when ALL of the following are true:
103115
- [ ] A second job uses `needs` and a conditional so it only runs on `main`.
104116
- [ ] An environment `staging` exists with a protection rule and a variable + secret wired into a job.
105117
- [ ] The `build-test` check is required on `main`; a red run blocks merge, a green run unblocks it.
118+
- [ ] The governance register records the effective Actions/reusable-workflow policy, workflow-token and fork-PR posture, and artifact/log retention decision, with compatibility evidence from the CI pilot.
106119
- [ ] Real-outcome check — if you brought your own repo, CI now runs against a real build or test path; if you used the sample, you can name the workflow you will automate next.
107120
- [ ] Adoption handover — name the customer test or build process, workflow owner, required gate, and next approved rollout action.
108121

0 commit comments

Comments
 (0)