-
Notifications
You must be signed in to change notification settings - Fork 0
docs: add CLAUDE.md with dev context and coding guidelines reference #110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # Sentinel workflow for docs-only PRs. | ||
| # | ||
| # When a PR touches only *.md / docs / README files, the main CI workflow | ||
| # (ci.yml) is skipped entirely via paths-ignore. GitHub does NOT automatically | ||
| # mark required checks as passing when a workflow is never triggered — it only | ||
| # does so when a workflow is triggered but individual jobs are skipped. | ||
| # | ||
| # This workflow fills that gap: it runs only for docs-only PRs and immediately | ||
| # satisfies the two required checks ("CI check" and "Analyze | ||
| # (javascript-typescript)") so branch protection does not block the merge. | ||
| # | ||
| # For mixed PRs (docs + code), both this workflow and ci.yml trigger. | ||
| # All checks pass, no conflict. | ||
|
|
||
| name: CI (docs-only) | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [main] | ||
| paths: | ||
| - "**/*.md" | ||
| - "docs/**" | ||
| - "examples/**/README.md" | ||
|
|
||
| jobs: | ||
| check: | ||
| name: CI check | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - run: echo "Docs-only PR — full CI skipped" | ||
|
|
||
| analyze: | ||
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
|
||
| name: Analyze (javascript-typescript) | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - run: echo "Docs-only PR — CodeQL skipped" | ||
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
|
||
|
zeevdr marked this conversation as resolved.
|
||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| # OpenDecree TypeScript SDK — Claude Context | ||
|
|
||
| ## Overview | ||
|
|
||
| TypeScript SDK for the OpenDecree configuration service. Wraps the gRPC API with a typed | ||
| client, field-watching subscriptions, version compatibility checks, and optional JWT rotation. | ||
|
|
||
| ## Tech Stack | ||
|
|
||
| | Concern | Tool | | ||
| |---------|------| | ||
| | Language | TypeScript (strict) | | ||
| | Runtime | Node.js 22+ | | ||
| | Transport | @grpc/grpc-js | | ||
| | Code generation | ts-proto via buf (Docker) | | ||
| | Lint / format | Biome | | ||
| | Tests | Vitest | | ||
| | Build | tsc | | ||
|
|
||
| ## Development | ||
|
|
||
| ### Prerequisites | ||
|
|
||
| Node.js 22+, Docker (for proto generation), npm. | ||
|
|
||
| ### Key Commands | ||
|
|
||
| ```bash | ||
| npm run generate # regenerate proto stubs (buf + Docker) | ||
| npm run pre-commit # biome check + typecheck + unit tests | ||
| npm run test # vitest run (unit) | ||
| npm run test:integration # integration tests against live server | ||
| npm run build # tsc emit to dist/ | ||
| ``` | ||
|
|
||
| ### Layout | ||
|
|
||
| ``` | ||
| src/ | ||
| ├── generated/ # generated proto stubs (committed) | ||
| ├── client.ts # ConfigClient | ||
| ├── watcher.ts # ConfigWatcher | ||
| ├── compat.ts # server version checks | ||
| └── ... | ||
| test/ # unit tests | ||
| integration/ # integration tests (live server) | ||
| ``` | ||
|
|
||
| ## Coding Guidelines | ||
|
|
||
| See [coding-guidelines.md](https://github.com/opendecree/decree/blob/main/docs/development/coding-guidelines.md) | ||
| for the shared philosophy (vanilla principle, minimal deps) and the TypeScript-specific section | ||
| (zero runtime deps beyond grpc-js, strict TS flags, Biome enforcement). | ||
|
|
||
| ## Conventions | ||
|
|
||
| - Only runtime dependency: `@grpc/grpc-js` | ||
| - Generated proto stubs committed under `src/generated/` | ||
| - `SUPPORTED_SERVER_VERSION` generated from `package.json` via `scripts/gen-version.mjs` | ||
| - Apache 2.0 license |
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.
Uh oh!
There was an error while loading. Please reload this page.