2222from codius .domain .model .intents .value_object .add_value_object_property_intent import AddValueObjectPropertyIntent
2323from codius .domain .model .intents .value_object .remove_value_object_property_intent import RemoveValueObjectPropertyIntent
2424from codius .domain .model .intents .repository .add_repository_intent import AddRepositoryIntent
25+ from codius .infrastructure .services .code_scanner .model .building_block_type import \
26+ BuildingBlockType
2527
2628
2729@dataclass (frozen = True )
@@ -49,6 +51,14 @@ def as_prompt(self) -> str:
4951 RemoveRepositoryMethodIntent ,
5052 ]
5153
54+ all_blocks = {bb .value for bb in BuildingBlockType }
55+ supported_blocks = {intent .building_block .value for intent in IntentType if
56+ intent != IntentType .UNSURE }
57+ unsupported_blocks = all_blocks - supported_blocks
58+
59+ supported_blocks_text = "\n " .join (f"- { b } " for b in sorted (supported_blocks ))
60+ unsupported_blocks_text = "\n " .join (f"- { b } " for b in sorted (unsupported_blocks ))
61+
5262 example_blocks = "\n " .join (
5363 f"### { cls .intent .value } \n ```json\n { cls .to_example_json ()} \n ```"
5464 for cls in example_intents
@@ -88,6 +98,29 @@ def as_prompt(self) -> str:
8898**Database Providers**:
8999{ database_text }
90100
101+ ---
102+
103+ ### Known DDD Building Blocks
104+
105+ These are the known building blocks in Domain-Driven Design:
106+
107+ **Supported:**
108+ { supported_blocks_text }
109+
110+ **Not yet supported:**
111+ { unsupported_blocks_text }
112+
113+ If the user refers to a known DDD building block that is **not yet supported**, return:
114+
115+ ```json
116+ {{ "intent": "unsupported", "building_block": "<block_name>" }}
117+ ```
118+
119+ If the user's intent is unclear or unsupported, respond only with:
120+
121+ ```json
122+ {{ "intent": "unsure" }}
123+
91124### Instructions
92125
93126- Break complex modeling instructions into small, **granular intents**.
@@ -109,9 +142,4 @@ def as_prompt(self) -> str:
109142### Examples:
110143
111144{ example_blocks }
112-
113- If the user's intent is unclear or unsupported, respond only with:
114-
115- ```json
116- {{ "intent": "unsure" }}
117145"""
0 commit comments