create-agentic-app 1.1.57 → 1.1.59

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-agentic-app",
3
- "version": "1.1.57",
3
+ "version": "1.1.59",
4
4
  "description": "Scaffold a new agentic AI application with Next.js, Better Auth, and AI SDK",
5
5
  "type": "module",
6
6
  "bin": {
@@ -10,7 +10,7 @@ description: >
10
10
 
11
11
  # Checkpoint Commit
12
12
 
13
- Create a comprehensive checkpoint commit that captures all current changes with a detailed, well-structured commit message.
13
+ Create a checkpoint commit that captures all current changes but only after the code passes lint, type check, and build.
14
14
 
15
15
  ## Instructions
16
16
 
@@ -23,7 +23,17 @@ Run these commands to understand the full picture:
23
23
  3. `git diff --cached` — see already-staged changes
24
24
  4. `git log -5 --oneline` — understand this repo's commit message style
25
25
 
26
- ### Step 2: Stage Everything
26
+ ### Step 2: Quality Checks
27
+
28
+ Run all three checks. If any fail, fix the issues before proceeding — do not skip or ignore failures.
29
+
30
+ 1. `npm run lint` — fix any lint errors
31
+ 2. `npm run type-check` — fix any type errors (if the script doesn't exist, try `npx tsc --noEmit`)
32
+ 3. `npm run build` — fix any build errors
33
+
34
+ Iterate until all three pass cleanly. Only then move to the next step.
35
+
36
+ ### Step 3: Stage Everything
27
37
 
28
38
  Stage all changes — tracked modifications, deletions, and new untracked files:
29
39
 
@@ -31,20 +41,16 @@ Stage all changes — tracked modifications, deletions, and new untracked files:
31
41
  git add -A
32
42
  ```
33
43
 
34
- ### Step 3: Craft the Commit Message
44
+ ### Step 4: Craft the Commit Message
35
45
 
36
46
  Write a commit message following the project's existing conventions (observed from `git log`). Structure:
37
47
 
38
48
  - **First line**: clear, concise summary in imperative mood (50-72 chars)
39
49
  - Use conventional commit prefixes where the project uses them: `feat:`, `fix:`, `refactor:`, `docs:`, `chore:`, etc.
40
- - **Body** (separated by blank line): detailed description including:
41
- - What changes were made (key modifications)
42
- - Why these changes were made (purpose/motivation)
43
- - Important technical details or decisions
44
- - Breaking changes or migration notes if applicable
50
+ - **Body** (separated by blank line): a short TL;DR of the changes — 1-3 sentences max. No bullet lists, no file-by-file breakdowns, no lengthy explanations.
45
51
  - **Footer**: co-author attribution
46
52
 
47
- ### Step 4: Commit
53
+ ### Step 5: Commit
48
54
 
49
55
  Create the commit using a heredoc for proper formatting:
50
56
 
@@ -52,14 +58,14 @@ Create the commit using a heredoc for proper formatting:
52
58
  git commit -m "$(cat <<'EOF'
53
59
  {first line}
54
60
 
55
- {body}
61
+ {tldr}
56
62
 
57
63
  Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
58
64
  EOF
59
65
  )"
60
66
  ```
61
67
 
62
- ### Step 5: Report
68
+ ### Step 6: Report
63
69
 
64
70
  Display:
65
71
  - The commit hash and message summary
@@ -70,6 +76,7 @@ Display:
70
76
 
71
77
  - Stage and commit everything — do not skip files unless they are clearly sensitive (`.env`, credentials)
72
78
  - If the repo has no git history, run `git init` first
73
- - Make the commit message descriptive enough that someone reading `git log` understands what was accomplished
79
+ - All quality checks (lint, type-check, build) MUST pass before committing fix issues, don't skip them
80
+ - Keep the commit body short — a TL;DR, not an essay
74
81
  - Follow the project's existing commit conventions (check the log first)
75
82
  - Do not push — only commit locally
@@ -0,0 +1,174 @@
1
+ ---
2
+ name: ship-it
3
+ description: >
4
+ Push the current branch to GitHub and create a pull request. Use this skill when the user says
5
+ "ship it", "ship this", "push to github", "create a pr", "open a pull request", "send for review",
6
+ "get this reviewed", or wants to push their work and open a PR. Also use when the user says
7
+ "/ship-it". This skill handles prerequisites, branching, pushing, and PR creation — it does not
8
+ commit or run quality checks (use checkpoint for that first).
9
+ ---
10
+
11
+ # Ship It
12
+
13
+ Push your work to GitHub and open a pull request — handling prerequisites, branch creation, pushing, and PR generation automatically.
14
+
15
+ This skill complements `checkpoint`. Use `checkpoint` to commit locally (with quality gates), then `ship-it` to get the code to GitHub for review.
16
+
17
+ ## Instructions
18
+
19
+ ### Step 0: Prerequisites
20
+
21
+ Verify tooling before doing anything else.
22
+
23
+ 1. **GitHub CLI installed?**
24
+ ```bash
25
+ gh --version
26
+ ```
27
+ If the command fails (not found):
28
+ - Detect the platform and attempt to install:
29
+ - **Windows:** `winget install --id GitHub.cli`
30
+ - **macOS:** `brew install gh`
31
+ - **Linux (Debian/Ubuntu):** follow the official apt instructions
32
+ - If auto-install fails, tell the user what to install and stop.
33
+
34
+ 2. **GitHub CLI authenticated?**
35
+ ```bash
36
+ gh auth status
37
+ ```
38
+ If not authenticated, tell the user:
39
+ ```
40
+ GitHub CLI is not logged in. Please run this in the prompt:
41
+ ! gh auth login
42
+ Then re-run /ship-it.
43
+ ```
44
+ Stop here — do not proceed until auth is confirmed.
45
+
46
+ 3. **Git remote exists?**
47
+ ```bash
48
+ git remote -v
49
+ ```
50
+ If no remote named `origin` exists, stop and tell the user:
51
+ ```
52
+ No git remote found. Add one with:
53
+ git remote add origin https://github.com/{user}/{repo}.git
54
+ ```
55
+
56
+ ### Step 1: Detect the Environment
57
+
58
+ Run these commands to understand the current state:
59
+
60
+ 1. `git branch --show-current` — get the current branch name
61
+ 2. Detect the default branch:
62
+ ```bash
63
+ gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'
64
+ ```
65
+ 3. `git status --porcelain` — check for uncommitted changes
66
+
67
+ If there are uncommitted changes, stop and tell the user:
68
+ ```
69
+ You have uncommitted changes. Run /checkpoint first to commit them, then /ship-it to push.
70
+ ```
71
+
72
+ Store the default branch name for use throughout the remaining steps.
73
+
74
+ ### Step 2: Check for Unpushed Commits
75
+
76
+ Determine if there are commits that haven't been pushed yet.
77
+
78
+ **If on a feature branch with a remote tracking branch:**
79
+ ```bash
80
+ git log @{upstream}..HEAD --oneline
81
+ ```
82
+
83
+ **If on a feature branch with no remote tracking branch, or on the default branch:**
84
+ ```bash
85
+ git log origin/{default_branch}..HEAD --oneline
86
+ ```
87
+
88
+ If there are **no unpushed commits**, stop and tell the user:
89
+ ```
90
+ Nothing to ship — all commits are already pushed.
91
+ ```
92
+
93
+ Save the list of unpushed commit messages for use in later steps.
94
+
95
+ ### Step 3: Handle Branching
96
+
97
+ **If already on a feature branch** (not the default branch):
98
+ - Stay on it. No branching needed.
99
+ - Skip to Step 4.
100
+
101
+ **If on the default branch:**
102
+ - Generate a branch name from the unpushed commit messages:
103
+ - Read the commit subjects
104
+ - Derive a kebab-case branch name with a conventional prefix: `feat/`, `fix/`, `refactor/`, `chore/`, `docs/` based on the commit content
105
+ - Keep it short (3-5 words max after the prefix), e.g., `feat/add-user-auth`, `fix/login-redirect-loop`
106
+ - Strip special characters, lowercase everything
107
+ - Create and switch to the new branch:
108
+ ```bash
109
+ git checkout -b {branch_name}
110
+ ```
111
+ - Tell the user: `Created branch {branch_name}`
112
+
113
+ ### Step 4: Push to Origin
114
+
115
+ ```bash
116
+ git push -u origin {branch_name}
117
+ ```
118
+
119
+ If the branch already has a remote tracking branch, a regular `git push` is fine.
120
+
121
+ ### Step 5: Check for Existing PR
122
+
123
+ Before creating a new PR, check if one already exists for this branch:
124
+
125
+ ```bash
126
+ gh pr view --json number,url,title,state 2>/dev/null
127
+ ```
128
+
129
+ If a PR already exists and is **open**:
130
+ - Do NOT create a new one
131
+ - Skip to Step 7 and report the existing PR with a note that new commits were pushed.
132
+
133
+ If no PR exists (or it is closed/merged), proceed to Step 6.
134
+
135
+ ### Step 6: Create the Pull Request
136
+
137
+ Generate the PR title and body from the unpushed commits:
138
+
139
+ - **Title**: concise summary under 70 chars. If single commit, use its subject. If multiple, synthesize a short summary. Imperative mood.
140
+ - **Body**: TL;DR of the changes in 2-4 bullet points max.
141
+
142
+ ```bash
143
+ gh pr create --base {default_branch} --head {branch_name} --title "{title}" --body "$(cat <<'EOF'
144
+ ## Summary
145
+ {2-4 bullet points}
146
+
147
+ ---
148
+ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
149
+ EOF
150
+ )"
151
+ ```
152
+
153
+ ### Step 7: Report
154
+
155
+ Display the result clearly:
156
+
157
+ ```
158
+ Shipped to GitHub:
159
+ Branch: {branch_name}
160
+ PR: #{number} — {title}
161
+ URL: {url}
162
+ ```
163
+
164
+ ## Important
165
+
166
+ - Do NOT run lint, type-check, or build — that is checkpoint's job
167
+ - Do NOT commit anything — only push existing commits and create a PR
168
+ - If the user has uncommitted changes, tell them to run /checkpoint first
169
+ - Keep the PR body short — a TL;DR, not an essay
170
+ - Always check for an existing open PR before creating a new one to avoid duplicates
171
+ - Detect the default branch dynamically — do not hardcode `main` or `master`
172
+ - When creating a branch from the default branch, use conventional prefixes (`feat/`, `fix/`, etc.) with kebab-case names
173
+ - Never run destructive git operations (no `--force`, no `reset --hard`)
174
+ - If `gh` is not installed or authenticated, help the user get set up before proceeding
@@ -10,7 +10,7 @@ description: >
10
10
 
11
11
  # Checkpoint Commit
12
12
 
13
- Create a comprehensive checkpoint commit that captures all current changes with a detailed, well-structured commit message.
13
+ Create a checkpoint commit that captures all current changes but only after the code passes lint, type check, and build.
14
14
 
15
15
  ## Instructions
16
16
 
@@ -23,7 +23,17 @@ Run these commands to understand the full picture:
23
23
  3. `git diff --cached` — see already-staged changes
24
24
  4. `git log -5 --oneline` — understand this repo's commit message style
25
25
 
26
- ### Step 2: Stage Everything
26
+ ### Step 2: Quality Checks
27
+
28
+ Run all three checks. If any fail, fix the issues before proceeding — do not skip or ignore failures.
29
+
30
+ 1. `npm run lint` — fix any lint errors
31
+ 2. `npm run type-check` — fix any type errors (if the script doesn't exist, try `npx tsc --noEmit`)
32
+ 3. `npm run build` — fix any build errors
33
+
34
+ Iterate until all three pass cleanly. Only then move to the next step.
35
+
36
+ ### Step 3: Stage Everything
27
37
 
28
38
  Stage all changes — tracked modifications, deletions, and new untracked files:
29
39
 
@@ -31,20 +41,16 @@ Stage all changes — tracked modifications, deletions, and new untracked files:
31
41
  git add -A
32
42
  ```
33
43
 
34
- ### Step 3: Craft the Commit Message
44
+ ### Step 4: Craft the Commit Message
35
45
 
36
46
  Write a commit message following the project's existing conventions (observed from `git log`). Structure:
37
47
 
38
48
  - **First line**: clear, concise summary in imperative mood (50-72 chars)
39
49
  - Use conventional commit prefixes where the project uses them: `feat:`, `fix:`, `refactor:`, `docs:`, `chore:`, etc.
40
- - **Body** (separated by blank line): detailed description including:
41
- - What changes were made (key modifications)
42
- - Why these changes were made (purpose/motivation)
43
- - Important technical details or decisions
44
- - Breaking changes or migration notes if applicable
50
+ - **Body** (separated by blank line): a short TL;DR of the changes — 1-3 sentences max. No bullet lists, no file-by-file breakdowns, no lengthy explanations.
45
51
  - **Footer**: co-author attribution
46
52
 
47
- ### Step 4: Commit
53
+ ### Step 5: Commit
48
54
 
49
55
  Create the commit using a heredoc for proper formatting:
50
56
 
@@ -52,14 +58,14 @@ Create the commit using a heredoc for proper formatting:
52
58
  git commit -m "$(cat <<'EOF'
53
59
  {first line}
54
60
 
55
- {body}
61
+ {tldr}
56
62
 
57
63
  Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
58
64
  EOF
59
65
  )"
60
66
  ```
61
67
 
62
- ### Step 5: Report
68
+ ### Step 6: Report
63
69
 
64
70
  Display:
65
71
  - The commit hash and message summary
@@ -70,6 +76,7 @@ Display:
70
76
 
71
77
  - Stage and commit everything — do not skip files unless they are clearly sensitive (`.env`, credentials)
72
78
  - If the repo has no git history, run `git init` first
73
- - Make the commit message descriptive enough that someone reading `git log` understands what was accomplished
79
+ - All quality checks (lint, type-check, build) MUST pass before committing fix issues, don't skip them
80
+ - Keep the commit body short — a TL;DR, not an essay
74
81
  - Follow the project's existing commit conventions (check the log first)
75
82
  - Do not push — only commit locally
@@ -0,0 +1,174 @@
1
+ ---
2
+ name: ship-it
3
+ description: >
4
+ Push the current branch to GitHub and create a pull request. Use this skill when the user says
5
+ "ship it", "ship this", "push to github", "create a pr", "open a pull request", "send for review",
6
+ "get this reviewed", or wants to push their work and open a PR. Also use when the user says
7
+ "/ship-it". This skill handles prerequisites, branching, pushing, and PR creation — it does not
8
+ commit or run quality checks (use checkpoint for that first).
9
+ ---
10
+
11
+ # Ship It
12
+
13
+ Push your work to GitHub and open a pull request — handling prerequisites, branch creation, pushing, and PR generation automatically.
14
+
15
+ This skill complements `checkpoint`. Use `checkpoint` to commit locally (with quality gates), then `ship-it` to get the code to GitHub for review.
16
+
17
+ ## Instructions
18
+
19
+ ### Step 0: Prerequisites
20
+
21
+ Verify tooling before doing anything else.
22
+
23
+ 1. **GitHub CLI installed?**
24
+ ```bash
25
+ gh --version
26
+ ```
27
+ If the command fails (not found):
28
+ - Detect the platform and attempt to install:
29
+ - **Windows:** `winget install --id GitHub.cli`
30
+ - **macOS:** `brew install gh`
31
+ - **Linux (Debian/Ubuntu):** follow the official apt instructions
32
+ - If auto-install fails, tell the user what to install and stop.
33
+
34
+ 2. **GitHub CLI authenticated?**
35
+ ```bash
36
+ gh auth status
37
+ ```
38
+ If not authenticated, tell the user:
39
+ ```
40
+ GitHub CLI is not logged in. Please run this in the prompt:
41
+ ! gh auth login
42
+ Then re-run /ship-it.
43
+ ```
44
+ Stop here — do not proceed until auth is confirmed.
45
+
46
+ 3. **Git remote exists?**
47
+ ```bash
48
+ git remote -v
49
+ ```
50
+ If no remote named `origin` exists, stop and tell the user:
51
+ ```
52
+ No git remote found. Add one with:
53
+ git remote add origin https://github.com/{user}/{repo}.git
54
+ ```
55
+
56
+ ### Step 1: Detect the Environment
57
+
58
+ Run these commands to understand the current state:
59
+
60
+ 1. `git branch --show-current` — get the current branch name
61
+ 2. Detect the default branch:
62
+ ```bash
63
+ gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'
64
+ ```
65
+ 3. `git status --porcelain` — check for uncommitted changes
66
+
67
+ If there are uncommitted changes, stop and tell the user:
68
+ ```
69
+ You have uncommitted changes. Run /checkpoint first to commit them, then /ship-it to push.
70
+ ```
71
+
72
+ Store the default branch name for use throughout the remaining steps.
73
+
74
+ ### Step 2: Check for Unpushed Commits
75
+
76
+ Determine if there are commits that haven't been pushed yet.
77
+
78
+ **If on a feature branch with a remote tracking branch:**
79
+ ```bash
80
+ git log @{upstream}..HEAD --oneline
81
+ ```
82
+
83
+ **If on a feature branch with no remote tracking branch, or on the default branch:**
84
+ ```bash
85
+ git log origin/{default_branch}..HEAD --oneline
86
+ ```
87
+
88
+ If there are **no unpushed commits**, stop and tell the user:
89
+ ```
90
+ Nothing to ship — all commits are already pushed.
91
+ ```
92
+
93
+ Save the list of unpushed commit messages for use in later steps.
94
+
95
+ ### Step 3: Handle Branching
96
+
97
+ **If already on a feature branch** (not the default branch):
98
+ - Stay on it. No branching needed.
99
+ - Skip to Step 4.
100
+
101
+ **If on the default branch:**
102
+ - Generate a branch name from the unpushed commit messages:
103
+ - Read the commit subjects
104
+ - Derive a kebab-case branch name with a conventional prefix: `feat/`, `fix/`, `refactor/`, `chore/`, `docs/` based on the commit content
105
+ - Keep it short (3-5 words max after the prefix), e.g., `feat/add-user-auth`, `fix/login-redirect-loop`
106
+ - Strip special characters, lowercase everything
107
+ - Create and switch to the new branch:
108
+ ```bash
109
+ git checkout -b {branch_name}
110
+ ```
111
+ - Tell the user: `Created branch {branch_name}`
112
+
113
+ ### Step 4: Push to Origin
114
+
115
+ ```bash
116
+ git push -u origin {branch_name}
117
+ ```
118
+
119
+ If the branch already has a remote tracking branch, a regular `git push` is fine.
120
+
121
+ ### Step 5: Check for Existing PR
122
+
123
+ Before creating a new PR, check if one already exists for this branch:
124
+
125
+ ```bash
126
+ gh pr view --json number,url,title,state 2>/dev/null
127
+ ```
128
+
129
+ If a PR already exists and is **open**:
130
+ - Do NOT create a new one
131
+ - Skip to Step 7 and report the existing PR with a note that new commits were pushed.
132
+
133
+ If no PR exists (or it is closed/merged), proceed to Step 6.
134
+
135
+ ### Step 6: Create the Pull Request
136
+
137
+ Generate the PR title and body from the unpushed commits:
138
+
139
+ - **Title**: concise summary under 70 chars. If single commit, use its subject. If multiple, synthesize a short summary. Imperative mood.
140
+ - **Body**: TL;DR of the changes in 2-4 bullet points max.
141
+
142
+ ```bash
143
+ gh pr create --base {default_branch} --head {branch_name} --title "{title}" --body "$(cat <<'EOF'
144
+ ## Summary
145
+ {2-4 bullet points}
146
+
147
+ ---
148
+ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
149
+ EOF
150
+ )"
151
+ ```
152
+
153
+ ### Step 7: Report
154
+
155
+ Display the result clearly:
156
+
157
+ ```
158
+ Shipped to GitHub:
159
+ Branch: {branch_name}
160
+ PR: #{number} — {title}
161
+ URL: {url}
162
+ ```
163
+
164
+ ## Important
165
+
166
+ - Do NOT run lint, type-check, or build — that is checkpoint's job
167
+ - Do NOT commit anything — only push existing commits and create a PR
168
+ - If the user has uncommitted changes, tell them to run /checkpoint first
169
+ - Keep the PR body short — a TL;DR, not an essay
170
+ - Always check for an existing open PR before creating a new one to avoid duplicates
171
+ - Detect the default branch dynamically — do not hardcode `main` or `master`
172
+ - When creating a branch from the default branch, use conventional prefixes (`feat/`, `fix/`, etc.) with kebab-case names
173
+ - Never run destructive git operations (no `--force`, no `reset --hard`)
174
+ - If `gh` is not installed or authenticated, help the user get set up before proceeding
@@ -1,87 +1,36 @@
1
- ## Planning mode
1
+ # CRITICAL RULES - MUST FOLLOW
2
2
 
3
- Never make assumptions about what the user wants. Always ask clarifying questions before proceeding.
3
+ ## RESPONSES
4
4
 
5
- # MANDATORY: Feature Planning & Implementation Workflow
5
+ - Keep responses concise and to the point - unless the user asks otherwise
6
6
 
7
- **This workflow is non-negotiable for any non-trivial feature or multi-step change.** Do not implement multi-task features directly in a single session. Do not write a monolithic plan and start coding from it. The workflow below exists because implementation plans that live in a single file are either too large for a context window or too shallow for independent execution — both lead to poor results.
7
+ ## PLANNING MODE
8
8
 
9
- ### The workflow has three stages. Execute them in order, every time.
9
+ - Always ask clarifying questions
10
+ - Never assume design, tech stack or features
11
+ - Use deep-dive sub-agents to assist with research
12
+ - Use deep-dive sub-agents to review the different aspects of your plan before presenting to the user
10
13
 
11
- **Stage 1 Plan.** Discuss the feature with the user. Ask clarifying questions. Understand requirements, technical constraints, and acceptance criteria. This happens naturally in planning mode.
14
+ ## CHANGE / EDIT MODE
12
15
 
13
- **Stage 2 Create the spec.** Once planning is complete, invoke the `create-spec` skill. This converts the planning conversation into a structured `specs/{feature}/` folder with:
14
- - Self-contained task files (one per task, in a `tasks/` subfolder)
15
- - A README with a dependency graph and parallel execution waves
16
- - Requirements and manual action items
16
+ - Never implement features yourself when possible - use sub-agents!
17
+ - Identify changes from the plan that can be implemented in parallel, and use sub-agents to implement the features efficiently
18
+ - When using sub-agents to implement features, act as a coordinator only
19
+ - Use the best model for the task - premium models for complex tasks (like coding) and mid-tier models for simpler tasks, like documentation
20
+ - After completing features (large or small), always run commands like lint, type check and next build to check code quality
17
21
 
18
- Do not skip this step. Do not proceed to implementation without a spec folder. The spec is what enables parallel agent execution — without it, you're back to single-threaded implementation.
22
+ ## DATABASE SCHEMA CHANGES
19
23
 
20
- **Stage 3 Implement via orchestration.** Once the spec folder exists and the user approves it, invoke the `implement-feature` skill. This orchestrates parallel coder agents wave-by-wave:
21
- - Each task is dispatched to its own coder agent
22
- - Tasks within a wave run in parallel
23
- - A code review gate runs between waves
24
- - Issues from review are dispatched back to coder agents
25
- - The cycle repeats until everything passes
24
+ - Whenever you make changes to the database schema, ALWAYS run the drizzle generate and migrate commands
25
+ - NEVER run drizzle push!
26
26
 
27
- The main agent (you) does NOT write code during Stage 3. You orchestrate. Coder subagents implement. The code-review agent verifies. You manage progress and commit completed waves.
27
+ ## TESTING
28
28
 
29
- ### When does this workflow apply?
29
+ - Use any testing tools, libraries available to the project for testing your changes
30
+ - Never assume your changes simply work, always test!
31
+ - If the project does not have any testing tools, scripts, MCP tools, skills, etc. available for testing, ask the user whether testing should be skipped.
30
32
 
31
- - Any feature with 2+ tasks or files to change
32
- - Any work that came out of a planning conversation
33
- - Any time the user says "implement", "build", "create this feature", or similar after discussing what to build
33
+ ## UI DESIGN
34
34
 
35
- ### When does it NOT apply?
36
-
37
- - Single-file bug fixes or trivial changes
38
- - Quick config edits or one-line patches
39
- - Tasks the user explicitly asks to do inline ("just fix this here")
40
-
41
- If in doubt, ask the user: "This looks like it could benefit from a spec — should I create one, or would you prefer I implement it directly?"
42
-
43
- ---
44
-
45
- # Project Agent Instructions
46
-
47
- ## Skills
48
-
49
- This repo ships agent skills under `.claude/skills` (mirrored at `.agents/skills`). **Read and follow the relevant skill** when your task matches its domain—skills encode stack conventions and patterns for this project.
50
-
51
- Use **`find-skills`** when you are unsure whether a skill exists for a task or want to discover installable skills from registries.
52
-
53
- ## Pre-flight (non-trivial tasks)
54
-
55
- 1. Map the work to skills using the routing table below.
56
- 2. Open and follow matching skills before writing substantial code or making architectural decisions.
57
-
58
- If you start down the wrong path, stop, invoke the right skill, and continue from there.
59
-
60
- ## Task → skill routing
61
-
62
- | If you are about to… | Invoke first |
63
- | --- | --- |
64
- | Plan a feature, create a spec, break work into tasks | `create-spec` |
65
- | Implement a planned feature, execute a spec | `implement-feature` |
66
- | Create a checkpoint commit | `checkpoint` |
67
- | Review a pull request | `review-pr` |
68
- | Touch Next.js App Router, routing, RSC, data fetching, deployment | `nextjs` |
69
- | Touch shadcn/ui components or registries | `shadcn` |
70
- | Touch Better Auth configuration or auth flows | `better-auth-best-practices` |
71
- | Optimize or review React / Next.js performance | `vercel-react-best-practices` |
72
- | Build, modify, or review an MCP server | `mcp-builder` |
73
- | Build or review a frontend design / UI | `frontend-design`, `web-design-guidelines` |
74
- | Automate browser testing (Playwright) | `playwright-cli` |
75
- | Create or refine project agent skills | `skill-creator` |
76
- | Look for a skill or extend capabilities | `find-skills` |
77
-
78
- Stack skills compose: invoking `nextjs` does not excuse skipping `shadcn` or `better-auth-best-practices` when those layers are involved.
79
-
80
- ## Hard rules
81
-
82
- 1. **Never touch the Next.js / shadcn / Better Auth / MCP layers without reading their corresponding skill** for this repo. They are mandatory references, not optional browsing.
83
- 2. **Before claiming work is done, fixed, or passing**, run the project’s verification commands (see workspace rules: lint and typecheck scripts) and only assert success when the output supports it.
84
-
85
- ## If no skill matches
86
-
87
- Fall back to sound engineering judgment. State explicitly: _"I checked the skills list and none applied because …"_ so the user can correct a missed skill.
35
+ - Always follow the UI design system when creating or reviewing components or pages.
36
+ - Design System: @DESIGN.md
@@ -0,0 +1,451 @@
1
+ # Design System
2
+
3
+ This document defines the visual design system for the project. All new components and pages **must** follow these tokens, patterns, and conventions.
4
+
5
+ ---
6
+
7
+ ## Stack
8
+
9
+ - **Framework:** Next.js (App Router) + React + TypeScript
10
+ - **Styling:** Tailwind CSS v4 (CSS-first config via `@theme inline` in `globals.css` — no `tailwind.config.ts`)
11
+ - **Components:** shadcn/ui (new-york style, neutral base)
12
+ - **Icons:** Lucide React
13
+ - **Fonts:** Geist (sans) + Geist Mono (mono) via `next/font/google`
14
+ - **Dark mode:** next-themes (class-based, system default)
15
+ - **Utilities:** `cn()` from `@/lib/utils` (clsx + tailwind-merge)
16
+
17
+ ---
18
+
19
+ ## Colors
20
+
21
+ All values use the **oklch** color space. Colors are defined as CSS custom properties in `globals.css` and bridged to Tailwind via `@theme inline`.
22
+
23
+ ### Semantic Tokens
24
+
25
+ | Token | Light | Dark | Usage |
26
+ |---|---|---|---|
27
+ | `background` | `oklch(1 0 0)` | `oklch(0.141 0.005 285.823)` | Page background |
28
+ | `foreground` | `oklch(0.141 0.005 285.823)` | `oklch(0.985 0 0)` | Primary text |
29
+ | `primary` | `oklch(0.21 0.034 270)` | `oklch(0.92 0.02 270)` | Buttons, links, accents |
30
+ | `primary-foreground` | `oklch(0.985 0 0)` | `oklch(0.21 0.006 285.885)` | Text on primary |
31
+ | `secondary` | `oklch(0.967 0.001 286.375)` | `oklch(0.274 0.006 286.033)` | Secondary buttons, subtle bg |
32
+ | `secondary-foreground` | `oklch(0.21 0.006 285.885)` | `oklch(0.985 0 0)` | Text on secondary |
33
+ | `muted` | `oklch(0.967 0.001 286.375)` | `oklch(0.274 0.006 286.033)` | Subdued backgrounds |
34
+ | `muted-foreground` | `oklch(0.552 0.016 285.938)` | `oklch(0.705 0.015 286.067)` | Subdued text, placeholders |
35
+ | `accent` | `oklch(0.96 0.012 270)` | `oklch(0.28 0.018 270)` | Hover backgrounds, highlights |
36
+ | `accent-foreground` | `oklch(0.21 0.006 285.885)` | `oklch(0.985 0 0)` | Text on accent |
37
+ | `destructive` | `oklch(0.577 0.245 27.325)` | `oklch(0.704 0.191 22.216)` | Error states, delete actions |
38
+ | `card` | `oklch(1 0 0)` | `oklch(0.21 0.006 285.885)` | Card backgrounds |
39
+ | `card-foreground` | `oklch(0.141 0.005 285.823)` | `oklch(0.985 0 0)` | Card text |
40
+ | `popover` | `oklch(1 0 0)` | `oklch(0.21 0.006 285.885)` | Popover/dropdown bg |
41
+ | `popover-foreground` | `oklch(0.141 0.005 285.823)` | `oklch(0.985 0 0)` | Popover/dropdown text |
42
+ | `border` | `oklch(0.92 0.004 286.32)` | `oklch(1 0 0 / 10%)` | Borders, dividers |
43
+ | `input` | `oklch(0.92 0.004 286.32)` | `oklch(1 0 0 / 15%)` | Input borders |
44
+ | `ring` | `oklch(0.705 0.06 270)` | `oklch(0.552 0.05 270)` | Focus rings |
45
+
46
+ ### Chart Colors
47
+
48
+ | Token | Light | Dark |
49
+ |---|---|---|
50
+ | `chart-1` | `oklch(0.646 0.222 41.116)` | `oklch(0.488 0.243 264.376)` |
51
+ | `chart-2` | `oklch(0.6 0.118 184.704)` | `oklch(0.696 0.17 162.48)` |
52
+ | `chart-3` | `oklch(0.398 0.07 227.392)` | `oklch(0.769 0.188 70.08)` |
53
+ | `chart-4` | `oklch(0.828 0.189 84.429)` | `oklch(0.627 0.265 303.9)` |
54
+ | `chart-5` | `oklch(0.769 0.188 70.08)` | `oklch(0.645 0.246 16.439)` |
55
+
56
+ ### Sidebar Colors
57
+
58
+ | Token | Light | Dark |
59
+ |---|---|---|
60
+ | `sidebar` | `oklch(0.985 0 0)` | `oklch(0.21 0.006 285.885)` |
61
+ | `sidebar-foreground` | `oklch(0.141 0.005 285.823)` | `oklch(0.985 0 0)` |
62
+ | `sidebar-primary` | `oklch(0.21 0.006 285.885)` | `oklch(0.488 0.243 264.376)` |
63
+ | `sidebar-primary-foreground` | `oklch(0.985 0 0)` | `oklch(0.985 0 0)` |
64
+ | `sidebar-accent` | `oklch(0.967 0.001 286.375)` | `oklch(0.274 0.006 286.033)` |
65
+ | `sidebar-accent-foreground` | `oklch(0.21 0.006 285.885)` | `oklch(0.985 0 0)` |
66
+ | `sidebar-border` | `oklch(0.92 0.004 286.32)` | `oklch(1 0 0 / 10%)` |
67
+ | `sidebar-ring` | `oklch(0.705 0.015 286.067)` | `oklch(0.552 0.016 285.938)` |
68
+
69
+ ### Ad-hoc Status Colors
70
+
71
+ Use these Tailwind utilities for status indicators — they are not part of the token system but are used consistently:
72
+
73
+ - **Success:** `text-green-600` / `dark:text-green-400`, `bg-green-500`
74
+ - **Error:** `text-red-600`, `text-destructive`
75
+
76
+ ---
77
+
78
+ ## Typography
79
+
80
+ ### Font Families
81
+
82
+ | Token | Font | Usage |
83
+ |---|---|---|
84
+ | `--font-geist-sans` | Geist | All UI text (applied to body) |
85
+ | `--font-geist-mono` | Geist Mono | Code, monospace content |
86
+
87
+ Body has `font-feature-settings: "rlig" 1, "calt" 1` and `antialiased` enabled.
88
+
89
+ ### Type Scale
90
+
91
+ | Class | Size | Usage |
92
+ |---|---|---|
93
+ | `text-xs` | 12px | Timestamps, shortcuts, helper text, code |
94
+ | `text-sm` | 14px | Descriptions, labels, body copy, card descriptions |
95
+ | `text-base` | 16px | Base text, inputs (mobile) |
96
+ | `text-lg` | 18px | Dialog titles, sub-headings |
97
+ | `text-xl` | 20px | Section titles, header logo |
98
+ | `text-2xl` | 24px | Page titles, card titles |
99
+ | `text-3xl` | 30px | Dashboard/profile headings |
100
+ | `text-4xl` | 36px | Large display text |
101
+ | `text-5xl` | 48px | Hero title |
102
+
103
+ ### Font Weights
104
+
105
+ | Class | Weight | Usage |
106
+ |---|---|---|
107
+ | `font-medium` | 500 | Buttons, labels, nav items |
108
+ | `font-semibold` | 600 | Card titles, section headings, badges, dialog titles |
109
+ | `font-bold` | 700 | Page titles, hero heading |
110
+
111
+ ### Line Heights & Tracking
112
+
113
+ | Class | Usage |
114
+ |---|---|
115
+ | `leading-none` | Labels, card titles |
116
+ | `leading-5` | Code blocks |
117
+ | `leading-6` | List items |
118
+ | `leading-7` | Paragraphs (markdown) |
119
+ | `tracking-tight` | Hero/display text |
120
+ | `tracking-widest` | Keyboard shortcuts |
121
+
122
+ ---
123
+
124
+ ## Spacing
125
+
126
+ ### Container Pattern
127
+
128
+ ```
129
+ container mx-auto px-4
130
+ ```
131
+
132
+ Responsive overrides where needed:
133
+ - Header: `px-3 sm:px-4`
134
+ - Footer: `px-4 sm:px-6 lg:px-8`
135
+
136
+ ### Max Widths
137
+
138
+ | Class | Value | Usage |
139
+ |---|---|---|
140
+ | `max-w-sm` | 24rem | Auth forms |
141
+ | `max-w-md` | 28rem | Login/register cards, error pages |
142
+ | `max-w-lg` | 32rem | Dialog content (sm+) |
143
+ | `max-w-2xl` | 42rem | Large dialogs |
144
+ | `max-w-3xl` | 48rem | Embeds, protected state |
145
+ | `max-w-4xl` | 56rem | Main content pages |
146
+
147
+ ### Vertical Spacing (space-y)
148
+
149
+ | Class | Usage |
150
+ |---|---|
151
+ | `space-y-1` | Tight lists, inline stacks |
152
+ | `space-y-1.5` | Card header |
153
+ | `space-y-2` | Form field groups, small stacks |
154
+ | `space-y-3` | Footer stacks |
155
+ | `space-y-4` | Form sections, dialog content |
156
+ | `space-y-6` | Card content sections |
157
+ | `space-y-8` | Page-level sections |
158
+
159
+ ### Padding
160
+
161
+ | Class | Usage |
162
+ |---|---|
163
+ | `p-1` | Dropdown content, icon buttons |
164
+ | `p-2` | Code blocks, muted backgrounds |
165
+ | `p-3` | Chat bubbles, inputs |
166
+ | `p-4` | Grid items, action buttons, list items |
167
+ | `p-6` | Cards, dialog content |
168
+
169
+ ### Page Vertical Padding
170
+
171
+ | Class | Usage |
172
+ |---|---|
173
+ | `py-3 sm:py-4` | Header |
174
+ | `py-4 sm:py-6` | Footer |
175
+ | `py-8` | Standard content pages |
176
+ | `py-12` | Home page, dashboard |
177
+ | `py-16` | Error/not-found pages |
178
+
179
+ ---
180
+
181
+ ## Border Radius
182
+
183
+ | Token | Value | Class |
184
+ |---|---|---|
185
+ | `--radius` | `0.625rem` (10px) | Base |
186
+ | `--radius-sm` | `calc(--radius - 4px)` = 6px | `rounded-sm` |
187
+ | `--radius-md` | `calc(--radius - 2px)` = 8px | `rounded-md` |
188
+ | `--radius-lg` | `var(--radius)` = 10px | `rounded-lg` |
189
+ | `--radius-xl` | `calc(--radius + 4px)` = 14px | `rounded-xl` |
190
+ | — | 9999px | `rounded-full` |
191
+
192
+ **Usage:**
193
+ - `rounded-md` — Buttons, inputs, textarea, code blocks, dropdowns
194
+ - `rounded-lg` — Cards, dialogs, feature cards, chat bubbles
195
+ - `rounded-xl` — Hero logo container
196
+ - `rounded-full` — Badges, avatars
197
+
198
+ ---
199
+
200
+ ## Shadows
201
+
202
+ | Class | Usage |
203
+ |---|---|
204
+ | `shadow-xs` | Inputs, textarea, secondary/outline buttons |
205
+ | `shadow-sm` | Card base |
206
+ | `shadow-md` | Card hover, dropdown content |
207
+ | `shadow-lg` | Dialogs, dropdown sub-content |
208
+
209
+ No custom shadow definitions — all Tailwind defaults.
210
+
211
+ ---
212
+
213
+ ## Animations
214
+
215
+ ### Custom Keyframes
216
+
217
+ | Name | Effect | Duration | Easing |
218
+ |---|---|---|---|
219
+ | `fade-in` | Opacity 0 → 1 | 0.3s | ease-out |
220
+ | `fade-up` | Opacity 0 → 1 + translateY(8px → 0) | 0.4s | ease-out |
221
+ | `scale-in` | Opacity 0 → 1 + scale(0.97 → 1) | 0.2s | ease-out |
222
+
223
+ Use via: `animate-fade-in`, `animate-fade-up`, `animate-scale-in`
224
+
225
+ ### tw-animate-css Animations
226
+
227
+ Used on dialogs and dropdowns:
228
+ - `animate-in` / `animate-out`
229
+ - `fade-in-0` / `fade-out-0`
230
+ - `zoom-in-95` / `zoom-out-95`
231
+ - `slide-in-from-{top|bottom|left|right}-2`
232
+
233
+ ### Transition Classes
234
+
235
+ | Class | Usage |
236
+ |---|---|
237
+ | `transition-colors` | Links, hover color changes |
238
+ | `transition-opacity` | Avatar hover, reveal-on-hover |
239
+ | `transition-all duration-200` | Card interactive hover, buttons |
240
+ | `transition-[color,box-shadow]` | Input/textarea focus |
241
+
242
+ ### Utility Classes
243
+
244
+ ```css
245
+ .card-interactive {
246
+ @apply transition-all duration-200 ease-out;
247
+ }
248
+ .card-interactive:hover {
249
+ @apply shadow-md -translate-y-0.5;
250
+ }
251
+ ```
252
+
253
+ ```css
254
+ .auth-bg {
255
+ background-image: radial-gradient(
256
+ circle at 50% 0%,
257
+ var(--accent) 0%,
258
+ transparent 50%
259
+ );
260
+ }
261
+ ```
262
+
263
+ ---
264
+
265
+ ## Layout
266
+
267
+ ### Root Structure
268
+
269
+ ```
270
+ <body class="antialiased min-h-screen flex flex-col">
271
+ <SiteHeader />
272
+ <main id="main-content" class="flex-1">{children}</main>
273
+ <SiteFooter />
274
+ <Toaster />
275
+ </body>
276
+ ```
277
+
278
+ ### Page Layout Patterns
279
+
280
+ **Auth pages:**
281
+ ```
282
+ flex min-h-[calc(100vh-4rem)] items-center justify-center p-4
283
+ → Card w-full max-w-md
284
+ ```
285
+
286
+ **Standard content pages:**
287
+ ```
288
+ container mx-auto px-4 py-8
289
+ → max-w-4xl mx-auto
290
+ ```
291
+
292
+ **Error/not-found pages:**
293
+ ```
294
+ container mx-auto px-4 py-16
295
+ → max-w-md mx-auto text-center
296
+ ```
297
+
298
+ ### Grid Patterns
299
+
300
+ | Pattern | Usage |
301
+ |---|---|
302
+ | `grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6` | Feature cards (4-col) |
303
+ | `grid grid-cols-1 md:grid-cols-2 gap-6` | Dashboard cards |
304
+ | `grid grid-cols-1 md:grid-cols-2 gap-4` | Profile info |
305
+ | `grid grid-cols-1 md:grid-cols-3 gap-4` | Quick actions |
306
+
307
+ ### Responsive Breakpoints
308
+
309
+ Standard Tailwind breakpoints:
310
+ - `sm:` (640px) — Padding adjustments, text alignment, button sizing
311
+ - `md:` (768px) — Grid column changes (→ 2 col), input font size
312
+ - `lg:` (1024px) — Grid column changes (→ 4 col), wide padding
313
+
314
+ ---
315
+
316
+ ## Icons
317
+
318
+ **Library:** Lucide React
319
+
320
+ ### Sizing Convention
321
+
322
+ | Size | Classes | Usage |
323
+ |---|---|---|
324
+ | XS | `h-3 w-3` | Inline badge icons |
325
+ | SM | `h-3.5 w-3.5` | Copy buttons |
326
+ | Default | `h-4 w-4` or `size-4` | Standard UI icons |
327
+ | MD | `h-5 w-5` | Header logo icon |
328
+ | LG | `h-7 w-7` | Hero logo icon |
329
+ | XL | `h-16 w-16` | Error/empty state illustrations |
330
+
331
+ ### Commonly Used Icons
332
+
333
+ `Bot`, `User`, `Lock`, `Shield`, `Mail`, `Calendar`, `Copy`, `Check`, `Loader2`, `LogOut`, `Sun`, `Moon`, `Github`, `ArrowLeft`, `RefreshCw`, `AlertCircle`, `FileQuestion`, `Database`, `Palette`, `Video`
334
+
335
+ ---
336
+
337
+ ## Components (shadcn/ui)
338
+
339
+ All components live in `src/components/ui/`. They use `data-slot` attributes, accept `className` for overrides via `cn()`, and follow either `React.forwardRef` or functional component patterns.
340
+
341
+ ### Button
342
+
343
+ 6 variants, 4 sizes (CVA-based):
344
+
345
+ | Variant | Usage |
346
+ |---|---|
347
+ | `default` | Primary actions |
348
+ | `secondary` | Secondary actions |
349
+ | `outline` | Tertiary actions |
350
+ | `ghost` | Subtle/icon actions |
351
+ | `destructive` | Delete/danger actions |
352
+ | `link` | Inline text links |
353
+
354
+ | Size | Height | Padding |
355
+ |---|---|---|
356
+ | `sm` | h-8 | px-3 |
357
+ | `default` | h-9 | px-4 |
358
+ | `lg` | h-10 | px-6 |
359
+ | `icon` | size-9 | — |
360
+
361
+ ### Card
362
+
363
+ 6 sub-components: `Card`, `CardHeader`, `CardTitle`, `CardDescription`, `CardContent`, `CardFooter`
364
+
365
+ Base: `rounded-lg border bg-card text-card-foreground shadow-sm`
366
+
367
+ ### Input / Textarea
368
+
369
+ - Height: `h-9` (input), `min-h-16` (textarea)
370
+ - Border: `border bg-transparent rounded-md shadow-xs`
371
+ - Focus: `focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]`
372
+ - Validation: `aria-invalid:border-destructive aria-invalid:ring-destructive/20`
373
+ - Responsive font: `text-base md:text-sm`
374
+
375
+ ### Badge
376
+
377
+ 4 variants: `default`, `secondary`, `destructive`, `outline`
378
+
379
+ Base: `rounded-full border px-2.5 py-0.5 text-xs font-semibold`
380
+
381
+ ### Dialog
382
+
383
+ Radix-based with overlay (`bg-black/50`), fade + zoom animations, optional close button.
384
+
385
+ ### DropdownMenu
386
+
387
+ Radix-based. Content: `rounded-md border p-1 shadow-md min-w-[8rem]`. Items support a `destructive` variant.
388
+
389
+ ### Spinner
390
+
391
+ Sizes: `sm` (h-4 w-4), `md` (h-6 w-6), `lg` (h-8 w-8). Uses `Loader2` with `animate-spin`.
392
+
393
+ ### Toast (Sonner)
394
+
395
+ Custom icons per state (success, info, warning, error, loading). Themed via CSS variable overrides.
396
+
397
+ ---
398
+
399
+ ## Focus & Interaction States
400
+
401
+ ### Focus Ring (Global)
402
+
403
+ ```css
404
+ outline-2 outline-offset-2 outline-ring/70
405
+ ```
406
+
407
+ Component-level override:
408
+ ```
409
+ focus-visible:ring-ring/50 focus-visible:ring-[3px]
410
+ ```
411
+
412
+ ### Disabled
413
+
414
+ ```
415
+ disabled:pointer-events-none disabled:opacity-50
416
+ ```
417
+
418
+ ### Interactive Card Hover
419
+
420
+ ```
421
+ transition-all duration-200 ease-out
422
+ hover:shadow-md hover:-translate-y-0.5
423
+ ```
424
+
425
+ ---
426
+
427
+ ## Dark Mode
428
+
429
+ - **Method:** Class-based via `next-themes` with `attribute="class"` and `disableTransitionOnChange`
430
+ - **Default:** System preference
431
+ - **Toggle:** 3-way dropdown — Light / Dark / System
432
+ - All semantic color tokens swap automatically via `.dark` CSS selector
433
+ - Use `dark:` prefix for component-specific overrides (e.g., `dark:bg-input/30`)
434
+
435
+ ---
436
+
437
+ ## Branding
438
+
439
+ ### Logo Text
440
+
441
+ ```
442
+ bg-gradient-to-r from-primary to-primary/70 bg-clip-text text-transparent
443
+ ```
444
+
445
+ ### Logo Icon Container
446
+
447
+ ```
448
+ w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center
449
+ ```
450
+
451
+ Hero variant: `w-12 h-12 rounded-xl`