Skip to content

docs: add CLAUDE.md and Agents.md for AI coding assistant guidance#5437

Open
akrem-chabchoub wants to merge 11 commits intomasterfrom
feat/agents
Open

docs: add CLAUDE.md and Agents.md for AI coding assistant guidance#5437
akrem-chabchoub wants to merge 11 commits intomasterfrom
feat/agents

Conversation

@akrem-chabchoub
Copy link
Copy Markdown
Contributor

@akrem-chabchoub akrem-chabchoub commented Apr 15, 2026

Checklist

  • I have read the coding guide.
  • My change requires a documentation update, and I have done it.
  • I have added tests to cover my changes.
  • I have filled out the description and linked the related issues.

Description

Add Agents.md and CLAUDE.md to help ai agents understood better the code

Open API Spec Version Changes (if applicable)

Motivation and Context (Optional)

Related Issue (Optional)

#5407

Screenshots (if appropriate):

AI Disclosure

  • This PR contains code that has been generated by an LLM.
  • I have reviewed the AI generated code thoroughly.
  • I possess the technical expertise to responsibly review the code generated in this PR.

@akrem-chabchoub akrem-chabchoub changed the title Feat/agents docs: add CLAUDE.md for AI coding assistant guidance Apr 15, 2026
@akrem-chabchoub akrem-chabchoub self-assigned this Apr 15, 2026
@akrem-chabchoub akrem-chabchoub marked this pull request as ready for review April 15, 2026 13:29
@akrem-chabchoub akrem-chabchoub added this to the 2026 milestone Apr 15, 2026
@akrem-chabchoub akrem-chabchoub linked an issue Apr 15, 2026 that may be closed by this pull request
@akrem-chabchoub akrem-chabchoub changed the title docs: add CLAUDE.md for AI coding assistant guidance docs: add CLAUDE.md and Agents.md for AI coding assistant guidance Apr 15, 2026
Made-with: Cursor
Comment thread AGENTS.md
- `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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we go even deeper with db repair and db nuke?

Copy link
Copy Markdown
Contributor Author

@akrem-chabchoub akrem-chabchoub Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it can be added, but the frequency of use is unclear. If it is not needed too often, it remains practical. When required, the agent can execute bee db to retrieve the information.

AFAIK, these files are meant to serve as a map for agents rather than a fully detailed manual.

image

Copy link
Copy Markdown
Member

@gacevicljubisa gacevicljubisa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@akrem-chabchoub
Copy link
Copy Markdown
Contributor Author

@gacevicljubisa

  • adding refs to CODING.md, CODINGSTYLE.md, CONTRIBUTING.md

It is already there

  • minimal, focused changes

I will add it

  • do not add, remove, or update dependencies

Maybe we can say unless I explicitly mention ?

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.

I will remove unnecessary ones and add commits msg format.

Thanks !

Copy link
Copy Markdown
Member

@gacevicljubisa gacevicljubisa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, maybe it would be good to add CLAUDE.md with short disclosure that instructions are in AGENT.md?

Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread AGENTS.md

## Coding conventions (summary)

Authoritative detail: `CODING.md` and `CODINGSTYLE.md`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

references the same files that were mentioned before, not sure if it's needed

Comment thread AGENTS.md
### 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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typed errors

Comment thread AGENTS.md
## 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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread AGENTS.md

- 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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was mentioned at least once above, and it is also mentioned in the coding guidelines that are referred to

Comment thread AGENTS.md
- 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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this repeats stuff that was already mentioned

Comment thread AGENTS.md
- 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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just add the command at the dev commands section (with an inline comment that it should be used after changing protobuf specs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add CLAUDE.md / AGENTS.md for AI coding assistant context

4 participants