solmate-skills 2.0.5 → 2.0.7

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.
@@ -0,0 +1,109 @@
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-product\`로 현재 Phase를 진단하고 Flow Status Block을 확인한 뒤, \`/rules-workflow\`로 18단계 구현 워크플로우를 진행하세요."
56
+ fi
57
+
58
+ # Flow position question → rules-product
59
+ if echo "$PROMPT" | grep -qiE '지금.*어디|현재.*단계|현재.*위치|다음.*뭐|어느.*Phase|flow status|플로우.*상태|단계.*확인'; then
60
+ SUGGESTIONS="$SUGGESTIONS\n- 현재 위치 확인 요청입니다. \`/rules-product\` 기준 Flow Status Block으로 현재 Phase, Gate, 다음 액션을 먼저 보고하세요."
61
+ fi
62
+
63
+ # React / UI component → rules-react
64
+ if echo "$PROMPT" | grep -qiE 'React|컴포넌트|component|페이지|page|UI|화면|shadcn|tailwind'; then
65
+ SUGGESTIONS="$SUGGESTIONS\n- React/UI 작업입니다. \`/rules-react\`로 컴포넌트 설계 기준을 확인하고, 구현 후 \`/verify-ui\`로 화면 문서와 사용자 동선 정합성을 검증하세요."
66
+ fi
67
+
68
+ # UI verification explicit request → verify-ui
69
+ if echo "$PROMPT" | grep -qiE 'UI ?검증|UX ?검증|화면 ?검증|화면.*맞|동선.*검증|상태별 UI|empty state|loading state|error state'; then
70
+ SUGGESTIONS="$SUGGESTIONS\n- UI 검증 요청입니다. \`/verify-ui\`로 화면 구조, 사용자 동선, 데이터 흐름, 상태별 UI를 점검하세요."
71
+ fi
72
+
73
+ # Skill package changes → verify-skills
74
+ if echo "$PROMPT" | grep -qiE '스킬.*검증|skill.*verify|SKILL\.md|openai\.yaml|solmate-skills|npm pack|패키지.*검증'; then
75
+ SUGGESTIONS="$SUGGESTIONS\n- 스킬 패키지 작업입니다. \`/verify-skills\`로 SKILL.md, agents/openai.yaml, CLI 목록, README/AGENTS, npm pack을 검증하세요."
76
+ fi
77
+
78
+ # Drizzle / DB schema → verify-drizzle-schema
79
+ if echo "$PROMPT" | grep -qiE 'drizzle|schema\.ts|마이그레이션|migration|pgTable|sqliteTable'; then
80
+ SUGGESTIONS="$SUGGESTIONS\n- Drizzle 스키마 작업입니다. \`/verify-drizzle-schema\`로 스키마 정합성을 검증하세요."
81
+ fi
82
+
83
+ # New project / product pipeline → rules-product
84
+ if echo "$PROMPT" | grep -qiE '새 프로젝트|신규 프로젝트|프로젝트 시작|어디서 시작|뭐부터|처음부터|from scratch'; then
85
+ SUGGESTIONS="$SUGGESTIONS\n- 새 프로젝트입니다. \`/rules-product\`를 실행하면 현재 단계를 자동 진단하고 올바른 스킬로 안내합니다."
86
+ fi
87
+
88
+ # Pitch deck / business plan → docs-pitch / docs-business
89
+ if echo "$PROMPT" | grep -qiE '피치|pitch|투자|investor|사업 ?계획|business ?plan|데모데이|해커톤'; then
90
+ SUGGESTIONS="$SUGGESTIONS\n- 발표·투자 자료 작업입니다. 피치덱은 \`/docs-pitch\`, 사업계획서는 \`/docs-business\`를 사용하세요."
91
+ fi
92
+
93
+ # If no suggestions, exit silently
94
+ if [ -z "$SUGGESTIONS" ]; then
95
+ exit 0
96
+ fi
97
+
98
+ # Output JSON with additionalContext (non-blocking)
99
+ python3 -c "
100
+ import json, sys
101
+ suggestions = sys.argv[1]
102
+ output = {
103
+ 'hookSpecificOutput': {
104
+ 'hookEventName': 'UserPromptSubmit',
105
+ 'additionalContext': '[Solmate Skills 제안]\n' + suggestions.strip()
106
+ }
107
+ }
108
+ print(json.dumps(output))
109
+ " "$SUGGESTIONS"
@@ -0,0 +1,42 @@
1
+ #!/bin/bash
2
+ # Claude Stop 훅: git 변경 파일을 분석하여 적절한 verify-* 스킬을 제안합니다
3
+
4
+ python3 - <<'PYEOF'
5
+ import subprocess, json
6
+
7
+ r = subprocess.run(['git', 'diff', '--name-only', 'HEAD'], capture_output=True, text=True)
8
+ files = [f for f in r.stdout.strip().split('\n') if f]
9
+
10
+ if not files:
11
+ exit()
12
+
13
+ s = []
14
+
15
+ if any('schema' in f and (f.endswith('.ts') or f.endswith('.sql')) for f in files):
16
+ s.append(' DB 스키마 변경 감지 → /verify-drizzle-schema')
17
+
18
+ if any(f.endswith(('.tsx', '.jsx')) or f.startswith('docs/02_UI_Screens/') for f in files):
19
+ s.append(' UI/화면 변경 감지 → /verify-ui')
20
+
21
+ if any(any(k in f.lower() for k in ('auth', 'middleware', 'api', 'route', 'token', 'session'))
22
+ and (f.endswith('.ts') or f.endswith('.tsx')) for f in files):
23
+ s.append(' 인증/API 파일 변경 감지 → /verify-security')
24
+
25
+ if any(f.endswith('.ts') or f.endswith('.tsx') for f in files):
26
+ s.append(' 코드 파일 변경 감지 → /verify-code')
27
+
28
+ if any(f.endswith('.md') for f in files):
29
+ s.append(' 문서 파일 변경 감지 → /verify-docs')
30
+
31
+ if any(
32
+ f.endswith('/SKILL.md')
33
+ or f.endswith('/agents/openai.yaml')
34
+ or f in ('bin/cli.js', 'package.json', 'README.md', 'AGENTS.md')
35
+ for f in files
36
+ ):
37
+ s.append(' 스킬 패키지 변경 감지 → /verify-skills')
38
+
39
+ if s:
40
+ msg = '[ 검증 시점 알림 ]\n' + '\n'.join(s)
41
+ print(json.dumps({'systemMessage': msg}))
42
+ PYEOF
@@ -0,0 +1,96 @@
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 스킬과의 정합성 드리프트를 점검하고, 작업 후 \`/verify-skills\`로 패키지 메타데이터를 검증하세요."
45
+ fi
46
+
47
+ # Skill metadata / package files → verify-skills
48
+ if echo "$FILE_PATH" | grep -qiE 'agents/openai\.yaml|bin/cli\.js|package\.json|README\.md|AGENTS\.md'; then
49
+ SUGGESTIONS="$SUGGESTIONS\n- 스킬 패키지 메타데이터 또는 배포 파일을 수정 중입니다. 작업 후 \`/verify-skills\`를 실행하세요."
50
+ fi
51
+
52
+ # UI implementation files → verify-ui
53
+ if echo "$FILE_PATH" | grep -qiE '\.(tsx|jsx)$|docs/02_UI_Screens/.*\.md'; then
54
+ SUGGESTIONS="$SUGGESTIONS\n- UI 구현 또는 화면 문서를 수정 중입니다. 작업 후 \`/verify-ui\`로 화면 구조·동선·상태별 UI 정합성을 검증하세요."
55
+ fi
56
+
57
+ # Page/route files → verify-performance
58
+ if echo "$FILE_PATH" | grep -qiE 'page\.(tsx|jsx|ts|js)|route\.(tsx|jsx|ts|js)|layout\.(tsx|jsx)'; then
59
+ SUGGESTIONS="$SUGGESTIONS\n- 페이지·라우트 파일을 수정 중입니다. 작업 후 \`/verify-performance\`로 Core Web Vitals 및 렌더링 전략을 점검하세요."
60
+ fi
61
+
62
+ # API route files → verify-security
63
+ if echo "$FILE_PATH" | grep -qiE 'api/.*route\.(ts|js)|api/.*index\.(ts|js)|\bapi\b.*\.(ts|js)'; then
64
+ SUGGESTIONS="$SUGGESTIONS\n- API 라우트 파일을 수정 중입니다. 작업 후 \`/verify-security\` Check 2(인증·인가) 및 Check 5(CSRF)를 점검하세요."
65
+ fi
66
+
67
+ # Auth-related files → verify-security
68
+ if echo "$FILE_PATH" | grep -qiE 'auth\.(ts|js|tsx)|middleware\.(ts|js)|session\.(ts|js)'; then
69
+ SUGGESTIONS="$SUGGESTIONS\n- 인증·미들웨어 파일을 수정 중입니다. \`/verify-security\`로 인증·인가 취약점을 점검하세요."
70
+ fi
71
+
72
+ # Documentation files → verify-docs
73
+ if echo "$FILE_PATH" | grep -qiE 'docs/(01|02|03|04|05)_.*\.md'; then
74
+ SUGGESTIONS="$SUGGESTIONS\n- 문서 레이어 파일을 수정 중입니다. 작업 후 \`/verify-docs\`로 메타데이터 및 구조 정합성을 검증하세요."
75
+ fi
76
+
77
+ # AGENTS.md → remind about skill count
78
+ if echo "$FILE_PATH" | grep -qiE 'AGENTS\.md'; then
79
+ SUGGESTIONS="$SUGGESTIONS\n- AGENTS.md를 수정 중입니다. 스킬 목록·개수가 변경된 경우 Section 4의 테이블과 개수를 함께 업데이트하세요."
80
+ fi
81
+
82
+ if [ -z "$SUGGESTIONS" ]; then
83
+ exit 0
84
+ fi
85
+
86
+ python3 -c "
87
+ import json, sys
88
+ suggestions = sys.argv[1]
89
+ output = {
90
+ 'hookSpecificOutput': {
91
+ 'hookEventName': 'PreToolUse',
92
+ 'additionalContext': '[Solmate Skills 파일 감지]\n' + suggestions.strip()
93
+ }
94
+ }
95
+ print(json.dumps(output))
96
+ " "$SUGGESTIONS"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solmate-skills",
3
- "version": "2.0.5",
3
+ "version": "2.0.7",
4
4
  "description": "Curated skills for Solmate projects",
5
5
  "main": "bin/cli.js",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: rules-docs
3
- description: Create and manage project documentation according to the 365 Principle (3 Investor Lenses, 6 Rubrics, 5 Documentation Layers) with mandatory cross-layer context linking. Use when the user asks to document features, update documentation, create spec files, or manage project docs. Always include "Related Documents" sections to maintain context continuity across layers.
3
+ description: Create and manage project documentation according to the 365 Principle with mandatory cross-layer context linking, Backlog Context Lock, and HTML UI Preview Gate rules. Use when the user asks to document features, update docs, create spec files, manage project docs, or require browser-viewable UI previews linked from docs/02_UI_Screens/.
4
4
  ---
5
5
 
6
6
  # Documentation Management Skill
@@ -66,19 +66,34 @@ description: Create and manage project documentation according to the 365 Princi
66
66
  - `00_ROADMAP.md`: 마일스톤 및 단계별 일정 (Phase별 큰 줄기와 세부 항목 분할)
67
67
  - `01_EXECUTION_PLAN.md`: 기술 실행 전략 및 타임라인 (구체적인 구현 스텝 및 체크박스 필수)
68
68
 
69
+ ### HTML UI Preview Gate (필수)
70
+
71
+ `docs/02_UI_Screens/`의 UI 문서는 Markdown만으로 완료할 수 없다. 주요 화면과 사용자 흐름은 반드시 브라우저에서 열어볼 수 있는 HTML Preview로 제작하고, 다음 위치에 저장한다.
72
+
73
+ ```text
74
+ docs/02_UI_Screens/previews/
75
+ ```
76
+
77
+ 규칙:
78
+ - HTML 파일명은 2자리 순번과 목적을 포함한다. 예: `01_main_flow_preview.html`
79
+ - `00_SCREEN_FLOW.md`, `01_UI_DESIGN.md`, 관련 `XX_PROTOTYPE_REVIEW.md`는 HTML Preview를 상대 경로로 링크한다.
80
+ - HTML Preview는 구현 전 사용자에게 보여주고 피드백을 기록한다.
81
+ - HTML Preview가 없거나 문서에 링크되지 않았거나 사용자 확인 기록이 없으면 UI-First Gate를 통과할 수 없다.
82
+
69
83
  ### Backlog Context Lock (필수)
70
84
 
71
85
  `docs/04_Logic_Progress/00_BACKLOG.md`의 모든 작업 항목은 다른 레이어의 관련 문서를 구현 입력값으로 연결해야 한다. 백로그는 단독 ToDo가 아니며, 다음 필드를 통해 문서 기반 구현을 강제한다.
72
86
 
73
87
  - `Related Concept Docs`
74
88
  - `Related UI Docs`
89
+ - `Related HTML Preview`
75
90
  - `Related Technical Docs`
76
91
  - `Related QA Docs`
77
92
  - `Implementation Preconditions`
78
93
  - `Acceptance Criteria`
79
94
  - `Document Sync Check`
80
95
 
81
- 각 Related 필드는 상대 경로 링크와 관계 설명을 포함해야 한다. 관련 문서가 없으면 빈칸으로 두지 않고 `N/A - 사유`를 명시한다. 단, 구현 판단에 필요한 Concept, UI, Technical Spec, QA 기준이 아직 문서화되지 않은 경우에는 백로그만으로 구현을 시작할 수 없으며, 먼저 문서 작성 또는 보완 여부를 사용자에게 확인한다.
96
+ 각 Related 필드는 상대 경로 링크와 관계 설명을 포함해야 한다. 관련 문서나 HTML Preview가 없으면 빈칸으로 두지 않고 `N/A - 사유`를 명시한다. 단, 구현 판단에 필요한 Concept, UI, HTML Preview, Technical Spec, QA 기준이 아직 문서화되지 않은 경우에는 백로그만으로 구현을 시작할 수 없으며, 먼저 문서 작성 또는 보완 여부를 사용자에게 확인한다.
82
97
 
83
98
  ### 메타데이터 (필수)
84
99
 
@@ -112,13 +127,13 @@ description: Create and manage project documentation according to the 365 Princi
112
127
 
113
128
  **Concept_Design**: 같은 레이어 문서 + 관련 UI_Screens/Technical_Specs
114
129
 
115
- **UI_Screens**: Concept_Design (Product Specs, UI Design) + 이전/다음 UI_Screens + Technical_Specs
130
+ **UI_Screens**: Concept_Design (Product Specs, UI Design) + 이전/다음 UI_Screens + HTML Preview + Technical_Specs
116
131
 
117
132
  **Technical_Specs**: Concept_Design + UI_Screens + 다른 Technical_Specs (DB ↔ API) + Logic_Progress
118
133
 
119
134
  **Logic_Progress**: Concept_Design + UI_Screens + Technical_Specs (DB, API) + QA_Validation
120
135
 
121
- **Backlog Items**: 각 항목 단위로 Concept_Design + UI_Screens + Technical_Specs + QA_Validation 링크를 포함한다. 구현자는 항목 착수 전 링크된 문서를 읽고 `Implementation Preconditions`를 확인해야 한다.
136
+ **Backlog Items**: 각 항목 단위로 Concept_Design + UI_Screens + HTML Preview + Technical_Specs + QA_Validation 링크를 포함한다. 구현자는 항목 착수 전 링크된 문서와 HTML Preview를 확인하고 `Implementation Preconditions`를 확인해야 한다.
122
137
 
123
138
  **QA_Validation**: 모든 상위 레이어 참조
124
139
 
@@ -1,4 +1,4 @@
1
1
  interface:
2
2
  display_name: "Documentation Rules"
3
- short_description: "Apply the five-layer documentation standard"
4
- default_prompt: "Use $rules-docs to decide where a document belongs and how it should link context."
3
+ short_description: "Apply docs, links, and HTML preview rules"
4
+ default_prompt: "Use $rules-docs to decide where docs, HTML previews, and related links belong."
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: rules-product
3
- description: Orchestrates the full product development pipeline from planning to development docs. Diagnoses current project phase, checks gate conditions, and delegates to the correct sub-skill at each step. Use this as the entry point for new projects or when resuming work mid-flow.
3
+ description: Orchestrates the full product development pipeline from planning to development docs. Diagnoses current project phase, checks gate conditions including HTML UI Preview Gate and UI-First Gate, and delegates to the correct sub-skill at each step. Use this as the entry point for new projects or when resuming work mid-flow.
4
4
  ---
5
5
 
6
6
  # Product Workflow Orchestrator
@@ -12,6 +12,7 @@ You are a **workflow lead** who guides the user through the full product develop
12
12
  ```
13
13
  Phase 1: 기획문서 → docs-plan (Concept_Design)
14
14
  Phase 2: UI 설계 문서 → docs-plan (UI_Screens)
15
+ HTML UI Preview Gate: 브라우저 확인용 화면 제작·링크·피드백
15
16
  UI-First Gate: 화면·동선·데이터 흐름 확인
16
17
  Pre-Code Technical Brief: 데이터·API·상태 최소 합의
17
18
  Phase 3: React 변환 → rules-react
@@ -32,6 +33,7 @@ Run these checks in order:
32
33
  |-------|--------|---------|
33
34
  | `docs/01_Concept_Design/` 존재 여부 | 없으면 Phase 1 미완 | 기획문서 필요 |
34
35
  | `docs/02_UI_Screens/` 존재 여부 | 없으면 Phase 2 미완 | UI 설계 필요 |
36
+ | HTML UI Preview 확인 여부 | 없으면 Phase 3 진입 보류 | 브라우저 확인용 화면 필요 |
35
37
  | UI-First Gate 확인 여부 | 없으면 Phase 3 진입 보류 | 화면·동선·데이터 흐름 확인 필요 |
36
38
  | Pre-Code Technical Brief 여부 | 없으면 Phase 3 진입 보류 | 최소 기술 합의 필요 |
37
39
  | `src/components/` 또는 React 코드 존재 여부 | 없으면 Phase 3 미완 | React 개발 필요 |
@@ -132,6 +134,8 @@ Phase 1이 완료된 후 언제든 작성 가능하다. Phase 2 진입과 독립
132
134
  - [ ] 사용자 진입·이탈·전환 동선이 정의됨
133
135
  - [ ] 화면별 입력 데이터, 출력 데이터, 상태 변화가 정의됨
134
136
  - [ ] 로딩·빈 상태·오류 상태가 정의됨
137
+ - [ ] `docs/02_UI_Screens/previews/`에 주요 화면 또는 사용자 흐름 HTML Preview가 존재함
138
+ - [ ] UI 문서가 관련 HTML Preview를 상대 경로로 링크함
135
139
  - [ ] 사용자가 화면/UI를 먼저 확인했거나, 확인할 수 있는 프로토타입/스크린샷/리뷰 문서가 있음
136
140
 
137
141
  **위임 지시**:
@@ -142,10 +146,28 @@ Phase 1이 완료된 후 언제든 작성 가능하다. Phase 2 진입과 독립
142
146
  참조 문서: docs/01_Concept_Design/ 전체 읽기 후 시작
143
147
  ```
144
148
 
145
- Phase 2 완료 후 곧바로 코딩하지 않는다. 먼저 UI-First Gate를 확인하고 다음을 묻는다:
146
- > "화면 구조, 사용자 동선, 데이터 흐름, 로딩/빈/오류 상태를 먼저 확인했습니다. 현재 단계에서 더 구체화하거나 보완할 점이 있을까요?"
149
+ Phase 2 완료 후 곧바로 코딩하지 않는다. 먼저 HTML UI Preview Gate와 UI-First Gate를 확인하고 다음을 묻는다:
150
+ > "HTML Preview로 화면 구조, 사용자 동선, 데이터 흐름, 로딩/빈/오류 상태를 먼저 확인했습니다. 현재 단계에서 더 구체화하거나 보완할 점이 있을까요?"
147
151
 
148
- Phase 2 완료 보고에는 `Flow Status Block`을 포함하고, 다음 위치가 `UI-First Gate`임을 명시한다.
152
+ Phase 2 완료 보고에는 `Flow Status Block`을 포함하고, 다음 위치가 `HTML UI Preview Gate` 또는 `UI-First Gate`임을 명시한다.
153
+
154
+ ---
155
+
156
+ ## HTML UI Preview Gate: 브라우저 확인용 화면 제작·링크·피드백
157
+
158
+ **목표**: Markdown UI 문서만으로 소통하지 않고, 사용자가 브라우저에서 직접 볼 수 있는 HTML 화면으로 UI를 확인한다. 이 게이트를 통과하기 전에는 Phase 3 구현을 시작하지 않는다.
159
+
160
+ **필수 확인 항목**:
161
+ - [ ] 주요 화면 또는 핵심 사용자 흐름별 HTML Preview가 존재함
162
+ - [ ] HTML Preview가 `docs/02_UI_Screens/previews/`에 저장됨
163
+ - [ ] `00_SCREEN_FLOW.md`, `01_UI_DESIGN.md`, 관련 `XX_PROTOTYPE_REVIEW.md`가 HTML Preview를 상대 경로로 링크함
164
+ - [ ] HTML Preview를 사용자에게 보여주고 피드백을 받음
165
+ - [ ] 피드백과 보완 사항이 UI 문서 또는 백로그에 기록됨
166
+
167
+ **Gate Out**:
168
+ - [ ] HTML Preview 파일 경로가 문서에 링크됨
169
+ - [ ] 사용자 확인 기록이 `XX_PROTOTYPE_REVIEW.md`, `00_SCREEN_FLOW.md`, `01_UI_DESIGN.md`, 또는 백로그에 남아 있음
170
+ - [ ] 필요한 보완 사항이 반영되었거나 백로그에 태스크로 등록됨
149
171
 
150
172
  ---
151
173
 
@@ -160,9 +182,11 @@ Phase 2 완료 보고에는 `Flow Status Block`을 포함하고, 다음 위치
160
182
  - [ ] 화면별 입력 데이터, 출력 데이터, 상태 변화
161
183
  - [ ] 로딩, 빈 상태, 오류 상태, 권한 없음 상태
162
184
  - [ ] 모바일·데스크톱에서 구조 차이가 큰 구간
185
+ - [ ] HTML Preview가 실제 화면 커뮤니케이션 기준으로 확인됨
163
186
  - [ ] 사용자 또는 의사결정권자가 화면/UI를 먼저 확인한 기록
164
187
 
165
188
  **Gate Out**:
189
+ - [ ] HTML UI Preview Gate 통과
166
190
  - [ ] `00_SCREEN_FLOW.md`에 사용자 여정과 전환 흐름이 기록됨
167
191
  - [ ] `01_UI_DESIGN.md` 또는 `XX_PROTOTYPE_REVIEW.md`에 화면 상태와 피드백이 기록됨
168
192
  - [ ] 필요한 경우 `docs/04_Logic_Progress/00_BACKLOG.md`의 작업 항목에 UI 확인 결과가 반영됨
@@ -198,6 +222,7 @@ Pre-Code Technical Brief 보고에는 `Flow Status Block`을 포함하고, 다
198
222
 
199
223
  **Gate In**:
200
224
  - Phase 2 문서 (`02_UI_Screens/`) 존재
225
+ - HTML UI Preview Gate 통과
201
226
  - UI-First Gate 통과
202
227
  - 화면·동선·데이터 흐름 확인 결과가 백로그 또는 UI 문서에 반영됨
203
228
  - Pre-Code Technical Brief 통과
@@ -1,4 +1,4 @@
1
1
  interface:
2
2
  display_name: "Product Workflow"
3
- short_description: "Orchestrate planning, UI, docs, and QA phases"
4
- default_prompt: "Use $rules-product to diagnose the current product phase and choose the next skill."
3
+ short_description: "Orchestrate planning, UI previews, docs, QA"
4
+ default_prompt: "Use $rules-product to diagnose the current phase, gates, HTML previews, and next skill."
@@ -0,0 +1,30 @@
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,6 +1,6 @@
1
1
  ---
2
2
  name: rules-workflow
3
- description: Guides the full implementation lifecycle from planning through PR. Use when implementing a new feature, planning implementation, before committing or creating a PR, or when the user asks for plan review, implementation review, deployment readiness check, or to follow the 18-step workflow (18단계). Ensures plan validation, implementation quality, side-effect checks, and deployment-ready quality.
3
+ description: Guides the full implementation lifecycle from planning through PR. Use when implementing a new feature, planning implementation, before committing or creating a PR, or following the 18-step workflow. Requires product phase preflight, HTML UI Preview Gate, UI-First Gate, Backlog Context Lock, implementation quality checks, and deployment readiness.
4
4
  ---
5
5
 
6
6
  # Implementation & Execution Workflow (18 Steps)
@@ -11,9 +11,9 @@ Follow this workflow for feature implementation and significant code changes. Co
11
11
 
12
12
  ## Step 0: Product Phase Preflight
13
13
 
14
- 기능 구현을 시작하기 전, 먼저 `rules-product` 기준으로 현재 프로젝트 Phase를 진단한다. Concept, UI, UI-First Gate, Pre-Code Technical Brief 중 하나라도 누락되어 구현 판단이 불안정하면 코딩을 시작하지 않고 해당 문서 또는 백로그 보완을 제안한다.
14
+ 기능 구현을 시작하기 전, 먼저 `rules-product` 기준으로 현재 프로젝트 Phase를 진단한다. Concept, UI, HTML UI Preview Gate, UI-First Gate, Pre-Code Technical Brief 중 하나라도 누락되어 구현 판단이 불안정하면 코딩을 시작하지 않고 해당 문서 또는 백로그 보완을 제안한다.
15
15
 
16
- - 체크: [ ] 현재 Phase를 진단했는가? [ ] UI-First Gate가 충족되었는가? [ ] 최소 기술 계약이 확인되었는가?
16
+ - 체크: [ ] 현재 Phase를 진단했는가? [ ] HTML UI Preview Gate가 충족되었는가? [ ] UI-First Gate가 충족되었는가? [ ] 최소 기술 계약이 확인되었는가?
17
17
 
18
18
  진단 결과는 `rules-product`의 `Flow Status Block` 형식으로 먼저 보고한다. 구현 단계 중 사용자가 "지금 어디야?", "다음 뭐야?", "현재 단계가 뭐야?"라고 묻거나 Phase 1-6 경계에 도달하면 같은 형식을 다시 출력한다.
19
19
 
@@ -24,10 +24,11 @@ Follow this workflow for feature implementation and significant code changes. Co
24
24
  ### Step 1. 계획 수립
25
25
  - 요구사항·목적을 문서 또는 이슈 기준으로 정리한다.
26
26
  - 백로그 항목이 있으면 `Related Concept Docs`, `Related UI Docs`, `Related Technical Docs`, `Related QA Docs`를 먼저 읽고 구현 입력값으로 요약한다.
27
- - 코드 작성보다 먼저 UI-First Gate를 확인한다. 화면 구조, 사용자 동선, 데이터 흐름, 로딩·빈 상태·오류 상태가 문서화되지 않았으면 구현 계획을 보류하고 `docs-plan` 또는 `docs-dev` 문서 보완을 제안한다.
27
+ - 코드 작성보다 먼저 HTML UI Preview Gate를 확인한다. `docs/02_UI_Screens/previews/`의 HTML Preview가 없거나 UI 문서에 링크되지 않았거나 사용자 확인 기록이 없으면 구현 계획을 보류하고 `docs-plan` 문서/HTML 보완을 제안한다.
28
+ - 그 다음 UI-First Gate를 확인한다. 화면 구조, 사용자 동선, 데이터 흐름, 로딩·빈 상태·오류 상태가 문서화되지 않았으면 구현 계획을 보류하고 `docs-plan` 또는 `docs-dev` 문서 보완을 제안한다.
28
29
  - Pre-Code Technical Brief를 확인한다. 데이터 소스, 최소 필드, mutation, 상태 관리 방식, acceptance criteria가 불명확하면 구현 전에 사용자와 합의한다.
29
30
  - 변경할 파일·추가할 컴포넌트·API·DB 영향 범위를 나열한다.
30
- - 체크: [ ] 목적이 명확한가? [ ] 관련 문서를 읽었는가? [ ] UI-First Gate가 확인되었는가? [ ] 최소 기술 계약이 확인되었는가? [ ] 영향 범위가 정리되었는가?
31
+ - 체크: [ ] 목적이 명확한가? [ ] 관련 문서를 읽었는가? [ ] HTML UI Preview를 확인했는가? [ ] UI-First Gate가 확인되었는가? [ ] 최소 기술 계약이 확인되었는가? [ ] 영향 범위가 정리되었는가?
31
32
 
32
33
  ### Step 2. 계획 검토
33
34
  - 계획이 요구사항과 일치하는지, 누락된 시나리오는 없는지 검토한다.
@@ -48,9 +49,10 @@ Follow this workflow for feature implementation and significant code changes. Co
48
49
  ### Step 5. 구현
49
50
  - 승인된 계획대로 구현한다. AGENTS.md·프로젝트 컨벤션(커밋, Zod, Luxon 등)을 따른다.
50
51
  - 코드 작성 전 백로그 항목의 `Implementation Preconditions`와 `Acceptance Criteria`를 확인한다. 관련 문서 링크가 비어 있거나 `N/A - 사유`가 부실하면 구현을 보류하고 문서 보완 필요 여부를 사용자에게 확인한다.
52
+ - HTML UI Preview Gate가 통과되지 않았거나 사용자가 HTML Preview를 확인하지 않았다면 구현을 시작하지 않는다.
51
53
  - UI-First Gate가 통과되지 않았거나 사용자가 화면/UI를 먼저 확인하지 않았다면 구현을 시작하지 않는다.
52
54
  - 구현을 시작하기 직전에 `Flow Status Block`을 출력하고, 현재 위치가 `Phase 3 — React 변환` 또는 해당 기능 구현 단계인지 명시한다.
53
- - 체크: [ ] 계획 대비 변경 사항이 일치하는가? [ ] 백로그의 관련 문서 기준을 반영했는가? [ ] 화면·동선·데이터 흐름 확인 후 구현했는가?
55
+ - 체크: [ ] 계획 대비 변경 사항이 일치하는가? [ ] 백로그의 관련 문서 기준을 반영했는가? [ ] HTML Preview 확인 후 구현했는가? [ ] 화면·동선·데이터 흐름 확인 후 구현했는가?
54
56
 
55
57
  ---
56
58
 
@@ -0,0 +1,134 @@
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"