claude-code-starter 0.13.0 → 0.14.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 (3) hide show
  1. package/README.md +54 -53
  2. package/dist/cli.js +91 -16
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -48,9 +48,9 @@ Automatically detects and configures for:
48
48
  | -------------- | ------------------------------------------------------------------- |
49
49
  | **Languages** | TypeScript, JavaScript, Python, Go, Rust, Java, Ruby, Swift, Kotlin |
50
50
  | **Frameworks** | Next.js, React, Vue, Svelte, FastAPI, Django, NestJS, Express, etc. |
51
- | **Tools** | npm, yarn, pnpm, bun, pip, cargo, go modules |
51
+ | **Tools** | npm, yarn, pnpm, bun, pip, cargo, go modules |
52
52
  | **Testing** | Jest, Vitest, Pytest, Go test, Rust test |
53
- | **Linting** | ESLint, Biome, Ruff, Pylint |
53
+ | **Linting** | ESLint, Biome, Ruff, Pylint |
54
54
 
55
55
  ## Generated Configurations
56
56
 
@@ -64,13 +64,13 @@ Based on your stack, creates:
64
64
 
65
65
  ## Commands
66
66
 
67
- | Command | Description |
68
- | ----------------- | ---------------------------------------- |
69
- | `/task <desc>` | Start a new task |
70
- | `/status` | Show current task |
71
- | `/done` | Mark task complete |
72
- | `/analyze <area>` | Deep dive into code |
73
- | `/code-review` | Review changes for quality and security |
67
+ | Command | Description |
68
+ | ----------------- | --------------------------------------- |
69
+ | `/task <desc>` | Start a new task |
70
+ | `/status` | Show current task |
71
+ | `/done` | Mark task complete |
72
+ | `/analyze <area>` | Deep dive into code |
73
+ | `/code-review` | Review changes for quality and security |
74
74
 
75
75
  ## CLI Options
76
76
 
@@ -179,41 +179,41 @@ flowchart LR
179
179
 
180
180
  ### Artifact Generation
181
181
 
182
- | Artifact Type | Generation Method |
183
- |---------------|-------------------|
184
- | **CLAUDE.md** | Claude CLI deep analysis of your actual source files |
185
- | **settings.json** | Generated with safe default permissions |
186
- | **Skills** | Core skills + framework-specific patterns (if detected) |
187
- | **Agents** | Code reviewer and test writer agents |
188
- | **Rules** | Language-specific conventions + general code style |
189
- | **Commands** | Task workflow commands (/task, /status, /done, /analyze) |
182
+ | Artifact Type | Generation Method |
183
+ | ----------------- | -------------------------------------------------------- |
184
+ | **CLAUDE.md** | Claude CLI deep analysis of your actual source files |
185
+ | **settings.json** | Generated with safe default permissions |
186
+ | **Skills** | Core skills + framework-specific patterns (if detected) |
187
+ | **Agents** | Code reviewer and test writer agents |
188
+ | **Rules** | Language-specific conventions + general code style |
189
+ | **Commands** | Task workflow commands (/task, /status, /done, /analyze) |
190
190
 
191
191
  ### Conflict Resolution
192
192
 
193
193
  When running on an existing project with `.claude/` configuration:
194
194
 
195
- | Scenario | Behavior |
196
- |----------|----------|
197
- | **New file** | Created |
198
- | **Existing file** | Skipped (preserved) |
199
- | **With `-f` flag** | Overwritten |
200
- | **state/task.md** | Always preserved |
195
+ | Scenario | Behavior |
196
+ | ------------------ | ------------------- |
197
+ | **New file** | Created |
198
+ | **Existing file** | Skipped (preserved) |
199
+ | **With `-f` flag** | Overwritten |
200
+ | **state/task.md** | Always preserved |
201
201
 
202
202
  ### Framework-Specific Patterns
203
203
 
204
204
  When a framework is detected, additional skills are generated:
205
205
 
206
- | Framework | Generated Skill |
207
- |-----------|-----------------|
208
- | Next.js | `nextjs-patterns.md` - App Router, Server Components |
209
- | React | `react-components.md` - Hooks, component patterns |
210
- | FastAPI | `fastapi-patterns.md` - Async endpoints, Pydantic |
211
- | NestJS | `nestjs-patterns.md` - Modules, decorators, DI |
212
- | SwiftUI | `swiftui-patterns.md` - Declarative UI patterns |
213
- | UIKit | `uikit-patterns.md` - View controller patterns |
214
- | Vapor | `vapor-patterns.md` - Server-side Swift |
215
- | Jetpack Compose | `compose-patterns.md` - Compose UI patterns |
216
- | Android Views | `android-views-patterns.md` - XML views |
206
+ | Framework | Generated Skill |
207
+ | --------------- | ---------------------------------------------------- |
208
+ | Next.js | `nextjs-patterns.md` - App Router, Server Components |
209
+ | React | `react-components.md` - Hooks, component patterns |
210
+ | FastAPI | `fastapi-patterns.md` - Async endpoints, Pydantic |
211
+ | NestJS | `nestjs-patterns.md` - Modules, decorators, DI |
212
+ | SwiftUI | `swiftui-patterns.md` - Declarative UI patterns |
213
+ | UIKit | `uikit-patterns.md` - View controller patterns |
214
+ | Vapor | `vapor-patterns.md` - Server-side Swift |
215
+ | Jetpack Compose | `compose-patterns.md` - Compose UI patterns |
216
+ | Android Views | `android-views-patterns.md` - XML views |
217
217
 
218
218
  ## Requirements
219
219
 
@@ -228,14 +228,14 @@ This project uses GitHub Actions for continuous integration and automated releas
228
228
 
229
229
  Every pull request targeting `main` runs:
230
230
 
231
- | Check | Description |
232
- |-------|-------------|
233
- | **Lint** | Biome lint and format validation |
234
- | **Type Check** | TypeScript compilation check |
235
- | **Unit Tests** | Full test suite with Bun |
231
+ | Check | Description |
232
+ | ---------------- | -------------------------------------------------- |
233
+ | **Lint** | Biome lint and format validation |
234
+ | **Type Check** | TypeScript compilation check |
235
+ | **Unit Tests** | Full test suite with Bun |
236
236
  | **Code Quality** | Checks for console.log, `any` types, skipped tests |
237
- | **Build** | Verifies package builds successfully |
238
- | **Package Size** | Reports bundle size (warns if > 500KB) |
237
+ | **Build** | Verifies package builds successfully |
238
+ | **Package Size** | Reports bundle size (warns if > 500KB) |
239
239
 
240
240
  ### Automated Releases (`.github/workflows/release.yml`)
241
241
 
@@ -252,24 +252,25 @@ When code is merged to `main`, semantic-release automatically:
252
252
 
253
253
  Use these prefixes for automatic versioning:
254
254
 
255
- | Prefix | Version Bump | Example |
256
- |--------|--------------|---------|
257
- | `feat:` | Minor | `feat: add dark mode support` |
258
- | `fix:` | Patch | `fix: resolve memory leak` |
259
- | `perf:` | Patch | `perf: optimize image loading` |
260
- | `BREAKING CHANGE:` | Major | `feat!: redesign API` |
261
- | `docs:`, `chore:`, `ci:` | No release | `docs: update README` |
255
+ | Prefix | Version Bump | Example |
256
+ | ------------------------ | ------------ | ------------------------------ |
257
+ | `feat:` | Minor | `feat: add dark mode support` |
258
+ | `fix:` | Patch | `fix: resolve memory leak` |
259
+ | `perf:` | Patch | `perf: optimize image loading` |
260
+ | `BREAKING CHANGE:` | Major | `feat!: redesign API` |
261
+ | `docs:`, `chore:`, `ci:` | No release | `docs: update README` |
262
262
 
263
263
  ### Required Secrets
264
264
 
265
265
  Configure these in your GitHub repository settings:
266
266
 
267
- | Secret | Description | Required For |
268
- |--------|-------------|--------------|
269
- | `NPM_TOKEN` | npm authentication token | Publishing to npm |
270
- | `GITHUB_TOKEN` | Auto-provided by GitHub | Creating releases |
267
+ | Secret | Description | Required For |
268
+ | -------------- | ------------------------ | ----------------- |
269
+ | `NPM_TOKEN` | npm authentication token | Publishing to npm |
270
+ | `GITHUB_TOKEN` | Auto-provided by GitHub | Creating releases |
271
271
 
272
272
  To create an npm token:
273
+
273
274
  1. Go to [npmjs.com](https://npmjs.com) -> Access Tokens
274
275
  2. Generate a new "Automation" token
275
276
  3. Add it as `NPM_TOKEN` in GitHub repo -> Settings -> Secrets
@@ -298,4 +299,4 @@ bun run typecheck
298
299
 
299
300
  ## License
300
301
 
301
- MIT
302
+ MIT License. See [LICENSE](LICENSE) for details.
package/dist/cli.js CHANGED
@@ -665,7 +665,8 @@ ${templateVars}
665
665
  7. Execute Phase 5 - generate agent files
666
666
  8. Execute Phase 6 - generate rule files
667
667
  9. Execute Phase 7 - generate command files
668
- 10. Output a brief summary of what was generated and any gaps found
668
+ 10. Run the Anti-Redundancy Checklist one final time across ALL generated files \u2014 if any convention is restated or any rule lacks a \`paths:\` filter, fix it before proceeding
669
+ 11. Output a brief summary of what was generated and any gaps found
669
670
 
670
671
  Do NOT output file contents to stdout. Write all files to disk using the Write tool.
671
672
  Generate ALL files in a single pass \u2014 do not stop after CLAUDE.md.`;
@@ -807,6 +808,39 @@ something, omit that section entirely - do not fill in generic boilerplate.
807
808
 
808
809
  ---
809
810
 
811
+ ## Artifact Architecture
812
+
813
+ Understanding the context cost of each artifact type is critical. Artifacts load at different
814
+ frequencies, so place information where it costs the least while remaining accessible:
815
+
816
+ | Artifact | When Loaded | Context Cost |
817
+ |----------|-------------|--------------|
818
+ | CLAUDE.md | Every turn | Highest \u2014 keep concise |
819
+ | Rule without \`paths:\` | Every session | High \u2014 avoid generating these |
820
+ | Rule with \`paths:\` | When matching files are open | Medium \u2014 use sparingly |
821
+ | Skill / Command | On-demand (user invokes) | Low |
822
+ | Agent | Spawned in subprocess | Zero main-context cost |
823
+
824
+ ### Placement Rules
825
+
826
+ 1. **CLAUDE.md is the single source of truth for conventions.** All naming, style, commit format, and project rules live here and ONLY here.
827
+ 2. **NEVER generate rules without \`paths:\` filters.** A rule without \`paths:\` loads every session and competes with CLAUDE.md for context. All general style information belongs in CLAUDE.md.
828
+ 3. **Rules must be concise, non-redundant supplements.** A language rule (e.g., \`typescript.md\` with \`paths: ["**/*.ts"]\`) should ONLY contain language-specific gotchas (compiler flags, import quirks, tooling-specific settings) that don't belong in CLAUDE.md.
829
+ 4. **Skills are for rich on-demand methodology.** Write "Follow conventions in CLAUDE.md" instead of restating conventions. Focus skills on HOW (methodology), not WHAT (conventions).
830
+ 5. **Agents have zero main-context cost.** Put detailed checklists and review criteria in agent files \u2014 they run in subprocesses and don't consume the user's context window.
831
+ 6. **Each piece of information must live in exactly ONE place.** If it's in CLAUDE.md, don't repeat it in rules, skills, or commands.
832
+
833
+ ### Anti-Redundancy Checklist
834
+
835
+ Before writing EACH artifact, verify:
836
+ - [ ] No convention from CLAUDE.md is restated (commit format, naming, import order, etc.)
837
+ - [ ] No content from another artifact is duplicated
838
+ - [ ] Cross-references are used instead of copies (e.g., "Follow conventions in CLAUDE.md")
839
+ - [ ] All rules have a \`paths:\` filter
840
+ - [ ] Information is placed at the lowest-cost tier that still makes it accessible
841
+
842
+ ---
843
+
810
844
  ## Phase 1: Discovery (Read Before You Write)
811
845
 
812
846
  Perform these analysis steps IN ORDER. Do not skip any step. Do not start writing
@@ -981,6 +1015,27 @@ Written for an AI assistant that needs to understand PURPOSE to make good decisi
981
1015
 
982
1016
  {What NOT to do based on codebase conventions}
983
1017
 
1018
+ > **This Code Conventions section is the single source of truth.**
1019
+ > Rules and skills cross-reference this section \u2014 they do not repeat it.
1020
+
1021
+ ## Skills
1022
+
1023
+ {List each generated skill with a one-line description}
1024
+
1025
+ | Skill | Purpose |
1026
+ |-------|---------|
1027
+ | \`pattern-discovery\` | Discover and document codebase patterns |
1028
+ | ... | ... |
1029
+
1030
+ ## Agents
1031
+
1032
+ {List each generated agent with a one-line description}
1033
+
1034
+ | Agent | Purpose |
1035
+ |-------|---------|
1036
+ | \`code-reviewer\` | Reviews code for quality and security |
1037
+ | \`test-writer\` | Generates tests for code |
1038
+
984
1039
  ## Testing
985
1040
 
986
1041
  ### Running Tests
@@ -1023,19 +1078,30 @@ Before writing the CLAUDE.md, verify:
1023
1078
 
1024
1079
  - [ ] Every section contains PROJECT-SPECIFIC information (not generic boilerplate)
1025
1080
  - [ ] File paths referenced actually exist in the project
1081
+ - [ ] File references use \`path/to/file.ts (functionName)\` format, not line numbers
1026
1082
  - [ ] Commands listed are verified from package.json scripts or equivalent
1027
1083
  - [ ] Code conventions were observed from ACTUAL source files
1028
1084
  - [ ] The "Gotchas" section contains genuinely useful, non-obvious information
1029
1085
  - [ ] An AI reading this CLAUDE.md could add a new feature following existing patterns
1030
1086
  - [ ] Sections without real content have been omitted entirely
1031
1087
 
1088
+ ### Cross-Artifact Deduplication Check
1089
+
1090
+ Before writing ANY artifact (rule, skill, agent, command), verify:
1091
+ - [ ] No conventions from CLAUDE.md are restated (naming, commit format, import order, style)
1092
+ - [ ] No commit format description is restated outside CLAUDE.md
1093
+ - [ ] No content from one artifact is duplicated in another
1094
+ - [ ] Cross-references are used instead of copies (e.g., "Follow conventions in CLAUDE.md")
1095
+ - [ ] Every rule file has a \`paths:\` filter \u2014 no unfiltered rules
1096
+ - [ ] Single-language rules are justified (add genuine value beyond CLAUDE.md)
1097
+
1032
1098
  ---
1033
1099
 
1034
1100
  ## Important Guidelines
1035
1101
 
1036
1102
  1. **Be specific, not generic.** "Uses React with hooks" is useless. "Uses React 18 with Server Components via Next.js App Router, client components in src/components/client/ with 'use client' directive" is useful.
1037
1103
 
1038
- 2. **Reference real files.** Every pattern should reference an actual file as an example. Use \`path/to/file.ts:lineNumber\` format.
1104
+ 2. **Reference real files.** Every pattern should reference an actual file as an example. Use \`path/to/file.ts (functionName)\` format \u2014 NOT line numbers, which become stale as code changes.
1039
1105
 
1040
1106
  3. **Prioritize actionable information.** Focus on what helps an AI write correct code: where to put new code, what patterns to follow, what to avoid, how to test.
1041
1107
 
@@ -1054,6 +1120,12 @@ YAML frontmatter with \`name\`, \`description\`, and optionally \`globs\` for fi
1054
1120
  **Tailor ALL skills to this specific project** \u2014 use the actual test command, lint command,
1055
1121
  file patterns, and conventions discovered during Phase 1.
1056
1122
 
1123
+ ### Skill Content Rules
1124
+
1125
+ 1. **Cross-reference, don't copy** \u2014 write "Follow conventions in CLAUDE.md" instead of restating naming, style, or commit conventions. Skills focus on methodology (HOW to do something), not conventions (WHAT the conventions are).
1126
+ 2. **Use stable references** \u2014 reference code as \`path/to/file.ts (functionName)\`, not line numbers which become stale.
1127
+ 3. **No convention duplication** \u2014 if CLAUDE.md already documents commit format, import order, or naming rules, the skill must not repeat them.
1128
+
1057
1129
  ### 4.1 Core Skills (ALWAYS generate all 8)
1058
1130
 
1059
1131
  **\`.claude/skills/pattern-discovery.md\`**
@@ -1079,7 +1151,7 @@ file patterns, and conventions discovered during Phase 1.
1079
1151
  **\`.claude/skills/commit-hygiene.md\`**
1080
1152
  - Name: commit-hygiene
1081
1153
  - Description: Atomic commits, conventional format, size thresholds
1082
- - Content: Size thresholds (\xB1300 lines per commit), when-to-commit triggers, conventional commit format. If the project uses commitlint or similar, reference its config.
1154
+ - Content: Size thresholds (\xB1300 lines per commit), when-to-commit triggers. For commit format, write "Follow the commit conventions in CLAUDE.md" \u2014 do NOT restate the format here. If the project uses commitlint or similar, reference its config.
1083
1155
 
1084
1156
  **\`.claude/skills/code-deduplication.md\`**
1085
1157
  - Name: code-deduplication
@@ -1190,19 +1262,21 @@ var RULES_PROMPT = `---
1190
1262
 
1191
1263
  Write rule files to \`.claude/rules/\`. Each rule file needs YAML frontmatter.
1192
1264
 
1193
- ### Always Generate:
1265
+ ### Important: No Unfiltered Rules
1194
1266
 
1195
- **\`.claude/rules/code-style.md\`** (no \`paths\` \u2014 applies to all files)
1267
+ Do NOT generate a \`code-style.md\` rule or any rule without a \`paths:\` filter. General style information (formatter, linter commands, comment style, error handling, commit conventions, import ordering) belongs in CLAUDE.md \u2014 not in a rule that loads every session and duplicates it.
1196
1268
 
1197
- Content based on what was discovered in Phase 1:
1198
- - Which formatter/linter to use and how (include actual commands)
1199
- - Comment style: "why" not "what", keep comments current
1200
- - Error handling patterns specific to this project
1201
- - Git commit message conventions (conventional commits if commitlint is configured)
1202
- - Import ordering conventions found in the codebase
1269
+ NEVER generate rules without \`paths:\` filters. Every rule must target specific file types.
1203
1270
 
1204
1271
  ### Conditional Rules (generate ONLY if the language was detected):
1205
1272
 
1273
+ **Constraints for all conditional rules:**
1274
+ - Every rule MUST have a \`paths:\` filter targeting language-specific file extensions
1275
+ - Keep rules concise: 5-15 lines of content maximum
1276
+ - Rules must NOT repeat conventions already in CLAUDE.md (naming, style, commit format, import order)
1277
+ - For single-language projects: only generate a language rule if it adds genuine value beyond CLAUDE.md (compiler flags, import quirks, tooling-specific gotchas)
1278
+ - Focus on: compiler/interpreter settings, language-specific gotchas, tooling-specific configuration \u2014 not general naming or style
1279
+
1206
1280
  **TypeScript detected** \u2192 Write \`.claude/rules/typescript.md\`
1207
1281
  \`\`\`yaml
1208
1282
  ---
@@ -1298,10 +1372,11 @@ allowed-tools: ["Read", "Glob", "Grep", "Bash(git diff)", "Bash(git diff --cache
1298
1372
  description: "Review code changes for quality and security"
1299
1373
  ---
1300
1374
  \`\`\`
1301
- Body: Review staged and unstaged changes. Check for: naming consistency,
1302
- error handling, security issues, test coverage, import organization,
1303
- code duplication. Run the project's linter. Provide a summary with
1304
- severity levels (critical, warning, suggestion).`;
1375
+ Body: This command delegates to the code-reviewer agent for thorough review.
1376
+ 1. Run \`git diff\` and \`git diff --cached\` to identify staged and unstaged changes
1377
+ 2. Spawn the \`code-reviewer\` agent to perform the full review
1378
+ 3. If the agent is unavailable, perform a lightweight review: run the linter and check for obvious issues
1379
+ Do NOT duplicate the code-reviewer agent's checklist here \u2014 the agent has the full review criteria.`;
1305
1380
 
1306
1381
  // src/cli.ts
1307
1382
  var __dirname2 = path3.dirname(fileURLToPath(import.meta.url));
@@ -1833,7 +1908,7 @@ function runClaudeAnalysis(projectDir, projectInfo) {
1833
1908
  text: "Claude is analyzing your project...",
1834
1909
  spinner: {
1835
1910
  interval: 200,
1836
- frames: ["\xB7", "\u2722", "\u2733", "\u2736", "\u273B", "\u273D", "\u273B", "\u2736", "\u2733", "\u2722"]
1911
+ frames: ["\xB7", "\u2722", "\u2733", "\u2736", "\u2733", "\u2722"]
1837
1912
  },
1838
1913
  color: "cyan"
1839
1914
  }).start();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-starter",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "description": "A lightweight starter kit for AI-assisted development with Claude Code",
5
5
  "keywords": [
6
6
  "claude",