From 3267928c267e34f51c052d2919ef3291abf4fa3e Mon Sep 17 00:00:00 2001 From: Ed_ Date: Sat, 9 May 2026 12:56:56 -0400 Subject: [PATCH] docs(guidelines): Define Structural Dependency Mapping (SDM) convention --- conductor/code_styleguides/python.md | 20 ++++++++++++++++++-- conductor/product-guidelines.md | 3 +++ config.toml | 3 +-- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/conductor/code_styleguides/python.md b/conductor/code_styleguides/python.md index a6ebf27..bf86b15 100644 --- a/conductor/code_styleguides/python.md +++ b/conductor/code_styleguides/python.md @@ -65,6 +65,22 @@ is processed by AI agents, while preserving readability for human review. - Hard limit: None — let the formatter handle wrapping if needed. - Rationale: 80-char limits cause excessive line continuations that waste tokens. -## 10. Main Guard +## 11. Structural Dependency Mapping (SDM) -- All executable files should have `if __name__ == "__main__":` calling `main()`. +To assist AI agents in evaluating refactoring impact across dynamic codebases, all major definitions SHOULD include terse SDM tags at the end of their docstrings. + +- **Format:** Tags are enclosed in square brackets at the end of the docstring body. +- **For Functions/Methods:** `[C: CallerA, CallerB]` — List of primary internal callers within the codebase. +- **For State Variables:** + - `[M: File:Line, Method]` — List of primary mutation points (where the value is assigned). + - `[U: File]` — Major codepaths of use (where the value is read but not changed). + +### Example: +```python +def start_services(self) -> None: + """ + Initialises background threads and MCP servers. + [C: App.run, _cb_load_project] + """ + ... +``` diff --git a/conductor/product-guidelines.md b/conductor/product-guidelines.md index 54d989b..8516ff9 100644 --- a/conductor/product-guidelines.md +++ b/conductor/product-guidelines.md @@ -38,3 +38,6 @@ - **Indentation:** Exactly **1 space** per level. This minimizes token usage in nested structures. - **Newlines:** Maximum **one (1)** blank line between top-level definitions. **Zero (0)** blank lines within function or method bodies. - **Type Hinting:** Mandatory, strict type hints for all parameters, return types, and global variables to ensure high-signal context for AI agents. +- **Structural Dependency Mapping (SDM):** All major state variables, methods, and functions MUST include terse dependency tags at the end of their docstrings for AI-assisted impact analysis. + - **Functions/Methods:** `[C: Caller1, Caller2]` (Primary callers). + - **State Variables:** `[M: File:Line, Method]` (Mutation points) and `[U: File]` (Major use paths). diff --git a/config.toml b/config.toml index 06a0056..3c4b96b 100644 --- a/config.toml +++ b/config.toml @@ -52,7 +52,7 @@ Response = false "Tool Calls" = false Theme = true "Log Management" = true -Diagnostics = true +Diagnostics = false "External Tools" = false "Shader Editor" = false "Undo/Redo History" = false @@ -86,7 +86,6 @@ chunk_overlap = 200 provider = "mock" collection_name = "manual_slop" - [tools.text_editors.vscode] path = "C:\\apps\\Microsoft VS Code Insiders\\Code - Insiders.exe" diff_args = [