claudeos-core 2.0.2 → 2.1.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 (42) hide show
  1. package/CHANGELOG.md +208 -0
  2. package/README.de.md +961 -880
  3. package/README.es.md +960 -880
  4. package/README.fr.md +960 -880
  5. package/README.hi.md +960 -880
  6. package/README.ja.md +960 -880
  7. package/README.ko.md +126 -47
  8. package/README.md +126 -46
  9. package/README.ru.md +960 -880
  10. package/README.vi.md +128 -48
  11. package/README.zh-CN.md +959 -880
  12. package/bin/cli.js +7 -2
  13. package/bin/commands/init.js +733 -143
  14. package/bin/commands/memory.js +17 -5
  15. package/bootstrap.sh +81 -81
  16. package/lib/expected-outputs.js +6 -7
  17. package/lib/memory-scaffold.js +84 -46
  18. package/lib/plan-parser.js +12 -0
  19. package/manifest-generator/index.js +16 -18
  20. package/package.json +1 -1
  21. package/pass-prompts/templates/angular/pass3.md +2 -10
  22. package/pass-prompts/templates/common/pass3-phase1.md +131 -0
  23. package/pass-prompts/templates/common/pass3a-facts.md +143 -0
  24. package/pass-prompts/templates/common/pass3b-core-header.md +58 -0
  25. package/pass-prompts/templates/common/pass3c-skills-guide-header.md +53 -0
  26. package/pass-prompts/templates/common/pass3d-plan-aux-header.md +57 -0
  27. package/pass-prompts/templates/common/pass4.md +4 -19
  28. package/pass-prompts/templates/java-spring/pass3.md +5 -15
  29. package/pass-prompts/templates/kotlin-spring/pass3.md +5 -15
  30. package/pass-prompts/templates/node-express/pass3.md +5 -14
  31. package/pass-prompts/templates/node-fastify/pass3.md +2 -10
  32. package/pass-prompts/templates/node-nestjs/pass3.md +5 -13
  33. package/pass-prompts/templates/node-nextjs/pass3.md +5 -14
  34. package/pass-prompts/templates/node-vite/pass3.md +95 -103
  35. package/pass-prompts/templates/python-django/pass3.md +5 -14
  36. package/pass-prompts/templates/python-fastapi/pass3.md +5 -14
  37. package/pass-prompts/templates/python-flask/pass3.md +95 -103
  38. package/pass-prompts/templates/vue-nuxt/pass3.md +2 -10
  39. package/plan-installer/pass3-context-builder.js +258 -0
  40. package/plan-installer/prompt-generator.js +9 -1
  41. package/plan-validator/index.js +23 -8
  42. package/sync-checker/index.js +44 -0
@@ -0,0 +1,131 @@
1
+ ## PHASE 1 — Read Once, Extract Facts (DO THIS FIRST, EXACTLY ONCE)
2
+
3
+ Before generating ANY file, read the following inputs EXACTLY ONCE:
4
+ 1. `claudeos-core/generated/project-analysis.json` — structured stack & domain data
5
+ 2. `claudeos-core/generated/pass2-merged.json` — deep analysis merged report
6
+ 3. `claudeos-core/generated/pass3-context.json` (if it exists) — pre-computed slim summary; prefer this when available
7
+
8
+ Then extract the following facts into your working memory. You will reference
9
+ this table for EVERY subsequent file generation. Fill in concrete values
10
+ (not placeholders) wherever pass2-merged.json provides them; use `(not in analysis — see source)` otherwise.
11
+
12
+ | Fact | Value |
13
+ |---|---|
14
+ | Language + Version | ? |
15
+ | Framework + Version | ? |
16
+ | Build tool | ? |
17
+ | Package manager | ? |
18
+ | Database / ORM | ? |
19
+ | Frontend (if any) | ? |
20
+ | Architecture flags (CQRS / BFF / DDD / multi-module) | ? |
21
+ | Module list (if multi-module) | ? |
22
+ | **Response wrapper LAYER** (Controller / Aggregator / Service) | ? |
23
+ | **Response wrapper METHOD** (exact name, e.g. `makeResponse`, `ResponseEntity.ok`) | ? |
24
+ | **Response util class** (exact FQN, e.g. `com.company.util.ApiResponseUtil`) | ? |
25
+ | Exact method names on response util (e.g. `success`, `ok`, `fail` — verbatim) | ? |
26
+ | MyBatis mapper XML path (verbatim, if MyBatis detected) | ? |
27
+ | Aggregator/Orchestrator layer exists? | ? |
28
+ | Aggregator naming convention (e.g. `{Domain}Aggregator`) | ? |
29
+ | Detected domains (flat list) | ? |
30
+ | Per-domain key API methods (terse — 3-5 per domain max) | ? |
31
+ | Base/shared classes (FQN, must not be re-declared) | ? |
32
+ | Shared util package root (e.g. `com.company.shared.util`) | ? |
33
+ | Authentication method (JWT / Session / OAuth2 / etc.) | ? |
34
+
35
+ ## PHASE 2 — Generate Files (using the fact table above)
36
+
37
+ Proceed to generate files based on the instructions below.
38
+
39
+ ### Rule A — Reference, don't re-read
40
+
41
+ Once the fact table is filled in PHASE 1, **DO NOT re-read `pass2-merged.json`
42
+ or `pass3-context.json`**. All cross-file consistency checks must use the
43
+ fact table as the authoritative source.
44
+
45
+ If you find yourself about to `Read pass2-merged.json` again during Phase 2:
46
+ STOP. Reference the fact table. If a detail is missing from the fact table,
47
+ add it to the table ONCE (by reading the relevant JSON file ONCE), then
48
+ reference the table from then on.
49
+
50
+ **Why this matters**: pass2-merged.json on large multi-module projects can be
51
+ 50-500 KB. Re-reading it 10-20 times while generating 30+ files is the #1
52
+ cause of `Prompt is too long` failures in Pass 3. The fact table above is
53
+ your compact in-context cache.
54
+
55
+ ### Rule B — Idempotent file writing (resume-safe)
56
+
57
+ Before writing ANY target file, check whether it already exists:
58
+
59
+ 1. Use the Read tool on the target path.
60
+ 2. If the file EXISTS and has more than 100 characters of real content:
61
+ - Print `[SKIP] <path> — already generated`
62
+ - Proceed to the next target WITHOUT regenerating
63
+ - DO NOT re-read analysis JSON files for a skipped target
64
+ 3. If the file is MISSING or has 100 characters or fewer, generate it fresh.
65
+
66
+ For staged rules (`.claude/rules/*` → `claudeos-core/generated/.staged-rules/*`):
67
+ - Check BOTH the staging path (`claudeos-core/generated/.staged-rules/<subpath>`)
68
+ AND the final path (`.claude/rules/<subpath>`).
69
+ - If EITHER already has content, skip.
70
+
71
+ This makes Pass 3 safely re-runnable after any interruption — a crash or
72
+ timeout at file 31 of 50 does not mean restarting from scratch.
73
+
74
+ ### Rule C — Cross-file consistency via the fact table
75
+
76
+ When generating any file that references another file's contents (e.g.
77
+ `architecture.md` referencing `controller-patterns.md`), use ONLY the values
78
+ from the fact table. Never invent method names, class names, or signatures
79
+ not present in the table.
80
+
81
+ If the fact table says `Response wrapper LAYER = Controller`, then
82
+ `architecture.md`, `controller-patterns.md`, `response-exception.md`,
83
+ `controller-rules.md`, and ALL skills files MUST show Controller wrapping
84
+ the response. Inconsistencies here are the #1 quality complaint in Pass 3
85
+ output — the fact table exists specifically to prevent them.
86
+
87
+ ### Rule D — Output conciseness (prevents context overflow mid-generation)
88
+
89
+ Pass 3 generates 30-50+ files in one session. Every token of narration between
90
+ file writes accumulates in the conversation context and eventually causes
91
+ `Prompt is too long` failures around file 30-40. To prevent this:
92
+
93
+ 1. **Between file writes, output AT MOST one short line** — either
94
+ `[WRITE] <path>` or `[SKIP] <path> — already exists`. No paragraphs,
95
+ no "Now I will generate...", no "This file contains...".
96
+ 2. **Do NOT restate the fact table** between files. It is already in your
97
+ in-context memory from PHASE 1.
98
+ 3. **Do NOT re-explain design decisions** between files. If a decision was
99
+ recorded in the fact table or in an earlier file you wrote this session,
100
+ reference it by name, do not re-derive it.
101
+ 4. **Each file's content itself should be focused** — write what the project
102
+ needs, not exhaustive commentary. If a markdown file would exceed ~300 lines,
103
+ split it by creating additional files with numbered prefixes rather than
104
+ producing one giant file.
105
+ 5. **Do NOT echo file content back in your response after writing.** The Write
106
+ tool confirms success; there is no need to say "I have written the following
107
+ content: ...".
108
+
109
+ The failure mode to avoid: writing file 25, then explaining what you just wrote
110
+ in 200 words, then writing file 26, then explaining again. After 40 files that
111
+ verbose pattern alone adds 15-30K tokens of pure narration — enough to overflow
112
+ context on top of the actual file contents.
113
+
114
+ ### Rule E — Batch idempotent checks at the start
115
+
116
+ Instead of calling `Read` on every target file individually right before
117
+ writing it (which doubles the number of tool calls and accumulates Read
118
+ response content in context), do this ONCE at the start of PHASE 2:
119
+
120
+ 1. Use `Glob` on each output root (`claudeos-core/standard/**/*.md`,
121
+ `.claude/rules/**/*.md`, etc.) to get a single list of already-existing files.
122
+ 2. Keep that list in your working memory alongside the fact table.
123
+ 3. For each target file, check the list (not the filesystem) — if present and
124
+ non-trivially sized, emit `[SKIP]` and move on.
125
+ 4. Only call `Read` on a specific target file if you have a concrete reason
126
+ to inspect its content.
127
+
128
+ Rule E makes Rule B idempotency much cheaper in tool call count and context.
129
+
130
+ ---
131
+
@@ -0,0 +1,143 @@
1
+ ## Pass 3a — FACT EXTRACTION (no file generation yet)
2
+
3
+ This is step 1 of 4 in Pass 3 split mode. Your ONLY task here is to read the
4
+ analysis JSON files and write a single `pass3a-facts.md` summary document.
5
+ **Do NOT generate CLAUDE.md, standard/, rules/, skills/, guide/, or plan/ in
6
+ this step.** Those come in later steps.
7
+
8
+ ## Inputs (read each at most ONCE)
9
+
10
+ 1. `claudeos-core/generated/pass3-context.json` — slim summary (start here)
11
+ 2. `claudeos-core/generated/project-analysis.json` — structured stack/domain data
12
+ 3. `claudeos-core/generated/pass2-merged.json` — full deep-analysis report
13
+
14
+ ## Output
15
+
16
+ Write exactly one file: `claudeos-core/generated/pass3a-facts.md`
17
+
18
+ This file is the authoritative fact sheet that Pass 3b, 3c, and 3d will
19
+ reference. It must be complete enough that the later steps NEVER need to
20
+ re-open pass2-merged.json.
21
+
22
+ Required structure:
23
+
24
+ ```markdown
25
+ # Pass 3 Fact Sheet
26
+
27
+ Generated at: <ISO timestamp>
28
+
29
+ ## Stack
30
+
31
+ - Language: ...
32
+ - Language version: ...
33
+ - Framework: ...
34
+ - Framework version: ...
35
+ - Build tool: ...
36
+ - Package manager: ...
37
+ - Database: ...
38
+ - ORM: ...
39
+ - Frontend: ...
40
+ - Default port: ...
41
+
42
+ ## Architecture
43
+
44
+ - CQRS: yes/no
45
+ - BFF: yes/no
46
+ - DDD (Aggregate Root): yes/no
47
+ - Multi-module: yes/no (if yes, list module names)
48
+ - Monorepo tool: ...
49
+ - Root package: ...
50
+
51
+ ## Response Flow (CRITICAL — used for cross-file consistency)
52
+
53
+ - Wrapper layer: <Controller | Aggregator | Service>
54
+ - Wrapper method: <exact method name, e.g. `makeResponse`>
55
+ - Response util class: <FQN, e.g. `com.company.util.ApiResponseUtil`>
56
+ - Response util methods (exact names): `success`, `fail`, ...
57
+ - ResponseEntity usage pattern: ...
58
+
59
+ ## Aggregator/Orchestrator Layer
60
+
61
+ - Exists: yes/no
62
+ - Naming convention: <e.g. `{Domain}Aggregator`>
63
+ - Return type: <ResponseEntity | DTO | VO>
64
+ - DTO ↔ VO conversion: <MapStruct | extension functions | manual>
65
+ - Dependency rule: <injects Service only | DAO allowed | ...>
66
+
67
+ ## Data Access
68
+
69
+ - ORM approach: ...
70
+ - Repository/Mapper structure: ...
71
+ - MyBatis mapper XML path (verbatim, if applicable): ...
72
+ - Transaction strategy: ...
73
+
74
+ ## Domains
75
+
76
+ List every detected domain with its key controller/service/DTO method names.
77
+ For each domain, list AT MOST 10 method signatures (exact names, not paraphrased).
78
+
79
+ ### <domain-1>
80
+ - Controllers: `MethodA()`, `MethodB()`, ...
81
+ - Services: `doX()`, `doY()`, ...
82
+ - Key DTOs: `XRequest`, `XResponse`, ...
83
+
84
+ ### <domain-2>
85
+ ...
86
+
87
+ ## Shared / Base Classes (must not be re-declared)
88
+
89
+ List FQNs of base classes and key utilities that generated code should
90
+ IMPORT, not redefine.
91
+
92
+ - `com.company.shared.base.BaseEntity`
93
+ - `com.company.shared.util.DateUtils`
94
+ - ...
95
+
96
+ ## Naming Conventions
97
+
98
+ - Class naming: ...
99
+ - Package structure: ...
100
+ - DTO naming: ...
101
+ - URL pattern: ...
102
+ - DB table/column: ...
103
+ - Module naming: ...
104
+
105
+ ## Authentication & Security
106
+
107
+ - Authentication method: <JWT | Session | OAuth2 | ...>
108
+ - Authorization pattern: <@PreAuthorize | SecurityConfig | ...>
109
+ - CORS configuration: ...
110
+
111
+ ## Testing
112
+
113
+ - Test frameworks: ...
114
+ - Test naming convention: ...
115
+ - Mocking library: ...
116
+
117
+ ## Build & Tooling
118
+
119
+ - Gradle/Maven DSL: ...
120
+ - Version catalog usage: ...
121
+ - Lint/format tools: ...
122
+
123
+ ## Anti-patterns Detected (CRITICAL findings only)
124
+
125
+ - ...
126
+ - ...
127
+ ```
128
+
129
+ ## Rules for Pass 3a
130
+
131
+ 1. **Read each input file AT MOST ONCE.** After reading, all fact extraction
132
+ must be from your in-context memory of the file.
133
+ 2. **Be terse.** This document will be loaded into every subsequent Pass 3
134
+ step's context. Keep it under 10 KB. Use bullet lists, not prose.
135
+ 3. **Exact values only.** Every class name, method name, package path, and
136
+ file path must be verbatim from the analysis data. If a value is not
137
+ captured in the analysis, write `(not in analysis)` — do NOT guess.
138
+ 4. **Do NOT write any other files.** CLAUDE.md, standard/, rules/, etc.
139
+ come in later Pass 3 steps. Writing them here is a bug.
140
+ 5. **Do NOT read source code.** All information comes from the three JSON
141
+ inputs. The source has already been analyzed in Pass 1 and Pass 2.
142
+
143
+ Once `pass3a-facts.md` is written, Pass 3a is complete.
@@ -0,0 +1,58 @@
1
+ ## Pass 3b — CLAUDE.md, standards, and rules (core generation)
2
+
3
+ This is step 2 of 4 in Pass 3 split mode. Inputs: the fact sheet you wrote
4
+ in Pass 3a, plus the stack-specific template body below.
5
+
6
+ ## Inputs
7
+
8
+ 1. `claudeos-core/generated/pass3a-facts.md` — the fact sheet from Pass 3a
9
+ **(primary source — reference this for all consistency checks)**
10
+ 2. `claudeos-core/generated/pass3-context.json` — slim structured summary
11
+ 3. **DO NOT re-read** `pass2-merged.json` or `project-analysis.json`.
12
+ All facts you need are in `pass3a-facts.md`. Re-reading the full analysis
13
+ files during this step is the primary cause of context overflow.
14
+
15
+ ## Scope of this step
16
+
17
+ Generate ONLY the following output categories:
18
+
19
+ - `CLAUDE.md` (project root)
20
+ - `claudeos-core/standard/` — all standard files per active domains
21
+ - `.claude/rules/` — all rule files (via staging directory, see staging-override)
22
+
23
+ **Do NOT generate in this step**:
24
+ - `claudeos-core/skills/` (Pass 3c)
25
+ - `claudeos-core/guide/` (Pass 3c)
26
+ - `claudeos-core/plan/` (Pass 3d)
27
+ - `claudeos-core/database/` (Pass 3d)
28
+ - `claudeos-core/mcp-guide/` (Pass 3d)
29
+
30
+ ## Idempotent writes (resume-safe)
31
+
32
+ Before writing each file:
33
+
34
+ 1. Use the Read tool to check if the target file exists.
35
+ 2. If it EXISTS with more than 100 characters of real content:
36
+ - Print `[SKIP] <path>`
37
+ - Proceed to next target WITHOUT regenerating
38
+ 3. If MISSING or <=100 characters, generate fresh using the fact sheet.
39
+
40
+ For staged rules, check BOTH:
41
+ - `claudeos-core/generated/.staged-rules/<subpath>` (staging)
42
+ - `.claude/rules/<subpath>` (final — moved by orchestrator after this step)
43
+
44
+ If either has content, skip.
45
+
46
+ ## Cross-file consistency
47
+
48
+ Every claim about response flow, method names, class names, or file paths
49
+ MUST match the fact sheet exactly. If `pass3a-facts.md` says
50
+ `Wrapper layer: Controller`, then `architecture.md`,
51
+ `controller-patterns.md`, `response-exception.md`, and
52
+ `controller-rules.md` MUST all show Controller wrapping the response.
53
+
54
+ ---
55
+
56
+ Below is the stack-specific generation guide. Apply these instructions within
57
+ the scope defined above.
58
+
@@ -0,0 +1,53 @@
1
+ ## Pass 3c — Skills and Guides
2
+
3
+ This is step 3 of 4 in Pass 3 split mode.
4
+
5
+ ## Inputs
6
+
7
+ 1. `claudeos-core/generated/pass3a-facts.md` — **authoritative fact sheet**
8
+ 2. `claudeos-core/generated/pass3-context.json` — slim structured summary
9
+ 3. Already-generated files (for consistency reference, read on-demand ONLY):
10
+ - `CLAUDE.md`
11
+ - `claudeos-core/standard/**/*.md`
12
+ - `.claude/rules/**/*.md`
13
+
14
+ **DO NOT re-read** `pass2-merged.json` or `project-analysis.json`.
15
+ Read generated standards/rules only when you need to cite a specific
16
+ section name or file path in a skill or guide.
17
+
18
+ ## Scope of this step
19
+
20
+ Generate ONLY:
21
+
22
+ - `claudeos-core/skills/` — orchestrator skill + sub-skills
23
+ - `10.backend-crud/scaffold-crud-feature/` (if backend present)
24
+ - `20.frontend-page/scaffold-page-feature/` (if frontend present)
25
+ - `50.testing/` (if applicable)
26
+ - `00.shared/` (shared skills)
27
+ - `claudeos-core/guide/` — all 9 expected guide files:
28
+ - `01.onboarding/*.md`
29
+ - `02.usage/*.md`
30
+ - `03.troubleshooting/*.md`
31
+ - `04.architecture/*.md`
32
+
33
+ ## Idempotent writes
34
+
35
+ Same rule as Pass 3b: Read the target first, skip if exists with >100 chars.
36
+ Skills with sub-skills: check both the orchestrator `SKILL.md` AND each
37
+ sub-skill `SKILL.md` file independently.
38
+
39
+ ## Cross-file consistency
40
+
41
+ Skills generate code templates (scaffold outputs). These templates MUST
42
+ use EXACT class/method names from the fact sheet. If a scaffold-crud-feature
43
+ generates a controller stub, that stub's response handling MUST match
44
+ the wrapper layer recorded in `pass3a-facts.md`.
45
+
46
+ Guide files reference standards and rules. Use the standards/rules file
47
+ paths and section headings that were actually written by Pass 3b —
48
+ read those files if needed to cite accurately. Do NOT invent section names.
49
+
50
+ ---
51
+
52
+ Below is the stack-specific generation guide for skills and guides:
53
+
@@ -0,0 +1,57 @@
1
+ ## Pass 3d — Auxiliary Documentation (database + mcp-guide)
2
+
3
+ This is step 4 of 4 in Pass 3 split mode (final step).
4
+
5
+ Master plan aggregation (previously steps 3d-standard / 3d-rules / 3d-skills /
6
+ 3d-guide) was removed because master plans are an internal tool backup not
7
+ consumed by Claude Code at runtime, and aggregating many files in a single
8
+ session was the primary source of `Prompt is too long` failures on mid-sized
9
+ projects. The remaining 3d work is limited to two auxiliary directories.
10
+
11
+ ## Inputs
12
+
13
+ 1. `claudeos-core/generated/pass3a-facts.md` — **authoritative fact sheet**
14
+ 2. `claudeos-core/generated/pass3-context.json` — slim structured summary
15
+
16
+ **DO NOT re-read** `pass2-merged.json` or `project-analysis.json`.
17
+
18
+ **DO NOT re-read** files generated by Pass 3b/3c unless a specific section
19
+ below asks for it. The facts you need are already in `pass3a-facts.md`.
20
+
21
+ ## Scope of this step
22
+
23
+ Generate ONLY:
24
+
25
+ - `claudeos-core/database/` — schema docs and SQL reference
26
+ (only if `pass3a-facts.md` shows a database was detected; otherwise write
27
+ a single `README.md` stub explaining no database was detected, then stop)
28
+ - `claudeos-core/mcp-guide/` — MCP integration guide
29
+ (only if the stack has relevant MCP server suggestions; otherwise write
30
+ a single `README.md` stub, then stop)
31
+
32
+ **DO NOT generate `claudeos-core/plan/` or any `*-master.md` files.** Master
33
+ plan generation was removed. If a `plan/` directory exists from a previous
34
+ run, leave it untouched (Rule B idempotency).
35
+
36
+ ## Idempotent writes
37
+
38
+ Same rule as Pass 3b/3c: before writing `database/**/*.md` or
39
+ `mcp-guide/**/*.md`, read the file first. If it exists with substantive
40
+ content (> 100 chars after trim), skip and print `[SKIP] <path>`.
41
+
42
+ ## Output completeness
43
+
44
+ After this step, the following must exist:
45
+
46
+ - `claudeos-core/database/` with at least one `.md` file (README.md stub is
47
+ acceptable when no database was detected).
48
+ - `claudeos-core/mcp-guide/` with at least one `.md` file (README.md stub is
49
+ acceptable when no relevant MCP integration applies).
50
+
51
+ Both directories are "best-effort" — their absence is a warning, not a
52
+ failure.
53
+
54
+ ---
55
+
56
+ Below is the stack-specific generation guide for database and MCP:
57
+
@@ -190,20 +190,9 @@ Proposals with confidence >= 0.70 deserve serious consideration. Do NOT edit pro
190
190
 
191
191
  ---
192
192
 
193
- ## Required output — Master plan (`{{PROJECT_ROOT}}/claudeos-core/plan/`)
194
-
195
- ### 11. `plan/50.memory-master.md`
196
- Master plan aggregating all 4 memory files using the `<file path="...">` format.
197
- Include the full content of each memory file (including the seed decision-log entries
198
- and project-specific compaction categories).
199
-
200
- Write the plan's **title** (e.g., `# 50. Memory Master Plan`) and any **introductory sentence** before the `<file>` blocks in **{{LANG_NAME}}**. Inside each `<file path="...">` block, include the already-translated memory file content verbatim — do NOT re-translate or modify it.
201
-
202
- ---
203
-
204
193
  ## Required output — CLAUDE.md append
205
194
 
206
- ### 12. Append a new section to existing `CLAUDE.md`
195
+ ### 11. Append a new section to existing `CLAUDE.md`
207
196
 
208
197
  Do NOT overwrite existing CLAUDE.md content — **append only** at the end.
209
198
  The new section must include the `(L4)` marker in its top heading (the marker
@@ -214,7 +203,6 @@ Include:
214
203
  - Common rules table (references to `00.core/51.doc-writing-rules.md` and `52.ai-work-rules.md`)
215
204
  - L4 Memory table with 4 files (decision-log, failure-patterns, compaction, auto-rule-update)
216
205
  — include Purpose and Action columns
217
- - Master plan reference (`claudeos-core/plan/50.memory-master.md`)
218
206
  - Memory workflow (6 numbered steps: scan failure-patterns at session start →
219
207
  skim recent decision-log → record decisions → record repeat errors →
220
208
  periodic `memory compact` → review `auto-rule-update.md` proposals)
@@ -226,7 +214,7 @@ file paths, and CLI command names in English.
226
214
 
227
215
  ## Required output — Standard (`{{PROJECT_ROOT}}/claudeos-core/standard/00.core/`)
228
216
 
229
- ### 13. `claudeos-core/standard/00.core/XX.doc-writing-guide.md`
217
+ ### 12. `claudeos-core/standard/00.core/XX.doc-writing-guide.md`
230
218
  Scan `claudeos-core/standard/00.core/` for existing numbered files. Use the **next sequential number**
231
219
  (e.g., if `01`, `02`, `03` exist, create `04.doc-writing-guide.md`).
232
220
 
@@ -234,7 +222,7 @@ This is the **detailed guide** corresponding to `.claude/rules/00.core/51.doc-wr
234
222
  Write entirely in **{{LANG_NAME}}**.
235
223
 
236
224
  Body must cover:
237
- 1. **Document layer structure** — table with Layer/Path/Role/Loading for CLAUDE.md, Rules, Standard, Skills, Memory, Master Plan. Include a relationship diagram showing CLAUDE.md → Rules → Standard flow.
225
+ 1. **Document layer structure** — table with Layer/Path/Role/Loading for CLAUDE.md, Rules, Standard, Skills, Memory. Include a relationship diagram showing CLAUDE.md → Rules → Standard flow.
238
226
  2. **Rules file writing rules** — paths frontmatter required, paths scope settings table, file structure template with `## Reference` section. Do not propose narrowing `**/*`.
239
227
  3. **Standard file writing rules** — long files are normal, file naming (`number.name.md`), register in `00.standard-reference.md`.
240
228
  4. **Skills file writing rules** — MANIFEST.md registration, paths frontmatter in generated rules, verify reference paths.
@@ -244,7 +232,7 @@ Body must cover:
244
232
  8. **No domain-specific hardcoding** — use generic placeholder patterns.
245
233
  9. **No system absolute path hardcoding** — use relative paths, include ❌/✅ examples.
246
234
  10. **Code examples must follow project conventions** — verify directory structure, follow project naming conventions.
247
- 11. **Change synchronization procedure** — table showing Standard→Rules+Plan, Rules→Plan, Skills→MANIFEST+Plan sync targets.
235
+ 11. **Change synchronization procedure** — table showing Standard→Rules, Rules→Standard (verify `## Reference` link), Skills→MANIFEST sync targets.
248
236
 
249
237
  ---
250
238
 
@@ -272,9 +260,6 @@ After all files are written, create:
272
260
  ".claude/rules/60.memory/03.compaction.md",
273
261
  ".claude/rules/60.memory/04.auto-rule-update.md"
274
262
  ],
275
- "planFiles": [
276
- "claudeos-core/plan/50.memory-master.md"
277
- ],
278
263
  "standardFiles": [
279
264
  "claudeos-core/standard/00.core/XX.doc-writing-guide.md"
280
265
  ],
@@ -139,7 +139,6 @@ Generation targets:
139
139
  - claudeos-core/standard/50.verification/01.development-verification.md
140
140
  - claudeos-core/standard/50.verification/02.testing-strategy.md
141
141
  ## DO NOT Read (context waste)
142
- - claudeos-core/plan/ — Master Plan backup files. Never read during coding.
143
142
  - claudeos-core/generated/ — Build metadata. Not for coding reference.
144
143
  - claudeos-core/guide/ — Onboarding/usage guides for humans. Not for coding reference.
145
144
  - claudeos-core/mcp-guide/ — MCP server integration docs. Not for coding reference.
@@ -148,9 +147,9 @@ Generation targets:
148
147
 
149
148
  4. .claude/rules/50.sync/ (3 sync rules — AI fallback reminders)
150
149
  - NOTE: These rules remind AI to run `npx claudeos-core refresh` after modifying standard/rules/skills files.
151
- - 01.standard-sync.md — Remind AI to update plan/10 when standard is modified
152
- - 02.rules-sync.md — Remind AI to update plan/20 when rules are modified
153
- - 03.skills-sync.md — Remind AI to update plan/30 when skills are modified
150
+ - 01.standard-sync.md — Remind AI to update corresponding rule when standard is modified
151
+ - 02.rules-sync.md — Remind AI to update corresponding standard when rules are modified
152
+ - 03.skills-sync.md — Remind AI to update MANIFEST.md when skills are modified
154
153
 
155
154
  5. claudeos-core/skills/ (active domains only)
156
155
  - 10.backend-crud/01.scaffold-crud-feature.md (orchestrator)
@@ -168,18 +167,9 @@ Generation targets:
168
167
  - 03.troubleshooting/01.troubleshooting.md
169
168
  - 04.architecture/01.file-map.md
170
169
  - 04.architecture/02.pros-and-cons.md
171
-
172
- 7. claudeos-core/plan/ (Master Plan — insert full file content in <file> blocks)
173
- - 10.standard-master.md — CLAUDE.md + all standard/ files as <file> blocks
174
- - 20.rules-master.md — All rules/ (except sync) as <file> blocks
175
- - 21.sync-rules-master.md — All sync rules (code block format)
176
- - 30.backend-skills-master.md — All backend skills as <file> blocks
177
- - 31.frontend-skills-master.md — All frontend skills as <file> blocks (if frontend detected)
178
- - 40.guides-master.md — All guide/ files as <file> blocks
179
-
180
- 8. claudeos-core/database/ (DB documentation)
170
+ 7. claudeos-core/database/ (DB documentation)
181
171
  - 01.schema-overview.md — Table list, ER diagram description
182
172
  - 02.migration-guide.md — Migration procedure, rollback methods
183
173
 
184
- 9. claudeos-core/mcp-guide/ (MCP server integration guide)
174
+ 8. claudeos-core/mcp-guide/ (MCP server integration guide)
185
175
  - 01.mcp-overview.md — List of MCP servers in use, integration methods
@@ -144,7 +144,6 @@ Generation targets:
144
144
  - claudeos-core/standard/50.verification/01.development-verification.md
145
145
  - claudeos-core/standard/50.verification/02.testing-strategy.md
146
146
  ## DO NOT Read (context waste)
147
- - claudeos-core/plan/ — Master Plan backup files. Never read during coding.
148
147
  - claudeos-core/generated/ — Build metadata. Not for coding reference.
149
148
  - claudeos-core/guide/ — Onboarding/usage guides for humans. Not for coding reference.
150
149
  - claudeos-core/mcp-guide/ — MCP server integration docs. Not for coding reference.
@@ -153,9 +152,9 @@ Generation targets:
153
152
 
154
153
  4. .claude/rules/50.sync/ (3 sync rules — AI fallback reminders)
155
154
  - NOTE: These rules remind AI to run `npx claudeos-core refresh` after modifying standard/rules/skills files.
156
- - 01.standard-sync.md — Remind AI to update plan/10 when standard is modified
157
- - 02.rules-sync.md — Remind AI to update plan/20 when rules is modified
158
- - 03.skills-sync.md — Remind AI to update plan/30 when skills is modified
155
+ - 01.standard-sync.md — Remind AI to update corresponding rule when standard is modified
156
+ - 02.rules-sync.md — Remind AI to update corresponding standard when rules are modified
157
+ - 03.skills-sync.md — Remind AI to update MANIFEST.md when skills are modified
159
158
 
160
159
  5. claudeos-core/skills/ (active domains only)
161
160
  - 10.backend-crud/01.scaffold-crud-feature.md (orchestrator — CQRS-aware: creates both command and query modules)
@@ -185,18 +184,9 @@ Generation targets:
185
184
  - 03.troubleshooting/01.troubleshooting.md
186
185
  - 04.architecture/01.file-map.md (show all modules and their relationships)
187
186
  - 04.architecture/02.pros-and-cons.md
188
-
189
- 7. claudeos-core/plan/ (Master Plan — insert full file content in <file> blocks)
190
- - 10.standard-master.md — CLAUDE.md + all standard/ files as <file> blocks
191
- - 20.rules-master.md — All rules/ (except sync) as <file> blocks
192
- - 21.sync-rules-master.md — All sync rules (code block format)
193
- - 30.backend-skills-master.md — All backend skills as <file> blocks
194
- - 31.frontend-skills-master.md — All frontend skills as <file> blocks (if frontend detected)
195
- - 40.guides-master.md — All guide/ files as <file> blocks
196
-
197
- 8. claudeos-core/database/ (DB documentation)
187
+ 7. claudeos-core/database/ (DB documentation)
198
188
  - 01.schema-overview.md — Table list, ER diagram description, read/write DB separation
199
189
  - 02.migration-guide.md — Migration procedure, rollback methods
200
190
 
201
- 9. claudeos-core/mcp-guide/ (MCP server integration guide)
191
+ 8. claudeos-core/mcp-guide/ (MCP server integration guide)
202
192
  - 01.mcp-overview.md — List of MCP servers in use, integration methods
@@ -115,7 +115,6 @@ Generation targets:
115
115
  - claudeos-core/standard/50.verification/01.development-verification.md
116
116
  - claudeos-core/standard/50.verification/02.testing-strategy.md
117
117
  ## DO NOT Read (context waste)
118
- - claudeos-core/plan/ — Master Plan backup files. Never read during coding.
119
118
  - claudeos-core/generated/ — Build metadata. Not for coding reference.
120
119
  - claudeos-core/guide/ — Onboarding/usage guides for humans. Not for coding reference.
121
120
  - claudeos-core/mcp-guide/ — MCP server integration docs. Not for coding reference.
@@ -124,9 +123,9 @@ Generation targets:
124
123
 
125
124
  4. .claude/rules/50.sync/ (3 sync rules — AI fallback reminders)
126
125
  - NOTE: These rules remind AI to run `npx claudeos-core refresh` after modifying standard/rules/skills files.
127
- - 01.standard-sync.md — Remind AI to update plan/10 when standard is modified
128
- - 02.rules-sync.md — Remind AI to update plan/20 when rules is modified
129
- - 03.skills-sync.md — Remind AI to update plan/30 when skills is modified
126
+ - 01.standard-sync.md — Remind AI to update corresponding rule when standard is modified
127
+ - 02.rules-sync.md — Remind AI to update corresponding standard when rules are modified
128
+ - 03.skills-sync.md — Remind AI to update MANIFEST.md when skills are modified
130
129
 
131
130
  5. claudeos-core/skills/ (active domains only)
132
131
  - 10.backend-crud/01.scaffold-crud-feature.md (orchestrator)
@@ -143,17 +142,9 @@ Generation targets:
143
142
  - 03.troubleshooting/01.troubleshooting.md
144
143
  - 04.architecture/01.file-map.md
145
144
  - 04.architecture/02.pros-and-cons.md
146
-
147
- 7. claudeos-core/plan/ (Master Plan)
148
- - 10.standard-master.md — CLAUDE.md + all standard/ files as <file> blocks
149
- - 20.rules-master.md — All rules/ (except sync) as <file> blocks
150
- - 21.sync-rules-master.md — All sync rules (code block format)
151
- - 30.backend-skills-master.md — All backend skills as <file> blocks
152
- - 40.guides-master.md — All guide/ files as <file> blocks
153
-
154
- 8. claudeos-core/database/
145
+ 7. claudeos-core/database/
155
146
  - 01.schema-overview.md — Table/collection list, relationship description
156
147
  - 02.migration-guide.md — Migration procedure, rollback methods
157
148
 
158
- 9. claudeos-core/mcp-guide/
149
+ 8. claudeos-core/mcp-guide/
159
150
  - 01.mcp-overview.md — List of MCP servers in use, integration methods
@@ -97,17 +97,9 @@ Generation targets:
97
97
  - 03.troubleshooting/01.troubleshooting.md
98
98
  - 04.architecture/01.file-map.md
99
99
  - 04.architecture/02.pros-and-cons.md
100
-
101
- 7. claudeos-core/plan/ (Master Plan)
102
- - 10.standard-master.md
103
- - 20.rules-master.md
104
- - 21.sync-rules-master.md
105
- - 30.backend-skills-master.md
106
- - 40.guides-master.md
107
-
108
- 8. claudeos-core/database/
100
+ 7. claudeos-core/database/
109
101
  - 01.schema-overview.md
110
102
  - 02.migration-guide.md
111
103
 
112
- 9. claudeos-core/mcp-guide/
104
+ 8. claudeos-core/mcp-guide/
113
105
  - 01.mcp-overview.md