claudeos-core 2.0.1 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +188 -0
- package/README.de.md +994 -880
- package/README.es.md +993 -880
- package/README.fr.md +993 -880
- package/README.hi.md +993 -880
- package/README.ja.md +993 -880
- package/README.ko.md +159 -47
- package/README.md +159 -46
- package/README.ru.md +993 -880
- package/README.vi.md +161 -48
- package/README.zh-CN.md +992 -880
- package/bin/cli.js +7 -2
- package/bin/commands/init.js +775 -147
- package/bin/commands/memory.js +17 -5
- package/bootstrap.sh +81 -81
- package/lib/expected-outputs.js +6 -7
- package/lib/memory-scaffold.js +84 -46
- package/lib/plan-parser.js +12 -0
- package/manifest-generator/index.js +16 -18
- package/package.json +1 -1
- package/pass-prompts/templates/angular/pass3.md +2 -10
- package/pass-prompts/templates/common/pass3-phase1.md +131 -0
- package/pass-prompts/templates/common/pass3a-facts.md +143 -0
- package/pass-prompts/templates/common/pass3b-core-header.md +58 -0
- package/pass-prompts/templates/common/pass3c-skills-guide-header.md +53 -0
- package/pass-prompts/templates/common/pass3d-plan-aux-header.md +57 -0
- package/pass-prompts/templates/common/pass4.md +4 -19
- package/pass-prompts/templates/java-spring/pass3.md +5 -15
- package/pass-prompts/templates/kotlin-spring/pass3.md +5 -15
- package/pass-prompts/templates/node-express/pass3.md +5 -14
- package/pass-prompts/templates/node-fastify/pass3.md +2 -10
- package/pass-prompts/templates/node-nestjs/pass3.md +5 -13
- package/pass-prompts/templates/node-nextjs/pass3.md +5 -14
- package/pass-prompts/templates/node-vite/pass3.md +95 -103
- package/pass-prompts/templates/python-django/pass3.md +5 -14
- package/pass-prompts/templates/python-fastapi/pass3.md +5 -14
- package/pass-prompts/templates/python-flask/pass3.md +95 -103
- package/pass-prompts/templates/vue-nuxt/pass3.md +2 -10
- package/plan-installer/pass3-context-builder.js +258 -0
- package/plan-installer/prompt-generator.js +9 -1
- package/plan-validator/index.js +23 -8
- package/sync-checker/index.js +44 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,193 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.1.0] — 2026-04-20
|
|
4
|
+
|
|
5
|
+
This release addresses the primary cause of `Prompt is too long` failures in
|
|
6
|
+
Pass 3 on large multi-module projects. The fix is structural: Pass 3 is
|
|
7
|
+
re-architected into multiple sequential `claude -p` calls with fresh context
|
|
8
|
+
each, so output-accumulation overflow is no longer possible regardless of
|
|
9
|
+
project size.
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- **Phase 1 "Read Once, Extract Facts" prompt block** (always on). A new
|
|
14
|
+
common block `pass-prompts/templates/common/pass3-phase1.md` is prepended
|
|
15
|
+
to every generated `pass3-prompt.md`. It instructs Claude to read
|
|
16
|
+
`pass2-merged.json` exactly once into a compact in-context fact table and
|
|
17
|
+
reference that table for all subsequent file generation. The block defines
|
|
18
|
+
five rules:
|
|
19
|
+
- **Rule A** — Reference the fact table, don't re-read pass2-merged.json.
|
|
20
|
+
- **Rule B** — Idempotent file writing (skip if target exists with real
|
|
21
|
+
content), making Pass 3 safely re-runnable after interruption.
|
|
22
|
+
- **Rule C** — Cross-file consistency enforced via the fact table as
|
|
23
|
+
single source of truth.
|
|
24
|
+
- **Rule D** — Output conciseness: one line (`[WRITE]`/`[SKIP]`) between
|
|
25
|
+
file writes, no restating the fact table, no echoing file content.
|
|
26
|
+
Addresses output-accumulation overflow where verbose narration between
|
|
27
|
+
30-50 files adds 15-30K tokens of pure accumulation.
|
|
28
|
+
- **Rule E** — Batch idempotent check: one `Glob` at PHASE 2 start
|
|
29
|
+
instead of per-target `Read` calls.
|
|
30
|
+
|
|
31
|
+
- **`pass3-context.json` slim summary builder** (always on). A new file
|
|
32
|
+
`claudeos-core/generated/pass3-context.json` is built after Pass 2 from
|
|
33
|
+
`project-analysis.json` plus `pass2-merged.json` signals (size, top-level
|
|
34
|
+
keys). Stays under 5 KB even for large projects vs. `pass2-merged.json`
|
|
35
|
+
which can exceed 500 KB. Pass 3 prompts reference this as the preferred
|
|
36
|
+
entry point, falling back to `pass2-merged.json` only for specific
|
|
37
|
+
details (response wrapper method, util class FQN, MyBatis mapper path).
|
|
38
|
+
Emits a warning when `pass2-merged.json` exceeds 300 KB.
|
|
39
|
+
|
|
40
|
+
- **Batch sub-division for large projects** (automatic, ≥16 domains).
|
|
41
|
+
Stages 3b and 3c are sub-divided into batches of 15 domains each,
|
|
42
|
+
preceded by dedicated `3b-core` / `3c-core` stages that handle
|
|
43
|
+
project-wide common files. Ensures no single stage generates more than
|
|
44
|
+
~50 files, keeping output within the empirical safe range on projects
|
|
45
|
+
up to 100+ domains. Batch count is `ceil(totalDomains / 15)`; domain
|
|
46
|
+
order comes from `domain-groups.json` (size-balanced by plan-installer).
|
|
47
|
+
|
|
48
|
+
- **Split-mode partial marker protection**. `pass3-complete.json` gains
|
|
49
|
+
`mode: "split"` and `groupsCompleted` array. A run that completes 3a+3b
|
|
50
|
+
and crashes during 3c leaves a partial marker; on re-run, the stale-check
|
|
51
|
+
detects the partial-marker shape and defers to the split runner's resume
|
|
52
|
+
logic instead of deleting the marker — otherwise the run would restart
|
|
53
|
+
from 3a and double the token cost.
|
|
54
|
+
|
|
55
|
+
- **7 regression tests** pinning the master plan no-op contract
|
|
56
|
+
(`tests/master-plan-removal.test.js`).
|
|
57
|
+
|
|
58
|
+
- **`scaffoldSkillsManifest` gap-fill for Pass 4**. Auto-creates
|
|
59
|
+
`claudeos-core/skills/00.shared/MANIFEST.md` with a minimal stub if
|
|
60
|
+
Pass 3c omits it (the stack pass3.md templates list it among targets but
|
|
61
|
+
without REQUIRED marking, so skill-sparse projects sometimes ended up
|
|
62
|
+
with `.claude/rules/50.sync/03.skills-sync.md` pointing at a
|
|
63
|
+
non-existent file). Idempotent: skips if the file already has real
|
|
64
|
+
content (>20 chars).
|
|
65
|
+
|
|
66
|
+
### Changed
|
|
67
|
+
|
|
68
|
+
- **Pass 3 now always runs in split mode.** Each stage starts with a fresh
|
|
69
|
+
context window; cross-stage consistency is preserved by `pass3a-facts.md`.
|
|
70
|
+
No user-facing configuration — applies to every `npx claudeos-core init`
|
|
71
|
+
run automatically.
|
|
72
|
+
|
|
73
|
+
Stage structure:
|
|
74
|
+
- **3a** — Read analysis files once, write `pass3a-facts.md` (5-10 KB
|
|
75
|
+
distilled fact sheet).
|
|
76
|
+
- **3b** — Generate `CLAUDE.md`, `standard/`, and `.claude/rules/`.
|
|
77
|
+
Sub-divided into `3b-core` + `3b-1..N` on projects with ≥16 domains.
|
|
78
|
+
- **3c** — Generate `skills/` and `guide/`. Sub-divided into `3c-core`
|
|
79
|
+
+ `3c-1..N` on projects with ≥16 domains.
|
|
80
|
+
- **3d-aux** — Generate `database/` + `mcp-guide/` stubs.
|
|
81
|
+
|
|
82
|
+
Single-batch projects keep flat `"3b"`/`"3c"` marker names
|
|
83
|
+
(backward-compatible); multi-batch projects use `"3b-core"`, `"3b-1"`,
|
|
84
|
+
etc. Resume works at stage granularity.
|
|
85
|
+
|
|
86
|
+
- **Stage count by project size** (1–15 domains: 4 stages; 16–30: 8; 31–45:
|
|
87
|
+
10; 46–60: 12; 61–75: 14; 91–105: 18).
|
|
88
|
+
|
|
89
|
+
- `package-lock.json` synced to `2.1.0`. The v2.0.2 release had a stale
|
|
90
|
+
lockfile at `2.0.0` which caused `npm ci` to fail lockfile integrity
|
|
91
|
+
checks.
|
|
92
|
+
|
|
93
|
+
### Removed
|
|
94
|
+
|
|
95
|
+
- **Master plan generation** (`claudeos-core/plan/*-master.md` files).
|
|
96
|
+
Master plans were an internal tool backup not consumed by Claude Code
|
|
97
|
+
at runtime, and aggregating many files in a single Pass 3d session was
|
|
98
|
+
a primary source of `Prompt is too long` failures on mid-sized projects.
|
|
99
|
+
Claude Code runtime is unaffected — it reads `CLAUDE.md` + `rules/`
|
|
100
|
+
directly. Use `git` for backup/restore instead.
|
|
101
|
+
|
|
102
|
+
- **Pass 3d sub-stages `3d-standard` / `3d-rules` / `3d-skills` /
|
|
103
|
+
`3d-guide`**. Only `3d-aux` (database + mcp-guide stubs) remains as a
|
|
104
|
+
fixed-size task independent of domain count.
|
|
105
|
+
|
|
106
|
+
- **`CLAUDEOS_PASS3_SPLIT` environment variable and single-call mode.**
|
|
107
|
+
Single-call had failed reliably on projects with more than ~5 domains
|
|
108
|
+
because output-accumulation overflow is not predictable from input size.
|
|
109
|
+
Split mode is structurally immune and is now the only supported path.
|
|
110
|
+
|
|
111
|
+
- **`claudeos-core/plan/` directory creation in `init`**. Directory is no
|
|
112
|
+
longer created during bootstrap (honors the master-plan-removal contract).
|
|
113
|
+
|
|
114
|
+
### Deprecated
|
|
115
|
+
|
|
116
|
+
- `scaffoldMasterPlans` in `lib/memory-scaffold.js` is kept as a
|
|
117
|
+
backward-compatible no-op (returns `[]`, writes nothing). External
|
|
118
|
+
callers keep working; no files are produced.
|
|
119
|
+
|
|
120
|
+
### Fixed
|
|
121
|
+
|
|
122
|
+
- `bootstrap.sh` line endings normalized from CRLF to LF. v2.0.2 shipped
|
|
123
|
+
with CRLF which caused immediate `syntax error` on macOS/Linux when
|
|
124
|
+
invoked via `bash claudeos-core-tools/bootstrap.sh`.
|
|
125
|
+
|
|
126
|
+
- `pass3-context-builder.js`: removed unused `p2Size` placeholder variable
|
|
127
|
+
(refactoring leftover, no behavior change).
|
|
128
|
+
|
|
129
|
+
- `init.js`: Pass 4 progress ticker `totalExpected` corrected from 6 to 5
|
|
130
|
+
to reflect master plan removal. The 6th slot was counting
|
|
131
|
+
`plan/50.memory-master.md` which is no longer generated, making the
|
|
132
|
+
progress bar appear stuck at 83% until the run completed.
|
|
133
|
+
|
|
134
|
+
- `manifest-generator`: removed stale `plan-manifest.json` generation.
|
|
135
|
+
Master plans were removed in v2.1.0; a manifest with an empty `plans`
|
|
136
|
+
array (62 B) was noise. Nothing reads it, nothing validates it.
|
|
137
|
+
`sync-map.json` is retained (with empty `mappings`) for
|
|
138
|
+
`sync-checker` backward compatibility.
|
|
139
|
+
|
|
140
|
+
- `plan-validator`: `plan-sync-status.json` is now skipped when the
|
|
141
|
+
`plan/` directory is absent or empty. Previously wrote a 147 B
|
|
142
|
+
all-zeros status file on every health check for master-plan-free
|
|
143
|
+
projects. `stale-report.json` still records a passing no-op so
|
|
144
|
+
`health-checker` reports a clean result.
|
|
145
|
+
|
|
146
|
+
- `plan-parser` placeholder filtering regression in sync-checker
|
|
147
|
+
on projects with `<...>` style tokens in plan files.
|
|
148
|
+
|
|
149
|
+
- `cli.js`: `npx claudeos-core memory --help` now displays the memory
|
|
150
|
+
subcommand help instead of the top-level usage. `parseArgs` previously
|
|
151
|
+
promoted `--help` to a top-level command even when it appeared after a
|
|
152
|
+
command name, so `memory --help` was indistinguishable from `--help`
|
|
153
|
+
alone. The fix: `--help` only becomes the top-level command when no
|
|
154
|
+
other command has been seen yet. `memory --help`, `memory -h` now
|
|
155
|
+
route to the subcommand's own help.
|
|
156
|
+
|
|
157
|
+
- `memory score`: the first `score` run no longer leaves two `importance`
|
|
158
|
+
lines in each entry. The previous implementation inserted the
|
|
159
|
+
auto-scored line at the top but left the user's original
|
|
160
|
+
`- importance: N` line below it, producing a file with two conflicting
|
|
161
|
+
values per entry. `cmdScore` now strips every importance line
|
|
162
|
+
(bold or plain) before inserting the new auto-scored line, so there is
|
|
163
|
+
always exactly one importance line per entry and repeated `score` runs
|
|
164
|
+
remain idempotent.
|
|
165
|
+
|
|
166
|
+
- `memory compact`: the Stage 1 summary marker is now a proper markdown
|
|
167
|
+
list item (`- _Summarized on YYYY-MM-DD — original body dropped._`).
|
|
168
|
+
Previously the marker was emitted as a bare italic string without the
|
|
169
|
+
`- ` prefix, which broke the surrounding list in markdown renderers
|
|
170
|
+
and caused `parseEntries` to misclassify it on subsequent compactions.
|
|
171
|
+
The default `fixLine` fallback was also updated to `- (fix omitted)`
|
|
172
|
+
for the same consistency reason.
|
|
173
|
+
|
|
174
|
+
### Test coverage
|
|
175
|
+
|
|
176
|
+
- 563 tests pass, 0 skip (3 runs confirmed no flakes). +165 tests vs v2.0.0
|
|
177
|
+
across Pass 3 context builder, output accumulation, batch subdivision,
|
|
178
|
+
master plan removal, scaffoldSkillsManifest, and memory score/compact
|
|
179
|
+
formatting regression suites.
|
|
180
|
+
|
|
181
|
+
## [2.0.2] — 2026-04-20
|
|
182
|
+
|
|
183
|
+
### Fixed
|
|
184
|
+
|
|
185
|
+
- **Upgrade-path silent-skip regression for pre-v2.0.0 projects** — `npx claudeos-core health` permanently reported `content-validator: fail` with 9 × MISSING guide errors on projects that had been initialized on a pre-v2.0.0 release and then upgraded. Pass 3 wrote `pass3-complete.json` before the Pass 3 output-completeness guards (H1/H2) existed, so the marker was valid-looking on disk even though `claudeos-core/guide/` (and sometimes `standard/00.core/01.project-overview.md`, `skills/`, or `plan/`) had never been populated. On subsequent runs, `init.js` observed the marker + an existing CLAUDE.md, skipped Pass 3, and never regenerated the missing outputs — leaving the project in a stuck-fail state that only `--force` (which wipes `.claude/rules/` and loses manual edits) could recover. The Pass 3 stale-marker branch in `bin/commands/init.js` previously only detected externally-deleted CLAUDE.md; it now also drops the marker when any entry in `lib/expected-guides.js` is missing/BOM-aware-empty or when `findMissingOutputs()` (`lib/expected-outputs.js`) flags a missing standard sentinel / `skills/` / `plan/`. Mirrors the existing `dropStalePass4Marker` pattern (symmetric helper `dropStalePass3Marker` added) and reuses the same "unlink failure surfaces as `InitError` with Windows AV/file-lock guidance" contract so the recovery itself can't silently regress. Recovery is one-shot: next `init` re-runs Pass 3, which populates the missing outputs and writes a fresh marker gated by the v2.0.0 H1/H2 guards.
|
|
186
|
+
|
|
187
|
+
### Added
|
|
188
|
+
|
|
189
|
+
- **`tests/pass3-marker.test.js`** — Six new cases covering the stale-detection branches: (a) missing guide dir → drop, (b) single BOM-only guide file → drop, (c) guides present but `skills/` gone → drop, (d) guides present but standard sentinel missing → drop, (e) complete state preserves marker, (f) `init.js` source-parity tripwire asserting `dropStalePass3Marker` + both `EXPECTED_GUIDE_FILES` and `findMissingOutputs` references appear in the stale-check region (guards against refactors silently regressing to v2.0.1 behavior).
|
|
190
|
+
|
|
3
191
|
## [2.0.1] — 2026-04-19
|
|
4
192
|
|
|
5
193
|
### Fixed
|