Private
Public Access
feat(directives): add rule-statement header to 49-56 of 66 v1.md files
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
# 200-line status reports are confessions — a good report is 5-10 sentences
|
||||
|
||||
### 2. The Report-Instead-of-Fix Pattern (kill it)
|
||||
|
||||
**Symptom:** You can't fix the bug. You write a 200-line status report explaining why you can't fix it. The report contains "What I tried this session", "What I am NOT going to do", "What you can do", and "Files changed in this session (cumulative)." The report is a confession, not a fix.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# `reset_session()` must preserve `active_project_path` — it clears 30+ fields but never the path
|
||||
|
||||
## _handle_reset_session field-clear contract
|
||||
|
||||
`src/app_controller.py:3286-3356 _handle_reset_session` is the **nuclear** reset, called from the Reset Session button in the message panel. It clears 30+ state buckets:
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Failures are cases, not exceptions — use Result[T] dataclasses, not Optional[T] returns or raised exceptions
|
||||
|
||||
## The 5 Patterns
|
||||
|
||||
### 1. Nil-Sentinel Dataclasses (replaces `None`)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# A fix request produces the fix; a track doc is only for multi-day work
|
||||
|
||||
### 3. The Scope-Creep Track-Doc Pattern (kill it)
|
||||
|
||||
**Symptom:** The user asks for a 1-line fix. You write a 5-phase "future track" spec with 140 lines of scope, audit findings, recommendations, and "out of scope" sections. The track doc is now larger than the fix it was meant to scope.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Docstrings must include [C: ...] callers and [M: ...] / [U: ...] mutation/use tags for AI-assisted impact analysis
|
||||
|
||||
## 12. Structural Dependency Mapping (SDM)
|
||||
|
||||
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.
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
# Main GUI rendering thread and daemon execution threads must be rigorously separated
|
||||
|
||||
From `conductor/product-guidelines.md` §"Code Standards & Architecture":
|
||||
- **Strict State Management:** There must be a rigorous separation between the Main GUI rendering thread and daemon execution threads. The UI should *never* hang during AI communication or script execution. Use lock-protected queues and events for synchronization.
|
||||
@@ -1,3 +1,5 @@
|
||||
# Tests must be written before implementation — write failing tests, see them fail (Red), implement, see pass (Green)
|
||||
|
||||
4. **Write Failing Tests (Red Phase):**
|
||||
- **Pre-Delegation Checkpoint:** Before spawning a worker for dangerous or non-trivial changes, ensure your current progress is staged (`git add .`) or committed. This prevents losing iterations if a sub-agent incorrectly uses `git restore`.
|
||||
- **Zero-Assertion Ban:** You MUST NOT write tests that contain only `pass` or lack meaningful assertions. A test is only valid if it contains assertions that explicitly test the behavioral change and verify the failure condition.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Tests must be narrow — exercise one behavioral change per test
|
||||
|
||||
## Pattern: Narrow Test Paths vs. Kitchen-Sink Functions
|
||||
|
||||
**Anti-pattern: calling a kitchen-sink function.** A test that does `gui_2.render_main_interface(app_instance)` requires mocking 50+ imgui/imscope methods because `render_main_interface` dispatches to dozens of nested render functions. Adding a single mock for `imscope.window` (to return a tuple) just reveals the next un-mocked dependency (e.g. `imgui.begin` returning bool where a 2-tuple is expected). The test never reaches its assertion.
|
||||
|
||||
Reference in New Issue
Block a user