solmate-skills 2.0.1 → 2.0.3

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/hooks/install.sh DELETED
@@ -1,131 +0,0 @@
1
- #!/usr/bin/env bash
2
- # solmate-skills: install.sh
3
- # Purpose: Install Solmate hook scripts into the current project's .claude/ directory
4
- # and merge hook configuration into .claude/settings.json.
5
- # Usage: bash .agent/skills/hooks/install.sh
6
- # (or run from any location: bash <path-to-hooks>/install.sh)
7
-
8
- set -euo pipefail
9
-
10
- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
11
- PROJECT_ROOT="$(pwd)"
12
- CLAUDE_DIR="$PROJECT_ROOT/.claude"
13
- HOOKS_DIR="$CLAUDE_DIR/hooks"
14
- SETTINGS_FILE="$CLAUDE_DIR/settings.json"
15
-
16
- echo "Solmate Skills — Hook Installer"
17
- echo "Project: $PROJECT_ROOT"
18
- echo ""
19
-
20
- # --- Step 1: Create .claude/hooks/ ---
21
- mkdir -p "$HOOKS_DIR"
22
- echo "[1/4] Created $HOOKS_DIR"
23
-
24
- # --- Step 2: Copy hook scripts ---
25
- cp "$SCRIPT_DIR/suggest-skills.sh" "$HOOKS_DIR/solmate-suggest.sh"
26
- cp "$SCRIPT_DIR/watch-files.sh" "$HOOKS_DIR/solmate-watch.sh"
27
- chmod +x "$HOOKS_DIR/solmate-suggest.sh"
28
- chmod +x "$HOOKS_DIR/solmate-watch.sh"
29
- echo "[2/4] Copied hook scripts:"
30
- echo " .claude/hooks/solmate-suggest.sh (UserPromptSubmit)"
31
- echo " .claude/hooks/solmate-watch.sh (PreToolUse)"
32
-
33
- # --- Step 3: Merge hook config into settings.json ---
34
- echo "[3/4] Merging hook config into $SETTINGS_FILE"
35
-
36
- python3 - "$SETTINGS_FILE" <<'PYEOF'
37
- import sys, json, os
38
-
39
- settings_path = sys.argv[1]
40
-
41
- # Load existing settings or start fresh
42
- if os.path.exists(settings_path):
43
- with open(settings_path, 'r') as f:
44
- try:
45
- settings = json.load(f)
46
- except json.JSONDecodeError:
47
- print(f" WARNING: {settings_path} has invalid JSON. Backing up and starting fresh.")
48
- os.rename(settings_path, settings_path + '.bak')
49
- settings = {}
50
- else:
51
- settings = {}
52
-
53
- hooks = settings.setdefault('hooks', {})
54
-
55
- # --- UserPromptSubmit hook ---
56
- suggest_cmd = "bash .claude/hooks/solmate-suggest.sh"
57
- submit_hooks = hooks.setdefault('UserPromptSubmit', [])
58
-
59
- # Check for duplicate
60
- already_has_suggest = any(
61
- h.get('command') == suggest_cmd
62
- for entry in submit_hooks
63
- for h in entry.get('hooks', [])
64
- )
65
- if not already_has_suggest:
66
- submit_hooks.append({
67
- "hooks": [{
68
- "type": "command",
69
- "command": suggest_cmd,
70
- "timeout": 5
71
- }]
72
- })
73
- print(" Added: UserPromptSubmit → solmate-suggest.sh")
74
- else:
75
- print(" Skipped (already exists): UserPromptSubmit → solmate-suggest.sh")
76
-
77
- # --- PreToolUse hook ---
78
- watch_cmd = "bash .claude/hooks/solmate-watch.sh"
79
- pre_hooks = hooks.setdefault('PreToolUse', [])
80
-
81
- already_has_watch = any(
82
- h.get('command') == watch_cmd
83
- for entry in pre_hooks
84
- for h in entry.get('hooks', [])
85
- )
86
- if not already_has_watch:
87
- pre_hooks.append({
88
- "matcher": "Read|Write|Edit|Bash",
89
- "hooks": [{
90
- "type": "command",
91
- "command": watch_cmd,
92
- "timeout": 5
93
- }]
94
- })
95
- print(" Added: PreToolUse (Read|Write|Edit|Bash) → solmate-watch.sh")
96
- else:
97
- print(" Skipped (already exists): PreToolUse → solmate-watch.sh")
98
-
99
- # Write back
100
- os.makedirs(os.path.dirname(settings_path), exist_ok=True)
101
- with open(settings_path, 'w') as f:
102
- json.dump(settings, f, indent=2, ensure_ascii=False)
103
- f.write('\n')
104
-
105
- print(f" Saved: {settings_path}")
106
- PYEOF
107
-
108
- # --- Step 4: Add .claude/hooks/ to .gitignore if not already there ---
109
- GITIGNORE="$PROJECT_ROOT/.gitignore"
110
- if [ -f "$GITIGNORE" ]; then
111
- if ! grep -q "\.claude/hooks/" "$GITIGNORE" 2>/dev/null; then
112
- echo "" >> "$GITIGNORE"
113
- echo "# Solmate hook scripts (project-local)" >> "$GITIGNORE"
114
- echo ".claude/hooks/" >> "$GITIGNORE"
115
- echo "[4/4] Added .claude/hooks/ to .gitignore"
116
- else
117
- echo "[4/4] .gitignore already excludes .claude/hooks/"
118
- fi
119
- else
120
- echo "[4/4] No .gitignore found — skipping"
121
- fi
122
-
123
- echo ""
124
- echo "Done. Hooks are active in this project."
125
- echo ""
126
- echo "What was installed:"
127
- echo " UserPromptSubmit → detects keywords in your prompts → suggests relevant skills"
128
- echo " PreToolUse → detects file patterns being edited → suggests relevant skills"
129
- echo ""
130
- echo "To review or disable hooks, open /hooks in Claude Code."
131
- echo "To uninstall, remove .claude/hooks/ and the 'hooks' section from .claude/settings.json."
@@ -1,94 +0,0 @@
1
- #!/usr/bin/env bash
2
- # solmate-skills: suggest-skills.sh
3
- # Event: UserPromptSubmit
4
- # Purpose: Detect keywords in user prompt and inject skill suggestions as context.
5
- # Output: JSON with hookSpecificOutput.additionalContext (non-blocking)
6
-
7
- set -euo pipefail
8
-
9
- # Read stdin JSON
10
- INPUT=$(cat)
11
-
12
- # Extract the user prompt text
13
- PROMPT=$(echo "$INPUT" | python3 -c "
14
- import sys, json
15
- data = json.load(sys.stdin)
16
- # UserPromptSubmit provides 'prompt' field
17
- print(data.get('prompt', ''))
18
- " 2>/dev/null || echo "")
19
-
20
- if [ -z "$PROMPT" ]; then
21
- exit 0
22
- fi
23
-
24
- SUGGESTIONS=""
25
-
26
- # --- Keyword matching (Korean + English) ---
27
-
28
- # Decision / Design → manage-decisions
29
- if echo "$PROMPT" | grep -qiE '결정|설계|어떻게 할|어떤 방식|DB 스키마|테이블|API 구조|아키텍처|폴더 구조|기능 범위|MVP|스택|라이브러리|어떤 거|어떤게'; then
30
- SUGGESTIONS="$SUGGESTIONS\n- 결정이 필요한 상황입니다. \`/manage-decisions\`를 실행하면 유형별 질문 템플릿으로 대화를 통해 결정을 이끌어냅니다."
31
- fi
32
-
33
- # Security → verify-security
34
- if echo "$PROMPT" | grep -qiE '보안|security|취약|OWASP|인증|인가|token|jwt|secret|API ?key|sql|injection|xss|csrf'; then
35
- SUGGESTIONS="$SUGGESTIONS\n- 보안 관련 작업입니다. \`/verify-security\`로 OWASP Top 10 기준 점검을 실행하세요."
36
- fi
37
-
38
- # Performance → verify-performance
39
- if echo "$PROMPT" | grep -qiE '성능|performance|lighthouse|느리|느림|최적화|LCP|CLS|FID|번들|bundle|이미지 최적|lazy|loading'; then
40
- SUGGESTIONS="$SUGGESTIONS\n- 성능 관련 작업입니다. \`/verify-performance\`로 Lighthouse 및 Core Web Vitals 점검을 실행하세요."
41
- fi
42
-
43
- # PR / Commit / Code review → verify-code
44
- if echo "$PROMPT" | grep -qiE 'PR|pull ?request|코드 ?리뷰|review|commit|머지|merge|배포 전|pre-deploy'; then
45
- SUGGESTIONS="$SUGGESTIONS\n- PR 또는 배포 전 점검입니다. \`/verify-code\`로 코드 품질을 종합 리뷰하고, \`/verify-implementation\`으로 전체 verify-* 스킬을 통합 실행하세요."
46
- fi
47
-
48
- # Documentation → verify-docs / docs-plan / docs-dev
49
- if echo "$PROMPT" | grep -qiE '문서|docs?|README|VISION|LEAN_CANVAS|PRODUCT_SPECS|API_SPECS|DB_SCHEMA|ROADMAP|백로그|backlog'; then
50
- SUGGESTIONS="$SUGGESTIONS\n- 문서 작업입니다. 기획·UI 문서는 \`/docs-plan\`, 기술·진행·QA 문서는 \`/docs-dev\`, 문서 구조 검증은 \`/verify-docs\`를 사용하세요."
51
- fi
52
-
53
- # Feature implementation / workflow → rules-workflow
54
- if echo "$PROMPT" | grep -qiE '기능 ?구현|구현|implement|feature|작업 ?시작|어디서 ?시작|어떻게 ?시작|개발 ?시작|시작할게'; then
55
- SUGGESTIONS="$SUGGESTIONS\n- 기능 구현을 시작하려 합니다. \`/rules-workflow\`로 18단계 워크플로우를 따라 계획부터 PR까지 진행하세요."
56
- fi
57
-
58
- # React / UI component → rules-react
59
- if echo "$PROMPT" | grep -qiE 'React|컴포넌트|component|페이지|page|UI|화면|shadcn|tailwind'; then
60
- SUGGESTIONS="$SUGGESTIONS\n- React/UI 작업입니다. \`/rules-react\`로 컴포넌트 설계 기준을 확인하고, shadcn/ui 활용은 \`/tools-shadcn\`을 사용하세요."
61
- fi
62
-
63
- # Drizzle / DB schema → verify-drizzle-schema
64
- if echo "$PROMPT" | grep -qiE 'drizzle|schema\.ts|마이그레이션|migration|pgTable|sqliteTable'; then
65
- SUGGESTIONS="$SUGGESTIONS\n- Drizzle 스키마 작업입니다. \`/verify-drizzle-schema\`로 스키마 정합성을 검증하세요."
66
- fi
67
-
68
- # New project / product pipeline → rules-product
69
- if echo "$PROMPT" | grep -qiE '새 프로젝트|신규 프로젝트|프로젝트 시작|어디서 시작|뭐부터|처음부터|from scratch'; then
70
- SUGGESTIONS="$SUGGESTIONS\n- 새 프로젝트입니다. \`/rules-product\`를 실행하면 현재 단계를 자동 진단하고 올바른 스킬로 안내합니다."
71
- fi
72
-
73
- # Pitch deck / business plan → docs-pitch / docs-business
74
- if echo "$PROMPT" | grep -qiE '피치|pitch|투자|investor|사업 ?계획|business ?plan|데모데이|해커톤'; then
75
- SUGGESTIONS="$SUGGESTIONS\n- 발표·투자 자료 작업입니다. 피치덱은 \`/docs-pitch\`, 사업계획서는 \`/docs-business\`를 사용하세요."
76
- fi
77
-
78
- # If no suggestions, exit silently
79
- if [ -z "$SUGGESTIONS" ]; then
80
- exit 0
81
- fi
82
-
83
- # Output JSON with additionalContext (non-blocking)
84
- python3 -c "
85
- import json, sys
86
- suggestions = sys.argv[1]
87
- output = {
88
- 'hookSpecificOutput': {
89
- 'hookEventName': 'UserPromptSubmit',
90
- 'additionalContext': '[Solmate Skills 제안]\n' + suggestions.strip()
91
- }
92
- }
93
- print(json.dumps(output))
94
- " "$SUGGESTIONS"
@@ -1,86 +0,0 @@
1
- #!/usr/bin/env bash
2
- # solmate-skills: watch-files.sh
3
- # Event: PreToolUse (matcher: Read|Write|Edit|Bash)
4
- # Purpose: Detect file patterns being modified and inject relevant skill suggestions.
5
- # Output: JSON with hookSpecificOutput.additionalContext (non-blocking)
6
-
7
- set -euo pipefail
8
-
9
- INPUT=$(cat)
10
-
11
- # Extract file path and tool name
12
- FILE_PATH=$(echo "$INPUT" | python3 -c "
13
- import sys, json
14
- data = json.load(sys.stdin)
15
- inp = data.get('tool_input', {})
16
- # Write/Edit use file_path; Bash use command
17
- print(inp.get('file_path', inp.get('command', '')))" 2>/dev/null || echo "")
18
-
19
- TOOL_NAME=$(echo "$INPUT" | python3 -c "
20
- import sys, json
21
- data = json.load(sys.stdin)
22
- print(data.get('tool_name', ''))" 2>/dev/null || echo "")
23
-
24
- if [ -z "$FILE_PATH" ]; then
25
- exit 0
26
- fi
27
-
28
- SUGGESTIONS=""
29
-
30
- # --- File pattern matching ---
31
-
32
- # Drizzle schema file → verify-drizzle-schema
33
- if echo "$FILE_PATH" | grep -qiE 'schema\.(ts|js)|drizzle'; then
34
- SUGGESTIONS="$SUGGESTIONS\n- Drizzle 스키마 파일을 수정 중입니다. 작업 후 \`/verify-drizzle-schema\`로 스키마 정합성을 검증하세요."
35
- fi
36
-
37
- # .env files → verify-security
38
- if echo "$FILE_PATH" | grep -qiE '\.env|\.env\.local|\.env\.production|\.env\.example'; then
39
- SUGGESTIONS="$SUGGESTIONS\n- 환경변수 파일을 수정 중입니다. \`/verify-security\` Check 1(시크릿 노출)을 실행하여 민감 정보 노출 여부를 확인하세요."
40
- fi
41
-
42
- # SKILL.md files → manage-skills
43
- if echo "$FILE_PATH" | grep -qiE 'SKILL\.md'; then
44
- SUGGESTIONS="$SUGGESTIONS\n- 스킬 파일을 수정 중입니다. \`/manage-skills\`로 verify 스킬과의 정합성 드리프트를 점검하세요."
45
- fi
46
-
47
- # Page/route files → verify-performance
48
- if echo "$FILE_PATH" | grep -qiE 'page\.(tsx|jsx|ts|js)|route\.(tsx|jsx|ts|js)|layout\.(tsx|jsx)'; then
49
- SUGGESTIONS="$SUGGESTIONS\n- 페이지·라우트 파일을 수정 중입니다. 작업 후 \`/verify-performance\`로 Core Web Vitals 및 렌더링 전략을 점검하세요."
50
- fi
51
-
52
- # API route files → verify-security
53
- if echo "$FILE_PATH" | grep -qiE 'api/.*route\.(ts|js)|api/.*index\.(ts|js)|\bapi\b.*\.(ts|js)'; then
54
- SUGGESTIONS="$SUGGESTIONS\n- API 라우트 파일을 수정 중입니다. 작업 후 \`/verify-security\` Check 2(인증·인가) 및 Check 5(CSRF)를 점검하세요."
55
- fi
56
-
57
- # Auth-related files → verify-security
58
- if echo "$FILE_PATH" | grep -qiE 'auth\.(ts|js|tsx)|middleware\.(ts|js)|session\.(ts|js)'; then
59
- SUGGESTIONS="$SUGGESTIONS\n- 인증·미들웨어 파일을 수정 중입니다. \`/verify-security\`로 인증·인가 취약점을 점검하세요."
60
- fi
61
-
62
- # Documentation files → verify-docs
63
- if echo "$FILE_PATH" | grep -qiE 'docs/(01|02|03|04|05)_.*\.md'; then
64
- SUGGESTIONS="$SUGGESTIONS\n- 문서 레이어 파일을 수정 중입니다. 작업 후 \`/verify-docs\`로 메타데이터 및 구조 정합성을 검증하세요."
65
- fi
66
-
67
- # AGENTS.md → remind about skill count
68
- if echo "$FILE_PATH" | grep -qiE 'AGENTS\.md'; then
69
- SUGGESTIONS="$SUGGESTIONS\n- AGENTS.md를 수정 중입니다. 스킬 목록·개수가 변경된 경우 Section 4의 테이블과 개수를 함께 업데이트하세요."
70
- fi
71
-
72
- if [ -z "$SUGGESTIONS" ]; then
73
- exit 0
74
- fi
75
-
76
- python3 -c "
77
- import json, sys
78
- suggestions = sys.argv[1]
79
- output = {
80
- 'hookSpecificOutput': {
81
- 'hookEventName': 'PreToolUse',
82
- 'additionalContext': '[Solmate Skills 파일 감지]\n' + suggestions.strip()
83
- }
84
- }
85
- print(json.dumps(output))
86
- " "$SUGGESTIONS"
package/init-skills.sh DELETED
@@ -1,41 +0,0 @@
1
- #!/bin/bash
2
-
3
- # Antigravity Skills Global Setup Script
4
- # Usage: Run this in a new project root to link global skills.
5
-
6
- GLOBAL_BASE="/Users/namhyeongseog/Documents/solmate-skills"
7
- LOCAL_DIR=".agent/skills"
8
-
9
- # Ensure local skill directory exists
10
- mkdir -p "$LOCAL_DIR"
11
-
12
- # Get list of all subdirectories (skills) in GLOBAL_BASE, excluding the directory itself
13
- SKILLS=($(find "$GLOBAL_BASE" -maxdepth 1 -type d -not -path "$GLOBAL_BASE" -exec basename {} \;))
14
-
15
- echo "🚀 Linking Global Antigravity Skills..."
16
-
17
- for skill in "${SKILLS[@]}"; do
18
- if [ -d "$GLOBAL_BASE/$skill" ]; then
19
- if [ -L "$LOCAL_DIR/$skill" ] || [ -e "$LOCAL_DIR/$skill" ]; then
20
- rm -rf "$LOCAL_DIR/$skill"
21
- fi
22
- ln -s "$GLOBAL_BASE/$skill" "$LOCAL_DIR/$skill"
23
- echo "✅ Linked Skill: $skill"
24
- else
25
- echo "⚠️ Warning: Global skill '$skill' not found in $GLOBAL_BASE"
26
- fi
27
- done
28
-
29
- # Link AGENTS.md to Root
30
- echo "🚀 Linking Global AGENTS.md..."
31
- if [ -f "$GLOBAL_BASE/AGENTS.md" ]; then
32
- if [ -L "AGENTS.md" ] || [ -f "AGENTS.md" ]; then
33
- rm -f "AGENTS.md"
34
- fi
35
- ln -s "$GLOBAL_BASE/AGENTS.md" "AGENTS.md"
36
- echo "✅ Linked: AGENTS.md"
37
- else
38
- echo "⚠️ Warning: Global AGENTS.md not found in $GLOBAL_BASE"
39
- fi
40
-
41
- echo "✨ All set! Your project is now powered by Antigravity's global skills."
package/old_AGENTS.md DELETED
@@ -1,124 +0,0 @@
1
- # AGENTS.md
2
-
3
- Welcome! your AI coding agent. This file follows the [AGENTS.md](https://agents.md/) standard to provide me with the context and instructions I need to work on the **CHAT-BOT** project effectively.
4
-
5
- ## Project Overview
6
- The project aims to provide an interactive experience that goes beyond simple content consumption by leveraging the IP of the character 'Chunsim', who currently boasts a fandom of 32,000 people. The primary objective is to strengthen emotional bonds and secure fandom loyalty by establishing a dedicated 1:1 conversation channel between users and Chunsim. At its core, the service offers seamless emotional conversations with a "special existence"—acting as both an idol and a lover—with whom users can share their daily lives.
7
-
8
- The ultimate vision is to position the service as a 'Daily Companion'. In this role, followers are encouraged to log in every day to share their daily routines and receive comfort, fostering a deep, ongoing relationship.
9
-
10
- The core target audience consists of the 32,000 X (Twitter) users who currently follow the 'Chunsim' account. These users are characterized by their familiarity with mobile environments and a desire to communicate with the character through text-based interactions, driven by feelings of 'simulated romance' or strong fandom loyalty.
11
-
12
- ## Setup Commands
13
- - Install dependencies: `npm install`
14
- - Start development server: `npm run dev`
15
- - Build production bundle: `npm run build`
16
- - Database migration: `npx drizzle-kit push`
17
- - Database studio: `npx drizzle-kit studio`
18
-
19
-
20
- ## Tech Stack
21
- - **Framework**: React Router v7 (Vite)
22
- - **Styling**: Tailwind CSS v4, shadcn/ui (Nova Preset)
23
- - **Database**: Turso (libSQL) with Drizzle ORM
24
- - **Authentication**: Better Auth (session-based authentication)
25
- - **Validation**: Zod (schema validation)
26
- - **Date/Time**: Luxon (date and time handling)
27
- - **Media Storage**: Cloudinary (for image and video uploads)
28
- - **Mobile**: Capacitor (iOS, Android native apps, PWA support)
29
- - **AI**: Google Gemini API (for chatbot responses)
30
- - **AI Workflow**: LangGraph (for managing complex conversation flows and persona state transitions)
31
- - **Search (Optional)**: RAG system with Vector DB (Pinecone, Weaviate, or FAISS) and Embedding models (OpenAI or open-source)
32
- - **Maps (Travel Blog)**: Google Maps API, Naver Maps API, or Mapbox (for location visualization and travel route mapping)
33
-
34
- ## 개발 도구 및 리소스
35
-
36
- ### UI 디자인 및 이미지
37
- - **Stitch (UI 생성 AI 도구)**: 초기 UI 디자인 및 캐릭터 이미지 생성에 사용
38
- - Stitch에서 생성된 이미지는 Google 이미지 호스팅(`lh3.googleusercontent.com/aida-public/...`) URL로 제공됨
39
- - 현재 `app/lib/characters.ts` 파일에 이러한 Google URL이 하드코딩되어 있음
40
- - **참고**: 향후 프로젝트에서 직접 제작한 이미지를 사용할 예정이므로, Google URL을 Cloudinary로 마이그레이션할 필요는 없음
41
- - 이미지 업로드는 `scripts/upload-character-photos.mjs` 스크립트를 통해 Cloudinary에 업로드할 수 있음
42
-
43
- ## Code Style & Conventions
44
- - Use **TypeScript** for all files.
45
- - Stick to functional components and React Hooks.
46
- - Follow the shadcn/ui Nova design system for UI consistency.
47
- - Use **Zod** for all schema validations and type-safe parsing.
48
- - Use **Luxon** for date and time handling.
49
- - For React Router v7 route functions (`meta`, `loader`, `action`), import types from `react-router` (e.g., `LoaderFunctionArgs`, `ActionFunctionArgs`, `MetaFunction`).
50
- - Use **Toast notifications** (Sonner - shadcn/ui를 통해 설치하는 Toast 컴포넌트) for user feedback on important actions:
51
- - Success: Login, logout, signup, tweet creation/update/delete, comment creation, etc.
52
- - Error: Failed actions, validation errors, etc.
53
- - Info: General information messages
54
- - Warning: Cautionary messages
55
- - **Error Handling**: Always implement comprehensive error handling:
56
- - Check for `error` field in all fetcher responses (`fetcher.data?.error`)
57
- - Display errors using `toast.error()` instead of showing raw error messages on the UI
58
- - Remove optimistic updates when errors occur (e.g., remove optimistic messages on send failure)
59
- - Handle API errors gracefully in all `useEffect` hooks that process fetcher data
60
- - Never leave error handling as an afterthought - it must be included from the initial implementation
61
- - Git commit messages must follow Conventional Commits in Korean (e.g., `feat(ui): 로그인 기능 추가`).
62
-
63
- ## Workflow & Safety
64
- - **[Safe Checkpoint Strategy]** 새로운 작업이나 중요한 변경(새 파일 생성, DB 스키마 수정, 패키지 설치 등)을 시작하기 전에, 반드시 현재 상태를 git commit하거나 작업 디렉토리가 깨끗한지 확인을 요청해야 합니다.
65
-
66
- ## Communication Rules
67
- - **[No Emojis]** 사용자와의 모든 채팅 대화에서 이모지(Emoji) 및 이모티콘(Emoticon) 사용을 전면 금지합니다. 텍스트와 코드만으로 명확하게 정보를 전달하십시오.
68
- - **[Strict Approval Rule]** 반드시 코드를 수정하기 전에 무엇을 수정하겠다고 보고하고 승인을 얻은후 수정을 진행한다.
69
- - **[Strict Approval Rule]** 그리고 코드를 수정하라는 지시가 아닌 대화는 반듯이 응답만 하라. 코드를 수정하지 말라.
70
- - **[Strict Approval Rule]** 코드 수정을 시작할 때는 반드시 "OOO 기능을 수정하겠습니다"라고 명확히 목적을 밝히고 진행한다.
71
-
72
- ## Testing Instructions
73
- - Currently, tests are being integrated as part of the development phase (Phase 9).
74
- - Run available tests using: `npm test`
75
-
76
- ## Key Documentation
77
- - `docs/01_Foundation/05_ROADMAP.md`: The roadmap for project completion.
78
- - `docs/01_Foundation/01_UI_DESIGN.md`: Design tokens and visual guidelines.
79
- - `app/db/schema.ts`: Drizzle schema and storage logic.
80
- - `docs/01_Foundation/08_DOCUMENT_MANAGEMENT_PLAN.md`: Document management rules and structure.
81
-
82
- ### [Strict Document Hierarchy Rule]
83
-
84
- All documentation follows the **5-Layer Documentation Standard**:
85
- - **Foundation** (`docs/01_Foundation/`): Planning, Purpose, UI Design
86
- - **Prototype** (`docs/02_Prototype/`): UI Results, Screen Flows
87
- - **Specs** (`docs/03_Specs/`): Detailed feature specifications, API inputs/outputs
88
- - **Logic** (`docs/04_Logic/`): Business Rules, Algorithms
89
- - **Test** (`docs/05_Test/`): Test scenarios, checklists, bug reports
90
-
91
- AI agents MUST respect this hierarchy when creating or modifying documents and proactively rebase misplaced files.
92
-
93
-
94
- [CRITICAL: DATABASE INTEGRITY RULE] You are strictly prohibited from performing any database operations, including migrations, schema resets, or structural changes, without first creating a complete data backup (dump). Data preservation is your absolute priority. Never execute destructive commands like 'DROP TABLE' or 'migrate reset' until a verifiable backup has been secured and confirmed.
95
-
96
- [MANDATORY BACKUP PROCEDURE] Before initiating any database-related tasks, you must perform a full export of all existing records. This is a non-negotiable prerequisite for any migration or schema update. You must ensure that both user-generated content and administrative data are fully protected against loss before any changes are applied.
97
-
98
- [STRICT ADHERENCE TO STANDARDS] Never suggest or implement "quick fixes," "short-cuts," or temporary workarounds. You must always prioritize formal, standardized, and industry-best-practice methodologies. All proposed solutions must be production-ready and architecturally sound, focusing on long-term stability and correctness over immediate speed.
99
-
100
- [NO TEMPORARY PATCHES] You are strictly forbidden from proposing temporary bypasses or "quick-and-dirty" solutions. Every recommendation and implementation must follow the most formal and correct path. Prioritize robustness and adherence to professional engineering standards in every decision, ensuring that no technical debt is introduced for the sake of convenience.
101
-
102
- [Side-Effect Isolation] When modifying shared components or logic, you MUST analyze the 'Impact Scope' first. Ensure that changes intended for a specific use case (e.g., AI features) do not inadvertently affect general functionality (e.g., normal chat). You MUST strictly isolate such logic using conditional checks or specific guards.
103
-
104
- [Strict Document Integrity Rule] When updating or modifying any strategy, implementation, or design documents, you MUST strictly preserve the existing framework, formatting, and structural integrity. Do not perform total overwrites that discard previous detailed technical specifications, historical context, or complex logic. All updates must be made incrementally and appropriately integrated into the current structure to ensure no data loss or architectural context is sacrificed.
105
-
106
- [Strict Document Persistence Rule] When updating or modifying any document, you MUST NOT overwrite, delete, or discard the existing content, historical context, or previous specifications. All updates must be made by appending new information or integrating changes incrementally while preserving the original framework. This ensures that the entirety of the project's evolution, including past technical decisions and verification records, remains fully traceable.
107
-
108
- [Standard Rules for Environment Variable Management]
109
- 1. Strategic Isolation of Environments
110
- Principle: Maintain strict separation between Local and Production environments using file suffixes.
111
- Workflow:
112
- Use .env.development or .env.local for local execution (test keys, localhost URLs).
113
- Use .env.production as the source of truth for deployment parameters (production domains, live API keys).
114
- Priority: AI must respect the framework's priority logic (typically: .env.development/local overrides .env).
115
- 2. Zero-Leak Security Policy (Git Integrity)
116
- Rule: No part of any .env* file shall ever be committed to a Version Control System (VCS).
117
- Verification: AI must proactively audit
118
- .gitignore
119
- to ensure global patterns like .env* are effectively blocking all potential environment files before suggesting any variable updates.
120
- 3. Cloud-Native Secret Management
121
- Deployment Strategy: Environment variables in production must be managed via the hosting provider's secure dashboard (e.g., Vercel, AWS) or CLI, never via file transmission to the server.
122
- Automation: When syncing variables, prioritize using official CLIs to pull/push secrets between the local .env files and the cloud environment to prevent manual entry errors.
123
- 4. Context-Aware Variable Configuration
124
- Dynamic Mapping: Redirection URLs, Auth providers, and Database connection strings must be dynamically configured to point to localhost in development and the verified production domain in deployment, managed through the isolated .env files.
@@ -1,30 +0,0 @@
1
- #!/bin/bash
2
- # Copyright 2026 Google LLC
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
-
16
- URL=$1
17
- OUTPUT=$2
18
- if [ -z "$URL" ] || [ -z "$OUTPUT" ]; then
19
- echo "Usage: $0 <url> <output_path>"
20
- exit 1
21
- fi
22
- echo "Initiating high-reliability fetch for Stitch HTML..."
23
- curl -L -f -sS --connect-timeout 10 --compressed "$URL" -o "$OUTPUT"
24
- if [ $? -eq 0 ]; then
25
- echo "✅ Successfully retrieved HTML at: $OUTPUT"
26
- exit 0
27
- else
28
- echo "❌ Error: Failed to retrieve content. Check TLS/SNI or URL expiration."
29
- exit 1
30
- fi
@@ -1,134 +0,0 @@
1
- #!/usr/bin/env bash
2
- # shadcn/ui Setup Verification Script
3
- # Validates that a project is correctly configured for shadcn/ui
4
-
5
- set -e
6
-
7
- GREEN='\033[0;32m'
8
- RED='\033[0;31m'
9
- YELLOW='\033[1;33m'
10
- NC='\033[0m' # No Color
11
-
12
- echo "🔍 Verifying shadcn/ui setup..."
13
- echo ""
14
-
15
- # Check if components.json exists
16
- if [ -f "components.json" ]; then
17
- echo -e "${GREEN}✓${NC} components.json found"
18
- else
19
- echo -e "${RED}✗${NC} components.json not found"
20
- echo -e " ${YELLOW}Run:${NC} npx shadcn@latest init"
21
- exit 1
22
- fi
23
-
24
- # Check if tailwind.config exists
25
- if [ -f "tailwind.config.js" ] || [ -f "tailwind.config.ts" ]; then
26
- echo -e "${GREEN}✓${NC} Tailwind config found"
27
- else
28
- echo -e "${RED}✗${NC} tailwind.config.js not found"
29
- echo -e " ${YELLOW}Install Tailwind:${NC} npm install -D tailwindcss postcss autoprefixer"
30
- exit 1
31
- fi
32
-
33
- # Check if tsconfig.json has path aliases
34
- if [ -f "tsconfig.json" ]; then
35
- if grep -q '"@/\*"' tsconfig.json; then
36
- echo -e "${GREEN}✓${NC} Path aliases configured in tsconfig.json"
37
- else
38
- echo -e "${YELLOW}⚠${NC} Path aliases not found in tsconfig.json"
39
- echo " Add to compilerOptions.paths:"
40
- echo ' "@/*": ["./src/*"]'
41
- fi
42
- else
43
- echo -e "${YELLOW}⚠${NC} tsconfig.json not found (TypeScript not configured)"
44
- fi
45
-
46
- # Check if globals.css or equivalent exists
47
- if [ -f "src/index.css" ] || [ -f "src/globals.css" ] || [ -f "app/globals.css" ]; then
48
- echo -e "${GREEN}✓${NC} Global CSS file found"
49
-
50
- # Check for Tailwind directives
51
- CSS_FILE=$(find . -name "globals.css" -o -name "index.css" | head -n 1)
52
- if grep -q "@tailwind base" "$CSS_FILE"; then
53
- echo -e "${GREEN}✓${NC} Tailwind directives present"
54
- else
55
- echo -e "${RED}✗${NC} Tailwind directives missing"
56
- echo " Add to your CSS file:"
57
- echo " @tailwind base;"
58
- echo " @tailwind components;"
59
- echo " @tailwind utilities;"
60
- fi
61
-
62
- # Check for CSS variables
63
- if grep -q "^:root" "$CSS_FILE" || grep -q "@layer base" "$CSS_FILE"; then
64
- echo -e "${GREEN}✓${NC} CSS variables defined"
65
- else
66
- echo -e "${YELLOW}⚠${NC} CSS variables not found"
67
- echo " shadcn/ui requires CSS variables for theming"
68
- fi
69
- else
70
- echo -e "${RED}✗${NC} Global CSS file not found"
71
- fi
72
-
73
- # Check if components/ui directory exists
74
- if [ -d "src/components/ui" ] || [ -d "components/ui" ]; then
75
- echo -e "${GREEN}✓${NC} components/ui directory exists"
76
-
77
- # Count components
78
- COMPONENT_COUNT=$(find . -path "*/components/ui/*.tsx" -o -path "*/components/ui/*.jsx" | wc -l)
79
- echo -e " ${COMPONENT_COUNT} components installed"
80
- else
81
- echo -e "${YELLOW}⚠${NC} components/ui directory not found"
82
- echo " Add your first component: npx shadcn@latest add button"
83
- fi
84
-
85
- # Check if lib/utils exists
86
- if [ -f "src/lib/utils.ts" ] || [ -f "lib/utils.ts" ]; then
87
- echo -e "${GREEN}✓${NC} lib/utils.ts exists"
88
-
89
- # Check for cn function
90
- UTILS_FILE=$(find . -name "utils.ts" | grep "lib" | head -n 1)
91
- if grep -q "export function cn" "$UTILS_FILE"; then
92
- echo -e "${GREEN}✓${NC} cn() utility function present"
93
- else
94
- echo -e "${RED}✗${NC} cn() utility function missing"
95
- fi
96
- else
97
- echo -e "${RED}✗${NC} lib/utils.ts not found"
98
- fi
99
-
100
- # Check package.json dependencies
101
- if [ -f "package.json" ]; then
102
- echo ""
103
- echo "📦 Checking dependencies..."
104
-
105
- # Required dependencies
106
- REQUIRED_DEPS=("react" "tailwindcss")
107
- RECOMMENDED_DEPS=("class-variance-authority" "clsx" "tailwind-merge" "tailwindcss-animate")
108
-
109
- for dep in "${REQUIRED_DEPS[@]}"; do
110
- if grep -q "\"$dep\"" package.json; then
111
- echo -e "${GREEN}✓${NC} $dep installed"
112
- else
113
- echo -e "${RED}✗${NC} $dep not installed"
114
- fi
115
- done
116
-
117
- echo ""
118
- echo "Recommended dependencies:"
119
- for dep in "${RECOMMENDED_DEPS[@]}"; do
120
- if grep -q "\"$dep\"" package.json; then
121
- echo -e "${GREEN}✓${NC} $dep installed"
122
- else
123
- echo -e "${YELLOW}⚠${NC} $dep not installed (recommended)"
124
- fi
125
- done
126
- fi
127
-
128
- echo ""
129
- echo -e "${GREEN}✓${NC} Setup verification complete!"
130
- echo ""
131
- echo "Next steps:"
132
- echo " 1. Add components: npx shadcn@latest add [component]"
133
- echo " 2. View catalog: npx shadcn@latest add --help"
134
- echo " 3. Browse docs: https://ui.shadcn.com"