@mriekki/lean 0.1.0 → 0.2.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/README.md +71 -67
- package/assets/components.json +33 -33
- package/assets/core/distribution.json +52 -51
- package/assets/deployment/distribution.json +34 -34
- package/assets/generated/ASSEMBLY.json +38 -33
- package/assets/generated/core/core/skills/core-sync/SKILL.md +78 -120
- package/assets/generated/core/core/skills/deploy/SKILL.md +74 -91
- package/assets/generated/core/core/skills/lean-update/SKILL.md +189 -0
- package/assets/generated/core/core/skills/upstream-fix/SKILL.md +91 -76
- package/assets/generated/deployment/distribution/lean-poc-deploy.py +8 -8
- package/assets/generated/deployment/src/lean_poc_deployment/__init__.py +3 -3
- package/assets/generated/deployment/src/lean_poc_deployment/__main__.py +3 -3
- package/assets/generated/deployment/src/lean_poc_deployment/app_cli.py +140 -140
- package/assets/generated/deployment/src/lean_poc_deployment/app_runtime.py +455 -455
- package/assets/generated/deployment/src/lean_poc_deployment/app_runtime_remote.py +415 -415
- package/assets/generated/deployment/src/lean_poc_deployment/box_platform.py +208 -208
- package/assets/generated/deployment/src/lean_poc_deployment/box_platform_assets.py +100 -100
- package/assets/generated/deployment/src/lean_poc_deployment/box_platform_remote.py +271 -271
- package/assets/generated/deployment/src/lean_poc_deployment/cli.py +437 -437
- package/assets/generated/deployment/src/lean_poc_deployment/doctor.py +121 -121
- package/assets/generated/deployment/src/lean_poc_deployment/entrypoint.py +25 -25
- package/assets/generated/deployment/src/lean_poc_deployment/errors.py +5 -5
- package/assets/generated/deployment/src/lean_poc_deployment/keys.py +171 -171
- package/assets/generated/deployment/src/lean_poc_deployment/profiles.py +204 -204
- package/assets/generated/deployment/src/lean_poc_deployment/route_registry.py +367 -367
- package/assets/generated/deployment/src/lean_poc_deployment/route_registry_remote.py +443 -443
- package/assets/generated/deployment/src/lean_poc_deployment/security.py +290 -290
- package/assets/generated/deployment/src/lean_poc_deployment/sqlite_adapter.py +334 -334
- package/assets/generated/deployment/src/lean_poc_deployment/sqlite_adapter_remote.py +339 -339
- package/assets/generated/deployment/src/lean_poc_deployment/sqlite_cli.py +85 -85
- package/assets/generated/deployment/src/lean_poc_deployment/sqlite_import_recovery.py +437 -437
- package/assets/generated/deployment/src/lean_poc_deployment/ssh.py +118 -118
- package/assets/generated/deployment/src/lean_poc_deployment/teardown.py +286 -286
- package/assets/generated/deployment/src/lean_poc_deployment/teardown_cli.py +120 -120
- package/assets/generated/deployment/src/lean_poc_deployment/teardown_remote.py +100 -100
- package/assets/generated/deployment/src/lean_poc_deployment/trust.py +278 -278
- package/bin/lean.mjs +9 -9
- package/package.json +33 -33
- package/src/cli.mjs +131 -131
- package/src/engine.mjs +243 -243
- package/src/package-data.mjs +18 -18
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: deploy
|
|
3
|
-
description: "Guided deployment orchestration for a configured named environment.
|
|
3
|
+
description: "Guided deployment orchestration for a configured named environment. Verifies package/deployment provenance, selects the exact target/artifact, preserves tool-specific authorization, and delegates deterministic execution to repository-provided deployment tooling."
|
|
4
4
|
argument-hint: "[environment] [release-or-artifact]"
|
|
5
5
|
user-invocable: true
|
|
6
6
|
disable-model-invocation: true
|
|
@@ -10,59 +10,50 @@ disable-model-invocation: true
|
|
|
10
10
|
|
|
11
11
|
`/deploy` is the normal human-facing deployment interface once deployment engineering and the selected environment are ready.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Core owns interaction, validation, target safety, and Human-in-the-Loop authorization. Repository-provided deployment tooling owns deployment mechanics.
|
|
14
14
|
|
|
15
|
-
Do not implement application deployment logic directly in
|
|
15
|
+
Do not implement Docker, SSH, route, migration, or application deployment logic directly in this skill when an approved repository command exists.
|
|
16
16
|
|
|
17
|
-
## 1. Begin read-only
|
|
17
|
+
## 1. Begin read-only and establish provenance
|
|
18
18
|
|
|
19
19
|
Invocation starts read-only.
|
|
20
20
|
|
|
21
21
|
Read only the minimum repository context needed to identify:
|
|
22
22
|
|
|
23
|
-
- the
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
23
|
+
- `LEAN_BASELINE.json` when the repository is package-managed;
|
|
24
|
+
- `DEPLOYMENT_BASELINE.json` when present;
|
|
25
|
+
- approved deployment/release requirements;
|
|
26
|
+
- configured named environments and checkout-local target bindings;
|
|
27
|
+
- selected environment readiness evidence;
|
|
28
|
+
- approved release/artifact policy;
|
|
29
|
+
- repository-provided deployment entry point and its authorization contract;
|
|
29
30
|
- expected developer-workstation and target operating systems.
|
|
30
31
|
|
|
31
|
-
Do not assume configuration
|
|
32
|
+
Do not assume configuration filenames, target OS, SSH aliases, container runtime, or release format unless the repository establishes them.
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
## 2. Select an environment explicitly
|
|
36
|
-
|
|
37
|
-
If the invocation did not name an environment, enumerate only environments configured for this checkout and ask the human to select one.
|
|
38
|
-
|
|
39
|
-
Show enough non-secret identity to distinguish them, for example:
|
|
34
|
+
When `DEPLOYMENT_BASELINE.json` identifies the standard Lean POC Deployment Kit and its generated entry point exists, prefer the repository-distributed interface such as:
|
|
40
35
|
|
|
41
36
|
```text
|
|
42
|
-
|
|
37
|
+
tools/lean-deployment/lean-poc-deploy.py
|
|
38
|
+
```
|
|
43
39
|
|
|
44
|
-
|
|
45
|
-
Role: non-production
|
|
46
|
-
Target: portable-ubuntu
|
|
47
|
-
[REMOTE WRITE]
|
|
40
|
+
over reconstructing Deployment Kit commands by hand or requiring a separate Kit checkout.
|
|
48
41
|
|
|
49
|
-
|
|
50
|
-
Role: production
|
|
51
|
-
Target: home-production
|
|
52
|
-
[PRODUCTION WRITE]
|
|
42
|
+
If package/component baseline integrity is already known to be drifted, or deployment engineering/readiness is incomplete, stop and route to `/lean-update`, `/upstream-fix`, the deployment work item, or `/production-readiness` as appropriate.
|
|
53
43
|
|
|
54
|
-
|
|
55
|
-
```
|
|
44
|
+
## 2. Select an environment explicitly
|
|
56
45
|
|
|
57
|
-
|
|
46
|
+
If the invocation did not name an environment, enumerate only environments configured for this checkout and ask the human to select one.
|
|
47
|
+
|
|
48
|
+
Show enough non-secret identity to distinguish them.
|
|
58
49
|
|
|
59
50
|
Rules:
|
|
60
51
|
|
|
61
52
|
- never silently default to `production`;
|
|
62
53
|
- never use a remembered prior selection as implicit production authorization;
|
|
63
54
|
- never fall back from one environment to another because discovery, access, readiness, or deployment failed;
|
|
64
|
-
- if
|
|
65
|
-
- selecting an environment chooses scope but does not
|
|
55
|
+
- if a named environment is not configured, fail explicitly;
|
|
56
|
+
- selecting an environment chooses scope but does not authorize the deployment write.
|
|
66
57
|
|
|
67
58
|
## 3. Resolve and verify the target binding
|
|
68
59
|
|
|
@@ -78,66 +69,61 @@ named environment
|
|
|
78
69
|
|
|
79
70
|
Address discovery is not host trust.
|
|
80
71
|
|
|
81
|
-
Before
|
|
72
|
+
Before remote deployment:
|
|
82
73
|
|
|
83
74
|
- verify the selected environment resolves to its configured target;
|
|
84
|
-
- use the repository-approved stable target
|
|
85
|
-
- preserve enrolled
|
|
86
|
-
- stop on
|
|
75
|
+
- use the repository-approved stable logical target rather than a guessed transient address;
|
|
76
|
+
- preserve enrolled host-key verification independently of current IP;
|
|
77
|
+
- stop on unknown/changed host identity;
|
|
87
78
|
- never bypass host-key checks, silently enroll new trust, scan/select another host, or weaken network controls as recovery;
|
|
88
|
-
- verify
|
|
79
|
+
- verify actual target OS compatibility before target-specific behavior.
|
|
89
80
|
|
|
90
|
-
Changing an environment's
|
|
81
|
+
Changing an environment's target is readiness/configuration work, not deployment fallback.
|
|
91
82
|
|
|
92
83
|
Keep private keys, passphrases, credentials, copied trust databases, and other secret values out of repository configuration and logs.
|
|
93
84
|
|
|
94
|
-
## 4.
|
|
85
|
+
## 4. Resolve the repository-provided launcher
|
|
95
86
|
|
|
96
|
-
|
|
87
|
+
Prefer the canonical repository-provided deployment interface established by the current deployment baseline.
|
|
97
88
|
|
|
98
|
-
|
|
89
|
+
For package-generated Deployment Kit consumers this normally means the generated Python entry point plus its distributed modules. Do not require a sibling Deployment Kit clone for normal deployment.
|
|
99
90
|
|
|
100
|
-
|
|
101
|
-
Windows developer workstation → approved PowerShell deployment entry point
|
|
102
|
-
macOS/Linux developer workstation → approved shell deployment entry point
|
|
103
|
-
```
|
|
91
|
+
A repository may additionally provide PowerShell/shell wrappers. Use them only when the repository defines them as the approved interface or when they intentionally wrap the same deterministic contract.
|
|
104
92
|
|
|
105
|
-
|
|
93
|
+
Launcher choice may depend on developer workstation OS; target behavior depends on selected target OS. Do not confuse those dimensions.
|
|
106
94
|
|
|
107
|
-
|
|
95
|
+
If the approved launcher is absent, locally drifted, or unsupported on the current workstation/target, stop rather than inventing deployment mechanics.
|
|
108
96
|
|
|
109
|
-
|
|
97
|
+
## 5. Resolve release/artifact identity
|
|
110
98
|
|
|
111
|
-
|
|
99
|
+
Use the repository's approved policy for the selected environment.
|
|
112
100
|
|
|
113
|
-
|
|
101
|
+
For production require the approved formal release/artifact evidence, including immutable identity when required.
|
|
114
102
|
|
|
115
|
-
|
|
103
|
+
For non-production, use only the broader artifact policy explicitly allowed by the repository. Do not invent relaxed staging semantics.
|
|
116
104
|
|
|
117
|
-
|
|
118
|
-
environment
|
|
119
|
-
release/version or artifact identity
|
|
120
|
-
immutable digest when required
|
|
121
|
-
dry-run/check mode when supported
|
|
122
|
-
```
|
|
105
|
+
When promoting a tested artifact to production, prefer the exact same immutable artifact/digest rather than rebuilding it.
|
|
123
106
|
|
|
124
|
-
|
|
107
|
+
## 6. Preserve the deployment tool's exact authorization contract
|
|
125
108
|
|
|
126
|
-
|
|
109
|
+
Core may describe consequence classes using labels such as `[REMOTE WRITE]` and `[PRODUCTION WRITE]`, but those labels do not replace a stricter exact authorization phrase required by the repository-provided deployment tool.
|
|
127
110
|
|
|
128
|
-
|
|
111
|
+
For example, the standard Deployment Kit may require operation-specific phrases such as:
|
|
129
112
|
|
|
130
|
-
|
|
113
|
+
```text
|
|
114
|
+
[APP DEPLOY WRITE]
|
|
115
|
+
[PRODUCTION APP DEPLOY]
|
|
116
|
+
```
|
|
131
117
|
|
|
132
|
-
|
|
118
|
+
The exact phrase must be resolved from the installed repository/tool contract. Do not hardcode an example phrase when the installed version requires a different one.
|
|
133
119
|
|
|
134
|
-
|
|
120
|
+
Authorization applies only to the exact environment, verified target, artifact, plan/evidence, and operation shown. If any materially changes, stop and require renewed review/authorization.
|
|
135
121
|
|
|
136
|
-
|
|
122
|
+
No requirements approval, code review, PR merge, CI pass, environment selection, prior deployment, or readiness result implicitly authorizes a deployment write.
|
|
137
123
|
|
|
138
|
-
## 7. Present the deployment preview and
|
|
124
|
+
## 7. Present the deployment preview and gate
|
|
139
125
|
|
|
140
|
-
Before
|
|
126
|
+
Before the modifying command show the resolved non-secret facts:
|
|
141
127
|
|
|
142
128
|
```text
|
|
143
129
|
DEPLOYMENT READY
|
|
@@ -146,48 +132,45 @@ Environment: <name>
|
|
|
146
132
|
Role: <production|non-production>
|
|
147
133
|
Target: <verified logical target>
|
|
148
134
|
Target OS: <verified>
|
|
149
|
-
Launcher: <repository-provided
|
|
150
|
-
|
|
135
|
+
Launcher: <repository-provided command>
|
|
136
|
+
Deployment baseline: <exact commit/distribution when present>
|
|
137
|
+
Release/artifact: <verified immutable identity>
|
|
138
|
+
Required authorization: <exact tool phrase or repository gate>
|
|
151
139
|
Readiness blockers: NONE
|
|
152
140
|
```
|
|
153
141
|
|
|
154
|
-
For a non-production
|
|
142
|
+
For a non-production deployment ask for one bounded authorization covering the exact reviewed plan and required tool phrase.
|
|
155
143
|
|
|
156
|
-
|
|
157
|
-
Authorize deployment to <environment>? [REMOTE WRITE]
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
For a production-role environment require the project's explicit production deployment gate:
|
|
144
|
+
For production require the project's explicit production deployment gate and the exact installed tool phrase. Keep the consequence visible as:
|
|
161
145
|
|
|
162
146
|
```text
|
|
163
|
-
|
|
147
|
+
[PRODUCTION WRITE]
|
|
164
148
|
```
|
|
165
149
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
No requirements approval, code review, PR merge, CI pass, environment selection, prior deployment, or readiness result implicitly authorizes this deployment.
|
|
150
|
+
Do not translate a generic `approve` into a broader tool-specific phrase unless the user clearly authorized the exact reviewed deployment operation represented by that phrase.
|
|
169
151
|
|
|
170
152
|
## 8. Execute only the approved script contract
|
|
171
153
|
|
|
172
|
-
After authorization
|
|
154
|
+
After authorization invoke only the repository-provided launcher with the explicitly selected environment and approved artifact inputs.
|
|
173
155
|
|
|
174
|
-
Do not perform unrelated host provisioning, target rebinding, firewall changes, credential creation, destructive recovery, or other out-of-band
|
|
156
|
+
Do not perform unrelated host provisioning, target rebinding, firewall changes, credential creation, destructive recovery, database restore, or other out-of-band writes as part of `/deploy` unless they are explicitly inside the reviewed deterministic deployment contract.
|
|
175
157
|
|
|
176
|
-
If the script reports missing prerequisites, identity mismatch, unexpected target OS, lock contention, migration failure, readiness failure, or another blocker, stop according to the repository
|
|
158
|
+
If the script reports missing prerequisites, identity mismatch, unexpected target OS, lock contention, migration failure, readiness failure, stale plan/evidence, or another blocker, stop according to the repository contract. Never redirect to another environment or host.
|
|
177
159
|
|
|
178
160
|
## 9. Verify and record outcome
|
|
179
161
|
|
|
180
|
-
After
|
|
162
|
+
After execution, use repository-provided readiness/smoke/evidence commands when available.
|
|
181
163
|
|
|
182
|
-
Report
|
|
164
|
+
Report only evidence-backed outcomes:
|
|
183
165
|
|
|
184
|
-
- selected environment
|
|
185
|
-
- verified target identity/label
|
|
186
|
-
-
|
|
187
|
-
-
|
|
188
|
-
-
|
|
189
|
-
-
|
|
166
|
+
- selected environment;
|
|
167
|
+
- verified target identity/label;
|
|
168
|
+
- deployment baseline/tool identity when relevant;
|
|
169
|
+
- release/artifact identity;
|
|
170
|
+
- deployment result;
|
|
171
|
+
- readiness/smoke result;
|
|
172
|
+
- rollback/recovery outcome when applicable.
|
|
190
173
|
|
|
191
|
-
Do not report success merely because a command returned or a container/process started if
|
|
174
|
+
Do not report success merely because a command returned or a container/process started if stronger readiness evidence is required.
|
|
192
175
|
|
|
193
|
-
Application rollback
|
|
176
|
+
Application rollback, database restore, destructive recovery, and environment tear-down remain separate decisions when the repository contract makes them separate.
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
---
|
|
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.
|
|
4
|
+
argument-hint: "[optional exact package version]"
|
|
5
|
+
user-invocable: true
|
|
6
|
+
disable-model-invocation: true
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Lean Update
|
|
10
|
+
|
|
11
|
+
`/lean-update` is the normal update workflow for consumers that contain `LEAN_BASELINE.json` and were installed/generated from the public Lean package.
|
|
12
|
+
|
|
13
|
+
The governing rule is:
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
package-managed consumer
|
|
17
|
+
→ update the whole Lean profile through the published package
|
|
18
|
+
→ keep LEAN_BASELINE.json + component baselines coherent
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Do not replace this with direct Core-only or Deployment-Kit-only synchronization when `LEAN_BASELINE.json` is present.
|
|
22
|
+
|
|
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
|
+
|
|
25
|
+
## 1. Establish package-managed provenance
|
|
26
|
+
|
|
27
|
+
From the consumer root read:
|
|
28
|
+
|
|
29
|
+
- `LEAN_BASELINE.json`;
|
|
30
|
+
- `CORE_BASELINE.json` when present;
|
|
31
|
+
- `DEPLOYMENT_BASELINE.json` when present;
|
|
32
|
+
- current Git status, branch, remotes, and default branch when observable.
|
|
33
|
+
|
|
34
|
+
Require `LEAN_BASELINE.json` to identify:
|
|
35
|
+
|
|
36
|
+
- package name;
|
|
37
|
+
- installed package version;
|
|
38
|
+
- profile;
|
|
39
|
+
- recorded Core component commit/version/distribution;
|
|
40
|
+
- recorded Deployment component commit/distribution when that component is present.
|
|
41
|
+
|
|
42
|
+
If `LEAN_BASELINE.json` is absent, report `NOT A PACKAGE-MANAGED LEAN CONSUMER` and stop. A Core-only consumer may use `/core-sync`; another component-only consumer must use that component's canonical compatibility path.
|
|
43
|
+
|
|
44
|
+
Do not synthesize or repair missing umbrella provenance by hand.
|
|
45
|
+
|
|
46
|
+
## 2. Verify the installed package baseline first
|
|
47
|
+
|
|
48
|
+
Before planning an update, verify that the current managed state still matches the exact installed package version recorded in `LEAN_BASELINE.json`.
|
|
49
|
+
|
|
50
|
+
For the standard package this is equivalent to:
|
|
51
|
+
|
|
52
|
+
```text
|
|
53
|
+
npx --yes @mriekki/lean@<installed-version> check
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Use the package identity recorded by the baseline rather than silently substituting another package.
|
|
57
|
+
|
|
58
|
+
If the exact installed package cannot be obtained, or `check` reports stale/drifted Core, Deployment, or umbrella metadata, stop. Do not use an update as a way to overwrite unexplained managed drift.
|
|
59
|
+
|
|
60
|
+
Also inspect Git state. Preserve unrelated consumer work; never auto-stash, reset, clean, rebase, force-update, or discard it.
|
|
61
|
+
|
|
62
|
+
## 3. Resolve one exact target package
|
|
63
|
+
|
|
64
|
+
If the human supplied an exact version, use that exact version after confirming it exists.
|
|
65
|
+
|
|
66
|
+
Otherwise resolve the registry's current published version first, then pin that exact value for the remainder of the operation. For the standard package, typical read-only evidence is:
|
|
67
|
+
|
|
68
|
+
```text
|
|
69
|
+
npm view @mriekki/lean@latest version --json
|
|
70
|
+
npm view @mriekki/lean@<resolved-version> dist.integrity --json
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
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
|
+
|
|
75
|
+
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.
|
|
76
|
+
|
|
77
|
+
If the resolved target is semantically older than the installed package, report `LEAN DOWNGRADE REQUESTED` and stop. Normal `/lean-update` does not authorize a downgrade or rollback; that requires a separate explicit recovery/rollback decision with repository-specific evidence.
|
|
78
|
+
|
|
79
|
+
## 4. Preview the whole-profile update
|
|
80
|
+
|
|
81
|
+
Run the target package's update command without `--apply` and inspect the complete plan. For the standard package:
|
|
82
|
+
|
|
83
|
+
```text
|
|
84
|
+
npx --yes @mriekki/lean@<target-version> update
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Do not approve the package's interactive apply prompt during preview. When needed, invoke preview in the environment's non-interactive/read-only form so the printed plan is observed without applying it.
|
|
88
|
+
|
|
89
|
+
The preview must cover every component in the installed profile together. A managed conflict/drift in any component blocks the whole update.
|
|
90
|
+
|
|
91
|
+
Stop on unsafe states such as:
|
|
92
|
+
|
|
93
|
+
- `LOCAL_DRIFT`;
|
|
94
|
+
- `CONFLICT`;
|
|
95
|
+
- `LOCAL_MISSING`;
|
|
96
|
+
- `UNTRACKED_CONFLICT`;
|
|
97
|
+
- path collisions/conflicts;
|
|
98
|
+
- unaccepted Core `RETIRED_PATH`.
|
|
99
|
+
|
|
100
|
+
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
|
+
|
|
102
|
+
## 5. Present one bounded update choice
|
|
103
|
+
|
|
104
|
+
When the exact target package plan is safe, present:
|
|
105
|
+
|
|
106
|
+
```text
|
|
107
|
+
LEAN UPDATE READY
|
|
108
|
+
|
|
109
|
+
Installed: <package>@<installed-version>
|
|
110
|
+
Target: <package>@<target-version>
|
|
111
|
+
Profile: <profile>
|
|
112
|
+
Core: <old> → <new>
|
|
113
|
+
Deployment: <old> → <new> / unchanged
|
|
114
|
+
Managed drift/conflicts: NONE
|
|
115
|
+
|
|
116
|
+
1. Apply the exact Lean package update [GIT + FILE WRITE] — recommended
|
|
117
|
+
2. Keep inspecting only [READ ONLY]
|
|
118
|
+
3. Stop [NO ACTION]
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Choosing option 1 authorizes only:
|
|
122
|
+
|
|
123
|
+
- creation/switch to one repository-appropriate short-lived update branch when needed;
|
|
124
|
+
- exact target package apply;
|
|
125
|
+
- package/baseline verification;
|
|
126
|
+
- inspection of the resulting meaningful diff.
|
|
127
|
+
|
|
128
|
+
It does not authorize `/deliver`, merge, npm/Core/Deployment release publication, or deployment.
|
|
129
|
+
|
|
130
|
+
## 6. Apply only the exact previewed package
|
|
131
|
+
|
|
132
|
+
If the consumer is on its default branch, create/switch to a short-lived branch such as:
|
|
133
|
+
|
|
134
|
+
```text
|
|
135
|
+
chore/update-lean-<target-version>
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Branch setup is routine inside the selected bounded update action when safe and unambiguous.
|
|
139
|
+
|
|
140
|
+
Apply using the same exact package version that was previewed, for example:
|
|
141
|
+
|
|
142
|
+
```text
|
|
143
|
+
npx --yes @mriekki/lean@<target-version> update --apply
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
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
|
+
|
|
148
|
+
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
|
+
|
|
150
|
+
## 7. Verify all baselines and the diff
|
|
151
|
+
|
|
152
|
+
After apply, run the exact target package check:
|
|
153
|
+
|
|
154
|
+
```text
|
|
155
|
+
npx --yes @mriekki/lean@<target-version> check
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Then inspect:
|
|
159
|
+
|
|
160
|
+
```text
|
|
161
|
+
git status --short --branch
|
|
162
|
+
git diff --stat
|
|
163
|
+
git diff -- LEAN_BASELINE.json CORE_BASELINE.json DEPLOYMENT_BASELINE.json
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Confirm:
|
|
167
|
+
|
|
168
|
+
- `LEAN_BASELINE.json` records the exact target package/version/profile;
|
|
169
|
+
- component baseline commits/distributions match the umbrella baseline;
|
|
170
|
+
- package check passes for the whole profile;
|
|
171
|
+
- consumer-owned content was not overwritten;
|
|
172
|
+
- only intended package-managed changes and reviewed ownership transfers occurred.
|
|
173
|
+
|
|
174
|
+
Present the meaningful diff for human review. After acceptance, recommend `/deliver` for normal commit/push/PR/CI mechanics.
|
|
175
|
+
|
|
176
|
+
## 8. Boundaries
|
|
177
|
+
|
|
178
|
+
`/lean-update` never:
|
|
179
|
+
|
|
180
|
+
- updates only Core or only Deployment when `LEAN_BASELINE.json` manages them together;
|
|
181
|
+
- uses a different package version for apply than the reviewed preview;
|
|
182
|
+
- performs a downgrade/rollback as an ordinary update;
|
|
183
|
+
- overwrites unexplained managed drift;
|
|
184
|
+
- auto-accepts Core retired-path ownership transfer;
|
|
185
|
+
- publishes npm/Core/Deployment releases or tags;
|
|
186
|
+
- merges the consumer PR;
|
|
187
|
+
- deploys an environment.
|
|
188
|
+
|
|
189
|
+
If reusable shared content is wrong rather than merely outdated, route the defect through `/upstream-fix` first. Package-managed adoption of the accepted fix happens only after an accepted Lean package release contains that upstream commit.
|