docs(agents): add comment-style guidance and symlink CLAUDE.md to AGENTS.md (#1725)

## Summary
- Add an `AGENTS.md` guideline: write comments as if the reader is new
to the codebase but already familiar with the project's goal — explain
the local "why" and non-obvious decisions, not what the project is
trying to achieve.
- Replace `CLAUDE.md` (previously a 5-line stub) with a symlink to
`AGENTS.md` so both entrypoints share a single source of truth.

Link to Devin session:
https://app.devin.ai/sessions/899d319b4b5648d1bb930c2ada976e3f
Requested by: @mantrakp04

<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Add comment-writing guidance in AGENTS.md to explain local “why” and
non-obvious decisions for newcomers. Replace the previous `CLAUDE.md`
stub with a symlink to `AGENTS.md` to keep a single source of truth.

<sup>Written for commit 9bd9570c66.
Summary will update on new commits.</sup>

<a
href="https://cubic.dev/pr/hexclave/hexclave/pull/1725?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>

<!-- End of auto-generated description by cubic. -->



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
* Updated guidance on writing comments to focus on local context and
non-obvious decisions for readers new to the codebase.
* Removed a list of documented command examples from the project notes.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: mantra <mantra@stack-auth.com>
This commit is contained in:
Mantra 2026-07-10 19:17:50 -07:00 committed by GitHub
parent 67e3350693
commit 4144ad039b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 5 deletions

View File

@ -119,6 +119,7 @@ To see all development ports, refer to the index.html of `apps/dev-launchpad/pub
- When adding code to the `private` part of the backend, put the actual implementation into `implementation` (if the submodule is checked out), and implement a simple fallback in `implementation-fallback` for self-hosters. `implementation.generated.ts` will automatically be generated, which you can then import from `index.ts`. (See the existing code as an example.) If the submodule isn't checked out, but you need to add code to the `private` part of the backend, let the user know.
- Security-sensitive code on the backend that shouldn't be public should be in the `private` part of the backend.
- When you fix some obscure bug, or otherwise make a small change that is the result of a complex thought, add a concise comment explaining the thought in detail. Your mental model should be that we want to keep track of all the tiny decisions that are not clearly visible in the code, such that when/if we rewrite the code in the future, we don't have to re-learn all the tiny decisions that were made iteratively.
- Write comments as if the reader is new to the codebase but already familiar with the goal of the project. Don't explain what the project is trying to achieve; instead, explain the local context they'd be missing — why this particular piece of code exists, the non-obvious decisions behind it, and how it fits into the surrounding code.
- If you create any temporary files, always suffix them with `.untracked` or `.untracked.<ext>` so they don't get committed to Git.
- Super important: WE ARE AN OPEN-SOURCE PROJECT. NEVER PUT ANYTHING POTENTIALLY PRIVATE, SECURITY-SENSITIVE, OR CONFIDENTIAL INTO THE CODEBASE OR ANY PULL REQUEST DESCRIPTIONS. Don't mention customer data, security details, or other potentially sensitive information in comments, pull request descriptions, commit messages, or anywhere else.

View File

@ -1,5 +0,0 @@
# Hexclave
## Commands
- **Lint**: `pnpm lint`
- **Typecheck**: `pnpm typecheck`

1
CLAUDE.md Symbolic link
View File

@ -0,0 +1 @@
AGENTS.md