---
name: review-endpoint
description: Run all three endpoint reviewers (REST Builder, portability contract, security) in parallel on a named ResourceImpl. Pass the resource name, e.g. /review-endpoint ContentStructure.
disable-model-invocation: true
---

Dispatch the three hand-authored resource reviewers in parallel against the named `*ResourceImpl.java`.

## Usage

```
/review-endpoint <ResourceName>
```

Example: `/review-endpoint ContentStructure`

## Steps

1. Resolve the target file from the resource name:
   - `modules/headless-delivery-ext/headless-delivery-ext-impl/src/main/java/**/resource/v1_0/{ResourceName}ResourceImpl.java`
   - Confirm it exists before proceeding.

2. Dispatch these three agents **in parallel** (single message, multiple Agent tool calls):
   - `liferay-rest-builder` — REST Builder config, path parameter regex, OSGi @Component, buildREST patch correctness
   - `portability-contract-reviewer` — non-portable field leakage (id, siteId, dateCreated, dateModified, userId), missing dataDefinitionKey on create, WidgetTemplate required field presence
   - `rest-security-reviewer` — Liferay permission/authorization idioms, LiberalPermissionChecker risks, input validation

3. Collect findings from all three agents. Report in this order:
   - **BLOCKER** — must fix before PR
   - **HIGH** — fix before PR
   - **MEDIUM** — fix when convenient
   - **LOW** / informational
   - **PASS** — areas with no findings

   Each finding: agent name + file:line + description + recommended fix.

4. If no file matches the resource name, list the available `*ResourceImpl.java` files and ask the user to clarify.
