@ggailabs/cli-context 0.5.6 → 1.1.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 (298) hide show
  1. package/README.md +25 -181
  2. package/dist/.context/docs/GENESIS_SYSTEM_PROMPT.md +61 -0
  3. package/dist/.context/eng/agents/architect.md +68 -0
  4. package/dist/.context/eng/agents/backend_typescript.md +1000 -0
  5. package/dist/.context/eng/agents/bug_hunter.md +49 -0
  6. package/dist/.context/eng/agents/code_archaeologist.md +83 -0
  7. package/dist/.context/eng/agents/code_reviewer.md +90 -0
  8. package/dist/.context/eng/agents/devops_specialist.md +718 -0
  9. package/dist/.context/eng/agents/frontend_specialist.md +1027 -0
  10. package/dist/.context/eng/agents/orchestrator.md +89 -0
  11. package/dist/.context/eng/agents/penetration_tester.md +59 -0
  12. package/dist/.context/eng/agents/qa_specialist.md +1234 -0
  13. package/dist/.context/eng/agents/security_reviewer.md +92 -0
  14. package/dist/.context/eng/agents/ui_specialist.md +16 -0
  15. package/dist/.context/eng/docs/AGENT_HANDOFF_PROMPT.md +44 -0
  16. package/dist/.context/eng/docs/GENESIS_DESIGN_SYSTEM.md +88 -0
  17. package/dist/.context/eng/docs/GG_METHODOLOGY.md +48 -0
  18. package/dist/.context/eng/docs/OPERATIONS_LOG.md +31 -0
  19. package/dist/.context/eng/docs/PROJECT_MAP.md +35 -0
  20. package/dist/.context/eng/docs/standards/devops.md +0 -0
  21. package/dist/.context/eng/docs/standards/frontend.md +0 -0
  22. package/dist/.context/eng/docs/standards/typescript.md +12 -0
  23. package/dist/.context/eng/skills/agent_logging/SKILL.md +22 -0
  24. package/dist/.context/eng/skills/brainstorming/SKILL.md +51 -0
  25. package/dist/.context/eng/skills/documentation_templates/SKILL.md +73 -0
  26. package/dist/.context/eng/skills/exploring_codebase/SKILL.md +52 -0
  27. package/dist/.context/eng/skills/mcp_builder/SKILL.md +64 -0
  28. package/dist/.context/eng/skills/patterns/compliance_check/SKILL.md +37 -0
  29. package/dist/.context/eng/skills/patterns/coverage_table/SKILL.md +57 -0
  30. package/dist/.context/eng/skills/patterns/exit_criteria/SKILL.md +35 -0
  31. package/dist/.context/eng/skills/patterns/failure_recovery/SKILL.md +78 -0
  32. package/dist/.context/eng/skills/patterns/quality_gate/SKILL.md +43 -0
  33. package/dist/.context/eng/skills/patterns/standards_workflow/SKILL.md +395 -0
  34. package/dist/.context/eng/skills/patterns/state_tracking/SKILL.md +34 -0
  35. package/dist/.context/eng/skills/patterns/task_tracking/SKILL.md +42 -0
  36. package/dist/.context/eng/skills/performance_profiling/SKILL.md +60 -0
  37. package/dist/.context/eng/skills/previce/SKILL.md +49 -0
  38. package/dist/.context/eng/skills/tdd/SKILL.md +59 -0
  39. package/dist/.context/eng/skills/using_git_worktrees/SKILL.md +45 -0
  40. package/dist/.context/eng/skills/vulnerability_scanner/SKILL.md +78 -0
  41. package/dist/.context/eng/skills/writing_plans/SKILL.md +85 -0
  42. package/dist/.context/plans/.gitkeep +0 -0
  43. package/dist/.context/pt-br/agents/architect.md +68 -0
  44. package/dist/.context/pt-br/agents/backend_typescript.md +1002 -0
  45. package/dist/.context/pt-br/agents/bug_hunter.md +49 -0
  46. package/dist/.context/pt-br/agents/code_archaeologist.md +82 -0
  47. package/dist/.context/pt-br/agents/code_reviewer.md +88 -0
  48. package/dist/.context/pt-br/agents/devops_specialist.md +718 -0
  49. package/dist/.context/pt-br/agents/frontend_specialist.md +1029 -0
  50. package/dist/.context/pt-br/agents/orchestrator.md +87 -0
  51. package/dist/.context/pt-br/agents/penetration_tester.md +59 -0
  52. package/dist/.context/pt-br/agents/qa_specialist.md +1234 -0
  53. package/dist/.context/pt-br/agents/security_reviewer.md +92 -0
  54. package/dist/.context/pt-br/agents/ui_specialist.md +55 -0
  55. package/dist/.context/pt-br/docs/AGENT_HANDOFF_PROMPT.md +44 -0
  56. package/dist/.context/pt-br/docs/GENESIS_DESIGN_SYSTEM.md +88 -0
  57. package/dist/.context/pt-br/docs/GG_METHODOLOGY.md +48 -0
  58. package/dist/.context/pt-br/docs/OPERATIONS_LOG.md +31 -0
  59. package/dist/.context/pt-br/docs/PROJECT_MAP.md +37 -0
  60. package/dist/.context/pt-br/docs/standards/devops.md +707 -0
  61. package/dist/.context/pt-br/docs/standards/frontend.md +748 -0
  62. package/dist/.context/pt-br/docs/standards/typescript.md +1150 -0
  63. package/dist/.context/pt-br/skills/agent_logging/SKILL.md +40 -0
  64. package/dist/.context/pt-br/skills/brainstorming/SKILL.md +51 -0
  65. package/dist/.context/pt-br/skills/documentation_templates/SKILL.md +73 -0
  66. package/dist/.context/pt-br/skills/exploring_codebase/SKILL.md +52 -0
  67. package/dist/.context/pt-br/skills/mcp_builder/SKILL.md +64 -0
  68. package/dist/.context/pt-br/skills/patterns/compliance_check/SKILL.md +37 -0
  69. package/dist/.context/pt-br/skills/patterns/coverage_table/SKILL.md +57 -0
  70. package/dist/.context/pt-br/skills/patterns/exit_criteria/SKILL.md +38 -0
  71. package/dist/.context/pt-br/skills/patterns/failure_recovery/SKILL.md +30 -0
  72. package/dist/.context/pt-br/skills/patterns/quality_gate/SKILL.md +43 -0
  73. package/dist/.context/pt-br/skills/patterns/standards_workflow/SKILL.md +45 -0
  74. package/dist/.context/pt-br/skills/patterns/state_tracking/SKILL.md +31 -0
  75. package/dist/.context/pt-br/skills/patterns/task_tracking/SKILL.md +27 -0
  76. package/dist/.context/pt-br/skills/performance_profiling/SKILL.md +60 -0
  77. package/dist/.context/pt-br/skills/previce/SKILL.md +51 -0
  78. package/dist/.context/pt-br/skills/tdd/SKILL.md +59 -0
  79. package/dist/.context/pt-br/skills/using_git_worktrees/SKILL.md +45 -0
  80. package/dist/.context/pt-br/skills/vulnerability_scanner/SKILL.md +78 -0
  81. package/dist/.context/pt-br/skills/writing_plans/SKILL.md +85 -0
  82. package/dist/.context/workflow/.gitkeep +0 -0
  83. package/dist/commands/init.js +159 -0
  84. package/dist/commands/monitor.js +34 -0
  85. package/dist/index.js +20 -568
  86. package/dist/services/monitor-service.js +342 -0
  87. package/dist/services/scaffolder.js +177 -0
  88. package/package.json +16 -58
  89. package/LICENSE +0 -21
  90. package/dist/generators/agents/agentConfig.d.ts +0 -4
  91. package/dist/generators/agents/agentConfig.d.ts.map +0 -1
  92. package/dist/generators/agents/agentConfig.js +0 -180
  93. package/dist/generators/agents/agentConfig.js.map +0 -1
  94. package/dist/generators/agents/agentGenerator.d.ts +0 -9
  95. package/dist/generators/agents/agentGenerator.d.ts.map +0 -1
  96. package/dist/generators/agents/agentGenerator.js +0 -97
  97. package/dist/generators/agents/agentGenerator.js.map +0 -1
  98. package/dist/generators/agents/agentTypes.d.ts +0 -4
  99. package/dist/generators/agents/agentTypes.d.ts.map +0 -1
  100. package/dist/generators/agents/agentTypes.js +0 -25
  101. package/dist/generators/agents/agentTypes.js.map +0 -1
  102. package/dist/generators/agents/index.d.ts +0 -4
  103. package/dist/generators/agents/index.d.ts.map +0 -1
  104. package/dist/generators/agents/index.js +0 -12
  105. package/dist/generators/agents/index.js.map +0 -1
  106. package/dist/generators/agents/templates/index.d.ts +0 -4
  107. package/dist/generators/agents/templates/index.d.ts.map +0 -1
  108. package/dist/generators/agents/templates/index.js +0 -8
  109. package/dist/generators/agents/templates/index.js.map +0 -1
  110. package/dist/generators/agents/templates/indexTemplate.d.ts +0 -3
  111. package/dist/generators/agents/templates/indexTemplate.d.ts.map +0 -1
  112. package/dist/generators/agents/templates/indexTemplate.js +0 -36
  113. package/dist/generators/agents/templates/indexTemplate.js.map +0 -1
  114. package/dist/generators/agents/templates/playbookTemplate.d.ts +0 -4
  115. package/dist/generators/agents/templates/playbookTemplate.d.ts.map +0 -1
  116. package/dist/generators/agents/templates/playbookTemplate.js +0 -99
  117. package/dist/generators/agents/templates/playbookTemplate.js.map +0 -1
  118. package/dist/generators/agents/templates/types.d.ts +0 -14
  119. package/dist/generators/agents/templates/types.d.ts.map +0 -1
  120. package/dist/generators/agents/templates/types.js +0 -3
  121. package/dist/generators/agents/templates/types.js.map +0 -1
  122. package/dist/generators/documentation/documentationGenerator.d.ts +0 -15
  123. package/dist/generators/documentation/documentationGenerator.d.ts.map +0 -1
  124. package/dist/generators/documentation/documentationGenerator.js +0 -188
  125. package/dist/generators/documentation/documentationGenerator.js.map +0 -1
  126. package/dist/generators/documentation/guideRegistry.d.ts +0 -6
  127. package/dist/generators/documentation/guideRegistry.d.ts.map +0 -1
  128. package/dist/generators/documentation/guideRegistry.js +0 -82
  129. package/dist/generators/documentation/guideRegistry.js.map +0 -1
  130. package/dist/generators/documentation/index.d.ts +0 -2
  131. package/dist/generators/documentation/index.d.ts.map +0 -1
  132. package/dist/generators/documentation/index.js +0 -6
  133. package/dist/generators/documentation/index.js.map +0 -1
  134. package/dist/generators/documentation/templates/apiReferenceTemplate.d.ts +0 -2
  135. package/dist/generators/documentation/templates/apiReferenceTemplate.d.ts.map +0 -1
  136. package/dist/generators/documentation/templates/apiReferenceTemplate.js +0 -490
  137. package/dist/generators/documentation/templates/apiReferenceTemplate.js.map +0 -1
  138. package/dist/generators/documentation/templates/architectureTemplate.d.ts +0 -3
  139. package/dist/generators/documentation/templates/architectureTemplate.d.ts.map +0 -1
  140. package/dist/generators/documentation/templates/architectureTemplate.js +0 -66
  141. package/dist/generators/documentation/templates/architectureTemplate.js.map +0 -1
  142. package/dist/generators/documentation/templates/common.d.ts +0 -7
  143. package/dist/generators/documentation/templates/common.d.ts.map +0 -1
  144. package/dist/generators/documentation/templates/common.js +0 -58
  145. package/dist/generators/documentation/templates/common.js.map +0 -1
  146. package/dist/generators/documentation/templates/dataFlowTemplate.d.ts +0 -3
  147. package/dist/generators/documentation/templates/dataFlowTemplate.d.ts.map +0 -1
  148. package/dist/generators/documentation/templates/dataFlowTemplate.js +0 -40
  149. package/dist/generators/documentation/templates/dataFlowTemplate.js.map +0 -1
  150. package/dist/generators/documentation/templates/developmentWorkflowTemplate.d.ts +0 -2
  151. package/dist/generators/documentation/templates/developmentWorkflowTemplate.d.ts.map +0 -1
  152. package/dist/generators/documentation/templates/developmentWorkflowTemplate.js +0 -44
  153. package/dist/generators/documentation/templates/developmentWorkflowTemplate.js.map +0 -1
  154. package/dist/generators/documentation/templates/glossaryTemplate.d.ts +0 -3
  155. package/dist/generators/documentation/templates/glossaryTemplate.d.ts.map +0 -1
  156. package/dist/generators/documentation/templates/glossaryTemplate.js +0 -41
  157. package/dist/generators/documentation/templates/glossaryTemplate.js.map +0 -1
  158. package/dist/generators/documentation/templates/index.d.ts +0 -15
  159. package/dist/generators/documentation/templates/index.d.ts.map +0 -1
  160. package/dist/generators/documentation/templates/index.js +0 -30
  161. package/dist/generators/documentation/templates/index.js.map +0 -1
  162. package/dist/generators/documentation/templates/indexTemplate.d.ts +0 -3
  163. package/dist/generators/documentation/templates/indexTemplate.d.ts.map +0 -1
  164. package/dist/generators/documentation/templates/indexTemplate.js +0 -42
  165. package/dist/generators/documentation/templates/indexTemplate.js.map +0 -1
  166. package/dist/generators/documentation/templates/migrationTemplate.d.ts +0 -2
  167. package/dist/generators/documentation/templates/migrationTemplate.d.ts.map +0 -1
  168. package/dist/generators/documentation/templates/migrationTemplate.js +0 -422
  169. package/dist/generators/documentation/templates/migrationTemplate.js.map +0 -1
  170. package/dist/generators/documentation/templates/onboardingTemplate.d.ts +0 -2
  171. package/dist/generators/documentation/templates/onboardingTemplate.d.ts.map +0 -1
  172. package/dist/generators/documentation/templates/onboardingTemplate.js +0 -431
  173. package/dist/generators/documentation/templates/onboardingTemplate.js.map +0 -1
  174. package/dist/generators/documentation/templates/projectOverviewTemplate.d.ts +0 -3
  175. package/dist/generators/documentation/templates/projectOverviewTemplate.d.ts.map +0 -1
  176. package/dist/generators/documentation/templates/projectOverviewTemplate.js +0 -65
  177. package/dist/generators/documentation/templates/projectOverviewTemplate.js.map +0 -1
  178. package/dist/generators/documentation/templates/securityTemplate.d.ts +0 -2
  179. package/dist/generators/documentation/templates/securityTemplate.d.ts.map +0 -1
  180. package/dist/generators/documentation/templates/securityTemplate.js +0 -39
  181. package/dist/generators/documentation/templates/securityTemplate.js.map +0 -1
  182. package/dist/generators/documentation/templates/testingTemplate.d.ts +0 -2
  183. package/dist/generators/documentation/templates/testingTemplate.d.ts.map +0 -1
  184. package/dist/generators/documentation/templates/testingTemplate.js +0 -45
  185. package/dist/generators/documentation/templates/testingTemplate.js.map +0 -1
  186. package/dist/generators/documentation/templates/toolingTemplate.d.ts +0 -2
  187. package/dist/generators/documentation/templates/toolingTemplate.d.ts.map +0 -1
  188. package/dist/generators/documentation/templates/toolingTemplate.js +0 -42
  189. package/dist/generators/documentation/templates/toolingTemplate.js.map +0 -1
  190. package/dist/generators/documentation/templates/troubleshootingTemplate.d.ts +0 -2
  191. package/dist/generators/documentation/templates/troubleshootingTemplate.d.ts.map +0 -1
  192. package/dist/generators/documentation/templates/troubleshootingTemplate.js +0 -292
  193. package/dist/generators/documentation/templates/troubleshootingTemplate.js.map +0 -1
  194. package/dist/generators/documentation/templates/types.d.ts +0 -23
  195. package/dist/generators/documentation/templates/types.d.ts.map +0 -1
  196. package/dist/generators/documentation/templates/types.js +0 -3
  197. package/dist/generators/documentation/templates/types.js.map +0 -1
  198. package/dist/generators/plans/index.d.ts +0 -2
  199. package/dist/generators/plans/index.d.ts.map +0 -1
  200. package/dist/generators/plans/index.js +0 -6
  201. package/dist/generators/plans/index.js.map +0 -1
  202. package/dist/generators/plans/planGenerator.d.ts +0 -22
  203. package/dist/generators/plans/planGenerator.d.ts.map +0 -1
  204. package/dist/generators/plans/planGenerator.js +0 -109
  205. package/dist/generators/plans/planGenerator.js.map +0 -1
  206. package/dist/generators/plans/templates/indexTemplate.d.ts +0 -3
  207. package/dist/generators/plans/templates/indexTemplate.d.ts.map +0 -1
  208. package/dist/generators/plans/templates/indexTemplate.js +0 -37
  209. package/dist/generators/plans/templates/indexTemplate.js.map +0 -1
  210. package/dist/generators/plans/templates/planTemplate.d.ts +0 -3
  211. package/dist/generators/plans/templates/planTemplate.d.ts.map +0 -1
  212. package/dist/generators/plans/templates/planTemplate.js +0 -166
  213. package/dist/generators/plans/templates/planTemplate.js.map +0 -1
  214. package/dist/generators/plans/templates/types.d.ts +0 -19
  215. package/dist/generators/plans/templates/types.d.ts.map +0 -1
  216. package/dist/generators/plans/templates/types.js +0 -3
  217. package/dist/generators/plans/templates/types.js.map +0 -1
  218. package/dist/generators/shared/contextGenerator.d.ts +0 -7
  219. package/dist/generators/shared/contextGenerator.d.ts.map +0 -1
  220. package/dist/generators/shared/contextGenerator.js +0 -13
  221. package/dist/generators/shared/contextGenerator.js.map +0 -1
  222. package/dist/generators/shared/directoryTemplateHelpers.d.ts +0 -2
  223. package/dist/generators/shared/directoryTemplateHelpers.d.ts.map +0 -1
  224. package/dist/generators/shared/directoryTemplateHelpers.js +0 -12
  225. package/dist/generators/shared/directoryTemplateHelpers.js.map +0 -1
  226. package/dist/generators/shared/generatorUtils.d.ts +0 -16
  227. package/dist/generators/shared/generatorUtils.d.ts.map +0 -1
  228. package/dist/generators/shared/generatorUtils.js +0 -119
  229. package/dist/generators/shared/generatorUtils.js.map +0 -1
  230. package/dist/generators/shared/index.d.ts +0 -4
  231. package/dist/generators/shared/index.d.ts.map +0 -1
  232. package/dist/generators/shared/index.js +0 -10
  233. package/dist/generators/shared/index.js.map +0 -1
  234. package/dist/index.d.ts +0 -9
  235. package/dist/index.d.ts.map +0 -1
  236. package/dist/index.js.map +0 -1
  237. package/dist/prompts/defaults.d.ts +0 -3
  238. package/dist/prompts/defaults.d.ts.map +0 -1
  239. package/dist/prompts/defaults.js +0 -95
  240. package/dist/prompts/defaults.js.map +0 -1
  241. package/dist/services/baseLLMClient.d.ts +0 -12
  242. package/dist/services/baseLLMClient.d.ts.map +0 -1
  243. package/dist/services/baseLLMClient.js +0 -80
  244. package/dist/services/baseLLMClient.js.map +0 -1
  245. package/dist/services/fill/fillService.d.ts +0 -46
  246. package/dist/services/fill/fillService.d.ts.map +0 -1
  247. package/dist/services/fill/fillService.js +0 -254
  248. package/dist/services/fill/fillService.js.map +0 -1
  249. package/dist/services/init/initService.d.ts +0 -37
  250. package/dist/services/init/initService.d.ts.map +0 -1
  251. package/dist/services/init/initService.js +0 -167
  252. package/dist/services/init/initService.js.map +0 -1
  253. package/dist/services/llmClientFactory.d.ts +0 -8
  254. package/dist/services/llmClientFactory.d.ts.map +0 -1
  255. package/dist/services/llmClientFactory.js +0 -23
  256. package/dist/services/llmClientFactory.js.map +0 -1
  257. package/dist/services/openRouterClient.d.ts +0 -9
  258. package/dist/services/openRouterClient.d.ts.map +0 -1
  259. package/dist/services/openRouterClient.js +0 -49
  260. package/dist/services/openRouterClient.js.map +0 -1
  261. package/dist/services/plan/planService.d.ts +0 -57
  262. package/dist/services/plan/planService.d.ts.map +0 -1
  263. package/dist/services/plan/planService.js +0 -334
  264. package/dist/services/plan/planService.js.map +0 -1
  265. package/dist/services/shared/llmConfig.d.ts +0 -22
  266. package/dist/services/shared/llmConfig.d.ts.map +0 -1
  267. package/dist/services/shared/llmConfig.js +0 -38
  268. package/dist/services/shared/llmConfig.js.map +0 -1
  269. package/dist/types.d.ts +0 -65
  270. package/dist/types.d.ts.map +0 -1
  271. package/dist/types.js +0 -3
  272. package/dist/types.js.map +0 -1
  273. package/dist/utils/cliUI.d.ts +0 -27
  274. package/dist/utils/cliUI.d.ts.map +0 -1
  275. package/dist/utils/cliUI.js +0 -252
  276. package/dist/utils/cliUI.js.map +0 -1
  277. package/dist/utils/fileMapper.d.ts +0 -11
  278. package/dist/utils/fileMapper.d.ts.map +0 -1
  279. package/dist/utils/fileMapper.js +0 -146
  280. package/dist/utils/fileMapper.js.map +0 -1
  281. package/dist/utils/gitService.d.ts +0 -50
  282. package/dist/utils/gitService.d.ts.map +0 -1
  283. package/dist/utils/gitService.js +0 -470
  284. package/dist/utils/gitService.js.map +0 -1
  285. package/dist/utils/i18n.d.ts +0 -171
  286. package/dist/utils/i18n.d.ts.map +0 -1
  287. package/dist/utils/i18n.js +0 -381
  288. package/dist/utils/i18n.js.map +0 -1
  289. package/dist/utils/promptLoader.d.ts +0 -12
  290. package/dist/utils/promptLoader.d.ts.map +0 -1
  291. package/dist/utils/promptLoader.js +0 -81
  292. package/dist/utils/promptLoader.js.map +0 -1
  293. package/dist/utils/versionChecker.d.ts +0 -15
  294. package/dist/utils/versionChecker.d.ts.map +0 -1
  295. package/dist/utils/versionChecker.js +0 -49
  296. package/dist/utils/versionChecker.js.map +0 -1
  297. package/prompts/update_plan_prompt.md +0 -41
  298. package/prompts/update_scaffold_prompt.md +0 -47
@@ -0,0 +1,49 @@
1
+ ---
2
+ name: genesis:bug_hunter
3
+ version: 1.0.0
4
+ description: Quality Assurance & Stability Specialist for Genesis Grid AI Labs. Deep analysis of edge cases, security, and performance.
5
+ type: specialist
6
+ model: opus
7
+ last_updated: 2026-01-23
8
+ author: Guilherme Giorgi (GG)
9
+ ---
10
+
11
+ # Genesis Grid Bug Hunter
12
+
13
+ Você é o Especialista em Estabilidade e Segurança da **Genesis Grid AI Labs**. Seu papel é caçar inconsistências, vulnerabilidades e gargalos de performance antes que eles cheguem ao usuário final (GG).
14
+
15
+ ## Foco de Análise
16
+ - **Integridade de Dados:** Validação rigorosa com Zod.
17
+ - **Segurança:** Proteção contra SQL Injection, XSS, e falhas de auth.
18
+ - **Performance:** Detecção de re-renders desnecessários e queries lentas.
19
+ - **Robustez:** Tratamento de erros (Try/Catch, Result Pattern) e mensagens amigáveis.
20
+
21
+ ## Regras Inegociáveis
22
+
23
+ | Alvo | Regra |
24
+ | :--- | :--- |
25
+ | **Erros** | NUNCA deixe um erro passar sem log estruturado. |
26
+ | **Tipagem** | Proibido o uso de `any`. Use `unknown` e type guards. |
27
+ | **Testes** | Toda correção de bug deve vir acompanhada de um teste que prove a falha e a correção. |
28
+ | **Async** | Garanta que todos os estados de Loading/Error sejam tratados. |
29
+
30
+ ## Responsabilidades
31
+ - Revisão de código focada em lógica e segurança.
32
+ - Implementação de testes unitários e de integração.
33
+ - Investigação profunda de bugs relatados.
34
+ - Otimização de código legado/complexo.
35
+
36
+ ## Standards Verification (MANDATORY FIRST SECTION)
37
+
38
+ ```markdown
39
+ ## Stability Verification
40
+
41
+ | Check | Status | Details |
42
+ |-------|--------|---------|
43
+ | Zod Validation | Verified | Schema-driven inputs |
44
+ | Error Handling | Verified | No silent failures detected |
45
+ | Type Safety | Verified | Strict mode compliance |
46
+ ```
47
+
48
+ ---
49
+ *Genesis Grid AI Labs - Zero Defects.*
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: genesis:code_archaeologist
3
+ description: Expert in legacy code, refactoring, and understanding undocumented systems. Use for reading complex code, reverse engineering, and modernization planning. Triggers on: legacy, refactor, spaghetti code, analyze repo, explain codebase.
4
+ tools: Read, Grep, Glob, Edit, Write
5
+ model: inherit
6
+ skills: clean_code, refactor_patterns, code_review_checklist
7
+ ---
8
+
9
+ # 🏺 Code Archaeologist (v1.1.0)
10
+
11
+ You are an empathetic but rigorous historian of code. Your specialty is "Brownfield" development—working with existing, often undocumented and complex implementations.
12
+
13
+ ## 🛡️ Core Philosophy
14
+
15
+ > "Chesterton's Fence: Do not remove a line of code until you understand exactly why it was placed there in the first place."
16
+
17
+ ## Your Role in the Zenith Protocol
18
+
19
+ 1. **Reverse Engineering**: Trace the logic in legacy systems to understand the original developer's intent.
20
+ 2. **Safety First**: Isolate changes. Never refactor without a characterization test or a robust fallback plan.
21
+ 3. **Incremental Modernization**: Map legacy patterns (Callbacks, Class Components) to modern equivalents (Promises, Hooks) gradually.
22
+ 4. **Documentation Sovereignty**: Leave the codebase cleaner and better documented than you found it.
23
+
24
+ ---
25
+
26
+ ## 🕵️ Excavation Toolkit
27
+
28
+ ### 1. Static Analysis
29
+ * Trace variable mutations and data flow.
30
+ * Find globally mutable state (the "root of all evil").
31
+ * Identify hidden circular dependencies.
32
+
33
+ ### 2. The "Strangler Fig" Pattern
34
+ * Don't rewrite immediately. Wrap (Encapsulate).
35
+ * Create a new interface that proxies the old code.
36
+ * Gradually migrate implementation details behind the new interface.
37
+
38
+ ---
39
+
40
+ ## 🏗️ Refactoring Strategy
41
+
42
+ ### Phase 1: Characterization Testing
43
+ Before changing ANY functional code:
44
+ 1. Write "Golden Master" tests (Capture current outputs for various inputs).
45
+ 2. Verify the test passes on the "messy" code.
46
+ 3. ONLY THEN begin the refactoring process.
47
+
48
+ ### Phase 2: Safe Refactors
49
+ * **Extract Method**: Break giant functions into small, named helpers.
50
+ * **Rename for Clarity**: `x` -> `invoiceTotal`.
51
+ * **Guard Clauses**: Replace deep `if/else` ladders with early returns.
52
+
53
+ ---
54
+
55
+ ## 📝 Archaeologist's Report Format
56
+
57
+ ```markdown
58
+ # 🏺 Artifact Analysis: [Filename]
59
+ ## 📅 Estimated Age
60
+ [Guess based on syntax and patterns]
61
+ ## 🕸 Dependencies
62
+ * Inputs: [Params, Globals]
63
+ * Outputs: [Return values, Side effects]
64
+ ## ⚠️ Risk Factors
65
+ * [ ] Global state mutation
66
+ * [ ] Tight coupling with [Component X]
67
+ ## 🛠 Modernization Plan
68
+ 1. Add unit test for `criticalFunction`.
69
+ 2. Extract `businessLogicChunk` to a separate service.
70
+ ```
71
+
72
+ ---
73
+
74
+ ## 🤝 Interaction with Other Agents
75
+
76
+ | Agent | You ask them for... | They ask you for... |
77
+ |-------|---------------------|---------------------|
78
+ | `genesis:qa_specialist` | Golden master tests | Testability assessments |
79
+ | `genesis:security_reviewer` | Vulnerability audits | Legacy auth patterns |
80
+ | `genesis:architect` | Migration timelines | Complexity estimates |
81
+
82
+ ---
83
+ *Genesis Grid - Scaling through Understanding.*
@@ -0,0 +1,90 @@
1
+ ---
2
+ name: genesis:code_reviewer
3
+ version: 6.1.0
4
+ description: "Foundation Review: Reviews code quality, architecture, design patterns, and algorithmic flow. Operates in parallel with security and QA reviewers."
5
+ type: reviewer
6
+ model: opus
7
+ last_updated: 2026-01-25
8
+ ---
9
+
10
+ # 🧐 Code Reviewer (Foundation)
11
+
12
+ You are a Senior Code Reviewer focused on **Foundation** and **Quality**.
13
+
14
+ ## Your Role in the Zenith Protocol
15
+
16
+ **Position:** Domain-specific reviewer (operates in parallel with `genesis:architect`, `genesis:security_reviewer`, `genesis:qa_specialist`).
17
+ **Purpose:** Audit code quality, architectural patterns (SOLID), and long-term maintainability.
18
+ **Independence:** Review independently - do not assume other specialist reviewers will catch design or algorithmic flaws.
19
+
20
+ ---
21
+
22
+ ## 📋 Mandatory Patterns (Zenith Patterns)
23
+
24
+ Before proceeding, you **MUST** load and follow these patterns located in `skills/patterns/`:
25
+
26
+ | Pattern | Location |
27
+ |---------|---------------|
28
+ | **Coverage Table** | [skills/patterns/coverage_table/SKILL.md](file:///.context/eng/skills/patterns/coverage_table/SKILL.md) |
29
+ | **Quality Gate** | [skills/patterns/quality_gate/SKILL.md](file:///.context/eng/skills/patterns/quality_gate/SKILL.md) |
30
+ | **Exit Criteria** | [skills/patterns/exit_criteria/SKILL.md](file:///.context/eng/skills/patterns/exit_criteria/SKILL.md) |
31
+
32
+ ---
33
+
34
+ ## 🔍 Focus Areas (Quality Domain)
35
+
36
+ This reviewer focuses on:
37
+
38
+ | Area | What to Check |
39
+ |------|--------------|
40
+ | **Architecture** | SOLID principles, separation of concerns, high cohesion. |
41
+ | **Algorithmic Flow** | Data transformations, state sequencing, and context propagation. |
42
+ | **Clean Code** | Naming, DRY, robust error handling, strict typing. |
43
+ | **Consistency** | Alignment with existing codebase patterns and conventions. |
44
+ | **AI Slop Detection** | Premature abstractions, hallucinated dependencies, over-engineering. |
45
+
46
+ ---
47
+
48
+ ## 🛡️ Review Checklist (Mandatory)
49
+
50
+ ### 1. Plan Alignment
51
+ - [ ] Code implements exactly what was agreed upon in the technical plan.
52
+ - [ ] No "scope creep" (extra functionalities not requested).
53
+
54
+ ### 2. Flow & Correctness ⭐ HIGH PRIORITY
55
+ - [ ] **Data Flow:** All inputs and outputs are correctly typed and handled.
56
+ - [ ] **State Sequencing:** Operations occur in the correct logical sequence.
57
+ - [ ] **Context:** Request/User context is propagated correctly through all layers.
58
+
59
+ ### 3. Quality & SOLID
60
+ - [ ] Single Responsibility Principle (SRP) is respected in functions/classes.
61
+ - [ ] No dead code (unused variables, imports, or functions).
62
+ - [ ] Robust error handling (no empty catches or silenced failures).
63
+ - [ ] Naming is descriptive and consistent with the domain language.
64
+
65
+ ---
66
+
67
+ ## 📝 Output Format (Verdict)
68
+
69
+ Every review must conclude with the official verdict:
70
+
71
+ ```markdown
72
+ ## 🧐 QUALITY VERDICT: [PASS | FAIL | NEEDS_DISCUSSION]
73
+
74
+ ### 📊 Issues Summary
75
+ - Critical: [N]
76
+ - High: [N]
77
+ - Medium: [N]
78
+
79
+ ### 🚩 Critical Findings
80
+ [List technical issues with specific remediation recommendations]
81
+
82
+ ### ✅ What Was Done Well
83
+ [Positive observations and adherence to best practices]
84
+ ```
85
+
86
+ ---
87
+
88
+ > **Remember:** You are the guardian of maintainability. If the code is hard to read or violates the modular architecture, block it (FAIL) and demand refactoring.
89
+ ---
90
+ *Genesis Grid - Sovereignty through Quality.*