@mytechtoday/augment-extensions 1.3.1 → 1.5.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 (172) hide show
  1. package/README.md +105 -6
  2. package/augment-extensions/coding-standards/c/CHANGELOG.md +55 -0
  3. package/augment-extensions/coding-standards/c/LICENSE +22 -0
  4. package/augment-extensions/coding-standards/c/README.md +167 -0
  5. package/augment-extensions/coding-standards/c/config/defaults.json +26 -0
  6. package/augment-extensions/coding-standards/c/config/examples/embedded.yaml +25 -0
  7. package/augment-extensions/coding-standards/c/config/examples/systems.json +31 -0
  8. package/augment-extensions/coding-standards/c/config/schema.json +244 -0
  9. package/augment-extensions/coding-standards/c/docs/API.md +613 -0
  10. package/augment-extensions/coding-standards/c/docs/CONFIGURATION.md +259 -0
  11. package/augment-extensions/coding-standards/c/docs/USER_GUIDE.md +567 -0
  12. package/augment-extensions/coding-standards/c/examples/drivers/Makefile +33 -0
  13. package/augment-extensions/coding-standards/c/examples/drivers/README.md +192 -0
  14. package/augment-extensions/coding-standards/c/examples/drivers/dma-example.c +224 -0
  15. package/augment-extensions/coding-standards/c/examples/drivers/example.dts +64 -0
  16. package/augment-extensions/coding-standards/c/examples/drivers/platform-driver.c +174 -0
  17. package/augment-extensions/coding-standards/c/examples/embedded/README.md +167 -0
  18. package/augment-extensions/coding-standards/c/examples/embedded/gpio-control.c +172 -0
  19. package/augment-extensions/coding-standards/c/examples/embedded/timer-isr.c +198 -0
  20. package/augment-extensions/coding-standards/c/examples/embedded/uart-communication.c +212 -0
  21. package/augment-extensions/coding-standards/c/examples/kernel/Makefile +82 -0
  22. package/augment-extensions/coding-standards/c/examples/kernel/README.md +168 -0
  23. package/augment-extensions/coding-standards/c/examples/kernel/char-device.c +198 -0
  24. package/augment-extensions/coding-standards/c/examples/kernel/proc-file.c +131 -0
  25. package/augment-extensions/coding-standards/c/examples/kernel/simple-module.c +111 -0
  26. package/augment-extensions/coding-standards/c/examples/legacy/Makefile +62 -0
  27. package/augment-extensions/coding-standards/c/examples/legacy/README.md +255 -0
  28. package/augment-extensions/coding-standards/c/examples/legacy/c89-to-c11-migration.c +268 -0
  29. package/augment-extensions/coding-standards/c/examples/legacy/compatibility-layer.c +239 -0
  30. package/augment-extensions/coding-standards/c/examples/networking/Makefile +35 -0
  31. package/augment-extensions/coding-standards/c/examples/networking/README.md +207 -0
  32. package/augment-extensions/coding-standards/c/examples/networking/protocol-parser.c +270 -0
  33. package/augment-extensions/coding-standards/c/examples/networking/tcp-server.c +197 -0
  34. package/augment-extensions/coding-standards/c/examples/networking/udp-multicast.c +220 -0
  35. package/augment-extensions/coding-standards/c/examples/realtime/Makefile +53 -0
  36. package/augment-extensions/coding-standards/c/examples/realtime/README.md +199 -0
  37. package/augment-extensions/coding-standards/c/examples/realtime/deadline-monitoring.c +260 -0
  38. package/augment-extensions/coding-standards/c/examples/realtime/priority-scheduling.c +258 -0
  39. package/augment-extensions/coding-standards/c/examples/systems/Makefile +34 -0
  40. package/augment-extensions/coding-standards/c/examples/systems/README.md +123 -0
  41. package/augment-extensions/coding-standards/c/examples/systems/ipc-pipes.c +181 -0
  42. package/augment-extensions/coding-standards/c/examples/systems/process-management.c +153 -0
  43. package/augment-extensions/coding-standards/c/examples/systems/signal-handling.c +162 -0
  44. package/augment-extensions/coding-standards/c/module.json +149 -0
  45. package/augment-extensions/coding-standards/c/rules/categories/drivers.md +635 -0
  46. package/augment-extensions/coding-standards/c/rules/categories/embedded.md +510 -0
  47. package/augment-extensions/coding-standards/c/rules/categories/kernel.md +653 -0
  48. package/augment-extensions/coding-standards/c/rules/categories/legacy.md +526 -0
  49. package/augment-extensions/coding-standards/c/rules/categories/networking.md +735 -0
  50. package/augment-extensions/coding-standards/c/rules/categories/realtime.md +631 -0
  51. package/augment-extensions/coding-standards/c/rules/categories/systems.md +586 -0
  52. package/augment-extensions/coding-standards/c/rules/universal/const-correctness.md +275 -0
  53. package/augment-extensions/coding-standards/c/rules/universal/documentation.md +251 -0
  54. package/augment-extensions/coding-standards/c/rules/universal/error-handling.md +250 -0
  55. package/augment-extensions/coding-standards/c/rules/universal/header-guards.md +254 -0
  56. package/augment-extensions/coding-standards/c/rules/universal/memory-safety.md +233 -0
  57. package/augment-extensions/coding-standards/c/rules/universal/naming.md +146 -0
  58. package/augment-extensions/coding-standards/c/src/conflict-detector.ts +461 -0
  59. package/augment-extensions/coding-standards/c/src/prompt-generator.ts +307 -0
  60. package/augment-extensions/coding-standards/c/src/rule-evaluator.ts +307 -0
  61. package/augment-extensions/coding-standards/c/src/rule-override.ts +427 -0
  62. package/augment-extensions/coding-standards/c/src/template-engine.ts +217 -0
  63. package/augment-extensions/coding-standards/c/templates/prompts/drivers.txt +191 -0
  64. package/augment-extensions/coding-standards/c/templates/prompts/embedded.txt +164 -0
  65. package/augment-extensions/coding-standards/c/templates/prompts/kernel.txt +175 -0
  66. package/augment-extensions/coding-standards/c/templates/prompts/legacy.txt +280 -0
  67. package/augment-extensions/coding-standards/c/templates/prompts/networking.txt +259 -0
  68. package/augment-extensions/coding-standards/c/templates/prompts/realtime.txt +219 -0
  69. package/augment-extensions/coding-standards/c/templates/prompts/systems.txt +147 -0
  70. package/augment-extensions/coding-standards/c/tests/integration/category-specific.test.ts +356 -0
  71. package/augment-extensions/coding-standards/c/tests/integration/end-to-end-workflow.test.ts +377 -0
  72. package/augment-extensions/coding-standards/c/tests/performance/benchmarks.test.ts +407 -0
  73. package/augment-extensions/coding-standards/c/tests/unit/config-manager.test.ts +345 -0
  74. package/augment-extensions/coding-standards/c/tests/unit/conflict-detector.test.ts +294 -0
  75. package/augment-extensions/coding-standards/c/tests/unit/prompt-generator.test.ts +174 -0
  76. package/augment-extensions/coding-standards/c/tests/unit/registry.test.ts +313 -0
  77. package/augment-extensions/coding-standards/c/tests/unit/rule-evaluator.test.ts +318 -0
  78. package/augment-extensions/coding-standards/c/tests/unit/rule-override.test.ts +326 -0
  79. package/augment-extensions/coding-standards/c/tests/unit/template-engine.test.ts +314 -0
  80. package/augment-extensions/coding-standards/go/CHARACTER-COUNT-REPORT.md +135 -0
  81. package/augment-extensions/coding-standards/go/PHASE1-COMPLETION.md +146 -0
  82. package/augment-extensions/coding-standards/go/PHASE4-COMPLETION.md +184 -0
  83. package/augment-extensions/coding-standards/go/README.md +200 -0
  84. package/augment-extensions/coding-standards/go/VALIDATION-CHECKLIST.md +154 -0
  85. package/augment-extensions/coding-standards/go/config/examples/example-cli.json +15 -0
  86. package/augment-extensions/coding-standards/go/config/examples/example-microservices.json +21 -0
  87. package/augment-extensions/coding-standards/go/config/examples/example-multi-category.yaml +24 -0
  88. package/augment-extensions/coding-standards/go/config/examples/example-web.json +15 -0
  89. package/augment-extensions/coding-standards/go/config/schema.json +110 -0
  90. package/augment-extensions/coding-standards/go/docs/CATEGORIES.md +221 -0
  91. package/augment-extensions/coding-standards/go/docs/CONFIGURATION.md +198 -0
  92. package/augment-extensions/coding-standards/go/docs/TROUBLESHOOTING.md +285 -0
  93. package/augment-extensions/coding-standards/go/examples/cli/cobra-app.go +287 -0
  94. package/augment-extensions/coding-standards/go/examples/cloud-native-app.go +217 -0
  95. package/augment-extensions/coding-standards/go/examples/devops-tool.go +250 -0
  96. package/augment-extensions/coding-standards/go/examples/distributed-system.go +247 -0
  97. package/augment-extensions/coding-standards/go/examples/microservices/grpc-service.go +253 -0
  98. package/augment-extensions/coding-standards/go/examples/rest-api.go +270 -0
  99. package/augment-extensions/coding-standards/go/examples/web/http-server.go +224 -0
  100. package/augment-extensions/coding-standards/go/module.json +139 -0
  101. package/augment-extensions/coding-standards/go/rules/categories/api-development/api-versioning.md +149 -0
  102. package/augment-extensions/coding-standards/go/rules/categories/api-development/rate-limiting.md +209 -0
  103. package/augment-extensions/coding-standards/go/rules/categories/api-development/rest-api-design.md +183 -0
  104. package/augment-extensions/coding-standards/go/rules/categories/cloud-native/cloud-config.md +193 -0
  105. package/augment-extensions/coding-standards/go/rules/categories/cloud-native/health-checks.md +231 -0
  106. package/augment-extensions/coding-standards/go/rules/categories/cloud-native/kubernetes.md +180 -0
  107. package/augment-extensions/coding-standards/go/rules/categories/devops-tooling/automation.md +179 -0
  108. package/augment-extensions/coding-standards/go/rules/categories/devops-tooling/ci-cd-integration.md +147 -0
  109. package/augment-extensions/coding-standards/go/rules/categories/devops-tooling/infrastructure-as-code.md +231 -0
  110. package/augment-extensions/coding-standards/go/rules/categories/distributed-systems/caching.md +150 -0
  111. package/augment-extensions/coding-standards/go/rules/categories/distributed-systems/consensus.md +187 -0
  112. package/augment-extensions/coding-standards/go/rules/categories/distributed-systems/event-sourcing.md +246 -0
  113. package/augment-extensions/coding-standards/go/rules/cli/command-parsing.md +264 -0
  114. package/augment-extensions/coding-standards/go/rules/cli/configuration.md +268 -0
  115. package/augment-extensions/coding-standards/go/rules/cli/cross-platform.md +324 -0
  116. package/augment-extensions/coding-standards/go/rules/microservices/distributed-tracing.md +253 -0
  117. package/augment-extensions/coding-standards/go/rules/microservices/grpc.md +257 -0
  118. package/augment-extensions/coding-standards/go/rules/microservices/metrics.md +278 -0
  119. package/augment-extensions/coding-standards/go/rules/microservices/service-discovery.md +249 -0
  120. package/augment-extensions/coding-standards/go/rules/universal/code-organization.md +221 -0
  121. package/augment-extensions/coding-standards/go/rules/universal/documentation.md +269 -0
  122. package/augment-extensions/coding-standards/go/rules/universal/performance.md +323 -0
  123. package/augment-extensions/coding-standards/go/rules/universal/testing.md +162 -0
  124. package/augment-extensions/coding-standards/go/rules/web/graceful-shutdown.md +249 -0
  125. package/augment-extensions/coding-standards/go/rules/web/http-handlers.md +164 -0
  126. package/augment-extensions/coding-standards/go/rules/web/middleware.md +234 -0
  127. package/augment-extensions/coding-standards/go/rules/web/routing.md +251 -0
  128. package/augment-extensions/coding-standards/go/templates/prompts/api.md +160 -0
  129. package/augment-extensions/coding-standards/go/templates/prompts/cli.md +225 -0
  130. package/augment-extensions/coding-standards/go/templates/prompts/cloud-native.md +121 -0
  131. package/augment-extensions/coding-standards/go/templates/prompts/devops.md +146 -0
  132. package/augment-extensions/coding-standards/go/templates/prompts/distributed.md +133 -0
  133. package/augment-extensions/coding-standards/go/templates/prompts/microservices.md +225 -0
  134. package/augment-extensions/coding-standards/go/templates/prompts/web.md +181 -0
  135. package/augment-extensions/coding-standards/go/tests/integration/module-integration.test.ts +164 -0
  136. package/augment-extensions/coding-standards/go/tests/unit/category-selection.test.ts +147 -0
  137. package/augment-extensions/coding-standards/go/tests/unit/module-structure.test.ts +154 -0
  138. package/augment-extensions/coding-standards/go/tests/validate-character-count.ps1 +13 -0
  139. package/augment-extensions/coding-standards/go/tests/validate-examples.ps1 +148 -0
  140. package/augment-extensions/coding-standards/go/tests/validate-examples.sh +135 -0
  141. package/cli/dist/analysis/ast-parser.d.ts +47 -0
  142. package/cli/dist/analysis/ast-parser.d.ts.map +1 -0
  143. package/cli/dist/analysis/ast-parser.js +161 -0
  144. package/cli/dist/analysis/ast-parser.js.map +1 -0
  145. package/cli/dist/analysis/complexity-analyzer.d.ts +27 -0
  146. package/cli/dist/analysis/complexity-analyzer.d.ts.map +1 -0
  147. package/cli/dist/analysis/complexity-analyzer.js +189 -0
  148. package/cli/dist/analysis/complexity-analyzer.js.map +1 -0
  149. package/cli/dist/analysis/dependency-analyzer.d.ts +23 -0
  150. package/cli/dist/analysis/dependency-analyzer.d.ts.map +1 -0
  151. package/cli/dist/analysis/dependency-analyzer.js +237 -0
  152. package/cli/dist/analysis/dependency-analyzer.js.map +1 -0
  153. package/cli/dist/analysis/index.d.ts +9 -0
  154. package/cli/dist/analysis/index.d.ts.map +1 -0
  155. package/cli/dist/analysis/index.js +25 -0
  156. package/cli/dist/analysis/index.js.map +1 -0
  157. package/cli/dist/analysis/security-scanner.d.ts +11 -0
  158. package/cli/dist/analysis/security-scanner.d.ts.map +1 -0
  159. package/cli/dist/analysis/security-scanner.js +294 -0
  160. package/cli/dist/analysis/security-scanner.js.map +1 -0
  161. package/cli/dist/analysis/types.d.ts +151 -0
  162. package/cli/dist/analysis/types.d.ts.map +1 -0
  163. package/cli/dist/analysis/types.js +6 -0
  164. package/cli/dist/analysis/types.js.map +1 -0
  165. package/cli/dist/cli.js +24 -0
  166. package/cli/dist/cli.js.map +1 -1
  167. package/cli/dist/commands/code-analysis.d.ts +11 -0
  168. package/cli/dist/commands/code-analysis.d.ts.map +1 -0
  169. package/cli/dist/commands/code-analysis.js +412 -0
  170. package/cli/dist/commands/code-analysis.js.map +1 -0
  171. package/modules.md +99 -3
  172. package/package.json +21 -2
@@ -0,0 +1,259 @@
1
+ # C Coding Standards - Configuration Reference
2
+
3
+ ## Table of Contents
4
+
5
+ 1. [Configuration File Format](#configuration-file-format)
6
+ 2. [Schema Reference](#schema-reference)
7
+ 3. [Configuration Options](#configuration-options)
8
+ 4. [Examples](#examples)
9
+ 5. [Validation](#validation)
10
+
11
+ ---
12
+
13
+ ## Configuration File Format
14
+
15
+ ### Supported Formats
16
+
17
+ The extension supports two configuration file formats:
18
+
19
+ 1. **JSON** - `.augment/c-standards.json`
20
+ 2. **YAML** - `.augment/c-standards.yaml`
21
+
22
+ ### File Location
23
+
24
+ Place your configuration file in the `.augment` directory at your project root:
25
+
26
+ ```
27
+ project-root/
28
+ ├── .augment/
29
+ │ └── c-standards.json (or c-standards.yaml)
30
+ ├── src/
31
+ └── include/
32
+ ```
33
+
34
+ ---
35
+
36
+ ## Schema Reference
37
+
38
+ ### Root Object
39
+
40
+ ```typescript
41
+ {
42
+ c_standards: CStandardsConfiguration
43
+ }
44
+ ```
45
+
46
+ ### CStandardsConfiguration
47
+
48
+ ```typescript
49
+ interface CStandardsConfiguration {
50
+ version: string; // Configuration version
51
+ categories: string[]; // Active categories
52
+ c_standard: CStandard; // C standard to follow
53
+ universal_rules: UniversalRules; // Universal rule settings
54
+ category_overrides?: CategoryOverrides; // Category-specific overrides
55
+ static_analysis?: StaticAnalysis; // Static analysis tool integration
56
+ custom_rules?: CustomRules; // Custom rule configuration
57
+ }
58
+ ```
59
+
60
+ ### CStandard
61
+
62
+ ```typescript
63
+ type CStandard = 'c89' | 'c99' | 'c11' | 'c17' | 'c23';
64
+ ```
65
+
66
+ **Options:**
67
+ - `c89` - ANSI C (C89/C90)
68
+ - `c99` - C99 standard
69
+ - `c11` - C11 standard (recommended)
70
+ - `c17` - C17 standard
71
+ - `c23` - C23 standard (latest)
72
+
73
+ ### UniversalRules
74
+
75
+ ```typescript
76
+ interface UniversalRules {
77
+ naming: RuleState;
78
+ memory_safety: RuleState;
79
+ error_handling: RuleState;
80
+ documentation: RuleState;
81
+ header_guards: RuleState;
82
+ const_correctness: RuleState;
83
+ }
84
+
85
+ type RuleState = 'enabled' | 'warning' | 'disabled';
86
+ ```
87
+
88
+ **Rule States:**
89
+ - `enabled` - Violations are reported as errors
90
+ - `warning` - Violations are reported as warnings
91
+ - `disabled` - Rule is not checked
92
+
93
+ ### Categories
94
+
95
+ ```typescript
96
+ type Category =
97
+ | 'systems' // Systems programming
98
+ | 'embedded' // Embedded systems
99
+ | 'kernel' // Kernel development
100
+ | 'drivers' // Device drivers
101
+ | 'realtime' // Real-time systems
102
+ | 'networking' // Networking
103
+ | 'legacy'; // Legacy code
104
+ ```
105
+
106
+ ### CategoryOverrides
107
+
108
+ ```typescript
109
+ interface CategoryOverrides {
110
+ systems?: SystemsOverrides;
111
+ embedded?: EmbeddedOverrides;
112
+ kernel?: KernelOverrides;
113
+ drivers?: DriversOverrides;
114
+ realtime?: RealtimeOverrides;
115
+ networking?: NetworkingOverrides;
116
+ legacy?: LegacyOverrides;
117
+ }
118
+ ```
119
+
120
+ #### SystemsOverrides
121
+
122
+ ```typescript
123
+ interface SystemsOverrides {
124
+ require_posix_compliance?: boolean;
125
+ allow_gnu_extensions?: boolean;
126
+ max_file_descriptors?: number;
127
+ }
128
+ ```
129
+
130
+ #### EmbeddedOverrides
131
+
132
+ ```typescript
133
+ interface EmbeddedOverrides {
134
+ allow_dynamic_allocation?: boolean;
135
+ require_volatile_hardware?: boolean;
136
+ max_stack_usage?: number;
137
+ require_interrupt_safety?: boolean;
138
+ }
139
+ ```
140
+
141
+ #### KernelOverrides
142
+
143
+ ```typescript
144
+ interface KernelOverrides {
145
+ follow_kernel_style?: boolean;
146
+ require_module_license?: boolean;
147
+ max_function_length?: number;
148
+ }
149
+ ```
150
+
151
+ #### DriversOverrides
152
+
153
+ ```typescript
154
+ interface DriversOverrides {
155
+ require_error_cleanup?: boolean;
156
+ require_dma_safety?: boolean;
157
+ max_interrupt_latency?: number;
158
+ }
159
+ ```
160
+
161
+ #### RealtimeOverrides
162
+
163
+ ```typescript
164
+ interface RealtimeOverrides {
165
+ require_deterministic_paths?: boolean;
166
+ max_function_complexity?: number;
167
+ max_execution_time?: number;
168
+ }
169
+ ```
170
+
171
+ #### NetworkingOverrides
172
+
173
+ ```typescript
174
+ interface NetworkingOverrides {
175
+ require_byte_order_conversion?: boolean;
176
+ require_socket_error_handling?: boolean;
177
+ max_packet_size?: number;
178
+ }
179
+ ```
180
+
181
+ #### LegacyOverrides
182
+
183
+ ```typescript
184
+ interface LegacyOverrides {
185
+ allow_deprecated_functions?: boolean;
186
+ require_compatibility_layer?: boolean;
187
+ min_c_standard?: CStandard;
188
+ }
189
+ ```
190
+
191
+ ### StaticAnalysis
192
+
193
+ ```typescript
194
+ interface StaticAnalysis {
195
+ clang_tidy?: boolean;
196
+ cppcheck?: boolean;
197
+ valgrind?: boolean;
198
+ custom_tools?: string[];
199
+ }
200
+ ```
201
+
202
+ ### CustomRules
203
+
204
+ ```typescript
205
+ interface CustomRules {
206
+ enabled: boolean;
207
+ path: string;
208
+ }
209
+ ```
210
+
211
+ ---
212
+
213
+ ## Configuration Options
214
+
215
+ ### version
216
+
217
+ **Type:** `string`
218
+ **Required:** Yes
219
+ **Default:** `"1.0.0"`
220
+
221
+ Configuration schema version.
222
+
223
+ **Example:**
224
+ ```json
225
+ {
226
+ "version": "1.0.0"
227
+ }
228
+ ```
229
+
230
+ ### categories
231
+
232
+ **Type:** `string[]`
233
+ **Required:** Yes
234
+ **Default:** `[]`
235
+
236
+ Array of active categories for your project.
237
+
238
+ **Example:**
239
+ ```json
240
+ {
241
+ "categories": ["systems", "embedded", "networking"]
242
+ }
243
+ ```
244
+
245
+ ### c_standard
246
+
247
+ **Type:** `CStandard`
248
+ **Required:** Yes
249
+ **Default:** `"c11"`
250
+
251
+ C language standard to follow.
252
+
253
+ **Example:**
254
+ ```json
255
+ {
256
+ "c_standard": "c11"
257
+ }
258
+ ```
259
+