rex-claude 1.1.7 → 2.0.0

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.
Files changed (57) hide show
  1. package/dist/guards/completion-guard.sh +40 -0
  2. package/dist/guards/dangerous-cmd-guard.sh +50 -0
  3. package/dist/guards/scope-guard.sh +16 -0
  4. package/dist/guards/session-summary.sh +42 -0
  5. package/dist/guards/test-protect-guard.sh +15 -0
  6. package/dist/guards/ui-checklist-guard.sh +44 -0
  7. package/dist/index.js +454 -0
  8. package/dist/init-YMRG5ZXU.js +248 -0
  9. package/dist/optimize-NE47FMOP.js +111 -0
  10. package/package.json +26 -22
  11. package/README.md +0 -163
  12. package/activity/activity.jsonl +0 -443
  13. package/activity/config.lua +0 -3
  14. package/activity/init.lua +0 -49
  15. package/dist/cli.js +0 -504
  16. package/dotfiles/CLAUDE.md +0 -136
  17. package/dotfiles/commands/clean.md +0 -8
  18. package/dotfiles/commands/doc.md +0 -8
  19. package/dotfiles/commands/review.md +0 -15
  20. package/dotfiles/commands/scaffold.md +0 -11
  21. package/dotfiles/commands/test.md +0 -11
  22. package/dotfiles/docs/cloudflare.md +0 -62
  23. package/dotfiles/docs/nextjs.md +0 -79
  24. package/dotfiles/docs/react.md +0 -63
  25. package/dotfiles/docs/tailwind.md +0 -45
  26. package/dotfiles/docs/telegram-bot.md +0 -55
  27. package/dotfiles/rules/api-design.md +0 -63
  28. package/dotfiles/rules/defensive-engineering.md +0 -42
  29. package/dotfiles/rules/docs-first.md +0 -47
  30. package/dotfiles/rules/frontend.md +0 -41
  31. package/dotfiles/rules/git-workflow.md +0 -57
  32. package/dotfiles/rules/never-assume.md +0 -39
  33. package/dotfiles/rules/security.md +0 -46
  34. package/dotfiles/rules/testing.md +0 -33
  35. package/dotfiles/settings.json +0 -80
  36. package/dotfiles/skills/build-validate/SKILL.md +0 -16
  37. package/dotfiles/skills/code-review/SKILL.md +0 -18
  38. package/dotfiles/skills/context-loader/SKILL.md +0 -25
  39. package/dotfiles/skills/debug-assist/SKILL.md +0 -26
  40. package/dotfiles/skills/deploy-checklist/SKILL.md +0 -54
  41. package/dotfiles/skills/dstudio-design-system/SKILL.md +0 -120
  42. package/dotfiles/skills/figma-workflow/SKILL.md +0 -23
  43. package/dotfiles/skills/fix-issue/SKILL.md +0 -43
  44. package/dotfiles/skills/one-shot/SKILL.md +0 -18
  45. package/dotfiles/skills/pr-review-loop/SKILL.md +0 -41
  46. package/dotfiles/skills/project-init/SKILL.md +0 -45
  47. package/dotfiles/skills/research/SKILL.md +0 -17
  48. package/dotfiles/skills/spec-interview/SKILL.md +0 -20
  49. package/dotfiles/skills/token-guard/SKILL.md +0 -26
  50. package/dotfiles/templates/CLAUDE.md.template +0 -39
  51. package/memory/package.json +0 -24
  52. package/memory/src/embed.ts +0 -23
  53. package/memory/src/ingest.ts +0 -257
  54. package/memory/src/search.ts +0 -32
  55. package/memory/src/server.ts +0 -69
  56. package/memory/tsconfig.json +0 -14
  57. package/tmux/.tmux.conf +0 -73
@@ -1,33 +0,0 @@
1
- # Testing Rules
2
-
3
- ## Discipline absolue
4
-
5
- - JAMAIS modifier ou supprimer des tests pour les faire passer — corriger le CODE, pas les tests.
6
- - Un test qui échoue est une information précieuse : comprendre pourquoi avant de toucher quoi que ce soit.
7
-
8
- ## Vérification obligatoire après chaque implémentation
9
-
10
- Avant de déclarer une tâche terminée :
11
-
12
- 1. `npm run build` (ou équivalent) — doit passer avec zéro erreur
13
- 2. Démarrer le dev server — confirmer que l'app charge (au minimum `curl` homepage → 200)
14
- 3. Pour les changements UI : screenshot ou browser automation pour vérifier visuellement
15
- 4. Pour SSR/Next.js : inspecter la console navigateur pour les hydration warnings
16
- 5. Si une suite de tests existe : la lancer (`npm test`, `pytest`, etc.)
17
-
18
- ## Types de tests
19
-
20
- - **Tests unitaires** : couvrir la logique métier (calculs, transformations, validations)
21
- - **Tests d'intégration** : couvrir les endpoints API end-to-end
22
- - **Tests E2E** : réserver aux parcours critiques (login, checkout, actions irréversibles)
23
-
24
- ## Mocking
25
-
26
- - Mocker les dépendances externes (APIs tierces, base de données, services email)
27
- - Ne jamais mocker la logique interne qu'on est en train de tester
28
- - Utiliser des fixtures réalistes, pas des données trop simplifiées
29
-
30
- ## Root cause
31
-
32
- - Corriger les causes racines, jamais les symptômes.
33
- - Ne jamais supprimer un log d'erreur pour "nettoyer" — comprendre d'abord ce qu'il signifie.
@@ -1,80 +0,0 @@
1
- {
2
- "$schema": "https://json.schemastore.org/claude-code-settings.json",
3
- "env": {
4
- "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1",
5
- "CLAUDE_AUTOCOMPACT_PCT_OVERRIDE": "75",
6
- "CLAUDE_CODE_MAX_OUTPUT_TOKENS": "64000"
7
- },
8
- "hooks": {
9
- "UserPromptSubmit": [
10
- {
11
- "hooks": [
12
- {
13
- "type": "command",
14
- "command": "MARKER=\"/tmp/.rex-boot-$PPID\"; if [ ! -f \"$MARKER\" ]; then touch \"$MARKER\"; echo \"[REX BOOT] Nouvelle session détectée. Tu DOIS invoquer le skill rex-boot maintenant, avant de répondre au message de l'utilisateur.\"; fi",
15
- "timeout": 3
16
- }
17
- ]
18
- }
19
- ],
20
- "PreToolUse": [
21
- {
22
- "matcher": "Write|Edit",
23
- "hooks": [
24
- {
25
- "type": "command",
26
- "command": "file=$(echo \"$CLAUDE_TOOL_INPUT\" | jq -r '.file_path // empty'); case \"$file\" in *.env*|*secrets/*|*.key|*.pem) echo 'BLOCKED: writes to secrets files not allowed' >&2; exit 2 ;; esac"
27
- }
28
- ]
29
- }
30
- ],
31
- "Stop": [
32
- {
33
- "hooks": [
34
- {
35
- "type": "command",
36
- "command": "afplay /System/Library/Sounds/Glass.aiff &",
37
- "timeout": 5
38
- }
39
- ]
40
- }
41
- ]
42
- },
43
- "attribution": {
44
- "commit": "",
45
- "pr": ""
46
- },
47
- "showTurnDuration": true,
48
- "statusLine": {
49
- "type": "command",
50
- "command": "bash /Users/keiy/.claude/statusline.sh"
51
- },
52
- "enabledPlugins": {
53
- "ralph-loop@claude-plugins-official": false,
54
- "playwright@claude-plugins-official": true,
55
- "frontend-design@claude-plugins-official": true,
56
- "vercel@claude-plugins-official": false,
57
- "figma-to-code@claude-plugins-official": true,
58
- "superpowers@superpowers-marketplace": true,
59
- "static-analysis@trailofbits": true,
60
- "semgrep-rule-creator@trailofbits": true,
61
- "audit-context-building@trailofbits": true,
62
- "insecure-defaults@trailofbits": true
63
- },
64
- "extraKnownMarketplaces": {
65
- "superpowers-marketplace": {
66
- "source": {
67
- "source": "github",
68
- "repo": "obra/superpowers-marketplace"
69
- }
70
- },
71
- "trailofbits": {
72
- "source": {
73
- "source": "github",
74
- "repo": "trailofbits/skills"
75
- }
76
- }
77
- },
78
- "skipDangerousModePermissionPrompt": true,
79
- "effortLevel": "low"
80
- }
@@ -1,16 +0,0 @@
1
- ---
2
- name: build-validate
3
- description: Verify code changes compile, pass tests, and work correctly. Runs build, lint, tests, dev server checks. Reports without modifying code.
4
- ---
5
-
6
- # Build Validation
7
-
8
- Verify the current project state:
9
-
10
- 1. Run build command (`npm run build` or equivalent)
11
- 2. Run linter if configured
12
- 3. Run test suite if exists
13
- 4. Start dev server, verify it loads (curl for 200)
14
- 5. For UI changes, take a screenshot
15
-
16
- Report each step as PASS/FAIL with details. NEVER modify code — only report.
@@ -1,18 +0,0 @@
1
- ---
2
- name: code-review
3
- description: Thorough code review of staged/changed files. Checks logic errors, security, performance, missing states, TypeScript strictness.
4
- ---
5
-
6
- # Code Review
7
-
8
- Review all changed files (`git diff`):
9
-
10
- 1. Logic errors and edge cases
11
- 2. Security vulnerabilities (OWASP top 10)
12
- 3. Performance (N+1 queries, unbounded loops, missing indexes)
13
- 4. Missing error handling, loading/empty/error states
14
- 5. TypeScript strictness (no `any`, no `@ts-ignore` without justification)
15
- 6. Consistency with existing codebase patterns
16
-
17
- Rate findings: **critical** / **warning** / **suggestion**. Provide fix snippets.
18
- Never suggest modifying tests to pass. Focus bugs > security > style.
@@ -1,25 +0,0 @@
1
- ---
2
- name: context-loader
3
- description: Load relevant documentation and project context before starting work. Reads local docs cache, project CLAUDE.md, and REX memory. Use at session start or project switch.
4
- ---
5
-
6
- # Context Loader
7
-
8
- Load context for: $ARGUMENTS (project path or framework name)
9
-
10
- ## If project path given:
11
- 1. Read project's `CLAUDE.md` if exists
12
- 2. Read `package.json` / `composer.json` / `pubspec.yaml` to detect stack
13
- 3. Call `rex_context(project_path)` for past session insights
14
- 4. For each framework detected, read `~/.claude/docs/{framework}.md` if exists
15
- 5. Report: stack detected, relevant docs loaded, past context found
16
-
17
- ## If framework name given:
18
- 1. Check `~/.claude/docs/{framework}.md` — if exists, read it
19
- 2. If not exists, fetch via Context7 and save key patterns to `~/.claude/docs/{framework}.md`
20
- 3. Report: doc loaded/created, key patterns summarized
21
-
22
- ## Rules
23
- - NEVER load docs that aren't relevant to the current task
24
- - Always check local cache before fetching from network
25
- - Keep doc files under 100 lines — patterns and gotchas only, not full API reference
@@ -1,26 +0,0 @@
1
- ---
2
- name: debug-assist
3
- description: Systematic debugging. Reads error, searches REX memory for past solutions, checks docs, identifies root cause. Use when stuck on an error.
4
- ---
5
-
6
- # Debug Assist
7
-
8
- Debug: $ARGUMENTS (paste the error message or describe the issue)
9
-
10
- ## Process
11
- 1. **Parse the error**: extract file, line, error type, stack trace
12
- 2. **Check REX memory**: `rex_search("error message keywords")` for past solutions
13
- 3. **Check local docs**: read `~/.claude/docs/{framework}.md` for known gotchas
14
- 4. **Search codebase**: find the failing code, read surrounding context
15
- 5. **Identify root cause**: not the symptom — what ACTUALLY caused it
16
- 6. **Propose fix**: with code snippet and explanation
17
-
18
- ## Anti-patterns (NEVER do these)
19
- - Never suppress the error without understanding it
20
- - Never delete a test to make it pass
21
- - Never add `@ts-ignore` or `eslint-disable` as a fix
22
- - Never retry the same approach more than twice — try a different angle
23
-
24
- ## After fixing
25
- - Save the pattern to REX: `rex_learn("Error X was caused by Y, fix is Z", "debug")`
26
- - Update `~/.claude/docs/{framework}.md` if it's a framework gotcha
@@ -1,54 +0,0 @@
1
- ---
2
- name: deploy-checklist
3
- description: Pre-deployment checklist. Use when user says "deploy", "push to prod", "push to beta", "ship it", or before any deployment. Runs verification steps before allowing deploy.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Deploy Checklist
8
-
9
- Run this checklist BEFORE any deployment. $ARGUMENTS can specify the target (beta/prod).
10
-
11
- ## Pre-Deploy Verification
12
-
13
- 1. **Check git status**:
14
- - All changes committed? No uncommitted work?
15
- - On the correct branch?
16
- - Branch is up to date with remote?
17
-
18
- 2. **Run tests** (if test suite exists):
19
- ```bash
20
- # Detect and run project tests
21
- # PHP: composer test or vendor/bin/phpunit
22
- # Node/Angular: npm test
23
- # Flutter: flutter test
24
- # Python: pytest
25
- ```
26
-
27
- 3. **Run linter/formatter** (if configured):
28
- ```bash
29
- # Detect and run linter
30
- # PHP: composer lint or vendor/bin/phpcs
31
- # Node: npm run lint
32
- # Flutter: flutter analyze
33
- ```
34
-
35
- 4. **Build check**:
36
- - Run production build to catch compile errors
37
- - Verify build output exists and looks correct
38
-
39
- 5. **Environment check**:
40
- - Verify environment config points to the correct target (beta vs prod)
41
- - NEVER deploy with local/dev config pointing to wrong DB or API
42
- - Check for hardcoded localhost URLs
43
-
44
- 6. **PR status** (if deploying from a PR):
45
- - All CI checks passing?
46
- - Gemini Code Assist review: any critical issues?
47
- - GitHub Copilot review: any critical issues?
48
-
49
- ## Deploy Decision
50
-
51
- - If ANY check fails: STOP and report to user
52
- - If all checks pass: proceed with deploy and confirm target with user
53
-
54
- IMPORTANT: Always ask "beta or prod?" if not specified. Never assume prod.
@@ -1,120 +0,0 @@
1
- ---
2
- name: dstudio-design-system
3
- description: Load the dstudio-ui design system context — tokens, components, patterns, and import guide. Use when building UI with @dstudio/ui components or design tokens.
4
- user-invocable: true
5
- ---
6
-
7
- # dstudio-ui Design System
8
-
9
- You are working with the **@dstudio/ui** design system. Use this reference for all UI implementation.
10
-
11
- ## Architecture
12
-
13
- - **Repo**: `/Users/keiy/Documents/Developer/dstudio-ui`
14
- - **Package**: `@dstudio/ui` — exported from `src/index.ts`
15
- - **Stack**: Next.js 16, Tailwind v4, Framer Motion (`motion/react`), Storybook v8, pnpm
16
- - **`@` alias** maps to `src/` (NOT project root)
17
-
18
- ## Using in Another Project
19
-
20
- ```json
21
- // package.json
22
- "@dstudio/ui": "file:../dstudio-ui"
23
- ```
24
-
25
- Then `pnpm install` and import:
26
-
27
- ```tsx
28
- import { DSButton, MagicCard, KanbanBoard } from "@dstudio/ui"
29
- ```
30
-
31
- The consumer project **must** share the same Tailwind v4 setup with CSS vars from `globals.css`. Tokens are CSS variables, not bundled.
32
-
33
- ## Design Tokens (Style Dictionary v4)
34
-
35
- - **Format**: W3C DTCG `{ "$value": "...", "$type": "color" }`
36
- - **Token files**: `tokens/core/*.json` + `tokens/semantic/colors.json`
37
- - **Build**: `pnpm build:tokens` → `build/css/`, `build/tailwind/`, `build/figma/`, `build/js/`
38
- - **Config**: `sd.config.ts` at repo root
39
-
40
- ### Key Semantic Colors
41
-
42
- | Token | Value | CSS var |
43
- |-------|-------|---------|
44
- | background | #000000 | `--color-background` |
45
- | foreground | #ffffff | `--color-foreground` |
46
- | card | #080808 | `--color-card` |
47
- | primary | #18181b | `--color-primary` |
48
- | secondary | #f4f4f5 | `--color-secondary` |
49
- | muted | #1a1a1a | `--color-muted` |
50
- | border | #e4e4e7 | `--color-border` |
51
- | destructive | #ef4444 | `--color-destructive` |
52
-
53
- ### Using tokens in Tailwind
54
-
55
- ```tsx
56
- // Tokens live in @theme {} block → Tailwind v4 auto-generates utilities
57
- className="bg-background text-foreground border-border"
58
- className="text-gray-400 bg-dark-100"
59
- ```
60
-
61
- ### Adding a new token
62
-
63
- 1. Add to `tokens/core/*.json` or `tokens/semantic/colors.json`
64
- 2. `pnpm build:tokens`
65
- 3. Copy new var into `src/styles/globals.css` inside `@theme {}` block
66
- 4. Commit `build/` directory + `globals.css`
67
-
68
- ## Available Components
69
-
70
- ### D-Studio branded
71
- GradientButton, GlassBadge, SmallButton, MultiLayerCard, SlightSeparator, DSButton, SquaredBadge
72
-
73
- ### Base UI (shadcn-style)
74
- Badge, Button, Card, Input, Accordion, Dialog, Tabs, OrbitingCircles, Skeleton, Textarea, DropdownMenu
75
-
76
- ### Motion
77
- BlurFade, InfiniteSlider, TextEffect, Tilt, GlowEffect, Magnetic, MagicCard, BorderTrail, TextScramble, SpinningText, TextReveal, Cursor
78
-
79
- ### Bits
80
- StarBorder, GradualBlur, StackingCards
81
-
82
- ### PM (Project Management)
83
- StatusBadge, AvatarStack, BoardTable, KanbanBoard, GanttChart, TimelineCalendar, DatePicker, StatusSelector, Notepad, NeonGlow, AnimatedBlob, PrioritySlider
84
-
85
- ### AI
86
- AskAiButton, SuggestionChips
87
-
88
- ### Contact
89
- ContactForm, MultiStateButton
90
-
91
- ### Shared
92
- ScrambleRevealText, ProgressiveScrambleText, AnimatedSection
93
-
94
- ## Key Files
95
-
96
- | File | Purpose |
97
- |------|---------|
98
- | `src/index.ts` | Main package export |
99
- | `sd.config.ts` | Style Dictionary config |
100
- | `tokens/core/colors.json` | Primitive color palette |
101
- | `tokens/semantic/colors.json` | Semantic color aliases |
102
- | `src/styles/globals.css` | `@theme` block (must be inline) |
103
- | `src/app/components/page.tsx` | Components showcase page |
104
- | `src/app/docs/components/component-data.ts` | Docs prop tables |
105
-
106
- ## Gotchas
107
-
108
- - **`@theme {}` must be inline** in `globals.css` — `@import` of a file containing `@theme` breaks Vite/Storybook
109
- - **`build/` directory is committed** (generated token outputs)
110
- - **`Transition` type** import must come from `motion/react`
111
- - **Framer Motion** — use `motion/react` not `framer-motion` for imports
112
- - Nav variants: `floating-nav-landing.tsx` (next-intl), `floating-nav.tsx` (no i18n)
113
-
114
- ## When building UI with this system
115
-
116
- 1. Read the relevant component source in `dstudio-ui/src/` before using it
117
- 2. Follow existing Tailwind v4 patterns (CSS vars, not hardcoded colors)
118
- 3. Use `motion/react` for all animations
119
- 4. Check `src/index.ts` to see what's exported before importing
120
- 5. Run `pnpm build` in the consumer project to verify
@@ -1,23 +0,0 @@
1
- ---
2
- name: figma-workflow
3
- description: Implement UI from Figma designs using get_design_context, mapping to dstudio-ui components and project design tokens. Use when given a Figma URL or node ID.
4
- ---
5
-
6
- # Figma to Code Workflow
7
-
8
- Use this skill when implementing UI from Figma designs.
9
-
10
- ## Process
11
- 1. Call `get_design_context` with the Figma node ID and file key
12
- 2. Review the returned code, screenshot, and metadata
13
- 3. Map to existing dstudio-ui components — NEVER recreate what already exists
14
- 4. Extract design tokens (colors, spacing, typography) and map to project tokens
15
- 5. Adapt the reference code to the project's stack and conventions
16
- 6. Use Code Connect to link Figma components ↔ codebase components
17
-
18
- ## Rules
19
- - Always check dstudio-ui for existing components first
20
- - Use project's design tokens, not raw hex values
21
- - Responsive: mobile-first approach
22
- - Accessibility: proper ARIA labels, semantic HTML
23
- - Loading/empty/error states for dynamic content
@@ -1,43 +0,0 @@
1
- ---
2
- name: fix-issue
3
- description: Fix a GitHub issue end-to-end. Use when user says "/fix-issue 123" or "fix issue #123".
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Fix GitHub Issue
8
-
9
- Analyze and fix the GitHub issue: $ARGUMENTS
10
-
11
- 1. **Get issue details**:
12
- ```bash
13
- gh issue view $ARGUMENTS
14
- ```
15
-
16
- 2. **Understand the problem**:
17
- - Read the issue description, labels, and comments
18
- - Identify the affected area of the codebase
19
- - Search for relevant files using Grep/Glob
20
-
21
- 3. **Create a feature branch**:
22
- ```bash
23
- gh issue view $ARGUMENTS --json title -q .title
24
- # Branch name: fix/issue-NUMBER-short-description
25
- git checkout -b fix/issue-$ARGUMENTS-<short-description>
26
- ```
27
-
28
- 4. **Implement the fix**:
29
- - Read relevant code before modifying
30
- - Follow existing patterns in the codebase
31
- - Make minimal, focused changes
32
-
33
- 5. **Verify the fix**:
34
- - Run tests if they exist
35
- - Run linter if configured
36
- - Build the project to check for errors
37
-
38
- 6. **Commit and create PR**:
39
- - Commit with message referencing the issue: `fix: <description> (closes #$ARGUMENTS)`
40
- - Push branch and create PR linking to the issue
41
- - Wait for Gemini/Copilot reviews
42
-
43
- 7. **Report to user**: show what was changed and ask for review
@@ -1,18 +0,0 @@
1
- ---
2
- name: one-shot
3
- description: Generate a complete production-ready project in one shot. Next.js + Shadcn UI + dstudio-ui. Use for rapid prototyping and SAAS scaffolding.
4
- ---
5
-
6
- # One-Shot Project Generator
7
-
8
- Create a complete project: $ARGUMENTS
9
-
10
- 1. Read `~/.claude/docs/nextjs.md` and `~/.claude/docs/react.md` for current patterns
11
- 2. Load dstudio-ui design system context: `/dstudio-design-system`
12
- 3. Scaffold with: Next.js App Router, TypeScript, Tailwind v4, dstudio-ui components
13
- 4. Include: auth scaffold, API routes with validation, DB schema, loading/empty/error states
14
- 5. Apply all defensive engineering rules (pagination, error handling, rate limits)
15
- 6. Setup: `package.json`, `tsconfig.json`, `.env.example`, `README.md`
16
- 7. Run `npm install && npm run build` to verify
17
-
18
- Output a working project, not a template.
@@ -1,41 +0,0 @@
1
- ---
2
- name: pr-review-loop
3
- description: Automated PR review loop. Use when user says "review loop", "check PR comments", "fix PR feedback", or after creating a PR. Pulls comments from Gemini Code Assist and GitHub Copilot, fixes valid issues, and pushes updates.
4
- ---
5
-
6
- # PR Review Loop
7
-
8
- After a PR is created or when asked to check PR feedback:
9
-
10
- 1. **Pull review comments** from the PR:
11
- ```bash
12
- # Get PR number from current branch
13
- PR_NUMBER=$(gh pr view --json number -q .number 2>/dev/null)
14
-
15
- # Get all review comments (inline code comments)
16
- gh api repos/{owner}/{repo}/pulls/$PR_NUMBER/comments --jq '.[] | "[\(.user.login)] \(.path):\(.line // .original_line) - \(.body)"'
17
-
18
- # Get PR review summaries
19
- gh pr view $PR_NUMBER --comments
20
- ```
21
-
22
- 2. **Categorize each comment**:
23
- - **Valid fix needed**: bug, security issue, logic error, missing edge case
24
- - **Good suggestion**: improvement worth making (cleaner code, better naming)
25
- - **Dismiss**: style preference, false positive, or not applicable
26
-
27
- 3. **Fix valid issues**:
28
- - Address each valid comment with a targeted fix
29
- - Run tests/lint after each fix to ensure no regressions
30
- - Do NOT introduce unrelated changes
31
-
32
- 4. **Commit and push fixes**:
33
- - One commit for all review fixes: `fix: address PR review feedback`
34
- - Push to the same branch (the PR updates automatically)
35
-
36
- 5. **Report to user**:
37
- - List what was fixed and why
38
- - List what was dismissed and why
39
- - Ask user to review the diff between v1 and v2
40
-
41
- IMPORTANT: Never force-push. Always regular push. The user reviews the incremental diff.
@@ -1,45 +0,0 @@
1
- ---
2
- name: project-init
3
- description: Initialize a new project with CLAUDE.md, proper git setup, and documentation cache. Use when starting a new project or onboarding an existing one.
4
- ---
5
-
6
- # Project Init
7
-
8
- Initialize project: $ARGUMENTS (path or name)
9
-
10
- ## For new projects
11
- 1. Create project directory structure
12
- 2. Generate `CLAUDE.md` with project-specific instructions
13
- 3. Detect stack from user input, create appropriate config files
14
- 4. Load relevant docs from `~/.claude/docs/` or fetch via Context7
15
- 5. Git init, create `.gitignore`, initial commit
16
- 6. Save project context: `rex_learn("Project X uses stack Y, structure Z", "architecture")`
17
-
18
- ## For existing projects (onboarding)
19
- 1. Read existing `package.json` / `composer.json` / config files to detect stack
20
- 2. Read existing `CLAUDE.md` if present, or create one
21
- 3. Scan project structure: key directories, entry points, routing
22
- 4. Load relevant framework docs from `~/.claude/docs/`
23
- 5. Call `rex_context(project_path)` for any past work history
24
- 6. Report: stack, structure, key files, any issues noticed
25
-
26
- ## CLAUDE.md template
27
- ```markdown
28
- # Project Name
29
-
30
- ## Stack
31
- - Framework: ...
32
- - Language: ...
33
- - Database: ...
34
-
35
- ## Commands
36
- - Dev: `npm run dev`
37
- - Build: `npm run build`
38
- - Test: `npm test`
39
- - Lint: `npm run lint`
40
-
41
- ## Key Files
42
- - Entry: ...
43
- - Config: ...
44
- - Routes: ...
45
- ```
@@ -1,17 +0,0 @@
1
- ---
2
- name: research
3
- description: Deep research on a topic using web, docs, codebase. Returns concise actionable summary with sources. Use for architecture decisions, library comparisons, debugging.
4
- ---
5
-
6
- # Research
7
-
8
- Research: $ARGUMENTS
9
-
10
- 1. Check `~/.claude/docs/` for local cached documentation first
11
- 2. Search web for documentation, best practices, recent changes
12
- 3. Query Context7 for versioned library docs if relevant
13
- 4. Search codebase for existing patterns and usage
14
- 5. Synthesize into concise summary with recommendations
15
-
16
- Return: key findings, recommended approach, code references, links.
17
- Keep it actionable — the goal is to inform a decision, not write an essay.
@@ -1,20 +0,0 @@
1
- ---
2
- name: spec-interview
3
- description: Interview the user to write a complete feature spec before coding. Use when user says "/spec-interview" or "interview me about" a feature.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Feature Spec Interview
8
-
9
- I want to build: $ARGUMENTS
10
-
11
- Interview me in depth using the AskUserQuestion tool. Cover:
12
- - Technical implementation and architecture choices
13
- - UI/UX and user flows
14
- - Edge cases and failure modes
15
- - Security implications
16
- - Performance at scale (10x users/requests)
17
- - Tradeoffs and alternatives considered
18
-
19
- Don't ask obvious questions. Dig into the hard parts I haven't thought through.
20
- Keep interviewing until we've covered everything, then write a complete spec to `SPEC.md`.
@@ -1,26 +0,0 @@
1
- ---
2
- name: token-guard
3
- description: Optimize context usage. Audit what's loaded, suggest cleanup, compact if needed. Use when context feels bloated or before long sessions.
4
- ---
5
-
6
- # Token Guard
7
-
8
- Audit and optimize the current context usage.
9
-
10
- ## Checks
11
- 1. **Files in context**: list all files that have been read this session
12
- 2. **Redundant reads**: flag files read multiple times
13
- 3. **Large outputs**: flag tool results > 200 lines that could have been scoped
14
- 4. **Stale context**: flag information from early in session that's no longer relevant
15
-
16
- ## Actions
17
- - Suggest `/compact` if context > 70%
18
- - Suggest `/clear` if switching to unrelated task
19
- - Identify docs/files that could be read on-demand instead of upfront
20
- - Flag any MCP server responses that returned excessive data
21
-
22
- ## Reminders
23
- - Use subagents for heavy research (keeps main context clean)
24
- - Use `limit` and `offset` when reading large files
25
- - Use `head_limit` on Grep results
26
- - Prefer Glob/Grep over Agent for simple lookups
@@ -1,39 +0,0 @@
1
- # {{PROJECT_NAME}}
2
-
3
- ## Overview
4
- {{DESCRIPTION}}
5
-
6
- ## Stack
7
- - **Framework**: {{FRAMEWORK}}
8
- - **Language**: {{LANGUAGE}}
9
- - **Deployment**: {{DEPLOYMENT}}
10
-
11
- ## Structure
12
- {{STRUCTURE}}
13
-
14
- ## Development
15
-
16
- ### Setup
17
- ```bash
18
- {{SETUP_COMMANDS}}
19
- ```
20
-
21
- ### Dev Server
22
- ```bash
23
- {{DEV_COMMAND}}
24
- ```
25
-
26
- ### Build
27
- ```bash
28
- {{BUILD_COMMAND}}
29
- ```
30
-
31
- ## Key Files
32
- - {{KEY_FILES}}
33
-
34
- ## Conventions
35
- - Follow existing patterns in the codebase
36
- - See ~/.claude/rules/ for global rules (defensive engineering, security, testing)
37
-
38
- ## Known Issues
39
- - {{KNOWN_ISSUES}}