claudeos-core 2.4.1 → 2.4.2

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/README.md CHANGED
@@ -7,45 +7,27 @@
7
7
  [![license](https://img.shields.io/npm/l/claudeos-core.svg?color=blue)](LICENSE)
8
8
  [![downloads](https://img.shields.io/npm/dm/claudeos-core.svg?logo=npm&color=blue&label=downloads)](https://www.npmjs.com/package/claudeos-core)
9
9
 
10
- **Make Claude Code follow YOUR project's conventions on the first trynot generic defaults.**
11
-
12
- A deterministic Node.js scanner reads your code first; a 4-pass Claude pipeline then writes the full set — `CLAUDE.md` + auto-loaded `.claude/rules/` + standards + skills + L4 memory. 10 output languages, 5 post-generation validators, and an explicit path allowlist that prevents the LLM from inventing files or frameworks not in your code.
13
-
14
- Works on [**12 stacks**](#supported-stacks) (monorepos included) — one `npx` command, no config, resume-safe, idempotent.
10
+ **A deterministic CLI that auto-generates `CLAUDE.md` + `.claude/rules/` from your actual source code Node.js scanner + 4-pass Claude pipeline + 5 validators. 12 stacks, 10 languages, no invented paths.**
15
11
 
16
12
  ```bash
17
13
  npx claudeos-core init
18
14
  ```
19
15
 
16
+ Works on [**12 stacks**](#supported-stacks) (monorepos included) — one command, no config, resume-safe, idempotent.
17
+
20
18
  [🇰🇷 한국어](README.ko.md) · [🇨🇳 中文](README.zh-CN.md) · [🇯🇵 日本語](README.ja.md) · [🇪🇸 Español](README.es.md) · [🇻🇳 Tiếng Việt](README.vi.md) · [🇮🇳 हिन्दी](README.hi.md) · [🇷🇺 Русский](README.ru.md) · [🇫🇷 Français](README.fr.md) · [🇩🇪 Deutsch](README.de.md)
21
19
 
22
20
  ---
23
21
 
24
22
  ## What is this?
25
23
 
26
- You use Claude Code. It's powerful, but every session starts fresh it has no memory of how _your_ project is structured. So it falls back to "generally good" defaults that rarely match what your team actually does:
27
-
28
- - Your team uses **MyBatis**, but Claude generates JPA repositories.
29
- - Your response wrapper is `ApiResponse.ok()`, but Claude writes `ResponseEntity.success()`.
30
- - Your packages are layer-first (`controller/order/`), but Claude creates domain-first (`order/controller/`).
31
- - Your errors go through centralized middleware, but Claude scatters `try/catch` in every endpoint.
32
-
33
- You'd want a `.claude/rules/` set per project — Claude Code auto-loads it every session — but writing those rules by hand for each new repo takes hours, and they drift as the code evolves.
24
+ Claude Code falls back to framework defaults every session. Your team uses **MyBatis**, but Claude writes JPA. Your wrapper is `ApiResponse.ok()`, but Claude writes `ResponseEntity.success()`. Your packages are layer-first, but Claude generates domain-first. Hand-writing `.claude/rules/` for each repo solves it — until the code evolves and your rules drift.
34
25
 
35
- **ClaudeOS-Core writes them for you, from your actual source code.** A deterministic Node.js scanner reads your project first (stack, ORM, package layout, conventions, file paths). Then a 4-pass Claude pipeline turns the extracted facts into a complete documentation set:
26
+ **ClaudeOS-Core regenerates them deterministically, from your actual source code.** A Node.js scanner reads first (stack, ORM, package layout, file paths). A 4-pass Claude pipeline then writes the full set `CLAUDE.md` + auto-loaded `.claude/rules/` + standards + skills — constrained by an explicit path allowlist that the LLM cannot escape. Five validators verify the output before it ships.
36
27
 
37
- - **`CLAUDE.md`** the project index Claude reads on every session
38
- - **`.claude/rules/`** — auto-loaded rules per category (`00.core` / `10.backend` / `20.frontend` / `30.security-db` / `40.infra` / `60.memory` / `70.domains` / `80.verification`)
39
- - **`claudeos-core/standard/`** — reference docs (the "why" behind each rule)
40
- - **`claudeos-core/skills/`** — reusable patterns (CRUD scaffolding, page templates)
41
- - **`claudeos-core/memory/`** — decision log + failure patterns that grow with the project
28
+ The result: same input → byte-identical output, in any of 10 languages, with no invented paths. (Detail in [What makes this different](#what-makes-this-different) below.)
42
29
 
43
- Because the scanner hands Claude an explicit path allowlist, the LLM **cannot invent files or frameworks that aren't in your code**. Five post-generation validators (`claude-md-validator`, `content-validator`, `pass-json-validator`, `plan-validator`, `sync-checker`) verify the output before it ships — language-invariant, so the same rules apply whether you generate in English, Korean, or any of 8 other languages.
44
-
45
- ```
46
- Before: You → Claude Code → "generally good" code → manual fixing each time
47
- After: You → Claude Code → code that matches YOUR project → ship it
48
- ```
30
+ A separate [Memory Layer](#memory-layer-optional-for-long-running-projects) is seeded for long-running projects.
49
31
 
50
32
  ---
51
33
 
@@ -58,7 +40,7 @@ Run on [`spring-boot-realworld-example-app`](https://github.com/gothinkster/spri
58
40
  </p>
59
41
 
60
42
  <details>
61
- <summary><strong>📺 Terminal output (text version, for search & copy)</strong></summary>
43
+ <summary><strong>Terminal output (text version, for search & copy)</strong></summary>
62
44
 
63
45
  ```text
64
46
  ╔════════════════════════════════════════════════════╗
@@ -93,18 +75,18 @@ Run on [`spring-boot-realworld-example-app`](https://github.com/gothinkster/spri
93
75
  [██████████░░░░░░░░░░] 50% (2/4)
94
76
 
95
77
  [6] Pass 3 — Generating all files...
96
- 🚀 Pass 3 split mode (3a → 3b → 3c → 3d-aux)
78
+ Pass 3 split mode (3a → 3b → 3c → 3d-aux)
97
79
  ✅ 3a complete (2m 57s) — pass3a-facts.md (187-path allowlist)
98
80
  ✅ 3b complete (18m 49s) — CLAUDE.md + 19 standards + 20 rules
99
81
  ✅ 3c complete (12m 35s) — 13 skills + 9 guides
100
82
  ✅ 3d-aux complete (3m 18s) — database/ + mcp-guide/
101
- 🎉 Pass 3 split complete: 4/4 stages successful
83
+ Pass 3 split complete: 4/4 stages successful
102
84
  [███████████████░░░░░] 75% (3/4)
103
85
 
104
86
  [7] Pass 4 — Memory scaffolding...
105
- 📦 Pass 4 staged-rules: 6 rule files moved to .claude/rules/
87
+ Pass 4 staged-rules: 6 rule files moved to .claude/rules/
106
88
  ✅ Pass 4 complete (5m)
107
- 📋 Gap-fill: all 12 expected files already present
89
+ Gap-fill: all 12 expected files already present
108
90
  [████████████████████] 100% (4/4)
109
91
 
110
92
  ╔═══════════════════════════════════════╗
@@ -133,7 +115,7 @@ Run on [`spring-boot-realworld-example-app`](https://github.com/gothinkster/spri
133
115
  </details>
134
116
 
135
117
  <details>
136
- <summary><strong>📄 What ends up in your <code>CLAUDE.md</code> (real excerpt — Section 1 + 2)</strong></summary>
118
+ <summary><strong>What ends up in your <code>CLAUDE.md</code> (real excerpt — Section 1 + 2)</strong></summary>
137
119
 
138
120
  ```markdown
139
121
  # CLAUDE.md — spring-boot-realworld-example-app
@@ -142,7 +124,7 @@ Run on [`spring-boot-realworld-example-app`](https://github.com/gothinkster/spri
142
124
  > Java 11 + Spring Boot 2.6, exposing both REST and GraphQL endpoints
143
125
  > over a hexagonal MyBatis persistence layer.
144
126
 
145
- ## 1. Role Definition
127
+ #### 1. Role Definition
146
128
 
147
129
  As the senior developer for this repository, you are responsible for
148
130
  writing, modifying, and reviewing code. Responses must be written in English.
@@ -150,7 +132,7 @@ A Java Spring Boot REST + GraphQL API server organized around a hexagonal
150
132
  (ports & adapters) architecture, with a CQRS-lite read/write split inside
151
133
  an XML-driven MyBatis persistence layer and JWT-based authentication.
152
134
 
153
- ## 2. Project Overview
135
+ #### 2. Project Overview
154
136
 
155
137
  | Item | Value |
156
138
  |---|---|
@@ -171,7 +153,7 @@ Every value above — exact dependency coordinates, the `dev.db` filename, the `
171
153
  </details>
172
154
 
173
155
  <details>
174
- <summary><strong>🛡️ A real auto-loaded rule (<code>.claude/rules/10.backend/01.controller-rules.md</code>)</strong></summary>
156
+ <summary><strong>A real auto-loaded rule (<code>.claude/rules/10.backend/01.controller-rules.md</code>)</strong></summary>
175
157
 
176
158
  ````markdown
177
159
  ---
@@ -179,9 +161,9 @@ paths:
179
161
  - "**/*"
180
162
  ---
181
163
 
182
- # Controller Rules
164
+ #### Controller Rules
183
165
 
184
- ## REST (`io.spring.api.*`)
166
+ ##### REST (`io.spring.api.*`)
185
167
 
186
168
  - Controllers are the SOLE response wrapper for HTTP — no aggregator/facade above them.
187
169
  Return `ResponseEntity<?>` or a body Spring serializes via `JacksonCustomizations`.
@@ -194,13 +176,13 @@ paths:
194
176
  - Let exceptions propagate to `io.spring.api.exception.CustomizeExceptionHandler`
195
177
  (`@ControllerAdvice`). Do NOT `try/catch` business exceptions inside the controller.
196
178
 
197
- ## GraphQL (`io.spring.graphql.*`)
179
+ ##### GraphQL (`io.spring.graphql.*`)
198
180
 
199
181
  - DGS components (`@DgsComponent`) are the sole GraphQL response wrappers.
200
182
  Use `@DgsQuery` / `@DgsData` / `@DgsMutation`.
201
183
  - Resolve the current user via `io.spring.graphql.SecurityUtil.getCurrentUser()`.
202
184
 
203
- ## Examples
185
+ ##### Examples
204
186
 
205
187
  ✅ Correct:
206
188
  ```java
@@ -233,10 +215,10 @@ The `paths: ["**/*"]` glob means Claude Code auto-loads this rule whenever you e
233
215
  </details>
234
216
 
235
217
  <details>
236
- <summary><strong>🧠 An auto-generated <code>decision-log.md</code> seed (real excerpt)</strong></summary>
218
+ <summary><strong>An auto-generated <code>decision-log.md</code> seed (real excerpt)</strong></summary>
237
219
 
238
220
  ```markdown
239
- ## 2026-04-26 — Hexagonal ports & adapters with MyBatis-only persistence
221
+ #### 2026-04-26 — Hexagonal ports & adapters with MyBatis-only persistence
240
222
 
241
223
  - **Context:** `io.spring.core.*` exposes `*Repository` ports (e.g.,
242
224
  `io.spring.core.article.ArticleRepository`) implemented by
@@ -261,6 +243,16 @@ Pass 4 seeds `decision-log.md` with the architectural decisions extracted from `
261
243
 
262
244
  ---
263
245
 
246
+ ## Tested on
247
+
248
+ ClaudeOS-Core ships with reference benchmarks on real OSS projects. If you've used it on a public repo, please [open an issue](https://github.com/claudeos-core/claudeos-core/issues) — we'll add it to this table.
249
+
250
+ | Project | Stack | Scanned → Generated | Status |
251
+ |---|---|---|---|
252
+ | [`spring-boot-realworld-example-app`](https://github.com/gothinkster/spring-boot-realworld-example-app) | Java 11 · Spring Boot 2.6 · MyBatis · SQLite | 187 → 75 files | ✅ all 5 validators pass |
253
+
254
+ ---
255
+
264
256
  ## Quick Start
265
257
 
266
258
  **Prerequisites:** Node.js 18+, [Claude Code](https://docs.anthropic.com/en/docs/claude-code) installed and authenticated.
@@ -349,7 +341,7 @@ The pipeline runs in **three stages**, with code on both sides of the LLM call:
349
341
 
350
342
  **3. Step C — Verification (deterministic, no LLM).** Five validators check the output:
351
343
  - `claude-md-validator` — 25 structural checks on `CLAUDE.md` (8 sections, H3/H4 counts, memory file uniqueness, T1 canonical heading invariant). Language-invariant: same verdict regardless of `--lang`.
352
- - `content-validator` — 10 content checks including path-claim verification (`STALE_PATH` catches fabricated `src/...` references) and MANIFEST drift detection.
344
+ - `content-validator` — 10 content checks including path-claim verification (`STALE_PATH` catches invented `src/...` references) and MANIFEST drift detection.
353
345
  - `pass-json-validator` — Pass 1/2/3/4 JSON well-formedness + stack-aware section count.
354
346
  - `plan-validator` — plan ↔ disk consistency (legacy, mostly no-op since v2.1.0).
355
347
  - `sync-checker` — disk ↔ `sync-map.json` registration consistency across 7 tracked dirs.
@@ -391,17 +383,7 @@ npx claudeos-core lint
391
383
  npx claudeos-core health
392
384
  ```
393
385
 
394
- Two more for memory layer maintenance:
395
-
396
- ```bash
397
- # Compact the failure-patterns log (run periodically)
398
- npx claudeos-core memory compact
399
-
400
- # Promote frequent failure patterns into proposed rules
401
- npx claudeos-core memory propose-rules
402
- ```
403
-
404
- For each command's full options, see [docs/commands.md](docs/commands.md).
386
+ For each command's full options, see [docs/commands.md](docs/commands.md). Memory layer commands (`memory compact`, `memory propose-rules`) are documented in the [Memory Layer](#memory-layer-optional-for-long-running-projects) section below.
405
387
 
406
388
  ---
407
389
 
@@ -443,14 +425,24 @@ For each validator's checks in detail, see [docs/verification.md](docs/verificat
443
425
 
444
426
  ## Memory Layer (optional, for long-running projects)
445
427
 
446
- After v2.0, ClaudeOS-Core writes a `claudeos-core/memory/` folder with four files:
428
+ Beyond the scaffolding pipeline above, ClaudeOS-Core seeds a `claudeos-core/memory/` folder for projects where context outlives a single session. It's optional — you can ignore it if all you want is `CLAUDE.md` + rules.
429
+
430
+ Four files, all written by Pass 4:
447
431
 
448
- - `decision-log.md` — append-only "why we chose X over Y"
432
+ - `decision-log.md` — append-only "why we chose X over Y", seeded from `pass2-merged.json`
449
433
  - `failure-patterns.md` — recurring errors with frequency/importance scores
450
434
  - `compaction.md` — how memory is auto-compacted over time
451
435
  - `auto-rule-update.md` — patterns that should become new rules
452
436
 
453
- You can run `npx claudeos-core memory propose-rules` to ask Claude to look at recent failure patterns and suggest new rules to add.
437
+ Two commands maintain this layer over time:
438
+
439
+ ```bash
440
+ # Compact the failure-patterns log (run periodically)
441
+ npx claudeos-core memory compact
442
+
443
+ # Promote frequent failure patterns into proposed rules
444
+ npx claudeos-core memory propose-rules
445
+ ```
454
446
 
455
447
  For the memory model and lifecycle, see [docs/memory-layer.md](docs/memory-layer.md).
456
448
 
@@ -481,6 +473,12 @@ A: [GitHub Issues](https://github.com/claudeos-core/claudeos-core/issues). For s
481
473
 
482
474
  ---
483
475
 
476
+ ## If this saved you time
477
+
478
+ A ⭐ on GitHub keeps the project visible and helps others find it. Issues, PRs, and stack template contributions are all welcome — see [CONTRIBUTING.md](CONTRIBUTING.md).
479
+
480
+ ---
481
+
484
482
  ## Documentation
485
483
 
486
484
  | Topic | Read this |
@@ -507,8 +505,8 @@ For Code of Conduct and security policy, see [CODE_OF_CONDUCT.md](CODE_OF_CONDUC
507
505
 
508
506
  ## License
509
507
 
510
- [ISC](LICENSE) free for any use, including commercial.
508
+ [ISC License](LICENSE). Free for any use, including commercial. © 2025–2026 ClaudeOS-Core contributors.
511
509
 
512
510
  ---
513
511
 
514
- <sub>Built with care by [@claudeos-core](https://github.com/claudeos-core). If this saved you time, a ⭐ on GitHub keeps it visible.</sub>
512
+ <sub>Maintained by the [claudeos-core](https://github.com/claudeos-core) team. Issues and PRs at <https://github.com/claudeos-core/claudeos-core>.</sub>