ChatTemplate

ChatTemplate is a managed-application starter for DLLM Desktop. It provides a small Python application, its runtime configuration, AI coding guidance, and a default prompt-configuration folder. Use it as the starting point for a new application instead of copying an existing app by hand.

The template repository is registered in the Desktop profile as chattemplate. When you create an application from it, the bootstrap process turns that template identity into the identity of the new application.

Before you begin

DLLM Desktop includes a default configuration for creating a new application from a template. It is defined in boot.json, as shown below.

{
  "apptemplates": {
    "chattemplate": {
      "url": "[email protected]:dronelabourlm/chatapptemplate.git",
      "branch": "v0.1"
    }
  }
}

The chattemplate key is the template ID used by DLLM Desktop. The URL and branch identify the version of the starter repository from which new applications are created.

Create an application from the template

When the application is created, provide two values to the bootstrap Codex run:

ValueMeaningExample
APP_IDThe stable, lower-case technical identifier. It is used in package names, module imports, paths, runtime IDs, environment names, and configuration.japanesetutor
APP_NAMEThe human-readable application name. It is used where a display name is needed.JapaneseTutor

For example:

--start
These are the new project information:
APP_ID: japanesetutor
APP_NAME: JapaneseTutor

Use these information and work on the project according to AGENTS.md
--end

Choose APP_ID carefully. It becomes part of the application’s technical identity, so changing it later requires coordinated changes to imports, configuration, and runtime names.

First-time setup workflow

The root AGENTS.md supplied with ChatTemplate is intentionally temporary. It exists only to guide the first Codex run that converts the template into a new application.

During that run, Codex should:

  1. Rename the top-level chatapptemplate/ package directory to APP_ID.
  2. Update Python imports, package paths, runtime constants, and project metadata to use the new identifier.
  3. Update the application display values, including the APP_ID and APP_NAME values in model.py.
  4. Rename application-specific configuration, including the Conda environment file and environment name.
  5. Update nested AGENTS.md files so their package paths and guidance refer to the new application.
  6. Replace the bootstrap root AGENTS.md with a project-specific version derived from AGENTS-template.md.

The completed project must not retain chatapptemplate where it is acting as the old project or package identity. Template text may be useful while bootstrapping, but the new repository’s code, metadata, and AI instructions must describe the application that was created.

Completion markers

The bootstrap controller checks for one empty marker file in the repository root:

FileMeaning
.dllm_codex_successThe full bootstrap and validation completed successfully.
.dllm_codex_failThe bootstrap could not be completed correctly.

Only one final marker file should exist. A success marker means the repository is ready for normal development; a failure marker preserves a clear signal that the conversion needs attention.

Conda environment configuration

ChatTemplate defines its development environment in:

conda/dllmchatapptemplate.yml

The file currently names the environment dllmchatapptemplate. As part of the bootstrap refactor, rename both the file and the name value to match the new application. For an application with APP_ID: japanesetutor, use a consistent name such as dllmjapanesetutor:

conda/dllmjapanesetutor.yml

Update the ongoing AGENTS.md at the same time, so its activation and test commands point to the renamed environment. This keeps local development and AI coding instructions aligned with the application’s actual setup.

Ongoing AI coding guidance

After the first-time conversion, the root AGENTS.md is no longer a bootstrap instruction. It is the project’s working guide for ongoing development and AI coding.

AGENTS-template.md is the source for that working guide. During bootstrap, replace template-specific values in it with the new application’s values, then write the result to the root AGENTS.md. Future coding work should follow this replacement file and the scoped AGENTS.md files inside the application, instead of the original bootstrap workflow.

The generated guidance covers the project’s code style, environment, test commands, branch naming, package boundaries, and review expectations. Keep it up to date when the application’s development workflow changes.

Prompt configuration

The prompts/ directory is the default location for prompt configuration. Prompt templates are stored as JSON files and are loaded by file name, so use clear, stable names and keep the JSON valid.

prompts/
├── AGENTS.md
└── automationdev.json

Each prompt-configuration file uses a top-level object with version and prompts. A prompt entry defines its name, description, creation timestamp, provider request definitions, and the values that can be substituted into the template.

{
  "version": 1,
  "prompts": []
}

Use the prompts/AGENTS.md guidance when adding or editing templates. In particular, keep placeholder names aligned with queryparams, preserve the provider’s required request format, and avoid putting application code in this folder.

Verify the created application

Before treating the bootstrap as complete, confirm that:

  • the top-level application package is named after APP_ID;
  • Python imports and packaging metadata use that same identifier;
  • model.py contains the intended APP_ID and APP_NAME;
  • the Conda file and environment name have been renamed consistently;
  • root and nested AGENTS.md files describe the new application;
  • prompt configuration remains valid JSON; and
  • exactly one bootstrap completion marker is present.

Once these checks pass, register and run the new application as a managed application in the DLLM Desktop profile.