summaryrefslogtreecommitdiffhomepage
path: root/.dispatch/rules
diff options
context:
space:
mode:
Diffstat (limited to '.dispatch/rules')
-rw-r--r--.dispatch/rules/contracts-are-h.md17
-rw-r--r--.dispatch/rules/one-owner.md8
-rw-r--r--.dispatch/rules/zero-warnings.md11
3 files changed, 36 insertions, 0 deletions
diff --git a/.dispatch/rules/contracts-are-h.md b/.dispatch/rules/contracts-are-h.md
new file mode 100644
index 0000000..29f9ce3
--- /dev/null
+++ b/.dispatch/rules/contracts-are-h.md
@@ -0,0 +1,17 @@
+# Contracts are header files
+
+- The `.h` file IS the contract between modules. Other agents read ONLY your
+ `.h` — never your `.c`.
+- Every `.h` must be **self-contained**: it includes all types it references.
+ A consumer should be able to `#include "your_module.h"` and nothing else.
+- Prefer **forward declarations** over full includes when only a pointer is
+ needed. Example: `typedef struct PlayerState PlayerState;` avoids including
+ `types.h`.
+- A `.h` file must NOT include any `.c` file. Ever.
+- If you expose a function, its full signature (return type, name, parameter
+ types and names) must be in the `.h`. The documentation of what it DOES
+ (preconditions, postconditions, side effects) goes in a comment in the `.h`
+ — that is the contract's behavioral specification, not just its type
+ signature.
+- If an agent NEEDS to read your `.c` to understand what your module does,
+ your `.h` contract is UNDESPECIFIED. Report this as a contract gap.
diff --git a/.dispatch/rules/one-owner.md b/.dispatch/rules/one-owner.md
new file mode 100644
index 0000000..15ef1a8
--- /dev/null
+++ b/.dispatch/rules/one-owner.md
@@ -0,0 +1,8 @@
+# One-owner
+
+- You are the EXCLUSIVE writer for the files assigned in the TASK block.
+- No other agent may write those files — ever, under any circumstances.
+- If another module needs a change in your file, the orchestrator summons YOU
+ to make it.
+- Check your work: `git status` should show changes ONLY in your assigned files.
+ If you accidentally touch something else, revert it.
diff --git a/.dispatch/rules/zero-warnings.md b/.dispatch/rules/zero-warnings.md
new file mode 100644
index 0000000..a6239d9
--- /dev/null
+++ b/.dispatch/rules/zero-warnings.md
@@ -0,0 +1,11 @@
+# Zero warnings
+
+- Your code must compile with `-Wall -Wextra` producing EXACTLY ZERO warnings.
+- No `-w` suppression. No `(void)` casts to silence legitimate warnings unless
+ you have a real reason (e.g. an unused parameter that must exist for a
+ callback signature).
+- The orchestrator will re-run `make` after you and will REJECT any warning —
+ even ones from other files your code includes. If `raylib.h` or a system
+ header triggers a warning, isolate it with platform guards.
+- Run `make` yourself before reporting. The exit code must be 0.
+- The build output is your trust signal. A clean build = a clean module.