Add non-automatic TypeScript Style Review agent and skill This adds the 'gerrit-typescript-style-review' agent to agent_configs.textproto and creates the corresponding skill with guidelines for TypeScript style review. Google-Bug-Id: b/514414488 Release-Notes: skip Change-Id: I5ba5514ee0f67f6a32d4bfaa9bdc1796d45d3f02
diff --git a/configs/agent_configs.textproto b/configs/agent_configs.textproto index cb4119d..08f2602 100644 --- a/configs/agent_configs.textproto +++ b/configs/agent_configs.textproto
@@ -48,3 +48,17 @@ } automatic: true } + +# TypeScript Style Review Agent +configs: { + id: "gerrit-typescript-style-review" + display_name: "TypeScript Style Review" + description: "Checks TypeScript files against style guide, focusing on property visibility and bypasses." + skills: "typescript_style_review" + include_filters: { + project: "gerrit" + project: "TestRepo" + path_regex: ".*\\.ts$" + } +} +
diff --git a/configs/skills/typescript_style_review/SKILL.md b/configs/skills/typescript_style_review/SKILL.md new file mode 100644 index 0000000..d1e79f2 --- /dev/null +++ b/configs/skills/typescript_style_review/SKILL.md
@@ -0,0 +1,42 @@ +--- +name: typescript-style-review +description: Reviews TypeScript code against the Google TS Style Guide. +--- + +# TypeScript Style Review Guide + +## Executive Summary + +This guide serves as the instruction set for reviewing TypeScript code. The +goal is to ensure that all TypeScript code adheres to the official Google +TypeScript Style Guide. + +## Guidelines + +You must review the TypeScript files in the changelist and ensure they comply +with the rules and best practices outlined in the official Google TypeScript +Style Guide. + +### Reference +* **Google TypeScript Style Guide**: + https://google.github.io/styleguide/tsguide.html + +## Review Instructions + +When performing the review: +1. Identify any violations of the Google TypeScript Style Guide. +2. For each violation, provide a clear explanation of the problem, a + suggestion for how to fix it (with a code snippet if appropriate), and a + reference to the relevant section of the style guide. +3. Format your comments using the following template: + +### Problem +Clearly and succinctly describe the style guide violation. + +### Suggestion +Provide a suggestion for improvement, including a code snippet. + +### Reference +Provide the link to the relevant section in the Google TypeScript Style Guide +(e.g., +`https://google.github.io/styleguide/tsguide.html#visibility-of-properties-accessed-from-templates`).