-
Notifications
You must be signed in to change notification settings - Fork 0
feat(guardrails): add remaining 7 CC command definitions #118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| --- | ||
| description: Generate a blog article from provided topic or context. | ||
| agent: implement | ||
| --- | ||
|
|
||
| Write a technical blog post based on the provided topic. | ||
|
|
||
| 1. Identify the topic from $ARGUMENTS or the current conversation context. | ||
| 2. Research the topic within the codebase for concrete examples and code snippets. | ||
| 3. Structure the post with a clear narrative arc. | ||
| 4. Include code examples that are accurate and runnable. | ||
| 5. Match the project's technical voice and terminology. | ||
|
|
||
| Required structure: | ||
| - Title | ||
| - Introduction (hook + what the reader will learn) | ||
| - Main sections (2-4 sections with headers, explanations, and code examples) | ||
| - Conclusion (summary + next steps or call to action) | ||
|
|
||
| Guidelines: | ||
| - Keep paragraphs short — 3-4 sentences maximum. | ||
| - Code examples must be syntax-highlighted with the correct language tag. | ||
| - Avoid jargon without explanation. | ||
| - Target length: 800-1500 words. | ||
|
|
||
| $ARGUMENTS |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| --- | ||
| description: Detailed code review for security, quality, and best practices. | ||
| agent: code-reviewer | ||
| subtask: true | ||
| --- | ||
|
|
||
| Review code for bugs, logic errors, security vulnerabilities, code quality, and adherence to project conventions. | ||
|
|
||
| 1. Identify the review scope from git diff or $ARGUMENTS. | ||
| 2. Check for correctness — logic errors, off-by-one, null handling, race conditions. | ||
| 3. Check for security — injection, XSS, CSRF, secrets exposure, auth/authz gaps. | ||
| 4. Check for quality — naming, duplication, complexity, test coverage gaps. | ||
| 5. Check for performance — unnecessary allocations, N+1 queries, missing indexes. | ||
| 6. Verify adherence to project conventions and existing patterns. | ||
|
|
||
| Required sections: | ||
|
|
||
| - Findings (grouped by severity: Critical, High, Medium, Low) | ||
| - Security concerns | ||
| - Performance issues | ||
| - Recommendations | ||
|
|
||
| Default scope is the current uncommitted work unless `$ARGUMENTS` narrows it. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| --- | ||
| description: Explain the high-level architecture of the current project. | ||
| agent: planner | ||
| --- | ||
|
|
||
| Analyze the project and explain its architecture. | ||
|
|
||
| 1. Scan the project root for configuration files, entry points, and directory structure. | ||
| 2. Identify main components, modules, and their responsibilities. | ||
| 3. Trace data flow between components (API boundaries, state management, persistence). | ||
| 4. Detect architecture patterns in use (MVC, hexagonal, event-driven, monorepo, etc.). | ||
| 5. Map key dependencies and their roles. | ||
| 6. Use multiple subagents if the project spans many packages or domains. | ||
|
|
||
| Required output: | ||
| - Architecture overview (one paragraph) | ||
| - Key files and directories (with purpose) | ||
| - Dependency graph (text or mermaid) | ||
| - Design patterns identified | ||
| - Data flow summary | ||
|
|
||
| $ARGUMENTS narrows scope to a specific area if provided. | ||
|
|
||
| $ARGUMENTS | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| --- | ||
| description: Web search using Gemini CLI for research. | ||
| agent: implement | ||
| --- | ||
|
|
||
| Use the `gemini` CLI tool to perform web search and return synthesized results. | ||
|
|
||
| 1. Take the search query from $ARGUMENTS. | ||
| 2. Run `gemini` CLI with the provided query. | ||
| 3. Parse and organize the search results. | ||
| 4. Synthesize findings into actionable information relevant to the current task. | ||
| 5. Cite sources where applicable. | ||
|
|
||
| Required output: | ||
| - Search query used | ||
| - Key findings (bulleted, ranked by relevance) | ||
| - Source references | ||
| - Actionable recommendations based on findings | ||
|
|
||
| $ARGUMENTS |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| --- | ||
| description: Convert a plan into a checklist document. | ||
| agent: planner | ||
| --- | ||
|
|
||
| Take the provided plan and convert it into a structured checklist document. | ||
|
|
||
| 1. Read the plan from $ARGUMENTS or the current conversation context. | ||
| 2. Break the plan into phases or priority groups. | ||
| 3. Convert each item into a checkbox entry with a clear, actionable description. | ||
| 4. Add dependencies between items where they exist. | ||
| 5. Include acceptance criteria for each item so completion is verifiable. | ||
| 6. Output the checklist as a markdown document. | ||
|
|
||
| Required structure: | ||
| - Document title (from $ARGUMENTS or inferred from the plan) | ||
| - Phases or priority groups with headers | ||
| - Checkbox items (`- [ ]`) under each group | ||
| - Dependencies noted inline (e.g., "depends on: item X") | ||
| - Acceptance criteria per item (indented under the checkbox) | ||
|
|
||
| $ARGUMENTS |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| --- | ||
| description: Run tests and generate a report saved to log directory. | ||
| agent: implement | ||
| --- | ||
|
|
||
| Run the project test suite and generate a structured report. | ||
|
|
||
| 1. Detect the project test framework and runner (jest, vitest, pytest, go test, etc.). | ||
| 2. Run the full test suite or the scope specified in $ARGUMENTS. | ||
| 3. Collect results including pass/fail/skip counts, duration, and coverage if available. | ||
| 4. Save the report to `./log/test/` with a timestamped filename (e.g., `test-report-2026-04-06T12-00-00.md`). | ||
| 5. If tests fail, include failure details with file and line references. | ||
|
Comment on lines
+10
to
+12
|
||
|
|
||
| Required output in the saved report: | ||
| - Test command executed | ||
| - Pass / fail / skip counts | ||
| - Coverage summary (if available) | ||
| - Failed test details (name, file, error message) | ||
| - Total duration | ||
| - Timestamp | ||
|
|
||
| $ARGUMENTS | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| --- | ||
| description: UI component guidelines and constraints for building interfaces. | ||
| agent: implement | ||
| --- | ||
|
|
||
| Provide opinionated UI constraints and guidelines for the current project. | ||
|
|
||
| 1. Detect the UI framework and styling approach in use (React, Vue, Svelte, Tailwind, etc.). | ||
| 2. Apply Tailwind CSS best practices — utility-first, consistent spacing scale, design tokens. | ||
| 3. Enforce accessibility requirements — ARIA roles, keyboard navigation, color contrast, focus management. | ||
| 4. Define animation guidelines — prefer CSS transitions, respect prefers-reduced-motion, keep durations under 300ms. | ||
| 5. Establish responsive layout patterns — mobile-first breakpoints, fluid typography, container queries. | ||
| 6. Guide component composition — single responsibility, prop drilling limits, slot/children patterns. | ||
|
|
||
| Guidelines: | ||
| - No inline styles — use Tailwind utilities or CSS modules. | ||
| - Interactive elements must have visible focus indicators. | ||
| - Images require alt text; decorative images use `alt=""`. | ||
| - Modals and dialogs must trap focus and support Escape to close. | ||
| - Color must not be the only indicator of state (use icons or text). | ||
|
|
||
| Apply constraints to the current context or the scope specified in $ARGUMENTS. | ||
|
|
||
| $ARGUMENTS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ARGUMENTSis used at the start of a sentence ("$ARGUMENTS narrows scope …"), which will be replaced with the raw arguments at runtime and can produce a nonsensical sentence (e.g., "packages/foo narrows scope …"). Use a literal reference (e.g., wrap as\$ARGUMENTS`) and keep the actual argument injection on the separate$ARGUMENTS` line below (or remove one of the two).