[#179] Add local API docs to CLAUDE.md#182
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
realproject7
left a comment
There was a problem hiding this comment.
@re2 REQUEST CHANGES
Two minor issues:
-
Genre count off by one: docs say "Genres (22)" but
lib/genres.tshas 21 entries (count them — Others is the 21st). Should be Genres (21). -
Missing endpoint:
POST /api/stories/:name/:file/mark-not-indexedexists inapp/routes/stories.tsbut is not listed in the Stories table.
Otherwise the docs are thorough and accurate — endpoints, auth flow, workflows, and language list all check out.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: REQUEST CHANGES
Summary
The new section covers the main auth and publishing workflows, but it does not yet satisfy the issue scope of documenting the local API without source-code lookup. Several existing app route endpoints are missing, and one auth/passphrase storage detail is inaccurate.
Findings
-
[medium]
CLAUDE.mdsays the OWS passphrase is stored hashed in~/.plotlink-ows/.env, but the auth route writes the raw passphrase asOWS_PASSPHRASEand hashes it only for comparison.- File:
CLAUDE.md:39 - Suggestion: Reword this to say the passphrase is stored in
~/.plotlink-ows/.envasOWS_PASSPHRASEand is used to decrypt/sign with the OWS wallet. Avoid claiming the env value is hashed.
- File:
-
[medium] The docs omit existing API routes, so an agent still has to inspect source for part of
app/routes/.- File:
CLAUDE.md:72 - Suggestion: Add the missing
POST /api/stories/:name/:file/mark-not-indexedendpoint fromapp/routes/stories.ts, and add a Terminal section forapp/routes/terminal.tsendpoints such asPOST /api/terminal/spawn,GET /api/terminal/session/:storyName,GET /api/terminal/status,POST /api/terminal/rename,POST /api/terminal/stop,DELETE /api/terminal/:storyName, andDELETE /api/terminal/:storyName/discard. The issue explicitly asks for otherapp/routes/endpoints, and the PR currently documents wallet/dashboard/settings but skips terminal entirely.
- File:
Decision
Requesting changes because the docs are intended as agent-facing API reference material; inaccurate secret-storage wording and missing route coverage undermine the acceptance criteria. I did not identify problems with the WebP/JPEG upload documentation or the 1.0.28 patch bump.
realproject7
left a comment
There was a problem hiding this comment.
@re2 APPROVE — Both issues fixed. Genre count corrected to 21, mark-not-indexed endpoint added. Docs are accurate and comprehensive. LGTM.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Summary
The requested documentation fixes are in place: the passphrase storage wording no longer says the env value is hashed, the missing stories endpoint is listed, and terminal/WebSocket routes are now documented. lint-and-typecheck passed on the latest head.
Findings
- None.
Decision
Approving. The added CLAUDE.md API reference now satisfies issue #179 closely enough for agents to discover auth, publish, stories, terminal, wallet, dashboard, and settings workflows without reading route source.
Summary
CLAUDE.mdcovering:lib/genres.ts)Fixes #179
Test plan
lib/genres.ts🤖 Generated with Claude Code