feat(directives): harvest 6 directives from conductor/edit_workflow.md (Rules 1, 2, 6, 7, 8 contract-change, 8 EOL)

This commit is contained in:
ed
2026-07-02 23:56:18 -04:00
parent 8407742a14
commit 782530ba6d
12 changed files with 107 additions and 0 deletions
@@ -0,0 +1,7 @@
# preserve_line_endings
## v1
**Why this iteration:** Lifted verbatim from `conductor/edit_workflow.md:101-108 (Rule 8 whitespace/EOL)`.
**Source:** `conductor/edit_workflow.md:101-108 (Rule 8 whitespace/EOL)`
**Lifted:** 2026-07-02 (Phase A expansion harvest; user directive 2026-07-02)
@@ -0,0 +1,11 @@
### The whitespace-and-EOL rule (mandatory for set_file_slice)
The `new_content` must preserve:
- The file's line ending convention (CRLF on Windows, LF on Linux — pick from the surrounding file, not from your text editor's default)
- The indentation of the surrounding code (1 space per level, per `conductor/code_styleguides/python.md` §1)
- The number of lines replaced (`start_line`..`end_line` must equal `len(new_content.splitlines())`)
If you mismatch any of these, the file will fail to parse. Run `py_check_syntax` and a real `import` after every `set_file_slice`.
**Do NOT normalize line endings via git smudge.** This repo has a mix of CRLF and LF; repo-wide LF standardization is a future track. For now, preserve existing line endings on edit.