@mytechtoday/augment-extensions 1.4.0 → 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 (307) hide show
  1. package/augment-extensions/coding-standards/c/CHANGELOG.md +55 -0
  2. package/augment-extensions/coding-standards/c/LICENSE +22 -0
  3. package/augment-extensions/coding-standards/c/README.md +167 -0
  4. package/augment-extensions/coding-standards/c/config/defaults.json +26 -0
  5. package/augment-extensions/coding-standards/c/config/examples/embedded.yaml +25 -0
  6. package/augment-extensions/coding-standards/c/config/examples/systems.json +31 -0
  7. package/augment-extensions/coding-standards/c/config/schema.json +244 -0
  8. package/augment-extensions/coding-standards/c/docs/API.md +613 -0
  9. package/augment-extensions/coding-standards/c/docs/CONFIGURATION.md +259 -0
  10. package/augment-extensions/coding-standards/c/docs/USER_GUIDE.md +567 -0
  11. package/augment-extensions/coding-standards/c/examples/drivers/Makefile +33 -0
  12. package/augment-extensions/coding-standards/c/examples/drivers/README.md +192 -0
  13. package/augment-extensions/coding-standards/c/examples/drivers/dma-example.c +224 -0
  14. package/augment-extensions/coding-standards/c/examples/drivers/example.dts +64 -0
  15. package/augment-extensions/coding-standards/c/examples/drivers/platform-driver.c +174 -0
  16. package/augment-extensions/coding-standards/c/examples/embedded/README.md +167 -0
  17. package/augment-extensions/coding-standards/c/examples/embedded/gpio-control.c +172 -0
  18. package/augment-extensions/coding-standards/c/examples/embedded/timer-isr.c +198 -0
  19. package/augment-extensions/coding-standards/c/examples/embedded/uart-communication.c +212 -0
  20. package/augment-extensions/coding-standards/c/examples/kernel/Makefile +82 -0
  21. package/augment-extensions/coding-standards/c/examples/kernel/README.md +168 -0
  22. package/augment-extensions/coding-standards/c/examples/kernel/char-device.c +198 -0
  23. package/augment-extensions/coding-standards/c/examples/kernel/proc-file.c +131 -0
  24. package/augment-extensions/coding-standards/c/examples/kernel/simple-module.c +111 -0
  25. package/augment-extensions/coding-standards/c/examples/legacy/Makefile +62 -0
  26. package/augment-extensions/coding-standards/c/examples/legacy/README.md +255 -0
  27. package/augment-extensions/coding-standards/c/examples/legacy/c89-to-c11-migration.c +268 -0
  28. package/augment-extensions/coding-standards/c/examples/legacy/compatibility-layer.c +239 -0
  29. package/augment-extensions/coding-standards/c/examples/networking/Makefile +35 -0
  30. package/augment-extensions/coding-standards/c/examples/networking/README.md +207 -0
  31. package/augment-extensions/coding-standards/c/examples/networking/protocol-parser.c +270 -0
  32. package/augment-extensions/coding-standards/c/examples/networking/tcp-server.c +197 -0
  33. package/augment-extensions/coding-standards/c/examples/networking/udp-multicast.c +220 -0
  34. package/augment-extensions/coding-standards/c/examples/realtime/Makefile +53 -0
  35. package/augment-extensions/coding-standards/c/examples/realtime/README.md +199 -0
  36. package/augment-extensions/coding-standards/c/examples/realtime/deadline-monitoring.c +260 -0
  37. package/augment-extensions/coding-standards/c/examples/realtime/priority-scheduling.c +258 -0
  38. package/augment-extensions/coding-standards/c/examples/systems/Makefile +34 -0
  39. package/augment-extensions/coding-standards/c/examples/systems/README.md +123 -0
  40. package/augment-extensions/coding-standards/c/examples/systems/ipc-pipes.c +181 -0
  41. package/augment-extensions/coding-standards/c/examples/systems/process-management.c +153 -0
  42. package/augment-extensions/coding-standards/c/examples/systems/signal-handling.c +162 -0
  43. package/augment-extensions/coding-standards/c/module.json +149 -0
  44. package/augment-extensions/coding-standards/c/rules/categories/drivers.md +635 -0
  45. package/augment-extensions/coding-standards/c/rules/categories/embedded.md +510 -0
  46. package/augment-extensions/coding-standards/c/rules/categories/kernel.md +653 -0
  47. package/augment-extensions/coding-standards/c/rules/categories/legacy.md +526 -0
  48. package/augment-extensions/coding-standards/c/rules/categories/networking.md +735 -0
  49. package/augment-extensions/coding-standards/c/rules/categories/realtime.md +631 -0
  50. package/augment-extensions/coding-standards/c/rules/categories/systems.md +586 -0
  51. package/augment-extensions/coding-standards/c/rules/universal/const-correctness.md +275 -0
  52. package/augment-extensions/coding-standards/c/rules/universal/documentation.md +251 -0
  53. package/augment-extensions/coding-standards/c/rules/universal/error-handling.md +250 -0
  54. package/augment-extensions/coding-standards/c/rules/universal/header-guards.md +254 -0
  55. package/augment-extensions/coding-standards/c/rules/universal/memory-safety.md +233 -0
  56. package/augment-extensions/coding-standards/c/rules/universal/naming.md +146 -0
  57. package/augment-extensions/coding-standards/c/src/conflict-detector.ts +461 -0
  58. package/augment-extensions/coding-standards/c/src/prompt-generator.ts +307 -0
  59. package/augment-extensions/coding-standards/c/src/rule-evaluator.ts +307 -0
  60. package/augment-extensions/coding-standards/c/src/rule-override.ts +427 -0
  61. package/augment-extensions/coding-standards/c/src/template-engine.ts +217 -0
  62. package/augment-extensions/coding-standards/c/templates/prompts/drivers.txt +191 -0
  63. package/augment-extensions/coding-standards/c/templates/prompts/embedded.txt +164 -0
  64. package/augment-extensions/coding-standards/c/templates/prompts/kernel.txt +175 -0
  65. package/augment-extensions/coding-standards/c/templates/prompts/legacy.txt +280 -0
  66. package/augment-extensions/coding-standards/c/templates/prompts/networking.txt +259 -0
  67. package/augment-extensions/coding-standards/c/templates/prompts/realtime.txt +219 -0
  68. package/augment-extensions/coding-standards/c/templates/prompts/systems.txt +147 -0
  69. package/augment-extensions/coding-standards/c/tests/integration/category-specific.test.ts +356 -0
  70. package/augment-extensions/coding-standards/c/tests/integration/end-to-end-workflow.test.ts +377 -0
  71. package/augment-extensions/coding-standards/c/tests/performance/benchmarks.test.ts +407 -0
  72. package/augment-extensions/coding-standards/c/tests/unit/config-manager.test.ts +345 -0
  73. package/augment-extensions/coding-standards/c/tests/unit/conflict-detector.test.ts +294 -0
  74. package/augment-extensions/coding-standards/c/tests/unit/prompt-generator.test.ts +174 -0
  75. package/augment-extensions/coding-standards/c/tests/unit/registry.test.ts +313 -0
  76. package/augment-extensions/coding-standards/c/tests/unit/rule-evaluator.test.ts +318 -0
  77. package/augment-extensions/coding-standards/c/tests/unit/rule-override.test.ts +326 -0
  78. package/augment-extensions/coding-standards/c/tests/unit/template-engine.test.ts +314 -0
  79. package/augment-extensions/coding-standards/go/CHARACTER-COUNT-REPORT.md +135 -0
  80. package/augment-extensions/coding-standards/go/PHASE1-COMPLETION.md +146 -0
  81. package/augment-extensions/coding-standards/go/PHASE4-COMPLETION.md +184 -0
  82. package/augment-extensions/coding-standards/go/README.md +200 -0
  83. package/augment-extensions/coding-standards/go/VALIDATION-CHECKLIST.md +154 -0
  84. package/augment-extensions/coding-standards/go/config/examples/example-cli.json +15 -0
  85. package/augment-extensions/coding-standards/go/config/examples/example-microservices.json +21 -0
  86. package/augment-extensions/coding-standards/go/config/examples/example-multi-category.yaml +24 -0
  87. package/augment-extensions/coding-standards/go/config/examples/example-web.json +15 -0
  88. package/augment-extensions/coding-standards/go/config/schema.json +110 -0
  89. package/augment-extensions/coding-standards/go/docs/CATEGORIES.md +221 -0
  90. package/augment-extensions/coding-standards/go/docs/CONFIGURATION.md +198 -0
  91. package/augment-extensions/coding-standards/go/docs/TROUBLESHOOTING.md +285 -0
  92. package/augment-extensions/coding-standards/go/examples/cli/cobra-app.go +287 -0
  93. package/augment-extensions/coding-standards/go/examples/cloud-native-app.go +217 -0
  94. package/augment-extensions/coding-standards/go/examples/devops-tool.go +250 -0
  95. package/augment-extensions/coding-standards/go/examples/distributed-system.go +247 -0
  96. package/augment-extensions/coding-standards/go/examples/microservices/grpc-service.go +253 -0
  97. package/augment-extensions/coding-standards/go/examples/rest-api.go +270 -0
  98. package/augment-extensions/coding-standards/go/examples/web/http-server.go +224 -0
  99. package/augment-extensions/coding-standards/go/module.json +139 -0
  100. package/augment-extensions/coding-standards/go/rules/categories/api-development/api-versioning.md +149 -0
  101. package/augment-extensions/coding-standards/go/rules/categories/api-development/rate-limiting.md +209 -0
  102. package/augment-extensions/coding-standards/go/rules/categories/api-development/rest-api-design.md +183 -0
  103. package/augment-extensions/coding-standards/go/rules/categories/cloud-native/cloud-config.md +193 -0
  104. package/augment-extensions/coding-standards/go/rules/categories/cloud-native/health-checks.md +231 -0
  105. package/augment-extensions/coding-standards/go/rules/categories/cloud-native/kubernetes.md +180 -0
  106. package/augment-extensions/coding-standards/go/rules/categories/devops-tooling/automation.md +179 -0
  107. package/augment-extensions/coding-standards/go/rules/categories/devops-tooling/ci-cd-integration.md +147 -0
  108. package/augment-extensions/coding-standards/go/rules/categories/devops-tooling/infrastructure-as-code.md +231 -0
  109. package/augment-extensions/coding-standards/go/rules/categories/distributed-systems/caching.md +150 -0
  110. package/augment-extensions/coding-standards/go/rules/categories/distributed-systems/consensus.md +187 -0
  111. package/augment-extensions/coding-standards/go/rules/categories/distributed-systems/event-sourcing.md +246 -0
  112. package/augment-extensions/coding-standards/go/rules/cli/command-parsing.md +264 -0
  113. package/augment-extensions/coding-standards/go/rules/cli/configuration.md +268 -0
  114. package/augment-extensions/coding-standards/go/rules/cli/cross-platform.md +324 -0
  115. package/augment-extensions/coding-standards/go/rules/microservices/distributed-tracing.md +253 -0
  116. package/augment-extensions/coding-standards/go/rules/microservices/grpc.md +257 -0
  117. package/augment-extensions/coding-standards/go/rules/microservices/metrics.md +278 -0
  118. package/augment-extensions/coding-standards/go/rules/microservices/service-discovery.md +249 -0
  119. package/augment-extensions/coding-standards/go/rules/universal/code-organization.md +221 -0
  120. package/augment-extensions/coding-standards/go/rules/universal/documentation.md +269 -0
  121. package/augment-extensions/coding-standards/go/rules/universal/performance.md +323 -0
  122. package/augment-extensions/coding-standards/go/rules/universal/testing.md +162 -0
  123. package/augment-extensions/coding-standards/go/rules/web/graceful-shutdown.md +249 -0
  124. package/augment-extensions/coding-standards/go/rules/web/http-handlers.md +164 -0
  125. package/augment-extensions/coding-standards/go/rules/web/middleware.md +234 -0
  126. package/augment-extensions/coding-standards/go/rules/web/routing.md +251 -0
  127. package/augment-extensions/coding-standards/go/templates/prompts/api.md +160 -0
  128. package/augment-extensions/coding-standards/go/templates/prompts/cli.md +225 -0
  129. package/augment-extensions/coding-standards/go/templates/prompts/cloud-native.md +121 -0
  130. package/augment-extensions/coding-standards/go/templates/prompts/devops.md +146 -0
  131. package/augment-extensions/coding-standards/go/templates/prompts/distributed.md +133 -0
  132. package/augment-extensions/coding-standards/go/templates/prompts/microservices.md +225 -0
  133. package/augment-extensions/coding-standards/go/templates/prompts/web.md +181 -0
  134. package/augment-extensions/coding-standards/go/tests/integration/module-integration.test.ts +164 -0
  135. package/augment-extensions/coding-standards/go/tests/unit/category-selection.test.ts +147 -0
  136. package/augment-extensions/coding-standards/go/tests/unit/module-structure.test.ts +154 -0
  137. package/augment-extensions/coding-standards/go/tests/validate-character-count.ps1 +13 -0
  138. package/augment-extensions/coding-standards/go/tests/validate-examples.ps1 +148 -0
  139. package/augment-extensions/coding-standards/go/tests/validate-examples.sh +135 -0
  140. package/cli/dist/analysis/ast-parser.d.ts +47 -0
  141. package/cli/dist/analysis/ast-parser.d.ts.map +1 -0
  142. package/cli/dist/analysis/ast-parser.js +161 -0
  143. package/cli/dist/analysis/ast-parser.js.map +1 -0
  144. package/cli/dist/analysis/complexity-analyzer.d.ts +27 -0
  145. package/cli/dist/analysis/complexity-analyzer.d.ts.map +1 -0
  146. package/cli/dist/analysis/complexity-analyzer.js +189 -0
  147. package/cli/dist/analysis/complexity-analyzer.js.map +1 -0
  148. package/cli/dist/analysis/dependency-analyzer.d.ts +23 -0
  149. package/cli/dist/analysis/dependency-analyzer.d.ts.map +1 -0
  150. package/cli/dist/analysis/dependency-analyzer.js +237 -0
  151. package/cli/dist/analysis/dependency-analyzer.js.map +1 -0
  152. package/cli/dist/analysis/index.d.ts +9 -0
  153. package/cli/dist/analysis/index.d.ts.map +1 -0
  154. package/cli/dist/analysis/index.js +25 -0
  155. package/cli/dist/analysis/index.js.map +1 -0
  156. package/cli/dist/analysis/security-scanner.d.ts +11 -0
  157. package/cli/dist/analysis/security-scanner.d.ts.map +1 -0
  158. package/cli/dist/analysis/security-scanner.js +294 -0
  159. package/cli/dist/analysis/security-scanner.js.map +1 -0
  160. package/cli/dist/analysis/types.d.ts +151 -0
  161. package/cli/dist/analysis/types.d.ts.map +1 -0
  162. package/cli/dist/analysis/types.js +6 -0
  163. package/cli/dist/analysis/types.js.map +1 -0
  164. package/cli/dist/cli.js +24 -0
  165. package/cli/dist/cli.js.map +1 -1
  166. package/cli/dist/commands/code-analysis.d.ts +11 -0
  167. package/cli/dist/commands/code-analysis.d.ts.map +1 -0
  168. package/cli/dist/commands/code-analysis.js +412 -0
  169. package/cli/dist/commands/code-analysis.js.map +1 -0
  170. package/modules.md +99 -3
  171. package/package.json +14 -2
  172. package/cli/dist/commands/agent.d.ts +0 -37
  173. package/cli/dist/commands/agent.d.ts.map +0 -1
  174. package/cli/dist/commands/agent.js +0 -222
  175. package/cli/dist/commands/agent.js.map +0 -1
  176. package/cli/dist/commands/beads.d.ts +0 -64
  177. package/cli/dist/commands/beads.d.ts.map +0 -1
  178. package/cli/dist/commands/beads.js +0 -377
  179. package/cli/dist/commands/beads.js.map +0 -1
  180. package/cli/dist/commands/change.d.ts +0 -54
  181. package/cli/dist/commands/change.d.ts.map +0 -1
  182. package/cli/dist/commands/change.js +0 -243
  183. package/cli/dist/commands/change.js.map +0 -1
  184. package/cli/dist/commands/clean.d.ts +0 -15
  185. package/cli/dist/commands/clean.d.ts.map +0 -1
  186. package/cli/dist/commands/clean.js +0 -63
  187. package/cli/dist/commands/clean.js.map +0 -1
  188. package/cli/dist/commands/clone.d.ts +0 -15
  189. package/cli/dist/commands/clone.d.ts.map +0 -1
  190. package/cli/dist/commands/clone.js +0 -49
  191. package/cli/dist/commands/clone.js.map +0 -1
  192. package/cli/dist/commands/config.d.ts +0 -33
  193. package/cli/dist/commands/config.d.ts.map +0 -1
  194. package/cli/dist/commands/config.js +0 -166
  195. package/cli/dist/commands/config.js.map +0 -1
  196. package/cli/dist/commands/context.d.ts +0 -38
  197. package/cli/dist/commands/context.d.ts.map +0 -1
  198. package/cli/dist/commands/context.js +0 -205
  199. package/cli/dist/commands/context.js.map +0 -1
  200. package/cli/dist/commands/create.d.ts +0 -18
  201. package/cli/dist/commands/create.d.ts.map +0 -1
  202. package/cli/dist/commands/create.js +0 -178
  203. package/cli/dist/commands/create.js.map +0 -1
  204. package/cli/dist/commands/diff.d.ts +0 -19
  205. package/cli/dist/commands/diff.d.ts.map +0 -1
  206. package/cli/dist/commands/diff.js +0 -104
  207. package/cli/dist/commands/diff.js.map +0 -1
  208. package/cli/dist/commands/doctor.d.ts +0 -14
  209. package/cli/dist/commands/doctor.d.ts.map +0 -1
  210. package/cli/dist/commands/doctor.js +0 -62
  211. package/cli/dist/commands/doctor.js.map +0 -1
  212. package/cli/dist/commands/export.d.ts +0 -28
  213. package/cli/dist/commands/export.d.ts.map +0 -1
  214. package/cli/dist/commands/export.js +0 -135
  215. package/cli/dist/commands/export.js.map +0 -1
  216. package/cli/dist/commands/import.d.ts +0 -23
  217. package/cli/dist/commands/import.d.ts.map +0 -1
  218. package/cli/dist/commands/import.js +0 -118
  219. package/cli/dist/commands/import.js.map +0 -1
  220. package/cli/dist/commands/prompt.d.ts +0 -45
  221. package/cli/dist/commands/prompt.d.ts.map +0 -1
  222. package/cli/dist/commands/prompt.js +0 -223
  223. package/cli/dist/commands/prompt.js.map +0 -1
  224. package/cli/dist/commands/spec.d.ts +0 -57
  225. package/cli/dist/commands/spec.d.ts.map +0 -1
  226. package/cli/dist/commands/spec.js +0 -279
  227. package/cli/dist/commands/spec.js.map +0 -1
  228. package/cli/dist/commands/stats.d.ts +0 -18
  229. package/cli/dist/commands/stats.d.ts.map +0 -1
  230. package/cli/dist/commands/stats.js +0 -85
  231. package/cli/dist/commands/stats.js.map +0 -1
  232. package/cli/dist/commands/task.d.ts +0 -65
  233. package/cli/dist/commands/task.d.ts.map +0 -1
  234. package/cli/dist/commands/task.js +0 -282
  235. package/cli/dist/commands/task.js.map +0 -1
  236. package/cli/dist/commands/template.d.ts +0 -17
  237. package/cli/dist/commands/template.d.ts.map +0 -1
  238. package/cli/dist/commands/template.js +0 -55
  239. package/cli/dist/commands/template.js.map +0 -1
  240. package/cli/dist/utils/agent-config.d.ts +0 -129
  241. package/cli/dist/utils/agent-config.d.ts.map +0 -1
  242. package/cli/dist/utils/agent-config.js +0 -297
  243. package/cli/dist/utils/agent-config.js.map +0 -1
  244. package/cli/dist/utils/beads-graph.d.ts +0 -17
  245. package/cli/dist/utils/beads-graph.d.ts.map +0 -1
  246. package/cli/dist/utils/beads-graph.js +0 -150
  247. package/cli/dist/utils/beads-graph.js.map +0 -1
  248. package/cli/dist/utils/beads-integration.d.ts +0 -112
  249. package/cli/dist/utils/beads-integration.d.ts.map +0 -1
  250. package/cli/dist/utils/beads-integration.js +0 -312
  251. package/cli/dist/utils/beads-integration.js.map +0 -1
  252. package/cli/dist/utils/beads-reporter.d.ts +0 -17
  253. package/cli/dist/utils/beads-reporter.d.ts.map +0 -1
  254. package/cli/dist/utils/beads-reporter.js +0 -160
  255. package/cli/dist/utils/beads-reporter.js.map +0 -1
  256. package/cli/dist/utils/cache-manager.d.ts +0 -55
  257. package/cli/dist/utils/cache-manager.d.ts.map +0 -1
  258. package/cli/dist/utils/cache-manager.js +0 -150
  259. package/cli/dist/utils/cache-manager.js.map +0 -1
  260. package/cli/dist/utils/change-manager.d.ts +0 -70
  261. package/cli/dist/utils/change-manager.d.ts.map +0 -1
  262. package/cli/dist/utils/change-manager.js +0 -412
  263. package/cli/dist/utils/change-manager.js.map +0 -1
  264. package/cli/dist/utils/config-manager-enhanced.d.ts +0 -66
  265. package/cli/dist/utils/config-manager-enhanced.d.ts.map +0 -1
  266. package/cli/dist/utils/config-manager-enhanced.js +0 -77
  267. package/cli/dist/utils/config-manager-enhanced.js.map +0 -1
  268. package/cli/dist/utils/context-manager.d.ts +0 -96
  269. package/cli/dist/utils/context-manager.d.ts.map +0 -1
  270. package/cli/dist/utils/context-manager.js +0 -258
  271. package/cli/dist/utils/context-manager.js.map +0 -1
  272. package/cli/dist/utils/diff-engine.d.ts +0 -78
  273. package/cli/dist/utils/diff-engine.d.ts.map +0 -1
  274. package/cli/dist/utils/diff-engine.js +0 -233
  275. package/cli/dist/utils/diff-engine.js.map +0 -1
  276. package/cli/dist/utils/export-system.d.ts +0 -101
  277. package/cli/dist/utils/export-system.d.ts.map +0 -1
  278. package/cli/dist/utils/export-system.js +0 -289
  279. package/cli/dist/utils/export-system.js.map +0 -1
  280. package/cli/dist/utils/health-checker.d.ts +0 -66
  281. package/cli/dist/utils/health-checker.d.ts.map +0 -1
  282. package/cli/dist/utils/health-checker.js +0 -285
  283. package/cli/dist/utils/health-checker.js.map +0 -1
  284. package/cli/dist/utils/import-system.d.ts +0 -74
  285. package/cli/dist/utils/import-system.d.ts.map +0 -1
  286. package/cli/dist/utils/import-system.js +0 -317
  287. package/cli/dist/utils/import-system.js.map +0 -1
  288. package/cli/dist/utils/module-cloner.d.ts +0 -40
  289. package/cli/dist/utils/module-cloner.d.ts.map +0 -1
  290. package/cli/dist/utils/module-cloner.js +0 -136
  291. package/cli/dist/utils/module-cloner.js.map +0 -1
  292. package/cli/dist/utils/prompt-manager.d.ts +0 -90
  293. package/cli/dist/utils/prompt-manager.d.ts.map +0 -1
  294. package/cli/dist/utils/prompt-manager.js +0 -302
  295. package/cli/dist/utils/prompt-manager.js.map +0 -1
  296. package/cli/dist/utils/spec-manager.d.ts +0 -65
  297. package/cli/dist/utils/spec-manager.d.ts.map +0 -1
  298. package/cli/dist/utils/spec-manager.js +0 -329
  299. package/cli/dist/utils/spec-manager.js.map +0 -1
  300. package/cli/dist/utils/stats-collector.d.ts +0 -74
  301. package/cli/dist/utils/stats-collector.d.ts.map +0 -1
  302. package/cli/dist/utils/stats-collector.js +0 -164
  303. package/cli/dist/utils/stats-collector.js.map +0 -1
  304. package/cli/dist/utils/template-engine.d.ts +0 -47
  305. package/cli/dist/utils/template-engine.d.ts.map +0 -1
  306. package/cli/dist/utils/template-engine.js +0 -204
  307. package/cli/dist/utils/template-engine.js.map +0 -1
@@ -0,0 +1,285 @@
1
+ # Troubleshooting Guide
2
+
3
+ ## Common Issues
4
+
5
+ ### Configuration Issues
6
+
7
+ #### Configuration File Not Found
8
+
9
+ **Problem:** Module doesn't load configuration
10
+
11
+ **Solution:**
12
+ 1. Ensure file is at `.augment/go-config.json`
13
+ 2. Check file permissions (must be readable)
14
+ 3. Verify JSON syntax is valid
15
+
16
+ ```bash
17
+ # Validate JSON syntax
18
+ cat .augment/go-config.json | jq .
19
+ ```
20
+
21
+ #### Invalid Category Name
22
+
23
+ **Problem:** Category not recognized
24
+
25
+ **Solution:**
26
+ Valid categories are:
27
+ - `web`
28
+ - `microservices`
29
+ - `cli`
30
+ - `cloud`
31
+ - `distributed`
32
+ - `devops`
33
+ - `api`
34
+
35
+ Check spelling and case sensitivity.
36
+
37
+ ---
38
+
39
+ ### Rule Application Issues
40
+
41
+ #### Rules Not Being Applied
42
+
43
+ **Problem:** AI not following Go standards
44
+
45
+ **Solution:**
46
+ 1. Verify `rules.enabled` is `true` in configuration
47
+ 2. Check category selection matches your project type
48
+ 3. Ensure rule files exist in `rules/` directory
49
+ 4. Verify module is loaded in Augment Extensions
50
+
51
+ #### Conflicting Rules
52
+
53
+ **Problem:** Multiple categories have conflicting guidance
54
+
55
+ **Solution:**
56
+ 1. Universal rules always apply first
57
+ 2. Category-specific rules override when conflicts occur
58
+ 3. Later categories in the list take precedence
59
+ 4. Consider using fewer, more specific categories
60
+
61
+ ---
62
+
63
+ ### Static Analysis Issues
64
+
65
+ #### golangci-lint Not Running
66
+
67
+ **Problem:** Linter not executing
68
+
69
+ **Solution:**
70
+ ```bash
71
+ # Install golangci-lint
72
+ go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
73
+
74
+ # Verify installation
75
+ golangci-lint --version
76
+
77
+ # Run manually
78
+ golangci-lint run
79
+ ```
80
+
81
+ #### go vet Errors
82
+
83
+ **Problem:** `go vet` reports issues
84
+
85
+ **Solution:**
86
+ ```bash
87
+ # Run go vet to see specific issues
88
+ go vet ./...
89
+
90
+ # Common fixes:
91
+ # - Remove unused variables
92
+ # - Fix Printf format strings
93
+ # - Address suspicious constructs
94
+ ```
95
+
96
+ ---
97
+
98
+ ### Example Validation Issues
99
+
100
+ #### Examples Don't Compile
101
+
102
+ **Problem:** Example code fails to build
103
+
104
+ **Solution:**
105
+ ```bash
106
+ # Check Go version (requires 1.18+)
107
+ go version
108
+
109
+ # Update dependencies
110
+ go mod tidy
111
+
112
+ # Build specific example
113
+ go build examples/web/http-server.go
114
+ ```
115
+
116
+ #### Formatting Issues
117
+
118
+ **Problem:** Code not properly formatted
119
+
120
+ **Solution:**
121
+ ```bash
122
+ # Format all Go files
123
+ gofmt -w .
124
+
125
+ # Or use goimports (includes import management)
126
+ goimports -w .
127
+ ```
128
+
129
+ ---
130
+
131
+ ### Integration Issues
132
+
133
+ #### Module Not Appearing in Augment
134
+
135
+ **Problem:** Module not visible in Augment Extensions
136
+
137
+ **Solution:**
138
+ 1. Verify `module.json` exists and is valid
139
+ 2. Check module is in `augment-extensions/coding-standards/go/`
140
+ 3. Restart Augment Code AI
141
+ 4. Check Augment Extensions catalog
142
+
143
+ #### AI Not Using Templates
144
+
145
+ **Problem:** Generated code doesn't follow templates
146
+
147
+ **Solution:**
148
+ 1. Verify templates exist in `templates/` directory
149
+ 2. Check template format matches specification
150
+ 3. Ensure category is selected in configuration
151
+ 4. Try regenerating with explicit category mention
152
+
153
+ ---
154
+
155
+ ### Performance Issues
156
+
157
+ #### Slow Rule Loading
158
+
159
+ **Problem:** Module takes long to load
160
+
161
+ **Solution:**
162
+ 1. Reduce number of selected categories
163
+ 2. Disable unused static analysis tools
164
+ 3. Check for large rule files (should be < 5KB each)
165
+
166
+ ---
167
+
168
+ ### Testing Issues
169
+
170
+ #### Unit Tests Failing
171
+
172
+ **Problem:** Module tests don't pass
173
+
174
+ **Solution:**
175
+ ```bash
176
+ # Run tests with verbose output
177
+ npm test -- --reporter=verbose
178
+
179
+ # Run specific test file
180
+ npm test tests/unit/module-structure.test.ts
181
+
182
+ # Check test dependencies
183
+ npm install
184
+ ```
185
+
186
+ #### Integration Tests Failing
187
+
188
+ **Problem:** Integration tests fail
189
+
190
+ **Solution:**
191
+ 1. Verify all required files exist
192
+ 2. Check file permissions
193
+ 3. Ensure module structure matches specification
194
+ 4. Review test output for specific failures
195
+
196
+ ---
197
+
198
+ ## Getting Help
199
+
200
+ ### Check Documentation
201
+
202
+ 1. [README.md](../README.md) - Module overview
203
+ 2. [CONFIGURATION.md](./CONFIGURATION.md) - Configuration guide
204
+ 3. [CATEGORIES.md](./CATEGORIES.md) - Category details
205
+
206
+ ### Validate Your Setup
207
+
208
+ ```bash
209
+ # Run validation script
210
+ ./tests/validate-examples.sh
211
+
212
+ # Or on Windows
213
+ .\tests\validate-examples.ps1
214
+ ```
215
+
216
+ ### Debug Mode
217
+
218
+ Enable verbose logging:
219
+
220
+ ```json
221
+ {
222
+ "debug": true,
223
+ "logging": {
224
+ "level": "debug"
225
+ }
226
+ }
227
+ ```
228
+
229
+ ### Report Issues
230
+
231
+ If problems persist:
232
+ 1. Check existing issues in repository
233
+ 2. Gather error messages and logs
234
+ 3. Include configuration file
235
+ 4. Describe expected vs actual behavior
236
+ 5. Submit issue with details
237
+
238
+ ---
239
+
240
+ ## Best Practices
241
+
242
+ ### Avoid Common Mistakes
243
+
244
+ 1. **Don't mix too many categories** - Use 2-3 maximum
245
+ 2. **Don't disable universal rules** - They're essential
246
+ 3. **Don't skip static analysis** - Catches issues early
247
+ 4. **Don't ignore warnings** - They indicate potential problems
248
+
249
+ ### Recommended Workflow
250
+
251
+ 1. Start with single category
252
+ 2. Add universal rules
253
+ 3. Enable static analysis
254
+ 4. Test with examples
255
+ 5. Gradually add more categories if needed
256
+
257
+ ---
258
+
259
+ ## Quick Fixes
260
+
261
+ ### Reset Configuration
262
+
263
+ ```bash
264
+ # Remove configuration
265
+ rm .augment/go-config.json
266
+
267
+ # Use default configuration
268
+ cp augment-extensions/coding-standards/go/config/examples/web-service.json .augment/go-config.json
269
+ ```
270
+
271
+ ### Reinstall Module
272
+
273
+ ```bash
274
+ # Remove and reinstall
275
+ rm -rf augment-extensions/coding-standards/go
276
+ git checkout augment-extensions/coding-standards/go
277
+ ```
278
+
279
+ ### Clear Cache
280
+
281
+ ```bash
282
+ # Clear Augment cache (if applicable)
283
+ rm -rf .augment/cache
284
+ ```
285
+
@@ -0,0 +1,287 @@
1
+ // Package main demonstrates a production-ready CLI application using Cobra and Viper
2
+ package main
3
+
4
+ import (
5
+ "fmt"
6
+ "os"
7
+ "path/filepath"
8
+ "strings"
9
+
10
+ "github.com/spf13/cobra"
11
+ "github.com/spf13/viper"
12
+ )
13
+
14
+ var (
15
+ cfgFile string
16
+ verbose bool
17
+ )
18
+
19
+ // Config represents application configuration
20
+ type Config struct {
21
+ Server ServerConfig `mapstructure:"server"`
22
+ Log LogConfig `mapstructure:"log"`
23
+ }
24
+
25
+ type ServerConfig struct {
26
+ Host string `mapstructure:"host"`
27
+ Port int `mapstructure:"port"`
28
+ }
29
+
30
+ type LogConfig struct {
31
+ Level string `mapstructure:"level"`
32
+ Format string `mapstructure:"format"`
33
+ }
34
+
35
+ // rootCmd represents the base command
36
+ var rootCmd = &cobra.Command{
37
+ Use: "myapp",
38
+ Short: "A production-ready CLI application",
39
+ Long: `myapp is a CLI application demonstrating best practices for
40
+ command-line tools in Go using Cobra and Viper.`,
41
+ }
42
+
43
+ // versionCmd represents the version command
44
+ var versionCmd = &cobra.Command{
45
+ Use: "version",
46
+ Short: "Print the version number",
47
+ Run: func(cmd *cobra.Command, args []string) {
48
+ fmt.Println("myapp v1.0.0")
49
+ },
50
+ }
51
+
52
+ // configCmd represents the config command group
53
+ var configCmd = &cobra.Command{
54
+ Use: "config",
55
+ Short: "Manage configuration",
56
+ }
57
+
58
+ // configShowCmd shows current configuration
59
+ var configShowCmd = &cobra.Command{
60
+ Use: "show",
61
+ Short: "Show current configuration",
62
+ RunE: func(cmd *cobra.Command, args []string) error {
63
+ cfg, err := loadConfig()
64
+ if err != nil {
65
+ return err
66
+ }
67
+
68
+ fmt.Printf("Configuration:\n")
69
+ fmt.Printf(" Server Host: %s\n", cfg.Server.Host)
70
+ fmt.Printf(" Server Port: %d\n", cfg.Server.Port)
71
+ fmt.Printf(" Log Level: %s\n", cfg.Log.Level)
72
+ fmt.Printf(" Log Format: %s\n", cfg.Log.Format)
73
+
74
+ return nil
75
+ },
76
+ }
77
+
78
+ // configInitCmd generates a sample config file
79
+ var configInitCmd = &cobra.Command{
80
+ Use: "init",
81
+ Short: "Generate sample configuration file",
82
+ RunE: func(cmd *cobra.Command, args []string) error {
83
+ home, err := os.UserHomeDir()
84
+ if err != nil {
85
+ return err
86
+ }
87
+
88
+ configPath := filepath.Join(home, ".myapp", "config.yaml")
89
+
90
+ // Create directory
91
+ if err := os.MkdirAll(filepath.Dir(configPath), 0755); err != nil {
92
+ return err
93
+ }
94
+
95
+ // Set defaults
96
+ viper.SetDefault("server.host", "localhost")
97
+ viper.SetDefault("server.port", 8080)
98
+ viper.SetDefault("log.level", "info")
99
+ viper.SetDefault("log.format", "json")
100
+
101
+ // Write config
102
+ if err := viper.WriteConfigAs(configPath); err != nil {
103
+ return err
104
+ }
105
+
106
+ fmt.Printf("Configuration file created: %s\n", configPath)
107
+ return nil
108
+ },
109
+ }
110
+
111
+ // serverCmd represents the server command group
112
+ var serverCmd = &cobra.Command{
113
+ Use: "server",
114
+ Short: "Server operations",
115
+ }
116
+
117
+ // serverStartCmd starts the server
118
+ var serverStartCmd = &cobra.Command{
119
+ Use: "start",
120
+ Short: "Start the server",
121
+ RunE: func(cmd *cobra.Command, args []string) error {
122
+ cfg, err := loadConfig()
123
+ if err != nil {
124
+ return err
125
+ }
126
+
127
+ if verbose {
128
+ fmt.Printf("Starting server on %s:%d\n", cfg.Server.Host, cfg.Server.Port)
129
+ }
130
+
131
+ // Server start logic would go here
132
+ fmt.Println("Server started successfully")
133
+ return nil
134
+ },
135
+ }
136
+
137
+ // userCmd represents the user command group
138
+ var userCmd = &cobra.Command{
139
+ Use: "user",
140
+ Short: "User management",
141
+ }
142
+
143
+ var (
144
+ userEmail string
145
+ userRole string
146
+ )
147
+
148
+ // userCreateCmd creates a new user
149
+ var userCreateCmd = &cobra.Command{
150
+ Use: "create [name]",
151
+ Short: "Create a new user",
152
+ Args: cobra.ExactArgs(1),
153
+ Example: ` # Create a user with email
154
+ myapp user create john --email john@example.com
155
+
156
+ # Create an admin user
157
+ myapp user create admin --email admin@example.com --role admin`,
158
+ PreRunE: func(cmd *cobra.Command, args []string) error {
159
+ // Validate name
160
+ name := args[0]
161
+ if len(name) < 3 {
162
+ return fmt.Errorf("name must be at least 3 characters")
163
+ }
164
+
165
+ // Validate email
166
+ if userEmail == "" {
167
+ return fmt.Errorf("email is required")
168
+ }
169
+
170
+ return nil
171
+ },
172
+ RunE: func(cmd *cobra.Command, args []string) error {
173
+ name := args[0]
174
+
175
+ if verbose {
176
+ fmt.Printf("Creating user: %s (%s) with role: %s\n", name, userEmail, userRole)
177
+ }
178
+
179
+ // User creation logic would go here
180
+ fmt.Printf("User '%s' created successfully\n", name)
181
+ return nil
182
+ },
183
+ }
184
+
185
+ // userListCmd lists all users
186
+ var userListCmd = &cobra.Command{
187
+ Use: "list",
188
+ Short: "List all users",
189
+ RunE: func(cmd *cobra.Command, args []string) error {
190
+ if verbose {
191
+ fmt.Println("Fetching users...")
192
+ }
193
+
194
+ // List users logic would go here
195
+ fmt.Println("Users:")
196
+ fmt.Println(" 1. john (john@example.com)")
197
+ fmt.Println(" 2. jane (jane@example.com)")
198
+
199
+ return nil
200
+ },
201
+ }
202
+
203
+ func init() {
204
+ cobra.OnInitialize(initConfig)
205
+
206
+ // Global flags
207
+ rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.myapp/config.yaml)")
208
+ rootCmd.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, "verbose output")
209
+
210
+ // Add commands
211
+ rootCmd.AddCommand(versionCmd)
212
+ rootCmd.AddCommand(configCmd)
213
+ rootCmd.AddCommand(serverCmd)
214
+ rootCmd.AddCommand(userCmd)
215
+
216
+ // Config subcommands
217
+ configCmd.AddCommand(configShowCmd)
218
+ configCmd.AddCommand(configInitCmd)
219
+
220
+ // Server subcommands
221
+ serverCmd.AddCommand(serverStartCmd)
222
+
223
+ // User subcommands
224
+ userCmd.AddCommand(userCreateCmd)
225
+ userCmd.AddCommand(userListCmd)
226
+
227
+ // User create flags
228
+ userCreateCmd.Flags().StringVar(&userEmail, "email", "", "user email (required)")
229
+ userCreateCmd.Flags().StringVar(&userRole, "role", "user", "user role (user, admin)")
230
+ userCreateCmd.MarkFlagRequired("email")
231
+ }
232
+
233
+ func initConfig() {
234
+ if cfgFile != "" {
235
+ viper.SetConfigFile(cfgFile)
236
+ } else {
237
+ home, err := os.UserHomeDir()
238
+ if err != nil {
239
+ fmt.Fprintf(os.Stderr, "Error: %v\n", err)
240
+ os.Exit(1)
241
+ }
242
+
243
+ viper.AddConfigPath(filepath.Join(home, ".myapp"))
244
+ viper.AddConfigPath(".")
245
+ viper.SetConfigName("config")
246
+ viper.SetConfigType("yaml")
247
+ }
248
+
249
+ // Environment variables
250
+ viper.SetEnvPrefix("MYAPP")
251
+ viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
252
+ viper.AutomaticEnv()
253
+
254
+ // Set defaults
255
+ viper.SetDefault("server.host", "localhost")
256
+ viper.SetDefault("server.port", 8080)
257
+ viper.SetDefault("log.level", "info")
258
+ viper.SetDefault("log.format", "json")
259
+
260
+ // Read config file (ignore if not found)
261
+ if err := viper.ReadInConfig(); err != nil {
262
+ if _, ok := err.(viper.ConfigFileNotFoundError); !ok {
263
+ fmt.Fprintf(os.Stderr, "Error reading config: %v\n", err)
264
+ }
265
+ }
266
+ }
267
+
268
+ func loadConfig() (*Config, error) {
269
+ var cfg Config
270
+ if err := viper.Unmarshal(&cfg); err != nil {
271
+ return nil, fmt.Errorf("failed to unmarshal config: %w", err)
272
+ }
273
+
274
+ // Validate
275
+ if cfg.Server.Port < 1 || cfg.Server.Port > 65535 {
276
+ return nil, fmt.Errorf("invalid port: %d", cfg.Server.Port)
277
+ }
278
+
279
+ return &cfg, nil
280
+ }
281
+
282
+ func main() {
283
+ if err := rootCmd.Execute(); err != nil {
284
+ os.Exit(1)
285
+ }
286
+ }
287
+