Skip to content

chore(claude): add CLAUDE instructions for repo#19

Merged
behinddwalls merged 3 commits into
mainfrom
chore-claude-add-claude
Feb 17, 2026
Merged

chore(claude): add CLAUDE instructions for repo#19
behinddwalls merged 3 commits into
mainfrom
chore-claude-add-claude

Conversation

@behinddwalls
Copy link
Copy Markdown
Collaborator

@behinddwalls behinddwalls commented Feb 16, 2026

Why?

To document the repository structure, extension system, and development workflows for AI-assisted development and developer onboarding.

What?

Adds CLAUDE.md covering:

  • Bazel/Bzlmod build system and commands
  • Extension pattern (extensions/{type}/{impl}/) for pluggable backends
  • Entity organization (entities/{domain}/)
  • Development workflows and conventions

@behinddwalls behinddwalls requested review from a team and sbalabanov as code owners February 16, 2026 19:21
@behinddwalls behinddwalls force-pushed the chore-claude-add-claude branch from 4f6ad60 to 80a4041 Compare February 17, 2026 04:58
@behinddwalls
Copy link
Copy Markdown
Collaborator Author

behinddwalls commented Feb 17, 2026

This change is part of the following stack:

Change managed by git-spice.

@behinddwalls behinddwalls changed the base branch from queue-interface to main February 17, 2026 07:29
@behinddwalls behinddwalls force-pushed the chore-claude-add-claude branch from 80a4041 to 6773b3a Compare February 17, 2026 07:30
Comment thread CLAUDE.md
```
extensions/{extension}/{impl}/
├── BUILD.bazel
├── factory.go # Implements Factory interface
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I do not think we always need a factory for each extension

Comment thread CLAUDE.md
│ ├── message_test.go
│ ├── delivery.go # Delivery entity
│ └── delivery_test.go
└── storage/ # Storage domain entities
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I flattened that... Request is a fundamental entity and does not belong to storage. I am not even sure if we need a hierarchy of entities, we will have like couple dozens of them at most?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

i can see entities being flat for all the business layer, maybe we keep the entities for any infra related out of it. like for DB messaging queue...

Comment thread CLAUDE.md Outdated
1. **Never use WORKSPACE**: This repo uses Bzlmod exclusively
2. **Commit generated files**: All `*pb.go` files are committed
3. **Use interfaces for extensions**: Keep implementations swappable
4. **Follow the Factory pattern**: All extensions use Factory interface
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

may be not

@sbalabanov
Copy link
Copy Markdown
Contributor

we will also need to add basic architectural principles around immutability and eventual consistency paradigm, in particular when working with the database

behinddwalls and others added 2 commits February 17, 2026 11:05
## Why?
Address review comments on PR #19 regarding architectural principles,
factory pattern flexibility, and entity organization.

## What?
- Add Core Principles section with immutability and eventual consistency paradigm
- Clarify Factory pattern is usually needed but not always required
- Document entity hierarchy rationale (domain-driven organization)
- Add example code for immutable entity pattern with optimistic locking
- Include guidance on idempotency, event sourcing, and database operations

## Addresses
- sbalabanov's comment: "add basic architectural principles around immutability
  and eventual consistency paradigm, in particular when working with the database"
- sbalabanov's comment: "I do not think we always need a factory for each extension"
- Entity organization clarification (hierarchical by domain vs flat)

## Test Plan
- [x] Documentation changes reviewed for accuracy
- [x] Examples align with existing codebase patterns
@behinddwalls behinddwalls merged commit 61df5d0 into main Feb 17, 2026
1 check passed
@behinddwalls behinddwalls deleted the chore-claude-add-claude branch February 17, 2026 19:06
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.

2 participants