Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
065a49f
feat(dx): development environment setup with agent context architecture
spbolton Mar 16, 2026
4ec7e60
docs(dx): add Copilot to context architecture and expand doc-updates …
spbolton Mar 16, 2026
bbd8c5c
fix(dx): resolve PR review issues — volume paths, slug mismatch, hook…
spbolton Mar 16, 2026
e3ef1b3
fix(dx): pin lefthook to ~2 (not ~1) to match current v2.x
spbolton Mar 16, 2026
fd7fbea
fix(dx): address second round of PR review feedback
spbolton Mar 16, 2026
92e9175
fix(dx): use latest for lefthook and note commands → skills migration
spbolton Mar 23, 2026
a256637
fix(dx): remove legacy slash command stubs superseded by skills
spbolton Mar 23, 2026
b88209a
cleanup initialization and hook setup
spbolton Mar 23, 2026
5a6b4a8
fix notice to restart shell on just setup
spbolton Mar 23, 2026
94676b8
refactor(dx): Phase 1 — universal dev setup without worktree assumptions
spbolton Mar 24, 2026
ce61002
fix(dx): address PR review feedback
spbolton Mar 24, 2026
734c2e4
style: format prepare.js with prettier
spbolton Mar 24, 2026
7fc844b
docs(dx): discourage bypassing git hooks in agent instructions
spbolton Mar 24, 2026
785f40c
fix(dx): move openapi-freshness from pre-push to pre-commit
spbolton Mar 24, 2026
204f005
fix(dx): surface hook installation failures in just setup
spbolton Mar 24, 2026
c0811e0
fix(dx): remove redundant frontend-format-verify from pre-push
spbolton Mar 24, 2026
424639b
docs(dx): add hook selection guide to lefthook.yml
spbolton Mar 24, 2026
c35fc01
docs(dx): add performance guidance for git hooks
spbolton Mar 24, 2026
9cc04ff
fix(dx): check both DB and OpenSearch in shared services detection
spbolton Mar 24, 2026
ebc59d3
fix(dx): warn when lefthook is not found instead of silent skip
spbolton Mar 24, 2026
baa6f31
docs(dx): document staged_files word-splitting limitation in hooks
spbolton Mar 24, 2026
d4f05c2
docs(dx): explain OpenSearch 3.4 upgrade service in shared compose
spbolton Mar 24, 2026
56ca7c1
docs(dx): document DotRestApplication.java fast-path in openapi hook
spbolton Mar 24, 2026
83e0b0b
docs(dx): document dev-stop-frontend port-scanning fallback
spbolton Mar 24, 2026
2a61435
fix(dx): mount postgres data directory, not parent
spbolton Mar 24, 2026
941d66a
docs(dx): clarify husky fallback path in prepare.js hook dispatcher
spbolton Mar 25, 2026
1fbd425
fix(dx): include prepare-commit-msg in branch-aware hook dispatcher
spbolton Mar 25, 2026
c6617e5
feat(dx): add wt.toml and .worktreeinclude for optional worktree use
spbolton Mar 25, 2026
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
5 changes: 0 additions & 5 deletions .claude/commands/create-issue.md

This file was deleted.

3 changes: 0 additions & 3 deletions .claude/commands/find-issues.md

This file was deleted.

3 changes: 0 additions & 3 deletions .claude/commands/query-issue.md

This file was deleted.

3 changes: 0 additions & 3 deletions .claude/commands/update-issue.md

This file was deleted.

28 changes: 28 additions & 0 deletions .claude/rules/cicd-workflows.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
paths:
- ".github/workflows/*.yml"
- ".github/actions/**/*"
---

# CI/CD Workflow Patterns

## Structure

Workflows follow a naming convention with two tiers:

- **Orchestrators** (`cicd_1-pr.yml` through `cicd_8-*.yml`) -- top-level workflows triggered by events (PR, merge queue, nightly, release). Each calls reusable component workflows.
- **Components** (`cicd_comp_*.yml`) -- reusable workflows (`workflow_call`) for individual phases: build, test, deploy, finalize. Called by orchestrators, never triggered directly.
- **Other** (`ai_*.yml`) -- non-CI workflows (e.g., AI agent orchestration).

## Security constraint (CRITICAL)

PR check workflows (`cicd_1-pr.yml`) run on **unmerged code** and must NOT use secrets. Any notification or action requiring secrets belongs in a separate post-workflow (triggered after the PR workflow completes, runs on the base branch).

## When modifying workflows

- Check if the change belongs in an orchestrator or a component. Component changes affect all orchestrators that call them.
- Test with `act` or by pushing to a branch and checking the Actions tab.
- The cicd-diagnostics skill can help debug workflow failures.

## On-demand
- See `docs/infrastructure/` for CI/CD architecture details.
30 changes: 30 additions & 0 deletions .claude/rules/doc-updates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
paths:
- "**/*.mdc"
- "CLAUDE.md"
- "AGENTS.md"
- ".claude/rules/*"
- ".cursor/rules/*"
- ".github/copilot-instructions.md"
- "docs/**/*"
---

# Documentation Updates

## Single source of truth
- **AGENTS.md** -- navigation and quick reference only.
- **`/docs/`** -- full patterns by domain (backend, frontend, testing, etc.).
- **`.claude/rules/`** -- short reminders scoped by file path; reference `/docs/`, don't duplicate.
- **`.claude/skills/`** -- workflows and procedures; reference supporting files for detail.

## Where to update
- **Java/Config/REST/DB** -> `docs/backend/*.md`
- **Angular/tests/styles** -> `docs/frontend/*.md`
- **Build/CI/Docker** -> `docs/core/`, `docs/backend/MAVEN_BUILD_SYSTEM.md`, `docs/infrastructure/`
- **Testing** -> `docs/frontend/TESTING_FRONTEND.md`, `docs/testing/*.md`

## Context architecture
- See `docs/claude/CONTEXT_ARCHITECTURE.md` for decision framework on where to place new instructions.

## Quality
- Use examples. Cross-reference instead of duplicating. Document aliases, not raw commands.
38 changes: 38 additions & 0 deletions .claude/rules/e2e-rules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
paths:
- "core-web/apps/dotcms-ui-e2e/**/*.spec.ts"
- "e2e/**/*.spec.ts"
---

# E2E Test Conventions (Playwright)

## Page Object Model (POM)
- **One class per page** -- each page has its own Page Object
- **Encapsulate interactions** -- all `page.fill()`, `page.click()` go in Page Objects, not tests
- **Tests use Page Objects only** -- never interact with DOM directly in test files

## Selectors: ALWAYS use data-testid

```typescript
// CORRECT
await this.page.getByTestId("userNameInput").fill(username);
await this.page.getByTestId("submitButton").click();

// WRONG -- never use CSS selectors
await this.page.locator('input[id="userId"]').fill(username);
```

## File naming
- Page Objects: `[PageName].page.ts`
- Components: `[ComponentName].component.ts`
- Tests: `[FeatureName].spec.ts`
- Test data: `[FeatureName]Data.ts`

## Commands
```bash
just test-e2e-node # full suite
just test-e2e-node-specific test=login.spec.ts # single spec
just test-e2e-node-debug-ui test=login.spec.ts # Playwright UI mode
```

See `e2e/dotcms-e2e-node/README.md` for full documentation.
30 changes: 30 additions & 0 deletions .claude/rules/frontend-context.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
paths:
- "core-web/**/*.ts"
- "core-web/**/*.tsx"
- "core-web/**/*.html"
- "core-web/**/*.scss"
- "core-web/**/*.css"
---

# Frontend Context (core-web)

**Nx monorepo** in `core-web/`: TypeScript, Angular apps/libs, and SDK for **Angular** and **React**. Full standards live in **`docs/frontend/`**. See `core-web/AGENTS.md` for commands, conventions, and structure.

## Stack
- **Angular**: standalone, signals, `inject()`, `input()`/`output()`, `@if`/`@for`, OnPush, PrimeNG/PrimeFlex. Check `core-web/package.json` for current version.
- **SDK**: `sdk-angular`, `sdk-react`, `sdk-client`, `sdk-types`, etc.

## Quick reminders (details in docs)
- **Angular**: `$` prefix for signals, `$` suffix for observables; no `standalone: true`; OnPush; `[class.x]` / `[style.x]` (no ngClass/ngStyle); host bindings in `host: {}`.
- **Testing**: Spectator + Jest; `data-testid` on elements; `byTestId()`, `spectator.setInput()`, `mockProvider()`; never set component inputs directly. Use `@dotcms/utils-testing` createFake functions.
- **TypeScript**: Strict types, no `any` (use `unknown`), `as const` instead of enums, `#` for private.
- **Services**: Single responsibility; `providedIn: 'root'`; use `inject()` instead of constructor injection.

## On-demand
- `docs/frontend/ANGULAR_STANDARDS.md`
- `docs/frontend/COMPONENT_ARCHITECTURE.md`
- `docs/frontend/TESTING_FRONTEND.md`
- `docs/frontend/STATE_MANAGEMENT.md`
- `docs/frontend/TYPESCRIPT_STANDARDS.md`
- `docs/frontend/STYLING_STANDARDS.md`
39 changes: 39 additions & 0 deletions .claude/rules/java-context.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
paths:
- "**/*.java"
- "dotCMS/src/**/*"
---

# Java Backend Context

## Imports
```java
import com.dotmarketing.util.Config;
import com.dotmarketing.util.Logger;
import com.dotmarketing.util.UtilMethods;
import com.dotcms.util.CollectionsUtils;
```

## Patterns
- Config: `Config.getStringProperty("key", "default")` -- never System.getProperty.
- Logging: `Logger.info(this, "msg")` -- never System.out.
- Null: `UtilMethods.isSet(s)` before use.
- APIs: `APILocator.getUserAPI()`, etc.
- Exceptions: DotDataException, DotSecurityException.
- Data classes: `@Value.Immutable` + builder.

## Java
- Core: Java 11 release compatibility. CLI: Java 21 ok. Runtime: Java 21. Migrating to Java 25 (parallel CI workflows validate forward compatibility).

## Build
```bash
just build # full build (~8-15 min)
just build-quicker # core only (~2-3 min)
```

## On-demand
- `docs/backend/JAVA_STANDARDS.md`
- `docs/backend/REST_API_PATTERNS.md`
- `docs/backend/MAVEN_BUILD_SYSTEM.md`
- `docs/backend/CONFIGURATION_PATTERNS.md`
- `docs/backend/DATABASE_PATTERNS.md`
29 changes: 29 additions & 0 deletions .claude/rules/maven-context.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
paths:
- "**/pom.xml"
- "bom/**/*"
- "parent/**/*"
---

# Maven Build System

## Dependency management (CRITICAL)

```
parent/pom.xml # Global properties, plugin management
bom/application/pom.xml # Dependency management (ALL versions go here)
dotCMS/pom.xml # Module dependencies (NO versions — inherited from BOM)
```

- **Versions** go ONLY in `bom/application/pom.xml` as properties + `<dependencyManagement>`.
- **Dependencies** in `dotCMS/pom.xml` and other modules reference groupId:artifactId without `<version>`.
- **Never** add a `<version>` tag directly in a module pom.xml.

## Build commands
```bash
just build # full build (~8-15 min)
just build-quicker # core only (~2-3 min)
```

## On-demand
- `docs/backend/MAVEN_BUILD_SYSTEM.md` -- full BOM patterns, plugin management, examples
23 changes: 23 additions & 0 deletions .claude/rules/shell-cross-platform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
paths:
- "justfile"
- "**/*.sh"
- ".config/wt.toml"
- "Makefile"
- "docker-compose*.yml"
- "Dockerfile*"
---

# Cross-platform Shell Compatibility

All scripts, justfile recipes, and shell commands must work on **both macOS and Linux**.

| Avoid | Use instead |
|-------|-------------|
| `lsof -ti :PORT` (macOS default) | `lsof` with fallback to `ss` or `fuser` |
| `brew install ...` | document OS-conditional install paths |
| `sed -i ''` (macOS BSD sed) | `sed -i` (GNU) -- test on both or use `perl -i` |
| `/proc/` paths | avoid; not present on macOS |
| `mktemp -t name` (BSD form) | `mktemp /tmp/name.XXXXXX` (POSIX, works on both) |

When adding a new script or recipe, test or reason through both environments before committing.
39 changes: 39 additions & 0 deletions .claude/rules/test-context.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
paths:
- "**/*.spec.ts"
- "**/*.test.ts"
- "**/test/**/*"
- "**/*Test.java"
---

# Testing Context

## Frontend (Spectator)
- Selectors: `byTestId('id')` only; never CSS classes for behavior.
- Inputs: `spectator.setInput('prop', value)`; never `spectator.component.prop = value`.
- CSS: `expect(el).toHaveClass('pi', 'pi-update')` (separate strings); not object form.
- Test user flows: type, click, assert visible content; avoid testing internals or mock call counts.
- **Mocks**: Use `@dotcms/utils-testing` createFake functions; never create manual mocks for domain objects.

## data-testid
- Component: `data-testid="user-profile"`. Controls: `user-profile-name-input`, `user-profile-save-button`. States: `loading-spinner`, `error-message`, `success-message`.

## Backend (Java)
- DotConnect for DB; APILocator for services. Structure: *Test.java (unit), *IT.java (integration).

## Commands
```bash
# Backend (from repo root)
just test-integration class=MyTestClass # if alias exists, else:
./mvnw -pl :dotcms-integration verify -Dcoreit.test.skip=false -Dit.test=MyTestClass

# Frontend (Nx, from repo root)
cd core-web && yarn nx run <project>:test
cd core-web && yarn nx run <project>:test -t MyComponent
```
Replace `<project>` with the Nx project (e.g. `dotcms-ui`, `sdk-angular`, `edit-content`).

## On-demand
- `docs/frontend/TESTING_FRONTEND.md`
- `docs/testing/BACKEND_UNIT_TESTS.md`
- `docs/testing/INTEGRATION_TESTS.md`
Loading
Loading