docs: add CLAUDE.md with spec reference#16
Conversation
Links to the code-first-agents spec as the authoritative reference for design decisions, and documents the build commands, dispatch pipeline, output levels, error envelopes, and project conventions.
Greptile SummaryThis PR adds
Confidence Score: 5/5Documentation-only change with no runtime code modifications — safe to merge. The single added file is pure documentation. All factual claims — dispatch pipeline structure, error envelope codes, output level helpers, build commands, and peer dependency version — were verified against the actual source files and package.json. No code is touched. No files require special attention.
|
| Filename | Overview |
|---|---|
| CLAUDE.md | New documentation file providing Claude Code with architecture guidance, build commands, dispatch pipeline description, and project conventions — all verified accurate against the source code. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[argv tokens] --> B[parseArgs\nargs.ts]
B --> C{subcommand}
C -->|schema / help| D[dispatchBuiltin\nauto-registered]
C -->|unregistered / empty| E[rejectUnknown\nunknown_subcommand envelope]
C -->|registered| F[validateInput\nargs.ts safeParse]
F -->|invalid| G[input_validation_error\nenvelope]
F -->|valid| H[handler\nreturns result without ok]
H -->|non-object return| I[non_object_return\nenvelope]
H -->|throws ToolError| J[toolErrorEnvelope\ncustom error code]
H -->|throws other| K[unexpected_error\nenvelope]
H -->|plain object| L[validateOutput\nstamp ok:true then safeParse]
L -->|schema mismatch| M[schema_violation\nenvelope]
L -->|ok field missing| M
L -->|valid| N[success envelope]
D --> O[jsonOutput\nstdout + exit 0]
E --> O
G --> O
I --> O
J --> O
K --> O
M --> O
N --> O
Reviews (2): Last reviewed commit: "fix(docs): correct parseArgs return shap..." | Re-trigger Greptile
The description said {subcommand, flags, positional} but the actual
return type is {subcommand, parsed: {flags, positional}}.
|
🎉 This PR is included in version 0.1.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary
CLAUDE.mdwith architecture guide, build commands, and project conventionsTest plan
CLAUDE.mdrenders correctly on GitHub