You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+22-17Lines changed: 22 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
**ASK, DON'T GUESS** — Ambiguity is a stop signal. If types, error handling, or architecture is unclear, ask. No speculative coding.
2
2
3
-
**FOUNDATIONAL INTEGRITY** — Don't implement features on missing foundations. No stubs, mocks, or hardcoded values (`todo!()`, `const user = {id:1}`) unless explicitly prototyping.
3
+
**HONEST BLOCKERS** — Don't hide uncertainty behind speculative changes or workarounds. State the real issue and ask the user for missing logs, paths, data, or vanilla references.
4
4
5
-
**VANILLA FUNCTIONALITY**- We should keep 1:1 Vanilla functionality. If a compromise can be made you MUST present the issue at hand to the user first.
5
+
**FOUNDATIONAL INTEGRITY**— Don't implement features on missing foundations. No stubs, mocks, or hardcoded values (`todo!()`, `const user = {id:1}`) unless explicitly prototyping.
6
6
7
-
**BIOME DETERMINISM** - Steel and the SteelExtractor hash harness use deterministic per-sampler biome caching. Do not dismiss feature hash mismatches as vanilla `ThreadLocal` biome-cache nondeterminism, and do not add thread-local biome behavior without an explicit design discussion.
7
+
**VANILLA FUNCTIONALITY** - Keep 1:1 Vanilla functionality. If a faster or more idiomatic Rust solution diverges from vanilla behavior or structure, get explicit permission first and leave a concise comment/doc explaining why.
8
8
9
9
**SKETCHY WORKAROUND PROTOCOL** — Halt and ask permission before using:
10
10
-`.clone()` to appease borrow checker, `.unwrap()`/`.expect()` in production, `unsafe`
@@ -13,7 +13,7 @@
13
13
14
14
Template: *"This requires [Hack] which risks [Consequence]. Proceed or solve root cause?"*
15
15
16
-
**CONSTRUCTIVE DISSENT** — Challenge XY problems. *"I can do X, but it introduces [Issue]. Standard pattern is Y. How proceed?"*
16
+
**CONSTRUCTIVE DISSENT** — Treat user claims as hypotheses. Verify against local code/vanilla, call out mismatches, and challenge XY problems. Before building a complex system, state the simplest vanilla-compatible design and ask when a simpler architecture would change scope.
17
17
18
18
**Registries**
19
19
- We should only generate what is needed. Does minecraft use a hardcoded transform? Then we do as well.
@@ -23,17 +23,17 @@ Template: *"This requires [Hack] which risks [Consequence]. Proceed or solve roo
23
23
- Avoid raw `BlockStateId` in generated registry data. Use `BlockRef` plus explicit properties/default-state resolution so registry ordering can still evolve for plugin support.
24
24
25
25
**Code standard**
26
-
-Usually vanilla is decent at naming stuff, sometimes we want to deviate from this though in cases where names are bad or non descriptive. Or we want a whole other solution to the system at hand. In that case we should add a doc comment above the struct, method or module that clearly states the differences so next time someone new picks it up they have an easy time understanding your system.
26
+
-Use vanilla names unless they are misleading or a Rust design is explicitly approved. Document intentional differences on the relevant struct, method, or module.
27
27
- We should try to minimize code duplication, but a few lines are usually fine.
28
-
-When working on foundation we must be extra sure we aren't taking any shortcuts or leaving stuff out, this can cause issues later down the line where a foundational system has to be completely redesigned. Foundational code is code like a system or interface other code depends on, an example being the block behavior trait, if that's badly designed from the start and we have 100 block implementations building off it good luck getting it changed.
29
-
- No workarounds. Don't be lazy and skip creating a helper function just cause you only needed it once for your use case.
28
+
-Treat foundational systems with extra rigor; shortcuts in shared interfaces like block behavior become expensive once implementations depend on them.
29
+
- No workarounds. Create the right helper/abstraction when the code needs one.
30
30
- Don't add trivial wrapper methods that just alias an existing method. If `height()` already exists, don't add `get_y_size()` that returns `self.height()`. Use the existing method directly.
31
31
- Prefer associated functions on the relevant type over standalone free functions when there's a clear owner.
32
-
-Try to not go deep in indentation, guard clauses are useful for this and rust has some really nice `if let` and `let Some() = x else {return}`
33
-
-Don't use panics unless the case never happens or is fatal to the program. Otherwise use Results
32
+
-Avoid deep indentation; prefer guard clauses, `if let`, and `let Some(...) = ... else {return }`.
33
+
-Use `Result` for recoverable failures; panic only for impossible or fatal states.
34
34
- Don't multithread something unless you can explain why it needs multithreading.
35
35
- Don't use async unless you need disk or network I/O.
36
-
- If you haven't fully implemented a feature, make sure to add a // TODO: comment
36
+
- If you haven't fully implemented a feature, add a `// TODO:` comment.
37
37
- Keep comments concise
38
38
- After fixing something don't leave a comment
39
39
- Currently this project is in early development, we don't need to provide migrations
@@ -43,9 +43,12 @@ Template: *"This requires [Hack] which risks [Consequence]. Proceed or solve roo
43
43
- Suppress clippy lints with `#[expect(clippy::lint_name, reason = "...")]`. False positives and intentional deviations (e.g., function length for readability) are acceptable when explained
44
44
45
45
**GENERATED CODE** — Never modify generated files directly:
-`steel-core/src/behavior/generated/` → modify `steel-core/build/items.rs` or `steel-core/build/blocks.rs`
48
-
- When some data is missing from the extracted json files ALWAYS present the user with what data is required and they can provide you with a path of where the extractor code is.
- Block/item behavior registration is generated from `#[block_behavior]` / `#[item_behavior]`; add annotated structs under `steel-core/src/behavior/`, not manual generated registration.
51
+
- If extracted JSON data is missing, tell the user exactly what data is required; they can provide the extractor path.
0 commit comments