Skip to content

Latest commit

 

History

History
906 lines (673 loc) · 30.7 KB

ENGINEERING_PLANNING_AND_ESTIMATION.md

File metadata and controls

906 lines (673 loc) · 30.7 KB

Engineering Planning and Estimation

Purpose

Engineering planning turns an intended outcome into a credible path for delivering and supporting it. It discovers the work, uncertainty, decisions, dependencies, evidence, and operating obligations that must exist before a schedule can be trusted.

The governing question is:

What must be understood, decided, built, verified, operated, and learned for this outcome to succeed?

This question is deliberately broader than “What code must we write?” A product can fail even when its code is complete. The team may have misunderstood the user, delayed a critical decision, omitted migration work, tested the wrong environment, released without recovery procedures, or never measured whether the outcome improved.

This guide explains:

  • the relationship between engineering planning and project management;
  • the six dimensions of a complete plan;
  • how planning questions reveal missing work and knowledge gaps;
  • how to create decision-useful estimates;
  • how to reason about deadlines, scope, quality, dependencies, and risk;
  • how to update a plan as evidence changes; and
  • how to avoid turning planning into either guesswork or excessive ceremony.

Planning and Project Management

Planning overlaps with project management, but they are not the same thing.

Engineering planning establishes what must happen for a technical outcome to be correct, safe, operable, and valuable. It identifies requirements, quality bars, design decisions, implementation work, verification, release work, uncertainty, and technical dependencies.

Project management coordinates the system of people, time, scope, money, communication, dependencies, and decisions needed to execute that plan.

Project management asks questions such as:

  • Who is responsible for each deliverable and decision?
  • Which work can proceed in parallel?
  • Which dependency controls the completion date?
  • When must information or approval be available?
  • How will progress, risk, and changes be communicated?
  • What should change when the schedule or assumptions move?

Engineering planning asks questions such as:

  • Which behavior and quality thresholds define success?
  • What must be true after every transaction?
  • Which architecture is sufficient to protect those rules?
  • Which unknowns can change that architecture?
  • What migrations, tests, operational controls, and recovery procedures are required?
  • Which evidence allows the team to release safely?

The two disciplines depend on each other:

Engineering planning discovers the real work and uncertainty.
Project management coordinates that work through people and time.
Execution produces evidence.
Evidence updates both the engineering plan and the project forecast.

A project schedule built before the engineering work is understood is a date attached to an assumption. An engineering design without ownership, dependencies, sequencing, or decision dates is a solution without an execution system.

Planning Is More Than a Task List

A task list usually records work the team already recognizes. Planning must also discover work that is not yet visible.

A complete plan contains:

  • the outcome and its quality bars;
  • validated requirements and important non-goals;
  • assumptions and open questions;
  • decisions and decision deadlines;
  • deliverables rather than only activities;
  • dependencies and required sequence;
  • verification and acceptance evidence;
  • release, migration, and operational work;
  • ownership and coordination;
  • estimates with ranges and confidence;
  • risks, responses, and replanning triggers; and
  • post-release measurements and learning.

The plan is therefore a model of the work and the uncertainty surrounding it. Dates are one output of that model.

The Six Dimensions of a Complete Plan

The six verbs in the governing question prevent the plan from collapsing into implementation tasks alone.

1. Understand

Meaning

The team must understand the outcome, the real-world scenario, the current system, the constraints, and the areas where its knowledge is incomplete.

Understanding does not require knowing everything. It requires knowing which unknowns can materially change the outcome, design, effort, or risk.

Questions

  • What problem are users or the business experiencing?
  • What observable result would count as success?
  • What evidence shows that the problem exists?
  • What behavior exists today?
  • Which requirements, policies, external contracts, and service-level objectives apply?
  • Which quality thresholds are mandatory?
  • What is explicitly outside the scope?
  • Which systems, teams, vendors, and data are involved?
  • What assumptions is the proposed plan making?
  • Which knowledge gaps could invalidate the estimate or architecture?

Outputs

  • an outcome statement;
  • success measures and quality bars;
  • current-state evidence;
  • a system and dependency map;
  • validated requirements and non-goals;
  • an assumption and question log; and
  • a preliminary risk classification.

Completion test

The team can explain the problem and expected result without relying on a particular solution, and it has classified the important unknowns rather than hiding them inside an estimate.

2. Decide

Meaning

Understanding exposes choices. Planning must identify which choices require a decision, what evidence is needed, who may decide, and when the decision must be made.

An unresolved decision is not implementation work. It is a branch in the plan. Different decisions can produce different designs, risks, costs, and schedules.

Questions

  • Which model owns each fact that can change?
  • Where must transactions or consistency boundaries exist?
  • Which requirements are mandatory and which scope can change?
  • Which design is the minimum one that meets the quality bars?
  • Which trade-offs require product, security, operational, or commercial authority?
  • What evidence is needed before making each decision?
  • What is the last responsible moment for deciding without delaying other work?
  • Which decision would make existing estimates invalid?

Outputs

  • architecture and product decisions;
  • decision owners and deadlines;
  • selected trade-offs and rejected alternatives;
  • accepted residual risks;
  • scope boundaries; and
  • recorded assumptions behind each consequential decision.

Completion test

No material implementation path depends on a hidden choice. Open decisions have owners, evidence requirements, and dates tied to the work they block.

3. Build

Meaning

Building includes every artifact necessary to make the outcome real. It is not limited to application code.

Questions

  • Which domain, application, interface, persistence, and presentation changes are required?
  • Which database schemas, constraints, migrations, and backfills are required?
  • Which infrastructure, configuration, permissions, and secrets are required?
  • Which compatibility paths or feature controls are needed during rollout?
  • Which dashboards, alerts, runbooks, and recovery tools must be created?
  • Which documentation, training, or support material is part of the product?
  • Which temporary mechanism needs an owner and removal condition?

Outputs

  • production code and configuration;
  • migrations and data corrections;
  • deployment and infrastructure changes;
  • user-facing content;
  • operational controls and recovery tools;
  • documentation; and
  • removal tasks for temporary rollout mechanisms.

Completion test

Every artifact required by the design, release transition, operation, and user experience appears in the work breakdown. “Code complete” is not used as a substitute for “outcome ready.”

4. Verify

Meaning

Verification produces evidence that the built result satisfies the validated requirements and quality bars.

The form of evidence must match the claim. An in-memory unit test cannot prove a PostgreSQL concurrency constraint. A load test cannot prove that users understand an error message. A green health endpoint cannot prove that a business workflow succeeds.

Questions

  • What observation proves each requirement?
  • Which invariant needs an aggregate test, database constraint, concurrency test, property test, or formal model?
  • Which integrations require contract tests?
  • Which migrations require production-like data and volume?
  • Which security, privacy, performance, accessibility, and recovery properties require evidence?
  • Who accepts the result when verification cannot be fully automated?
  • Which failure should block release?

Outputs

  • acceptance criteria;
  • automated and manual tests;
  • migration and compatibility evidence;
  • performance and security evidence;
  • review and approval records where justified; and
  • a trace from each material requirement to its proof.

Completion test

Every material claim has evidence produced in an environment capable of testing that claim, and known evidence gaps have explicit risk decisions.

5. Operate

Meaning

Operation covers the transition into production and the continuing ability to observe, support, recover, and afford the capability.

Questions

  • In what order will code, schemas, data, workers, and configuration change?
  • Can old and new versions coexist safely?
  • Which signal permits rollout to continue?
  • Which signal stops or reverses the rollout?
  • Who responds when the capability fails?
  • How will the responder diagnose and recover it?
  • What are the service-level, capacity, storage, and cost limits?
  • Can derived data be rebuilt and authoritative data be restored?
  • Which cleanup, retention, backup, and reconciliation processes are required?

Outputs

  • a staged release and migration plan;
  • production signals and actionable alerts;
  • runbooks and escalation paths;
  • rollback and roll-forward procedures;
  • capacity and cost controls;
  • backup, restoration, reconciliation, and rebuild procedures; and
  • an operational owner.

Completion test

The team can safely release the change, detect a representative failure, and recover the required user outcome without relying exclusively on the engineer who wrote the code.

6. Learn

Meaning

Learning closes the plan. The team must compare production evidence with the outcome, assumptions, estimates, and quality bars that justified the work.

Without this stage, planning cannot improve. Estimates remain opinions because actual effort is not compared with the original model. Architecture remains because no one checks whether its justifying constraint appeared.

Questions

  • Did the user or business outcome improve?
  • Did every component meet its required quality bar?
  • Which requirements or assumptions were wrong?
  • Which work was discovered late, and which question would have revealed it?
  • Which estimate varied, and was the cause scope, uncertainty, dependency, productivity, or interruption?
  • Did the system meet its reliability, performance, capacity, and cost limits?
  • Which temporary component can now be removed?
  • What should the next plan do differently?

Outputs

  • outcome and quality measurements;
  • an estimate-versus-actual review;
  • validated or rejected assumptions;
  • process and architecture improvements;
  • cleanup and simplification work; and
  • reusable evidence for future estimates.

Completion test

The team has converted production and execution evidence into explicit decisions. Learning is not a retrospective discussion with no change to the next plan.

Component Quality Bars and the Whole Product

A user experiences one product outcome, not the average score of its internal components.

For critical components, overall quality often behaves like a threshold:

Acceptable product
  = every necessary component meets its minimum quality bar

It does not behave like:

Acceptable product
  = average quality across all components

Excellent search, documentation, and email do not compensate for loan records being lost. A correct transaction does not compensate for an interface that leaves patrons unable to tell whether borrowing succeeded. Like excessive salt in an otherwise excellent dish, one critical component below its acceptable threshold can make the complete outcome unacceptable.

This does not mean that every component should receive the highest possible quality investment. Each component needs a quality bar based on the consequence of its failure.

For example:

Component Possible quality bar
Loan authority No successful commit may create two outstanding loans for one book
Borrow response A patron can identify the committed loan and due date before acting again
Search projection Results may be several minutes stale if authoritative reads remain available
Confirmation email Delivery may be delayed or quarantined without reversing the loan
Recovery Authoritative loan data can be restored within the agreed recovery objective
Accessibility The complete borrow workflow is usable with the supported assistive technologies

Balance means meeting every required threshold while avoiding unnecessary excellence in dimensions that do not change the outcome. It is neither “make everything perfect” nor “accept low quality to meet the date.”

Questions Turn Unknowns Into Plan Work

Planning questions discover omissions and uncertainty. Each material answer should lead to one of these outcomes:

  • sufficient evidence already exists;
  • a safe bound makes an exact answer unnecessary;
  • a production measurement and threshold control the changing value;
  • an investigation has an owner, method, deadline, and dependent decision;
  • a risk receives prevention, mitigation, recovery, or authorized acceptance;
  • a decision receives authority and a deadline;
  • an external dependency receives coordination and a fallback; or
  • further investigation is shown not to affect a material decision.

Use the knowledge-state framework in Delivery Assurance Gaps and Extension Plan to classify each important question as known, bounded, measured, planned, or not material.

The unacceptable state is an assumption that affects the plan but has no evidence, bound, measurement, investigation, or owner.

From Deliverables to a Work Breakdown

Estimate deliverables and outcomes, not vague activities.

Weak item:

Work on database changes

Stronger items:

Define the outstanding-loan constraint
Implement the Alembic migration
Test migration from every supported revision
Measure index creation against production-like volume
Define the rollout and rollback sequence
Add the migrated-PostgreSQL concurrency test
Verify the constraint after deployment

The stronger breakdown exposes different skills, dependencies, risks, and completion evidence.

Work breakdown rules

  1. Begin with the six dimensions rather than the repository structure.
  2. Write deliverables with observable completion conditions.
  3. Separate discovery, decision, implementation, verification, and rollout.
  4. Identify external dependencies and approval delays explicitly.
  5. Split work when different owners, risks, or evidence apply.
  6. Keep related work together when splitting would create coordination without improving visibility.
  7. Include documentation, migration, operational, and learning work.
  8. Record temporary mechanisms and their removal work.

The goal is not the largest possible task list. It is enough decomposition to reason honestly about sequence, uncertainty, and completion.

Estimation Is a Forecast, Not a Promise

An estimate is a forecast based on stated scope, assumptions, evidence, team capacity, and uncertainty. It should support a decision. It is not a guarantee that the future will contain no surprises.

A useful estimate answers:

  • What is being estimated?
  • Under which scope and quality bars?
  • Which work is included and excluded?
  • Which assumptions and dependencies affect it?
  • Is the estimate effort or elapsed calendar time?
  • What range is credible?
  • How confident is the team?
  • Which new evidence would require re-estimation?

An estimate such as “three weeks” without those conditions looks precise but communicates little.

Effort, Duration, and Deadline Are Different

These terms should not be used interchangeably.

  • Effort is the amount of focused work required, such as ten engineer-days.
  • Duration is the elapsed calendar time needed after parallel work, dependencies, reviews, interruptions, and availability are considered.
  • Deadline is a date imposed by a business, contractual, regulatory, market, or coordination need.
  • Target date is a desired date that can move when evidence changes.
  • Forecast date is the current predicted completion date based on the plan and observed progress.

Ten engineer-days do not necessarily fit into two calendar weeks. The engineer may support production, wait for a security decision, coordinate a migration, or depend on another team. Adding another engineer may create onboarding and coordination before it creates useful parallelism.

Building an Estimate

Step 1: define the estimation boundary

State the outcome, scope, quality bars, non-goals, supported environments, and meaning of complete.

An estimate for “implement borrow” is ambiguous. It might mean only the domain method, or it might include migration, API behavior, authorization, concurrency proof, monitoring, rollout, documentation, and post-release validation.

Step 2: expose unknowns and decisions

Classify material questions. Discovery work must appear in the estimate when the answer cannot be obtained beforehand.

Do not conceal unresolved architecture branches inside a single-point estimate. Estimate the discovery needed to decide first, or provide conditional estimates for the credible options.

Step 3: decompose the work

Use the six dimensions to find deliverables. Decompose until the team can reason about ownership, dependencies, evidence, and uncertainty.

Step 4: estimate from evidence

Prefer, in order:

  1. relevant historical data from the same team and type of work;
  2. a comparable completed change with explicit differences;
  3. measured throughput for similar work items;
  4. a small investigation or prototype that reduces the largest uncertainty;
  5. expert judgment with assumptions and a range.

Industry averages are weaker than team evidence because repositories, processes, domains, and quality bars differ.

Step 5: estimate uncertainty, not only expected work

For uncertain work, record three scenarios:

  • Optimistic: important assumptions hold and no unusual dependency delay occurs.
  • Most likely: ordinary rework, review, and integration occur.
  • Pessimistic: credible known risks occur, without inventing arbitrary disasters.

The purpose is not to disguise one guess inside a formula. Comparing the three scenarios reveals which assumptions create the range.

An illustrative item might be:

Scenario Duration Reason
Optimistic 2 days Existing migration pattern works unchanged
Most likely 4 days Production-like volume requires index and batch tuning
Pessimistic 8 days Lock duration requires an online migration sequence and rehearsal

The useful information is the reason for the spread. The team can now run a volume test before committing to the rollout plan.

Step 6: model dependencies and parallelism

Place work in its required order. Identify:

  • decisions that block implementation;
  • external teams or vendors;
  • environments and test data;
  • reviews and approval lead time;
  • work that can proceed safely in parallel; and
  • the longest dependent chain that controls the earliest completion date.

Parallel work reduces duration only when the tasks are genuinely independent and the coordination cost does not consume the gain.

Step 7: include delivery work

Include integration, review, rework, migration, release, observation, recovery preparation, and cleanup. These are not optional padding around the “real” code. They are part of delivering the outcome.

Step 8: produce a range and confidence

State a range appropriate to the evidence:

Current forecast: 4–6 weeks
Confidence: moderate
Conditions:
  - schema decision completed by 15 July
  - production-like data available for migration testing
  - no new external notification provider
Largest uncertainty:
  - online index creation time and lock behavior
Reforecast trigger:
  - migration rehearsal exceeds the maintenance budget

Ranges should become narrower as evidence replaces uncertainty. Artificially narrow ranges do not make a plan more mature.

Buffers and Risk

A buffer is useful when it protects an outcome from normal variability. It should not be an unexplained percentage added to compensate for an incomplete plan.

Prefer this order:

  1. remove unnecessary scope;
  2. answer high-impact questions early;
  3. reduce or isolate dependencies;
  4. sequence risky work before dependent work;
  5. create explicit responses for known risks;
  6. add a visible buffer for remaining variability.

Do not distribute hidden padding across every task. Hidden padding makes it difficult to understand risk, learn from actual results, or make honest scope decisions.

Deadlines and Fixed Constraints

A deadline should have a reason. Classify it before treating it as fixed:

  • regulatory or contractual obligation;
  • coordinated external event;
  • market or business opportunity;
  • dependency commitment;
  • internal target; or
  • arbitrary date presented as a constraint.

A real fixed deadline does not make the work smaller. It changes the planning problem.

The team can respond by:

  • reducing scope while protecting the essential outcome;
  • sequencing discovery and high-risk work earlier;
  • adding people only where work is parallelizable;
  • buying or reusing a suitable capability;
  • changing the rollout strategy;
  • negotiating the external requirement; or
  • explicitly accepting or rejecting residual risk through the proper authority.

The team should not silently lower a critical quality bar to preserve the date. If book exclusivity, authorization, or data recovery is required for an acceptable product, omitting it means the planned outcome is no longer the same outcome.

When time, scope, and quality conflict, make the choice explicit:

Fixed deadline
  -> preserve mandatory quality bars
  -> identify the smallest valuable scope
  -> expose residual risk
  -> obtain the required decision

Forecasting With Historical Data

The best estimation system learns from completed work.

Record:

  • original scope and quality bars;
  • forecast range and confidence;
  • assumptions and dependencies;
  • start and completion dates;
  • blocked time and interruptions;
  • work discovered after planning;
  • scope changes;
  • actual effort when measurable; and
  • why the result differed from the forecast.

Do not use historical data to punish teams for uncertainty. That encourages hidden work and inflated estimates. Use it to improve decomposition, identify recurring delays, and build realistic forecasts.

For a stable flow of similarly sized work, throughput history can forecast how many items are likely to finish within a period. For large or unusual changes, decomposition and explicit uncertainty remain necessary.

Replanning Is Part of Planning

A plan is based on current evidence. When material evidence changes, the team should update the plan rather than defend an obsolete forecast.

Define replanning triggers in advance:

  • a material requirement changes;
  • a critical assumption is rejected;
  • a decision selects a different implementation path;
  • a dependency misses its required date;
  • migration, load, or security evidence crosses a limit;
  • meaningful scope is added or removed;
  • the observed completion rate leaves the forecast range; or
  • production feedback shows that the outcome is not improving.

Replanning should state:

  • what changed;
  • why the previous assumption or estimate no longer holds;
  • the impact on scope, quality, risk, cost, and date;
  • the available options; and
  • who can choose among them.

Changing a forecast because evidence changed is responsible planning. Hiding the change until the original date becomes impossible is not.

Worked Example: Planning the Borrow Outcome

Outcome:

An eligible patron can borrow one available book and immediately receive the committed loan identity and due date.

Understand

  • Define eligible patron, available book, outstanding loan, and successful response.
  • Confirm tier capacity and duration policies.
  • Measure expected and peak checkout volume.
  • Identify authentication as a production requirement or an explicit learning non-goal.
  • Map Catalog metadata, Patron facts, Lending authority, PostgreSQL, and notification dependencies.

Decide

  • Lending is authoritative for circulation.
  • Borrow commits synchronously in one Lending transaction.
  • PostgreSQL enforces one outstanding loan per book.
  • Patron admission is serialized for capacity decisions.
  • Notifications are optional effects after the business commit.
  • The release cannot claim production readiness while authorization remains out of scope.

Build

  • borrow operation and route;
  • authoritative lookup adapters;
  • loan and command-receipt persistence;
  • partial unique index and migration;
  • error translation and response contract;
  • notification event and isolated consumer;
  • metrics, alerts, and documentation.

Verify

  • domain policy and transition tests;
  • idempotency replay tests;
  • migrated-PostgreSQL concurrency and capacity tests;
  • API contract tests;
  • authorization and abuse tests when production scope includes them;
  • migration and rollback/roll-forward rehearsal;
  • notification failure-isolation test.

Operate

  • additive schema before dependent code;
  • application rollout and post-deployment borrow smoke test;
  • constraint-violation, latency, error, notification-lag, outbox-growth, and storage signals;
  • reconciliation and recovery guidance;
  • operational ownership and escalation.

Learn

  • measure successful and rejected borrows;
  • examine user confusion and retry behavior;
  • compare latency, storage, and support load with assumptions;
  • review estimate differences and late-discovered work;
  • remove rollout mechanisms that no longer serve a requirement.

The estimate is created only after these deliverables, decisions, dependencies, and unknowns are visible.

Planning Review Template

### Outcome and quality

Outcome:
Evidence that the problem exists:
Success measure:
Mandatory component quality bars:
Non-goals:

### Understand

Current behavior:
Requirements and constraints:
System and data involved:
Known facts:
Bounded facts:
Measured facts and thresholds:
Planned investigations:
Questions judged not material and why:

### Decide

Decisions made:
Open decisions:
Evidence needed:
Decision owners and deadlines:
Trade-offs and accepted risks:

### Build

Product and code deliverables:
Data and migration deliverables:
Infrastructure and configuration:
Documentation and user support:
Operational and recovery tooling:
Temporary mechanisms and removal criteria:

### Verify

Requirement and invariant evidence:
Security and privacy evidence:
Compatibility and migration evidence:
Performance and capacity evidence:
Manual acceptance:

### Operate

Release stages:
Advance, stop, rollback, and roll-forward conditions:
Signals, alerts, and runbooks:
Ownership and escalation:
Recovery and reconciliation:

### Learn

Production outcome measures:
Post-release review date:
Estimate-versus-actual review:
Assumptions to validate:
Simplification and cleanup review:

### Forecast

Included scope:
Excluded scope:
Effort estimate:
Duration range:
Confidence:
Assumptions and dependencies:
Largest uncertainties:
Deadline or target and its source:
Replanning triggers:

Estimation Review Checklist

  • Does the estimate describe an outcome and completion condition?
  • Are mandatory quality bars included rather than deferred invisibly?
  • Does the work breakdown cover all six planning dimensions?
  • Are effort, duration, deadline, and forecast distinguished?
  • Are discovery and decision work visible?
  • Are external dependencies and approval time included?
  • Is the estimate based on team evidence or a clearly stated judgment?
  • Does the range reflect identifiable uncertainty?
  • Are rollout, migration, operation, and learning included?
  • Are fixed dates supported by a real constraint?
  • Can scope change without violating the essential outcome?
  • Are replanning triggers explicit?
  • Will actual results be recorded and used to improve the next estimate?

Common Planning Failures

Starting with a date

The team chooses a date before defining the outcome, quality bars, work, or uncertainty. The remaining planning process becomes an attempt to justify the date.

Estimating only coding

Migration, review, integration, release, recovery, documentation, and learning appear later as “unexpected” work even though they were necessary from the beginning.

Treating estimates as commitments

Engineers hide uncertainty to avoid appearing unreliable. The organization loses early warning and receives a surprise near the deadline.

Confusing more people with less duration

The work is sequential or tightly coupled, so additional people increase coordination without shortening the controlling dependency chain.

Using a buffer instead of understanding risk

A percentage is added to every task, but the largest architecture decision or external dependency remains unresolved.

Lowering invisible quality

The team meets the date by omitting testing, migration safety, accessibility, security, or recovery without explicitly changing the promised outcome.

Never closing the loop

The team does not compare estimates with actual execution, so recurring gaps remain anecdotes instead of improving future plans.

Final Principle

Good planning does not predict the future perfectly. It makes the current understanding, uncertainty, decisions, obligations, and evidence clear enough for people to act responsibly.

The central question remains:

What must be understood, decided, built, verified, operated, and learned for this outcome to succeed?

Answering that question produces the real work. Estimation forecasts that work. Project management coordinates it. Execution creates evidence. Learning makes the next plan better.

The method for controlling the resulting work through deadlines, capacity, dependencies, transitions, variance, and client communication is defined in Engineering Execution Management.

Related Guides