Skip to content

Align documentation with TypeScript SDK structure #14

@nficano

Description

@nficano

Goal

Align this SDK's docs/ directory with the canonical layout used by the TypeScript SDK. The conceptual pages (getting-started, architecture, transports, guides, etc.) are identical across every SDK. The per-source-unit subdirectory adapts to whatever the language calls its organizational unit — and only exists if this SDK actually has multiple such units.

The TS SDK uses docs/packages/ because it is a TypeScript monorepo with multiple npm packages. Do not blindly copy that name. If this SDK has multiple .NET projects, use docs/projects/. Multiple Gradle modules → docs/modules/. Multiple SwiftPM targets → docs/targets/. One single artifact → omit the subdirectory entirely — there is nothing to mirror.

The TS docs/README.md shape (Start here / Guides / Packages / Reference / Diagrams) is the index template — replace its "Packages" section with whatever this SDK's source-unit name is, or remove it if this SDK has only one artifact.

Current state (java-sdk)

  • Numbered structure: 00-overview.md, 01-quickstart.md, 02-concepts.md, 03-features/*, 05-reference/* (only 3 files: api-overview, error-taxonomy, wire-format).
  • Per-feature pages need folding into spec-aligned guides.
  • No README.md index, no per-module pages despite 10 Gradle modules.
  • Existing related tickets: Add per-package API reference docs #11 (per-package API ref).

Target structure

docs/
├── README.md                       # index, links to everything below
├── getting-started.md              # install + minimal client+runtime example
├── architecture.md                 # how the modules fit together (references docs/diagrams/architecture-*.svg)
├── transports.md                   # WebSocket, stdio, in-memory; selection guide
├── cli.md                          # the `arcp` binary (omit only if SDK ships no CLI)
├── recipes.md                      # copy-paste solutions to common problems
├── conformance.md                  # spec coverage by section
├── troubleshooting.md              # error codes + fixes
├── guides/
│   ├── sessions.md                 # spec §6
│   ├── resume.md                   # spec §6.3
│   ├── auth.md                     # spec §6.1
│   ├── jobs.md                     # spec §7
│   ├── job-events.md               # spec §8
│   ├── leases.md                   # spec §9
│   ├── delegation.md               # spec §10
│   ├── observability.md            # spec §11
│   ├── errors.md                   # spec §12
│   └── vendor-extensions.md        # spec §15
└── diagrams/                       # graphviz sources + rendered light/dark SVGs

Per-source-unit pages

Source has 10 Gradle modules at repo root. Gradle calls them modules — use docs/modules/:

docs/modules/
├── arcp.md                          # `arcp` (BOM / meta)
├── arcp-core.md                     # `arcp-core`
├── arcp-client.md                   # `arcp-client`
├── arcp-runtime.md                  # `arcp-runtime`
├── arcp-runtime-jetty.md            # `arcp-runtime-jetty`
├── arcp-middleware-jakarta.md       # `arcp-middleware-jakarta`
├── arcp-middleware-spring-boot.md   # `arcp-middleware-spring-boot`
├── arcp-middleware-vertx.md         # `arcp-middleware-vertx`
├── arcp-otel.md                     # `arcp-otel`
└── arcp-tck.md                      # `arcp-tck`

Authoring rules

  • Guides are spec-aligned, not feature-aligned. If the SDK currently has features/heartbeat.md, features/ack.md, etc., fold them into guides/job-events.md. If it has features/cost-budget.md, fold into guides/jobs.md (or its own guides/budgets.md only if it would otherwise be >2 screens).
  • docs/README.md is the index. Four sections (or three if no multi-artifact split): Start here, Guides, (if applicable), Reference. No content lives only in the index.
  • Diagrams use <picture> with prefers-color-scheme and ship both light + dark SVGs. Reference the architecture diagram from docs/README.md and docs/architecture.md.
  • Spec links point at ../../spec/docs/draft-arcp-1.1.md#section so they survive renames.
  • No orphan pages. Anything not linked from docs/README.md must be deleted or linked.
  • CONFORMANCE.md at repo root stays authoritative; docs/conformance.md summarizes + links to it.

Migration map

  • 00-overview.mddocs/README.md
  • 01-quickstart.mddocs/getting-started.md
  • 02-concepts.mddocs/architecture.md
  • 03-features/ack.md, heartbeats.md, progress.md, result-chunk.md, subscribe.md → fold into docs/guides/job-events.md
  • 03-features/cost-budget.mddocs/guides/jobs.md
  • 03-features/agent-versions.mddocs/architecture.md (Versioning)
  • 03-features/lease-expires-at.mddocs/guides/leases.md
  • 03-features/list-jobs.mddocs/guides/jobs.md
  • 05-reference/api-overview.md → split per module into docs/modules/*
  • 05-reference/error-taxonomy.mddocs/guides/errors.md
  • 05-reference/wire-format.mddocs/architecture.md or docs/modules/arcp-core.md
  • Create new: docs/transports.md, docs/cli.md (if applicable), docs/recipes.md, docs/conformance.md, docs/troubleshooting.md, docs/guides/{sessions,resume,auth,jobs,leases,delegation,observability,vendor-extensions}.md

Acceptance

  • Every conceptual file in the target structure exists (except cli.md if this SDK truly has no CLI — note the omission in docs/README.md)
  • docs/README.md matches the four-section shape of TS docs/README.md, substituting this SDK's source-unit term (or omitting that section entirely if single-artifact)
  • Every page is linked from docs/README.md; no orphans
  • Old feature-shaped pages (features/*, concepts/*, numeric NN-*.md) deleted or merged into canonical pages
  • Diagrams use <picture> light/dark and render on GitHub

Closes / supersedes

Reference

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions