You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .agents/skills/conch-generator/SKILL.md
+10-9Lines changed: 10 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,13 +13,11 @@ DHTI is a platform to rapidly prototype, share, and test GenAI healthcare applic
13
13
14
14
Use this skill when you need to:
15
15
- Create a new OpenMRS ESM microfrontend from this template
16
-
- Build a DHTI-enabled healthcare application
17
16
- Integrate GenAI capabilities into an OpenMRS microfrontend
18
17
- Develop patient-context-aware UI components for OpenMRS
19
18
20
-
## Instructions
21
-
22
19
### 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.
23
21
24
22
***Read and internalize the original user feature request:**
25
23
- Understand the clinical functionality needed.
@@ -32,6 +30,7 @@ Use this skill when you need to:
- The above command creates a new directory at `workspace/openmrs-esm-dhti` with the monorepo.
37
36
- 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:
111
110
- 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.
112
111
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'
113
112
114
-
### Implementation
113
+
## Implementation Steps
115
114
116
-
***Implement the feature:**
117
115
- Start implementing the feature based on your plans. Follow best practices forReact and OpenMRS frontend-module development. When you arein 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 donein the past. Always internalize that and reuse it where possible.
118
117
119
118
### Testing
120
119
@@ -141,8 +140,10 @@ Use this skill when you need to:
141
140
142
141
See `examples/conch-sample-request.md`for a sample feature request that demonstrates how to use this skill.
143
142
144
-
## Additional Resources
143
+
### Best Practices
144
+
- The user conversation may provide context on the work you have donein 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.
Copy file name to clipboardExpand all lines: .agents/skills/elixir-generator/SKILL.md
+35-51Lines changed: 35 additions & 51 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,27 +1,25 @@
1
1
---
2
2
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.
4
4
---
5
5
6
6
## When to Use This Skill
7
7
8
8
Use this skill when you need to:
9
9
- Create a new DHTI elixir project from scratch
10
10
- Generate a LangServe-based backend service with FHIR integration
11
-
- Implement clinical decision support services using LangChain
11
+
- Implement clinical decision support services
12
12
- Build AI-powered EMR chatbot functionalities
13
13
14
14
## Best Practices
15
15
* 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.
16
16
* 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
17
17
* 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.
18
18
* 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.
23
20
24
21
### 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.
25
23
26
24
***Read and internalize the original user feature request:**
27
25
- Understand the clinical functionality needed.
@@ -37,11 +35,39 @@ You are an elixir coding agent working in a fresh development environment.
37
35
- Rename workspace/dhti-elixir/packages/<<name>>/dhti_elixir_starter to workspace/dhti-elixir/packages/<<name>>/dhti_elixir_<<name>>
38
36
- You have to replace "starter" with your chosen name wherever applicable with dhti_elixir_<<name>> in the generated project.
39
37
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:
* **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.
41
64
- chain.py:
42
65
- The main class should be named "DhtiChain" inheriting from BaseChain ( from package dhti_elixir_base)
43
66
- 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)
44
67
- 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
+
45
71
- **Bootstrap / configuration of the chain:**
46
72
- bootstrap.py:
47
73
- This file is responsible for setting up dependency injection (DI) for the chain, including:
0 commit comments