aiblueprint-cli 1.4.59 → 1.4.61
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/README.md +16 -36
- package/agents-config/agents/action.md +1 -1
- package/agents-config/agents/explore-codebase.md +53 -53
- package/agents-config/agents/explore-docs.md +50 -69
- package/agents-config/agents/websearch.md +36 -40
- package/agents-config/claude-config/scripts/.claude/skills/fix-on-my-computer/SKILL.md +81 -0
- package/agents-config/claude-config/scripts/CLAUDE.md +10 -4
- package/agents-config/claude-config/scripts/bun.lockb +0 -0
- package/agents-config/claude-config/scripts/package.json +22 -30
- package/agents-config/claude-config/scripts/statusline/CLAUDE.md +37 -155
- package/agents-config/claude-config/scripts/statusline/README.md +18 -94
- package/agents-config/claude-config/scripts/statusline/defaults.json +13 -10
- package/agents-config/claude-config/scripts/statusline/fixtures/mock-transcript.jsonl +4 -4
- package/agents-config/claude-config/scripts/statusline/fixtures/test-input.json +4 -4
- package/agents-config/claude-config/scripts/statusline/src/commands/interactive-config.ts +403 -0
- package/agents-config/claude-config/scripts/statusline/src/index.ts +33 -82
- package/agents-config/claude-config/scripts/statusline/src/lib/config-types.ts +7 -1
- package/agents-config/claude-config/scripts/statusline/src/lib/formatters.ts +40 -0
- package/agents-config/claude-config/scripts/statusline/src/lib/presets.ts +13 -13
- package/agents-config/claude-config/scripts/statusline/src/lib/render-pure.ts +24 -5
- package/agents-config/claude-config/scripts/statusline/statusline.config.free.json +79 -0
- package/agents-config/claude-config/scripts/statusline/statusline.config.json +77 -77
- package/agents-config/codex-config/config.toml +9 -0
- package/agents-config/codex-config/hooks/command-deny-list.ts +203 -0
- package/agents-config/commands/prompts/create-vitejs-app.md +272 -0
- package/agents-config/commands/prompts/nextjs-add-prisma-db.md +136 -0
- package/agents-config/commands/prompts/nextjs-setup-better-auth.md +173 -0
- package/agents-config/commands/prompts/nextjs-setup-project.md +200 -0
- package/agents-config/commands/prompts/prompt.md +55 -0
- package/agents-config/commands/prompts/saas-challenge-idea.md +135 -0
- package/agents-config/commands/prompts/saas-create-architecture.md +242 -0
- package/agents-config/commands/prompts/saas-create-headline.md +132 -0
- package/agents-config/commands/prompts/saas-create-landing-copywritting.md +267 -0
- package/agents-config/commands/prompts/saas-create-legals-docs.md +176 -0
- package/agents-config/commands/prompts/saas-create-logos.md +240 -0
- package/agents-config/commands/prompts/saas-create-prd.md +195 -0
- package/agents-config/commands/prompts/saas-create-tasks.md +240 -0
- package/agents-config/commands/prompts/saas-define-pricing.md +293 -0
- package/agents-config/commands/prompts/saas-find-domain-name.md +190 -0
- package/agents-config/commands/prompts/saas-implement-landing-page.md +257 -0
- package/agents-config/commands/prompts/setup-tmux.md +160 -0
- package/agents-config/commands/prompts/tools.md +148 -0
- package/agents-config/scripts/.claude/skills/fix-on-my-computer/SKILL.md +81 -0
- package/agents-config/scripts/CLAUDE.md +37 -0
- package/agents-config/scripts/biome.json +37 -0
- package/agents-config/scripts/bun.lockb +0 -0
- package/agents-config/scripts/package.json +24 -0
- package/agents-config/scripts/statusline/CLAUDE.md +87 -0
- package/agents-config/scripts/statusline/README.md +117 -0
- package/agents-config/scripts/statusline/__tests__/context.test.ts +229 -0
- package/agents-config/scripts/statusline/__tests__/formatters.test.ts +108 -0
- package/agents-config/scripts/statusline/__tests__/statusline.test.ts +309 -0
- package/agents-config/scripts/statusline/defaults.json +82 -0
- package/agents-config/scripts/statusline/fixtures/mock-transcript.jsonl +4 -0
- package/agents-config/scripts/statusline/fixtures/test-input.json +35 -0
- package/agents-config/scripts/statusline/src/commands/interactive-config.ts +403 -0
- package/agents-config/scripts/statusline/src/index.ts +141 -0
- package/agents-config/scripts/statusline/src/lib/config-types.ts +110 -0
- package/agents-config/scripts/statusline/src/lib/config.ts +21 -0
- package/agents-config/scripts/statusline/src/lib/context.ts +103 -0
- package/agents-config/scripts/statusline/src/lib/formatters.ts +426 -0
- package/agents-config/scripts/statusline/src/lib/git.ts +100 -0
- package/agents-config/scripts/statusline/src/lib/menu-factories.ts +224 -0
- package/agents-config/scripts/statusline/src/lib/presets.ts +177 -0
- package/agents-config/scripts/statusline/src/lib/render-pure.ts +516 -0
- package/agents-config/scripts/statusline/src/lib/types.ts +36 -0
- package/agents-config/scripts/statusline/src/lib/utils.ts +15 -0
- package/agents-config/scripts/statusline/statusline.config.free.json +79 -0
- package/agents-config/scripts/statusline/statusline.config.json +79 -0
- package/agents-config/scripts/statusline/test-with-fixtures.ts +37 -0
- package/agents-config/scripts/statusline/test.ts +20 -0
- package/agents-config/scripts/statusline/tsconfig.json +27 -0
- package/agents-config/scripts/tsconfig.json +27 -0
- package/agents-config/skills/{subagent-creator → agents-managers}/SKILL.md +47 -47
- package/agents-config/skills/{subagent-creator/references/subagents.md → agents-managers/references/agents.md} +45 -45
- package/agents-config/skills/{subagent-creator → agents-managers}/references/context-management.md +20 -20
- package/agents-config/skills/{subagent-creator → agents-managers}/references/debugging-agents.md +27 -27
- package/agents-config/skills/{subagent-creator → agents-managers}/references/error-handling-and-recovery.md +19 -19
- package/agents-config/skills/{subagent-creator → agents-managers}/references/evaluation-and-testing.md +29 -29
- package/agents-config/skills/{subagent-creator → agents-managers}/references/orchestration-patterns.md +5 -5
- package/agents-config/skills/{subagent-creator/references/writing-subagent-prompts.md → agents-managers/references/writing-agent-prompts.md} +23 -23
- package/agents-config/skills/codex-environment/SKILL.md +2 -0
- package/agents-config/skills/commit/SKILL.md +2 -0
- package/agents-config/skills/create-pr/SKILL.md +2 -0
- package/agents-config/skills/environments-manager/SKILL.md +271 -0
- package/agents-config/skills/environments-manager/examples/claude/.worktreeinclude +3 -0
- package/agents-config/skills/environments-manager/examples/claude/commands/dev.md +5 -0
- package/agents-config/skills/environments-manager/examples/claude/commands/lint.md +5 -0
- package/agents-config/skills/environments-manager/examples/claude/commands/test.md +5 -0
- package/agents-config/skills/environments-manager/examples/claude/commands/typecheck.md +5 -0
- package/agents-config/skills/environments-manager/examples/claude/settings.json +24 -0
- package/agents-config/skills/environments-manager/examples/codex/environments/environment.toml +29 -0
- package/agents-config/skills/environments-manager/examples/cursor/worktrees.json +3 -0
- package/agents-config/skills/environments-manager/examples/scripts/claude-worktree-create.sh +96 -0
- package/agents-config/skills/environments-manager/examples/scripts/claude-worktree-remove.sh +66 -0
- package/agents-config/skills/environments-manager/examples/scripts/dev.sh +15 -0
- package/agents-config/skills/environments-manager/examples/scripts/worktree-down.sh +22 -0
- package/agents-config/skills/environments-manager/examples/scripts/worktree-up.sh +50 -0
- package/agents-config/skills/environments-manager/references/claude.md +156 -0
- package/agents-config/skills/environments-manager/references/codex.md +97 -0
- package/agents-config/skills/environments-manager/references/cursor.md +88 -0
- package/agents-config/skills/fix-pr-comments/SKILL.md +2 -0
- package/agents-config/skills/grill-me/SKILL.md +10 -0
- package/agents-config/skills/merge/SKILL.md +2 -0
- package/agents-config/skills/rules-manager/SKILL.md +191 -0
- package/agents-config/skills/rules-manager/references/agents-vs-claude.md +66 -0
- package/agents-config/skills/rules-manager/references/examples.md +117 -0
- package/agents-config/skills/skill-manager/SKILL.md +101 -0
- package/agents-config/skills/skill-manager/references/claude-code.md +81 -0
- package/agents-config/skills/skill-manager/references/codex.md +288 -0
- package/agents-config/skills/skill-manager/references/cursor.md +125 -0
- package/agents-config/skills/skill-manager/references/description-recommandation.md +97 -0
- package/agents-config/skills/skill-manager/scripts/inspect-description.ts +743 -0
- package/agents-config/skills/ultrathink/SKILL.md +2 -0
- package/dist/cli.js +581 -299
- package/package.json +1 -1
- package/agents-config/claude-config/scripts/statusline/data/.gitignore +0 -8
- package/agents-config/claude-config/scripts/statusline/data/.gitkeep +0 -0
- package/agents-config/claude-config/scripts/statusline/docs/ARCHITECTURE.md +0 -166
- package/agents-config/claude-config/scripts/statusline/src/tests/spend-v2.test.ts +0 -306
- package/agents-config/skills/apex/SKILL.md +0 -261
- package/agents-config/skills/apex/scripts/setup-templates.sh +0 -100
- package/agents-config/skills/apex/scripts/update-progress.sh +0 -80
- package/agents-config/skills/apex/steps/step-00-init.md +0 -267
- package/agents-config/skills/apex/steps/step-00b-branch.md +0 -126
- package/agents-config/skills/apex/steps/step-00b-economy.md +0 -244
- package/agents-config/skills/apex/steps/step-00b-interactive.md +0 -153
- package/agents-config/skills/apex/steps/step-01-analyze.md +0 -361
- package/agents-config/skills/apex/steps/step-02-plan.md +0 -264
- package/agents-config/skills/apex/steps/step-03-execute.md +0 -239
- package/agents-config/skills/apex/steps/step-04-validate.md +0 -251
- package/agents-config/skills/apex/templates/00-context.md +0 -43
- package/agents-config/skills/apex/templates/01-analyze.md +0 -10
- package/agents-config/skills/apex/templates/02-plan.md +0 -10
- package/agents-config/skills/apex/templates/03-execute.md +0 -10
- package/agents-config/skills/apex/templates/04-validate.md +0 -10
- package/agents-config/skills/apex/templates/README.md +0 -176
- package/agents-config/skills/apex/templates/step-complete.md +0 -7
- package/agents-config/skills/claude-memory/SKILL.md +0 -293
- package/agents-config/skills/claude-memory/references/comprehensive-example.md +0 -175
- package/agents-config/skills/claude-memory/references/optimize-guide.md +0 -300
- package/agents-config/skills/claude-memory/references/project-patterns.md +0 -334
- package/agents-config/skills/claude-memory/references/prompting-techniques.md +0 -411
- package/agents-config/skills/claude-memory/references/rules-directory-guide.md +0 -298
- package/agents-config/skills/claude-memory/references/section-templates.md +0 -347
- package/agents-config/skills/fix-errors/SKILL.md +0 -61
- package/agents-config/skills/fix-grammar/SKILL.md +0 -59
- package/agents-config/skills/ralph-loop/SKILL.md +0 -117
- package/agents-config/skills/ralph-loop/scripts/setup.sh +0 -278
- package/agents-config/skills/ralph-loop/steps/step-00-init.md +0 -215
- package/agents-config/skills/ralph-loop/steps/step-01-interactive-prd.md +0 -366
- package/agents-config/skills/ralph-loop/steps/step-02-create-stories.md +0 -273
- package/agents-config/skills/ralph-loop/steps/step-03-finish.md +0 -245
- package/agents-config/skills/skill-creator/LICENSE.txt +0 -202
- package/agents-config/skills/skill-creator/SKILL.md +0 -421
- package/agents-config/skills/skill-creator/package.json +0 -5
- package/agents-config/skills/skill-creator/references/output-patterns.md +0 -82
- package/agents-config/skills/skill-creator/references/progressive-disclosure-patterns.md +0 -374
- package/agents-config/skills/skill-creator/references/prompting-integration.md +0 -363
- package/agents-config/skills/skill-creator/references/real-world-examples.md +0 -513
- package/agents-config/skills/skill-creator/references/script-patterns.md +0 -385
- package/agents-config/skills/skill-creator/references/workflows.md +0 -28
- package/agents-config/skills/skill-creator/references/xml-tag-guide.md +0 -606
- package/agents-config/skills/skill-creator/scripts/init-skill.ts +0 -214
- package/agents-config/skills/skill-creator/scripts/package-skill.ts +0 -146
- package/agents-config/skills/skill-creator/scripts/validate.ts +0 -138
- package/agents-config/skills/workflow-apex-free/SKILL.md +0 -261
- package/agents-config/skills/workflow-apex-free/scripts/setup-templates.sh +0 -100
- package/agents-config/skills/workflow-apex-free/scripts/update-progress.sh +0 -80
- package/agents-config/skills/workflow-apex-free/steps/step-00-init.md +0 -267
- package/agents-config/skills/workflow-apex-free/steps/step-00b-branch.md +0 -126
- package/agents-config/skills/workflow-apex-free/steps/step-00b-economy.md +0 -244
- package/agents-config/skills/workflow-apex-free/steps/step-00b-interactive.md +0 -153
- package/agents-config/skills/workflow-apex-free/steps/step-01-analyze.md +0 -361
- package/agents-config/skills/workflow-apex-free/steps/step-02-plan.md +0 -264
- package/agents-config/skills/workflow-apex-free/steps/step-03-execute.md +0 -239
- package/agents-config/skills/workflow-apex-free/steps/step-04-validate.md +0 -251
- package/agents-config/skills/workflow-apex-free/templates/00-context.md +0 -43
- package/agents-config/skills/workflow-apex-free/templates/01-analyze.md +0 -10
- package/agents-config/skills/workflow-apex-free/templates/02-plan.md +0 -10
- package/agents-config/skills/workflow-apex-free/templates/03-execute.md +0 -10
- package/agents-config/skills/workflow-apex-free/templates/04-validate.md +0 -10
- package/agents-config/skills/workflow-apex-free/templates/README.md +0 -176
- package/agents-config/skills/workflow-apex-free/templates/step-complete.md +0 -7
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
# APEX Template System
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
This directory contains template files used to initialize APEX workflow outputs when save mode (`-s`) is enabled. This template system significantly reduces token usage by moving repetitive content out of step files.
|
|
6
|
-
|
|
7
|
-
## Template Files
|
|
8
|
-
|
|
9
|
-
| Template | Purpose | Created When |
|
|
10
|
-
|----------|---------|--------------|
|
|
11
|
-
| `00-context.md` | Workflow configuration and progress tracking | Always (if save_mode) |
|
|
12
|
-
| `01-analyze.md` | Analysis findings | Always (if save_mode) |
|
|
13
|
-
| `02-plan.md` | Implementation plan | Always (if save_mode) |
|
|
14
|
-
| `03-execute.md` | Implementation log | Always (if save_mode) |
|
|
15
|
-
| `04-validate.md` | Validation results and workflow completion | Always (if save_mode) |
|
|
16
|
-
| `step-complete.md` | Completion marker template | Referenced in steps |
|
|
17
|
-
|
|
18
|
-
## Template Variables
|
|
19
|
-
|
|
20
|
-
Templates use `{{variable}}` syntax for placeholders:
|
|
21
|
-
|
|
22
|
-
| Variable | Description | Example |
|
|
23
|
-
|----------|-------------|---------|
|
|
24
|
-
| `{{task_id}}` | Kebab-case task identifier | `01-add-auth-middleware` |
|
|
25
|
-
| `{{task_description}}` | Plain text task description | `add authentication middleware` |
|
|
26
|
-
| `{{timestamp}}` | ISO 8601 timestamp | `2026-01-12T10:30:00Z` |
|
|
27
|
-
| `{{auto_mode}}` | Auto mode flag | `true` or `false` |
|
|
28
|
-
| `{{save_mode}}` | Save mode flag | `true` or `false` |
|
|
29
|
-
| `{{economy_mode}}` | Economy mode flag | `true` or `false` |
|
|
30
|
-
| `{{branch_mode}}` | Branch mode flag | `true` or `false` |
|
|
31
|
-
| `{{interactive_mode}}` | Interactive mode flag | `true` or `false` |
|
|
32
|
-
| `{{branch_name}}` | Git branch name | `feature/add-auth` |
|
|
33
|
-
| `{{original_input}}` | Raw user input | `/apex -a -s add auth` |
|
|
34
|
-
|
|
35
|
-
## Setup Script
|
|
36
|
-
|
|
37
|
-
### `setup-templates.sh`
|
|
38
|
-
|
|
39
|
-
Initializes all template files in the output directory with variables replaced.
|
|
40
|
-
|
|
41
|
-
**Usage:**
|
|
42
|
-
```bash
|
|
43
|
-
bash scripts/setup-templates.sh \
|
|
44
|
-
"feature_name" \
|
|
45
|
-
"task_description" \
|
|
46
|
-
"auto_mode" \
|
|
47
|
-
"save_mode" \
|
|
48
|
-
"economy_mode" \
|
|
49
|
-
"branch_mode" \
|
|
50
|
-
"interactive_mode" \
|
|
51
|
-
"branch_name" \
|
|
52
|
-
"original_input"
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
**Output:**
|
|
56
|
-
```
|
|
57
|
-
.claude/output/apex/01-add-auth-middleware/
|
|
58
|
-
├── 00-context.md # Always created
|
|
59
|
-
├── 01-analyze.md # Always created
|
|
60
|
-
├── 02-plan.md # Always created
|
|
61
|
-
├── 03-execute.md # Always created
|
|
62
|
-
└── 04-validate.md # Always created
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
## Progress Update Script
|
|
66
|
-
|
|
67
|
-
### `update-progress.sh`
|
|
68
|
-
|
|
69
|
-
Updates the progress table in `00-context.md` without manual markdown editing.
|
|
70
|
-
|
|
71
|
-
**Usage:**
|
|
72
|
-
```bash
|
|
73
|
-
bash scripts/update-progress.sh <task_id> <step_number> <step_name> <status>
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
**Examples:**
|
|
77
|
-
```bash
|
|
78
|
-
# Mark step 01 as in progress
|
|
79
|
-
bash scripts/update-progress.sh "01-add-auth" "01" "analyze" "in_progress"
|
|
80
|
-
|
|
81
|
-
# Mark step 01 as complete
|
|
82
|
-
bash scripts/update-progress.sh "01-add-auth" "01" "analyze" "complete"
|
|
83
|
-
|
|
84
|
-
# Mark step 02 as in progress
|
|
85
|
-
bash scripts/update-progress.sh "01-add-auth" "02" "plan" "in_progress"
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
**Status Values:**
|
|
89
|
-
- `in_progress` → `⏳ In Progress`
|
|
90
|
-
- `complete` → `✓ Complete`
|
|
91
|
-
|
|
92
|
-
## Token Savings
|
|
93
|
-
|
|
94
|
-
### Before Optimization
|
|
95
|
-
|
|
96
|
-
Each step file contained full template content inline:
|
|
97
|
-
|
|
98
|
-
```markdown
|
|
99
|
-
### 1. Initialize Save Output (if save_mode)
|
|
100
|
-
|
|
101
|
-
**If `{save_mode}` = true:**
|
|
102
|
-
|
|
103
|
-
Create `{output_dir}/01-analyze.md`:
|
|
104
|
-
```markdown
|
|
105
|
-
# Step 01: Analyze
|
|
106
|
-
|
|
107
|
-
**Task:** {task_description}
|
|
108
|
-
**Started:** {ISO timestamp}
|
|
109
|
-
|
|
110
|
-
---
|
|
111
|
-
|
|
112
|
-
## Context Discovery
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
Update `00-context.md` progress:
|
|
116
|
-
```markdown
|
|
117
|
-
| 01-analyze | ⏳ In Progress | {timestamp} |
|
|
118
|
-
```
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
**Token cost per step:** ~200 tokens × 5 steps = ~1,000 tokens
|
|
122
|
-
|
|
123
|
-
### After Optimization
|
|
124
|
-
|
|
125
|
-
Step files now reference templates and scripts:
|
|
126
|
-
|
|
127
|
-
```markdown
|
|
128
|
-
### 1. Initialize Save Output (if save_mode)
|
|
129
|
-
|
|
130
|
-
**If `{save_mode}` = true:**
|
|
131
|
-
|
|
132
|
-
The file `{output_dir}/01-analyze.md` has already been created by the setup script.
|
|
133
|
-
|
|
134
|
-
Update progress:
|
|
135
|
-
```bash
|
|
136
|
-
bash {skill_dir}/scripts/update-progress.sh "{task_id}" "01" "analyze" "in_progress"
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
Append your findings to `01-analyze.md` as you work.
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
**Token cost per step:** ~50 tokens × 5 steps = ~250 tokens
|
|
143
|
-
|
|
144
|
-
**Total savings:** ~750 tokens per workflow execution (75% reduction)
|
|
145
|
-
|
|
146
|
-
## How It Works
|
|
147
|
-
|
|
148
|
-
1. **Initialization (step-00-init.md):**
|
|
149
|
-
- Runs `setup-templates.sh` once at workflow start
|
|
150
|
-
- Creates all template files with variables replaced
|
|
151
|
-
- Output directory is ready with pre-initialized files
|
|
152
|
-
|
|
153
|
-
2. **Each Step:**
|
|
154
|
-
- Runs `update-progress.sh` to mark step as "in_progress"
|
|
155
|
-
- Appends findings/logs to the pre-created step file
|
|
156
|
-
- Runs `update-progress.sh` again to mark step as "complete"
|
|
157
|
-
|
|
158
|
-
3. **Benefits:**
|
|
159
|
-
- AI doesn't need to hold template content in context
|
|
160
|
-
- Consistent formatting across all workflows
|
|
161
|
-
- Easy to update templates without editing step files
|
|
162
|
-
- Scripts handle the tedious markdown updates
|
|
163
|
-
|
|
164
|
-
## Updating Templates
|
|
165
|
-
|
|
166
|
-
To modify template content:
|
|
167
|
-
|
|
168
|
-
1. Edit the template file in `templates/`
|
|
169
|
-
2. Changes apply to all future workflows automatically
|
|
170
|
-
3. No need to update step files
|
|
171
|
-
|
|
172
|
-
## Maintenance
|
|
173
|
-
|
|
174
|
-
- Templates are stateless (no workflow-specific logic)
|
|
175
|
-
- Scripts are idempotent (safe to run multiple times)
|
|
176
|
-
- Variables use `{{var}}` syntax to avoid conflicts with markdown
|
|
@@ -1,293 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: claude-memory
|
|
3
|
-
description: Create and optimize CLAUDE.md memory files or .claude/rules/ modular rules for Claude Code projects. Comprehensive guidance on file hierarchy, content structure, path-scoped rules, best practices, and anti-patterns. Use when working with CLAUDE.md files, .claude/rules directories, setting up new projects, or improving Claude Code's context awareness.
|
|
4
|
-
argument-hint: [init | optimize | task description]
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
<core_principle>
|
|
8
|
-
Memory files consume tokens from the context window. ~100-150 instruction slots available for your customizations. Keep files minimal — only include what the agent cannot discover on its own.
|
|
9
|
-
|
|
10
|
-
**Two approaches:**
|
|
11
|
-
- **CLAUDE.md** — Single file, best for small projects (< 100 lines)
|
|
12
|
-
- **.claude/rules/** — Modular files with optional path-scoping, best for large projects
|
|
13
|
-
</core_principle>
|
|
14
|
-
|
|
15
|
-
<quick_start>
|
|
16
|
-
Run `/init` to auto-generate a CLAUDE.md. Or create manually:
|
|
17
|
-
|
|
18
|
-
```markdown
|
|
19
|
-
# Project Name
|
|
20
|
-
|
|
21
|
-
## Tech Stack
|
|
22
|
-
- [Primary framework]
|
|
23
|
-
- [Key non-obvious libraries]
|
|
24
|
-
|
|
25
|
-
## Commands
|
|
26
|
-
- `npm run dev` - Dev server
|
|
27
|
-
- `npm test` - Run tests
|
|
28
|
-
- `npm run build` - Build
|
|
29
|
-
|
|
30
|
-
## Rules
|
|
31
|
-
- [2-3 critical project-specific rules]
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
- Press `#` during a session to add memory items quickly
|
|
35
|
-
- Use `/memory` to open CLAUDE.md in your editor
|
|
36
|
-
</quick_start>
|
|
37
|
-
|
|
38
|
-
<file_hierarchy>
|
|
39
|
-
|
|
40
|
-
| Priority | Location | Scope |
|
|
41
|
-
|----------|----------|-------|
|
|
42
|
-
| 1 (Highest) | Enterprise policy (managed by IT) | All org users |
|
|
43
|
-
| 2 | `./CLAUDE.md` or `./.claude/CLAUDE.md` | Team via git |
|
|
44
|
-
| 2 | `./.claude/rules/*.md` | Team via git |
|
|
45
|
-
| 3 | `~/.claude/CLAUDE.md` | All your projects |
|
|
46
|
-
| 3 | `~/.claude/rules/*.md` | All your projects |
|
|
47
|
-
| 4 (Lowest) | `./CLAUDE.local.md` (auto-gitignored) | Just you |
|
|
48
|
-
|
|
49
|
-
Claude recurses UP from current directory, loading all CLAUDE.md files found. Also discovers CLAUDE.md in subtrees when reading files in those directories.
|
|
50
|
-
|
|
51
|
-
**Monorepo strategy:** Root file defines WHEN; subtree files define HOW.
|
|
52
|
-
```
|
|
53
|
-
root/CLAUDE.md # Universal: tech stack, git workflow
|
|
54
|
-
apps/web/CLAUDE.md # Frontend-specific
|
|
55
|
-
apps/api/CLAUDE.md # Backend-specific
|
|
56
|
-
```
|
|
57
|
-
</file_hierarchy>
|
|
58
|
-
|
|
59
|
-
<rules_directory>
|
|
60
|
-
The `.claude/rules/` directory splits instructions into focused markdown files.
|
|
61
|
-
|
|
62
|
-
**Use `.claude/rules/` when:** many concerns, different rules for different file types, team maintains different areas.
|
|
63
|
-
**Use CLAUDE.md when:** small project, universal rules, single source of truth.
|
|
64
|
-
|
|
65
|
-
Path-scoped rules use YAML frontmatter:
|
|
66
|
-
```yaml
|
|
67
|
-
---
|
|
68
|
-
paths:
|
|
69
|
-
- "src/api/**/*.ts"
|
|
70
|
-
---
|
|
71
|
-
# API Rules
|
|
72
|
-
- All endpoints must include input validation
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
Supported patterns: `**/*.ts`, `src/**/*`, `src/**/*.{ts,tsx}`, `{src,lib}/**/*.ts`
|
|
76
|
-
|
|
77
|
-
Rules without `paths` frontmatter load unconditionally.
|
|
78
|
-
|
|
79
|
-
See [references/rules-directory-guide.md](references/rules-directory-guide.md) for complete guide including symlinks, user-level rules, and migration.
|
|
80
|
-
</rules_directory>
|
|
81
|
-
|
|
82
|
-
<content_structure>
|
|
83
|
-
Structure CLAUDE.md with only these sections:
|
|
84
|
-
|
|
85
|
-
1. **Project purpose** (1-3 lines) — What the project is
|
|
86
|
-
2. **Tech stack** (compact) — Only non-obvious technologies
|
|
87
|
-
3. **Commands** — Non-obvious dev, build, and test commands
|
|
88
|
-
4. **Important files** — Architecture-critical, non-obvious files only
|
|
89
|
-
5. **Rules** — Prohibitions and constraints that prevent mistakes (highest-value lines)
|
|
90
|
-
6. **Workflow** (optional) — Only if non-standard
|
|
91
|
-
|
|
92
|
-
**Do NOT include:**
|
|
93
|
-
- Repository overviews (agent discovers structure itself)
|
|
94
|
-
- Code style rules (linters enforce these)
|
|
95
|
-
- Generic best practices ("write clean code", "DRY", "SOLID")
|
|
96
|
-
- Redundant specs (copies of config files, env vars, schema descriptions)
|
|
97
|
-
- Marketing/goals (vision statements, KPIs, roadmaps)
|
|
98
|
-
- Verbose explanations (paragraphs where one line suffices)
|
|
99
|
-
|
|
100
|
-
See [references/section-templates.md](references/section-templates.md) for ready-to-use templates.
|
|
101
|
-
See [references/project-patterns.md](references/project-patterns.md) for framework-specific patterns.
|
|
102
|
-
</content_structure>
|
|
103
|
-
|
|
104
|
-
<writing_rules>
|
|
105
|
-
**Golden rule:** If someone with zero project context reads your CLAUDE.md and gets confused, Claude will too.
|
|
106
|
-
|
|
107
|
-
**Be specific, never vague:**
|
|
108
|
-
```
|
|
109
|
-
❌ "Format code properly" / "Write good tests" / "Follow best practices"
|
|
110
|
-
✅ "Run `pnpm lint` before committing" / "Tests in `__tests__/` using Vitest"
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
**Prohibitions > positive guidance:**
|
|
114
|
-
```
|
|
115
|
-
❌ "Try to use TanStack Form for forms"
|
|
116
|
-
✅ "NEVER use native form/useState for forms — ALWAYS use TanStack Form"
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
**Show, don't tell:** When format matters, show a concrete example (3-5 lines max).
|
|
120
|
-
|
|
121
|
-
**Emphasis hierarchy:** CRITICAL > NEVER > ALWAYS > IMPORTANT > YOU MUST
|
|
122
|
-
- Put critical rules **first** in each section
|
|
123
|
-
- Use **bold + keyword** for non-negotiable rules: `**CRITICAL**: Never commit secrets`
|
|
124
|
-
|
|
125
|
-
See [references/prompting-techniques.md](references/prompting-techniques.md) for advanced techniques.
|
|
126
|
-
</writing_rules>
|
|
127
|
-
|
|
128
|
-
<size_limits>
|
|
129
|
-
- **Ideal:** < 100 lines
|
|
130
|
-
- **Maximum:** 150 lines before performance degrades
|
|
131
|
-
- **Over 200 lines:** directives start getting lost
|
|
132
|
-
|
|
133
|
-
When exceeding limits, split into `.claude/rules/` files or link to separate docs:
|
|
134
|
-
```markdown
|
|
135
|
-
- **API patterns**: See [docs/api-patterns.md](docs/api-patterns.md)
|
|
136
|
-
- **Testing guide**: See [docs/testing-guide.md](docs/testing-guide.md)
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
CLAUDE.md supports importing: `@docs/coding-standards.md` (relative/absolute paths, `~` expansion, up to 5 levels deep, not evaluated inside code blocks).
|
|
140
|
-
</size_limits>
|
|
141
|
-
|
|
142
|
-
<workflow>
|
|
143
|
-
**ALWAYS ASK FIRST: Storage Strategy**
|
|
144
|
-
|
|
145
|
-
Before creating or updating memory files, use AskUserQuestion:
|
|
146
|
-
- **Option 1: Single CLAUDE.md** — < 100 lines, simple project, universal rules
|
|
147
|
-
- **Option 2: Modular .claude/rules/** — 100+ lines, different rules for different files
|
|
148
|
-
|
|
149
|
-
**Creating new memory:**
|
|
150
|
-
1. Start with `/init` or minimal template
|
|
151
|
-
2. Add tech stack and commands first
|
|
152
|
-
3. Add rules only as you encounter friction
|
|
153
|
-
4. Test with real tasks, iterate based on Claude's behavior
|
|
154
|
-
|
|
155
|
-
**Maintaining:**
|
|
156
|
-
1. Review quarterly or when project changes significantly
|
|
157
|
-
2. Remove outdated instructions
|
|
158
|
-
3. Add patterns that required repeated explanation
|
|
159
|
-
4. Use `#` for quick additions during work
|
|
160
|
-
|
|
161
|
-
**Troubleshooting:**
|
|
162
|
-
|
|
163
|
-
| Problem | Solution |
|
|
164
|
-
|---------|----------|
|
|
165
|
-
| Claude ignores instructions | Reduce file size, add emphasis (CRITICAL, NEVER) |
|
|
166
|
-
| Context overflow | Use `/clear`, split into .claude/rules/ |
|
|
167
|
-
| Instructions conflict | Consolidate, use hierarchy (root vs subtree) |
|
|
168
|
-
| Path rules not applying | Verify glob pattern matches target files |
|
|
169
|
-
</workflow>
|
|
170
|
-
|
|
171
|
-
<init_workflow>
|
|
172
|
-
## `/claude-memory init` — Create Minimal CLAUDE.md
|
|
173
|
-
|
|
174
|
-
When the user argument contains "init", execute this workflow to scaffold a CLAUDE.md with only the essential sections.
|
|
175
|
-
|
|
176
|
-
### Step 1: Detect project context
|
|
177
|
-
|
|
178
|
-
Read `package.json` (or equivalent: `pyproject.toml`, `Cargo.toml`, `go.mod`, etc.) to detect:
|
|
179
|
-
- Project name
|
|
180
|
-
- Tech stack (framework, language)
|
|
181
|
-
- Available scripts/commands (dev, build, test)
|
|
182
|
-
|
|
183
|
-
Also check for existing linter configs (ESLint, Biome, Prettier, tsconfig) — do NOT include rules they already enforce.
|
|
184
|
-
|
|
185
|
-
### Step 2: Identify important files
|
|
186
|
-
|
|
187
|
-
Scan for non-obvious architecture-critical files. Look for:
|
|
188
|
-
- Auth config files
|
|
189
|
-
- Server action wrappers, API helpers
|
|
190
|
-
- Database schema files
|
|
191
|
-
- Custom middleware or shared utilities
|
|
192
|
-
- Skip standard framework files (package.json, tsconfig, next.config, etc.)
|
|
193
|
-
|
|
194
|
-
### Step 3: Generate CLAUDE.md
|
|
195
|
-
|
|
196
|
-
Create the file with ONLY these sections. Each section should be compact — the whole file should be under 50 lines.
|
|
197
|
-
|
|
198
|
-
```markdown
|
|
199
|
-
# [Project Name]
|
|
200
|
-
[One-line description of what this project is]
|
|
201
|
-
|
|
202
|
-
## Tech Stack
|
|
203
|
-
- [Only non-obvious technologies — skip deps detectable from config files]
|
|
204
|
-
|
|
205
|
-
## Commands
|
|
206
|
-
- `[dev command]` - Dev server
|
|
207
|
-
- `[build command]` - Build
|
|
208
|
-
- `[test command]` - Tests
|
|
209
|
-
- [Any non-obvious commands like db:push, seed, etc.]
|
|
210
|
-
|
|
211
|
-
## Important Files
|
|
212
|
-
- [Only files the agent wouldn't discover naturally]
|
|
213
|
-
|
|
214
|
-
## Rules
|
|
215
|
-
- [Leave empty with a comment: "Add project-specific rules as you encounter friction"]
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
### Step 4: Present and write
|
|
219
|
-
|
|
220
|
-
Show the generated file to the user. Write it to `./CLAUDE.md` after approval.
|
|
221
|
-
|
|
222
|
-
**Rules:**
|
|
223
|
-
- NEVER include directory structure, code style rules, generic best practices, or marketing text
|
|
224
|
-
- NEVER include anything a linter or TypeScript already enforces
|
|
225
|
-
- Target: 20-50 lines. If it's longer, you're including too much
|
|
226
|
-
- The Rules section starts empty — it gets populated over time as mistakes happen
|
|
227
|
-
</init_workflow>
|
|
228
|
-
|
|
229
|
-
<optimize_workflow>
|
|
230
|
-
## `/claude-memory optimize` — Deep CLAUDE.md Cleanup
|
|
231
|
-
|
|
232
|
-
When the user argument contains "optimize", execute this workflow.
|
|
233
|
-
|
|
234
|
-
**CRITICAL — Step 0 is MANDATORY. Do NOT skip it. Do NOT start optimizing without reading the guide first.**
|
|
235
|
-
|
|
236
|
-
### Step 0: Read the optimization guide (REQUIRED FIRST)
|
|
237
|
-
|
|
238
|
-
YOU MUST use the Read tool on `{SKILL_PATH}/references/optimize-guide.md` BEFORE doing anything else.
|
|
239
|
-
This file contains the research data (ETH Zurich study), the 6 bloat categories with specific examples, target metrics, and before/after examples. Without reading it, you will miss removal criteria and produce a subpar optimization.
|
|
240
|
-
|
|
241
|
-
### Step 1: Inventory
|
|
242
|
-
|
|
243
|
-
Read every CLAUDE.md, CLAUDE.local.md, and `.claude/rules/*.md` in the project. Count total lines.
|
|
244
|
-
|
|
245
|
-
### Step 2: Read linter configs
|
|
246
|
-
|
|
247
|
-
Read ESLint/Biome/Prettier/TypeScript configs. Any CLAUDE.md line duplicating an enforced rule → delete.
|
|
248
|
-
|
|
249
|
-
### Step 3: Apply the 6 bloat categories from the guide
|
|
250
|
-
|
|
251
|
-
For each line ask: "Can the agent discover this by reading the project, or does a linter enforce this?" If yes → delete.
|
|
252
|
-
|
|
253
|
-
Remove everything matching:
|
|
254
|
-
1. Linter-enforced rules (ESLint, Prettier, Biome, TypeScript strict)
|
|
255
|
-
2. Marketing / goals / vision (zero code value)
|
|
256
|
-
3. Obvious info the agent discovers itself (directory structure, framework defaults, deps from package.json)
|
|
257
|
-
4. Verbose explanations (paragraphs where 1 line suffices, tutorials, history)
|
|
258
|
-
5. Redundant specs (copies of config files, schema descriptions, env var lists)
|
|
259
|
-
6. Generic best practices ("write clean code", "DRY", "SOLID")
|
|
260
|
-
|
|
261
|
-
### Step 4: Keep only essentials
|
|
262
|
-
|
|
263
|
-
- Project purpose (1-3 lines)
|
|
264
|
-
- Tech stack (compact, non-obvious only)
|
|
265
|
-
- Core commands (non-obvious only)
|
|
266
|
-
- Testing commands
|
|
267
|
-
- Important files (non-obvious only)
|
|
268
|
-
- Project-specific rules (prohibitions + constraints)
|
|
269
|
-
- Workflow (only if non-standard)
|
|
270
|
-
|
|
271
|
-
### Step 5: Compress
|
|
272
|
-
|
|
273
|
-
- Paragraphs → bullet points
|
|
274
|
-
- 3-line rules → 1-line rules
|
|
275
|
-
- Zero filler words ("In order to", "It's important to note that")
|
|
276
|
-
- Merge related items
|
|
277
|
-
|
|
278
|
-
### Step 6: Present diff
|
|
279
|
-
|
|
280
|
-
Show before/after with line counts. For each removal, cite which bloat category it falls under.
|
|
281
|
-
Let user approve before applying changes.
|
|
282
|
-
|
|
283
|
-
**Target:** < 100 lines ideal, < 150 max.
|
|
284
|
-
</optimize_workflow>
|
|
285
|
-
|
|
286
|
-
<reference_guides>
|
|
287
|
-
- **Optimization guide**: [references/optimize-guide.md](references/optimize-guide.md) — Research-backed bloat checklist, 6 removal categories, before/after examples
|
|
288
|
-
- **Rules directory**: [references/rules-directory-guide.md](references/rules-directory-guide.md) — Complete .claude/rules/ guide with path-scoping, YAML syntax, symlinks, migration
|
|
289
|
-
- **Prompting techniques**: [references/prompting-techniques.md](references/prompting-techniques.md) — Emphasis strategies, clarity techniques, constraint patterns
|
|
290
|
-
- **Section templates**: [references/section-templates.md](references/section-templates.md) — Copy-paste templates for each section type
|
|
291
|
-
- **Comprehensive example**: [references/comprehensive-example.md](references/comprehensive-example.md) — Full production SaaS CLAUDE.md
|
|
292
|
-
- **Project patterns**: [references/project-patterns.md](references/project-patterns.md) — Next.js, Express, Python, Monorepo patterns
|
|
293
|
-
</reference_guides>
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
<comprehensive_example>
|
|
2
|
-
This is a full-featured CLAUDE.md example for a production SaaS application. Use as inspiration, adapting to your specific project.
|
|
3
|
-
|
|
4
|
-
```markdown
|
|
5
|
-
# Thumbnail.io - AI Thumbnail Generator
|
|
6
|
-
|
|
7
|
-
## About
|
|
8
|
-
AI-powered YouTube thumbnail generator SaaS. Users create thumbnails via text prompts, reference persons, and inspiration images.
|
|
9
|
-
|
|
10
|
-
## Tech Stack
|
|
11
|
-
- **Framework**: Next.js 15 with App Router
|
|
12
|
-
- **Language**: TypeScript (strict mode)
|
|
13
|
-
- **Styling**: TailwindCSS v4 + shadcn/ui
|
|
14
|
-
- **Database**: PostgreSQL with Prisma ORM
|
|
15
|
-
- **Auth**: Better Auth with organization support
|
|
16
|
-
- **Email**: React Email with Resend
|
|
17
|
-
- **Payments**: Stripe (subscriptions + credits)
|
|
18
|
-
- **Testing**: Vitest (unit), Playwright (e2e)
|
|
19
|
-
- **Package Manager**: pnpm
|
|
20
|
-
|
|
21
|
-
## Directory Structure
|
|
22
|
-
```
|
|
23
|
-
app/ # Next.js App Router pages
|
|
24
|
-
src/
|
|
25
|
-
├── components/ # UI components (shadcn in ui/, custom in nowts/)
|
|
26
|
-
├── features/ # Feature modules with actions, queries, schemas
|
|
27
|
-
├── lib/ # Utilities and configurations
|
|
28
|
-
├── hooks/ # Custom React hooks
|
|
29
|
-
emails/ # React Email templates
|
|
30
|
-
prisma/ # Database schema and migrations
|
|
31
|
-
e2e/ # End-to-end tests
|
|
32
|
-
__tests__/ # Unit tests
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## Key Features
|
|
36
|
-
- **Editor**: `@/features/editor/` - Main thumbnail generation
|
|
37
|
-
- **Persons**: `@/features/person/` - Reference person management
|
|
38
|
-
- **Credits**: `@/features/credits/` - Usage-based credit system
|
|
39
|
-
- **Forms**: `@/features/form/tanstack-form.tsx` - TanStack Form setup
|
|
40
|
-
|
|
41
|
-
## Commands
|
|
42
|
-
|
|
43
|
-
### Development
|
|
44
|
-
- `pnpm dev` - Start development server with Turbopack
|
|
45
|
-
- `pnpm build` - Build application
|
|
46
|
-
- `pnpm ts` - TypeScript type checking
|
|
47
|
-
- `pnpm lint` - ESLint with auto-fix
|
|
48
|
-
- `pnpm clean` - Lint + type check + format
|
|
49
|
-
|
|
50
|
-
### Testing
|
|
51
|
-
**CRITICAL - Always use CI commands:**
|
|
52
|
-
- `pnpm test:ci` - Unit tests (non-interactive)
|
|
53
|
-
- `pnpm test:e2e:ci` - E2E tests (headless)
|
|
54
|
-
|
|
55
|
-
**NEVER use interactive commands:**
|
|
56
|
-
- ~~`pnpm test`~~ - Interactive mode breaks Claude Code
|
|
57
|
-
- ~~`pnpm test:e2e`~~ - Interactive mode breaks Claude Code
|
|
58
|
-
|
|
59
|
-
### Database
|
|
60
|
-
- `pnpm prisma:seed` - Seed database
|
|
61
|
-
- `pnpm better-auth:migrate` - Generate auth schema
|
|
62
|
-
|
|
63
|
-
## Code Conventions
|
|
64
|
-
|
|
65
|
-
### TypeScript
|
|
66
|
-
- Use `type` over `interface` (enforced by ESLint)
|
|
67
|
-
- No enums - use maps instead
|
|
68
|
-
- Strict mode - no `any` types
|
|
69
|
-
- Prefer `??` over `||`
|
|
70
|
-
|
|
71
|
-
### React/Next.js
|
|
72
|
-
- Prefer Server Components over Client Components
|
|
73
|
-
- Use `"use client"` only for Web API access
|
|
74
|
-
- Wrap client components in `Suspense` with fallback
|
|
75
|
-
- **ALWAYS** use `PageProps<"/route/path">` for page components
|
|
76
|
-
|
|
77
|
-
### Forms
|
|
78
|
-
**CRITICAL - Use TanStack Form for ALL forms:**
|
|
79
|
-
|
|
80
|
-
```tsx
|
|
81
|
-
import { Form, useForm } from "@/features/form/tanstack-form";
|
|
82
|
-
|
|
83
|
-
const form = useForm({
|
|
84
|
-
schema: MySchema,
|
|
85
|
-
defaultValues: { field: "" },
|
|
86
|
-
onSubmit: async (values) => { /* handle */ },
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
return (
|
|
90
|
-
<Form form={form}>
|
|
91
|
-
<form.AppField name="field">
|
|
92
|
-
{(field) => (
|
|
93
|
-
<field.Field>
|
|
94
|
-
<field.Label>Label</field.Label>
|
|
95
|
-
<field.Content>
|
|
96
|
-
<field.Input placeholder="..." />
|
|
97
|
-
<field.Message />
|
|
98
|
-
</field.Content>
|
|
99
|
-
</field.Field>
|
|
100
|
-
)}
|
|
101
|
-
</form.AppField>
|
|
102
|
-
<form.SubmitButton>Submit</form.SubmitButton>
|
|
103
|
-
</Form>
|
|
104
|
-
);
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
**NEVER use React Hook Form directly.**
|
|
108
|
-
|
|
109
|
-
### Server Actions
|
|
110
|
-
- Suffix files with `.action.ts`
|
|
111
|
-
- Use `@src/lib/actions/safe-actions.ts` for all actions
|
|
112
|
-
- Use `resolveActionResult` helper for mutations
|
|
113
|
-
|
|
114
|
-
### API Routes
|
|
115
|
-
- All routes in `/app/api` MUST use `@src/lib/zod-route.ts`
|
|
116
|
-
- All HTTP requests MUST use `@src/lib/up-fetch.ts` (never raw `fetch`)
|
|
117
|
-
|
|
118
|
-
### Authentication
|
|
119
|
-
- Server: `getUser()` (optional) or `getRequiredUser()` (required)
|
|
120
|
-
- Client: `useSession()` from auth-client.ts
|
|
121
|
-
- Organization: `getCurrentOrgCache()`
|
|
122
|
-
|
|
123
|
-
## Styling Preferences
|
|
124
|
-
- Use typography components from `@src/components/ui/typography.tsx`
|
|
125
|
-
- Prefer `flex flex-col gap-4` over `space-y-4`
|
|
126
|
-
- Use Card component from `@src/components/ui/card.tsx`
|
|
127
|
-
- Never use emojis (prefer Lucide icons)
|
|
128
|
-
- Never use gradients unless explicitly requested
|
|
129
|
-
|
|
130
|
-
## TypeScript Imports
|
|
131
|
-
- `@/*` → `@src`
|
|
132
|
-
- `@email/*` → `@emails`
|
|
133
|
-
- `@app/*` → `@app`
|
|
134
|
-
|
|
135
|
-
## Workflow
|
|
136
|
-
|
|
137
|
-
### Before Editing Files
|
|
138
|
-
🚨 **CRITICAL** 🚨
|
|
139
|
-
**Read at least 3 files** before editing:
|
|
140
|
-
1. Similar files (understand patterns)
|
|
141
|
-
2. Imported dependencies (understand APIs)
|
|
142
|
-
|
|
143
|
-
### Debugging
|
|
144
|
-
- Add logs at each step
|
|
145
|
-
- Ask user to send logs for debugging
|
|
146
|
-
|
|
147
|
-
## Important Files
|
|
148
|
-
- `src/lib/auth.ts` - Auth configuration
|
|
149
|
-
- `src/features/dialog-manager/` - Global dialog system
|
|
150
|
-
- `src/features/form/tanstack-form.tsx` - Form setup (**CRITICAL**)
|
|
151
|
-
- `src/lib/actions/safe-actions.ts` - Server action utilities
|
|
152
|
-
- `src/lib/zod-route.ts` - API route utilities
|
|
153
|
-
- `src/site-config.ts` - Site configuration
|
|
154
|
-
|
|
155
|
-
## Database
|
|
156
|
-
- Main schema: `prisma/schema/schema.prisma`
|
|
157
|
-
- Auth schema: `prisma/schema/better-auth.prisma` (auto-generated)
|
|
158
|
-
- All queries must include `tenant_id` for multi-tenant support
|
|
159
|
-
```
|
|
160
|
-
</comprehensive_example>
|
|
161
|
-
|
|
162
|
-
<usage_notes>
|
|
163
|
-
This example demonstrates:
|
|
164
|
-
|
|
165
|
-
- Clear tech stack documentation
|
|
166
|
-
- Directory structure visualization
|
|
167
|
-
- Critical command distinctions (CI vs interactive)
|
|
168
|
-
- Specific code patterns with examples
|
|
169
|
-
- Emphasis on critical rules
|
|
170
|
-
- File location references
|
|
171
|
-
- Workflow requirements
|
|
172
|
-
- Import path conventions
|
|
173
|
-
|
|
174
|
-
Adapt sections to match your project's actual structure and conventions.
|
|
175
|
-
</usage_notes>
|