@ggailabs/cli-context 0.5.6 → 1.0.1

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.

Potentially problematic release.


This version of @ggailabs/cli-context might be problematic. Click here for more details.

Files changed (282) hide show
  1. package/README.md +25 -181
  2. package/dist/.context/docs/GENESIS_SYSTEM_PROMPT.md +62 -0
  3. package/dist/.context/eng/agents/architect.md +15 -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_reviewer.md +313 -0
  7. package/dist/.context/eng/agents/devops_specialist.md +718 -0
  8. package/dist/.context/eng/agents/frontend_specialist.md +1027 -0
  9. package/dist/.context/eng/agents/qa_specialist.md +1234 -0
  10. package/dist/.context/eng/agents/security_reviewer.md +382 -0
  11. package/dist/.context/eng/agents/ui_specialist.md +16 -0
  12. package/dist/.context/eng/docs/AGENT_HANDOFF_PROMPT.md +44 -0
  13. package/dist/.context/eng/docs/GENESIS_DESIGN_SYSTEM.md +15 -0
  14. package/dist/.context/eng/docs/GG_METHODOLOGY.md +48 -0
  15. package/dist/.context/eng/docs/OPERATIONS_LOG.md +30 -0
  16. package/dist/.context/eng/docs/PROJECT_MAP.md +35 -0
  17. package/dist/.context/eng/docs/standards/devops.md +0 -0
  18. package/dist/.context/eng/docs/standards/frontend.md +0 -0
  19. package/dist/.context/eng/docs/standards/typescript.md +12 -0
  20. package/dist/.context/eng/skills/agent_logging.md +18 -0
  21. package/dist/.context/eng/skills/brainstorming.md +227 -0
  22. package/dist/.context/eng/skills/exploring_codebase.md +1217 -0
  23. package/dist/.context/eng/skills/patterns/compliance_check.md +246 -0
  24. package/dist/.context/eng/skills/patterns/coverage_table.md +401 -0
  25. package/dist/.context/eng/skills/patterns/exit_criteria.md +31 -0
  26. package/dist/.context/eng/skills/patterns/failure_recovery.md +74 -0
  27. package/dist/.context/eng/skills/patterns/quality_gate.md +295 -0
  28. package/dist/.context/eng/skills/patterns/standards_workflow.md +391 -0
  29. package/dist/.context/eng/skills/patterns/state_tracking.md +30 -0
  30. package/dist/.context/eng/skills/patterns/task_tracking.md +38 -0
  31. package/dist/.context/eng/skills/previce.md +45 -0
  32. package/dist/.context/eng/skills/tdd.md +421 -0
  33. package/dist/.context/eng/skills/writing_plans.md +105 -0
  34. package/dist/.context/plans/.gitkeep +0 -0
  35. package/dist/.context/pt-br/agents/architect.md +69 -0
  36. package/dist/.context/pt-br/agents/backend_typescript.md +1000 -0
  37. package/dist/.context/pt-br/agents/bug_hunter.md +49 -0
  38. package/dist/.context/pt-br/agents/code_reviewer.md +313 -0
  39. package/dist/.context/pt-br/agents/devops_specialist.md +718 -0
  40. package/dist/.context/pt-br/agents/frontend_specialist.md +1027 -0
  41. package/dist/.context/pt-br/agents/qa_specialist.md +1234 -0
  42. package/dist/.context/pt-br/agents/security_reviewer.md +382 -0
  43. package/dist/.context/pt-br/agents/ui_specialist.md +55 -0
  44. package/dist/.context/pt-br/docs/AGENT_HANDOFF_PROMPT.md +44 -0
  45. package/dist/.context/pt-br/docs/GENESIS_DESIGN_SYSTEM.md +88 -0
  46. package/dist/.context/pt-br/docs/GG_METHODOLOGY.md +48 -0
  47. package/dist/.context/pt-br/docs/OPERATIONS_LOG.md +30 -0
  48. package/dist/.context/pt-br/docs/PROJECT_MAP.md +37 -0
  49. package/dist/.context/pt-br/docs/standards/devops.md +707 -0
  50. package/dist/.context/pt-br/docs/standards/frontend.md +748 -0
  51. package/dist/.context/pt-br/docs/standards/typescript.md +1150 -0
  52. package/dist/.context/pt-br/skills/agent_logging.md +36 -0
  53. package/dist/.context/pt-br/skills/brainstorming.md +227 -0
  54. package/dist/.context/pt-br/skills/exploring_codebase.md +1217 -0
  55. package/dist/.context/pt-br/skills/patterns/compliance_check.md +246 -0
  56. package/dist/.context/pt-br/skills/patterns/coverage_table.md +401 -0
  57. package/dist/.context/pt-br/skills/patterns/exit_criteria.md +31 -0
  58. package/dist/.context/pt-br/skills/patterns/failure_recovery.md +74 -0
  59. package/dist/.context/pt-br/skills/patterns/quality_gate.md +295 -0
  60. package/dist/.context/pt-br/skills/patterns/standards_workflow.md +391 -0
  61. package/dist/.context/pt-br/skills/patterns/state_tracking.md +30 -0
  62. package/dist/.context/pt-br/skills/patterns/task_tracking.md +38 -0
  63. package/dist/.context/pt-br/skills/previce.md +45 -0
  64. package/dist/.context/pt-br/skills/tdd.md +421 -0
  65. package/dist/.context/pt-br/skills/writing_plans.md +105 -0
  66. package/dist/.context/workflow/.gitkeep +0 -0
  67. package/dist/commands/init.js +140 -0
  68. package/dist/commands/monitor.js +34 -0
  69. package/dist/index.js +20 -568
  70. package/dist/services/monitor-service.js +340 -0
  71. package/dist/services/scaffolder.js +164 -0
  72. package/package.json +16 -58
  73. package/LICENSE +0 -21
  74. package/dist/generators/agents/agentConfig.d.ts +0 -4
  75. package/dist/generators/agents/agentConfig.d.ts.map +0 -1
  76. package/dist/generators/agents/agentConfig.js +0 -180
  77. package/dist/generators/agents/agentConfig.js.map +0 -1
  78. package/dist/generators/agents/agentGenerator.d.ts +0 -9
  79. package/dist/generators/agents/agentGenerator.d.ts.map +0 -1
  80. package/dist/generators/agents/agentGenerator.js +0 -97
  81. package/dist/generators/agents/agentGenerator.js.map +0 -1
  82. package/dist/generators/agents/agentTypes.d.ts +0 -4
  83. package/dist/generators/agents/agentTypes.d.ts.map +0 -1
  84. package/dist/generators/agents/agentTypes.js +0 -25
  85. package/dist/generators/agents/agentTypes.js.map +0 -1
  86. package/dist/generators/agents/index.d.ts +0 -4
  87. package/dist/generators/agents/index.d.ts.map +0 -1
  88. package/dist/generators/agents/index.js +0 -12
  89. package/dist/generators/agents/index.js.map +0 -1
  90. package/dist/generators/agents/templates/index.d.ts +0 -4
  91. package/dist/generators/agents/templates/index.d.ts.map +0 -1
  92. package/dist/generators/agents/templates/index.js +0 -8
  93. package/dist/generators/agents/templates/index.js.map +0 -1
  94. package/dist/generators/agents/templates/indexTemplate.d.ts +0 -3
  95. package/dist/generators/agents/templates/indexTemplate.d.ts.map +0 -1
  96. package/dist/generators/agents/templates/indexTemplate.js +0 -36
  97. package/dist/generators/agents/templates/indexTemplate.js.map +0 -1
  98. package/dist/generators/agents/templates/playbookTemplate.d.ts +0 -4
  99. package/dist/generators/agents/templates/playbookTemplate.d.ts.map +0 -1
  100. package/dist/generators/agents/templates/playbookTemplate.js +0 -99
  101. package/dist/generators/agents/templates/playbookTemplate.js.map +0 -1
  102. package/dist/generators/agents/templates/types.d.ts +0 -14
  103. package/dist/generators/agents/templates/types.d.ts.map +0 -1
  104. package/dist/generators/agents/templates/types.js +0 -3
  105. package/dist/generators/agents/templates/types.js.map +0 -1
  106. package/dist/generators/documentation/documentationGenerator.d.ts +0 -15
  107. package/dist/generators/documentation/documentationGenerator.d.ts.map +0 -1
  108. package/dist/generators/documentation/documentationGenerator.js +0 -188
  109. package/dist/generators/documentation/documentationGenerator.js.map +0 -1
  110. package/dist/generators/documentation/guideRegistry.d.ts +0 -6
  111. package/dist/generators/documentation/guideRegistry.d.ts.map +0 -1
  112. package/dist/generators/documentation/guideRegistry.js +0 -82
  113. package/dist/generators/documentation/guideRegistry.js.map +0 -1
  114. package/dist/generators/documentation/index.d.ts +0 -2
  115. package/dist/generators/documentation/index.d.ts.map +0 -1
  116. package/dist/generators/documentation/index.js +0 -6
  117. package/dist/generators/documentation/index.js.map +0 -1
  118. package/dist/generators/documentation/templates/apiReferenceTemplate.d.ts +0 -2
  119. package/dist/generators/documentation/templates/apiReferenceTemplate.d.ts.map +0 -1
  120. package/dist/generators/documentation/templates/apiReferenceTemplate.js +0 -490
  121. package/dist/generators/documentation/templates/apiReferenceTemplate.js.map +0 -1
  122. package/dist/generators/documentation/templates/architectureTemplate.d.ts +0 -3
  123. package/dist/generators/documentation/templates/architectureTemplate.d.ts.map +0 -1
  124. package/dist/generators/documentation/templates/architectureTemplate.js +0 -66
  125. package/dist/generators/documentation/templates/architectureTemplate.js.map +0 -1
  126. package/dist/generators/documentation/templates/common.d.ts +0 -7
  127. package/dist/generators/documentation/templates/common.d.ts.map +0 -1
  128. package/dist/generators/documentation/templates/common.js +0 -58
  129. package/dist/generators/documentation/templates/common.js.map +0 -1
  130. package/dist/generators/documentation/templates/dataFlowTemplate.d.ts +0 -3
  131. package/dist/generators/documentation/templates/dataFlowTemplate.d.ts.map +0 -1
  132. package/dist/generators/documentation/templates/dataFlowTemplate.js +0 -40
  133. package/dist/generators/documentation/templates/dataFlowTemplate.js.map +0 -1
  134. package/dist/generators/documentation/templates/developmentWorkflowTemplate.d.ts +0 -2
  135. package/dist/generators/documentation/templates/developmentWorkflowTemplate.d.ts.map +0 -1
  136. package/dist/generators/documentation/templates/developmentWorkflowTemplate.js +0 -44
  137. package/dist/generators/documentation/templates/developmentWorkflowTemplate.js.map +0 -1
  138. package/dist/generators/documentation/templates/glossaryTemplate.d.ts +0 -3
  139. package/dist/generators/documentation/templates/glossaryTemplate.d.ts.map +0 -1
  140. package/dist/generators/documentation/templates/glossaryTemplate.js +0 -41
  141. package/dist/generators/documentation/templates/glossaryTemplate.js.map +0 -1
  142. package/dist/generators/documentation/templates/index.d.ts +0 -15
  143. package/dist/generators/documentation/templates/index.d.ts.map +0 -1
  144. package/dist/generators/documentation/templates/index.js +0 -30
  145. package/dist/generators/documentation/templates/index.js.map +0 -1
  146. package/dist/generators/documentation/templates/indexTemplate.d.ts +0 -3
  147. package/dist/generators/documentation/templates/indexTemplate.d.ts.map +0 -1
  148. package/dist/generators/documentation/templates/indexTemplate.js +0 -42
  149. package/dist/generators/documentation/templates/indexTemplate.js.map +0 -1
  150. package/dist/generators/documentation/templates/migrationTemplate.d.ts +0 -2
  151. package/dist/generators/documentation/templates/migrationTemplate.d.ts.map +0 -1
  152. package/dist/generators/documentation/templates/migrationTemplate.js +0 -422
  153. package/dist/generators/documentation/templates/migrationTemplate.js.map +0 -1
  154. package/dist/generators/documentation/templates/onboardingTemplate.d.ts +0 -2
  155. package/dist/generators/documentation/templates/onboardingTemplate.d.ts.map +0 -1
  156. package/dist/generators/documentation/templates/onboardingTemplate.js +0 -431
  157. package/dist/generators/documentation/templates/onboardingTemplate.js.map +0 -1
  158. package/dist/generators/documentation/templates/projectOverviewTemplate.d.ts +0 -3
  159. package/dist/generators/documentation/templates/projectOverviewTemplate.d.ts.map +0 -1
  160. package/dist/generators/documentation/templates/projectOverviewTemplate.js +0 -65
  161. package/dist/generators/documentation/templates/projectOverviewTemplate.js.map +0 -1
  162. package/dist/generators/documentation/templates/securityTemplate.d.ts +0 -2
  163. package/dist/generators/documentation/templates/securityTemplate.d.ts.map +0 -1
  164. package/dist/generators/documentation/templates/securityTemplate.js +0 -39
  165. package/dist/generators/documentation/templates/securityTemplate.js.map +0 -1
  166. package/dist/generators/documentation/templates/testingTemplate.d.ts +0 -2
  167. package/dist/generators/documentation/templates/testingTemplate.d.ts.map +0 -1
  168. package/dist/generators/documentation/templates/testingTemplate.js +0 -45
  169. package/dist/generators/documentation/templates/testingTemplate.js.map +0 -1
  170. package/dist/generators/documentation/templates/toolingTemplate.d.ts +0 -2
  171. package/dist/generators/documentation/templates/toolingTemplate.d.ts.map +0 -1
  172. package/dist/generators/documentation/templates/toolingTemplate.js +0 -42
  173. package/dist/generators/documentation/templates/toolingTemplate.js.map +0 -1
  174. package/dist/generators/documentation/templates/troubleshootingTemplate.d.ts +0 -2
  175. package/dist/generators/documentation/templates/troubleshootingTemplate.d.ts.map +0 -1
  176. package/dist/generators/documentation/templates/troubleshootingTemplate.js +0 -292
  177. package/dist/generators/documentation/templates/troubleshootingTemplate.js.map +0 -1
  178. package/dist/generators/documentation/templates/types.d.ts +0 -23
  179. package/dist/generators/documentation/templates/types.d.ts.map +0 -1
  180. package/dist/generators/documentation/templates/types.js +0 -3
  181. package/dist/generators/documentation/templates/types.js.map +0 -1
  182. package/dist/generators/plans/index.d.ts +0 -2
  183. package/dist/generators/plans/index.d.ts.map +0 -1
  184. package/dist/generators/plans/index.js +0 -6
  185. package/dist/generators/plans/index.js.map +0 -1
  186. package/dist/generators/plans/planGenerator.d.ts +0 -22
  187. package/dist/generators/plans/planGenerator.d.ts.map +0 -1
  188. package/dist/generators/plans/planGenerator.js +0 -109
  189. package/dist/generators/plans/planGenerator.js.map +0 -1
  190. package/dist/generators/plans/templates/indexTemplate.d.ts +0 -3
  191. package/dist/generators/plans/templates/indexTemplate.d.ts.map +0 -1
  192. package/dist/generators/plans/templates/indexTemplate.js +0 -37
  193. package/dist/generators/plans/templates/indexTemplate.js.map +0 -1
  194. package/dist/generators/plans/templates/planTemplate.d.ts +0 -3
  195. package/dist/generators/plans/templates/planTemplate.d.ts.map +0 -1
  196. package/dist/generators/plans/templates/planTemplate.js +0 -166
  197. package/dist/generators/plans/templates/planTemplate.js.map +0 -1
  198. package/dist/generators/plans/templates/types.d.ts +0 -19
  199. package/dist/generators/plans/templates/types.d.ts.map +0 -1
  200. package/dist/generators/plans/templates/types.js +0 -3
  201. package/dist/generators/plans/templates/types.js.map +0 -1
  202. package/dist/generators/shared/contextGenerator.d.ts +0 -7
  203. package/dist/generators/shared/contextGenerator.d.ts.map +0 -1
  204. package/dist/generators/shared/contextGenerator.js +0 -13
  205. package/dist/generators/shared/contextGenerator.js.map +0 -1
  206. package/dist/generators/shared/directoryTemplateHelpers.d.ts +0 -2
  207. package/dist/generators/shared/directoryTemplateHelpers.d.ts.map +0 -1
  208. package/dist/generators/shared/directoryTemplateHelpers.js +0 -12
  209. package/dist/generators/shared/directoryTemplateHelpers.js.map +0 -1
  210. package/dist/generators/shared/generatorUtils.d.ts +0 -16
  211. package/dist/generators/shared/generatorUtils.d.ts.map +0 -1
  212. package/dist/generators/shared/generatorUtils.js +0 -119
  213. package/dist/generators/shared/generatorUtils.js.map +0 -1
  214. package/dist/generators/shared/index.d.ts +0 -4
  215. package/dist/generators/shared/index.d.ts.map +0 -1
  216. package/dist/generators/shared/index.js +0 -10
  217. package/dist/generators/shared/index.js.map +0 -1
  218. package/dist/index.d.ts +0 -9
  219. package/dist/index.d.ts.map +0 -1
  220. package/dist/index.js.map +0 -1
  221. package/dist/prompts/defaults.d.ts +0 -3
  222. package/dist/prompts/defaults.d.ts.map +0 -1
  223. package/dist/prompts/defaults.js +0 -95
  224. package/dist/prompts/defaults.js.map +0 -1
  225. package/dist/services/baseLLMClient.d.ts +0 -12
  226. package/dist/services/baseLLMClient.d.ts.map +0 -1
  227. package/dist/services/baseLLMClient.js +0 -80
  228. package/dist/services/baseLLMClient.js.map +0 -1
  229. package/dist/services/fill/fillService.d.ts +0 -46
  230. package/dist/services/fill/fillService.d.ts.map +0 -1
  231. package/dist/services/fill/fillService.js +0 -254
  232. package/dist/services/fill/fillService.js.map +0 -1
  233. package/dist/services/init/initService.d.ts +0 -37
  234. package/dist/services/init/initService.d.ts.map +0 -1
  235. package/dist/services/init/initService.js +0 -167
  236. package/dist/services/init/initService.js.map +0 -1
  237. package/dist/services/llmClientFactory.d.ts +0 -8
  238. package/dist/services/llmClientFactory.d.ts.map +0 -1
  239. package/dist/services/llmClientFactory.js +0 -23
  240. package/dist/services/llmClientFactory.js.map +0 -1
  241. package/dist/services/openRouterClient.d.ts +0 -9
  242. package/dist/services/openRouterClient.d.ts.map +0 -1
  243. package/dist/services/openRouterClient.js +0 -49
  244. package/dist/services/openRouterClient.js.map +0 -1
  245. package/dist/services/plan/planService.d.ts +0 -57
  246. package/dist/services/plan/planService.d.ts.map +0 -1
  247. package/dist/services/plan/planService.js +0 -334
  248. package/dist/services/plan/planService.js.map +0 -1
  249. package/dist/services/shared/llmConfig.d.ts +0 -22
  250. package/dist/services/shared/llmConfig.d.ts.map +0 -1
  251. package/dist/services/shared/llmConfig.js +0 -38
  252. package/dist/services/shared/llmConfig.js.map +0 -1
  253. package/dist/types.d.ts +0 -65
  254. package/dist/types.d.ts.map +0 -1
  255. package/dist/types.js +0 -3
  256. package/dist/types.js.map +0 -1
  257. package/dist/utils/cliUI.d.ts +0 -27
  258. package/dist/utils/cliUI.d.ts.map +0 -1
  259. package/dist/utils/cliUI.js +0 -252
  260. package/dist/utils/cliUI.js.map +0 -1
  261. package/dist/utils/fileMapper.d.ts +0 -11
  262. package/dist/utils/fileMapper.d.ts.map +0 -1
  263. package/dist/utils/fileMapper.js +0 -146
  264. package/dist/utils/fileMapper.js.map +0 -1
  265. package/dist/utils/gitService.d.ts +0 -50
  266. package/dist/utils/gitService.d.ts.map +0 -1
  267. package/dist/utils/gitService.js +0 -470
  268. package/dist/utils/gitService.js.map +0 -1
  269. package/dist/utils/i18n.d.ts +0 -171
  270. package/dist/utils/i18n.d.ts.map +0 -1
  271. package/dist/utils/i18n.js +0 -381
  272. package/dist/utils/i18n.js.map +0 -1
  273. package/dist/utils/promptLoader.d.ts +0 -12
  274. package/dist/utils/promptLoader.d.ts.map +0 -1
  275. package/dist/utils/promptLoader.js +0 -81
  276. package/dist/utils/promptLoader.js.map +0 -1
  277. package/dist/utils/versionChecker.d.ts +0 -15
  278. package/dist/utils/versionChecker.d.ts.map +0 -1
  279. package/dist/utils/versionChecker.js +0 -49
  280. package/dist/utils/versionChecker.js.map +0 -1
  281. package/prompts/update_plan_prompt.md +0 -41
  282. package/prompts/update_scaffold_prompt.md +0 -47
@@ -0,0 +1,246 @@
1
+ # Standards Compliance Mode Detection
2
+
3
+ Canonical source for Standards Compliance detection logic used by all dev-team agents.
4
+
5
+ ---
6
+
7
+ ## ⛔ CRITICAL: Standards Compliance is always Required for Implementation
8
+
9
+ **Standards Compliance is not optional. It is MANDATORY for all implementation agents.**
10
+
11
+ | Context | Standards Compliance | Rationale |
12
+ |---------|---------------------|-----------|
13
+ | **Implementation (TDD-GREEN)** | **always REQUIRED** | Agent MUST output Standards Coverage Table |
14
+ | **Analysis (MODE: ANALYSIS only)** | **always REQUIRED** | Agent MUST output Standards Coverage Table + Findings |
15
+ | **Validation (SRE, QA)** | **always REQUIRED** | Agent MUST verify against standards |
16
+
17
+ **There is no context where an implementation agent can skip Standards Compliance.**
18
+
19
+ ---
20
+
21
+ ## Trigger Conditions
22
+
23
+ ### always Required (Implementation Context)
24
+
25
+ **These agents MUST always output Standards Coverage Table:**
26
+
27
+ | Agent | Standards File | When |
28
+ |-------|---------------|------|
29
+ | `genesis:backend-engineer-golang` | golang.md | any implementation task |
30
+ | `genesis:backend-engineer-typescript` | typescript.md | any implementation task |
31
+ | `frontend-bff-engineer-typescript` | typescript.md | any implementation task |
32
+ | `genesis:frontend-engineer` | frontend.md | any implementation task |
33
+ | `genesis:devops-engineer` | devops.md | any artifact creation |
34
+ | `genesis:sre` | sre.md | any validation task |
35
+ | `genesis:qa-analyst` | golang.md/typescript.md | any testing task |
36
+
37
+ **⛔ HARD GATE:** If agent does not output Standards Coverage Table → Output is INCOMPLETE → Orchestrator MUST re-dispatch.
38
+
39
+ ### Additional Triggers (Analysis Context)
40
+
41
+ These patterns trigger **detailed findings** in addition to Standards Coverage Table:
42
+
43
+ | Detection Pattern | Examples |
44
+ |------------------|----------|
45
+ | Exact match | `**MODE: ANALYSIS only**` |
46
+ | Case variations | `MODE: Analysis Only`, `mode: analysis only`, `**mode: ANALYSIS only**` |
47
+ | Partial markers | `ANALYSIS MODE`, `analysis-only`, `analyze only`, `MODE ANALYSIS` |
48
+ | Context clues | Invoked from `genesis:dev-refactor` skill |
49
+ | Explicit request | "compare against standards", "audit compliance", "check against Ring standards" |
50
+
51
+ ## Detection Logic
52
+
53
+ ```python
54
+ def get_standards_compliance_mode(prompt: str, context: dict) -> str:
55
+ """
56
+ Returns:
57
+ - "FULL": Standards Coverage Table + Detailed Findings (analysis mode)
58
+ - "TABLE_ONLY": Standards Coverage Table only (implementation mode)
59
+ - "TABLE_ONLY" is the MINIMUM - never returns "NONE"
60
+ """
61
+ # Analysis mode patterns
62
+ analysis_patterns = [
63
+ "mode: analysis only",
64
+ "analysis mode",
65
+ "analysis-only",
66
+ "analyze only",
67
+ "compare against standards",
68
+ "audit compliance",
69
+ "check against ring"
70
+ ]
71
+ prompt_lower = prompt.lower()
72
+
73
+ # Check for analysis mode
74
+ if any(p in prompt_lower for p in analysis_patterns):
75
+ return "FULL"
76
+
77
+ # Check invocation context
78
+ if context.get("invocation_source") == "genesis:dev-refactor":
79
+ return "FULL"
80
+
81
+ # Default: TABLE_ONLY (Standards Coverage Table is always required)
82
+ return "TABLE_ONLY"
83
+ ```
84
+
85
+ ## When Uncertain
86
+
87
+ If detection is ambiguous, output FULL compliance (table + findings). Better to over-report than under-report.
88
+
89
+ ## When Mode is Detected, Agent MUST
90
+
91
+ 1. **WebFetch** the Ring standards file for their language/domain
92
+ 2. **Read** `docs/PROJECT_RULES.md` if it exists in the target codebase
93
+ 3. **Include** a `## Standards Compliance` section in output with comparison table
94
+ 4. **CANNOT skip** - this is a HARD GATE, not optional
95
+
96
+ ## MANDATORY Output Table Format
97
+
98
+ ```markdown
99
+ | Category | Current Pattern | Ring Standard | Status | File/Location |
100
+ |----------|----------------|---------------|--------|---------------|
101
+ | [category] | [what codebase does] | [what standard requires] | ✅/⚠️/❌ | [file:line] |
102
+ ```
103
+
104
+ ## Status Legend
105
+
106
+ - ✅ Compliant - Matches Ring standard
107
+ - ⚠️ Partial - Some compliance, needs improvement
108
+ - ❌ Non-Compliant - Does not follow standard
109
+ - N/A - Not applicable (with reason)
110
+
111
+ ## Standards Coverage Table (genesis:dev-refactor context)
112
+
113
+ **Detection:** This section applies when prompt contains `**MODE: ANALYSIS only**`
114
+
115
+ **Inputs (provided by genesis:dev-refactor):**
116
+
117
+ | Input | Source | Contains |
118
+ |-------|--------|----------|
119
+ | Ring Standards | WebFetch | Sections to check (## headers) |
120
+ | codebase-report.md | Provided path | Current architecture, patterns, code snippets |
121
+ | PROJECT_RULES.md | Provided path | Project-specific conventions |
122
+
123
+ **Outputs (expected by genesis:dev-refactor):**
124
+ 1. Standards Coverage Table (every section enumerated)
125
+ 2. Detailed findings in FINDING-XXX format for ⚠️/❌ items
126
+
127
+ **HARD GATE:** When invoked from genesis:dev-refactor skill, before outputting detailed findings, you MUST output a Standards Coverage Table.
128
+
129
+ **Process:**
130
+ 1. **Parse the WebFetch result** - Extract all `## Section` headers from standards file
131
+ 2. **Count total sections found** - Record the number
132
+ 3. **For each section** - Determine status (✅ Compliant, ⚠️ Partial, ❌ Non-Compliant, or N/A with reason)
133
+ 4. **Output table** - MUST have one row per section
134
+ 5. **Verify completeness** - Table rows MUST equal sections found
135
+
136
+ ---
137
+
138
+ ## ⛔ CRITICAL: Section Names MUST Match Coverage Table EXACTLY
139
+
140
+ **You MUST use section names from `standards-coverage-table.md`. You CANNOT invent your own.**
141
+
142
+ ### FORBIDDEN Actions
143
+
144
+ ```
145
+ ❌ Inventing section names ("Security", "Go Version", "Code Quality")
146
+ ❌ Merging sections ("Error Handling & Logging" instead of separate rows)
147
+ ❌ Renaming sections ("Config" instead of "Configuration Loading")
148
+ ❌ Skipping sections not found in codebase
149
+ ❌ Adding sections not in coverage table
150
+ ```
151
+
152
+ ### REQUIRED Actions
153
+
154
+ ```
155
+ ✅ Use EXACT section names from standards-coverage-table.md
156
+ ✅ Output all sections listed in coverage table for your agent type
157
+ ✅ Mark missing/not-applicable sections as "N/A" with reason
158
+ ✅ One row per section - no merging
159
+ ```
160
+
161
+ ### Section Name Validation
162
+
163
+ **For golang.md, section names MUST be:**
164
+ - Version, Core Dependency: lib-commons, Frameworks & Libraries, Configuration Loading, Telemetry & Observability, Bootstrap Pattern, Data Transformation: ToEntity/FromEntity, Error Codes Convention, Error Handling, Function Design, Pagination Patterns, Testing Patterns, Logging Standards, Linting, Architecture Patterns, Directory Structure, Concurrency Patterns, RabbitMQ Worker Pattern
165
+
166
+ **not:**
167
+ - ❌ "Error Handling" (missing "Error Codes Convention" as separate row)
168
+ - ❌ "Logging" (should be "Logging Standards")
169
+ - ❌ "Configuration" (should be "Configuration Loading")
170
+ - ❌ "Security" (not a section in golang.md)
171
+ - ❌ "Bootstrap" (should be "Bootstrap Pattern")
172
+
173
+ ### Anti-Rationalization for Section Names
174
+
175
+ | Rationalization | Why It's WRONG | Required Action |
176
+ |-----------------|----------------|-----------------|
177
+ | "My section name is clearer" | Consistency > clarity. Coverage table is the contract. | **Use EXACT names from coverage table** |
178
+ | "I combined related sections" | Each section = one row. Merging loses traceability. | **One row per section, no merging** |
179
+ | "This section doesn't apply" | Report as N/A with reason. Never skip silently. | **Include row with N/A status** |
180
+ | "I added a useful section" | You don't decide sections. Coverage table does. | **Only sections from coverage table** |
181
+ | "The codebase uses different terminology" | Standards use Ring terminology. Map codebase terms to standard terms. | **Use standard section names** |
182
+
183
+ ## MANDATORY: Quote Standards from WebFetch in Findings
184
+
185
+ **For every ⚠️ Partial or ❌ Non-Compliant finding, you MUST:**
186
+
187
+ 1. **Quote the codebase pattern** from codebase-report.md (what exists)
188
+ 2. **Quote the Ring standard** from WebFetch result (what's expected)
189
+ 3. **Explain the gap** (what needs improvement)
190
+
191
+ **Output Format for Non-Compliant Findings:**
192
+
193
+ ```markdown
194
+ ### FINDING: [Category Name]
195
+
196
+ **Status:** ⚠️ Partial / ❌ Non-Compliant
197
+ **Location:** [file:line from codebase-report.md]
198
+ **Severity:** CRITICAL / HIGH / MEDIUM / LOW
199
+
200
+ **Current (from codebase-report.md):**
201
+ [Quote the actual code/pattern from codebase-report.md]
202
+
203
+ **Expected (from Ring Standard):**
204
+ [Quote the relevant code/pattern from WebFetch result]
205
+
206
+ **Gap Analysis:**
207
+ - What is different
208
+ - What needs to be improved
209
+ - Standard reference: {standards-file}.md → [Section Name]
210
+ ```
211
+
212
+ **⛔ HARD GATE: You MUST quote from BOTH sources (codebase-report.md and WebFetch result).**
213
+
214
+ ## Anti-Rationalization
215
+
216
+ See [shared-anti-rationalization.md](shared-anti-rationalization.md) for universal agent anti-rationalizations.
217
+
218
+ | Rationalization | Why It's WRONG | Required Action |
219
+ |-----------------|----------------|-----------------|
220
+ | "Detection wasn't exact match" | Partial matches and context clues count. | **Include Standards Compliance section** |
221
+ | "Codebase already compliant" | Assumption ≠ verification. Check every section. | **Output full Standards Coverage Table** |
222
+ | "Only relevant sections matter" | You don't decide relevance. Standards file does. | **Check all ## sections from WebFetch** |
223
+ | "Summary is enough" | Detailed quotes are MANDATORY for findings. | **Quote from BOTH sources** |
224
+ | "WebFetch failed, skip compliance" | STOP and report blocker. Cannot proceed without standards. | **Report blocker, DO NOT skip** |
225
+
226
+ ## How to Reference This File
227
+
228
+ Agents should include:
229
+
230
+ ```markdown
231
+ ## Standards Compliance (always REQUIRED)
232
+
233
+ See [shared-patterns/standards-compliance-detection.md](../skills/shared-patterns/standards-compliance-detection.md) for:
234
+ - Standards Compliance is MANDATORY for all implementation agents
235
+ - MANDATORY output table format (Standards Coverage Table)
236
+ - Additional findings format for analysis mode
237
+ - Anti-rationalization rules
238
+
239
+ **Agent-Specific Standards:**
240
+ - WebFetch URL: `https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/{file}.md`
241
+ - Sections to check: See [standards-coverage-table.md](../skills/shared-patterns/standards-coverage-table.md)
242
+
243
+ **⛔ Standards Coverage Table is always required. No exceptions.**
244
+ - Implementation mode: Output Standards Coverage Table
245
+ - Analysis mode: Output Standards Coverage Table + Detailed Findings
246
+ ```
@@ -0,0 +1,401 @@
1
+ # Standards Coverage Table Pattern
2
+
3
+ This file defines the MANDATORY output format for agents comparing codebases against Ring standards. It ensures every section in the standards is explicitly checked and reported.
4
+
5
+ ---
6
+
7
+ ## ⛔ CRITICAL: All Sections Are Required
8
+
9
+ **This is NON-NEGOTIABLE. Every section listed in the Agent → Standards Section Index below MUST be checked.**
10
+
11
+ | Rule | Enforcement |
12
+ |------|-------------|
13
+ | **Every section MUST be checked** | No exceptions. No skipping. |
14
+ | **Every section MUST appear in output table** | Missing row = INCOMPLETE output |
15
+ | **Subsections are INCLUDED** | If "Containers" is listed, all content (Dockerfile, Docker Compose) MUST be checked |
16
+ | **N/A requires explicit reason** | Cannot mark N/A without justification |
17
+
18
+ **If you skip any section → Your output is REJECTED. Start over.**
19
+
20
+ **If you invent section names → Your output is REJECTED. Start over.**
21
+
22
+ ---
23
+
24
+ ## ⛔ CRITICAL: Section Names Are Not Negotiable
25
+
26
+ **You MUST use the EXACT section names from this file. You CANNOT:**
27
+
28
+ | FORBIDDEN | Example | Why Wrong |
29
+ |-----------|---------|-----------|
30
+ | Invent names | "Security", "Code Quality" | Not in coverage table |
31
+ | Rename sections | "Config" instead of "Configuration Loading" | Breaks traceability |
32
+ | Merge sections | "Error Handling & Logging" | Each section = one row |
33
+ | Use abbreviations | "Bootstrap" instead of "Bootstrap Pattern" | Must match exactly |
34
+ | Skip sections | Omitting "RabbitMQ Worker Pattern" | Mark N/A instead |
35
+
36
+ **Your output table section names MUST match the "Section to Check" column below EXACTLY.**
37
+
38
+ ---
39
+
40
+ ## Why This Pattern Exists
41
+
42
+ **Problem:** Agents might skip sections from standards files, either by:
43
+ - Only checking "main" sections
44
+ - Assuming some sections don't apply
45
+ - Not enumerating all sections systematically
46
+ - Skipping subsections (e.g., checking Dockerfile but skipping Docker Compose)
47
+
48
+ **Solution:** Require a completeness table that MUST list every section from the WebFetch result with explicit status. All content within each section MUST be evaluated.
49
+
50
+ ---
51
+
52
+ ## MANDATORY: Standards Coverage Table
53
+
54
+ ### ⛔ HARD GATE: Before Outputting Findings
55
+
56
+ **You MUST output a Standards Coverage Table that enumerates every section from the WebFetch result.**
57
+
58
+ **REQUIRED: When checking a section, you MUST check all subsections and patterns within it.**
59
+
60
+ | Section | What MUST Be Checked |
61
+ |---------|---------------------|
62
+ | Containers | Dockerfile patterns and Docker Compose patterns |
63
+ | Infrastructure as Code | Terraform structure and state management and modules |
64
+ | Observability | Logging and Tracing (structured JSON logs, OpenTelemetry spans) |
65
+ | Security | Secrets management and Network policies |
66
+
67
+ ### Process
68
+
69
+ 1. **Parse the WebFetch result** - Extract all `## Section` headers from the standards file
70
+ 2. **Count sections** - Record total number of sections found
71
+ 3. **For each section** - Determine status and evidence
72
+ 4. **Output table** - MUST have one row per section
73
+ 5. **Verify completeness** - Table row count MUST equal section count
74
+
75
+ ### Output Format
76
+
77
+ ```markdown
78
+ ## Standards Coverage Table
79
+
80
+ **Standards File:** {filename}.md (from WebFetch)
81
+ **Total Sections Found:** {N}
82
+ **Table Rows:** {N} (MUST match)
83
+
84
+ | # | Section (from WebFetch) | Status | Evidence |
85
+ |---|-------------------------|--------|----------|
86
+ | 1 | {Section 1 header} | ✅/⚠️/❌/N/A | file:line or reason |
87
+ | 2 | {Section 2 header} | ✅/⚠️/❌/N/A | file:line or reason |
88
+ | ... | ... | ... | ... |
89
+ | N | {Section N header} | ✅/⚠️/❌/N/A | file:line or reason |
90
+
91
+ **Completeness Verification:**
92
+ - Sections in standards: {N}
93
+ - Rows in table: {N}
94
+ - Status: ✅ Complete / ❌ Incomplete
95
+ ```
96
+
97
+ ### Status Legend
98
+
99
+ | Status | Meaning | When to Use |
100
+ |--------|---------|-------------|
101
+ | ✅ Compliant | Codebase follows this standard | Code matches expected pattern |
102
+ | ⚠️ Partial | Some compliance, needs improvement | Partially implemented or minor gaps |
103
+ | ❌ Non-Compliant | Does not follow standard | Missing or incorrect implementation |
104
+ | N/A | Not applicable to this codebase | Standard doesn't apply (with reason) |
105
+
106
+ ---
107
+
108
+ ## ⛔ CRITICAL: Standards Boundary Enforcement
109
+
110
+ **You MUST check only what the standards file explicitly defines. Never invent requirements.**
111
+
112
+ See [shared-patterns/standards-boundary-enforcement.md](standards-boundary-enforcement.md) for:
113
+ - Complete list of what IS and IS not required per agent
114
+ - Agent-specific requirement boundaries
115
+ - Self-verification checklist
116
+
117
+ **⛔ HARD GATE:** Before flagging any item as non-compliant:
118
+ 1. Verify the requirement EXISTS in the WebFetch result
119
+ 2. Quote the EXACT standard that requires it
120
+ 3. If you cannot quote it → Do not flag it
121
+
122
+ ---
123
+
124
+ ## Anti-Rationalization Table
125
+
126
+ | Rationalization | Why It's WRONG | Required Action |
127
+ |-----------------|----------------|-----------------|
128
+ | "I checked the important sections" | You don't decide importance. All sections MUST be checked. | **List every section in table** |
129
+ | "Some sections obviously don't apply" | Report them as N/A with reason. Never skip silently. | **Include in table with N/A status** |
130
+ | "The table would be too long" | Completeness > brevity. Every section MUST be visible. | **Output full table regardless of length** |
131
+ | "I already mentioned these in findings" | Findings ≠ Coverage table. Both are REQUIRED. | **Output table BEFORE detailed findings** |
132
+ | "WebFetch result was unclear" | Parse all `## ` headers. If truly unclear, STOP and report blocker. | **Report blocker or parse all headers** |
133
+ | "I checked Dockerfile, that covers Containers" | Containers = Dockerfile + Docker Compose. Partial ≠ Complete. | **Check all subsections within each section** |
134
+ | "Project doesn't use Docker Compose" | Report as N/A with evidence. Never assume. VERIFY first. | **Search for docker-compose.yml, report finding** |
135
+ | "Only checking what exists in codebase" | Standards define what SHOULD exist. Missing = Non-Compliant. | **Report missing patterns as ❌ Non-Compliant** |
136
+ | "My section name is clearer" | Consistency > clarity. Coverage table names are the contract. | **Use EXACT names from coverage table** |
137
+ | "I combined related sections for brevity" | Each section = one row. Merging loses traceability. | **One row per section, no merging** |
138
+ | "I added a useful section like 'Security'" | You don't decide sections. Coverage table does. | **Only output sections from coverage table** |
139
+ | "'Logging' is the same as 'Logging Standards'" | Names must match EXACTLY. Variations break automation. | **Use exact string from coverage table** |
140
+
141
+ ---
142
+
143
+ ## Completeness Check (SELF-VERIFICATION)
144
+
145
+ **Before submitting output, verify:**
146
+
147
+ ```text
148
+ 1. Did I extract all ## headers from WebFetch result? [ ]
149
+ 2. Does my table have exactly that many rows? [ ]
150
+ 3. Does every row have a status (✅/⚠️/❌/N/A)? [ ]
151
+ 4. Does every ⚠️/❌ have evidence (file:line)? [ ]
152
+ 5. Does every N/A have a reason? [ ]
153
+
154
+ If any checkbox is unchecked → FIX before submitting.
155
+ ```
156
+
157
+ ---
158
+
159
+ ## Integration with Findings
160
+
161
+ **Order of output:**
162
+
163
+ 1. **Standards Coverage Table** (this pattern) - Shows completeness
164
+ 2. **Detailed Findings** - Only for ⚠️ Partial and ❌ Non-Compliant items
165
+
166
+ The Coverage Table ensures nothing is skipped. The Detailed Findings provide actionable information for gaps.
167
+
168
+ ---
169
+
170
+ ## Example Output
171
+
172
+ ```markdown
173
+ ## Standards Coverage Table
174
+
175
+ **Standards File:** golang.md (from WebFetch)
176
+ **Total Sections Found:** 21
177
+ **Table Rows:** 21 (MUST match)
178
+
179
+ | # | Section (from WebFetch) | Status | Evidence |
180
+ |---|-------------------------|--------|----------|
181
+ | 1 | Version | ✅ | go.mod:3 (Go 1.24) |
182
+ | 2 | Core Dependency: lib-commons | ✅ | go.mod:5 |
183
+ | 3 | Frameworks & Libraries | ✅ | Fiber v2, pgx/v5 in go.mod |
184
+ | 4 | Configuration Loading | ⚠️ | internal/config/config.go:12 |
185
+ | 5 | Telemetry & Observability | ❌ | Not implemented |
186
+ | 6 | Bootstrap Pattern | ✅ | cmd/server/main.go:15 |
187
+ | 7 | Access Manager Integration | ✅ | internal/middleware/auth.go:25 |
188
+ | 8 | License Manager Integration | N/A | Not a licensed project |
189
+ | 9 | Data Transformation | ✅ | internal/adapters/postgres/mapper.go:8 |
190
+ | 10 | Error Codes Convention | ⚠️ | Uses generic codes |
191
+ | 11 | Error Handling | ✅ | Consistent pattern |
192
+ | 12 | Function Design | ✅ | Small functions, clear names |
193
+ | 13 | Pagination Patterns | N/A | No list endpoints |
194
+ | 14 | Testing Patterns | ❌ | No tests found |
195
+ | 15 | Logging Standards | ⚠️ | Missing structured fields |
196
+ | 16 | Linting | ✅ | .golangci.yml present |
197
+ | 17 | Architecture Patterns | ✅ | Hexagonal structure |
198
+ | 18 | Directory Structure | ✅ | Follows Lerian pattern |
199
+ | 19 | Concurrency Patterns | N/A | No concurrent code |
200
+ | 20 | RabbitMQ Worker Pattern | N/A | No message queue |
201
+
202
+ **Completeness Verification:**
203
+ - Sections in standards: 20
204
+ - Rows in table: 20
205
+ - Status: ✅ Complete
206
+ ```
207
+
208
+ ---
209
+
210
+ ## How Agents Reference This Pattern
211
+
212
+ Agents MUST include this in their Standards Compliance section:
213
+
214
+ ```markdown
215
+ ## Standards Compliance Output (Conditional)
216
+
217
+ **Detection:** Prompt contains `**MODE: ANALYSIS only**`
218
+
219
+ **When triggered, you MUST:**
220
+ 1. Output Standards Coverage Table per [shared-patterns/standards-coverage-table.md](../skills/shared-patterns/standards-coverage-table.md)
221
+ 2. Then output detailed findings for ⚠️/❌ items
222
+
223
+ See [shared-patterns/standards-coverage-table.md](../skills/shared-patterns/standards-coverage-table.md) for:
224
+ - Table format
225
+ - Status legend
226
+ - Anti-rationalization rules
227
+ - Completeness verification checklist
228
+ ```
229
+
230
+ ---
231
+
232
+ ## Agent → Standards Section Index
233
+
234
+ **IMPORTANT:** When updating a standards file, you MUST also update the corresponding section index below.
235
+
236
+ **Meta-sections (EXCLUDED from agent checks):**
237
+ Standards files may contain these meta-sections that are not counted in section indexes:
238
+ - `## Checklist` - Self-verification checklist for developers
239
+ - `## Standards Compliance` - Output format examples for agents
240
+ - `## Standards Compliance Output Format` - Output templates
241
+
242
+ These sections describe HOW to use the standards, not WHAT the standards are.
243
+
244
+ ### genesis:backend-engineer-golang → golang.md
245
+
246
+ | # | Section to Check | Anchor | Key Subsections |
247
+ |---|------------------|--------|-----------------|
248
+ | 1 | Version | `#version` | Go 1.24+ |
249
+ | 2 | Core Dependency: lib-commons | `#core-dependency-lib-commons-mandatory` | |
250
+ | 3 | Frameworks & Libraries | `#frameworks--libraries` | lib-commons v2, Fiber v2, pgx/v5, OpenTelemetry, zap, testify, gomock |
251
+ | 4 | Configuration | `#configuration` | Environment variable handling |
252
+ | 5 | Observability | `#observability` | OpenTelemetry integration |
253
+ | 6 | Bootstrap | `#bootstrap` | Application initialization |
254
+ | 7 | Access Manager Integration | `#access-manager-integration-mandatory` | **CONDITIONAL** - Check if project has auth |
255
+ | 8 | License Manager Integration | `#license-manager-integration-mandatory` | **CONDITIONAL** - Check if project is licensed |
256
+ | 9 | Data Transformation | `#data-transformation-toentityfromentity-mandatory` | ToEntity/FromEntity patterns |
257
+ | 10 | Error Codes Convention | `#error-codes-convention-mandatory` | Service-prefixed codes |
258
+ | 11 | Error Handling | `#error-handling` | Error wrapping and checking |
259
+ | 12 | Function Design | `#function-design-mandatory` | Single responsibility |
260
+ | 13 | Pagination Patterns | `#pagination-patterns` | Cursor and page-based |
261
+ | 14 | Testing | `#testing` | Table-driven tests, edge cases |
262
+ | 15 | Logging | `#logging` | Structured logging with lib-commons |
263
+ | 16 | Linting | `#linting` | golangci-lint configuration |
264
+ | 17 | Architecture Patterns | `#architecture-patterns` | Hexagonal architecture |
265
+ | 18 | Directory Structure | `#directory-structure` | Lerian pattern |
266
+ | 19 | Concurrency Patterns | `#concurrency-patterns` | Goroutines, channels, errgroup |
267
+ | 20 | RabbitMQ Worker Pattern | `#rabbitmq-worker-pattern` | Async message processing |
268
+ | 21 | Always-Valid Domain Model | `#always-valid-domain-model-mandatory` | Constructor validation, invariant protection |
269
+
270
+ ---
271
+
272
+ ### genesis:backend-engineer-typescript → typescript.md
273
+
274
+ | # | Section to Check | Anchor | Key Subsections |
275
+ |---|------------------|--------|-----------------|
276
+ | 1 | Version | `#version` | TypeScript 5.0+, Node.js 20+ |
277
+ | 2 | Strict Configuration | `#strict-configuration-mandatory` | tsconfig.json strict mode |
278
+ | 3 | Frameworks & Libraries | `#frameworks--libraries` | Express, Fastify, NestJS, Prisma, Zod, Vitest |
279
+ | 4 | Type Safety | `#type-safety` | No any, branded types, discriminated unions |
280
+ | 5 | Zod Validation Patterns | `#zod-validation-patterns` | Schema validation |
281
+ | 6 | Dependency Injection | `#dependency-injection` | TSyringe patterns |
282
+ | 7 | AsyncLocalStorage for Context | `#asynclocalstorage-for-context` | Request context propagation |
283
+ | 8 | Testing | `#testing` | Type-safe mocks, fixtures, edge cases |
284
+ | 9 | Error Handling | `#error-handling` | Custom error classes |
285
+ | 10 | Function Design | `#function-design-mandatory` | Single responsibility |
286
+ | 11 | Naming Conventions | `#naming-conventions` | Files, interfaces, types |
287
+ | 12 | Directory Structure | `#directory-structure` | Lerian pattern |
288
+ | 13 | RabbitMQ Worker Pattern | `#rabbitmq-worker-pattern` | Async message processing |
289
+ | 14 | Always-Valid Domain Model | `#always-valid-domain-model-mandatory` | Constructor validation, invariant protection |
290
+
291
+ ---
292
+
293
+ ### frontend-bff-engineer-typescript → typescript.md
294
+
295
+ **Same sections as genesis:backend-engineer-typescript (14 sections).** See above.
296
+
297
+ ---
298
+
299
+ ### genesis:frontend-engineer → frontend.md
300
+
301
+ | # | Section to Check | Anchor |
302
+ |---|------------------|--------|
303
+ | 1 | Framework | `#framework` |
304
+ | 2 | Libraries & Tools | `#libraries--tools` |
305
+ | 3 | State Management Patterns | `#state-management-patterns` |
306
+ | 4 | Form Patterns | `#form-patterns` |
307
+ | 5 | Styling Standards | `#styling-standards` |
308
+ | 6 | Typography Standards | `#typography-standards` |
309
+ | 7 | Animation Standards | `#animation-standards` |
310
+ | 8 | Component Patterns | `#component-patterns` |
311
+ | 9 | Accessibility | `#accessibility` |
312
+ | 10 | Performance | `#performance` |
313
+ | 11 | Directory Structure | `#directory-structure` |
314
+ | 12 | Forbidden Patterns | `#forbidden-patterns` |
315
+ | 13 | Standards Compliance Categories | `#standards-compliance-categories` |
316
+
317
+ ---
318
+
319
+ ### genesis:frontend-designer → frontend.md
320
+
321
+ **Same sections as genesis:frontend-engineer (13 sections).** See above.
322
+
323
+ ---
324
+
325
+ ### genesis:devops-engineer → devops.md
326
+
327
+ | # | Section to Check | Subsections (all REQUIRED) |
328
+ |---|------------------|---------------------------|
329
+ | 1 | Cloud Provider (MANDATORY) | Provider table |
330
+ | 2 | Infrastructure as Code (MANDATORY) | Terraform structure, State management, Module pattern, Best practices |
331
+ | 3 | Containers (MANDATORY) | **Dockerfile patterns, Docker Compose (Local Dev), .env file**, Image guidelines |
332
+ | 4 | Helm (MANDATORY) | Chart structure, Chart.yaml, values.yaml |
333
+ | 5 | Observability (MANDATORY) | Logging (Structured JSON), Tracing (OpenTelemetry) |
334
+ | 6 | Security (MANDATORY) | Secrets management, Network policies |
335
+ | 7 | Makefile Standards (MANDATORY) | Required commands (build, lint, test, cover, up, down, etc.), Component delegation pattern |
336
+
337
+ **⛔ HARD GATE:** When checking "Containers", you MUST verify BOTH Dockerfile and Docker Compose patterns. Checking only one = INCOMPLETE.
338
+
339
+ **⛔ HARD GATE:** When checking "Makefile Standards", you MUST verify all required commands exist: `build`, `lint`, `test`, `cover`, `up`, `down`, `start`, `stop`, `restart`, `rebuild-up`, `set-env`, `generate-docs`.
340
+
341
+ ---
342
+
343
+ ### genesis:sre → sre.md
344
+
345
+ | # | Section to Check | Anchor |
346
+ |---|------------------|--------|
347
+ | 1 | Observability | `#observability` |
348
+ | 2 | Logging | `#logging` |
349
+ | 3 | Tracing | `#tracing` |
350
+ | 4 | OpenTelemetry with lib-commons | `#opentelemetry-with-lib-commons-mandatory-for-go` |
351
+ | 5 | Structured Logging with lib-common-js | `#structured-logging-with-lib-common-js-mandatory-for-typescript` |
352
+ | 6 | Health Checks | `#health-checks` |
353
+
354
+ ---
355
+
356
+ ### genesis:qa-analyst → golang.md or typescript.md
357
+
358
+ **Note:** genesis:qa-analyst checks testing-related sections based on project language.
359
+
360
+ **For Go projects:**
361
+ | # | Section to Check |
362
+ |---|------------------|
363
+ | 1 | Testing Patterns (MANDATORY) |
364
+ | 2 | Edge Case Coverage (MANDATORY) |
365
+ | 3 | Test Naming Convention (MANDATORY) |
366
+ | 4 | Linting (MANDATORY) |
367
+
368
+ **For TypeScript projects:**
369
+ | # | Section to Check |
370
+ |---|------------------|
371
+ | 1 | Testing Patterns (MANDATORY) |
372
+ | 2 | Edge Case Coverage (MANDATORY) |
373
+ | 3 | Type Safety Rules (MANDATORY) |
374
+
375
+ **Test Quality Gate Checks (Gate 3 Exit - all REQUIRED):**
376
+ | # | Check | Detection |
377
+ |---|-------|-----------|
378
+ | 1 | Skipped tests | `grep -rn "\.skip\|\.todo\|xit"` = 0 |
379
+ | 2 | Assertion-less tests | All tests have expect/assert |
380
+ | 3 | Shared state | No beforeAll DB/state mutation |
381
+ | 4 | Edge cases | ≥2 per acceptance criterion |
382
+ | 5 | TDD evidence | RED phase captured |
383
+ | 6 | Test isolation | No order dependency |
384
+
385
+ ---
386
+
387
+ ## Maintenance Instructions
388
+
389
+ **When you add/modify a section in a standards file:**
390
+
391
+ 1. Edit `dev-team/docs/standards/{file}.md` - Add your new `## Section Name`
392
+ 2. Edit THIS file - Add the section to the corresponding agent table above
393
+ 3. Verify row count matches section count
394
+
395
+ **Anti-Rationalization:**
396
+
397
+ | Rationalization | Why It's WRONG | Required Action |
398
+ |-----------------|----------------|-----------------|
399
+ | "I'll update the index later" | Later = never. Sync drift causes missed checks. | **Update BOTH files in same commit** |
400
+ | "The section is minor" | Minor ≠ optional. All sections must be indexed. | **Add to index regardless of size** |
401
+ | "Agents parse dynamically anyway" | Index is the explicit contract. Dynamic is backup. | **Index is source of truth** |
@@ -0,0 +1,31 @@
1
+ # Universal Exit Criteria Pattern
2
+
3
+ Add this section to define clear completion:
4
+
5
+ ## Definition of Done
6
+
7
+ You may ONLY claim completion when:
8
+
9
+ □ All checklist items complete
10
+ □ Verification commands run and passed
11
+ □ Output evidence included in response
12
+ □ No "should" or "probably" in message
13
+ □ State tracking shows all phases done
14
+ □ No unresolved blockers
15
+
16
+ **Incomplete checklist = not done**
17
+
18
+ Example claim structure:
19
+ ```
20
+ Status: Task complete
21
+
22
+ Evidence:
23
+ - Tests: 15/15 passing [output shown above]
24
+ - Lint: No errors [output shown above]
25
+ - Build: Success [output shown above]
26
+ - All requirements met [checklist verified]
27
+
28
+ The implementation is complete and verified.
29
+ ```
30
+
31
+ **Never claim done without this structure.**