Skip to content

docs(spec): client-facing API documentation design#153

Merged
hmchangw merged 27 commits intomainfrom
claude/document-api-methods-X8q0D
May 6, 2026
Merged

docs(spec): client-facing API documentation design#153
hmchangw merged 27 commits intomainfrom
claude/document-api-methods-X8q0D

Conversation

@mliu33
Copy link
Copy Markdown
Collaborator

@mliu33 mliu33 commented May 6, 2026

Design for docs/client-api.md — a single integrator-facing reference
covering POST /auth, all client-facing NATS request/reply methods
(room-service, history-service, search-service), the msg.send publish
flow, and the server-pushed events triggered by each method on success
and error paths.

https://claude.ai/code/session_01MCqYvKJeDyockUPBM2Essv

Summary by CodeRabbit

  • Documentation
    • Added comprehensive client API reference documentation with specifications for method formatting, request/response structures, authentication guidelines, and complete API coverage details.

Design for docs/client-api.md — a single integrator-facing reference
covering POST /auth, all client-facing NATS request/reply methods
(room-service, history-service, search-service), the msg.send publish
flow, and the server-pushed events triggered by each method on success
and error paths.

https://claude.ai/code/session_01MCqYvKJeDyockUPBM2Essv
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 6, 2026

Warning

Rate limit exceeded

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

To continue reviewing without waiting, purchase usage credits in the billing tab.

⌛ 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: ce3c0567-cc5b-4300-be21-1504e140be42

📥 Commits

Reviewing files that changed from the base of the PR and between eb35534 and 23f3a9e.

📒 Files selected for processing (5)
  • CLAUDE.md
  • README.md
  • docs/client-api.md
  • docs/nats-subject-naming.md
  • docs/superpowers/plans/2026-05-06-client-api-doc.md
📝 Walkthrough

Walkthrough

This PR introduces a new client API design documentation specification that establishes conventions, formatting standards, and structural guidelines for the client-facing API reference. It defines required method coverage, per-method block formatting, HTTP/NATS subject conventions, and maintenance procedures.

Changes

Client API Documentation Specification

Layer / File(s) Summary
Documentation Foundation
docs/superpowers/specs/2026-05-06-client-api-doc-design.md (lines 1–80)
Establishes purpose, scope, document location format, and top-level structure for the client API reference specification.
Per-Method Formatting & Structure
docs/superpowers/specs/2026-05-06-client-api-doc-design.md (lines 81–180)
Defines per-method block format including subject naming, request/response envelopes, success and error pathways, and triggered events sections.
HTTP & NATS Surface Definition
docs/superpowers/specs/2026-05-06-client-api-doc-design.md (lines 181–250)
Specifies HTTP endpoint and NATS RPC subject conventions, authentication requirements, and payload schema standardization.
Method Coverage & Maintenance
docs/superpowers/specs/2026-05-06-client-api-doc-design.md (lines 251–320)
Enumerates required method coverage (room-service, history-service, search-service, message-send) and hand-maintenance practices with checklist for automation readiness.
Conventions & Testing
docs/superpowers/specs/2026-05-06-client-api-doc-design.md (lines 321–357)
Codifies ID formatting, example payload conventions, and testing/validation guidelines for API documentation consistency.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~20 minutes

Possibly related PRs

  • hmchangw/chat#25: Defines NATS subject naming conventions that align with this spec's NATS RPC surface requirements.
  • hmchangw/chat#114: Implements search-service design and frontend search spec, which is explicitly enumerated in this spec's required method coverage.

Suggested reviewers

  • Joey0538

Poem

🐰 A spec so neat, a guide so grand,
For API docs across the land,
With NATS subjects, methods clear,
And formats structured, far and near,
The client path now brightly planned! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: introducing design documentation for the client-facing API reference.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/document-api-methods-X8q0D

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

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/superpowers/specs/2026-05-06-client-api-doc-design.md`:
- Line 58: Fenced code blocks in the spec are missing a language tag (MD040);
update the three fences that begin near the "Overview", "Authenticate", and
"<Human-readable method name>" sections to use a language tag (e.g., change ```
to ```text) so markdownlint MD040 is satisfied; search for the three blocks that
start at the same places shown in the diff and prepend "text" (or an appropriate
language) to each opening ``` fence.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e56d953a-a853-425e-bad5-579122302f27

📥 Commits

Reviewing files that changed from the base of the PR and between 1834359 and eb35534.

📒 Files selected for processing (1)
  • docs/superpowers/specs/2026-05-06-client-api-doc-design.md


## Top-level structure

```
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add fence languages for Markdown code blocks (MD040).

Line 58, Line 111, and Line 215 start fenced blocks without a language, which triggers markdownlint MD040.

Suggested fix
-```
+```text
 1. Overview
 2. Connection & Auth
 ...
-```
+```


-```
+```text
 ### Authenticate
 ...
-```
+```


-```
+```text
 ### <Human-readable method name>
 ...
-```
+```

Also applies to: 111-111, 215-215

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 58-58: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/superpowers/specs/2026-05-06-client-api-doc-design.md` at line 58,
Fenced code blocks in the spec are missing a language tag (MD040); update the
three fences that begin near the "Overview", "Authenticate", and
"<Human-readable method name>" sections to use a language tag (e.g., change ```
to ```text) so markdownlint MD040 is satisfied; search for the three blocks that
start at the same places shown in the diff and prepend "text" (or an appropriate
language) to each opening ``` fence.

claude added 26 commits May 6, 2026 00:13
27-task plan to author docs/client-api.md covering POST /auth, all
client-facing NATS request/reply methods (room-service, history-service,
search-service), the msg.send publish flow, plus README/CLAUDE.md
cross-links and a maintenance rule.

https://claude.ai/code/session_01MCqYvKJeDyockUPBM2Essv
Adds the shared Message schema subsection (Cassandra Message row,
Participant, QuotedParentMessage UDTs) and the Load History method block
under §3.2 history-service, as the first of Tasks 14–21.

https://claude.ai/code/session_01MCqYvKJeDyockUPBM2Essv
Appends the Edit Message RPC block under §3.2 history-service, covering
request/response schemas, error cases, and the MessageEditedEvent triggered
on success.

https://claude.ai/code/session_01MCqYvKJeDyockUPBM2Essv
Appends the Delete Message RPC block under §3.2 history-service,
covering request/response shapes, idempotency, sender-only auth,
triggered events, and the CAS / already-deleted no-publish edge cases.

https://claude.ai/code/session_01MCqYvKJeDyockUPBM2Essv
@hmchangw hmchangw merged commit 739fc57 into main May 6, 2026
1 check passed
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.

3 participants