Run a first task with Factory Droid

Open Droid in a local project, request a small change, and check the proposed code.

Format
Written guide
Updated

What you will create

Delegate a small code correction to Factory Droid, then decide whether to keep it. Define the expected behavior, review changed files and check tests. An assistant’s “done” message is not proof that a change works.

Before you start

Prepare an authorized practice project with Git and already runnable tests. Keep a reference copy and inspect existing changes before intervention. Avoid a production repository, secrets and customer data. Project content may be sent to the service depending on the features used: a local terminal does not mean all processing remains local.

The CLI must be installed from the official distribution and your Factory access operational. Check usage and billing before the session. Keep manual approvals: autonomy off retains them, while higher levels preauthorize some actions. Do not bypass organizational rules.

Step-by-step

  1. Open a terminal at the practice project’s root and run droid. Sign in if required.
  2. First request a read-only examination: relevant files, conventions and the test command.
  3. Specify one correction and its acceptance criteria. Have the plan and scope explained before any edits.
  4. Inspect requested actions and proposed differences. Reject changes unrelated to the goal.
  5. After the authorized correction, inspect affected files and run appropriate tests. Keep commits, publishing and deployment outside this first task.

Example to adapt

In a fictional project, a “project name” field incorrectly accepts a string made entirely of spaces. The expected correction rejects empty or whitespace-only input without changing the handling of valid names.

Suggested request: “Locate project-name validation. Before editing, explain which files are involved. Fix only acceptance of empty or whitespace-only values and add tests. Preserve valid names, add no dependencies, leave the public interface unchanged, and do not commit or push. Report the test command and its actual result.”

Your checking grid has three cases: reject an empty string, reject three spaces and accept “Atlas”. If existing code trims surrounding spaces from a name, preserve that convention; otherwise, do not silently add that behavior. For another application, select an equally narrow defect rather than a complete redesign.

Check your result

  • Does the test reproduce the original defect and detect its return?
  • Are all three requested cases covered without artificially changing existing expectations?
  • Does the diff contain only necessary validation and tests?
  • Were tests actually executed with results, rather than merely suggested?
  • Is an environment error distinguished from a code failure?

Common problems

Overly broad change: narrow the scope and request a revised proposal. An added dependency: ask why it is necessary before installation. Tests cannot run: record the blocker instead of presenting the fix as verified. Previously modified files: distinguish your changes from Droid’s before restoring anything; do not delete work simply to obtain a clean state.

Next steps

Read the Factory overview. Keep the request, diff and test report as a review record. Increase task size only once this checking loop works.