Model-driven development API

From Business Requirement to Working Software

TeaQL gives developers and Coding Agents one continuous, verifiable path: create a typed domain model, evaluate it, generate a domain library and application workspace, then request model-aware API help while coding.

Connect the TeaQL Toolchain

Point cargo teaql or another TeaQL client at this service. Coding Agents use the client instead of calling undocumented framework APIs directly.

export TEAQL_ENDPOINT_PREFIX=http://localhost:8080/
01

Where Does the Model Come From?

A business requirement becomes a saved, reviewable KSML domain contract before application code is generated.

Input: business language
Build merchant onboarding.

Each merchant belongs to a platform.
Track tax number, address, external ID,
creation time, and last update time.
Output: typed model artifact

Developer or Coding Agent

Clarifies objects, representative values, relationships, constants, ownership, and provider choice, then saves the result as XML/KSML.

The model path—not a chat transcript—is the artifact used for evaluation, review, and regeneration.

TeaQL does not treat the first AI response as truth. The model is a proposal that must pass deterministic evaluation and remain available for human review.
02

What Does the Generated Model Look Like?

KSML uses concrete example values to describe fields and explicit function-like values to describe references and generated behaviors.

Excerpt from the live demo model
<root name="crm-erp-service"
      org="doublechaintech"
      data_service="postgres">

  <platform
      name="CRPERPPlatform"
      create_time="createTime()"
      last_update_time="updateTime()" />

  <merchant
      name="Global Logistics Corporation"
      tax_number="91XXXXXXXXXXXXX"
      platform="platform()"
      create_time="createTime()"
      update_time="updateTime()" />

</root>
What the contract captures

Types, relationships, and generation intent

Representative values allow the evaluator and generator to infer supported field types. References such as platform() connect business objects. Metadata can add display names, modules, constants, identifiers, and ownership boundaries.

The snippet explains the shape; the complete model is the source of truth. Coding Agents should edit the saved model and rerun evaluation instead of patching generated entities.
03

What Happens After Evaluation?

The service returns a Markdown report with Errors, Warnings, Suggestions, and confirmed solid areas.

Call the evaluator
cargo teaql evaluate \
  --input model/main.xml
Use structured feedback
Evaluation Report
├── Errors       must be fixed
├── Warnings     require a decision
├── Suggestions  optional improvements
└── Solid Areas  preserve these sections

Generation is blocked when the submitted model contains evaluation Errors. Repair the model, evaluate again, and keep the report as evidence.

04

Which Libraries and Workspaces Can TeaQL Generate?

Generate the stable domain library separately from the editable application workspace.

Domain libraries

  • java-lib-core — Java entities, requests, expressions, metadata, and runtime registration.
  • rust-lib-core — Rust entities, typed requests, expressions, behaviors, checkers, and providers.

Java workspaces

  • java-app-console
  • java-web-spring-boot
  • java-web-quarkus
  • java-web-micronaut

Rust workspaces

  • rust-app-console
  • rust-web-axum
  • rust-web-topcoat

Design and guidance outputs

  • doc — data-design documentation and visual previews.
  • agent — generated Coding Agent instructions.
  • evaluation and mergemodel — evaluation assets and model composition.
Generate a domain library
cargo teaql rust-lib-core \
  --input model/main.xml \
  --output generated/rust-lib-core
Generate an editable workspace
cargo teaql rust-web-topcoat \
  --input model/main.xml \
  --output generated/rust-web-topcoat
The live service catalog is authoritative for the configured endpoint. Generated workspaces reuse the matching core library; adding a web framework does not require creating another shared domain core.
Raw target names exposed by this server
agentdocevaluationjava-app-consolejava-lib-corejava-web-micronautjava-web-quarkusjava-web-spring-bootmergemodelrust-app-consolerust-lib-core
05

How Does a Coding Agent Get API Help During Development?

The Agent asks for help using the current model, language, action, and exact object name. The response is generated Markdown, not a generic ORM example.

Model-aware assist request
cargo teaql \
  --input model/main.xml \
  rust-assist-query/merchant

The same pattern supports create, update, delete, expression, list-page, debug, tool API, and runtime-customization guidance.

Development feedback loop
Generated AGENTS.md
       ↓
Select language + action + object
       ↓
Call TeaQL assist API with the model
       ↓
Use exact generated methods
       ↓
Compile, test, and request more help
Assist output is scoped to the submitted model. Coding Agents must read generated entity source for exact methods, declare query purpose and comment, and attach audit_as / auditAs to writes.

Live Model-aware API Help

These previews use the built-in demo model and its platform object. Submit your own model through the CLI to receive guidance for your own objects.

Feature / Capability Java Rust
📚 Workspace API Guide Preview Preview
🔹 Create Entity Preview Preview
🔹 Update Entity Preview Preview
🔹 Query Entity Preview Preview
🔹 List Page Preview Preview
🔹 Expression Preview Preview
🔹 Delete Entity Preview Preview
🛠️ Debug Guide Preview Preview
🛠️ Tool API: Http Preview Preview
⚙️ Runtime Customization Preview Preview