Skip to content

Commit 40a20eb

Browse files
sonpiazclaude
andcommitted
chore: apply AI Starter Kit — add 4 slash commands, patch CLAUDE.md + settings
- Create /standup, /plan, /review, /techdebt commands (starter kit standard) - Add Self-Improvement Rules and CLAUDE.md Maintenance sections to CLAUDE.md - Patch /session-end with CLAUDE.md review step and 3-line summary output - Add permissions (allow/deny) to .claude/settings.json Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4661cee commit 40a20eb

File tree

7 files changed

+214
-2
lines changed

7 files changed

+214
-2
lines changed

.claude/commands/plan.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Plan an implementation before writing code. Argument: goal description.
2+
3+
1. **Understand the goal:**
4+
- Parse the argument to extract what needs to be built/fixed
5+
- Read CLAUDE.md for architecture rules and constraints
6+
- Check MEMORY.md for relevant context or past decisions
7+
8+
2. **Research the codebase:**
9+
- Search for existing related code (grep/glob)
10+
- Read the files that will be affected
11+
- Check for existing patterns to follow (docs/patterns/)
12+
- Identify dependencies and potential conflicts
13+
14+
3. **Break into steps (max 5):**
15+
- Each step must be a concrete, verifiable action
16+
- Include file paths that will be touched
17+
- Estimate complexity per step:
18+
- **Simple** (5-10 min): single file edit, config change, typo fix
19+
- **Medium** (15-30 min): multi-file edit, new query, component update
20+
- **Large** (30-60 min): new feature, schema change, migration
21+
22+
4. **Present the plan:**
23+
24+
## Plan: [goal]
25+
26+
| # | Step | Files | Complexity |
27+
|---|------|-------|------------|
28+
| 1 | ... | ... | Simple/Medium/Large |
29+
| 2 | ... | ... | Simple/Medium/Large |
30+
31+
**Total estimate:** X-Y min
32+
**Risks:** [any risks or unknowns]
33+
**Architecture rules affected:** [list any CLAUDE.md rules that apply]
34+
35+
5. **Get approval before coding:**
36+
- Ask: "Approve this plan? Or adjust?"
37+
- Do NOT write any code until approved

.claude/commands/review.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
Review code changes for quality and correctness. Argument: file path, PR number, or "staged" for staged changes.
2+
3+
Parse the argument:
4+
- If a file path: review that file
5+
- If a PR number: `gh pr diff <number>`
6+
- If "staged" or empty: `git diff --cached` (or `git diff` if nothing staged)
7+
8+
Review checklist:
9+
10+
1. **Correctness:**
11+
- Does the logic match the intent?
12+
- Edge cases handled?
13+
- Null/undefined safety?
14+
- Are query results validated before use?
15+
16+
2. **Quality:**
17+
- Follows existing patterns in the codebase?
18+
- No duplicated logic (check with grep)?
19+
- File size within limits (components <300 lines, convex <500 lines)?
20+
- No hardcoded values that should be constants?
21+
22+
3. **Safety:**
23+
- No hardcoded secrets or API keys?
24+
- No raw user input in queries (injection risk)?
25+
- No `eval()`, `Function()`, or `dangerouslySetInnerHTML` with user data?
26+
- Convex mutations validate inputs?
27+
28+
4. **EVOX Architecture Rules:**
29+
- Design System V2 tokens used (no raw zinc-*, gray-*, slate-*)?
30+
- Agent identity via string names, not Convex IDs?
31+
- Single source of truth (agentRegistry, messageStatus)?
32+
- New messages → unifiedMessages table?
33+
34+
5. **Maintainability:**
35+
- Would another agent understand this code?
36+
- Dead code removed (no commented-out blocks)?
37+
- Imports clean (no unused)?
38+
39+
6. **Verdict:**
40+
41+
| Category | Status | Issues |
42+
|----------|--------|--------|
43+
| Correctness | PASS/WARN/FAIL | details |
44+
| Quality | PASS/WARN/FAIL | details |
45+
| Safety | PASS/WARN/FAIL | details |
46+
| Architecture | PASS/WARN/FAIL | details |
47+
| Maintainability | PASS/WARN/FAIL | details |
48+
49+
**Issues found:** (list each as `file:line — description`)
50+
**Verdict:** SHIP / FIX REQUIRED / NEEDS DISCUSSION

.claude/commands/session-end.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,24 @@ You are an EVOX agent ending a session. Execute this shutdown sequence:
1616
- Last commit hash
1717
- Any blockers for next session
1818

19-
4. Suggest prompt for next session:
19+
4. Review CLAUDE.md for accuracy:
20+
- Any rules that should be added, changed, or removed?
21+
- Any stale references (file counts, table counts, etc)?
22+
- Propose edits if needed (don't apply without approval)
23+
24+
5. Suggest prompt for next session:
2025
- What should the next session focus on
2126
- Which agents need attention
2227
- Any time-sensitive items
2328

24-
5. Log lessons to Convex if available:
29+
6. Log lessons to Convex if available:
2530
- Post to activity log with session summary
2631

32+
7. Output a 3-line summary:
33+
```
34+
Done: [what was accomplished]
35+
Learned: [key lesson from this session]
36+
Next: [top priority for next session]
37+
```
38+
2739
Do NOT restart agents or clear sessions unless explicitly asked.

.claude/commands/standup.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Run a daily standup report for the EVOX project.
2+
3+
1. Read MEMORY.md for current context:
4+
- `/Users/sonpiaz/.claude/projects/-Users-sonpiaz/memory/MEMORY.md`
5+
6+
2. Check recent git activity:
7+
```bash
8+
cd /Users/sonpiaz/evox && git log --oneline --since="24 hours ago"
9+
```
10+
11+
3. Check agent status:
12+
```bash
13+
for agent in sam leo quinn max nova; do
14+
echo "=== $agent ==="
15+
tmux capture-pane -t evox-work:$agent -p 2>/dev/null | tail -3 || echo "OFFLINE"
16+
done
17+
```
18+
19+
4. Check for open/blocked work:
20+
- Active Linear tickets (In Progress / In Review)
21+
- Any blockers mentioned in MEMORY.md
22+
23+
5. Present status in this format:
24+
25+
**Yesterday:**
26+
- [commits and completed work from git log]
27+
28+
**Today:**
29+
- [next priorities from MEMORY.md "Next Up" section]
30+
31+
**Blockers:**
32+
- [any blockers from MEMORY.md or dead agents]
33+
34+
**Agents:** SAM ✅/❌ | LEO ✅/❌ | QUINN ✅/❌ | MAX ✅/❌ | NOVA ✅/❌
35+
36+
6. Confirm priority for today:
37+
- Ask: "Does this priority order look right, or should we adjust?"

.claude/commands/techdebt.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
Scan the EVOX codebase for technical debt and report findings.
2+
3+
1. **Scan for markers:**
4+
```bash
5+
cd /Users/sonpiaz/evox
6+
echo "=== TODO ===" && grep -rn "TODO" app/ components/ convex/ lib/ --include="*.ts" --include="*.tsx" | grep -v node_modules | grep -v ".next"
7+
echo "=== FIXME ===" && grep -rn "FIXME" app/ components/ convex/ lib/ --include="*.ts" --include="*.tsx" | grep -v node_modules
8+
echo "=== HACK ===" && grep -rn "HACK\|XXX\|WORKAROUND" app/ components/ convex/ lib/ --include="*.ts" --include="*.tsx" | grep -v node_modules
9+
echo "=== DEPRECATED ===" && grep -rn "deprecated\|DEPRECATED" app/ components/ convex/ lib/ --include="*.ts" --include="*.tsx" | grep -v node_modules
10+
```
11+
12+
2. **Check for oversized files:**
13+
```bash
14+
find app/ components/ -name "*.tsx" -exec wc -l {} + | sort -rn | head -15
15+
find convex/ -name "*.ts" -exec wc -l {} + | sort -rn | head -15
16+
```
17+
Flag: components >300 lines, convex >500 lines (per CLAUDE.md Rule 9)
18+
19+
3. **Check for architecture violations:**
20+
- Raw color classes: `grep -rn "zinc-\|slate-\|gray-[1-9]" app/ components/ --include="*.tsx" | head -10`
21+
- Raw _id in UI: `grep -rn "\._id" app/ components/ --include="*.tsx" | grep -v "key=" | head -10`
22+
- Legacy table usage: `grep -rn "agentMessages\|meshMessages" app/ components/ convex/ --include="*.ts" --include="*.tsx" | grep -v schema | grep -v "read-only" | head -10`
23+
24+
4. **Check for dead code:**
25+
- Unused exports: files in components/ not imported anywhere
26+
- V1 compat aliases still in globals.css
27+
28+
5. **Categorize by severity:**
29+
30+
| Severity | Category | File:Line | Description |
31+
|----------|----------|-----------|-------------|
32+
| CRITICAL | ... | ... | Blocks functionality or causes bugs |
33+
| HIGH | ... | ... | Architecture violation or security risk |
34+
| MEDIUM | ... | ... | Code smell or maintainability issue |
35+
| LOW | ... | ... | Nice-to-have cleanup |
36+
37+
6. **Top 3 priorities:**
38+
Recommend the 3 most impactful items to fix first, with estimated effort (Simple/Medium/Large).

.claude/settings.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,24 @@
11
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(npx next build)",
5+
"Bash(git status)",
6+
"Bash(git log*)",
7+
"Bash(git diff*)",
8+
"Bash(git add*)",
9+
"Bash(git push)",
10+
"Bash(npx convex*)",
11+
"Bash(tmux capture-pane*)",
12+
"Bash(tmux list-windows*)"
13+
],
14+
"deny": [
15+
"Bash(rm -rf *)",
16+
"Bash(git push --force*)",
17+
"Bash(git reset --hard*)",
18+
"Bash(git checkout .)",
19+
"Bash(git clean -f*)"
20+
]
21+
},
222
"mcpServers": {
323
"linear": {
424
"type": "url",

CLAUDE.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,24 @@ ADR-001 through ADR-006: [docs/decisions/](docs/decisions/)
124124
2. **Pre-commit** — Grep for secrets before every commit
125125
3. **Review** [docs/LESSONS.md](docs/LESSONS.md) — Learn from past mistakes
126126

127+
## Self-Improvement Rules
128+
129+
1. **After a mistake** — add a lesson to MEMORY.md `Lessons Learned` section immediately
130+
2. **If a pattern repeats 3x** — propose a new Architecture Rule in CLAUDE.md
131+
3. **If a rule is wrong** — fix it in CLAUDE.md, don't silently ignore it
132+
4. **After every session** — run `/session-end` to capture what was learned
133+
5. **Before complex work** — run `/plan` to get approval before writing code
134+
135+
## CLAUDE.md Maintenance
136+
137+
- Keep under 200 lines (currently ~145). Move details to docs/ if growing.
138+
- Update when architecture changes (new rules, removed rules, new patterns)
139+
- Don't duplicate MEMORY.md content — CLAUDE.md = rules, MEMORY.md = state
140+
- Review accuracy during `/session-end` — remove stale rules, update counts
141+
- Any agent can propose edits; CEO (EVOX) approves architecture changes
142+
143+
---
144+
127145
## Session End Protocol
128146

129147
Run `./scripts/restart-agent.sh <agent>` before restarting. Script captures output, collects lessons, logs session. **No other restart method allowed.**

0 commit comments

Comments
 (0)