Capstone: Write a Short Refactor Proposal

LESSON

Technical English: Gerunds and Infinitives in Engineering Work

016 30 min beginner CAPSTONE

Capstone: Write a Short Refactor Proposal

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

  • Write a short refactor proposal that states a goal, purpose, method, ownership, risk, and trade-off.

  • Use the track's action patterns naturally: doing, to do, by doing, without doing, and threshold language.

  • Separate a recommendation from evidence, a plan from a result, and interest from responsibility.

Idea in one sentence: A strong refactor proposal makes one recommendation inspectable by showing what will change, why it matters, how it will happen, what it costs, and when the team should continue.

Core Insight

This is the capstone for the track. The goal is not to demonstrate every grammar label. The goal is to write the kind of short proposal an engineer could put in a pull request, design note, or team discussion.

A useful proposal answers six questions:

  1. What problem are we seeing?
  2. What change do we recommend?
  3. What is the purpose of the change?
  4. How will we implement it, and what will we avoid changing?
  5. Who owns the work and what makes it risky?
  6. What evidence tells us whether to continue, stop, or roll back?

The grammar patterns make those relationships visible:

We recommend extracting validation from the API handler to reduce coupling.
We plan to do this by moving one rule at a time without changing the public API.
Maya is responsible for reviewing the new interface.
The refactor is too risky to deploy globally before a canary.
It is worth testing because the current module is difficult to isolate.

The proposal is not only about grammar. It is an engineering argument in a small form. The reader should be able to disagree with the recommendation, but should not have to guess what the recommendation means.

The Scenario

The request service has one module that performs three jobs:

The module has grown over time. Tests that should check validation now need HTTP fixtures. A small validation change can affect response formatting. Engineers also find it difficult to reuse the parser in a background worker because the module expects an HTTP request and response.

The team is considering a refactor. It does not want to redesign the public API during the same change. It wants a smaller boundary first:

request handler -> parser and validator -> response formatter

The proposal must be honest about the scope. The team is not promising a new architecture for every service. It is recommending one extraction that makes validation easier to test and reuse.

Constraints

Before writing the proposal, collect the constraints. They give the grammar something concrete to express:

These constraints create a real trade-off. A small extraction reduces coupling and improves testability, but the team must temporarily maintain a boundary between old response formatting and new validation code. A larger rewrite might look cleaner, but it would increase the number of simultaneous changes and make rollback harder.

The Promise We Need to Keep

A proposal should state its promise before listing its steps. Here the promise is:

We recommend extracting validation from the request handler to make the validation rules easier to test and reuse, without changing the public API.

The sentence contains the recommendation, purpose, and boundary:

The proposal does not promise that the refactor will remove every dependency. It promises a smaller improvement that can be checked.

Compare a weaker promise:

We recommend improving the parser to make everything cleaner.

“Improving” and “everything” hide the object and the success condition. A reviewer cannot tell what should change or what should remain stable. Prefer the concrete boundary:

We recommend extracting validation from the handler to make the rules easier to test, without changing the request or response contract.

The Naive Proposal

Here is a literal and overconfident draft:

We recommend to extract the parser because it is difficult testing. We plan extracting all validation by move it to a new service without to change the API. Luis is interested to review the interface. The refactor is enough safe to deploy everywhere because the tests pass.

There are grammar problems, but there are also engineering problems:

The last claim is especially dangerous. A proposal should not convert a local test result into a broad safety guarantee. The capstone must connect readiness to scope and evidence.

The Proposed Model

Build the proposal in layers.

Recommendation and purpose

Use recommend + -ing for a recommendation about an activity:

We recommend extracting validation from the request handler to reduce coupling.

The recommendation is not yet a completed plan. It says what the writer believes the team should choose. The purpose says why.

If the team accepts the recommendation, move to a plan:

We plan to extract one validation rule at a time.

The distinction matters in a review. A recommendation invites a decision; a plan describes the next action after the decision.

Method and boundary

Explain how the extraction will happen:

We will reduce coupling by moving one validation rule at a time into a small module.

Protect the interface:

We will do this without changing the public request or response shape.

The method is by moving. The preserved boundary is without changing. Neither phrase is a purpose. If the reader asks “Why?”, use a separate purpose phrase:

We will move one rule at a time to make failures easier to isolate.

Ownership and interest

A proposal needs an owner for a decision or review:

Maya is responsible for reviewing the extracted interface.

Another engineer may be interested in a later improvement:

Luis is interested in reusing the validator in the background worker.

Do not use the second sentence as a delivery commitment. If Luis owns the next experiment, state it:

Luis plans to test the validator in the background worker after the first extraction.

The proposal can contain both facts without confusing them:

Maya is responsible for reviewing the interface. Luis is interested in reusing the validator, but that work is outside this first change.

Risk and readiness

Connect risk to a specific action:

The refactor is too risky to deploy globally before a canary.

Then define the smaller allowed action:

It is safe enough to test in staging after the contract tests pass.

After the canary produces evidence, the team may write:

The canary is stable enough to expand if error rate stays below the threshold and rollback completes within two minutes.

“Safe enough” is not a universal property. It is a threshold for a scope. The proposal should say what makes the threshold credible.

A Worked Proposal

Let us assemble the proposal from the scenario and constraints.

Proposal part Sentence Pattern job
Problem The handler mixes validation with HTTP response formatting, so validation tests require HTTP fixtures. Makes the current cost visible.
Recommendation We recommend extracting validation into a small module. Recommends an activity.
Purpose This will make the rules easier to test and reuse. Explains the benefit.
Plan We plan to move one validation rule at a time. States the next sequence.
Method We will do this by moving the rule behind a small interface. Explains how.
Boundary We will do it without changing the public request or response shape. Preserves the contract.
Ownership Maya is responsible for reviewing the interface, and Luis is interested in later worker reuse. Separates duty and interest.
Risk The refactor is too risky to deploy globally before a canary. Blocks an overly broad action.
Readiness It is safe enough to test in staging after unit and contract tests pass. Defines a limited threshold.
Evidence We will expand only if error rate and rollback time stay within the agreed limits. Names the continuation signal.

The short proposal is:

The handler mixes validation with HTTP response formatting, so validation tests require HTTP fixtures. We recommend extracting validation into a small module to make the rules easier to test and reuse. We plan to move one validation rule at a time by placing it behind a small interface, without changing the public request or response shape. Maya is responsible for reviewing the interface, while Luis is interested in later worker reuse. The refactor is too risky to deploy globally before a canary, but it is safe enough to test in staging after unit and contract tests pass. We will expand only if error rate and rollback time stay within the agreed limits.

This is a proposal, not a guarantee. It gives the reader enough information to approve, reject, or revise the change.

Walkthrough: Reading the Proposal as a Reviewer

Read the proposal in four passes.

Pass 1: find the recommendation

Ask what the team should choose:

We recommend extracting validation into a small module.

If the recommendation is missing, the rest may read like disconnected observations.

Pass 2: find the cost and purpose

Ask why the change is worth doing:

The handler mixes validation with response formatting, so validation tests require HTTP fixtures.

The purpose is not “make everything better.” It is easier testing and reuse. A purpose should connect to the problem.

Pass 3: find the boundary and owner

Ask what the team will not change and who checks the new boundary:

We will do it without changing the public request or response shape.
Maya is responsible for reviewing the interface.

This is where many short proposals fail. They describe an action but do not identify who owns the risk or what remains compatible.

Pass 4: find the evidence threshold

Ask what happens after implementation:

We will expand only if error rate and rollback time stay within the agreed limits.

This keeps “safe enough” tied to evidence. It also gives the team a stop condition.

Failure Review

A proposal can be grammatically correct and still be weak. Review these failures:

Failure: recommendation becomes an unsupported promise

Extracting the parser will solve the testing problem.

This is too strong. The extraction may help, but the proposal should name the intended benefit and the evidence:

We recommend extracting validation to make the rules easier to test. We will confirm the benefit by running module tests without HTTP fixtures.

Failure: method is hidden inside a vague verb

We will improve the parser by changing the code.

The method is technically grammatical but not inspectable. Name the mechanism:

We will reduce coupling by moving validation behind a small interface.

Failure: ownership becomes interest

Maya is interested in checking the interface.

This may be true, but it does not assign the work. If the proposal needs an owner, write:

Maya is responsible for checking the interface.

Failure: scope disappears from the risk sentence

The refactor is too risky to deploy.

Deploy where? A staging deployment may be acceptable while a global deployment is not:

The refactor is too risky to deploy globally, but it is safe enough to test in staging.

Failure: purpose is reported as a result

We extracted validation to improve testability, so testing is now easier.

The second clause is a result claim. Add evidence before making it:

We extracted validation to improve testability. The new module now runs without HTTP fixtures in the staging test suite.

Trade-offs

Every refactor proposal should name what improves and what becomes more expensive. For this proposal:

Choice Benefit Cost or risk
Extract validation first Tests become more focused and reuse becomes possible. A temporary interface must be maintained.
Move one rule at a time Smaller changes are easier to review and roll back. The migration takes longer and old/new paths coexist.
Preserve the public API Clients do not need a coordinated change. The internal boundary may be less clean at first.
Use a canary Exposure stays limited while evidence grows. The team must operate and observe two paths during rollout.

The proposal should not say that the refactor “solves coupling” as if no cost remains. A precise statement is:

The refactor should reduce coupling in the validation path, at the cost of maintaining a small adapter until response formatting is separated later.

That is a useful trade-off because it lets the reviewer decide whether the intermediate state is acceptable.

Evidence and Readiness

Use observable signals to decide whether the proposal is working:

A readiness statement can combine a threshold and a condition:

The canary is safe enough to expand if contract tests pass, error rate stays below the current threshold, and rollback completes within two minutes.

The sentence does not guarantee success. It describes the evidence needed for the next decision. If one signal fails, write the next action instead of hiding the failure:

The canary is not safe enough to expand because rollback took five minutes. We will keep the release at five percent while improving the restore path.

Final Challenge

Write your own short refactor proposal. Choose one scenario:

Write six or seven sentences. Include:

  1. the current problem;
  2. a recommendation with recommend + -ing or an equivalent clear recommendation;
  3. a purpose with to + verb;
  4. a method with by + -ing;
  5. a preserved boundary with without + -ing;
  6. an owner with responsible for + -ing;
  7. a risk, trade-off, and evidence threshold.

Use this rubric:

Question Yes or revise
Is the recommendation concrete enough to approve or reject?
Does the purpose answer why the change is worth considering?
Does the method answer how the change will work?
Does the boundary identify what will not change or what disruption is avoided?
Does the owner represent responsibility rather than interest or skill?
Does the risk sentence name a specific action and scope?
Does the trade-off name a new cost or temporary limitation?
Does the evidence threshold say what allows continuation or rollback?

Model answer for a queue refactor:

The queue consumer retries acknowledged messages and sometimes creates duplicate jobs. We recommend moving the retry decision into a small worker policy to make the state transition easier to test. We plan to do this by checking acknowledgement state before scheduling a retry, without changing the consumer API. Luis is responsible for reviewing the policy, while Priya is interested in reusing it for the batch worker later. The refactor is too risky to deploy globally before a canary, but it is safe enough to test with five percent of traffic after the duplicate-job test passes. The trade-off is a temporary adapter between the old consumer and the new policy. We will expand only if duplicate jobs remain at zero and rollback completes within two minutes.

Before you finish, read the proposal once as an engineer and once as a non-native English reader. Remove any sentence that repeats a pattern without adding a decision. Keep the technical noun, the action, the boundary, and the evidence visible.

The reader should finish with a clear next decision, not only a polished paragraph. If the evidence is missing, the proposal should say what the team will measure before expanding the change.

Daily Practice Lines

Repeat these during the day. The third line revisits the method pattern from lesson 014.

Change one technical object when the lines feel easy: parser, worker, queue, cache, migration, or alert. Keep the proposal roles stable while the scenario changes.

Resources

Key Takeaways

PREVIOUS Practice: Explain an Implementation Plan