axel-setup 0.2.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.
- package/CHANGELOG.md +218 -0
- package/CONTRIBUTING.md +58 -0
- package/LICENSE +21 -0
- package/README.md +518 -0
- package/agents/api-design.md +51 -0
- package/agents/bughunter.md +136 -0
- package/agents/changelog.md +89 -0
- package/agents/cleanup.md +126 -0
- package/agents/compare-branch.md +35 -0
- package/agents/cross-repo.md +97 -0
- package/agents/db-check.md +14 -0
- package/agents/debug.md +47 -0
- package/agents/deploy-check.md +100 -0
- package/agents/draft-message.md +19 -0
- package/agents/excelsior-coordinator.md +75 -0
- package/agents/excelsior-verifier.md +94 -0
- package/agents/feature.md +48 -0
- package/agents/harness-optimizer.md +40 -0
- package/agents/incident.md +48 -0
- package/agents/linear-task.md +18 -0
- package/agents/onboard.md +24 -0
- package/agents/perf.md +44 -0
- package/agents/production-validator.md +96 -0
- package/agents/review.md +113 -0
- package/agents/security-check.md +29 -0
- package/agents/sprint-summary.md +15 -0
- package/agents/tdd-mainder.md +178 -0
- package/agents/test-gen.md +39 -0
- package/axel-manifest.json +129 -0
- package/bin/axel-setup.js +597 -0
- package/bootstrap.sh +1087 -0
- package/commands/create-pr.md +13 -0
- package/commands/daily.md +182 -0
- package/commands/deslop.md +13 -0
- package/commands/draft-message.md +23 -0
- package/commands/eod-review.md +154 -0
- package/commands/execute-prp.md +37 -0
- package/commands/generate-prp.md +75 -0
- package/commands/multi-repo-feature.md +60 -0
- package/commands/roadmap.md +31 -0
- package/commands/sprint-status.md +486 -0
- package/commands/style.md +68 -0
- package/commands/visualize.md +17 -0
- package/docs/roadmap/multi-runtime.md +73 -0
- package/docs/superpowers/plans/2026-06-12-setup-hardening-roadmap.md +61 -0
- package/hooks/desktop-notify.sh +26 -0
- package/hooks/enforce-agent-model.jq +14 -0
- package/hooks/gsd-context-monitor.js +156 -0
- package/hooks/linear-lifecycle-sync.sh +112 -0
- package/hooks/memory-dedup.sh +122 -0
- package/hooks/memory-extractor.sh +218 -0
- package/hooks/post-commit-memory-trigger.sh +16 -0
- package/hooks/post-commit-verify.sh +41 -0
- package/hooks/post-edit-lint.sh +43 -0
- package/hooks/precompact-save-context.sh +124 -0
- package/hooks/priority-map-staleness.sh +29 -0
- package/hooks/proactive-resolver.sh +104 -0
- package/hooks/session-auto-title.sh +165 -0
- package/hooks/session-checkpoint.sh +97 -0
- package/hooks/session-cost-log.sh +77 -0
- package/hooks/session-log-action.sh +36 -0
- package/hooks/session-log-prompt.sh +25 -0
- package/hooks/session-restore.sh +45 -0
- package/hooks/session-save.sh +81 -0
- package/hooks/session-summarize.sh +154 -0
- package/hooks/validate-commit-format.sh +38 -0
- package/hooks/weekly-priority-map-review.sh +143 -0
- package/install.sh +46 -0
- package/package.json +67 -0
- package/scripts/ci/bootstrap-dry-run.sh +40 -0
- package/scripts/ci/check.sh +65 -0
- package/scripts/posthog-snapshot-loader.sh +112 -0
- package/skills/context-budget/SKILL.md +86 -0
- package/skills/memory-review/SKILL.md +100 -0
- package/skills/model-routing/SKILL.md +70 -0
- package/skills/posthog-weekly/SKILL.md +271 -0
- package/skills/ui-ux-pro-max/SKILL.md +377 -0
- package/skills/ui-ux-pro-max/data/charts.csv +26 -0
- package/skills/ui-ux-pro-max/data/colors.csv +97 -0
- package/skills/ui-ux-pro-max/data/icons.csv +101 -0
- package/skills/ui-ux-pro-max/data/landing.csv +31 -0
- package/skills/ui-ux-pro-max/data/products.csv +97 -0
- package/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
- package/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/skills/ui-ux-pro-max/data/styles.csv +68 -0
- package/skills/ui-ux-pro-max/data/typography.csv +58 -0
- package/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/skills/ui-ux-pro-max/scripts/core.py +253 -0
- package/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
- package/skills/ui-ux-pro-max/scripts/search.py +114 -0
- package/templates/AGENTS.runtime.md +17 -0
- package/templates/CLAUDE.md +252 -0
- package/templates/claude-monitor.plist +35 -0
- package/templates/keybindings.json +13 -0
- package/templates/merge-settings.jq +53 -0
- package/templates/review-upgrades.md +44 -0
- package/templates/settings.json +255 -0
- package/templates/statusline-command.sh +182 -0
- package/tests/fixtures/hooks/events.json +32 -0
- package/tools/session-costs-view.sh +128 -0
- package/tools/session-dashboard-gen.sh +369 -0
- package/tools/session-live.sh +173 -0
- package/tools/session-server.js +441 -0
package/README.md
ADDED
|
@@ -0,0 +1,518 @@
|
|
|
1
|
+
# AXEL Setup — Claude Code Power Configuration
|
|
2
|
+
|
|
3
|
+
**AXEL** = **A**utonomous e**X**celsior **E**ngineering **L**ayer
|
|
4
|
+
|
|
5
|
+
A complete, production-grade configuration package for [Claude Code](https://docs.anthropic.com/en/docs/claude-code) that transforms it into a proactive engineering partner. Includes session persistence, automatic memory, proactive error resolution, a curated suite of specialized agents and slash commands, and a real-time usage monitor.
|
|
6
|
+
|
|
7
|
+
> **GSD is not vendored.** [get-shit-done](https://www.npmjs.com/package/get-shit-done-cc) installs and updates independently (`npx get-shit-done-cc`). AXEL consumes the live GSD skills/agents rather than bundling a frozen copy — see the [CHANGELOG](CHANGELOG.md) entry for 2026-06-02.
|
|
8
|
+
|
|
9
|
+
## Philosophy: Excelsior
|
|
10
|
+
|
|
11
|
+
AXEL operates on the **Excelsior principle** — always beyond, always better, never stop at obstacles:
|
|
12
|
+
|
|
13
|
+
- **Proactive resolution**: When a command fails, AXEL investigates the root cause, attempts to fix it (start services, install deps, fix configs), and retries — before asking you
|
|
14
|
+
- **Auto-verification**: After non-trivial changes (3+ files), AXEL automatically launches a verification agent in the background
|
|
15
|
+
- **Session persistence**: Every session is summarized, key learnings are extracted to memory, and the next session starts with full context of what happened before
|
|
16
|
+
- **Context awareness**: Monitors context window usage and warns before it runs out
|
|
17
|
+
- **Usage monitoring**: Tracks token usage, cost, and rate limit consumption per session — live terminal dashboard and web dashboard at `http://localhost:9119`
|
|
18
|
+
|
|
19
|
+
## Ecosystem Relevance
|
|
20
|
+
|
|
21
|
+
AI coding tools are moving from individual prompts into repeatable team workflows. AXEL exists to make those workflows easier to share, audit, and improve as open source infrastructure.
|
|
22
|
+
|
|
23
|
+
The project packages operational patterns that many engineering teams need when adopting Claude Code:
|
|
24
|
+
|
|
25
|
+
- Reproducible setup for hooks, commands, agents, skills, plugins, and team templates.
|
|
26
|
+
- Guardrails for risky agent behavior, including commit validation, context monitoring, and explicit subagent model routing.
|
|
27
|
+
- Session persistence and memory extraction so long running engineering work can survive context resets.
|
|
28
|
+
- Verification and review workflows for code changes, incidents, deploy checks, and multi repo coordination.
|
|
29
|
+
- Additive installation that preserves each developer's existing Claude configuration.
|
|
30
|
+
|
|
31
|
+
The goal is not to hide local preferences inside one private setup. The goal is to convert practical agentic engineering workflows into reusable tooling that other developers can install, inspect, adapt, and contribute back to.
|
|
32
|
+
|
|
33
|
+
### Runtime Direction
|
|
34
|
+
|
|
35
|
+
AXEL is Claude Code-first by default. That stays true for the public package because the complete installer targets Claude Code hooks, commands, agents, skills, plugins, and `~/.claude` conventions.
|
|
36
|
+
|
|
37
|
+
Codex and other agent runtimes are supported through explicit install targets, not by weakening the Claude Code path. The current non-Claude targets install portable AXEL assets only, without Claude hooks, plugins, settings, launchd agents, or GSD side effects.
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npx axel-setup --target claude # default
|
|
41
|
+
npx axel-setup --target codex # experimental Codex adapter
|
|
42
|
+
npx axel-setup --target generic --output ./axel-runtime
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
See [AXEL Multi-Runtime Roadmap](docs/roadmap/multi-runtime.md) for the adapter plan, compatibility rules, completed first slice, and remaining native runtime work.
|
|
46
|
+
|
|
47
|
+
## Quick Start
|
|
48
|
+
|
|
49
|
+
The npm registry install is the primary path:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
npx axel-setup --dry-run --user-name "Your Name"
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
By default AXEL uses `--profile core`, a public safe Claude Code install that keeps conservative permissions and skips optional side effects such as plugin installation, usage monitor launchd setup, keybindings, and the external GSD installer. Use `--profile personal` or `--profile full` when you explicitly want the fuller local automation setup.
|
|
56
|
+
|
|
57
|
+
For a macOS one-line installer, use the curl wrapper. It checks for Claude Code, jq, zsh, and Node before delegating to the packaged npm release:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
curl -fsSL https://raw.githubusercontent.com/cveralyon/axel-setup/main/install.sh | bash -s -- --dry-run --user-name "Your Name"
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Before the first npm publish, use the same wrapper against the GitHub package source:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
curl -fsSL https://raw.githubusercontent.com/cveralyon/axel-setup/main/install.sh | AXEL_SETUP_PACKAGE=github:cveralyon/axel-setup bash -s -- --dry-run --user-name "Your Name"
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Use the GitHub-hosted entrypoint when you want the repo tip before a registry release:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
npx github:cveralyon/axel-setup --dry-run --user-name "Your Name"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Or clone the repository:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
git clone https://github.com/cveralyon/axel-setup.git
|
|
79
|
+
cd axel-setup
|
|
80
|
+
bash bootstrap.sh --user-name "Your Name"
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Maintainer Publish Checklist
|
|
84
|
+
|
|
85
|
+
Run publish commands from the repository root, where `package.json` lives:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
cd /Users/cveralyon/axel-onboarding
|
|
89
|
+
npm whoami
|
|
90
|
+
npm run check
|
|
91
|
+
npm run publish:dry-run
|
|
92
|
+
npm publish --access public
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
From another directory, pass the package path explicitly:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
npm publish /Users/cveralyon/axel-onboarding --access public
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Maintainer Release Automation
|
|
102
|
+
|
|
103
|
+
The repository includes a tag-driven npm release workflow in [`.github/workflows/release.yml`](.github/workflows/release.yml). It is designed for GitHub Actions npm publishing with provenance.
|
|
104
|
+
|
|
105
|
+
Before the first automated release:
|
|
106
|
+
- Prefer npm Trusted Publishing for `cveralyon/axel-setup` and workflow file `release.yml`. npm requires the package to exist before `npm trust` can configure that relationship, so the first publish may still need an npm automation token as the `NPM_TOKEN` repository secret.
|
|
107
|
+
- Make sure the package version in `package.json` and the changelog entry are ready.
|
|
108
|
+
- Verify the package locally with `npm run check` and `npm run publish:dry-run`.
|
|
109
|
+
|
|
110
|
+
Release flow:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
git tag v0.2.1
|
|
114
|
+
git push origin v0.2.1
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
The workflow installs `shellcheck`, `shfmt`, and npm 11, runs `npm run check`, then publishes only when the tagged version is not already on npm. With Trusted Publishing configured, GitHub Actions OIDC publishes without a long-lived token and npm generates provenance automatically. If `NPM_TOKEN` is present, the workflow uses it as a fallback with `npm publish --provenance --access public`. It rejects tags that do not match `package.json` version.
|
|
118
|
+
|
|
119
|
+
After a release, verify:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
npm view axel-setup version
|
|
123
|
+
npm view axel-setup dist-tags --json
|
|
124
|
+
npm view axel-setup time --json
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Rollback for a bad release is intentionally conservative: publish a fixed patch version. If users should stop receiving the bad version before the fix is ready, move the `latest` dist-tag back to the previous stable version:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
npm dist-tag add axel-setup@0.2.0 latest
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Setup Hardening CLI Surface
|
|
134
|
+
|
|
135
|
+
The setup hardening release makes the published CLI easier to operate in CI, corporate environments, and third-party installs:
|
|
136
|
+
|
|
137
|
+
- `--profile core` is the default public safe profile for reusable Claude Code setup.
|
|
138
|
+
- `--profile personal` and `--profile full` opt into the fuller local automation footprint.
|
|
139
|
+
- `--profile minimal` for lean installs with a smaller default footprint.
|
|
140
|
+
- `--skip-plugins`, `--skip-gsd`, and `--no-launchd` so maintainers and CI can suppress optional side effects.
|
|
141
|
+
- `--target claude|codex|generic` so Claude Code stays the default while Codex and generic runtimes can receive portable AXEL assets.
|
|
142
|
+
- `npx axel-setup doctor --target claude --home ~` to verify that an installation matches the shipped manifest and report missing files.
|
|
143
|
+
- `npx axel-setup doctor --target codex --codex-home ~/.codex` and `npx axel-setup doctor --target generic --output ./axel-runtime` for non-Claude installs.
|
|
144
|
+
- `npx axel-setup diff --target <target>` to audit installed files against the package.
|
|
145
|
+
- `npx axel-setup review-upgrades --target <target>` to inspect generated upgrade proposals before applying anything manually.
|
|
146
|
+
- `npx axel-setup metrics [--json]` to summarize context-budget, usage-monitor, and hook-harness impact signals without reading private local session data.
|
|
147
|
+
- `npx axel-setup uninstall --target <target>` to preview removals, then add `--apply` to remove only exact package matches.
|
|
148
|
+
|
|
149
|
+
Advanced: pass extra context so the Stop hooks personalize their prompts:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
bash bootstrap.sh \
|
|
153
|
+
--user-name "Emiliano" \
|
|
154
|
+
--user-context "Backend engineer at Acme, Python specialist" \
|
|
155
|
+
--language spanish
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
- `--user-context` gives the memory-extractor and session-summarize hooks a short self-description so their summaries frame decisions around your role. Defaults to `a software engineer`.
|
|
159
|
+
- `--language` tells the same hooks which language to respond in when they generate summaries (so non-English speakers get Spanish/French/etc. summaries back). Defaults to `english`.
|
|
160
|
+
- Both are optional and reversible — re-run the bootstrap with different values to update. The substitutions happen at install time (sed over the hook files), not at runtime.
|
|
161
|
+
|
|
162
|
+
### Optional: PostHog product analytics integration
|
|
163
|
+
|
|
164
|
+
If your team uses PostHog and you have the [PostHog MCP](https://posthog.com/docs/mcp) connected, AXEL can install the `/posthog-weekly` skill — an analytical review of your product analytics workspace that finds anomalies, regressions, and improvement opportunities (not a metric dashboard, an actual analyst).
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
bash bootstrap.sh \
|
|
168
|
+
--user-name "Your Name" \
|
|
169
|
+
--enable-posthog \
|
|
170
|
+
--posthog-context "Acme ATS — recruiting platform with AI sourcing"
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
What `--enable-posthog` installs:
|
|
174
|
+
- **`/posthog-weekly` skill** — pulls dashboards, insights, events, errors, and cohorts from PostHog; identifies dead events, regressions, error backlog, instrumentation gaps, and suggested cohorts; persists a 14-day cached snapshot for other commands to read.
|
|
175
|
+
- **`scripts/posthog-snapshot-loader.sh`** — bash helper that reads the cached snapshot and prints a markdown summary. Sourceable from any other command (e.g. `/sprint-status`, `/eod-review`, `/daily`) so they include the latest PostHog findings without re-querying.
|
|
176
|
+
|
|
177
|
+
What `--posthog-context` does: it gets substituted into the skill's prompt so the analytical lens knows what kind of product it's looking at. A good context is one sentence: name + product type + key features. Example: `"Acme Support Desk — B2B ticketing product with search, analytics, and workflow automation"`. Defaults to a generic placeholder if omitted.
|
|
178
|
+
|
|
179
|
+
The skill is **gated**: without `--enable-posthog`, neither the skill nor the helper script are installed. So teams that don't use PostHog don't get extra files in their `~/.claude/`.
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
# Preview what it does without changing anything:
|
|
183
|
+
bash bootstrap.sh --dry-run
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
**Safe to run multiple times.** The bootstrap is fully additive — it only adds what's missing, proposes upgrades for existing files, and never overwrites your configuration, memory, or CLAUDE.md.
|
|
187
|
+
|
|
188
|
+
## Prerequisites
|
|
189
|
+
|
|
190
|
+
| Tool | Why | Install |
|
|
191
|
+
|------|-----|---------|
|
|
192
|
+
| **Claude Code CLI** | The tool being configured | [docs.anthropic.com](https://docs.anthropic.com/en/docs/claude-code) |
|
|
193
|
+
| **Node.js >= 18** | Hook scripts (session management, context monitor) | `brew install node` |
|
|
194
|
+
| **jq** | JSON processing in hooks and settings merge | `brew install jq` |
|
|
195
|
+
| **python3** | Some hook scripts | Ships with macOS |
|
|
196
|
+
|
|
197
|
+
## What's Included
|
|
198
|
+
|
|
199
|
+
### Hooks (18)
|
|
200
|
+
|
|
201
|
+
The hook system runs automatically during Claude Code lifecycle events:
|
|
202
|
+
|
|
203
|
+
| Event | Hook | What it does |
|
|
204
|
+
|-------|------|-------------|
|
|
205
|
+
| **SessionStart** | `session-restore.sh` | Restores context from previous sessions — you pick up where you left off |
|
|
206
|
+
| **UserPromptSubmit** | `session-auto-title.sh` | Auto-names the session from your first prompt — strips greetings, fillers, and assistant-name salutations. Flag-file idempotency so it only fires once per session. |
|
|
207
|
+
| **PreToolUse** | `--no-verify` blocker | Blocks `git commit --no-verify` — never bypass git hooks |
|
|
208
|
+
| **PreToolUse** | `validate-commit-format.sh` | Validates commit message format: `type (Scope): Message`. Parses `-m` flag and heredocs. |
|
|
209
|
+
| **PreToolUse** | staging guard | Warns before running anything with `RAILS_ENV=staging` (= production) |
|
|
210
|
+
| **PostToolUse** | `proactive-resolver.sh` | Auto-starts Docker, PostgreSQL, Redis when they're down. Detects missing deps and suggests install commands |
|
|
211
|
+
| **PostToolUse** | `post-edit-lint.sh` | Auto-runs rubocop/eslint/ruff after file edits (Ruby, TS/JS, Python) |
|
|
212
|
+
| **PostToolUse** | `gsd-context-monitor.js` | Warns the agent when context window is running low (15% warning, 8% critical) with debounce and severity escalation |
|
|
213
|
+
| **PostToolUse** | `session-log-action.sh` | Logs tool actions for session persistence |
|
|
214
|
+
| **PostToolUse** | `session-checkpoint.sh` | Every ~40 tool calls, summarizes progress using Claude Sonnet |
|
|
215
|
+
| **PostToolUse** | `post-commit-verify.sh` | After git commits, suggests launching the excelsior-verifier agent |
|
|
216
|
+
| **PostToolUse** | `post-commit-memory-trigger.sh` | After a `git commit`, triggers the memory extractor with a 5-minute rate limit to batch consecutive commits |
|
|
217
|
+
| **PostToolUse** | `linear-lifecycle-sync.sh` | Auto-moves Linear cards based on git actions: commit → In Progress, `gh pr create` → In Review, `gh pr merge` → Done. Requires Linear MCP. Configurable ticket pattern and repo filter. |
|
|
218
|
+
| **PreCompact** | `precompact-save-context.sh` | Saves rich context snapshot before compaction (git state, pending work, decisions) |
|
|
219
|
+
| **Stop** | `session-summarize.sh` | Compiles a structured session summary using Claude Sonnet |
|
|
220
|
+
| **Stop** | `memory-extractor.sh` | Extracts key learnings and decisions to persistent memory using Claude Sonnet |
|
|
221
|
+
| **Stop** | `session-cost-log.sh` | Logs session cost, tokens, and 5h rate limit consumption to `~/.claude/session-costs.log` |
|
|
222
|
+
| **Stop** | `desktop-notify.sh` | macOS notification when Claude finishes (only when terminal is not focused) |
|
|
223
|
+
| **SessionStart** _(opt-in)_ | `priority-map-staleness.sh` | Warns if `~/.claude/memory/priority-map.md` hasn't been touched in ≥14 days. Enable by wiring into `settings.json` SessionStart. |
|
|
224
|
+
| **Cron / weekly** _(opt-in)_ | `weekly-priority-map-review.sh` | Weekly run (e.g., Monday 9am via LaunchAgent) that correlates git activity from the last 7 days against the current priority map and writes an update proposal. Requires `PRIORITY_MAP_REPOS` env var with space-separated absolute repo paths. |
|
|
225
|
+
|
|
226
|
+
> **Note:** the two `priority-map-*` hooks are opt-in — they are not cabled into `settings.json` by default because they assume `~/.claude/memory/priority-map.md` exists. Create that file first, then wire the hooks (SessionStart for staleness, LaunchAgent/cron for the weekly review).
|
|
227
|
+
|
|
228
|
+
### Commands (12 custom)
|
|
229
|
+
|
|
230
|
+
Slash commands you can use in Claude Code:
|
|
231
|
+
|
|
232
|
+
| Command | Description |
|
|
233
|
+
|---------|-------------|
|
|
234
|
+
| `/daily` | Daily briefing — pulls Linear issues, calendar events, and blockers (Phase 2: system sync) |
|
|
235
|
+
| `/eod-review` | End-of-day review — non-technical tone, audience-aware drafts for Slack/Linear |
|
|
236
|
+
| `/sprint-status` | Sprint status report — dual-audience (technical + plain-language), Linear+Notion+Slack aware |
|
|
237
|
+
| `/style` | Switch response style: `debug`, `teach`, `architect`, `ship` (interactive picker) |
|
|
238
|
+
| `/create-pr` | Create a PR with auto-generated summary |
|
|
239
|
+
| `/deslop` | Remove AI-generated slop from code |
|
|
240
|
+
| `/draft-message` | Help structure important Slack/email messages |
|
|
241
|
+
| `/generate-prp` | Generate a Product Requirements Prompt from an INITIAL.md |
|
|
242
|
+
| `/execute-prp` | Execute an existing PRP step by step |
|
|
243
|
+
| `/multi-repo-feature` | Plan and coordinate features spanning multiple repos |
|
|
244
|
+
| `/roadmap` | Generate feature and improvement suggestions |
|
|
245
|
+
| `/visualize` | Visualize code architecture |
|
|
246
|
+
|
|
247
|
+
GSD's own commands (now `/gsd-*` skills) are provided by the [get-shit-done](https://www.npmjs.com/package/get-shit-done-cc) installer, not AXEL — see the note at the top of this README.
|
|
248
|
+
|
|
249
|
+
### Agents (23)
|
|
250
|
+
|
|
251
|
+
Specialized subagents that Claude Code can spawn for focused tasks:
|
|
252
|
+
|
|
253
|
+
| Category | Agents |
|
|
254
|
+
|----------|--------|
|
|
255
|
+
| **Verification** | `excelsior-verifier`, `production-validator` |
|
|
256
|
+
| **Code Quality** | `bughunter`, `security-check`, `cleanup`, `perf` |
|
|
257
|
+
| **Development** | `feature`, `debug`, `tdd-mainder`, `test-gen`, `api-design` |
|
|
258
|
+
| **Review** | `review`, `compare-branch`, `changelog` |
|
|
259
|
+
| **Operations** | `deploy-check`, `db-check`, `incident` |
|
|
260
|
+
| **Multi-repo** | `cross-repo`, `linear-task` |
|
|
261
|
+
| **Communication** | `draft-message`, `sprint-summary` |
|
|
262
|
+
| **Onboarding** | `onboard` |
|
|
263
|
+
| **GSD System** | Installed separately by the [get-shit-done](https://www.npmjs.com/package/get-shit-done-cc) package (planner, executor, verifier, researcher, etc.) — not vendored by AXEL |
|
|
264
|
+
|
|
265
|
+
### Usage Monitor
|
|
266
|
+
|
|
267
|
+
AXEL installs a lightweight Node.js server that runs in the background (via launchd on macOS) and serves a real-time usage dashboard.
|
|
268
|
+
|
|
269
|
+
**Live web dashboard** — auto-starts at login, always available at:
|
|
270
|
+
```
|
|
271
|
+
http://localhost:9119
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
Features:
|
|
275
|
+
- Summary cards: total cost, today's cost, tokens, 5h rate limit % consumed
|
|
276
|
+
- **Active sessions panel** with live progress bars (context %, 5h %, cost, per-session delta)
|
|
277
|
+
- 4 charts: cost/day, 5h% per session, tokens (in+out stacked), sessions by project
|
|
278
|
+
- Full session history table with filtering and sorting
|
|
279
|
+
- Auto-refreshes every 30 seconds, no page reload needed
|
|
280
|
+
|
|
281
|
+
**Status bar** shows live data on every Claude Code interaction:
|
|
282
|
+
```
|
|
283
|
+
acme-api | (main) | Sonnet 4.6 | ctx:69% | $1.26 | 5h:22% (+3.2%)
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
**Terminal live view** — runs in a terminal pane, updates every 10s:
|
|
287
|
+
```bash
|
|
288
|
+
watch -n 10 -c ~/.claude/tools/session-live.sh
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
**CLI log viewer:**
|
|
292
|
+
```bash
|
|
293
|
+
~/.claude/tools/session-costs-view.sh # last 30 sessions
|
|
294
|
+
~/.claude/tools/session-costs-view.sh today # today only
|
|
295
|
+
~/.claude/tools/session-costs-view.sh week # last 7 days
|
|
296
|
+
~/.claude/tools/session-costs-view.sh summary # totals by day
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
**How the 5h rate limit tracking works:**
|
|
300
|
+
- The `5h-acum` column shows the cumulative % of the 5-hour window used at session close
|
|
301
|
+
- The `5h-sesion` column shows how much of the limit **this specific session** consumed (`end% - start%`)
|
|
302
|
+
- The status bar shows both: `5h:22% (+3.2%)` = 22% total, this session used 3.2%
|
|
303
|
+
|
|
304
|
+
### Skills (2 + 1 optional)
|
|
305
|
+
|
|
306
|
+
Multi-file skills with data and scripts:
|
|
307
|
+
|
|
308
|
+
- **memory-review** — Review, optimize, and deduplicate the persistent memory system
|
|
309
|
+
- **ui-ux-pro-max** — UI/UX design intelligence with 67 styles, 96 palettes, 57 font pairings, 25 chart types, 13 frontend stacks
|
|
310
|
+
- **posthog-weekly** _(optional, requires `--enable-posthog` at install)_ — Weekly analytical review of your PostHog workspace. Finds dead events, regressions, instrumentation gaps, error triage debt; suggests cohorts to create; persists a 14-day cached snapshot that other commands can read for daily/sprint reports.
|
|
311
|
+
|
|
312
|
+
### Plugins (10)
|
|
313
|
+
|
|
314
|
+
Official Claude Code marketplace plugins:
|
|
315
|
+
|
|
316
|
+
| Plugin | Purpose |
|
|
317
|
+
|--------|---------|
|
|
318
|
+
| `frontend-design` | Anti-slop UI guidelines, auto-activates on frontend tasks |
|
|
319
|
+
| `context7` | Live documentation fetching for any library/framework |
|
|
320
|
+
| `ruby-lsp` | Ruby language server integration |
|
|
321
|
+
| `typescript-lsp` | TypeScript language server integration |
|
|
322
|
+
| `pyright-lsp` | Python type checking integration |
|
|
323
|
+
| `code-simplifier` | Simplify and refine code for clarity |
|
|
324
|
+
| `hookify` | Create hooks from conversation analysis |
|
|
325
|
+
| `claude-md-management` | Audit and improve CLAUDE.md files |
|
|
326
|
+
| `commit-commands` | Git commit, push, and PR workflows |
|
|
327
|
+
| `pr-review-toolkit` | Comprehensive PR review with specialized agents |
|
|
328
|
+
|
|
329
|
+
## How the Bootstrap Works
|
|
330
|
+
|
|
331
|
+
### For new files: Install
|
|
332
|
+
|
|
333
|
+
Files that don't exist on your system are copied directly.
|
|
334
|
+
|
|
335
|
+
### For existing files: Propose Upgrade
|
|
336
|
+
|
|
337
|
+
When a file already exists but the AXEL version is different (potentially better), the bootstrap:
|
|
338
|
+
|
|
339
|
+
1. Saves the AXEL version to `~/.claude/axel-upgrades/<category>/`
|
|
340
|
+
2. Generates a `MANIFEST.md` listing all files with available upgrades
|
|
341
|
+
3. Creates a `REVIEW.md` prompt that your Claude Code agent can follow
|
|
342
|
+
|
|
343
|
+
**To review upgrades**, run:
|
|
344
|
+
|
|
345
|
+
```bash
|
|
346
|
+
npx axel-setup review-upgrades --target claude --home ~
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
For portable runtime exports, use the matching target:
|
|
350
|
+
|
|
351
|
+
```bash
|
|
352
|
+
npx axel-setup review-upgrades --target codex --codex-home ~/.codex
|
|
353
|
+
npx axel-setup review-upgrades --target generic --output ./axel-runtime
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
Your agent can then compare each file side-by-side, explain what's better in each version, and let you decide: **keep current**, **use AXEL version**, or **merge the best of both**. Nothing changes without your explicit approval.
|
|
357
|
+
|
|
358
|
+
### For installed files: Diff and uninstall
|
|
359
|
+
|
|
360
|
+
The CLI can audit and remove AXEL-managed files for each runtime target:
|
|
361
|
+
|
|
362
|
+
```bash
|
|
363
|
+
npx axel-setup diff --target claude --home ~
|
|
364
|
+
npx axel-setup diff --target codex --codex-home ~/.codex
|
|
365
|
+
npx axel-setup diff --target generic --output ./axel-runtime
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
Uninstall is dry-run by default:
|
|
369
|
+
|
|
370
|
+
```bash
|
|
371
|
+
npx axel-setup uninstall --target generic --output ./axel-runtime
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
To remove files, pass `--apply`:
|
|
375
|
+
|
|
376
|
+
```bash
|
|
377
|
+
npx axel-setup uninstall --target generic --output ./axel-runtime --apply
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
Safety rule: uninstall only removes files that still exactly match the AXEL package. Modified files are kept for manual review. Merge-managed files like `settings.json` are never removed automatically.
|
|
381
|
+
|
|
382
|
+
### For settings.json: Deep Merge
|
|
383
|
+
|
|
384
|
+
The bootstrap uses a `jq` filter to deep-merge settings:
|
|
385
|
+
|
|
386
|
+
- **Scalar values** (language, theme, etc.): your existing value always wins
|
|
387
|
+
- **Hook arrays**: AXEL hooks are added alongside yours (deduplicated by command string)
|
|
388
|
+
- **Plugin map**: new plugins are added; if you disabled a plugin, it stays disabled
|
|
389
|
+
- **Permission arrays**: union of both lists
|
|
390
|
+
- **Environment variables**: your existing vars are kept, missing ones are added
|
|
391
|
+
|
|
392
|
+
### For memory: Never Touch
|
|
393
|
+
|
|
394
|
+
Your memory files are never read, modified, or deleted. The bootstrap only ensures the directory structure exists (`~/.claude/memory/`, `~/.claude/memory/decisions/`).
|
|
395
|
+
|
|
396
|
+
## Memory System
|
|
397
|
+
|
|
398
|
+
AXEL includes an automatic persistent memory system:
|
|
399
|
+
|
|
400
|
+
- **`memory-extractor.sh`** (Stop hook): At session end, uses Claude Sonnet to analyze the conversation and extract key learnings, decisions, and preferences to `~/.claude/memory/` files
|
|
401
|
+
- **`memory-dedup.sh`**: Hash-based duplicate detection + orphan cleanup + dead link removal
|
|
402
|
+
- **`session-summarize.sh`** (Stop hook): Compiles a structured session summary for the next session's context
|
|
403
|
+
- **`session-restore.sh`** (SessionStart hook): Loads previous session summaries so you pick up where you left off
|
|
404
|
+
|
|
405
|
+
Memory types:
|
|
406
|
+
| Type | Purpose | Example |
|
|
407
|
+
|------|---------|---------|
|
|
408
|
+
| `user` | Your role, preferences, expertise | "Senior backend dev, prefers terse responses" |
|
|
409
|
+
| `feedback` | How to work with you (dos and don'ts) | "Never mock the database in integration tests" |
|
|
410
|
+
| `project` | Technical decisions, team context | "Auth rewrite driven by compliance requirements" |
|
|
411
|
+
| `reference` | Where to find things in external systems | "Pipeline bugs tracked in Linear project INGEST" |
|
|
412
|
+
|
|
413
|
+
## Customization
|
|
414
|
+
|
|
415
|
+
### Adding your own hooks
|
|
416
|
+
|
|
417
|
+
Edit `~/.claude/settings.json` and add entries to the relevant event:
|
|
418
|
+
|
|
419
|
+
```json
|
|
420
|
+
{
|
|
421
|
+
"hooks": {
|
|
422
|
+
"PostToolUse": [
|
|
423
|
+
{
|
|
424
|
+
"matcher": "Bash",
|
|
425
|
+
"hooks": [{ "type": "command", "command": "your-custom-hook.sh" }]
|
|
426
|
+
}
|
|
427
|
+
]
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
### Removing components
|
|
433
|
+
|
|
434
|
+
- **Hooks**: Delete from `~/.claude/hooks/` and remove the corresponding entry in `settings.json`
|
|
435
|
+
- **Commands**: Delete from `~/.claude/commands/`
|
|
436
|
+
- **Agents**: Delete from `~/.claude/agents/`
|
|
437
|
+
- **Plugins**: Set to `false` in `settings.json` → `enabledPlugins`
|
|
438
|
+
|
|
439
|
+
### Language
|
|
440
|
+
|
|
441
|
+
Default is Spanish. Change `"language"` in `settings.json` to your preferred language.
|
|
442
|
+
|
|
443
|
+
### Team CLAUDE.md
|
|
444
|
+
|
|
445
|
+
The template at `~/CLAUDE.md` (created only if you don't have one) includes:
|
|
446
|
+
- Commit format conventions
|
|
447
|
+
- Environment mapping (test/development/staging)
|
|
448
|
+
- Excelsior principle configuration
|
|
449
|
+
- Multi-repo workflow guidelines
|
|
450
|
+
|
|
451
|
+
Customize it with your team's specific repos, conventions, and rules.
|
|
452
|
+
|
|
453
|
+
## Contributing
|
|
454
|
+
|
|
455
|
+
Contributions are welcome when they improve AXEL as reusable developer tooling. Start with [`CONTRIBUTING.md`](./CONTRIBUTING.md), open a focused issue when the scope is unclear, and keep private company context out of public examples.
|
|
456
|
+
|
|
457
|
+
## What's NOT Touched
|
|
458
|
+
|
|
459
|
+
These are personal to each developer and are never modified:
|
|
460
|
+
|
|
461
|
+
- **Memory content** — all your existing memories stay intact
|
|
462
|
+
- **Existing hooks** — your custom hooks are preserved; new ones are added alongside
|
|
463
|
+
- **settings.local.json** — your personal permission overrides are untouched
|
|
464
|
+
- **MCP server connections** — configured per account (Linear, Slack, GitHub, etc.)
|
|
465
|
+
- **Disabled plugins** — if you've disabled a plugin, the merge respects that
|
|
466
|
+
|
|
467
|
+
## Requirements
|
|
468
|
+
|
|
469
|
+
- macOS (hooks use macOS-specific features like `osascript` for notifications)
|
|
470
|
+
- Claude Code CLI with an active subscription
|
|
471
|
+
- The `session-summarize.sh` and `memory-extractor.sh` hooks use `claude -p --model sonnet` for quality extraction — this consumes API tokens at session end
|
|
472
|
+
|
|
473
|
+
## Troubleshooting
|
|
474
|
+
|
|
475
|
+
### Usage dashboard not responding on http://localhost:9119
|
|
476
|
+
|
|
477
|
+
On a fresh `bootstrap.sh` run the launchd agent is installed and loaded automatically. If the dashboard stops responding — usually after a reboot on a machine where the plist was never registered with launchd, or after a manual install that left the plist outside `~/Library/LaunchAgents/` — run these checks:
|
|
478
|
+
|
|
479
|
+
```bash
|
|
480
|
+
# 1. Is anything listening on the port?
|
|
481
|
+
lsof -iTCP:9119 -sTCP:LISTEN
|
|
482
|
+
|
|
483
|
+
# 2. Is the launchd agent loaded?
|
|
484
|
+
launchctl list | grep claude-monitor
|
|
485
|
+
|
|
486
|
+
# 3. Is the plist in the right place?
|
|
487
|
+
ls -l ~/Library/LaunchAgents/com.*.claude-monitor.plist
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
If the plist is missing from `~/Library/LaunchAgents/`, reinstall it from the template and load it:
|
|
491
|
+
|
|
492
|
+
```bash
|
|
493
|
+
USERNAME=$(whoami)
|
|
494
|
+
NODE_BIN=$(which node)
|
|
495
|
+
PLIST_DEST="$HOME/Library/LaunchAgents/com.${USERNAME}.claude-monitor.plist"
|
|
496
|
+
|
|
497
|
+
sed -e "s|{{USERNAME}}|$USERNAME|g" \
|
|
498
|
+
-e "s|{{HOME}}|$HOME|g" \
|
|
499
|
+
-e "s|{{NODE_PATH}}|$NODE_BIN|g" \
|
|
500
|
+
~/.claude/axel-upgrades/templates/claude-monitor.plist > "$PLIST_DEST" 2>/dev/null || \
|
|
501
|
+
sed -e "s|{{USERNAME}}|$USERNAME|g" -e "s|{{HOME}}|$HOME|g" -e "s|{{NODE_PATH}}|$NODE_BIN|g" \
|
|
502
|
+
"$(git -C ~/axel-onboarding rev-parse --show-toplevel 2>/dev/null)/templates/claude-monitor.plist" > "$PLIST_DEST"
|
|
503
|
+
|
|
504
|
+
launchctl load -w "$PLIST_DEST"
|
|
505
|
+
curl -sS -o /dev/null -w "HTTP: %{http_code}\n" http://localhost:9119
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
Expected output: `HTTP: 200`. Logs live at `~/.claude/logs/monitor.log` and `~/.claude/logs/monitor-error.log`.
|
|
509
|
+
|
|
510
|
+
If the agent runs but the port stays closed, check the error log — most failures are a wrong `NODE_PATH` (fix: re-run the `sed` above after updating `NODE_BIN`) or a permission issue on `~/.claude/session-costs.log`.
|
|
511
|
+
|
|
512
|
+
## Release notes
|
|
513
|
+
|
|
514
|
+
See [`CHANGELOG.md`](./CHANGELOG.md) for the full history of changes grouped by date and scope.
|
|
515
|
+
|
|
516
|
+
## License
|
|
517
|
+
|
|
518
|
+
MIT
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Design a new API endpoint following DDD patterns — route, controller, service, serializer, types.
|
|
3
|
+
tools: ["Bash", "Read", "Grep", "Glob"]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Design a new API endpoint by auditing existing patterns first.
|
|
7
|
+
|
|
8
|
+
## Step 1: Understand the Requirement
|
|
9
|
+
- What resource/action? (CRUD on a model, custom action, aggregation)
|
|
10
|
+
- Who can access it? (roles: admin, manager, recruiter, freelance)
|
|
11
|
+
- What data goes in / comes out?
|
|
12
|
+
|
|
13
|
+
## Step 2: Audit Existing Patterns
|
|
14
|
+
- Find similar endpoints: `grep -r "def <action>" app/controllers/api/v1/`
|
|
15
|
+
- Check how similar services are structured
|
|
16
|
+
- Review the routes file for namespace conventions
|
|
17
|
+
- Read `docs/Doc-Tecnica-enero-2025.md` for business context if relevant
|
|
18
|
+
|
|
19
|
+
## Step 3: Design Proposal
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
Route: PATCH /api/v1/{resource}/{id}/{action}
|
|
23
|
+
Controller: Api::V1::{Resource}Controller#{action}
|
|
24
|
+
Service: {Domain}::{Action}Service
|
|
25
|
+
Serializer: {Model}Serializer (existing or new)
|
|
26
|
+
Policy: {Model}Policy#{action}?
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Request
|
|
30
|
+
- Method, path, params (required/optional)
|
|
31
|
+
- Auth: token required? Which roles?
|
|
32
|
+
|
|
33
|
+
### Response
|
|
34
|
+
- Success: status code, body structure (via serializer)
|
|
35
|
+
- Errors: 401, 403, 404, 422 — what triggers each
|
|
36
|
+
|
|
37
|
+
### Side Effects
|
|
38
|
+
- Sidekiq jobs enqueued?
|
|
39
|
+
- Emails sent?
|
|
40
|
+
- Audit trail (PaperTrail)?
|
|
41
|
+
- State transitions (AASM)?
|
|
42
|
+
|
|
43
|
+
## Step 4: Files to Create/Modify
|
|
44
|
+
List every file with its path and what goes in it. Don't create anything — just propose.
|
|
45
|
+
|
|
46
|
+
## Rules
|
|
47
|
+
- Use PATCH, not PUT
|
|
48
|
+
- Thin controller, logic in service
|
|
49
|
+
- Pundit for authorization
|
|
50
|
+
- ActiveModelSerializers for response formatting
|
|
51
|
+
- All code in English
|