Private
Public Access
0
0
Files
manual_slop/conductor
conductor-tier2 d7dc1e3b90 docs(edit-workflow): fix set_file_slice rule + add contract-change check
Three surgical fixes to conductor/edit_workflow.md:

1. **§2 "Verify Before Editing"** — removed the leftover
   `git checkout -- src/gui_2.py` instruction. The user's
   commit `4eba059e unfuck edit workflow` removed most of
   the git checkout nuke instructions but missed §2. The
   revised §2 now says: read the contract (function signature,
   yield shape, return type) before editing, and DO NOT use
   `git checkout` to revert. Ask the user.

2. **§3 "Reading Before Editing"** — added the line-number
   offset check. `set_file_slice` uses 1-indexed inclusive
   `start_line`/`end_line`; off-by-one is a common silent
   failure. The rule is now: confirm the exact line range
   with `get_file_slice` first.

3. **§8 "set_file_slice IS Valid for Multi-Line Content
   (Revised 2026-06-09)"** — replaced the wrong rule
   ("Do not use set_file_slice for multi-line content") with
   the correct rule: set_file_slice IS valid for 3-10 line
   surgical edits, with a tool-selection guide (which tool
   for which job), a mandatory contract-change check
   (search for callers of the symbol being changed; update
   all callers in the same atomic commit if the public
   interface changes), and a mandatory whitespace-and-EOL
   rule (preserve line ending, indentation, and line count).

4. **§9 "No Diagnostic Noise in Production Code
   (Added 2026-06-09)"** — new section. Diag stderr goes
   to log files or /tmp scripts, NOT src/*.py. If you must
   add diag lines to production code, they are part of the
   same atomic commit as the fix — they do not live
   uncommitted in the working tree.

5. **"If set_file_slice produces wrong indentation"** —
   new handler in the Step-by-Step Workflow. Tells the
   agent: you wrote the wrong indent; the tool did what
   you asked; re-read the file with get_file_slice; do
   NOT use git checkout to revert.

These are the rule corrections the user demanded after
the Tier-2's bad set_file_slice + git nuke + diag-noise
behavior. Markdown only. No code modified.
2026-06-09 14:02:41 -04:00
..
2026-06-09 13:48:17 -04:00