agentleFS
yasuflatland-lfyasuflatland-lf/liferay-dummy-factory/AGENTS.md

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…

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
  1. Very specific:

    Every Renovate rule in renovate.json carries its reason.

    line 73
  2. Very specific:

    Look in docs/ before re-deriving anything.

    line 78

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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.

PathWhat
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

  1. Input boundary — reject user input, sanitize generated data, never mix. → backend
  2. Batch contract — Creators return BatchResult<T> → {success, count, requested, skipped, items, error?}, success := count == requested, error iff failure; per-entity BatchTransaction.run, throws Throwable. → backend
  3. Two entry points, one behaviour — resource command and workflow adapter call the same Creator and expose identical item fields; new /ldf/* commands are registered in view.jsp. → workflow API
  4. DXP 2026 platform — jakarta.portlet 4.0 (JSP taglib URI stays http://xmlns.jcp.org/portlet_3_0), no javax.servlet import, release.dxp.api without a version. → DXP API
  5. Tests verify through JSONWS; Playwright only for DOM concerns, never selecting by visible text, always asserting the success class. → integration-test/AGENTS.md
  6. data-testids are generated, never invented. → test ids
  7. 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.

FileGoverns
modules/liferay-dummy-factory/AGENTS.mdthe bundle: bnd.bnd, build.gradle, frontend toolchain
modules/liferay-dummy-factory/src/main/java/AGENTS.mdCreators, resource commands, workflow adapters, Java style
modules/liferay-dummy-factory/src/main/resources/AGENTS.mdReact/TypeScript, JSP, i18n
modules/liferay-dummy-factory/src/test/AGENTS.mdJUnit tests
modules/liferay-dummy-factory/test/AGENTS.mdVitest tests
integration-test/AGENTS.mdtest design for all suites; Spock, Playwright, harness wiring
configs/AGENTS.mdportal and OSGi configuration
docs/AGENTS.mdevery Markdown file: placement, single source, links
.github/AGENTS.mdGitHub Actions workflows

Skills

Procedures in the open Agent Skills format under .agents/skills/. Use one when its trigger matches.

SkillUse when
liferay-debugany failing build, bundle, JSONWS call or test
contract-reviewreviewing a diff or PR, or before declaring a change done
parallel-orchestrationonly 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-edit yarn.lock (take one side, yarn install, rerun tests). Lockstep pairs move in the same commit.
  • A Liferay target change moves liferay.workspace.product and liferay.workspace.target.platform.version together, then follows Upgrading the Liferay target.
  • Every Renovate rule in renovate.json carries its reason.
  • copyJarToLatest stays a manual release task (release guide); never hook it to jar, and ordinary changes do not touch latest/.

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 in AGENTS.override.md or CLAUDE.local.md (both git-ignored).
  • These instructions are tool-neutral by design: edit AGENTS.md files 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.