diff --git a/packages/guardrails/profile/commands/blog.md b/packages/guardrails/profile/commands/blog.md new file mode 100644 index 000000000000..dfb283e963f7 --- /dev/null +++ b/packages/guardrails/profile/commands/blog.md @@ -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 diff --git a/packages/guardrails/profile/commands/code-review.md b/packages/guardrails/profile/commands/code-review.md new file mode 100644 index 000000000000..d7ef697e9938 --- /dev/null +++ b/packages/guardrails/profile/commands/code-review.md @@ -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. diff --git a/packages/guardrails/profile/commands/explain-project.md b/packages/guardrails/profile/commands/explain-project.md new file mode 100644 index 000000000000..88586b5675bc --- /dev/null +++ b/packages/guardrails/profile/commands/explain-project.md @@ -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 diff --git a/packages/guardrails/profile/commands/gemini.md b/packages/guardrails/profile/commands/gemini.md new file mode 100644 index 000000000000..b67b671f7f9c --- /dev/null +++ b/packages/guardrails/profile/commands/gemini.md @@ -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 diff --git a/packages/guardrails/profile/commands/plan-to-checklist.md b/packages/guardrails/profile/commands/plan-to-checklist.md new file mode 100644 index 000000000000..7d2a5ced4d5b --- /dev/null +++ b/packages/guardrails/profile/commands/plan-to-checklist.md @@ -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 diff --git a/packages/guardrails/profile/commands/test-report.md b/packages/guardrails/profile/commands/test-report.md new file mode 100644 index 000000000000..fe8b5d118efd --- /dev/null +++ b/packages/guardrails/profile/commands/test-report.md @@ -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. + +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 diff --git a/packages/guardrails/profile/commands/ui-skills.md b/packages/guardrails/profile/commands/ui-skills.md new file mode 100644 index 000000000000..fe39d653f1dc --- /dev/null +++ b/packages/guardrails/profile/commands/ui-skills.md @@ -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