@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,37 @@
1
+ ---
2
+ name: compliance_check
3
+ description: Compliance verification with legal (GDPR/LGPD) and technical (Pillar VII) standards.
4
+ ---
5
+ ---
6
+ name: compliance_check
7
+ description: |
8
+ Audits code for legal and technical compliance. Ensures data privacy and
9
+ architectural integrity.
10
+
11
+ trigger: |
12
+ - Handling personal data (PII)
13
+ - Security reviews
14
+ - Final validation phase
15
+
16
+ sequence:
17
+ after: [execution]
18
+ before: [confirmation]
19
+ ---
20
+
21
+ # ⚖️ Compliance Check
22
+
23
+ ## 🛡️ 1. Data Privacy (PII)
24
+ - [ ] **GDPR/LGPD:** Personal data is encrypted at rest.
25
+ - [ ] **Logs:** No sensitive data (email, tokens) in logs or error messages.
26
+ - [ ] **Erasure:** "Right to be Forgotten" implemented where applicable.
27
+
28
+ ## 📐 2. Architectural Compliance
29
+ - [ ] **Bridge Pattern:** Modules isolated and communicating via bridge.
30
+ - [ ] **v1.1.0:** Rigorously follows the Zenith Protocol.
31
+
32
+ ## 📦 3. Supply Chain
33
+ - [ ] **Phantom Packs:** No unofficial dependencies detected.
34
+ - [ ] **Audit:** `npm audit` executed and clean.
35
+
36
+ ---
37
+ *Genesis Grid - Built for Compliance.*
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: zenith:coverage_table
3
+ description: Standards and compliance coverage table generation. Use to document systematic validation.
4
+ ---
5
+ # 📊 Zenith Coverage Table
6
+
7
+ This pattern defines the MANDATORY output format for agents comparing codebases against v1.1.0 standards. It ensures every section in the standards is explicitly checked and reported.
8
+
9
+ ---
10
+
11
+ ## ⛔ CRITICAL: All Sections Are Required
12
+
13
+ **This is NON-NEGOTIABLE. Every section listed in the standards MUST be checked.**
14
+
15
+ | Rule | Enforcement |
16
+ |------|-------------|
17
+ | **Every section MUST be checked** | No exceptions. No skipping. |
18
+ | **Every section MUST appear in output table** | Missing row = INCOMPLETE output |
19
+ | **N/A requires explicit reason** | Cannot mark N/A without justification |
20
+
21
+ ---
22
+
23
+ ## 🛠️ Report Format
24
+
25
+ Every compliance analysis must begin with the table below:
26
+
27
+ ```markdown
28
+ ## 📊 Standards Coverage Table
29
+
30
+ **Reference File:** {filename}.md
31
+ **Total Sections Identified:** {N}
32
+
33
+ | # | Section (from Standards) | Status | Evidence / Justification |
34
+ |---|--------------------------|--------|--------------------------|
35
+ | 1 | {Section Name 1} | ✅/⚠️/❌/N/A | file.ts:123 or reason |
36
+ | 2 | {Section Name 2} | ✅/⚠️/❌/N/A | file.ts:456 or reason |
37
+ | N | {Section Name N} | ✅/⚠️/❌/N/A | ... |
38
+
39
+ **Completeness Verification:**
40
+ - Sections in standards: {N}
41
+ | Rows in table: {N}
42
+ | Status: ✅ Complete / ❌ Incomplete
43
+ ```
44
+
45
+ ---
46
+
47
+ ## 💡 Status Legend
48
+
49
+ | Status | Meaning | When to Use |
50
+ |--------|---------|-------------|
51
+ | ✅ Compliant | Codebase follows this standard. | Code matches the expected pattern exactly. |
52
+ | ⚠️ Partial | Some compliance, but there are gaps. | Incomplete implementation or improvements needed. |
53
+ | ❌ Non-Compliant| Does not follow standard or is missing. | Incorrect or non-existent implementation. |
54
+ | N/A | Not applicable to this context. | Standard doesn't make sense for this file type. |
55
+
56
+ ---
57
+ *Genesis Grid - Sovereignty through Systematic Validation.*
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: zenith-pattern-exit_criteria
3
+ description: Task exit criteria definition. Use to ensure nothing was forgotten before the final commit.
4
+ ---
5
+ # Universal Exit Criteria Pattern
6
+
7
+ Add this section to define clear completion:
8
+
9
+ ## Definition of Done
10
+
11
+ You may ONLY claim completion when:
12
+
13
+ □ All checklist items complete
14
+ □ Verification commands run and passed
15
+ □ Output evidence included in response
16
+ □ No "should" or "probably" in message
17
+ □ State tracking shows all phases done
18
+ □ No unresolved blockers
19
+
20
+ **Incomplete checklist = not done**
21
+
22
+ Example claim structure:
23
+ ```
24
+ Status: Task complete
25
+
26
+ Evidence:
27
+ - Tests: 15/15 passing [output shown above]
28
+ - Lint: No errors [output shown above]
29
+ - Build: Success [output shown above]
30
+ - All requirements met [checklist verified]
31
+
32
+ The implementation is complete and verified.
33
+ ```
34
+
35
+ **Never claim done without this structure.**
@@ -0,0 +1,78 @@
1
+ ---
2
+ name: zenith-pattern-failure_recovery
3
+ description: Failure recovery protocol (build/test). Use when encountering blocking errors in the pipeline.
4
+ ---
5
+ # Universal Failure Recovery Pattern
6
+
7
+ Add this section to any skill with potential failure points:
8
+
9
+ ## When You Violate This Skill
10
+
11
+ **Skills can be violated by skipping steps or doing things out of order.**
12
+
13
+ Add skill-specific violation recovery procedures:
14
+
15
+ ### Violation Template
16
+
17
+ ```markdown
18
+ ### Violation: [Common violation name]
19
+
20
+ **How to detect:**
21
+ [What indicates this violation occurred]
22
+
23
+ **Recovery procedure:**
24
+ 1. [Step 1 to recover]
25
+ 2. [Step 2 to recover]
26
+ 3. [Step 3 to recover]
27
+
28
+ **Why recovery matters:**
29
+ [Explanation of why you can't just continue]
30
+ ```
31
+
32
+ **Example:**
33
+
34
+ Violation: Wrote implementation before test (in TDD)
35
+
36
+ **How to detect:**
37
+ - Implementation file exists but no test file
38
+ - Git history shows implementation committed before test
39
+
40
+ **Recovery procedure:**
41
+ 1. Stash or delete the implementation code
42
+ 2. Write the failing test first
43
+ 3. Run test to verify it fails
44
+ 4. Rewrite the implementation to make test pass
45
+
46
+ **Why recovery matters:**
47
+ The test must fail first to prove it actually tests something. If implementation exists first, you can't verify the test works - it might be passing for the wrong reason or not testing anything at all.
48
+
49
+ ---
50
+
51
+ ## When Things Go Wrong
52
+
53
+ **If you get stuck:**
54
+
55
+ 1. **Attempt failed?**
56
+ - Document exactly what happened
57
+ - Include error messages verbatim
58
+ - Note what you tried
59
+
60
+ 2. **Can't proceed?**
61
+ - State blocker explicitly: "Blocked by: [specific issue]"
62
+ - Don't guess or work around
63
+ - Ask for help
64
+
65
+ 3. **Confused?**
66
+ - Say "I don't understand [specific thing]"
67
+ - Don't pretend to understand
68
+ - Research or ask for clarification
69
+
70
+ 4. **Multiple failures?**
71
+ - After 3 attempts: STOP
72
+ - Document all attempts
73
+ - Reassess approach with human partner
74
+
75
+ **Never:** Pretend to succeed when stuck
76
+ **Never:** Continue after 3 failures
77
+ **Never:** Hide confusion or errors
78
+ **Always:** Be explicit about blockage
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: quality_gate
3
+ description: Technical acceptance criteria and quality gates for code, design, and security.
4
+ ---
5
+ ---
6
+ name: quality_gate
7
+ description: |
8
+ Defines hard gates for technical acceptance. Code must pass all gates before being
9
+ considered "Done" according to the GG-Methodology.
10
+
11
+ trigger: |
12
+ - Before marking a task as complete
13
+ - During PR/Code Review
14
+ - During Validation phase (PREVICE)
15
+
16
+ sequence:
17
+ after: [execution]
18
+ before: [confirmation]
19
+ ---
20
+
21
+ # 🚪 Quality Gates
22
+
23
+ ## 🏗️ 1. Engineering Gate
24
+ - [ ] **Build:** `npm run build` passes without errors.
25
+ - [ ] **Lint:** No critical linter warnings.
26
+ - [ ] **Types:** `tsc` passes without type errors.
27
+
28
+ ## 🎨 2. Design Gate
29
+ - [ ] **Tokens:** Exclusive use of HSL tokens. No hardcoded colors.
30
+ - [ ] **Components:** Exclusive use of `@/components/ui/` primitives.
31
+ - [ ] **Aesthetics:** Visuals aligned with Genesis Design System v1.1.0.
32
+
33
+ ## 🛡️ 3. Security Gate
34
+ - [ ] **Secrets:** No secrets or keys in the code.
35
+ - [ ] **OWASP:** Verification against Top 10 risks completed.
36
+ - [ ] **Auth:** Access protection validated.
37
+
38
+ ## 🧪 4. Testing Gate
39
+ - [ ] **Coverage:** 100% coverage on critical logic.
40
+ - [ ] **Stability:** Unit and E2E tests pass.
41
+
42
+ ---
43
+ *Genesis Grid - Zero Defects Policy.*
@@ -0,0 +1,395 @@
1
+ ---
2
+ name: zenith-pattern-standards_workflow
3
+ description: Code and design standards application workflow. Use to ensure consistency in new modules.
4
+ ---
5
+ # Standards Workflow
6
+
7
+ Canonical source for the complete standards loading and handling workflow used by all dev-team agents.
8
+
9
+ ## Overview
10
+
11
+ All dev-team agents MUST follow this workflow before any work:
12
+
13
+ ```text
14
+ ┌─────────────────────────────────────────────────────────────┐
15
+ │ Step 1: Read PROJECT_RULES.md │
16
+ │ ├─ Exists? → Continue to Step 2 │
17
+ │ └─ Missing? → Create PROJECT_RULES.md (see Scenario 1) │
18
+ ├─────────────────────────────────────────────────────────────┤
19
+ │ Step 2: WebFetch Zenith Standards │
20
+ │ ├─ Success? → Continue to Step 3 │
21
+ │ └─ Failed? → HARD BLOCK, report blocker │
22
+ ├─────────────────────────────────────────────────────────────┤
23
+ │ Step 3: Check Existing Code Compliance │
24
+ │ ├─ Compliant? → Proceed with work │
25
+ │ └─ Non-Compliant + No PROJECT_RULES? → HARD BLOCK (Scenario 2) │
26
+ └─────────────────────────────────────────────────────────────┘
27
+ ```
28
+
29
+ ---
30
+
31
+ ## Step 1: Read Local PROJECT_RULES.md (HARD GATE)
32
+
33
+ ```text
34
+ Read docs/PROJECT_RULES.md
35
+ ```
36
+
37
+ **MANDATORY:** Project-specific technical information that must always be considered. Cannot proceed without reading this file.
38
+
39
+ ### What PROJECT_RULES.md Contains (COMPLEMENTARY to Zenith Standards)
40
+
41
+ **⛔ DEDUPLICATION RULE:** PROJECT_RULES.md documents only what Zenith Standards DO NOT cover.
42
+
43
+ | Category | Belongs In | Examples |
44
+ |----------|------------|----------|
45
+ | **Tech stack not in Zenith** | PROJECT_RULES.md | Specific message broker, specific cache, DB if not PostgreSQL |
46
+ | **Non-standard directories** | PROJECT_RULES.md | Pooling workers, MessageBroker consumers, custom workers |
47
+ | **External integrations** | PROJECT_RULES.md | Third-party APIs, webhooks, external services |
48
+ | **Project-specific env vars** | PROJECT_RULES.md | Environment config not covered by Zenith |
49
+ | **Domain terminology** | PROJECT_RULES.md | Technical names of entities/classes in this codebase |
50
+ | Error handling patterns | Zenith Standards | ❌ Do not duplicate |
51
+ | Logging standards | Zenith Standards | ❌ Do not duplicate |
52
+ | Testing patterns | Zenith Standards | ❌ Do not duplicate |
53
+ | Architecture patterns | Zenith Standards | ❌ Do not duplicate |
54
+ | lib-commons, shared packages | Zenith Standards | ❌ Do not duplicate |
55
+ | API directory structure | Zenith Standards | ❌ Do not duplicate |
56
+ | Business rules | Product docs (PRD) | ❌ Does not belong in PROJECT_RULES |
57
+
58
+ ---
59
+
60
+ ## Step 2: WebFetch Zenith Standards (HARD GATE)
61
+
62
+ **⛔ CRITICAL: You CANNOT proceed without successfully loading standards.**
63
+
64
+ **MANDATORY ACTION:** You MUST use the WebFetch tool NOW.
65
+
66
+ | Parameter | Value |
67
+ |-----------|-------|
68
+ | url | See agent-specific URL below |
69
+ | prompt | "Extract all [domain] standards, patterns, and requirements" |
70
+
71
+ **Execute this WebFetch before proceeding.** Do not continue until standards are loaded and understood.
72
+
73
+ ### If WebFetch Fails → STOP IMMEDIATELY
74
+
75
+ **You CANNOT proceed. You CANNOT use "cached knowledge". You CANNOT assume patterns.**
76
+
77
+ ```markdown
78
+ ## Blocker
79
+
80
+ **Status:** BLOCKED - Cannot load standards
81
+ **Reason:** WebFetch failed for [standards_file].md
82
+ **URL Attempted:** [url]
83
+ **Error:** [error message or "timeout"]
84
+
85
+ **Required Action:**
86
+ 1. Retry WebFetch (max 2 retries)
87
+ 2. If still fails → Report to orchestrator
88
+ 3. User must resolve network/access issue
89
+
90
+ **I CANNOT proceed without standards. Inline patterns are FORBIDDEN.**
91
+ ```
92
+
93
+ ### Why This Is Non-Negotiable
94
+
95
+ | Rationalization | Why It's WRONG | Required Action |
96
+ |-----------------|----------------|-----------------|
97
+ | "I know the patterns from training" | Training data may be outdated. Standards evolve. | **MUST WebFetch current standards** |
98
+ | "I'll use general best practices" | General ≠ Zenith standards. Compliance requires specifics. | **MUST WebFetch current standards** |
99
+ | "WebFetch is slow, I'll skip it" | Speed ≠ correctness. Wrong patterns = rework. | **MUST WebFetch, wait for result** |
100
+ | "I'll add the patterns I remember" | Memory ≠ source of truth. Standards file is authoritative. | **MUST WebFetch current standards** |
101
+ | "Standards haven't changed recently" | You don't know this. Always fetch latest. | **MUST WebFetch current standards** |
102
+
103
+ ### Agent-Specific WebFetch URLs
104
+
105
+ | Agent | Standards File | URL |
106
+ |-------|---------------|-----|
107
+ | `genesis:backend-engineer-golang` | golang.md | `https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/golang.md` |
108
+ | `genesis:backend-engineer-typescript` | typescript.md | `https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/typescript.md` |
109
+ | `frontend-bff-engineer-typescript` | typescript.md | `https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/typescript.md` |
110
+ | `genesis:frontend-engineer` | frontend.md | `https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/frontend.md` |
111
+ | `genesis:frontend-designer` | frontend.md | `https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/frontend.md` |
112
+ | `genesis:devops-engineer` | devops.md | `https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/devops.md` |
113
+ | `genesis:sre` | sre.md | `https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/sre.md` |
114
+ | `genesis:qa-analyst` | golang.md or typescript.md | Based on project language (check PROJECT_RULES.md first) |
115
+ | `prompt-quality-reviewer` | N/A | Domain-independent (no standards WebFetch required) |
116
+
117
+ ---
118
+
119
+ ## Step 3: Apply Both Sources (MANDATORY)
120
+
121
+ - **Zenith Standards** = Base technical patterns (error handling, testing, architecture)
122
+ - **PROJECT_RULES.md** = Project tech stack and specific patterns
123
+ - **Both are complementary. Neither excludes the other. Both must be followed.**
124
+
125
+ ### Precedence Rules
126
+
127
+ | Scenario | Resolution |
128
+ |----------|------------|
129
+ | Zenith says X, PROJECT_RULES.md silent | Follow Zenith |
130
+ | Zenith says X, PROJECT_RULES.md says Y | Follow PROJECT_RULES.md (project can override) |
131
+ | Zenith says X, PROJECT_RULES.md says "follow Zenith" | Follow Zenith |
132
+ | Neither covers topic | Ask user (STOP and report blocker) |
133
+
134
+ ---
135
+
136
+ ## Scenario 1: PROJECT_RULES.md Does Not Exist
137
+
138
+ **If `docs/PROJECT_RULES.md` does not exist → Offer to CREATE it with user input.**
139
+
140
+ **Action:** Guide user through PROJECT_RULES.md creation with automatic deduplication against Zenith Standards.
141
+
142
+ ### Creation Flow
143
+
144
+ ```text
145
+ ┌─────────────────────────────────────────────────────────────────────────────┐
146
+ │ Step 1: WebFetch Zenith Standards FIRST │
147
+ │ ├─ Load standards for detected language (Go, TypeScript, etc.) │
148
+ │ └─ This establishes what is ALREADY covered │
149
+ ├─────────────────────────────────────────────────────────────────────────────┤
150
+ │ Step 2: Analyze Codebase for Project-Specific Information │
151
+ │ ├─ Detect tech stack not in Zenith (message brokers, caches, etc.) │
152
+ │ ├─ Detect non-standard directories (workers, consumers, etc.) │
153
+ │ ├─ Detect external integrations (third-party APIs, webhooks) │
154
+ │ └─ Detect domain terminology (entity names, module names) │
155
+ ├─────────────────────────────────────────────────────────────────────────────┤
156
+ │ Step 3: Ask User only for What Cannot Be Detected │
157
+ │ ├─ "Any external APIs or services not visible in code?" │
158
+ │ ├─ "Any specific environment variables needed?" │
159
+ │ └─ "Any planned tech not yet in codebase?" │
160
+ ├─────────────────────────────────────────────────────────────────────────────┤
161
+ │ Step 4: Generate PROJECT_RULES.md (Deduplicated) │
162
+ │ ├─ Header referencing Zenith Standards │
163
+ │ ├─ only project-specific sections │
164
+ │ └─ no content that duplicates Zenith Standards │
165
+ └─────────────────────────────────────────────────────────────────────────────┘
166
+ ```
167
+
168
+ ### PROJECT_RULES.md Template (Deduplicated)
169
+
170
+ ```markdown
171
+ # Project Rules
172
+
173
+ > ⛔ IMPORTANT: Zenith Standards are not automatic. Agents MUST WebFetch them before implementation.
174
+ > This file documents only project-specific information not covered by Zenith Standards.
175
+ >
176
+ > Zenith Standards URLs:
177
+ > - Go: https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/golang.md
178
+ > - TypeScript: https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/typescript.md
179
+ > - Frontend: https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/frontend.md
180
+ > - DevOps: https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/devops.md
181
+ > - SRE: https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/sre.md
182
+
183
+ ## What Zenith Standards Cover (DO not DUPLICATE HERE)
184
+
185
+ The following are defined in Zenith Standards and MUST not be duplicated in this file:
186
+ - Error handling patterns (no panic, wrap errors)
187
+ - Logging standards (structured JSON via lib-commons)
188
+ - Testing patterns (table-driven tests, mocks)
189
+ - Architecture patterns (Hexagonal, Clean Architecture)
190
+ - Observability (OpenTelemetry via lib-commons)
191
+ - lib-commons / lib-common-js usage and patterns
192
+ - API directory structure (Zenith pattern)
193
+ - Database connections (PostgreSQL, MongoDB, Redis via lib-commons)
194
+ - Bootstrap pattern (config.go, service.go, server.go)
195
+
196
+ **Agents MUST WebFetch Zenith Standards and output Standards Coverage Table.**
197
+
198
+ ---
199
+
200
+ ## Tech Stack (Not in Zenith Standards)
201
+
202
+ [only technologies not covered by Zenith Standards]
203
+
204
+ | Technology | Purpose | Notes |
205
+ |------------|---------|-------|
206
+ | [e.g., NATS] | [Message broker] | [Specific config notes] |
207
+ | [e.g., Valkey] | [Cache] | [If not Redis] |
208
+
209
+ ## Non-Standard Directory Structure
210
+
211
+ [only directories that deviate from Zenith's standard API structure]
212
+
213
+ | Directory | Purpose | Pattern |
214
+ |-----------|---------|---------|
215
+ | [e.g., `workers/`] | [Pooling workers] | [Not API, different pattern] |
216
+ | [e.g., `consumers/`] | [Message consumers] | [Async processing] |
217
+
218
+ ## External Integrations
219
+
220
+ [Third-party services specific to this project]
221
+
222
+ | Service | Purpose | Docs |
223
+ |---------|---------|------|
224
+ | [e.g., Stripe] | [Payments] | [Link to integration docs] |
225
+ | [e.g., SendGrid] | [Email] | [Link] |
226
+
227
+ ## Environment Configuration
228
+
229
+ [Project-specific env vars not covered by Zenith's standard config]
230
+
231
+ | Variable | Purpose | Example |
232
+ |----------|---------|---------|
233
+ | [e.g., `STRIPE_API_KEY`] | [Payment processing] | [Format notes] |
234
+
235
+ ## Domain Terminology
236
+
237
+ [Technical names used in this codebase]
238
+
239
+ | Term | Definition | Used In |
240
+ |------|------------|---------|
241
+ | [e.g., `Ledger`] | [Financial record container] | [Models, services] |
242
+
243
+ ---
244
+
245
+ *Generated: [ISO timestamp]*
246
+ *Zenith Standards Version: [version from WebFetch]*
247
+ ```
248
+
249
+ ### Deduplication Validation
250
+
251
+ **Before saving PROJECT_RULES.md, validate no duplication exists:**
252
+
253
+ | If Content Mentions | Action |
254
+ |---------------------|--------|
255
+ | Error handling patterns | ❌ REMOVE - Zenith Standards covers this |
256
+ | Logging format/structure | ❌ REMOVE - Zenith Standards covers this |
257
+ | Testing patterns | ❌ REMOVE - Zenith Standards covers this |
258
+ | lib-commons | ❌ REMOVE - Zenith Standards covers this |
259
+ | Hexagonal/Clean Architecture | ❌ REMOVE - Zenith Standards covers this |
260
+ | OpenTelemetry/tracing | ❌ REMOVE - Zenith Standards covers this |
261
+ | Standard API directory structure | ❌ REMOVE - Zenith Standards covers this |
262
+ | Business rules | ❌ REMOVE - Belongs in PRD/product docs |
263
+
264
+ ### Response Format (When PROJECT_RULES.md Missing)
265
+
266
+ ```markdown
267
+ ## PROJECT_RULES.md Not Found
268
+
269
+ I'll help you create `docs/PROJECT_RULES.md` with only project-specific information.
270
+
271
+ **Zenith Standards already cover:**
272
+ - Error handling, logging, testing patterns
273
+ - Architecture (Hexagonal), observability (OpenTelemetry)
274
+ - lib-commons usage, API structure
275
+
276
+ **I need to document (if applicable):**
277
+ 1. Tech stack not in Zenith (specific message broker, cache, etc.)
278
+ 2. Non-standard directories (workers, consumers, etc.)
279
+ 3. External integrations (third-party APIs)
280
+ 4. Project-specific environment variables
281
+ 5. Domain terminology (entity/module names)
282
+
283
+ **Analyzing codebase...**
284
+ [Analysis results]
285
+
286
+ **Questions (only what I couldn't detect):**
287
+ 1. Any external APIs or services not visible in code?
288
+ 2. Any specific environment variables needed?
289
+ 3. Any planned technology not yet implemented?
290
+ ```
291
+
292
+ ### Anti-Rationalization for Creation
293
+
294
+ | Rationalization | Why It's WRONG | Required Action |
295
+ |-----------------|----------------|-----------------|
296
+ | "Include error handling section anyway" | Zenith Standards covers this. Duplication causes drift. | **REMOVE from PROJECT_RULES.md** |
297
+ | "Add lib-commons usage notes" | Zenith Standards is the source of truth. | **REMOVE from PROJECT_RULES.md** |
298
+ | "Document testing patterns here" | Zenith Standards defines testing patterns. | **REMOVE from PROJECT_RULES.md** |
299
+ | "Include business rules for context" | Business rules belong in PRD, not tech docs. | **REMOVE from PROJECT_RULES.md** |
300
+ | "Better to have everything in one place" | Single source of truth prevents drift. Zenith = patterns. | **Reference Zenith, don't duplicate** |
301
+
302
+ ---
303
+
304
+ ## Scenario 2: PROJECT_RULES.md Missing and Existing Code is Non-Compliant
305
+
306
+ **Scenario:** No PROJECT_RULES.md, existing code violates Zenith Standards.
307
+
308
+ **Action:** STOP. Report blocker. Do not match non-compliant patterns.
309
+
310
+ ### Response Format
311
+
312
+ ```markdown
313
+ ## Blockers
314
+ - **Decision Required:** Project standards missing, existing code non-compliant
315
+ - **Current State:** Existing code uses [specific violations]
316
+ - **Options:**
317
+ 1. Create docs/PROJECT_RULES.md adopting Zenith standards (RECOMMENDED)
318
+ 2. Document existing patterns as intentional project convention (requires explicit approval)
319
+ 3. Migrate existing code to Zenith standards before implementing new features
320
+ - **Recommendation:** Option 1 - Establish standards first, then implement
321
+ - **Awaiting:** User decision on standards establishment
322
+ ```
323
+
324
+ ### Agent-Specific Non-Compliant Signs
325
+
326
+ | Agent Type | Signs of Non-Compliant Code |
327
+ |------------|----------------------------|
328
+ | **Go Backend** | `panic()` for errors, `fmt.Println` instead of structured logging, ignored errors with `result, _ :=`, no context propagation |
329
+ | **TypeScript Backend** | `any` types, no Zod validation, `// @ts-ignore`, missing Result type for errors |
330
+ | **Frontend** | No component tests, inline styles instead of design system, missing accessibility attributes |
331
+ | **DevOps** | Hardcoded secrets, no health checks, missing resource limits |
332
+ | **SRE** | Unstructured logging (plain text), missing trace_id correlation |
333
+ | **QA** | Tests without assertions, mocking implementation details, no edge cases |
334
+
335
+ **You CANNOT implement new code that matches non-compliant patterns. This is non-negotiable.**
336
+
337
+ ---
338
+
339
+ ## Scenario 3: Ask Only When Standards Don't Answer
340
+
341
+ After loading both PROJECT_RULES.md and Zenith Standards:
342
+
343
+ **Ask when standards don't cover:**
344
+ - Database selection (PostgreSQL vs MongoDB)
345
+ - Authentication provider (WorkOS vs Auth0 vs custom)
346
+ - Multi-tenancy approach (schema vs row-level vs database-per-tenant)
347
+ - Message queue selection (RabbitMQ vs Kafka vs NATS)
348
+ - UI framework selection (React vs Vue vs Svelte)
349
+
350
+ **Don't ask (follow standards or best practices):**
351
+ - Error handling patterns → Follow Zenith Standards
352
+ - Testing patterns → Follow Zenith Standards
353
+ - Logging format → Follow Zenith Standards
354
+ - Code structure → Check PROJECT_RULES.md or match compliant existing code
355
+
356
+ **IMPORTANT:** "Match existing code" only applies when existing code IS COMPLIANT. If existing code violates Zenith Standards, DO NOT match it - report blocker instead.
357
+
358
+ ---
359
+
360
+ ## Anti-Rationalization
361
+
362
+ | Rationalization | Why It's WRONG | Required Action |
363
+ |-----------------|----------------|-----------------|
364
+ | "PROJECT_RULES.md not critical" | It defines everything. Cannot assume. | **STOP. Report blocker.** |
365
+ | "Existing code is fine to follow" | Only if compliant. Non-compliant = blocker. | **Verify compliance first** |
366
+ | "I'll just use best practices" | Best practices ≠ project conventions. | **Load PROJECT_RULES.md first** |
367
+ | "Small task, doesn't need rules" | All tasks need rules. Size is irrelevant. | **Load PROJECT_RULES.md first** |
368
+ | "I can infer from codebase" | Inference ≠ explicit standards. | **STOP. Report blocker.** |
369
+ | "I know the standards already" | Knowledge ≠ loading. Load for THIS task. | **Execute WebFetch NOW** |
370
+ | "Standards are too strict" | Standards exist to prevent failures. | **Follow Zenith standards** |
371
+ | "WebFetch failed, use cached knowledge" | Stale knowledge causes drift. | **Report blocker, retry WebFetch** |
372
+
373
+ ---
374
+
375
+ ## How to Reference This File
376
+
377
+ Agents should include:
378
+
379
+ ```markdown
380
+ ## Standards Loading (MANDATORY)
381
+
382
+ See [shared-patterns/standards-workflow.md](../skills/shared-patterns/standards-workflow.md) for:
383
+ - Full loading process (PROJECT_RULES.md + WebFetch)
384
+ - Precedence rules
385
+ - Missing/non-compliant handling
386
+ - Anti-rationalization table
387
+
388
+ **Agent-Specific Configuration:**
389
+
390
+ | Setting | Value |
391
+ |---------|-------|
392
+ | **WebFetch URL** | `https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/{file}.md` |
393
+ | **Standards File** | {file}.md |
394
+ | **Prompt** | "Extract all [domain] standards, patterns, and requirements" |
395
+ ```
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: zenith-pattern-state_tracking
3
+ description: State and complexity tracking. Use in long sessions to prevent AI context loss.
4
+ ---
5
+ # Universal State Tracking Pattern
6
+
7
+ Add this section to any multi-step skill:
8
+
9
+ ## State Tracking (MANDATORY)
10
+
11
+ Create and maintain a status comment:
12
+
13
+ ```
14
+ SKILL: [skill-name]
15
+ PHASE: [current phase/step]
16
+ COMPLETED: [✓ list what's done]
17
+ NEXT: [→ what's next]
18
+ EVIDENCE: [last verification output]
19
+ BLOCKED: [any blockers]
20
+ ```
21
+
22
+ **Update after EACH phase/step.**
23
+
24
+ Example:
25
+ ```
26
+ SKILL: systematic-debugging
27
+ PHASE: 2 - Pattern Analysis
28
+ COMPLETED: ✓ Error reproduced ✓ Recent changes reviewed
29
+ NEXT: → Compare with working examples
30
+ EVIDENCE: Test fails with "KeyError: 'user_id'"
31
+ BLOCKED: None
32
+ ```
33
+
34
+ This comment should be included in EVERY response while using the skill.