Skip to content

docs: add structured documentation#61

Merged
jmagar merged 2 commits intomainfrom
docs/structured-documentation
Apr 5, 2026
Merged

docs: add structured documentation#61
jmagar merged 2 commits intomainfrom
docs/structured-documentation

Conversation

@jmagar
Copy link
Copy Markdown
Owner

@jmagar jmagar commented Apr 5, 2026

Summary

  • Add structured documentation in docs/ organized into four sections: root (README, SETUP, CONFIG, CHECKLIST, GUARDRAILS, INVENTORY), mcp/ (TOOLS, ENV, TRANSPORT, DEPLOY, CONNECT, DEV, PATTERNS), repo/ (REPO, RECIPES, SCRIPTS, RULES, MEMORY), and stack/ (ARCH, TECH, PRE-REQS)
  • All content derived from the actual codebase (CLAUDE.md, Cargo.toml, axon.json, .env.example, Justfile, docker/, crates/) -- no template placeholders
  • Preserves all existing docs/ content and adds cross-links between old and new documentation

Test plan

  • Verify no broken links in new docs
  • Confirm existing docs still accessible from updated README.md
  • Check all AGENTS.md/GEMINI.md symlinks resolve correctly

Summary by cubic

Adds a structured documentation system under docs/ with four sections: root, mcp/, repo/, and stack/, built from real project files. Also bumps version to 0.35.1 and updates CHANGELOG.md.

  • Refactors
    • Organized docs/ into root, mcp/ (TOOLS, ENV, TRANSPORT, DEPLOY, CONNECT, DEV, PATTERNS), repo/ (REPO, RECIPES, SCRIPTS, RULES, MEMORY), and stack/ (ARCH, TECH, PRE-REQS).
    • Replaced placeholders with content from Cargo.toml, axon.json, .env.example, Justfile, docker/, and crates/.
    • Preserved legacy docs and updated docs/README.md with links between old and new pages.
    • Bumped version to 0.35.1 in Cargo.toml and .codex-plugin/plugin.json; added CHANGELOG.md entry.

Written for commit ab5e47c. Summary will update on new commits.

Create comprehensive documentation organized into four sections:
- Root: README, SETUP, CONFIG, CHECKLIST, GUARDRAILS, INVENTORY
- mcp/: TOOLS, ENV, TRANSPORT, DEPLOY, CONNECT, DEV, PATTERNS
- repo/: REPO, RECIPES, SCRIPTS, RULES, MEMORY
- stack/: ARCH, TECH, PRE-REQS

All content is derived from the actual codebase (CLAUDE.md, Cargo.toml,
axon.json, .env.example, Justfile, docker/, crates/). No template
placeholders remain. Existing docs/ content is preserved and cross-linked.
Copilot AI review requested due to automatic review settings April 5, 2026 03:36
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 5, 2026

Warning

Rate limit exceeded

@jmagar has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 28 minutes and 51 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 28 minutes and 51 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 574a2e76-8004-447e-96eb-21d56cc91af7

📥 Commits

Reviewing files that changed from the base of the PR and between 0307779 and ab5e47c.

📒 Files selected for processing (33)
  • .codex-plugin/plugin.json
  • CHANGELOG.md
  • Cargo.toml
  • docs/CHECKLIST.md
  • docs/CONFIG.md
  • docs/GUARDRAILS.md
  • docs/INVENTORY.md
  • docs/README.md
  • docs/SETUP.md
  • docs/mcp/AGENTS.md
  • docs/mcp/CLAUDE.md
  • docs/mcp/CONNECT.md
  • docs/mcp/DEPLOY.md
  • docs/mcp/DEV.md
  • docs/mcp/ENV.md
  • docs/mcp/GEMINI.md
  • docs/mcp/PATTERNS.md
  • docs/mcp/TOOLS.md
  • docs/mcp/TRANSPORT.md
  • docs/repo/AGENTS.md
  • docs/repo/CLAUDE.md
  • docs/repo/GEMINI.md
  • docs/repo/MEMORY.md
  • docs/repo/RECIPES.md
  • docs/repo/REPO.md
  • docs/repo/RULES.md
  • docs/repo/SCRIPTS.md
  • docs/stack/AGENTS.md
  • docs/stack/ARCH.md
  • docs/stack/CLAUDE.md
  • docs/stack/GEMINI.md
  • docs/stack/PRE-REQS.md
  • docs/stack/TECH.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/structured-documentation

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ccaee6d779

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

| Endpoint | Method | Description |
|----------|--------|-------------|
| `/mcp` | POST | MCP JSON-RPC with streamable-http |
| `/health` | GET | Health check |
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Remove nonexistent MCP /health endpoint from docs

This table documents GET /health as an MCP HTTP endpoint, but run_http_server only registers "/mcp" in crates/mcp/server.rs, so health probes against port 8001 will return 404. Any user or automation following this doc for liveness checks will incorrectly treat a healthy MCP server as down.

Useful? React with 👍 / 👎.


## Lifecycle action families

These actions require a `subaction`. All support: `start`, `status`, `cancel`, `list`, `cleanup`, `clear`, `recover`.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Fix lifecycle subaction list for graph operations

The doc says all lifecycle families support start/status/cancel/list/cleanup/clear/recover, but graph does not: GraphSubaction only allows build/status/explore/stats in crates/mcp/schema.rs. Clients implementing from this sentence will send unsupported subactions like graph:start and hit invalid_params errors.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a new structured documentation set under docs/ (root + mcp/, repo/, stack/) and updates docs/README.md to act as the new central index while keeping links to the existing “legacy” docs.

Changes:

  • Added new structured docs for stack architecture/tech/prereqs, MCP transport/tools/patterns/dev, and repo rules/recipes/scripts/memory.
  • Added root reference docs (SETUP.md, CONFIG.md, GUARDRAILS.md, CHECKLIST.md, INVENTORY.md).
  • Rewrote docs/README.md into a high-level product + doc navigation entry point.

Reviewed changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
docs/README.md Replaces the old index with a structured navigation page that links new + existing docs.
docs/SETUP.md Adds a step-by-step setup guide for local + Docker workflows.
docs/CONFIG.md Adds an environment variable + axon.json configuration reference.
docs/CHECKLIST.md Adds a release-quality checklist (build, infra, security, docs).
docs/GUARDRAILS.md Adds security guardrails and operational safety notes.
docs/INVENTORY.md Adds a component inventory across MCP/CLI/infra/workers/crates.
docs/mcp/CLAUDE.md Index page for MCP documentation.
docs/mcp/TOOLS.md Documents the single MCP tool and action/subaction API surface.
docs/mcp/ENV.md Documents MCP-specific environment variables and lite-mode behavior.
docs/mcp/TRANSPORT.md Documents stdio/HTTP/both transport configuration.
docs/mcp/DEPLOY.md Documents local/Docker/lite deployment patterns for MCP.
docs/mcp/CONNECT.md Documents client connection setup (Claude Code/Codex/Gemini).
docs/mcp/DEV.md Documents MCP development workflow and testing.
docs/mcp/PATTERNS.md Documents MCP code patterns (dispatch/artifacts/errors/capabilities).
docs/repo/CLAUDE.md Index page for repo documentation.
docs/repo/REPO.md Documents repository structure and key directories/files.
docs/repo/RECIPES.md Documents Justfile recipes.
docs/repo/SCRIPTS.md Documents scripts in scripts/ by category.
docs/repo/RULES.md Documents coding rules, policies, and enforced conventions.
docs/repo/MEMORY.md Documents “bd/beads” persistence workflow and session protocol.
docs/stack/CLAUDE.md Index page for stack documentation.
docs/stack/ARCH.md Documents architecture overview (modes, workers, flows, ports).
docs/stack/TECH.md Documents technology choices and key dependency stack.
docs/stack/PRE-REQS.md Documents prerequisite tools/versions and infra service ports.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

| Component | Technology | Version | Purpose |
|-----------|-----------|---------|---------|
| Core binary | Rust | 1.94+ (edition 2024) | CLI, MCP server, workers, backend bridge |
| Web UI | TypeScript + Next.js | Node 22+ | Dashboard, Pulse workspace |
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

The documented Web UI runtime requirement (Node 22+) is out of sync with the repository’s actual requirement. apps/web/package.json sets engines.node to >=24, so this should be updated here (and anywhere else Node is mentioned) to avoid dev setup failures.

Suggested change
| Web UI | TypeScript + Next.js | Node 22+ | Dashboard, Pulse workspace |
| Web UI | TypeScript + Next.js | Node 24+ | Dashboard, Pulse workspace |

Copilot uses AI. Check for mistakes.
| Redis | 8.2-alpine | Queue state, cancel flags, caching |
| RabbitMQ | 4.0-management | AMQP job queue with 6 queues |
| Qdrant | v1.13.1 | Vector database (dense + sparse search) |
| TEI | HuggingFace latest | Text embedding generation |
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

The TEI image/version listed as “HuggingFace latest” doesn’t match docker-compose.services.yaml (ghcr.io/huggingface/text-embeddings-inference:89-latest). Consider documenting the pinned tag (or explicitly stating where it’s pinned) so operators know what will actually run.

Suggested change
| TEI | HuggingFace latest | Text embedding generation |
| TEI | `ghcr.io/huggingface/text-embeddings-inference:89-latest` (pinned in `docker-compose.services.yaml`) | Text embedding generation |

Copilot uses AI. Check for mistakes.
Comment on lines +12 to +15
| just | latest | `cargo install just` | Task runner |
| Node.js | 22+ | [nodejs.org](https://nodejs.org/) | Web UI runtime |
| pnpm | 9+ | `corepack enable` | Web UI package manager |
| jq | 1.6+ | System package manager | JSON parsing in scripts |
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

Node/pnpm versions here don’t match the repo’s enforced engines. apps/web/package.json requires Node >=24 and pnpm >=10, but this table (and the verify snippet below) says Node 22+ and pnpm 9+. Please align these to prevent developers from setting up an incompatible toolchain.

Copilot uses AI. Check for mistakes.
Comment on lines +21 to +30
```bash
rustc --version # rustc 1.94.x
cargo --version # cargo 1.94.x
docker --version # Docker 24+
docker compose version # Docker Compose v2+
just --version # just x.y.z
node --version # v22.x.x
pnpm --version # 9.x.x
jq --version # jq-1.6+
python3 --version # Python 3.10+
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

The version-check examples still reference Node 22 / pnpm 9, but apps/web/package.json requires Node >=24 and pnpm >=10. Please update these expected outputs so the “Verify” section reflects the actual supported versions.

Copilot uses AI. Check for mistakes.
Comment on lines +13 to +14
| Node.js | 22+ | Web UI (Next.js) |
| pnpm | 9+ | Web UI package manager |
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

This prerequisites table lists Node.js 22+ and pnpm 9+, but the web app enforces newer versions (apps/web/package.json has engines.node: >=24 and engines.pnpm: >=10). Please update these to match the enforced engines to avoid setup confusion.

Suggested change
| Node.js | 22+ | Web UI (Next.js) |
| pnpm | 9+ | Web UI package manager |
| Node.js | 24+ | Web UI (Next.js) |
| pnpm | 10+ | Web UI package manager |

Copilot uses AI. Check for mistakes.
Comment on lines +49 to +56
Error responses:

```json
{
"ok": false,
"error": "description of the failure"
}
```
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

The documented error response shape ({ "ok": false, "error": ... }) does not match how the MCP server actually reports failures. In the implementation, failures are returned as MCP JSON-RPC errors (invalid_params, internal_error, etc.) via rmcp::ErrorData, not as an AxonToolResponse JSON envelope. Please update this section to reflect the real wire behavior.

Copilot uses AI. Check for mistakes.
Comment on lines +58 to +66
### Response modes

| Mode | Behavior |
|------|----------|
| `path` (default) | Write result to `.cache/axon-mcp/` artifact file, return metadata (path, bytes, sha256, preview) |
| `inline` | Return full result inline (capped/truncated) |
| `both` | Write artifact and return inline content |
| `auto_inline` | Inline if payload is below `AXON_INLINE_BYTES_THRESHOLD` (default 8192), otherwise artifact |

Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

The artifact metadata described here (path/bytes/sha256/preview, etc.) is out of sync with the current MCP artifact response shape. The implementation returns a data object containing response_mode plus fields like artifact (with path, relative_path, bytes, line_count, sha256) and sometimes shape / inline / truncated; it does not include a preview field as described. Please align this section with crates/mcp/server/artifacts/respond.rs so consumers can parse responses correctly.

Copilot uses AI. Check for mistakes.
Comment on lines +9 to +24
### Schema parsing

Input is parsed strictly with serde in `crates/mcp/schema.rs`:

```rust
#[derive(Deserialize)]
pub struct McpInput {
pub action: Action,
pub subaction: Option<Subaction>,
pub url: Option<String>,
pub urls: Option<Vec<String>>,
pub query: Option<String>,
pub response_mode: Option<ResponseMode>,
// ... per-action fields
}
```
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

The schema parsing example is stale: the MCP request type is a tagged enum (AxonRequest with #[serde(tag = "action", rename_all = "snake_case")]) rather than a single McpInput struct as shown. Updating this to match crates/mcp/schema.rs will prevent contributors from following an incorrect model when adding fields/actions.

Copilot uses AI. Check for mistakes.
Comment on lines +64 to +79
## Artifact response pattern

Heavy operations write results to artifact files instead of returning inline:

```
1. Handler executes operation
2. Result serialized to JSON
3. Written to $AXON_MCP_ARTIFACT_DIR/<hash>.json
4. MCP response returns compact metadata:
- path: artifact file path
- bytes: file size
- line_count: lines in artifact
- sha256: content hash
- preview: first N lines
- preview_truncated: boolean
```
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

The “Artifact response pattern” section lists response fields like preview, preview_truncated, and implies artifacts are always written when using default behavior. The current implementation can return response_mode: "auto-inline" (no artifact write) when response_mode is omitted and the payload is below AXON_INLINE_BYTES_THRESHOLD, and the artifact metadata fields differ (see crates/mcp/server/artifacts/respond.rs). Please update this section to match actual behavior/field names.

Copilot uses AI. Check for mistakes.
Comment on lines +139 to +147
## Verifying connection

```bash
# HTTP health check
curl -s http://localhost:8001/health

# Test via doctor
axon doctor

Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

This verification snippet uses curl -s http://localhost:8001/health, but the MCP HTTP server only mounts /mcp (no /health route). Please update the example to use a working verification step (e.g., a tools/list or tools/call request against /mcp, or axon doctor).

Copilot uses AI. Check for mistakes.
@jmagar jmagar merged commit ab5e47c into main Apr 5, 2026
13 of 21 checks passed
@jmagar jmagar deleted the docs/structured-documentation branch April 5, 2026 07:35
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.

2 participants