From 545ccee118d1b6e75aa4e47f139ecf00aba6932d Mon Sep 17 00:00:00 2001 From: Ed_ Date: Thu, 2 Jul 2026 21:51:48 -0400 Subject: [PATCH] =?UTF-8?q?feat(directives):=20harvest=203=20directives=20?= =?UTF-8?q?from=20tier3-worker.md=20=C2=A717.9=20(import/aliasing/from=5Fd?= =?UTF-8?q?ict=20bans)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conductor/directives/ban_local_imports/v1.md | 12 ++++++++++++ conductor/directives/ban_prefix_aliasing/v1.md | 10 ++++++++++ conductor/directives/ban_repeated_from_dict/v1.md | 10 ++++++++++ 3 files changed, 32 insertions(+) create mode 100644 conductor/directives/ban_local_imports/v1.md create mode 100644 conductor/directives/ban_prefix_aliasing/v1.md create mode 100644 conductor/directives/ban_repeated_from_dict/v1.md diff --git a/conductor/directives/ban_local_imports/v1.md b/conductor/directives/ban_local_imports/v1.md new file mode 100644 index 00000000..8c019b35 --- /dev/null +++ b/conductor/directives/ban_local_imports/v1.md @@ -0,0 +1,12 @@ +# ban_local_imports — v1 + +**Why this iteration:** Lifted verbatim from `.opencode/commands/mma-tier3-worker.md:42-46` (the current canonical source). The plan referenced `conductor/code_styleguides/python.md` §17.9a (lines 364-443) but that section no longer exists in python.md after a 2026-06-27 refactor — the §17.9 content was moved into the agent role prompts (this file). This v1 is the baseline encoding — the imperative-ban style currently in production. +Future variants will test alternative encodings (rationale-first, before/after, tabular) against this baseline. + +**Source:** `.opencode/commands/mma-tier3-worker.md:42-46` (originally `conductor/code_styleguides/python.md` §17.9a, drift-corrected) + +--- + +- Local imports inside functions (top-of-module imports only) + +**The one exception:** the literal wire boundary (TOML/JSON parse functions) may use `dict[str, Any]` + `Metadata.from_dict(...)`. \ No newline at end of file diff --git a/conductor/directives/ban_prefix_aliasing/v1.md b/conductor/directives/ban_prefix_aliasing/v1.md new file mode 100644 index 00000000..4a86b078 --- /dev/null +++ b/conductor/directives/ban_prefix_aliasing/v1.md @@ -0,0 +1,10 @@ +# ban_prefix_aliasing — v1 + +**Why this iteration:** Lifted verbatim from `.opencode/commands/mma-tier3-worker.md:43` (the current canonical source). The plan referenced `conductor/code_styleguides/python.md` §17.9b (lines 364-443) but that section no longer exists in python.md after a 2026-06-27 refactor — the §17.9 content was moved into the agent role prompts (this file). This v1 is the baseline encoding — the imperative-ban style currently in production. +Future variants will test alternative encodings (rationale-first, before/after, tabular) against this baseline. + +**Source:** `.opencode/commands/mma-tier3-worker.md:43` (originally `conductor/code_styleguides/python.md` §17.9b, drift-corrected) + +--- + +- `import X as _PREFIX` aliasing (use the original name) \ No newline at end of file diff --git a/conductor/directives/ban_repeated_from_dict/v1.md b/conductor/directives/ban_repeated_from_dict/v1.md new file mode 100644 index 00000000..88e38d7a --- /dev/null +++ b/conductor/directives/ban_repeated_from_dict/v1.md @@ -0,0 +1,10 @@ +# ban_repeated_from_dict — v1 + +**Why this iteration:** Lifted verbatim from `.opencode/commands/mma-tier3-worker.md:44` (the current canonical source). The plan referenced `conductor/code_styleguides/python.md` §17.9c (lines 364-443) but that section no longer exists in python.md after a 2026-06-27 refactor — the §17.9 content was moved into the agent role prompts (this file). This v1 is the baseline encoding — the imperative-ban style currently in production. +Future variants will test alternative encodings (rationale-first, before/after, tabular) against this baseline. + +**Source:** `.opencode/commands/mma-tier3-worker.md:44` (originally `conductor/code_styleguides/python.md` §17.9c, drift-corrected) + +--- + +- Repeated `.from_dict()` calls in the same expression (cache the result or promote the type) \ No newline at end of file