claudeos-core 2.3.2 → 2.4.1

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 (36) hide show
  1. package/CHANGELOG.md +790 -74
  2. package/CODE_OF_CONDUCT.md +15 -0
  3. package/README.de.md +374 -876
  4. package/README.es.md +374 -875
  5. package/README.fr.md +374 -875
  6. package/README.hi.md +374 -875
  7. package/README.ja.md +374 -875
  8. package/README.ko.md +374 -874
  9. package/README.md +374 -876
  10. package/README.ru.md +374 -877
  11. package/README.vi.md +374 -875
  12. package/README.zh-CN.md +374 -874
  13. package/SECURITY.md +51 -0
  14. package/bin/commands/init.js +192 -37
  15. package/content-validator/index.js +97 -4
  16. package/health-checker/index.js +44 -10
  17. package/package.json +92 -90
  18. package/pass-json-validator/index.js +58 -7
  19. package/pass-prompts/templates/angular/pass3.md +15 -14
  20. package/pass-prompts/templates/common/claude-md-scaffold.md +81 -0
  21. package/pass-prompts/templates/common/pass3-footer.md +104 -0
  22. package/pass-prompts/templates/java-spring/pass3.md +19 -18
  23. package/pass-prompts/templates/kotlin-spring/pass3.md +23 -22
  24. package/pass-prompts/templates/node-express/pass3.md +18 -17
  25. package/pass-prompts/templates/node-fastify/pass3.md +11 -10
  26. package/pass-prompts/templates/node-nestjs/pass3.md +11 -10
  27. package/pass-prompts/templates/node-nextjs/pass3.md +18 -17
  28. package/pass-prompts/templates/node-vite/pass3.md +11 -10
  29. package/pass-prompts/templates/python-django/pass3.md +18 -17
  30. package/pass-prompts/templates/python-fastapi/pass3.md +18 -17
  31. package/pass-prompts/templates/python-flask/pass3.md +9 -8
  32. package/pass-prompts/templates/vue-nuxt/pass3.md +9 -8
  33. package/plan-installer/domain-grouper.js +45 -5
  34. package/plan-installer/index.js +11 -1
  35. package/plan-installer/scanners/scan-java.js +98 -2
  36. package/plan-installer/stack-detector.js +44 -0
package/README.hi.md CHANGED
@@ -1,1015 +1,514 @@
1
1
  # ClaudeOS-Core
2
2
 
3
- **एकमात्र टूल जो पहले आपका सोर्स कोड पढ़ता है, deterministic एनालिसिस से स्टैक और पैटर्न कन्फर्म करता है, फिर आपके प्रोजेक्ट के लिए सटीक Claude Code रूल्स जेनरेट करता है।**
3
+ [![npm version](https://img.shields.io/npm/v/claudeos-core.svg?logo=npm&label=npm)](https://www.npmjs.com/package/claudeos-core)
4
+ [![CI](https://img.shields.io/github/actions/workflow/status/claudeos-core/claudeos-core/test.yml?branch=master&logo=github&label=CI)](https://github.com/claudeos-core/claudeos-core/actions/workflows/test.yml)
5
+ [![tests](https://img.shields.io/badge/tests-736%20passing-brightgreen?logo=node.js&logoColor=white)](https://github.com/claudeos-core/claudeos-core/actions/workflows/test.yml)
6
+ [![node](https://img.shields.io/node/v/claudeos-core.svg?logo=node.js&logoColor=white&label=node)](https://nodejs.org/)
7
+ [![license](https://img.shields.io/npm/l/claudeos-core.svg?color=blue)](LICENSE)
8
+ [![downloads](https://img.shields.io/npm/dm/claudeos-core.svg?logo=npm&color=blue&label=downloads)](https://www.npmjs.com/package/claudeos-core)
4
9
 
5
- ```bash
6
- npx claudeos-core init
7
- ```
8
-
9
- ClaudeOS-Core आपका कोडबेस पढ़ता है, हर पैटर्न को एक्सट्रैक्ट करता है, और _आपके_ प्रोजेक्ट के लिए कस्टमाइज़्ड Standards, Rules, Skills और Guides का पूरा सेट जेनरेट करता है। इसके बाद, जब आप Claude Code को "ऑर्डर के लिए CRUD बनाओ" कहते हैं, तो यह आपके मौजूदा पैटर्न से बिल्कुल मेल खाने वाला कोड जेनरेट करता है।
10
-
11
- [🇺🇸 English](./README.md) · [🇰🇷 한국어](./README.ko.md) · [🇨🇳 中文](./README.zh-CN.md) · [🇯🇵 日本語](./README.ja.md) · [🇪🇸 Español](./README.es.md) · [🇻🇳 Tiếng Việt](./README.vi.md) · [🇷🇺 Русский](./README.ru.md) · [🇫🇷 Français](./README.fr.md) · [🇩🇪 Deutsch](./README.de.md)
12
-
13
- ---
14
-
15
- ## ClaudeOS-Core क्यों?
16
-
17
- हर दूसरा Claude Code टूल ऐसे काम करता है:
18
-
19
- > **इंसान प्रोजेक्ट का वर्णन करता है → LLM डॉक्यूमेंटेशन जेनरेट करता है**
20
-
21
- ClaudeOS-Core ऐसे काम करता है:
22
-
23
- > **कोड सोर्स का विश्लेषण करता है → कोड कस्टम प्रॉम्प्ट बनाता है → LLM डॉक्यूमेंटेशन जेनरेट करता है → कोड आउटपुट को वेरिफाई करता है**
24
-
25
- यह छोटा अंतर नहीं है। यह क्यों मायने रखता है:
26
-
27
- ### मूल समस्या: LLM अनुमान लगाता है। कोड नहीं।
28
-
29
- जब आप Claude से "इस प्रोजेक्ट का विश्लेषण करो" कहते हैं, तो यह आपके स्टैक, ORM, डोमेन स्ट्रक्चर का **अनुमान** लगाता है।
30
- यह आपके `build.gradle` में `spring-boot` देख सकता है, लेकिन इस बात से चूक सकता है कि आप MyBatis (JPA नहीं) इस्तेमाल करते हैं।
31
- यह `user/` डायरेक्टरी देख सकता है लेकिन नहीं समझ पाता कि आपका प्रोजेक्ट layer-first पैकेजिंग (Pattern A) इस्तेमाल करता है, domain-first (Pattern B) नहीं।
32
-
33
- **ClaudeOS-Core अनुमान नहीं लगाता।** Claude के आपके प्रोजेक्ट को देखने से पहले, Node.js कोड ने पहले ही:
10
+ **Claude Code को पहली कोशिश में ही _आपके प्रोजेक्ट की_ परिपाटियों का पालन करवाएँ — generic defaults का नहीं।**
34
11
 
35
- - `build.gradle` / `package.json` / `pyproject.toml` को पार्स किया और आपके स्टैक, ORM, DB, और पैकेज मैनेजर को **कन्फर्म** किया
36
- - आपके डायरेक्टरी स्ट्रक्चर को स्कैन किया और फ़ाइल काउंट के साथ आपकी डोमेन सूची को **कन्फर्म** किया
37
- - आपके प्रोजेक्ट स्ट्रक्चर को 5 Java पैटर्न, Kotlin CQRS/BFF, या Next.js App Router/FSD में से एक में **वर्गीकृत** किया
38
- - डोमेन को Claude के कॉन्टेक्स्ट विंडो में फिट होने वाले इष्टतम आकार के समूहों में विभाजित किया
39
- - सभी कन्फर्म किए गए तथ्यों के साथ एक स्टैक-विशिष्ट प्रॉम्प्ट को असेंबल किया
12
+ एक deterministic Node.js scanner पहले आपके कोड को पढ़ता है; फिर एक 4-pass Claude पाइपलाइन पूरा सेट लिखती है — `CLAUDE.md` + auto-loaded `.claude/rules/` + standards + skills + L4 memory. 10 output भाषाएँ, 5 post-generation validators, और एक स्पष्ट path allowlist जो LLM को आपके कोड में मौजूद न होने वाली फ़ाइलें या frameworks आविष्कार करने से रोकता है।
40
13
 
41
- जब तक Claude प्रॉम्प्ट प्राप्त करता है, अनुमान लगाने के लिए कुछ नहीं बचा होता। स्टैक कन्फर्म। डोमेन कन्फर्म। स्ट्रक्चर पैटर्न कन्फर्म। Claude का एकमात्र काम इन **कन्फर्म किए गए तथ्यों** से मेल खाने वाला डॉक्यूमेंटेशन जेनरेट करना है।
14
+ [**12 stacks**](#supported-stacks) पर काम करता है (monorepos सहित) एक `npx` command, कोई config नहीं, resume-safe, idempotent.
42
15
 
43
- ### परिणाम
44
-
45
- अन्य टूल "सामान्य रूप से अच्छा" डॉक्यूमेंटेशन बनाते हैं।
46
- ClaudeOS-Core ऐसा डॉक्यूमेंटेशन बनाता है जो जानता है कि आपका प्रोजेक्ट `ApiResponse.ok()` इस्तेमाल करता है (`ResponseEntity.success()` नहीं), कि आपके MyBatis XML मैपर `src/main/resources/mybatis/mappers/` में रहते हैं, और कि आपका पैकेज स्ट्रक्चर `com.company.module.{domain}.controller` है — क्योंकि इसने आपका वास्तविक कोड पढ़ा है।
47
-
48
- ### Before & After
49
-
50
- **ClaudeOS-Core के बिना** — आप Claude Code से Order CRUD बनाने के लिए कहते हैं:
51
- ```
52
- ❌ JPA-style repository इस्तेमाल करता है (आपका प्रोजेक्ट MyBatis इस्तेमाल करता है)
53
- ❌ ResponseEntity.success() बनाता है (आपका wrapper ApiResponse.ok() है)
54
- ❌ order/controller/ में फ़ाइलें रखता है (आपका प्रोजेक्ट controller/order/ इस्तेमाल करता है)
55
- ❌ अंग्रेज़ी कमेंट्स जेनरेट करता है (आपकी टीम हिन्दी कमेंट्स लिखती है)
56
- → आप जेनरेट की गई हर फ़ाइल को ठीक करने में 20 मिनट खर्च करते हैं
57
- ```
58
-
59
- **ClaudeOS-Core के साथ** — `.claude/rules/` में पहले से ही आपके कन्फर्म पैटर्न हैं:
60
- ```
61
- ✅ MyBatis mapper + XML जेनरेट करता है (build.gradle से डिटेक्ट)
62
- ✅ ApiResponse.ok() इस्तेमाल करता है (आपके वास्तविक सोर्स से एक्सट्रैक्ट)
63
- ✅ controller/order/ में फ़ाइलें रखता है (Pattern A स्ट्रक्चर स्कैन से कन्फर्म)
64
- ✅ हिन्दी कमेंट्स (--lang hi लागू)
65
- → जेनरेट किया गया कोड तुरंत आपके प्रोजेक्ट कन्वेंशन से मेल खाता है
16
+ ```bash
17
+ npx claudeos-core init
66
18
  ```
67
19
 
68
- यह अंतर संचयी है। प्रतिदिन 10 कार्य × 20 मिनट बचत = **प्रतिदिन 3+ घंटे**।
20
+ [🇺🇸 English](README.md) · [🇰🇷 한국어](README.ko.md) · [🇨🇳 中文](README.zh-CN.md) · [🇯🇵 日本語](README.ja.md) · [🇪🇸 Español](README.es.md) · [🇻🇳 Tiếng Việt](README.vi.md) · [🇷🇺 Русский](README.ru.md) · [🇫🇷 Français](README.fr.md) · [🇩🇪 Deutsch](README.de.md)
69
21
 
70
22
  ---
71
23
 
72
- ## जेनरेशन के बाद गुणवत्ता सुनिश्चिति (v2.3.0)
73
-
74
- जेनरेशन समस्या का सिर्फ आधा हिस्सा है। दूसरा आधा है **यह जानना कि आउटपुट सही है** — 10 आउटपुट भाषाओं में, 11 स्टैक टेम्प्लेट्स में, किसी भी आकार के प्रोजेक्ट्स में। v2.3.0 दो deterministic validators जोड़ता है जो जेनरेशन के बाद चलते हैं और LLM के स्वयं-जांच पर निर्भर नहीं करते।
75
-
76
- ### `claude-md-validator` — स्ट्रक्चरल इनवेरिएंट्स
77
-
78
- हर जेनरेट किया गया `CLAUDE.md` 25 स्ट्रक्चरल इनवेरिएंट्स के खिलाफ चेक किया जाता है, जो केवल भाषा-निरपेक्ष सिग्नल्स का उपयोग करते हैं: markdown syntax (`^## `, `^### `), कभी अनुवादित नहीं होने वाले literal फ़ाइल नाम (`decision-log.md`, `failure-patterns.md`), section count, प्रत्येक section के sub-section count, और table-row count। यही validator, byte-by-byte, अंग्रेज़ी, कोरियाई, जापानी, वियतनामी, हिंदी, रूसी, स्पेनिश, चीनी, फ्रेंच, या जर्मन में जेनरेट किए गए `CLAUDE.md` पर समान निर्णय देता है।
24
+ ## यह क्या है?
79
25
 
80
- Cross-language गारंटी को सभी 10 भाषाओं में test fixtures द्वारा सत्यापित किया जाता है, जिसमें उन भाषाओं में से 6 में bad-case fixtures शामिल हैं जो समान error signatures उत्पन्न करती हैं। जब एक वियतनामी प्रोजेक्ट पर invariant विफल होता है, तो fix वही है जो जर्मन प्रोजेक्ट पर विफल होने पर होता है।
26
+ आप Claude Code का उपयोग करते हैं। यह शक्तिशाली है, लेकिन हर session नए सिरे से शुरू होता है इसे _आपके_ प्रोजेक्ट की संरचना की कोई स्मृति नहीं होती। इसलिए यह "generally good" defaults पर fallback करता है जो आपकी टीम वास्तव में जो करती है उससे शायद ही मेल खाते हैं:
81
27
 
82
- ### `content-validator [10/10]` path-claim सत्यापन और MANIFEST स्थिरता
28
+ - आपकी टीम **MyBatis** का उपयोग करती है, लेकिन Claude JPA repositories उत्पन्न करता है।
29
+ - आपका response wrapper `ApiResponse.ok()` है, लेकिन Claude `ResponseEntity.success()` लिखता है।
30
+ - आपके packages layer-first (`controller/order/`) हैं, लेकिन Claude domain-first (`order/controller/`) बनाता है।
31
+ - आपकी errors centralized middleware से जाती हैं, लेकिन Claude हर endpoint में `try/catch` बिखेर देता है।
83
32
 
84
- सभी जेनरेट की गई `.md` फ़ाइलों से हर backticked path reference (`src/...`, `.claude/rules/...`, `claudeos-core/skills/...`) पढ़ता है और उन्हें वास्तविक file system के खिलाफ सत्यापित करता है। दो क्लास की LLM failures पकड़ता है जो पहले कोई tool detect नहीं करता था:
33
+ आप चाहेंगे कि प्रति प्रोजेक्ट एक `.claude/rules/` set हो Claude Code इसे हर session में स्वतः लोड करता है लेकिन हर नए repo के लिए हाथ से वे rules लिखने में घंटों लगते हैं, और कोड के विकसित होने के साथ वे drift हो जाते हैं।
85
34
 
86
- - **`STALE_PATH`** जब Pass 3 या Pass 4 एक plausible-but-nonexistent path गढ़ देता है। तीन प्रमुख वर्ग: (1) **पहचानकर्ता से फ़ाइलनाम पुनर्सामान्यीकरण** ALL_CAPS TypeScript constant या Java annotation से फ़ाइलनाम infer करना जबकि वास्तविक फ़ाइल एक अलग नामकरण परंपरा का पालन करती है; (2) **फ़्रेमवर्क-परंपरागत प्रवेश बिंदु कल्पना** — एक अलग लेआउट चुनने वाले प्रोजेक्ट में मानक प्रवेश फ़ाइल (Vite का main मॉड्यूल, Next.js app-router providers, आदि) की मौजूदगी मान लेना; (3) **सुनने में सही लगने वाली उपयोगिता कल्पना** दिखाई देने वाली directory के अंतर्गत "स्वाभाविक रूप से मौजूद होने वाले" helper के लिए एक विशिष्ट फ़ाइलनाम का उल्लेख करना।
87
- - **`MANIFEST_DRIFT`** — जब `claudeos-core/skills/00.shared/MANIFEST.md` एक skill रजिस्टर करता है जिसका `CLAUDE.md §6` में उल्लेख नहीं है (या इसके विपरीत)। सामान्य orchestrator + sub-skills layout को पहचानता है, जहाँ `CLAUDE.md §6` एक entry point है और `MANIFEST.md` पूर्ण registry है — sub-skills को उनके parent orchestrator के माध्यम से cover माना जाता है।
35
+ **ClaudeOS-Core उन्हें आपके वास्तविक स्रोत कोड से आपके लिए लिखता है।** एक deterministic Node.js scanner पहले आपके प्रोजेक्ट को पढ़ता है (stack, ORM, package layout, परिपाटियाँ, फ़ाइल paths). फिर एक 4-pass Claude पाइपलाइन निकाले गए तथ्यों को एक संपूर्ण documentation set में बदलती है:
88
36
 
89
- Validator को `pass3-footer.md` और `pass4.md` में prompt-time prevention के साथ जोड़ा गया है: विशिष्ट hallucination classes (parent-directory prefix, Vite/MSW/Vitest/Jest/RTL library conventions) को document करने वाले anti-pattern blocks, और स्पष्ट positive guidance कि जब `pass3a-facts.md` में एक concrete filename नहीं है, तो rule को directory-scope से scope करें।
37
+ - **`CLAUDE.md`** वह project index जिसे Claude हर session में पढ़ता है
38
+ - **`.claude/rules/`** — श्रेणी के अनुसार auto-loaded rules (`00.core` / `10.backend` / `20.frontend` / `30.security-db` / `40.infra` / `60.memory` / `70.domains` / `80.verification`)
39
+ - **`claudeos-core/standard/`** — reference docs (हर rule के पीछे का "क्यों")
40
+ - **`claudeos-core/skills/`** — पुनः-प्रयोग योग्य patterns (CRUD scaffolding, page templates)
41
+ - **`claudeos-core/memory/`** — decision log + failure patterns जो प्रोजेक्ट के साथ बढ़ते हैं
90
42
 
91
- ### किसी भी प्रोजेक्ट पर validation चलाएँ
43
+ क्योंकि scanner Claude को एक स्पष्ट path allowlist देता है, LLM **आपके कोड में मौजूद न होने वाली फ़ाइलें या frameworks आविष्कार नहीं कर सकता**। पाँच post-generation validators (`claude-md-validator`, `content-validator`, `pass-json-validator`, `plan-validator`, `sync-checker`) ship से पहले output को सत्यापित करते हैं — language-invariant, इसलिए वही rules लागू होते हैं चाहे आप English, Korean, या अन्य 8 भाषाओं में से किसी में भी उत्पन्न करें।
92
44
 
93
- ```bash
94
- npx claudeos-core health # सभी validators — एक single go/no-go verdict
95
- npx claudeos-core lint # केवल CLAUDE.md structural invariants (किसी भी भाषा में)
96
45
  ```
97
-
98
- ---
99
-
100
- ## सपोर्टेड स्टैक्स
101
-
102
- | स्टैक | डिटेक्शन | विश्लेषण गहराई |
103
- |---|---|---|
104
- | **Java / Spring Boot** | `build.gradle`, `pom.xml`, 5 पैकेज पैटर्न | 10 कैटेगरी, 59 सब-आइटम |
105
- | **Kotlin / Spring Boot** | `build.gradle.kts`, kotlin plugin, `settings.gradle.kts`, CQRS/BFF auto-detect | 12 कैटेगरी, 95 सब-आइटम |
106
- | **Node.js / Express** | `package.json` | 9 कैटेगरी, 57 सब-आइटम |
107
- | **Node.js / NestJS** | `package.json` (`@nestjs/core`) | 10 कैटेगरी, 68 सब-आइटम |
108
- | **Next.js / React** | `package.json`, `next.config.*`, FSD सपोर्ट | 9 कैटेगरी, 55 सब-आइटम |
109
- | **Vue / Nuxt** | `package.json`, `nuxt.config.*`, Composition API | 9 कैटेगरी, 58 सब-आइटम |
110
- | **Python / Django** | `requirements.txt`, `pyproject.toml` | 10 कैटेगरी, 55 सब-आइटम |
111
- | **Python / FastAPI** | `requirements.txt`, `pyproject.toml` | 10 कैटेगरी, 58 सब-आइटम |
112
- | **Node.js / Fastify** | `package.json` | 10 कैटेगरी, 62 सब-आइटम |
113
- | **Vite / React SPA** | `package.json`, `vite.config.*` | 9 कैटेगरी, 55 सब-आइटम |
114
- | **Angular** | `package.json`, `angular.json` | 12 कैटेगरी, 78 सब-आइटम |
115
-
116
- ऑटो-डिटेक्ट: भाषा और वर्शन, फ्रेमवर्क और वर्शन (Vite को SPA फ्रेमवर्क के रूप में शामिल), ORM (MyBatis, JPA, Exposed, Prisma, TypeORM, SQLAlchemy, आदि), डेटाबेस (PostgreSQL, MySQL, Oracle, MongoDB, SQLite), पैकेज मैनेजर (Gradle, Maven, npm, yarn, pnpm, pip, poetry), आर्किटेक्चर (CQRS, BFF — मॉड्यूल नामों से पता लगाया), मल्टी-मॉड्यूल संरचना (settings.gradle से पता लगाया), मोनोरेपो (Turborepo, pnpm-workspace, Lerna, npm/yarn workspaces), **`.env.example` runtime कॉन्फ़िगरेशन** (v2.2.0 — Vite · Next.js · Nuxt · Angular · Node · Python framework के 16+ convention variable नामों से port/host/API-target निकाला जाता है)।
117
-
118
- **आपको कुछ भी स्पेसिफाई करने की ज़रूरत नहीं। सब कुछ ऑटोमैटिकली डिटेक्ट होता है।**
119
-
120
- ### `.env`-driven runtime कॉन्फ़िगरेशन (v2.2.0)
121
-
122
- v2.2.0 में `lib/env-parser.js` जोड़ा गया है ताकि जेनरेटेड `CLAUDE.md` framework defaults के बजाय वह दर्शाए जो project वास्तव में declare करता है।
123
-
124
- - **Search क्रम**: `.env.example` (canonical, committed) → `.env.local.example` → `.env.sample` → `.env.template` → `.env` → `.env.local` → `.env.development`। `.example` variant जीतता है क्योंकि यह developer-neutral shape-of-truth है, किसी एक contributor का local override नहीं।
125
- - **पहचाने जाने वाले port variable conventions**: `VITE_PORT` / `VITE_DEV_PORT` / `VITE_DESKTOP_PORT` / `NEXT_PUBLIC_PORT` / `NUXT_PORT` / `NG_PORT` / `APP_PORT` / `SERVER_PORT` / `HTTP_PORT` / `DEV_PORT` / `FLASK_RUN_PORT` / `UVICORN_PORT` / `DJANGO_PORT` / generic `PORT`। जब दोनों मौजूद हों, तो framework-specific नाम generic `PORT` पर जीतते हैं।
126
- - **Host और API target**: `VITE_DEV_HOST` / `VITE_API_TARGET` / `NEXT_PUBLIC_API_URL` / `NUXT_PUBLIC_API_BASE` / `BACKEND_URL` / `PROXY_TARGET` आदि।
127
- - **Precedence**: Spring Boot `application.yml` `server.port` अभी भी जीतता है (framework-native config), फिर `.env`-declared port, फिर last resort के रूप में framework default (Vite 5173, Next.js 3000, Django 8000, आदि)।
128
- - **Sensitive-variable redaction**: `PASSWORD` / `SECRET` / `TOKEN` / `API_KEY` / `ACCESS_KEY` / `PRIVATE_KEY` / `CREDENTIAL` / `JWT_SECRET` / `CLIENT_SECRET` / `SESSION_SECRET` / `BEARER` / `SALT` patterns से match होने वाले variables के values किसी भी downstream generator तक पहुंचने से पहले `***REDACTED***` से replace कर दिए जाते हैं। `.env.example` में accidentally committed secrets के खिलाफ defense-in-depth। `DATABASE_URL` stack-detector DB-identification back-compat के लिए explicitly whitelisted है।
129
-
130
- ### Java डोमेन डिटेक्शन (5 पैटर्न, फॉलबैक के साथ)
131
-
132
- | प्राथमिकता | पैटर्न | संरचना | उदाहरण |
133
- |---|---|---|---|
134
- | A | लेयर-फर्स्ट | `controller/{domain}/` | `controller/user/UserController.java` |
135
- | B | डोमेन-फर्स्ट | `{domain}/controller/` | `user/controller/UserController.java` |
136
- | D | मॉड्यूल प्रीफ़िक्स | `{module}/{domain}/controller/` | `front/member/controller/MemberController.java` |
137
- | E | DDD/हेक्सागोनल | `{domain}/adapter/in/web/` | `user/adapter/in/web/UserController.java` |
138
- | C | फ्लैट | `controller/*.java` | `controller/UserController.java` → क्लास नाम से `user` एक्सट्रैक्ट |
139
-
140
- बिना Controller वाले सर्विस-ओनली डोमेन भी `service/`, `dao/`, `aggregator/`, `facade/`, `usecase/`, `orchestrator/`, `mapper/`, `repository/` डायरेक्टरी के ज़रिए डिटेक्ट होते हैं। स्किप: `common`, `config`, `util`, `core`, `front`, `admin`, `v1`, `v2` आदि।
141
-
142
- ### Kotlin मल्टी-मॉड्यूल डोमेन डिटेक्शन
143
-
144
- Gradle मल्टी-मॉड्यूल संरचना वाले Kotlin प्रोजेक्ट्स (जैसे: CQRS मोनोरेपो) के लिए:
145
-
146
- | स्टेप | क्या करता है | उदाहरण |
147
- |---|---|---|
148
- | 1 | `settings.gradle.kts` में `include()` स्कैन | 14 मॉड्यूल मिले |
149
- | 2 | नाम से मॉड्यूल प्रकार डिटेक्ट | `reservation-command-server` → type: `command` |
150
- | 3 | मॉड्यूल नाम से डोमेन एक्सट्रैक्ट | `reservation-command-server` → domain: `reservation` |
151
- | 4 | समान डोमेन को मॉड्यूल्स में समूह | `reservation-command-server` + `common-query-server` → 1 डोमेन |
152
- | 5 | आर्किटेक्चर डिटेक्ट | `command` + `query` मॉड्यूल्स हैं → CQRS |
153
-
154
- सपोर्टेड मॉड्यूल प्रकार: `command`, `query`, `bff`, `integration`, `standalone`, `library`। साझा लाइब्रेरीज़ (`shared-lib`, `integration-lib`) विशेष डोमेन के रूप में डिटेक्ट होती हैं।
155
-
156
- ### फ्रंटएंड डोमेन डिटेक्शन
157
-
158
- - **App Router**: `app/{domain}/page.tsx` (Next.js)
159
- - **Pages Router**: `pages/{domain}/index.tsx`
160
- - **FSD (Feature-Sliced Design)**: `features/*/`, `widgets/*/`, `entities/*/`
161
- - **RSC/Client split**: `client.tsx` पैटर्न डिटेक्ट करता है, Server/Client कॉम्पोनेंट अलगाव ट्रैक करता है
162
- - **ग़ैर-मानक नेस्टेड पाथ**: `src/*/` पाथ के नीचे pages, components, और FSD layers डिटेक्ट करता है (जैसे: `src/admin/pages/dashboard/`, `src/admin/components/form/`, `src/admin/features/billing/`)
163
- - **Platform/tier-split डिटेक्शन (v2.0.0)**: `src/{platform}/{subapp}/` लेआउट पहचानता है — `{platform}` एक device/target कीवर्ड (`desktop`, `pc`, `web`, `mobile`, `mc`, `mo`, `sp`, `tablet`, `tab`, `pwa`, `tv`, `ctv`, `ott`, `watch`, `wear`) या access-tier कीवर्ड (`admin`, `cms`, `backoffice`, `back-office`, `portal`) हो सकता है। हर `(platform, subapp)` जोड़ी के लिए एक डोमेन `{platform}-{subapp}` नाम के साथ उत्पन्न करता है, जिसमें routes/components/layouts/hooks के लिए प्रति-डोमेन काउंट होते हैं। Angular, Next.js, React, और Vue पर एक साथ चलता है (multi-extension glob `{tsx,jsx,ts,js,vue}`)। नॉइज़ी 1-file डोमेन से बचने के लिए प्रति subapp ≥2 सोर्स फ़ाइलें ज़रूरी।
164
- - **मोनोरेपो प्लेटफ़ॉर्म split (v2.0.0)**: प्लेटफ़ॉर्म स्कैन `{apps,packages}/*/src/{platform}/{subapp}/` (Turborepo/pnpm workspace with `src/`) और `{apps,packages}/{platform}/{subapp}/` (`src/` wrapper के बिना workspaces) से भी मैच करता है।
165
- - **Fallback E — routes-file (v2.0.0)**: जब primary scanners + Fallback A–D सभी 0 लौटाते हैं, `**/routes/*.{tsx,jsx,ts,js,vue}` को glob करता है और `routes` की parent डायरेक्टरी नाम से समूह बनाता है। React Router file-routing प्रोजेक्ट्स (CRA/Vite + `react-router`) को पकड़ता है जो Next.js `page.tsx` या FSD लेआउट से मेल नहीं खाते। जेनरिक parent नाम (`src`, `app`, `pages`) फ़िल्टर किए जाते हैं।
166
- - **Config fallback**: `package.json` में न होने पर भी `next.config.*`, `vite.config.*` आदि से Next.js/Vite/Nuxt डिटेक्ट करता है (मोनोरेपो सपोर्ट)
167
- - **Deep directory fallback**: React/CRA/Vite/Vue/RN प्रोजेक्ट्स के लिए `**/components/*/`, `**/views/*/`, `**/screens/*/`, `**/containers/*/`, `**/pages/*/`, `**/routes/*/`, `**/modules/*/`, `**/domains/*/` को किसी भी गहराई पर स्कैन करता है
168
- - **साझा ignore लिस्ट (v2.0.0)**: सभी scanners `BUILD_IGNORE_DIRS` (`node_modules`, `build`, `dist`, `out`, `.next`, `.nuxt`, `.svelte-kit`, `.angular`, `.turbo`, `.cache`, `.parcel-cache`, `coverage`, `storybook-static`, `.vercel`, `.netlify`) और `TEST_FILE_IGNORE` (spec/test/stories/e2e/cy + `__snapshots__`/`__tests__`) साझा करते हैं ताकि build outputs और test fixtures प्रति-डोमेन फ़ाइल काउंट को न बढ़ाएँ।
169
-
170
- ### Scanner Overrides (v2.0.0)
171
-
172
- टूलकिट को संपादित किए बिना scanner defaults को विस्तारित करने के लिए अपने प्रोजेक्ट रूट पर एक वैकल्पिक `.claudeos-scan.json` डालें। सभी फ़ील्ड **additive** हैं — user entries defaults का विस्तार करते हैं, बदलते नहीं:
173
-
174
- ```json
175
- {
176
- "frontendScan": {
177
- "platformKeywords": ["kiosk"],
178
- "skipSubappNames": ["legacy"],
179
- "minSubappFiles": 3
180
- }
181
- }
46
+ पहले: आप → Claude Code → "generally good" कोड → हर बार मैन्युअल फ़िक्सिंग
47
+ बाद में: आप → Claude Code → आपके प्रोजेक्ट से मेल खाता कोड → सीधे ship
182
48
  ```
183
49
 
184
- | फ़ील्ड | डिफ़ॉल्ट | उद्देश्य |
185
- |---|---|---|
186
- | `platformKeywords` | ऊपर की built-in लिस्ट | प्लेटफ़ॉर्म स्कैन के लिए अतिरिक्त `{platform}` कीवर्ड (जैसे: `kiosk`, `vr`, `embedded`) |
187
- | `skipSubappNames` | केवल संरचनात्मक dirs | प्लेटफ़ॉर्म-स्कैन डोमेन उत्सर्जन से बाहर करने के लिए अतिरिक्त subapp नाम |
188
- | `minSubappFiles` | `2` | subapp के डोमेन बनने से पहले आवश्यक न्यूनतम फ़ाइल काउंट को override करें |
189
-
190
- फ़ाइल गायब या malformed JSON → चुपचाप defaults पर fallback (कोई crash नहीं)। सामान्य उपयोग: एक छोटा संक्षिप्त नाम (`adm`, `bo`) opt-in करें जिसे built-in लिस्ट बहुत अस्पष्ट होने के कारण बाहर रखती है, या नॉइज़ी मोनोरेपो के लिए `minSubappFiles` बढ़ाएँ।
191
-
192
50
  ---
193
51
 
194
- ## क्विक स्टार्ट
195
-
196
- ### पूर्व-आवश्यकताएँ
197
-
198
- - **Node.js** v18+
199
- - **Claude Code CLI** (इंस्टॉल और ऑथेंटिकेटेड)
200
-
201
- ### इंस्टॉलेशन
202
-
203
- ```bash
204
- cd /your/project/root
205
-
206
- # विकल्प A: npx (अनुशंसित — इंस्टॉल की ज़रूरत नहीं)
207
- npx claudeos-core init
208
-
209
- # विकल्प B: ग्लोबल इंस्टॉल
210
- npm install -g claudeos-core
211
- claudeos-core init
212
-
213
- # विकल्प C: प्रोजेक्ट devDependency
214
- npm install --save-dev claudeos-core
215
- npx claudeos-core init
216
-
217
- # विकल्प D: git clone (विकास/योगदान के लिए)
218
- git clone https://github.com/claudeos-core/claudeos-core.git claudeos-core-tools
219
-
220
- # क्रॉस-प्लेटफ़ॉर्म (PowerShell, CMD, Bash, Zsh — कोई भी terminal)
221
- node claudeos-core-tools/bin/cli.js init
222
-
223
- # Linux/macOS (केवल Bash)
224
- bash claudeos-core-tools/bootstrap.sh
52
+ ## एक वास्तविक प्रोजेक्ट पर देखें
53
+
54
+ [`spring-boot-realworld-example-app`](https://github.com/gothinkster/spring-boot-realworld-example-app) पर चलाएँ — Java 11 · Spring Boot 2.6 · MyBatis · SQLite · 187 source files. आउटपुट: **75 generated files**, कुल समय **53 minutes**, सभी validators ✅।
55
+
56
+ <p align="center">
57
+ <img src="docs/assets/spring-boot-realworld-demo.gif" alt="ClaudeOS-Core init running on spring-boot-realworld-example-app — stack detection, 4-pass pipeline, validators, completion summary" width="769">
58
+ </p>
59
+
60
+ <details>
61
+ <summary><strong>📺 टर्मिनल आउटपुट (टेक्स्ट संस्करण, खोज और कॉपी के लिए)</strong></summary>
62
+
63
+ ```text
64
+ ╔════════════════════════════════════════════════════╗
65
+ ║ ClaudeOS-Core — Bootstrap (4-Pass) ║
66
+ ╚════════════════════════════════════════════════════╝
67
+ Project root: spring-boot-realworld-example-app
68
+ Language: English (en)
69
+
70
+ [Phase 1] Detecting stack...
71
+ Language: java 11
72
+ Framework: spring-boot 2.6.3
73
+ Database: sqlite
74
+ ORM: mybatis
75
+ PackageMgr: gradle
76
+
77
+ [Phase 2] Scanning structure...
78
+ Backend: 2 domains
79
+ Total: 2 domains
80
+ Package: io.spring.infrastructure
81
+
82
+ [Phase 5] Active domains...
83
+ ✅ 00.core ✅ 10.backend ⏭️ 20.frontend
84
+ ✅ 30.security-db ✅ 40.infra
85
+ ✅ 80.verification ✅ 90.optional
86
+
87
+ [4] Pass 1 — Deep analysis per domain group...
88
+ ✅ pass1-1.json created (5m 34s)
89
+ [█████░░░░░░░░░░░░░░░] 25% (1/4)
90
+
91
+ [5] Pass 2 — Merging analysis results...
92
+ ✅ pass2-merged.json created (4m 22s)
93
+ [██████████░░░░░░░░░░] 50% (2/4)
94
+
95
+ [6] Pass 3 — Generating all files...
96
+ 🚀 Pass 3 split mode (3a → 3b → 3c → 3d-aux)
97
+ ✅ 3a complete (2m 57s) — pass3a-facts.md (187-path allowlist)
98
+ ✅ 3b complete (18m 49s) — CLAUDE.md + 19 standards + 20 rules
99
+ ✅ 3c complete (12m 35s) — 13 skills + 9 guides
100
+ ✅ 3d-aux complete (3m 18s) — database/ + mcp-guide/
101
+ 🎉 Pass 3 split complete: 4/4 stages successful
102
+ [███████████████░░░░░] 75% (3/4)
103
+
104
+ [7] Pass 4 — Memory scaffolding...
105
+ 📦 Pass 4 staged-rules: 6 rule files moved to .claude/rules/
106
+ ✅ Pass 4 complete (5m)
107
+ 📋 Gap-fill: all 12 expected files already present
108
+ [████████████████████] 100% (4/4)
109
+
110
+ ╔═══════════════════════════════════════╗
111
+ ║ ClaudeOS-Core — Health Checker ║
112
+ ╚═══════════════════════════════════════╝
113
+ ✅ plan-validator pass
114
+ ✅ sync-checker pass
115
+ ✅ content-validator pass
116
+ ✅ pass-json-validator pass
117
+ ✅ All systems operational
118
+
119
+ [Lint] ✅ CLAUDE.md structure valid (25 checks)
120
+ [Content] ✅ All content validation passed
121
+ Total: 0 advisories, 0 notes
122
+
123
+ ╔════════════════════════════════════════════════════╗
124
+ ║ ✅ ClaudeOS-Core — Complete ║
125
+ ║ Files created: 75 ║
126
+ ║ Domains analyzed: 1 group ║
127
+ ║ L4 scaffolded: memory + rules ║
128
+ ║ Output language: English ║
129
+ ║ Total time: 53m 8s ║
130
+ ╚════════════════════════════════════════════════════╝
131
+ ```
132
+
133
+ </details>
134
+
135
+ <details>
136
+ <summary><strong>📄 आपकी <code>CLAUDE.md</code> में क्या जाता है (वास्तविक अंश — Section 1 + 2)</strong></summary>
137
+
138
+ ```markdown
139
+ # CLAUDE.md — spring-boot-realworld-example-app
140
+
141
+ > Reference implementation of the RealWorld backend specification on
142
+ > Java 11 + Spring Boot 2.6, exposing both REST and GraphQL endpoints
143
+ > over a hexagonal MyBatis persistence layer.
144
+
145
+ ## 1. Role Definition
146
+
147
+ As the senior developer for this repository, you are responsible for
148
+ writing, modifying, and reviewing code. Responses must be written in English.
149
+ A Java Spring Boot REST + GraphQL API server organized around a hexagonal
150
+ (ports & adapters) architecture, with a CQRS-lite read/write split inside
151
+ an XML-driven MyBatis persistence layer and JWT-based authentication.
152
+
153
+ ## 2. Project Overview
154
+
155
+ | Item | Value |
156
+ |---|---|
157
+ | Language | Java 11 |
158
+ | Framework | Spring Boot 2.6.3 |
159
+ | Build Tool | Gradle (Groovy DSL) |
160
+ | Persistence | MyBatis 3 via `mybatis-spring-boot-starter:2.2.2` (no JPA) |
161
+ | Database | SQLite (`org.xerial:sqlite-jdbc:3.36.0.3`) — `dev.db` (default), `:memory:` (test) |
162
+ | Migration | Flyway — single baseline `V1__create_tables.sql` |
163
+ | API Style | REST (`io.spring.api.*`) + GraphQL via Netflix DGS `:4.9.21` |
164
+ | Authentication | JWT HS512 (`jjwt-api:0.11.2`) + Spring Security `PasswordEncoder` |
165
+ | Server Port | 8080 (default) |
166
+ | Test Stack | JUnit Jupiter 5, Mockito, AssertJ, rest-assured, spring-mock-mvc |
225
167
  ```
226
168
 
227
- ### आउटपुट भाषा (10 भाषाएँ)
169
+ ऊपर के सभी मान — सटीक dependency coordinates, `dev.db` filename, `V1__create_tables.sql` migration name, "no JPA" — Claude द्वारा फ़ाइल लिखने से पहले scanner द्वारा `build.gradle` / `application.properties` / source tree से निकाले जाते हैं। कुछ भी अनुमानित नहीं है।
228
170
 
229
- जब आप `init` को `--lang` के बिना चलाते हैं, तो एक इंटरैक्टिव सिलेक्टर दिखाई देता है — arrow keys या number keys का उपयोग करें:
171
+ </details>
230
172
 
231
- ```
232
- ╔══════════════════════════════════════════════════╗
233
- ║ Select generated document language (required) ║
234
- ╚══════════════════════════════════════════════════╝
235
-
236
- जेनरेट की गई फ़ाइलें (CLAUDE.md, Standards, Rules,
237
- Skills, Guides) हिन्दी में लिखी जाएँगी।
238
-
239
- 1. en — English
240
- 2. ko — 한국어 (Korean)
241
- 3. zh-CN — 简体中文 (Chinese Simplified)
242
- 4. ja — 日本語 (Japanese)
243
- 5. es — Español (Spanish)
244
- 6. vi — Tiếng Việt (Vietnamese)
245
- ❯ 7. hi — हिन्दी (Hindi)
246
- 8. ru — Русский (Russian)
247
- 9. fr — Français (French)
248
- 10. de — Deutsch (German)
249
-
250
- ↑↓ Move 1-0 Jump Enter Select ESC Cancel
251
- ```
173
+ <details>
174
+ <summary><strong>🛡️ एक वास्तविक auto-loaded rule (<code>.claude/rules/10.backend/01.controller-rules.md</code>)</strong></summary>
252
175
 
253
- नेविगेट करते समय विवरण चुनी गई भाषा में बदल जाता है। सिलेक्टर को छोड़ने के लिए, सीधे `--lang` पास करें:
176
+ ````markdown
177
+ ---
178
+ paths:
179
+ - "**/*"
180
+ ---
254
181
 
255
- ```bash
256
- npx claudeos-core init --lang ko # Korean
257
- npx claudeos-core init --lang ja # Japanese
258
- npx claudeos-core init --lang en # English (डिफ़ॉल्ट)
182
+ # Controller Rules
183
+
184
+ ## REST (`io.spring.api.*`)
185
+
186
+ - Controllers are the SOLE response wrapper for HTTP — no aggregator/facade above them.
187
+ Return `ResponseEntity<?>` or a body Spring serializes via `JacksonCustomizations`.
188
+ - Each controller method calls exactly ONE application service method. Multi-source
189
+ composition lives in the application service.
190
+ - Controllers MUST NOT import `io.spring.infrastructure.*`. No direct `@Mapper` access.
191
+ - Validate command-param arguments with `@Valid`. Custom JSR-303 constraints live under
192
+ `io.spring.application.{aggregate}.*`.
193
+ - Resolve the current user via `@AuthenticationPrincipal User`.
194
+ - Let exceptions propagate to `io.spring.api.exception.CustomizeExceptionHandler`
195
+ (`@ControllerAdvice`). Do NOT `try/catch` business exceptions inside the controller.
196
+
197
+ ## GraphQL (`io.spring.graphql.*`)
198
+
199
+ - DGS components (`@DgsComponent`) are the sole GraphQL response wrappers.
200
+ Use `@DgsQuery` / `@DgsData` / `@DgsMutation`.
201
+ - Resolve the current user via `io.spring.graphql.SecurityUtil.getCurrentUser()`.
202
+
203
+ ## Examples
204
+
205
+ ✅ Correct:
206
+ ```java
207
+ @PostMapping
208
+ public ResponseEntity<?> createArticle(@AuthenticationPrincipal User user,
209
+ @Valid @RequestBody NewArticleParam param) {
210
+ Article article = articleCommandService.createArticle(param, user);
211
+ ArticleData data = articleQueryService.findById(article.getId(), user)
212
+ .orElseThrow(ResourceNotFoundException::new);
213
+ return ResponseEntity.ok(Map.of("article", data));
214
+ }
259
215
  ```
260
216
 
261
- > **नोट:** यह केवल जेनरेट की गई डॉक्यूमेंटेशन फ़ाइलों की भाषा सेट करता है। कोड विश्लेषण (Pass 1–2) हमेशा अंग्रेज़ी में चलता है; जेनरेट किया गया आउटपुट (Pass 3) आपकी चुनी हुई भाषा में लिखा जाता है। जेनरेट की गई फ़ाइलों के भीतर कोड उदाहरण अपनी मूल प्रोग्रामिंग भाषा सिंटैक्स में रहते हैं।
262
-
263
- बस इतना ही। 10 मिनट (छोटा प्रोजेक्ट) से लेकर 2 घंटे (60+ डोमेन मोनोरेपो) तक, सभी डॉक्यूमेंटेशन जेनरेट हो जाते हैं और उपयोग के लिए तैयार हैं। CLI हर pass के लिए percentage, elapsed time, और ETA के साथ एक progress bar दिखाता है। प्रोजेक्ट आकार के अनुसार विस्तृत timing के लिए [प्रोजेक्ट आकार द्वारा ऑटो-स्केलिंग](#प्रोजेक्ट-आकार-द्वारा-ऑटो-स्केलिंग) देखें।
264
-
265
- ### मैनुअल स्टेप-बाय-स्टेप इंस्टॉलेशन
266
-
267
- यदि आप हर चरण पर पूर्ण नियंत्रण चाहते हैं या यदि automated pipeline किसी चरण पर विफल हो जाता है — तो आप हर चरण को मैन्युअली चला सकते हैं। यह ClaudeOS-Core के आंतरिक कार्य को समझने के लिए भी उपयोगी है।
268
-
269
- #### Step 1: Clone करें और डिपेंडेंसी इंस्टॉल करें
270
-
271
- ```bash
272
- cd /your/project/root
273
-
274
- git clone https://github.com/claudeos-core/claudeos-core.git claudeos-core-tools
275
- cd claudeos-core-tools && npm install && cd ..
217
+ Incorrect:
218
+ ```java
219
+ @PostMapping
220
+ public ResponseEntity<?> create(@RequestBody NewArticleParam p) {
221
+ try {
222
+ articleCommandService.createArticle(p, currentUser);
223
+ } catch (Exception e) { // NOlet CustomizeExceptionHandler handle it
224
+ return ResponseEntity.status(500).body(e.getMessage()); // NO — leaks raw message
225
+ }
226
+ return ResponseEntity.ok().build();
227
+ }
276
228
  ```
229
+ ````
277
230
 
278
- #### Step 2: डायरेक्टरी स्ट्रक्चर बनाएँ
231
+ `paths: ["**/*"]` glob का अर्थ है कि जब भी आप प्रोजेक्ट की किसी भी फ़ाइल को संपादित करते हैं, Claude Code इस rule को स्वचालित रूप से लोड करता है। rule में हर class name, package path, और exception handler सीधे स्कैन किए गए स्रोत से आता है — प्रोजेक्ट के वास्तविक `CustomizeExceptionHandler` और `JacksonCustomizations` सहित।
279
232
 
280
- ```bash
281
- # Rules (v2.0.0: 60.memory जोड़ा गया)
282
- mkdir -p .claude/rules/{00.core,10.backend,20.frontend,30.security-db,40.infra,50.sync,60.memory}
233
+ </details>
283
234
 
284
- # Standards
285
- mkdir -p claudeos-core/standard/{00.core,10.backend-api,20.frontend-ui,30.security-db,40.infra,50.verification,90.optional}
235
+ <details>
236
+ <summary><strong>🧠 एक स्वतः उत्पन्न <code>decision-log.md</code> seed (वास्तविक अंश)</strong></summary>
286
237
 
287
- # Skills
288
- mkdir -p claudeos-core/skills/{00.shared,10.backend-crud/scaffold-crud-feature,20.frontend-page/scaffold-page-feature,50.testing,90.experimental}
238
+ ```markdown
239
+ ## 2026-04-26 — Hexagonal ports & adapters with MyBatis-only persistence
289
240
 
290
- # Guide, Database, MCP, Generated, Memory (v2.0.0: memory जोड़ा गया; v2.1.0: plan हटा दिया गया)
291
- mkdir -p claudeos-core/guide/{01.onboarding,02.usage,03.troubleshooting,04.architecture}
292
- mkdir -p claudeos-core/{database,mcp-guide,generated,memory}
241
+ - **Context:** `io.spring.core.*` exposes `*Repository` ports (e.g.,
242
+ `io.spring.core.article.ArticleRepository`) implemented by
243
+ `io.spring.infrastructure.repository.MyBatis*Repository` adapters.
244
+ The domain layer has zero `org.springframework.*` /
245
+ `org.apache.ibatis.*` / `io.spring.infrastructure.*` imports.
246
+ - **Options considered:** JPA/Hibernate, Spring Data, MyBatis-Plus
247
+ `BaseMapper`. None adopted.
248
+ - **Decision:** MyBatis 3 (`mybatis-spring-boot-starter:2.2.2`) with
249
+ hand-written XML statements under `src/main/resources/mapper/*.xml`.
250
+ Hexagonal port/adapter wiring keeps the domain framework-free.
251
+ - **Consequences:** Every SQL lives in XML — `@Select`/`@Insert`/`@Update`/`@Delete`
252
+ annotations are forbidden. New aggregates require both a
253
+ `core.{aggregate}.{Aggregate}Repository` port AND a
254
+ `MyBatis{Aggregate}Repository` adapter; introducing a JPA repository would
255
+ split the persistence model.
293
256
  ```
294
257
 
295
- > **v2.1.0 नोट:** `claudeos-core/plan/` डायरेक्टरी अब नहीं बनाई जाती। Master plan generation हटा दिया गया क्योंकि master plans एक आंतरिक backup थे जिन्हें Claude Code runtime पर कभी नहीं पढ़ता था, और उन्हें aggregate करना `Prompt is too long` विफलताओं को trigger करता था। इसके बजाय backup/restore के लिए `git` का उपयोग करें।
296
-
297
- #### Step 3: plan-installer चलाएँ (प्रोजेक्ट विश्लेषण)
298
-
299
- यह आपके प्रोजेक्ट को स्कैन करता है, स्टैक डिटेक्ट करता है, डोमेन खोजता है, उन्हें समूहों में विभाजित करता है, और प्रॉम्प्ट जेनरेट करता है।
258
+ Pass 4 `pass2-merged.json` से निकाले गए architectural निर्णयों के साथ `decision-log.md` को seed करता है ताकि भविष्य के sessions याद रखें कि codebase जैसा है _वैसा क्यों है_ सिर्फ़ यह नहीं कि _कैसा दिखता है_। हर option ("JPA/Hibernate", "MyBatis-Plus") और हर consequence वास्तविक `build.gradle` dependency block पर आधारित है।
300
259
 
301
- ```bash
302
- node claudeos-core-tools/plan-installer/index.js
303
- ```
260
+ </details>
304
261
 
305
- **आउटपुट (`claudeos-core/generated/` में):**
306
- - `project-analysis.json` — डिटेक्ट किया गया स्टैक, डोमेन, फ्रंटएंड जानकारी
307
- - `domain-groups.json` — Pass 1 के लिए डोमेन समूह
308
- - `pass1-backend-prompt.md` / `pass1-frontend-prompt.md` — विश्लेषण प्रॉम्प्ट
309
- - `pass2-prompt.md` — merge प्रॉम्प्ट
310
- - `pass3-prompt.md` — Pass 3 प्रॉम्प्ट template जिसमें Phase 1 "Read Once, Extract Facts" block (Rules A–E) prepend किया गया है। Automated pipeline runtime पर Pass 3 को कई stages में split करती है; यह template हर stage को feed करती है।
311
- - `pass3-context.json` — Pass 2 के बाद build किया गया slim project summary (< 5 KB) जिसे Pass 3 prompts पूरे `pass2-merged.json` के बजाय preferentially पढ़ते हैं (v2.1.0)
312
- - `pass4-prompt.md` — L4 memory scaffolding प्रॉम्प्ट (v2.0.0; `60.memory/` rule writes के लिए वही `staging-override.md` उपयोग करता है)
313
-
314
- आप आगे बढ़ने से पहले डिटेक्शन सटीकता को सत्यापित करने के लिए इन फ़ाइलों की जाँच कर सकते हैं।
262
+ ---
315
263
 
316
- #### Step 4: Pass 1 — गहन कोड विश्लेषण (प्रति डोमेन समूह)
264
+ ## Quick Start
317
265
 
318
- हर डोमेन समूह के लिए Pass 1 चलाएँ। समूहों की संख्या के लिए `domain-groups.json` देखें।
266
+ **पूर्वापेक्षाएँ:** Node.js 18+, [Claude Code](https://docs.anthropic.com/en/docs/claude-code) इंस्टॉल और प्रमाणित।
319
267
 
320
268
  ```bash
321
- # देखें कि कितने समूह हैं
322
- cat claudeos-core/generated/domain-groups.json | node -e "
323
- const g = JSON.parse(require('fs').readFileSync('/dev/stdin','utf-8'));
324
- g.groups.forEach((g,i) => console.log('Group '+(i+1)+': ['+g.domains.join(', ')+'] ('+g.type+', ~'+g.estimatedFiles+' files)'));
325
- "
326
-
327
- # हर समूह के लिए Pass 1 चलाएँ (डोमेन और समूह संख्या बदलें)
328
- # नोट: v1.6.1+ perl के बजाय Node.js String.replace() का उपयोग करता है — perl अब
329
- # आवश्यक नहीं है, और replacement-function semantics डोमेन नामों में दिखाई देने वाले
330
- # $/&/$1 वर्णों से regex injection को रोकते हैं।
331
- #
332
- # समूह 1 के लिए:
333
- DOMAIN_LIST="user, order, product" PASS_NUM=1 node -e "
334
- const fs = require('fs');
335
- const tpl = fs.readFileSync('claudeos-core/generated/pass1-backend-prompt.md','utf-8');
336
- const out = tpl
337
- .replace(/\{\{DOMAIN_GROUP\}\}/g, () => process.env.DOMAIN_LIST)
338
- .replace(/\{\{PASS_NUM\}\}/g, () => process.env.PASS_NUM);
339
- process.stdout.write(out);
340
- " | claude -p --dangerously-skip-permissions
341
-
342
- # समूह 2 के लिए (यदि मौजूद है):
343
- DOMAIN_LIST="payment, system, delivery" PASS_NUM=2 node -e "
344
- const fs = require('fs');
345
- const tpl = fs.readFileSync('claudeos-core/generated/pass1-backend-prompt.md','utf-8');
346
- const out = tpl
347
- .replace(/\{\{DOMAIN_GROUP\}\}/g, () => process.env.DOMAIN_LIST)
348
- .replace(/\{\{PASS_NUM\}\}/g, () => process.env.PASS_NUM);
349
- process.stdout.write(out);
350
- " | claude -p --dangerously-skip-permissions
351
-
352
- # फ्रंटएंड समूहों के लिए, pass1-backend-prompt.md → pass1-frontend-prompt.md स्वैप करें
353
- ```
354
-
355
- **सत्यापित करें:** `ls claudeos-core/generated/pass1-*.json` हर समूह के लिए एक JSON दिखाना चाहिए।
269
+ # 1. अपने प्रोजेक्ट रूट पर जाएँ
270
+ cd my-spring-boot-project
356
271
 
357
- #### Step 5: Pass 2 विश्लेषण परिणामों को merge करें
272
+ # 2. init चलाएँ (यह आपके कोड का विश्लेषण करता है और Claude से rules लिखने को कहता है)
273
+ npx claudeos-core init
358
274
 
359
- ```bash
360
- cat claudeos-core/generated/pass2-prompt.md \
361
- | claude -p --dangerously-skip-permissions
275
+ # 3. हो गया। Claude Code खोलें और कोडिंग शुरू करें — आपके rules पहले से लोड हैं।
362
276
  ```
363
277
 
364
- **सत्यापित करें:** `claudeos-core/generated/pass2-merged.json` 9+ top-level keys के साथ मौजूद होना चाहिए।
365
-
366
- #### Step 6: Pass 3 — सभी डॉक्यूमेंटेशन जेनरेट करें (कई stages में split)
367
-
368
- **v2.1.0 नोट:** Pass 3 को automated pipeline द्वारा **हमेशा split mode में चलाया जाता है**। हर stage एक fresh context window के साथ एक अलग `claude -p` कॉल है, इसलिए प्रोजेक्ट आकार की परवाह किए बिना output-accumulation overflow संरचनात्मक रूप से असंभव है। `pass3-prompt.md` template प्रति-stage एक `STAGE:` directive के साथ assemble किया जाता है जो Claude को बताता है कि किन फ़ाइलों का subset emit करना है। मैनुअल मोड के लिए, सबसे सरल path अभी भी पूरी template को feed करना और Claude को एक ही कॉल में सब कुछ जेनरेट करने देना है — लेकिन यह केवल छोटे प्रोजेक्ट्स (≤5 डोमेन) पर ही विश्वसनीय है। इससे बड़े किसी भी प्रोजेक्ट के लिए `npx claudeos-core init` का उपयोग करें ताकि split runner stage orchestration संभाले।
369
-
370
- **Single-call mode (केवल छोटे प्रोजेक्ट्स, ≤5 डोमेन):**
278
+ `init` समाप्त होने के बाद **आपको क्या मिलता है**:
371
279
 
372
- ```bash
373
- cat claudeos-core/generated/pass3-prompt.md \
374
- | claude -p --dangerously-skip-permissions
375
280
  ```
281
+ your-project/
282
+ ├── .claude/
283
+ │ └── rules/ ← Claude Code द्वारा स्वतः लोड
284
+ │ ├── 00.core/ (सामान्य rules — naming, architecture)
285
+ │ ├── 10.backend/ (backend stack rules, यदि लागू हो)
286
+ │ ├── 20.frontend/ (frontend stack rules, यदि लागू हो)
287
+ │ ├── 30.security-db/ (security & DB परिपाटियाँ)
288
+ │ ├── 40.infra/ (env, logging, CI/CD)
289
+ │ ├── 50.sync/ (doc-sync रिमाइंडर — rules only)
290
+ │ ├── 60.memory/ (memory rules — Pass 4, rules only)
291
+ │ ├── 70.domains/{type}/ (per-domain rules, type = backend|frontend)
292
+ │ └── 80.verification/ (testing strategy + build verification रिमाइंडर)
293
+ ├── claudeos-core/
294
+ │ ├── standard/ ← Reference docs (श्रेणी संरचना का दर्पण)
295
+ │ │ ├── 00.core/ (project overview, architecture, naming)
296
+ │ │ ├── 10.backend/ (backend reference — backend stack पर)
297
+ │ │ ├── 20.frontend/ (frontend reference — frontend stack पर)
298
+ │ │ ├── 30.security-db/ (security & DB reference)
299
+ │ │ ├── 40.infra/ (env / logging / CI-CD reference)
300
+ │ │ ├── 70.domains/{type}/ (per-domain reference)
301
+ │ │ ├── 80.verification/ (build / startup / testing reference — standard only)
302
+ │ │ └── 90.optional/ (stack-specific extras — standard only)
303
+ │ ├── skills/ (Claude द्वारा लागू किए जा सकने वाले पुनः-प्रयोग योग्य पैटर्न)
304
+ │ ├── guide/ (सामान्य कार्यों के लिए how-to गाइड)
305
+ │ ├── database/ (schema overview, migration गाइड)
306
+ │ ├── mcp-guide/ (MCP integration नोट्स)
307
+ │ └── memory/ (decision log, failure patterns, compaction)
308
+ └── CLAUDE.md (वह index जिसे Claude सबसे पहले पढ़ता है)
309
+ ```
310
+
311
+ `rules/` और `standard/` के बीच एक ही संख्या prefix साझा करने वाली श्रेणियाँ एक ही वैचारिक क्षेत्र को दर्शाती हैं (उदाहरण: `10.backend` rules ↔ `10.backend` standards)। केवल-rules श्रेणियाँ: `50.sync` (doc sync रिमाइंडर) और `60.memory` (Pass 4 memory)। केवल-standard श्रेणी: `90.optional` (बिना enforcement के stack-specific extras)। अन्य सभी prefix (`00`, `10`, `20`, `30`, `40`, `70`, `80`) `rules/` और `standard/` दोनों में दिखाई देते हैं। अब Claude Code आपका प्रोजेक्ट जानता है।
376
312
 
377
- **Stage-by-stage mode (सभी प्रोजेक्ट आकारों के लिए अनुशंसित):**
313
+ ---
378
314
 
379
- Automated pipeline इन stages को चलाती है। Stage सूची है:
315
+ ## यह किसके लिए है?
380
316
 
381
- | Stage | लिखता है | नोट्स |
382
- |---|---|---|
383
- | `3a` | `pass3a-facts.md` (5–10 KB distilled fact sheet) | `pass2-merged.json` को एक बार पढ़ता है; बाद के stages इस फ़ाइल को reference करते हैं |
384
- | `3b-core` | `CLAUDE.md`, common `standard/`, common `.claude/rules/` | Cross-project फ़ाइलें; कोई domain-specific output नहीं |
385
- | `3b-1..N` | Domain-specific `standard/60.domains/*.md` + domain rules | प्रति stage ≤15 डोमेन का batch (≥16 डोमेन पर auto-divided) |
386
- | `3c-core` | `guide/` (9 फ़ाइलें), `skills/00.shared/MANIFEST.md`, `skills/*/` orchestrators | साझा skills और सभी user-facing guides |
387
- | `3c-1..N` | `skills/20.frontend-page/scaffold-page-feature/` के अंतर्गत domain sub-skills | प्रति stage ≤15 डोमेन का batch |
388
- | `3d-aux` | `database/`, `mcp-guide/` | Fixed-size, domain count से स्वतंत्र |
317
+ | आप हैं... | यह pain जो हटाता है |
318
+ |---|---|
319
+ | **Claude Code के साथ नया प्रोजेक्ट शुरू करने वाले एकल डेवलपर** | "हर session Claude को मेरी परिपाटियाँ सिखाना" खत्म। `CLAUDE.md` + 8-श्रेणी `.claude/rules/` एक pass में उत्पन्न। |
320
+ | **multiple repos में साझा standards बनाए रखने वाले team lead** | जब लोग packages का नाम बदलते हैं, ORMs बदलते हैं, या response wrappers बदलते हैं तो `.claude/rules/` drift हो जाते हैं। ClaudeOS-Core deterministically पुनः-sync करता है — समान input, byte-identical output, कोई diff noise नहीं। |
321
+ | **Claude Code पहले से उपयोग कर रहे लेकिन उत्पन्न कोड को ठीक करते-करते थके हुए** | गलत response wrapper, गलत package layout, MyBatis का उपयोग होने पर JPA, centralized middleware होने पर बिखरे हुए `try/catch`। Scanner आपकी वास्तविक परिपाटियाँ निकालता है; प्रत्येक Claude pass एक स्पष्ट path allowlist पर चलता है। |
322
+ | **एक नए repo में onboarding** (मौजूदा प्रोजेक्ट, टीम में शामिल होना) | repo पर `init` चलाएँ, एक जीवित architecture map मिलेगा: CLAUDE.md में stack table, ✅/❌ उदाहरणों के साथ per-layer rules, प्रमुख विकल्पों के "क्यों" के साथ seeded decision log (JPA vs MyBatis, REST vs GraphQL, आदि)। 5 फ़ाइलें पढ़ना 5,000 source फ़ाइलें पढ़ने को हराता है। |
323
+ | **Korean / Japanese / Chinese / 7 अन्य भाषाओं में काम करना** | अधिकांश Claude Code rule generators केवल English हैं। ClaudeOS-Core **10 भाषाओं** (`en/ko/ja/zh-CN/es/vi/hi/ru/fr/de`) में पूरा सेट लिखता है **byte-identical संरचनात्मक validation** के साथ output भाषा से स्वतंत्र वही `claude-md-validator` verdict। |
324
+ | **monorepo पर चलाना** (Turborepo, pnpm/yarn workspaces, Lerna) | Backend + frontend domains एक run में अलग-अलग prompts के साथ analyzed; `apps/*/` और `packages/*/` स्वतः walked; प्रति-stack rules `70.domains/{type}/` के तहत emit होते हैं। |
325
+ | **OSS में योगदान या प्रयोग** | Output gitignore-friendly है — `claudeos-core/` आपकी local working dir है, केवल `CLAUDE.md` + `.claude/` ship करना ज़रूरी है। बाधित होने पर resume-safe; पुनः चलाने पर idempotent (`--force` के बिना rules में आपके मैन्युअल edits सुरक्षित रहते हैं)। |
389
326
 
390
- 1–15 डोमेन प्रोजेक्ट के लिए यह 4 stages तक विस्तारित होता है (`3a`, `3b-core`, `3c-core`, `3d-aux` कोई batch sub-division नहीं) 16–30 डोमेन के लिए यह 8 stages तक विस्तारित होता है (`3b` और `3c` प्रत्येक 2 batches में sub-divided)। पूरी तालिका के लिए [प्रोजेक्ट आकार द्वारा ऑटो-स्केलिंग](#प्रोजेक्ट-आकार-द्वारा-ऑटो-स्केलिंग) देखें।
327
+ **यदि उपयुक्त नहीं:** यदि आप scan चरण के बिना दिन एक से काम करने वाला agents/skills/rules का one-size-fits-all preset bundle चाहते हैं ([docs/hi/comparison.md](docs/hi/comparison.md) देखें कि क्या कहाँ फिट होता है), आपका प्रोजेक्ट अभी [समर्थित stacks](#supported-stacks) में से किसी से मेल नहीं खाता, या आपको केवल एक एकल `CLAUDE.md` चाहिए (बिल्ट-इन `claude /init` पर्याप्त है अन्य tool इंस्टॉल करने की आवश्यकता नहीं)
391
328
 
392
- **सत्यापित करें:** `CLAUDE.md` आपके प्रोजेक्ट रूट में मौजूद होना चाहिए, और `claudeos-core/generated/pass3-complete.json` marker लिखा जाना चाहिए। Split mode में, marker में `mode: "split"` और एक `groupsCompleted` array होता है जो हर finished stage को list करता है — partial-marker logic इसका उपयोग crash के बाद `3a` से restart करने के बजाय सही stage से resume करने के लिए करती है (जो token cost को दोगुना कर देता)।
329
+ ---
393
330
 
394
- > **Staging नोट:** Pass 3 पहले rule फ़ाइलें `claudeos-core/generated/.staged-rules/` में लिखता है क्योंकि Claude Code की sensitive-path policy `.claude/` में सीधे writes को block करती है। Automated pipeline हर stage के बाद move स्वचालित रूप से संभालती है। यदि आप एक stage मैन्युअली चलाते हैं, तो आपको staged tree को स्वयं move करना होगा: `mv claudeos-core/generated/.staged-rules/* .claude/rules/` (subpaths को preserve करें)।
331
+ ## यह कैसे काम करता है?
395
332
 
396
- #### Step 7: Pass 4 Memory scaffolding
333
+ ClaudeOS-Core सामान्य Claude Code workflow को उलट देता है:
397
334
 
398
- ```bash
399
- cat claudeos-core/generated/pass4-prompt.md \
400
- | claude -p --dangerously-skip-permissions
401
335
  ```
402
-
403
- **सत्यापित करें:** `claudeos-core/memory/` में 4 फ़ाइलें (`decision-log.md`, `failure-patterns.md`, `compaction.md`, `auto-rule-update.md`) होनी चाहिए, `.claude/rules/60.memory/` में 4 rule फ़ाइलें होनी चाहिए, और `CLAUDE.md` में एक `## Memory (L4)` section append होना चाहिए। Marker: `claudeos-core/generated/pass4-memory.json`।
404
-
405
- > **v2.1.0 gap-fill:** Pass 4 यह भी सुनिश्चित करता है कि `claudeos-core/skills/00.shared/MANIFEST.md` मौजूद है। यदि Pass 3c ने इसे छोड़ दिया (skill-sparse प्रोजेक्ट्स पर संभव क्योंकि stack `pass3.md` templates `MANIFEST.md` को generation targets में list करते हैं बिना REQUIRED मार्क किए), तो gap-fill एक minimal stub बनाता है ताकि `.claude/rules/50.sync/02.skills-sync.md` (v2.2.0 पथ — sync rule की संख्या 3 से घटकर 2 हुई, `03` अब `02` है) के पास हमेशा एक valid reference target हो। Idempotent: यदि फ़ाइल में पहले से real content (>20 chars) है तो skip करता है।
406
-
407
- > **नोट:** यदि `claude -p` विफल हो जाता है या `pass4-prompt.md` गायब है, तो automated pipeline `lib/memory-scaffold.js` के माध्यम से static scaffold पर fallback करता है (जब `--lang` गैर-अंग्रेज़ी होता है तो Claude-driven translation के साथ)। Static fallback केवल `npx claudeos-core init` के अंदर चलता है — मैनुअल मोड के लिए Pass 4 का सफल होना ज़रूरी है।
408
-
409
- #### Step 8: सत्यापन टूल चलाएँ
410
-
411
- ```bash
412
- # मेटाडेटा जेनरेट करें (अन्य जाँचों से पहले आवश्यक)
413
- node claudeos-core-tools/manifest-generator/index.js
414
-
415
- # सभी जाँच चलाएँ
416
- node claudeos-core-tools/health-checker/index.js
417
-
418
- # या व्यक्तिगत जाँच चलाएँ:
419
- node claudeos-core-tools/plan-validator/index.js --check # Plan ↔ disk consistency
420
- node claudeos-core-tools/sync-checker/index.js # अपंजीकृत/orphan फ़ाइलें
421
- node claudeos-core-tools/content-validator/index.js # फ़ाइल गुणवत्ता जाँच (memory/ section [9/9] सहित)
422
- node claudeos-core-tools/pass-json-validator/index.js # Pass 1–4 JSON + completion marker जाँच
336
+ सामान्य: आप प्रोजेक्ट का वर्णन करते हैं → Claude आपके stack का अनुमान लगाता है → Claude docs लिखता है
337
+ यह: कोड आपके stack को पढ़ता है कोड पुष्ट तथ्य Claude को देता है Claude तथ्यों से docs लिखता है
423
338
  ```
424
339
 
425
- #### Step 9: परिणाम सत्यापित करें
426
-
427
- ```bash
428
- # जेनरेट की गई फ़ाइलें गिनें
429
- find .claude claudeos-core -type f | grep -v node_modules | grep -v '/generated/' | wc -l
430
-
431
- # CLAUDE.md जाँचें
432
- head -30 CLAUDE.md
340
+ पाइपलाइन **तीन चरणों** में चलती है, LLM call के दोनों ओर कोड के साथ:
433
341
 
434
- # एक standard फ़ाइल जाँचें
435
- cat claudeos-core/standard/00.core/01.project-overview.md | head -20
342
+ **1. Step A — Scanner (deterministic, कोई LLM नहीं)।** एक Node.js scanner आपके project root को walk करता है, `package.json` / `build.gradle` / `pom.xml` / `pyproject.toml` पढ़ता है, `.env*` फ़ाइलों को parse करता है (`PASSWORD/SECRET/TOKEN/JWT_SECRET/...` के लिए sensitive-variable redaction के साथ), आपके architecture pattern को वर्गीकृत करता है (Java के 5 patterns A/B/C/D/E, Kotlin CQRS / multi-module, Next.js App vs. Pages Router, FSD, components-pattern), domains खोजता है, और मौजूद हर source file path का स्पष्ट allowlist बनाता है। Output: `project-analysis.json` — आगे जो होता है उसके लिए single source of truth।
436
343
 
437
- # Rules जाँचें
438
- ls .claude/rules/*/
439
- ```
344
+ **2. Step B — 4-Pass Claude पाइपलाइन (Step A के तथ्यों से प्रतिबंधित)।**
345
+ - **Pass 1** प्रति domain group प्रतिनिधि फ़ाइलें पढ़ता है और प्रति domain ~50–100 परिपाटियाँ निकालता है — response wrappers, logging libraries, error handling, naming conventions, test patterns. प्रति domain group एक बार चलता है (`max 4 domains, 40 files per group`) ताकि context कभी overflow न हो।
346
+ - **Pass 2** सभी per-domain analysis को project-wide picture में merge करता है और dominant convention चुनकर असहमतियाँ हल करता है।
347
+ - **Pass 3** `CLAUDE.md` + `.claude/rules/` + `claudeos-core/standard/` + skills + guides लिखता है — stages में split (`3a` facts → `3b-core/3b-N` rules+standards → `3c-core/3c-N` skills+guides → `3d-aux` database+mcp-guide) ताकि `pass2-merged.json` बड़ा होने पर भी हर stage का prompt LLM के context window में fit हो। ≥16 domain वाले projects के लिए 3b/3c को ≤15-domain batches में sub-divide करता है।
348
+ - **Pass 4** L4 memory layer (`decision-log.md`, `failure-patterns.md`, `compaction.md`, `auto-rule-update.md`) को seed करता है और universal scaffold rules जोड़ता है। Pass 4 को **`CLAUDE.md` संशोधित करने से प्रतिबंधित किया गया है** — Pass 3 का Section 8 authoritative है।
440
349
 
441
- > **टिप:** यदि कोई चरण विफल हो जाता है, तो आप समस्या ठीक कर सकते हैं और केवल उस चरण को फिर से चला सकते हैं। Pass 1/2 परिणाम cached हैं यदि `pass1-N.json` या `pass2-merged.json` पहले से मौजूद है, तो automated pipeline उन्हें skip करता है। पिछले परिणाम हटाने और नए सिरे से शुरू करने के लिए `npx claudeos-core init --force` का उपयोग करें।
350
+ **3. Step CVerification (deterministic, कोई LLM नहीं)।** पाँच validators output की जाँच करते हैं:
351
+ - `claude-md-validator` — `CLAUDE.md` पर 25 संरचनात्मक checks (8 sections, H3/H4 counts, memory file uniqueness, T1 canonical heading invariant). Language-invariant: `--lang` से स्वतंत्र वही verdict।
352
+ - `content-validator` — 10 content checks जिसमें path-claim verification (`STALE_PATH` fabricated `src/...` references को पकड़ता है) और MANIFEST drift detection शामिल हैं।
353
+ - `pass-json-validator` — Pass 1/2/3/4 JSON well-formedness + stack-aware section count।
354
+ - `plan-validator` — plan ↔ disk consistency (legacy, v2.1.0 के बाद से ज़्यादातर no-op)।
355
+ - `sync-checker` — 7 tracked dirs में disk ↔ `sync-map.json` registration consistency।
442
356
 
443
- ### उपयोग शुरू करें
357
+ तीन severity tiers (`fail` / `warn` / `advisory`) ताकि warnings कभी CI को LLM hallucinations पर deadlock न करें जिन्हें user मैन्युअल रूप से ठीक कर सकता है।
444
358
 
445
- ```
446
- # Claude Code में — बस स्वाभाविक रूप से पूछें:
447
- "order डोमेन के लिए एक CRUD बनाओ"
448
- "user authentication API जोड़ो"
449
- "इस कोड को प्रोजेक्ट पैटर्न से मेल खाने के लिए refactor करो"
359
+ जो invariant यह सब बाँधता है: **Claude केवल वही paths cite कर सकता है जो आपके कोड में वास्तव में मौजूद हैं**, क्योंकि Step A उसे एक finite allowlist देता है। यदि LLM फिर भी कुछ आविष्कार करने की कोशिश करता है (दुर्लभ, लेकिन कुछ seeds पर होता है), Step C docs ship होने से पहले उसे पकड़ लेता है।
450
360
 
451
- # Claude Code स्वचालित रूप से आपके जेनरेट किए गए Standards, Rules, और Skills को reference करता है।
452
- ```
361
+ per-pass details, marker-based resume, Claude Code के `.claude/` sensitive-path block के लिए staged-rules workaround, और stack detection internals के लिए, [docs/hi/architecture.md](docs/hi/architecture.md) देखें।
453
362
 
454
363
  ---
455
364
 
456
- ## यह कैसे काम करता है — 4-Pass Pipeline
365
+ ## Supported Stacks
457
366
 
458
- ```
459
- npx claudeos-core init
460
-
461
- ├── [1] npm install ← डिपेंडेंसीज़ (~10s)
462
- ├── [2] डायरेक्टरी संरचना ← फ़ोल्डर बनाएँ (~1s)
463
- ├── [3] plan-installer (Node.js) ← प्रोजेक्ट स्कैन (~5s)
464
- │ ├── स्टैक auto-detect (multi-stack aware)
465
- │ ├── डोमेन सूची एक्सट्रैक्ट (tagged: backend/frontend)
466
- │ ├── डोमेन समूहों में विभाजित (प्रति प्रकार)
467
- │ ├── pass3-context.json build करें (slim summary, v2.1.0)
468
- │ └── स्टैक-विशिष्ट प्रॉम्प्ट चुनें (प्रति प्रकार)
469
-
470
- ├── [4] Pass 1 × N (claude -p) ← गहन कोड विश्लेषण (~2-8min)
471
- │ ├── ⚙️ Backend समूह → backend-विशिष्ट प्रॉम्प्ट
472
- │ └── 🎨 Frontend समूह → frontend-विशिष्ट प्रॉम्प्ट
473
-
474
- ├── [5] Pass 2 × 1 (claude -p) ← विश्लेषण merge (~1min)
475
- │ └── सभी Pass 1 परिणाम pass2-merged.json में समेकित
476
-
477
- ├── [6] Pass 3 (split mode, v2.1.0) ← सब कुछ जेनरेट
478
- │ │
479
- │ ├── 3a × 1 (claude -p) ← Fact extraction (~5-10min)
480
- │ │ └── pass2-merged.json एक बार पढ़ें → pass3a-facts.md
481
- │ │
482
- │ ├── 3b-core × 1 (claude -p) ← CLAUDE.md + common standard/rules
483
- │ ├── 3b-1..N × N (claude -p) ← Domain standards/rules (≤15 डोमेन/batch)
484
- │ │
485
- │ ├── 3c-core × 1 (claude -p) ← Guides + shared skills + MANIFEST.md
486
- │ ├── 3c-1..N × N (claude -p) ← Domain sub-skills (≤15 डोमेन/batch)
487
- │ │
488
- │ └── 3d-aux × 1 (claude -p) ← database/ + mcp-guide/ stubs
489
-
490
- ├── [7] Pass 4 × 1 (claude -p) ← Memory scaffolding (~30s-5min)
491
- │ ├── memory/ seed करें (decision-log, failure-patterns, …)
492
- │ ├── 60.memory/ rules जेनरेट करें
493
- │ ├── CLAUDE.md में "Memory (L4)" section append करें
494
- │ └── Gap-fill: skills/00.shared/MANIFEST.md सुनिश्चित करें (v2.1.0)
495
-
496
- └── [8] सत्यापन ← health checker ऑटो-रन
497
- ```
498
-
499
- ### 4 Pass क्यों?
500
-
501
- **Pass 1** एकमात्र pass है जो आपका सोर्स कोड पढ़ता है। यह प्रति डोमेन प्रतिनिधि फ़ाइलें चुनता है और 55–95 विश्लेषण श्रेणियों (प्रति स्टैक) में पैटर्न एक्सट्रैक्ट करता है। बड़े प्रोजेक्ट्स के लिए, Pass 1 कई बार चलता है — प्रति डोमेन समूह एक। Multi-stack प्रोजेक्ट्स (जैसे Java backend + React frontend) में, backend और frontend डोमेन हर स्टैक के अनुरूप **अलग-अलग विश्लेषण प्रॉम्प्ट** का उपयोग करते हैं।
367
+ 12 stacks, आपकी प्रोजेक्ट फ़ाइलों से स्वतः पहचाने जाते हैं:
502
368
 
503
- **Pass 2** सभी Pass 1 परिणामों को एक एकीकृत विश्लेषण में merge करता है: सामान्य पैटर्न (100% साझा), बहुमत पैटर्न (50%+ साझा), डोमेन-विशिष्ट पैटर्न, गंभीरता के अनुसार anti-patterns, और cross-cutting concerns (naming, security, DB, testing, logging, performance)। Backend और frontend परिणाम एक साथ merge होते हैं।
369
+ **Backend:** Java/Spring Boot · Kotlin/Spring Boot · Node/Express · Node/Fastify · Node/NestJS · Python/Django · Python/FastAPI · Python/Flask
504
370
 
505
- **Pass 3** (split mode, v2.1.0) merged विश्लेषण लेता है और पूरा फ़ाइल ecosystem (CLAUDE.md, rules, standards, skills, guides) कई क्रमिक `claude -p` कॉल्स में जेनरेट करता है। मुख्य अंतर्दृष्टि यह है कि output-accumulation overflow input size से predictable नहीं है: single-call Pass 3 2-डोमेन प्रोजेक्ट्स पर ठीक काम करता था और ~5 डोमेन पर विश्वसनीय रूप से विफल होता था, और failure boundary इस पर निर्भर करती थी कि हर फ़ाइल कितनी verbose हो। Split mode इसे पूरी तरह से bypass करता है — हर stage एक नए context window के साथ शुरू होता है और फ़ाइलों का bounded subset लिखता है। Cross-stage consistency (जो single-call approach का मुख्य लाभ था) `pass3a-facts.md` द्वारा संरक्षित होती है, एक 5–10 KB distilled fact sheet जिसे हर बाद का stage reference करता है।
371
+ **Frontend:** Node/Next.js · Node/Vite · Angular · Vue/Nuxt
506
372
 
507
- Pass 3 prompt template में एक **Phase 1 "Read Once, Extract Facts" block** भी शामिल है जिसमें पाँच rules हैं जो output volume को और constrain करते हैं:
373
+ मल्टी-stack प्रोजेक्ट (उदाहरण: Spring Boot backend + Next.js frontend) सीधे काम करते हैं।
508
374
 
509
- - **Rule A** fact table को reference करें; `pass2-merged.json` दोबारा न पढ़ें।
510
- - **Rule B** — Idempotent file writing (यदि target real content के साथ मौजूद है तो skip करें), जिससे Pass 3 interruption के बाद safely re-runnable बनता है।
511
- - **Rule C** — Cross-file consistency को fact table के माध्यम से single source of truth के रूप में enforce किया जाता है।
512
- - **Rule D** — Output conciseness: फ़ाइल writes के बीच एक line (`[WRITE]`/`[SKIP]`), fact table को दोहराना नहीं, फ़ाइल content को echo नहीं।
513
- - **Rule E** — Batch idempotent check: per-target `Read` calls के बजाय PHASE 2 start पर एक `Glob`।
514
-
515
- **v2.2.0** में, Pass 3 एक deterministic CLAUDE.md scaffold (`pass-prompts/templates/common/claude-md-scaffold.md`) को prompt में inline embed करता है। यह 8 top-level section titles और order को fix करता है ताकि generated `CLAUDE.md` projects के बीच drift न हो, जबकि हर section का content per-project adapt होता रहे। stack-detector का नया `.env` parser (`lib/env-parser.js`) prompt को `stack.envInfo` supply करता है ताकि port/host/API target rows framework defaults के बजाय project द्वारा actually declare किए गए values से match करें।
516
-
517
- **Pass 4** L4 Memory layer को scaffold करता है: स्थायी टीम ज्ञान फ़ाइलें (decision-log, failure-patterns, compaction policy, auto-rule-update) साथ ही `60.memory/` rules जो भविष्य के sessions को बताते हैं कि उन फ़ाइलों को कब और कैसे पढ़ना/लिखना है। Memory layer वह है जो Claude Code को sessions में सबक संचित करने की अनुमति देता है, बजाय हर बार उन्हें फिर से खोजने के। जब `--lang` गैर-अंग्रेज़ी होता है, तो fallback static सामग्री लिखे जाने से पहले Claude के माध्यम से अनुवादित होती है। v2.1.0 यदि Pass 3c ने `skills/00.shared/MANIFEST.md` को omit किया हो तो उसके लिए एक gap-fill जोड़ता है।
375
+ पहचान नियमों और प्रत्येक scanner क्या निकालता है, के लिए [docs/hi/stacks.md](docs/hi/stacks.md) देखें।
518
376
 
519
377
  ---
520
378
 
521
- ## जेनरेट की गई फ़ाइल संरचना
379
+ ## दैनिक Workflow
522
380
 
523
- ```
524
- your-project/
525
-
526
- ├── CLAUDE.md ← Claude Code entry point (deterministic 8-section structure, v2.2.0)
527
-
528
- ├── .claude/
529
- │ └── rules/ ← Glob-triggered rules
530
- │ ├── 00.core/
531
- │ ├── 10.backend/
532
- │ ├── 20.frontend/
533
- │ ├── 30.security-db/
534
- │ ├── 40.infra/
535
- │ ├── 50.sync/ ← Sync रिमाइंडर rules
536
- │ └── 60.memory/ ← L4 memory on-demand scope rules (v2.0.0)
537
-
538
- ├── claudeos-core/ ← मुख्य आउटपुट डायरेक्टरी
539
- │ ├── generated/ ← विश्लेषण JSON + डायनामिक प्रॉम्प्ट + Pass markers (इसे gitignore करें)
540
- │ │ ├── project-analysis.json ← स्टैक जानकारी (multi-stack aware)
541
- │ │ ├── domain-groups.json ← type: backend/frontend के साथ समूह
542
- │ │ ├── pass1-backend-prompt.md ← Backend विश्लेषण प्रॉम्प्ट
543
- │ │ ├── pass1-frontend-prompt.md ← Frontend विश्लेषण प्रॉम्प्ट (यदि डिटेक्ट)
544
- │ │ ├── pass2-prompt.md ← Merge प्रॉम्प्ट
545
- │ │ ├── pass2-merged.json ← Pass 2 output (केवल Pass 3a द्वारा consumed)
546
- │ │ ├── pass3-context.json ← Pass 3 के लिए slim summary (< 5 KB) (v2.1.0)
547
- │ │ ├── pass3-prompt.md ← Pass 3 प्रॉम्प्ट template (Phase 1 block prepended)
548
- │ │ ├── pass3a-facts.md ← Pass 3a द्वारा लिखा गया fact sheet, 3b/3c/3d द्वारा पढ़ा गया (v2.1.0)
549
- │ │ ├── pass4-prompt.md ← Memory scaffolding प्रॉम्प्ट (v2.0.0)
550
- │ │ ├── pass3-complete.json ← Pass 3 completion marker (split mode: groupsCompleted शामिल, v2.1.0)
551
- │ │ ├── pass4-memory.json ← Pass 4 completion marker (resume पर skip)
552
- │ │ ├── rule-manifest.json ← सत्यापन टूल्स के लिए फ़ाइल index
553
- │ │ ├── sync-map.json ← Plan ↔ disk mapping (v2.1.0 में empty; sync-checker compat के लिए रखा गया)
554
- │ │ ├── stale-report.json ← Consolidated सत्यापन परिणाम
555
- │ │ ├── .i18n-cache-<lang>.json ← अनुवाद cache (गैर-अंग्रेज़ी `--lang`)
556
- │ │ └── .staged-rules/ ← `.claude/rules/` writes के लिए transient staging dir (ऑटो-moved + cleaned)
557
- │ ├── standard/ ← Coding standards (15-19 फ़ाइलें + 60.domains/ में per-domain)
558
- │ │ ├── 00.core/ ← Overview, architecture, naming
559
- │ │ ├── 10.backend-api/ ← API पैटर्न (stack-specific)
560
- │ │ ├── 20.frontend-ui/ ← Frontend पैटर्न (यदि डिटेक्ट)
561
- │ │ ├── 30.security-db/ ← Security, DB schema, utilities
562
- │ │ ├── 40.infra/ ← Config, logging, CI/CD
563
- │ │ ├── 50.verification/ ← Build verification, testing
564
- │ │ ├── 60.domains/ ← Per-domain standards (Pass 3b-N द्वारा लिखा गया, v2.1.0)
565
- │ │ └── 90.optional/ ← वैकल्पिक conventions (stack-specific extras)
566
- │ ├── skills/ ← CRUD/page scaffolding skills
567
- │ │ └── 00.shared/MANIFEST.md ← registered skills के लिए single source of truth
568
- │ ├── guide/ ← Onboarding, FAQ, troubleshooting (9 फ़ाइलें)
569
- │ ├── database/ ← DB schema, migration guide
570
- │ ├── mcp-guide/ ← MCP server integration guide
571
- │ └── memory/ ← L4: टीम ज्ञान (4 फ़ाइलें) — इन्हें commit करें
572
- │ ├── decision-log.md ← डिज़ाइन निर्णयों के पीछे "क्यों"
573
- │ ├── failure-patterns.md ← आवर्ती त्रुटियाँ और fix (ऑटो-scored — `npx claudeos-core memory score`)
574
- │ ├── compaction.md ← 4-stage compaction रणनीति (`npx claudeos-core memory compact` चलाएँ)
575
- │ └── auto-rule-update.md ← Rule सुधार प्रस्ताव (`npx claudeos-core memory propose-rules`)
576
-
577
- └── claudeos-core-tools/ ← यह toolkit (संशोधित न करें)
578
- ```
579
-
580
- हर standard फ़ाइल में ✅ सही उदाहरण, ❌ ग़लत उदाहरण, और rules सारांश तालिका शामिल होते हैं — सभी आपके वास्तविक कोड पैटर्न से derived, सामान्य टेम्पलेट से नहीं।
381
+ तीन commands ~95% उपयोग को कवर करते हैं:
581
382
 
582
- > **v2.1.0 नोट:** `claudeos-core/plan/` अब जेनरेट नहीं होती। Master plans एक आंतरिक backup थे जिन्हें Claude Code runtime पर consume नहीं करता था, और Pass 3 में उन्हें aggregate करना output-accumulation overflow का एक प्रमुख कारण था। इसके बजाय backup/restore के लिए `git` का उपयोग करें। v2.0.x से upgrade करने वाले प्रोजेक्ट्स किसी भी मौजूदा `claudeos-core/plan/` डायरेक्टरी को सुरक्षित रूप से हटा सकते हैं।
583
-
584
- ### Gitignore सिफ़ारिशें
585
-
586
- **Commit करें** (टीम ज्ञान — साझा किया जाना चाहिए):
587
- - `CLAUDE.md` — Claude Code entry point
588
- - `.claude/rules/**` — ऑटो-लोडेड rules
589
- - `claudeos-core/standard/**`, `skills/**`, `guide/**`, `database/**`, `mcp-guide/**`, `plan/**` — जेनरेट की गई डॉक्यूमेंटेशन
590
- - `claudeos-core/memory/**` — निर्णय इतिहास, failure patterns, rule प्रस्ताव
383
+ ```bash
384
+ # प्रोजेक्ट पर पहली बार
385
+ npx claudeos-core init
591
386
 
592
- **Commit करें** (पुनर्जेनरेट करने योग्य build artifacts):
387
+ # आपके द्वारा standards या rules मैन्युअल रूप से संपादित करने के बाद
388
+ npx claudeos-core lint
593
389
 
594
- ```gitignore
595
- # ClaudeOS-Core — जेनरेट किया गया विश्लेषण और अनुवाद cache
596
- claudeos-core/generated/
390
+ # हेल्थ चेक (commit से पहले, या CI में चलाएँ)
391
+ npx claudeos-core health
597
392
  ```
598
393
 
599
- `generated/` डायरेक्टरी में विश्लेषण JSON (`pass1-*.json`, `pass2-merged.json`), प्रॉम्प्ट (`pass1/2/3/4-prompt.md`), Pass completion markers (`pass3-complete.json`, `pass4-memory.json`), translation cache (`.i18n-cache-<lang>.json`), और transient staging डायरेक्टरी (`.staged-rules/`) होते हैं — सभी `npx claudeos-core init` को फिर से चलाकर फिर से बनाए जा सकते हैं।
600
-
601
- ---
602
-
603
- ## प्रोजेक्ट आकार द्वारा ऑटो-स्केलिंग
604
-
605
- Pass 3 का split mode डोमेन काउंट के साथ stage काउंट को scale करता है। Batch sub-division 16 डोमेन पर kick in होता है ताकि हर stage का output ~50 फ़ाइलें से नीचे रहे, जो `claude -p` के लिए output-accumulation overflow शुरू होने से पहले empirical safe range है।
606
-
607
- | प्रोजेक्ट आकार | डोमेन | Pass 3 Stages | कुल `claude -p` | अनुमानित समय |
608
- |---|---|---|---|---|
609
- | छोटा | 1–4 | 4 (`3a`, `3b-core`, `3c-core`, `3d-aux`) | 7 (Pass 1 + 2 + Pass 3 के 4 stages + Pass 4) | ~10–15 min |
610
- | मध्यम | 5–15 | 4 | 8–9 | ~25–45 min |
611
- | बड़ा | 16–30 | **8** (3b, 3c प्रत्येक 2 batches में split) | 11–12 | **~60–105 min** |
612
- | X-बड़ा | 31–45 | 10 | 13–14 | ~100–150 min |
613
- | XX-बड़ा | 46–60 | 12 | 15–16 | ~150–200 min |
614
- | XXX-बड़ा | 61+ | 14+ | 17+ | 200 min+ |
615
-
616
- Stage count सूत्र (batch होने पर): `1 (3a) + 1 (3b-core) + N (3b-1..N) + 1 (3c-core) + N (3c-1..N) + 1 (3d-aux) = 2N + 4`, जहाँ `N = ceil(totalDomains / 15)`।
617
-
618
- Pass 4 (memory scaffolding) ऊपर से ~30 सेकंड से 5 मिनट जोड़ता है, इस पर निर्भर करता है कि Claude-driven generation या static fallback चलता है। Multi-stack प्रोजेक्ट्स (जैसे Java + React) के लिए, backend और frontend डोमेन एक साथ गिने जाते हैं। 6 backend + 4 frontend डोमेन वाला प्रोजेक्ट = 10 कुल = मध्यम tier।
619
-
620
- ---
621
-
622
- ## सत्यापन टूल्स
623
-
624
- ClaudeOS-Core में 5 built-in सत्यापन टूल्स शामिल हैं जो generation के बाद स्वचालित रूप से चलते हैं:
394
+ memory layer के रखरखाव के लिए दो और:
625
395
 
626
396
  ```bash
627
- # सभी जाँच एक साथ चलाएँ (अनुशंसित)
628
- npx claudeos-core health
629
-
630
- # व्यक्तिगत कमांड
631
- npx claudeos-core validate # Plan ↔ disk तुलना
632
- npx claudeos-core refresh # Disk → Plan sync
633
- npx claudeos-core restore # Plan → Disk restore
397
+ # failure-patterns लॉग का compaction (समय-समय पर चलाएँ)
398
+ npx claudeos-core memory compact
634
399
 
635
- # या सीधे node का उपयोग करें (git clone उपयोगकर्ताओं के लिए)
636
- node claudeos-core-tools/health-checker/index.js
637
- node claudeos-core-tools/manifest-generator/index.js
638
- node claudeos-core-tools/plan-validator/index.js --check
639
- node claudeos-core-tools/sync-checker/index.js
400
+ # बार-बार होने वाले failure patterns को proposed rules में बढ़ाएँ
401
+ npx claudeos-core memory propose-rules
640
402
  ```
641
403
 
642
- | टूल | क्या करता है |
643
- |---|---|
644
- | **manifest-generator** | मेटाडेटा JSON बनाता है (`rule-manifest.json`, `sync-map.json`, `stale-report.json` initialize); 7 डायरेक्टरीज़ को index करता है जिनमें `memory/` (summary में `totalMemory`) शामिल है। v2.1.0: `plan-manifest.json` अब जेनरेट नहीं होती क्योंकि master plans हटा दिए गए हैं। |
645
- | **plan-validator** | Master plan `<file>` blocks को disk से उन प्रोजेक्ट्स के लिए validate करता है जिनके पास अभी भी `claudeos-core/plan/` है (legacy upgrade case)। v2.1.0: जब `plan/` absent या empty हो तो `plan-sync-status.json` emission skip करता है — `stale-report.json` अभी भी एक passing no-op रिकॉर्ड करता है। |
646
- | **sync-checker** | अपंजीकृत फ़ाइलें (disk पर लेकिन plan में नहीं) और orphan entries का पता लगाता है — 7 डायरेक्टरीज़ को कवर करता है (v2.0.0 में `memory/` जोड़ा गया)। जब `sync-map.json` में कोई mappings न हों तो cleanly exit करता है (v2.1.0 default state)। |
647
- | **content-validator** | 9-section गुणवत्ता जाँच — empty फ़ाइलें, missing ✅/❌ उदाहरण, आवश्यक sections, साथ ही L4 memory scaffold integrity (decision-log heading तिथियाँ, failure-pattern आवश्यक फ़ील्ड, fence-aware parsing) |
648
- | **pass-json-validator** | Pass 1–4 JSON संरचना के साथ `pass3-complete.json` (split-mode shape, v2.1.0) और `pass4-memory.json` completion markers को सत्यापित करता है |
404
+ प्रत्येक command के पूर्ण options के लिए, [docs/hi/commands.md](docs/hi/commands.md) देखें।
649
405
 
650
406
  ---
651
407
 
652
- ## Claude Code आपकी डॉक्यूमेंटेशन का उपयोग कैसे करता है
653
-
654
- ClaudeOS-Core ऐसी डॉक्यूमेंटेशन जेनरेट करता है जिसे Claude Code वास्तव में पढ़ता है — यहाँ कैसे:
655
-
656
- ### Claude Code स्वचालित रूप से क्या पढ़ता है
657
-
658
- | फ़ाइल | कब | गारंटीड |
659
- |---|---|---|
660
- | `CLAUDE.md` | हर conversation शुरू होने पर | हमेशा |
661
- | `.claude/rules/00.core/*` | जब कोई भी फ़ाइल संपादित की जाती है (`paths: ["**/*"]`) | हमेशा |
662
- | `.claude/rules/10.backend/*` | जब कोई भी फ़ाइल संपादित की जाती है (`paths: ["**/*"]`) | हमेशा |
663
- | `.claude/rules/20.frontend/*` | जब कोई frontend फ़ाइल संपादित की जाती है (component/page/style paths तक scoped) | सशर्त |
664
- | `.claude/rules/30.security-db/*` | जब कोई भी फ़ाइल संपादित की जाती है (`paths: ["**/*"]`) | हमेशा |
665
- | `.claude/rules/40.infra/*` | केवल तब जब config/infra फ़ाइलें संपादित की जाती हैं (scoped paths) | सशर्त |
666
- | `.claude/rules/50.sync/*` | केवल तब जब claudeos-core फ़ाइलें संपादित की जाती हैं (scoped paths) | सशर्त |
667
- | `.claude/rules/60.memory/*` | जब `claudeos-core/memory/*` संपादित की जाती है (memory paths तक scoped) — on-demand memory layer को **कैसे** पढ़ें/लिखें इसके निर्देश देता है | सशर्त (v2.0.0) |
668
-
669
- ### Claude Code rule references के माध्यम से on-demand क्या पढ़ता है
670
-
671
- हर rule फ़ाइल `## Reference` section के माध्यम से अपने संबंधित standard से link करती है। Claude वर्तमान task के लिए केवल प्रासंगिक standard पढ़ता है:
408
+ ## यह क्या अलग बनाता है
672
409
 
673
- - `claudeos-core/standard/**` coding पैटर्न, ✅/❌ उदाहरण, naming conventions
674
- - `claudeos-core/database/**` — DB schema (queries, mappers, migrations के लिए)
675
- - `claudeos-core/memory/**` (v2.0.0) — L4 team knowledge layer; ऑटो-लोडेड **नहीं** (हर conversation पर बहुत नॉइज़ी होगा)। इसके बजाय, `60.memory/*` rules Claude को बताते हैं *कब* इन फ़ाइलों को Read करें: session शुरू होने पर (हाल की `decision-log.md` + उच्च-importance `failure-patterns.md` skim करें), और निर्णय लेते समय या आवर्ती त्रुटियों का सामना करते समय append-on-demand करें।
410
+ अधिकांश Claude Code documentation tools विवरण से उत्पन्न करते हैं (आप टूल को बताते हैं, टूल Claude को बताता है)। ClaudeOS-Core आपके वास्तविक स्रोत कोड से उत्पन्न करता है (टूल पढ़ता है, टूल Claude को बताता है क्या पुष्ट है, Claude केवल वही लिखता है जो पुष्ट है)।
676
411
 
677
- `00.standard-reference.md` उन standards को खोजने के लिए सभी standard फ़ाइलों की directory के रूप में कार्य करता है जिनके पास कोई संबंधित rule नहीं है।
412
+ तीन ठोस परिणाम:
678
413
 
679
- ### Claude Code क्या नहीं पढ़ता (context बचाता है)
414
+ 1. **Deterministic stack detection.** एक ही प्रोजेक्ट + एक ही कोड = एक ही आउटपुट। "इस बार Claude ने अलग नतीजा दिया" नहीं।
415
+ 2. **No invented paths.** Pass 3 prompt हर अनुमत स्रोत path को स्पष्ट रूप से सूचीबद्ध करता है; Claude ऐसे paths का उल्लेख नहीं कर सकता जो मौजूद नहीं हैं।
416
+ 3. **Multi-stack aware.** Backend और frontend domains एक ही run में अलग-अलग analysis prompts का उपयोग करते हैं।
680
417
 
681
- ये folders standard-reference rule में `DO NOT Read` section के माध्यम से स्पष्ट रूप से बाहर रखे गए हैं:
682
-
683
- | Folder | क्यों बाहर रखा गया |
684
- |---|---|
685
- | `claudeos-core/plan/` | Legacy प्रोजेक्ट्स (v2.0.x और पहले) से Master plan backups। v2.1.0 में जेनरेट नहीं होता। यदि मौजूद है, Claude Code इसे स्वचालित रूप से load नहीं करेगा — केवल read-on-demand। |
686
- | `claudeos-core/generated/` | Build metadata JSON, prompts, Pass markers, translation cache, `.staged-rules/`। Coding के लिए नहीं। |
687
- | `claudeos-core/guide/` | मनुष्यों के लिए onboarding guides। |
688
- | `claudeos-core/mcp-guide/` | MCP server docs। Coding के लिए नहीं। |
689
- | `claudeos-core/memory/` (auto-load) | **Auto-load disabled** डिज़ाइन द्वारा — हर conversation पर context बढ़ा देगा। इसके बजाय `60.memory/*` rules के माध्यम से on-demand पढ़ें (जैसे `failure-patterns.md` का session-start scan)। हमेशा इन फ़ाइलों को commit करें। |
418
+ अन्य tools के साथ side-by-side scope तुलना के लिए, [docs/hi/comparison.md](docs/hi/comparison.md) देखें। तुलना **प्रत्येक टूल क्या करता है** के बारे में है, कि **कौन बेहतर है** — अधिकांश पूरक हैं।
690
419
 
691
420
  ---
692
421
 
693
- ## दैनिक वर्कफ़्लो
422
+ ## Verification (post-generation)
694
423
 
695
- ### इंस्टॉलेशन के बाद
424
+ Claude द्वारा docs लिखने के बाद, कोड उन्हें सत्यापित करता है। पाँच अलग-अलग validators:
696
425
 
697
- ```
698
- # Claude Code को सामान्य रूप से उपयोग करें — यह स्वचालित रूप से आपके standards को reference करता है:
699
- "order डोमेन के लिए एक CRUD बनाओ"
700
- "user profile update API जोड़ो"
701
- "इस कोड को प्रोजेक्ट पैटर्न से मेल खाने के लिए refactor करो"
702
- ```
426
+ | Validator | यह क्या जाँचता है | किसके द्वारा चलाया जाता है |
427
+ |---|---|---|
428
+ | `claude-md-validator` | CLAUDE.md की संरचनात्मक अपरिवर्तनीयताएँ (8 sections, language-invariant) | `claudeos-core lint` |
429
+ | `content-validator` | Path दावे वास्तव में मौजूद हैं; manifest स्थिरता | `health` (advisory) |
430
+ | `pass-json-validator` | Pass 1 / 2 / 3 / 4 आउटपुट well-formed JSON हैं | `health` (warn) |
431
+ | `plan-validator` | सहेजी गई plan disk से मेल खाती है | `health` (fail-on-error) |
432
+ | `sync-checker` | Disk फ़ाइलें `sync-map.json` registrations से मेल खाती हैं (orphaned/unregistered detection) | `health` (fail-on-error) |
703
433
 
704
- ### Standards को मैन्युअली संपादित करने के बाद
434
+ `health-checker` चार runtime validators को तीन-tier severity (fail / warn / advisory) के साथ orchestrate करता है और CI के लिए उपयुक्त code के साथ exit होता है। `claude-md-validator` `lint` command के माध्यम से अलग चलता है क्योंकि संरचनात्मक drift एक re-init संकेत है, न कि soft warning। कभी भी चलाएँ:
705
435
 
706
436
  ```bash
707
- # standards या rules फ़ाइलें संपादित करने के बाद:
708
- npx claudeos-core refresh
709
-
710
- # सत्यापित करें कि सब कुछ सुसंगत है
711
437
  npx claudeos-core health
712
438
  ```
713
439
 
714
- ### जब डॉक्स corrupt हो जाते हैं
715
-
716
- ```bash
717
- # v2.1.0 सिफ़ारिश: restore के लिए git का उपयोग करें (क्योंकि master plans अब
718
- # जेनरेट नहीं होते)। अपने जेनरेट किए गए docs को नियमित रूप से commit करें ताकि
719
- # आप बिना regenerate किए विशिष्ट फ़ाइलों को rollback कर सकें:
720
- git checkout HEAD -- .claude/rules/ claudeos-core/
721
-
722
- # Legacy (v2.0.x प्रोजेक्ट्स जिनमें claudeos-core/plan/ अभी भी मौजूद है):
723
- npx claudeos-core restore
724
- ```
725
-
726
- ### Memory Layer रखरखाव (v2.0.0)
727
-
728
- L4 Memory layer (`claudeos-core/memory/`) sessions में टीम ज्ञान संचित करता है। तीन CLI subcommands इसे स्वस्थ रखते हैं:
729
-
730
- ```bash
731
- # Compact: 4-stage compaction policy लागू करें (समय-समय पर चलाएँ — जैसे मासिक)
732
- npx claudeos-core memory compact
733
- # Stage 1: पुरानी entries को सारांशित करें (>30 दिन, body → one-line)
734
- # Stage 2: duplicate headings को merge करें (frequency जोड़ी जाती है, latest fix रखा जाता है)
735
- # Stage 3: low-importance + पुरानी entries हटाएँ (importance <3 AND lastSeen >60 दिन)
736
- # Stage 4: प्रति फ़ाइल 400-line cap लागू करें (पहले सबसे पुरानी low-importance हटाई जाती है)
737
-
738
- # Score: failure-patterns.md entries को importance के अनुसार re-rank करें
739
- npx claudeos-core memory score
740
- # importance = round(frequency × 1.5 + recency × 5), 10 पर capped
741
- # कई नए failure patterns append करने के बाद चलाएँ
742
-
743
- # Propose-rules: आवर्ती failures से candidate rule additions को surface करें
744
- npx claudeos-core memory propose-rules
745
- # frequency ≥ 3 के साथ failure-patterns.md entries पढ़ता है
746
- # Confidence गणना करता है (sigmoid on weighted evidence × anchor multiplier)
747
- # प्रस्तावों को memory/auto-rule-update.md में लिखता है (ऑटो-लागू नहीं)
748
- # Confidence ≥ 0.70 गंभीर समीक्षा का हकदार है; accept → rule संपादित करें + निर्णय log करें
749
-
750
- # v2.1.0: `memory --help` अब subcommand help पर routes करता है (पहले top-level दिखाता था)
751
- npx claudeos-core memory --help
752
- ```
753
-
754
- > **v2.1.0 फ़िक्स:** `memory score` पहले run के बाद अब duplicate `importance` लाइनें नहीं छोड़ता (पहले auto-scored line ऊपर जोड़ी जाती थी जबकि original plain line नीचे छोड़ दी जाती थी)। `memory compact` का Stage 1 summary marker अब एक proper markdown list item (`- _Summarized on ..._`) है ताकि यह cleanly render हो और बाद की compactions पर सही ढंग से re-parse हो।
755
-
756
- Memory में कब लिखें (Claude यह on-demand करता है, लेकिन आप मैन्युअली भी संपादित कर सकते हैं):
757
- - **`decision-log.md`** — जब भी आप प्रतिस्पर्धी पैटर्न के बीच चुनते हैं, library चुनते हैं, टीम convention परिभाषित करते हैं, या कुछ NOT करने का निर्णय लेते हैं, तो एक नई entry append करें। केवल append; ऐतिहासिक entries को कभी संपादित न करें।
758
- - **`failure-patterns.md`** — आवर्ती त्रुटि या ग़ैर-स्पष्ट root cause के **दूसरे occurrence** पर append करें। पहली बार की त्रुटियों को entry की आवश्यकता नहीं है।
759
- - `compaction.md` और `auto-rule-update.md` — ऊपर CLI subcommands द्वारा जेनरेट/प्रबंधित; हाथ से संपादित न करें।
760
-
761
- ### CI/CD Integration
762
-
763
- ```yaml
764
- # GitHub Actions उदाहरण
765
- - run: npx claudeos-core validate
766
- # Exit code 1 PR को block करता है
767
-
768
- # वैकल्पिक: मासिक memory housekeeping (अलग cron workflow)
769
- - run: npx claudeos-core memory compact
770
- - run: npx claudeos-core memory score
771
- ```
440
+ प्रत्येक validator के विस्तृत checks के लिए, [docs/hi/verification.md](docs/hi/verification.md) देखें।
772
441
 
773
442
  ---
774
443
 
775
- ## यह कैसे अलग है?
776
-
777
- ### अन्य Claude Code टूल्स की तुलना में
778
-
779
- | | ClaudeOS-Core | Everything Claude Code (50K+ ⭐) | Harness | specs-generator | Claude `/init` |
780
- |---|---|---|---|---|---|
781
- | **दृष्टिकोण** | कोड पहले विश्लेषण करता है, फिर LLM जेनरेट करता है | Pre-built config presets | LLM agent teams डिज़ाइन करता है | LLM spec docs जेनरेट करता है | LLM CLAUDE.md लिखता है |
782
- | **आपका सोर्स कोड पढ़ता है** | ✅ Deterministic static analysis | ❌ | ❌ | ❌ (LLM पढ़ता है) | ❌ (LLM पढ़ता है) |
783
- | **स्टैक डिटेक्शन** | कोड कन्फर्म करता है (ORM, DB, build tool, pkg manager) | N/A (stack-agnostic) | LLM अनुमान लगाता है | LLM अनुमान लगाता है | LLM अनुमान लगाता है |
784
- | **डोमेन डिटेक्शन** | कोड कन्फर्म करता है (Java 5 patterns, Kotlin CQRS, Next.js FSD) | N/A | LLM अनुमान लगाता है | N/A | N/A |
785
- | **समान प्रोजेक्ट → समान परिणाम** | ✅ Deterministic विश्लेषण | ✅ (static फ़ाइलें) | ❌ (LLM भिन्न) | ❌ (LLM भिन्न) | ❌ (LLM भिन्न) |
786
- | **बड़े प्रोजेक्ट को संभालना** | डोमेन समूह splitting (4 डोमेन / प्रति समूह 40 फ़ाइलें) | N/A | No splitting | No splitting | Context window limit |
787
- | **आउटपुट** | CLAUDE.md + Rules + Standards + Skills + Guides + Plans (40-50+ फ़ाइलें) | Agents + Skills + Commands + Hooks | Agents + Skills | 6 spec documents | CLAUDE.md (1 फ़ाइल) |
788
- | **आउटपुट स्थान** | `.claude/rules/` (Claude Code द्वारा ऑटो-लोडेड) | `.claude/` विविध | `.claude/agents/` + `.claude/skills/` | `.claude/steering/` + `specs/` | `CLAUDE.md` |
789
- | **Post-generation सत्यापन** | ✅ 5 स्वचालित validators | ❌ | ❌ | ❌ | ❌ |
790
- | **Multi-language आउटपुट** | ✅ 10 भाषाएँ | ❌ | ❌ | ❌ | ❌ |
791
- | **Multi-stack** | ✅ Backend + Frontend एक साथ | ❌ Stack-agnostic | ❌ | ❌ | आंशिक |
792
- | **स्थायी memory layer** | ✅ L4 — decision log + failure patterns + ऑटो-scored rule प्रस्ताव (v2.0.0) | ❌ | ❌ | ❌ | ❌ |
793
- | **Agent orchestration** | ❌ | ✅ 28 agents | ✅ 6 patterns | ❌ | ❌ |
794
-
795
- ### एक वाक्य में मुख्य अंतर
796
-
797
- **अन्य टूल्स Claude को "सामान्य रूप से अच्छे instructions" देते हैं। ClaudeOS-Core Claude को "आपके वास्तविक कोड से एक्सट्रैक्ट किए गए instructions" देता है।**
444
+ ## Memory Layer (वैकल्पिक, लंबे चलने वाले प्रोजेक्ट के लिए)
798
445
 
799
- इसीलिए Claude Code आपके MyBatis प्रोजेक्ट में JPA कोड जेनरेट करना बंद कर देता है,
800
- जब आपका codebase `ok()` का उपयोग करता है तो `success()` का उपयोग करना बंद कर देता है,
801
- और जब आपका प्रोजेक्ट `controller/user/` का उपयोग करता है तो `user/controller/` डायरेक्टरी बनाना बंद कर देता है।
446
+ v2.0 के बाद, ClaudeOS-Core चार फ़ाइलों के साथ एक `claudeos-core/memory/` फ़ोल्डर लिखता है:
802
447
 
803
- ### पूरक, प्रतिस्पर्धी नहीं
448
+ - `decision-log.md` append-only "हमने X के बजाय Y क्यों चुना"
449
+ - `failure-patterns.md` — frequency/importance स्कोर के साथ बार-बार होने वाली त्रुटियाँ
450
+ - `compaction.md` — समय के साथ memory को कैसे auto-compact किया जाता है
451
+ - `auto-rule-update.md` — पैटर्न जो नए rules बनने चाहिए
804
452
 
805
- ClaudeOS-Core **प्रोजेक्ट-विशिष्ट rules और standards** पर केंद्रित है।
806
- अन्य टूल्स **agent orchestration और workflows** पर केंद्रित हैं।
453
+ आप `npx claudeos-core memory propose-rules` चलाकर Claude से हाल के failure patterns देखने और जोड़ने के लिए नए rules सुझाने को कह सकते हैं।
807
454
 
808
- आप अपने प्रोजेक्ट के rules जेनरेट करने के लिए ClaudeOS-Core का उपयोग कर सकते हैं, फिर agent teams और workflow automation के लिए ऊपर से ECC या Harness का उपयोग कर सकते हैं। वे अलग-अलग समस्याएँ हल करते हैं।
455
+ memory model और lifecycle के लिए, [docs/hi/memory-layer.md](docs/hi/memory-layer.md) देखें।
809
456
 
810
457
  ---
811
458
 
812
459
  ## FAQ
813
460
 
814
- **Q: क्या यह मेरे सोर्स कोड को संशोधित करता है?**
815
- नहीं। यह केवल `CLAUDE.md`, `.claude/rules/`, और `claudeos-core/` बनाता है। आपका मौजूदा कोड कभी संशोधित नहीं होता।
461
+ **Q: क्या मुझे Claude API key की ज़रूरत है?**
462
+ A: नहीं। ClaudeOS-Core आपके मौजूदा Claude Code installation का उपयोग करता है — यह आपकी मशीन पर `claude -p` को prompts pipe करता है। कोई अतिरिक्त खाते नहीं।
816
463
 
817
- **Q: लागत कितनी है?**
818
- यह 4 passes में `claude -p` को कई बार कॉल करता है। v2.1.0 split mode में, Pass 3 अकेले प्रोजेक्ट आकार के आधार पर 4–14+ stages में विस्तारित होता है ([ऑटो-स्केलिंग](#प्रोजेक्ट-आकार-द्वारा-ऑटो-स्केलिंग) देखें)। एक विशिष्ट छोटा प्रोजेक्ट (1–15 डोमेन) कुल 8–9 `claude -p` कॉल्स का उपयोग करता है; एक 18-डोमेन प्रोजेक्ट 11 का उपयोग करता है; एक 60-डोमेन प्रोजेक्ट 15–17 का उपयोग करता है। हर stage fresh context window के साथ चलता है per-call token cost वास्तव में single-call Pass 3 से कम है, क्योंकि किसी भी stage को पूरे फ़ाइल tree को एक context में रखना नहीं पड़ता। जब `--lang` गैर-अंग्रेज़ी होता है, तो static fallback path अनुवाद के लिए कुछ अतिरिक्त `claude -p` कॉल invoke कर सकता है; परिणाम `claudeos-core/generated/.i18n-cache-<lang>.json` में cached होते हैं ताकि बाद के runs उन्हें पुनः उपयोग करें। यह सामान्य Claude Code उपयोग के भीतर है।
464
+ **Q: क्या यह मेरी मौजूदा CLAUDE.md या `.claude/rules/` को overwrite करेगा?**
465
+ A: नए प्रोजेक्ट पर पहली run: यह उन्हें बनाता है। `--force` के बिना पुनः चलाने पर आपके edits सुरक्षित रहते हैं पिछली run के pass markers का पता लगाया जाता है और passes छोड़ दिए जाते हैं। `--force` के साथ पुनः चलाने पर सब कुछ wipe और regenerate होता है (आपके edits खो जाते हैं `--force` का यही मतलब है)। [docs/hi/safety.md](docs/hi/safety.md) देखें।
819
466
 
820
- **Q: Pass 3 split mode क्या है और इसे v2.1.0 में क्यों जोड़ा गया?**
821
- v2.1.0 से पहले, Pass 3 एक सिंगल `claude -p` कॉल बनाता था जिसे पूरे जेनरेट किए गए फ़ाइल tree (`CLAUDE.md`, standards, rules, skills, guides — आमतौर पर 30–60 फ़ाइलें) को एक response में emit करना होता था। यह छोटे प्रोजेक्ट्स पर काम करता था लेकिन ~5 डोमेन पर विश्वसनीय रूप से `Prompt is too long` output-accumulation विफलताओं को hit करता था। विफलता input size से predictable नहीं थी — यह इस पर निर्भर करती थी कि हर जेनरेट की गई फ़ाइल कितनी verbose हो, और एक ही प्रोजेक्ट को intermittently strike कर सकती थी। Split mode समस्या को संरचनात्मक रूप से bypass करता है: Pass 3 को क्रमिक stages (`3a` → `3b-core` `3b-N` → `3c-core` → `3c-N` → `3d-aux`) में तोड़ दिया गया है, हर एक fresh context window के साथ एक अलग `claude -p` कॉल। Cross-stage consistency `pass3a-facts.md` द्वारा संरक्षित होती है, एक 5–10 KB distilled fact sheet जिसे हर बाद का stage `pass2-merged.json` को दोबारा पढ़ने के बजाय reference करता है। `pass3-complete.json` marker एक `groupsCompleted` array carry करता है ताकि `3c-2` के दौरान crash `3c-2` से resume हो (not `3a` से), token cost को दोगुना करने से बचाते हुए।
822
- **Q: क्या मुझे जेनरेट की गई फ़ाइलों को Git पर commit करना चाहिए?**
823
- हाँ, अनुशंसित। आपकी टीम समान Claude Code standards साझा कर सकती है। `claudeos-core/generated/` को `.gitignore` में जोड़ने पर विचार करें (विश्लेषण JSON पुनर्जेनरेट करने योग्य है)।
467
+ **Q: मेरा stack समर्थित नहीं है। क्या मैं एक जोड़ सकता हूँ?**
468
+ A: हाँ। नए stacks को ~3 prompt templates + एक domain scanner चाहिए। 8-step गाइड के लिए [CONTRIBUTING.md](CONTRIBUTING.md) देखें।
824
469
 
825
- **Q: Mixed-stack प्रोजेक्ट्स (जैसे Java backend + React frontend) के बारे में क्या?**
826
- पूरी तरह से समर्थित। ClaudeOS-Core दोनों स्टैक्स को ऑटो-डिटेक्ट करता है, डोमेन को `backend` या `frontend` के रूप में tag करता है, और हर एक के लिए stack-specific विश्लेषण प्रॉम्प्ट का उपयोग करता है। Pass 2 सब कुछ merge करता है, और Pass 3 अपने split stages में backend और frontend दोनों standards जेनरेट करता है — backend डोमेन कुछ 3b/3c batches में जाते हैं, frontend डोमेन अन्य में, सभी consistency के लिए समान `pass3a-facts.md` को reference करते हैं।
470
+ **Q: मैं Korean (या अन्य भाषा) में docs कैसे उत्पन्न करूँ?**
471
+ A: `npx claudeos-core init --lang ko`. 10 भाषाएँ समर्थित: en, ko, ja, zh-CN, es, vi, hi, ru, fr, de.
827
472
 
828
- **Q: क्या यह Turborepo / pnpm workspaces / Lerna monorepos के साथ काम करता है?**
829
- हाँ। ClaudeOS-Core `turbo.json`, `pnpm-workspace.yaml`, `lerna.json`, या `package.json#workspaces` डिटेक्ट करता है और framework/ORM/DB dependencies के लिए sub-package `package.json` फ़ाइलों को स्वचालित रूप से स्कैन करता है। डोमेन scanning `apps/*/src/` और `packages/*/src/` patterns को कवर करती है। monorepo root से चलाएँ।
473
+ **Q: क्या यह monorepos के साथ काम करता है?**
474
+ A: हाँ — Turborepo (`turbo.json`), pnpm workspaces (`pnpm-workspace.yaml`), Lerna (`lerna.json`), और npm/yarn workspaces (`package.json#workspaces`) stack-detector द्वारा पहचाने जाते हैं। प्रत्येक app को अपना analysis मिलता है। अन्य monorepo layouts (उदा., NX) विशेष रूप से नहीं पहचाने जाते, लेकिन सामान्य `apps/*/` और `packages/*/` patterns प्रति-stack scanners द्वारा अभी भी उठाए जाते हैं।
830
475
 
831
- **Q: Re-run पर क्या होता है?**
832
- यदि पिछले Pass 1/2 परिणाम मौजूद हैं, तो एक interactive prompt आपको चुनने देता है: **Continue** (जहाँ रुका था वहाँ से resume) या **Fresh** (सब कुछ हटाएँ और फिर से शुरू करें)। prompt को skip करने और हमेशा नए सिरे से शुरू करने के लिए `--force` का उपयोग करें। v2.1.0 split mode में, Pass 3 resume stage granularity पर काम करता है — यदि run `3c-2` के दौरान crash हुआ था, तो अगला `init` `3c-2` से resume करता है कि `3a` से restart (जो token cost को दोगुना कर देता)। `pass3-complete.json` marker `mode: "split"` प्लस एक `groupsCompleted` array रिकॉर्ड करता है ताकि यह logic चला सके।
476
+ **Q: यदि Claude Code ऐसे rules उत्पन्न करता है जिनसे मैं असहमत हूँ?**
477
+ A: उन्हें सीधे संपादित करें। फिर यह पुष्टि करने के लिए `npx claudeos-core lint` चलाएँ कि CLAUDE.md अभी भी संरचनात्मक रूप से वैध है। आपके edits बाद की `init` runs पर सुरक्षित रहते हैं (`--force` के बिना) resume तंत्र उन passes को छोड़ देता है जिनके markers मौजूद हैं।
833
478
 
834
- **Q: क्या NestJS का अपना template है या Express वाला उपयोग करता है?**
835
- NestJS NestJS-विशिष्ट विश्लेषण श्रेणियों के साथ एक समर्पित `node-nestjs` template का उपयोग करता है: `@Module`, `@Injectable`, `@Controller` decorators, Guards, Pipes, Interceptors, DI container, CQRS patterns, और `Test.createTestingModule`। Express प्रोजेक्ट्स अलग `node-express` template का उपयोग करते हैं।
836
-
837
- **Q: Vue / Nuxt प्रोजेक्ट्स के बारे में क्या?**
838
- Vue/Nuxt Composition API, `<script setup>`, defineProps/defineEmits, Pinia stores, `useFetch`/`useAsyncData`, Nitro server routes, और `@nuxt/test-utils` को कवर करने वाले एक समर्पित `vue-nuxt` template का उपयोग करता है। Next.js/React प्रोजेक्ट्स `node-nextjs` template का उपयोग करते हैं।
839
-
840
- **Q: क्या यह Kotlin को support करता है?**
841
- हाँ। ClaudeOS-Core `build.gradle.kts` या `build.gradle` में kotlin plugin से Kotlin को ऑटो-डिटेक्ट करता है। यह Kotlin-विशिष्ट विश्लेषण (data classes, sealed classes, coroutines, extension functions, MockK, आदि) के साथ एक समर्पित `kotlin-spring` template का उपयोग करता है।
842
-
843
- **Q: CQRS / BFF architecture के बारे में क्या?**
844
- Kotlin multi-module प्रोजेक्ट्स के लिए पूरी तरह से समर्थित। ClaudeOS-Core `settings.gradle.kts` पढ़ता है, मॉड्यूल नामों से मॉड्यूल प्रकार (command, query, bff, integration) डिटेक्ट करता है, और Command/Query मॉड्यूल्स में समान डोमेन को group करता है। जेनरेट किए गए standards में command controllers बनाम query controllers, BFF/Feign patterns, और inter-module communication conventions के लिए अलग rules शामिल हैं।
845
-
846
- **Q: Gradle multi-module monorepos के बारे में क्या?**
847
- ClaudeOS-Core सभी submodules (`**/src/main/kotlin/**/*.kt`) को nesting depth की परवाह किए बिना स्कैन करता है। मॉड्यूल प्रकार naming conventions से अनुमानित किए जाते हैं (जैसे `reservation-command-server` → domain: `reservation`, type: `command`)। साझा libraries (`shared-lib`, `integration-lib`) भी डिटेक्ट होती हैं।
848
-
849
- **Q: L4 Memory layer क्या है (v2.0.0)? क्या मुझे `claudeos-core/memory/` commit करना चाहिए?**
850
- हाँ — **हमेशा commit करें** `claudeos-core/memory/`। यह स्थायी टीम ज्ञान है: `decision-log.md` architectural choices के पीछे *क्यों* को रिकॉर्ड करता है (append-only), `failure-patterns.md` importance scores के साथ आवर्ती त्रुटियों को पंजीकृत करता है ताकि भविष्य के sessions उनसे बचें, `compaction.md` 4-stage compaction policy परिभाषित करता है, और `auto-rule-update.md` machine-generated rule सुधार प्रस्ताव एकत्र करता है। Rules (path द्वारा ऑटो-लोडेड) के विपरीत, memory फ़ाइलें **on-demand** हैं — Claude उन्हें केवल तब पढ़ता है जब `60.memory/*` rules इसे निर्देश देते हैं (जैसे उच्च-importance failures का session-start scan)। यह दीर्घकालिक ज्ञान को संरक्षित करते हुए context लागत को कम रखता है।
851
-
852
- **Q: यदि Pass 4 विफल हो जाए तो क्या होगा?**
853
- Automated pipeline (`npx claudeos-core init`) में static fallback है: यदि `claude -p` विफल हो जाता है या `pass4-prompt.md` गायब है, तो यह `lib/memory-scaffold.js` के माध्यम से सीधे memory layer को scaffold करता है। जब `--lang` गैर-अंग्रेज़ी होता है, तो static fallback को `claude` CLI के माध्यम से अनुवाद करना **अनिवार्य** है — यदि वह भी विफल हो जाता है, तो run `InitError` के साथ abort हो जाता है (कोई silent English fallback नहीं)। जब `claude` authenticated हो तब फिर से चलाएँ, या अनुवाद skip करने के लिए `--lang en` का उपयोग करें। अनुवाद परिणाम `claudeos-core/generated/.i18n-cache-<lang>.json` में cached होते हैं ताकि बाद के runs उन्हें पुनः उपयोग करें।
854
-
855
- **Q: `memory compact` / `memory score` / `memory propose-rules` क्या करते हैं?**
856
- ऊपर [Memory Layer रखरखाव](#memory-layer-रखरखाव-v200) section देखें। संक्षिप्त version: `compact` 4-stage policy चलाता है (पुरानी सारांशित करें, duplicates merge करें, low-importance पुरानी हटाएँ, 400-line cap लागू करें); `score` `failure-patterns.md` को importance (frequency × recency) के अनुसार re-rank करता है; `propose-rules` आवर्ती failures से candidate rule additions को `auto-rule-update.md` में surface करता है (ऑटो-लागू नहीं — मैन्युअली समीक्षा और accept/reject करें)।
857
-
858
- **Q: `--force` (या "fresh" resume mode) `.claude/rules/` को क्यों हटाता है?**
859
- v2.0.0 ने तीन Pass 3 silent-failure guards जोड़े (Guard 3 दो incomplete-output variants को कवर करता है: `guide/` के लिए H2 और `standard/skills` के लिए H1)। Guard 1 ("partial staged-rules move") और Guard 3 ("incomplete output — missing/empty guide files or missing standard sentinel / empty skills") मौजूदा rules पर निर्भर नहीं हैं, लेकिन Guard 2 ("zero rules detected") है — यह तब fire होता है जब Claude ने `staging-override.md` directive को ignore किया और सीधे `.claude/` में लिखने की कोशिश की (जहाँ Claude Code की sensitive-path policy इसे block करती है)। पिछले run से stale rules Guard 2 को false-negative करा देंगे — इसलिए `--force`/`fresh` साफ़ detection सुनिश्चित करने के लिए `.claude/rules/` को wipe करता है। **rule फ़ाइलों में मैन्युअल संपादन खो जाएँगे** `--force`/`fresh` के तहत; यदि आवश्यक हो तो पहले backup लें। (v2.1.0 नोट: Guard 3 H1 अब `plan/` की जाँच नहीं करता क्योंकि master plans अब जेनरेट नहीं होते।)
860
-
861
- **Q: `claudeos-core/generated/.staged-rules/` क्या है और यह क्यों मौजूद है?**
862
- Claude Code की sensitive-path policy `claude -p` subprocess से `.claude/` में सीधे writes मना करती है (`--dangerously-skip-permissions` के साथ भी)। v2.0.0 इसके आसपास Pass 3/4 प्रॉम्प्ट को सभी `.claude/rules/` writes को staging directory पर redirect करवा कर काम करता है; Node.js orchestrator (जो उस policy के अधीन नहीं है) फिर हर pass के बाद staged tree को `.claude/rules/` में move करता है। यह उपयोगकर्ता के लिए transparent है — directory ऑटो-बनाई, ऑटो-साफ़, और ऑटो-moved होती है। यदि पिछला run mid-move crash हो गया, तो अगला run retry करने से पहले staging dir को wipe करता है। v2.1.0 split mode में, stage runner हर stage के बाद staged rules को `.claude/rules/` में move करता है (केवल अंत में नहीं), इसलिए mid-Pass-3 crash भी पहले से पूर्ण stages के rules को उनकी जगह छोड़ देता है।
863
-
864
- **Q: क्या मैं `npx claudeos-core init` के बजाय Pass 3 को मैन्युअली चला सकता हूँ?**
865
- छोटे प्रोजेक्ट्स (≤5 डोमेन) के लिए हाँ — [Step 6](#step-6-pass-3--सभी-डॉक्यूमेंटेशन-जेनरेट-करें-कई-stages-में-split) में single-call manual निर्देश अभी भी काम करते हैं। बड़े प्रोजेक्ट्स के लिए आपको `npx claudeos-core init` का उपयोग करना चाहिए क्योंकि split runner ही fresh contexts के साथ stage-by-stage execution को orchestrate करता है, ≥16 डोमेन पर batch sub-division संभालता है, सही `pass3-complete.json` marker shape (`mode: "split"` + `groupsCompleted`) लिखता है, और stages के बीच staged rules move करता है। उस orchestration को हाथ से reproduce करना संभव है लेकिन thकाऊ। यदि आपके पास stages को मैन्युअली चलाने का कारण है (जैसे किसी विशिष्ट stage की debugging), तो आप `pass3-prompt.md` को appropriate `STAGE:` directive के साथ template कर सकते हैं और इसे सीधे `claude -p` को feed कर सकते हैं — लेकिन याद रखें कि हर stage के बाद `.staged-rules/` move करें और marker को स्वयं update करें।
866
-
867
- **Q: मेरा प्रोजेक्ट v2.0.x से upgrade है और इसमें एक मौजूदा `claudeos-core/plan/` डायरेक्टरी है। मुझे क्या करना चाहिए?**
868
- कुछ आवश्यक नहीं — v2.1.0 टूल्स `plan/` को absent या empty होने पर ignore करते हैं, और `plan-validator` backward compatibility के लिए populated `plan/` डायरेक्टरियों वाले legacy प्रोजेक्ट्स को अभी भी handle करता है। यदि आपको master plan backups की ज़रूरत नहीं है तो आप `claudeos-core/plan/` को सुरक्षित रूप से हटा सकते हैं (वैसे भी git history एक बेहतर backup है)। यदि आप `plan/` रखते हैं, तो `npx claudeos-core init` चलाने पर यह update नहीं होगी — v2.1.0 में नया content master plans में aggregate नहीं होता। सत्यापन टूल्स दोनों cases को cleanly handle करते हैं।
869
-
870
- ---
871
-
872
- ## टेम्पलेट संरचना
873
-
874
- ```
875
- pass-prompts/templates/
876
- ├── common/ # साझा header/footer + pass4 + staging-override + CLAUDE.md scaffold (v2.2.0)
877
- │ ├── header.md # भूमिका + output फ़ॉर्मैट निर्देश (सभी pass)
878
- │ ├── pass3-footer.md # Pass 3 पूरा होने के बाद health-check निर्देश + 5 CRITICAL guardrail ब्लॉक (v2.2.0)
879
- │ ├── pass3-phase1.md # "Read Once, Extract Facts" ब्लॉक (Rule A-E) (v2.1.0)
880
- │ ├── pass4.md # Memory scaffolding prompt (v2.0.0)
881
- │ ├── staging-override.md # .claude/rules/** लिखना .staged-rules/** पर redirect (v2.0.0)
882
- │ ├── claude-md-scaffold.md # Deterministic 8-section CLAUDE.md टेम्प्लेट (v2.2.0)
883
- │ └── lang-instructions.json # प्रति-भाषा output निर्देश (10 भाषाएँ)
884
- ├── java-spring/ # Java / Spring Boot
885
- ├── kotlin-spring/ # Kotlin / Spring Boot (CQRS, BFF, multi-module)
886
- ├── node-express/ # Node.js / Express
887
- ├── node-nestjs/ # Node.js / NestJS (Module, DI, Guard, Pipe, Interceptor)
888
- ├── node-fastify/ # Node.js / Fastify
889
- ├── node-nextjs/ # Next.js / React (App Router, RSC)
890
- ├── node-vite/ # Vite SPA (React, client-side routing, VITE_ env, Vitest)
891
- ├── vue-nuxt/ # Vue / Nuxt (Composition API, Pinia, Nitro)
892
- ├── angular/ # Angular
893
- ├── python-django/ # Python / Django (DRF)
894
- ├── python-fastapi/ # Python / FastAPI
895
- └── python-flask/ # Python / Flask (Blueprint, app factory, Jinja2)
896
- ```
897
-
898
- `plan-installer` आपके स्टैक(s) को ऑटो-डिटेक्ट करता है, फिर type-specific प्रॉम्प्ट assemble करता है। NestJS, Vue/Nuxt, Vite SPA, और Flask हर एक framework-विशिष्ट विश्लेषण श्रेणियों के साथ समर्पित templates का उपयोग करते हैं (जैसे NestJS के लिए `@Module`/`@Injectable`/Guards; Vue के लिए `<script setup>`/Pinia/useFetch; Vite के लिए client-side routing/`VITE_` env; Flask के लिए Blueprint/`app.factory`/Flask-SQLAlchemy)। Multi-stack प्रोजेक्ट्स के लिए, अलग `pass1-backend-prompt.md` और `pass1-frontend-prompt.md` जेनरेट किए जाते हैं, जबकि `pass3-prompt.md` दोनों स्टैक्स के generation targets को combine करता है। v2.1.0 में, Pass 3 template के आगे `common/pass3-phase1.md` (Rules A–E वाला "Read Once, Extract Facts" block) prepend किया जाता है, फिर इसे split-mode stage के अनुसार sliced किया जाता है। Pass 4 स्टैक की परवाह किए बिना साझा `common/pass4.md` template (memory scaffolding) का उपयोग करता है।
899
-
900
- **v2.2.0 में**, Pass 3 prompt phase1 ब्लॉक और stack-specific body के बीच `common/claude-md-scaffold.md` (deterministic 8-section CLAUDE.md टेम्प्लेट) को भी inline embed करता है — यह section संरचना को ठीक करता है ताकि जेनरेटेड CLAUDE.md projects के बीच drift न हो, जबकि content प्रति-project adapt होता है। Templates **English-first** लिखे गए हैं; `lang-instructions.json` से language injection LLM को निर्देश देता है कि emit समय पर section titles और prose को target output भाषा में अनुवाद करे।
479
+ **Q: मैं bugs कहाँ रिपोर्ट करूँ?**
480
+ A: [GitHub Issues](https://github.com/claudeos-core/claudeos-core/issues)। सुरक्षा मुद्दों के लिए [SECURITY.md](SECURITY.md) देखें।
901
481
 
902
482
  ---
903
483
 
904
- ## Monorepo समर्थन
905
-
906
- ClaudeOS-Core JS/TS monorepo setups को स्वचालित रूप से डिटेक्ट करता है और dependencies के लिए sub-packages को स्कैन करता है।
907
-
908
- **समर्थित monorepo markers** (ऑटो-डिटेक्ट):
909
- - `turbo.json` (Turborepo)
910
- - `pnpm-workspace.yaml` (pnpm workspaces)
911
- - `lerna.json` (Lerna)
912
- - `package.json#workspaces` (npm/yarn workspaces)
913
-
914
- **monorepo root से चलाएँ** — ClaudeOS-Core sub-packages में framework/ORM/DB dependencies खोजने के लिए `apps/*/package.json` और `packages/*/package.json` पढ़ता है:
915
-
916
- ```bash
917
- cd my-monorepo
918
- npx claudeos-core init
919
- ```
920
-
921
- **क्या डिटेक्ट होता है:**
922
- - `apps/web/package.json` से dependencies (जैसे `next`, `react`) → frontend stack
923
- - `apps/api/package.json` से dependencies (जैसे `express`, `prisma`) → backend stack
924
- - `packages/db/package.json` से dependencies (जैसे `drizzle-orm`) → ORM/DB
925
- - `pnpm-workspace.yaml` से custom workspace paths (जैसे `services/*`)
926
-
927
- **डोमेन scanning monorepo layouts को भी कवर करती है:**
928
- - Backend डोमेन के लिए `apps/api/src/modules/*/` और `apps/api/src/*/`
929
- - Frontend डोमेन के लिए `apps/web/app/*/`, `apps/web/src/app/*/`, `apps/web/pages/*/`
930
- - साझा package डोमेन के लिए `packages/*/src/*/`
931
-
932
- ```
933
- my-monorepo/ ← यहाँ चलाएँ: npx claudeos-core init
934
- ├── turbo.json ← Turborepo के रूप में ऑटो-डिटेक्ट
935
- ├── apps/
936
- │ ├── web/ ← apps/web/package.json से Next.js डिटेक्ट
937
- │ │ ├── app/dashboard/ ← Frontend डोमेन डिटेक्ट
938
- │ │ └── package.json ← { "dependencies": { "next": "^14" } }
939
- │ └── api/ ← apps/api/package.json से Express डिटेक्ट
940
- │ ├── src/modules/users/ ← Backend डोमेन डिटेक्ट
941
- │ └── package.json ← { "dependencies": { "express": "^4" } }
942
- ├── packages/
943
- │ ├── db/ ← packages/db/package.json से Drizzle डिटेक्ट
944
- │ └── ui/
945
- └── package.json ← { "workspaces": ["apps/*", "packages/*"] }
946
- ```
947
-
948
- > **नोट:** Kotlin/Java monorepos के लिए, multi-module detection `settings.gradle.kts` का उपयोग करती है (ऊपर [Kotlin Multi-Module Detection](#kotlin-मल्टी-मॉड्यूल-डोमेन-डिटेक्शन) देखें) और JS monorepo markers की आवश्यकता नहीं है।
949
-
950
- ## समस्या निवारण
951
-
952
- **"claude: command not found"** — Claude Code CLI स्थापित नहीं है या PATH में नहीं है। [Claude Code docs](https://code.claude.com/docs/en/overview) देखें।
953
-
954
- **"npm install failed"** — Node.js version बहुत कम हो सकता है। v18+ आवश्यक है।
955
-
956
- **"0 domains detected"** — आपकी प्रोजेक्ट संरचना ग़ैर-मानक हो सकती है। अपने स्टैक के लिए ऊपर के detection patterns देखें।
957
-
958
- **"0 domains detected" on Kotlin project** — सुनिश्चित करें कि आपके प्रोजेक्ट में root पर `build.gradle.kts` (या kotlin plugin के साथ `build.gradle`) है, और source फ़ाइलें `**/src/main/kotlin/` के तहत हैं। Multi-module प्रोजेक्ट्स के लिए, सुनिश्चित करें कि `settings.gradle.kts` में `include()` statements हैं। Single-module Kotlin प्रोजेक्ट्स (`settings.gradle` के बिना) भी समर्थित हैं — डोमेन `src/main/kotlin/` के तहत package/class संरचना से निकाले जाते हैं।
959
-
960
- **"Language detected as java instead of kotlin"** — ClaudeOS-Core पहले root `build.gradle(.kts)` की जाँच करता है, फिर submodule build फ़ाइलें। यदि root build file `kotlin` के बिना `java` plugin का उपयोग करती है, लेकिन submodules Kotlin का उपयोग करते हैं, तो टूल fallback के रूप में 5 तक submodule build फ़ाइलों की जाँच करता है। यदि फिर भी नहीं डिटेक्ट होता, तो सुनिश्चित करें कि कम से कम एक `build.gradle.kts` में `kotlin("jvm")` या `org.jetbrains.kotlin` है।
961
-
962
- **"CQRS not detected"** — Architecture detection मॉड्यूल नामों पर निर्भर करती है जिसमें `command` और `query` keywords हों। यदि आपके मॉड्यूल अलग naming का उपयोग करते हैं (जैसे `write-server`, `read-server`), तो CQRS architecture ऑटो-डिटेक्ट नहीं होगा। आप plan-installer चलने के बाद जेनरेट किए गए प्रॉम्प्ट को मैन्युअली adjust कर सकते हैं।
963
-
964
- **"Pass 3 produced 0 rule files under .claude/rules/" (v2.0.0)** — Guard 2 fired: Claude ने `staging-override.md` directive को ignore किया और सीधे `.claude/` में लिखने की कोशिश की, जहाँ Claude Code की sensitive-path policy writes को block करती है। `npx claudeos-core init --force` के साथ फिर से चलाएँ। यदि error बनी रहती है, तो `claudeos-core/generated/pass3-prompt.md` की जाँच करें कि `staging-override.md` block सबसे ऊपर है।
965
-
966
- **"Pass 3 finished but N rule file(s) could not be moved from staging" (v2.0.0)** — Guard 1 fired: staging move ने एक transient file lock (आमतौर पर Windows antivirus या file-watcher) hit किया। Marker NOT written, इसलिए अगला `init` run स्वचालित रूप से Pass 3 retry करता है। बस `npx claudeos-core init` फिर से चलाएँ।
967
-
968
- **"Pass 3 produced CLAUDE.md and rules but N/9 guide files are missing or empty" (v2.0.0)** — Guard 3 (H2) fired: Claude CLAUDE.md + rules लिखने के बाद लेकिन `claudeos-core/guide/` section (9 फ़ाइलें अपेक्षित) को finish (या start) करने से पहले mid-response truncated हो गया। केवल-BOM या केवल-whitespace फ़ाइल पर भी fire होता है (heading लिखा गया था लेकिन body truncated था)। इस guard के बिना completion marker अभी भी लिखा जाएगा, जिससे `guide/` बाद के runs पर स्थायी रूप से खाली रहेगा। Marker यहाँ NOT written है, इसलिए अगला `init` run समान Pass 2 परिणामों से Pass 3 को retry करता है। यदि यह दोहराता रहता है, तो scratch से regenerate करने के लिए `npx claudeos-core init --force` के साथ फिर से चलाएँ।
969
-
970
- **"Pass 3 finished but the following required output(s) are missing or empty" (v2.0.0, v2.1.0 में updated)** — Guard 3 (H1) fired: Claude `claudeos-core/guide/` के बाद लेकिन `claudeos-core/standard/` या `claudeos-core/skills/` से पहले (या दौरान) truncated हो गया। आवश्यकताएँ: (a) `standard/00.core/01.project-overview.md` मौजूद और गैर-खाली है (हर स्टैक के Pass 3 प्रॉम्प्ट द्वारा लिखा गया sentinel), (b) `skills/` में ≥1 गैर-खाली `.md`। `database/` और `mcp-guide/` को जानबूझकर बाहर रखा गया है (कुछ स्टैक्स वैध रूप से शून्य फ़ाइलें उत्पन्न करते हैं)। v2.1.0 से `plan/` की जाँच नहीं होती (master plans हटा दिए गए)। Guard 3 (H2) जैसा recovery path: `init` फिर से चलाएँ, या यदि बना रहे तो `--force`।
971
-
972
- **"Pass 3 split stage crashed partway through (v2.1.0)"** — जब split stages में से एक (जैसे `3b-1`, `3c-2`) mid-run विफल हो जाता है, तो stage-level marker NOT written होता है, लेकिन पूर्ण stages `pass3-complete.json.groupsCompleted` में रिकॉर्ड होते हैं। अगला `init` run इस array को पढ़ता है और पहले uncompleted stage से resume करता है, पहले के सभी पूर्ण work को skip करते हुए। आपको मैन्युअली कुछ करने की ज़रूरत नहीं — बस `npx claudeos-core init` फिर से चलाएँ। यदि resume उसी stage पर विफल होता रहता है, तो malformed content के लिए `claudeos-core/generated/pass3-prompt.md` की जाँच करें, फिर पूर्ण restart के लिए `--force` try करें। `pass3-complete.json` shape (`mode: "split"`, `groupsCompleted: [...]`) stable है; missing या malformed marker पूरे Pass 3 को `3a` से re-run करने का कारण बनता है।
973
-
974
- **"Pass 3 stale marker (shape mismatch) — treating as incomplete" (v2.1.0)** — एक pre-v2.1.0 single-call run से `pass3-complete.json` को नए split-mode rules के तहत interpret किया जा रहा है। Shape check `mode: "split"` और एक `groupsCompleted` array की तलाश करता है; यदि कोई भी missing है, तो marker को partial माना जाता है और Pass 3 split mode में re-run होता है। यदि आप v2.0.x से upgrade किए हैं, तो यह एक बार expected है — अगला run सही marker shape लिखेगा। कोई कार्रवाई आवश्यक नहीं।
484
+ ## Documentation
975
485
 
976
- **"pass2-merged.json exists but is malformed or incomplete (<5 top-level keys), re-running" (v2.0.0)** — Info log, error नहीं। Resume पर, `init` अब `pass2-merged.json` को parse और validate करता है (≥5 top-level keys आवश्यक, `pass-json-validator` के `INSUFFICIENT_KEYS` threshold को mirror करते हुए)। पिछले crashed run से Skeleton `{}` या malformed JSON स्वचालित रूप से हटा दिया जाता है और Pass 2 फिर से चलता है। कोई मैन्युअल कार्रवाई आवश्यक नहीं — pipeline स्वयं-ठीक हो जाता है। यदि यह दोहराता रहता है, तो `claudeos-core/generated/pass2-prompt.md` की जाँच करें और `--force` के साथ retry करें।
977
-
978
- **"Static fallback failed while translating to lang='ko'" (v2.0.0)** जब `--lang` गैर-अंग्रेज़ी होता है, तो Pass 4 / static fallback / gap-fill सभी को अनुवाद करने के लिए `claude` CLI की आवश्यकता होती है। यदि अनुवाद विफल हो जाता है (CLI authenticated नहीं, network timeout, या strict validation ने output को reject कर दिया: <40% length, broken code fences, lost frontmatter, आदि), तो run चुपचाप English लिखने के बजाय abort हो जाता है। Fix: सुनिश्चित करें कि `claude` authenticated है, या अनुवाद skip करने के लिए `--lang en` के साथ फिर से चलाएँ।
979
-
980
- **"pass4-memory.json exists but memory/ is empty" (v2.0.0)** पिछले run ने marker लिखा था लेकिन user (या cleanup script) ने `claudeos-core/memory/` हटा दिया। CLI इस stale marker को ऑटो-डिटेक्ट करता है और अगले `init` पर Pass 4 को re-run करता है। कोई मैन्युअल कार्रवाई आवश्यक नहीं।
981
-
982
- **"pass4-memory.json exists but is malformed (missing passNum/memoryFiles) — re-running Pass 4" (v2.0.0)** — Info log, error नहीं। Pass 4 marker content अब validated है (`passNum === 4` + non-empty `memoryFiles` array), केवल इसके अस्तित्व की नहीं। एक partial Claude failure जिसने marker body के रूप में `{"error":"timeout"}` जैसा कुछ emit किया था, पहले हमेशा के लिए success के रूप में accepted होता था; अब marker हटा दिया जाता है और Pass 4 स्वचालित रूप से re-run होता है।
983
-
984
- **"Could not delete stale pass3-complete.json / pass4-memory.json" InitError (v2.0.0)** `init` ने एक stale marker डिटेक्ट किया (Pass 3: CLAUDE.md externally deleted था; Pass 4: memory/ खाली या marker body malformed) और इसे हटाने की कोशिश की, लेकिन `unlinkSync` call विफल हो गई — आमतौर पर क्योंकि Windows antivirus या file-watcher (editor, IDE indexer) file handle पकड़े हुए है। पहले इसे चुपचाप ignore किया जाता था, जिससे pipeline pass को skip करता और stale marker को re-use करता। अब यह loudly fail होता है। Fix: कोई भी editor/AV scanner बंद करें जो file को खोले हुए हो सकता है, फिर `npx claudeos-core init` फिर से चलाएँ।
985
-
986
- **"CLAUDEOS_SKIP_TRANSLATION=1 is set but --lang='ko' requires translation" InitError (v2.0.0)** — आपके shell में test-only env var `CLAUDEOS_SKIP_TRANSLATION=1` set है (संभवतः CI/test setup से leftover) AND गैर-अंग्रेज़ी `--lang` चुना है। यह env var translation path को short-circuit करता है जिस पर Pass 4 की static-fallback और gap-fill गैर-अंग्रेज़ी output के लिए निर्भर करती हैं। `init` language-selection time पर conflict डिटेक्ट करता है और तुरंत abort हो जाता है (mid-Pass-4 में confusing nested error के साथ crash होने के बजाय) Fix: या तो चलाने से पहले `unset CLAUDEOS_SKIP_TRANSLATION`, या `npx claudeos-core init --lang en` का उपयोग करें।
987
-
988
- **"⚠️ v2.2.0 upgrade detected" warning (v2.2.0)** — आपका existing `CLAUDE.md` pre-v2.2.0 version से generated है। Default resume-mode regeneration Rule B idempotency के तहत existing files को skip करेगा, इसलिए v2.2.0 के structural improvements (8-section CLAUDE.md scaffold, per-file `40.infra/*` paths, `.env.example`-based port accuracy, Section 8 `Common Rules & Memory (L4)` (दो sub-section संरचना के साथ पुनः डिज़ाइन: Common Rules · L4 Memory), `60.memory/*` rule row, forward-referenced `04.doc-writing-guide.md`) apply नहीं होंगे। Fix: `npx claudeos-core init --force` के साथ re-run करें। यह generated files (`CLAUDE.md`, `.claude/rules/`, `claudeos-core/standard/`, `claudeos-core/skills/`, `claudeos-core/guide/`) को overwrite करता है लेकिन `claudeos-core/memory/` content (आपके accumulated decision-log, failure-patterns entries — append-only) को preserve करता है। Overwrite से पहले diff देखना हो तो `--force` से पहले project को git commit कर दें।
989
-
990
- **CLAUDE.md में port `.env.example` से अलग (v2.2.0)** — stack-detector का नया `.env` parser (`lib/env-parser.js`) पहले `.env.example` (canonical, committed) पढ़ता है, फिर `.env` variants को fallback के रूप में। Recognized port variables: `PORT`, `VITE_PORT`, `VITE_DESKTOP_PORT`, `NEXT_PUBLIC_PORT`, `NUXT_PORT`, `DJANGO_PORT`, etc. Spring Boot के लिए, `application.yml` का `server.port` अभी भी `.env` पर precedence रखता है (framework-native config wins)। अगर project unusual env var name use करता है, तो recognized convention पर rename करें या `PORT_VAR_KEYS` extend करने के लिए issue raise करें। Framework defaults (Vite 5173, Next.js 3000, Django 8000) तब use होते हैं जब direct detection और `.env` दोनों silent हों।
991
-
992
- **Generated docs में `***REDACTED***` values (v2.2.0)** — Expected behavior। v2.2.0 का `.env` parser `PASSWORD`/`SECRET`/`TOKEN`/`API_KEY`/`CREDENTIAL`/`PRIVATE_KEY` patterns से match करने वाले variables के values को automatically `***REDACTED***` से replace कर देता है before किसी भी generator तक पहुंचे। यह `.env.example` में accidentally committed secrets के खिलाफ defense-in-depth है। `DATABASE_URL` stack-detector DB identification back-compat के लिए as-is रहता है। अगर generated `CLAUDE.md` table में `***REDACTED***` दिखे तो वह bug है, please issue file करें — redacted values table तक नहीं पहुंचने चाहिए। Non-sensitive runtime config (port, host, API target, NODE_ENV, etc.) बिना बदलाव pass होता है।
486
+ | विषय | यह पढ़ें |
487
+ |---|---|
488
+ | 4-pass पाइपलाइन कैसे काम करती है (diagram से अधिक गहरा) | [docs/hi/architecture.md](docs/hi/architecture.md) |
489
+ | Architecture के दृश्य diagrams (Mermaid) | [docs/hi/diagrams.md](docs/hi/diagrams.md) |
490
+ | Stack detectionप्रत्येक scanner क्या देखता है | [docs/hi/stacks.md](docs/hi/stacks.md) |
491
+ | Memory layer — decision logs और failure patterns | [docs/hi/memory-layer.md](docs/hi/memory-layer.md) |
492
+ | सभी 5 validators विस्तार से | [docs/hi/verification.md](docs/hi/verification.md) |
493
+ | हर CLI command और option | [docs/hi/commands.md](docs/hi/commands.md) |
494
+ | मैन्युअल installation (बिना `npx` के) | [docs/hi/manual-installation.md](docs/hi/manual-installation.md) |
495
+ | Scanner overrides — `.claudeos-scan.json` | [docs/hi/advanced-config.md](docs/hi/advanced-config.md) |
496
+ | सुरक्षा: re-init पर क्या सुरक्षित रहता है | [docs/hi/safety.md](docs/hi/safety.md) |
497
+ | समान tools के साथ तुलना (scope, गुणवत्ता नहीं) | [docs/hi/comparison.md](docs/hi/comparison.md) |
498
+ | त्रुटियाँ और रिकवरी | [docs/hi/troubleshooting.md](docs/hi/troubleshooting.md) |
993
499
 
994
500
  ---
995
501
 
996
502
  ## योगदान
997
503
 
998
- योगदान का स्वागत है! जहाँ सबसे ज़्यादा मदद की ज़रूरत है:
999
-
1000
- - **नए stack templates** — Ruby/Rails, Go (Gin/Fiber/Echo), PHP (Laravel/Symfony), Rust (Axum/Actix), Svelte/SvelteKit, Remix
1001
- - **IDE integration** — VS Code extension, IntelliJ plugin
1002
- - **CI/CD templates** — GitLab CI, CircleCI, Jenkins examples (GitHub Actions पहले से shipped — `.github/workflows/test.yml` देखें)
1003
- - **Test coverage** — Test suite का विस्तार करना (वर्तमान में 30 test फ़ाइलों में 602 tests जो scanners, stack detection, domain grouping, plan parsing, prompt generation, CLI selectors, monorepo detection, Vite SPA detection, verification tools, L4 memory scaffold, Pass 2 resume validation, Pass 3 Guards 1/2/3 (H1 sentinel + H2 BOM-aware empty-file + strict stale-marker unlink), Pass 3 split-mode batch subdivision, Pass 3 partial-marker resume (v2.1.0), Pass 4 marker content validation + stale-marker unlink strictness + scaffoldSkillsManifest gap-fill (v2.1.0), translation env-skip guard + early fail-fast + CI workflow, staged-rules move, lang-aware translation fallback, master plan removal regression suite (v2.1.0), memory score/compact formatting regression (v2.1.0), और AI Work Rules template संरचना, और `.env` parser port/host/API-target extraction + sensitive-variable redaction (v2.2.0) को कवर करते हैं)
504
+ योगदान का स्वागत है stack समर्थन जोड़ना, prompts बेहतर बनाना, bugs ठीक करना। [CONTRIBUTING.md](CONTRIBUTING.md) देखें।
1004
505
 
1005
- क्षेत्रों की पूरी सूची, code style, commit convention, और नया stack template जोड़ने के लिए step-by-step guide के लिए [`CONTRIBUTING.md`](./CONTRIBUTING.md) देखें।
1006
-
1007
- ---
506
+ Code of Conduct और सुरक्षा नीति के लिए, [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) और [SECURITY.md](SECURITY.md) देखें।
1008
507
 
1009
- ## लेखक
508
+ ## License
1010
509
 
1011
- **claudeos-core** द्वारा बनाया गया [GitHub](https://github.com/claudeos-core) · [Email](mailto:claudeoscore@gmail.com)
510
+ [ISC](LICENSE) किसी भी उपयोग के लिए मुफ़्त, व्यावसायिक सहित।
1012
511
 
1013
- ## License
512
+ ---
1014
513
 
1015
- ISC
514
+ <sub>[@claudeos-core](https://github.com/claudeos-core) द्वारा सावधानी से निर्मित। यदि इसने आपका समय बचाया है, GitHub पर एक ⭐ इसे दृश्यमान बनाए रखता है।</sub>