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
32 changes: 16 additions & 16 deletions .claude/skills/fix-ci/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,16 @@ Before fixing anything, categorize every failure into this table.

| Priority | Category | Symptoms | Fix Command |
|----------|----------|----------|-------------|
| 1 | Formatting | "Formatting failed", biome/prettier diff | `npm run format` |
| 2 | Lint | Biome lint errors | `npm run check:fix` |
| 1 | Formatting | "Formatting failed", biome/prettier diff | `pnpm run format` |
| 2 | Lint | Biome lint errors | `pnpm run check:fix` |
| 3 | TypeScript | TS2xxx errors, type mismatch | Fix the type error in source |
| 4 | Build failure | Compilation errors, missing exports | Fix imports/exports, verify with `npm run build:webhook-ingest` |
| 5 | Webapp tests | "FAIL" in webapp test output | Fix test or source, verify with `npm run test:webapp` |
| 4 | Build failure | Compilation errors, missing exports | Fix imports/exports, verify with `pnpm run build:webhook-ingest` |
| 5 | Webapp tests | "FAIL" in webapp test output | Fix test or source, verify with `pnpm run test:webapp` |
| 5 | App server tests | Maven test failures, assertion errors | Fix test or source, verify with `cd server/application-server && ./mvnw test -Dsurefire.includedGroups="unit" -Dmaven.test.skip=false -T 2C --batch-mode -q` |
| 5 | Webhook tests | Vitest failures in webhook-ingest | Fix test or source, verify with `npm run test:webhook-ingest` |
| 6 | OpenAPI sync | "OpenAPI out of sync" | `npm run generate:api` |
| 6 | DB schema | "Schema drift detected" | `npm run db:draft-changelog` |
| 6 | DB ERD | "ERD outdated" | `npm run db:generate-erd-docs` |
| 5 | Webhook tests | Vitest failures in webhook-ingest | Fix test or source, verify with `pnpm run test:webhook-ingest` |
| 6 | OpenAPI sync | "OpenAPI out of sync" | `pnpm run generate:api` |
| 6 | DB schema | "Schema drift detected" | `pnpm run db:draft-changelog` |
| 6 | DB ERD | "ERD outdated" | `pnpm run db:generate-erd-docs` |
Comment on lines +73 to +82

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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add pnpm to the skill tool allowlist.

These sections now require pnpm, but the allowlist still only permits Bash(npm *) (Line 11). In this state, the prescribed commands cannot be executed by the skill runtime.

Suggested patch
 allowed-tools:
   - Bash(gh *)
   - Bash(git *)
+  - Bash(pnpm *)
   - Bash(npm *)
   - Bash(mvn *)
   - Read
   - Grep
   - Glob

Also applies to: 96-97, 104-107, 121-122, 128-129

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.claude/skills/fix-ci/SKILL.md around lines 73 - 82, The SKILL.md allowlist
currently only permits Bash(npm *) so pnpm commands used elsewhere fail; update
the allowlist entry in .claude/skills/fix-ci/SKILL.md to permit pnpm (either add
a new Bash(pnpm *) entry or broaden the pattern to Bash((npm|pnpm) .*)), and
apply the same change to the other occurrences referenced (around the blocks
noted at 96-97, 104-107, 121-122, 128-129) so all prescribed pnpm commands can
run in the skill runtime.


## 5. Fix ALL Issues

Expand All @@ -93,18 +93,18 @@ Fix everything first.
After ALL fixes are applied, run local validation:

```bash
npm run format
npm run check
pnpm run format
pnpm run check
```

Then run tests for ALL components that had failures:

```bash
# If webapp tests failed:
npm run test:webapp
pnpm run test:webapp

# If webhook-ingest tests failed:
npm run test:webhook-ingest
pnpm run test:webhook-ingest


# If app-server tests failed:
Expand All @@ -118,15 +118,15 @@ ALL must pass locally before pushing.
If any OpenAPI or DB validation failed:

```bash
npm run generate:api
npm run db:generate-erd-docs
pnpm run generate:api
pnpm run db:generate-erd-docs
```

Run format + check again after regeneration:

```bash
npm run format
npm run check
pnpm run format
pnpm run check
```

## 8. Commit and Push (ONCE)
Expand Down
24 changes: 12 additions & 12 deletions .claude/skills/land-pr/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Map paths to components (mirrors CI's dorny/paths-filter config):
## 3. Format

```bash
npm run format
pnpm run format
```
Comment on lines +46 to 47

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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Whitelist pnpm in allowed-tools to match the migrated commands.

This workflow now relies on pnpm, but allowed-tools still only grants Bash(npm *) (Line 10). That blocks execution of the updated steps.

Suggested patch
 allowed-tools:
   - Bash(gh *)
   - Bash(git *)
+  - Bash(pnpm *)
   - Bash(npm *)
   - Bash(mvn *)
   - Read
   - Grep
   - Glob

Also applies to: 55-56, 65-67, 72-74, 81-82, 93-94, 99-100, 115-117, 126-128

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.claude/skills/land-pr/SKILL.md around lines 46 - 47, The workflow now uses
pnpm but the allowed-tools whitelist still only permits Bash(npm *), so update
the allowed-tools entry in .claude/skills/land-pr/SKILL.md to include pnpm
(e.g., add Bash(pnpm *) or include pnpm alongside npm) so the pnpm commands such
as the occurrences around the lines with "pnpm run format" (and other pnpm
usages noted at lines ~55-56, 65-67, 72-74, 81-82, 93-94, 99-100, 115-117,
126-128) are permitted; modify the allowed-tools block to whitelist pnpm and
ensure the pattern matches the pnpm command invocations used in the file.


Formatting must NEVER be a reason for remote CI failure. This applies formatting
Expand All @@ -52,7 +52,7 @@ in write mode, not just check mode.
## 4. Check (Lint + Typecheck)

```bash
npm run check
pnpm run check
```

Must pass. Fix issues before continuing.
Expand All @@ -62,23 +62,23 @@ Must pass. Fix issues before continuing.
**API endpoints changed (app-server controllers/DTOs):**

```bash
npm run generate:api:application-server:specs
npm run generate:api:application-server:client
pnpm run generate:api:application-server:specs
pnpm run generate:api:application-server:client
```

**Database entities changed:**

```bash
npm run db:draft-changelog
npm run db:generate-erd-docs
pnpm run db:draft-changelog
pnpm run db:generate-erd-docs
```

## 6. Build Affected TS Services

If webhook changed:

```bash
npm run build:webhook-ingest
pnpm run build:webhook-ingest
```

Build failures catch path alias and import issues that typecheck alone misses.
Expand All @@ -90,13 +90,13 @@ Run ONLY tests for changed components. Order: fastest first.
If webhook changed:

```bash
npm run test:webhook-ingest
pnpm run test:webhook-ingest
```

If webapp changed:

```bash
npm run test:webapp
pnpm run test:webapp
```

If app-server changed (and mvn available):
Expand All @@ -112,7 +112,7 @@ ALL tests must pass before proceeding.
If app-server changed:

```bash
npm run generate:api
pnpm run generate:api
git diff --quiet || echo "WARNING: OpenAPI specs were out of sync - staging changes"
```

Expand All @@ -123,8 +123,8 @@ Stage any drift that was caught.
Regeneration can produce unformatted code. Run one final pass:

```bash
npm run format
npm run check
pnpm run format
pnpm run check
```

Both must pass.
Expand Down
2 changes: 1 addition & 1 deletion .claude/skills/react-best-practices/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -1403,7 +1403,7 @@ Reduce SVG coordinate precision to decrease file size. The optimal precision dep
**Automate with SVGO:**

```bash
npx svgo --precision=1 --multipass icon.svg
pnpm exec svgo --precision=1 --multipass icon.svg
```

### 6.5 Prevent Hydration Mismatch Without Flickering
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ Reduce SVG coordinate precision to decrease file size. The optimal precision dep
**Automate with SVGO:**

```bash
npx svgo --precision=1 --multipass icon.svg
pnpm exec svgo --precision=1 --multipass icon.svg
```
17 changes: 17 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
**/node_modules
.git
**/target
**/dist
**/build
**/.cache
**/.docusaurus
**/coverage
**/test-results
**/storybook-static
**/playwright-report
.vscode
.idea
**/*.log
.env
.env.*
!.env.example
8 changes: 4 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ TITLE FORMAT (required):
✗ Bad: Added weekly ranking filter to leaderboard

BEFORE PUSHING:
npm run format && npm run check # Format + lint + typecheck all services
pnpm run format && pnpm run check # Format + lint + typecheck all services

AFTER API CHANGES:
npm run generate:api # Regenerate all OpenAPI clients
pnpm run generate:api # Regenerate all OpenAPI clients

AFTER DATABASE/ENTITY CHANGES:
npm run db:draft-changelog # Generate Liquibase migration
npm run db:generate-erd-docs # Update ERD documentation
pnpm run db:draft-changelog # Generate Liquibase migration
pnpm run db:generate-erd-docs # Update ERD documentation
-->

## Description
Expand Down
54 changes: 5 additions & 49 deletions .github/actions/setup-caches/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "Setup Advanced Caches"
description: "Sets up intelligent caching for CI/CD pipeline optimization"
name: "Setup CI caches"
description: "Caches Maven repo + generated sources, Playwright browsers, and Storybook builds. Node/pnpm setup happens in the calling workflow via pnpm/action-setup + actions/setup-node (cache: pnpm)."
inputs:
cache-type:
description: "Type of cache to setup"
Expand All @@ -12,38 +12,14 @@ inputs:
runs:
using: "composite"
steps:
# Node.js caching
- name: Setup Node.js
if: contains(fromJSON('["application-server-quality", "webapp-quality", "webapp-visual", "webapp-unit", "webapp-storybook", "openapi-validation", "webhook-ingest-quality", "webhook-ingest-unit", "database-validation"]'), inputs.cache-type)
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version-file: ".node-version"
cache: "npm"

- name: Cache Node.js dependencies
if: contains(fromJSON('["application-server-quality", "webapp-quality", "webapp-visual", "webapp-unit", "webapp-storybook", "openapi-validation", "webhook-ingest-quality", "webhook-ingest-unit", "database-validation"]'), inputs.cache-type)
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: |
~/.npm
webapp/node_modules
server/webhook-ingest/node_modules
node_modules
key: ${{ inputs.os }}-node-${{ hashFiles('package-lock.json', 'webapp/package.json', 'server/webhook-ingest/package.json') }}
restore-keys: |
${{ inputs.os }}-node-${{ hashFiles('package-lock.json') }}-
${{ inputs.os }}-node-

# Java/Maven caching
- name: Set up JDK 21
if: contains(fromJSON('["application-server-unit-arch", "application-server-integration", "application-server-quality", "openapi-validation", "database-validation"]'), inputs.cache-type)
uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
with:
distribution: "temurin"
java-version: "21"
cache: maven

- name: Cache Maven dependencies
- name: Cache Maven repo + generated sources
if: contains(fromJSON('["application-server-unit-arch", "application-server-integration", "application-server-quality", "openapi-validation", "database-validation"]'), inputs.cache-type)
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
Expand All @@ -55,42 +31,22 @@ runs:
restore-keys: |
${{ inputs.os }}-maven-

# Playwright browser caching for Storybook tests
- name: Cache Playwright browsers
id: playwright-cache
if: inputs.cache-type == 'webapp-storybook'
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/.cache/ms-playwright
key: ${{ inputs.os }}-playwright-${{ hashFiles('webapp/package-lock.json') }}
key: ${{ inputs.os }}-playwright-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ inputs.os }}-playwright-

# NOTE: Playwright browser installation happens in ci-tests.yml after npm ci
# This cache just restores browsers from previous runs if available

# Platform-specific binary caching for Linux runners
# These packages (@rollup/rollup-linux-x64-gnu, lightningcss-linux-x64-gnu, @biomejs/cli-linux-x64)
# are installed via scripts/install-platform-binaries.mjs after npm ci.
# We cache them in ~/.cache/platform-binaries and restore after npm ci wipes node_modules.
- name: Cache platform binaries
id: platform-cache
if: contains(fromJSON('["webapp-quality", "webapp-visual", "webapp-unit", "webapp-storybook", "webhook-ingest-quality", "webhook-ingest-unit", "database-validation"]'), inputs.cache-type) && runner.os == 'Linux'
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/.cache/platform-binaries
key: ${{ inputs.os }}-platform-binaries-${{ hashFiles('package.json') }}
restore-keys: |
${{ inputs.os }}-platform-binaries-

# Storybook build cache for visual tests
- name: Cache Storybook build
if: contains(fromJSON('["webapp-visual", "webapp-storybook"]'), inputs.cache-type)
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: |
webapp/storybook-static
webapp/.storybook/.cache
key: ${{ inputs.os }}-storybook-${{ hashFiles('webapp/**/*.stories.tsx', 'webapp/.storybook/**', 'webapp/package-lock.json') }}
key: ${{ inputs.os }}-storybook-${{ hashFiles('webapp/**/*.stories.tsx', 'webapp/.storybook/**', 'pnpm-lock.yaml') }}
restore-keys: |
${{ inputs.os }}-storybook-
17 changes: 17 additions & 0 deletions .github/actions/setup-pnpm-node/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: "Setup pnpm + Node.js"
description: "Installs pnpm via SHA-pinned pnpm/action-setup and Node.js via SHA-pinned actions/setup-node, with pnpm-store caching. Versions kept in lockstep with root packageManager + .node-version."

runs:
using: "composite"
steps:
- name: Setup pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
with:
version: 11.1.2
run_install: false

- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: ".node-version"
cache: pnpm
Loading
Loading