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
package/CHANGELOG.md CHANGED
@@ -1,5 +1,213 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.1.1] — 2026-04-20
4
+
5
+ Docs-only maintenance release. No runtime behavior or API changes.
6
+
7
+ ### Changed
8
+
9
+ - **README: dropped `What's New in v2.1.0` section** from all 10 language
10
+ READMEs (`README.md`, `README.ko.md`, `README.ja.md`, `README.zh-CN.md`,
11
+ `README.es.md`, `README.vi.md`, `README.hi.md`, `README.ru.md`,
12
+ `README.fr.md`, `README.de.md`). Post-release cleanup — the section's
13
+ job is done once the release ships, and the same content is preserved
14
+ in `CHANGELOG.md` for anyone who wants the historical detail.
15
+
16
+ - **README: dropped the `Real production case: 18-domain admin frontend
17
+ (2026-04-20)` subsection** under _Auto-scaling by Project Size_ across
18
+ all 10 language READMEs. The per-stage breakdown table (9 rows) and its
19
+ surrounding prose are removed. The trailing empirical reference in the
20
+ FAQ "What is Pass 3 split mode" answer (the `Empirically verified up
21
+ to 18 domains × 101 files × 102 minutes …` sentence with its now-dead
22
+ link) is also removed so no orphan reference remains.
23
+
24
+ ### Notes
25
+
26
+ - Each README drops ~33 lines; total net change across translations is
27
+ ~330 lines removed. No code, tests, prompts, or generated artifacts
28
+ are touched — `npm pack` contents are identical to v2.1.0 apart from
29
+ the README files and `package.json`/`package-lock.json` version bump.
30
+
31
+ ---
32
+
33
+ ## [2.1.0] — 2026-04-20
34
+
35
+ This release addresses the primary cause of `Prompt is too long` failures in
36
+ Pass 3 on large multi-module projects. The fix is structural: Pass 3 is
37
+ re-architected into multiple sequential `claude -p` calls with fresh context
38
+ each, so output-accumulation overflow is no longer possible regardless of
39
+ project size.
40
+
41
+ ### Added
42
+
43
+ - **Phase 1 "Read Once, Extract Facts" prompt block** (always on). A new
44
+ common block `pass-prompts/templates/common/pass3-phase1.md` is prepended
45
+ to every generated `pass3-prompt.md`. It instructs Claude to read
46
+ `pass2-merged.json` exactly once into a compact in-context fact table and
47
+ reference that table for all subsequent file generation. The block defines
48
+ five rules:
49
+ - **Rule A** — Reference the fact table, don't re-read pass2-merged.json.
50
+ - **Rule B** — Idempotent file writing (skip if target exists with real
51
+ content), making Pass 3 safely re-runnable after interruption.
52
+ - **Rule C** — Cross-file consistency enforced via the fact table as
53
+ single source of truth.
54
+ - **Rule D** — Output conciseness: one line (`[WRITE]`/`[SKIP]`) between
55
+ file writes, no restating the fact table, no echoing file content.
56
+ Addresses output-accumulation overflow where verbose narration between
57
+ 30-50 files adds 15-30K tokens of pure accumulation.
58
+ - **Rule E** — Batch idempotent check: one `Glob` at PHASE 2 start
59
+ instead of per-target `Read` calls.
60
+
61
+ - **`pass3-context.json` slim summary builder** (always on). A new file
62
+ `claudeos-core/generated/pass3-context.json` is built after Pass 2 from
63
+ `project-analysis.json` plus `pass2-merged.json` signals (size, top-level
64
+ keys). Stays under 5 KB even for large projects vs. `pass2-merged.json`
65
+ which can exceed 500 KB. Pass 3 prompts reference this as the preferred
66
+ entry point, falling back to `pass2-merged.json` only for specific
67
+ details (response wrapper method, util class FQN, MyBatis mapper path).
68
+ Emits a warning when `pass2-merged.json` exceeds 300 KB.
69
+
70
+ - **Batch sub-division for large projects** (automatic, ≥16 domains).
71
+ Stages 3b and 3c are sub-divided into batches of 15 domains each,
72
+ preceded by dedicated `3b-core` / `3c-core` stages that handle
73
+ project-wide common files. Ensures no single stage generates more than
74
+ ~50 files, keeping output within the empirical safe range on projects
75
+ up to 100+ domains. Batch count is `ceil(totalDomains / 15)`; domain
76
+ order comes from `domain-groups.json` (size-balanced by plan-installer).
77
+
78
+ - **Split-mode partial marker protection**. `pass3-complete.json` gains
79
+ `mode: "split"` and `groupsCompleted` array. A run that completes 3a+3b
80
+ and crashes during 3c leaves a partial marker; on re-run, the stale-check
81
+ detects the partial-marker shape and defers to the split runner's resume
82
+ logic instead of deleting the marker — otherwise the run would restart
83
+ from 3a and double the token cost.
84
+
85
+ - **7 regression tests** pinning the master plan no-op contract
86
+ (`tests/master-plan-removal.test.js`).
87
+
88
+ - **`scaffoldSkillsManifest` gap-fill for Pass 4**. Auto-creates
89
+ `claudeos-core/skills/00.shared/MANIFEST.md` with a minimal stub if
90
+ Pass 3c omits it (the stack pass3.md templates list it among targets but
91
+ without REQUIRED marking, so skill-sparse projects sometimes ended up
92
+ with `.claude/rules/50.sync/03.skills-sync.md` pointing at a
93
+ non-existent file). Idempotent: skips if the file already has real
94
+ content (>20 chars).
95
+
96
+ ### Changed
97
+
98
+ - **Pass 3 now always runs in split mode.** Each stage starts with a fresh
99
+ context window; cross-stage consistency is preserved by `pass3a-facts.md`.
100
+ No user-facing configuration — applies to every `npx claudeos-core init`
101
+ run automatically.
102
+
103
+ Stage structure:
104
+ - **3a** — Read analysis files once, write `pass3a-facts.md` (5-10 KB
105
+ distilled fact sheet).
106
+ - **3b** — Generate `CLAUDE.md`, `standard/`, and `.claude/rules/`.
107
+ Sub-divided into `3b-core` + `3b-1..N` on projects with ≥16 domains.
108
+ - **3c** — Generate `skills/` and `guide/`. Sub-divided into `3c-core`
109
+ + `3c-1..N` on projects with ≥16 domains.
110
+ - **3d-aux** — Generate `database/` + `mcp-guide/` stubs.
111
+
112
+ Single-batch projects keep flat `"3b"`/`"3c"` marker names
113
+ (backward-compatible); multi-batch projects use `"3b-core"`, `"3b-1"`,
114
+ etc. Resume works at stage granularity.
115
+
116
+ - **Stage count by project size** (1–15 domains: 4 stages; 16–30: 8; 31–45:
117
+ 10; 46–60: 12; 61–75: 14; 91–105: 18).
118
+
119
+ - `package-lock.json` synced to `2.1.0`. The v2.0.2 release had a stale
120
+ lockfile at `2.0.0` which caused `npm ci` to fail lockfile integrity
121
+ checks.
122
+
123
+ ### Removed
124
+
125
+ - **Master plan generation** (`claudeos-core/plan/*-master.md` files).
126
+ Master plans were an internal tool backup not consumed by Claude Code
127
+ at runtime, and aggregating many files in a single Pass 3d session was
128
+ a primary source of `Prompt is too long` failures on mid-sized projects.
129
+ Claude Code runtime is unaffected — it reads `CLAUDE.md` + `rules/`
130
+ directly. Use `git` for backup/restore instead.
131
+
132
+ - **Pass 3d sub-stages `3d-standard` / `3d-rules` / `3d-skills` /
133
+ `3d-guide`**. Only `3d-aux` (database + mcp-guide stubs) remains as a
134
+ fixed-size task independent of domain count.
135
+
136
+ - **`CLAUDEOS_PASS3_SPLIT` environment variable and single-call mode.**
137
+ Single-call had failed reliably on projects with more than ~5 domains
138
+ because output-accumulation overflow is not predictable from input size.
139
+ Split mode is structurally immune and is now the only supported path.
140
+
141
+ - **`claudeos-core/plan/` directory creation in `init`**. Directory is no
142
+ longer created during bootstrap (honors the master-plan-removal contract).
143
+
144
+ ### Deprecated
145
+
146
+ - `scaffoldMasterPlans` in `lib/memory-scaffold.js` is kept as a
147
+ backward-compatible no-op (returns `[]`, writes nothing). External
148
+ callers keep working; no files are produced.
149
+
150
+ ### Fixed
151
+
152
+ - `bootstrap.sh` line endings normalized from CRLF to LF. v2.0.2 shipped
153
+ with CRLF which caused immediate `syntax error` on macOS/Linux when
154
+ invoked via `bash claudeos-core-tools/bootstrap.sh`.
155
+
156
+ - `pass3-context-builder.js`: removed unused `p2Size` placeholder variable
157
+ (refactoring leftover, no behavior change).
158
+
159
+ - `init.js`: Pass 4 progress ticker `totalExpected` corrected from 6 to 5
160
+ to reflect master plan removal. The 6th slot was counting
161
+ `plan/50.memory-master.md` which is no longer generated, making the
162
+ progress bar appear stuck at 83% until the run completed.
163
+
164
+ - `manifest-generator`: removed stale `plan-manifest.json` generation.
165
+ Master plans were removed in v2.1.0; a manifest with an empty `plans`
166
+ array (62 B) was noise. Nothing reads it, nothing validates it.
167
+ `sync-map.json` is retained (with empty `mappings`) for
168
+ `sync-checker` backward compatibility.
169
+
170
+ - `plan-validator`: `plan-sync-status.json` is now skipped when the
171
+ `plan/` directory is absent or empty. Previously wrote a 147 B
172
+ all-zeros status file on every health check for master-plan-free
173
+ projects. `stale-report.json` still records a passing no-op so
174
+ `health-checker` reports a clean result.
175
+
176
+ - `plan-parser` placeholder filtering regression in sync-checker
177
+ on projects with `<...>` style tokens in plan files.
178
+
179
+ - `cli.js`: `npx claudeos-core memory --help` now displays the memory
180
+ subcommand help instead of the top-level usage. `parseArgs` previously
181
+ promoted `--help` to a top-level command even when it appeared after a
182
+ command name, so `memory --help` was indistinguishable from `--help`
183
+ alone. The fix: `--help` only becomes the top-level command when no
184
+ other command has been seen yet. `memory --help`, `memory -h` now
185
+ route to the subcommand's own help.
186
+
187
+ - `memory score`: the first `score` run no longer leaves two `importance`
188
+ lines in each entry. The previous implementation inserted the
189
+ auto-scored line at the top but left the user's original
190
+ `- importance: N` line below it, producing a file with two conflicting
191
+ values per entry. `cmdScore` now strips every importance line
192
+ (bold or plain) before inserting the new auto-scored line, so there is
193
+ always exactly one importance line per entry and repeated `score` runs
194
+ remain idempotent.
195
+
196
+ - `memory compact`: the Stage 1 summary marker is now a proper markdown
197
+ list item (`- _Summarized on YYYY-MM-DD — original body dropped._`).
198
+ Previously the marker was emitted as a bare italic string without the
199
+ `- ` prefix, which broke the surrounding list in markdown renderers
200
+ and caused `parseEntries` to misclassify it on subsequent compactions.
201
+ The default `fixLine` fallback was also updated to `- (fix omitted)`
202
+ for the same consistency reason.
203
+
204
+ ### Test coverage
205
+
206
+ - 563 tests pass, 0 skip (3 runs confirmed no flakes). +165 tests vs v2.0.0
207
+ across Pass 3 context builder, output accumulation, batch subdivision,
208
+ master plan removal, scaffoldSkillsManifest, and memory score/compact
209
+ formatting regression suites.
210
+
3
211
  ## [2.0.2] — 2026-04-20
4
212
 
5
213
  ### Fixed