-
Notifications
You must be signed in to change notification settings - Fork 9
docs(repo): add contributor orientation guides #652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
horacioh
wants to merge
1
commit into
main
Choose a base branch
from
builder-context-kit-docs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,19 @@ | ||
| --- | ||
| description: | ||
| globs: | ||
| description: | ||
| globs: | ||
| alwaysApply: true | ||
| --- | ||
| This mostly includes details about `frontend/apps/web` | ||
|
|
||
| This mostly includes details about `frontend/apps/web`. | ||
|
|
||
| # Tests | ||
|
|
||
| Run tests for things in the `frontend/apps/web`, if there is a test file present. Do this automatically without me asking you! | ||
| Run tests for things in `frontend/apps/web` automatically when there is a relevant test file. | ||
|
|
||
| Use pnpm from the repo root: | ||
|
|
||
| Run the tests by running `yarn web:test run <testFileName>` in the repo root. If you forget to include `run`, you will be stuck in watch mode! Orjust `yarn web:test run` to run all web test. Also you can run `yarn workspace @shm/shared test run` for tests in `frontend/packages/shared` | ||
| - `pnpm --filter @shm/web test -- <testFileName>` for one web test file. | ||
| - `pnpm web:test` for all web tests. | ||
| - `pnpm --filter @shm/shared test -- <testFileName>` for relevant shared package tests. | ||
|
|
||
| If you are working on something that is easily tested, you can offer to create a test | ||
| If you are working on something that is easily tested, offer to create or update a test. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # Backend | ||
|
|
||
| Status: current. | ||
|
|
||
| The backend is the Go runtime for Seed. It contains the daemon, API implementations, blob formats/indexing, SQLite | ||
| storage, P2P networking, and backend tests. | ||
|
|
||
| ## Package map | ||
|
|
||
| | Path | Ownership | | ||
| | -------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | | ||
| | [`api`](./api) | gRPC service implementations and API test helpers. Mirrors `proto/**` service areas. | | ||
| | [`api/documents/v3alpha`](./api/documents/v3alpha) | Documents, resources, comments, contacts, access control, document history. | | ||
| | [`api/entities/v1alpha`](./api/entities/v1alpha) | Entity timeline, search, delete/undelete, discovery entry points. | | ||
| | [`api/activity/v1alpha`](./api/activity/v1alpha) | Activity feed and subscription APIs. | | ||
| | [`api/daemon/v1alpha`](./api/daemon/v1alpha) | Daemon admin/key/vault/domain APIs. | | ||
| | [`blob`](./blob) | Signed blob formats (`Change`, `Ref`, `Comment`, `Capability`, profile/contact), blob store/indexing, visibility propagation. | | ||
| | [`storage`](./storage) | SQLite store, schema source of truth, migrations, local vault storage. Read [`storage/AGENTS.md`](./storage/AGENTS.md) before editing. | | ||
| | [`hmnet`](./hmnet) | libp2p node, Bitswap/file serving, peer/debug endpoints, P2P client/server plumbing. | | ||
| | [`hmnet/syncing`](./hmnet/syncing) | Authorized sync, discovery, scheduling, sync server. | | ||
| | [`daemon`](./daemon) | App composition: storage, index, network, sync, gRPC, HTTP, metrics, reindexing, LLM embedding. | | ||
| | [`cmd/seed-daemon`](./cmd/seed-daemon) | CLI entry point for the daemon binary. | | ||
| | [`core`](./core) | Cryptography, principals, key pairs, keystores, mnemonics. | | ||
| | [`config`](./config) | Daemon configuration and defaults. | | ||
| | [`llm`](./llm) | Embedding backends and llama.cpp/Ollama integration. | | ||
| | [`util`](./util) | Shared Go utilities; keep new helpers small and justified. | | ||
|
|
||
| ## Sources of truth | ||
|
|
||
| - Proto contracts: [`../proto`](../proto). | ||
| - DB schema: [`storage/schema.sql`](./storage/schema.sql). | ||
| - DB migrations: [`storage/storage_migrations.go`](./storage/storage_migrations.go). | ||
| - Blob formats: [`blob/blob_*.go`](./blob). | ||
| - Daemon composition: [`daemon/daemon.go`](./daemon/daemon.go). | ||
|
|
||
| ## Common commands | ||
|
|
||
| ```bash | ||
| go test ./backend/... | ||
| golangci-lint run --new-from-merge-base origin/main ./backend/... | ||
| go install ./backend/... # compile-only check | ||
| ./dev run-backend -- -http.port=53001 -grpc.port=53002 -p2p.port=53000 | ||
| ./dev gen //backend/... # after generated schema/proto-affecting changes | ||
| ``` | ||
|
|
||
| For local CI parity before pushing, use the backend workflows from | ||
| [`../docs/local-ci-with-agent-ci.md`](../docs/local-ci-with-agent-ci.md). | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is for agents, why is it in the README.md and not in AGENTS.md?
On the other hand:
I'm not a big fan of listing files and directories in markdown files, because it often confuses the agent when stuff changes and document goes stale. And even if it stays up to date, it would often hallucinate something because it would rely on the docs instead of checking the actual code.
In my experience with Claude, Codex, and Kimi, no amount of asking to keep docs up to date reliably keeps them up to date.
The code itself + per-folder AGENTS.md when necessary works pretty good for me. Some additional tools that would index the code and search for it more quickly also help: