docs: add CLAUDE.md with spec reference#16
Merged
Merged
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CLAUDE.mdwith architecture guide, build commands, and project conventionsTest plan
CLAUDE.mdrenders correctly on GitHub