|
| 1 | +# Part 1: Setup & Context Engineering |
| 2 | + |
| 3 | +[← Overview](00-overview.md) |
| 4 | + |
| 5 | +--- |
| 6 | + |
| 7 | +In this section, you'll set up your development environment and teach GitHub Copilot about your codebase. |
| 8 | + |
| 9 | +--- |
| 10 | + |
| 11 | +## 🔧 Initial Setup |
| 12 | + |
| 13 | +### Step 1: Create Your Repository |
| 14 | + |
| 15 | +1. Open [github.com/copilot-dev-days/agent-lab-typescript](https://github.com/copilot-dev-days/agent-lab-typescript) |
| 16 | +2. Click **Use this template** → **Create a new repository** |
| 17 | + - Name: `my-soc-ops` |
| 18 | + - Visibility: **Public** |
| 19 | +3. ✅ Your own Soc Ops repo is ready! |
| 20 | + |
| 21 | +### Step 2: Enable GitHub Pages |
| 22 | + |
| 23 | +1. Go to your repo's **Settings** → **Pages** |
| 24 | +2. Under "Build and deployment", change *Deploy from a branch* to **GitHub Actions** |
| 25 | +3. ✅ Any commit will now publish to: `https://{username}.github.io/{repo-name}` |
| 26 | + |
| 27 | +### Step 3: Clone & Open in VS Code |
| 28 | + |
| 29 | +1. Open VS Code |
| 30 | +2. Run command: `Git: Clone` → `Clone from GitHub` |
| 31 | +3. Select your new repository |
| 32 | +4. Install recommended extensions (notification or `Extensions: Show Recommended Extensions`) |
| 33 | + |
| 34 | +### Step 4: Run the Setup Agent |
| 35 | + |
| 36 | +In the Chat panel: |
| 37 | + |
| 38 | +``` |
| 39 | +/setup |
| 40 | +``` |
| 41 | + |
| 42 | +The agent will figure out any required installation steps. |
| 43 | + |
| 44 | +✅ **Success:** App is running and open in browser! |
| 45 | + |
| 46 | +Keep this `.lab/` guide open (📌 Pin). |
| 47 | + |
| 48 | +--- |
| 49 | + |
| 50 | +## 📚 Understanding Context Engineering |
| 51 | + |
| 52 | +Context engineering is how you teach AI about your specific codebase. This makes Copilot's suggestions more accurate and relevant. |
| 53 | + |
| 54 | +### Task 1: Auto-generated Instructions |
| 55 | + |
| 56 | +Instructions guide all agentic codebase interactions, making them more efficient and reliable. Add them early, but make sure to keep them maintained and succinct. |
| 57 | + |
| 58 | +**Steps:** |
| 59 | + |
| 60 | +1. Run command: `Chat: Generate Workspace Instructions File` |
| 61 | + - While agent analyzes the codebase, optionally start next task |
| 62 | +2. Review results — probably too long and detailed |
| 63 | +3. Follow-up: *"Compress down by half and add a mandatory development [ ] checklist (lint, build, test) to the top"* |
| 64 | +4. Commit instructions |
| 65 | + |
| 66 | +✅ **Result:** All future requests will have a basic map of the workspace. |
| 67 | + |
| 68 | +--- |
| 69 | + |
| 70 | +### Task 2: Background Agents |
| 71 | + |
| 72 | +Handoff tasks that don't require handholding to background agents, which execute them isolated in git worktrees for quick parallel local iteration. |
| 73 | + |
| 74 | +**Steps:** |
| 75 | + |
| 76 | +1. Chat `+` → `New background agent` / `New cloud agent` |
| 77 | +2. New Background agent: *Add linting rules for unused vars and awaits usage; and fix any errors* |
| 78 | + - Review and *Apply*, then right-click delete the session |
| 79 | +3. New cloud agent: *Make the readme more engaging as landing page to the project* |
| 80 | + |
| 81 | +✅ **Result:** Agents adjusted the rules, fixed errors, and all edits are merged back into main. Stricter linting rules will catch any human/agent mistakes earlier. |
| 82 | + |
| 83 | +--- |
| 84 | + |
| 85 | +### Task 3: Check Tailwind 4 Instructions |
| 86 | + |
| 87 | +Tailwind v4 instructions close gaps from training data and document the latest best practices. |
| 88 | + |
| 89 | +See prompt in the footer. |
| 90 | + |
| 91 | +> 💡 **Optional:** If interested how it works, delete main text and re-run the prompt |
| 92 | +
|
| 93 | +--- |
| 94 | + |
| 95 | +### Task 4: Check Frontend Instructions |
| 96 | + |
| 97 | +The "no purple gradients" instructions challenge the agent to think like a designer and be more bold and creative. |
| 98 | + |
| 99 | +Source: Claude blog, linked in the footer. |
| 100 | + |
| 101 | +> 💡 **Think about:** What other agentic biases could you challenge and nudge? |
| 102 | +
|
| 103 | +--- |
| 104 | + |
| 105 | +## ✅ Part 1 Complete! |
| 106 | + |
| 107 | +You've learned how to: |
| 108 | +- Set up your development environment |
| 109 | +- Generate and refine workspace instructions |
| 110 | +- Use background and cloud agents for parallel work |
| 111 | +- Understand existing instruction files |
0 commit comments