qualia-framework 2.1.6 → 2.2.1
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/framework/.claudeignore +51 -0
- package/framework/CLAUDE.md +54 -0
- package/framework/MCP_SETUP.md +229 -0
- package/framework/agents/architecture-strategist.md +1 -1
- package/framework/agents/code-simplicity-reviewer.md +1 -1
- package/framework/agents/kieran-typescript-reviewer.md +1 -1
- package/framework/agents/performance-oracle.md +1 -1
- package/framework/agents/qualia-codebase-mapper.md +1 -0
- package/framework/agents/qualia-debugger.md +1 -0
- package/framework/agents/qualia-executor.md +1 -0
- package/framework/agents/qualia-integration-checker.md +1 -0
- package/framework/agents/qualia-phase-researcher.md +1 -0
- package/framework/agents/qualia-plan-checker.md +1 -0
- package/framework/agents/qualia-planner.md +1 -0
- package/framework/agents/qualia-project-researcher.md +1 -0
- package/framework/agents/qualia-research-synthesizer.md +1 -0
- package/framework/agents/qualia-roadmapper.md +1 -0
- package/framework/agents/qualia-verifier.md +1 -0
- package/framework/agents/security-auditor.md +72 -0
- package/framework/agents/team-orchestrator.md +1 -0
- package/framework/agents/teams/framework-audit-team.md +66 -0
- package/framework/agents/teams/review-team.md +11 -3
- package/framework/hooks/block-env-edit.sh +4 -8
- package/framework/hooks/branch-guard.sh +2 -5
- package/framework/hooks/confirm-delete.sh +7 -4
- package/framework/hooks/migration-validate.sh +9 -8
- package/framework/hooks/notification-speak.sh +1 -1
- package/framework/hooks/pre-commit.sh +22 -10
- package/framework/hooks/pre-deploy-gate.sh +5 -6
- package/framework/hooks/retention-cleanup.sh +11 -2
- package/framework/hooks/save-session-state.sh +22 -0
- package/framework/hooks/session-context-loader.sh +28 -30
- package/framework/hooks/session-learn.sh +6 -5
- package/framework/hooks/skill-announce.sh +109 -6
- package/framework/hooks/tool-error-announce.sh +16 -7
- package/framework/install.ps1 +323 -0
- package/framework/install.sh +306 -0
- package/framework/qualia-engine/references/completion-checklists.md +359 -0
- package/framework/rules/deployment.md +4 -3
- package/framework/rules/speed.md +4 -0
- package/framework/skills/animate/SKILL.md +1 -1
- package/framework/skills/bolder/SKILL.md +1 -1
- package/framework/skills/colorize/SKILL.md +1 -1
- package/framework/skills/deep-research/SKILL.md +19 -13
- package/framework/skills/delight/SKILL.md +1 -1
- package/framework/skills/design-quieter/SKILL.md +1 -1
- package/framework/skills/distill/SKILL.md +1 -1
- package/framework/skills/qualia-audit-milestone/SKILL.md +1 -1
- package/framework/skills/qualia-complete-milestone/SKILL.md +2 -2
- package/framework/skills/qualia-design/SKILL.md +2 -2
- package/framework/skills/qualia-framework-audit/SKILL.md +604 -0
- package/framework/skills/qualia-help/SKILL.md +11 -1
- package/framework/skills/qualia-pause-work/SKILL.md +2 -2
- package/framework/skills/qualia-review/SKILL.md +1 -1
- package/framework/skills/qualia-start/SKILL.md +8 -1
- package/framework/skills/qualia-verify-work/SKILL.md +1 -1
- package/framework/skills/ship/SKILL.md +1 -1
- package/framework/statusline-command.sh +5 -6
- package/framework/teams/default/inboxes/plan-04.json +9 -0
- package/package.json +1 -1
- package/framework/askpass.sh +0 -2
- package/framework/commands/design.md +0 -53
- package/framework/commands/quick-db.md +0 -22
- package/framework/config/retention.json +0 -35
- package/framework/core/PRINCIPLES.md +0 -77
- package/framework/knowledge/claudecode-bible.md +0 -1384
- package/framework/knowledge/client-prefs.md +0 -22
- package/framework/knowledge/common-fixes.md +0 -25
- package/framework/knowledge/deployment-map.md +0 -35
- package/framework/knowledge/email-signature.html +0 -1
- package/framework/knowledge/employees.md +0 -8
- package/framework/knowledge/learned-patterns.md +0 -51
- package/framework/knowledge/optimization-research-2026.md +0 -137
- package/framework/knowledge/qualia-context.md +0 -67
- package/framework/knowledge/supabase-patterns.md +0 -50
- package/framework/knowledge/voice-agent-patterns.md +0 -46
- package/framework/statusline-command.js +0 -111
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# ~/.claude/.claudeignore
|
|
2
|
+
# Patterns to exclude from Claude Code context
|
|
3
|
+
|
|
4
|
+
# Secrets and credentials
|
|
5
|
+
.env
|
|
6
|
+
.env.*
|
|
7
|
+
*.pem
|
|
8
|
+
*.key
|
|
9
|
+
credentials.json
|
|
10
|
+
*secret*
|
|
11
|
+
.credentials.json
|
|
12
|
+
askpass.sh
|
|
13
|
+
|
|
14
|
+
# Analytics and internal state
|
|
15
|
+
usage-data/
|
|
16
|
+
sessions/
|
|
17
|
+
statsig/
|
|
18
|
+
|
|
19
|
+
# Node modules (anywhere)
|
|
20
|
+
skills/*/node_modules/
|
|
21
|
+
plugins/cache/*/node_modules/
|
|
22
|
+
node_modules/
|
|
23
|
+
|
|
24
|
+
# Large generated directories
|
|
25
|
+
.next/
|
|
26
|
+
dist/
|
|
27
|
+
build/
|
|
28
|
+
*.log
|
|
29
|
+
|
|
30
|
+
# Claude internals (prevent recursion/bloat)
|
|
31
|
+
plugins/cache/
|
|
32
|
+
shell-snapshots/
|
|
33
|
+
debug/
|
|
34
|
+
file-history/
|
|
35
|
+
projects/
|
|
36
|
+
archive/
|
|
37
|
+
todos/
|
|
38
|
+
session-env/
|
|
39
|
+
paste-cache/
|
|
40
|
+
backups/
|
|
41
|
+
cache/
|
|
42
|
+
cowork-knowledge-pack.md
|
|
43
|
+
|
|
44
|
+
# IDE and editor
|
|
45
|
+
.vscode/
|
|
46
|
+
.idea/
|
|
47
|
+
|
|
48
|
+
# History and state files
|
|
49
|
+
history.jsonl
|
|
50
|
+
*.jsonl
|
|
51
|
+
cleanup.log
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# CLAUDE.md — Qualia Solutions
|
|
2
|
+
|
|
3
|
+
## Identity
|
|
4
|
+
**Fawzi Goussous** — Founder, Qualia Solutions. Nicosia, Cyprus.
|
|
5
|
+
|
|
6
|
+
- Stack: Next.js 16+, React 19, TypeScript, Supabase, Vercel, VAPI, ElevenLabs, Telnyx, Retell AI, OpenRouter
|
|
7
|
+
- Partner: Jay | Team: Moayad (full-time, Jordan), Ahasan (part-time, Cyprus)
|
|
8
|
+
|
|
9
|
+
## Role: OWNER
|
|
10
|
+
|
|
11
|
+
Full authority over all projects, deployments, architecture, and client decisions.
|
|
12
|
+
- Deploy directly to production
|
|
13
|
+
- Make architectural decisions unilaterally
|
|
14
|
+
- Access all Supabase projects and service role keys
|
|
15
|
+
- Modify the Qualia framework (CLAUDE.md, skills, hooks)
|
|
16
|
+
|
|
17
|
+
## Rules
|
|
18
|
+
- Read before Write/Edit — no exceptions
|
|
19
|
+
- Feature branches only — never commit to main/master
|
|
20
|
+
- MVP first. Build only what's asked. No over-engineering.
|
|
21
|
+
- Root cause on failures — no band-aids
|
|
22
|
+
- `npx tsc --noEmit` after multi-file TS changes
|
|
23
|
+
- Glob/Grep directly — no Task(Explore) unless 5+ rounds needed
|
|
24
|
+
- For non-trivial work (multi-file changes, architectural decisions, unfamiliar codebases), confirm understanding before coding — quick tasks are exempt
|
|
25
|
+
- See `rules/security.md` for auth, RLS, Zod, secrets rules
|
|
26
|
+
- See `rules/frontend.md` for design standards
|
|
27
|
+
- See `rules/deployment.md` for deploy checklist
|
|
28
|
+
- See `rules/speed.md` for tool usage and workflow shortcuts
|
|
29
|
+
- See `rules/context7.md` for library documentation lookup
|
|
30
|
+
|
|
31
|
+
## Collaboration
|
|
32
|
+
Collaborator, not executor. Speak up about bugs, simpler approaches, bad architecture.
|
|
33
|
+
Be honest. Default to action. Never speculate on unread code. Say when blocked.
|
|
34
|
+
- Direct, action-oriented, no fluff. Code > theory.
|
|
35
|
+
- Arabic or English — match whatever language is used
|
|
36
|
+
|
|
37
|
+
## Workflow
|
|
38
|
+
- **MANDATORY FIRST ACTION**: On every session start, invoke the `qualia-start` skill before doing anything else. This is non-negotiable — do not wait for user input, do not skip it, do not just acknowledge the hook message. Actually invoke the skill using the Skill tool.
|
|
39
|
+
- Subagents (Opus) for research and complex reasoning.
|
|
40
|
+
- `/compact` at 60%. `/clear` between tasks. `/learn` after mistakes.
|
|
41
|
+
|
|
42
|
+
## Qualia Mode (always active)
|
|
43
|
+
These behaviors apply to ALL interactions:
|
|
44
|
+
- **Frontend guard:** Read .planning/DESIGN.md before any frontend file changes
|
|
45
|
+
- **Deploy guard:** Check .planning/REVIEW.md freshness before any deploy command (run /qualia-review to generate)
|
|
46
|
+
- **Intent verification:** Confirm before modifying 3+ files in one response
|
|
47
|
+
- **Task-type detection:** Auto-load relevant skill patterns based on what's being done
|
|
48
|
+
- **Quality defaults:** Security rules, tsc checks, RLS consideration — always enforced
|
|
49
|
+
|
|
50
|
+
## Compaction — ALWAYS preserve:
|
|
51
|
+
Project path/name/ref, branch, modified files, decisions, test results, in-progress work, errors, Qualia phase/milestone state, Qualia mode active/inactive state, session digest context.
|
|
52
|
+
|
|
53
|
+
## Learned Patterns & Gotchas
|
|
54
|
+
See ~/.claude/knowledge/learned-patterns.md for full rules and project gotchas.
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
# MCP Server Setup & Security Guide
|
|
2
|
+
|
|
3
|
+
Configuration and security best practices for Model Context Protocol servers.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Current Configuration
|
|
8
|
+
|
|
9
|
+
### Active MCP Servers (as of 2026-03-30)
|
|
10
|
+
|
|
11
|
+
| Server | Package | Purpose | Status |
|
|
12
|
+
|--------|---------|---------|--------|
|
|
13
|
+
| `filesystem` | `@modelcontextprotocol/server-filesystem` | Local file operations | Active |
|
|
14
|
+
| `context7` | `@context7/mcp-server` | Documentation search | Active |
|
|
15
|
+
| `playwright` | `@playwright/mcp@latest` | Browser automation | Active |
|
|
16
|
+
| `vapi` | `@vapi-ai/mcp-server` | Voice AI integration | Active |
|
|
17
|
+
| `telnyx_api` | `telnyx-mcp-server` | Telecom integration | Active |
|
|
18
|
+
| `elevenlabs` | `@anthropic/elevenlabs-mcp-server` | Audio synthesis | Active |
|
|
19
|
+
|
|
20
|
+
**Removed servers:**
|
|
21
|
+
- `supabase` MCP — replaced by the `/supabase` skill (CLI + Management API, zero context overhead)
|
|
22
|
+
- `n8n-mcp` — removed, not actively used
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Server Details
|
|
27
|
+
|
|
28
|
+
### Filesystem
|
|
29
|
+
```json
|
|
30
|
+
{
|
|
31
|
+
"filesystem": {
|
|
32
|
+
"command": "npx",
|
|
33
|
+
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/home/qualia"]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
**Security:** Restricts access to home directory only.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
### Context7
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"context7": {
|
|
45
|
+
"command": "npx",
|
|
46
|
+
"args": ["-y", "@context7/mcp-server"]
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
**Purpose:** Search and retrieve up-to-date library documentation.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
### Playwright
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"playwright": {
|
|
58
|
+
"command": "npx",
|
|
59
|
+
"args": ["-y", "@playwright/mcp@latest"]
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
**Purpose:** Browser automation and web testing.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
### ~~Supabase~~ (REMOVED)
|
|
68
|
+
Replaced by the `/supabase` skill which uses CLI + Management API with zero context overhead.
|
|
69
|
+
|
|
70
|
+
Previously:
|
|
71
|
+
"command": "npx",
|
|
72
|
+
"args": ["-y", "@anthropic-ai/mcp-supabase"],
|
|
73
|
+
"env": {
|
|
74
|
+
"SUPABASE_URL": "${SUPABASE_URL}",
|
|
75
|
+
"SUPABASE_KEY": "${SUPABASE_KEY}"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
**Security:** Store credentials in `.env.claude` only.
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Security Best Practices
|
|
85
|
+
|
|
86
|
+
### 1. Credential Storage
|
|
87
|
+
|
|
88
|
+
**DO:**
|
|
89
|
+
```bash
|
|
90
|
+
# Store in .env.claude
|
|
91
|
+
SUPABASE_URL="https://xxx.supabase.co"
|
|
92
|
+
SUPABASE_KEY="your-key-here"
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**DON'T:**
|
|
96
|
+
```json
|
|
97
|
+
// Never put credentials directly in settings.json
|
|
98
|
+
"env": {
|
|
99
|
+
"SUPABASE_KEY": "eyJhbGciOiJIUzI1NiIs..." // BAD!
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### 2. File Permissions
|
|
104
|
+
```bash
|
|
105
|
+
chmod 600 ~/.claude/.env.claude
|
|
106
|
+
chmod 600 ~/.claude/settings.json
|
|
107
|
+
chmod 600 ~/.claude/.credentials.json
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### 3. Environment Variable Reference
|
|
111
|
+
Use variable interpolation in settings.json:
|
|
112
|
+
```json
|
|
113
|
+
"env": {
|
|
114
|
+
"API_KEY": "${API_KEY}" // References .env.claude
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### 4. Read-Only Mode
|
|
119
|
+
For production safety, consider read-only configurations:
|
|
120
|
+
```json
|
|
121
|
+
"env": {
|
|
122
|
+
"SUPABASE_READ_ONLY": "true"
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Adding New MCP Servers
|
|
129
|
+
|
|
130
|
+
### Step 1: Install the Server
|
|
131
|
+
```bash
|
|
132
|
+
npx -y @anthropic-ai/mcp-<server-name>
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Step 2: Add to settings.json
|
|
136
|
+
```json
|
|
137
|
+
{
|
|
138
|
+
"mcpServers": {
|
|
139
|
+
"new-server": {
|
|
140
|
+
"command": "npx",
|
|
141
|
+
"args": ["-y", "@anthropic-ai/mcp-new-server"],
|
|
142
|
+
"env": {
|
|
143
|
+
"API_KEY": "${NEW_SERVER_API_KEY}"
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Step 3: Add Credentials to .env.claude
|
|
151
|
+
```bash
|
|
152
|
+
echo 'NEW_SERVER_API_KEY="your-key"' >> ~/.claude/.env.claude
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Step 4: Restart Claude Code
|
|
156
|
+
```bash
|
|
157
|
+
source ~/.claude/.env.claude && claude
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Troubleshooting
|
|
163
|
+
|
|
164
|
+
### Server Not Starting
|
|
165
|
+
1. Check if package is installed: `npx -y @anthropic-ai/mcp-<name> --help`
|
|
166
|
+
2. Verify environment variables are set
|
|
167
|
+
3. Check Claude Code logs: `~/.claude/debug/`
|
|
168
|
+
|
|
169
|
+
### Authentication Errors
|
|
170
|
+
1. Verify credentials in `.env.claude`
|
|
171
|
+
2. Check file permissions
|
|
172
|
+
3. Ensure variables are exported: `source ~/.env.claude`
|
|
173
|
+
|
|
174
|
+
### Connection Timeouts
|
|
175
|
+
1. Check network connectivity
|
|
176
|
+
2. Verify API endpoint is accessible
|
|
177
|
+
3. Consider adding timeout configuration
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## Credential Rotation
|
|
182
|
+
|
|
183
|
+
### Schedule
|
|
184
|
+
- API keys: Every 90 days
|
|
185
|
+
- OAuth tokens: Automatic refresh
|
|
186
|
+
- Service role keys: Every 90 days
|
|
187
|
+
|
|
188
|
+
### Rotation Process
|
|
189
|
+
1. Generate new key in service dashboard
|
|
190
|
+
2. Update `.env.claude`
|
|
191
|
+
3. Test connectivity
|
|
192
|
+
4. Revoke old key
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## Monitoring
|
|
197
|
+
|
|
198
|
+
### Health Checks
|
|
199
|
+
MCP servers should respond to basic requests within 5 seconds.
|
|
200
|
+
|
|
201
|
+
### Log Locations
|
|
202
|
+
- MCP errors: `~/.claude/debug/`
|
|
203
|
+
- Connection issues: Check terminal output
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## Permissions Matrix
|
|
208
|
+
|
|
209
|
+
| Server | Read | Write | Execute |
|
|
210
|
+
|--------|------|-------|---------|
|
|
211
|
+
| filesystem | ✓ | ✓ | - |
|
|
212
|
+
| supabase | ✓ | ✓ | - |
|
|
213
|
+
| playwright | - | - | ✓ |
|
|
214
|
+
| context7 | ✓ | - | - |
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## Quick Commands
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
# Start Claude with MCP servers
|
|
222
|
+
source ~/.claude/.env.claude && claude
|
|
223
|
+
|
|
224
|
+
# List active servers
|
|
225
|
+
cat ~/.claude/settings.json | jq '.mcpServers | keys'
|
|
226
|
+
|
|
227
|
+
# Test specific server
|
|
228
|
+
npx -y @anthropic-ai/mcp-supabase --help
|
|
229
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: architecture-strategist
|
|
3
|
-
description: "
|
|
3
|
+
description: "Analyze code changes from an architectural perspective — component boundaries, coupling, SOLID principles, design pattern compliance. Use after refactors, new service additions, or when validating structural decisions."
|
|
4
4
|
model: inherit
|
|
5
5
|
tools: Read, Bash, Grep, Glob
|
|
6
6
|
---
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: code-simplicity-reviewer
|
|
3
|
-
description: "
|
|
3
|
+
description: "Final review pass for simplicity and minimalism — identifies unnecessary complexity, premature abstractions, YAGNI violations, and dead code. Use after implementation is complete, before finalizing changes."
|
|
4
4
|
model: inherit
|
|
5
5
|
tools: Read, Bash, Grep, Glob
|
|
6
6
|
---
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: kieran-typescript-reviewer
|
|
3
|
-
description: "
|
|
3
|
+
description: "Review TypeScript code with an extremely high quality bar — strict types, naming conventions, pattern adherence, type safety gaps. Use after implementing features, modifying existing code, or creating new TypeScript components."
|
|
4
4
|
model: inherit
|
|
5
5
|
tools: Read, Bash, Grep, Glob
|
|
6
6
|
---
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: performance-oracle
|
|
3
|
-
description: "
|
|
3
|
+
description: "Analyze code for performance issues — database queries, algorithms, memory usage, caching strategies, bundle size, render performance. Use after implementing features or when performance concerns arise."
|
|
4
4
|
model: inherit
|
|
5
5
|
tools: Read, Bash, Grep, Glob
|
|
6
6
|
---
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
name: qualia-codebase-mapper
|
|
3
3
|
description: Explores codebase and writes structured analysis documents. Spawned by map-codebase with a focus area (tech, arch, quality, concerns). Writes documents directly to reduce orchestrator context load.
|
|
4
4
|
tools: Read, Bash, Grep, Glob, Write
|
|
5
|
+
model: inherit
|
|
5
6
|
color: cyan
|
|
6
7
|
---
|
|
7
8
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
name: qualia-executor
|
|
3
3
|
description: Executes Qualia plans with atomic commits, deviation handling, checkpoint protocols, and state management. Spawned by execute-phase orchestrator or execute-plan command.
|
|
4
4
|
tools: Read, Write, Edit, Bash, Grep, Glob
|
|
5
|
+
model: inherit
|
|
5
6
|
color: yellow
|
|
6
7
|
---
|
|
7
8
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
name: qualia-phase-researcher
|
|
3
3
|
description: Researches how to implement a phase before planning. Produces RESEARCH.md consumed by qualia-planner. Spawned by /qualia:plan-phase orchestrator.
|
|
4
4
|
tools: Read, Write, Bash, Grep, Glob, WebSearch, WebFetch, mcp__context7__*
|
|
5
|
+
model: inherit
|
|
5
6
|
color: cyan
|
|
6
7
|
---
|
|
7
8
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
name: qualia-planner
|
|
3
3
|
description: Creates executable phase plans with task breakdown, dependency analysis, and goal-backward verification. Spawned by /qualia:plan-phase orchestrator.
|
|
4
4
|
tools: Read, Write, Bash, Glob, Grep, WebFetch, mcp__context7__*
|
|
5
|
+
model: inherit
|
|
5
6
|
color: green
|
|
6
7
|
---
|
|
7
8
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
name: qualia-project-researcher
|
|
3
3
|
description: Researches domain ecosystem before roadmap creation. Produces files in .planning/research/ consumed during roadmap creation. Spawned by /qualia:new-project or /qualia:new-milestone orchestrators.
|
|
4
4
|
tools: Read, Write, Bash, Grep, Glob, WebSearch, WebFetch, mcp__context7__*
|
|
5
|
+
model: inherit
|
|
5
6
|
color: cyan
|
|
6
7
|
---
|
|
7
8
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
name: qualia-roadmapper
|
|
3
3
|
description: Creates project roadmaps with phase breakdown, requirement mapping, success criteria derivation, and coverage validation. Spawned by /qualia:new-project orchestrator.
|
|
4
4
|
tools: Read, Write, Bash, Glob, Grep
|
|
5
|
+
model: inherit
|
|
5
6
|
color: purple
|
|
6
7
|
---
|
|
7
8
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
name: qualia-verifier
|
|
3
3
|
description: Verifies phase goal achievement through goal-backward analysis. Checks codebase delivers what phase promised, not just that tasks completed. Creates VERIFICATION.md report.
|
|
4
4
|
tools: Read, Bash, Grep, Glob
|
|
5
|
+
model: inherit
|
|
5
6
|
color: green
|
|
6
7
|
---
|
|
7
8
|
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: security-auditor
|
|
3
|
+
description: Security audit specialist — RLS policies, service_role exposure, auth patterns, input validation, secrets scanning, dependency vulnerabilities. Use when auditing a project's security posture before deploy or client handoff.
|
|
4
|
+
model: inherit
|
|
5
|
+
tools: Read, Bash, Grep, Glob
|
|
6
|
+
color: red
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
You are a security auditor for web applications built with Next.js, Supabase, and Vercel. Your job is to find security vulnerabilities, not code quality issues.
|
|
10
|
+
|
|
11
|
+
## Audit Dimensions
|
|
12
|
+
|
|
13
|
+
### 1. Supabase RLS
|
|
14
|
+
For each table in the project:
|
|
15
|
+
- Verify RLS is enabled
|
|
16
|
+
- Check SELECT/INSERT/UPDATE/DELETE policies exist
|
|
17
|
+
- Verify policies use `auth.uid()` — never trust client-provided IDs
|
|
18
|
+
- Flag tables with no policies (wide open)
|
|
19
|
+
|
|
20
|
+
### 2. Service Role Key Exposure
|
|
21
|
+
Scan for service_role in client-side code:
|
|
22
|
+
```bash
|
|
23
|
+
grep -r "service_role\|SERVICE_ROLE\|supabase.*service" --include="*.ts" --include="*.tsx" \
|
|
24
|
+
--exclude-dir=node_modules --exclude-dir=.next \
|
|
25
|
+
| grep -v "server\.\|api/\|supabase/server\|lib/supabase/server\|edge-functions\|supabase/functions"
|
|
26
|
+
```
|
|
27
|
+
Any match in a client component is **CRITICAL**.
|
|
28
|
+
|
|
29
|
+
### 3. Auth Pattern Verification
|
|
30
|
+
- Server-side mutations use `lib/supabase/server.ts` (not `client.ts`)
|
|
31
|
+
- API routes derive user from `auth.uid()`, never from request body/params
|
|
32
|
+
- Middleware protects authenticated routes
|
|
33
|
+
- Auth tokens have expiry/refresh
|
|
34
|
+
|
|
35
|
+
### 4. Input Validation
|
|
36
|
+
- All user inputs validated with Zod or equivalent
|
|
37
|
+
- No raw `req.body` usage without validation
|
|
38
|
+
- No `dangerouslySetInnerHTML` or `eval()`
|
|
39
|
+
- No `innerHTML =` or `document.write()`
|
|
40
|
+
|
|
41
|
+
### 5. Secrets & Environment
|
|
42
|
+
- `.env` files in `.gitignore`
|
|
43
|
+
- No hardcoded API keys, passwords, or tokens in source
|
|
44
|
+
- `NEXT_PUBLIC_` only for client-safe values
|
|
45
|
+
- Service role key only in server contexts
|
|
46
|
+
|
|
47
|
+
### 6. HTTP Security
|
|
48
|
+
- CORS properly restricted (not wildcard `*`)
|
|
49
|
+
- Rate limiting on auth endpoints
|
|
50
|
+
- Security headers configured (CSP, HSTS, X-Frame-Options)
|
|
51
|
+
- HTTPS enforced
|
|
52
|
+
|
|
53
|
+
### 7. Dependency Vulnerabilities
|
|
54
|
+
```bash
|
|
55
|
+
npm audit --json 2>/dev/null | node -e "const d=JSON.parse(require('fs').readFileSync('/dev/stdin','utf8'));console.log('Vulnerabilities:',d.metadata?.vulnerabilities||'unknown')"
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### 8. Migration Safety
|
|
59
|
+
- No destructive migrations without guards (DROP TABLE, DROP COLUMN)
|
|
60
|
+
- New tables have corresponding RLS policies
|
|
61
|
+
- No migrations that disable RLS
|
|
62
|
+
|
|
63
|
+
## Output Format
|
|
64
|
+
|
|
65
|
+
For EVERY finding:
|
|
66
|
+
- **What**: description
|
|
67
|
+
- **Where**: file:line
|
|
68
|
+
- **Impact**: what an attacker could do
|
|
69
|
+
- **Fix**: concrete remediation
|
|
70
|
+
- **Severity**: CRITICAL / HIGH / MEDIUM / LOW
|
|
71
|
+
|
|
72
|
+
CRITICAL = data breach risk. HIGH = auth bypass risk. MEDIUM = defense-in-depth gap. LOW = best practice.
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
name: team-orchestrator
|
|
3
3
|
description: Meta-agent that coordinates specialist agent teams using pipeline, fan-out/fan-in, or review loop patterns. Spawned by /team command or Qualia execute-phase with team field.
|
|
4
4
|
tools: Read, Write, Edit, Bash, Grep, Glob
|
|
5
|
+
model: inherit
|
|
5
6
|
color: magenta
|
|
6
7
|
---
|
|
7
8
|
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Framework Audit Team
|
|
2
|
+
|
|
3
|
+
> 6 specialist reviewers audit the Qualia framework infrastructure in parallel, results synthesized into unified report.
|
|
4
|
+
|
|
5
|
+
## Agents
|
|
6
|
+
|
|
7
|
+
- **config-reviewer**
|
|
8
|
+
- subagent_type: general-purpose
|
|
9
|
+
- role: Review CLAUDE.md, rules/*.md, settings.json for completeness, consistency, contradictions
|
|
10
|
+
- focus: Identity, rules, permissions, MCP config, hook registrations, cross-references
|
|
11
|
+
|
|
12
|
+
- **agent-reviewer**
|
|
13
|
+
- subagent_type: general-purpose
|
|
14
|
+
- role: Review all agents in agents/*.md and all team templates in agents/teams/ for quality, overlap, gaps, naming
|
|
15
|
+
- focus: Agent definitions, team patterns, subagent_type alignment, orphan detection
|
|
16
|
+
|
|
17
|
+
- **skill-reviewer**
|
|
18
|
+
- subagent_type: general-purpose
|
|
19
|
+
- role: Review all 65+ skills for quality, overlap, gaps, trigger accuracy, category health
|
|
20
|
+
- focus: SKILL.md files, skill-agent alignment, dead skill detection, archive health
|
|
21
|
+
|
|
22
|
+
- **hook-reviewer**
|
|
23
|
+
- subagent_type: general-purpose
|
|
24
|
+
- role: Review all 16 hooks for correctness, performance, coverage, branding consistency
|
|
25
|
+
- focus: Hook scripts, settings.json alignment, exit codes, JSON output, early-exit guards
|
|
26
|
+
|
|
27
|
+
- **knowledge-reviewer**
|
|
28
|
+
- subagent_type: general-purpose
|
|
29
|
+
- role: Review knowledge files and memory system for staleness, accuracy, completeness
|
|
30
|
+
- focus: Knowledge .md files, MEMORY.md index, cross-references, duplicate content
|
|
31
|
+
|
|
32
|
+
- **architecture-reviewer**
|
|
33
|
+
- subagent_type: general-purpose
|
|
34
|
+
- role: Cross-cutting review of framework organization, naming, dead code, security, scalability
|
|
35
|
+
- focus: Directory structure, naming conventions, archive health, install scripts, .gitignore
|
|
36
|
+
|
|
37
|
+
## Pattern
|
|
38
|
+
|
|
39
|
+
fan-out (all 6 parallel) → synthesize into FRAMEWORK-AUDIT.md
|
|
40
|
+
|
|
41
|
+
## Shared Context
|
|
42
|
+
|
|
43
|
+
- ~/.claude/CLAUDE.md — core identity and rules
|
|
44
|
+
- ~/.claude/settings.json — hook config, permissions, MCP servers
|
|
45
|
+
- Framework inventory counts (agents, skills, hooks, knowledge)
|
|
46
|
+
|
|
47
|
+
## Coordination Rules
|
|
48
|
+
|
|
49
|
+
- Each reviewer produces findings independently — no coordination needed
|
|
50
|
+
- Reviewers are read-only — they analyze and report, they don't fix
|
|
51
|
+
- Findings must include file references
|
|
52
|
+
- Each reviewer rates findings: CRITICAL / HIGH / MEDIUM / LOW
|
|
53
|
+
- Overlap detection is shared between agent-reviewer and skill-reviewer
|
|
54
|
+
|
|
55
|
+
## Finding Format
|
|
56
|
+
|
|
57
|
+
Every finding MUST include:
|
|
58
|
+
- **What**: description
|
|
59
|
+
- **Where**: file or directory
|
|
60
|
+
- **Why**: impact
|
|
61
|
+
- **Fix**: concrete suggestion
|
|
62
|
+
- **Severity**: CRITICAL / HIGH / MEDIUM / LOW
|
|
63
|
+
|
|
64
|
+
## Output
|
|
65
|
+
|
|
66
|
+
~/.claude/.planning/FRAMEWORK-AUDIT.md
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Review Team
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Four specialist reviewers analyze code in parallel, results synthesized into unified report.
|
|
4
4
|
|
|
5
5
|
## Agents
|
|
6
6
|
|
|
@@ -19,9 +19,14 @@
|
|
|
19
19
|
- role: TypeScript quality — strict types, naming conventions, pattern adherence, type safety gaps
|
|
20
20
|
- focus: Type definitions, generics usage, any/unknown, null handling, naming
|
|
21
21
|
|
|
22
|
+
- **security-auditor**
|
|
23
|
+
- subagent_type: security-auditor
|
|
24
|
+
- role: RLS policies, service_role exposure, auth patterns, input validation, secrets scanning, dependency vulnerabilities
|
|
25
|
+
- focus: Supabase security, auth flows, env var handling, XSS/injection prevention
|
|
26
|
+
|
|
22
27
|
## Pattern
|
|
23
28
|
|
|
24
|
-
fan-out (all
|
|
29
|
+
fan-out (all 4 parallel) → synthesize into REVIEW-REPORT.md
|
|
25
30
|
|
|
26
31
|
## Shared Context
|
|
27
32
|
|
|
@@ -33,7 +38,7 @@ fan-out (all 3 parallel) → synthesize into REVIEW-REPORT.md
|
|
|
33
38
|
- Each reviewer produces findings independently — no coordination needed
|
|
34
39
|
- Reviewers are read-only — they analyze and report, they don't fix
|
|
35
40
|
- Findings should include file:line references
|
|
36
|
-
- Each reviewer rates findings:
|
|
41
|
+
- Each reviewer rates findings: CRITICAL / HIGH / MEDIUM / LOW
|
|
37
42
|
|
|
38
43
|
## Output
|
|
39
44
|
|
|
@@ -54,6 +59,9 @@ REVIEW-REPORT.md in current directory with sections:
|
|
|
54
59
|
## TypeScript Quality Review
|
|
55
60
|
{From kieran-typescript-reviewer}
|
|
56
61
|
|
|
62
|
+
## Security Review
|
|
63
|
+
{From security-auditor}
|
|
64
|
+
|
|
57
65
|
## Action Items
|
|
58
66
|
| # | Severity | Finding | File:Line | Reviewer |
|
|
59
67
|
|---|----------|---------|-----------|----------|
|