liferay-dummy-factory
AGENTS.md48 starsChanged 53 days agoMITView on GitHub
Instructions for AI coding agents working in this repository — Codex, Claude Code, and any tool that reads AGENTS.md. Humans start at README.md and CONTRIBUTING.md. liferay-dummy-factory is a Liferay DXP Control Panel app that generates dummy data (users, sites, pages, web content, documents, taxonomy, message boards, …) through per-entity forms and multi-step JSON workflows. One OSGi bundle (MVCPortlet + JAX-RS workflow API + React UI) in a Liferay Workspace, tested with JUnit, Vitest, and Spock + Playwright against a real…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 35,040 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository12 other files it gives its agents.
- configs/AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- .github/AGENTS.mdAGENTS.md
- integration-test/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- configs/CLAUDE.mdCLAUDE.md
- docs/CLAUDE.mdCLAUDE.md
- .github/CLAUDE.mdCLAUDE.md
- integration-test/CLAUDE.mdCLAUDE.md
- contract-reviewSkill
- liferay-debugSkill
- parallel-orchestrationSkill
The file
We split this AGENTS.md into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 73
Every Renovate rule in renovate.json carries its reason.
- Very specific: line 78
Look in docs/ before re-deriving anything.
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Instructions for AI coding agents working in this repository — Codex, Claude Code, and any tool that reads AGENTS.md. Humans start at README.md and CONTRIBUTING.md.
Project
liferay-dummy-factory is a Liferay DXP Control Panel app that generates dummy data (users, sites, pages, web content, documents, taxonomy, message boards, …) through per-entity forms and multi-step JSON workflows. One OSGi bundle (MVCPortlet + JAX-RS workflow API + React UI) in a Liferay Workspace, tested with JUnit, Vitest, and Spock + Playwright against a real DXP container. The exact DXP version is in gradle.properties.
| Path | What |
modules/liferay-dummy-factory/src/main/java/ | …/tools/portlet/actions (resource commands) → …/tools/service (Creators); …/tools/workflow/ (engine, adapters, JAX-RS) |
modules/liferay-dummy-factory/src/main/resources/ | META-INF/resources/ (view.jsp, React/TypeScript in js/), content/Language.properties |
modules/liferay-dummy-factory/src/test/, modules/liferay-dummy-factory/test/ | JUnit, Vitest |
integration-test/ | Spock + Playwright specs, workflow sample fixtures |
configs/common/ | portal and OSGi config baked into the test image |
docs/ | all explanations and facts — map in docs/README.md |
Commands
./gradlew :modules:liferay-dummy-factory:jar # build the bundle (includes the esbuild frontend build)
./gradlew :modules:liferay-dummy-factory:test # Java unit tests + JaCoCo
(cd modules/liferay-dummy-factory && yarn test && yarn checkFormat) # Vitest + formatting
./gradlew :integration-test:compileTestGroovy # compile specs without Docker
./gradlew :integration-test:integrationTest [--tests "<FQCN>"] # full E2E; needs Docker + LIFERAY_DXP_LICENSE_FILE
./gradlew startDockerContainer | stopDockerContainer | removeDockerContainer
node scripts/check-docs.mjs # docs + agent-instruction consistency (CI-enforced)Contracts that fail silently when broken
- Input boundary — reject user input, sanitize generated data, never mix. → backend
- Batch contract — Creators return
BatchResult<T>→{success, count, requested, skipped, items, error?},success := count == requested,erroriff failure; per-entityBatchTransaction.run,throws Throwable. → backend - Two entry points, one behaviour — resource command and workflow adapter call the same Creator and expose identical item fields; new
/ldf/*commands are registered inview.jsp. → workflow API - DXP 2026 platform —
jakarta.portlet4.0 (JSP taglib URI stayshttp://xmlns.jcp.org/portlet_3_0), nojavax.servletimport,release.dxp.apiwithout a version. → DXP API - Tests verify through JSONWS; Playwright only for DOM concerns, never selecting by visible text, always asserting the success class. →
integration-test/AGENTS.md data-testids are generated, never invented. → test ids- One fact, one file; no versions in prose; Yarn only. →
docs/AGENTS.md, dependencies
Scoped instructions
More rules live next to the code they govern. Before editing a file, read every AGENTS.md on the path from the repository root to that file; the deeper file wins on conflict. Some tools load these automatically, others only for the directory they were started in — so read them yourself.
| File | Governs |
modules/liferay-dummy-factory/AGENTS.md | the bundle: bnd.bnd, build.gradle, frontend toolchain |
modules/liferay-dummy-factory/src/main/java/AGENTS.md | Creators, resource commands, workflow adapters, Java style |
modules/liferay-dummy-factory/src/main/resources/AGENTS.md | React/TypeScript, JSP, i18n |
modules/liferay-dummy-factory/src/test/AGENTS.md | JUnit tests |
modules/liferay-dummy-factory/test/AGENTS.md | Vitest tests |
integration-test/AGENTS.md | test design for all suites; Spock, Playwright, harness wiring |
configs/AGENTS.md | portal and OSGi configuration |
docs/AGENTS.md | every Markdown file: placement, single source, links |
.github/AGENTS.md | GitHub Actions workflows |
Skills
Procedures in the open Agent Skills format under .agents/skills/. Use one when its trigger matches.
| Skill | Use when |
liferay-debug | any failing build, bundle, JSONWS call or test |
contract-review | reviewing a diff or PR, or before declaring a change done |
parallel-orchestration | only when the user explicitly asks for multi-agent work |
Root build and dependency files
Applies to build.gradle, settings.gradle, gradle.properties, gradle/, package.json, yarn.lock, mise.toml, renovate.json. Facts: dependencies.
- Each version is pinned in exactly one file. Never copy a version into documentation.
- Yarn only. Never add
package-lock.json; never hand-edityarn.lock(take one side,yarn install, rerun tests). Lockstep pairs move in the same commit. - A Liferay target change moves
liferay.workspace.productandliferay.workspace.target.platform.versiontogether, then follows Upgrading the Liferay target. - Every Renovate rule in
renovate.jsoncarries its reason. copyJarToLateststays a manual release task (release guide); never hook it tojar, and ordinary changes do not touchlatest/.
Working agreements
- Look in
docs/before re-deriving anything; record a new finding there, once (placement rules). - Fix root causes. No fallbacks that hide a failure, no skipped or weakened assertions, no
--no-verify. - Commits and PRs follow
CONTRIBUTING.md; significant design decisions get an ADR. - Scratch notes go in
.agents/plan/(git-ignored). Personal instructions go inAGENTS.override.mdorCLAUDE.local.md(both git-ignored). - These instructions are tool-neutral by design: edit
AGENTS.mdfiles and.agents/skills/, never tool-specific copies. How the files fit together: agent instructions.
Done means
Code, tests and docs changed together; the relevant unit suites pass; node scripts/check-docs.mjs passes; integration specs at least compile (compileTestGroovy). If you could not run the integration suite (it needs Docker and a DXP license), say so explicitly.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

