@corbat-tech/coding-standards-mcp 1.0.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.
Files changed (89) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +371 -0
  3. package/assets/demo.gif +0 -0
  4. package/dist/agent.d.ts +53 -0
  5. package/dist/agent.d.ts.map +1 -0
  6. package/dist/agent.js +629 -0
  7. package/dist/agent.js.map +1 -0
  8. package/dist/cli/init.d.ts +3 -0
  9. package/dist/cli/init.d.ts.map +1 -0
  10. package/dist/cli/init.js +651 -0
  11. package/dist/cli/init.js.map +1 -0
  12. package/dist/config.d.ts +73 -0
  13. package/dist/config.d.ts.map +1 -0
  14. package/dist/config.js +105 -0
  15. package/dist/config.js.map +1 -0
  16. package/dist/index.d.ts +3 -0
  17. package/dist/index.d.ts.map +1 -0
  18. package/dist/index.js +73 -0
  19. package/dist/index.js.map +1 -0
  20. package/dist/profiles.d.ts +39 -0
  21. package/dist/profiles.d.ts.map +1 -0
  22. package/dist/profiles.js +526 -0
  23. package/dist/profiles.js.map +1 -0
  24. package/dist/prompts-legacy.d.ts +25 -0
  25. package/dist/prompts-legacy.d.ts.map +1 -0
  26. package/dist/prompts-legacy.js +600 -0
  27. package/dist/prompts-legacy.js.map +1 -0
  28. package/dist/prompts-v2.d.ts +30 -0
  29. package/dist/prompts-v2.d.ts.map +1 -0
  30. package/dist/prompts-v2.js +310 -0
  31. package/dist/prompts-v2.js.map +1 -0
  32. package/dist/prompts.d.ts +30 -0
  33. package/dist/prompts.d.ts.map +1 -0
  34. package/dist/prompts.js +310 -0
  35. package/dist/prompts.js.map +1 -0
  36. package/dist/resources.d.ts +18 -0
  37. package/dist/resources.d.ts.map +1 -0
  38. package/dist/resources.js +95 -0
  39. package/dist/resources.js.map +1 -0
  40. package/dist/tools-legacy.d.ts +196 -0
  41. package/dist/tools-legacy.d.ts.map +1 -0
  42. package/dist/tools-legacy.js +1230 -0
  43. package/dist/tools-legacy.js.map +1 -0
  44. package/dist/tools-v2.d.ts +92 -0
  45. package/dist/tools-v2.d.ts.map +1 -0
  46. package/dist/tools-v2.js +410 -0
  47. package/dist/tools-v2.js.map +1 -0
  48. package/dist/tools.d.ts +92 -0
  49. package/dist/tools.d.ts.map +1 -0
  50. package/dist/tools.js +410 -0
  51. package/dist/tools.js.map +1 -0
  52. package/dist/types.d.ts +3054 -0
  53. package/dist/types.d.ts.map +1 -0
  54. package/dist/types.js +515 -0
  55. package/dist/types.js.map +1 -0
  56. package/dist/utils/index.d.ts +6 -0
  57. package/dist/utils/index.d.ts.map +1 -0
  58. package/dist/utils/index.js +5 -0
  59. package/dist/utils/index.js.map +1 -0
  60. package/dist/utils/retry.d.ts +44 -0
  61. package/dist/utils/retry.d.ts.map +1 -0
  62. package/dist/utils/retry.js +74 -0
  63. package/dist/utils/retry.js.map +1 -0
  64. package/package.json +79 -0
  65. package/profiles/README.md +199 -0
  66. package/profiles/custom/.gitkeep +2 -0
  67. package/profiles/templates/_template.yaml +159 -0
  68. package/profiles/templates/angular.yaml +494 -0
  69. package/profiles/templates/java-spring-backend.yaml +512 -0
  70. package/profiles/templates/minimal.yaml +102 -0
  71. package/profiles/templates/nodejs.yaml +338 -0
  72. package/profiles/templates/python.yaml +340 -0
  73. package/profiles/templates/react.yaml +331 -0
  74. package/profiles/templates/vue.yaml +598 -0
  75. package/standards/architecture/ddd.md +173 -0
  76. package/standards/architecture/hexagonal.md +97 -0
  77. package/standards/cicd/github-actions.md +567 -0
  78. package/standards/clean-code/naming.md +175 -0
  79. package/standards/clean-code/principles.md +179 -0
  80. package/standards/containerization/dockerfile.md +419 -0
  81. package/standards/database/selection-guide.md +443 -0
  82. package/standards/documentation/guidelines.md +189 -0
  83. package/standards/event-driven/domain-events.md +527 -0
  84. package/standards/kubernetes/deployment.md +518 -0
  85. package/standards/observability/guidelines.md +665 -0
  86. package/standards/project-setup/initialization-checklist.md +650 -0
  87. package/standards/spring-boot/best-practices.md +598 -0
  88. package/standards/testing/guidelines.md +559 -0
  89. package/standards/workflow/llm-development-workflow.md +542 -0
@@ -0,0 +1,18 @@
1
+ /**
2
+ * List all available resources.
3
+ */
4
+ export declare function listResources(): Promise<Array<{
5
+ uri: string;
6
+ name: string;
7
+ description: string;
8
+ mimeType: string;
9
+ }>>;
10
+ /**
11
+ * Read a specific resource by URI.
12
+ */
13
+ export declare function readResource(uri: string): Promise<{
14
+ uri: string;
15
+ mimeType: string;
16
+ text: string;
17
+ } | null>;
18
+ //# sourceMappingURL=resources.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../src/resources.ts"],"names":[],"mappings":"AASA;;GAEG;AACH,wBAAsB,aAAa,IAAI,OAAO,CAC5C,KAAK,CAAC;IACJ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC,CACH,CAkCA;AAED;;GAEG;AACH,wBAAsB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAC,CAgE/G"}
@@ -0,0 +1,95 @@
1
+ import { formatProfileAsMarkdown, getCategories, getProfile, getStandardsByCategory, listProfiles, loadStandards, } from './profiles.js';
2
+ /**
3
+ * List all available resources.
4
+ */
5
+ export async function listResources() {
6
+ const profiles = await listProfiles();
7
+ const categories = await getCategories();
8
+ const profileResources = profiles.map(({ id, profile }) => ({
9
+ uri: `corbat://profiles/${id}`,
10
+ name: `Profile: ${profile.name}`,
11
+ description: profile.description || `Coding standards profile: ${profile.name}`,
12
+ mimeType: 'text/markdown',
13
+ }));
14
+ const categoryResources = categories.map((category) => ({
15
+ uri: `corbat://standards/${category}`,
16
+ name: `Standards: ${category}`,
17
+ description: `Coding standards documentation for ${category}`,
18
+ mimeType: 'text/markdown',
19
+ }));
20
+ return [
21
+ {
22
+ uri: 'corbat://profiles',
23
+ name: 'All Profiles',
24
+ description: 'List of all available coding standards profiles',
25
+ mimeType: 'application/json',
26
+ },
27
+ ...profileResources,
28
+ {
29
+ uri: 'corbat://standards',
30
+ name: 'All Standards',
31
+ description: 'Complete coding standards documentation',
32
+ mimeType: 'text/markdown',
33
+ },
34
+ ...categoryResources,
35
+ ];
36
+ }
37
+ /**
38
+ * Read a specific resource by URI.
39
+ */
40
+ export async function readResource(uri) {
41
+ // List all profiles
42
+ if (uri === 'corbat://profiles') {
43
+ const profiles = await listProfiles();
44
+ const data = profiles.map(({ id, profile }) => ({
45
+ id,
46
+ name: profile.name,
47
+ description: profile.description,
48
+ }));
49
+ return {
50
+ uri,
51
+ mimeType: 'application/json',
52
+ text: JSON.stringify(data, null, 2),
53
+ };
54
+ }
55
+ // Specific profile
56
+ if (uri.startsWith('corbat://profiles/')) {
57
+ const profileId = uri.replace('corbat://profiles/', '');
58
+ const profile = await getProfile(profileId);
59
+ if (!profile)
60
+ return null;
61
+ const standards = await loadStandards();
62
+ const profileMarkdown = formatProfileAsMarkdown(profileId, profile);
63
+ const standardsMarkdown = standards.map((s) => `## ${s.name}\n\n${s.content}`).join('\n\n---\n\n');
64
+ return {
65
+ uri,
66
+ mimeType: 'text/markdown',
67
+ text: `${profileMarkdown}\n\n---\n\n# Standards Documentation\n\n${standardsMarkdown}`,
68
+ };
69
+ }
70
+ // All standards
71
+ if (uri === 'corbat://standards') {
72
+ const standards = await loadStandards();
73
+ const content = standards.map((s) => `# ${s.name}\n\n${s.content}`).join('\n\n---\n\n');
74
+ return {
75
+ uri,
76
+ mimeType: 'text/markdown',
77
+ text: content,
78
+ };
79
+ }
80
+ // Standards by category
81
+ if (uri.startsWith('corbat://standards/')) {
82
+ const category = uri.replace('corbat://standards/', '');
83
+ const standards = await getStandardsByCategory(category);
84
+ if (standards.length === 0)
85
+ return null;
86
+ const content = standards.map((s) => `# ${s.name}\n\n${s.content}`).join('\n\n---\n\n');
87
+ return {
88
+ uri,
89
+ mimeType: 'text/markdown',
90
+ text: content,
91
+ };
92
+ }
93
+ return null;
94
+ }
95
+ //# sourceMappingURL=resources.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resources.js","sourceRoot":"","sources":["../src/resources.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,aAAa,EACb,UAAU,EACV,sBAAsB,EACtB,YAAY,EACZ,aAAa,GACd,MAAM,eAAe,CAAC;AAEvB;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa;IAQjC,MAAM,QAAQ,GAAG,MAAM,YAAY,EAAE,CAAC;IACtC,MAAM,UAAU,GAAG,MAAM,aAAa,EAAE,CAAC;IAEzC,MAAM,gBAAgB,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;QAC1D,GAAG,EAAE,qBAAqB,EAAE,EAAE;QAC9B,IAAI,EAAE,YAAY,OAAO,CAAC,IAAI,EAAE;QAChC,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,6BAA6B,OAAO,CAAC,IAAI,EAAE;QAC/E,QAAQ,EAAE,eAAe;KAC1B,CAAC,CAAC,CAAC;IAEJ,MAAM,iBAAiB,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QACtD,GAAG,EAAE,sBAAsB,QAAQ,EAAE;QACrC,IAAI,EAAE,cAAc,QAAQ,EAAE;QAC9B,WAAW,EAAE,sCAAsC,QAAQ,EAAE;QAC7D,QAAQ,EAAE,eAAe;KAC1B,CAAC,CAAC,CAAC;IAEJ,OAAO;QACL;YACE,GAAG,EAAE,mBAAmB;YACxB,IAAI,EAAE,cAAc;YACpB,WAAW,EAAE,iDAAiD;YAC9D,QAAQ,EAAE,kBAAkB;SAC7B;QACD,GAAG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chema: {
8
+ type: "object";
9
+ properties: {
10
+ profile: {
11
+ type: string;
12
+ description: string;
13
+ };
14
+ query?: undefined;
15
+ task_description?: undefined;
16
+ project_dir?: undefined;
17
+ task_type?: undefined;
18
+ code?: undefined;
19
+ category?: undefined;
20
+ context?: undefined;
21
+ };
22
+ required?: undefined;
23
+ };
24
+ } | {
25
+ name: string;
26
+ description: string;
27
+ inputSchema: {
28
+ type: "object";
29
+ properties: {
30
+ profile?: undefined;
31
+ query?: undefined;
32
+ task_description?: undefined;
33
+ project_dir?: undefined;
34
+ task_type?: undefined;
35
+ code?: undefined;
36
+ category?: undefined;
37
+ context?: undefined;
38
+ };
39
+ required?: undefined;
40
+ };
41
+ } | {
42
+ name: string;
43
+ description: string;
44
+ inputSchema: {
45
+ type: "object";
46
+ properties: {
47
+ query: {
48
+ type: string;
49
+ description: string;
50
+ };
51
+ profile?: undefined;
52
+ task_description?: undefined;
53
+ project_dir?: undefined;
54
+ task_type?: undefined;
55
+ code?: undefined;
56
+ category?: undefined;
57
+ context?: undefined;
58
+ };
59
+ required: string[];
60
+ };
61
+ } | {
62
+ name: string;
63
+ description: string;
64
+ inputSchema: {
65
+ type: "object";
66
+ properties: {
67
+ task_description: {
68
+ type: string;
69
+ description: string;
70
+ };
71
+ project_dir: {
72
+ type: string;
73
+ description: string;
74
+ };
75
+ profile: {
76
+ type: string;
77
+ description: string;
78
+ };
79
+ query?: undefined;
80
+ task_type?: undefined;
81
+ code?: undefined;
82
+ category?: undefined;
83
+ context?: undefined;
84
+ };
85
+ required: string[];
86
+ };
87
+ } | {
88
+ name: string;
89
+ description: string;
90
+ inputSchema: {
91
+ type: "object";
92
+ properties: {
93
+ project_dir: {
94
+ type: string;
95
+ description: string;
96
+ };
97
+ profile?: undefined;
98
+ query?: undefined;
99
+ task_description?: undefined;
100
+ task_type?: undefined;
101
+ code?: undefined;
102
+ category?: undefined;
103
+ context?: undefined;
104
+ };
105
+ required: string[];
106
+ };
107
+ } | {
108
+ name: string;
109
+ description: string;
110
+ inputSchema: {
111
+ type: "object";
112
+ properties: {
113
+ task_type: {
114
+ type: string;
115
+ enum: string[];
116
+ description: string;
117
+ };
118
+ project_dir: {
119
+ type: string;
120
+ description: string;
121
+ };
122
+ profile?: undefined;
123
+ query?: undefined;
124
+ task_description?: undefined;
125
+ code?: undefined;
126
+ category?: undefined;
127
+ context?: undefined;
128
+ };
129
+ required: string[];
130
+ };
131
+ } | {
132
+ name: string;
133
+ description: string;
134
+ inputSchema: {
135
+ type: "object";
136
+ properties: {
137
+ code: {
138
+ type: string;
139
+ description: string;
140
+ };
141
+ profile: {
142
+ type: string;
143
+ description: string;
144
+ };
145
+ task_type: {
146
+ type: string;
147
+ enum: string[];
148
+ description: string;
149
+ };
150
+ query?: undefined;
151
+ task_description?: undefined;
152
+ project_dir?: undefined;
153
+ category?: undefined;
154
+ context?: undefined;
155
+ };
156
+ required: string[];
157
+ };
158
+ } | {
159
+ name: string;
160
+ description: string;
161
+ inputSchema: {
162
+ type: "object";
163
+ properties: {
164
+ category: {
165
+ type: string;
166
+ enum: string[];
167
+ description: string;
168
+ };
169
+ context: {
170
+ type: string;
171
+ description: string;
172
+ };
173
+ project_dir: {
174
+ type: string;
175
+ description: string;
176
+ };
177
+ profile?: undefined;
178
+ query?: undefined;
179
+ task_description?: undefined;
180
+ task_type?: undefined;
181
+ code?: undefined;
182
+ };
183
+ required: string[];
184
+ };
185
+ })[];
186
+ /**
187
+ * Handle tool calls.
188
+ */
189
+ export declare function handleToolCall(name: string, args: Record<string, unknown>): Promise<{
190
+ content: Array<{
191
+ type: 'text';
192
+ text: string;
193
+ }>;
194
+ isError?: boolean;
195
+ }>;
196
+ //# sourceMappingURL=tools-legacy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools-legacy.d.ts","sourceRoot":"","sources":["../src/tools-legacy.ts"],"names":[],"mappings":"AAeA;;GAEG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA+MjB,CAAC;AAuDF;;GAEG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,CAgDhF"}