Skip to content

Commit bebf5dd

Browse files
devakoneclaude
andcommitted
docs: split agent config into general and local files
- Generalize Agents.md: remove personal Supabase refs, test creds, and workflow journal preferences - Create CLAUDE.md: references Agents.md for Claude Code users - Create CLAUDE.local.example.md: template for personal config - Add CLAUDE.local.md and .claude/settings.local.json to .gitignore Structure: - Agents.md: General instructions (any AI agent) - committed - CLAUDE.md: Points to Agents.md - committed - CLAUDE.local.md: Personal config - gitignored Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 8323737 commit bebf5dd

4 files changed

Lines changed: 91 additions & 111 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ supabase/.temp/
3737
*~
3838
.cursor-memory
3939

40+
# Claude Code
41+
CLAUDE.local.md
42+
.claude/settings.local.json
43+
4044
# OS
4145
.DS_Store
4246
Thumbs.db

Agents.md

Lines changed: 17 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ npm run dev
6363
Copy the example env file and fill in values:
6464

6565
```bash
66-
cp .env.example .env.local
66+
cp .env.example apps/web/.env.local
6767
```
6868

6969
Required variables:
@@ -108,45 +108,21 @@ psql "postgresql://postgres:postgres@127.0.0.1:XXXXX/postgres" -c "YOUR SQL HERE
108108
- Always use `psql` with the local DB URL from `npm run supabase:status`
109109
- The MCP Supabase tools are for remote database operations only
110110

111-
### Supabase Project References
112-
113-
| Environment | Project Ref | Dashboard URL | Branch |
114-
|-------------|-------------|---------------|--------|
115-
| Local | N/A | `npm run supabase:start`http://127.0.0.1:54423 | - |
116-
| Development | `ljxvzqjkwwwsgdnvgpgm` | https://supabase.com/dashboard/project/ljxvzqjkwwwsgdnvgpgm | `develop` |
117-
| Production | `idjewtwnfrufbxoxulmq` | https://supabase.com/dashboard/project/idjewtwnfrufbxoxulmq | `main` |
118-
119-
**Default remote:** Development (`ljxvzqjkwwwsgdnvgpgm`)
120-
121111
### Switching Between Environments
122112

123-
By default, the Supabase CLI points to the **development** remote. You only need to explicitly link when switching to production.
113+
The project may have multiple remote environments (development, staging, production). Use the Supabase CLI to switch:
124114

125115
```bash
126116
# Check which environment is currently linked
127-
npm run supabase:which
128-
129-
# Link to production (CAUTION: only for production deployments)
130-
npm run supabase:link:prod
117+
npx supabase projects list
131118

132-
# Link back to development (restore default)
133-
npm run supabase:link:dev
134-
```
135-
136-
Add these scripts to `package.json`:
137-
```json
138-
{
139-
"scripts": {
140-
"supabase:which": "npx supabase projects list",
141-
"supabase:link:dev": "npx supabase link --project-ref <DEV_PROJECT_REF>",
142-
"supabase:link:prod": "npx supabase link --project-ref <PROD_PROJECT_REF>"
143-
}
144-
}
119+
# Link to a specific project
120+
npx supabase link --project-ref <PROJECT_REF>
145121
```
146122

147123
**When to use each:**
148124
- **Local:** Default for all development work
149-
- **Development remote (default):** Testing against shared dev data, deploying previews, pushing migrations
125+
- **Development remote:** Testing against shared dev data, deploying previews, pushing migrations
150126
- **Production remote:** Only for production deployments or critical debugging
151127

152128
---
@@ -232,26 +208,21 @@ npx supabase migration list --linked
232208

233209
### Local Dev Test User
234210

235-
For testing authenticated flows locally, create this test user:
211+
For testing authenticated flows locally, you can create a test user in the local Supabase instance.
236212

237-
| Field | Value |
238-
|-------|-------|
239-
| Email | `testuser@vibed.coding` |
240-
| Password | `TestPass123!` |
241-
242-
**To create the test user:**
213+
**To create a test user:**
243214

244215
1. Start local Supabase: `npm run supabase:start`
245216
2. Go to local Supabase Studio: `http://127.0.0.1:54323`
246217
3. Navigate to Authentication → Users
247-
4. Click "Add User" and enter the credentials above
218+
4. Click "Add User" and enter test credentials
248219

249220
**Alternative via SQL:**
250221
```bash
251222
# Get DB URL first
252223
npm run supabase:status
253224

254-
# Create user (replace XXXXX with actual port)
225+
# Create user (replace XXXXX with actual port, EMAIL and PASSWORD with your values)
255226
psql "postgresql://postgres:postgres@127.0.0.1:XXXXX/postgres" -c "
256227
INSERT INTO auth.users (
257228
id,
@@ -262,8 +233,8 @@ INSERT INTO auth.users (
262233
updated_at
263234
) VALUES (
264235
gen_random_uuid(),
265-
'testuser@vibed.coding',
266-
crypt('TestPass123!', gen_salt('bf')),
236+
'YOUR_TEST_EMAIL',
237+
crypt('YOUR_TEST_PASSWORD', gen_salt('bf')),
267238
now(),
268239
now(),
269240
now()
@@ -275,8 +246,8 @@ INSERT INTO auth.users (
275246

276247
For GitHub OAuth testing locally:
277248
1. Create a GitHub OAuth App at https://github.com/settings/developers
278-
2. Set callback URL to `http://localhost:54421/auth/v1/callback`
279-
3. Add credentials to `.env.local`
249+
2. Set callback URL to `http://localhost:54321/auth/v1/callback`
250+
3. Add credentials to `apps/web/.env.local`
280251

281252
---
282253

@@ -498,9 +469,9 @@ npx supabase migration repair --status applied <version>
498469

499470
1. **Most common cause:** Supabase was started without env vars. Restart with `npm run supabase:stop && npm run supabase:start`
500471
2. **Stale browser state:** Clear cookies and site data for `localhost` in your browser, then try again
501-
3. Check callback URL in GitHub OAuth App matches: `http://localhost:54421/auth/v1/callback`
472+
3. Check callback URL in GitHub OAuth App matches: `http://localhost:54321/auth/v1/callback`
502473
4. Verify `GITHUB_CLIENT_ID` and `GITHUB_CLIENT_SECRET` are set in `apps/web/.env.local`
503-
5. Check Supabase Auth settings in local Studio: `http://127.0.0.1:54423`
474+
5. Check Supabase Auth settings in local Studio: `http://127.0.0.1:54323`
504475
6. Use `localhost:8108` consistently (not `127.0.0.1:8108`) to avoid OAuth state mismatches
505476

506477
### MCP Tools Not Connecting
@@ -537,69 +508,4 @@ MCP Supabase tools connect to remote projects, not local. For local development:
537508

538509
---
539510

540-
## Workflow Capture
541-
542-
**IMPORTANT:** This project is also a learning tool for improving the development process.
543-
544-
### When to Log
545-
546-
Add entries to `docs/WorkflowJournal.md` when you observe:
547-
548-
| Tag | When to Use |
549-
|-----|-------------|
550-
| `[MANUAL]` | User or agent did something by hand that could be scripted |
551-
| `[REPETITIVE]` | Did something that's been done in other projects |
552-
| `[FRICTION]` | Hit a snag, needed a workaround, or found unexpected complexity |
553-
| `[INSIGHT]` | Learned something worth remembering for future projects |
554-
| `[DECISION]` | Made a choice between alternatives (capture the reasoning) |
555-
556-
### Entry Format
557-
558-
```markdown
559-
### YYYY-MM-DD HH:MM - [TAG] Short title
560-
**Context:** What were you trying to do?
561-
**Action:** What did you actually do?
562-
**Time spent:** Estimate
563-
**Automation opportunity:** None | Low | Medium | High
564-
**Notes:** Any additional context
565-
```
566-
567-
### Examples of What to Capture
568-
569-
**Do log:**
570-
- Creating a new file that follows a pattern from other projects
571-
- Running a manual command that could be in a script
572-
- Discovering a gotcha or workaround
573-
- Choosing between libraries, approaches, or patterns
574-
- Anything that took longer than expected
575-
576-
**Don't log:**
577-
- Routine code edits
578-
- Standard git operations
579-
- Things already documented elsewhere
580-
581-
### Proactive Capture
582-
583-
When completing a task, briefly consider:
584-
1. Was any part of this manual when it could be automated?
585-
2. Have I done this exact thing in another project?
586-
3. Did I learn something that would help next time?
587-
588-
If yes to any, add a journal entry before moving on.
589-
590-
---
591-
592-
## Related Workflow Documents
593-
594-
| Document | Purpose |
595-
|----------|---------|
596-
| `docs/Workflow.md` | The playbook—how projects are started (template for future) |
597-
| `docs/WorkflowJournal.md` | Real-time capture during this project |
598-
| `docs/PRD.md` | Product requirements |
599-
| `docs/Agents.md` | This file—agent instructions |
600-
601-
The journal feeds insights back into the playbook. Over time, high-automation-opportunity items become scripts or templates.
602-
603-
---
604-
605-
*Last updated: Phase 0 initialization*
511+
*Last updated: 2026-01-22*

CLAUDE.local.example.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Personal Claude Configuration (Template)
2+
3+
Copy this file to `CLAUDE.local.md` and fill in your personal configuration.
4+
The `CLAUDE.local.md` file is gitignored and will not be committed.
5+
6+
---
7+
8+
## Supabase Project References
9+
10+
| Environment | Project Ref | Dashboard URL | Branch |
11+
|-------------|-------------|---------------|--------|
12+
| Local | N/A | `npm run supabase:start`http://127.0.0.1:54323 | - |
13+
| Development | `<YOUR_DEV_PROJECT_REF>` | https://supabase.com/dashboard/project/<YOUR_DEV_PROJECT_REF> | `develop` |
14+
| Production | `<YOUR_PROD_PROJECT_REF>` | https://supabase.com/dashboard/project/<YOUR_PROD_PROJECT_REF> | `main` |
15+
16+
### Quick Link Commands
17+
18+
```bash
19+
# Link to development
20+
npx supabase link --project-ref <YOUR_DEV_PROJECT_REF>
21+
22+
# Link to production
23+
npx supabase link --project-ref <YOUR_PROD_PROJECT_REF>
24+
```
25+
26+
---
27+
28+
## Test Credentials
29+
30+
### Local Dev Test User
31+
32+
| Field | Value |
33+
|-------|-------|
34+
| Email | `your-test-email@example.com` |
35+
| Password | `YourTestPassword123!` |
36+
37+
---
38+
39+
## Personal Workflow Preferences
40+
41+
Add any personal workflow preferences here, such as:
42+
- Preferred editor settings
43+
- Custom scripts you use
44+
- Personal reminders or notes
45+
46+
---
47+
48+
## MCP Tool Configurations
49+
50+
If you have specific MCP tools configured, document them here for reference.

CLAUDE.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Claude Instructions
2+
3+
Follow the instructions in [Agents.md](./Agents.md) for all project work.
4+
5+
This file ensures Claude Code automatically loads the agent-agnostic instructions that work with any AI assistant.
6+
7+
## Claude-Specific Notes
8+
9+
- Use `CLAUDE.local.md` for personal configuration (gitignored)
10+
- The `.claude/settings.local.json` file contains permission overrides
11+
12+
## Local Overrides
13+
14+
Create a `CLAUDE.local.md` file (gitignored) for:
15+
- Specific Supabase project references
16+
- Test credentials
17+
- Personal workflow preferences
18+
- MCP tool configurations
19+
20+
See `CLAUDE.local.example.md` for a template.

0 commit comments

Comments
 (0)