@mriekki/lean 0.2.0 → 0.2.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.
package/README.md CHANGED
@@ -8,10 +8,10 @@ Canonical engineering remains in the private platform repositories. Before publi
8
8
 
9
9
  The current profile bundles:
10
10
 
11
- - Lean Agentic Core `1.11.0` from commit `5b2f13bb188f74fa0d7b6b8d7985fe3abfc543f9`, distribution `greenfield-workspace`;
11
+ - Lean Agentic Core `1.11.1` from commit `e3a8a994d1e95923d629af7640d3b3a0a4f098d4`, distribution `greenfield-workspace`;
12
12
  - Lean POC Deployment Kit commit `4c23140576b39608a3ef285cad4abe53dccb9c47`, distribution `greenfield-poc`.
13
13
 
14
- Core `1.11.0` adds the package-aware `/lean-update` workflow for `LEAN_BASELINE.json` consumers, keeps `/core-sync` as a compatibility/router path for component-only Core consumers, and aligns `/upstream-fix` and `/deploy` with the package and generated Deployment Kit boundaries.
14
+ Core `1.11.1` tightens `/lean-update` for Bootstrap-generated package-managed consumers: it keeps `POC_BOOTSTRAP.json`, umbrella/component baselines, exact registry integrity, and generated package-verification surfaces coherent while retaining `/core-sync` as the compatibility/router path for component-only Core consumers.
15
15
 
16
16
  ## Developer experience
17
17
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "package": "@mriekki/lean",
4
- "version": "0.2.0",
4
+ "version": "0.2.1",
5
5
  "defaultProfile": "greenfield-poc",
6
6
  "profiles": {
7
7
  "greenfield-poc": {
@@ -14,8 +14,8 @@
14
14
  "components": {
15
15
  "core": {
16
16
  "repository": "mriekki/lean-agentic-core",
17
- "commit": "5b2f13bb188f74fa0d7b6b8d7985fe3abfc543f9",
18
- "version": "1.11.0",
17
+ "commit": "e3a8a994d1e95923d629af7640d3b3a0a4f098d4",
18
+ "version": "1.11.1",
19
19
  "distribution": "greenfield-workspace",
20
20
  "descriptor": "assets/core/distribution.json",
21
21
  "sourceRoot": "assets/generated/core",
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "package": "@mriekki/lean",
4
- "version": "0.2.0",
4
+ "version": "0.2.1",
5
5
  "components": {
6
6
  "core": {
7
7
  "repository": "mriekki/lean-agentic-core",
8
- "commit": "5b2f13bb188f74fa0d7b6b8d7985fe3abfc543f9",
9
- "version": "1.11.0",
8
+ "commit": "e3a8a994d1e95923d629af7640d3b3a0a4f098d4",
9
+ "version": "1.11.1",
10
10
  "distribution": "greenfield-workspace",
11
11
  "files": [
12
12
  {
@@ -82,7 +82,7 @@
82
82
  {
83
83
  "source": "core/skills/lean-update/SKILL.md",
84
84
  "destination": ".github/skills/lean-update/SKILL.md",
85
- "sha256": "b9534533c2b612f2787ce4b9d40494bd5a3554ccb646f500610fb899be8113d2"
85
+ "sha256": "8b4bce53b109a5959e862924b0a4afd931233a5094a1aef43c2f3672199108bb"
86
86
  },
87
87
  {
88
88
  "source": "core/skills/core-sync/SKILL.md",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: lean-update
3
- description: Guided whole-profile update for package-managed Lean consumers using the exact published @mriekki/lean artifact while preserving Core, Deployment, and umbrella baseline integrity.
3
+ description: Guided whole-profile update for package-managed Lean consumers using the exact published @mriekki/lean artifact while preserving Core, Deployment, umbrella, and generated-consumer provenance integrity.
4
4
  argument-hint: "[optional exact package version]"
5
5
  user-invocable: true
6
6
  disable-model-invocation: true
@@ -16,11 +16,12 @@ The governing rule is:
16
16
  package-managed consumer
17
17
  → update the whole Lean profile through the published package
18
18
  → keep LEAN_BASELINE.json + component baselines coherent
19
+ → when the consumer is Bootstrap-generated, keep approved generation metadata and generated package-verification surfaces coherent too
19
20
  ```
20
21
 
21
22
  Do not replace this with direct Core-only or Deployment-Kit-only synchronization when `LEAN_BASELINE.json` is present.
22
23
 
23
- Invocation starts read-only. One explicit update choice may authorize safe branch setup plus the exact package apply and verification. `/deliver`, merge, release publication, and production deployment remain separate.
24
+ Invocation starts read-only. One explicit update choice may authorize safe branch setup plus the exact package apply, generated-consumer companion metadata updates when applicable, and verification. `/deliver`, merge, release publication, and production deployment remain separate.
24
25
 
25
26
  ## 1. Establish package-managed provenance
26
27
 
@@ -29,6 +30,7 @@ From the consumer root read:
29
30
  - `LEAN_BASELINE.json`;
30
31
  - `CORE_BASELINE.json` when present;
31
32
  - `DEPLOYMENT_BASELINE.json` when present;
33
+ - `POC_BOOTSTRAP.json` when present;
32
34
  - current Git status, branch, remotes, and default branch when observable.
33
35
 
34
36
  Require `LEAN_BASELINE.json` to identify:
@@ -43,6 +45,16 @@ If `LEAN_BASELINE.json` is absent, report `NOT A PACKAGE-MANAGED LEAN CONSUMER`
43
45
 
44
46
  Do not synthesize or repair missing umbrella provenance by hand.
45
47
 
48
+ ### Bootstrap-generated consumers
49
+
50
+ If `POC_BOOTSTRAP.json` exists, treat it as approved generated-consumer provenance, not unrelated product data.
51
+
52
+ Before planning an update, require `generation.lean.package`, `generation.lean.version`, and `generation.lean.profile` to agree exactly with the installed `LEAN_BASELINE.json`. Require `generation.lean.integrity` to be a non-empty exact registry integrity value for that installed package/version. Verify that integrity read-only from the registry when registry access is available.
53
+
54
+ If those values disagree before the update, report `GENERATED LEAN METADATA DRIFT` and stop. Do not use `/lean-update` to silently reconcile an already-incoherent generated consumer.
55
+
56
+ Also inspect generated package-verification surfaces such as `.github/workflows/ci.yml` when present. If they duplicate the approved package version/integrity literally, record that current shape as companion generated metadata that must remain coherent with `POC_BOOTSTRAP.json` during the update. Do not rewrite locally customized or unrecognized generated surfaces by guesswork.
57
+
46
58
  ## 2. Verify the installed package baseline first
47
59
 
48
60
  Before planning an update, verify that the current managed state still matches the exact installed package version recorded in `LEAN_BASELINE.json`.
@@ -70,6 +82,8 @@ npm view @mriekki/lean@latest version --json
70
82
  npm view @mriekki/lean@<resolved-version> dist.integrity --json
71
83
  ```
72
84
 
85
+ Capture the target package's full exact `dist.integrity` together with the resolved version. For a Bootstrap-generated consumer, that exact integrity is part of the reviewed companion metadata update.
86
+
73
87
  Do not use a moving `@latest` reference for the modifying apply after preview. Use the same exact package version for preview, apply, and final check.
74
88
 
75
89
  If the resolved version equals the installed version and the exact-version check passes, report `LEAN ALREADY CURRENT` and stop without creating a branch or commit.
@@ -99,18 +113,27 @@ Stop on unsafe states such as:
99
113
 
100
114
  Core retired paths are an ownership-transfer decision. Never auto-add `--accept-retired core:<path>` merely to make the update pass. Explain the retired path and require a separate explicit ownership decision before re-previewing it.
101
115
 
116
+ For a Bootstrap-generated consumer, also preview the companion generated-consumer changes:
117
+
118
+ - `POC_BOOTSTRAP.json` keeps the same package/profile but changes `generation.lean.version` and `generation.lean.integrity` to the exact reviewed target;
119
+ - generated package-verification surfaces should consume `POC_BOOTSTRAP.json` dynamically when the accepted Bootstrap contract supports that form;
120
+ - a recognized older Bootstrap-generated verification block may be migrated only when its embedded old package/version/integrity exactly match the currently approved manifest metadata;
121
+ - an unrecognized or locally modified generated verification surface is a stop condition, not permission to reconstruct Bootstrap output by hand.
122
+
102
123
  ## 5. Present one bounded update choice
103
124
 
104
- When the exact target package plan is safe, present:
125
+ When the exact target package plan and any generated-consumer companion plan are safe, present:
105
126
 
106
127
  ```text
107
128
  LEAN UPDATE READY
108
129
 
109
130
  Installed: <package>@<installed-version>
110
131
  Target: <package>@<target-version>
132
+ Target integrity: <exact dist.integrity>
111
133
  Profile: <profile>
112
134
  Core: <old> → <new>
113
135
  Deployment: <old> → <new> / unchanged
136
+ Generated consumer metadata: <not present / coherent update planned>
114
137
  Managed drift/conflicts: NONE
115
138
 
116
139
  1. Apply the exact Lean package update [GIT + FILE WRITE] — recommended
@@ -122,10 +145,12 @@ Choosing option 1 authorizes only:
122
145
 
123
146
  - creation/switch to one repository-appropriate short-lived update branch when needed;
124
147
  - exact target package apply;
125
- - package/baseline verification;
148
+ - when `POC_BOOTSTRAP.json` is present, update of its exact `generation.lean.version` and `generation.lean.integrity` to the reviewed target while preserving package/profile;
149
+ - migration of a recognized Bootstrap-generated package-verification block from duplicated current literals to the accepted manifest-driven form, only when the existing block still exactly matches the current approved metadata;
150
+ - package/baseline/generated-consumer verification;
126
151
  - inspection of the resulting meaningful diff.
127
152
 
128
- It does not authorize `/deliver`, merge, npm/Core/Deployment release publication, or deployment.
153
+ It does not authorize `/deliver`, merge, npm/Core/Deployment/Bootstrap release publication, arbitrary regeneration, or deployment.
129
154
 
130
155
  ## 6. Apply only the exact previewed package
131
156
 
@@ -145,9 +170,11 @@ npx --yes @mriekki/lean@<target-version> update --apply
145
170
 
146
171
  If explicit Core retired-path ownership transfer was separately approved, pass only the exact reviewed paths using the package's `--accept-retired core:<path>` contract. Never widen that set implicitly.
147
172
 
173
+ For a Bootstrap-generated consumer, complete the reviewed companion metadata changes in the same bounded update before declaring success. Preserve every unrelated `POC_BOOTSTRAP.json` field. Never change package identity or profile as an incidental version update.
174
+
148
175
  Do not run direct `tools/package/sync.py`, Deployment Kit sync, or a remote `[sync-core]` request as part of a package-managed update.
149
176
 
150
- ## 7. Verify all baselines and the diff
177
+ ## 7. Verify all baselines, generated metadata, and the diff
151
178
 
152
179
  After apply, run the exact target package check:
153
180
 
@@ -160,7 +187,7 @@ Then inspect:
160
187
  ```text
161
188
  git status --short --branch
162
189
  git diff --stat
163
- git diff -- LEAN_BASELINE.json CORE_BASELINE.json DEPLOYMENT_BASELINE.json
190
+ git diff -- LEAN_BASELINE.json CORE_BASELINE.json DEPLOYMENT_BASELINE.json POC_BOOTSTRAP.json .github/workflows/ci.yml
164
191
  ```
165
192
 
166
193
  Confirm:
@@ -168,8 +195,13 @@ Confirm:
168
195
  - `LEAN_BASELINE.json` records the exact target package/version/profile;
169
196
  - component baseline commits/distributions match the umbrella baseline;
170
197
  - package check passes for the whole profile;
198
+ - when `POC_BOOTSTRAP.json` exists, its package/version/profile agree with `LEAN_BASELINE.json` and its integrity equals the exact reviewed target registry integrity;
199
+ - when the repository contains `tools/lean-package/check-managed-baselines.py`, that generated baseline checker passes after all companion metadata changes;
200
+ - generated package-verification surfaces no longer contradict the approved manifest metadata;
171
201
  - consumer-owned content was not overwritten;
172
- - only intended package-managed changes and reviewed ownership transfers occurred.
202
+ - only intended package-managed changes, reviewed generated-consumer companion changes, and reviewed ownership transfers occurred.
203
+
204
+ If generated CI still embeds a different package version/integrity after the update, report `GENERATED LEAN VERIFICATION DRIFT` and stop before delivery.
173
205
 
174
206
  Present the meaningful diff for human review. After acceptance, recommend `/deliver` for normal commit/push/PR/CI mechanics.
175
207
 
@@ -182,7 +214,10 @@ Present the meaningful diff for human review. After acceptance, recommend `/deli
182
214
  - performs a downgrade/rollback as an ordinary update;
183
215
  - overwrites unexplained managed drift;
184
216
  - auto-accepts Core retired-path ownership transfer;
185
- - publishes npm/Core/Deployment releases or tags;
217
+ - silently repairs a pre-existing mismatch between `POC_BOOTSTRAP.json` and `LEAN_BASELINE.json`;
218
+ - changes a generated consumer's package identity/profile or regenerates the repository as an incidental version update;
219
+ - guesses at locally modified/unrecognized Bootstrap-generated verification logic;
220
+ - publishes npm/Core/Deployment/Bootstrap releases or tags;
186
221
  - merges the consumer PR;
187
222
  - deploys an environment.
188
223
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mriekki/lean",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Public consumer distribution and updater for Lean engineering assets.",
5
5
  "type": "module",
6
6
  "bin": {