@cloudstreamsoftware/claude-tools 1.2.3 → 1.2.5
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.
- package/bin/cloudstream-setup.js +21 -10
- package/commands/INDEX.md +171 -0
- package/commands/build-fix.md +44 -0
- package/commands/checkpoint.md +80 -0
- package/commands/client-switch.md +114 -0
- package/commands/code-review.md +45 -0
- package/commands/compliance-check.md +38 -0
- package/commands/create-branch.md +91 -0
- package/commands/deluge.md +72 -0
- package/commands/diagnose.md +99 -0
- package/commands/e2e.md +34 -0
- package/commands/eval.md +189 -0
- package/commands/evolve.md +170 -0
- package/commands/handoff.md +64 -0
- package/commands/health-check.md +88 -0
- package/commands/instinct-export.md +123 -0
- package/commands/instinct-import.md +150 -0
- package/commands/instinct-status.md +111 -0
- package/commands/learn.md +75 -0
- package/commands/onboard.md +133 -0
- package/commands/orchestrate.md +177 -0
- package/commands/plan.md +34 -0
- package/commands/pr-ready.md +130 -0
- package/commands/quarterly-review.md +154 -0
- package/commands/refactor-clean.md +54 -0
- package/commands/setup-pm.md +81 -0
- package/commands/skill-create.md +99 -0
- package/commands/skill-submit.md +121 -0
- package/commands/skill-sync.md +250 -0
- package/commands/tdd.md +59 -0
- package/commands/team-admin.md +179 -0
- package/commands/test-coverage.md +43 -0
- package/commands/tutorial.md +100 -0
- package/commands/update-codemaps.md +57 -0
- package/commands/update-docs.md +51 -0
- package/commands/verify-setup.md +98 -0
- package/commands/verify.md +75 -0
- package/commands/zoho-scaffold.md +159 -0
- package/package.json +2 -1
package/bin/cloudstream-setup.js
CHANGED
|
@@ -305,21 +305,23 @@ async function storeCredentials(licenseKey, installType) {
|
|
|
305
305
|
|
|
306
306
|
/**
|
|
307
307
|
* Configure MCP server connection
|
|
308
|
+
* Merges into settings.json (same pattern as mergeHooksIntoSettings)
|
|
308
309
|
*/
|
|
309
310
|
async function configureMcpServer(licenseKey) {
|
|
310
|
-
const
|
|
311
|
+
const settingsPath = path.join(CONFIG.claudeDir, 'settings.json');
|
|
311
312
|
|
|
312
|
-
|
|
313
|
+
// Read existing settings or create empty object
|
|
314
|
+
let settings = {};
|
|
313
315
|
try {
|
|
314
|
-
const content = await fs.readFile(
|
|
315
|
-
|
|
316
|
+
const content = await fs.readFile(settingsPath, 'utf8');
|
|
317
|
+
settings = JSON.parse(content);
|
|
316
318
|
} catch {
|
|
317
|
-
// File doesn't exist
|
|
319
|
+
// File doesn't exist, start fresh
|
|
318
320
|
}
|
|
319
321
|
|
|
320
|
-
//
|
|
321
|
-
|
|
322
|
-
|
|
322
|
+
// Merge MCP server into settings
|
|
323
|
+
settings.mcpServers = settings.mcpServers || {};
|
|
324
|
+
settings.mcpServers['cloudstream-knowledge'] = {
|
|
323
325
|
command: 'npx',
|
|
324
326
|
args: ['@cloudstream/knowledge-mcp-client'],
|
|
325
327
|
env: {
|
|
@@ -328,8 +330,17 @@ async function configureMcpServer(licenseKey) {
|
|
|
328
330
|
}
|
|
329
331
|
};
|
|
330
332
|
|
|
331
|
-
await fs.writeFile(
|
|
332
|
-
logSuccess('MCP server configured');
|
|
333
|
+
await fs.writeFile(settingsPath, JSON.stringify(settings, null, 2));
|
|
334
|
+
logSuccess('MCP server configured in settings.json');
|
|
335
|
+
|
|
336
|
+
// Clean up orphaned mcp.json if it exists (from previous installs)
|
|
337
|
+
const orphanedMcpPath = path.join(CONFIG.claudeDir, 'mcp.json');
|
|
338
|
+
try {
|
|
339
|
+
await fs.unlink(orphanedMcpPath);
|
|
340
|
+
logSuccess('Cleaned up orphaned mcp.json');
|
|
341
|
+
} catch {
|
|
342
|
+
// File doesn't exist, nothing to clean up
|
|
343
|
+
}
|
|
333
344
|
}
|
|
334
345
|
|
|
335
346
|
/**
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# Commands Index
|
|
2
|
+
|
|
3
|
+
Central reference for all 36 slash commands available in CloudStream Claude Tools.
|
|
4
|
+
|
|
5
|
+
## Quick Reference
|
|
6
|
+
|
|
7
|
+
| Command | Description | Agent |
|
|
8
|
+
|---------|-------------|-------|
|
|
9
|
+
| `/diagnose` | Deep diagnostic troubleshooting | - |
|
|
10
|
+
| `/eval` | Eval-driven development workflow | - |
|
|
11
|
+
| `/evolve` | Cluster instincts into commands/skills/agents | - |
|
|
12
|
+
| `/health-check` | System health verification | - |
|
|
13
|
+
| `/instinct-export` | Export instincts for sharing | - |
|
|
14
|
+
| `/instinct-import` | Import instincts from teammates | - |
|
|
15
|
+
| `/instinct-status` | View learned instincts with confidence | - |
|
|
16
|
+
| `/onboard` | Interactive setup wizard | - |
|
|
17
|
+
| `/skill-create` | Generate SKILL.md from git history | - |
|
|
18
|
+
| `/team-admin` | Team administration tools | - |
|
|
19
|
+
| `/build-fix` | Fix TypeScript and build errors | build-error-resolver |
|
|
20
|
+
| `/checkpoint` | Create/verify workflow checkpoint | - |
|
|
21
|
+
| `/client-switch` | Switch to client context | - |
|
|
22
|
+
| `/code-review` | Security and quality review | code-reviewer |
|
|
23
|
+
| `/compliance-check` | Run compliance audit | compliance-auditor |
|
|
24
|
+
| `/create-branch` | Create properly-named git branch | - |
|
|
25
|
+
| `/deluge` | Generate/fix Deluge scripts | deluge-reviewer |
|
|
26
|
+
| `/e2e` | Generate and run E2E tests | e2e-runner |
|
|
27
|
+
| `/handoff` | Generate client handoff docs | - |
|
|
28
|
+
| `/learn` | Extract reusable patterns | - |
|
|
29
|
+
| `/orchestrate` | Sequential agent workflow | planner, architect, etc. |
|
|
30
|
+
| `/plan` | Create implementation plan | planner |
|
|
31
|
+
| `/pr-ready` | Pre-PR validation checklist | - |
|
|
32
|
+
| `/quarterly-review` | Review skill effectiveness | - |
|
|
33
|
+
| `/refactor-clean` | Remove dead code safely | refactor-cleaner |
|
|
34
|
+
| `/setup-pm` | Configure package manager | - |
|
|
35
|
+
| `/skill-submit` | Submit skill to team repo | - |
|
|
36
|
+
| `/skill-sync` | Pull shared skills from repo | - |
|
|
37
|
+
| `/tdd` | Test-driven development workflow | tdd-guide |
|
|
38
|
+
| `/test-coverage` | Analyze and improve coverage | - |
|
|
39
|
+
| `/tutorial` | Interactive system tutorial | - |
|
|
40
|
+
| `/update-codemaps` | Update architecture docs | doc-updater |
|
|
41
|
+
| `/update-docs` | Sync documentation | doc-updater |
|
|
42
|
+
| `/verify` | Run comprehensive verification | - |
|
|
43
|
+
| `/verify-setup` | Verify plugin setup and configuration | - |
|
|
44
|
+
| `/zoho-scaffold` | Scaffold Zoho components | creator-architect |
|
|
45
|
+
|
|
46
|
+
## Commands by Category
|
|
47
|
+
|
|
48
|
+
### Development Workflow
|
|
49
|
+
|
|
50
|
+
| Command | Purpose | When to Use |
|
|
51
|
+
|---------|---------|-------------|
|
|
52
|
+
| [/plan](./plan.md) | Create implementation plan | Before starting any feature |
|
|
53
|
+
| [/tdd](./tdd.md) | Test-driven development | When implementing features |
|
|
54
|
+
| [/build-fix](./build-fix.md) | Fix build errors | When build fails |
|
|
55
|
+
| [/code-review](./code-review.md) | Quality and security review | Before committing |
|
|
56
|
+
| [/verify](./verify.md) | Comprehensive validation | Before PR |
|
|
57
|
+
| [/pr-ready](./pr-ready.md) | Pre-PR checklist | Before creating PR |
|
|
58
|
+
| [/create-branch](./create-branch.md) | Create named branch | Starting new work |
|
|
59
|
+
|
|
60
|
+
### Testing
|
|
61
|
+
|
|
62
|
+
| Command | Purpose | When to Use |
|
|
63
|
+
|---------|---------|-------------|
|
|
64
|
+
| [/tdd](./tdd.md) | TDD workflow enforcement | Writing new features |
|
|
65
|
+
| [/test-coverage](./test-coverage.md) | Coverage analysis | Improving test coverage |
|
|
66
|
+
| [/e2e](./e2e.md) | End-to-end tests | Testing user journeys |
|
|
67
|
+
|
|
68
|
+
### Zoho Platform
|
|
69
|
+
|
|
70
|
+
| Command | Purpose | When to Use |
|
|
71
|
+
|---------|---------|-------------|
|
|
72
|
+
| [/zoho-scaffold](./zoho-scaffold.md) | Scaffold components | Creating new Zoho apps |
|
|
73
|
+
| [/deluge](./deluge.md) | Generate Deluge scripts | Zoho scripting |
|
|
74
|
+
|
|
75
|
+
### Compliance & Quality
|
|
76
|
+
|
|
77
|
+
| Command | Purpose | When to Use |
|
|
78
|
+
|---------|---------|-------------|
|
|
79
|
+
| [/compliance-check](./compliance-check.md) | Compliance audit | HIPAA/SOC2/PCI-DSS |
|
|
80
|
+
| [/code-review](./code-review.md) | Security review | Before commits |
|
|
81
|
+
|
|
82
|
+
### Knowledge Management
|
|
83
|
+
|
|
84
|
+
| Command | Purpose | When to Use |
|
|
85
|
+
|---------|---------|-------------|
|
|
86
|
+
| [/learn](./learn.md) | Extract patterns | After solving problems |
|
|
87
|
+
| [/skill-sync](./skill-sync.md) | Pull shared skills | Stay updated |
|
|
88
|
+
| [/skill-submit](./skill-submit.md) | Submit skills | Share discoveries |
|
|
89
|
+
| [/quarterly-review](./quarterly-review.md) | Review effectiveness | Every quarter |
|
|
90
|
+
|
|
91
|
+
### Continuous Learning (v2)
|
|
92
|
+
|
|
93
|
+
| Command | Purpose | When to Use |
|
|
94
|
+
|---------|---------|-------------|
|
|
95
|
+
| [/skill-create](./skill-create.md) | Generate SKILL.md from git history | Capture project patterns |
|
|
96
|
+
| [/instinct-status](./instinct-status.md) | View learned instincts | Review what Claude learned |
|
|
97
|
+
| [/instinct-export](./instinct-export.md) | Export instincts for sharing | Team knowledge transfer |
|
|
98
|
+
| [/instinct-import](./instinct-import.md) | Import instincts | Onboarding, new machine |
|
|
99
|
+
| [/evolve](./evolve.md) | Cluster instincts into structures | Auto-generate commands/skills |
|
|
100
|
+
| [/eval](./eval.md) | Eval-driven development | Systematic quality tracking |
|
|
101
|
+
|
|
102
|
+
### Client Management
|
|
103
|
+
|
|
104
|
+
| Command | Purpose | When to Use |
|
|
105
|
+
|---------|---------|-------------|
|
|
106
|
+
| [/client-switch](./client-switch.md) | Switch client context | Changing projects |
|
|
107
|
+
| [/handoff](./handoff.md) | Generate handoff docs | Project completion |
|
|
108
|
+
|
|
109
|
+
### Documentation
|
|
110
|
+
|
|
111
|
+
| Command | Purpose | When to Use |
|
|
112
|
+
|---------|---------|-------------|
|
|
113
|
+
| [/update-codemaps](./update-codemaps.md) | Update architecture docs | After refactoring |
|
|
114
|
+
| [/update-docs](./update-docs.md) | Sync documentation | After changes |
|
|
115
|
+
|
|
116
|
+
### System & Administration
|
|
117
|
+
|
|
118
|
+
| Command | Purpose | When to Use |
|
|
119
|
+
|---------|---------|-------------|
|
|
120
|
+
| [/health-check](./health-check.md) | System health verification | Verify setup is working |
|
|
121
|
+
| [/diagnose](./diagnose.md) | Deep diagnostic troubleshooting | When something isn't working |
|
|
122
|
+
| [/onboard](./onboard.md) | Interactive setup wizard | First-time setup |
|
|
123
|
+
| [/verify-setup](./verify-setup.md) | Verify plugin configuration | After setup or changes |
|
|
124
|
+
| [/team-admin](./team-admin.md) | Team administration tools | Team leads managing forks |
|
|
125
|
+
|
|
126
|
+
### Utilities
|
|
127
|
+
|
|
128
|
+
| Command | Purpose | When to Use |
|
|
129
|
+
|---------|---------|-------------|
|
|
130
|
+
| [/checkpoint](./checkpoint.md) | Create/verify checkpoints | Before risky changes |
|
|
131
|
+
| [/setup-pm](./setup-pm.md) | Configure package manager | Initial setup |
|
|
132
|
+
| [/tutorial](./tutorial.md) | Interactive tutorial | Learning the system |
|
|
133
|
+
| [/orchestrate](./orchestrate.md) | Chain agent workflow | Complex tasks |
|
|
134
|
+
| [/refactor-clean](./refactor-clean.md) | Remove dead code | Code cleanup |
|
|
135
|
+
|
|
136
|
+
## Command-Agent Relationships
|
|
137
|
+
|
|
138
|
+
Commands that invoke specialized agents:
|
|
139
|
+
|
|
140
|
+
| Command | Agent | Model | Purpose |
|
|
141
|
+
|---------|-------|-------|---------|
|
|
142
|
+
| `/build-fix` | build-error-resolver | sonnet | Fast error fixing |
|
|
143
|
+
| `/code-review` | code-reviewer | sonnet | Quality review |
|
|
144
|
+
| `/compliance-check` | compliance-auditor | sonnet | Compliance audit |
|
|
145
|
+
| `/deluge` | deluge-reviewer | sonnet | Deluge validation |
|
|
146
|
+
| `/e2e` | e2e-runner | sonnet | E2E testing |
|
|
147
|
+
| `/orchestrate` | planner, architect, tdd-guide, code-reviewer | opus/sonnet | Full workflow |
|
|
148
|
+
| `/plan` | planner | opus | Planning |
|
|
149
|
+
| `/refactor-clean` | refactor-cleaner | sonnet | Dead code removal |
|
|
150
|
+
| `/tdd` | tdd-guide | sonnet | TDD workflow |
|
|
151
|
+
| `/update-codemaps` | doc-updater | sonnet | Doc updates |
|
|
152
|
+
| `/update-docs` | doc-updater | sonnet | Doc sync |
|
|
153
|
+
|
|
154
|
+
## Standard Workflow
|
|
155
|
+
|
|
156
|
+
Recommended command sequence for feature development:
|
|
157
|
+
|
|
158
|
+
```
|
|
159
|
+
1. /plan [feature] # Design before coding
|
|
160
|
+
2. /tdd [component] # Tests first
|
|
161
|
+
3. /code-review # Quality check
|
|
162
|
+
4. /verify # Validation
|
|
163
|
+
5. /pr-ready # Final checklist
|
|
164
|
+
6. /learn # Capture patterns
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## See Also
|
|
168
|
+
|
|
169
|
+
- [Agents Index](../agents/INDEX.md)
|
|
170
|
+
- [Skills Index](../skills/INDEX.md)
|
|
171
|
+
- [Rules Index](../rules/INDEX.md)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: build-fix
|
|
3
|
+
description: Incrementally fix TypeScript and build errors. Runs build, parses errors, and fixes them one by one with minimal diffs.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Build and Fix
|
|
7
|
+
|
|
8
|
+
Incrementally fix TypeScript and build errors:
|
|
9
|
+
|
|
10
|
+
1. Run build: npm run build or pnpm build
|
|
11
|
+
|
|
12
|
+
2. Parse error output:
|
|
13
|
+
- Group by file
|
|
14
|
+
- Sort by severity
|
|
15
|
+
|
|
16
|
+
3. For each error:
|
|
17
|
+
- Show error context (5 lines before/after)
|
|
18
|
+
- Explain the issue
|
|
19
|
+
- Propose fix
|
|
20
|
+
- Apply fix
|
|
21
|
+
- Re-run build
|
|
22
|
+
- Verify error resolved
|
|
23
|
+
|
|
24
|
+
4. Stop if:
|
|
25
|
+
- Fix introduces new errors
|
|
26
|
+
- Same error persists after 3 attempts
|
|
27
|
+
- User requests pause
|
|
28
|
+
|
|
29
|
+
5. Show summary:
|
|
30
|
+
- Errors fixed
|
|
31
|
+
- Errors remaining
|
|
32
|
+
- New errors introduced
|
|
33
|
+
|
|
34
|
+
Fix one error at a time for safety!
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Related
|
|
39
|
+
|
|
40
|
+
- **Agent:** [build-error-resolver](../agents/build-error-resolver.md) - The specialized agent that executes this command
|
|
41
|
+
- **Commands:**
|
|
42
|
+
- [/verify](./verify.md) - Run after fixing errors to validate the build
|
|
43
|
+
- [/tdd](./tdd.md) - Prevent future errors with test-driven development
|
|
44
|
+
- **Skills:** [coding-standards](../skills/coding-standards/SKILL.md) - TypeScript best practices to avoid common errors
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: checkpoint
|
|
3
|
+
description: Create or verify a checkpoint in your workflow. Snapshots current state for safe rollback if needed.
|
|
4
|
+
arguments: create|verify|list [name]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Checkpoint Command
|
|
8
|
+
|
|
9
|
+
Create or verify a checkpoint in your workflow.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
`/checkpoint [create|verify|list] [name]`
|
|
14
|
+
|
|
15
|
+
## Create Checkpoint
|
|
16
|
+
|
|
17
|
+
When creating a checkpoint:
|
|
18
|
+
|
|
19
|
+
1. Run `/verify quick` to ensure current state is clean
|
|
20
|
+
2. Create a git stash or commit with checkpoint name
|
|
21
|
+
3. Log checkpoint to `.claude/checkpoints.log`:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
echo "$(date +%Y-%m-%d-%H:%M) | $CHECKPOINT_NAME | $(git rev-parse --short HEAD)" >> .claude/checkpoints.log
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
4. Report checkpoint created
|
|
28
|
+
|
|
29
|
+
## Verify Checkpoint
|
|
30
|
+
|
|
31
|
+
When verifying against a checkpoint:
|
|
32
|
+
|
|
33
|
+
1. Read checkpoint from log
|
|
34
|
+
2. Compare current state to checkpoint:
|
|
35
|
+
- Files added since checkpoint
|
|
36
|
+
- Files modified since checkpoint
|
|
37
|
+
- Test pass rate now vs then
|
|
38
|
+
- Coverage now vs then
|
|
39
|
+
|
|
40
|
+
3. Report:
|
|
41
|
+
```
|
|
42
|
+
CHECKPOINT COMPARISON: $NAME
|
|
43
|
+
============================
|
|
44
|
+
Files changed: X
|
|
45
|
+
Tests: +Y passed / -Z failed
|
|
46
|
+
Coverage: +X% / -Y%
|
|
47
|
+
Build: [PASS/FAIL]
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## List Checkpoints
|
|
51
|
+
|
|
52
|
+
Show all checkpoints with:
|
|
53
|
+
- Name
|
|
54
|
+
- Timestamp
|
|
55
|
+
- Git SHA
|
|
56
|
+
- Status (current, behind, ahead)
|
|
57
|
+
|
|
58
|
+
## Workflow
|
|
59
|
+
|
|
60
|
+
Typical checkpoint flow:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
[Start] --> /checkpoint create "feature-start"
|
|
64
|
+
|
|
|
65
|
+
[Implement] --> /checkpoint create "core-done"
|
|
66
|
+
|
|
|
67
|
+
[Test] --> /checkpoint verify "core-done"
|
|
68
|
+
|
|
|
69
|
+
[Refactor] --> /checkpoint create "refactor-done"
|
|
70
|
+
|
|
|
71
|
+
[PR] --> /checkpoint verify "feature-start"
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Arguments
|
|
75
|
+
|
|
76
|
+
$ARGUMENTS:
|
|
77
|
+
- `create <name>` - Create named checkpoint
|
|
78
|
+
- `verify <name>` - Verify against named checkpoint
|
|
79
|
+
- `list` - Show all checkpoints
|
|
80
|
+
- `clear` - Remove old checkpoints (keeps last 5)
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: client-switch
|
|
3
|
+
description: Switch to a specific client context. Loads client CLAUDE.md, environment variables, and displays recent activity.
|
|
4
|
+
arguments: client-id
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Switch to client **$ARGUMENTS** context:
|
|
8
|
+
|
|
9
|
+
1. Load client configuration from `clients/$ARGUMENTS/.claude/CLAUDE.md`
|
|
10
|
+
2. Set client-specific environment variables from `.env.client`
|
|
11
|
+
3. Display recent commits for this client:
|
|
12
|
+
```
|
|
13
|
+
git log --oneline -5 --grep="[$ARGUMENTS]"
|
|
14
|
+
```
|
|
15
|
+
4. Show active compliance mode and Zoho org
|
|
16
|
+
5. Confirm client context is active
|
|
17
|
+
|
|
18
|
+
## Expected Output
|
|
19
|
+
```
|
|
20
|
+
[ClientSwitch] Active client: $ARGUMENTS
|
|
21
|
+
[ClientSwitch] Compliance mode: [hipaa|soc2|pci-dss|standard]
|
|
22
|
+
[ClientSwitch] Zoho Org: [org-id]
|
|
23
|
+
[ClientSwitch] Recent activity:
|
|
24
|
+
- [last 5 commits for this client]
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Verification
|
|
28
|
+
- Confirm CLAUDE.md exists for client
|
|
29
|
+
- Verify .env.client has required variables
|
|
30
|
+
- Check no other client's credentials are loaded
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Usage Examples
|
|
35
|
+
|
|
36
|
+
### Switch to Healthcare Client (HIPAA)
|
|
37
|
+
```
|
|
38
|
+
> /client-switch ACME
|
|
39
|
+
|
|
40
|
+
╔═══════════════════════════════════════════════════════════════╗
|
|
41
|
+
║ Client Context: ACME ║
|
|
42
|
+
╠═══════════════════════════════════════════════════════════════╣
|
|
43
|
+
|
|
44
|
+
📋 Configuration
|
|
45
|
+
Compliance Mode: HIPAA
|
|
46
|
+
Zoho Org ID: org_acme_health_123
|
|
47
|
+
Project Path: clients/ACME/
|
|
48
|
+
|
|
49
|
+
🔒 Compliance Requirements
|
|
50
|
+
- ePHI field handling enabled
|
|
51
|
+
- BAA documentation required
|
|
52
|
+
- Audit log archival: 7 years
|
|
53
|
+
- Session timeout: 15 minutes
|
|
54
|
+
|
|
55
|
+
📊 Recent Activity
|
|
56
|
+
abc1234 [ACME] feat(patient): Add medication tracking | Time: 2h 15m
|
|
57
|
+
def5678 [ACME] fix(forms): Correct PHI field encryption | Time: 45m
|
|
58
|
+
ghi9012 [ACME] docs: Update BAA appendix | Time: 30m
|
|
59
|
+
|
|
60
|
+
⚠️ Reminders
|
|
61
|
+
- All PHI fields must use [PHI] prefix
|
|
62
|
+
- Run /compliance-check before any commit
|
|
63
|
+
|
|
64
|
+
╚═══════════════════════════════════════════════════════════════╝
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Switch to Financial Client (PCI-DSS)
|
|
68
|
+
```
|
|
69
|
+
> /client-switch FINCO
|
|
70
|
+
|
|
71
|
+
╔═══════════════════════════════════════════════════════════════╗
|
|
72
|
+
║ Client Context: FINCO ║
|
|
73
|
+
╠═══════════════════════════════════════════════════════════════╣
|
|
74
|
+
|
|
75
|
+
📋 Configuration
|
|
76
|
+
Compliance Mode: PCI-DSS
|
|
77
|
+
Zoho Org ID: org_finco_456
|
|
78
|
+
Project Path: clients/FINCO/
|
|
79
|
+
|
|
80
|
+
🔒 Compliance Requirements
|
|
81
|
+
- Use Zoho Checkout only for payments
|
|
82
|
+
- Tokenization required for card data
|
|
83
|
+
- SAQ-A compliance level
|
|
84
|
+
|
|
85
|
+
📊 Recent Activity
|
|
86
|
+
jkl3456 [FINCO] feat(checkout): Add tokenization flow | Time: 3h
|
|
87
|
+
mno7890 [FINCO] test: Add PCI compliance tests | Time: 1h 30m
|
|
88
|
+
|
|
89
|
+
╚═══════════════════════════════════════════════════════════════╝
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Error: Client Not Found
|
|
93
|
+
```
|
|
94
|
+
> /client-switch UNKNOWN
|
|
95
|
+
|
|
96
|
+
❌ Client Not Found: UNKNOWN
|
|
97
|
+
|
|
98
|
+
Available clients:
|
|
99
|
+
├── ACME (hipaa)
|
|
100
|
+
├── FINCO (pci-dss)
|
|
101
|
+
├── TECHCORP (soc2)
|
|
102
|
+
└── STARTUP (standard)
|
|
103
|
+
|
|
104
|
+
Create new client directory: clients/UNKNOWN/.claude/CLAUDE.md
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Related
|
|
110
|
+
|
|
111
|
+
- **Commands:**
|
|
112
|
+
- [/handoff](./handoff.md) - Generate handoff docs for current client
|
|
113
|
+
- [/compliance-check](./compliance-check.md) - Audit compliance for current client
|
|
114
|
+
- **Skills:** [consultancy-workflows](../skills/consultancy-workflows/SKILL.md) - Client isolation patterns
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-review
|
|
3
|
+
description: Comprehensive security and quality review of uncommitted changes. Checks for vulnerabilities, code quality, Deluge constraints, and compliance.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Code Review
|
|
7
|
+
|
|
8
|
+
Comprehensive security and quality review of uncommitted changes:
|
|
9
|
+
|
|
10
|
+
1. Get changed files: git diff --name-only HEAD
|
|
11
|
+
|
|
12
|
+
2. For each changed file, check for:
|
|
13
|
+
|
|
14
|
+
**Security Issues (CRITICAL):**
|
|
15
|
+
- Hardcoded credentials, API keys, tokens
|
|
16
|
+
- SQL injection vulnerabilities
|
|
17
|
+
- XSS vulnerabilities
|
|
18
|
+
- Missing input validation
|
|
19
|
+
- Insecure dependencies
|
|
20
|
+
- Path traversal risks
|
|
21
|
+
|
|
22
|
+
**Code Quality (HIGH):**
|
|
23
|
+
- Functions > 50 lines
|
|
24
|
+
- Files > 800 lines
|
|
25
|
+
- Nesting depth > 4 levels
|
|
26
|
+
- Missing error handling
|
|
27
|
+
- console.log statements
|
|
28
|
+
- TODO/FIXME comments
|
|
29
|
+
- Missing JSDoc for public APIs
|
|
30
|
+
|
|
31
|
+
**Best Practices (MEDIUM):**
|
|
32
|
+
- Mutation patterns (use immutable instead)
|
|
33
|
+
- Emoji usage in code/comments
|
|
34
|
+
- Missing tests for new code
|
|
35
|
+
- Accessibility issues (a11y)
|
|
36
|
+
|
|
37
|
+
3. Generate report with:
|
|
38
|
+
- Severity: CRITICAL, HIGH, MEDIUM, LOW
|
|
39
|
+
- File location and line numbers
|
|
40
|
+
- Issue description
|
|
41
|
+
- Suggested fix
|
|
42
|
+
|
|
43
|
+
4. Block commit if CRITICAL or HIGH issues found
|
|
44
|
+
|
|
45
|
+
Never approve code with security vulnerabilities!
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: compliance-check
|
|
3
|
+
description: Run a compliance audit against the specified standard (HIPAA, SOC2, or PCI-DSS). Invokes the compliance-auditor agent and generates a findings report.
|
|
4
|
+
arguments: standard
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /compliance-check [standard]
|
|
8
|
+
|
|
9
|
+
Invoke the **compliance-auditor** agent to audit the project against the specified compliance standard.
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
- `standard` — One of: `hipaa`, `soc2`, `pci-dss`
|
|
13
|
+
|
|
14
|
+
## Workflow
|
|
15
|
+
1. Agent scans all project files for compliance gaps
|
|
16
|
+
2. Checks Zoho configuration against standard requirements
|
|
17
|
+
3. Verifies audit logging implementation
|
|
18
|
+
4. Checks credential handling
|
|
19
|
+
5. Generates findings report with severity levels
|
|
20
|
+
|
|
21
|
+
## Report Format
|
|
22
|
+
Findings are categorized by severity:
|
|
23
|
+
- **Critical** — Must fix immediately (blocks deployment)
|
|
24
|
+
- **High** — Fix within sprint
|
|
25
|
+
- **Medium** — Fix within 30 days
|
|
26
|
+
- **Low** — Best practice recommendations
|
|
27
|
+
|
|
28
|
+
## When to Use
|
|
29
|
+
- Before deploying to production
|
|
30
|
+
- After major feature additions
|
|
31
|
+
- During client onboarding (initial audit)
|
|
32
|
+
- Periodic compliance verification
|
|
33
|
+
|
|
34
|
+
## Integration
|
|
35
|
+
- Use `/client-switch` first to load client context
|
|
36
|
+
- Use `/plan` for remediation of findings
|
|
37
|
+
- Use `/tdd` to implement fixes with tests
|
|
38
|
+
- Re-run `/compliance-check` to verify remediation
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: create-branch
|
|
3
|
+
description: Create a properly-named git branch following CloudStream conventions. Validates and formats branch names automatically.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /create-branch <type> "<description>"
|
|
7
|
+
|
|
8
|
+
Create a new git branch with proper naming conventions.
|
|
9
|
+
|
|
10
|
+
## Parameters
|
|
11
|
+
|
|
12
|
+
- `type` — Branch type: feature, fix, hotfix, docs, chore
|
|
13
|
+
- `description` — Human-readable description (will be converted to kebab-case)
|
|
14
|
+
|
|
15
|
+
## Branch Types
|
|
16
|
+
|
|
17
|
+
| Type | Description | Requires Client |
|
|
18
|
+
|------|-------------|-----------------|
|
|
19
|
+
| `feature` | New functionality | Yes |
|
|
20
|
+
| `fix` | Bug fix | Yes |
|
|
21
|
+
| `hotfix` | Critical production fix | Yes |
|
|
22
|
+
| `docs` | Documentation only | No |
|
|
23
|
+
| `chore` | Maintenance task | No |
|
|
24
|
+
|
|
25
|
+
## Behavior
|
|
26
|
+
|
|
27
|
+
1. Reads CLIENT-ID from CLAUDE.md (default: CSS)
|
|
28
|
+
2. Converts description to kebab-case
|
|
29
|
+
3. Creates branch: `<type>/<CLIENT>/<kebab-description>`
|
|
30
|
+
4. Switches to new branch
|
|
31
|
+
5. Shows workflow checklist reminder
|
|
32
|
+
|
|
33
|
+
## Examples
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
/create-branch feature "patient dashboard widgets"
|
|
37
|
+
# Creates: feature/CSS/patient-dashboard-widgets
|
|
38
|
+
|
|
39
|
+
/create-branch fix "login timeout bug"
|
|
40
|
+
# Creates: fix/CSS/login-timeout-bug
|
|
41
|
+
|
|
42
|
+
/create-branch docs "update API documentation"
|
|
43
|
+
# Creates: docs/update-api-documentation
|
|
44
|
+
|
|
45
|
+
/create-branch chore "update dependencies"
|
|
46
|
+
# Creates: chore/update-dependencies
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Naming Convention
|
|
50
|
+
|
|
51
|
+
**Format:** `<type>/<CLIENT>/<kebab-case-description>`
|
|
52
|
+
|
|
53
|
+
**Valid examples:**
|
|
54
|
+
- `feature/CSS/add-user-auth`
|
|
55
|
+
- `fix/ACME/bug-123-fix`
|
|
56
|
+
- `hotfix/CSS/critical-patch`
|
|
57
|
+
- `docs/update-readme`
|
|
58
|
+
- `chore/cleanup-deps`
|
|
59
|
+
|
|
60
|
+
**Invalid examples:**
|
|
61
|
+
- `feature/add-user-auth` (missing client)
|
|
62
|
+
- `Feature/CSS/something` (uppercase type)
|
|
63
|
+
- `feature/css/something` (lowercase client)
|
|
64
|
+
- `feature/CSS/Some_Feature` (underscores)
|
|
65
|
+
|
|
66
|
+
## After Creating Branch
|
|
67
|
+
|
|
68
|
+
Follow the workflow:
|
|
69
|
+
|
|
70
|
+
1. **Plan** - Use `/plan` for non-trivial features
|
|
71
|
+
2. **TDD** - Use `/tdd` to write tests first
|
|
72
|
+
3. **Implement** - Write minimal code to pass tests
|
|
73
|
+
4. **Review** - Use `/code-review` on changes
|
|
74
|
+
5. **Verify** - Use `/verify` before committing
|
|
75
|
+
6. **Commit** - Follow commit conventions
|
|
76
|
+
7. **PR** - Use `/pr-ready` before creating PR
|
|
77
|
+
|
|
78
|
+
## Validation
|
|
79
|
+
|
|
80
|
+
Branch names are validated by `scripts/branch-name-validator.js`.
|
|
81
|
+
|
|
82
|
+
To validate an existing branch:
|
|
83
|
+
```bash
|
|
84
|
+
node scripts/branch-name-validator.js --current
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Integration
|
|
88
|
+
|
|
89
|
+
- Pairs with `/pr-ready` for PR preparation
|
|
90
|
+
- Uses `rules/tdd-enforcement.md` workflow
|
|
91
|
+
- Follows `rules/git-workflow.md` conventions
|