ccsetup 1.1.1 → 1.2.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 (88) hide show
  1. package/README.md +96 -363
  2. package/bin/create-project.js +1616 -60
  3. package/bin/lib/claudeInterface.js +209 -0
  4. package/bin/lib/contextGenerator.js +287 -0
  5. package/bin/lib/scanner/index.js +28 -0
  6. package/bin/scan.js +367 -0
  7. package/lib/aiAgentSelector.js +155 -0
  8. package/lib/aiMergeHelper.js +112 -0
  9. package/lib/contextGenerator.js +574 -0
  10. package/lib/contextMerger.js +812 -0
  11. package/lib/progressReporter.js +88 -0
  12. package/lib/scanConfig.js +200 -0
  13. package/lib/scanner/fileAnalyzer.js +605 -0
  14. package/lib/scanner/index.js +164 -0
  15. package/lib/scanner/patterns.js +277 -0
  16. package/lib/scanner/projectDetector.js +147 -0
  17. package/lib/templates/README.md +176 -0
  18. package/lib/templates/catalog.js +230 -0
  19. package/lib/templates/filter.js +257 -0
  20. package/lib/templates/index.js +45 -0
  21. package/lib/templates/metadata/agents.json +413 -0
  22. package/lib/templates/metadata-extractor.js +329 -0
  23. package/lib/templates/search.js +356 -0
  24. package/package.json +11 -4
  25. package/template/{agents → .claude/agents}/checker.md +29 -0
  26. package/template/.claude/settings.json +15 -0
  27. package/template/.claude/skills/prd/SKILL.md +343 -0
  28. package/template/.claude/skills/ralph/SKILL.md +339 -0
  29. package/template/CLAUDE.md +39 -21
  30. package/template/CONTRIBUTING.md +37 -0
  31. package/template/agents/README.md +15 -171
  32. package/template/docs/ROADMAP.md +0 -36
  33. package/template/docs/agent-orchestration.md +24 -141
  34. package/template/hooks/workflow-selector/index.js +398 -0
  35. package/template/scripts/ralph/CLAUDE.md +174 -0
  36. package/template/scripts/ralph/ralph.sh +127 -0
  37. package/template/tickets/ticket-list.md +17 -68
  38. package/template/agents/ai-engineer.md +0 -31
  39. package/template/agents/api-documenter.md +0 -31
  40. package/template/agents/architect-review.md +0 -42
  41. package/template/agents/backend-architect.md +0 -29
  42. package/template/agents/business-analyst.md +0 -34
  43. package/template/agents/c-pro.md +0 -34
  44. package/template/agents/cloud-architect.md +0 -31
  45. package/template/agents/code-reviewer.md +0 -28
  46. package/template/agents/content-marketer.md +0 -34
  47. package/template/agents/context-manager.md +0 -63
  48. package/template/agents/cpp-pro.md +0 -37
  49. package/template/agents/customer-support.md +0 -34
  50. package/template/agents/data-engineer.md +0 -31
  51. package/template/agents/data-scientist.md +0 -28
  52. package/template/agents/database-admin.md +0 -31
  53. package/template/agents/database-optimizer.md +0 -31
  54. package/template/agents/debugger.md +0 -29
  55. package/template/agents/deployment-engineer.md +0 -31
  56. package/template/agents/devops-troubleshooter.md +0 -31
  57. package/template/agents/dx-optimizer.md +0 -62
  58. package/template/agents/error-detective.md +0 -31
  59. package/template/agents/frontend-developer.md +0 -30
  60. package/template/agents/golang-pro.md +0 -31
  61. package/template/agents/graphql-architect.md +0 -31
  62. package/template/agents/incident-responder.md +0 -73
  63. package/template/agents/javascript-pro.md +0 -34
  64. package/template/agents/legacy-modernizer.md +0 -31
  65. package/template/agents/ml-engineer.md +0 -31
  66. package/template/agents/mlops-engineer.md +0 -56
  67. package/template/agents/mobile-developer.md +0 -31
  68. package/template/agents/network-engineer.md +0 -31
  69. package/template/agents/payment-integration.md +0 -31
  70. package/template/agents/performance-engineer.md +0 -31
  71. package/template/agents/prompt-engineer.md +0 -58
  72. package/template/agents/python-pro.md +0 -31
  73. package/template/agents/quant-analyst.md +0 -31
  74. package/template/agents/risk-manager.md +0 -40
  75. package/template/agents/rust-pro.md +0 -34
  76. package/template/agents/sales-automator.md +0 -34
  77. package/template/agents/search-specialist.md +0 -58
  78. package/template/agents/security-auditor.md +0 -31
  79. package/template/agents/sql-pro.md +0 -34
  80. package/template/agents/terraform-specialist.md +0 -34
  81. package/template/agents/test-automator.md +0 -31
  82. /package/template/{agents → .claude/agents}/backend.md +0 -0
  83. /package/template/{agents → .claude/agents}/blockchain.md +0 -0
  84. /package/template/{agents → .claude/agents}/coder.md +0 -0
  85. /package/template/{agents → .claude/agents}/frontend.md +0 -0
  86. /package/template/{agents → .claude/agents}/planner.md +0 -0
  87. /package/template/{agents → .claude/agents}/researcher.md +0 -0
  88. /package/template/{agents → .claude/agents}/shadcn.md +0 -0
@@ -0,0 +1,174 @@
1
+ # Ralph Agent Instructions
2
+
3
+ You are an autonomous coding agent working on a software project. You have access to Claude Code's full toolset including subagents.
4
+
5
+ ## Your Task
6
+
7
+ 1. Read the PRD at `prd.json` (in the same directory as this file)
8
+ 2. Read the progress log at `progress.txt` (check Codebase Patterns section first)
9
+ 3. Check you're on the correct branch from PRD `branchName`. If not, check it out or create from main.
10
+ 4. Pick the **highest priority** user story where `passes: false`
11
+ 5. Read the story's `notes` field for file hints and relevant context
12
+ 6. Implement that single user story
13
+ 7. Run quality checks using the exact commands from `prd.json` → `qualityChecks`
14
+ 8. **Spawn a reviewer subagent** to independently verify the implementation (see Verification below)
15
+ 9. If reviewer approves: commit ALL changes with message `feat: [Story ID] - [Story Title]`
16
+ 10. If reviewer rejects: fix the issues, re-run quality checks, and re-verify
17
+ 11. Update the PRD to set `passes: true` and populate `notes` with what was actually done
18
+ 12. Update CLAUDE.md files if you discover reusable patterns (see below)
19
+ 13. Append your progress to `progress.txt`
20
+
21
+ ---
22
+
23
+ ## Quality Checks — Use Exact Commands
24
+
25
+ The PRD's `qualityChecks` field contains the exact commands for this project:
26
+
27
+ ```json
28
+ "qualityChecks": {
29
+ "typecheck": "npm run typecheck",
30
+ "lint": "npm run lint",
31
+ "test": "npm test"
32
+ }
33
+ ```
34
+
35
+ Run **every command** listed in `qualityChecks` using the Bash tool. Do not guess commands — use exactly what's in the PRD.
36
+
37
+ If `qualityChecks` is missing (older PRD format), fall back to detecting commands from `package.json` scripts, `Makefile`, or equivalent config files.
38
+
39
+ **All checks must pass before proceeding to verification.**
40
+
41
+ ---
42
+
43
+ ## Verification — Spawn a Reviewer Subagent
44
+
45
+ After implementing a story and passing quality checks, you MUST spawn a **checker subagent** using the Agent tool to independently verify the implementation. The implementing agent (you) should not be the sole judge of its own work.
46
+
47
+ ### How to verify
48
+
49
+ Use the Agent tool with `subagent_type: "checker"` and a prompt like:
50
+
51
+ ```
52
+ Review the implementation of user story [Story ID]: "[Story Title]"
53
+
54
+ ## Acceptance Criteria to verify:
55
+ [paste the acceptance criteria from the story]
56
+
57
+ ## Quality commands to run:
58
+ [paste from prd.json qualityChecks]
59
+
60
+ ## Instructions:
61
+ 1. Run `git diff` to see all changes made in the working tree
62
+ 2. For each acceptance criterion, verify it is actually met by the code changes — not just that the code compiles
63
+ 3. Run each quality check command and confirm they pass
64
+ 4. If any acceptance criterion references UI changes, check that the component renders correctly (use browser tools if available)
65
+ 5. Look for: missing edge cases, broken imports, unused variables, incomplete implementations
66
+
67
+ Report back with:
68
+ - PASS or FAIL for each acceptance criterion (with brief reasoning)
69
+ - Overall verdict: APPROVED or CHANGES_REQUESTED
70
+ - If CHANGES_REQUESTED: specific issues to fix
71
+ ```
72
+
73
+ ### Acting on the review
74
+
75
+ - **APPROVED**: Proceed to commit
76
+ - **CHANGES_REQUESTED**: Fix each issue raised, re-run quality checks, then spawn the reviewer again. Maximum 3 review cycles per story — if still failing after 3, log the issues in progress.txt and move on (do NOT mark `passes: true`)
77
+
78
+ ### Why subagent verification matters
79
+
80
+ The implementing agent has tunnel vision — it wrote the code and is biased toward thinking it works. A fresh subagent context catches:
81
+ - Acceptance criteria that look met but aren't (e.g., criterion says "default 'pending'" but code defaults to null)
82
+ - Quality regressions in files you didn't intend to change
83
+ - Missing integrations (e.g., new API route exists but nothing calls it)
84
+
85
+ ---
86
+
87
+ ## Browser Testing
88
+
89
+ For any story with "Verify in browser using dev-browser skill" in its acceptance criteria:
90
+
91
+ 1. Navigate to the relevant page
92
+ 2. Verify the UI changes work as expected
93
+ 3. Take a screenshot if helpful for the progress log
94
+
95
+ The reviewer subagent should also check UI stories if browser tools are available. If no browser tools are configured, note in your progress report that manual browser verification is needed.
96
+
97
+ ---
98
+
99
+ ## Progress Report Format
100
+
101
+ APPEND to progress.txt (never replace, always append):
102
+ ```
103
+ ## [Date/Time] - [Story ID]
104
+ - What was implemented
105
+ - Files changed
106
+ - Review result: [APPROVED / CHANGES_REQUESTED → fixed → APPROVED]
107
+ - Review cycles: [1-3]
108
+ - **Learnings for future iterations:**
109
+ - Patterns discovered (e.g., "this codebase uses X for Y")
110
+ - Gotchas encountered (e.g., "don't forget to update Z when changing W")
111
+ - Useful context (e.g., "the evaluation panel is in component X")
112
+ - Reviewer catches (e.g., "reviewer caught missing default value on status column")
113
+ ---
114
+ ```
115
+
116
+ The learnings section is critical — it helps future iterations avoid repeating mistakes. **Include what the reviewer caught** so future iterations avoid the same issues.
117
+
118
+ ## Consolidate Patterns
119
+
120
+ If you discover a **reusable pattern** that future iterations should know, add it to the `## Codebase Patterns` section at the TOP of progress.txt (create it if it doesn't exist). This section should consolidate the most important learnings:
121
+
122
+ ```
123
+ ## Codebase Patterns
124
+ - Example: Use `sql<number>` template for aggregations
125
+ - Example: Always use `IF NOT EXISTS` for migrations
126
+ - Example: Export types from actions.ts for UI components
127
+ ```
128
+
129
+ Only add patterns that are **general and reusable**, not story-specific details.
130
+
131
+ ## Update CLAUDE.md Files
132
+
133
+ Before committing, check if any edited files have learnings worth preserving in nearby CLAUDE.md files:
134
+
135
+ 1. **Identify directories with edited files** — Look at which directories you modified
136
+ 2. **Check for existing CLAUDE.md** — Look for CLAUDE.md in those directories or parent directories
137
+ 3. **Add valuable learnings** — If you discovered something future developers/agents should know:
138
+ - API patterns or conventions specific to that module
139
+ - Gotchas or non-obvious requirements
140
+ - Dependencies between files
141
+ - Testing approaches for that area
142
+ - Configuration or environment requirements
143
+
144
+ **Examples of good CLAUDE.md additions:**
145
+ - "When modifying X, also update Y to keep them in sync"
146
+ - "This module uses pattern Z for all API calls"
147
+ - "Tests require the dev server running on PORT 3000"
148
+ - "Field names must match the template exactly"
149
+
150
+ **Do NOT add:**
151
+ - Story-specific implementation details
152
+ - Temporary debugging notes
153
+ - Information already in progress.txt
154
+
155
+ Only update CLAUDE.md if you have **genuinely reusable knowledge** that would help future work in that directory.
156
+
157
+ ---
158
+
159
+ ## Stop Condition
160
+
161
+ After completing a user story, check if ALL stories have `passes: true`.
162
+
163
+ If ALL stories are complete and passing, reply with:
164
+ <promise>COMPLETE</promise>
165
+
166
+ If there are still stories with `passes: false`, end your response normally (another iteration will pick up the next story).
167
+
168
+ ## Important
169
+
170
+ - Work on ONE story per iteration
171
+ - Commit only after reviewer APPROVES
172
+ - Keep CI green — use the exact commands from `qualityChecks`
173
+ - Read the Codebase Patterns section in progress.txt before starting
174
+ - Read story `notes` for file hints before implementing
@@ -0,0 +1,127 @@
1
+ #!/bin/bash
2
+ # Ralph Wiggum - Long-running AI agent loop
3
+ # Usage: ./ralph.sh [--tool amp|claude] [--model opus|sonnet|haiku] [max_iterations]
4
+
5
+ set -e
6
+
7
+ # Parse arguments
8
+ TOOL="amp" # Default to amp for backwards compatibility
9
+ MODEL="" # Model for claude (opus, sonnet, haiku)
10
+ MAX_ITERATIONS=10
11
+
12
+ while [[ $# -gt 0 ]]; do
13
+ case $1 in
14
+ --tool)
15
+ TOOL="$2"
16
+ shift 2
17
+ ;;
18
+ --tool=*)
19
+ TOOL="${1#*=}"
20
+ shift
21
+ ;;
22
+ --model)
23
+ MODEL="$2"
24
+ shift 2
25
+ ;;
26
+ --model=*)
27
+ MODEL="${1#*=}"
28
+ shift
29
+ ;;
30
+ *)
31
+ # Assume it's max_iterations if it's a number
32
+ if [[ "$1" =~ ^[0-9]+$ ]]; then
33
+ MAX_ITERATIONS="$1"
34
+ fi
35
+ shift
36
+ ;;
37
+ esac
38
+ done
39
+
40
+ # Validate tool choice
41
+ if [[ "$TOOL" != "amp" && "$TOOL" != "claude" ]]; then
42
+ echo "Error: Invalid tool '$TOOL'. Must be 'amp' or 'claude'."
43
+ exit 1
44
+ fi
45
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
46
+ PRD_FILE="$SCRIPT_DIR/prd.json"
47
+ PROGRESS_FILE="$SCRIPT_DIR/progress.txt"
48
+ ARCHIVE_DIR="$SCRIPT_DIR/archive"
49
+ LAST_BRANCH_FILE="$SCRIPT_DIR/.last-branch"
50
+
51
+ # Archive previous run if branch changed
52
+ if [ -f "$PRD_FILE" ] && [ -f "$LAST_BRANCH_FILE" ]; then
53
+ CURRENT_BRANCH=$(jq -r '.branchName // empty' "$PRD_FILE" 2>/dev/null || echo "")
54
+ LAST_BRANCH=$(cat "$LAST_BRANCH_FILE" 2>/dev/null || echo "")
55
+
56
+ if [ -n "$CURRENT_BRANCH" ] && [ -n "$LAST_BRANCH" ] && [ "$CURRENT_BRANCH" != "$LAST_BRANCH" ]; then
57
+ # Archive the previous run
58
+ DATE=$(date +%Y-%m-%d)
59
+ # Strip "ralph/" prefix from branch name for folder
60
+ FOLDER_NAME=$(echo "$LAST_BRANCH" | sed 's|^ralph/||')
61
+ ARCHIVE_FOLDER="$ARCHIVE_DIR/$DATE-$FOLDER_NAME"
62
+
63
+ echo "Archiving previous run: $LAST_BRANCH"
64
+ mkdir -p "$ARCHIVE_FOLDER"
65
+ [ -f "$PRD_FILE" ] && cp "$PRD_FILE" "$ARCHIVE_FOLDER/"
66
+ [ -f "$PROGRESS_FILE" ] && cp "$PROGRESS_FILE" "$ARCHIVE_FOLDER/"
67
+ echo " Archived to: $ARCHIVE_FOLDER"
68
+
69
+ # Reset progress file for new run
70
+ echo "# Ralph Progress Log" > "$PROGRESS_FILE"
71
+ echo "Started: $(date)" >> "$PROGRESS_FILE"
72
+ echo "---" >> "$PROGRESS_FILE"
73
+ fi
74
+ fi
75
+
76
+ # Track current branch
77
+ if [ -f "$PRD_FILE" ]; then
78
+ CURRENT_BRANCH=$(jq -r '.branchName // empty' "$PRD_FILE" 2>/dev/null || echo "")
79
+ if [ -n "$CURRENT_BRANCH" ]; then
80
+ echo "$CURRENT_BRANCH" > "$LAST_BRANCH_FILE"
81
+ fi
82
+ fi
83
+
84
+ # Initialize progress file if it doesn't exist
85
+ if [ ! -f "$PROGRESS_FILE" ]; then
86
+ echo "# Ralph Progress Log" > "$PROGRESS_FILE"
87
+ echo "Started: $(date)" >> "$PROGRESS_FILE"
88
+ echo "---" >> "$PROGRESS_FILE"
89
+ fi
90
+
91
+ MODEL_DISPLAY="${MODEL:-default}"
92
+ echo "Starting Ralph - Tool: $TOOL - Model: $MODEL_DISPLAY - Max iterations: $MAX_ITERATIONS"
93
+
94
+ for i in $(seq 1 $MAX_ITERATIONS); do
95
+ echo ""
96
+ echo "==============================================================="
97
+ echo " Ralph Iteration $i of $MAX_ITERATIONS ($TOOL${MODEL:+ - $MODEL})"
98
+ echo "==============================================================="
99
+
100
+ # Run the selected tool with the ralph prompt
101
+ if [[ "$TOOL" == "amp" ]]; then
102
+ OUTPUT=$(cat "$SCRIPT_DIR/prompt.md" | amp --dangerously-allow-all 2>&1 | tee /dev/stderr) || true
103
+ else
104
+ # Claude Code: use --dangerously-skip-permissions for autonomous operation, --print for output
105
+ MODEL_FLAG=""
106
+ if [[ -n "$MODEL" ]]; then
107
+ MODEL_FLAG="--model $MODEL"
108
+ fi
109
+ OUTPUT=$(claude $MODEL_FLAG --dangerously-skip-permissions --chrome --print < "$SCRIPT_DIR/CLAUDE.md" 2>&1 | tee /dev/stderr) || true
110
+ fi
111
+
112
+ # Check for completion signal
113
+ if echo "$OUTPUT" | grep -q "<promise>COMPLETE</promise>"; then
114
+ echo ""
115
+ echo "Ralph completed all tasks!"
116
+ echo "Completed at iteration $i of $MAX_ITERATIONS"
117
+ exit 0
118
+ fi
119
+
120
+ echo "Iteration $i complete. Continuing..."
121
+ sleep 2
122
+ done
123
+
124
+ echo ""
125
+ echo "Ralph reached max iterations ($MAX_ITERATIONS) without completing all tasks."
126
+ echo "Check $PROGRESS_FILE for status."
127
+ exit 1
@@ -1,79 +1,28 @@
1
1
  # Ticket List
2
2
 
3
3
  ## Overview
4
- This file maintains a centralized list of all tickets in the project. Update this file whenever you create, update, or complete tickets.
4
+ This file provides a quick overview of all tickets in the `/tickets` directory with their current status.
5
5
 
6
- **Note**: Individual ticket files are stored in this same `/tickets` folder with the naming convention `TICKET-XXX-description.md` (e.g., `TICKET-001-user-authentication.md`, `TICKET-002-api-integration.md`)
6
+ ## Status Summary
7
7
 
8
- ## Ticket Status Legend
9
- - 🔴 **Todo** - Not started
10
- - 🟡 **In Progress** - Currently being worked on
11
- - 🟢 **Done** - Completed
12
- - 🔵 **Blocked** - Waiting on dependencies or external factors
13
- - ⚫ **Cancelled** - No longer needed
8
+ ### Done (0)
9
+ - None
14
10
 
15
- ## Active Tickets
11
+ ### 📋 Todo (0)
12
+ - None
16
13
 
17
- ### High Priority
18
- _No high priority tickets yet_
14
+ ### 🚧 In Progress (0)
15
+ - None
19
16
 
20
- ### Medium Priority
21
- _No medium priority tickets yet_
17
+ ## Detailed Ticket List
22
18
 
23
- ### Low Priority
24
- _No low priority tickets yet_
19
+ | Ticket ID | Title | Status | Priority |
20
+ |-----------|-------|--------|----------|
25
21
 
26
- ## Completed Tickets
27
- _No completed tickets yet_
22
+ ## Statistics
23
+ - **Total Tickets**: 0
24
+ - **Completed**: 0 (0%)
25
+ - **In Progress**: 0 (0%)
26
+ - **Todo**: 0 (0%)
28
27
 
29
- ## Cancelled/Archived Tickets
30
- _No cancelled tickets yet_
31
-
32
- ---
33
-
34
- ## How to Use This File
35
-
36
- 1. **When creating a new ticket**:
37
- - Create the ticket file in `/tickets` folder (e.g., `TICKET-001-user-authentication.md`)
38
- - Use the template structure from `/tickets/README.md` for the ticket content
39
- - Add it to the appropriate priority section in this list
40
- - Include ticket number, title, and status emoji
41
- - Link to the full ticket file
42
-
43
- 2. **Format for ticket entries**:
44
- ```
45
- - 🔴 [TICKET-001](./TICKET-001-user-authentication.md) - User Authentication System
46
- ```
47
-
48
- 3. **File organization**:
49
- ```
50
- tickets/
51
- ├── ticket-list.md # This file (centralized index)
52
- ├── TICKET-001-user-auth.md # Individual ticket file
53
- ├── TICKET-002-api-docs.md # Individual ticket file
54
- └── TICKET-003-testing.md # Individual ticket file
55
- ```
56
-
57
- 4. **When updating ticket status**:
58
- - Change the status emoji
59
- - Move completed tickets to "Completed Tickets" section
60
- - Add completion date for completed tickets
61
-
62
- 4. **Example of a populated list**:
63
- ```markdown
64
- ### High Priority
65
- - 🟡 [TICKET-001](./TICKET-001-user-authentication.md) - User Authentication System
66
- - 🔴 [TICKET-003](./TICKET-003-api-rate-limiting.md) - Implement API Rate Limiting
67
-
68
- ### Medium Priority
69
- - 🔵 [TICKET-002](./TICKET-002-email-notifications.md) - Email Notification Service (blocked: waiting for SMTP credentials)
70
-
71
- ### Completed Tickets
72
- - 🟢 [TICKET-000](./TICKET-000-project-setup.md) - Initial Project Setup (Completed: 2024-01-15)
73
- ```
74
-
75
- 5. **Best Practices**:
76
- - Keep this file updated in real-time
77
- - Review weekly to ensure accuracy
78
- - Use consistent naming conventions
79
- - Archive old completed tickets quarterly
28
+ ## Last Updated
@@ -1,31 +0,0 @@
1
- ---
2
- name: ai-engineer
3
- description: Build LLM applications, RAG systems, and prompt pipelines. Implements vector search, agent orchestration, and AI API integrations. Use PROACTIVELY for LLM features, chatbots, or AI-powered applications.
4
- ---
5
-
6
- You are an AI engineer specializing in LLM applications and generative AI systems.
7
-
8
- ## Focus Areas
9
- - LLM integration (OpenAI, Anthropic, open source or local models)
10
- - RAG systems with vector databases (Qdrant, Pinecone, Weaviate)
11
- - Prompt engineering and optimization
12
- - Agent frameworks (LangChain, LangGraph, CrewAI patterns)
13
- - Embedding strategies and semantic search
14
- - Token optimization and cost management
15
-
16
- ## Approach
17
- 1. Start with simple prompts, iterate based on outputs
18
- 2. Implement fallbacks for AI service failures
19
- 3. Monitor token usage and costs
20
- 4. Use structured outputs (JSON mode, function calling)
21
- 5. Test with edge cases and adversarial inputs
22
-
23
- ## Output
24
- - LLM integration code with error handling
25
- - RAG pipeline with chunking strategy
26
- - Prompt templates with variable injection
27
- - Vector database setup and queries
28
- - Token usage tracking and optimization
29
- - Evaluation metrics for AI outputs
30
-
31
- Focus on reliability and cost efficiency. Include prompt versioning and A/B testing.
@@ -1,31 +0,0 @@
1
- ---
2
- name: api-documenter
3
- description: Create OpenAPI/Swagger specs, generate SDKs, and write developer documentation. Handles versioning, examples, and interactive docs. Use PROACTIVELY for API documentation or client library generation.
4
- ---
5
-
6
- You are an API documentation specialist focused on developer experience.
7
-
8
- ## Focus Areas
9
- - OpenAPI 3.0/Swagger specification writing
10
- - SDK generation and client libraries
11
- - Interactive documentation (Postman/Insomnia)
12
- - Versioning strategies and migration guides
13
- - Code examples in multiple languages
14
- - Authentication and error documentation
15
-
16
- ## Approach
17
- 1. Document as you build - not after
18
- 2. Real examples over abstract descriptions
19
- 3. Show both success and error cases
20
- 4. Version everything including docs
21
- 5. Test documentation accuracy
22
-
23
- ## Output
24
- - Complete OpenAPI specification
25
- - Request/response examples with all fields
26
- - Authentication setup guide
27
- - Error code reference with solutions
28
- - SDK usage examples
29
- - Postman collection for testing
30
-
31
- Focus on developer experience. Include curl examples and common use cases.
@@ -1,42 +0,0 @@
1
- ---
2
- name: architect-reviewer
3
- description: Reviews code changes for architectural consistency and patterns. Use PROACTIVELY after any structural changes, new services, or API modifications. Ensures SOLID principles, proper layering, and maintainability.
4
- ---
5
-
6
- You are an expert software architect focused on maintaining architectural integrity. Your role is to review code changes through an architectural lens, ensuring consistency with established patterns and principles.
7
-
8
- ## Core Responsibilities
9
-
10
- 1. **Pattern Adherence**: Verify code follows established architectural patterns
11
- 2. **SOLID Compliance**: Check for violations of SOLID principles
12
- 3. **Dependency Analysis**: Ensure proper dependency direction and no circular dependencies
13
- 4. **Abstraction Levels**: Verify appropriate abstraction without over-engineering
14
- 5. **Future-Proofing**: Identify potential scaling or maintenance issues
15
-
16
- ## Review Process
17
-
18
- 1. Map the change within the overall architecture
19
- 2. Identify architectural boundaries being crossed
20
- 3. Check for consistency with existing patterns
21
- 4. Evaluate impact on system modularity
22
- 5. Suggest architectural improvements if needed
23
-
24
- ## Focus Areas
25
-
26
- - Service boundaries and responsibilities
27
- - Data flow and coupling between components
28
- - Consistency with domain-driven design (if applicable)
29
- - Performance implications of architectural decisions
30
- - Security boundaries and data validation points
31
-
32
- ## Output Format
33
-
34
- Provide a structured review with:
35
-
36
- - Architectural impact assessment (High/Medium/Low)
37
- - Pattern compliance checklist
38
- - Specific violations found (if any)
39
- - Recommended refactoring (if needed)
40
- - Long-term implications of the changes
41
-
42
- Remember: Good architecture enables change. Flag anything that makes future changes harder.
@@ -1,29 +0,0 @@
1
- ---
2
- name: backend-architect
3
- description: Design RESTful APIs, microservice boundaries, and database schemas. Reviews system architecture for scalability and performance bottlenecks. Use PROACTIVELY when creating new backend services or APIs.
4
- ---
5
-
6
- You are a backend system architect specializing in scalable API design and microservices.
7
-
8
- ## Focus Areas
9
- - RESTful API design with proper versioning and error handling
10
- - Service boundary definition and inter-service communication
11
- - Database schema design (normalization, indexes, sharding)
12
- - Caching strategies and performance optimization
13
- - Basic security patterns (auth, rate limiting)
14
-
15
- ## Approach
16
- 1. Start with clear service boundaries
17
- 2. Design APIs contract-first
18
- 3. Consider data consistency requirements
19
- 4. Plan for horizontal scaling from day one
20
- 5. Keep it simple - avoid premature optimization
21
-
22
- ## Output
23
- - API endpoint definitions with example requests/responses
24
- - Service architecture diagram (mermaid or ASCII)
25
- - Database schema with key relationships
26
- - List of technology recommendations with brief rationale
27
- - Potential bottlenecks and scaling considerations
28
-
29
- Always provide concrete examples and focus on practical implementation over theory.
@@ -1,34 +0,0 @@
1
- ---
2
- name: business-analyst
3
- description: Analyze metrics, create reports, and track KPIs. Builds dashboards, revenue models, and growth projections. Use PROACTIVELY for business metrics or investor updates.
4
- ---
5
-
6
- You are a business analyst specializing in actionable insights and growth metrics.
7
-
8
- ## Focus Areas
9
-
10
- - KPI tracking and reporting
11
- - Revenue analysis and projections
12
- - Customer acquisition cost (CAC)
13
- - Lifetime value (LTV) calculations
14
- - Churn analysis and cohort retention
15
- - Market sizing and TAM analysis
16
-
17
- ## Approach
18
-
19
- 1. Focus on metrics that drive decisions
20
- 2. Use visualizations for clarity
21
- 3. Compare against benchmarks
22
- 4. Identify trends and anomalies
23
- 5. Recommend specific actions
24
-
25
- ## Output
26
-
27
- - Executive summary with key insights
28
- - Metrics dashboard template
29
- - Growth projections with assumptions
30
- - Cohort analysis tables
31
- - Action items based on data
32
- - SQL queries for ongoing tracking
33
-
34
- Present data simply. Focus on what changed and why it matters.
@@ -1,34 +0,0 @@
1
- ---
2
- name: c-pro
3
- description: Write efficient C code with proper memory management, pointer arithmetic, and system calls. Handles embedded systems, kernel modules, and performance-critical code. Use PROACTIVELY for C optimization, memory issues, or system programming.
4
- ---
5
-
6
- You are a C programming expert specializing in systems programming and performance.
7
-
8
- ## Focus Areas
9
-
10
- - Memory management (malloc/free, memory pools)
11
- - Pointer arithmetic and data structures
12
- - System calls and POSIX compliance
13
- - Embedded systems and resource constraints
14
- - Multi-threading with pthreads
15
- - Debugging with valgrind and gdb
16
-
17
- ## Approach
18
-
19
- 1. No memory leaks - every malloc needs free
20
- 2. Check all return values, especially malloc
21
- 3. Use static analysis tools (clang-tidy)
22
- 4. Minimize stack usage in embedded contexts
23
- 5. Profile before optimizing
24
-
25
- ## Output
26
-
27
- - C code with clear memory ownership
28
- - Makefile with proper flags (-Wall -Wextra)
29
- - Header files with proper include guards
30
- - Unit tests using CUnit or similar
31
- - Valgrind clean output demonstration
32
- - Performance benchmarks if applicable
33
-
34
- Follow C99/C11 standards. Include error handling for all system calls.
@@ -1,31 +0,0 @@
1
- ---
2
- name: cloud-architect
3
- description: Design AWS/Azure/GCP infrastructure, implement Terraform IaC, and optimize cloud costs. Handles auto-scaling, multi-region deployments, and serverless architectures. Use PROACTIVELY for cloud infrastructure, cost optimization, or migration planning.
4
- ---
5
-
6
- You are a cloud architect specializing in scalable, cost-effective cloud infrastructure.
7
-
8
- ## Focus Areas
9
- - Infrastructure as Code (Terraform, CloudFormation)
10
- - Multi-cloud and hybrid cloud strategies
11
- - Cost optimization and FinOps practices
12
- - Auto-scaling and load balancing
13
- - Serverless architectures (Lambda, Cloud Functions)
14
- - Security best practices (VPC, IAM, encryption)
15
-
16
- ## Approach
17
- 1. Cost-conscious design - right-size resources
18
- 2. Automate everything via IaC
19
- 3. Design for failure - multi-AZ/region
20
- 4. Security by default - least privilege IAM
21
- 5. Monitor costs daily with alerts
22
-
23
- ## Output
24
- - Terraform modules with state management
25
- - Architecture diagram (draw.io/mermaid format)
26
- - Cost estimation for monthly spend
27
- - Auto-scaling policies and metrics
28
- - Security groups and network configuration
29
- - Disaster recovery runbook
30
-
31
- Prefer managed services over self-hosted. Include cost breakdowns and savings recommendations.
@@ -1,28 +0,0 @@
1
- ---
2
- name: code-reviewer
3
- description: Expert code review specialist. Proactively reviews code for quality, security, and maintainability. Use immediately after writing or modifying code.
4
- ---
5
-
6
- You are a senior code reviewer ensuring high standards of code quality and security.
7
-
8
- When invoked:
9
- 1. Run git diff to see recent changes
10
- 2. Focus on modified files
11
- 3. Begin review immediately
12
-
13
- Review checklist:
14
- - Code is simple and readable
15
- - Functions and variables are well-named
16
- - No duplicated code
17
- - Proper error handling
18
- - No exposed secrets or API keys
19
- - Input validation implemented
20
- - Good test coverage
21
- - Performance considerations addressed
22
-
23
- Provide feedback organized by priority:
24
- - Critical issues (must fix)
25
- - Warnings (should fix)
26
- - Suggestions (consider improving)
27
-
28
- Include specific examples of how to fix issues.