@uniswap/ai-toolkit-nx-claude 0.5.29 → 0.5.30-next.1
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/dist/cli-generator.cjs +28 -59
- package/dist/packages/ai-toolkit-nx-claude/src/cli-generator.d.ts +8 -10
- package/dist/packages/ai-toolkit-nx-claude/src/cli-generator.d.ts.map +1 -1
- package/dist/packages/ai-toolkit-nx-claude/src/index.d.ts +0 -1
- package/dist/packages/ai-toolkit-nx-claude/src/index.d.ts.map +1 -1
- package/generators.json +0 -15
- package/package.json +4 -35
- package/dist/content/agents/agnostic/CLAUDE.md +0 -282
- package/dist/content/agents/agnostic/agent-capability-analyst.md +0 -575
- package/dist/content/agents/agnostic/agent-optimizer.md +0 -396
- package/dist/content/agents/agnostic/agent-orchestrator.md +0 -475
- package/dist/content/agents/agnostic/cicd-agent.md +0 -301
- package/dist/content/agents/agnostic/claude-agent-discovery.md +0 -304
- package/dist/content/agents/agnostic/claude-docs-fact-checker.md +0 -435
- package/dist/content/agents/agnostic/claude-docs-initializer.md +0 -782
- package/dist/content/agents/agnostic/claude-docs-manager.md +0 -595
- package/dist/content/agents/agnostic/code-explainer.md +0 -269
- package/dist/content/agents/agnostic/code-generator.md +0 -785
- package/dist/content/agents/agnostic/commit-message-generator.md +0 -101
- package/dist/content/agents/agnostic/context-loader.md +0 -432
- package/dist/content/agents/agnostic/debug-assistant.md +0 -321
- package/dist/content/agents/agnostic/doc-writer.md +0 -536
- package/dist/content/agents/agnostic/feedback-collector.md +0 -165
- package/dist/content/agents/agnostic/infrastructure-agent.md +0 -406
- package/dist/content/agents/agnostic/migration-assistant.md +0 -489
- package/dist/content/agents/agnostic/pattern-learner.md +0 -481
- package/dist/content/agents/agnostic/performance-analyzer.md +0 -528
- package/dist/content/agents/agnostic/plan-reviewer.md +0 -173
- package/dist/content/agents/agnostic/planner.md +0 -235
- package/dist/content/agents/agnostic/pr-creator.md +0 -498
- package/dist/content/agents/agnostic/pr-reviewer.md +0 -142
- package/dist/content/agents/agnostic/prompt-engineer.md +0 -541
- package/dist/content/agents/agnostic/refactorer.md +0 -311
- package/dist/content/agents/agnostic/researcher.md +0 -349
- package/dist/content/agents/agnostic/security-analyzer.md +0 -1087
- package/dist/content/agents/agnostic/stack-splitter.md +0 -642
- package/dist/content/agents/agnostic/style-enforcer.md +0 -568
- package/dist/content/agents/agnostic/test-runner.md +0 -481
- package/dist/content/agents/agnostic/test-writer.md +0 -292
- package/dist/content/commands/agnostic/CLAUDE.md +0 -207
- package/dist/content/commands/agnostic/address-pr-issues.md +0 -205
- package/dist/content/commands/agnostic/auto-spec.md +0 -386
- package/dist/content/commands/agnostic/claude-docs.md +0 -409
- package/dist/content/commands/agnostic/claude-init-plus.md +0 -439
- package/dist/content/commands/agnostic/create-pr.md +0 -79
- package/dist/content/commands/agnostic/daily-standup.md +0 -185
- package/dist/content/commands/agnostic/deploy.md +0 -441
- package/dist/content/commands/agnostic/execute-plan.md +0 -167
- package/dist/content/commands/agnostic/explain-file.md +0 -303
- package/dist/content/commands/agnostic/explore.md +0 -82
- package/dist/content/commands/agnostic/fix-bug.md +0 -273
- package/dist/content/commands/agnostic/gen-tests.md +0 -185
- package/dist/content/commands/agnostic/generate-commit-message.md +0 -92
- package/dist/content/commands/agnostic/git-worktree-orchestrator.md +0 -647
- package/dist/content/commands/agnostic/implement-spec.md +0 -270
- package/dist/content/commands/agnostic/monitor.md +0 -581
- package/dist/content/commands/agnostic/perf-analyze.md +0 -214
- package/dist/content/commands/agnostic/plan.md +0 -453
- package/dist/content/commands/agnostic/refactor.md +0 -315
- package/dist/content/commands/agnostic/refine-linear-task.md +0 -575
- package/dist/content/commands/agnostic/research.md +0 -49
- package/dist/content/commands/agnostic/review-code.md +0 -321
- package/dist/content/commands/agnostic/review-plan.md +0 -109
- package/dist/content/commands/agnostic/review-pr.md +0 -393
- package/dist/content/commands/agnostic/split-stack.md +0 -705
- package/dist/content/commands/agnostic/update-claude-md.md +0 -401
- package/dist/content/commands/agnostic/work-through-pr-comments.md +0 -873
- package/dist/generators/add-agent/CLAUDE.md +0 -130
- package/dist/generators/add-agent/files/__name__.md.template +0 -37
- package/dist/generators/add-agent/generator.cjs +0 -640
- package/dist/generators/add-agent/schema.json +0 -59
- package/dist/generators/add-command/CLAUDE.md +0 -131
- package/dist/generators/add-command/files/__name__.md.template +0 -46
- package/dist/generators/add-command/generator.cjs +0 -643
- package/dist/generators/add-command/schema.json +0 -50
- package/dist/generators/files/src/index.ts.template +0 -1
- package/dist/generators/init/CLAUDE.md +0 -520
- package/dist/generators/init/generator.cjs +0 -3304
- package/dist/generators/init/schema.json +0 -180
- package/dist/packages/ai-toolkit-nx-claude/src/generators/add-agent/generator.d.ts +0 -5
- package/dist/packages/ai-toolkit-nx-claude/src/generators/add-agent/generator.d.ts.map +0 -1
- package/dist/packages/ai-toolkit-nx-claude/src/generators/add-command/generator.d.ts +0 -5
- package/dist/packages/ai-toolkit-nx-claude/src/generators/add-command/generator.d.ts.map +0 -1
- package/dist/packages/ai-toolkit-nx-claude/src/generators/init/generator.d.ts +0 -5
- package/dist/packages/ai-toolkit-nx-claude/src/generators/init/generator.d.ts.map +0 -1
- package/dist/packages/ai-toolkit-nx-claude/src/utils/auto-update-utils.d.ts +0 -30
- package/dist/packages/ai-toolkit-nx-claude/src/utils/auto-update-utils.d.ts.map +0 -1
|
@@ -1,439 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Initialize or update CLAUDE.md files at all core nodes in the workspace
|
|
3
|
-
argument-hint: (no arguments - scans entire workspace automatically)
|
|
4
|
-
allowed-tools: Glob(*), Read(*), Write(*), Edit(*), Bash(tree:*), Bash(find:*), Bash(git:*)
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# `/claude-init-plus` - Intelligent CLAUDE.md Generation
|
|
8
|
-
|
|
9
|
-
## Purpose
|
|
10
|
-
|
|
11
|
-
Scan the workspace to identify "core nodes" and generate/update CLAUDE.md files at each node. Works with any workspace type: monorepos (Nx, Turborepo, Lerna, npm/yarn/pnpm workspaces), single-repo projects, or any language ecosystem.
|
|
12
|
-
|
|
13
|
-
This creates documentation that helps future Claude Code sessions understand the project without reading every file.
|
|
14
|
-
|
|
15
|
-
## Core Node Definition
|
|
16
|
-
|
|
17
|
-
A directory is a **core node** if it meets **either** criterion:
|
|
18
|
-
|
|
19
|
-
1. **Has a package manifest** → Always a core node
|
|
20
|
-
|
|
21
|
-
- JavaScript/TypeScript: `package.json`
|
|
22
|
-
- Rust: `Cargo.toml`
|
|
23
|
-
- Python: `pyproject.toml`, `setup.py`
|
|
24
|
-
- Go: `go.mod`
|
|
25
|
-
- Java: `pom.xml`, `build.gradle`, `build.gradle.kts`
|
|
26
|
-
- Swift: `Package.swift`
|
|
27
|
-
- Ruby: `Gemfile`, `.gemspec`
|
|
28
|
-
- PHP: `composer.json`
|
|
29
|
-
|
|
30
|
-
2. **Is a working directory**:
|
|
31
|
-
- Contains ONLY files (no subdirectories), OR
|
|
32
|
-
- Contains files + subdirectories where ALL subdirectories contain ONLY files (max 1 nesting level)
|
|
33
|
-
|
|
34
|
-
**Examples:**
|
|
35
|
-
|
|
36
|
-
- ✅ `apps/web/` (has package.json)
|
|
37
|
-
- ✅ `backend/api/` (has Cargo.toml)
|
|
38
|
-
- ✅ `.github/workflows/` (only files)
|
|
39
|
-
- ✅ `src/components/` (files + shallow subdirs with only files)
|
|
40
|
-
- ❌ `apps/` (container with multi-level dirs)
|
|
41
|
-
- ❌ `.git/` (deep structure)
|
|
42
|
-
- ❌ `node_modules/` (excluded by default)
|
|
43
|
-
|
|
44
|
-
## Usage
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
/claude-init-plus
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
## Execution Flow
|
|
51
|
-
|
|
52
|
-
### Phase 1: Discovery
|
|
53
|
-
|
|
54
|
-
**Step 1: Use Git for Fast Discovery (Preferred)**
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
# Get all files tracked by git (automatically excludes ignored files)
|
|
58
|
-
git ls-files
|
|
59
|
-
|
|
60
|
-
# Find all package manifests
|
|
61
|
-
git ls-files | grep -E '(package\.json|Cargo\.toml|pyproject\.toml|setup\.py|go\.mod|pom\.xml|build\.gradle|Package\.swift|Gemfile|.*\.gemspec|composer\.json)$'
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
**Fallback: Use find if not a git repo**
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
find . -type f \
|
|
68
|
-
-not -path '*/node_modules/*' \
|
|
69
|
-
-not -path '*/.git/*' \
|
|
70
|
-
-not -path '*/dist/*' \
|
|
71
|
-
-not -path '*/build/*' \
|
|
72
|
-
-not -path '*/.nx/*' \
|
|
73
|
-
-not -path '*/.cache/*' \
|
|
74
|
-
-not -path '*/target/*' \
|
|
75
|
-
-not -path '*/__pycache__/*' \
|
|
76
|
-
-not -path '*/venv/*' \
|
|
77
|
-
-not -path '*/.venv/*'
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
**Step 2: Identify Core Nodes Using BFS**
|
|
81
|
-
|
|
82
|
-
Traverse workspace using BFS (breadth-first search):
|
|
83
|
-
|
|
84
|
-
```
|
|
85
|
-
For each directory:
|
|
86
|
-
1. Check exclusion list (skip if matches)
|
|
87
|
-
2. Apply core node detection:
|
|
88
|
-
|
|
89
|
-
RULE 1 (HIGHEST PRIORITY): Check for package manifest
|
|
90
|
-
if [ -f "$dir/package.json" ]; then
|
|
91
|
-
→ Mark as Core Node (Package: npm-package, JavaScript/TypeScript)
|
|
92
|
-
→ Read manifest for name, scripts, dependencies
|
|
93
|
-
→ Skip to next directory
|
|
94
|
-
elif [ -f "$dir/Cargo.toml" ]; then
|
|
95
|
-
→ Mark as Core Node (Package: cargo-package, Rust)
|
|
96
|
-
→ Read manifest for name, dependencies
|
|
97
|
-
→ Skip to next directory
|
|
98
|
-
elif [ -f "$dir/pyproject.toml" ]; then
|
|
99
|
-
→ Mark as Core Node (Package: python-package, Python)
|
|
100
|
-
→ Read manifest for name, scripts, dependencies
|
|
101
|
-
→ Skip to next directory
|
|
102
|
-
elif [ -f "$dir/setup.py" ]; then
|
|
103
|
-
→ Mark as Core Node (Package: python-package, Python)
|
|
104
|
-
→ Read setup.py for basic info
|
|
105
|
-
→ Skip to next directory
|
|
106
|
-
elif [ -f "$dir/go.mod" ]; then
|
|
107
|
-
→ Mark as Core Node (Package: go-module, Go)
|
|
108
|
-
→ Read go.mod for module name
|
|
109
|
-
→ Skip to next directory
|
|
110
|
-
elif [ -f "$dir/pom.xml" ]; then
|
|
111
|
-
→ Mark as Core Node (Package: maven-project, Java)
|
|
112
|
-
→ Read pom.xml for artifactId, groupId
|
|
113
|
-
→ Skip to next directory
|
|
114
|
-
elif [ -f "$dir/build.gradle" ] || [ -f "$dir/build.gradle.kts" ]; then
|
|
115
|
-
→ Mark as Core Node (Package: gradle-project, Java/Kotlin)
|
|
116
|
-
→ Read build.gradle for project info
|
|
117
|
-
→ Skip to next directory
|
|
118
|
-
elif [ -f "$dir/Package.swift" ]; then
|
|
119
|
-
→ Mark as Core Node (Package: swift-package, Swift)
|
|
120
|
-
→ Read Package.swift for package name
|
|
121
|
-
→ Skip to next directory
|
|
122
|
-
elif [ -f "$dir/Gemfile" ] || [ -f "$dir"/*.gemspec ]; then
|
|
123
|
-
→ Mark as Core Node (Package: ruby-gem, Ruby)
|
|
124
|
-
→ Read Gemfile or .gemspec for gem info
|
|
125
|
-
→ Skip to next directory
|
|
126
|
-
elif [ -f "$dir/composer.json" ]; then
|
|
127
|
-
→ Mark as Core Node (Package: composer-package, PHP)
|
|
128
|
-
→ Read composer.json for name, scripts
|
|
129
|
-
→ Skip to next directory
|
|
130
|
-
fi
|
|
131
|
-
|
|
132
|
-
RULE 2: Check if working directory
|
|
133
|
-
files=( "$dir"/* ) # Get all files
|
|
134
|
-
subdirs=( "$dir"/*/ ) # Get all subdirectories
|
|
135
|
-
|
|
136
|
-
# Case A: Only files, no subdirectories
|
|
137
|
-
if [ ${#subdirs[@]} -eq 0 ] && [ ${#files[@]} -gt 0 ]; then
|
|
138
|
-
→ Mark as Core Node (Working Directory - Leaf)
|
|
139
|
-
→ Record type: "working-dir-leaf"
|
|
140
|
-
fi
|
|
141
|
-
|
|
142
|
-
# Case B: Files + shallow subdirectories (1 level max)
|
|
143
|
-
if [ ${#files[@]} -gt 0 ] && [ ${#subdirs[@]} -gt 0 ]; then
|
|
144
|
-
all_subdirs_are_leaves=true
|
|
145
|
-
for subdir in "${subdirs[@]}"; do
|
|
146
|
-
if find "$subdir" -mindepth 1 -type d | grep -q .; then
|
|
147
|
-
all_subdirs_are_leaves=false
|
|
148
|
-
break
|
|
149
|
-
fi
|
|
150
|
-
done
|
|
151
|
-
|
|
152
|
-
if [ "$all_subdirs_are_leaves" = true ]; then
|
|
153
|
-
→ Mark as Core Node (Working Directory - 1-Level)
|
|
154
|
-
→ Record type: "working-dir-nested"
|
|
155
|
-
fi
|
|
156
|
-
fi
|
|
157
|
-
|
|
158
|
-
3. If not a core node, continue traversing into subdirectories
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
**Exclusion List:**
|
|
162
|
-
`.git`, `node_modules`, `.nx`, `.expo`, `dist`, `build`, `.next`, `.vercel`, `.yarn`, `coverage`, `.turbo`, `.cache`, `logs`, `target`, `__pycache__`, `venv`, `.venv`
|
|
163
|
-
|
|
164
|
-
**Step 3: Categorize Core Nodes**
|
|
165
|
-
|
|
166
|
-
Group core nodes by:
|
|
167
|
-
|
|
168
|
-
- **Type**: Package vs. Working Directory
|
|
169
|
-
- **Language**: JavaScript/TypeScript, Rust, Python, Go, Java, Swift, Ruby, PHP, Other
|
|
170
|
-
- **Purpose**: Inferred from path and manifest (app, library, tooling, workflow, etc.)
|
|
171
|
-
|
|
172
|
-
### Phase 2: User Confirmation
|
|
173
|
-
|
|
174
|
-
**REQUIRED: Get user confirmation before any file creation/modification**
|
|
175
|
-
|
|
176
|
-
Present summary:
|
|
177
|
-
|
|
178
|
-
```
|
|
179
|
-
Found {count} core nodes:
|
|
180
|
-
|
|
181
|
-
Packages ({count}):
|
|
182
|
-
JavaScript/TypeScript: {count} ({list paths})
|
|
183
|
-
Rust: {count} ({list paths})
|
|
184
|
-
Python: {count} ({list paths})
|
|
185
|
-
Go: {count} ({list paths})
|
|
186
|
-
Java: {count} ({list paths})
|
|
187
|
-
Other: {count} ({list paths})
|
|
188
|
-
|
|
189
|
-
Working Directories ({count}):
|
|
190
|
-
{list paths}
|
|
191
|
-
|
|
192
|
-
Actions needed:
|
|
193
|
-
- Create new CLAUDE.md: {count} files
|
|
194
|
-
- Update existing CLAUDE.md: {count} files
|
|
195
|
-
- Already up-to-date: {count} files
|
|
196
|
-
|
|
197
|
-
Proceed with generation/updates? (y/n/review)
|
|
198
|
-
y = Apply all
|
|
199
|
-
n = Cancel
|
|
200
|
-
review = Show what will be created/updated for each file
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
If user selects "review", show details for each file and allow selective skipping.
|
|
204
|
-
|
|
205
|
-
### Phase 3: Generation
|
|
206
|
-
|
|
207
|
-
## ⚠️ CRITICAL PRESERVATION RULES
|
|
208
|
-
|
|
209
|
-
**THESE RULES MUST BE FOLLOWED - VIOLATIONS CAUSE DATA LOSS**
|
|
210
|
-
|
|
211
|
-
### Never Modify (Tier 1: Absolute Protection)
|
|
212
|
-
|
|
213
|
-
1. User-written sections (not from templates)
|
|
214
|
-
2. Custom section headings (e.g., "## Our Team's Conventions")
|
|
215
|
-
3. Personal notes, warnings, tips added by users
|
|
216
|
-
4. Code examples written by users
|
|
217
|
-
5. First-person language ("I", "we", "our approach")
|
|
218
|
-
|
|
219
|
-
### Modify with Caution (Tier 2: Surgical Updates Only)
|
|
220
|
-
|
|
221
|
-
1. Command lists (ADD only, never REMOVE without confirmation)
|
|
222
|
-
2. Dependency lists (ADD/REMOVE based on manifest changes)
|
|
223
|
-
3. File structure listings (ADD new files/dirs only)
|
|
224
|
-
|
|
225
|
-
**Update Method for Tier 2:**
|
|
226
|
-
|
|
227
|
-
- Use Edit tool with precise old_string/new_string
|
|
228
|
-
- Never rewrite entire sections
|
|
229
|
-
- Preserve formatting (maintain list style, sort order)
|
|
230
|
-
|
|
231
|
-
### Can Regenerate (Tier 3: Auto-Generated)
|
|
232
|
-
|
|
233
|
-
1. Sections marked: `<!-- AUTO-GENERATED - DO NOT EDIT -->`
|
|
234
|
-
2. Content that exactly matches package manifest
|
|
235
|
-
|
|
236
|
-
**Verification (REQUIRED before every update):**
|
|
237
|
-
|
|
238
|
-
- [ ] Is section marked AUTO-GENERATED? (If no → Tier 2 rules)
|
|
239
|
-
- [ ] Will change remove existing text? (If yes → flag for review)
|
|
240
|
-
- [ ] Using Edit tool with specific old_string? (If no → STOP)
|
|
241
|
-
- [ ] Preserving formatting? (If no → adjust)
|
|
242
|
-
|
|
243
|
-
**If ANY checklist item fails → DO NOT auto-apply → Show user for confirmation**
|
|
244
|
-
|
|
245
|
-
## Length Constraints
|
|
246
|
-
|
|
247
|
-
**CRITICAL: All generated CLAUDE.md files MUST be concise and focused.**
|
|
248
|
-
|
|
249
|
-
- **Token Limit**: 500 tokens or less (~2000 characters in English)
|
|
250
|
-
- **Why**: Keeps documentation scannable and focused on essentials
|
|
251
|
-
- **How to achieve**:
|
|
252
|
-
- Use bullet points instead of paragraphs
|
|
253
|
-
- Include only essential commands/dependencies
|
|
254
|
-
- Avoid verbose descriptions (5-10 words max per item)
|
|
255
|
-
- Skip redundant sections
|
|
256
|
-
- Use `[TODO]` placeholders instead of long explanations
|
|
257
|
-
|
|
258
|
-
**Before writing any CLAUDE.md file:**
|
|
259
|
-
|
|
260
|
-
1. Count approximate characters (use `wc -c` or similar)
|
|
261
|
-
2. If >2000 characters, trim non-essential content:
|
|
262
|
-
- Remove optional sections (Structure, etc.)
|
|
263
|
-
- Shorten dependency descriptions
|
|
264
|
-
- Consolidate similar items
|
|
265
|
-
3. Verify final output is ≤2000 characters
|
|
266
|
-
|
|
267
|
-
## Content Template
|
|
268
|
-
|
|
269
|
-
Use this adaptive template for ALL core nodes:
|
|
270
|
-
|
|
271
|
-
```markdown
|
|
272
|
-
# {Directory or Package Name}
|
|
273
|
-
|
|
274
|
-
## Overview
|
|
275
|
-
|
|
276
|
-
{1-2 sentence description of purpose}
|
|
277
|
-
{For packages: "This is a {language} {type} that..."}
|
|
278
|
-
{For working dirs: "This directory contains..."}
|
|
279
|
-
|
|
280
|
-
## {Commands|Scripts|Tasks} (if package manifest exists)
|
|
281
|
-
|
|
282
|
-
{List available commands/scripts/tasks from manifest}
|
|
283
|
-
|
|
284
|
-
{Example formats by manifest type:}
|
|
285
|
-
|
|
286
|
-
- package.json: `npm run {script}` or `nx {target} {project}`
|
|
287
|
-
- Cargo.toml: `cargo {command}` (build, test, run, etc.)
|
|
288
|
-
- pyproject.toml: `poetry run {script}` or `python -m {module}`
|
|
289
|
-
- go.mod: `go {command}` (build, test, run, etc.)
|
|
290
|
-
- pom.xml: `mvn {goal}` (compile, test, package, etc.)
|
|
291
|
-
- build.gradle: `./gradlew {task}` or `gradle {task}`
|
|
292
|
-
- Gemfile: `bundle exec {command}`
|
|
293
|
-
- composer.json: `composer {script}`
|
|
294
|
-
|
|
295
|
-
## {Dependencies|Requirements} (if package manifest exists)
|
|
296
|
-
|
|
297
|
-
<!-- AUTO-GENERATED - Updated by /update-claude-md -->
|
|
298
|
-
|
|
299
|
-
{For each main dependency:}
|
|
300
|
-
|
|
301
|
-
- **{package}** ({version}) - {purpose in 5-10 words or [TODO: Add description]}
|
|
302
|
-
|
|
303
|
-
## Key Files (if working directory without manifest)
|
|
304
|
-
|
|
305
|
-
{For important files:}
|
|
306
|
-
|
|
307
|
-
- `{filename}` - {purpose}
|
|
308
|
-
|
|
309
|
-
## Structure (optional - if >5 subdirectories)
|
|
310
|
-
|
|
311
|
-
{Brief overview of subdirectory organization}
|
|
312
|
-
|
|
313
|
-
## Auto-Update Instructions
|
|
314
|
-
|
|
315
|
-
After changes to files in this directory or subdirectories, run `/update-claude-md`
|
|
316
|
-
to keep this documentation synchronized with the codebase.
|
|
317
|
-
```
|
|
318
|
-
|
|
319
|
-
**Template Variables:**
|
|
320
|
-
|
|
321
|
-
- `{Directory or Package Name}`: Derived from path or manifest name field
|
|
322
|
-
- `{language}`: Detected from manifest type (JavaScript, Rust, Python, etc.)
|
|
323
|
-
- `{type}`: Detected from manifest (package, module, workspace member, etc.)
|
|
324
|
-
- Commands section: Generated based on manifest type
|
|
325
|
-
- Dependencies section: Only for directories with manifests
|
|
326
|
-
|
|
327
|
-
## Implementation Steps
|
|
328
|
-
|
|
329
|
-
**For Each Core Node:**
|
|
330
|
-
|
|
331
|
-
1. **Check if CLAUDE.md exists**
|
|
332
|
-
|
|
333
|
-
```bash
|
|
334
|
-
Read {node-path}/CLAUDE.md
|
|
335
|
-
```
|
|
336
|
-
|
|
337
|
-
2. **If file doesn't exist:**
|
|
338
|
-
|
|
339
|
-
- Select appropriate template
|
|
340
|
-
- Gather information:
|
|
341
|
-
- For packages: Read manifest for name, description, commands, dependencies
|
|
342
|
-
- For working dirs: List files, infer purpose
|
|
343
|
-
- Populate template with gathered info
|
|
344
|
-
- Add dependency descriptions (use standard descriptions for common packages, [TODO] for others)
|
|
345
|
-
- **Verify length constraint**: Check character count is ≤2000 characters
|
|
346
|
-
- If too long, trim by:
|
|
347
|
-
- Limiting dependency list to top 5-10 most important
|
|
348
|
-
- Using shorter descriptions (5-10 words max)
|
|
349
|
-
- Removing optional sections
|
|
350
|
-
- Write file using Write tool
|
|
351
|
-
- Report: "✅ Created {path}/CLAUDE.md ({n} chars)"
|
|
352
|
-
|
|
353
|
-
3. **If file exists:**
|
|
354
|
-
|
|
355
|
-
- Read current content
|
|
356
|
-
- Parse into sections
|
|
357
|
-
- Compare with current project state (missing commands, new dependencies, outdated info)
|
|
358
|
-
- If significant gaps found, show user proposed updates
|
|
359
|
-
- If user confirms, apply updates using Edit tool (following preservation rules)
|
|
360
|
-
- Report: "✅ Updated {path}/CLAUDE.md ({n} sections)"
|
|
361
|
-
|
|
362
|
-
4. **If file is up-to-date:**
|
|
363
|
-
- Report: "⏭️ Skipped {path}/CLAUDE.md (up-to-date)"
|
|
364
|
-
|
|
365
|
-
## Success Criteria & Verification
|
|
366
|
-
|
|
367
|
-
**After generation, verify (REQUIRED):**
|
|
368
|
-
|
|
369
|
-
1. **File Validity**
|
|
370
|
-
|
|
371
|
-
```bash
|
|
372
|
-
# Check file was created/updated
|
|
373
|
-
test -f {path}/CLAUDE.md
|
|
374
|
-
|
|
375
|
-
# Check file is not empty
|
|
376
|
-
test -s {path}/CLAUDE.md
|
|
377
|
-
|
|
378
|
-
# Verify contains required sections
|
|
379
|
-
grep -q "## Overview" {path}/CLAUDE.md || grep -q "## Purpose" {path}/CLAUDE.md
|
|
380
|
-
grep -q "## Auto-Update Instructions" {path}/CLAUDE.md
|
|
381
|
-
```
|
|
382
|
-
|
|
383
|
-
2. **Content Quality**
|
|
384
|
-
|
|
385
|
-
- For packages: All commands/scripts/tasks from manifest documented
|
|
386
|
-
- No placeholder text like "[Project Name]" remains
|
|
387
|
-
- All dependency entries have descriptions (even if [TODO])
|
|
388
|
-
- **File size**: Must be ≤2000 characters (verify with `wc -c`)
|
|
389
|
-
- If >2000 characters, file is TOO VERBOSE and must be trimmed
|
|
390
|
-
|
|
391
|
-
3. **Required Sections Present**
|
|
392
|
-
|
|
393
|
-
- Every CLAUDE.md MUST have:
|
|
394
|
-
|
|
395
|
-
- ## Overview (or ## Purpose)
|
|
396
|
-
|
|
397
|
-
- ## Auto-Update Instructions
|
|
398
|
-
|
|
399
|
-
- Packages MUST also have:
|
|
400
|
-
|
|
401
|
-
- ## Commands (or ## Scripts or ## Tasks)
|
|
402
|
-
|
|
403
|
-
- ## Dependencies (or ## Requirements)
|
|
404
|
-
|
|
405
|
-
**Mark as FAILURE if:**
|
|
406
|
-
|
|
407
|
-
- ANY Write/Edit operation failed
|
|
408
|
-
- File size is 0 bytes
|
|
409
|
-
- File size exceeds 2000 characters (too verbose)
|
|
410
|
-
- Required sections missing
|
|
411
|
-
- Cannot parse as valid Markdown
|
|
412
|
-
|
|
413
|
-
## Error Handling
|
|
414
|
-
|
|
415
|
-
**Permission Denied**: Offer to skip, fix permissions (`chmod -R u+rw`), or cancel
|
|
416
|
-
|
|
417
|
-
**Cannot Parse Manifest**: Offer to skip, create without dependency info, or cancel
|
|
418
|
-
|
|
419
|
-
**No Core Nodes Found**: Display info message explaining detection criteria and suggest running on specific subdirectories
|
|
420
|
-
|
|
421
|
-
For all errors: Present clear options, explain consequences, await user decision.
|
|
422
|
-
|
|
423
|
-
## Summary Report Format
|
|
424
|
-
|
|
425
|
-
Generate a markdown report with:
|
|
426
|
-
|
|
427
|
-
- **Summary**: Totals for nodes found, files created/updated/skipped, errors
|
|
428
|
-
- **Packages**: Grouped by language with status (✅/⏭️/❌)
|
|
429
|
-
- **Working Directories**: List with status
|
|
430
|
-
- **Errors & Warnings**: Details for any failures with recommendations
|
|
431
|
-
- **Next Steps**: Checklist for user follow-up actions
|
|
432
|
-
|
|
433
|
-
## Integration with /update-claude-md
|
|
434
|
-
|
|
435
|
-
Every generated CLAUDE.md includes auto-update instructions. This creates a self-maintaining system:
|
|
436
|
-
|
|
437
|
-
1. `/claude-init-plus` creates initial structure
|
|
438
|
-
2. `/update-claude-md` keeps it current as code evolves
|
|
439
|
-
3. Claude Code automatically maintains context
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: create-pr
|
|
3
|
-
description: Create or update a Graphite PR with auto-generated conventional commit messages and comprehensive descriptions based on code diffs.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Workflow Process
|
|
7
|
-
|
|
8
|
-
This workflow uses the pr-creator agent to:
|
|
9
|
-
|
|
10
|
-
1. Analyze diffs between current branch and target branch (default: main)
|
|
11
|
-
2. Generate conventional commit messages if needed
|
|
12
|
-
3. Create informative PR titles following conventional commits format
|
|
13
|
-
4. Write comprehensive PR descriptions
|
|
14
|
-
5. Create new PR or update existing PR using Graphite
|
|
15
|
-
|
|
16
|
-
## Execution Steps
|
|
17
|
-
|
|
18
|
-
1. **pr-creator**: Main orchestrator that will:
|
|
19
|
-
- Analyze `git diff` between current and target branch
|
|
20
|
-
- Detect the type of changes (feat, fix, refactor, etc.)
|
|
21
|
-
- If uncommitted changes exist, ASK THE USER if they would like to create a conventional commit. DO NOT commit changes without User confirmation
|
|
22
|
-
- Create PR title in format: `<type>(<scope>): <description>`
|
|
23
|
-
- Generate detailed PR description with:
|
|
24
|
-
- Summary of changes
|
|
25
|
-
- List of modified files and why
|
|
26
|
-
- Testing information
|
|
27
|
-
- Related issues
|
|
28
|
-
- Use `gt submit` or `gh pr create` to create/update PR
|
|
29
|
-
- Provide PR URL for review
|
|
30
|
-
|
|
31
|
-
## Usage Examples
|
|
32
|
-
|
|
33
|
-
Basic usage (create/update PR against main):
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
/create-pr
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
With custom target branch:
|
|
40
|
-
|
|
41
|
-
```
|
|
42
|
-
/create-pr target: develop
|
|
43
|
-
/create-pr target: staging
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
With specific instructions:
|
|
47
|
-
|
|
48
|
-
```
|
|
49
|
-
/create-pr emphasize performance improvements
|
|
50
|
-
/create-pr mark as breaking change due to API updates
|
|
51
|
-
/create-pr link to issue #123
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
## Conventional Commit Types
|
|
55
|
-
|
|
56
|
-
The agent will automatically detect and use appropriate types:
|
|
57
|
-
|
|
58
|
-
- `feat`: New feature
|
|
59
|
-
- `fix`: Bug fix
|
|
60
|
-
- `docs`: Documentation changes
|
|
61
|
-
- `style`: Formatting changes
|
|
62
|
-
- `refactor`: Code refactoring
|
|
63
|
-
- `perf`: Performance improvements
|
|
64
|
-
- `test`: Test additions/changes
|
|
65
|
-
- `build`: Build system changes
|
|
66
|
-
- `ci`: CI configuration changes
|
|
67
|
-
- `chore`: Maintenance tasks
|
|
68
|
-
|
|
69
|
-
## Options
|
|
70
|
-
|
|
71
|
-
The workflow supports:
|
|
72
|
-
|
|
73
|
-
- Custom target branch (default: main)
|
|
74
|
-
- Breaking change detection and marking
|
|
75
|
-
- Issue linking
|
|
76
|
-
- Stack-aware PR creation with Graphite
|
|
77
|
-
- Updating existing PRs vs creating new ones
|
|
78
|
-
|
|
79
|
-
Target: $ARGUMENTS
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: daily-standup
|
|
3
|
-
description: This provides a daily standup, checking GitHub and Linear over the past day and providing a summary of what you've been working on and what you will continue to work on.
|
|
4
|
-
model: claude-haiku-4-5
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Workflow Process
|
|
8
|
-
|
|
9
|
-
This workflow uses the Linear MCP and GitHub MCP to:
|
|
10
|
-
|
|
11
|
-
1. Fetch all issues assigned to a user (defaults to you)
|
|
12
|
-
2. Filter for incomplete/in-progress issues
|
|
13
|
-
3. Organize them by priority and status
|
|
14
|
-
4. Fetch GitHub activity from the last 24 hours across all repositories in the in the Uniswap GitHub organization
|
|
15
|
-
5. Generate a friendly team update message combining Linear issues and GitHub activity
|
|
16
|
-
|
|
17
|
-
## Execution Steps
|
|
18
|
-
|
|
19
|
-
1. **Parse Arguments**: Extract optional parameters
|
|
20
|
-
|
|
21
|
-
- Linear user: defaults to "me" (authenticated user)
|
|
22
|
-
- GitHub username: must be provided by user (prompt if not specified)
|
|
23
|
-
- Parse from `$ARGUMENTS` for `user:` and `github:` parameters
|
|
24
|
-
|
|
25
|
-
2. **Prompt for GitHub Username** (if not provided):
|
|
26
|
-
|
|
27
|
-
- Check if `github:` parameter was provided in `$ARGUMENTS`
|
|
28
|
-
- If not provided, ask the user: "What is your GitHub username for the Uniswap organization?"
|
|
29
|
-
- Store the response for use in GitHub queries
|
|
30
|
-
|
|
31
|
-
3. **Fetch Linear Issues**: Get all issues assigned to the specified user
|
|
32
|
-
|
|
33
|
-
- Use `mcp__linear__list_issues` with assignee parameter
|
|
34
|
-
- Filter by state (exclude completed/cancelled)
|
|
35
|
-
|
|
36
|
-
4. **Analyze Issues**: Review issue details including:
|
|
37
|
-
|
|
38
|
-
- Title and description
|
|
39
|
-
- Current status (Backlog, Todo, In Progress, etc.)
|
|
40
|
-
- Priority level (Urgent, High, Normal, Low)
|
|
41
|
-
- Project/team association
|
|
42
|
-
- Recent comments or updates
|
|
43
|
-
- Due dates
|
|
44
|
-
|
|
45
|
-
5. **Fetch GitHub Activity** (last 24 hours):
|
|
46
|
-
|
|
47
|
-
- Use GitHub MCP search tools to find activity from the specified user
|
|
48
|
-
- Filter for Uniswap organization repositories only
|
|
49
|
-
- Include:
|
|
50
|
-
- Pull requests created, updated, or reviewed
|
|
51
|
-
- Commits pushed
|
|
52
|
-
- PR comments and reviews
|
|
53
|
-
- Issues opened or commented on
|
|
54
|
-
- Search queries to use:
|
|
55
|
-
- `org:Uniswap author:<username> created:>YYYY-MM-DD` (for PRs/issues)
|
|
56
|
-
- `org:Uniswap commenter:<username> updated:>YYYY-MM-DD` (for comments)
|
|
57
|
-
- `org:Uniswap reviewed-by:<username> updated:>YYYY-MM-DD` (for reviews)
|
|
58
|
-
|
|
59
|
-
6. **Organize by Status**:
|
|
60
|
-
|
|
61
|
-
- **In Progress**: Currently working on
|
|
62
|
-
- **Todo**: Up next
|
|
63
|
-
- **Backlog**: High priority items on deck
|
|
64
|
-
|
|
65
|
-
7. **Generate Update**: Create a concise message covering:
|
|
66
|
-
- What's currently being worked on (Linear issues)
|
|
67
|
-
- GitHub activity in the last 24 hours (PRs, commits, reviews)
|
|
68
|
-
- What's coming up next (Linear issues)
|
|
69
|
-
- Any blockers or help needed
|
|
70
|
-
- Format suitable for Slack/team chat
|
|
71
|
-
|
|
72
|
-
## Usage Examples
|
|
73
|
-
|
|
74
|
-
**Default** (your own tasks - will prompt for GitHub username):
|
|
75
|
-
|
|
76
|
-
```
|
|
77
|
-
/daily-standup
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
**With GitHub username specified**:
|
|
81
|
-
|
|
82
|
-
```
|
|
83
|
-
/daily-standup github:wkoutre
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
**Check another team member's tasks** (specify both Linear user and GitHub username):
|
|
87
|
-
|
|
88
|
-
```
|
|
89
|
-
/daily-standup user:john@example.com github:johndoe
|
|
90
|
-
/daily-standup user:Jane Doe github:janedoe
|
|
91
|
-
/daily-standup user:abc-123-user-id github:jsmith
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
**With additional instructions**:
|
|
95
|
-
|
|
96
|
-
```
|
|
97
|
-
/daily-standup focus on high priority items
|
|
98
|
-
/daily-standup user:john@example.com brief version
|
|
99
|
-
/daily-standup include estimates and blockers
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
## Parameter Format
|
|
103
|
-
|
|
104
|
-
The `user:` parameter (for Linear) should be provided as:
|
|
105
|
-
|
|
106
|
-
- `user:me` - Explicitly specify yourself (default)
|
|
107
|
-
- `user:<email>` - e.g., `user:john@company.com`
|
|
108
|
-
- `user:<name>` - e.g., `user:John Smith`
|
|
109
|
-
- `user:<id>` - e.g., `user:abc-123-def-456`
|
|
110
|
-
|
|
111
|
-
The `github:` parameter (for GitHub) should be provided as:
|
|
112
|
-
|
|
113
|
-
- `github:<username>` - e.g., `github:wkoutre` or `github:johndoe`
|
|
114
|
-
- If omitted, you will be prompted to enter your GitHub username
|
|
115
|
-
|
|
116
|
-
Any text after the parameters will be treated as additional instructions for formatting or focus.
|
|
117
|
-
|
|
118
|
-
## Output Format
|
|
119
|
-
|
|
120
|
-
The generated update will include:
|
|
121
|
-
|
|
122
|
-
**GitHub Activity (Last 24 Hours)**:
|
|
123
|
-
|
|
124
|
-
- PRs opened, updated, or merged
|
|
125
|
-
- Code reviews completed
|
|
126
|
-
- Commits pushed (with repo names)
|
|
127
|
-
- Comments on PRs/issues
|
|
128
|
-
- Links to relevant PRs and commits
|
|
129
|
-
|
|
130
|
-
**Currently Working On** (In Progress):
|
|
131
|
-
|
|
132
|
-
- Issue titles with priority indicators
|
|
133
|
-
- Links to issues
|
|
134
|
-
- Brief context
|
|
135
|
-
|
|
136
|
-
**Up Next** (Todo):
|
|
137
|
-
|
|
138
|
-
- Prioritized list of upcoming work
|
|
139
|
-
- Due dates if relevant
|
|
140
|
-
|
|
141
|
-
**On Deck** (Backlog - High Priority):
|
|
142
|
-
|
|
143
|
-
- Important items queued up
|
|
144
|
-
|
|
145
|
-
**Blockers/Help Needed**:
|
|
146
|
-
|
|
147
|
-
- Issues that may need team support
|
|
148
|
-
- Questions or dependencies
|
|
149
|
-
|
|
150
|
-
**Notes**:
|
|
151
|
-
|
|
152
|
-
- Recent activity or comments
|
|
153
|
-
- Additional context
|
|
154
|
-
|
|
155
|
-
The message will be conversational and ready to paste into Slack or share with your team.
|
|
156
|
-
|
|
157
|
-
## Implementation Details
|
|
158
|
-
|
|
159
|
-
The workflow will:
|
|
160
|
-
|
|
161
|
-
- Parse `$ARGUMENTS` to extract `user:` and `github:` parameters
|
|
162
|
-
- Linear user: default to "me" if not specified
|
|
163
|
-
- GitHub username: if not found in arguments, prompt user with: "What is your GitHub username for the Uniswap organization?"
|
|
164
|
-
- **IMPORTANT**: Always prompt for GitHub username FIRST before fetching any data if it's not provided in arguments
|
|
165
|
-
- Calculate the timestamp for 24 hours ago from current time (format: YYYY-MM-DD)
|
|
166
|
-
- **Fetch GitHub Activity**:
|
|
167
|
-
- Use the provided or prompted GitHub username
|
|
168
|
-
- Use `mcp__github__search_issues` with queries like:
|
|
169
|
-
- `org:Uniswap author:<username> created:>YYYY-MM-DD` (PRs/issues created)
|
|
170
|
-
- `org:Uniswap involves:<username> updated:>YYYY-MM-DD` (all activity including comments, reviews)
|
|
171
|
-
- Get PR details for any PRs found using `mcp__github__get_pull_request`
|
|
172
|
-
- Include PR status (open/merged/closed) and review status
|
|
173
|
-
- **Fetch Linear Issues**:
|
|
174
|
-
- Call Linear MCP with the assignee parameter
|
|
175
|
-
- Prioritize urgent/high priority items
|
|
176
|
-
- Note any issues with recent activity or comments
|
|
177
|
-
- **Combine and Format**:
|
|
178
|
-
- Start with GitHub activity section (most recent work)
|
|
179
|
-
- Follow with Linear issues organized by status
|
|
180
|
-
- Identify potential blockers based on status, priority, and age
|
|
181
|
-
- Suggest what help might be needed from the team
|
|
182
|
-
- Keep the tone professional but conversational
|
|
183
|
-
- Handle cases where no incomplete tasks or GitHub activity exist gracefully
|
|
184
|
-
|
|
185
|
-
Arguments: $ARGUMENTS
|