Skip to content

feat: add claude.md#305

Merged
ninja-shreyash merged 7 commits intomainfrom
sv/add-claude-md
Mar 25, 2026
Merged

feat: add claude.md#305
ninja-shreyash merged 7 commits intomainfrom
sv/add-claude-md

Conversation

@ninja-shreyash
Copy link
Copy Markdown
Contributor

@ninja-shreyash ninja-shreyash commented Mar 22, 2026

Summary

Adds CLAUDE.md — the single source of truth for all SDK conventions, rules, and patterns. Loaded automatically into every Claude Code conversation in this repo.

What's in it

  • Architecture — repo layout, service map (import paths → services → patterns), BaseService vs FolderScopedService, dual auth, error hierarchy
  • Code style — casing rules, file naming, optional fields
  • Service conventions — type naming ({Entity}GetResponse, Raw{Entity}GetResponse, Options not Request), 3-file model structure, method attachment, export naming, singular vs batch patterns
  • Response transforms — 4-step pipeline, standard field renames, outbound transforms, OData prefix handling
  • Pagination — offset vs token, constants, excludeFromPrefix, conditional return types, setup steps
  • NEVER Do — 30+ anti-patterns organized by category (naming, types, transforms, method binding, internal types, endpoints, OperationResponse, pagination, tests, code hygiene, docs), each with a reason
  • Testing — vitest + shared mocks, integration test helpers, v0/v1 modes
  • Documentation — JSDoc rules, required file updates per PR
  • Verification checklist — commands to run + manual + doc checks before committing
  • Key source files — pattern-to-file lookup table

How it works with the onboard-api skill

CLAUDE.md has the conventions (always loaded). The /onboard-api skill (PR #302) has the workflow (loaded on demand). No duplication between them — the skill references conventions already in context.

For non-onboarding work (bug fixes, refactoring, reviews), CLAUDE.md applies directly without any skill.

Test plan

  • Verify conventions match existing code patterns
  • Verify NEVER Do items match actual PR review feedback
  • Invoke /onboard-api and confirm it follows CLAUDE.md conventions during implementation

Copy link
Copy Markdown
Collaborator

@Raina451 Raina451 left a comment

Choose a reason for hiding this comment

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

can you add this in agents.md, and in claude.md refer agents.md ? as agents.md is generic used by other agentic ides.

Copy link
Copy Markdown
Collaborator

@Raina451 Raina451 left a comment

Choose a reason for hiding this comment

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

also as per best practices, we should have claude.md under 200 lines. ref: https://code.claude.com/docs/en/memory#write-effective-instructions

can we move some part of it in .claude/rules or agent_docs? or something and refer that here?
The recommended approach is to use @import references — so instead of embedding everything inline, you point to separate files that load on demand.

@ninja-shreyash ninja-shreyash requested a review from a team March 24, 2026 12:19
@ninja-shreyash
Copy link
Copy Markdown
Contributor Author

The recommended approach is to use https://github.com/import references — so instead of embedding everything inline, you point to separate files that load on demand.

Is it loaded on demand? I think irrespective on @import, it will be loaded by default always. Anyways I have broken it down as per guidelines

Comment thread Agents.md
Comment thread CLAUDE.md Outdated
Comment thread agent_docs/architecture.md Outdated
Comment thread agent_docs/architecture.md Outdated
Comment thread agent_docs/architecture.md Outdated
Comment thread agent_docs/architecture.md Outdated
Comment thread agent_docs/architecture.md Outdated
Comment thread agent_docs/architecture.md Outdated
Comment thread agent_docs/conventions.md Outdated
Comment thread agent_docs/conventions.md Outdated
Comment thread agent_docs/conventions.md
Comment thread agent_docs/conventions.md Outdated
Comment thread agent_docs/rules.md Outdated
@sonarqubecloud
Copy link
Copy Markdown

@ninja-shreyash ninja-shreyash merged commit 8af7d53 into main Mar 25, 2026
12 checks passed
@ninja-shreyash ninja-shreyash deleted the sv/add-claude-md branch March 25, 2026 11:11
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