JustHandled Labs
// engineering planning guide

Turn a PRD into a coding-agent implementation plan

Do not hand a coding agent a narrative document and hope it discovers the right order. Extract the contract, separate decisions from guesses, create reviewable tasks, map technical dependencies, and define what would prove each task complete.

The short version

Normalize the PRD into goal, actors, triggers, outcomes, constraints, and non-goals. Put vague or contradictory requirements in an ambiguity queue instead of silently resolving them. Break the work into one-outcome tasks, add dependencies before sequencing, and give every task an observable acceptance criterion. Treat complexity as a relative engineering estimate, not a date. Draft GitHub issues only after the whole plan is reviewed; create them only after confirming the repository and exact issue set.

Planning path

1. Normalize the product contract

A PRD is usually written for several audiences. It may mix the customer problem, business target, interface ideas, implementation preferences, and launch wishes. Before creating tasks, rewrite it as a small contract that preserves the source while exposing what is missing.

FieldQuestionPlanning use
GoalWhat user or business outcome should change?Reject tasks that do not contribute to the stated result.
ActorsWho can initiate, view, approve, administer, or be denied?Define authorization and role cases before UI work.
TriggerWhat starts the flow?Locate entry points, events, routes, or scheduled jobs.
OutcomeWhat observable state proves success?Anchor acceptance criteria and verification.
ConstraintsWhich platforms, data, latency, compliance, or compatibility limits are explicit?Affect architecture, task size, and negative-path tests.
Non-goalsWhat is deliberately excluded?Prevent the plan from inventing adjacent scope.

Keep source fidelity

  • Label direct requirements as confirmed.
  • Label reasonable technical consequences as inferred.
  • Label missing choices as unresolved.
  • Do not turn an example screen or sentence into a requirement unless the PRD treats it as one.

2. Put ambiguities in a queue, not in the code

A useful plan makes uncertainty more visible. Translate vague adjectives and overloaded verbs into decisions with measurable consequences.

  • “Fast” becomes a target, percentile, device, network, and measurement point.
  • “Secure” becomes actors, protected data, denied operations, audit needs, and relevant threat or policy constraints.
  • “Sync with Notion” becomes manual paste, Markdown import, one-way API pull, two-way synchronization, conflict behavior, and authorization.
  • “Real-time” becomes polling, server events, sockets, acceptable delay, reconnection, and stale-state behavior.
  • “Admin can manage users” becomes the exact actions, role hierarchy, self-demotion rule, audit record, and failure states.

Mark an ambiguity as blocking when different answers change schema, authorization, integrations, or public behavior. A non-blocking assumption can remain in the plan only when it is reversible and clearly labeled.

3. Form tasks around reviewable outcomes

One task should create one coherent outcome that a reviewer can inspect. Avoid tasks that are either a vague feature name or a miniature project containing schema, API, UI, background work, migration, and tests.

A

Name the result

Use an action and object: “Add organization membership schema,” “Enforce export permission,” or “Render defined empty and error states.”

B

Name likely touchpoints

List likely directories, components, routes, migrations, or tests when the repository context supports them. Use “likely” rather than inventing precise files in an unseen codebase.

C

Keep proof with the work

Include the unit, integration, browser, migration, authorization, or operational evidence that establishes the outcome. Do not place all verification in one final catch-all task.

4. Add dependencies before you sequence the work

Document order is not implementation order. Build a dependency graph from contracts and state outward, then identify work that can proceed in parallel.

  • Schema and migration before code that persists or queries the new state.
  • API or event contract before independent producer and consumer implementations.
  • Authentication and authorization rules before admin, sharing, export, and destructive actions.
  • Parser and validation before persistence of imported data.
  • Core implementation before end-to-end tests, but test fixtures and acceptance cases can be prepared earlier.
  • Instrumentation before relying on an operational dashboard or alert.
  • Fallback and rollback behavior before a risky migration or broad release.

Give every task a dependency value, even when it is None. A blank dependency cell hides whether sequencing was considered.

5. Write acceptance criteria that can fail

Criteria should describe the externally observable behavior, not merely repeat the implementation action. Include the actor, starting state, action, result, and relevant denial or failure path.

Task: Enforce organization-scoped project access

Acceptance criteria
- A signed-in member can read projects for their organization.
- The same member cannot read or mutate another organization's project by ID.
- An unauthenticated request receives the declared authorization response.
- The UI renders empty, denied, and dependency-failure states without exposing data.
- Automated tests cover owner, same-organization member, cross-organization member, and anonymous cases.

A criterion such as “permissions work” cannot reliably fail and therefore cannot establish completion. If a requirement changes persistent state, include reload or subsequent-read evidence. If it changes money, identity, authorization, deletion, or external messages, include the negative and recovery paths.

6. Estimate complexity without inventing a schedule

Use Small, Medium, and Large to communicate relative implementation complexity. State the factors: number of components, uncertainty, migration risk, external dependencies, authorization, data loss, billing, and verification breadth.

  • Small: localized, well-understood change with narrow tests and no meaningful migration or permission risk.
  • Medium: several components or new error states, a modest schema/API change, or permissions that need focused testing.
  • Large: cross-cutting architecture, external integration, risky migration, role-model change, broad compatibility, or unresolved requirements.

Do not translate those labels into dates unless team capacity, codebase maturity, review time, deployment constraints, and parallel work are known.

7. Preview the issue set before creating anything

GitHub supports issue templates and forms, issue hierarchy, dependencies, and command-line issue creation. Those are useful destinations for a reviewed plan, not substitutes for one. GitHub’s documentation shows that gh issue create can set title and body non-interactively and can also express parent and dependency relationships.

  1. Show the complete proposed task table.
  2. Resolve blocking ambiguities and adjust task boundaries.
  3. Confirm the target repository and whether issues, sub-issues, dependencies, labels, milestones, or projects are appropriate.
  4. Preview every title and body, including acceptance criteria and dependency references.
  5. Check for duplicates and existing work.
  6. Ask for explicit confirmation immediately before creation.
  7. Record the created URLs and compare them with the approved set.

For repeated intake, GitHub issue forms can standardize inputs and validations through YAML files in /.github/ISSUE_TEMPLATE. The current GitHub documentation notes that issue forms remain in public preview, so keep the plan portable as Markdown rather than depending on one UI feature.

Use the plan as a verification contract

When implementation begins, update the plan with the actual files changed, decisions made, deviations, commands run, and evidence produced. A coding agent should not claim a task complete because code exists; it should show how the stated acceptance criteria were exercised.

Minimum handoff record

  • Source PRD version or link and the planning date.
  • Confirmed requirements, assumptions, ambiguities, and non-goals.
  • Task IDs, dependencies, estimates, and acceptance criteria.
  • Approved issue URLs, if created.
  • Actual files and migrations changed.
  • Verification commands and results.
  • Known gaps, rollback or recovery notes, and next action.

Turn the method into a repeatable workflow

Spec2CodeConverts pasted PRDs, Notion exports, feature specs, bug reports, and user stories into a goal, ambiguity queue, dependency-aware task matrix, complexity, likely files, acceptance criteria, sequence, and optional GitHub issue drafts. Core planning can run offline; issue creation requires confirmation.See the PRD planning skill →

Common questions

Should a coding agent implement directly from a PRD?

Usually not without a planning pass. A PRD often mixes outcomes, interface ideas, constraints, and open questions. Separate confirmed requirements from ambiguities and map technical dependencies before implementation.

How detailed should an implementation task be?

A task should produce one reviewable outcome, name its dependencies, identify likely files or components when known, and include acceptance criteria that can be observed or tested.

What makes good acceptance criteria for a coding agent?

Criteria should describe observable behavior: actor, starting state, action, result, authorization boundary, persistence, and relevant failure or empty states. Avoid criteria that only restate the task title.

Should the plan create GitHub issues automatically?

Draft and review the issue set first. Confirm the target repository, titles, bodies, labels, hierarchy, and dependencies before any issue-creation command runs.

Are AI-generated complexity estimates reliable?

They are useful for relative planning when their assumptions are visible, but they are not delivery commitments. Review them against the actual codebase, team capacity, dependencies, and operational risk.

Primary references

Turn the narrative into an execution contract.

Spec2Code packages the planning pass into a reusable agent workflow. Review the source, permissions, current price, and purchase option on Agensi.

Get Spec2Code on Agensi