Skip to content

Commit 417342b

Browse files
committed
docs(ai-coders): add Section 5 red-flags + Section 6 help + footer
1 parent 8cddc51 commit 417342b

1 file changed

Lines changed: 36 additions & 10 deletions

File tree

docs/develop_ai_coders.md

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,39 @@ Ambiguous types / signs / units / conventions: trace upstream code first. "Ask m
9696

9797
## 4. Self-check pre-PR
9898

99-
Run through before opening:
100-
101-
- [ ] Issue filed if behavior change? (Per decision-tree in §2)
102-
- [ ] `pytest tests/` passes locally?
103-
- [ ] `uvx ruff check .` clean?
104-
- [ ] Sign conventions verified (if PR touches power / SOC / cost variables)?
105-
- [ ] One concern per PR (scope discipline)?
106-
- [ ] Issue or Discussion linked in PR body if applicable?
107-
- [ ] Reproducer in body if behavior-change fix?
108-
- [ ] Maintainer-scope-corridors checked? ([Discussion #808](https://github.com/davidusb-geek/emhass/discussions/808) Layers, [Discussion #789](https://github.com/davidusb-geek/emhass/discussions/789) MILP scope)
99+
Run through before opening. Each item has a *why* — skip the item only if the *why* genuinely does not apply.
100+
101+
- [ ] Issue filed if behavior change? *Why: surfaces direction-disagreement before code edits; see §2 cautionary #830.*
102+
- [ ] `pytest tests/` passes locally? *Why: CI runs the same suite; local-fail = CI-fail = wasted review cycle.*
103+
- [ ] `uvx ruff check .` clean? *Why: ruff is enforced via `.github/workflows/code-quality.yml`; a red lint blocks merge.*
104+
- [ ] Sign conventions verified (if PR touches power / SOC / cost variables)? *Why: column names do not encode sign; see §3 sign-conventions landmine.*
105+
- [ ] One concern per PR (scope discipline)? *Why: bundled PRs invite scope-objection on one part and block the whole PR.*
106+
- [ ] Issue or Discussion linked in PR body if applicable? *Why: makes review context one-click; saves maintainer time.*
107+
- [ ] Reproducer in body if behavior-change fix? *Why: lets the maintainer confirm the bug, not just the patch.*
108+
- [ ] Maintainer-scope-corridors checked? ([Discussion #808](https://github.com/davidusb-geek/emhass/discussions/808) Layers, [Discussion #789](https://github.com/davidusb-geek/emhass/discussions/789) MILP scope) *Why: out-of-corridor PRs land in indefinite review limbo.*
109+
110+
## 5. Red flags: stop and ask
111+
112+
Patterns that mean stop, file an issue, do not PR:
113+
114+
- "AI says this is a bug but I can't explain why in my own words." → Don't trust. File issue with the question. Maintainer or community will explain or correct.
115+
- "I can't tell what unit this number is in (W vs kW, fraction vs percent, UTC vs local)." → File issue. Document the ambiguity for the next person.
116+
- "I don't know which subsystem owns this concern (optim vs forecast vs retrieve_hass)." → File issue. Don't pick blindly — cross-subsystem PRs carry heavy review-friction.
117+
- "Test passes but I don't trust the test." → Add a counter-example. If still ambiguous, file issue with the counter-example.
118+
- "AI generated 200+ LOC and I haven't read it line-by-line." → Stop. Read every line before commit. Unreviewed AI-generated code is a future-bug source.
119+
- "AI proposed relaxing a constraint to make the solve feasible." → Stop. See §3 MILP infeasibility — relaxation masks the wrong-constraint cause. File issue with the infeasible model dump.
120+
- "The fix is in a subsystem I don't normally touch and the diff feels speculative." → File issue describing the symptom and the speculative diff. Let the subsystem owner weigh in before you push.
121+
122+
## 6. Help resources
123+
124+
- [GitHub Discussions](https://github.com/davidusb-geek/emhass/discussions) — questions, ideas, use-case sharing
125+
- [`docs/develop.md`](develop.md) — general developer guide (Method 1 venv with `uv`, Method 2 DevContainer, Method 3 Docker)
126+
- [`AGENTS.md`](../AGENTS.md) — agent-side rules (read by AI tools; humans read to understand agent constraints)
127+
- Maintainer scope corridors: [Discussion #808](https://github.com/davidusb-geek/emhass/discussions/808) (Layers 1-3, zero-config default), [Discussion #789](https://github.com/davidusb-geek/emhass/discussions/789) (EMHASS = MILP core, glue layer separate)
128+
- Issue templates: `.github/ISSUE_TEMPLATE/`
129+
130+
---
131+
132+
Cross-references: [`docs/develop.md`](develop.md), [`AGENTS.md`](../AGENTS.md), [`CONTRIBUTING.md`](../CONTRIBUTING.md).
133+
134+
AI-tool-coverage gaps: Cursor (§1b) and Aider (§1c) are untested stubs. PRs adding tested-against patterns welcome.

0 commit comments

Comments
 (0)