mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-07 22:19:08 +02:00
[agent-network] Polish module docs: remove internal review scaffolding, fix links, verify diagrams
Strip PR-review framing, commit references, absolute paths, and stale internal references from the agent-network module docs; fix broken relative links; verify all diagrams against the current architecture. Remove the internal AI-reviewer prompt file.
This commit is contained in:
@@ -1,34 +1,32 @@
|
||||
# agent-networks PR — review pack
|
||||
# Agent Networks — architecture documentation
|
||||
|
||||
A self-contained set of review documents for the agent-networks PR pair:
|
||||
`feature/agent-networks-backend` on this repo (netbird) and
|
||||
`feature/agent-networks` on the dashboard repo.
|
||||
A self-contained set of documents describing the agent-networks feature:
|
||||
an LLM-aware reverse-proxy middleware system plus account-level controls
|
||||
(budget rules, log collection toggles, PII redaction). The management
|
||||
server synthesises a per-peer middleware chain that the proxy executes on
|
||||
every LLM request.
|
||||
|
||||
## What to read first
|
||||
|
||||
1. **[00-overview.md](00-overview.md)** — the single entry point. PR
|
||||
scope, commit list, ownership matrix, risk hot-list, and links to
|
||||
every per-module guide.
|
||||
1. **[00-overview.md](00-overview.md)** — the single entry point. Feature
|
||||
scope, the module map, and the cross-cutting topics worth keeping in
|
||||
mind, with links to every per-module guide.
|
||||
2. **[01-end-to-end-flows.md](01-end-to-end-flows.md)** — three
|
||||
high-level mermaid diagrams: config-to-runtime synth/delivery,
|
||||
per-request lifecycle through the LLM chain, and the budget-rule
|
||||
feedback loop.
|
||||
3. **Per-module guides** under `modules/` — one file per
|
||||
review-able package. Each names its reviewer profile, lists commits
|
||||
in scope, shows file-level changes, includes its own flow diagrams,
|
||||
and calls out what to scrutinize.
|
||||
4. **[90-agent-review-prompt.md](90-agent-review-prompt.md)** — a
|
||||
self-contained prompt to feed to another AI agent (or a parallel
|
||||
reviewer) to perform structured code review against the same scope.
|
||||
3. **Per-module guides** under `modules/` — one file per package. Each
|
||||
describes the module boundary, the file-level layout, its own flow
|
||||
diagrams, the public contracts, the invariants it relies on, and the
|
||||
areas worth the closest attention.
|
||||
|
||||
## Directory layout
|
||||
|
||||
```
|
||||
docs/agent-networks/
|
||||
├── README.md # you are here
|
||||
├── 00-overview.md # PR summary + ownership matrix
|
||||
├── 00-overview.md # feature summary + module map
|
||||
├── 01-end-to-end-flows.md # cross-module mermaid diagrams
|
||||
├── 90-agent-review-prompt.md # prompt for an AI code reviewer
|
||||
└── modules/
|
||||
├── 10-shared-api.md # proto + OpenAPI wire contracts
|
||||
├── 20-management-store.md # SQL persistence layer
|
||||
@@ -38,47 +36,31 @@ docs/agent-networks/
|
||||
├── 31-proxy-middleware-builtin.md # 8 LLM-aware middlewares
|
||||
├── 32-proxy-llm-parsers.md # OpenAI/Anthropic/Bedrock SDKs + pricing
|
||||
├── 33-proxy-runtime.md # translate + serve + access-log
|
||||
├── 40-dashboard.md # UI for everything above (lives in the dashboard repo at feature/agent-networks)
|
||||
├── 40-dashboard.md # UI for everything above (lives in the dashboard repo)
|
||||
└── 50-path-routed-providers.md # Vertex AI + Bedrock (path-routed, keyfile:: creds, /bedrock prefix)
|
||||
```
|
||||
|
||||
The `40-dashboard.md` module documents code that lives in the **dashboard
|
||||
repo** (`feature/agent-networks` branch), not in this repo. The guide is
|
||||
co-located here so backend reviewers see the full picture in one place.
|
||||
repo**, not in this repo. The guide is co-located here so backend readers
|
||||
see the full picture in one place.
|
||||
|
||||
## How the per-module guides are structured
|
||||
|
||||
Every `modules/*.md` follows the same template so reviewers can scan a
|
||||
familiar shape:
|
||||
Every `modules/*.md` follows the same template so the docs are easy to
|
||||
scan:
|
||||
|
||||
- **Reviewer profile / time / risk / backward-compat impact** — fits in
|
||||
a single quote block at the top so triaging the file is a one-glance
|
||||
decision.
|
||||
- **Module boundary** — what this package owns within the PR; where it
|
||||
sits in the stack.
|
||||
- **Commits in scope** — pinned to the file scope, not the whole PR.
|
||||
- **Files changed** — path / status / LOC / role.
|
||||
- **Module boundary** — what this package owns; where it sits in the stack.
|
||||
- **Files** — path / role.
|
||||
- **Architecture & flow** — one or more mermaid diagrams.
|
||||
- **Public contracts** — function signatures, gRPC messages, JSON
|
||||
shapes, etc.
|
||||
- **Invariants** — semantic guarantees the module relies on or
|
||||
enforces.
|
||||
- **Public contracts** — function signatures, gRPC messages, JSON shapes.
|
||||
- **Invariants** — semantic guarantees the module relies on or enforces.
|
||||
- **Things to scrutinize** — split by correctness / security /
|
||||
concurrency / backward-compat / performance / observability.
|
||||
- **Test coverage** — every test file that locks down behavior in this
|
||||
- **Test coverage** — the test files that lock down behaviour in this
|
||||
module.
|
||||
- **Known limitations / non-goals** — what reviewers should NOT flag as
|
||||
bugs (out of scope on purpose).
|
||||
- **Known limitations / non-goals** — what is intentionally out of scope.
|
||||
- **Cross-references** — upstream/downstream module links + the
|
||||
end-to-end flow + the overview.
|
||||
|
||||
## Repos covered
|
||||
|
||||
- **Backend (this repo):** `feature/agent-networks-backend` —
|
||||
28 commits vs merge-base `14af17955`, ~28k net LOC added.
|
||||
- **Dashboard:** `feature/agent-networks` on
|
||||
`netbirdio/netbird-dashboard` — ~70 commits vs `main`, ~10k net LOC
|
||||
added.
|
||||
|
||||
See [00-overview.md](00-overview.md) for the full ownership matrix,
|
||||
commit roll-up, and cross-cutting risk hot-list.
|
||||
See [00-overview.md](00-overview.md) for the module map and the
|
||||
cross-cutting topics.
|
||||
|
||||
Reference in New Issue
Block a user