docs: add CLAUDE.md and Agents.md for AI coding assistant guidance#5437
docs: add CLAUDE.md and Agents.md for AI coding assistant guidance#5437akrem-chabchoub wants to merge 11 commits intomasterfrom
Conversation
Made-with: Cursor
| - `bee start` — full or light node (`cmd/bee/cmd/start.go`) | ||
| - `bee init` — initialize data directory | ||
| - `bee deploy` — deploy smart contracts | ||
| - `bee db` — database management |
There was a problem hiding this comment.
Should we go even deeper with db repair and db nuke?
There was a problem hiding this comment.
gacevicljubisa
left a comment
There was a problem hiding this comment.
Claude Code should read AGENTS.md as fallback. So, no need to have both.
I would focsu on the code Guidelines like:
- adding refs to CODING.md, CODINGSTYLE.md, CONTRIBUTING.md
- minimal, focused changes
- do not add, remove, or update dependencies
- error handling
- testing
- loging
Regarding make targets, I would include only necesary during dev proces.
There is no need to start actual bee node using agents.
Additionally commit msg format can be included.
Maybe this can serve as example https://github.com/ethereum/go-ethereum/blob/master/AGENTS.md wit
It is already there
I will add it
Maybe we can say unless I explicitly mention ?
I will remove unnecessary ones and add commits msg format. Thanks ! |
gacevicljubisa
left a comment
There was a problem hiding this comment.
Also, maybe it would be good to add CLAUDE.md with short disclosure that instructions are in AGENT.md?
|
|
||
| ## Commit message format and PR titles | ||
|
|
||
| This repo uses **[Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)** with **`commitlint.config.js`**: allowed types are `build`, `chore`, `ci`, `docs`, `feat`, `fix`, `perf`, `refactor`, `revert`, `test`. Header **max 100** characters; footer lines **max 72**. Use **imperative** mood and **no trailing period** on the subject. |
There was a problem hiding this comment.
i don't think all the prose around conventional commits is needed and i'm sure that just dropping the fact that the repo uses conventional commits is enough
|
|
||
| ## Coding conventions (summary) | ||
|
|
||
| Authoritative detail: `CODING.md` and `CODINGSTYLE.md`. |
There was a problem hiding this comment.
references the same files that were mentioned before, not sure if it's needed
| ### Errors, logging, concurrency | ||
|
|
||
| - Propagate errors; do not log and return the same error. Use `fmt.Errorf("context: %w", err)`. Avoid stacking "failed to" prefixes. | ||
| - Sentinel errors: `var ErrFoo = errors.New("package: description")` when appropriate. |
| ## Common pitfalls | ||
|
|
||
| - Do not confuse `ChunkSize` (4096 data bytes) with `ChunkWithSpanSize` (4104 including span). | ||
| - XOR distance: "closer" is more shared prefix bits, not smaller integers. |
There was a problem hiding this comment.
it is exactly the same :) XOR distance between two addresses will generate smaller integers as a result of the operation when the amount of shared prefix bits grows
|
|
||
| - Do not confuse `ChunkSize` (4096 data bytes) with `ChunkWithSpanSize` (4104 including span). | ||
| - XOR distance: "closer" is more shared prefix bits, not smaller integers. | ||
| - Do not both log and return the same error. |
There was a problem hiding this comment.
this was mentioned at least once above, and it is also mentioned in the coding guidelines that are referred to
| - Do not confuse `ChunkSize` (4096 data bytes) with `ChunkWithSpanSize` (4104 including span). | ||
| - XOR distance: "closer" is more shared prefix bits, not smaller integers. | ||
| - Do not both log and return the same error. | ||
| - Tests: `foo_test` + `export_test.go` pattern. |
There was a problem hiding this comment.
this repeats stuff that was already mentioned
| - Goroutines must be stoppable (context cancel, quit channel, etc.). | ||
| - Full node vs light node: reserve and storage incentives are full-node concerns. | ||
| - Postage batches can be unusable (expired, depleted, unsynced); check before relying on stamps. | ||
| - `*.pb.go` is generated; do not edit by hand. Regenerate with `make protobuf` after `.proto` changes. |
There was a problem hiding this comment.
just add the command at the dev commands section (with an inline comment that it should be used after changing protobuf specs)

Checklist
Description
Add
Agents.mdandCLAUDE.mdto help ai agents understood better the codeOpen API Spec Version Changes (if applicable)
Motivation and Context (Optional)
Related Issue (Optional)
#5407
Screenshots (if appropriate):
AI Disclosure