Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/ci-docs.yml
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 warning

Code 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: {}
Comment thread
zeevdr marked this conversation as resolved.
name: Analyze (javascript-typescript)
runs-on: ubuntu-latest
steps:
- run: echo "Docs-only PR — CodeQL skipped"

Check warning

Code 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: {}
Comment thread
zeevdr marked this conversation as resolved.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# The check job aggregates all results for branch protection.
#
# Docs-only PRs (*.md, docs/**, examples/**/README.md) skip the entire workflow via
# paths-ignore; GitHub marks the required status checks as passing automatically.
# paths-ignore. Required checks for those PRs are satisfied by ci-docs.yml.
#
# The first job defines YAML anchors (&checkout, &setup-node-22, &install)
# on its setup steps; subsequent jobs alias them to avoid repetition.
Expand Down
60 changes: 60 additions & 0 deletions CLAUDE.md
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