Turn an approved engineering source into a precise implementation request with independently checked expectations.
What you will learn
- Identify the device, operating mode, document revision, and source section.
- Separate requirements, assumptions, and unresolved questions; do not invent missing byte order or error policies.
- Define input, output, signedness, units, scale, interfaces, applicable timing and memory constraints, clocking, and reset behavior.
- Check a reference calculation and specify acceptance examples before implementation.
Practice focus
Prepare a task brief for the fictional offline sensor decoder. Verify the signed conversion and scale, preserve unresolved questions until approved, and specify that an incomplete frame produces INVALID without a numeric measurement.
Engineering deliverable
A source-linked engineering task card with constraints, permitted files, acceptance criteria, and open questions.
Lesson transcript
Scene 01
A sensor-decoding routine can compile and still produce the wrong physical value because the task omitted signedness, byte order, or scale. In this unit, we turn approved hardware documentation into a bounded development task with traceable constraints and acceptance criteria, before asking an AI agent to write code.
Scene 02
Start with the relevant datasheet and reference manual, not an unqualified document dump. Identify the device, operating mode, document revision, and exact section. Separate a mandatory requirement from a vendor example. In our fictional training example, the datasheet defines the sample format and scale. It does not, by itself, define the software interface or error-handling policy.
Scene 03
Classify extracted information as a requirement, an assumption, or an open question. Here, signed sixteen-bit data and the scale are documented. Byte order is missing from the supplied excerpt, and malformed-input behavior has not been approved. Ask for the relevant reference and an engineering decision. Do not let the agent invent a register value, resolve conflicting sources silently, or turn an assumption into a requirement.
Scene 04
Check one reference calculation independently. After the training reference manual confirms that the most significant byte arrives first, the bytes shown form a signed value of minus sixteen counts. At a quarter milli-g per count, the expected output is minus four milli-g. This checks byte order, signed interpretation, and scale together. The number is a predefined expectation, not a generated test result.
Scene 05
Next, define the implementation boundary. Our task changes an offline decoder and its tests, not the sensor configuration or acquisition driver. Specify the input format, output units, and approved invalid-input behavior. For embedded or RTL work, make applicable memory limits, timing requirements, data widths, interfaces, clocking, and reset behavior explicit. Any missing constraint that affects correctness stays open until an engineer resolves it.
Scene 06
Now write the task brief for GitHub Copilot: source references, target files, permitted changes, constraints, acceptance examples, and the existing test command. Ask Copilot to extract the requirements, flag unresolved questions, and propose a plan before editing. Keep the brief as a reusable project artifact. The objective is an implementation request that another engineer can review.
Scene 07
Define expected behavior before implementation. The positive and negative examples check the conversion; the one-byte frame checks the approved invalid-input policy. An incomplete frame must return an invalid status without a numeric measurement, not substitute zero. These examples are acceptance anchors, not a complete verification suite. Additional boundaries and failure cases belong in the test plan.
Scene 08
Before you hand the task to an AI agent, ask a colleague to review the source references, unresolved questions, and expected behavior. They should be able to judge the result without guessing what you meant. Once those decisions are explicit, you are ready to implement.