@cloudstreamsoftware/claude-tools 1.0.0 → 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 (190) hide show
  1. package/README.md +152 -37
  2. package/agents/INDEX.md +183 -0
  3. package/agents/architect.md +247 -0
  4. package/agents/build-error-resolver.md +555 -0
  5. package/agents/catalyst-deployer.md +132 -0
  6. package/agents/code-reviewer.md +121 -0
  7. package/agents/compliance-auditor.md +148 -0
  8. package/agents/creator-architect.md +395 -0
  9. package/agents/deluge-reviewer.md +98 -0
  10. package/agents/doc-updater.md +471 -0
  11. package/agents/e2e-runner.md +711 -0
  12. package/agents/planner.md +122 -0
  13. package/agents/refactor-cleaner.md +309 -0
  14. package/agents/security-reviewer.md +582 -0
  15. package/agents/tdd-guide.md +302 -0
  16. package/bin/cloudstream-setup.js +16 -6
  17. package/config/versions.json +63 -0
  18. package/dist/hooks/hooks.json +209 -0
  19. package/dist/index.js +47 -0
  20. package/dist/lib/asset-value.js +609 -0
  21. package/dist/lib/client-manager.js +300 -0
  22. package/dist/lib/command-matcher.js +242 -0
  23. package/dist/lib/cross-session-patterns.js +754 -0
  24. package/dist/lib/intent-classifier.js +1075 -0
  25. package/dist/lib/package-manager.js +374 -0
  26. package/dist/lib/recommendation-engine.js +597 -0
  27. package/dist/lib/session-memory.js +489 -0
  28. package/dist/lib/skill-effectiveness.js +486 -0
  29. package/dist/lib/skill-matcher.js +595 -0
  30. package/dist/lib/tutorial-metrics.js +242 -0
  31. package/dist/lib/tutorial-progress.js +209 -0
  32. package/dist/lib/tutorial-renderer.js +431 -0
  33. package/dist/lib/utils.js +380 -0
  34. package/dist/lib/verify-formatter.js +143 -0
  35. package/dist/lib/workflow-state.js +249 -0
  36. package/hooks/hooks.json +209 -0
  37. package/package.json +5 -1
  38. package/scripts/aggregate-sessions.js +290 -0
  39. package/scripts/branch-name-validator.js +291 -0
  40. package/scripts/build.js +101 -0
  41. package/scripts/commands/client-switch.js +231 -0
  42. package/scripts/deprecate-skill.js +610 -0
  43. package/scripts/diagnose.js +324 -0
  44. package/scripts/doc-freshness.js +168 -0
  45. package/scripts/generate-weekly-digest.js +393 -0
  46. package/scripts/health-check.js +270 -0
  47. package/scripts/hooks/credential-check.js +101 -0
  48. package/scripts/hooks/evaluate-session.js +81 -0
  49. package/scripts/hooks/pre-compact.js +66 -0
  50. package/scripts/hooks/prompt-analyzer.js +276 -0
  51. package/scripts/hooks/prompt-router.js +422 -0
  52. package/scripts/hooks/quality-gate-enforcer.js +371 -0
  53. package/scripts/hooks/session-end.js +156 -0
  54. package/scripts/hooks/session-start.js +195 -0
  55. package/scripts/hooks/skill-injector.js +333 -0
  56. package/scripts/hooks/suggest-compact.js +58 -0
  57. package/scripts/lib/asset-value.js +609 -0
  58. package/scripts/lib/client-manager.js +300 -0
  59. package/scripts/lib/command-matcher.js +242 -0
  60. package/scripts/lib/cross-session-patterns.js +754 -0
  61. package/scripts/lib/intent-classifier.js +1075 -0
  62. package/scripts/lib/package-manager.js +374 -0
  63. package/scripts/lib/recommendation-engine.js +597 -0
  64. package/scripts/lib/session-memory.js +489 -0
  65. package/scripts/lib/skill-effectiveness.js +486 -0
  66. package/scripts/lib/skill-matcher.js +595 -0
  67. package/scripts/lib/tutorial-metrics.js +242 -0
  68. package/scripts/lib/tutorial-progress.js +209 -0
  69. package/scripts/lib/tutorial-renderer.js +431 -0
  70. package/scripts/lib/utils.js +380 -0
  71. package/scripts/lib/verify-formatter.js +143 -0
  72. package/scripts/lib/workflow-state.js +249 -0
  73. package/scripts/onboard.js +363 -0
  74. package/scripts/quarterly-report.js +692 -0
  75. package/scripts/setup-package-manager.js +204 -0
  76. package/scripts/sync-upstream.js +391 -0
  77. package/scripts/test.js +108 -0
  78. package/scripts/tutorial-runner.js +351 -0
  79. package/scripts/validate-all.js +201 -0
  80. package/scripts/verifiers/agents.js +245 -0
  81. package/scripts/verifiers/config.js +186 -0
  82. package/scripts/verifiers/environment.js +123 -0
  83. package/scripts/verifiers/hooks.js +188 -0
  84. package/scripts/verifiers/index.js +38 -0
  85. package/scripts/verifiers/persistence.js +140 -0
  86. package/scripts/verifiers/plugin.js +215 -0
  87. package/scripts/verifiers/skills.js +209 -0
  88. package/scripts/verify-setup.js +164 -0
  89. package/skills/INDEX.md +157 -0
  90. package/skills/backend-patterns/SKILL.md +586 -0
  91. package/skills/backend-patterns/catalyst-patterns.md +128 -0
  92. package/skills/bigquery-patterns/SKILL.md +27 -0
  93. package/skills/bigquery-patterns/performance-optimization.md +518 -0
  94. package/skills/bigquery-patterns/query-patterns.md +372 -0
  95. package/skills/bigquery-patterns/schema-design.md +78 -0
  96. package/skills/cloudstream-project-template/SKILL.md +20 -0
  97. package/skills/cloudstream-project-template/structure.md +65 -0
  98. package/skills/coding-standards/SKILL.md +524 -0
  99. package/skills/coding-standards/deluge-standards.md +83 -0
  100. package/skills/compliance-patterns/SKILL.md +28 -0
  101. package/skills/compliance-patterns/hipaa/audit-requirements.md +251 -0
  102. package/skills/compliance-patterns/hipaa/baa-process.md +298 -0
  103. package/skills/compliance-patterns/hipaa/data-archival-strategy.md +387 -0
  104. package/skills/compliance-patterns/hipaa/phi-handling.md +52 -0
  105. package/skills/compliance-patterns/pci-dss/saq-a-requirements.md +307 -0
  106. package/skills/compliance-patterns/pci-dss/tokenization-patterns.md +382 -0
  107. package/skills/compliance-patterns/pci-dss/zoho-checkout-patterns.md +56 -0
  108. package/skills/compliance-patterns/soc2/access-controls.md +344 -0
  109. package/skills/compliance-patterns/soc2/audit-logging.md +458 -0
  110. package/skills/compliance-patterns/soc2/change-management.md +403 -0
  111. package/skills/compliance-patterns/soc2/deluge-execution-logging.md +407 -0
  112. package/skills/consultancy-workflows/SKILL.md +19 -0
  113. package/skills/consultancy-workflows/client-isolation.md +21 -0
  114. package/skills/consultancy-workflows/documentation-automation.md +454 -0
  115. package/skills/consultancy-workflows/handoff-procedures.md +257 -0
  116. package/skills/consultancy-workflows/knowledge-capture.md +513 -0
  117. package/skills/consultancy-workflows/time-tracking.md +26 -0
  118. package/skills/continuous-learning/SKILL.md +84 -0
  119. package/skills/continuous-learning/config.json +18 -0
  120. package/skills/continuous-learning/evaluate-session.sh +60 -0
  121. package/skills/continuous-learning-v2/SKILL.md +126 -0
  122. package/skills/continuous-learning-v2/config.json +61 -0
  123. package/skills/frontend-patterns/SKILL.md +635 -0
  124. package/skills/frontend-patterns/zoho-widget-patterns.md +103 -0
  125. package/skills/gcp-data-engineering/SKILL.md +36 -0
  126. package/skills/gcp-data-engineering/bigquery/performance-optimization.md +337 -0
  127. package/skills/gcp-data-engineering/dataflow/error-handling.md +496 -0
  128. package/skills/gcp-data-engineering/dataflow/pipeline-patterns.md +444 -0
  129. package/skills/gcp-data-engineering/dbt/model-organization.md +63 -0
  130. package/skills/gcp-data-engineering/dbt/testing-patterns.md +503 -0
  131. package/skills/gcp-data-engineering/medallion-architecture/bronze-layer.md +60 -0
  132. package/skills/gcp-data-engineering/medallion-architecture/gold-layer.md +311 -0
  133. package/skills/gcp-data-engineering/medallion-architecture/layer-transitions.md +517 -0
  134. package/skills/gcp-data-engineering/medallion-architecture/silver-layer.md +305 -0
  135. package/skills/gcp-data-engineering/zoho-to-gcp/data-extraction.md +543 -0
  136. package/skills/gcp-data-engineering/zoho-to-gcp/real-time-vs-batch.md +337 -0
  137. package/skills/security-review/SKILL.md +498 -0
  138. package/skills/security-review/compliance-checklist.md +53 -0
  139. package/skills/strategic-compact/SKILL.md +67 -0
  140. package/skills/tdd-workflow/SKILL.md +413 -0
  141. package/skills/tdd-workflow/zoho-testing.md +124 -0
  142. package/skills/tutorial/SKILL.md +249 -0
  143. package/skills/tutorial/docs/ACCESSIBILITY.md +169 -0
  144. package/skills/tutorial/lessons/00-philosophy-and-workflow.md +198 -0
  145. package/skills/tutorial/lessons/01-basics.md +81 -0
  146. package/skills/tutorial/lessons/02-training.md +86 -0
  147. package/skills/tutorial/lessons/03-commands.md +109 -0
  148. package/skills/tutorial/lessons/04-workflows.md +115 -0
  149. package/skills/tutorial/lessons/05-compliance.md +116 -0
  150. package/skills/tutorial/lessons/06-zoho.md +121 -0
  151. package/skills/tutorial/lessons/07-hooks-system.md +277 -0
  152. package/skills/tutorial/lessons/08-mcp-servers.md +316 -0
  153. package/skills/tutorial/lessons/09-client-management.md +215 -0
  154. package/skills/tutorial/lessons/10-testing-e2e.md +260 -0
  155. package/skills/tutorial/lessons/11-skills-deep-dive.md +272 -0
  156. package/skills/tutorial/lessons/12-rules-system.md +326 -0
  157. package/skills/tutorial/lessons/13-golden-standard-graduation.md +213 -0
  158. package/skills/tutorial/lessons/14-fork-setup-and-sync.md +312 -0
  159. package/skills/tutorial/lessons/15-living-examples-system.md +221 -0
  160. package/skills/tutorial/tracks/accelerated/README.md +134 -0
  161. package/skills/tutorial/tracks/accelerated/assessment/checkpoint-1.md +161 -0
  162. package/skills/tutorial/tracks/accelerated/assessment/checkpoint-2.md +175 -0
  163. package/skills/tutorial/tracks/accelerated/day-1-core-concepts.md +234 -0
  164. package/skills/tutorial/tracks/accelerated/day-2-essential-commands.md +270 -0
  165. package/skills/tutorial/tracks/accelerated/day-3-workflow-mastery.md +305 -0
  166. package/skills/tutorial/tracks/accelerated/day-4-compliance-zoho.md +304 -0
  167. package/skills/tutorial/tracks/accelerated/day-5-hooks-skills.md +344 -0
  168. package/skills/tutorial/tracks/accelerated/day-6-client-testing.md +386 -0
  169. package/skills/tutorial/tracks/accelerated/day-7-graduation.md +369 -0
  170. package/skills/zoho-patterns/CHANGELOG.md +108 -0
  171. package/skills/zoho-patterns/SKILL.md +446 -0
  172. package/skills/zoho-patterns/analytics/dashboard-patterns.md +352 -0
  173. package/skills/zoho-patterns/analytics/zoho-to-bigquery-pipeline.md +427 -0
  174. package/skills/zoho-patterns/catalyst/appsail-deployment.md +349 -0
  175. package/skills/zoho-patterns/catalyst/context-close-patterns.md +354 -0
  176. package/skills/zoho-patterns/catalyst/cron-batch-processing.md +374 -0
  177. package/skills/zoho-patterns/catalyst/function-patterns.md +439 -0
  178. package/skills/zoho-patterns/creator/form-design.md +304 -0
  179. package/skills/zoho-patterns/creator/publish-api-patterns.md +313 -0
  180. package/skills/zoho-patterns/creator/widget-integration.md +306 -0
  181. package/skills/zoho-patterns/creator/workflow-automation.md +253 -0
  182. package/skills/zoho-patterns/deluge/api-patterns.md +468 -0
  183. package/skills/zoho-patterns/deluge/batch-processing.md +403 -0
  184. package/skills/zoho-patterns/deluge/cross-app-integration.md +356 -0
  185. package/skills/zoho-patterns/deluge/error-handling.md +423 -0
  186. package/skills/zoho-patterns/deluge/syntax-reference.md +65 -0
  187. package/skills/zoho-patterns/integration/cors-proxy-architecture.md +426 -0
  188. package/skills/zoho-patterns/integration/crm-books-native-sync.md +277 -0
  189. package/skills/zoho-patterns/integration/oauth-token-management.md +461 -0
  190. package/skills/zoho-patterns/integration/zoho-flow-patterns.md +334 -0
package/README.md CHANGED
@@ -1,74 +1,189 @@
1
- # @cloudstream/claude-tools
1
+ # @cloudstreamsoftware/claude-tools
2
2
 
3
- CloudStream Software's Claude Code productivity tools for Zoho development.
3
+ [![npm version](https://img.shields.io/npm/v/@cloudstreamsoftware/claude-tools.svg)](https://www.npmjs.com/package/@cloudstreamsoftware/claude-tools)
4
+ [![Node.js](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg)](https://nodejs.org/)
5
+ [![License](https://img.shields.io/badge/license-proprietary-red.svg)](LICENSE)
6
+
7
+ Enterprise-grade Claude Code productivity tools for Zoho development with secure knowledge server integration.
4
8
 
5
9
  ## Features
6
10
 
7
- - **Prompt Routing**: Intelligent classification of your requests
8
- - **Quality Gates**: Automatic credential scanning and code validation
9
- - **Knowledge Server**: Access to CloudStream's Zoho/Deluge pattern library
10
- - **Compliance Support**: HIPAA, SOC2, PCI-DSS workflow guidance
11
+ - **Knowledge Server** - MCP integration with CloudStream's Zoho/Deluge pattern library
12
+ - **36 Slash Commands** - Development workflow, testing, compliance, and more
13
+ - **15 Auto-Activated Skills** - Context-aware assistance for Zoho, GCP, compliance
14
+ - **13 Specialized Agents** - From planning to deployment
15
+ - **Compliance Support** - HIPAA, SOC2, PCI-DSS workflow guidance
16
+ - **Quality Gates** - Automatic credential scanning and code validation
11
17
 
12
- ## Installation
18
+ ## Quick Start
13
19
 
14
20
  ```bash
15
- npm install @cloudstream/claude-tools
21
+ # Install the package
22
+ npm install @cloudstreamsoftware/claude-tools
23
+
24
+ # Run the setup wizard
16
25
  npx cloudstream-setup
17
26
  ```
18
27
 
19
- ## Setup Wizard
20
-
21
28
  The setup wizard will:
29
+ 1. Validate your CloudStream license key
30
+ 2. Configure MCP connection to the Knowledge Server
31
+ 3. Install hooks, skills, and agents to `~/.claude/`
22
32
 
23
- 1. **Detect installation type** - Internal (CloudStream employee) or Client
24
- 2. **Validate license** - Verify your CloudStream license key
25
- 3. **Configure MCP** - Connect to the CloudStream Knowledge Server
26
- 4. **Install tools** - Set up hooks, skills, and agents in ~/.claude/
27
-
28
- ## Usage
29
-
30
- After setup, start a new Claude Code session in any project:
33
+ After setup, start Claude Code in any project:
31
34
 
32
35
  ```bash
33
36
  claude
34
37
  ```
35
38
 
36
- The CloudStream tools are now available globally.
37
-
38
- ### Knowledge Server
39
-
40
- Ask about Zoho/Deluge patterns and the knowledge server will provide synthesized guidance:
41
-
39
+ ## Commands
40
+
41
+ 36 slash commands for every stage of development:
42
+
43
+ | Command | Description |
44
+ |---------|-------------|
45
+ | `/plan` | Create implementation plan |
46
+ | `/tdd` | Test-driven development workflow |
47
+ | `/build-fix` | Fix TypeScript and build errors |
48
+ | `/code-review` | Security and quality review |
49
+ | `/verify` | Run comprehensive verification |
50
+ | `/pr-ready` | Pre-PR validation checklist |
51
+ | `/compliance-check` | Run compliance audit |
52
+ | `/e2e` | Generate and run E2E tests |
53
+ | `/test-coverage` | Analyze and improve coverage |
54
+ | `/zoho-scaffold` | Scaffold Zoho components |
55
+ | `/deluge` | Generate/fix Deluge scripts |
56
+ | `/checkpoint` | Create workflow checkpoint |
57
+ | `/handoff` | Generate client handoff docs |
58
+ | `/diagnose` | Deep diagnostic troubleshooting |
59
+ | `/health-check` | System health verification |
60
+ | `/tutorial` | Interactive system tutorial |
61
+ | `/learn` | Extract reusable patterns |
62
+ | `/skill-sync` | Pull shared skills from repo |
63
+ | `/skill-submit` | Submit skills to team repo |
64
+ | `/instinct-status` | View learned instincts |
65
+ | `/instinct-export` | Export instincts for sharing |
66
+ | `/instinct-import` | Import instincts from teammates |
67
+ | `/evolve` | Cluster instincts into commands/skills |
68
+ | `/eval` | Eval-driven development workflow |
69
+ | `/client-switch` | Switch to client context |
70
+ | `/create-branch` | Create properly-named git branch |
71
+ | `/refactor-clean` | Remove dead code safely |
72
+ | `/update-codemaps` | Update architecture docs |
73
+ | `/update-docs` | Sync documentation |
74
+ | `/orchestrate` | Sequential agent workflow |
75
+ | `/quarterly-review` | Review skill effectiveness |
76
+ | `/skill-create` | Generate SKILL.md from git history |
77
+ | `/onboard` | Interactive setup wizard |
78
+ | `/verify-setup` | Verify plugin configuration |
79
+ | `/team-admin` | Team administration tools |
80
+ | `/setup-pm` | Configure package manager |
81
+
82
+ > Full documentation: [Commands Reference](commands/INDEX.md)
83
+
84
+ ## Skills
85
+
86
+ 15 skills that auto-activate based on context:
87
+
88
+ | Skill | Auto-Activates When |
89
+ |-------|---------------------|
90
+ | `zoho-patterns` | Working with Zoho Creator, Catalyst, Deluge |
91
+ | `bigquery-patterns` | BigQuery queries, `.sql` files |
92
+ | `gcp-data-engineering` | GCP/Dataflow/dbt tasks |
93
+ | `compliance-patterns` | Compliance mode active (HIPAA/SOC2/PCI-DSS) |
94
+ | `backend-patterns` | Backend file types (Node.js, APIs) |
95
+ | `frontend-patterns` | Frontend file types (React, Next.js) |
96
+ | `coding-standards` | All code files |
97
+ | `security-review` | Auth, secrets, API code |
98
+ | `tdd-workflow` | Feature development |
99
+ | `consultancy-workflows` | Client context |
100
+ | `cloudstream-project-template` | New project setup |
101
+ | `continuous-learning` | Session end |
102
+ | `continuous-learning-v2` | Session hooks |
103
+ | `strategic-compact` | Long sessions |
104
+ | `tutorial` | `/tutorial` command |
105
+
106
+ > Full documentation: [Skills Reference](skills/INDEX.md)
107
+
108
+ ## Agents
109
+
110
+ 13 specialized agents for different tasks:
111
+
112
+ | Agent | Triggered By | Purpose |
113
+ |-------|--------------|---------|
114
+ | `planner` | `/plan`, `/orchestrate` | Implementation planning |
115
+ | `architect` | `/orchestrate` | System design decisions |
116
+ | `creator-architect` | `/zoho-scaffold` | Zoho Creator app architecture |
117
+ | `tdd-guide` | `/tdd`, `/test-coverage` | Test-driven development |
118
+ | `code-reviewer` | `/code-review` | Code quality review |
119
+ | `security-reviewer` | `/code-review` | Security vulnerability detection |
120
+ | `compliance-auditor` | `/compliance-check` | HIPAA/SOC2/PCI-DSS audits |
121
+ | `deluge-reviewer` | `/deluge` | Deluge script validation |
122
+ | `build-error-resolver` | `/build-fix` | Build and TypeScript fixes |
123
+ | `catalyst-deployer` | `/zoho-scaffold` | Catalyst deployment |
124
+ | `e2e-runner` | `/e2e` | Playwright E2E testing |
125
+ | `refactor-cleaner` | `/refactor-clean` | Dead code removal |
126
+ | `doc-updater` | `/update-docs`, `/handoff` | Documentation sync |
127
+
128
+ > Full documentation: [Agents Reference](agents/INDEX.md)
129
+
130
+ ## Knowledge Server
131
+
132
+ The Knowledge Server provides access to CloudStream's curated Zoho/Deluge pattern library via MCP (Model Context Protocol).
133
+
134
+ **Example queries:**
42
135
  ```
43
136
  "How do I create a workflow that syncs CRM to Books?"
44
137
  "What's the best practice for API calls in Deluge?"
45
138
  "How do I handle errors in scheduled functions?"
139
+ "What are the Catalyst deployment limits?"
46
140
  ```
47
141
 
48
- ### Available Commands
49
-
50
- - `/help` - Show available commands
51
- - `/diagnose` - Check system status
52
- - `/checkpoint` - Create a session checkpoint
53
- - `/handoff` - Generate session handoff notes
142
+ The server returns synthesized guidance based on proven patterns - raw patterns never leave the server.
54
143
 
55
144
  ## Security
56
145
 
57
- - **No local caching** of proprietary knowledge data
58
- - **Synthesized responses only** - raw patterns never leave the server
59
- - **Short-lived tokens** - 15-minute OAuth 2.1 access tokens
60
- - **Audit trail** - all queries logged for compliance
146
+ - **No local caching** - Proprietary knowledge data stays on the server
147
+ - **Synthesized responses only** - Raw patterns never exposed
148
+ - **Short-lived tokens** - 15-minute OAuth 2.1 access tokens with PKCE
149
+ - **Audit trail** - All queries logged for compliance
150
+ - **Credential scanning** - Pre-commit hooks block hardcoded secrets
151
+
152
+ ## Troubleshooting
153
+
154
+ ### License validation failed
155
+ Verify your license key with your CloudStream administrator. Keys expire and may need renewal.
156
+
157
+ ### Knowledge Server connection issues
158
+ ```bash
159
+ # Check system status
160
+ claude
161
+ /diagnose
162
+ ```
163
+
164
+ ### Setup wizard not completing
165
+ Ensure you have Node.js 18+ and a valid internet connection for license validation.
166
+
167
+ ### Commands not available
168
+ Run the setup wizard again:
169
+ ```bash
170
+ npx cloudstream-setup
171
+ ```
61
172
 
62
173
  ## Requirements
63
174
 
64
175
  - Node.js 18.0.0 or higher
65
- - Claude Code CLI installed
176
+ - Claude Code CLI installed (`npm install -g @anthropic-ai/claude-code`)
66
177
  - Valid CloudStream license key
67
178
 
68
179
  ## Support
69
180
 
70
- Contact your CloudStream administrator for license keys and support.
181
+ Contact your CloudStream administrator for:
182
+ - License keys and renewals
183
+ - Access issues
184
+ - Feature requests
185
+ - Bug reports
71
186
 
72
187
  ## License
73
188
 
74
- UNLICENSED - CloudStream Software proprietary.
189
+ Proprietary - CloudStream Software. All rights reserved.
@@ -0,0 +1,183 @@
1
+ # Agent Index
2
+
3
+ This directory contains 13 specialized agents for the CloudStream Claude Code configuration.
4
+
5
+ ---
6
+
7
+ ## Quick Reference
8
+
9
+ | Agent | Model | Trigger Command | Purpose |
10
+ |-------|-------|-----------------|---------|
11
+ | [planner](planner.md) | Opus | `/plan`, `/orchestrate` | Implementation planning for complex features |
12
+ | [architect](architect.md) | Opus | `/orchestrate` | System design, scalability, technical decisions |
13
+ | [creator-architect](creator-architect.md) | Opus | `/zoho-scaffold` | Zoho Creator app architecture |
14
+ | [security-reviewer](security-reviewer.md) | Opus | `/code-review` | Security vulnerability detection |
15
+ | [compliance-auditor](compliance-auditor.md) | Opus | `/compliance-check` | HIPAA/SOC2/PCI-DSS audits |
16
+ | [code-reviewer](code-reviewer.md) | Sonnet | `/code-review` | Code quality and maintainability |
17
+ | [deluge-reviewer](deluge-reviewer.md) | Sonnet | `/deluge` | Deluge script validation |
18
+ | [tdd-guide](tdd-guide.md) | Sonnet | `/tdd`, `/test-coverage` | Test-driven development |
19
+ | [build-error-resolver](build-error-resolver.md) | Sonnet | `/build-fix` | Build and TypeScript error fixes |
20
+ | [catalyst-deployer](catalyst-deployer.md) | Sonnet | `/zoho-scaffold` | Catalyst deployment |
21
+ | [e2e-runner](e2e-runner.md) | Sonnet | `/e2e` | Playwright E2E testing |
22
+ | [refactor-cleaner](refactor-cleaner.md) | Sonnet | `/refactor-clean` | Dead code removal |
23
+ | [doc-updater](doc-updater.md) | Sonnet | `/update-docs`, `/update-codemaps`, `/handoff` | Documentation sync |
24
+
25
+ ---
26
+
27
+ ## Agents by Model
28
+
29
+ ### Opus (High-capability tasks)
30
+
31
+ | Agent | Use Case |
32
+ |-------|----------|
33
+ | **planner** | Complex feature planning, multi-phase implementation |
34
+ | **architect** | System design decisions, architectural reviews |
35
+ | **creator-architect** | Zoho Creator/Catalyst application design |
36
+ | **security-reviewer** | Security vulnerability analysis, OWASP Top 10 |
37
+ | **compliance-auditor** | Regulatory compliance audits |
38
+
39
+ ### Sonnet (Standard tasks)
40
+
41
+ | Agent | Use Case |
42
+ |-------|----------|
43
+ | **code-reviewer** | Code quality, best practices, maintainability |
44
+ | **deluge-reviewer** | Deluge script validation, 5000-statement limit |
45
+ | **tdd-guide** | Test-driven development, coverage enforcement |
46
+ | **build-error-resolver** | Build fixes, TypeScript errors |
47
+ | **catalyst-deployer** | Catalyst AppSail/Functions deployment |
48
+ | **e2e-runner** | Playwright test generation and execution |
49
+ | **refactor-cleaner** | Dead code removal with knip/depcheck |
50
+ | **doc-updater** | Documentation generation, codemap updates |
51
+
52
+ ---
53
+
54
+ ## Agents by Domain
55
+
56
+ ### Development Workflow
57
+
58
+ | Agent | Role in Workflow |
59
+ |-------|------------------|
60
+ | planner | START: Plan implementation before coding |
61
+ | tdd-guide | Write tests first |
62
+ | code-reviewer | Review code after writing |
63
+ | build-error-resolver | Fix build errors |
64
+ | refactor-cleaner | Clean up dead code |
65
+
66
+ ### Zoho Platform
67
+
68
+ | Agent | Zoho Specialty |
69
+ |-------|----------------|
70
+ | creator-architect | Creator app architecture |
71
+ | deluge-reviewer | Deluge script validation |
72
+ | catalyst-deployer | Catalyst deployment |
73
+
74
+ ### Quality & Security
75
+
76
+ | Agent | Focus Area |
77
+ |-------|------------|
78
+ | security-reviewer | OWASP Top 10, vulnerability detection |
79
+ | compliance-auditor | HIPAA, SOC2, PCI-DSS |
80
+ | code-reviewer | Code quality, maintainability |
81
+
82
+ ### Testing
83
+
84
+ | Agent | Testing Type |
85
+ |-------|--------------|
86
+ | tdd-guide | Unit tests, integration tests |
87
+ | e2e-runner | End-to-end tests (Playwright) |
88
+
89
+ ### Documentation
90
+
91
+ | Agent | Documentation Type |
92
+ |-------|-------------------|
93
+ | doc-updater | READMEs, codemaps, handoffs |
94
+
95
+ ---
96
+
97
+ ## Agent Selection Guide
98
+
99
+ ### "Which agent should I use?"
100
+
101
+ | Scenario | Agent |
102
+ |----------|-------|
103
+ | Planning a new feature | planner |
104
+ | Designing system architecture | architect |
105
+ | Building a Zoho Creator app | creator-architect |
106
+ | Writing Deluge scripts | deluge-reviewer |
107
+ | Deploying to Catalyst | catalyst-deployer |
108
+ | Reviewing my code | code-reviewer |
109
+ | Checking for security issues | security-reviewer |
110
+ | Running compliance audit | compliance-auditor |
111
+ | Writing tests first | tdd-guide |
112
+ | Generating E2E tests | e2e-runner |
113
+ | Fixing build errors | build-error-resolver |
114
+ | Removing dead code | refactor-cleaner |
115
+ | Updating documentation | doc-updater |
116
+
117
+ ---
118
+
119
+ ## Agent Orchestration
120
+
121
+ Agents can be chained via `/orchestrate` for complex tasks:
122
+
123
+ ### Feature Implementation Chain
124
+ ```
125
+ planner → tdd-guide → code-reviewer → security-reviewer
126
+ ```
127
+
128
+ ### Zoho Development Chain
129
+ ```
130
+ creator-architect → deluge-reviewer → catalyst-deployer
131
+ ```
132
+
133
+ ### Quality Gate Chain
134
+ ```
135
+ code-reviewer → security-reviewer → compliance-auditor
136
+ ```
137
+
138
+ ---
139
+
140
+ ## Tools Available to Agents
141
+
142
+ | Agent | Tools |
143
+ |-------|-------|
144
+ | planner | Read, Grep, Glob |
145
+ | architect | Read, Grep, Glob |
146
+ | creator-architect | Read, Grep, Glob |
147
+ | security-reviewer | Read, Bash, Grep, Glob |
148
+ | compliance-auditor | Read, Grep, Glob |
149
+ | code-reviewer | Read, Grep, Glob, Bash |
150
+ | deluge-reviewer | Read, Grep, Glob |
151
+ | tdd-guide | Read, Write, Edit, Bash, Grep |
152
+ | build-error-resolver | Read, Write, Edit, Bash, Grep, Glob |
153
+ | catalyst-deployer | Read, Bash, Grep |
154
+ | e2e-runner | Read, Bash, Grep, Glob |
155
+ | refactor-cleaner | Read, Write, Edit, Bash, Grep, Glob |
156
+ | doc-updater | Read, Write, Edit, Bash, Grep, Glob |
157
+
158
+ ---
159
+
160
+ ## Adding New Agents
161
+
162
+ To add a new agent:
163
+
164
+ 1. Create `agents/{agent-name}.md` with required frontmatter:
165
+ ```yaml
166
+ ---
167
+ name: agent-name
168
+ description: One-line description
169
+ version: 1.0.0
170
+ status: active
171
+ tools: Read, Grep, Glob
172
+ model: sonnet
173
+ ---
174
+ ```
175
+
176
+ 2. Add agent to command mapping in `/rules/agents.md`
177
+ 3. Create corresponding command in `/commands/` if needed
178
+ 4. Update this INDEX.md
179
+ 5. Update CLAUDE.md agent inventory
180
+ 6. Update README.md agent overview
181
+ 7. Run `npm test` to verify
182
+
183
+ See [CONTRIBUTING.md](../CONTRIBUTING.md) for full guidelines.
@@ -0,0 +1,247 @@
1
+ ---
2
+ name: architect
3
+ description: Software architecture specialist for system design, scalability, and technical decision-making. Use PROACTIVELY when planning new features, refactoring large systems, or making architectural decisions.
4
+ version: 1.0.0
5
+ status: active
6
+ introduced: 1.0.0
7
+ tools: Read, Grep, Glob
8
+ model: opus
9
+ ---
10
+
11
+ You are a senior software architect specializing in scalable, maintainable system design.
12
+
13
+ ## Your Role
14
+
15
+ - Design system architecture for new features
16
+ - Evaluate technical trade-offs
17
+ - Recommend patterns and best practices
18
+ - Identify scalability bottlenecks
19
+ - Plan for future growth
20
+ - Ensure consistency across codebase
21
+
22
+ ## Architecture Review Process
23
+
24
+ ### 1. Current State Analysis
25
+ - Review existing architecture
26
+ - Identify patterns and conventions
27
+ - Document technical debt
28
+ - Assess scalability limitations
29
+
30
+ ### 2. Requirements Gathering
31
+ - Functional requirements
32
+ - Non-functional requirements (performance, security, scalability)
33
+ - Integration points
34
+ - Data flow requirements
35
+
36
+ ### 3. Design Proposal
37
+ - High-level architecture diagram
38
+ - Component responsibilities
39
+ - Data models
40
+ - API contracts
41
+ - Integration patterns
42
+
43
+ ### 4. Trade-Off Analysis
44
+ For each design decision, document:
45
+ - **Pros**: Benefits and advantages
46
+ - **Cons**: Drawbacks and limitations
47
+ - **Alternatives**: Other options considered
48
+ - **Decision**: Final choice and rationale
49
+
50
+ ## Architectural Principles
51
+
52
+ ### 1. Modularity & Separation of Concerns
53
+ - Single Responsibility Principle
54
+ - High cohesion, low coupling
55
+ - Clear interfaces between components
56
+ - Independent deployability
57
+
58
+ ### 2. Scalability
59
+ - Horizontal scaling capability
60
+ - Stateless design where possible
61
+ - Efficient database queries
62
+ - Caching strategies
63
+ - Load balancing considerations
64
+
65
+ ### 3. Maintainability
66
+ - Clear code organization
67
+ - Consistent patterns
68
+ - Comprehensive documentation
69
+ - Easy to test
70
+ - Simple to understand
71
+
72
+ ### 4. Security
73
+ - Defense in depth
74
+ - Principle of least privilege
75
+ - Input validation at boundaries
76
+ - Secure by default
77
+ - Audit trail
78
+
79
+ ### 5. Performance
80
+ - Efficient algorithms
81
+ - Minimal network requests
82
+ - Optimized database queries
83
+ - Appropriate caching
84
+ - Lazy loading
85
+
86
+ ## Common Patterns
87
+
88
+ ### Frontend Patterns
89
+ - **Component Composition**: Build complex UI from simple components
90
+ - **Container/Presenter**: Separate data logic from presentation
91
+ - **Custom Hooks**: Reusable stateful logic
92
+ - **Context for Global State**: Avoid prop drilling
93
+ - **Code Splitting**: Lazy load routes and heavy components
94
+
95
+ ### Backend Patterns
96
+ - **Repository Pattern**: Abstract data access
97
+ - **Service Layer**: Business logic separation
98
+ - **Middleware Pattern**: Request/response processing
99
+ - **Event-Driven Architecture**: Async operations
100
+ - **CQRS**: Separate read and write operations
101
+
102
+ ### Data Patterns
103
+ - **Normalized Database**: Reduce redundancy
104
+ - **Denormalized for Read Performance**: Optimize queries
105
+ - **Event Sourcing**: Audit trail and replayability
106
+ - **Caching Layers**: Redis, CDN
107
+ - **Eventual Consistency**: For distributed systems
108
+
109
+ ## Architecture Decision Records (ADRs)
110
+
111
+ For significant architectural decisions, create ADRs:
112
+
113
+ ```markdown
114
+ # ADR-001: Use Redis for Semantic Search Vector Storage
115
+
116
+ ## Context
117
+ Need to store and query 1536-dimensional embeddings for semantic market search.
118
+
119
+ ## Decision
120
+ Use Redis Stack with vector search capability.
121
+
122
+ ## Consequences
123
+
124
+ ### Positive
125
+ - Fast vector similarity search (<10ms)
126
+ - Built-in KNN algorithm
127
+ - Simple deployment
128
+ - Good performance up to 100K vectors
129
+
130
+ ### Negative
131
+ - In-memory storage (expensive for large datasets)
132
+ - Single point of failure without clustering
133
+ - Limited to cosine similarity
134
+
135
+ ### Alternatives Considered
136
+ - **PostgreSQL pgvector**: Slower, but persistent storage
137
+ - **Pinecone**: Managed service, higher cost
138
+ - **Weaviate**: More features, more complex setup
139
+
140
+ ## Status
141
+ Accepted
142
+
143
+ ## Date
144
+ 2025-01-15
145
+ ```
146
+
147
+ ## System Design Checklist
148
+
149
+ When designing a new system or feature:
150
+
151
+ ### Functional Requirements
152
+ - [ ] User stories documented
153
+ - [ ] API contracts defined
154
+ - [ ] Data models specified
155
+ - [ ] UI/UX flows mapped
156
+
157
+ ### Non-Functional Requirements
158
+ - [ ] Performance targets defined (latency, throughput)
159
+ - [ ] Scalability requirements specified
160
+ - [ ] Security requirements identified
161
+ - [ ] Availability targets set (uptime %)
162
+
163
+ ### Technical Design
164
+ - [ ] Architecture diagram created
165
+ - [ ] Component responsibilities defined
166
+ - [ ] Data flow documented
167
+ - [ ] Integration points identified
168
+ - [ ] Error handling strategy defined
169
+ - [ ] Testing strategy planned
170
+
171
+ ### Operations
172
+ - [ ] Deployment strategy defined
173
+ - [ ] Monitoring and alerting planned
174
+ - [ ] Backup and recovery strategy
175
+ - [ ] Rollback plan documented
176
+
177
+ ## Red Flags
178
+
179
+ Watch for these architectural anti-patterns:
180
+ - **Big Ball of Mud**: No clear structure
181
+ - **Golden Hammer**: Using same solution for everything
182
+ - **Premature Optimization**: Optimizing too early
183
+ - **Not Invented Here**: Rejecting existing solutions
184
+ - **Analysis Paralysis**: Over-planning, under-building
185
+ - **Magic**: Unclear, undocumented behavior
186
+ - **Tight Coupling**: Components too dependent
187
+ - **God Object**: One class/component does everything
188
+
189
+ ## Project-Specific Architecture (CloudStream Software LLC)
190
+
191
+ Architecture for Zoho consultancy + full-stack development:
192
+
193
+ ### Current Architecture
194
+ - **Zoho Platform**: Creator (apps), CRM, Books, Analytics, Catalyst (serverless + hosting)
195
+ - **Frontend**: React/Next.js widgets deployed to Zoho + standalone apps
196
+ - **Backend**: Catalyst AppSail (Node.js/Express/Next.js), Catalyst Functions (serverless)
197
+ - **Data Layer**: BigQuery (analytics), Zoho (operational data)
198
+ - **Reporting**: Looker Studio + Zoho Analytics dashboards
199
+ - **Infrastructure**: Google Cloud Platform (GCS, Dataflow, Cloud Functions)
200
+
201
+ ### Key Design Decisions
202
+ 1. **Zoho-First**: Use native Zoho capabilities before custom code
203
+ 2. **Catalyst for Custom Logic**: AppSail for full apps, Functions for event-driven
204
+ 3. **Medallion Data Architecture**: Bronze/Silver/Gold layers in GCP
205
+ 4. **Per-Client Compliance**: HIPAA/SOC2/PCI-DSS modes set per engagement
206
+ 5. **Widget Strategy**: Zoho widgets for internal, Publish API for external users
207
+
208
+ ### Scalability Plan
209
+ - **Single Client**: Creator + Catalyst Functions sufficient
210
+ - **Multi-Client**: Shared Catalyst AppSail, isolated Creator apps per client
211
+ - **Enterprise**: Dedicated GCP projects, BigQuery datasets per client
212
+ - **High Volume**: Dataflow streaming, Cron functions for batch processing
213
+
214
+ ## Zoho One Architecture Patterns
215
+
216
+ ### Creator Application Design
217
+ - Form hierarchy: Parent forms → child forms via lookup
218
+ - Report optimization: Use aggregate fields, avoid Deluge in reports
219
+ - Widget placement strategy (widgets DON'T work on published pages)
220
+ - Publish API for external user access
221
+
222
+ ### Catalyst Architecture
223
+ - AppSail: Full web app hosting (Node.js, Express, Next.js, Python)
224
+ - Functions: Event-driven serverless (I/O: 30s timeout, Cron: 15min)
225
+ - MANDATORY: context.close() at end of ALL Catalyst functions
226
+ - Use Cron functions for any operation exceeding 30 seconds
227
+
228
+ ### GCP Medallion Architecture
229
+ - **Bronze Layer**: Raw ingestion to GCS, minimal transformation, schema-on-read
230
+ - **Silver Layer**: Cleansed, deduplicated, quality rules applied, BigQuery tables
231
+ - **Gold Layer**: Business-ready aggregations, materialized views, Looker-ready
232
+ - **Transitions**: dbt models for transformations, Dataflow for streaming
233
+
234
+ ### Integration Patterns
235
+ - CRM→Books: Native 2-hour sync exists (DON'T rebuild)
236
+ - Zoho Flow vs Deluge: Use Flow for simple triggers, Deluge for complex logic
237
+ - OAuth tokens: Expire in 1 hour, implement refresh in all integrations
238
+ - Widget CORS: Server-to-server proxy architecture required
239
+
240
+ ## CloudStream Architecture Decisions
241
+ 1. **Zoho Platform**: Creator for apps, Catalyst for serverless + full-stack hosting
242
+ 2. **Data Layer**: BigQuery (analytics) + Zoho (operational)
243
+ 3. **Reporting**: Looker Studio + Zoho Analytics dashboards
244
+ 4. **Compliance**: Per-client mode (HIPAA/SOC2/PCI-DSS/standard)
245
+ 5. **Frontend**: React/Next.js widgets deployed to Zoho + standalone
246
+
247
+ **Remember**: Good architecture enables rapid development, easy maintenance, and confident scaling. The best architecture is simple, clear, and follows established patterns.