diff --git a/conductor/directives/defer_heavy_sdk_imports_to_subprocess/meta.md b/conductor/directives/defer_heavy_sdk_imports_to_subprocess/meta.md new file mode 100644 index 00000000..f20c1663 --- /dev/null +++ b/conductor/directives/defer_heavy_sdk_imports_to_subprocess/meta.md @@ -0,0 +1,9 @@ +# defer_heavy_sdk_imports_to_subprocess + +## v1 + +**Why this iteration:** Lifted from `docs/superpowers/specs/2026-05-13-ai-server-ipc-design.md` §"Architecture" + §"Startup Sequence". The spec decouples heavy AI SDK imports (google.genai, anthropic) from the GUI process via a subprocess command queue: GUI starts instantly (~0.5s) while the AI server loads (~1.2s) in the background. The audit script `scripts/audit_main_thread_imports.py` is the static gate for this rule. +**Source:** `docs/superpowers/specs/2026-05-13-ai-server-ipc-design.md:5-18 + 104-110` + +--- +**Lifted:** 2026-07-03 (scavenge sweep batch 2/5: docs/superpowers/specs/) \ No newline at end of file diff --git a/conductor/directives/defer_heavy_sdk_imports_to_subprocess/v1.md b/conductor/directives/defer_heavy_sdk_imports_to_subprocess/v1.md new file mode 100644 index 00000000..e1f75e1b --- /dev/null +++ b/conductor/directives/defer_heavy_sdk_imports_to_subprocess/v1.md @@ -0,0 +1 @@ +# Heavy SDK imports must be deferred to a subprocess so the GUI starts instantly \ No newline at end of file diff --git a/conductor/directives/graceful_optional_dependency_degradation/meta.md b/conductor/directives/graceful_optional_dependency_degradation/meta.md new file mode 100644 index 00000000..31832e98 --- /dev/null +++ b/conductor/directives/graceful_optional_dependency_degradation/meta.md @@ -0,0 +1,9 @@ +# graceful_optional_dependency_degradation + +## v1 + +**Why this iteration:** Lifted from `docs/superpowers/specs/2026-05-15-profiling-system-design.md` §"Graceful Degradation" (lines 138-143) + the `tracy_integration.py` reference implementation (lines 144-197). When an optional dependency (e.g., `pytracy` for Tracy profiling) is not installed or not connected, the app must continue normally. The pattern: wrap the import in `try/except Exception`, set a module-level `_tracy_available: bool = False` flag, gate every zone call on the flag, log a startup warning. No crash, no feature breakage. +**Source:** `docs/superpowers/specs/2026-05-15-profiling-system-design.md:138-197` + +--- +**Lifted:** 2026-07-03 (scavenge sweep batch 2/5: docs/superpowers/specs/) \ No newline at end of file diff --git a/conductor/directives/graceful_optional_dependency_degradation/v1.md b/conductor/directives/graceful_optional_dependency_degradation/v1.md new file mode 100644 index 00000000..d605ece2 --- /dev/null +++ b/conductor/directives/graceful_optional_dependency_degradation/v1.md @@ -0,0 +1 @@ +# Optional dependencies must degrade gracefully via try/except import + module-level flag pattern \ No newline at end of file