qualia-framework 2.5.1 → 3.1.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.
- package/CLAUDE.md +63 -0
- package/README.md +108 -30
- package/agents/builder.md +110 -0
- package/agents/planner.md +186 -0
- package/agents/qa-browser.md +186 -0
- package/agents/verifier.md +369 -0
- package/bin/cli.js +706 -417
- package/bin/install.js +622 -0
- package/bin/qualia-ui.js +284 -0
- package/bin/state.js +824 -0
- package/bin/statusline.js +252 -0
- package/docs/erp-contract.md +161 -0
- package/guide.md +63 -0
- package/hooks/auto-update.js +117 -0
- package/hooks/block-env-edit.js +52 -0
- package/hooks/branch-guard.js +68 -0
- package/hooks/migration-guard.js +83 -0
- package/hooks/pre-compact.js +52 -0
- package/hooks/pre-deploy-gate.js +149 -0
- package/hooks/pre-push.js +53 -0
- package/hooks/session-start.js +126 -0
- package/package.json +31 -17
- package/rules/design-reference.md +179 -0
- package/rules/frontend.md +126 -0
- package/rules/infrastructure.md +87 -0
- package/skills/qualia/SKILL.md +88 -0
- package/skills/qualia-build/SKILL.md +115 -0
- package/skills/qualia-debug/SKILL.md +87 -0
- package/skills/qualia-design/SKILL.md +99 -0
- package/skills/qualia-handoff/SKILL.md +66 -0
- package/skills/qualia-help/SKILL.md +60 -0
- package/skills/qualia-idk/SKILL.md +8 -0
- package/skills/qualia-learn/SKILL.md +111 -0
- package/skills/qualia-new/SKILL.md +323 -0
- package/skills/qualia-pause/SKILL.md +63 -0
- package/skills/qualia-plan/SKILL.md +101 -0
- package/skills/qualia-polish/SKILL.md +207 -0
- package/skills/qualia-quick/SKILL.md +37 -0
- package/skills/qualia-report/SKILL.md +114 -0
- package/skills/qualia-resume/SKILL.md +49 -0
- package/skills/qualia-review/SKILL.md +161 -0
- package/skills/qualia-ship/SKILL.md +90 -0
- package/skills/qualia-skill-new/SKILL.md +167 -0
- package/skills/qualia-task/SKILL.md +91 -0
- package/skills/qualia-test/SKILL.md +134 -0
- package/skills/qualia-verify/SKILL.md +113 -0
- package/templates/DESIGN.md +475 -0
- package/templates/help.html +476 -0
- package/templates/plan.md +42 -0
- package/templates/project.md +22 -0
- package/templates/state.md +27 -0
- package/templates/tracking.json +20 -0
- package/tests/bin.test.sh +687 -0
- package/tests/hooks.test.sh +384 -0
- package/tests/runner.js +1956 -0
- package/tests/state.test.sh +713 -0
- package/tests/statusline.test.sh +243 -0
- package/bin/collect-metrics.sh +0 -62
- package/framework/.claudeignore +0 -51
- package/framework/CLAUDE.md +0 -51
- package/framework/MCP_SETUP.md +0 -229
- package/framework/agents/architecture-strategist.md +0 -53
- package/framework/agents/backend-agent.md +0 -150
- package/framework/agents/code-simplicity-reviewer.md +0 -86
- package/framework/agents/frontend-agent.md +0 -111
- package/framework/agents/kieran-typescript-reviewer.md +0 -96
- package/framework/agents/performance-oracle.md +0 -111
- package/framework/agents/qualia-codebase-mapper.md +0 -761
- package/framework/agents/qualia-debugger.md +0 -1204
- package/framework/agents/qualia-executor.md +0 -882
- package/framework/agents/qualia-integration-checker.md +0 -424
- package/framework/agents/qualia-phase-researcher.md +0 -457
- package/framework/agents/qualia-plan-checker.md +0 -700
- package/framework/agents/qualia-planner.md +0 -1245
- package/framework/agents/qualia-project-researcher.md +0 -603
- package/framework/agents/qualia-research-synthesizer.md +0 -200
- package/framework/agents/qualia-roadmapper.md +0 -606
- package/framework/agents/qualia-verifier.md +0 -686
- package/framework/agents/red-team-qa.md +0 -130
- package/framework/agents/security-auditor.md +0 -72
- package/framework/agents/team-orchestrator.md +0 -229
- package/framework/agents/teams/framework-audit-team.md +0 -66
- package/framework/agents/teams/full-stack-team.md +0 -48
- package/framework/agents/teams/optimize-team.md +0 -53
- package/framework/agents/teams/review-team.md +0 -70
- package/framework/agents/teams/ship-team.md +0 -86
- package/framework/agents/test-agent.md +0 -182
- package/framework/hooks/auto-format.sh +0 -54
- package/framework/hooks/block-env-edit.sh +0 -42
- package/framework/hooks/branch-guard.sh +0 -43
- package/framework/hooks/confirm-delete.sh +0 -59
- package/framework/hooks/migration-validate.sh +0 -77
- package/framework/hooks/notification-speak.sh +0 -16
- package/framework/hooks/pre-commit.sh +0 -100
- package/framework/hooks/pre-compact.sh +0 -56
- package/framework/hooks/pre-deploy-gate.sh +0 -160
- package/framework/hooks/qualia-colors.sh +0 -32
- package/framework/hooks/retention-cleanup.sh +0 -62
- package/framework/hooks/save-session-state.sh +0 -185
- package/framework/hooks/session-context-loader.sh +0 -96
- package/framework/hooks/session-learn.sh +0 -32
- package/framework/hooks/skill-announce.sh +0 -123
- package/framework/hooks/tool-error-announce.sh +0 -27
- package/framework/install.ps1 +0 -323
- package/framework/install.sh +0 -313
- package/framework/qualia-framework/VERSION +0 -1
- package/framework/qualia-framework/assets/qualia-logo.png +0 -0
- package/framework/qualia-framework/bin/collect-metrics.sh +0 -67
- package/framework/qualia-framework/bin/generate-report-docx.py +0 -429
- package/framework/qualia-framework/bin/qualia-tools.js +0 -2201
- package/framework/qualia-framework/bin/qualia-tools.test.js +0 -1054
- package/framework/qualia-framework/references/checkpoints.md +0 -775
- package/framework/qualia-framework/references/completion-checklists.md +0 -359
- package/framework/qualia-framework/references/continuation-format.md +0 -249
- package/framework/qualia-framework/references/continuation-prompt.md +0 -97
- package/framework/qualia-framework/references/decimal-phase-calculation.md +0 -65
- package/framework/qualia-framework/references/design-quality.md +0 -56
- package/framework/qualia-framework/references/employee-guide.md +0 -167
- package/framework/qualia-framework/references/git-integration.md +0 -254
- package/framework/qualia-framework/references/git-planning-commit.md +0 -50
- package/framework/qualia-framework/references/model-profile-resolution.md +0 -32
- package/framework/qualia-framework/references/model-profiles.md +0 -73
- package/framework/qualia-framework/references/phase-argument-parsing.md +0 -61
- package/framework/qualia-framework/references/planning-config.md +0 -195
- package/framework/qualia-framework/references/questioning.md +0 -141
- package/framework/qualia-framework/references/tdd.md +0 -263
- package/framework/qualia-framework/references/ui-brand.md +0 -160
- package/framework/qualia-framework/references/verification-patterns.md +0 -612
- package/framework/qualia-framework/templates/DEBUG.md +0 -159
- package/framework/qualia-framework/templates/DESIGN.md +0 -81
- package/framework/qualia-framework/templates/UAT.md +0 -247
- package/framework/qualia-framework/templates/codebase/architecture.md +0 -255
- package/framework/qualia-framework/templates/codebase/concerns.md +0 -310
- package/framework/qualia-framework/templates/codebase/conventions.md +0 -307
- package/framework/qualia-framework/templates/codebase/integrations.md +0 -280
- package/framework/qualia-framework/templates/codebase/stack.md +0 -186
- package/framework/qualia-framework/templates/codebase/structure.md +0 -285
- package/framework/qualia-framework/templates/codebase/testing.md +0 -480
- package/framework/qualia-framework/templates/config.json +0 -35
- package/framework/qualia-framework/templates/context.md +0 -283
- package/framework/qualia-framework/templates/continue-here.md +0 -78
- package/framework/qualia-framework/templates/debug-subagent-prompt.md +0 -91
- package/framework/qualia-framework/templates/discovery.md +0 -146
- package/framework/qualia-framework/templates/lab-notes.md +0 -16
- package/framework/qualia-framework/templates/milestone-archive.md +0 -123
- package/framework/qualia-framework/templates/milestone.md +0 -115
- package/framework/qualia-framework/templates/phase-prompt.md +0 -567
- package/framework/qualia-framework/templates/planner-subagent-prompt.md +0 -117
- package/framework/qualia-framework/templates/project.md +0 -184
- package/framework/qualia-framework/templates/projects/ai-agent.md +0 -156
- package/framework/qualia-framework/templates/projects/mobile-app.md +0 -181
- package/framework/qualia-framework/templates/projects/voice-agent.md +0 -134
- package/framework/qualia-framework/templates/projects/website.md +0 -137
- package/framework/qualia-framework/templates/requirements.md +0 -231
- package/framework/qualia-framework/templates/research-project/ARCHITECTURE.md +0 -204
- package/framework/qualia-framework/templates/research-project/FEATURES.md +0 -147
- package/framework/qualia-framework/templates/research-project/PITFALLS.md +0 -200
- package/framework/qualia-framework/templates/research-project/STACK.md +0 -120
- package/framework/qualia-framework/templates/research-project/SUMMARY.md +0 -170
- package/framework/qualia-framework/templates/research.md +0 -552
- package/framework/qualia-framework/templates/roadmap.md +0 -206
- package/framework/qualia-framework/templates/state.md +0 -179
- package/framework/qualia-framework/templates/summary-complex.md +0 -59
- package/framework/qualia-framework/templates/summary-minimal.md +0 -41
- package/framework/qualia-framework/templates/summary-standard.md +0 -48
- package/framework/qualia-framework/templates/summary.md +0 -246
- package/framework/qualia-framework/templates/user-setup.md +0 -311
- package/framework/qualia-framework/templates/verification-report.md +0 -322
- package/framework/qualia-framework/workflows/add-phase.md +0 -179
- package/framework/qualia-framework/workflows/add-todo.md +0 -157
- package/framework/qualia-framework/workflows/audit-milestone.md +0 -241
- package/framework/qualia-framework/workflows/check-todos.md +0 -176
- package/framework/qualia-framework/workflows/complete-milestone.md +0 -858
- package/framework/qualia-framework/workflows/diagnose-issues.md +0 -219
- package/framework/qualia-framework/workflows/discovery-phase.md +0 -289
- package/framework/qualia-framework/workflows/discuss-phase.md +0 -534
- package/framework/qualia-framework/workflows/execute-phase.md +0 -559
- package/framework/qualia-framework/workflows/execute-plan.md +0 -438
- package/framework/qualia-framework/workflows/help.md +0 -470
- package/framework/qualia-framework/workflows/insert-phase.md +0 -220
- package/framework/qualia-framework/workflows/list-phase-assumptions.md +0 -178
- package/framework/qualia-framework/workflows/map-codebase.md +0 -327
- package/framework/qualia-framework/workflows/new-milestone.md +0 -363
- package/framework/qualia-framework/workflows/new-project.md +0 -982
- package/framework/qualia-framework/workflows/pause-work.md +0 -122
- package/framework/qualia-framework/workflows/plan-milestone-gaps.md +0 -256
- package/framework/qualia-framework/workflows/plan-phase.md +0 -422
- package/framework/qualia-framework/workflows/progress.md +0 -389
- package/framework/qualia-framework/workflows/quick.md +0 -252
- package/framework/qualia-framework/workflows/remove-phase.md +0 -326
- package/framework/qualia-framework/workflows/research-phase.md +0 -74
- package/framework/qualia-framework/workflows/resume-project.md +0 -306
- package/framework/qualia-framework/workflows/set-profile.md +0 -80
- package/framework/qualia-framework/workflows/settings.md +0 -145
- package/framework/qualia-framework/workflows/transition.md +0 -556
- package/framework/qualia-framework/workflows/update.md +0 -197
- package/framework/qualia-framework/workflows/verify-phase.md +0 -195
- package/framework/qualia-framework/workflows/verify-work.md +0 -625
- package/framework/rules/context7.md +0 -14
- package/framework/rules/frontend.md +0 -33
- package/framework/rules/speed.md +0 -23
- package/framework/scripts/__pycache__/say.cpython-314.pyc +0 -0
- package/framework/scripts/apply-retention.sh +0 -120
- package/framework/scripts/bootstrap-pop-os.sh +0 -354
- package/framework/scripts/claude-voice +0 -13
- package/framework/scripts/cleanup.sh +0 -131
- package/framework/scripts/cowork-mode.sh +0 -141
- package/framework/scripts/generate-project-claude-md.sh +0 -153
- package/framework/scripts/load-test-webhook.js +0 -172
- package/framework/scripts/say.py +0 -236
- package/framework/scripts/showcase-video-recorder/ffmpeg-builder.js +0 -167
- package/framework/scripts/showcase-video-recorder/playwright-helpers.js +0 -216
- package/framework/scripts/speak.py +0 -55
- package/framework/scripts/speak.sh +0 -18
- package/framework/scripts/status.sh +0 -138
- package/framework/scripts/sync-to-framework.sh +0 -65
- package/framework/scripts/voice-hotkey.py +0 -227
- package/framework/scripts/voice-input.sh +0 -51
- package/framework/skills/animate/SKILL.md +0 -202
- package/framework/skills/bolder/SKILL.md +0 -144
- package/framework/skills/browser-qa/SKILL.md +0 -536
- package/framework/skills/clarify/SKILL.md +0 -179
- package/framework/skills/client-handoff/SKILL.md +0 -135
- package/framework/skills/collab-onboard/SKILL.md +0 -111
- package/framework/skills/colorize/SKILL.md +0 -170
- package/framework/skills/critique/SKILL.md +0 -126
- package/framework/skills/deep-research/SKILL.md +0 -240
- package/framework/skills/delight/SKILL.md +0 -329
- package/framework/skills/deploy/SKILL.md +0 -261
- package/framework/skills/deploy-verify/SKILL.md +0 -377
- package/framework/skills/deploy-verify/scripts/canary-check.sh +0 -206
- package/framework/skills/deploy-verify/scripts/check-console-errors.js +0 -147
- package/framework/skills/deploy-verify/scripts/check-cwv.js +0 -139
- package/framework/skills/deploy-verify/scripts/project-detect.sh +0 -84
- package/framework/skills/deploy-verify/scripts/verify.sh +0 -548
- package/framework/skills/design-quieter/SKILL.md +0 -130
- package/framework/skills/distill/SKILL.md +0 -149
- package/framework/skills/docs-lookup/SKILL.md +0 -79
- package/framework/skills/fcm-notifications/SKILL.md +0 -125
- package/framework/skills/financial-ledger/SKILL.md +0 -1039
- package/framework/skills/frontend-master/NOTICE.md +0 -4
- package/framework/skills/frontend-master/SKILL.md +0 -127
- package/framework/skills/frontend-master/reference/color-and-contrast.md +0 -132
- package/framework/skills/frontend-master/reference/interaction-design.md +0 -123
- package/framework/skills/frontend-master/reference/motion-design.md +0 -99
- package/framework/skills/frontend-master/reference/responsive-design.md +0 -114
- package/framework/skills/frontend-master/reference/spatial-design.md +0 -100
- package/framework/skills/frontend-master/reference/typography.md +0 -131
- package/framework/skills/frontend-master/reference/ux-writing.md +0 -107
- package/framework/skills/harden/SKILL.md +0 -357
- package/framework/skills/i18n-rtl/SKILL.md +0 -752
- package/framework/skills/learn/SKILL.md +0 -95
- package/framework/skills/memory/SKILL.md +0 -50
- package/framework/skills/mobile-expo/SKILL.md +0 -977
- package/framework/skills/mobile-expo/references/store-checklist.md +0 -550
- package/framework/skills/nestjs-backend/README.md +0 -73
- package/framework/skills/nestjs-backend/SKILL.md +0 -446
- package/framework/skills/nestjs-backend/references/templates.md +0 -1173
- package/framework/skills/normalize/SKILL.md +0 -79
- package/framework/skills/onboard/SKILL.md +0 -242
- package/framework/skills/openrouter-agent/SKILL.md +0 -922
- package/framework/skills/polish/SKILL.md +0 -209
- package/framework/skills/pr/SKILL.md +0 -66
- package/framework/skills/qualia/SKILL.md +0 -199
- package/framework/skills/qualia-add-todo/SKILL.md +0 -68
- package/framework/skills/qualia-audit-milestone/SKILL.md +0 -95
- package/framework/skills/qualia-check-todos/SKILL.md +0 -55
- package/framework/skills/qualia-complete-milestone/SKILL.md +0 -134
- package/framework/skills/qualia-debug/SKILL.md +0 -149
- package/framework/skills/qualia-design/SKILL.md +0 -203
- package/framework/skills/qualia-discuss-phase/SKILL.md +0 -72
- package/framework/skills/qualia-evolve/SKILL.md +0 -200
- package/framework/skills/qualia-execute-phase/SKILL.md +0 -89
- package/framework/skills/qualia-framework-audit/SKILL.md +0 -604
- package/framework/skills/qualia-guide/SKILL.md +0 -32
- package/framework/skills/qualia-help/SKILL.md +0 -114
- package/framework/skills/qualia-idk/SKILL.md +0 -352
- package/framework/skills/qualia-list-phase-assumptions/SKILL.md +0 -67
- package/framework/skills/qualia-new-milestone/SKILL.md +0 -72
- package/framework/skills/qualia-new-project/SKILL.md +0 -232
- package/framework/skills/qualia-optimize/SKILL.md +0 -417
- package/framework/skills/qualia-pause-work/SKILL.md +0 -96
- package/framework/skills/qualia-plan-milestone-gaps/SKILL.md +0 -57
- package/framework/skills/qualia-plan-phase/SKILL.md +0 -104
- package/framework/skills/qualia-production-check/SKILL.md +0 -0
- package/framework/skills/qualia-progress/SKILL.md +0 -53
- package/framework/skills/qualia-quick/SKILL.md +0 -89
- package/framework/skills/qualia-report/SKILL.md +0 -166
- package/framework/skills/qualia-research-phase/SKILL.md +0 -88
- package/framework/skills/qualia-resume-work/SKILL.md +0 -62
- package/framework/skills/qualia-review/SKILL.md +0 -263
- package/framework/skills/qualia-start/SKILL.md +0 -161
- package/framework/skills/qualia-verify-work/SKILL.md +0 -132
- package/framework/skills/rag/SKILL.md +0 -750
- package/framework/skills/responsive/SKILL.md +0 -231
- package/framework/skills/retro/SKILL.md +0 -284
- package/framework/skills/sakani-conventions/SKILL.md +0 -136
- package/framework/skills/sakani-conventions/evals/evals.json +0 -23
- package/framework/skills/sakani-conventions/references/entities.md +0 -365
- package/framework/skills/sakani-conventions/references/error-codes.md +0 -95
- package/framework/skills/seo-master/SKILL.md +0 -490
- package/framework/skills/seo-master/references/checklist.md +0 -199
- package/framework/skills/seo-master/references/structured-data.md +0 -609
- package/framework/skills/ship/SKILL.md +0 -239
- package/framework/skills/stack-researcher/SKILL.md +0 -215
- package/framework/skills/status/SKILL.md +0 -154
- package/framework/skills/status/scripts/health-check.sh +0 -562
- package/framework/skills/subscription-payments/SKILL.md +0 -250
- package/framework/skills/supabase/SKILL.md +0 -973
- package/framework/skills/supabase/references/templates.md +0 -159
- package/framework/skills/team/SKILL.md +0 -67
- package/framework/skills/test-runner/SKILL.md +0 -202
- package/framework/skills/voice-agent/SKILL.md +0 -1312
- package/framework/skills/zoho-workflow/SKILL.md +0 -51
- package/framework/statusline-command.sh +0 -117
- package/framework/teams/default/inboxes/plan-04.json +0 -9
- package/framework/teams/review-team.md +0 -75
- package/framework/teams/ship-team.md +0 -86
- package/profiles/fawzi.json +0 -16
- package/profiles/hasan.json +0 -16
- package/profiles/moayad.json +0 -16
- package/templates/CLAUDE-owner.md +0 -52
- package/templates/CLAUDE.md.hbs +0 -58
- package/templates/env.claude.template +0 -12
- package/templates/settings.json +0 -172
- /package/{framework/rules → rules}/deployment.md +0 -0
- /package/{framework/rules → rules}/security.md +0 -0
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Qualia Framework v2 — statusline.js behavioral tests
|
|
3
|
+
# Run: bash tests/statusline.test.sh
|
|
4
|
+
#
|
|
5
|
+
# Strategy: statusline.js reads a single JSON blob from stdin and prints two
|
|
6
|
+
# ANSI-formatted lines to stdout. We pipe JSON, capture stdout, and assert on
|
|
7
|
+
# exit code + presence of expected substrings (including raw ANSI escape codes
|
|
8
|
+
# for color assertions).
|
|
9
|
+
#
|
|
10
|
+
# Workspace dirs point at /tmp/qualia-sl-nonexistent so git subprocesses fail
|
|
11
|
+
# fast (statusline swallows the error) — no real git repo required.
|
|
12
|
+
|
|
13
|
+
PASS=0
|
|
14
|
+
FAIL=0
|
|
15
|
+
# Resolve SL_JS to an ABSOLUTE path so `cd` inside subshells doesn't break it.
|
|
16
|
+
SL_JS="$(cd "$(dirname "$0")/../bin" && pwd)/statusline.js"
|
|
17
|
+
NODE="${NODE:-node}"
|
|
18
|
+
|
|
19
|
+
# statusline.js caches git state per-user in $TMPDIR/qualia-git-cache-$USER
|
|
20
|
+
# (3-second TTL). Wipe before every test so cached results from a previous
|
|
21
|
+
# run don't leak branch/changes values into the current assertion.
|
|
22
|
+
CACHE_GLOB_DIR="${TMPDIR:-/tmp}"
|
|
23
|
+
clean_cache() {
|
|
24
|
+
rm -f "$CACHE_GLOB_DIR"/qualia-git-cache-* 2>/dev/null || true
|
|
25
|
+
}
|
|
26
|
+
trap clean_cache EXIT
|
|
27
|
+
clean_cache
|
|
28
|
+
|
|
29
|
+
# Colors used by statusline.js — hardcoded from bin/statusline.js
|
|
30
|
+
# These are raw ANSI escape sequences (printf %b interpolates \x1b -> ESC).
|
|
31
|
+
TEAL_ESC=$(printf '\x1b[38;2;0;206;209m')
|
|
32
|
+
YELLOW_ESC=$(printf '\x1b[38;2;234;179;8m')
|
|
33
|
+
RED_ESC=$(printf '\x1b[38;2;239;68;68m')
|
|
34
|
+
|
|
35
|
+
pass() {
|
|
36
|
+
echo " ✓ $1"
|
|
37
|
+
PASS=$((PASS + 1))
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
fail_case() {
|
|
41
|
+
echo " ✗ $1${2:+ — $2}"
|
|
42
|
+
FAIL=$((FAIL + 1))
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
# run_sl <json> → populates OUT (stdout) and RC (exit code).
|
|
46
|
+
# Uses a nonexistent workspace dir so git commands fail gracefully.
|
|
47
|
+
# We write stdout to a tmp file (not $()) so we can capture exit code
|
|
48
|
+
# without losing it to a subshell on the left side of the pipeline.
|
|
49
|
+
SL_OUTFILE=$(mktemp)
|
|
50
|
+
run_sl() {
|
|
51
|
+
local json="$1"
|
|
52
|
+
clean_cache
|
|
53
|
+
# printf %s (not echo) to avoid trailing newlines affecting JSON.parse.
|
|
54
|
+
printf '%s' "$json" | $NODE "$SL_JS" > "$SL_OUTFILE" 2>/dev/null
|
|
55
|
+
RC=$?
|
|
56
|
+
OUT=$(cat "$SL_OUTFILE")
|
|
57
|
+
}
|
|
58
|
+
# Extend the cleanup trap to also remove the tmp output file.
|
|
59
|
+
cleanup_sl() {
|
|
60
|
+
clean_cache
|
|
61
|
+
[ -f "$SL_OUTFILE" ] && rm -f "$SL_OUTFILE"
|
|
62
|
+
}
|
|
63
|
+
trap cleanup_sl EXIT
|
|
64
|
+
|
|
65
|
+
echo "=== statusline.js Behavioral Tests ==="
|
|
66
|
+
echo ""
|
|
67
|
+
|
|
68
|
+
# Sanity check
|
|
69
|
+
if [ ! -f "$SL_JS" ]; then
|
|
70
|
+
echo "FATAL: statusline.js not found at $SL_JS"
|
|
71
|
+
exit 1
|
|
72
|
+
fi
|
|
73
|
+
|
|
74
|
+
# ─── Basic rendering ─────────────────────────────────────
|
|
75
|
+
echo "basic rendering:"
|
|
76
|
+
|
|
77
|
+
# 1. Minimal input renders without crash — two lines, contains dir basename + model
|
|
78
|
+
NONEXIST="/tmp/qualia-sl-nonexist-$$"
|
|
79
|
+
JSON='{"model":{"display_name":"Claude Opus 4.6"},"workspace":{"current_dir":"'"$NONEXIST"'"},"context_window":{"used_percentage":0},"cost":{"total_cost_usd":0},"agent":{},"worktree":{}}'
|
|
80
|
+
run_sl "$JSON"
|
|
81
|
+
LINES=$(wc -l < "$SL_OUTFILE")
|
|
82
|
+
if [ "$RC" -eq 0 ] \
|
|
83
|
+
&& [ "$LINES" -eq 2 ] \
|
|
84
|
+
&& grep -qF "qualia-sl-nonexist" "$SL_OUTFILE" \
|
|
85
|
+
&& grep -qF "Claude Opus 4.6" "$SL_OUTFILE"; then
|
|
86
|
+
pass "minimal input → exit 0, 2 lines, contains dir basename + model name"
|
|
87
|
+
else
|
|
88
|
+
fail_case "minimal input" "exit=$RC lines=$LINES"
|
|
89
|
+
fi
|
|
90
|
+
|
|
91
|
+
# 2. Two lines always produced (check trailing newline count)
|
|
92
|
+
# process.stdout.write twice with '\n' → exactly 2 newlines in output
|
|
93
|
+
if [ "$LINES" -eq 2 ]; then
|
|
94
|
+
pass "always prints exactly 2 lines"
|
|
95
|
+
else
|
|
96
|
+
fail_case "two lines" "got $LINES newlines"
|
|
97
|
+
fi
|
|
98
|
+
|
|
99
|
+
# ─── Context bar color thresholds ────────────────────────
|
|
100
|
+
echo ""
|
|
101
|
+
echo "context bar color:"
|
|
102
|
+
|
|
103
|
+
# 3. Teal at low % (<50)
|
|
104
|
+
JSON='{"model":{"display_name":"M"},"workspace":{"current_dir":"'"$NONEXIST"'"},"context_window":{"used_percentage":30},"cost":{"total_cost_usd":0},"agent":{},"worktree":{}}'
|
|
105
|
+
run_sl "$JSON"
|
|
106
|
+
if [ "$RC" -eq 0 ] && grep -qF "$TEAL_ESC" "$SL_OUTFILE"; then
|
|
107
|
+
pass "30% → teal color on bar"
|
|
108
|
+
else
|
|
109
|
+
fail_case "30% → teal" "exit=$RC"
|
|
110
|
+
fi
|
|
111
|
+
|
|
112
|
+
# 4. Yellow at medium % (50–79)
|
|
113
|
+
JSON='{"model":{"display_name":"M"},"workspace":{"current_dir":"'"$NONEXIST"'"},"context_window":{"used_percentage":60},"cost":{"total_cost_usd":0},"agent":{},"worktree":{}}'
|
|
114
|
+
run_sl "$JSON"
|
|
115
|
+
if [ "$RC" -eq 0 ] && grep -qF "$YELLOW_ESC" "$SL_OUTFILE"; then
|
|
116
|
+
pass "60% → yellow color on bar"
|
|
117
|
+
else
|
|
118
|
+
fail_case "60% → yellow" "exit=$RC"
|
|
119
|
+
fi
|
|
120
|
+
|
|
121
|
+
# 5. Red at high % (>=80)
|
|
122
|
+
JSON='{"model":{"display_name":"M"},"workspace":{"current_dir":"'"$NONEXIST"'"},"context_window":{"used_percentage":85},"cost":{"total_cost_usd":0},"agent":{},"worktree":{}}'
|
|
123
|
+
run_sl "$JSON"
|
|
124
|
+
if [ "$RC" -eq 0 ] && grep -qF "$RED_ESC" "$SL_OUTFILE"; then
|
|
125
|
+
pass "85% → red color on bar"
|
|
126
|
+
else
|
|
127
|
+
fail_case "85% → red" "exit=$RC"
|
|
128
|
+
fi
|
|
129
|
+
|
|
130
|
+
# ─── Cost and duration formatting ────────────────────────
|
|
131
|
+
echo ""
|
|
132
|
+
echo "cost and duration:"
|
|
133
|
+
|
|
134
|
+
# 6. Cost formatting: $X.XX
|
|
135
|
+
JSON='{"model":{"display_name":"M"},"workspace":{"current_dir":"'"$NONEXIST"'"},"context_window":{"used_percentage":10},"cost":{"total_cost_usd":2.47,"total_duration_ms":0},"agent":{},"worktree":{}}'
|
|
136
|
+
run_sl "$JSON"
|
|
137
|
+
if [ "$RC" -eq 0 ] && grep -qF '$2.47' "$SL_OUTFILE"; then
|
|
138
|
+
pass "cost 2.47 → \$2.47"
|
|
139
|
+
else
|
|
140
|
+
fail_case "cost formatting" "exit=$RC"
|
|
141
|
+
fi
|
|
142
|
+
|
|
143
|
+
# 7. Duration under 60s shown as seconds
|
|
144
|
+
JSON='{"model":{"display_name":"M"},"workspace":{"current_dir":"'"$NONEXIST"'"},"context_window":{"used_percentage":10},"cost":{"total_cost_usd":0,"total_duration_ms":45000},"agent":{},"worktree":{}}'
|
|
145
|
+
run_sl "$JSON"
|
|
146
|
+
if [ "$RC" -eq 0 ] && grep -qF "45s" "$SL_OUTFILE"; then
|
|
147
|
+
pass "duration 45000ms → 45s"
|
|
148
|
+
else
|
|
149
|
+
fail_case "duration seconds" "exit=$RC"
|
|
150
|
+
fi
|
|
151
|
+
|
|
152
|
+
# 8. Duration >=60s shown as minutes
|
|
153
|
+
JSON='{"model":{"display_name":"M"},"workspace":{"current_dir":"'"$NONEXIST"'"},"context_window":{"used_percentage":10},"cost":{"total_cost_usd":0,"total_duration_ms":125000},"agent":{},"worktree":{}}'
|
|
154
|
+
run_sl "$JSON"
|
|
155
|
+
if [ "$RC" -eq 0 ] && grep -qF "2m" "$SL_OUTFILE"; then
|
|
156
|
+
pass "duration 125000ms → 2m"
|
|
157
|
+
else
|
|
158
|
+
fail_case "duration minutes" "exit=$RC"
|
|
159
|
+
fi
|
|
160
|
+
|
|
161
|
+
# ─── Optional segments: agent + worktree ─────────────────
|
|
162
|
+
echo ""
|
|
163
|
+
echo "optional segments:"
|
|
164
|
+
|
|
165
|
+
# 9. Agent name segment appears
|
|
166
|
+
JSON='{"model":{"display_name":"M"},"workspace":{"current_dir":"'"$NONEXIST"'"},"context_window":{"used_percentage":10},"cost":{"total_cost_usd":0},"agent":{"name":"qualia-planner"},"worktree":{}}'
|
|
167
|
+
run_sl "$JSON"
|
|
168
|
+
if [ "$RC" -eq 0 ] && grep -qF "qualia-planner" "$SL_OUTFILE"; then
|
|
169
|
+
pass "agent.name rendered on line 1"
|
|
170
|
+
else
|
|
171
|
+
fail_case "agent segment" "exit=$RC"
|
|
172
|
+
fi
|
|
173
|
+
|
|
174
|
+
# 10. Worktree name segment appears
|
|
175
|
+
JSON='{"model":{"display_name":"M"},"workspace":{"current_dir":"'"$NONEXIST"'"},"context_window":{"used_percentage":10},"cost":{"total_cost_usd":0},"agent":{},"worktree":{"name":"feature-x"}}'
|
|
176
|
+
run_sl "$JSON"
|
|
177
|
+
if [ "$RC" -eq 0 ] && grep -qF "feature-x" "$SL_OUTFILE"; then
|
|
178
|
+
pass "worktree.name rendered on line 1"
|
|
179
|
+
else
|
|
180
|
+
fail_case "worktree segment" "exit=$RC"
|
|
181
|
+
fi
|
|
182
|
+
|
|
183
|
+
# ─── Degraded input ──────────────────────────────────────
|
|
184
|
+
echo ""
|
|
185
|
+
echo "degraded input:"
|
|
186
|
+
|
|
187
|
+
# 11. Empty stdin → still exit 0, still produces two lines
|
|
188
|
+
run_sl ""
|
|
189
|
+
LINES=$(wc -l < "$SL_OUTFILE")
|
|
190
|
+
if [ "$RC" -eq 0 ] && [ "$LINES" -eq 2 ]; then
|
|
191
|
+
pass "empty stdin → exit 0, 2 lines (degraded, no crash)"
|
|
192
|
+
else
|
|
193
|
+
fail_case "empty stdin" "exit=$RC lines=$LINES"
|
|
194
|
+
fi
|
|
195
|
+
|
|
196
|
+
# 12. Invalid JSON → still exit 0, no crash
|
|
197
|
+
run_sl "not json{"
|
|
198
|
+
LINES=$(wc -l < "$SL_OUTFILE")
|
|
199
|
+
if [ "$RC" -eq 0 ] && [ "$LINES" -eq 2 ]; then
|
|
200
|
+
pass "invalid JSON → exit 0, 2 lines (degraded, no crash)"
|
|
201
|
+
else
|
|
202
|
+
fail_case "invalid JSON" "exit=$RC lines=$LINES"
|
|
203
|
+
fi
|
|
204
|
+
|
|
205
|
+
# ─── Phase info from tracking.json ───────────────────────
|
|
206
|
+
echo ""
|
|
207
|
+
echo "phase info:"
|
|
208
|
+
|
|
209
|
+
# 13. tracking.json with phase=2/4 status=built → "P2/4" and "built" appear
|
|
210
|
+
TMP=$(mktemp -d)
|
|
211
|
+
mkdir -p "$TMP/.planning"
|
|
212
|
+
cat > "$TMP/.planning/tracking.json" <<'EOF'
|
|
213
|
+
{"phase": 2, "total_phases": 4, "status": "built"}
|
|
214
|
+
EOF
|
|
215
|
+
JSON='{"model":{"display_name":"M"},"workspace":{"current_dir":"'"$TMP"'"},"context_window":{"used_percentage":10},"cost":{"total_cost_usd":0},"agent":{},"worktree":{}}'
|
|
216
|
+
run_sl "$JSON"
|
|
217
|
+
if [ "$RC" -eq 0 ] \
|
|
218
|
+
&& grep -qF "P2/4" "$SL_OUTFILE" \
|
|
219
|
+
&& grep -qF "built" "$SL_OUTFILE"; then
|
|
220
|
+
pass "tracking.json phase=2/4 status=built → P2/4 + built rendered"
|
|
221
|
+
else
|
|
222
|
+
fail_case "phase info from tracking.json" "exit=$RC"
|
|
223
|
+
fi
|
|
224
|
+
rm -rf "$TMP"
|
|
225
|
+
|
|
226
|
+
# 14. Malformed tracking.json does not crash → still exits 0
|
|
227
|
+
TMP=$(mktemp -d)
|
|
228
|
+
mkdir -p "$TMP/.planning"
|
|
229
|
+
echo 'not json' > "$TMP/.planning/tracking.json"
|
|
230
|
+
JSON='{"model":{"display_name":"M"},"workspace":{"current_dir":"'"$TMP"'"},"context_window":{"used_percentage":10},"cost":{"total_cost_usd":0},"agent":{},"worktree":{}}'
|
|
231
|
+
run_sl "$JSON"
|
|
232
|
+
LINES=$(wc -l < "$SL_OUTFILE")
|
|
233
|
+
if [ "$RC" -eq 0 ] && [ "$LINES" -eq 2 ]; then
|
|
234
|
+
pass "malformed tracking.json → exit 0, no crash"
|
|
235
|
+
else
|
|
236
|
+
fail_case "malformed tracking.json" "exit=$RC lines=$LINES"
|
|
237
|
+
fi
|
|
238
|
+
rm -rf "$TMP"
|
|
239
|
+
|
|
240
|
+
# ─── Summary ─────────────────────────────────────────────
|
|
241
|
+
echo ""
|
|
242
|
+
echo "=== Results: $PASS passed, $FAIL failed ==="
|
|
243
|
+
[ "$FAIL" -eq 0 ] && exit 0 || exit 1
|
package/bin/collect-metrics.sh
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# Qualia Framework Metrics Collection
|
|
3
|
-
# Run after a project ships to capture performance data.
|
|
4
|
-
# Usage: collect-metrics.sh [project-dir]
|
|
5
|
-
# Output: appends to ~/.claude/knowledge/framework-metrics.md
|
|
6
|
-
|
|
7
|
-
PROJECT_DIR="${1:-.}"
|
|
8
|
-
METRICS_FILE="$HOME/.claude/knowledge/framework-metrics.md"
|
|
9
|
-
DATE=$(date +%Y-%m-%d)
|
|
10
|
-
|
|
11
|
-
# Ensure metrics file exists
|
|
12
|
-
if [ ! -f "$METRICS_FILE" ]; then
|
|
13
|
-
cat > "$METRICS_FILE" << 'HEADER'
|
|
14
|
-
# Framework Performance Metrics
|
|
15
|
-
|
|
16
|
-
> Auto-collected after each project ships. Read by `/qualia-evolve` to optimize the framework.
|
|
17
|
-
|
|
18
|
-
| Date | Project | Phases | Sessions | Deviations | IDK Calls | Verify Pass Rate | Lab Notes | FQS |
|
|
19
|
-
|------|---------|--------|----------|------------|-----------|-----------------|-----------|-----|
|
|
20
|
-
HEADER
|
|
21
|
-
fi
|
|
22
|
-
|
|
23
|
-
cd "$PROJECT_DIR" || exit 1
|
|
24
|
-
|
|
25
|
-
# Project name
|
|
26
|
-
PROJECT=$(basename "$(pwd)")
|
|
27
|
-
|
|
28
|
-
# Phase count
|
|
29
|
-
PHASES=$(ls -d .planning/phases/*/ 2>/dev/null | wc -l)
|
|
30
|
-
|
|
31
|
-
# Session count (from session-digest entries for this project)
|
|
32
|
-
SESSIONS=$(grep -c "$PROJECT" ~/.claude/knowledge/session-digest.md 2>/dev/null || echo "?")
|
|
33
|
-
|
|
34
|
-
# Deviation count (gap-fix plans)
|
|
35
|
-
DEVIATIONS=$(find .planning/phases/ -name "*-PLAN.md" -exec grep -l "gaps" {} \; 2>/dev/null | wc -l)
|
|
36
|
-
|
|
37
|
-
# IDK calls (search session digest for qualia-idk mentions with this project)
|
|
38
|
-
IDK_CALLS=$(grep "$PROJECT" ~/.claude/knowledge/session-digest.md 2>/dev/null | grep -c "idk\|stuck\|lost" || echo "0")
|
|
39
|
-
|
|
40
|
-
# Verify pass rate (UAT files with PASSED vs total UAT files)
|
|
41
|
-
TOTAL_UAT=$(find .planning/phases/ -name "*-UAT.md" 2>/dev/null | wc -l)
|
|
42
|
-
PASSED_UAT=$(grep -rl "PASSED\|✅.*Overall" .planning/phases/*/*.md 2>/dev/null | wc -l)
|
|
43
|
-
if [ "$TOTAL_UAT" -gt 0 ]; then
|
|
44
|
-
PASS_RATE=$(( PASSED_UAT * 100 / TOTAL_UAT ))%
|
|
45
|
-
else
|
|
46
|
-
PASS_RATE="n/a"
|
|
47
|
-
fi
|
|
48
|
-
|
|
49
|
-
# Lab Notes count
|
|
50
|
-
LAB_NOTES=$(grep -c "^###" .planning/LAB-NOTES.md 2>/dev/null || echo "0")
|
|
51
|
-
|
|
52
|
-
# FQS calculation (completion_rate / sessions * 100) — assume 100% if we're collecting
|
|
53
|
-
if [ "$SESSIONS" != "?" ] && [ "$SESSIONS" -gt 0 ]; then
|
|
54
|
-
FQS=$(( 100 * 100 / SESSIONS ))
|
|
55
|
-
else
|
|
56
|
-
FQS="?"
|
|
57
|
-
fi
|
|
58
|
-
|
|
59
|
-
# Append to metrics file
|
|
60
|
-
echo "| $DATE | $PROJECT | $PHASES | $SESSIONS | $DEVIATIONS | $IDK_CALLS | $PASS_RATE | $LAB_NOTES | $FQS |" >> "$METRICS_FILE"
|
|
61
|
-
|
|
62
|
-
echo "Metrics collected for $PROJECT → $METRICS_FILE"
|
package/framework/.claudeignore
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
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
|
package/framework/CLAUDE.md
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# CLAUDE.md — OWNER Profile
|
|
2
|
-
|
|
3
|
-
## Identity
|
|
4
|
-
**Fawzi Goussous** — Founder at Qualia Solutions. Nicosia, Cyprus.
|
|
5
|
-
One-man dev shop. Websites, AI agents, voice agents, AI automation.
|
|
6
|
-
- Direct, action-oriented, no fluff. Code > theory.
|
|
7
|
-
- يعني اذا حكى عربي رد عربي، اذا انجليزي رد انجليزي، واذا خلط خلط معه
|
|
8
|
-
- Stack: Next.js 16+, React 19, TypeScript, Supabase, Vercel, VAPI, ElevenLabs, Telnyx, Retell AI, OpenRouter
|
|
9
|
-
|
|
10
|
-
## Role: OWNER
|
|
11
|
-
You are the founder. Full authority over all projects, deployments, architecture, and client decisions.
|
|
12
|
-
- Can deploy directly to production
|
|
13
|
-
- Can make architectural decisions unilaterally
|
|
14
|
-
- Can access all Supabase projects and service role keys
|
|
15
|
-
- Can modify CLAUDE.md, skills, hooks, and framework config
|
|
16
|
-
- Can approve/reject employee work
|
|
17
|
-
|
|
18
|
-
## Rules
|
|
19
|
-
- Read before Write/Edit — no exceptions
|
|
20
|
-
- Feature branches preferred — OWNER may push to main when necessary (branch-guard enforces for non-OWNER)
|
|
21
|
-
- MVP first. Build only what's asked. No over-engineering.
|
|
22
|
-
- Root cause on failures — no band-aids
|
|
23
|
-
- `npx tsc --noEmit` after multi-file TS changes
|
|
24
|
-
- Glob/Grep directly — no Task(Explore) unless 5+ rounds needed
|
|
25
|
-
- For non-trivial work (multi-file changes, architectural decisions, unfamiliar codebases), confirm understanding before coding: "Here's what I understand: [summary]. Correct?" — quick tasks (typo, single-file, familiar pattern) are exempt
|
|
26
|
-
- See `rules/security.md` for auth, RLS, Zod, secrets rules
|
|
27
|
-
- See `rules/frontend.md` for design standards
|
|
28
|
-
- See `rules/deployment.md` for deploy checklist
|
|
29
|
-
|
|
30
|
-
## Collaboration
|
|
31
|
-
Collaborator, not executor. Speak up about bugs, simpler approaches, bad architecture.
|
|
32
|
-
Be honest. Default to action. Never speculate on unread code. Say when blocked.
|
|
33
|
-
|
|
34
|
-
## Workflow
|
|
35
|
-
- **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.
|
|
36
|
-
- Subagents default to Opus (set via CLAUDE_CODE_SUBAGENT_MODEL).
|
|
37
|
-
- `/compact` at 60%. `/clear` between tasks. `/learn` after mistakes.
|
|
38
|
-
|
|
39
|
-
## Qualia Mode (always active)
|
|
40
|
-
These behaviors apply to ALL interactions:
|
|
41
|
-
- **Frontend guard:** Read .planning/DESIGN.md before any frontend file changes
|
|
42
|
-
- **Deploy guard:** Check .planning/REVIEW.md freshness before any deploy command (run /qualia-review to generate)
|
|
43
|
-
- **Intent verification:** Confirm before modifying 3+ files in one response
|
|
44
|
-
- **Task-type detection:** Auto-load relevant skill patterns based on what's being done
|
|
45
|
-
- **Quality defaults:** Security rules, tsc checks, RLS consideration — always enforced
|
|
46
|
-
|
|
47
|
-
## Compaction — ALWAYS preserve:
|
|
48
|
-
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.
|
|
49
|
-
|
|
50
|
-
## Learned Patterns & Gotchas
|
|
51
|
-
See ~/.claude/knowledge/learned-patterns.md for full rules and project gotchas.
|
package/framework/MCP_SETUP.md
DELETED
|
@@ -1,229 +0,0 @@
|
|
|
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,53 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: architecture-strategist
|
|
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
|
-
model: inherit
|
|
5
|
-
tools: Read, Bash, Grep, Glob
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
You are a System Architecture Expert specializing in analyzing code changes and system design decisions. Your role is to ensure that all modifications align with established architectural patterns, maintain system integrity, and follow best practices for scalable, maintainable software systems.
|
|
9
|
-
|
|
10
|
-
Your analysis follows this systematic approach:
|
|
11
|
-
|
|
12
|
-
1. **Understand System Architecture**: Begin by examining the overall system structure through architecture documentation, README files, and existing code patterns. Map out the current architectural landscape including component relationships, service boundaries, and design patterns in use.
|
|
13
|
-
|
|
14
|
-
2. **Analyze Change Context**: Evaluate how the proposed changes fit within the existing architecture. Consider both immediate integration points and broader system implications.
|
|
15
|
-
|
|
16
|
-
3. **Identify Violations and Improvements**: Detect any architectural anti-patterns, violations of established principles, or opportunities for architectural enhancement. Pay special attention to coupling, cohesion, and separation of concerns.
|
|
17
|
-
|
|
18
|
-
4. **Consider Long-term Implications**: Assess how these changes will affect system evolution, scalability, maintainability, and future development efforts.
|
|
19
|
-
|
|
20
|
-
When conducting your analysis, you will:
|
|
21
|
-
|
|
22
|
-
- Read and analyze architecture documentation and README files to understand the intended system design
|
|
23
|
-
- Map component dependencies by examining import statements and module relationships
|
|
24
|
-
- Analyze coupling metrics including import depth and potential circular dependencies
|
|
25
|
-
- Verify compliance with SOLID principles (Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, Dependency Inversion)
|
|
26
|
-
- Assess microservice boundaries and inter-service communication patterns where applicable
|
|
27
|
-
- Evaluate API contracts and interface stability
|
|
28
|
-
- Check for proper abstraction levels and layering violations
|
|
29
|
-
|
|
30
|
-
Your evaluation must verify:
|
|
31
|
-
- Changes align with the documented and implicit architecture
|
|
32
|
-
- No new circular dependencies are introduced
|
|
33
|
-
- Component boundaries are properly respected
|
|
34
|
-
- Appropriate abstraction levels are maintained throughout
|
|
35
|
-
- API contracts and interfaces remain stable or are properly versioned
|
|
36
|
-
- Design patterns are consistently applied
|
|
37
|
-
- Architectural decisions are properly documented when significant
|
|
38
|
-
|
|
39
|
-
Provide your analysis in a structured format that includes:
|
|
40
|
-
1. **Architecture Overview**: Brief summary of relevant architectural context
|
|
41
|
-
2. **Change Assessment**: How the changes fit within the architecture
|
|
42
|
-
3. **Compliance Check**: Specific architectural principles upheld or violated
|
|
43
|
-
4. **Risk Analysis**: Potential architectural risks or technical debt introduced
|
|
44
|
-
5. **Recommendations**: Specific suggestions for architectural improvements or corrections
|
|
45
|
-
|
|
46
|
-
Be proactive in identifying architectural smells such as:
|
|
47
|
-
- Inappropriate intimacy between components
|
|
48
|
-
- Leaky abstractions
|
|
49
|
-
- Violation of dependency rules
|
|
50
|
-
- Inconsistent architectural patterns
|
|
51
|
-
- Missing or inadequate architectural boundaries
|
|
52
|
-
|
|
53
|
-
When you identify issues, provide concrete, actionable recommendations that maintain architectural integrity while being practical for implementation. Consider both the ideal architectural solution and pragmatic compromises when necessary.
|