-
Notifications
You must be signed in to change notification settings - Fork 0
refactor(semantic): finalize prompt engine semantic layer architecture #180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
rabitis99
wants to merge
1
commit into
dev
Choose a base branch
from
refactor/semantic-layer-finalization
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
...example/sharedprompts/domain/prompt/domain/semantic/IntentDefinitionProviderAssembly.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| package org.example.sharedprompts.domain.prompt.domain.semantic; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| /** | ||
| * Production composition of intent definition / resolution-defaults providers. | ||
| * <p> | ||
| * {@link IntentDefinitionDataSource} only merges and validates; this class is the single | ||
| * explicit registration point for which providers participate in the shipped catalog. | ||
| * Order is stable: creation → modification → analysis → explanation → planning → decision → | ||
| * research → extraction (matches prior {@code IntentDefinitionDataSource} static lists). | ||
| */ | ||
| public final class IntentDefinitionProviderAssembly { | ||
|
|
||
| private IntentDefinitionProviderAssembly() {} | ||
|
|
||
| public static List<IntentDefinitionEntriesProvider> productionDefinitionsProviders() { | ||
| return List.of( | ||
| new IntentCreationIntentDefinitionsProvider(), | ||
| new IntentModificationIntentDefinitionsProvider(), | ||
| new IntentAnalysisIntentDefinitionsProvider(), | ||
| new IntentExplanationIntentDefinitionsProvider(), | ||
| new IntentPlanningIntentDefinitionsProvider(), | ||
| new IntentDecisionIntentDefinitionsProvider(), | ||
| new IntentResearchIntentDefinitionsProvider(), | ||
| new IntentExtractionIntentDefinitionsProvider()); | ||
| } | ||
|
|
||
| public static List<IntentResolutionDefaultsEntriesProvider> productionResolutionDefaultsProviders() { | ||
| return List.of( | ||
| new IntentCreationIntentResolutionDefaultsProvider(), | ||
| new IntentModificationIntentResolutionDefaultsProvider(), | ||
| new IntentAnalysisIntentResolutionDefaultsProvider(), | ||
| new IntentExplanationIntentResolutionDefaultsProvider(), | ||
| new IntentPlanningIntentResolutionDefaultsProvider(), | ||
| new IntentDecisionIntentResolutionDefaultsProvider(), | ||
| new IntentResearchIntentResolutionDefaultsProvider(), | ||
| new IntentExtractionIntentResolutionDefaultsProvider()); | ||
| } | ||
|
|
||
| /** | ||
| * Full production {@link IntentDefinitionDataSource} (same merge result as before this refactor). | ||
| */ | ||
| public static IntentDefinitionDataSource productionIntentDefinitionDataSource() { | ||
| return new IntentDefinitionDataSource( | ||
| productionDefinitionsProviders(), productionResolutionDefaultsProviders()); | ||
| } | ||
|
|
||
| /** | ||
| * Production {@link IntentDictionary}: indexes and validates completeness over | ||
| * {@link #productionIntentDefinitionDataSource()}. | ||
| */ | ||
| public static IntentDictionary productionIntentDictionary() { | ||
| return new IntentDictionary(productionIntentDefinitionDataSource()); | ||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: rabitis99/prompts-backend
Length of output: 2627
🏁 Script executed:
Repository: rabitis99/prompts-backend
Length of output: 1893
🏁 Script executed:
Repository: rabitis99/prompts-backend
Length of output: 71
ActionIntent enum의 모든 카테고리가 provider로 커버되는지 확인하세요.
ActionIntent enum은 28개의 값을 8개 카테고리로 구성하고 있으며, 8개의 definition providers와 8개의 resolution defaults providers가 각 카테고리를 담당합니다. 현재는 카테고리별 매핑이므로 커버되어 있으나, enum 값이 새로운 카테고리에 추가되거나 카테고리 구조가 변경될 경우 provider 누락 가능성이 있습니다.
IntentDictionary생성 시 fail-fast로 감지되지만, 코드 유지보수 시 주의가 필요합니다.🤖 Prompt for AI Agents