nexu-io/open-design

patch-edit

Apply one rewrite-plan step at a time as small reviewable file edits, never rewriting whole files when a localised change suffices.

65Collecting
See how to use itView GitHub source
npx skills add https://github.com/nexu-io/open-design --skill "plugins/_official/atoms/patch-edit"
Automated source guideGeneral workflowStandard source

Source checked Jul 28, 2026·Refresh due Oct 26, 2026

Reorganized from the pinned upstream SKILL.md

Source-grounded usage guide: patch-edit

Spec §20.3 / §21.3.2: code-migration / tune-collab cannot ship a trustworthy diff when the agent rewrites whole files in one pass — the reviewer can't audit the change. This atom enforces "one step per turn, smallest possible localised edit".

npx skills add https://github.com/nexu-io/open-design --skill "plugins/_official/atoms/patch-edit"
Check the pinned source

The pinned source supports a structured brief, but not an expanded tutorial. Only detected inputs, outputs, and sections are shown.

221 source words · 5 usable sections

Source-required inputs

  • plan/steps.json from rewrite-plan.
  • The current value of iterations (the daemon's per-stage counter).
  • code/index.json for the file's known imports + neighbours.

Source-declared outputs

  • The atom mutates files inside the project cwd via the file-edit tool. After every iteration, it writes a per-step receipt:

Source workflow

Read patch-edit through these 4 source sections

Sections are extracted automatically from the pinned SKILL.md and link back to the source.

01

Inputs

plan/steps.json from rewrite-plan.

SKILL.md · Inputs
plan/steps.json from rewrite-plan.The current value of iterations (the daemon's per-stage counter).code/index.json for the file's known imports + neighbours.
02

Output

The atom mutates files inside the project cwd via the file-edit tool. After every iteration, it writes a per-step receipt:

SKILL.md · Output
The atom mutates files inside the project cwd via the file-edit tool. After every iteration, it writes a per-step receipt:
03

Convergence

The atom completes when every step in plan/steps.json is in a terminal state (completed / skipped) OR iterations = ODMAXDEVLOOPITERATIONS. Use:

SKILL.md · Convergence
The atom completes when every step in plan/steps.json is in a terminal state (completed / skipped) OR iterations = ODMAXDEVLOOPITERATIONS. Use:
04

Anti-patterns the prompt fragment forbids

Rewriting an entire file when the rewrite-plan step is localised.

SKILL.md · Anti-patterns the prompt fragment forbids
Rewriting an entire file when the rewrite-plan step is localised.Touching a file outside the step's files[].Touching a shell-tier file when the step's risk is not

Source checklist

Verify each item before delivery

The source section “Inputs” has been checked.

The source section “Output” has been checked.

The source section “Convergence” has been checked.

The source section “Anti-patterns the prompt fragment forbids” has been checked.

Source output checked: The atom mutates files inside the project cwd via the file-edit tool. After every iteration, it writes a per-step receipt:

FAQ

What does the patch-edit source document cover?

Spec §20.3 / §21.3.2: code-migration / tune-collab cannot ship a trustworthy diff when the agent rewrites whole files in one pass — the reviewer can't audit the change. This atom enforces "one step per turn, smallest possible localised edit".

How do I install patch-edit?

The source record exposes this install command: npx skills add https://github.com/nexu-io/open-design --skill "plugins/_official/atoms/patch-edit". Inspect the command and pinned source before running it.

Repository stars
82,073
Repository forks
9,485
Quality
65/100
Source repository last pushed

Quality breakdown

Based on traceable docs and repository signals; stars are not treated as quality.

65/100
Documentation23/30
Specificity10/25
Maintenance20/20
Trust signals12/25
View original Skill.mdThis page is parsed directly from the repository SKILL.md without editorial rewriting. Collected: Jul 28, 2026 · about 1 min

Patch edit

Spec §20.3 / §21.3.2: code-migration / tune-collab cannot ship a trustworthy diff when the agent rewrites whole files in one pass — the reviewer can't audit the change. This atom enforces "one step per turn, smallest possible localised edit".

Inputs

  • plan/steps.json from rewrite-plan.
  • The current value of iterations (the daemon's per-stage counter).
  • code/index.json for the file's known imports + neighbours.

Output

The atom mutates files inside the project cwd via the file-edit tool. After every iteration, it writes a per-step receipt:

project-cwd/
└── plan/
    ├── steps.json (status updated: 'pending' → 'completed' | 'skipped')
    └── receipts/
        └── step-<id>.json    # { files: ['...'], diffSummary, rationale, completedAt }

Convergence

The atom completes when every step in plan/steps.json is in a terminal state (completed / skipped) OR iterations >= OD_MAX_DEVLOOP_ITERATIONS. Use:

{
  "id": "patch-edit-loop",
  "atoms": ["patch-edit"],
  "repeat": true,
  "until": "plan.steps.terminal === plan.steps.total || iterations >= 8"
}

Anti-patterns the prompt fragment forbids

  • Rewriting an entire file when the rewrite-plan step is localised.
  • Touching a file outside the step's files[].
  • Touching a shell-tier file when the step's risk is not 'high' or the user hasn't confirmed.
  • Skipping a step without a receipt + a rationale string.

Status

Implemented by the daemon runner in apps/daemon/src/plugins/atoms/patch-edit.ts. It validates step ownership and risk, applies unified diffs with atomic writes, and records receipts and progress.

Skill path
plugins/_official/atoms/patch-edit/SKILL.md
Commit SHA
89d6d4ef21ba
Repository license
Apache-2.0
Data collected