claudeos-core 1.3.0 → 1.3.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.
Potentially problematic release.
This version of claudeos-core might be problematic. Click here for more details.
- package/CHANGELOG.md +11 -0
- package/README.de.md +9 -4
- package/README.es.md +9 -4
- package/README.fr.md +9 -4
- package/README.hi.md +9 -4
- package/README.ja.md +9 -4
- package/README.ko.md +9 -4
- package/README.md +9 -4
- package/README.ru.md +9 -4
- package/README.vi.md +9 -4
- package/README.zh-CN.md +9 -4
- package/content-validator/index.js +7 -9
- package/package.json +1 -1
- package/pass-prompts/templates/java-spring/pass1.md +1 -1
- package/pass-prompts/templates/java-spring/pass3.md +25 -5
- package/pass-prompts/templates/kotlin-spring/pass1.md +1 -1
- package/pass-prompts/templates/kotlin-spring/pass3.md +25 -5
- package/pass-prompts/templates/node-express/pass1.md +1 -1
- package/pass-prompts/templates/node-express/pass3.md +24 -5
- package/pass-prompts/templates/node-nextjs/pass1.md +1 -1
- package/pass-prompts/templates/node-nextjs/pass3.md +25 -5
- package/pass-prompts/templates/python-django/pass1.md +1 -1
- package/pass-prompts/templates/python-django/pass3.md +24 -5
- package/pass-prompts/templates/python-fastapi/pass1.md +1 -1
- package/pass-prompts/templates/python-fastapi/pass3.md +24 -5
- package/plan-installer/prompt-generator.js +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.3.1] — 2026-04-03
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
- **Context efficiency: rules paths scoping** — `40.infra/*` and `50.sync/*` rules now use scoped `paths:` frontmatter instead of `["**/*"]`; infra rules load only for config/infra files, sync rules load only for claudeos-core files (5 stacks; python-django infra keeps `["**/*"]` due to .py settings)
|
|
7
|
+
- **Context efficiency: standard reference distribution** — `00.standard-reference.md` changed from "MUST Read ALL" to "Standard Documents Directory — Read ONLY relevant"; each rule file now ends with `## Reference` section linking to its corresponding standard
|
|
8
|
+
- **content-validator** — Removed `50.sync` exemption from frontmatter validation; all rules now checked equally; updated comment and warning message to reflect scoped paths
|
|
9
|
+
- **prompt-generator** — Removed duplicate `pass1-prompt.md` generation (backward-compat fallback no longer needed; `pass1-{type}-prompt.md` is always generated)
|
|
10
|
+
- **Pass 1 templates** (all 6 stacks) — "Do not create files" → "Do not create or modify source files" (clarifies that saving analysis JSON is allowed)
|
|
11
|
+
- **All 10 READMEs** — "How Claude Code Uses Your Documentation" section updated: auto-load table now shows per-category paths, standard reading explained as on-demand via `## Reference` links
|
|
12
|
+
- **Pass 3 CRITICAL directive: Code Example Accuracy** (all 6 stacks) — Rules/standards code examples must use EXACT method names from pass2-merged.json; prevents hallucination of API names (e.g., `ok()` instead of `success()`)
|
|
13
|
+
|
|
3
14
|
## [1.3.0] — 2026-04-03
|
|
4
15
|
|
|
5
16
|
### Added
|
package/README.de.md
CHANGED
|
@@ -386,16 +386,21 @@ So liest Claude Code die von ClaudeOS-Core generierte Dokumentation tatsächlich
|
|
|
386
386
|
| Datei | Wann | Garantiert |
|
|
387
387
|
|---|---|---|
|
|
388
388
|
| `CLAUDE.md` | Bei jedem Gesprächsstart | Immer |
|
|
389
|
-
| `.claude/rules
|
|
390
|
-
| `.claude/rules/
|
|
389
|
+
| `.claude/rules/00.core/*` | Beim Bearbeiten von Dateien (`paths: ["**/*"]`) | Immer |
|
|
390
|
+
| `.claude/rules/10.backend/*` | Beim Bearbeiten von Dateien (`paths: ["**/*"]`) | Immer |
|
|
391
|
+
| `.claude/rules/30.security-db/*` | Beim Bearbeiten von Dateien (`paths: ["**/*"]`) | Immer |
|
|
392
|
+
| `.claude/rules/40.infra/*` | Nur bei Config/Infra-Dateien (eingeschränkte Paths) | Bedingt |
|
|
393
|
+
| `.claude/rules/50.sync/*` | Nur bei claudeos-core-Dateien (eingeschränkte Paths) | Bedingt |
|
|
391
394
|
|
|
392
|
-
### Dateien, die über
|
|
395
|
+
### Dateien, die on-demand über Regel-Referenzen gelesen werden
|
|
393
396
|
|
|
394
|
-
|
|
397
|
+
Jede Regel-Datei verlinkt im `## Reference`-Abschnitt auf den entsprechenden Standard. Claude liest nur den für die aktuelle Aufgabe relevanten Standard:
|
|
395
398
|
|
|
396
399
|
- `claudeos-core/standard/**` — Coding-Patterns, ✅/❌ Beispiele, Namenskonventionen
|
|
397
400
|
- `claudeos-core/database/**` — DB-Schema (für Queries, Mapper, Migrationen)
|
|
398
401
|
|
|
402
|
+
`00.standard-reference.md` dient als Verzeichnis zum Entdecken von Standards ohne entsprechende Regel.
|
|
403
|
+
|
|
399
404
|
### Dateien, die NICHT gelesen werden (Kontexteinsparung)
|
|
400
405
|
|
|
401
406
|
Explizit durch den `DO NOT Read`-Abschnitt der standard-reference Regel ausgeschlossen:
|
package/README.es.md
CHANGED
|
@@ -387,16 +387,21 @@ Así es como Claude Code lee la documentación generada por ClaudeOS-Core:
|
|
|
387
387
|
| Archivo | Cuándo | Garantizado |
|
|
388
388
|
|---|---|---|
|
|
389
389
|
| `CLAUDE.md` | Al inicio de cada conversación | Siempre |
|
|
390
|
-
| `.claude/rules
|
|
391
|
-
| `.claude/rules/
|
|
390
|
+
| `.claude/rules/00.core/*` | Al editar archivos (`paths: ["**/*"]`) | Siempre |
|
|
391
|
+
| `.claude/rules/10.backend/*` | Al editar archivos (`paths: ["**/*"]`) | Siempre |
|
|
392
|
+
| `.claude/rules/30.security-db/*` | Al editar archivos (`paths: ["**/*"]`) | Siempre |
|
|
393
|
+
| `.claude/rules/40.infra/*` | Solo al editar archivos config/infra (paths con alcance) | Condicional |
|
|
394
|
+
| `.claude/rules/50.sync/*` | Solo al editar archivos claudeos-core (paths con alcance) | Condicional |
|
|
392
395
|
|
|
393
|
-
### Archivos leídos vía
|
|
396
|
+
### Archivos leídos bajo demanda vía referencias en reglas
|
|
394
397
|
|
|
395
|
-
|
|
398
|
+
Cada archivo de regla enlaza a su standard correspondiente en la sección `## Reference`. Claude solo lee el standard relevante para la tarea actual:
|
|
396
399
|
|
|
397
400
|
- `claudeos-core/standard/**` — Patrones de código, ejemplos ✅/❌, convenciones de nombres
|
|
398
401
|
- `claudeos-core/database/**` — Schema DB (para queries, mappers, migraciones)
|
|
399
402
|
|
|
403
|
+
`00.standard-reference.md` sirve como directorio para descubrir standards sin regla correspondiente.
|
|
404
|
+
|
|
400
405
|
### Archivos que NO se leen (ahorro de contexto)
|
|
401
406
|
|
|
402
407
|
Excluidos explícitamente por la sección `DO NOT Read` de la regla standard-reference:
|
package/README.fr.md
CHANGED
|
@@ -387,16 +387,21 @@ Voici comment Claude Code lit effectivement la documentation générée par Clau
|
|
|
387
387
|
| Fichier | Quand | Garanti |
|
|
388
388
|
|---|---|---|
|
|
389
389
|
| `CLAUDE.md` | Au début de chaque conversation | Toujours |
|
|
390
|
-
| `.claude/rules
|
|
391
|
-
| `.claude/rules/
|
|
390
|
+
| `.claude/rules/00.core/*` | Lors de l'édition de fichiers (`paths: ["**/*"]`) | Toujours |
|
|
391
|
+
| `.claude/rules/10.backend/*` | Lors de l'édition de fichiers (`paths: ["**/*"]`) | Toujours |
|
|
392
|
+
| `.claude/rules/30.security-db/*` | Lors de l'édition de fichiers (`paths: ["**/*"]`) | Toujours |
|
|
393
|
+
| `.claude/rules/40.infra/*` | Uniquement pour les fichiers config/infra (paths scopés) | Conditionnel |
|
|
394
|
+
| `.claude/rules/50.sync/*` | Uniquement pour les fichiers claudeos-core (paths scopés) | Conditionnel |
|
|
392
395
|
|
|
393
|
-
### Fichiers lus
|
|
396
|
+
### Fichiers lus à la demande via les références des règles
|
|
394
397
|
|
|
395
|
-
|
|
398
|
+
Chaque fichier de règle lie son standard correspondant dans la section `## Reference`. Claude ne lit que le standard pertinent pour la tâche en cours :
|
|
396
399
|
|
|
397
400
|
- `claudeos-core/standard/**` — Patterns de code, exemples ✅/❌, conventions de nommage
|
|
398
401
|
- `claudeos-core/database/**` — Schéma DB (pour requêtes, mappers, migrations)
|
|
399
402
|
|
|
403
|
+
`00.standard-reference.md` sert de répertoire pour découvrir les standards sans règle correspondante.
|
|
404
|
+
|
|
400
405
|
### Fichiers NON lus (économie de contexte)
|
|
401
406
|
|
|
402
407
|
Explicitement exclus par la section `DO NOT Read` de la règle standard-reference :
|
package/README.hi.md
CHANGED
|
@@ -387,16 +387,21 @@ ClaudeOS-Core द्वारा जेनरेट किए गए डॉक
|
|
|
387
387
|
| फाइल | कब | गारंटी |
|
|
388
388
|
|---|---|---|
|
|
389
389
|
| `CLAUDE.md` | हर कन्वर्सेशन शुरू होने पर | हमेशा |
|
|
390
|
-
| `.claude/rules
|
|
391
|
-
| `.claude/rules/
|
|
390
|
+
| `.claude/rules/00.core/*` | फाइल एडिट करते समय (`paths: ["**/*"]`) | हमेशा |
|
|
391
|
+
| `.claude/rules/10.backend/*` | फाइल एडिट करते समय (`paths: ["**/*"]`) | हमेशा |
|
|
392
|
+
| `.claude/rules/30.security-db/*` | फाइल एडिट करते समय (`paths: ["**/*"]`) | हमेशा |
|
|
393
|
+
| `.claude/rules/40.infra/*` | केवल config/infra फाइल एडिट करते समय (स्कोप्ड paths) | सशर्त |
|
|
394
|
+
| `.claude/rules/50.sync/*` | केवल claudeos-core फाइल एडिट करते समय (स्कोप्ड paths) | सशर्त |
|
|
392
395
|
|
|
393
|
-
###
|
|
396
|
+
### रूल रेफरेंस के ज़रिए ऑन-डिमांड पढ़ी जाने वाली फाइलें
|
|
394
397
|
|
|
395
|
-
|
|
398
|
+
हर रूल फाइल `## Reference` सेक्शन में संबंधित standard को लिंक करती है। Claude केवल वर्तमान कार्य से संबंधित standard पढ़ता है:
|
|
396
399
|
|
|
397
400
|
- `claudeos-core/standard/**` — कोडिंग पैटर्न, ✅/❌ उदाहरण, नेमिंग कन्वेंशन
|
|
398
401
|
- `claudeos-core/database/**` — DB स्कीमा (क्वेरी, मैपर, माइग्रेशन के लिए)
|
|
399
402
|
|
|
403
|
+
`00.standard-reference.md` बिना संबंधित रूल वाले standard की खोज के लिए एक डायरेक्टरी के रूप में कार्य करता है।
|
|
404
|
+
|
|
400
405
|
### न पढ़ी जाने वाली फाइलें (कॉन्टेक्स्ट बचत)
|
|
401
406
|
|
|
402
407
|
standard-reference रूल के `DO NOT Read` सेक्शन द्वारा स्पष्ट रूप से बाहर:
|
package/README.ja.md
CHANGED
|
@@ -388,16 +388,21 @@ ClaudeOS-Core が生成したドキュメントを Claude Code が実際に読
|
|
|
388
388
|
| ファイル | タイミング | 保証 |
|
|
389
389
|
|---|---|---|
|
|
390
390
|
| `CLAUDE.md` | 毎回の会話開始時 | 常に |
|
|
391
|
-
| `.claude/rules
|
|
392
|
-
| `.claude/rules/
|
|
391
|
+
| `.claude/rules/00.core/*` | ファイル編集時(`paths: ["**/*"]`) | 常に |
|
|
392
|
+
| `.claude/rules/10.backend/*` | ファイル編集時(`paths: ["**/*"]`) | 常に |
|
|
393
|
+
| `.claude/rules/30.security-db/*` | ファイル編集時(`paths: ["**/*"]`) | 常に |
|
|
394
|
+
| `.claude/rules/40.infra/*` | config/infraファイル編集時のみ(スコープ付きpaths) | 条件付き |
|
|
395
|
+
| `.claude/rules/50.sync/*` | claudeos-coreファイル編集時のみ(スコープ付きpaths) | 条件付き |
|
|
393
396
|
|
|
394
|
-
###
|
|
397
|
+
### ルール参照によるオンデマンド読み取り
|
|
395
398
|
|
|
396
|
-
|
|
399
|
+
各ルールファイル末尾の `## Reference` セクションが対応するstandardをリンクします。Claudeは現在のタスクに関連するstandardのみ読み取ります:
|
|
397
400
|
|
|
398
401
|
- `claudeos-core/standard/**` — コーディングパターン、✅/❌ 例、命名規則
|
|
399
402
|
- `claudeos-core/database/**` — DB スキーマ(クエリ、マッパー、マイグレーション用)
|
|
400
403
|
|
|
404
|
+
`00.standard-reference.md` は対応ルールのないstandardを発見するためのディレクトリです。
|
|
405
|
+
|
|
401
406
|
### 読み取らないファイル(コンテキスト節約)
|
|
402
407
|
|
|
403
408
|
standard-reference ルールの `DO NOT Read` セクションで明示的に除外されます:
|
package/README.ko.md
CHANGED
|
@@ -405,16 +405,21 @@ ClaudeOS-Core가 생성한 문서를 Claude Code가 실제로 읽는 방식입
|
|
|
405
405
|
| 파일 | 시점 | 보장 |
|
|
406
406
|
|---|---|---|
|
|
407
407
|
| `CLAUDE.md` | 매 대화 시작 시 | 항상 |
|
|
408
|
-
| `.claude/rules
|
|
409
|
-
| `.claude/rules/
|
|
408
|
+
| `.claude/rules/00.core/*` | 파일 편집 시 (`paths: ["**/*"]`) | 항상 |
|
|
409
|
+
| `.claude/rules/10.backend/*` | 파일 편집 시 (`paths: ["**/*"]`) | 항상 |
|
|
410
|
+
| `.claude/rules/30.security-db/*` | 파일 편집 시 (`paths: ["**/*"]`) | 항상 |
|
|
411
|
+
| `.claude/rules/40.infra/*` | config/infra 파일 편집 시만 (스코핑된 paths) | 조건부 |
|
|
412
|
+
| `.claude/rules/50.sync/*` | claudeos-core 파일 편집 시만 (스코핑된 paths) | 조건부 |
|
|
410
413
|
|
|
411
|
-
###
|
|
414
|
+
### rule 참조를 통해 온디맨드로 읽는 파일
|
|
412
415
|
|
|
413
|
-
`
|
|
416
|
+
각 rule 파일 하단의 `## Reference` 섹션이 대응하는 standard를 링크합니다. Claude는 현재 작업과 관련된 standard만 읽습니다:
|
|
414
417
|
|
|
415
418
|
- `claudeos-core/standard/**` — 코딩 패턴, ✅/❌ 예시, 네이밍 규칙
|
|
416
419
|
- `claudeos-core/database/**` — DB 스키마 (쿼리, 매퍼, 마이그레이션용)
|
|
417
420
|
|
|
421
|
+
`00.standard-reference.md`는 대응 rule이 없는 standard를 발견하기 위한 디렉토리 역할입니다.
|
|
422
|
+
|
|
418
423
|
### 읽지 않는 파일 (컨텍스트 절약)
|
|
419
424
|
|
|
420
425
|
standard-reference 규칙의 `DO NOT Read` 섹션으로 명시적으로 제외됩니다:
|
package/README.md
CHANGED
|
@@ -424,16 +424,21 @@ ClaudeOS-Core generates documentation that Claude Code actually reads — here's
|
|
|
424
424
|
| File | When | Guaranteed |
|
|
425
425
|
|---|---|---|
|
|
426
426
|
| `CLAUDE.md` | Every conversation start | Always |
|
|
427
|
-
| `.claude/rules
|
|
428
|
-
| `.claude/rules/
|
|
427
|
+
| `.claude/rules/00.core/*` | When any file is edited (`paths: ["**/*"]`) | Always |
|
|
428
|
+
| `.claude/rules/10.backend/*` | When any file is edited (`paths: ["**/*"]`) | Always |
|
|
429
|
+
| `.claude/rules/30.security-db/*` | When any file is edited (`paths: ["**/*"]`) | Always |
|
|
430
|
+
| `.claude/rules/40.infra/*` | Only when editing config/infra files (scoped paths) | Conditional |
|
|
431
|
+
| `.claude/rules/50.sync/*` | Only when editing claudeos-core files (scoped paths) | Conditional |
|
|
429
432
|
|
|
430
|
-
### What Claude Code reads via
|
|
433
|
+
### What Claude Code reads on-demand via rule references
|
|
431
434
|
|
|
432
|
-
|
|
435
|
+
Each rule file links to its corresponding standard via a `## Reference` section. Claude reads only the relevant standard for the current task:
|
|
433
436
|
|
|
434
437
|
- `claudeos-core/standard/**` — coding patterns, ✅/❌ examples, naming conventions
|
|
435
438
|
- `claudeos-core/database/**` — DB schema (for queries, mappers, migrations)
|
|
436
439
|
|
|
440
|
+
The `00.standard-reference.md` serves as a directory of all standard files for discovering standards that have no corresponding rule.
|
|
441
|
+
|
|
437
442
|
### What Claude Code does NOT read (saves context)
|
|
438
443
|
|
|
439
444
|
These folders are explicitly excluded via the `DO NOT Read` section in the standard-reference rule:
|
package/README.ru.md
CHANGED
|
@@ -387,16 +387,21 @@ npx claudeos-core restore # Восстановление Plan → Диск
|
|
|
387
387
|
| Файл | Когда | Гарантия |
|
|
388
388
|
|---|---|---|
|
|
389
389
|
| `CLAUDE.md` | При начале каждого разговора | Всегда |
|
|
390
|
-
| `.claude/rules
|
|
391
|
-
| `.claude/rules/
|
|
390
|
+
| `.claude/rules/00.core/*` | При редактировании файлов (`paths: ["**/*"]`) | Всегда |
|
|
391
|
+
| `.claude/rules/10.backend/*` | При редактировании файлов (`paths: ["**/*"]`) | Всегда |
|
|
392
|
+
| `.claude/rules/30.security-db/*` | При редактировании файлов (`paths: ["**/*"]`) | Всегда |
|
|
393
|
+
| `.claude/rules/40.infra/*` | Только при редактировании config/infra файлов (ограниченные paths) | Условно |
|
|
394
|
+
| `.claude/rules/50.sync/*` | Только при редактировании claudeos-core файлов (ограниченные paths) | Условно |
|
|
392
395
|
|
|
393
|
-
### Файлы, читаемые через
|
|
396
|
+
### Файлы, читаемые по запросу через ссылки в правилах
|
|
394
397
|
|
|
395
|
-
|
|
398
|
+
Каждый файл правил ссылается на соответствующий standard в секции `## Reference`. Claude читает только standard, релевантный текущей задаче:
|
|
396
399
|
|
|
397
400
|
- `claudeos-core/standard/**` — Паттерны кодирования, примеры ✅/❌, соглашения об именах
|
|
398
401
|
- `claudeos-core/database/**` — Схема БД (для запросов, мапперов, миграций)
|
|
399
402
|
|
|
403
|
+
`00.standard-reference.md` служит каталогом для обнаружения standards без соответствующего правила.
|
|
404
|
+
|
|
400
405
|
### Файлы, которые НЕ читаются (экономия контекста)
|
|
401
406
|
|
|
402
407
|
Явно исключены через секцию `DO NOT Read` правила standard-reference:
|
package/README.vi.md
CHANGED
|
@@ -387,16 +387,21 @@ npx claudeos-core restore # Khôi phục Plan → Đĩa
|
|
|
387
387
|
| File | Thời điểm | Đảm bảo |
|
|
388
388
|
|---|---|---|
|
|
389
389
|
| `CLAUDE.md` | Mỗi lần bắt đầu cuộc trò chuyện | Luôn luôn |
|
|
390
|
-
| `.claude/rules
|
|
391
|
-
| `.claude/rules/
|
|
390
|
+
| `.claude/rules/00.core/*` | Khi chỉnh sửa file (`paths: ["**/*"]`) | Luôn luôn |
|
|
391
|
+
| `.claude/rules/10.backend/*` | Khi chỉnh sửa file (`paths: ["**/*"]`) | Luôn luôn |
|
|
392
|
+
| `.claude/rules/30.security-db/*` | Khi chỉnh sửa file (`paths: ["**/*"]`) | Luôn luôn |
|
|
393
|
+
| `.claude/rules/40.infra/*` | Chỉ khi chỉnh sửa file config/infra (paths giới hạn) | Có điều kiện |
|
|
394
|
+
| `.claude/rules/50.sync/*` | Chỉ khi chỉnh sửa file claudeos-core (paths giới hạn) | Có điều kiện |
|
|
392
395
|
|
|
393
|
-
### File được đọc qua quy tắc
|
|
396
|
+
### File được đọc theo yêu cầu qua tham chiếu trong quy tắc
|
|
394
397
|
|
|
395
|
-
|
|
398
|
+
Mỗi file quy tắc liên kết đến standard tương ứng trong phần `## Reference`. Claude chỉ đọc standard liên quan đến tác vụ hiện tại:
|
|
396
399
|
|
|
397
400
|
- `claudeos-core/standard/**` — Pattern coding, ví dụ ✅/❌, quy tắc đặt tên
|
|
398
401
|
- `claudeos-core/database/**` — DB schema (cho query, mapper, migration)
|
|
399
402
|
|
|
403
|
+
`00.standard-reference.md` đóng vai trò thư mục để khám phá các standard không có quy tắc tương ứng.
|
|
404
|
+
|
|
400
405
|
### File KHÔNG đọc (tiết kiệm context)
|
|
401
406
|
|
|
402
407
|
Được loại trừ rõ ràng qua phần `DO NOT Read` của quy tắc standard-reference:
|
package/README.zh-CN.md
CHANGED
|
@@ -387,16 +387,21 @@ ClaudeOS-Core 生成的文档,Claude Code 实际读取方式如下:
|
|
|
387
387
|
| 文件 | 时机 | 保证 |
|
|
388
388
|
|---|---|---|
|
|
389
389
|
| `CLAUDE.md` | 每次对话开始 | 始终 |
|
|
390
|
-
| `.claude/rules
|
|
391
|
-
| `.claude/rules/
|
|
390
|
+
| `.claude/rules/00.core/*` | 编辑文件时(`paths: ["**/*"]`) | 始终 |
|
|
391
|
+
| `.claude/rules/10.backend/*` | 编辑文件时(`paths: ["**/*"]`) | 始终 |
|
|
392
|
+
| `.claude/rules/30.security-db/*` | 编辑文件时(`paths: ["**/*"]`) | 始终 |
|
|
393
|
+
| `.claude/rules/40.infra/*` | 仅编辑 config/infra 文件时(范围限定 paths) | 有条件 |
|
|
394
|
+
| `.claude/rules/50.sync/*` | 仅编辑 claudeos-core 文件时(范围限定 paths) | 有条件 |
|
|
392
395
|
|
|
393
|
-
###
|
|
396
|
+
### 通过规则引用按需读取的文件
|
|
394
397
|
|
|
395
|
-
`
|
|
398
|
+
每个规则文件底部的 `## Reference` 部分链接到对应的 standard。Claude 仅读取与当前任务相关的 standard:
|
|
396
399
|
|
|
397
400
|
- `claudeos-core/standard/**` — 编码模式、✅/❌ 示例、命名规范
|
|
398
401
|
- `claudeos-core/database/**` — 数据库 schema(查询、mapper、迁移用)
|
|
399
402
|
|
|
403
|
+
`00.standard-reference.md` 作为目录,用于发现没有对应规则的 standard 文件。
|
|
404
|
+
|
|
400
405
|
### 不读取的文件(节省上下文)
|
|
401
406
|
|
|
402
407
|
通过 standard-reference 规则的 `DO NOT Read` 部分明确排除:
|
|
@@ -105,15 +105,13 @@ async function main() {
|
|
|
105
105
|
errors.push({ file: r, type: "EMPTY", msg: "Empty file" });
|
|
106
106
|
continue;
|
|
107
107
|
}
|
|
108
|
-
// All rules
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
warnings.push({ file: r, type: "NO_PATHS", msg: "Frontmatter exists but missing paths: key — use paths: [\"**/*\"] to ensure rule is always loaded" });
|
|
116
|
-
}
|
|
108
|
+
// All rules must have paths: frontmatter (value varies by category — e.g. ["**/*"] for core/backend, scoped patterns for infra/sync)
|
|
109
|
+
const hasFrontmatter = c.startsWith("---");
|
|
110
|
+
const hasPathsKey = c.includes("paths:");
|
|
111
|
+
if (!hasFrontmatter) {
|
|
112
|
+
warnings.push({ file: r, type: "NO_FRONTMATTER", msg: "Missing YAML frontmatter (---)" });
|
|
113
|
+
} else if (!hasPathsKey) {
|
|
114
|
+
warnings.push({ file: r, type: "NO_PATHS", msg: "Frontmatter exists but missing paths: key" });
|
|
117
115
|
}
|
|
118
116
|
}
|
|
119
117
|
console.log(` ${ruleFiles.length} files checked`);
|
package/package.json
CHANGED
|
@@ -96,7 +96,7 @@ Analysis items (per domain):
|
|
|
96
96
|
- Performance issues (N+1, unnecessary queries, memory waste)
|
|
97
97
|
- Security issues (SQL Injection potential, missing authorization)
|
|
98
98
|
|
|
99
|
-
Do not create files. Analysis only.
|
|
99
|
+
Do not create or modify source files. Analysis only.
|
|
100
100
|
Save results to claudeos-core/generated/pass1-{{PASS_NUM}}.json in the following format:
|
|
101
101
|
|
|
102
102
|
{
|
|
@@ -15,6 +15,14 @@ If a standard defines a specific pattern (e.g., import path, file naming, API us
|
|
|
15
15
|
the corresponding rule MUST use the same pattern. Before generating each rule file,
|
|
16
16
|
verify it is consistent with the related standard file.
|
|
17
17
|
|
|
18
|
+
CRITICAL — Code Example Accuracy:
|
|
19
|
+
ALL code examples in rules and standards MUST use EXACT method names, class names,
|
|
20
|
+
and signatures from pass2-merged.json analysis data.
|
|
21
|
+
Do NOT paraphrase, rename, or infer API names. If pass2-merged.json records
|
|
22
|
+
`MzcpResponseUtils.success()`, use `success()` — NOT `ok()`, NOT `respond()`.
|
|
23
|
+
If a method signature is not captured in the analysis data,
|
|
24
|
+
write "See corresponding standard for exact API" instead of guessing.
|
|
25
|
+
|
|
18
26
|
CRITICAL — CLAUDE.md Reference Table Completeness:
|
|
19
27
|
The reference table in CLAUDE.md MUST list ALL generated standard files, not just core.
|
|
20
28
|
Include all backend-api, security-db, infra, and verification standards.
|
|
@@ -56,19 +64,31 @@ Generation targets:
|
|
|
56
64
|
- Key rules summary table
|
|
57
65
|
|
|
58
66
|
3. .claude/rules/ (active domains only)
|
|
59
|
-
- Every rule file MUST include `paths: ["**/*"]` in YAML frontmatter — this ensures Claude Code always loads the rule regardless of which file is being edited
|
|
60
67
|
- Write the full rule content directly in each file (self-contained, no external references)
|
|
61
68
|
- Include 5-15 lines of key rules with concrete examples
|
|
62
69
|
- Do NOT use @import — it is not a Claude Code feature and does not work
|
|
63
|
-
-
|
|
70
|
+
- Each rule file MUST end with a `## Reference` section linking to the corresponding standard file(s):
|
|
71
|
+
```
|
|
72
|
+
## Reference
|
|
73
|
+
> For detailed patterns and examples, Read: claudeos-core/standard/10.backend-api/01.controller-patterns.md
|
|
74
|
+
```
|
|
75
|
+
- `paths:` frontmatter per rule category:
|
|
76
|
+
- `00.core/*` rules: `paths: ["**/*"]` — always loaded (architecture, naming are universally needed)
|
|
77
|
+
- `10.backend/*` rules: `paths: ["**/*"]` — always loaded (backend rules needed for any source editing)
|
|
78
|
+
- `30.security-db/*` rules: `paths: ["**/*"]` — always loaded (cross-cutting concerns)
|
|
79
|
+
- `40.infra/*` rules: `paths: ["**/*.yml", "**/*.yaml", "**/*.properties", "**/config/**", "**/*.gradle*", "**/Dockerfile*", "**/.env*"]` — loaded only for config/infra files
|
|
80
|
+
- `50.sync/*` rules: `paths: ["**/claudeos-core/**", "**/.claude/**"]` — loaded only when editing claudeos-core files
|
|
81
|
+
- MUST generate `.claude/rules/00.core/00.standard-reference.md` — a directory of all standard files. This is NOT a "read all" instruction. Claude should Read ONLY the standards relevant to the current task. Structure it as:
|
|
64
82
|
```
|
|
65
83
|
---
|
|
66
84
|
paths:
|
|
67
85
|
- "**/*"
|
|
68
86
|
---
|
|
69
|
-
#
|
|
70
|
-
|
|
71
|
-
##
|
|
87
|
+
# Standard Documents Directory
|
|
88
|
+
Below is the complete list of standard files. Read ONLY the ones relevant to your current task — do NOT read all files.
|
|
89
|
+
Each rule file in .claude/rules/ links to its corresponding standard in the ## Reference section. Follow those links first.
|
|
90
|
+
This directory is for discovering standards that have no corresponding rule file.
|
|
91
|
+
## Core
|
|
72
92
|
- claudeos-core/standard/00.core/01.project-overview.md
|
|
73
93
|
- claudeos-core/standard/00.core/02.architecture.md
|
|
74
94
|
- claudeos-core/standard/00.core/03.naming-conventions.md
|
|
@@ -129,7 +129,7 @@ Analysis items (per domain):
|
|
|
129
129
|
- Aggregate boundary violations (cross-aggregate direct references, oversized aggregates)
|
|
130
130
|
- VO misuse (mutable VOs, VOs with identity, DTO used where VO should be)
|
|
131
131
|
|
|
132
|
-
Do not create files. Analysis only.
|
|
132
|
+
Do not create or modify source files. Analysis only.
|
|
133
133
|
Save results to claudeos-core/generated/pass1-{{PASS_NUM}}.json in the following format:
|
|
134
134
|
|
|
135
135
|
{
|
|
@@ -15,6 +15,14 @@ If a standard defines a specific pattern (e.g., import path, file naming, API us
|
|
|
15
15
|
the corresponding rule MUST use the same pattern. Before generating each rule file,
|
|
16
16
|
verify it is consistent with the related standard file.
|
|
17
17
|
|
|
18
|
+
CRITICAL — Code Example Accuracy:
|
|
19
|
+
ALL code examples in rules and standards MUST use EXACT method names, class names,
|
|
20
|
+
and signatures from pass2-merged.json analysis data.
|
|
21
|
+
Do NOT paraphrase, rename, or infer API names. If pass2-merged.json records
|
|
22
|
+
`MzcpResponseUtils.success()`, use `success()` — NOT `ok()`, NOT `respond()`.
|
|
23
|
+
If a method signature is not captured in the analysis data,
|
|
24
|
+
write "See corresponding standard for exact API" instead of guessing.
|
|
25
|
+
|
|
18
26
|
CRITICAL — CLAUDE.md Reference Table Completeness:
|
|
19
27
|
The reference table in CLAUDE.md MUST list ALL generated standard files, not just core.
|
|
20
28
|
Include all backend-api, security-db, infra, and verification standards.
|
|
@@ -59,20 +67,32 @@ Generation targets:
|
|
|
59
67
|
- Key rules summary table
|
|
60
68
|
|
|
61
69
|
3. .claude/rules/ (active domains only)
|
|
62
|
-
- Every rule file MUST include `paths: ["**/*"]` in YAML frontmatter — this ensures Claude Code always loads the rule regardless of which file is being edited
|
|
63
70
|
- Write the full rule content directly in each file (self-contained, no external references)
|
|
64
71
|
- Include 5-15 lines of key rules with concrete examples
|
|
65
72
|
- Do NOT use @import — it is not a Claude Code feature and does not work
|
|
66
73
|
- CQRS-specific rules: include command/query separation rules directly in the rule file content
|
|
67
|
-
-
|
|
74
|
+
- Each rule file MUST end with a `## Reference` section linking to the corresponding standard file(s):
|
|
75
|
+
```
|
|
76
|
+
## Reference
|
|
77
|
+
> For detailed patterns and examples, Read: claudeos-core/standard/10.backend-api/01.controller-patterns.md
|
|
78
|
+
```
|
|
79
|
+
- `paths:` frontmatter per rule category:
|
|
80
|
+
- `00.core/*` rules: `paths: ["**/*"]` — always loaded (architecture, naming are universally needed)
|
|
81
|
+
- `10.backend/*` rules: `paths: ["**/*"]` — always loaded (backend rules needed for any source editing)
|
|
82
|
+
- `30.security-db/*` rules: `paths: ["**/*"]` — always loaded (cross-cutting concerns)
|
|
83
|
+
- `40.infra/*` rules: `paths: ["**/*.yml", "**/*.yaml", "**/*.properties", "**/config/**", "**/*.gradle*", "**/Dockerfile*", "**/.env*"]` — loaded only for config/infra files
|
|
84
|
+
- `50.sync/*` rules: `paths: ["**/claudeos-core/**", "**/.claude/**"]` — loaded only when editing claudeos-core files
|
|
85
|
+
- MUST generate `.claude/rules/00.core/00.standard-reference.md` — a directory of all standard files. This is NOT a "read all" instruction. Claude should Read ONLY the standards relevant to the current task. Structure it as:
|
|
68
86
|
```
|
|
69
87
|
---
|
|
70
88
|
paths:
|
|
71
89
|
- "**/*"
|
|
72
90
|
---
|
|
73
|
-
#
|
|
74
|
-
|
|
75
|
-
##
|
|
91
|
+
# Standard Documents Directory
|
|
92
|
+
Below is the complete list of standard files. Read ONLY the ones relevant to your current task — do NOT read all files.
|
|
93
|
+
Each rule file in .claude/rules/ links to its corresponding standard in the ## Reference section. Follow those links first.
|
|
94
|
+
This directory is for discovering standards that have no corresponding rule file.
|
|
95
|
+
## Core
|
|
76
96
|
- claudeos-core/standard/00.core/01.project-overview.md
|
|
77
97
|
- claudeos-core/standard/00.core/02.architecture.md
|
|
78
98
|
- claudeos-core/standard/00.core/03.naming-conventions.md
|
|
@@ -84,7 +84,7 @@ Analysis items (per domain):
|
|
|
84
84
|
- Performance issues (memory leaks, blocking I/O)
|
|
85
85
|
- Security issues (injection, missing authorization)
|
|
86
86
|
|
|
87
|
-
Do not create files. Analysis only.
|
|
87
|
+
Do not create or modify source files. Analysis only.
|
|
88
88
|
Save results to claudeos-core/generated/pass1-{{PASS_NUM}}.json in the following format:
|
|
89
89
|
|
|
90
90
|
{
|
|
@@ -17,6 +17,13 @@ If a standard defines a specific pattern (e.g., import path, file naming, API us
|
|
|
17
17
|
the corresponding rule MUST use the same pattern. Before generating each rule file,
|
|
18
18
|
verify it is consistent with the related standard file.
|
|
19
19
|
|
|
20
|
+
CRITICAL — Code Example Accuracy:
|
|
21
|
+
ALL code examples in rules and standards MUST use EXACT method names, class names,
|
|
22
|
+
and signatures from pass2-merged.json analysis data.
|
|
23
|
+
Do NOT paraphrase, rename, or infer API names.
|
|
24
|
+
If a method signature is not captured in the analysis data,
|
|
25
|
+
write "See corresponding standard for exact API" instead of guessing.
|
|
26
|
+
|
|
20
27
|
CRITICAL — CLAUDE.md Reference Table Completeness:
|
|
21
28
|
The reference table in CLAUDE.md MUST list ALL generated standard files, not just core.
|
|
22
29
|
Include all frontend-ui, backend-api, security-db, infra, and verification standards.
|
|
@@ -57,19 +64,31 @@ Generation targets:
|
|
|
57
64
|
- Key rules summary table
|
|
58
65
|
|
|
59
66
|
3. .claude/rules/ (active domains only)
|
|
60
|
-
- Every rule file MUST include `paths: ["**/*"]` in YAML frontmatter — this ensures Claude Code always loads the rule regardless of which file is being edited
|
|
61
67
|
- Write the full rule content directly in each file (self-contained, no external references)
|
|
62
68
|
- Include 5-15 lines of key rules with concrete examples
|
|
63
69
|
- Do NOT use @import — it is not a Claude Code feature and does not work
|
|
64
|
-
-
|
|
70
|
+
- Each rule file MUST end with a `## Reference` section linking to the corresponding standard file(s):
|
|
71
|
+
```
|
|
72
|
+
## Reference
|
|
73
|
+
> For detailed patterns and examples, Read: claudeos-core/standard/10.backend-api/01.router-controller-patterns.md
|
|
74
|
+
```
|
|
75
|
+
- `paths:` frontmatter per rule category:
|
|
76
|
+
- `00.core/*` rules: `paths: ["**/*"]` — always loaded (architecture, naming are universally needed)
|
|
77
|
+
- `10.backend/*` rules: `paths: ["**/*"]` — always loaded (backend rules needed for any source editing)
|
|
78
|
+
- `30.security-db/*` rules: `paths: ["**/*"]` — always loaded (cross-cutting concerns)
|
|
79
|
+
- `40.infra/*` rules: `paths: ["**/*.json", "**/*.env*", "**/config/**", "**/Dockerfile*", "**/*.yml", "**/*.yaml"]` — loaded only for config/infra files
|
|
80
|
+
- `50.sync/*` rules: `paths: ["**/claudeos-core/**", "**/.claude/**"]` — loaded only when editing claudeos-core files
|
|
81
|
+
- MUST generate `.claude/rules/00.core/00.standard-reference.md` — a directory of all standard files. This is NOT a "read all" instruction. Claude should Read ONLY the standards relevant to the current task. Structure it as:
|
|
65
82
|
```
|
|
66
83
|
---
|
|
67
84
|
paths:
|
|
68
85
|
- "**/*"
|
|
69
86
|
---
|
|
70
|
-
#
|
|
71
|
-
|
|
72
|
-
##
|
|
87
|
+
# Standard Documents Directory
|
|
88
|
+
Below is the complete list of standard files. Read ONLY the ones relevant to your current task — do NOT read all files.
|
|
89
|
+
Each rule file in .claude/rules/ links to its corresponding standard in the ## Reference section. Follow those links first.
|
|
90
|
+
This directory is for discovering standards that have no corresponding rule file.
|
|
91
|
+
## Core
|
|
73
92
|
- claudeos-core/standard/00.core/01.project-overview.md
|
|
74
93
|
- claudeos-core/standard/00.core/02.architecture.md
|
|
75
94
|
- claudeos-core/standard/00.core/03.naming-conventions.md
|
|
@@ -83,7 +83,7 @@ Analysis items (per domain):
|
|
|
83
83
|
- Accessibility issues
|
|
84
84
|
- Security issues (XSS, CSRF)
|
|
85
85
|
|
|
86
|
-
Do not create files. Analysis only.
|
|
86
|
+
Do not create or modify source files. Analysis only.
|
|
87
87
|
Save results to claudeos-core/generated/pass1-{{PASS_NUM}}.json in the following format:
|
|
88
88
|
|
|
89
89
|
{
|
|
@@ -17,6 +17,13 @@ If a standard defines a specific pattern (e.g., import path, file naming, API us
|
|
|
17
17
|
the corresponding rule MUST use the same pattern. Before generating each rule file,
|
|
18
18
|
verify it is consistent with the related standard file.
|
|
19
19
|
|
|
20
|
+
CRITICAL — Code Example Accuracy:
|
|
21
|
+
ALL code examples in rules and standards MUST use EXACT method names, class names,
|
|
22
|
+
and signatures from pass2-merged.json analysis data.
|
|
23
|
+
Do NOT paraphrase, rename, or infer API names.
|
|
24
|
+
If a method signature is not captured in the analysis data,
|
|
25
|
+
write "See corresponding standard for exact API" instead of guessing.
|
|
26
|
+
|
|
20
27
|
CRITICAL — CLAUDE.md Reference Table Completeness:
|
|
21
28
|
The reference table in CLAUDE.md MUST list ALL generated standard files, not just core.
|
|
22
29
|
Include all frontend-ui, backend-api, security-db, infra, and verification standards.
|
|
@@ -55,19 +62,32 @@ Generation targets:
|
|
|
55
62
|
- Key rules summary table
|
|
56
63
|
|
|
57
64
|
3. .claude/rules/ (active domains only)
|
|
58
|
-
- Every rule file MUST include `paths: ["**/*"]` in YAML frontmatter — this ensures Claude Code always loads the rule regardless of which file is being edited
|
|
59
65
|
- Write the full rule content directly in each file (self-contained, no external references)
|
|
60
66
|
- Include 5-15 lines of key rules with concrete examples
|
|
61
67
|
- Do NOT use @import — it is not a Claude Code feature and does not work
|
|
62
|
-
-
|
|
68
|
+
- Each rule file MUST end with a `## Reference` section linking to the corresponding standard file(s):
|
|
69
|
+
```
|
|
70
|
+
## Reference
|
|
71
|
+
> For detailed patterns and examples, Read: claudeos-core/standard/20.frontend-ui/01.component-patterns.md
|
|
72
|
+
```
|
|
73
|
+
- `paths:` frontmatter per rule category:
|
|
74
|
+
- `00.core/*` rules: `paths: ["**/*"]` — always loaded (architecture, naming are universally needed)
|
|
75
|
+
- `10.backend/*` rules: `paths: ["**/*"]` — always loaded (backend rules needed for any source editing)
|
|
76
|
+
- `20.frontend/*` rules: `paths: ["**/*"]` — always loaded (frontend rules needed for any source editing)
|
|
77
|
+
- `30.security-db/*` rules: `paths: ["**/*"]` — always loaded (cross-cutting concerns)
|
|
78
|
+
- `40.infra/*` rules: `paths: ["**/*.json", "**/*.env*", "**/next.config.*", "**/Dockerfile*", "**/*.yml", "**/*.yaml"]` — loaded only for config/infra files
|
|
79
|
+
- `50.sync/*` rules: `paths: ["**/claudeos-core/**", "**/.claude/**"]` — loaded only when editing claudeos-core files
|
|
80
|
+
- MUST generate `.claude/rules/00.core/00.standard-reference.md` — a directory of all standard files. This is NOT a "read all" instruction. Claude should Read ONLY the standards relevant to the current task. Structure it as:
|
|
63
81
|
```
|
|
64
82
|
---
|
|
65
83
|
paths:
|
|
66
84
|
- "**/*"
|
|
67
85
|
---
|
|
68
|
-
#
|
|
69
|
-
|
|
70
|
-
##
|
|
86
|
+
# Standard Documents Directory
|
|
87
|
+
Below is the complete list of standard files. Read ONLY the ones relevant to your current task — do NOT read all files.
|
|
88
|
+
Each rule file in .claude/rules/ links to its corresponding standard in the ## Reference section. Follow those links first.
|
|
89
|
+
This directory is for discovering standards that have no corresponding rule file.
|
|
90
|
+
## Core
|
|
71
91
|
- claudeos-core/standard/00.core/01.project-overview.md
|
|
72
92
|
- claudeos-core/standard/00.core/02.architecture.md
|
|
73
93
|
- claudeos-core/standard/00.core/03.naming-conventions.md
|
|
@@ -89,7 +89,7 @@ Analysis items (per domain):
|
|
|
89
89
|
- Security issues (SQL Injection, missing authorization, CSRF)
|
|
90
90
|
- Performance issues (unnecessary queries, memory)
|
|
91
91
|
|
|
92
|
-
Do not create files. Analysis only.
|
|
92
|
+
Do not create or modify source files. Analysis only.
|
|
93
93
|
Save results to claudeos-core/generated/pass1-{{PASS_NUM}}.json in the following format:
|
|
94
94
|
|
|
95
95
|
{
|
|
@@ -16,6 +16,13 @@ If a standard defines a specific pattern (e.g., import path, file naming, API us
|
|
|
16
16
|
the corresponding rule MUST use the same pattern. Before generating each rule file,
|
|
17
17
|
verify it is consistent with the related standard file.
|
|
18
18
|
|
|
19
|
+
CRITICAL — Code Example Accuracy:
|
|
20
|
+
ALL code examples in rules and standards MUST use EXACT method names, class names,
|
|
21
|
+
and signatures from pass2-merged.json analysis data.
|
|
22
|
+
Do NOT paraphrase, rename, or infer API names.
|
|
23
|
+
If a method signature is not captured in the analysis data,
|
|
24
|
+
write "See corresponding standard for exact API" instead of guessing.
|
|
25
|
+
|
|
19
26
|
CRITICAL — CLAUDE.md Reference Table Completeness:
|
|
20
27
|
The reference table in CLAUDE.md MUST list ALL generated standard files, not just core.
|
|
21
28
|
Include all backend-api, security-db, infra, and verification standards.
|
|
@@ -56,19 +63,31 @@ Generation targets:
|
|
|
56
63
|
- Key rules summary table
|
|
57
64
|
|
|
58
65
|
3. .claude/rules/ (active domains only)
|
|
59
|
-
- Every rule file MUST include `paths: ["**/*"]` in YAML frontmatter — this ensures Claude Code always loads the rule regardless of which file is being edited
|
|
60
66
|
- Write the full rule content directly in each file (self-contained, no external references)
|
|
61
67
|
- Include 5-15 lines of key rules with concrete examples
|
|
62
68
|
- Do NOT use @import — it is not a Claude Code feature and does not work
|
|
63
|
-
-
|
|
69
|
+
- Each rule file MUST end with a `## Reference` section linking to the corresponding standard file(s):
|
|
70
|
+
```
|
|
71
|
+
## Reference
|
|
72
|
+
> For detailed patterns and examples, Read: claudeos-core/standard/10.backend-api/01.view-patterns.md
|
|
73
|
+
```
|
|
74
|
+
- `paths:` frontmatter per rule category:
|
|
75
|
+
- `00.core/*` rules: `paths: ["**/*"]` — always loaded (architecture, naming are universally needed)
|
|
76
|
+
- `10.backend/*` rules: `paths: ["**/*"]` — always loaded (backend rules needed for any source editing)
|
|
77
|
+
- `30.security-db/*` rules: `paths: ["**/*"]` — always loaded (cross-cutting concerns)
|
|
78
|
+
- `40.infra/*` rules: `paths: ["**/*"]` — always loaded (Django settings are .py files, so infra paths cannot be scoped separately)
|
|
79
|
+
- `50.sync/*` rules: `paths: ["**/claudeos-core/**", "**/.claude/**"]` — loaded only when editing claudeos-core files
|
|
80
|
+
- MUST generate `.claude/rules/00.core/00.standard-reference.md` — a directory of all standard files. This is NOT a "read all" instruction. Claude should Read ONLY the standards relevant to the current task. Structure it as:
|
|
64
81
|
```
|
|
65
82
|
---
|
|
66
83
|
paths:
|
|
67
84
|
- "**/*"
|
|
68
85
|
---
|
|
69
|
-
#
|
|
70
|
-
|
|
71
|
-
##
|
|
86
|
+
# Standard Documents Directory
|
|
87
|
+
Below is the complete list of standard files. Read ONLY the ones relevant to your current task — do NOT read all files.
|
|
88
|
+
Each rule file in .claude/rules/ links to its corresponding standard in the ## Reference section. Follow those links first.
|
|
89
|
+
This directory is for discovering standards that have no corresponding rule file.
|
|
90
|
+
## Core
|
|
72
91
|
- claudeos-core/standard/00.core/01.project-overview.md
|
|
73
92
|
- claudeos-core/standard/00.core/02.architecture.md
|
|
74
93
|
- claudeos-core/standard/00.core/03.naming-conventions.md
|
|
@@ -93,7 +93,7 @@ Analysis items (per domain):
|
|
|
93
93
|
- Security issues (injection, missing authorization)
|
|
94
94
|
- Performance issues (blocking I/O, N+1)
|
|
95
95
|
|
|
96
|
-
Do not create files. Analysis only.
|
|
96
|
+
Do not create or modify source files. Analysis only.
|
|
97
97
|
Save results to claudeos-core/generated/pass1-{{PASS_NUM}}.json in the following format:
|
|
98
98
|
|
|
99
99
|
{
|
|
@@ -16,6 +16,13 @@ If a standard defines a specific pattern (e.g., import path, file naming, API us
|
|
|
16
16
|
the corresponding rule MUST use the same pattern. Before generating each rule file,
|
|
17
17
|
verify it is consistent with the related standard file.
|
|
18
18
|
|
|
19
|
+
CRITICAL — Code Example Accuracy:
|
|
20
|
+
ALL code examples in rules and standards MUST use EXACT method names, class names,
|
|
21
|
+
and signatures from pass2-merged.json analysis data.
|
|
22
|
+
Do NOT paraphrase, rename, or infer API names.
|
|
23
|
+
If a method signature is not captured in the analysis data,
|
|
24
|
+
write "See corresponding standard for exact API" instead of guessing.
|
|
25
|
+
|
|
19
26
|
CRITICAL — CLAUDE.md Reference Table Completeness:
|
|
20
27
|
The reference table in CLAUDE.md MUST list ALL generated standard files, not just core.
|
|
21
28
|
Include all backend-api, security-db, infra, and verification standards.
|
|
@@ -56,19 +63,31 @@ Generation targets:
|
|
|
56
63
|
- Key rules summary table
|
|
57
64
|
|
|
58
65
|
3. .claude/rules/ (active domains only)
|
|
59
|
-
- Every rule file MUST include `paths: ["**/*"]` in YAML frontmatter — this ensures Claude Code always loads the rule regardless of which file is being edited
|
|
60
66
|
- Write the full rule content directly in each file (self-contained, no external references)
|
|
61
67
|
- Include 5-15 lines of key rules with concrete examples
|
|
62
68
|
- Do NOT use @import — it is not a Claude Code feature and does not work
|
|
63
|
-
-
|
|
69
|
+
- Each rule file MUST end with a `## Reference` section linking to the corresponding standard file(s):
|
|
70
|
+
```
|
|
71
|
+
## Reference
|
|
72
|
+
> For detailed patterns and examples, Read: claudeos-core/standard/10.backend-api/01.router-endpoint-patterns.md
|
|
73
|
+
```
|
|
74
|
+
- `paths:` frontmatter per rule category:
|
|
75
|
+
- `00.core/*` rules: `paths: ["**/*"]` — always loaded (architecture, naming are universally needed)
|
|
76
|
+
- `10.backend/*` rules: `paths: ["**/*"]` — always loaded (backend rules needed for any source editing)
|
|
77
|
+
- `30.security-db/*` rules: `paths: ["**/*"]` — always loaded (cross-cutting concerns)
|
|
78
|
+
- `40.infra/*` rules: `paths: ["**/*.toml", "**/*.env*", "**/config/**", "**/Dockerfile*", "**/*.yml", "**/*.yaml"]` — loaded only for config/infra files
|
|
79
|
+
- `50.sync/*` rules: `paths: ["**/claudeos-core/**", "**/.claude/**"]` — loaded only when editing claudeos-core files
|
|
80
|
+
- MUST generate `.claude/rules/00.core/00.standard-reference.md` — a directory of all standard files. This is NOT a "read all" instruction. Claude should Read ONLY the standards relevant to the current task. Structure it as:
|
|
64
81
|
```
|
|
65
82
|
---
|
|
66
83
|
paths:
|
|
67
84
|
- "**/*"
|
|
68
85
|
---
|
|
69
|
-
#
|
|
70
|
-
|
|
71
|
-
##
|
|
86
|
+
# Standard Documents Directory
|
|
87
|
+
Below is the complete list of standard files. Read ONLY the ones relevant to your current task — do NOT read all files.
|
|
88
|
+
Each rule file in .claude/rules/ links to its corresponding standard in the ## Reference section. Follow those links first.
|
|
89
|
+
This directory is for discovering standards that have no corresponding rule file.
|
|
90
|
+
## Core
|
|
72
91
|
- claudeos-core/standard/00.core/01.project-overview.md
|
|
73
92
|
- claudeos-core/standard/00.core/02.architecture.md
|
|
74
93
|
- claudeos-core/standard/00.core/03.naming-conventions.md
|
|
@@ -56,11 +56,6 @@ function generatePrompts(templates, lang, templatesDir, generatedDir) {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
if (primaryTemplate) {
|
|
60
|
-
const body = readTemplate(primaryTemplate, "pass1");
|
|
61
|
-
if (body) writeFileSafe(path.join(generatedDir, "pass1-prompt.md"), header + body);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
59
|
if (primaryTemplate) {
|
|
65
60
|
const body = readTemplate(primaryTemplate, "pass2");
|
|
66
61
|
if (body) {
|