From b2d992392eacd96e303365494028281e045d1654 Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Sun, 11 Oct 2026 08:27:13 -0700 Subject: [PATCH 1/3] Bind the Workspace-Edit Rule Only to an Agent Running Inside VS Code A workspace reload drops only a session that VS Code hosts, so an agent running in a standalone console now edits a .code-workspace directly, even while a window has that file loaded. Co-Authored-By: Claude Opus 5.5 --- .agents/skills/agent-conduct/SKILL.md | 2 +- .claude-plugin/fleet-skills/.source-digests/agent-conduct | 2 +- .claude-plugin/fleet-skills/skills/agent-conduct/SKILL.md | 2 +- .github/skills/agent-conduct/SKILL.md | 2 +- GOVERNANCE.md | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.agents/skills/agent-conduct/SKILL.md b/.agents/skills/agent-conduct/SKILL.md index c9b9c3960..660bba698 100644 --- a/.agents/skills/agent-conduct/SKILL.md +++ b/.agents/skills/agent-conduct/SKILL.md @@ -50,7 +50,7 @@ The checks that separate work actually done from work that merely reports succes - **Editing CRLF files programmatically: `.` matches `\r` in a regex**, so a captured line keeps its carriage return and rejoining with `\r\n` yields `CRCRLF`. Prefer literal replacement over regex reassembly. In Python the *default* path is a text-mode rewrite, which has the mirror failure: `Path.read_text()` decodes through universal newlines and `write_text()` translates each `\n` back to `os.linesep`, so a read-edit-write round trip rewrites every line ending in the file to the host's own while the edit itself looks correct. Work in bytes, or open the file explicitly with `newline=''` on both the read and the write, since a read that preserves the endings still hands them to a write that translates them. Use `open()` rather than `Path.read_text()`, which accepts that argument only on Python 3.13 and newer and raises `TypeError` below it. The corruption is worth naming because it is invisible in a rendered diff. - **Scope a check by what the project declares, not by the file that prompted it.** A check written while editing one file tends to cover that file's language and stop, and then reports success on every other surface the rule governs. Read the declared types, or the config that enumerates them, and cover each one, then assert a floor per surface so a table that narrows fails loudly instead of passing quietly. A rule about comments means every comment syntax the project ships, and a format that carries comments in practice counts even where its specification says otherwise. - **Never write source text carrying backslash escapes through a shell construct that interprets them.** A `printf` format string, a `printf` argument consumed by `%b`, `echo -e`, POSIX `sh`'s builtin `echo`, and `$'...'` each consume the escape and write an invisible control character in its place, so a `\b` inside a regex becomes a backspace and the pattern silently matches nothing while every test still passes. A quoted heredoc, `<<"EOF"`, is not one of those constructs and writes every backslash literally. An unquoted `<` exclusion marker). -- **Agents: editing a `.code-workspace` that a VS Code window has loaded as its workspace can reload that window and drop an agent session running in it.** "Verification Discipline" holds the rule: leave that edit to the maintainer (a maintainer edit does not reload), and edit directly a workspace file that no window has loaded. Opening the folder rather than the workspace is what keeps a checkout's own file editable. +- **Agents: editing a `.code-workspace` that a VS Code window has loaded as its workspace can reload that window and drop an agent session running in it.** "Verification Discipline" holds the rule: an agent running inside VS Code leaves that edit to the maintainer (a maintainer edit does not reload), and an agent running in a standalone console edits the file directly. ## Repository Details From c76bf74bd94eb067a8f6f7d171b80928dc4e309a Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Sun, 11 Oct 2026 08:29:40 -0700 Subject: [PATCH 2/3] Keep the Not-Loaded Exemption and Its Fallback in the Workspace-Edit Rule Co-Authored-By: Claude Opus 5.5 --- .agents/skills/agent-conduct/SKILL.md | 2 +- .claude-plugin/fleet-skills/.source-digests/agent-conduct | 2 +- .claude-plugin/fleet-skills/skills/agent-conduct/SKILL.md | 2 +- .github/skills/agent-conduct/SKILL.md | 2 +- GOVERNANCE.md | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.agents/skills/agent-conduct/SKILL.md b/.agents/skills/agent-conduct/SKILL.md index 660bba698..7df11e318 100644 --- a/.agents/skills/agent-conduct/SKILL.md +++ b/.agents/skills/agent-conduct/SKILL.md @@ -50,7 +50,7 @@ The checks that separate work actually done from work that merely reports succes - **Editing CRLF files programmatically: `.` matches `\r` in a regex**, so a captured line keeps its carriage return and rejoining with `\r\n` yields `CRCRLF`. Prefer literal replacement over regex reassembly. In Python the *default* path is a text-mode rewrite, which has the mirror failure: `Path.read_text()` decodes through universal newlines and `write_text()` translates each `\n` back to `os.linesep`, so a read-edit-write round trip rewrites every line ending in the file to the host's own while the edit itself looks correct. Work in bytes, or open the file explicitly with `newline=''` on both the read and the write, since a read that preserves the endings still hands them to a write that translates them. Use `open()` rather than `Path.read_text()`, which accepts that argument only on Python 3.13 and newer and raises `TypeError` below it. The corruption is worth naming because it is invisible in a rendered diff. - **Scope a check by what the project declares, not by the file that prompted it.** A check written while editing one file tends to cover that file's language and stop, and then reports success on every other surface the rule governs. Read the declared types, or the config that enumerates them, and cover each one, then assert a floor per surface so a table that narrows fails loudly instead of passing quietly. A rule about comments means every comment syntax the project ships, and a format that carries comments in practice counts even where its specification says otherwise. - **Never write source text carrying backslash escapes through a shell construct that interprets them.** A `printf` format string, a `printf` argument consumed by `%b`, `echo -e`, POSIX `sh`'s builtin `echo`, and `$'...'` each consume the escape and write an invisible control character in its place, so a `\b` inside a regex becomes a backspace and the pattern silently matches nothing while every test still passes. A quoted heredoc, `<<"EOF"`, is not one of those constructs and writes every backslash literally. An unquoted `<` exclusion marker). -- **Agents: editing a `.code-workspace` that a VS Code window has loaded as its workspace can reload that window and drop an agent session running in it.** "Verification Discipline" holds the rule: an agent running inside VS Code leaves that edit to the maintainer (a maintainer edit does not reload), and an agent running in a standalone console edits the file directly. +- **Agents: editing a `.code-workspace` that a VS Code window has loaded as its workspace can reload that window and drop an agent session running in it.** "Verification Discipline" holds the rule. An agent running inside VS Code leaves that edit to the maintainer (a maintainer edit does not reload). An agent in a standalone console edits the file directly, and so does any agent editing a workspace file that no window has loaded. Opening the folder rather than the workspace is what keeps a checkout's own file editable. ## Repository Details From c9e1d29c99c355accbd561739f5f230d82622c4b Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Sun, 11 Oct 2026 08:30:26 -0700 Subject: [PATCH 3/3] Ask About the Workspace-Edit Rule Only When Its Scope Is Unclear Co-Authored-By: Claude Opus 5.5 --- .agents/skills/agent-conduct/SKILL.md | 2 +- .claude-plugin/fleet-skills/.source-digests/agent-conduct | 2 +- .claude-plugin/fleet-skills/skills/agent-conduct/SKILL.md | 2 +- .github/skills/agent-conduct/SKILL.md | 2 +- GOVERNANCE.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.agents/skills/agent-conduct/SKILL.md b/.agents/skills/agent-conduct/SKILL.md index 7df11e318..a47e480e0 100644 --- a/.agents/skills/agent-conduct/SKILL.md +++ b/.agents/skills/agent-conduct/SKILL.md @@ -50,7 +50,7 @@ The checks that separate work actually done from work that merely reports succes - **Editing CRLF files programmatically: `.` matches `\r` in a regex**, so a captured line keeps its carriage return and rejoining with `\r\n` yields `CRCRLF`. Prefer literal replacement over regex reassembly. In Python the *default* path is a text-mode rewrite, which has the mirror failure: `Path.read_text()` decodes through universal newlines and `write_text()` translates each `\n` back to `os.linesep`, so a read-edit-write round trip rewrites every line ending in the file to the host's own while the edit itself looks correct. Work in bytes, or open the file explicitly with `newline=''` on both the read and the write, since a read that preserves the endings still hands them to a write that translates them. Use `open()` rather than `Path.read_text()`, which accepts that argument only on Python 3.13 and newer and raises `TypeError` below it. The corruption is worth naming because it is invisible in a rendered diff. - **Scope a check by what the project declares, not by the file that prompted it.** A check written while editing one file tends to cover that file's language and stop, and then reports success on every other surface the rule governs. Read the declared types, or the config that enumerates them, and cover each one, then assert a floor per surface so a table that narrows fails loudly instead of passing quietly. A rule about comments means every comment syntax the project ships, and a format that carries comments in practice counts even where its specification says otherwise. - **Never write source text carrying backslash escapes through a shell construct that interprets them.** A `printf` format string, a `printf` argument consumed by `%b`, `echo -e`, POSIX `sh`'s builtin `echo`, and `$'...'` each consume the escape and write an invisible control character in its place, so a `\b` inside a regex becomes a backspace and the pattern silently matches nothing while every test still passes. A quoted heredoc, `<<"EOF"`, is not one of those constructs and writes every backslash literally. An unquoted `<