Skip to content

Commit 03d22e5

Browse files
committed
Merge branch 'release/1.3.0' into main
2 parents e26550c + 0987b40 commit 03d22e5

File tree

45 files changed

+1228
-1035
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1228
-1035
lines changed
Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,11 @@ DHTI is a platform to rapidly prototype, share, and test GenAI healthcare applic
1313

1414
Use this skill when you need to:
1515
- Create a new OpenMRS ESM microfrontend from this template
16-
- Build a DHTI-enabled healthcare application
1716
- Integrate GenAI capabilities into an OpenMRS microfrontend
1817
- Develop patient-context-aware UI components for OpenMRS
1918

20-
## Instructions
21-
2219
### Environment Setup and Project Scaffolding
20+
* **Use this ONLY if you are creating a new elixir project from scratch.** If you already have an existing elixir project, you can skip the scaffolding step and proceed directly to "Implementation Steps" below.
2321

2422
* **Read and internalize the original user feature request:**
2523
- Understand the clinical functionality needed.
@@ -32,6 +30,7 @@ Use this skill when you need to:
3230
```bash
3331
npx dhti-cli@latest conch init -w workspace -n esm-dhti-<<name>>
3432
```
33+
3534
* **Adapt the code:**
3635
- The above command creates a new directory at `workspace/openmrs-esm-dhti` with the monorepo.
3736
- In the packages/ directory of the monorepo (`workspace/openmrs-esm-dhti/packages`), find your newly created microfrontend `esm-dhti-<<name>>`. THIS IS WHERE YOU WILL DO YOUR DEVELOPMENT.
@@ -111,10 +110,10 @@ Use this skill when you need to:
111110
- Use the `useDhti` route from the monorepo (esm-dhti-utils) to call the DHTI service and get GenAI outputs. You need to update the DHTI service route (dhtiRoute) in the config-schema.ts file. If the user has not provided it above, ask for it using a prompt.
112111
If the user has only provided the DHTI service name, construct the full route as follows: http://localhost:8001/langserve/dhti_elixir_<service-name>/cds-services/dhti-service. Otherwise use the default value as 'http://localhost:8001/langserve/dhti_elixir_schat/cds-services/dhti-service'
113112
114-
### Implementation
113+
## Implementation Steps
115114
116-
* **Implement the feature:**
117115
- Start implementing the feature based on your plans. Follow best practices for React and OpenMRS frontend-module development. When you are in doubt refer to the implementation guide here: https://r.jina.ai/https://o3-docs.openmrs.org/docs/frontend-modules/overview. Test your code frequently to ensure it works as expected.
116+
- The user conversation may provide context on the work you have done in the past. Always internalize that and reuse it where possible.
118117
119118
### Testing
120119
@@ -141,8 +140,10 @@ Use this skill when you need to:
141140
142141
See `examples/conch-sample-request.md` for a sample feature request that demonstrates how to use this skill.
143142
144-
## Additional Resources
143+
### Best Practices
144+
- The user conversation may provide context on the work you have done in the past. Always internalize that and reuse it where possible.
145+
- Use OpenMRS design system components where possible to ensure consistency with the rest of the application.
146+
- Keep components small and focused on a single responsibility.
147+
- Write clear and concise documentation for your code and features.
148+
- Test your code frequently to catch issues early.
145149
146-
- [OpenMRS Frontend Modules Overview](https://o3-docs.openmrs.org/docs/frontend-modules/overview)
147-
- [OpenMRS Extension System](https://o3-docs.openmrs.org/docs/extension-system)
148-
- [DHTI GitHub Repository](https://github.com/dermatologist/dhti)

.claude/skills/conch-generator/examples/conch-sample-request.md renamed to .agents/skills/conch-generator/examples/conch-sample-request.md

File renamed without changes.
Lines changed: 35 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
11
---
22
name: elixir-generator
3-
description: This skill enables AI agents to generate new DHTI elixir projects from a cookiecutter template. Elixirs provide backend GenAI capabilities as HTTP endpoints hosted by LangServe. The skill guides the agent through environment setup, project scaffolding using cookiecutter, studying reference implementations, and implementing the requested elixir functionality.
3+
description: This skill enables AI agents to generate new DHTI elixir project. Elixirs provide backend GenAI capabilities as HTTP endpoints hosted by LangServe. The skill guides the agent through environment setup, project scaffolding, studying reference implementations, and implementing the requested elixir functionality.
44
---
55

66
## When to Use This Skill
77

88
Use this skill when you need to:
99
- Create a new DHTI elixir project from scratch
1010
- Generate a LangServe-based backend service with FHIR integration
11-
- Implement clinical decision support services using LangChain
11+
- Implement clinical decision support services
1212
- Build AI-powered EMR chatbot functionalities
1313

1414
## Best Practices
1515
* Each elixir should focus ONLY on a single function. (e.g. file upload and glycemic recommender should be separate elixirs). If multiple functionalities are needed, create multiple elixirs and orchestrate them.
1616
* Reuse existing elixirs where possible instead of creating new ones. You may refer to the list of existing elixirs in the DHTI monorepo: https://github.com/dermatologist/dhti-elixir#available-elixirs
1717
* Always create a notes/README.md file documenting the purpose, functionality, and usage of the elixir, including additional configuration steps if any as well as other elixirs or services it depends on and needs to be installed alongside.
1818
* If a RAG pattern is needed, use redis vector stores. Use neo4j to represent complex graphs. Read src/resources/docker-compose.yml to understand how redis and neo4j containers will be spun up. Prefer using existing elixirs if any and mention the dependency in notes/README.md.
19-
20-
## Instructions
21-
22-
You are an elixir coding agent working in a fresh development environment.
19+
* The user conversation may provide context on the work you have done in the past. Always internalize that and reuse it where possible.
2320

2421
### Environment Setup and Project Scaffolding
22+
* **Use this ONLY if you are creating a new elixir project from scratch.** If you already have an existing elixir project, you can skip the scaffolding step and proceed directly to "Implementation Steps" below.
2523

2624
* **Read and internalize the original user feature request:**
2725
- Understand the clinical functionality needed.
@@ -37,11 +35,39 @@ You are an elixir coding agent working in a fresh development environment.
3735
- Rename workspace/dhti-elixir/packages/<<name>>/dhti_elixir_starter to workspace/dhti-elixir/packages/<<name>>/dhti_elixir_<<name>>
3836
- You have to replace "starter" with your chosen name wherever applicable with dhti_elixir_<<name>> in the generated project.
3937
40-
- **Implementation:**
38+
### Planning: create a TODO list if not completed in previous steps
39+
40+
Before writing or heavily modifying code, create an **elaborate, structured TODO list** in a notes/todo.md file. This TODO list should:
41+
42+
* Break the work into small, concrete tasks.
43+
* Cover:
44+
* **Environment & setup** (if anything beyond cookiecutter defaults is needed),
45+
* **Chain design** (inputs/outputs, internal steps, FHIR interactions),
46+
* **Implementation tasks** for chain.py and bootstrap.py,
47+
* **Dependency updates** (if new packages are needed),
48+
* **Unit testing** tasks,
49+
* **Documentation updates** (README),
50+
* **Validation and final checks**.
51+
52+
Use clear, actionable items that you can check off logically as you progress.
53+
54+
## Implementation Steps
55+
* YOU WILL DO WORK IN THIS NEWLY GENERATED PROJECT GOING FORWARD. The rest of the project files can be used for reference but you should not modify them directly.
56+
- Extract and internalize the following from other packages such as simple_chat in the monorepo:
57+
58+
- How the LangChain chain is constructed (inputs, outputs, prompts, tools, callbacks, etc.).
59+
- How configuration, environment variables, and settings are wired in bootstrap.py.
60+
- How FHIR or other external services are integrated, if present.
61+
- Any conventions for logging, error handling, and dependency injection.
62+
63+
* You must follow the **same architectural and stylistic patterns** in the <<name>> project's chain.py and bootstrap.py.
4164
- chain.py:
4265
- The main class should be named "DhtiChain" inheriting from BaseChain ( from package dhti_elixir_base)
4366
- The main LLM and optionally a function calling LLM should be injected while bootstrapping as di["dhti_elixir_<<name>>_main_llm"] and di["dhti_elixir_<<name>>_function_llm"] respectively. The default prompt should also be injected as di["dhti_elixir_<<name>>_prompt"]. Additional hyperparameters can be injected as needed. (Replace <<name>> with your chosen name)
4467
- Plan how the problem can be solved using LangChain constructs (chains, agents, tools, callbacks, etc.) following the patterns in the reference chain.py.
68+
69+
* YOUR TASK is to **update the newly created chain.py and bootstrap.py** in the generated project to implement the user specifications described in the original user request for the elixir. Use subagents if needed to break down the problem into smaller steps. You can also create additional helper classes or functions within chain.py if needed, but avoid creating new files unless absolutely necessary.
70+
4571
- **Bootstrap / configuration of the chain:**
4672
- bootstrap.py:
4773
- This file is responsible for setting up dependency injection (DI) for the chain, including:
@@ -62,23 +88,7 @@ di["dhti_elixir_<<name>>_cds_hook_discovery"] = { # <- <<name>>
6288
}
6389
```
6490
65-
Extract and internalize the following from other packages such as simple_chat in the monorepo:
66-
67-
- How the LangChain chain is constructed (inputs, outputs, prompts, tools, callbacks, etc.).
68-
- How configuration, environment variables, and settings are wired in bootstrap.py.
69-
- How FHIR or other external services are integrated, if present.
70-
- Any conventions for logging, error handling, and dependency injection.
71-
72-
You must follow the **same architectural and stylistic patterns** in the <<name>> project's chain.py and bootstrap.py.
73-
74-
### Implement the new Elixir request
75-
76-
Your primary task is to **update the newly created chain.py and bootstrap.py** in the generated project to implement the following user specification:
77-
78-
The DhtiChain should implement the functionality described in the original user request for the elixir.
79-
80-
Interpret below as the high-level functional requirement for the chain. Your implementation should:
81-
91+
## High level functional requirements for chain.py and bootstrap.py implementation
8292
- **Align with the reference pattern:**
8393
- Mirror the structure, abstractions, and flow used in the reference chain.py and bootstrap.py.
8494
- Reuse naming conventions, configuration style, and initialization patterns where appropriate.
@@ -105,22 +115,6 @@ Interpret below as the high-level functional requirement for the chain. Your imp
105115
- Internalize how the agent uses tools if available from the package agent_chat in the monorepo.
106116
- The original user specification will indicate any available tools to use. If none are indicated, you do not have access to any tools.
107117
108-
### Planning: create a TODO list
109-
110-
Before writing or heavily modifying code, create an **elaborate, structured TODO list** in a notes/todo.md file. This TODO list should:
111-
112-
* Break the work into small, concrete tasks.
113-
* Cover:
114-
* **Environment & setup** (if anything beyond cookiecutter defaults is needed),
115-
* **Chain design** (inputs/outputs, internal steps, FHIR interactions),
116-
* **Implementation tasks** for chain.py and bootstrap.py,
117-
* **Dependency updates** (if new packages are needed),
118-
* **Unit testing** tasks,
119-
* **Documentation updates** (README),
120-
* **Validation and final checks**.
121-
122-
Use clear, actionable items that you can check off logically as you progress.
123-
124118
### Implementation details
125119
126120
- **Update chain.py:**
@@ -184,7 +178,7 @@ Perform a **final pass** over the project to ensure:
184178
- README is up to date.
185179
- The TODO list accurately reflects what has been completed (you may optionally mark completed tasks).
186180
187-
Your final output should include:
181+
Your final output for the current iteration may include:
188182
189183
- Updated chain.py and bootstrap.py implementing the requested features,
190184
- Any new/updated tests,
@@ -194,16 +188,6 @@ Your final output should include:
194188
195189
Now proceed to implement the above steps carefully and methodically.
196190
197-
## Expected Output
198-
199-
A fully functional DHTI elixir project that:
200-
- Follows the architectural patterns of the reference template
201-
- Implements the requested elixir functionality
202-
- Includes proper FHIR integration
203-
- Has comprehensive tests
204-
- Is well-documented
205-
- Can be installed into DHTI using the dhti-cli
206-
207191
## Notes
208192
209193
- The generated elixir must be compatible with the DHTI ecosystem

.claude/skills/elixir-generator/examples/basic-request.md renamed to .agents/skills/elixir-generator/examples/basic-request.md

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)