glori-builder 1.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 (45) hide show
  1. package/.claude/CLAUDE.md +66 -0
  2. package/.claude/agents/architect.md +69 -0
  3. package/.claude/agents/database-architect.md +36 -0
  4. package/.claude/agents/designer.md +33 -0
  5. package/.claude/agents/developer.md +34 -0
  6. package/.claude/agents/git-workflow.md +60 -0
  7. package/.claude/agents/nextjs-migrator.md +28 -0
  8. package/.claude/agents/product-manager.md +44 -0
  9. package/.claude/agents/qa.md +44 -0
  10. package/.claude/agents/reviewer.md +55 -0
  11. package/.claude/agents/security-reviewer.md +34 -0
  12. package/.claude/agents/test-writer.md +26 -0
  13. package/.claude/commands/auto-pilot.md +228 -0
  14. package/.claude/commands/commit.md +7 -0
  15. package/.claude/commands/create-rules.md +356 -0
  16. package/.claude/commands/deploy-setup.md +158 -0
  17. package/.claude/commands/execute.md +101 -0
  18. package/.claude/commands/issue-prd.md +108 -0
  19. package/.claude/commands/issue-rework.md +272 -0
  20. package/.claude/commands/plan-feature.md +433 -0
  21. package/.claude/commands/plan-project.md +452 -0
  22. package/.claude/commands/prime.md +100 -0
  23. package/.claude/commands/project-setup.md +187 -0
  24. package/.claude/commands/quetrex-docs.md +188 -0
  25. package/.claude/commands/quetrex-setup.md +159 -0
  26. package/.claude/commands/quetrex-update.md +59 -0
  27. package/.claude/commands/secrets.md +122 -0
  28. package/.claude/commands/update-rules.md +143 -0
  29. package/.claude/hooks/auto-format.sh +27 -0
  30. package/.claude/hooks/check-quetrex-update.sh +34 -0
  31. package/.claude/hooks/enforce-branch.sh +66 -0
  32. package/.claude/hooks/security-check.sh +39 -0
  33. package/.claude/settings.json +89 -0
  34. package/.claude/skills/agent-browser/SKILL.md +251 -0
  35. package/.claude/skills/domain-capture/SKILL.md +385 -0
  36. package/.claude/skills/e2e-test/SKILL.md +213 -0
  37. package/.claude/skills/merge-issue/SKILL.md +126 -0
  38. package/.claude/skills/qa-verify/SKILL.md +194 -0
  39. package/.claude/skills/story-builder/SKILL.md +231 -0
  40. package/.claude/skills/tab-control/SKILL.md +92 -0
  41. package/.claude/statusline-command.sh +159 -0
  42. package/.claude/team-protocol.md +28 -0
  43. package/README.md +86 -0
  44. package/install.js +102 -0
  45. package/package.json +34 -0
@@ -0,0 +1,187 @@
1
+ ---
2
+ description: One-time repository setup — creates GitHub Actions CI, sets branch protection, creates project CLAUDE.md. Run once per new project.
3
+ ---
4
+
5
+ # Project Setup
6
+
7
+ Sets up a repository to work with the quetrex-base pipeline. Run once per project, not once per developer.
8
+
9
+ ## Pre-flight
10
+
11
+ 1. Verify git repo: `git status` — must be in a git repo
12
+ 2. Verify gh auth: `gh auth status` — must be authenticated
13
+ 3. Get repo info: `gh repo view --json name,owner,defaultBranchRef`
14
+ 4. Confirm with user: "Setting up {owner}/{name}. Default branch: {branch}. Proceed?"
15
+
16
+ ## Step 1: GitHub Actions CI
17
+
18
+ Create `.github/workflows/quality-gate.yml`:
19
+
20
+ ```bash
21
+ mkdir -p .github/workflows
22
+ ```
23
+
24
+ Write the file with this exact content:
25
+
26
+ ```yaml
27
+ name: Quality Gate
28
+ on:
29
+ pull_request:
30
+ branches: [main]
31
+
32
+ concurrency:
33
+ group: ${{ github.workflow }}-${{ github.ref }}
34
+ cancel-in-progress: true
35
+
36
+ jobs:
37
+ quality:
38
+ name: Lint & Type Check
39
+ runs-on: ubuntu-latest
40
+ steps:
41
+ - uses: actions/checkout@v4
42
+ - uses: actions/setup-node@v4
43
+ with:
44
+ node-version: 22
45
+ cache: 'npm'
46
+ - run: npm ci
47
+ - run: npm run type-check
48
+ - run: npm run lint
49
+
50
+ test:
51
+ name: Unit & Integration Tests
52
+ runs-on: ubuntu-latest
53
+ needs: quality
54
+ steps:
55
+ - uses: actions/checkout@v4
56
+ - uses: actions/setup-node@v4
57
+ with:
58
+ node-version: 22
59
+ cache: 'npm'
60
+ - run: npm ci
61
+ - run: npm run test -- --coverage
62
+
63
+ build:
64
+ name: Production Build
65
+ runs-on: ubuntu-latest
66
+ needs: [test]
67
+ steps:
68
+ - uses: actions/checkout@v4
69
+ - uses: actions/setup-node@v4
70
+ with:
71
+ node-version: 22
72
+ cache: 'npm'
73
+ - run: npm ci
74
+ - run: npm run build
75
+ ```
76
+
77
+ ## Step 2: Branch Protection
78
+
79
+ Set branch protection on main requiring CI to pass before merge:
80
+
81
+ ```bash
82
+ gh api repos/{owner}/{repo}/branches/main/protection \
83
+ --method PUT \
84
+ --field required_status_checks='{"strict":true,"contexts":["Lint & Type Check","Unit & Integration Tests","Production Build"]}' \
85
+ --field enforce_admins=false \
86
+ --field required_pull_request_reviews='{"required_approving_review_count":0}' \
87
+ --field restrictions=null
88
+ ```
89
+
90
+ If this fails (e.g. free GitHub account), warn the user and continue — it's not fatal.
91
+
92
+ ## Step 3: Project CLAUDE.md and Decisions Log
93
+
94
+ Check if `.claude/CLAUDE.md` already exists:
95
+
96
+ ```bash
97
+ [ -f .claude/CLAUDE.md ] && echo "exists" || echo "missing"
98
+ ```
99
+
100
+ **If missing:** Create a minimal placeholder:
101
+ ```bash
102
+ mkdir -p .claude
103
+ cat > .claude/CLAUDE.md << 'EOF'
104
+ # Project: {repo-name}
105
+
106
+ ## Stack
107
+ Run /create-rules to generate the full stack configuration.
108
+
109
+ ## Workflow
110
+ - All work on feature branches — never commit to main
111
+ - PRs require CI to pass before merge
112
+ - Use /issue-prd {ISSUE-ID} to start work on a Linear issue
113
+ EOF
114
+ ```
115
+
116
+ **If exists:** Check if it has a `## Verification` section:
117
+ ```bash
118
+ grep -q "## Verification" .claude/CLAUDE.md && echo "has verification" || echo "missing verification"
119
+ ```
120
+
121
+ If the Verification section is missing, note it in the summary — the user should run `/update-rules` after setup.
122
+
123
+ Also create `.claude/decisions.md` if it doesn't exist:
124
+
125
+ ```bash
126
+ [ -f .claude/decisions.md ] || cat > .claude/decisions.md << 'EOF'
127
+ # Project Decisions
128
+
129
+ Architectural decisions that affect how this project is built.
130
+ The architect agent updates this file. All agents read it.
131
+
132
+ <!-- Format for new entries:
133
+ ## YYYY-MM-DD — Short title
134
+ **Decision**: what was decided
135
+ **Reason**: why
136
+ **Impact**: what it affects going forward
137
+ -->
138
+ EOF
139
+ ```
140
+
141
+ ## Step 4: direnv .envrc
142
+
143
+ Check if direnv is installed:
144
+
145
+ ```bash
146
+ which direnv 2>/dev/null && echo "installed" || echo "missing"
147
+ ```
148
+
149
+ If installed and `.envrc` does not already exist:
150
+
151
+ ```bash
152
+ echo 'dotenv' > .envrc
153
+ direnv allow .
154
+ ```
155
+
156
+ This tells direnv to load the project's `.env` file automatically when anyone enters the directory — database URLs, project API tokens, and other credentials become available to all commands (including Claude's) without manual sourcing.
157
+
158
+ If `.envrc` already exists, skip. If direnv is not installed, skip and note it in the summary.
159
+
160
+ ## Step 5: Commit and Push
161
+
162
+ ```bash
163
+ git add .github/workflows/quality-gate.yml .claude/CLAUDE.md
164
+ [ -f .envrc ] && git add .envrc
165
+ git commit -m "chore: project setup — CI, branch protection, CLAUDE.md, direnv"
166
+ git push origin main
167
+ ```
168
+
169
+ ## Confirm
170
+
171
+ Report:
172
+ > "Project setup complete.
173
+ > - CI: .github/workflows/quality-gate.yml created
174
+ > - Branch protection: main requires Lint & Type Check, Unit & Integration Tests, Production Build
175
+ > - CLAUDE.md: {created with placeholder / already existed}
176
+ > - direnv: {.envrc created / already existed / direnv not installed — run /quetrex-setup}
177
+ >
178
+ > Next: run /create-rules to set up your stack configuration and verification commands."
179
+ >
180
+ > Partners can clone and start working immediately after: npm install -g @quetrex/base"
181
+
182
+ ## Notes
183
+ - Run from the project root
184
+ - Only the repo owner needs to run this — collaborators who clone get everything automatically
185
+ - Branch protection requires a paid GitHub account for private repos
186
+ - direnv loads project .env automatically — without it, database and service credentials must be manually exported before each session
187
+ - Customize quality-gate.yml for your stack (e.g. add Playwright if you have E2E tests)
@@ -0,0 +1,188 @@
1
+ ---
2
+ description: Display the full quetrex-base reference — pipeline, commands, agents, setup requirements, and workflow. Run at the start of any session to orient Claude or share with a new partner.
3
+ ---
4
+
5
+ # Quetrex Docs
6
+
7
+ Display the complete quetrex-base system reference.
8
+
9
+ ---
10
+
11
+ ## The System
12
+
13
+ Quetrex-base is a Claude Code workflow system for software development teams. It provides:
14
+ - A structured pipeline from Linear issue to merged PR
15
+ - Specialized agents for each stage of development
16
+ - Commands for planning, setup, secrets management, and deployment
17
+ - Cross-platform support (macOS, Linux, Windows WSL)
18
+
19
+ ---
20
+
21
+ ## Setup (run once per machine)
22
+
23
+ ```
24
+ /quetrex-setup Configure gh auth, git identity, Linear API key, direnv
25
+ ```
26
+
27
+ ## Setup (run once per project)
28
+
29
+ ```
30
+ /project-setup GitHub Actions CI, branch protection, direnv .envrc
31
+ /create-rules Generate .claude/CLAUDE.md with stack and verification commands
32
+ /deploy-setup Generate a project-specific /deploy skill
33
+ ```
34
+
35
+ For existing projects with an existing CLAUDE.md:
36
+ ```
37
+ /update-rules Audit and fix existing .claude/CLAUDE.md for quetrex compatibility
38
+ ```
39
+
40
+ ---
41
+
42
+ ## The Development Pipeline
43
+
44
+ ```
45
+ /issue-prd → architect → developer(s) → QA → reviewer → git-workflow → /merge-issue
46
+ ```
47
+
48
+ **Greenfield — manual:**
49
+ ```
50
+ /plan-project → Linear project + issues created → /issue-prd QUE-1 (work one at a time)
51
+ ```
52
+
53
+ **Greenfield — auto-pilot (walk away):**
54
+ ```
55
+ /plan-project → Linear project + issues created → /auto-pilot PROJECT-ID
56
+ → works every issue through full pipeline → auto-merges → done
57
+ ```
58
+
59
+ **Brownfield (existing issue):**
60
+ ```
61
+ /issue-prd QUE-123 → pipeline runs → PR created → /merge-issue QUE-123
62
+ ```
63
+
64
+ **Rework (tester feedback):**
65
+ ```
66
+ /issue-rework QUE-123 → rework document → pipeline reruns
67
+ ```
68
+
69
+ ---
70
+
71
+ ## All Commands
72
+
73
+ ### Pipeline
74
+
75
+ | Command | What it does |
76
+ |---|---|
77
+ | `/issue-prd QUE-123` | Fetch Linear issue, evaluate, create feature branch, start pipeline |
78
+ | `/issue-rework QUE-123` | Create rework document from tester feedback, restart pipeline |
79
+ | `/merge-issue QUE-123` | Merge PR, update Linear status to Human Review |
80
+ | `/auto-pilot PROJECT-ID` | Work entire Linear project backlog autonomously — walk away mode |
81
+
82
+ ### Planning
83
+
84
+ | Command | What it does |
85
+ |---|---|
86
+ | `/plan-project` | Greenfield: interview → PRD → Linear project + all issues |
87
+ | `/plan-feature` | Brownfield: codebase analysis + implementation plan |
88
+
89
+ ### Setup
90
+
91
+ | Command | What it does |
92
+ |---|---|
93
+ | `/quetrex-setup` | One-time machine setup (gh auth, git config, Linear key, direnv) |
94
+ | `/project-setup` | One-time project setup (CI, branch protection, .envrc) |
95
+ | `/create-rules` | Generate project .claude/CLAUDE.md from stack templates |
96
+ | `/update-rules` | Audit and update existing project .claude/CLAUDE.md |
97
+ | `/deploy-setup` | Generate project-specific deploy skill (Fly.io, Vercel, etc.) |
98
+
99
+ ### Keys and Secrets
100
+
101
+ | Command | What it does |
102
+ |---|---|
103
+ | `/secrets add KEY [--project]` | Add API key to ~/.claude/secrets.env or project .env |
104
+ | `/secrets list` | Show configured key names (never values) |
105
+ | `/secrets remove KEY [--project]` | Remove a key |
106
+
107
+ ### Maintenance
108
+
109
+ | Command | What it does |
110
+ |---|---|
111
+ | `/quetrex-update` | Check for and apply updates to quetrex-base |
112
+ | `/quetrex-docs` | Display this reference |
113
+
114
+ ### Utilities
115
+
116
+ | Command | What it does |
117
+ |---|---|
118
+ | `/commit` | Create a commit for current changes |
119
+ | `/prime` | Prime agent with codebase understanding |
120
+ | `/execute` | Execute an implementation plan |
121
+ | `/create-rules` | Already listed above |
122
+
123
+ ---
124
+
125
+ ## All Agents
126
+
127
+ | Agent | Model | Role |
128
+ |---|---|---|
129
+ | `architect` | Opus | Implementation plan, file ownership map, acceptance criteria |
130
+ | `developer` | Sonnet | Implementation + tests for one assigned workstream |
131
+ | `qa` | Sonnet | Runs verification chain, reports actual exit codes |
132
+ | `reviewer` | Opus | Semantic review of full diff — logic, security, architecture |
133
+ | `git-workflow` | Haiku | Commit, push, squash PR to main |
134
+ | `designer` | Sonnet | UI design spec (orchestrator decides when to invoke) |
135
+ | `database-architect` | Sonnet | Schema design and migrations |
136
+ | `product-manager` | Sonnet | Requirements gathering when issue lacks detail |
137
+ | `security-reviewer` | Opus | OWASP security audit — read-only, invoked explicitly |
138
+ | `test-writer` | Sonnet | Adds test coverage to existing code (utility, not pipeline) |
139
+ | `nextjs-migrator` | Sonnet | Next.js major version upgrades |
140
+
141
+ ---
142
+
143
+ ## Branching Strategy
144
+
145
+ ```
146
+ main
147
+ └── feature/QUE-123-description ← one per issue
148
+ ├── feature/QUE-123-api ← parallel developer A
149
+ ├── feature/QUE-123-db ← parallel developer B
150
+ └── feature/QUE-123-ui ← parallel developer C
151
+ ```
152
+
153
+ - Sub-branches merge regularly into issue branch
154
+ - Issue branch squash-merges into main via PR
155
+ - All work on feature branches — never commit directly to main
156
+
157
+ ---
158
+
159
+ ## Multiple Linear Workspaces
160
+
161
+ ```bash
162
+ # Global default (primary workspace)
163
+ ~/.claude/secrets.env → export LINEAR_API_KEY="lin_api_..."
164
+
165
+ # Project-specific override (different workspace)
166
+ project/.env → LINEAR_API_KEY=lin_api_other_workspace
167
+ ```
168
+
169
+ ---
170
+
171
+ ## Prerequisites
172
+
173
+ | Requirement | Check | Install |
174
+ |---|---|---|
175
+ | GitHub CLI | `gh auth status` | `gh auth login` |
176
+ | Linear API key | `/secrets list` | `/quetrex-setup` |
177
+ | direnv | `which direnv` | `brew install direnv` / `apt install direnv` |
178
+ | Node.js 18+ | `node --version` | nodejs.org |
179
+
180
+ ---
181
+
182
+ ## Partner Onboarding
183
+
184
+ ```bash
185
+ npm install -g @quetrex/base # installs agents, skills, commands
186
+ /quetrex-setup # one-time machine config
187
+ git clone <repo-url> # project already has CI and rules
188
+ ```
@@ -0,0 +1,159 @@
1
+ ---
2
+ description: One-time machine setup for quetrex-base. Configures GitHub auth, git identity, and API keys. Run once per machine — partners run this after installing the npm package.
3
+ ---
4
+
5
+ # Quetrex Setup
6
+
7
+ Sets up your machine to run the quetrex-base pipeline. Run once per machine, not once per project.
8
+
9
+ ## Step 1: GitHub CLI
10
+
11
+ ```bash
12
+ gh auth status 2>&1
13
+ ```
14
+
15
+ If not authenticated, stop and tell the user:
16
+ > "GitHub CLI is not authenticated. Run `gh auth login` in your terminal, choose GitHub.com and HTTPS, then run /quetrex-setup again."
17
+
18
+ ## Step 2: Git Identity
19
+
20
+ ```bash
21
+ git config --global user.name
22
+ git config --global user.email
23
+ ```
24
+
25
+ If either is empty, ask the user for the missing value(s) and set them:
26
+
27
+ ```bash
28
+ git config --global user.name "NAME"
29
+ git config --global user.email "EMAIL"
30
+ ```
31
+
32
+ ## Step 3: secrets.env
33
+
34
+ Check if the global secrets file exists:
35
+
36
+ ```bash
37
+ [ -f ~/.claude/secrets.env ] && echo "exists" || echo "missing"
38
+ ```
39
+
40
+ If missing, create it:
41
+
42
+ ```bash
43
+ cat > ~/.claude/secrets.env << 'EOF'
44
+ #!/bin/bash
45
+ # quetrex-base secrets — never commit this file
46
+ # Add to your shell profile: source ~/.claude/secrets.env
47
+ EOF
48
+ chmod 600 ~/.claude/secrets.env
49
+ ```
50
+
51
+ `chmod 600` makes the file readable only by you — not other users on the machine.
52
+
53
+ ## Step 4: LINEAR_API_KEY
54
+
55
+ Check which workspaces are already configured:
56
+
57
+ ```bash
58
+ grep "LINEAR" ~/.claude/secrets.env 2>/dev/null || echo "none"
59
+ ```
60
+
61
+ Display what's configured. Then ask:
62
+
63
+ > "What Linear workspaces do you need? For each one, I need a name (e.g. 'personal', 'dealerq', 'client-x') and API key from Linear → Settings → API → Personal API Keys.
64
+ >
65
+ > Start with your primary workspace — you can add more with /secrets add later."
66
+
67
+ For each workspace the user provides:
68
+
69
+ - If it's the primary (first) workspace: add as `LINEAR_API_KEY`
70
+ - If it's a named workspace: add as `LINEAR_{NAME}_API_KEY` (uppercased)
71
+
72
+ Write to `~/.claude/secrets.env`:
73
+
74
+ ```bash
75
+ # Append primary key
76
+ echo '' >> ~/.claude/secrets.env
77
+ echo '# Linear: primary workspace' >> ~/.claude/secrets.env
78
+ echo 'export LINEAR_API_KEY="VALUE"' >> ~/.claude/secrets.env
79
+
80
+ # Append named workspace key (if provided)
81
+ echo '# Linear: NAME workspace' >> ~/.claude/secrets.env
82
+ echo 'export LINEAR_NAME_API_KEY="VALUE"' >> ~/.claude/secrets.env
83
+ ```
84
+
85
+ ## Step 5: Shell Profile
86
+
87
+ Check if secrets.env is already sourced:
88
+
89
+ ```bash
90
+ grep -l "secrets.env" ~/.zshrc ~/.bashrc ~/.bash_profile ~/.profile 2>/dev/null | head -1
91
+ ```
92
+
93
+ If not found in any profile, show the user exactly what to add and where:
94
+
95
+ > "Add this line to your shell profile. For zsh (macOS default): `~/.zshrc`. For bash: `~/.bashrc`.
96
+ >
97
+ > ```
98
+ > source ~/.claude/secrets.env
99
+ > ```
100
+ >
101
+ > Then run: `source ~/.zshrc` (or open a new terminal)."
102
+
103
+ If already sourced, confirm and skip.
104
+
105
+ ## Step 6: direnv (recommended)
106
+
107
+ direnv automatically loads a project's `.env` file when you enter its directory. This means database URLs, project API keys, and other credentials are available to Claude's commands without any manual setup or per-command sourcing.
108
+
109
+ Check if direnv is installed:
110
+
111
+ ```bash
112
+ which direnv 2>/dev/null && direnv version || echo "not installed"
113
+ ```
114
+
115
+ If not installed, recommend it:
116
+
117
+ > "direnv is not installed. It's strongly recommended — without it, database commands and other project-specific credentials may fail silently.
118
+ >
119
+ > Install:
120
+ > - macOS: `brew install direnv`
121
+ > - Linux / Windows WSL: `sudo apt install direnv` or `curl -sfL https://direnv.net/install.sh | bash`
122
+ >
123
+ > After installing, add the hook to your shell profile:
124
+ > - zsh: `echo 'eval "$(direnv hook zsh)"' >> ~/.zshrc`
125
+ > - bash: `echo 'eval "$(direnv hook bash)"' >> ~/.bashrc`
126
+ >
127
+ > Then: `source ~/.zshrc` and run /quetrex-setup again."
128
+
129
+ If installed, check if the hook is in the shell profile:
130
+
131
+ ```bash
132
+ grep -l "direnv hook" ~/.zshrc ~/.bashrc ~/.bash_profile 2>/dev/null | head -1
133
+ ```
134
+
135
+ If the hook is missing, show the user the command to add it. If already configured, confirm and continue.
136
+
137
+ **How direnv works with projects:** When a project has a `.env` file and an `.envrc` file containing `dotenv`, direnv auto-exports those vars whenever you `cd` into the directory. Claude's bash commands inherit them — no manual sourcing needed. The `/project-setup` command creates the `.envrc` file.
138
+
139
+ ## Step 7: Confirm
140
+
141
+ ```bash
142
+ source ~/.claude/secrets.env 2>/dev/null
143
+ echo "LINEAR_API_KEY : ${LINEAR_API_KEY:+set (${#LINEAR_API_KEY} chars)}"
144
+ echo "gh auth : $(gh auth status --active 2>&1 | head -1)"
145
+ echo "git name : $(git config --global user.name)"
146
+ echo "git email : $(git config --global user.email)"
147
+ echo "direnv : $(which direnv 2>/dev/null && direnv version || echo 'not installed')"
148
+ ```
149
+
150
+ Report clearly what is set and what is missing. If everything is green:
151
+
152
+ > "quetrex-base setup complete. You're ready to use /issue-prd, /plan-project, and the full pipeline."
153
+
154
+ ## Notes
155
+
156
+ - LINEAR_API_KEY is your primary workspace default — used unless a project .env overrides it
157
+ - Named workspace keys (LINEAR_DEALERQ_API_KEY etc.) are selected by /secrets when working in that project
158
+ - Run /secrets to add keys, list what is configured, or switch a project to a named workspace
159
+ - This file is read-only to other users (chmod 600) — do not put it in any git repo
@@ -0,0 +1,59 @@
1
+ ---
2
+ description: Check for and apply updates to quetrex-base. Shows current vs latest version and updates if behind.
3
+ ---
4
+
5
+ # Quetrex Update
6
+
7
+ ## Step 1: Check Installed Version
8
+
9
+ ```bash
10
+ npm list -g @quetrex/base --depth=0 --json 2>/dev/null
11
+ ```
12
+
13
+ Extract the installed version from the JSON output.
14
+
15
+ If `@quetrex/base` is not found in the output, tell the user: "quetrex-base does not appear to be installed globally. Install it with: `npm install -g @quetrex/base`" and stop.
16
+
17
+ ## Step 2: Check Latest Version
18
+
19
+ ```bash
20
+ npm show @quetrex/base version 2>/dev/null
21
+ ```
22
+
23
+ ## Step 3: Compare
24
+
25
+ If installed == latest:
26
+ > "You're on the latest version of quetrex-base (v{version}). Nothing to do."
27
+
28
+ Clear the flag file if it exists: `rm -f ~/.claude/.quetrex-update-available`
29
+
30
+ Stop.
31
+
32
+ If installed != latest, display:
33
+ > "quetrex-base update available
34
+ > Installed: v{installed}
35
+ > Latest: v{latest}
36
+ >
37
+ > This will update all agents, skills, and commands in ~/.claude/.
38
+ > Your settings.json permissions and custom project files will not be overwritten.
39
+ > Update now?"
40
+
41
+ Wait for confirmation before proceeding.
42
+
43
+ ## Step 4: Apply Update
44
+
45
+ ```bash
46
+ npm install -g @quetrex/base@latest
47
+ ```
48
+
49
+ The postinstall script runs automatically and copies all updated files to `~/.claude/`.
50
+
51
+ ## Step 5: Confirm
52
+
53
+ ```bash
54
+ rm -f ~/.claude/.quetrex-update-available
55
+ npm list -g @quetrex/base --depth=0
56
+ ```
57
+
58
+ Report:
59
+ > "Updated to v{latest}. Restart Claude Code to load new agents and skills."