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
- Production CLI (JVM): `bb prod-cli` | Production JAR: `bb prod-jar`
6
6
- In production we use a native image (GraalVM, `GRAALVM_HOME` set): `bb native-cli`
7
+
7
8
- Test (Kaocha via `:test` alias):
8
9
- Run all unit tests: `bb test` (same as `clojure -M:test`)
9
10
- Run a single unit test namespace: `clojure -M:test --focus eca.main-test`
10
11
- Run a single unit test var: `clojure -M:test --focus eca.main-test/parse-opts-test`
11
12
- Run all integration tests (requires built `./eca` or `eca.exe`): `bb integration-test`
12
13
- Run a single integration test: `bb integration-test --dev --ns integration.chat.mcp-remote-test`
14
+
13
15
- Lint/format:
14
16
- Lint: `clj-kondo --lint src test dev integration-test`
15
17
- Formatting not enforced; follow idiomatic Clojure (`cljfmt` optional).
18
+
16
19
- Namespaces/imports:
17
20
- One file per `ns`; always `(set! *warn-on-reflection* true)` near top.
18
21
- Group `:require` as: Clojure stdlib, third‑party, then `eca.*`; sort within groups.
19
22
- Prefer `:as` aliases; avoid `:refer` except in tests (`clojure.test` and what you use).
23
+
20
24
- Naming/types/data:
21
25
- kebab-case for fns/vars, `eca.<area>[.<subarea>]` for namespaces.
22
26
- Use snake/camel case only when mirroring external data keys.
23
27
- Prefer immutable maps/vectors/sets; use namespaced keywords for domain data.
24
28
- Add type hints only to remove reflection where it shows up.
29
+
25
30
- Errors/logging/flows:
26
31
- Use `ex-info` with data for exceptional paths; return `{:result-code ...}` maps from CLI flows.
27
32
- Never `println` for app logs; use `eca.logger/error|warn|info|debug` (stderr-based).
33
+
- If a chat-scoped function contains any `logger/...` call, wrap the relevant body in `logger/with-chat-context`. Pass both `chat-id` and the current chat’s `parent-chat-id`.
34
+
- Consider wrapping chat-scoped functions that call downstream code known to log, or that start `future*` work whose logs should be attributed to the chat. If there is no downstream logging, `with-chat-context` is unnecessary; instead, consider whether the function should log an important chat lifecycle event.
35
+
28
36
- Tests:
29
37
- Use `clojure.test` + `nubank/matcher-combinators`; keep tests deterministic.
30
38
- Put shared test helpers under `test/eca/test_helper.clj`.
31
-
- Use java class typing to avoid GraalVM reflection issues
32
-
- Avoid adding too many comments, only add essential or when you think is really important to mention something.
33
-
- ECA's protocol specification of client <-> server lives in docs/protocol.md
34
-
- If changing ECA config structure, remember to update its docs/config.json
35
-
- When adding support to a new feature or fixing a existing github issue, add a entry to Unreleased in CHANGELOG.md if not already there as last entry, be really concise, implementation details not needed, mention the issue number in the end if you know it's related to one.
39
+
40
+
- General:
41
+
- Use java class typing to avoid GraalVM reflection issues
42
+
- Avoid adding too many comments, only add essential or when you think is really important to mention something.
43
+
- ECA's protocol specification of client <-> server lives in docs/protocol.md
44
+
- If changing ECA config structure, remember to update its docs/config.json
45
+
- When adding support to a new feature or fixing a existing github issue, add a entry to Unreleased in CHANGELOG.md if not already there as last entry, be really concise, implementation details not needed, mention the issue number in the end if you know it's related to one.
0 commit comments