@erode-app/core 0.6.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/adapter-factory.d.ts +3 -0
- package/dist/adapters/adapter-factory.d.ts.map +1 -0
- package/dist/adapters/adapter-factory.js +19 -0
- package/dist/adapters/adapter-factory.js.map +1 -0
- package/dist/adapters/adapter-metadata.d.ts +12 -0
- package/dist/adapters/adapter-metadata.d.ts.map +1 -0
- package/dist/adapters/adapter-metadata.js +2 -0
- package/dist/adapters/adapter-metadata.js.map +1 -0
- package/dist/adapters/architecture-adapter.d.ts +42 -0
- package/dist/adapters/architecture-adapter.d.ts.map +1 -0
- package/dist/adapters/architecture-adapter.js +2 -0
- package/dist/adapters/architecture-adapter.js.map +1 -0
- package/dist/adapters/architecture-types.d.ts +32 -0
- package/dist/adapters/architecture-types.d.ts.map +1 -0
- package/dist/adapters/architecture-types.js +2 -0
- package/dist/adapters/architecture-types.js.map +1 -0
- package/dist/adapters/base-patcher.d.ts +38 -0
- package/dist/adapters/base-patcher.d.ts.map +1 -0
- package/dist/adapters/base-patcher.js +266 -0
- package/dist/adapters/base-patcher.js.map +1 -0
- package/dist/adapters/dsl-validation.d.ts +2 -0
- package/dist/adapters/dsl-validation.d.ts.map +1 -0
- package/dist/adapters/dsl-validation.js +24 -0
- package/dist/adapters/dsl-validation.js.map +1 -0
- package/dist/adapters/likec4/adapter.d.ts +37 -0
- package/dist/adapters/likec4/adapter.d.ts.map +1 -0
- package/dist/adapters/likec4/adapter.js +302 -0
- package/dist/adapters/likec4/adapter.js.map +1 -0
- package/dist/adapters/likec4/dsl-validator.d.ts +3 -0
- package/dist/adapters/likec4/dsl-validator.d.ts.map +1 -0
- package/dist/adapters/likec4/dsl-validator.js +22 -0
- package/dist/adapters/likec4/dsl-validator.js.map +1 -0
- package/dist/adapters/likec4/index.d.ts +2 -0
- package/dist/adapters/likec4/index.d.ts.map +1 -0
- package/dist/adapters/likec4/index.js +2 -0
- package/dist/adapters/likec4/index.js.map +1 -0
- package/dist/adapters/likec4/likec4-types.d.ts +7 -0
- package/dist/adapters/likec4/likec4-types.d.ts.map +1 -0
- package/dist/adapters/likec4/likec4-types.js +2 -0
- package/dist/adapters/likec4/likec4-types.js.map +1 -0
- package/dist/adapters/likec4/metadata.d.ts +3 -0
- package/dist/adapters/likec4/metadata.d.ts.map +1 -0
- package/dist/adapters/likec4/metadata.js +30 -0
- package/dist/adapters/likec4/metadata.js.map +1 -0
- package/dist/adapters/likec4/patcher.d.ts +15 -0
- package/dist/adapters/likec4/patcher.d.ts.map +1 -0
- package/dist/adapters/likec4/patcher.js +69 -0
- package/dist/adapters/likec4/patcher.js.map +1 -0
- package/dist/adapters/likec4/version-check.d.ts +11 -0
- package/dist/adapters/likec4/version-check.d.ts.map +1 -0
- package/dist/adapters/likec4/version-check.js +75 -0
- package/dist/adapters/likec4/version-check.js.map +1 -0
- package/dist/adapters/model-patcher.d.ts +49 -0
- package/dist/adapters/model-patcher.d.ts.map +1 -0
- package/dist/adapters/model-patcher.js +15 -0
- package/dist/adapters/model-patcher.js.map +1 -0
- package/dist/adapters/structurizr/adapter.d.ts +39 -0
- package/dist/adapters/structurizr/adapter.d.ts.map +1 -0
- package/dist/adapters/structurizr/adapter.js +372 -0
- package/dist/adapters/structurizr/adapter.js.map +1 -0
- package/dist/adapters/structurizr/dsl-validator.d.ts +3 -0
- package/dist/adapters/structurizr/dsl-validator.d.ts.map +1 -0
- package/dist/adapters/structurizr/dsl-validator.js +26 -0
- package/dist/adapters/structurizr/dsl-validator.js.map +1 -0
- package/dist/adapters/structurizr/index.d.ts +2 -0
- package/dist/adapters/structurizr/index.d.ts.map +1 -0
- package/dist/adapters/structurizr/index.js +2 -0
- package/dist/adapters/structurizr/index.js.map +1 -0
- package/dist/adapters/structurizr/metadata.d.ts +3 -0
- package/dist/adapters/structurizr/metadata.d.ts.map +1 -0
- package/dist/adapters/structurizr/metadata.js +35 -0
- package/dist/adapters/structurizr/metadata.js.map +1 -0
- package/dist/adapters/structurizr/patcher.d.ts +15 -0
- package/dist/adapters/structurizr/patcher.d.ts.map +1 -0
- package/dist/adapters/structurizr/patcher.js +53 -0
- package/dist/adapters/structurizr/patcher.js.map +1 -0
- package/dist/adapters/structurizr/structurizr-cli.d.ts +2 -0
- package/dist/adapters/structurizr/structurizr-cli.d.ts.map +1 -0
- package/dist/adapters/structurizr/structurizr-cli.js +91 -0
- package/dist/adapters/structurizr/structurizr-cli.js.map +1 -0
- package/dist/adapters/structurizr/structurizr-types.d.ts +3 -0
- package/dist/adapters/structurizr/structurizr-types.d.ts.map +1 -0
- package/dist/adapters/structurizr/structurizr-types.js +2 -0
- package/dist/adapters/structurizr/structurizr-types.js.map +1 -0
- package/dist/adapters/url-utils.d.ts +3 -0
- package/dist/adapters/url-utils.d.ts.map +1 -0
- package/dist/adapters/url-utils.js +53 -0
- package/dist/adapters/url-utils.js.map +1 -0
- package/dist/analysis/analysis-types.d.ts +152 -0
- package/dist/analysis/analysis-types.d.ts.map +1 -0
- package/dist/analysis/analysis-types.js +2 -0
- package/dist/analysis/analysis-types.js.map +1 -0
- package/dist/analysis/prompt-builder.d.ts +27 -0
- package/dist/analysis/prompt-builder.d.ts.map +1 -0
- package/dist/analysis/prompt-builder.js +159 -0
- package/dist/analysis/prompt-builder.js.map +1 -0
- package/dist/analysis/prompt-variables.d.ts +72 -0
- package/dist/analysis/prompt-variables.d.ts.map +1 -0
- package/dist/analysis/prompt-variables.js +2 -0
- package/dist/analysis/prompt-variables.js.map +1 -0
- package/dist/analysis/prompts/component-selection.md +50 -0
- package/dist/analysis/prompts/dependency-extraction.md +219 -0
- package/dist/analysis/prompts/drift-analysis.md +154 -0
- package/dist/analysis/prompts/model-patch.md +29 -0
- package/dist/analysis/section-formatters.d.ts +54 -0
- package/dist/analysis/section-formatters.d.ts.map +1 -0
- package/dist/analysis/section-formatters.js +95 -0
- package/dist/analysis/section-formatters.js.map +1 -0
- package/dist/analysis/template-engine.d.ts +11 -0
- package/dist/analysis/template-engine.d.ts.map +1 -0
- package/dist/analysis/template-engine.js +64 -0
- package/dist/analysis/template-engine.js.map +1 -0
- package/dist/ci-entry.d.ts +3 -0
- package/dist/ci-entry.d.ts.map +1 -0
- package/dist/ci-entry.js +67 -0
- package/dist/ci-entry.js.map +1 -0
- package/dist/errors.d.ts +60 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +134 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +38 -0
- package/dist/index.js.map +1 -0
- package/dist/output/ci-output.d.ts +13 -0
- package/dist/output/ci-output.d.ts.map +1 -0
- package/dist/output/ci-output.js +106 -0
- package/dist/output/ci-output.js.map +1 -0
- package/dist/output/structured-output.d.ts +89 -0
- package/dist/output/structured-output.d.ts.map +1 -0
- package/dist/output/structured-output.js +2 -0
- package/dist/output/structured-output.js.map +1 -0
- package/dist/output.d.ts +73 -0
- package/dist/output.d.ts.map +1 -0
- package/dist/output.js +304 -0
- package/dist/output.js.map +1 -0
- package/dist/pipelines/analyze.d.ts +35 -0
- package/dist/pipelines/analyze.d.ts.map +1 -0
- package/dist/pipelines/analyze.js +316 -0
- package/dist/pipelines/analyze.js.map +1 -0
- package/dist/pipelines/check.d.ts +48 -0
- package/dist/pipelines/check.d.ts.map +1 -0
- package/dist/pipelines/check.js +218 -0
- package/dist/pipelines/check.js.map +1 -0
- package/dist/pipelines/components.d.ts +8 -0
- package/dist/pipelines/components.d.ts.map +1 -0
- package/dist/pipelines/components.js +14 -0
- package/dist/pipelines/components.js.map +1 -0
- package/dist/pipelines/connections.d.ts +34 -0
- package/dist/pipelines/connections.d.ts.map +1 -0
- package/dist/pipelines/connections.js +53 -0
- package/dist/pipelines/connections.js.map +1 -0
- package/dist/pipelines/pr-creation.d.ts +30 -0
- package/dist/pipelines/pr-creation.d.ts.map +1 -0
- package/dist/pipelines/pr-creation.js +26 -0
- package/dist/pipelines/pr-creation.js.map +1 -0
- package/dist/pipelines/progress.d.ts +23 -0
- package/dist/pipelines/progress.d.ts.map +1 -0
- package/dist/pipelines/progress.js +22 -0
- package/dist/pipelines/progress.js.map +1 -0
- package/dist/pipelines/publish.d.ts +39 -0
- package/dist/pipelines/publish.d.ts.map +1 -0
- package/dist/pipelines/publish.js +125 -0
- package/dist/pipelines/publish.js.map +1 -0
- package/dist/pipelines/validate.d.ts +24 -0
- package/dist/pipelines/validate.d.ts.map +1 -0
- package/dist/pipelines/validate.js +79 -0
- package/dist/pipelines/validate.js.map +1 -0
- package/dist/platforms/bitbucket/api-client.d.ts +21 -0
- package/dist/platforms/bitbucket/api-client.d.ts.map +1 -0
- package/dist/platforms/bitbucket/api-client.js +98 -0
- package/dist/platforms/bitbucket/api-client.js.map +1 -0
- package/dist/platforms/bitbucket/index.d.ts +3 -0
- package/dist/platforms/bitbucket/index.d.ts.map +1 -0
- package/dist/platforms/bitbucket/index.js +3 -0
- package/dist/platforms/bitbucket/index.js.map +1 -0
- package/dist/platforms/bitbucket/reader.d.ts +9 -0
- package/dist/platforms/bitbucket/reader.d.ts.map +1 -0
- package/dist/platforms/bitbucket/reader.js +119 -0
- package/dist/platforms/bitbucket/reader.js.map +1 -0
- package/dist/platforms/bitbucket/writer.d.ts +15 -0
- package/dist/platforms/bitbucket/writer.d.ts.map +1 -0
- package/dist/platforms/bitbucket/writer.js +172 -0
- package/dist/platforms/bitbucket/writer.js.map +1 -0
- package/dist/platforms/github/index.d.ts +3 -0
- package/dist/platforms/github/index.d.ts.map +1 -0
- package/dist/platforms/github/index.js +3 -0
- package/dist/platforms/github/index.js.map +1 -0
- package/dist/platforms/github/reader.d.ts +9 -0
- package/dist/platforms/github/reader.d.ts.map +1 -0
- package/dist/platforms/github/reader.js +141 -0
- package/dist/platforms/github/reader.js.map +1 -0
- package/dist/platforms/github/writer.d.ts +15 -0
- package/dist/platforms/github/writer.d.ts.map +1 -0
- package/dist/platforms/github/writer.js +225 -0
- package/dist/platforms/github/writer.js.map +1 -0
- package/dist/platforms/gitlab/index.d.ts +3 -0
- package/dist/platforms/gitlab/index.d.ts.map +1 -0
- package/dist/platforms/gitlab/index.js +3 -0
- package/dist/platforms/gitlab/index.js.map +1 -0
- package/dist/platforms/gitlab/reader.d.ts +9 -0
- package/dist/platforms/gitlab/reader.d.ts.map +1 -0
- package/dist/platforms/gitlab/reader.js +136 -0
- package/dist/platforms/gitlab/reader.js.map +1 -0
- package/dist/platforms/gitlab/writer.d.ts +14 -0
- package/dist/platforms/gitlab/writer.d.ts.map +1 -0
- package/dist/platforms/gitlab/writer.js +130 -0
- package/dist/platforms/gitlab/writer.js.map +1 -0
- package/dist/platforms/platform-factory.d.ts +7 -0
- package/dist/platforms/platform-factory.d.ts.map +1 -0
- package/dist/platforms/platform-factory.js +53 -0
- package/dist/platforms/platform-factory.js.map +1 -0
- package/dist/platforms/platform-utils.d.ts +12 -0
- package/dist/platforms/platform-utils.d.ts.map +1 -0
- package/dist/platforms/platform-utils.js +48 -0
- package/dist/platforms/platform-utils.js.map +1 -0
- package/dist/platforms/source-platform.d.ts +117 -0
- package/dist/platforms/source-platform.d.ts.map +1 -0
- package/dist/platforms/source-platform.js +2 -0
- package/dist/platforms/source-platform.js.map +1 -0
- package/dist/providers/ai-provider.d.ts +23 -0
- package/dist/providers/ai-provider.d.ts.map +1 -0
- package/dist/providers/ai-provider.js +2 -0
- package/dist/providers/ai-provider.js.map +1 -0
- package/dist/providers/analysis-phase.d.ts +13 -0
- package/dist/providers/analysis-phase.d.ts.map +1 -0
- package/dist/providers/analysis-phase.js +14 -0
- package/dist/providers/analysis-phase.js.map +1 -0
- package/dist/providers/anthropic/models.d.ts +5 -0
- package/dist/providers/anthropic/models.d.ts.map +1 -0
- package/dist/providers/anthropic/models.js +5 -0
- package/dist/providers/anthropic/models.js.map +1 -0
- package/dist/providers/anthropic/provider.d.ts +12 -0
- package/dist/providers/anthropic/provider.d.ts.map +1 -0
- package/dist/providers/anthropic/provider.js +47 -0
- package/dist/providers/anthropic/provider.js.map +1 -0
- package/dist/providers/base-provider.d.ts +34 -0
- package/dist/providers/base-provider.d.ts.map +1 -0
- package/dist/providers/base-provider.js +100 -0
- package/dist/providers/base-provider.js.map +1 -0
- package/dist/providers/gemini/models.d.ts +5 -0
- package/dist/providers/gemini/models.d.ts.map +1 -0
- package/dist/providers/gemini/models.js +5 -0
- package/dist/providers/gemini/models.js.map +1 -0
- package/dist/providers/gemini/provider.d.ts +12 -0
- package/dist/providers/gemini/provider.d.ts.map +1 -0
- package/dist/providers/gemini/provider.js +42 -0
- package/dist/providers/gemini/provider.js.map +1 -0
- package/dist/providers/openai/models.d.ts +5 -0
- package/dist/providers/openai/models.d.ts.map +1 -0
- package/dist/providers/openai/models.js +5 -0
- package/dist/providers/openai/models.js.map +1 -0
- package/dist/providers/openai/provider.d.ts +12 -0
- package/dist/providers/openai/provider.d.ts.map +1 -0
- package/dist/providers/openai/provider.js +49 -0
- package/dist/providers/openai/provider.js.map +1 -0
- package/dist/providers/provider-factory.d.ts +3 -0
- package/dist/providers/provider-factory.d.ts.map +1 -0
- package/dist/providers/provider-factory.js +45 -0
- package/dist/providers/provider-factory.js.map +1 -0
- package/dist/schemas/bitbucket-api.schema.d.ts +52 -0
- package/dist/schemas/bitbucket-api.schema.d.ts.map +1 -0
- package/dist/schemas/bitbucket-api.schema.js +50 -0
- package/dist/schemas/bitbucket-api.schema.js.map +1 -0
- package/dist/schemas/common.schema.d.ts +46 -0
- package/dist/schemas/common.schema.d.ts.map +1 -0
- package/dist/schemas/common.schema.js +67 -0
- package/dist/schemas/common.schema.js.map +1 -0
- package/dist/schemas/dependency-extraction.schema.d.ts +17 -0
- package/dist/schemas/dependency-extraction.schema.d.ts.map +1 -0
- package/dist/schemas/dependency-extraction.schema.js +13 -0
- package/dist/schemas/dependency-extraction.schema.js.map +1 -0
- package/dist/schemas/drift-analysis.schema.d.ts +40 -0
- package/dist/schemas/drift-analysis.schema.d.ts.map +1 -0
- package/dist/schemas/drift-analysis.schema.js +15 -0
- package/dist/schemas/drift-analysis.schema.js.map +1 -0
- package/dist/schemas/gitlab-api.schema.d.ts +33 -0
- package/dist/schemas/gitlab-api.schema.d.ts.map +1 -0
- package/dist/schemas/gitlab-api.schema.js +33 -0
- package/dist/schemas/gitlab-api.schema.js.map +1 -0
- package/dist/schemas/likec4.schema.d.ts +26 -0
- package/dist/schemas/likec4.schema.d.ts.map +1 -0
- package/dist/schemas/likec4.schema.js +23 -0
- package/dist/schemas/likec4.schema.js.map +1 -0
- package/dist/schemas/package.schema.d.ts +5 -0
- package/dist/schemas/package.schema.d.ts.map +1 -0
- package/dist/schemas/package.schema.js +5 -0
- package/dist/schemas/package.schema.js.map +1 -0
- package/dist/schemas/source-platform.schema.d.ts +56 -0
- package/dist/schemas/source-platform.schema.d.ts.map +1 -0
- package/dist/schemas/source-platform.schema.js +49 -0
- package/dist/schemas/source-platform.schema.js.map +1 -0
- package/dist/schemas/structurizr.schema.d.ts +234 -0
- package/dist/schemas/structurizr.schema.d.ts.map +1 -0
- package/dist/schemas/structurizr.schema.js +54 -0
- package/dist/schemas/structurizr.schema.js.map +1 -0
- package/dist/skip-patterns +62 -0
- package/dist/utils/config.d.ts +156 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/config.js +267 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/error-utils.d.ts +2 -0
- package/dist/utils/error-utils.d.ts.map +1 -0
- package/dist/utils/error-utils.js +6 -0
- package/dist/utils/error-utils.js.map +1 -0
- package/dist/utils/git-diff.d.ts +35 -0
- package/dist/utils/git-diff.d.ts.map +1 -0
- package/dist/utils/git-diff.js +114 -0
- package/dist/utils/git-diff.js.map +1 -0
- package/dist/utils/model-source.d.ts +30 -0
- package/dist/utils/model-source.d.ts.map +1 -0
- package/dist/utils/model-source.js +167 -0
- package/dist/utils/model-source.js.map +1 -0
- package/dist/utils/retry.d.ts +9 -0
- package/dist/utils/retry.d.ts.map +1 -0
- package/dist/utils/retry.js +51 -0
- package/dist/utils/retry.js.map +1 -0
- package/dist/utils/skip-patterns.d.ts +7 -0
- package/dist/utils/skip-patterns.d.ts.map +1 -0
- package/dist/utils/skip-patterns.js +35 -0
- package/dist/utils/skip-patterns.js.map +1 -0
- package/dist/utils/validation.d.ts +4 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js +37 -0
- package/dist/utils/validation.js.map +1 -0
- package/package.json +78 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
export interface DependencyExtractionPromptVars {
|
|
2
|
+
diff: string;
|
|
3
|
+
commit: {
|
|
4
|
+
sha: string;
|
|
5
|
+
message: string;
|
|
6
|
+
author: string;
|
|
7
|
+
};
|
|
8
|
+
repository: {
|
|
9
|
+
owner: string;
|
|
10
|
+
repo: string;
|
|
11
|
+
url: string;
|
|
12
|
+
};
|
|
13
|
+
componentsContext: string;
|
|
14
|
+
}
|
|
15
|
+
export interface ComponentSelectionPromptVars {
|
|
16
|
+
components: string;
|
|
17
|
+
files: string;
|
|
18
|
+
}
|
|
19
|
+
export interface ChangeContextVars {
|
|
20
|
+
/** "a pull request" or "local changes" */
|
|
21
|
+
label: string;
|
|
22
|
+
/** "PULL REQUEST" or "LOCAL CHANGES" */
|
|
23
|
+
headerPrefix: string;
|
|
24
|
+
/** "PR #42:" or "Changes:" */
|
|
25
|
+
refLabel: string;
|
|
26
|
+
/** " IN THIS PR" or "" */
|
|
27
|
+
inSuffix: string;
|
|
28
|
+
/** Considerations paragraph for the template */
|
|
29
|
+
considerations: string;
|
|
30
|
+
}
|
|
31
|
+
export interface DriftAnalysisPromptVars {
|
|
32
|
+
changeContext: ChangeContextVars;
|
|
33
|
+
changeRequest: {
|
|
34
|
+
number: number;
|
|
35
|
+
title: string;
|
|
36
|
+
author: string;
|
|
37
|
+
base: {
|
|
38
|
+
ref: string;
|
|
39
|
+
};
|
|
40
|
+
head: {
|
|
41
|
+
ref: string;
|
|
42
|
+
};
|
|
43
|
+
stats: {
|
|
44
|
+
commits: number;
|
|
45
|
+
additions: number;
|
|
46
|
+
deletions: number;
|
|
47
|
+
files_changed: number;
|
|
48
|
+
};
|
|
49
|
+
descriptionSection: string;
|
|
50
|
+
};
|
|
51
|
+
component: {
|
|
52
|
+
name: string;
|
|
53
|
+
id: string;
|
|
54
|
+
type: string;
|
|
55
|
+
repository: string;
|
|
56
|
+
tags: string;
|
|
57
|
+
};
|
|
58
|
+
commitsSection: string;
|
|
59
|
+
commitsNote: string;
|
|
60
|
+
allowedDeps: string;
|
|
61
|
+
dependents: string;
|
|
62
|
+
allComponentIds: string;
|
|
63
|
+
allRelationships: string;
|
|
64
|
+
filesSection: string;
|
|
65
|
+
dependencyChangesSection: string;
|
|
66
|
+
}
|
|
67
|
+
export interface ModelPatchPromptVars {
|
|
68
|
+
fileContent: string;
|
|
69
|
+
linesToInsert: string;
|
|
70
|
+
modelFormat: string;
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=prompt-variables.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-variables.d.ts","sourceRoot":"","sources":["../../src/analysis/prompt-variables.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE;QACN,GAAG,EAAE,MAAM,CAAC;QACZ,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,UAAU,EAAE;QACV,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,4BAA4B;IAC3C,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,iBAAiB;IAChC,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,YAAY,EAAE,MAAM,CAAC;IACrB,8BAA8B;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,0BAA0B;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,gDAAgD;IAChD,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,uBAAuB;IACtC,aAAa,EAAE,iBAAiB,CAAC;IACjC,aAAa,EAAE;QACb,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE;YAAE,GAAG,EAAE,MAAM,CAAA;SAAE,CAAC;QACtB,IAAI,EAAE;YAAE,GAAG,EAAE,MAAM,CAAA;SAAE,CAAC;QACtB,KAAK,EAAE;YACL,OAAO,EAAE,MAAM,CAAC;YAChB,SAAS,EAAE,MAAM,CAAC;YAClB,SAAS,EAAE,MAAM,CAAC;YAClB,aAAa,EAAE,MAAM,CAAC;SACvB,CAAC;QACF,kBAAkB,EAAE,MAAM,CAAC;KAC5B,CAAC;IACF,SAAS,EAAE;QACT,IAAI,EAAE,MAAM,CAAC;QACb,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,EAAE,MAAM,CAAC;QACnB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,wBAAwB,EAAE,MAAM,CAAC;CAClC;AAED,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-variables.js","sourceRoot":"","sources":["../../src/analysis/prompt-variables.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
You are determining which component in a monorepo is affected by a set of code changes.
|
|
2
|
+
|
|
3
|
+
## Components in This Repository
|
|
4
|
+
|
|
5
|
+
{{components}}
|
|
6
|
+
|
|
7
|
+
## Files Changed
|
|
8
|
+
|
|
9
|
+
{{files}}
|
|
10
|
+
|
|
11
|
+
## Task
|
|
12
|
+
|
|
13
|
+
Identify the component being modified based on the file paths listed above.
|
|
14
|
+
|
|
15
|
+
**Selection Strategy:**
|
|
16
|
+
|
|
17
|
+
1. **PRIMARY: Match folder names to component names:**
|
|
18
|
+
- `api-service/` → component with "API-Service" or "api_service" in name/ID
|
|
19
|
+
- `backend/` or `server/` → component with "Backend" or "Server" in name/ID
|
|
20
|
+
- `frontend/` or `*-ui/` → webapp component
|
|
21
|
+
- `mobile/`, `ios/`, `android/` → mobile app component
|
|
22
|
+
|
|
23
|
+
2. **SECONDARY: Use descriptions as supporting evidence:**
|
|
24
|
+
- If folder match is unclear, check descriptions for hints (e.g., "Backend for web dashboard" confirms api-service/)
|
|
25
|
+
- BUT folder structure always wins over descriptions
|
|
26
|
+
|
|
27
|
+
3. **TERTIARY: Use technology as confirmation:**
|
|
28
|
+
- If file extensions indicate a specific stack (`.cs` → .NET, `.java` → Java, `.tsx` → React)
|
|
29
|
+
- Check if technology matches to confirm selection
|
|
30
|
+
- But don't rely on this alone - folder structure is still primary
|
|
31
|
+
|
|
32
|
+
4. **For shared/core code:**
|
|
33
|
+
- If most files are in `core/`, `shared/`, `common/`, or `lib/`: check which specific API folder also has changes
|
|
34
|
+
- Pick the component that uses that shared code
|
|
35
|
+
|
|
36
|
+
5. **Match loosely:**
|
|
37
|
+
- "Admin-API" = "admin_api" = "admin-api/" (all refer to the same component)
|
|
38
|
+
- Ignore case and separator differences
|
|
39
|
+
|
|
40
|
+
**What NOT to do:**
|
|
41
|
+
|
|
42
|
+
- ❌ Don't select based ONLY on descriptions (folder structure is primary)
|
|
43
|
+
- ❌ Don't select based on what the code functionally does
|
|
44
|
+
- ❌ Don't guess randomly
|
|
45
|
+
|
|
46
|
+
## Output Format
|
|
47
|
+
|
|
48
|
+
Respond with ONLY the component ID, nothing else.
|
|
49
|
+
|
|
50
|
+
Example: `system.backend.api_service`
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
You are a senior software architect tasked with inspecting code changes to surface architectural dependencies.
|
|
2
|
+
|
|
3
|
+
## REPOSITORY CONTEXT
|
|
4
|
+
|
|
5
|
+
Repository: {{repository.url}}
|
|
6
|
+
Owner/Repo: {{repository.owner}}/{{repository.repo}}
|
|
7
|
+
{{componentsContext}}
|
|
8
|
+
|
|
9
|
+
## CHANGE INFORMATION
|
|
10
|
+
|
|
11
|
+
Head SHA: {{commit.sha}}
|
|
12
|
+
PR Title: {{commit.message}}
|
|
13
|
+
Author: {{commit.author}}
|
|
14
|
+
|
|
15
|
+
## TASK
|
|
16
|
+
|
|
17
|
+
Review the git diff below and extract ONLY **EXTERNAL architectural dependencies** — the systems, services, and tools this component relies on outside its own codebase.
|
|
18
|
+
|
|
19
|
+
⚠️ CRITICAL: FOCUS ON CROSS-SYSTEM BOUNDARIES ONLY
|
|
20
|
+
|
|
21
|
+
The goal is to detect when this component begins or ceases to depend on EXTERNAL systems. Internal changes (new classes, methods, database columns, role hierarchies) are NOT architectural dependencies.
|
|
22
|
+
|
|
23
|
+
## WHAT TO EXTRACT (External Dependencies)
|
|
24
|
+
|
|
25
|
+
### 1. External Service Integrations
|
|
26
|
+
|
|
27
|
+
- NEW HTTP client calling another service's API (e.g., "Access Management API", "Payment Gateway")
|
|
28
|
+
- NEW gRPC client to external service
|
|
29
|
+
- NEW WebSocket connections to external systems
|
|
30
|
+
- NEW message queue subscriptions (Service Bus topics/queues, Kafka topics, RabbitMQ queues)
|
|
31
|
+
- NEW message broker subscriber/listener registrations
|
|
32
|
+
- Configuration URLs pointing to external services
|
|
33
|
+
|
|
34
|
+
### 2. External Package Dependencies
|
|
35
|
+
|
|
36
|
+
- NEW NuGet/npm/pip packages added to package files
|
|
37
|
+
- REMOVED packages
|
|
38
|
+
- Only include packages that represent external tools/libraries (e.g., "IdentityModel.Client", "Redis.StackExchange")
|
|
39
|
+
|
|
40
|
+
### 3. External Infrastructure Services
|
|
41
|
+
|
|
42
|
+
- NEW cloud service usage (Azure Blob Storage, AWS S3, external Redis)
|
|
43
|
+
- NEW message queue connections to external brokers (Azure Service Bus, Kafka)
|
|
44
|
+
- NEW external authentication providers (Auth0, Okta, external OAuth)
|
|
45
|
+
|
|
46
|
+
### 4. External Configuration Dependencies
|
|
47
|
+
|
|
48
|
+
- NEW configuration entries for external service URLs
|
|
49
|
+
- NEW environment variables for external system endpoints
|
|
50
|
+
|
|
51
|
+
## WHAT TO IGNORE (Internal Changes)
|
|
52
|
+
|
|
53
|
+
### ❌ Database Changes
|
|
54
|
+
|
|
55
|
+
- New tables, columns, queries within the same database
|
|
56
|
+
- Schema migrations
|
|
57
|
+
- ORM entity changes
|
|
58
|
+
- Database repository methods
|
|
59
|
+
|
|
60
|
+
### ❌ Internal API Changes
|
|
61
|
+
|
|
62
|
+
- New REST endpoints in this service
|
|
63
|
+
- New controllers or route handlers
|
|
64
|
+
- Internal API refactoring
|
|
65
|
+
|
|
66
|
+
**⚠️ EXCEPTION:** When new or modified route handlers/controllers contain outbound HTTP calls, gRPC calls, or message queue connections to OTHER services, those outbound calls ARE external dependencies and MUST be extracted. Ignore the handler definition itself — extract the outbound call.
|
|
67
|
+
|
|
68
|
+
### ❌ Internal Code Structure
|
|
69
|
+
|
|
70
|
+
- New classes, interfaces, services
|
|
71
|
+
- Role hierarchies and permission flags
|
|
72
|
+
- Internal abstractions and interfaces
|
|
73
|
+
- Method signatures and parameters
|
|
74
|
+
- Internal enums, flags, and constants
|
|
75
|
+
- Data Transfer Objects (DTOs) and model classes
|
|
76
|
+
- OpenAPI/Swagger/validation annotations
|
|
77
|
+
- Business logic and validation rules
|
|
78
|
+
|
|
79
|
+
### ❌ Authorization/Permissions
|
|
80
|
+
|
|
81
|
+
- Role definitions and mappings
|
|
82
|
+
- Permission flags
|
|
83
|
+
- Internal authorization logic
|
|
84
|
+
|
|
85
|
+
### ❌ Other Internal Changes
|
|
86
|
+
|
|
87
|
+
- Code formatting
|
|
88
|
+
- Test changes
|
|
89
|
+
- Documentation
|
|
90
|
+
- Build scripts (unless they add external dependencies)
|
|
91
|
+
|
|
92
|
+
## EXAMPLES
|
|
93
|
+
|
|
94
|
+
### ✅ EXTRACT THIS (Cross-System Dependencies)
|
|
95
|
+
|
|
96
|
+
- "Access Management API" - NEW external service dependency via HTTP
|
|
97
|
+
- "IdentityModel.Client" - NEW NuGet package for OAuth2
|
|
98
|
+
- "configuration['AccessManagement:Url']" - NEW external service URL config
|
|
99
|
+
- "messageBroker.subscribe('accounting-plan-out-v1', ...)" - NEW Service Bus topic subscription
|
|
100
|
+
- "KafkaConsumer.subscribe('order-events')" - NEW Kafka topic subscription
|
|
101
|
+
- "@JmsListener(destination = 'invoice-queue')" - NEW message queue listener
|
|
102
|
+
- "Order Service" - NEW external service via HTTP proxy route (e.g., gateway route handler calling `fetch("http://order-service:3005/orders")`)
|
|
103
|
+
|
|
104
|
+
### ❌ DON'T EXTRACT THIS (Internal Changes)
|
|
105
|
+
|
|
106
|
+
- "New UserController endpoint" - Internal API endpoint
|
|
107
|
+
- "Added status column to table" - Internal database schema change
|
|
108
|
+
- "Updated role hierarchy" - Internal authorization change
|
|
109
|
+
- "IServiceClient interface" - Internal abstraction/interface
|
|
110
|
+
- "enum PaymentStatus" - Internal enum/flag definition
|
|
111
|
+
- "@Schema/@Valid/@NotNull" - Validation/API documentation annotations
|
|
112
|
+
- "new DataDto()" - Internal DTO instantiation
|
|
113
|
+
- "entity.getProperty()" - Internal getter/setter methods
|
|
114
|
+
|
|
115
|
+
## DESCRIPTION GUIDELINES
|
|
116
|
+
|
|
117
|
+
- Keep descriptions SHORT (5-10 words)
|
|
118
|
+
- Focus on WHAT external system, not HOW it's used
|
|
119
|
+
- Bad: "New HTTP client for integrating with Access Management service for permission checking and role synchronization"
|
|
120
|
+
- Good: "External service for permissions"
|
|
121
|
+
|
|
122
|
+
## OUTPUT FORMAT
|
|
123
|
+
|
|
124
|
+
Respond with ONLY valid JSON in this exact structure:
|
|
125
|
+
|
|
126
|
+
```json
|
|
127
|
+
{
|
|
128
|
+
"dependencies": [
|
|
129
|
+
{
|
|
130
|
+
"type": "added|modified|removed",
|
|
131
|
+
"file": "path/to/file",
|
|
132
|
+
"dependency": "Short name (e.g., 'Access Management API', 'IdentityModel.Client')",
|
|
133
|
+
"description": "5-10 words describing what it is",
|
|
134
|
+
"code": "Key code snippet (1-2 lines max)"
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
"summary": "1 sentence summary of external dependencies added/removed"
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## EXPECTED OUTPUT SIZE
|
|
142
|
+
|
|
143
|
+
- Typical commit: 1-5 dependencies
|
|
144
|
+
- Only list each UNIQUE external system/package once
|
|
145
|
+
- Combine similar changes (e.g., multiple files calling same API = 1 dependency)
|
|
146
|
+
|
|
147
|
+
## NAMING GUIDELINES
|
|
148
|
+
|
|
149
|
+
- Use the most common/recognizable name for services
|
|
150
|
+
- Be flexible with naming variations: "CustomerConnect", "Customer Connect API", "customer-connect" are all the same
|
|
151
|
+
- Prefer simple names: "Access Management API" over "AccessManagementAPI" or "access-management-service"
|
|
152
|
+
- Match naming to what would appear in architecture diagrams
|
|
153
|
+
|
|
154
|
+
## EXAMPLE OUTPUT
|
|
155
|
+
|
|
156
|
+
### Example 1: HTTP API Integration
|
|
157
|
+
|
|
158
|
+
```json
|
|
159
|
+
{
|
|
160
|
+
"dependencies": [
|
|
161
|
+
{
|
|
162
|
+
"type": "added",
|
|
163
|
+
"file": "AccessManagementClient.cs",
|
|
164
|
+
"dependency": "Access Management API",
|
|
165
|
+
"description": "External service for permissions",
|
|
166
|
+
"code": "httpClient.GetFromJsonAsync(\"v1/permissions/me/check\")"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"type": "added",
|
|
170
|
+
"file": "AccessManagementClient.cs",
|
|
171
|
+
"dependency": "IdentityModel.Client",
|
|
172
|
+
"description": "OAuth2/OIDC token handling library",
|
|
173
|
+
"code": "using IdentityModel.Client;"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"type": "added",
|
|
177
|
+
"file": "appsettings.json",
|
|
178
|
+
"dependency": "AccessManagement:Url config",
|
|
179
|
+
"description": "External service endpoint configuration",
|
|
180
|
+
"code": "configuration.GetRequiredSection(\"AccessManagement:Url\")"
|
|
181
|
+
}
|
|
182
|
+
],
|
|
183
|
+
"summary": "Added dependency on external Access Management API service"
|
|
184
|
+
}
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### Example 2: Service Bus Subscription
|
|
188
|
+
|
|
189
|
+
```json
|
|
190
|
+
{
|
|
191
|
+
"dependencies": [
|
|
192
|
+
{
|
|
193
|
+
"type": "added",
|
|
194
|
+
"file": "BookkeepingSubscription.java",
|
|
195
|
+
"dependency": "Bookkeeping Service",
|
|
196
|
+
"description": "External accounting service via Service Bus",
|
|
197
|
+
"code": "messageBroker.subscribe(\"accounting-plan-out-v1\", \"checkout\", handler)"
|
|
198
|
+
}
|
|
199
|
+
],
|
|
200
|
+
"summary": "Added Service Bus subscription to Bookkeeping service for account plan updates"
|
|
201
|
+
}
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
If NO EXTERNAL architectural dependencies were changed, return:
|
|
205
|
+
|
|
206
|
+
```json
|
|
207
|
+
{
|
|
208
|
+
"dependencies": [],
|
|
209
|
+
"summary": "No external architectural dependencies detected"
|
|
210
|
+
}
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
## GIT DIFF
|
|
214
|
+
|
|
215
|
+
```diff
|
|
216
|
+
{{diff}}
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
Examine the diff above and return the architectural dependencies as JSON.
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
You are a senior software architect evaluating {{changeContext.label}} for signs of architectural drift.
|
|
2
|
+
|
|
3
|
+
## {{changeContext.headerPrefix}} CONTEXT
|
|
4
|
+
|
|
5
|
+
{{changeContext.refLabel}} {{changeRequest.title}}
|
|
6
|
+
Author: {{changeRequest.author}}
|
|
7
|
+
Base: {{changeRequest.base.ref}} → Head: {{changeRequest.head.ref}}
|
|
8
|
+
Commits: {{changeRequest.stats.commits}}
|
|
9
|
+
Changes: +{{changeRequest.stats.additions}} -{{changeRequest.stats.deletions}} ({{changeRequest.stats.files_changed}} files)
|
|
10
|
+
|
|
11
|
+
{{changeRequest.descriptionSection}}
|
|
12
|
+
|
|
13
|
+
## COMPONENT CONTEXT
|
|
14
|
+
|
|
15
|
+
Name: {{component.name}} ({{component.id}})
|
|
16
|
+
Type: {{component.type}}
|
|
17
|
+
Repository: {{component.repository}}
|
|
18
|
+
Tags: {{component.tags}}
|
|
19
|
+
|
|
20
|
+
## COMMITS{{changeContext.inSuffix}}
|
|
21
|
+
|
|
22
|
+
{{commitsSection}}{{commitsNote}}
|
|
23
|
+
|
|
24
|
+
## MODEL - ALLOWED DEPENDENCIES
|
|
25
|
+
|
|
26
|
+
According to the architecture model, this component is allowed to depend on:
|
|
27
|
+
{{allowedDeps}}
|
|
28
|
+
|
|
29
|
+
## MODEL - COMPONENTS DEPENDING ON THIS
|
|
30
|
+
|
|
31
|
+
These components depend on this component:
|
|
32
|
+
{{dependents}}
|
|
33
|
+
|
|
34
|
+
## ALL KNOWN COMPONENTS
|
|
35
|
+
|
|
36
|
+
These are ALL component IDs currently in the architecture model:
|
|
37
|
+
{{allComponentIds}}
|
|
38
|
+
|
|
39
|
+
## ALL MODEL RELATIONSHIPS
|
|
40
|
+
|
|
41
|
+
These are ALL relationships currently declared in the architecture model:
|
|
42
|
+
{{allRelationships}}
|
|
43
|
+
|
|
44
|
+
## CHANGED FILES{{changeContext.inSuffix}}
|
|
45
|
+
|
|
46
|
+
{{filesSection}}
|
|
47
|
+
|
|
48
|
+
## DEPENDENCY CHANGES DETECTED
|
|
49
|
+
|
|
50
|
+
{{dependencyChangesSection}}
|
|
51
|
+
|
|
52
|
+
## ADDITIONAL CONSIDERATIONS
|
|
53
|
+
|
|
54
|
+
{{changeContext.considerations}}
|
|
55
|
+
|
|
56
|
+
## ANALYSIS TASK
|
|
57
|
+
|
|
58
|
+
**IMPORTANT: Focus ONLY on architectural drift. Do NOT comment on:**
|
|
59
|
+
|
|
60
|
+
- Commit message quality or conventions
|
|
61
|
+
- Change size or number of commits
|
|
62
|
+
- Development workflow or branching strategy
|
|
63
|
+
- Code style, formatting, or non-architectural code quality
|
|
64
|
+
|
|
65
|
+
Cross-reference the dependency changes above against the architecture model and assess:
|
|
66
|
+
|
|
67
|
+
### 1. New Dependencies NOT in Model (Potential Drift)
|
|
68
|
+
|
|
69
|
+
- Are there new dependencies that aren't in the allowed dependencies list?
|
|
70
|
+
- Should these be added to the model, or is the code wrong?
|
|
71
|
+
|
|
72
|
+
### 2. Removed Dependencies Still in Model (Potential Cleanup)
|
|
73
|
+
|
|
74
|
+
- Were any dependencies removed that should also be removed from the model?
|
|
75
|
+
|
|
76
|
+
### 3. Architectural Violations (High Priority)
|
|
77
|
+
|
|
78
|
+
- Direct database access from UI components
|
|
79
|
+
- Cross-boundary service calls that violate domain separation
|
|
80
|
+
- Bypassing proper API layers
|
|
81
|
+
- Hardcoded connection strings or service endpoints
|
|
82
|
+
|
|
83
|
+
### 4. Positive Changes (Improvements)
|
|
84
|
+
|
|
85
|
+
- Removing inappropriate dependencies
|
|
86
|
+
- Better alignment with the architecture
|
|
87
|
+
- Adding proper abstraction layers
|
|
88
|
+
|
|
89
|
+
## OUTPUT FORMAT
|
|
90
|
+
|
|
91
|
+
Respond with ONLY valid JSON:
|
|
92
|
+
|
|
93
|
+
```json
|
|
94
|
+
{
|
|
95
|
+
"hasViolations": boolean,
|
|
96
|
+
"violations": [
|
|
97
|
+
{
|
|
98
|
+
"severity": "high|medium|low",
|
|
99
|
+
"description": "Clear description of the violation",
|
|
100
|
+
"file": "filename if applicable",
|
|
101
|
+
"line": line_number_if_known,
|
|
102
|
+
"commit": "commit SHA if relevant",
|
|
103
|
+
"suggestion": "How to fix this or update the model"
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"improvements": ["List of architectural improvements in this commit"],
|
|
107
|
+
"warnings": ["Architectural concerns to watch that aren't violations yet (e.g., increased coupling, potential future drift risks)"],
|
|
108
|
+
"modelUpdates": {
|
|
109
|
+
"add": ["Dependencies to ADD to model"],
|
|
110
|
+
"remove": ["Dependencies to REMOVE from model"],
|
|
111
|
+
"notes": "Additional context about model updates",
|
|
112
|
+
"relationships": [
|
|
113
|
+
{
|
|
114
|
+
"source": "exact.component.id.from.model",
|
|
115
|
+
"target": "exact.component.id.from.model",
|
|
116
|
+
"kind": "optional relationship kind",
|
|
117
|
+
"description": "What this dependency is for"
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
"newComponents": [
|
|
121
|
+
{
|
|
122
|
+
"id": "snake_case_component_id",
|
|
123
|
+
"kind": "service|webapp|database|library|system",
|
|
124
|
+
"name": "Human-Readable Name",
|
|
125
|
+
"description": "What this component does",
|
|
126
|
+
"tags": ["backend", "microservice"],
|
|
127
|
+
"technology": "TypeScript"
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
"summary": "2-3 sentence summary of the architectural impact"
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Concentrate on architectural drift — whether the code aligns with the documented architecture.
|
|
136
|
+
|
|
137
|
+
**IMPORTANT for modelUpdates.relationships:**
|
|
138
|
+
|
|
139
|
+
- Use EXACT component IDs from the ALL KNOWN COMPONENTS list or from `newComponents` you are proposing
|
|
140
|
+
- Only include relationships that should be ADDED to the model
|
|
141
|
+
- The `source` can be ANY component visible in these changes — not only {{component.id}}. If the change introduces a new service that calls an existing one, the new service should be the `source`
|
|
142
|
+
- Prefer relationships that are evidenced by the diff and dependency changes above
|
|
143
|
+
- The `kind` field is optional. If provided, use EXACT kinds from the ALL MODEL RELATIONSHIPS section (the values inside `[...]`). If unsure, omit the `kind` field entirely
|
|
144
|
+
- The `description` should briefly explain what this dependency is used for
|
|
145
|
+
|
|
146
|
+
**IMPORTANT for modelUpdates.newComponents:**
|
|
147
|
+
|
|
148
|
+
- Review the CHANGED FILES section above for brand-new services, applications, or systems that are NOT in the ALL KNOWN COMPONENTS list
|
|
149
|
+
- Look for: new directories/packages (e.g., a new `packages/order-service/`), new entry points (`src/index.ts` in a new directory), new Dockerfiles, new service configuration
|
|
150
|
+
- The `id` must use snake_case (e.g., `order_service`, `payment_gateway`)
|
|
151
|
+
- The `kind` must be one of the element types from the architecture specification
|
|
152
|
+
- If a relationship references a component not in the model, you MUST add it to `newComponents` AND include the relationship in `relationships`
|
|
153
|
+
- Do NOT create new components for external third-party services
|
|
154
|
+
- When in doubt, do NOT propose a new component — flag it in `notes` instead
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
You are a code editor. Your task is to insert relationship lines into an existing architecture model file.
|
|
2
|
+
|
|
3
|
+
## MODEL FORMAT
|
|
4
|
+
|
|
5
|
+
{{modelFormat}}
|
|
6
|
+
|
|
7
|
+
## CURRENT FILE CONTENT
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
{{fileContent}}
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## LINES TO INSERT
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
{{linesToInsert}}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## INSTRUCTIONS
|
|
20
|
+
|
|
21
|
+
1. Insert the lines above into the appropriate location in the file
|
|
22
|
+
2. For LikeC4 (.c4) files: insert component definitions (blocks with `= service/webapp/...`) INSIDE the `model { }` block, BEFORE standalone relationship lines. Insert relationship lines near existing relationship declarations.
|
|
23
|
+
3. For Structurizr (.dsl) files: insert component definitions INSIDE the `model { }` block, BEFORE relationship lines. Insert relationship lines near existing relationship declarations.
|
|
24
|
+
4. Match the indentation style of the surrounding code
|
|
25
|
+
5. Do NOT modify any existing lines
|
|
26
|
+
6. Do NOT add comments or explanations
|
|
27
|
+
7. Do NOT wrap the output in markdown code fences
|
|
28
|
+
|
|
29
|
+
Return ONLY the complete modified file content. Nothing else.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { DependencyExtractionResult } from '../schemas/dependency-extraction.schema.js';
|
|
2
|
+
export declare function formatAllowedDependencies(architectural: {
|
|
3
|
+
relationships?: {
|
|
4
|
+
target: {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
};
|
|
8
|
+
kind?: string;
|
|
9
|
+
title?: string;
|
|
10
|
+
}[];
|
|
11
|
+
dependencies: {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
type: string;
|
|
15
|
+
repository?: string;
|
|
16
|
+
}[];
|
|
17
|
+
}): string;
|
|
18
|
+
export declare function formatDependents(dependents: {
|
|
19
|
+
name: string;
|
|
20
|
+
type: string;
|
|
21
|
+
}[]): string;
|
|
22
|
+
export declare function formatDependencyChanges(dependencies: DependencyExtractionResult): string;
|
|
23
|
+
export declare function formatComponentContext(comp: {
|
|
24
|
+
name: string;
|
|
25
|
+
id: string;
|
|
26
|
+
type: string;
|
|
27
|
+
technology?: string;
|
|
28
|
+
}): string;
|
|
29
|
+
export declare function formatComponentList(components: {
|
|
30
|
+
id: string;
|
|
31
|
+
name: string;
|
|
32
|
+
type: string;
|
|
33
|
+
technology?: string;
|
|
34
|
+
description?: string;
|
|
35
|
+
}[]): string;
|
|
36
|
+
export declare function formatAllRelationships(relationships: {
|
|
37
|
+
source: string;
|
|
38
|
+
target: string;
|
|
39
|
+
kind?: string;
|
|
40
|
+
title?: string;
|
|
41
|
+
}[]): string;
|
|
42
|
+
export declare function formatChangedFiles(files: {
|
|
43
|
+
filename: string;
|
|
44
|
+
status: string;
|
|
45
|
+
}[]): string;
|
|
46
|
+
export declare function formatCommits(commits: {
|
|
47
|
+
sha: string;
|
|
48
|
+
message: string;
|
|
49
|
+
author: string;
|
|
50
|
+
}[]): {
|
|
51
|
+
section: string;
|
|
52
|
+
note: string;
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=section-formatters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section-formatters.d.ts","sourceRoot":"","sources":["../../src/analysis/section-formatters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AAE7F,wBAAgB,yBAAyB,CAAC,aAAa,EAAE;IACvD,aAAa,CAAC,EAAE;QAAE,MAAM,EAAE;YAAE,EAAE,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC1F,YAAY,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACjF,GAAG,MAAM,CAsBT;AAED,wBAAgB,gBAAgB,CAAC,UAAU,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,MAAM,CAIrF;AAED,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,0BAA0B,GAAG,MAAM,CA+BxF;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,MAAM,CAKT;AAED,wBAAgB,mBAAmB,CACjC,UAAU,EAAE;IACV,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,EAAE,GACF,MAAM,CAWR;AAED,wBAAgB,sBAAsB,CACpC,aAAa,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,GACjF,MAAM,CAWR;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,MAAM,CAKxF;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG;IAC1F,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd,CAOA"}
|