Appearance
Implementation Issue Guideline
Spirit (the 3 non-negotiables)
- Write decisions, not directions: the issue carries only what an implementer — human or AI agent — cannot work out from the code: decisions, traps, and boundaries. Finding files, picking test names, and running the usual checks are the implementer's job.
- Every behavior is checkable: each acceptance criterion is a concrete situation, action, and expected result. The acceptance criteria table is both the specification and the test list.
- Reviewable in ten minutes: a tech lead approves the issue by reading it, without opening the code. Anything they cannot judge without the code does not belong in it.
An implementation issue is a specification precise enough that someone new, or an agent, can finish the work without asking anyone. It is not a step-by-step coding plan, and not a map of the codebase.
Task issue vs implementation issue
| Task issue | Implementation issue | |
|---|---|---|
| Answers | What, why, when it is done | Which decisions, which changes, which traps, what "done" looks like |
| Written by | Tech lead | The assigned developer, with AI help reading the code |
| Approved by | — | Tech lead, in 5–10 minutes |
| Relation | Parent | Sub-issue of the task; one implementation issue per change, even when the change spans several areas of a monorepo |
Flow: task issue → developer writes the implementation issue → tech lead approves → developer or agent implements → pull request closes the issue.
Record the approval on the issue itself, for example with a status: ready-for-agent label. An agent starts only on an approved issue. Keep the review checklist in this guideline, not as checkboxes in the issue body.
Skip the implementation issue for small work (roughly under 50 lines across one or two files). Implement straight from the task issue.
What to write and what to leave out
This is the part most drafts get wrong. Every item in the right-hand column has been written into a real issue, cost the reviewer time, and been removed.
| Write it | Leave it out |
|---|---|
| Decisions the team made: chosen format, chosen library, chosen timezone | Every file to change, with line numbers |
| Changes described by rule: "every timestamp column", "every datetime request field" | grep commands showing how to find the places to change |
| Traps that reading the code will not reveal | A list of test names |
| Classification rules where a guess is likely to be wrong | Commands already in the repository's AGENTS.md (lint, test, build) |
| The file to create, the pattern to copy, the function to reuse | Acceptance criteria written as commands instead of results |
| Constraints: what must not change, what is out of scope, how to roll back | General framework knowledge the implementer already has |
| The end state that counts as done | Priority, estimate, branch names: labels and repository guides own them |
Why each item on the right goes:
- File lists with line numbers: an agent finds the places faster than you can list them, the line numbers are stale after the first commit, and a reviewer cannot check the list without opening the code. A hand-made list also misses places; a search during implementation does not.
- Search commands: they describe how to work, not what to deliver. If completeness matters, state it as an end state ("no hand-written date parsing remains") and let the implementer prove it.
- Test names: they duplicate the acceptance criteria. Require one test per criterion instead.
- Standard commands: the repository's
AGENTS.mdalready says how to lint, test, and build. Repeating them adds lines and drifts when they change. - Command-style criteria: the reviewer approves outcomes, not regular expressions.
- Framework knowledge: do not explain that
timestamps()has atimestampsTz()variant. Do explain the framework behavior that is surprising and breaks the task. - Priority and estimate: labels and the project board already hold them. A copy in the body goes stale.
What counts as a trap
A trap is something that looks right, passes a quick check, and is still wrong. Name it with a warning sign and one line of reason.
markdown
⚠️ Laravel writes dates and query bindings as `Y-m-d H:i:s`, dropping the offset.
Without a `timezone` on the `pgsql` connection, PostgreSQL reads them in the server's zone.Put a trap where the implementer will read it at the right moment: under the change it belongs to in "Implementation", or in "Context" when it affects the whole task.
Good traps to call out:
- Behavior the test environment hides — SQLite in tests, PostgreSQL in production.
- Library output that looks standard but is not accepted downstream, such as
+0700instead of+07:00. - Fields with similar names but different types, such as
frombeing a datetime in one endpoint and a date in another.
Section guide
The issue has a header line and six sections, in this order. Section headings are always in English.
Header line
Part of #<task issue>. Add Replaces #<issue> and Depends on #<issue> when they apply. Links to documents go here too.
1. Goal
One sentence: the outcome when the issue is closed.
2. Context
What the implementer must know before touching code. It applies to the whole task:
- Skills: the skills or guides to read, per area (backend, web, mobile).
- Decision: choices the team made that apply everywhere, such as a data contract or a fixed timezone. A short table of formats or types fits here.
- ⚠️ Traps that affect the whole task.
"Context" here means the knowledge for implementing, not the business reason. The business reason lives in the task issue. A decision or trap that concerns only one area goes under that area in "Implementation".
3. Implementation
What changes, per area. Each line starts with a label:
| Label | Use for |
|---|---|
| Change | Existing behavior or code that must change, described by rule, not as a file list |
| Create | A new file, with its exact path and purpose |
| Follow | The exact path of a pattern to copy |
| Reuse | A function that must be reused or keep its name, with its path |
| Decision | A choice that applies only to this area |
| ⚠️ | A trap tied to the change above it |
Name exact paths only for files to create, files to copy from, and functions that must be reused or keep their name. A Follow that serves a single change ends that change's line, so the reader knows what the pattern is for. Group the lines by area in the order the work should happen; commits in the pull request follow the same areas.
4. Acceptance Criteria
A table of situation, action, and result. Use — when there is no special situation.
When the issue covers more than one area, start each Given cell with the area — Server, Web, Mobile — and use E2E for rows that check the whole flow across areas. Reviewers check each part by its rows, and the end-to-end rows stay in the same issue as the parts they connect.
markdown
| Given | When | Then |
|---|---|---|
| Server | `POST /api/items` with `start_at=2026-10-01T01:00:00Z` | 201, response `start_at` = `2026-10-01T08:00:00+07:00` |
| Server, a log at `2026-10-11T17:00:00Z` | `GET /api/logs?from=2026-10-12T00:00:00+07:00` | The log is in the result |
| Web, `TZ=America/New_York` | Pick `2026-10-01 08:00` and save | The payload is the instant `2026-10-01T01:00:00Z` |
| E2E (manual) | Create an item at 08:00 on mobile, open it on web | Web shows 08:00 |Cover the contract with real values (request, response, status codes, error codes, UI states, database types), and cover what breaks, not only the happy path: missing values, invalid formats, boundaries (midnight, end of month, maximum length), and values the old code accepted that the new code must reject.
End states that prove completeness are criteria too, such as "after a fresh migration on PostgreSQL, no timestamp without time zone column remains". Mark a row (manual) only when an automated test is not practical, such as a short check of the real flow in a browser.
The table is always followed by the same two lines:
markdown
- Every row not marked (manual) has an automated test.
- Each area's checks from `AGENTS.md` pass.5. Constraints
Each bullet that applies, in this order:
- Do not change: code, data, or contracts that must stay as they are.
- Out of scope: related work this issue does not do.
- Dependencies: new libraries allowed, or none.
- Compatibility: what breaks for existing clients or data, and what must be deployed together.
- Rollback: how to undo the change (revert pull requests, migration down), or why it cannot be undone.
- Pull requests: in a monorepo, one pull request that closes the issue, with commits split by area so each part can be reviewed on its own. Use several pull requests only when each one can be merged and deployed alone without breaking clients, and then state the merge order.
Security or performance limits that are specific to this task belong here as well.
6. Open questions
Must read None before work starts. An issue with open questions is a draft, not a specification.
Before you publish
Check the issue against its surroundings. Each of these mistakes has made it into a real draft:
- Repository rules: read the target repository's
AGENTS.mdand issue skills. If a rule there conflicts with this guideline, for example "issues must not name file paths", resolve the conflict first or the agent will follow the repository rule. - Real stack: examples and commands must match the repository's stack. A Node.js example in a Laravel repository is wrong, and so is a command the repository forbids.
- Other open issues: search for issues on the same topic. Either align with them or state that this issue replaces them.
- Claims are verified: check every behavior you rely on against the framework source or a quick script. Do not write from memory.
- Paths exist: every path the issue names must exist, except files marked "Create".
Also confirm that the issue is the right size. Keep areas that must ship together, such as server, web, and mobile in one monorepo, in one issue: split issues lose the end-to-end check and leave a gap where one side is merged and the other is not. Split only work that can ship and be verified on its own.
Validate the format
Run the validator on the draft before creating the issue, and on the issue after every edit. It needs Deno 2 on the machine, and an authenticated gh to fetch an issue. There is nothing else to install: Deno downloads the Markdown parser the script pins.
bash
# A local draft
deno run -q --no-config --allow-read https://omes-engineering-docs.pages.dev/scripts/v1/validate-implementation-issue.ts --file draft.md
# A published issue: owner/repo#123, an issue URL, or 123 in the current repository
deno run -q --no-config --allow-run=gh https://omes-engineering-docs.pages.dev/scripts/v1/validate-implementation-issue.ts technicalors/obee#159--no-config keeps Deno from reading the current repository's package.json or deno.json; without it, Deno looks for the parser in that repository's node_modules. The --allow-* flags are the only access the script gets: reading the draft, or running gh.
It exits with 0 when the format is valid, 1 with a list of problems and their line numbers, and 2 on a usage or fetch error. It only reads the issue.
It parses the issue as GitHub-flavored Markdown, the way GitHub renders it, and checks structure only: the header line, the six sections in order, labeled bullets in "Implementation", the Given | When | Then table and its two fixed lines, the six labels in "Constraints", None in "Open questions", and leftover placeholders (<one sentence>, #SERVER) or paths with line numbers. Whether the decisions are right and the traps are complete is still the tech lead's review.
Writing rules
- Use exact names in contracts: field names, error codes, and formats, such as
start_atand2026-10-12T09:00:00+07:00, not "the start time in ISO format". - Use examples, not descriptions.
- Do not repeat repository conventions: they live in
AGENTS.md. The issue holds only what is specific to this task. - Fix the issue first: if the specification turns out to be wrong during implementation, update the issue body, then the code.
Blank template
markdown
Part of #<task issue>
### Goal
<one sentence>
### Context
- **Skills:** <Area> `<skill or doc>` · <Area> `<skill or doc>`
- **Decision:** <task-wide choice, and why if it is not obvious>
- ⚠️ <task-wide trap>: <one line reason>
### Implementation
**<Area>**
- **Change:** <rule-based change>
- **Create:** `<path>` — <purpose>
- **Follow:** `<path of the pattern to copy>`
- **Reuse:** `<function>` in `<path>`
⚠️ <trap tied to this change>: <one line reason>
### Acceptance Criteria
| Given | When | Then |
|---|---|---|
| | | |
- Every row not marked (manual) has an automated test.
- Each area's checks from `AGENTS.md` pass.
### Constraints
- **Do not change:**
- **Out of scope:**
- **Dependencies:**
- **Compatibility:**
- **Rollback:**
- **Pull requests:**
### Open questions
NoneReview questions
Before approving, the tech lead asks:
- Can I judge every line without opening the code?
- Is every decision I would want a say in written down?
- Is every trap I know about for this area named, next to the change it affects?
- Does "Implementation" describe changes by rule, without a file list?
- Does every acceptance criterion have a concrete situation, action, and result, including the failure cases?
- Do "Constraints" stop the implementer from touching what they must not, and say how to roll back?
- Is "Open questions" empty?
- Is this one issue per change: areas that must ship together stay together, and work that ships on its own is split out?

