claudex-setup 1.10.2 → 1.10.3

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 CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.10.3] - 2026-04-02
4
+
5
+ ### Added
6
+ - `--snapshot` support for `audit`, `augment`, `suggest-only`, `benchmark`, and `governance`, writing normalized evidence artifacts under `.claude/claudex-setup/snapshots/`
7
+ - shared snapshot history via `index.json` so before/after work can accumulate into a single local evidence spine
8
+ - `governance --out governance.md` for a shareable governance / pilot-readiness artifact
9
+ - packaged Claude-native `audit-repo` skill template under `content/claude-code/audit-repo/`
10
+ - lightweight release checklist in `content/release-checklist.md`
11
+
12
+ ### Changed
13
+ - default audit now surfaces `Top 5 Next Actions` with rationale, traceability, risk, confidence, and a suggested next command
14
+ - `--lite` now gives a shorter beginner-first top-3 quick scan
15
+ - README and docs now reflect snapshot artifacts, governance export, and the Claude-native skill path
16
+ - packaged content and public-facing counts are now aligned with the current CLAUDEX state
17
+
3
18
  ## [1.10.2] - 2026-04-02
4
19
 
5
20
  ### Fixed
@@ -11,6 +26,12 @@
11
26
  - MCP preflight warnings for `setup`, `plan`, and `apply` when selected packs require missing environment variables
12
27
  - user-facing docs now reflect the actual 22 detected stacks
13
28
 
29
+ ## [1.10.1] - 2026-04-02
30
+
31
+ ### Fixed
32
+ - corrected MCP pack package names to verified npm packages
33
+ - aligned settings hierarchy checks with shared settings precedence
34
+
14
35
  ## [1.10.0] - 2026-04-01
15
36
 
16
37
  ### Added
package/README.md CHANGED
@@ -1,19 +1,36 @@
1
1
  # claudex-setup
2
2
 
3
- > Score your project 0-100 for Claude Code readiness. Discover gaps, export proposal bundles, apply safe starter changes with rollback, and benchmark the impact without touching your live repo.
3
+ > Score your repo's Claude Code setup against 62 checks. See what's missing, apply only what you approve with rollback, and benchmark the impact without breaking existing config.
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/claudex-setup)](https://www.npmjs.com/package/claudex-setup)
6
6
  [![npm downloads](https://img.shields.io/npm/dm/claudex-setup)](https://www.npmjs.com/package/claudex-setup)
7
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
8
8
 
9
+ ### What this is
10
+
11
+ - A **Claude Code workflow audit and improvement tool** — not an MCP installer, not a code generator
12
+ - Scores your repo 0-100 across CLAUDE.md, hooks, commands, agents, skills, MCP, security, and more
13
+ - Proposes changes as diffs you review — applies only what you approve, with rollback for every change
14
+ - Includes governance (permission profiles, hook registry, policy packs) and benchmark (isolated before/after)
15
+
16
+ ### What this is NOT
17
+
18
+ - Not an MCP setup tool (MCP packs are one of 26 features, not the product)
19
+ - Not a code generator or refactoring tool — it configures how Claude works with your repo, not the code itself
20
+ - Not a replacement for hand-crafted CLAUDE.md — generated output is a strong starting point, not a final answer
21
+ - Not a score you should chase blindly — 90/100 with bad code is still bad code
22
+
9
23
  ## Quick Start
10
24
 
11
25
  ```bash
26
+ npx claudex-setup --lite # Quick beginner scan: top 3 fixes + next command
12
27
  npx claudex-setup # Audit your project (10 seconds)
28
+ npx claudex-setup --snapshot # Save a normalized snapshot under .claude/claudex-setup/
13
29
  npx claudex-setup setup # Create a starter-safe baseline
14
30
  npx claudex-setup augment # Repo-aware plan, no writes
15
31
  npx claudex-setup plan # Export proposal bundles with file previews
16
32
  npx claudex-setup governance # See permission profiles, packs, and pilot guidance
33
+ npx claudex-setup governance --out governance.md # Export a shareable governance report
17
34
  npx claudex-setup benchmark # Measure before/after in an isolated temp copy
18
35
  npx claudex-setup --threshold 60 # Fail CI if score is below 60
19
36
  ```
@@ -41,18 +58,35 @@ No install. No config. No dependencies.
41
58
  CI pipeline configured
42
59
  → Add .github/workflows/ for automated testing
43
60
 
44
- Best next fixes
61
+ Top 5 Next Actions
45
62
  1. Add CLAUDE.md verification criteria
63
+ Why: Claude needs an explicit verification loop before handoff
64
+ Trace: failed-check:verificationLoop | impact:critical | category:quality
65
+ Risk: high | Confidence: high
66
+ Fix: Add test/lint/build commands to CLAUDE.md so Claude can verify its own work
67
+
46
68
  2. Configure safe permissions + deny rules
69
+ Why: Explicit permissions are the main safety layer for repo writes
70
+ Trace: failed-check:permissionDeny | impact:high | category:security
71
+ Risk: medium | Confidence: high
72
+ Fix: Add permissions.deny rules to block dangerous operations
47
73
 
48
74
  Weakest areas:
49
75
  design: none (0/2)
50
76
  devops: none (0/4)
51
77
 
52
78
  29/62 checks passing
53
- Run npx claudex-setup setup to create a starter-safe baseline
79
+ Next command: npx claudex-setup setup
80
+ ```
81
+
82
+ Want the shortest possible first run?
83
+
84
+ ```bash
85
+ npx claudex-setup --lite
54
86
  ```
55
87
 
88
+ That prints a compact top-3 quick scan with one clear next command.
89
+
56
90
  ## All Commands
57
91
 
58
92
  | Command | What it does |
@@ -84,6 +118,8 @@ No install. No config. No dependencies.
84
118
  | `--only A,B` | Limit plan/apply to selected proposal ids |
85
119
  | `--profile NAME` | Choose a permission profile for write-capable flows |
86
120
  | `--mcp-pack A,B` | Merge named MCP packs into generated or patched settings |
121
+ | `--snapshot` | Save a normalized artifact under `.claude/claudex-setup/snapshots/` |
122
+ | `--lite` | Show a short top-3 quick scan with one clear next command |
87
123
  | `--dry-run` | Preview apply without writing files |
88
124
  | `--verbose` | Show all recommendations (not just critical/high) |
89
125
  | `--json` | Machine-readable JSON output (for CI) |
@@ -141,6 +177,7 @@ Use `governance` when the question is "can we pilot this safely?" instead of "wh
141
177
 
142
178
  ```bash
143
179
  npx claudex-setup governance
180
+ npx claudex-setup governance --out governance.md
144
181
  ```
145
182
 
146
183
  It exposes:
@@ -152,6 +189,8 @@ It exposes:
152
189
  - 26 MCP packs: Context7, Next.js devtools, GitHub, PostgreSQL, Playwright, Docker, Notion, Linear, Sentry, Slack, Stripe, Figma, Shopify, Hugging Face, Blender, WordPress, Jira/Confluence, GA4, Search Console, n8n, Zendesk, Infisical, Composio, memory, sequential-thinking, mcp-security
153
190
  - a pilot rollout kit with scope, approvals, success metrics, and rollback expectations
154
191
 
192
+ Use `--out governance.md` if you want a shareable artifact for leads, platform teams, or security review.
193
+
155
194
  ## Domain Packs And MCP Packs
156
195
 
157
196
  `augment` and `suggest-only` now recommend repo-shaped guidance instead of giving every project the same advice.
@@ -181,6 +220,31 @@ Benchmark mode:
181
220
  - applies starter-safe artifacts only in the copy
182
221
  - reruns the audit and emits before/after deltas, workflow-evidence coverage, a case-study summary, and an executive recommendation
183
222
 
223
+ If you want repeatable evidence artifacts for before/after work, add `--snapshot` to `audit`, `augment`, `suggest-only`, `benchmark`, or `governance`.
224
+
225
+ ```bash
226
+ npx claudex-setup --snapshot
227
+ npx claudex-setup augment --snapshot
228
+ npx claudex-setup benchmark --snapshot
229
+ ```
230
+
231
+ Snapshots are written to `.claude/claudex-setup/snapshots/` with a shared envelope and an `index.json` history file.
232
+
233
+ ## Use Inside Claude Code
234
+
235
+ If you want the first Claude-native entry point, copy the shipped skill template into your repo.
236
+
237
+ If `claudex-setup` is installed locally in `node_modules`, use:
238
+
239
+ ```bash
240
+ mkdir -p .claude/skills/audit-repo
241
+ cp ./node_modules/claudex-setup/content/claude-code/audit-repo/SKILL.md .claude/skills/audit-repo/SKILL.md
242
+ ```
243
+
244
+ If you are using `npx` only, copy the same file from the GitHub repo at `content/claude-code/audit-repo/SKILL.md`.
245
+
246
+ The skill runs `npx claudex-setup --json`, summarizes the score, shows the top next actions, and points to the right next command without applying changes.
247
+
184
248
  ## 62 Checks Across 14 Categories
185
249
 
186
250
  The exact applicable count can be lower on a given repo because stack-specific checks are skipped when they do not apply.
@@ -227,7 +291,7 @@ jobs:
227
291
  runs-on: ubuntu-latest
228
292
  steps:
229
293
  - uses: actions/checkout@v4
230
- - uses: DnaFin/claudex-setup@v1.10.2
294
+ - uses: DnaFin/claudex-setup@v1.10.3
231
295
  with:
232
296
  threshold: 50
233
297
  ```
@@ -288,7 +352,7 @@ Every check traces to a verified technique from a systematic audit of:
288
352
  - Anthropic blog posts and benchmark papers
289
353
  - 194 hands-on experiments with real evidence
290
354
 
291
- The catalog includes 1,107 entries (features, techniques, patterns, tools, stats, and known limitations) — not all are actionable checks. 954 were verified with real evidence. Continuously updated.
355
+ The catalog includes 1,107 entries (features, techniques, patterns, tools, stats, and known limitations) — not all are actionable checks. 948 were verified with real evidence. Continuously updated.
292
356
 
293
357
  **Note:** A hand-crafted CLAUDE.md that reflects your real conventions will always be better than a generated one. This tool is most useful for projects starting from zero, or as a checklist for what you might be missing.
294
358
 
package/bin/cli.js CHANGED
@@ -4,8 +4,9 @@ const { audit } = require('../src/audit');
4
4
  const { setup } = require('../src/setup');
5
5
  const { analyzeProject, printAnalysis, exportMarkdown } = require('../src/analyze');
6
6
  const { buildProposalBundle, printProposalBundle, writePlanFile, applyProposalBundle, printApplyResult } = require('../src/plans');
7
- const { getGovernanceSummary, printGovernanceSummary, ensureWritableProfile } = require('../src/governance');
7
+ const { getGovernanceSummary, printGovernanceSummary, ensureWritableProfile, renderGovernanceMarkdown } = require('../src/governance');
8
8
  const { runBenchmark, printBenchmark, writeBenchmarkReport } = require('../src/benchmark');
9
+ const { writeSnapshotArtifact } = require('../src/activity');
9
10
  const { version } = require('../package.json');
10
11
 
11
12
  const args = process.argv.slice(2);
@@ -133,6 +134,7 @@ const HELP = `
133
134
 
134
135
  Usage:
135
136
  npx claudex-setup Run audit on current directory
137
+ npx claudex-setup --lite Run the quick-scan beginner view
136
138
  npx claudex-setup discover Discover the highest-value improvements
137
139
  npx claudex-setup audit Same as above
138
140
  npx claudex-setup starter Alias for setup
@@ -156,6 +158,8 @@ const HELP = `
156
158
  --only A,B Limit plan/apply to selected proposal ids or technique keys
157
159
  --profile NAME Choose permission profile (read-only, suggest-only, safe-write, power-user, internal-research)
158
160
  --mcp-pack A,B Merge named MCP packs into generated settings (e.g. context7-docs,next-devtools)
161
+ --snapshot Save a normalized snapshot artifact under .claude/claudex-setup/snapshots/
162
+ --lite Show a short top-3 quick scan with one clear next command
159
163
  --dry-run Preview apply without writing files
160
164
  --verbose Show all recommendations (not just critical/high)
161
165
  --json Output as JSON (for CI pipelines)
@@ -166,8 +170,12 @@ const HELP = `
166
170
 
167
171
  Examples:
168
172
  npx claudex-setup
173
+ npx claudex-setup --lite
174
+ npx claudex-setup --snapshot
169
175
  npx claudex-setup augment
176
+ npx claudex-setup augment --snapshot
170
177
  npx claudex-setup suggest-only --json
178
+ npx claudex-setup governance --snapshot
171
179
  npx claudex-setup plan --out claudex-plan.json
172
180
  npx claudex-setup plan --profile safe-write
173
181
  npx claudex-setup setup --mcp-pack context7-docs
@@ -210,6 +218,8 @@ async function main() {
210
218
  verbose: flags.includes('--verbose'),
211
219
  json: flags.includes('--json'),
212
220
  auto: flags.includes('--auto'),
221
+ lite: flags.includes('--lite'),
222
+ snapshot: flags.includes('--snapshot'),
213
223
  dryRun: flags.includes('--dry-run'),
214
224
  threshold: parsed.threshold !== null ? Number(parsed.threshold) : null,
215
225
  out: parsed.out,
@@ -295,6 +305,9 @@ async function main() {
295
305
  return; // keep process alive for http
296
306
  } else if (normalizedCommand === 'augment' || normalizedCommand === 'suggest-only') {
297
307
  const report = await analyzeProject({ ...options, mode: normalizedCommand });
308
+ const snapshot = options.snapshot ? writeSnapshotArtifact(options.dir, normalizedCommand, report, {
309
+ sourceCommand: normalizedCommand,
310
+ }) : null;
298
311
  if (options.out && !options.json) {
299
312
  const fs = require('fs');
300
313
  const md = exportMarkdown(report);
@@ -302,6 +315,11 @@ async function main() {
302
315
  console.log(`\n Report exported to ${options.out}\n`);
303
316
  }
304
317
  printAnalysis(report, options);
318
+ if (snapshot && !options.json) {
319
+ console.log(` Snapshot saved: ${snapshot.relativePath}`);
320
+ console.log(` Snapshot index: ${snapshot.indexPath}`);
321
+ console.log('');
322
+ }
305
323
  } else if (normalizedCommand === 'plan') {
306
324
  const bundle = await buildProposalBundle(options);
307
325
  let artifact = null;
@@ -320,10 +338,34 @@ async function main() {
320
338
  const result = await applyProposalBundle(options);
321
339
  printApplyResult(result, options);
322
340
  } else if (normalizedCommand === 'governance') {
341
+ const fs = require('fs');
342
+ const path = require('path');
323
343
  const summary = getGovernanceSummary();
344
+ if (options.out) {
345
+ fs.mkdirSync(path.dirname(options.out), { recursive: true });
346
+ const content = path.extname(options.out).toLowerCase() === '.md'
347
+ ? renderGovernanceMarkdown(summary)
348
+ : JSON.stringify(summary, null, 2);
349
+ fs.writeFileSync(options.out, content, 'utf8');
350
+ }
324
351
  printGovernanceSummary(summary, options);
352
+ const snapshot = options.snapshot ? writeSnapshotArtifact(options.dir, 'governance', summary, {
353
+ sourceCommand: normalizedCommand,
354
+ }) : null;
355
+ if (options.out && !options.json) {
356
+ console.log(` Governance report written to ${options.out}`);
357
+ console.log('');
358
+ }
359
+ if (snapshot && !options.json) {
360
+ console.log(` Snapshot saved: ${snapshot.relativePath}`);
361
+ console.log(` Snapshot index: ${snapshot.indexPath}`);
362
+ console.log('');
363
+ }
325
364
  } else if (normalizedCommand === 'benchmark') {
326
365
  const report = await runBenchmark(options);
366
+ const snapshot = options.snapshot ? writeSnapshotArtifact(options.dir, 'benchmark', report, {
367
+ sourceCommand: normalizedCommand,
368
+ }) : null;
327
369
  if (options.out) {
328
370
  writeBenchmarkReport(report, options.out);
329
371
  }
@@ -332,6 +374,11 @@ async function main() {
332
374
  console.log(` Benchmark report written to ${options.out}`);
333
375
  console.log('');
334
376
  }
377
+ if (snapshot && !options.json) {
378
+ console.log(` Snapshot saved: ${snapshot.relativePath}`);
379
+ console.log(` Snapshot index: ${snapshot.indexPath}`);
380
+ console.log('');
381
+ }
335
382
  } else if (normalizedCommand === 'deep-review') {
336
383
  const { deepReview } = require('../src/deep-review');
337
384
  await deepReview(options);
@@ -345,6 +392,14 @@ async function main() {
345
392
  await setup(options);
346
393
  } else {
347
394
  const result = await audit(options);
395
+ const snapshot = options.snapshot ? writeSnapshotArtifact(options.dir, 'audit', result, {
396
+ sourceCommand: normalizedCommand,
397
+ }) : null;
398
+ if (snapshot && !options.json) {
399
+ console.log(` Snapshot saved: ${snapshot.relativePath}`);
400
+ console.log(` Snapshot index: ${snapshot.indexPath}`);
401
+ console.log('');
402
+ }
348
403
  if (options.threshold !== null && result.score < options.threshold) {
349
404
  if (!options.json) {
350
405
  console.error(` Threshold failed: score ${result.score}/100 is below required ${options.threshold}/100.\n`);
@@ -0,0 +1,91 @@
1
+ # Case Study: [Project Name]
2
+
3
+ ## Overview
4
+
5
+ | Field | Value |
6
+ |-------|-------|
7
+ | Project | [name] |
8
+ | Repo type | [e.g., backend API, frontend SPA, monorepo, data pipeline] |
9
+ | Team size | [e.g., solo, 3 developers, 15-person team] |
10
+ | Prior Claude setup | [none / basic CLAUDE.md / mature .claude/ config] |
11
+ | Claudex Setup version | [e.g., 1.9.0] |
12
+ | Date | [YYYY-MM-DD] |
13
+
14
+ ## Before State
15
+
16
+ **Audit score:** [X/100]
17
+ **Organic score:** [X/100]
18
+
19
+ What existed before running claudex-setup:
20
+ - [ ] CLAUDE.md
21
+ - [ ] .claude/settings.json
22
+ - [ ] Custom commands
23
+ - [ ] Rules
24
+ - [ ] Hooks
25
+ - [ ] Agents
26
+ - [ ] MCP servers
27
+
28
+ Key observations:
29
+ - [What was good already]
30
+ - [What was missing]
31
+ - [What was risky or misconfigured]
32
+
33
+ ## What We Did
34
+
35
+ **Mode used:** [discover / starter / augment / plan+apply / suggest-only]
36
+
37
+ **Steps:**
38
+ 1. Ran `npx claudex-setup discover` to understand current state
39
+ 2. [Next step]
40
+ 3. [Next step]
41
+
42
+ **Domain pack matched:** [e.g., backend-api]
43
+ **MCP packs recommended:** [e.g., context7-docs, postgres-mcp]
44
+
45
+ ## Changes Applied
46
+
47
+ | Change | Type | Risk | Applied? |
48
+ |--------|------|------|----------|
49
+ | [e.g., Created CLAUDE.md with architecture] | new file | low | yes |
50
+ | [e.g., Added hooks for auto-lint] | new config | medium | yes |
51
+ | [e.g., Added permission deny rules] | security | low | yes |
52
+
53
+ **Strengths preserved:**
54
+ - [What we explicitly kept unchanged]
55
+
56
+ ## After State
57
+
58
+ **Audit score:** [X/100] (was [X/100])
59
+ **Organic score:** [X/100] (was [X/100])
60
+ **Score improvement:** +[X] points
61
+
62
+ ## Measured Impact
63
+
64
+ | Metric | Before | After | Change |
65
+ |--------|--------|-------|--------|
66
+ | Audit score | X | X | +X |
67
+ | Checks passing | X/58 | X/58 | +X |
68
+ | Time to first productive session | Xm | Xm | -Xm |
69
+ | [Other metric] | | | |
70
+
71
+ ## What Worked Well
72
+
73
+ - [Specific thing that added clear value]
74
+ - [Another]
75
+
76
+ ## What Could Be Better
77
+
78
+ - [Specific improvement suggestion for the tool]
79
+ - [Another]
80
+
81
+ ## Verdict
82
+
83
+ **Would recommend:** [Yes / Yes with caveats / Not yet]
84
+
85
+ **Best for:** [Who should try this based on our experience]
86
+
87
+ **One-line summary:** [e.g., "Took our Claude setup from basic to production-ready in 15 minutes with zero breakage."]
88
+
89
+ ---
90
+
91
+ *Generated with claudex-setup v[version]. Case study template from CLAUDEX.*
@@ -0,0 +1,37 @@
1
+ # Claims Governance
2
+
3
+ Use this checklist before publishing product-facing claims about Claudex Setup.
4
+
5
+ ## Allowed only with evidence
6
+
7
+ - score delta claims
8
+ - organic score delta claims
9
+ - time-to-value claims
10
+ - recommendation acceptance rate claims
11
+ - reduction in manual corrections
12
+ - benchmark outcomes on named repo types
13
+
14
+ ## Evidence standard
15
+
16
+ Every claim should have:
17
+
18
+ - a benchmark run or pilot report
19
+ - the repo type or cohort it applies to
20
+ - the date the evidence was collected
21
+ - the exact metric definition
22
+ - the comparison method (`before/after`, `control/pilot`, or `observed over time`)
23
+
24
+ ## Avoid
25
+
26
+ - universal productivity multipliers
27
+ - unsupported token savings claims
28
+ - “works for every repo” language
29
+ - suspiciously precise numbers without a method section
30
+ - implying quality scores are objective truth rather than framework coverage
31
+
32
+ ## Safer phrasing
33
+
34
+ - "In benchmark mode, this repo improved from 41/100 to 60/100."
35
+ - "Starter-safe artifacts improved readiness on an isolated temp copy."
36
+ - "Suggest-only mode gives mature teams a zero-write review path."
37
+ - "Use governance mode to select permission profiles and inspect shipped hooks."
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: audit-repo
3
+ description: Run claudex-setup on the current repo and summarize the score, top gaps, and next command
4
+ ---
5
+
6
+ Run `npx claudex-setup --json` in the current project directory and summarize the result.
7
+
8
+ Your output should include:
9
+
10
+ 1. The overall score and organic score
11
+ 2. The top 3 next actions from `topNextActions`
12
+ 3. The suggested next command from `suggestedNextCommand`
13
+ 4. A short explanation of what the repo already does well if there are notable strengths
14
+
15
+ Behavior rules:
16
+
17
+ - If the user asks for the shortest version, run `npx claudex-setup --lite`
18
+ - If the user wants deeper no-write analysis, run `npx claudex-setup augment --json`
19
+ - If the score is below 50, explicitly recommend `npx claudex-setup setup`
20
+ - Never apply changes automatically from this skill
@@ -0,0 +1,9 @@
1
+ {
2
+ "article": {
3
+ "title": "Your Claude Code project scores 10/100. Here's how to fix it in 60 seconds.",
4
+ "published": false,
5
+ "tags": ["claude", "ai", "productivity", "devtools"],
6
+ "series": "Claude Code Optimization",
7
+ "body_markdown": "After cataloging **1,107 Claude Code entries** and verifying **948 with real evidence**, I found that most projects use barely 10% of what's available.\n\nI built a CLI that scores your project:\n\n```bash\nnpx claudex-setup\n```\n\nMost projects score **10-20 out of 100**. After running setup, they jump to **70+**.\n\n## The Top 10 Things You're Missing\n\n### 1. CLAUDE.md (Critical)\n\nClaude reads this file at the start of every session. Without it, Claude doesn't know your build commands, code style, or project rules.\n\nOur tool generates a smart CLAUDE.md that detects your framework, TypeScript config, and creates a Mermaid architecture diagram automatically.\n\n### 2. Mermaid Architecture Diagrams (73% Token Savings)\n\nA Mermaid diagram in CLAUDE.md gives Claude your project structure in a fraction of the tokens that prose requires.\n\n### 3. Hooks > CLAUDE.md Rules (100% vs 80%)\n\nCLAUDE.md instructions are advisory (~80% compliance). Hooks are deterministic (100%). Auto-lint after every edit. Every time.\n\n### 4. Custom Commands\n\nStop typing the same prompts. Create `/test`, `/deploy`, `/review` in `.claude/commands/`.\n\n### 5. Verification Loops (The #1 Best Practice)\n\n> *This is the single highest-leverage thing you can do.* — Anthropic Best Practices\n\nClaude performs dramatically better when it can verify its own work.\n\n### 6. XML Tags (30% Quality Boost)\n\nUse `<constraints>`, `<validation>` in CLAUDE.md for unambiguous instructions.\n\n### 7. Secrets Protection\n\nClaude Code loads `.env` automatically. Add deny rules to prevent reading sensitive files.\n\n### 8. /security-review\n\nBuilt-in OWASP Top 10 scanning. Most people don't know this command exists.\n\n### 9. Custom Agents\n\nSpecialized subagents: security-reviewer, test-writer in `.claude/agents/`.\n\n### 10. Skills (On-Demand Knowledge)\n\nReusable skills package expertise that Claude can load on demand.\n\n## Try It Now\n\n```bash\nnpx claudex-setup --lite # Quick scan\nnpx claudex-setup # Full audit\nnpx claudex-setup --snapshot # Save evidence artifact\nnpx claudex-setup governance --out governance.md\n```\n\nFree, open source, zero dependencies.\n\n**GitHub:** [github.com/DnaFin/claudex-setup](https://github.com/DnaFin/claudex-setup)\n**npm:** [npmjs.com/package/claudex-setup](https://www.npmjs.com/package/claudex-setup)\n\n---\n\n*Built from a research catalog of 1,107 Claude Code entries, 948 verified with evidence.*"
8
+ }
9
+ }
@@ -0,0 +1,160 @@
1
+ # Launch Posts — Ready to Publish
2
+
3
+ ## Post 1: Reddit r/ClaudeAI
4
+
5
+ **Title:** I built a tool that audits your project for Claude Code optimization — scores you 0-100
6
+
7
+ **Body:**
8
+ After cataloging 1,107 Claude Code entries and verifying 948 of them with evidence, I built a CLI that checks if your project is actually set up to get the most out of Claude Code.
9
+
10
+ Most projects score around 10-20/100. After running setup, they jump to 70+.
11
+
12
+ ```
13
+ npx claudex-setup
14
+ ```
15
+
16
+ It checks for: CLAUDE.md, hooks, custom commands, skills, agents, Mermaid diagrams, XML tags, path rules, MCP config, permissions, and more.
17
+
18
+ Then `npx claudex-setup setup` auto-creates everything that's missing, tailored to your stack (React, Python, TypeScript, etc).
19
+
20
+ Zero dependencies. No API keys. Runs entirely local.
21
+
22
+ GitHub: https://github.com/DnaFin/claudex-setup
23
+
24
+ Would love feedback!
25
+
26
+ ---
27
+
28
+ ## Post 2: Reddit r/ChatGPTCoding
29
+
30
+ **Title:** Your Claude Code project is probably running at 10% efficiency. Here's how to check.
31
+
32
+ **Body:**
33
+ I spent weeks cataloging every Claude Code feature, technique, and best practice — 1,107 total, 948 verified with real evidence.
34
+
35
+ Turns out most projects are missing basic stuff that makes a huge difference:
36
+ - No CLAUDE.md (Claude doesn't know your project conventions)
37
+ - No hooks (no auto-lint, no auto-test)
38
+ - No custom commands (repeating the same prompts manually)
39
+ - No Mermaid diagrams (wasting 73% more tokens on prose descriptions)
40
+
41
+ Built a quick checker:
42
+ ```
43
+ npx claudex-setup
44
+ ```
45
+
46
+ Scores your project 0-100, tells you exactly what to fix, and can auto-apply everything.
47
+
48
+ Free, open source, zero dependencies: https://github.com/DnaFin/claudex-setup
49
+
50
+ ---
51
+
52
+ ## Post 3: Dev.to Article
53
+
54
+ **Title:** 1,107 Claude Code Entries: What I Learned Building the Most Comprehensive Catalog
55
+
56
+ **Body (excerpt):**
57
+ I set out to catalog every single Claude Code capability, technique, and best practice. After repeated research cycles, I have 1,107 entries — 948 verified with real evidence.
58
+
59
+ Here are the top 10 things most developers are missing:
60
+
61
+ 1. **CLAUDE.md** — Claude reads this at the start of every session. Without it, Claude doesn't know your build commands, code style, or project rules.
62
+
63
+ 2. **Mermaid diagrams** — A Mermaid architecture diagram saves 73% tokens compared to describing your project in prose.
64
+
65
+ 3. **Hooks** — Auto-lint after every edit. Auto-test before every commit. Hooks fire 100% of the time, CLAUDE.md rules fire ~80%.
66
+
67
+ 4. **Custom commands** — `/test`, `/deploy`, `/review` — package your repeated workflows.
68
+
69
+ 5. **Verification loops** — Tell Claude how to verify its own work. Include test commands in CLAUDE.md.
70
+
71
+ 6. **Path-specific rules** — Different conventions for frontend vs backend files.
72
+
73
+ 7. **XML tags** — `<constraints>`, `<validation>` in CLAUDE.md = unambiguous instructions.
74
+
75
+ 8. **Custom agents** — Security reviewer, test writer — specialized subagents for focused tasks.
76
+
77
+ 9. **Skills** — Domain-specific workflows that load on demand, not every session.
78
+
79
+ 10. **MCP servers** — Connect Claude to your database, ticket system, Slack.
80
+
81
+ I packaged this into a CLI that checks your project:
82
+ ```
83
+ npx claudex-setup
84
+ ```
85
+
86
+ Full catalog: https://github.com/DnaFin/claudex-setup
87
+
88
+ ---
89
+
90
+ ## Post 4: Twitter/X Thread
91
+
92
+ **Tweet 1:**
93
+ I cataloged 1,107 Claude Code entries and verified 948 of them with evidence.
94
+
95
+ Most projects use less than 5% of what Claude Code can do.
96
+
97
+ Here's a free tool that checks your project and tells you exactly what's missing:
98
+
99
+ npx claudex-setup
100
+
101
+ Thread 🧵👇
102
+
103
+ **Tweet 2:**
104
+ The #1 thing you're probably missing: CLAUDE.md
105
+
106
+ It's a file Claude reads at the start of every session. Without it, Claude doesn't know your:
107
+ - Build commands
108
+ - Code style
109
+ - Testing framework
110
+ - Project architecture
111
+
112
+ Takes 2 minutes to create. Impact: massive.
113
+
114
+ **Tweet 3:**
115
+ #2: Mermaid diagrams in CLAUDE.md
116
+
117
+ A few hundred tokens of Mermaid syntax conveys what takes thousands of tokens in prose.
118
+
119
+ 73% token savings = faster responses, lower cost, better context.
120
+
121
+ **Tweet 4:**
122
+ #3: Hooks > CLAUDE.md rules
123
+
124
+ CLAUDE.md instructions = ~80% compliance
125
+ Hooks = 100% enforcement
126
+
127
+ Auto-lint after edits. Block commits without tests. Prevent force-push.
128
+
129
+ Hooks are deterministic. Instructions are advisory.
130
+
131
+ **Tweet 5:**
132
+ Want to check your project in 10 seconds?
133
+
134
+ npx claudex-setup
135
+
136
+ Scores 0-100. Shows what's missing. Auto-fixes with `setup`.
137
+
138
+ Free. Open source. Zero dependencies.
139
+
140
+ https://github.com/DnaFin/claudex-setup
141
+
142
+ ---
143
+
144
+ ## Post 5: Hacker News (Show HN)
145
+
146
+ **Title:** Show HN: claudex-setup – Audit any project for Claude Code optimization (1,107 entries)
147
+
148
+ **Body:**
149
+ I built a CLI tool that scores your project against Claude Code best practices.
150
+
151
+ After researching 1,107 entries (948 verified with evidence), most projects score 10-20 out of 100 because they're missing basic optimizations like CLAUDE.md files, hooks, custom commands, and architecture diagrams.
152
+
153
+ npx claudex-setup → audit (0-100 score)
154
+ npx claudex-setup setup → auto-fix
155
+
156
+ Detects your stack (React, Python, TS, Rust, Go, etc) and tailors recommendations.
157
+
158
+ Zero dependencies, no API keys, runs locally.
159
+
160
+ https://github.com/DnaFin/claudex-setup
@@ -0,0 +1,30 @@
1
+ # Pilot Rollout Kit
2
+
3
+ ## Suggested pilot shape
4
+
5
+ 1. Choose 1-2 repos with active owners and low blast radius.
6
+ 2. Run `discover`, `suggest-only`, and `governance` before any write flow.
7
+ 3. Pick one permission profile and document why it fits the pilot.
8
+ 4. Run `benchmark` to capture a baseline and expected value.
9
+ 5. Use `plan` and selective `apply` for the first write batch.
10
+
11
+ ## Approval checklist
12
+
13
+ - Engineering owner approves scope.
14
+ - Security owner approves permission profile and hooks.
15
+ - Pilot owner records success metrics.
16
+ - Rollback expectations are documented before apply.
17
+
18
+ ## Success metrics
19
+
20
+ - readiness score delta
21
+ - organic score delta
22
+ - number of proposal bundles accepted
23
+ - rollback-free apply rate
24
+ - time to first useful Claude workflow
25
+
26
+ ## Rollback expectations
27
+
28
+ - every apply run must produce a rollback artifact
29
+ - rejected starter artifacts are deleted using the rollback manifest
30
+ - rollback decisions are logged in the activity trail
@@ -0,0 +1,31 @@
1
+ # claudex-setup Release Checklist
2
+
3
+ Use this before tagging or publishing a release.
4
+
5
+ ## Code And Packaging
6
+
7
+ - bump `package.json` version intentionally
8
+ - update `CHANGELOG.md` with the shipped changes
9
+ - run `npm test`
10
+ - run `npm pack --dry-run`
11
+
12
+ ## Product Surface Consistency
13
+
14
+ - verify `README.md` reflects the current CLI surface
15
+ - verify `docs/index.html` reflects the current CLI surface
16
+ - verify new flags and commands appear in `--help`
17
+ - verify proof numbers and public claims match the current state
18
+
19
+ ## Trust And Governance
20
+
21
+ - run `npx claudex-setup --snapshot` on the repo itself
22
+ - run `npx claudex-setup governance --out governance.md`
23
+ - verify MCP package names and env preflight behavior for changed packs
24
+ - verify no recommendation regressions on known scenarios
25
+
26
+ ## Release Readiness
27
+
28
+ - confirm npm publish target and account are correct
29
+ - confirm git branch / commit matches the intended release
30
+ - confirm any new templates or content files are included in the package
31
+ - capture one final note about what changed and what still remains intentionally deferred
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "claudex-setup",
3
- "version": "1.10.2",
4
- "description": "Audit and improve Claude Code readiness with discover, plan, apply, governance, and benchmark workflows.",
3
+ "version": "1.10.3",
4
+ "description": "Score your repo's Claude Code setup against 62 checks. See gaps, apply fixes selectively with rollback, govern hooks and permissions, and benchmark impact — without breaking existing config.",
5
5
  "main": "src/index.js",
6
6
  "bin": {
7
7
  "claudex-setup": "bin/cli.js"
8
8
  },
9
9
  "files": [
10
10
  "bin",
11
+ "content",
11
12
  "src",
12
13
  "README.md",
13
14
  "CHANGELOG.md"
package/src/activity.js CHANGED
@@ -1,5 +1,6 @@
1
1
  const fs = require('fs');
2
2
  const path = require('path');
3
+ const { version } = require('../package.json');
3
4
 
4
5
  function timestampId() {
5
6
  return new Date().toISOString().replace(/[:.]/g, '-');
@@ -9,9 +10,11 @@ function ensureArtifactDirs(dir) {
9
10
  const root = path.join(dir, '.claude', 'claudex-setup');
10
11
  const activityDir = path.join(root, 'activity');
11
12
  const rollbackDir = path.join(root, 'rollbacks');
13
+ const snapshotDir = path.join(root, 'snapshots');
12
14
  fs.mkdirSync(activityDir, { recursive: true });
13
15
  fs.mkdirSync(rollbackDir, { recursive: true });
14
- return { root, activityDir, rollbackDir };
16
+ fs.mkdirSync(snapshotDir, { recursive: true });
17
+ return { root, activityDir, rollbackDir, snapshotDir };
15
18
  }
16
19
 
17
20
  function writeJson(filePath, payload) {
@@ -53,8 +56,116 @@ function writeRollbackArtifact(dir, payload) {
53
56
  };
54
57
  }
55
58
 
59
+ function summarizeSnapshot(snapshotKind, payload) {
60
+ if (snapshotKind === 'audit') {
61
+ return {
62
+ score: payload.score,
63
+ organicScore: payload.organicScore,
64
+ passed: payload.passed,
65
+ failed: payload.failed,
66
+ checkCount: payload.checkCount,
67
+ suggestedNextCommand: payload.suggestedNextCommand,
68
+ topActionKeys: Array.isArray(payload.topNextActions)
69
+ ? payload.topNextActions.slice(0, 3).map(item => item.key)
70
+ : [],
71
+ };
72
+ }
73
+
74
+ if (snapshotKind === 'augment' || snapshotKind === 'suggest-only') {
75
+ return {
76
+ score: payload.projectSummary?.score,
77
+ organicScore: payload.projectSummary?.organicScore,
78
+ maturity: payload.projectSummary?.maturity,
79
+ domains: payload.projectSummary?.domains || [],
80
+ topActionKeys: Array.isArray(payload.topNextActions)
81
+ ? payload.topNextActions.slice(0, 3).map(item => item.key)
82
+ : [],
83
+ };
84
+ }
85
+
86
+ if (snapshotKind === 'benchmark') {
87
+ return {
88
+ beforeScore: payload.before?.score,
89
+ afterScore: payload.after?.score,
90
+ scoreDelta: payload.delta?.score,
91
+ organicDelta: payload.delta?.organicScore,
92
+ decisionGuidance: payload.executiveSummary?.decisionGuidance || null,
93
+ };
94
+ }
95
+
96
+ if (snapshotKind === 'governance') {
97
+ return {
98
+ permissionProfiles: Array.isArray(payload.permissionProfiles) ? payload.permissionProfiles.length : 0,
99
+ hooks: Array.isArray(payload.hookRegistry) ? payload.hookRegistry.length : 0,
100
+ policyPacks: Array.isArray(payload.policyPacks) ? payload.policyPacks.length : 0,
101
+ domainPacks: Array.isArray(payload.domainPacks) ? payload.domainPacks.length : 0,
102
+ mcpPacks: Array.isArray(payload.mcpPacks) ? payload.mcpPacks.length : 0,
103
+ };
104
+ }
105
+
106
+ return {};
107
+ }
108
+
109
+ function updateSnapshotIndex(snapshotDir, record) {
110
+ const indexPath = path.join(snapshotDir, 'index.json');
111
+ let entries = [];
112
+
113
+ if (fs.existsSync(indexPath)) {
114
+ try {
115
+ entries = JSON.parse(fs.readFileSync(indexPath, 'utf8'));
116
+ if (!Array.isArray(entries)) {
117
+ entries = [];
118
+ }
119
+ } catch {
120
+ entries = [];
121
+ }
122
+ }
123
+
124
+ entries.push(record);
125
+ fs.writeFileSync(indexPath, JSON.stringify(entries, null, 2), 'utf8');
126
+ }
127
+
128
+ function writeSnapshotArtifact(dir, snapshotKind, payload, meta = {}) {
129
+ const id = timestampId();
130
+ const { snapshotDir } = ensureArtifactDirs(dir);
131
+ const filePath = path.join(snapshotDir, `${id}-${snapshotKind}.json`);
132
+ const summary = summarizeSnapshot(snapshotKind, payload);
133
+ const envelope = {
134
+ schemaVersion: 1,
135
+ artifactType: 'snapshot',
136
+ snapshotKind,
137
+ id,
138
+ createdAt: new Date().toISOString(),
139
+ generatedBy: `claudex-setup@${version}`,
140
+ directory: dir,
141
+ summary,
142
+ ...meta,
143
+ payload,
144
+ };
145
+
146
+ writeJson(filePath, envelope);
147
+
148
+ const record = {
149
+ id,
150
+ snapshotKind,
151
+ createdAt: envelope.createdAt,
152
+ relativePath: path.relative(dir, filePath),
153
+ summary,
154
+ };
155
+ updateSnapshotIndex(snapshotDir, record);
156
+
157
+ return {
158
+ id,
159
+ filePath,
160
+ relativePath: path.relative(dir, filePath),
161
+ indexPath: path.relative(dir, path.join(snapshotDir, 'index.json')),
162
+ summary,
163
+ };
164
+ }
165
+
56
166
  module.exports = {
57
167
  ensureArtifactDirs,
58
168
  writeActivityArtifact,
59
169
  writeRollbackArtifact,
170
+ writeSnapshotArtifact,
60
171
  };
package/src/analyze.js CHANGED
@@ -351,7 +351,7 @@ async function analyzeProject(options) {
351
351
  },
352
352
  strengthsPreserved: toStrengths(auditResult.results),
353
353
  gapsIdentified: toGaps(auditResult.results),
354
- topNextActions: auditResult.quickWins,
354
+ topNextActions: auditResult.topNextActions || auditResult.quickWins,
355
355
  recommendedImprovements: toRecommendations(auditResult),
356
356
  recommendedDomainPacks,
357
357
  recommendedMcpPacks,
@@ -417,7 +417,14 @@ function printAnalysis(report, options = {}) {
417
417
  console.log(c(' Top 5 Next Actions', 'magenta'));
418
418
  report.topNextActions.slice(0, 5).forEach((item, index) => {
419
419
  console.log(` ${index + 1}. ${item.name}`);
420
- console.log(c(` ${item.fix}`, 'dim'));
420
+ console.log(c(` Why: ${item.why || item.fix}`, 'dim'));
421
+ if (Array.isArray(item.signals) && item.signals.length > 0) {
422
+ console.log(c(` Trace: ${item.signals.join(' | ')}`, 'dim'));
423
+ }
424
+ if (item.risk || item.confidence) {
425
+ console.log(c(` Risk: ${item.risk || 'low'} | Confidence: ${item.confidence || 'medium'}`, 'dim'));
426
+ }
427
+ console.log(c(` Fix: ${item.fix}`, 'dim'));
421
428
  });
422
429
  console.log('');
423
430
  }
@@ -500,7 +507,15 @@ function exportMarkdown(report) {
500
507
  lines.push('## Top Next Actions');
501
508
  lines.push('');
502
509
  report.topNextActions.slice(0, 5).forEach((item, index) => {
503
- lines.push(`${index + 1}. **${item.name}** — ${item.fix}`);
510
+ lines.push(`${index + 1}. **${item.name}**`);
511
+ lines.push(` - Why: ${item.why || item.fix}`);
512
+ if (Array.isArray(item.signals) && item.signals.length > 0) {
513
+ lines.push(` - Trace: ${item.signals.join(' | ')}`);
514
+ }
515
+ if (item.risk || item.confidence) {
516
+ lines.push(` - Risk / Confidence: ${item.risk || 'low'} / ${item.confidence || 'medium'}`);
517
+ }
518
+ lines.push(` - Fix: ${item.fix}`);
504
519
  });
505
520
  lines.push('');
506
521
  }
package/src/audit.js CHANGED
@@ -30,10 +30,60 @@ function progressBar(score, max = 100, width = 20) {
30
30
  }
31
31
 
32
32
  const IMPACT_ORDER = { critical: 3, high: 2, medium: 1, low: 0 };
33
+ const CATEGORY_MODULES = {
34
+ memory: 'CLAUDE.md',
35
+ quality: 'verification',
36
+ git: 'safety',
37
+ workflow: 'commands-agents-skills',
38
+ security: 'permissions',
39
+ automation: 'hooks',
40
+ design: 'design-rules',
41
+ devops: 'ci-devops',
42
+ hygiene: 'project-hygiene',
43
+ performance: 'context-management',
44
+ tools: 'mcp-tools',
45
+ prompting: 'prompt-structure',
46
+ features: 'modern-claude-features',
47
+ 'quality-deep': 'quality-deep',
48
+ };
49
+ const ACTION_RATIONALES = {
50
+ noBypassPermissions: 'bypassPermissions skips the main safety layer. Explicit allow and deny rules create safer autonomy.',
51
+ secretsProtection: 'Without secret protection, Claude can accidentally inspect sensitive files and leak them into outputs.',
52
+ permissionDeny: 'Deny rules are the strongest way to prevent dangerous reads and destructive operations.',
53
+ settingsPermissions: 'Explicit permission settings make the workflow safer, more governable, and easier to review.',
54
+ testCommand: 'Without a test command, Claude cannot verify that its changes actually work before handoff.',
55
+ lintCommand: 'Without a lint command, Claude will miss formatting and style regressions that teams expect to catch automatically.',
56
+ buildCommand: 'Without a build command, compile and packaging failures stay invisible until later in the workflow.',
57
+ ciPipeline: 'CI is what turns a local setup improvement into a repeatable team-wide standard.',
58
+ securityReview: 'If you do not wire in security review guidance, high-risk changes are easier to ship without the right scrutiny.',
59
+ skills: 'Skills package reusable expertise so Claude does not need the same context re-explained every session.',
60
+ multipleAgents: 'Specialized agents unlock role-based work such as security review, implementation, and QA in parallel.',
61
+ multipleMcpServers: 'A richer MCP surface gives Claude access to live tools and documentation instead of stale assumptions.',
62
+ roleDefinition: 'A clear role definition calibrates how Claude thinks, explains, and validates work in this repo.',
63
+ importSyntax: 'Imported modules keep CLAUDE.md maintainable as the workflow grows more sophisticated.',
64
+ claudeMd: 'CLAUDE.md is the foundation of project-specific context. Without it, Claude starts every task half-blind.',
65
+ hooks: 'Hooks enforce the rules programmatically, which is much more reliable than relying on instructions alone.',
66
+ pathRules: 'Path-specific rules help Claude behave differently in different parts of the repo without global noise.',
67
+ context7Mcp: 'Live documentation reduces version drift and cuts down on confident but outdated answers.',
68
+ };
33
69
 
34
- function getQuickWins(failed) {
70
+ function riskFromImpact(impact) {
71
+ if (impact === 'critical') return 'high';
72
+ if (impact === 'high') return 'medium';
73
+ return 'low';
74
+ }
75
+
76
+ function confidenceFromImpact(impact) {
77
+ return impact === 'critical' || impact === 'high' ? 'high' : 'medium';
78
+ }
79
+
80
+ function getPrioritizedFailed(failed) {
35
81
  const prioritized = failed.filter(r => !(r.category === 'hygiene' && r.impact === 'low'));
36
- const pool = prioritized.length > 0 ? prioritized : failed;
82
+ return prioritized.length > 0 ? prioritized : failed;
83
+ }
84
+
85
+ function getQuickWins(failed) {
86
+ const pool = getPrioritizedFailed(failed);
37
87
 
38
88
  return [...pool]
39
89
  .sort((a, b) => {
@@ -45,6 +95,87 @@ function getQuickWins(failed) {
45
95
  .slice(0, 3);
46
96
  }
47
97
 
98
+ function buildTopNextActions(failed, limit = 5) {
99
+ const pool = getPrioritizedFailed(failed);
100
+
101
+ return [...pool]
102
+ .sort((a, b) => {
103
+ const impactA = IMPACT_ORDER[a.impact] ?? 0;
104
+ const impactB = IMPACT_ORDER[b.impact] ?? 0;
105
+ if (impactA !== impactB) return impactB - impactA;
106
+ return (a.fix || '').length - (b.fix || '').length;
107
+ })
108
+ .slice(0, limit)
109
+ .map(({ key, name, impact, fix, category }) => ({
110
+ key,
111
+ name,
112
+ impact,
113
+ category,
114
+ module: CATEGORY_MODULES[category] || category,
115
+ fix,
116
+ why: ACTION_RATIONALES[key] || fix,
117
+ risk: riskFromImpact(impact),
118
+ confidence: confidenceFromImpact(impact),
119
+ signals: [
120
+ `failed-check:${key}`,
121
+ `impact:${impact}`,
122
+ `category:${category}`,
123
+ ],
124
+ }));
125
+ }
126
+
127
+ function inferSuggestedNextCommand(result) {
128
+ const actionKeys = new Set((result.topNextActions || []).map(item => item.key));
129
+
130
+ if (result.failed === 0) {
131
+ return 'npx claudex-setup augment';
132
+ }
133
+
134
+ if (
135
+ result.score < 50 ||
136
+ actionKeys.has('claudeMd') ||
137
+ actionKeys.has('hooks') ||
138
+ actionKeys.has('settingsPermissions') ||
139
+ actionKeys.has('permissionDeny')
140
+ ) {
141
+ return 'npx claudex-setup setup';
142
+ }
143
+
144
+ if (result.score < 80) {
145
+ return 'npx claudex-setup suggest-only';
146
+ }
147
+
148
+ return 'npx claudex-setup augment';
149
+ }
150
+
151
+ function printLiteAudit(result, dir) {
152
+ console.log('');
153
+ console.log(colorize(' claudex-setup quick scan', 'bold'));
154
+ console.log(colorize(' ═══════════════════════════════════════', 'dim'));
155
+ console.log(colorize(` Scanning: ${dir}`, 'dim'));
156
+ console.log('');
157
+ console.log(` Score: ${colorize(`${result.score}/100`, 'bold')}`);
158
+ console.log('');
159
+
160
+ if (result.failed === 0) {
161
+ console.log(colorize(' Your Claude setup looks solid.', 'green'));
162
+ console.log(` Next: ${colorize(result.suggestedNextCommand, 'bold')}`);
163
+ console.log('');
164
+ return;
165
+ }
166
+
167
+ console.log(colorize(' Top 3 things to fix right now:', 'magenta'));
168
+ console.log('');
169
+ result.liteSummary.topNextActions.forEach((item, index) => {
170
+ console.log(` ${index + 1}. ${colorize(item.name, 'bold')}`);
171
+ console.log(colorize(` Why: ${item.why}`, 'dim'));
172
+ console.log(colorize(` Fix: ${item.fix}`, 'dim'));
173
+ });
174
+ console.log('');
175
+ console.log(` Ready? Run: ${colorize(result.suggestedNextCommand, 'bold')}`);
176
+ console.log('');
177
+ }
178
+
48
179
  async function audit(options) {
49
180
  const silent = options.silent || false;
50
181
  const ctx = new ProjectContext(options.dir);
@@ -91,6 +222,7 @@ async function audit(options) {
91
222
  const organicEarned = organicPassed.reduce((sum, r) => sum + (weights[r.impact] || 5), 0);
92
223
  const organicScore = maxScore > 0 ? Math.round((organicEarned / maxScore) * 100) : 0;
93
224
  const quickWins = getQuickWins(failed);
225
+ const topNextActions = buildTopNextActions(failed, 5);
94
226
  const result = {
95
227
  score,
96
228
  organicScore,
@@ -102,6 +234,12 @@ async function audit(options) {
102
234
  stacks,
103
235
  results,
104
236
  quickWins: quickWins.map(({ key, name, impact, fix, category }) => ({ key, name, impact, category, fix })),
237
+ topNextActions,
238
+ };
239
+ result.suggestedNextCommand = inferSuggestedNextCommand(result);
240
+ result.liteSummary = {
241
+ topNextActions: topNextActions.slice(0, 3),
242
+ nextCommand: result.suggestedNextCommand,
105
243
  };
106
244
 
107
245
  // Silent mode: skip all output, just return result
@@ -119,6 +257,12 @@ async function audit(options) {
119
257
  return result;
120
258
  }
121
259
 
260
+ if (options.lite) {
261
+ printLiteAudit(result, options.dir);
262
+ sendInsights(result);
263
+ return result;
264
+ }
265
+
122
266
  // Display results
123
267
  console.log('');
124
268
  console.log(colorize(' claudex-setup audit', 'bold'));
@@ -178,13 +322,16 @@ async function audit(options) {
178
322
  console.log('');
179
323
  }
180
324
 
181
- // Quick wins
182
- if (failed.length > 0) {
183
- console.log(colorize(' ⚡ Best next fixes', 'magenta'));
184
- for (let i = 0; i < quickWins.length; i++) {
185
- const r = quickWins[i];
186
- console.log(` ${i + 1}. ${colorize(r.name, 'bold')}`);
187
- console.log(colorize(` ${r.fix}`, 'dim'));
325
+ // Top next actions
326
+ if (topNextActions.length > 0) {
327
+ console.log(colorize(' ⚡ Top 5 Next Actions', 'magenta'));
328
+ for (let i = 0; i < topNextActions.length; i++) {
329
+ const item = topNextActions[i];
330
+ console.log(` ${i + 1}. ${colorize(item.name, 'bold')}`);
331
+ console.log(colorize(` Why: ${item.why}`, 'dim'));
332
+ console.log(colorize(` Trace: ${item.signals.join(' | ')}`, 'dim'));
333
+ console.log(colorize(` Risk: ${item.risk} | Confidence: ${item.confidence}`, 'dim'));
334
+ console.log(colorize(` Fix: ${item.fix}`, 'dim'));
188
335
  }
189
336
  console.log('');
190
337
  }
@@ -194,7 +341,7 @@ async function audit(options) {
194
341
  console.log(` ${colorize(`${passed.length}/${applicable.length}`, 'bold')} checks passing${skipped.length > 0 ? colorize(` (${skipped.length} not applicable)`, 'dim') : ''}`);
195
342
 
196
343
  if (failed.length > 0) {
197
- console.log(` Run ${colorize('npx claudex-setup setup', 'bold')} to create starter-safe defaults`);
344
+ console.log(` Next command: ${colorize(result.suggestedNextCommand, 'bold')}`);
198
345
  }
199
346
 
200
347
  console.log('');
@@ -1,11 +1,7 @@
1
1
  {
2
2
  "synced_from": "claudex",
3
- "synced_at": "2026-03-31T19:30:00Z",
3
+ "synced_at": "2026-04-02T15:12:04Z",
4
4
  "total_items": 1107,
5
5
  "tested": 948,
6
- "last_id": 1157,
7
- "domain_packs": 16,
8
- "mcp_packs": 26,
9
- "anti_patterns": 53,
10
- "contract_version": "1.0.0"
6
+ "last_id": 1157
11
7
  }
package/src/governance.js CHANGED
@@ -386,6 +386,74 @@ function printGovernanceSummary(summary, options = {}) {
386
386
  console.log('');
387
387
  }
388
388
 
389
+ function renderGovernanceMarkdown(summary) {
390
+ const lines = [
391
+ '# Claudex Setup Governance Report',
392
+ '',
393
+ 'This report summarizes the shipped governance surface for Claude Code rollout, review, and pilot approval.',
394
+ '',
395
+ '## Permission Profiles',
396
+ ];
397
+
398
+ for (const profile of summary.permissionProfiles) {
399
+ lines.push(`- **${profile.label}** \`${profile.key}\` | risk: \`${profile.risk}\` | defaultMode: \`${profile.defaultMode}\``);
400
+ lines.push(` - Use when: ${profile.useWhen}`);
401
+ lines.push(` - Behavior: ${profile.behavior}`);
402
+ if (Array.isArray(profile.deny) && profile.deny.length > 0) {
403
+ lines.push(` - Deny rules: ${profile.deny.join(', ')}`);
404
+ }
405
+ }
406
+
407
+ lines.push('', '## Hook Registry');
408
+ for (const hook of summary.hookRegistry) {
409
+ lines.push(`- **${hook.key}** \`${hook.triggerPoint}${hook.matcher ? ` ${hook.matcher}` : ''}\` | risk: \`${hook.risk}\``);
410
+ lines.push(` - File: ${hook.file}`);
411
+ lines.push(` - Purpose: ${hook.purpose}`);
412
+ lines.push(` - Dry run: ${hook.dryRunExample}`);
413
+ lines.push(` - Rollback: ${hook.rollbackPath}`);
414
+ }
415
+
416
+ lines.push('', '## Policy Packs');
417
+ for (const pack of summary.policyPacks) {
418
+ lines.push(`- **${pack.label}**`);
419
+ lines.push(` - Use when: ${pack.useWhen}`);
420
+ lines.push(` - Modules: ${pack.modules.join(', ')}`);
421
+ }
422
+
423
+ lines.push('', `## Domain Packs (${summary.domainPacks.length})`);
424
+ for (const pack of summary.domainPacks) {
425
+ lines.push(`- **${pack.label}**: ${pack.useWhen}`);
426
+ }
427
+
428
+ lines.push('', `## MCP Packs (${summary.mcpPacks.length})`);
429
+ for (const pack of summary.mcpPacks) {
430
+ lines.push(`- **${pack.label}**: ${Object.keys(pack.servers).join(', ')}`);
431
+ }
432
+
433
+ lines.push('', '## Pilot Rollout Kit', '### Recommended Scope');
434
+ for (const item of summary.pilotRolloutKit.recommendedScope) {
435
+ lines.push(`- ${item}`);
436
+ }
437
+
438
+ lines.push('', '### Approvals');
439
+ for (const item of summary.pilotRolloutKit.approvals) {
440
+ lines.push(`- ${item}`);
441
+ }
442
+
443
+ lines.push('', '### Success Metrics');
444
+ for (const item of summary.pilotRolloutKit.successMetrics) {
445
+ lines.push(`- ${item}`);
446
+ }
447
+
448
+ lines.push('', '### Rollback Expectations');
449
+ for (const item of summary.pilotRolloutKit.rollbackExpectations) {
450
+ lines.push(`- ${item}`);
451
+ }
452
+
453
+ lines.push('');
454
+ return lines.join('\n');
455
+ }
456
+
389
457
  module.exports = {
390
458
  PERMISSION_PROFILES,
391
459
  getPermissionProfile,
@@ -394,4 +462,5 @@ module.exports = {
394
462
  buildSettingsForProfile,
395
463
  getGovernanceSummary,
396
464
  printGovernanceSummary,
465
+ renderGovernanceMarkdown,
397
466
  };
package/src/insights.js CHANGED
@@ -87,7 +87,8 @@ function sendInsights(auditResult) {
87
87
  */
88
88
  function getLocalInsights(auditResult) {
89
89
  const { results } = auditResult;
90
- const failed = results.filter(r => !r.passed);
90
+ const applicable = results.filter(r => r.passed !== null);
91
+ const failed = applicable.filter(r => r.passed === false);
91
92
 
92
93
  // Top 3 most impactful fixes
93
94
  const impactOrder = { critical: 3, high: 2, medium: 1 };
@@ -98,7 +99,7 @@ function getLocalInsights(auditResult) {
98
99
 
99
100
  // Score breakdown by category
100
101
  const categories = {};
101
- for (const r of results) {
102
+ for (const r of applicable) {
102
103
  const cat = r.category || 'other';
103
104
  if (!categories[cat]) categories[cat] = { passed: 0, total: 0 };
104
105
  categories[cat].total++;
package/src/techniques.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * CLAUDEX Technique Database
3
- * Curated from 1,107 verified techniques, filtered to actionable setup recommendations.
3
+ * Curated from 1107 verified techniques, filtered to actionable setup recommendations.
4
4
  * Each technique includes: what to check, how to fix, impact level.
5
5
  */
6
6