This document defines the stable contract of idempiere-cli core behavior.
It is the reference for:
- local automation scripts
- AI agents orchestrating the CLI
- release compatibility checks
Included in contract:
- default/core build (
./mvnw clean package) - deterministic template-first workflows
- command behavior, exit-code semantics, and JSON output shape for core commands
Explicitly out of core contract:
- embedded AI generation stack
skillssource resolution behavior tied to experimental providers- any internal-only experimental feature
Release targeting:
- official releases publish core artifacts only
For stable releases:
- core command names and primary flags should remain backward compatible
- documented core exit-code semantics should remain stable
- backward-incompatible core changes require explicit release-note callout
Experimental behavior can evolve independently, but must not break core flows.
Environment and setup:
doctorsetup-dev-env
Scaffolding:
initadd(template/deterministic path)
Quality and analysis:
validatedepsinfo
Delivery:
deploymigratedist
Utilities:
config(core keys/flows)import-workspacegenerate-completionupgrade
Core commands use this semantic convention:
0: success1: validation/usage error2: I/O or command execution error3: project/state error (for example: not in plugin directory, missing expected structure)
Notes:
- Exact command-level semantics are validated by tests and command docs.
validate --strictis a documented command-specific exception: it returns2when warnings are treated as failures (strict-warning failure), not an I/O failure.- Scripts should prefer
!= 0for generic failure handling unless command-specific branching is required.
When --json is supported:
- JSON must be emitted on
stdout - failures still return non-zero exit codes according to command semantics
- text diagnostics and troubleshooting stay in non-JSON modes
Core/default build guarantees:
initandaddwork without AI providers- templates are sufficient to scaffold compilable project structure
- failures in experimental AI paths must not block deterministic template generation
A release is core-compatible only if:
- core smoke passes using only released core paths
- core exit-code tests pass
- command docs match implemented core behavior
- this contract remains valid or is versioned with explicit change notes
Recommended command:
./scripts/run-core-contract-check.shImplementation note:
- contract tests are marked with JUnit tag
core-contract - the script runs this tag set by default
- this tag set includes command surface/exit-code checks plus deterministic scaffolding checks (
init, template-basedadd) andvalidate --jsonbehavior