Lesson 3 - Crafting High-Fidelity Instructions

Turn your skeleton into actionable instructions that produce consistent results. Learn to brief AI like a capable colleague, embed quality gates, and iterate using real test feedback.

Duration: 2-2.5 hours

Learning Objectives

By the end of this lesson, you will be able to:

  • Structure instructions with the Trigger → Workflow → Constraints → Output framework.
  • Embed quality gates, acceptance criteria, and examples directly inside SKILL.md.
  • Use markdown formatting for clarity without exceeding the 500-line guidance.
  • Run iterative tests, capture deviations, and revise instructions to close gaps.

Videos

Manager Mindset: Briefing a Literal Genius

The mindset shift for writing great instructions — you're defining a contract the AI must execute consistently.

Duration: 8 minutes

Video coming soon

The Four-Part Instruction System

Deep dive into Trigger → Workflow → Constraints → Output, with a live build of the deploy-checklist skill.

Duration: 10 minutes

Video coming soon

Testing Loops and Iteration

Install your skill, test it with real inputs, capture deviations, and translate findings into instruction edits.

Duration: 7 minutes

Video coming soon

Key Concepts

The Four-Part Template

Use this structure for every skill you write: ```markdown ## Trigger Activate this skill when [specific scenario]. Do NOT use this skill when [exclusion condition]. ## Workflow 1. [Verb] [specific action with clear details] 2. [Verb] [next action] 3. Check that [validation step] 4. [Verb] [output action] ## Constraints - Never [destructive or out-of-scope action] - Always [required behavior] - If [condition], then [specific response] ## Output Return the result as [specific format]. ### Example Output [Concrete example showing exactly what good output looks like] ```

Good vs. Bad Instructions — Side by Side

**Bad: Vague and open to interpretation** ```markdown Review the code and suggest improvements. ``` This produces different results every time. The AI doesn't know what to check, how deep to go, or what format to use. **Good: Specific, structured, and testable** ```markdown ## Workflow 1. Check for unused imports — flag any import not referenced in the file. 2. Check function length — flag any function exceeding 30 lines. 3. Check error handling — flag any try/catch that silently swallows errors. 4. Check naming — flag variables with single-letter names (except loop counters i, j, k). ## Output Return a markdown checklist: - [ ] file:line — issue description — suggested fix ``` This produces consistent results because every step is specific and testable. **Bad: Tries to handle everything** ```markdown Handle all possible code review scenarios including security, performance, accessibility, testing, documentation, and style for all programming languages. ``` **Good: Focused on the 80% case** ```markdown ## Trigger Activate when reviewing TypeScript pull requests. ## Constraints - Focus on code quality only — security and performance are separate skills. - Only review changed files, not the entire codebase. ```

Quality Gates and Acceptance Criteria

Embed checks directly in your instructions that the AI must satisfy: - **Completion criteria:** `Do not finish until you've verified all items in the checklist pass.` - **Stop conditions:** `If tests fail, stop and return the error logs. Do not attempt fixes.` - **Scope limits:** `Do not modify any files outside the src/ directory.` - **Safety rails:** `Never run destructive commands (DROP, DELETE, rm -rf) during validation.` Quality gates turn your skill from 'nice instructions' into a reliable contract.

Writing Tips for All Backgrounds

You don't need to be technical to write great skills. Here are universal tips: **1. Start with what you know.** If you review documents, manage projects, or write marketing copy — you already have the expertise. Write down your process. **2. Use everyday language.** 'Check if the summary is under 200 words' is better than trying to sound technical. **3. Be direct.** 'Do this. Then do that. Never do this.' Politeness is nice in conversation, but clarity wins in instructions. **4. The 'new colleague' test.** Read your instructions aloud. If a smart new colleague could follow them without questions, they're good enough. **5. Show, don't tell.** One example of good output eliminates pages of description. Include examples. **6. Iterate, don't perfect.** Write version 1, test it, fix where the AI deviated. Three rounds of iteration beat one hour of trying to write perfect instructions.

Testing Log Template

Keep a lightweight test log as you iterate: | # | Input/Scenario | Expected | Actual | Deviation | Fix Applied | |---|---------------|----------|--------|-----------|-------------| | 1 | Deploy with pending migrations | Flag migrations | Missed migration check | Added explicit step: 'List all unapplied migrations' | | | 2 | Deploy with failing tests | Stop and report | Attempted to fix tests | Added constraint: 'Do NOT attempt fixes — only report' | | | 3 | Re-test after fixes | Both issues caught | Both caught correctly | None — ship it | | This log doubles as documentation for why your instructions evolved.

Common Mistakes & Pitfalls

Writing vague instructions

'Review the code' gives inconsistent results. 'Check for unused imports, functions over 30 lines, and silent error handling' gives the same result every time.

Trying to cover every edge case upfront

A skill that handles 80% of cases consistently is more valuable than one that tries to handle 100% and becomes a confusing wall of text.

Skipping examples

Examples are the single most effective way to communicate what you want. One concrete example of good output eliminates entire paragraphs of description.

Being polite instead of precise

'It would be nice if you could perhaps check...' → 'Check for X. Flag any instance. Return results as a checklist.' Direct language gets direct results.

Not specifying the output format

Without a prescribed format, the AI invents one — differently each time. Specify: 'Return a markdown table with columns: File, Line, Issue, Fix.'

Testing only once

One test doesn't catch inconsistencies. Run at least 3 tests with different inputs. The gap between run 1 and run 3 reveals ambiguity.

Exercises

Exercise 1: Populate Your Four-Part Instructions

30 minutes

Replace the placeholder sections in your SKILL.md with real instructions using the Trigger → Workflow → Constraints → Output framework. Include at least one example in the Output section.

Expected Output:

A complete SKILL.md with all four sections populated and at least one example output.

Success Criteria:

  • Trigger references a concrete scenario (not generic).
  • Workflow has at least 4 numbered steps, each starting with a verb.
  • Constraints include at least 2 things the AI must NOT do.
  • Output section includes a concrete example showing the expected format.

Exercise 2: Live Test Loop (3 Iterations)

35 minutes

Install your skill, test it with a real scenario, log the results, fix deviations, and re-test. Repeat at least 3 times.

Expected Output:

A completed test log showing 3 iterations with deviations found and fixes applied.

Success Criteria:

  • Tested at least 3 times with real (not toy) inputs.
  • Each test logged: scenario, expected result, actual result, deviation, fix.
  • At least 3 instruction edits traced directly to observed deviations.
  • Final test confirms the fixes work.

Exercise 3: Peer Review Swap

20 minutes

Exchange your SKILL.md with another learner (or read it aloud to yourself as if you've never seen it). Apply the 'new colleague' test. Would they know exactly what to do?

Expected Output:

Feedback notes from the reviewer plus your revision plan.

Success Criteria:

  • Reviewer identified at least one ambiguous instruction.
  • Reviewer confirmed the output example is clear.
  • You revised the ambiguous section based on feedback.
  • Updated SKILL.md committed to git.

Lesson Reflection

Take a moment to reflect on what you've learned:

  • 1. Read your Lesson 2 skeleton. Where is each section vague enough that two people might interpret it differently?
  • 2. Which of the four parts (Trigger, Workflow, Constraints, Output) do you find hardest to write? Why?
  • 3. Think of a time someone misunderstood your instructions. What was missing that would have prevented it?
  • 4. After testing your skill, what surprised you most about how the AI interpreted your instructions?