@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,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"package": "@mriekki/lean",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.0",
|
|
5
5
|
"components": {
|
|
6
6
|
"core": {
|
|
7
7
|
"repository": "mriekki/lean-agentic-core",
|
|
8
|
-
"commit": "
|
|
9
|
-
"version": "1.
|
|
8
|
+
"commit": "5b2f13bb188f74fa0d7b6b8d7985fe3abfc543f9",
|
|
9
|
+
"version": "1.11.0",
|
|
10
10
|
"distribution": "greenfield-workspace",
|
|
11
11
|
"files": [
|
|
12
12
|
{
|
|
@@ -79,15 +79,20 @@
|
|
|
79
79
|
"destination": ".github/skills/pull-latest/SKILL.md",
|
|
80
80
|
"sha256": "d49321859fe37afeb5d9e0b39ceac3d8a6709f6e02efd19b6cac37842fe3aa37"
|
|
81
81
|
},
|
|
82
|
+
{
|
|
83
|
+
"source": "core/skills/lean-update/SKILL.md",
|
|
84
|
+
"destination": ".github/skills/lean-update/SKILL.md",
|
|
85
|
+
"sha256": "b9534533c2b612f2787ce4b9d40494bd5a3554ccb646f500610fb899be8113d2"
|
|
86
|
+
},
|
|
82
87
|
{
|
|
83
88
|
"source": "core/skills/core-sync/SKILL.md",
|
|
84
89
|
"destination": ".github/skills/core-sync/SKILL.md",
|
|
85
|
-
"sha256": "
|
|
90
|
+
"sha256": "0c1bfbc7678f5ae3239dd2900a12e75584035a5338474181dbd81cb1a0813531"
|
|
86
91
|
},
|
|
87
92
|
{
|
|
88
93
|
"source": "core/skills/upstream-fix/SKILL.md",
|
|
89
94
|
"destination": ".github/skills/upstream-fix/SKILL.md",
|
|
90
|
-
"sha256": "
|
|
95
|
+
"sha256": "d6b77eee298bf387e20156c6ff7b3904e3f925873699f7e1071515d9d69c2f03"
|
|
91
96
|
},
|
|
92
97
|
{
|
|
93
98
|
"source": "core/skills/wait-what/SKILL.md",
|
|
@@ -102,7 +107,7 @@
|
|
|
102
107
|
{
|
|
103
108
|
"source": "core/skills/deploy/SKILL.md",
|
|
104
109
|
"destination": ".github/skills/deploy/SKILL.md",
|
|
105
|
-
"sha256": "
|
|
110
|
+
"sha256": "e9dcf7232505d684c1d8f39b0937c5026223e745df023c84295457e22da1b52a"
|
|
106
111
|
},
|
|
107
112
|
{
|
|
108
113
|
"source": "core/skills/tear-down/SKILL.md",
|
|
@@ -244,137 +249,137 @@
|
|
|
244
249
|
{
|
|
245
250
|
"source": "distribution/lean-poc-deploy.py",
|
|
246
251
|
"destination": "tools/lean-deployment/lean-poc-deploy.py",
|
|
247
|
-
"sha256": "
|
|
252
|
+
"sha256": "4f300e1de447f6b8ecd57f561bdf000743baaa39051aa359f65d0a051be2e220"
|
|
248
253
|
},
|
|
249
254
|
{
|
|
250
255
|
"source": "src/lean_poc_deployment/__init__.py",
|
|
251
256
|
"destination": "tools/lean-deployment/lean_poc_deployment/__init__.py",
|
|
252
|
-
"sha256": "
|
|
257
|
+
"sha256": "47695e1cc417117ee5d5e7b85d3301fd0dc99963eacfedbe499f3798d28dee72"
|
|
253
258
|
},
|
|
254
259
|
{
|
|
255
260
|
"source": "src/lean_poc_deployment/__main__.py",
|
|
256
261
|
"destination": "tools/lean-deployment/lean_poc_deployment/__main__.py",
|
|
257
|
-
"sha256": "
|
|
262
|
+
"sha256": "8742c1b766812edb07174a724d676ffeff58b71b3c192d35102a3e652e962946"
|
|
258
263
|
},
|
|
259
264
|
{
|
|
260
265
|
"source": "src/lean_poc_deployment/app_cli.py",
|
|
261
266
|
"destination": "tools/lean-deployment/lean_poc_deployment/app_cli.py",
|
|
262
|
-
"sha256": "
|
|
267
|
+
"sha256": "29cf78cd27302341d5fe74877e6b4e211a465bb9991fc720585122f7d4b49190"
|
|
263
268
|
},
|
|
264
269
|
{
|
|
265
270
|
"source": "src/lean_poc_deployment/app_runtime.py",
|
|
266
271
|
"destination": "tools/lean-deployment/lean_poc_deployment/app_runtime.py",
|
|
267
|
-
"sha256": "
|
|
272
|
+
"sha256": "68c623735fc45b6d20cdfc5c110cfa41a4540f030da479d355b456a1e13a21a3"
|
|
268
273
|
},
|
|
269
274
|
{
|
|
270
275
|
"source": "src/lean_poc_deployment/app_runtime_remote.py",
|
|
271
276
|
"destination": "tools/lean-deployment/lean_poc_deployment/app_runtime_remote.py",
|
|
272
|
-
"sha256": "
|
|
277
|
+
"sha256": "f3ccde6ed3c6e5fe185a9a0f032a5c924fa0906e3619e12d0ad6228c1210f8ec"
|
|
273
278
|
},
|
|
274
279
|
{
|
|
275
280
|
"source": "src/lean_poc_deployment/box_platform.py",
|
|
276
281
|
"destination": "tools/lean-deployment/lean_poc_deployment/box_platform.py",
|
|
277
|
-
"sha256": "
|
|
282
|
+
"sha256": "163c022bbd8ecccadebbebdc8cef8e272fc95dd0dc3cdb35d4e6e10013c91040"
|
|
278
283
|
},
|
|
279
284
|
{
|
|
280
285
|
"source": "src/lean_poc_deployment/box_platform_assets.py",
|
|
281
286
|
"destination": "tools/lean-deployment/lean_poc_deployment/box_platform_assets.py",
|
|
282
|
-
"sha256": "
|
|
287
|
+
"sha256": "07ef27a63ebff9fb2a810d0c40dd601e14f767c6f8faaedcedd54bb3b79ffef4"
|
|
283
288
|
},
|
|
284
289
|
{
|
|
285
290
|
"source": "src/lean_poc_deployment/box_platform_remote.py",
|
|
286
291
|
"destination": "tools/lean-deployment/lean_poc_deployment/box_platform_remote.py",
|
|
287
|
-
"sha256": "
|
|
292
|
+
"sha256": "1702614cada6f0829abe1d412d8a90f7452c96db2f2693631d20cdb08de29aaa"
|
|
288
293
|
},
|
|
289
294
|
{
|
|
290
295
|
"source": "src/lean_poc_deployment/cli.py",
|
|
291
296
|
"destination": "tools/lean-deployment/lean_poc_deployment/cli.py",
|
|
292
|
-
"sha256": "
|
|
297
|
+
"sha256": "a30230969a27ec0df67f311694c13c91520f11104ceae2906cc9f5f46e6f8b23"
|
|
293
298
|
},
|
|
294
299
|
{
|
|
295
300
|
"source": "src/lean_poc_deployment/doctor.py",
|
|
296
301
|
"destination": "tools/lean-deployment/lean_poc_deployment/doctor.py",
|
|
297
|
-
"sha256": "
|
|
302
|
+
"sha256": "139914e437832fd8c5b8d2d8d6fc0ef8aa004862fde45989547e572c461f299d"
|
|
298
303
|
},
|
|
299
304
|
{
|
|
300
305
|
"source": "src/lean_poc_deployment/entrypoint.py",
|
|
301
306
|
"destination": "tools/lean-deployment/lean_poc_deployment/entrypoint.py",
|
|
302
|
-
"sha256": "
|
|
307
|
+
"sha256": "08a27a64680f7a72b68c6272f5185c7fdb23678efbda456fd0894272e2e6187e"
|
|
303
308
|
},
|
|
304
309
|
{
|
|
305
310
|
"source": "src/lean_poc_deployment/errors.py",
|
|
306
311
|
"destination": "tools/lean-deployment/lean_poc_deployment/errors.py",
|
|
307
|
-
"sha256": "
|
|
312
|
+
"sha256": "0bc20b1b739f999960422b7bd05249f4179f3612910ecbb6cf2805b5f4babd61"
|
|
308
313
|
},
|
|
309
314
|
{
|
|
310
315
|
"source": "src/lean_poc_deployment/keys.py",
|
|
311
316
|
"destination": "tools/lean-deployment/lean_poc_deployment/keys.py",
|
|
312
|
-
"sha256": "
|
|
317
|
+
"sha256": "5a85bb6941957c45eb3c30ef1f350b669932287b9e2f4a23178260c72009e26c"
|
|
313
318
|
},
|
|
314
319
|
{
|
|
315
320
|
"source": "src/lean_poc_deployment/profiles.py",
|
|
316
321
|
"destination": "tools/lean-deployment/lean_poc_deployment/profiles.py",
|
|
317
|
-
"sha256": "
|
|
322
|
+
"sha256": "9d73f86714db5c59a07354348e394647d62a3c31b173c4d3c4c4353872da908a"
|
|
318
323
|
},
|
|
319
324
|
{
|
|
320
325
|
"source": "src/lean_poc_deployment/teardown.py",
|
|
321
326
|
"destination": "tools/lean-deployment/lean_poc_deployment/teardown.py",
|
|
322
|
-
"sha256": "
|
|
327
|
+
"sha256": "edcf921aa92988176b756abf4bbc9b0b83ae1d855b6e8d487b67aaad7727cb55"
|
|
323
328
|
},
|
|
324
329
|
{
|
|
325
330
|
"source": "src/lean_poc_deployment/teardown_cli.py",
|
|
326
331
|
"destination": "tools/lean-deployment/lean_poc_deployment/teardown_cli.py",
|
|
327
|
-
"sha256": "
|
|
332
|
+
"sha256": "ec1271db5f57135189892e87f2df3ffc5fcb6e763ff1eb9604bc4e50788c3325"
|
|
328
333
|
},
|
|
329
334
|
{
|
|
330
335
|
"source": "src/lean_poc_deployment/teardown_remote.py",
|
|
331
336
|
"destination": "tools/lean-deployment/lean_poc_deployment/teardown_remote.py",
|
|
332
|
-
"sha256": "
|
|
337
|
+
"sha256": "9745fd9f721eea2da8f5d32688cc6a293e46aa9f9e5c5825c6a08cacb1121fb1"
|
|
333
338
|
},
|
|
334
339
|
{
|
|
335
340
|
"source": "src/lean_poc_deployment/route_registry.py",
|
|
336
341
|
"destination": "tools/lean-deployment/lean_poc_deployment/route_registry.py",
|
|
337
|
-
"sha256": "
|
|
342
|
+
"sha256": "8c19da6790fac66d0cb8fe099fb09c026966a6e5952df58bd936ce03a72f1928"
|
|
338
343
|
},
|
|
339
344
|
{
|
|
340
345
|
"source": "src/lean_poc_deployment/route_registry_remote.py",
|
|
341
346
|
"destination": "tools/lean-deployment/lean_poc_deployment/route_registry_remote.py",
|
|
342
|
-
"sha256": "
|
|
347
|
+
"sha256": "84c37f417ff21f05e7802acef33f4927c878e92f7ae791462eef77281f052bdf"
|
|
343
348
|
},
|
|
344
349
|
{
|
|
345
350
|
"source": "src/lean_poc_deployment/security.py",
|
|
346
351
|
"destination": "tools/lean-deployment/lean_poc_deployment/security.py",
|
|
347
|
-
"sha256": "
|
|
352
|
+
"sha256": "f0946186e384794c81a78fbf50b6afdbbd79a0b22216034778fbb24d523696b6"
|
|
348
353
|
},
|
|
349
354
|
{
|
|
350
355
|
"source": "src/lean_poc_deployment/sqlite_adapter.py",
|
|
351
356
|
"destination": "tools/lean-deployment/lean_poc_deployment/sqlite_adapter.py",
|
|
352
|
-
"sha256": "
|
|
357
|
+
"sha256": "b6f5fd33b776a1fb02d6b6a00fbab0b95827946e5fee51aafef9446fa084f42b"
|
|
353
358
|
},
|
|
354
359
|
{
|
|
355
360
|
"source": "src/lean_poc_deployment/sqlite_adapter_remote.py",
|
|
356
361
|
"destination": "tools/lean-deployment/lean_poc_deployment/sqlite_adapter_remote.py",
|
|
357
|
-
"sha256": "
|
|
362
|
+
"sha256": "77feaf6d60632375be4407145741244198f1836eff02e2d8c85f86c8d2c374e2"
|
|
358
363
|
},
|
|
359
364
|
{
|
|
360
365
|
"source": "src/lean_poc_deployment/sqlite_cli.py",
|
|
361
366
|
"destination": "tools/lean-deployment/lean_poc_deployment/sqlite_cli.py",
|
|
362
|
-
"sha256": "
|
|
367
|
+
"sha256": "0b68c0cd8c92a7e59071b6f922fe6bbf38d03276387856d1efa743118467bbca"
|
|
363
368
|
},
|
|
364
369
|
{
|
|
365
370
|
"source": "src/lean_poc_deployment/sqlite_import_recovery.py",
|
|
366
371
|
"destination": "tools/lean-deployment/lean_poc_deployment/sqlite_import_recovery.py",
|
|
367
|
-
"sha256": "
|
|
372
|
+
"sha256": "8bba9aeb1ff2aca5360972a3f66e3dd8e3dc3a6484f5091af201f447454ab4f5"
|
|
368
373
|
},
|
|
369
374
|
{
|
|
370
375
|
"source": "src/lean_poc_deployment/ssh.py",
|
|
371
376
|
"destination": "tools/lean-deployment/lean_poc_deployment/ssh.py",
|
|
372
|
-
"sha256": "
|
|
377
|
+
"sha256": "9eb568ec75a288b1069e629c67d567d5bb0a7a2074563c70f49057326154f7d2"
|
|
373
378
|
},
|
|
374
379
|
{
|
|
375
380
|
"source": "src/lean_poc_deployment/trust.py",
|
|
376
381
|
"destination": "tools/lean-deployment/lean_poc_deployment/trust.py",
|
|
377
|
-
"sha256": "
|
|
382
|
+
"sha256": "b143fa828c3a23df3909dacfd78ae56b9ec1159628eb45261d69c0aa6ddd1a7b"
|
|
378
383
|
}
|
|
379
384
|
]
|
|
380
385
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: core-sync
|
|
3
|
-
description:
|
|
3
|
+
description: Compatibility Core-to-consumer synchronization for component-only consumers; package-managed consumers are routed to /lean-update so umbrella and component baselines remain coherent.
|
|
4
4
|
argument-hint: "[optional local Core path]"
|
|
5
5
|
user-invocable: true
|
|
6
6
|
disable-model-invocation: true
|
|
@@ -8,55 +8,74 @@ disable-model-invocation: true
|
|
|
8
8
|
|
|
9
9
|
# Core Sync
|
|
10
10
|
|
|
11
|
-
`/core-sync`
|
|
11
|
+
`/core-sync` is the compatibility synchronization path for consumers that are managed directly by `CORE_BASELINE.json` **without** an umbrella `LEAN_BASELINE.json`.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
For package-managed consumers, `/lean-update` is authoritative.
|
|
14
14
|
|
|
15
|
-
Invocation starts read-only.
|
|
15
|
+
Invocation starts read-only. Direct component synchronization must never make a package-managed consumer disagree with its recorded Lean package provenance.
|
|
16
16
|
|
|
17
|
-
## 1.
|
|
17
|
+
## 1. Classify the consumer before doing anything else
|
|
18
18
|
|
|
19
|
-
From the consumer repository,
|
|
19
|
+
From the consumer repository read, when present:
|
|
20
20
|
|
|
21
|
-
- `
|
|
22
|
-
-
|
|
23
|
-
- `.github/lean-
|
|
21
|
+
- `LEAN_BASELINE.json`;
|
|
22
|
+
- `CORE_BASELINE.json`;
|
|
23
|
+
- `.github/lean-workspace.json`;
|
|
24
|
+
- `.github/lean-core-sync.json`;
|
|
24
25
|
- current Git status, branch, remotes, and default branch when observable.
|
|
25
26
|
|
|
27
|
+
### Package-managed consumer
|
|
28
|
+
|
|
29
|
+
If `LEAN_BASELINE.json` exists:
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
PACKAGE-MANAGED LEAN CONSUMER
|
|
33
|
+
Direct Core sync: NOT PERMITTED
|
|
34
|
+
Next: /lean-update
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Stop before refreshing a Core checkout, running `tools/package/sync.py`, creating a sync branch, or sending a remote `[sync-core]` request.
|
|
38
|
+
|
|
39
|
+
The umbrella package updates Core and Deployment components together and refreshes `LEAN_BASELINE.json`, `CORE_BASELINE.json`, and `DEPLOYMENT_BASELINE.json` coherently. A Core-only sync would bypass that contract.
|
|
40
|
+
|
|
41
|
+
### Component-only Core consumer
|
|
42
|
+
|
|
43
|
+
If `LEAN_BASELINE.json` is absent and a valid `CORE_BASELINE.json` exists, continue with the compatibility path below.
|
|
44
|
+
|
|
45
|
+
If neither baseline exists, report `CORE SYNC BLOCKED`; do not invent provenance or initialize a consumer implicitly.
|
|
46
|
+
|
|
47
|
+
## 2. Establish the component-only Core baseline
|
|
48
|
+
|
|
26
49
|
Run the repository-local integrity check before planning an update:
|
|
27
50
|
|
|
28
51
|
```text
|
|
29
52
|
python tools/lean-core/check-core-baseline.py --root .
|
|
30
53
|
```
|
|
31
54
|
|
|
32
|
-
Stop if the
|
|
55
|
+
Stop if the managed overlay has unexplained local drift, missing managed files, or invalid baseline metadata.
|
|
33
56
|
|
|
34
57
|
Resolve from `CORE_BASELINE.json`:
|
|
35
58
|
|
|
36
|
-
- canonical Core repository
|
|
37
|
-
- currently accepted Core commit/version
|
|
38
|
-
- distribution name
|
|
59
|
+
- canonical Core repository;
|
|
60
|
+
- currently accepted Core commit/version;
|
|
61
|
+
- distribution name;
|
|
39
62
|
- managed-path ownership/hashes.
|
|
40
63
|
|
|
41
|
-
##
|
|
64
|
+
## 3. Resolve the Core source safely
|
|
42
65
|
|
|
43
66
|
Check local candidates in this order:
|
|
44
67
|
|
|
45
|
-
1. an explicit Core path supplied by the human
|
|
46
|
-
2. an already-open workspace folder that unambiguously resolves to the recorded Core repository
|
|
68
|
+
1. an explicit Core path supplied by the human;
|
|
69
|
+
2. an already-open workspace folder that unambiguously resolves to the recorded Core repository;
|
|
47
70
|
3. the sibling checkout derived from the Core repository name, normally `../lean-agentic-core`.
|
|
48
71
|
|
|
49
|
-
Do not broadly scan the
|
|
50
|
-
|
|
51
|
-
A local candidate is usable only when:
|
|
72
|
+
Do not broadly scan the filesystem. A local Core checkout is an optimization, not a prerequisite.
|
|
52
73
|
|
|
53
|
-
|
|
54
|
-
- its configured remote resolves to the Core repository recorded in `CORE_BASELINE.json`,
|
|
55
|
-
- its repository state can be inspected safely.
|
|
74
|
+
A local candidate is usable only when it is the recorded Git repository and its state can be inspected safely.
|
|
56
75
|
|
|
57
|
-
If no usable local Core checkout exists, use the configured remote provider from `.github/lean-core-sync.json` when available. Do not ask the developer to clone Core
|
|
76
|
+
If no usable local Core checkout exists, use the configured remote provider from `.github/lean-core-sync.json` when available. Do not ask the developer to clone Core merely to satisfy `/core-sync`.
|
|
58
77
|
|
|
59
|
-
##
|
|
78
|
+
## 4. Classify a local Core checkout
|
|
60
79
|
|
|
61
80
|
Before modifying a local Core checkout inspect:
|
|
62
81
|
|
|
@@ -67,49 +86,35 @@ git -C <core-path> remote -v
|
|
|
67
86
|
git -C <core-path> branch -vv
|
|
68
87
|
```
|
|
69
88
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
- the worktree is clean,
|
|
73
|
-
- no merge/rebase/cherry-pick is in progress,
|
|
74
|
-
- the checkout is on its normal accepted/default branch,
|
|
75
|
-
- an unambiguous upstream exists,
|
|
76
|
-
- updating can be performed fast-forward-only.
|
|
89
|
+
It may be refreshed automatically only when clean, on its normal accepted/default branch, backed by an unambiguous upstream, and fast-forward-safe.
|
|
77
90
|
|
|
78
91
|
Never auto-stash, merge, rebase, reset, clean, force-update, or discard Core work.
|
|
79
92
|
|
|
80
|
-
If the
|
|
81
|
-
|
|
82
|
-
## 4. Present one bounded sync choice
|
|
93
|
+
If the checkout is dirty, ahead, diverged, intentionally pinned, or ambiguous, preserve it unchanged and prefer the configured remote provider when available.
|
|
83
94
|
|
|
84
|
-
|
|
95
|
+
## 5. Present one bounded compatibility-sync choice
|
|
85
96
|
|
|
86
|
-
|
|
97
|
+
For a safe local source:
|
|
87
98
|
|
|
88
99
|
```text
|
|
89
|
-
CORE SYNC READY
|
|
100
|
+
CORE COMPATIBILITY SYNC READY
|
|
90
101
|
|
|
91
102
|
Consumer baseline: <commit/version>
|
|
92
103
|
Source: LOCAL <core-path>
|
|
93
|
-
Local Core state: CURRENT | FAST-FORWARDABLE
|
|
94
104
|
Distribution: <distribution>
|
|
95
105
|
|
|
96
|
-
1. Sync
|
|
106
|
+
1. Sync the component-only Core baseline [GIT + FILE WRITE] — recommended
|
|
97
107
|
2. Keep inspecting only [READ ONLY]
|
|
98
108
|
3. Stop [NO ACTION]
|
|
99
109
|
```
|
|
100
110
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
### No safe local Core available, remote provider configured
|
|
104
|
-
|
|
105
|
-
Present:
|
|
111
|
+
For a configured remote source:
|
|
106
112
|
|
|
107
113
|
```text
|
|
108
|
-
CORE SYNC READY
|
|
114
|
+
CORE COMPATIBILITY SYNC READY
|
|
109
115
|
|
|
110
116
|
Consumer baseline: <commit/version>
|
|
111
117
|
Source: REMOTE PROVIDER
|
|
112
|
-
Local Core: NOT REQUIRED
|
|
113
118
|
Provider: <provider repository>
|
|
114
119
|
|
|
115
120
|
1. Request remote Core sync [REMOTE WRITE] — recommended
|
|
@@ -117,70 +122,35 @@ Provider: <provider repository>
|
|
|
117
122
|
3. Stop [NO ACTION]
|
|
118
123
|
```
|
|
119
124
|
|
|
120
|
-
|
|
125
|
+
The selected choice does not authorize merge, release publication, or deployment.
|
|
121
126
|
|
|
122
|
-
|
|
127
|
+
## 6. Local compatibility path
|
|
123
128
|
|
|
124
|
-
|
|
129
|
+
After local option 1 is selected:
|
|
125
130
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
After option 1 is selected:
|
|
129
|
-
|
|
130
|
-
1. Refresh the local Core remote state.
|
|
131
|
+
1. Refresh Core remote state.
|
|
131
132
|
2. Reclassify the accepted/default Core branch.
|
|
132
|
-
3.
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
4. If Core is ahead, diverged, dirty, or otherwise unsafe after refresh, stop without changing the consumer and prefer the configured remote provider when available.
|
|
139
|
-
5. Run a Core sync preview from the refreshed checkout using the distribution recorded by the consumer baseline.
|
|
140
|
-
6. Stop without apply on any unsafe sync state, including `LOCAL_DRIFT`, `CONFLICT`, `LOCAL_MISSING`, `UNTRACKED_CONFLICT`, or an unaccepted `RETIRED_PATH`.
|
|
141
|
-
7. If the consumer is on its default branch, create/switch to a repository-appropriate short-lived chore branch such as `chore/sync-core-<version-or-short-sha>`. This branch setup is routine inside the selected bounded sync action.
|
|
142
|
-
8. Apply only the safe Core additions/updates and refresh `CORE_BASELINE.json` using Core's canonical `tools/package/sync.py` contract.
|
|
133
|
+
3. Fast-forward it only when safe.
|
|
134
|
+
4. Run canonical Core sync preview using the distribution recorded by the baseline.
|
|
135
|
+
5. Stop on `LOCAL_DRIFT`, `CONFLICT`, `LOCAL_MISSING`, `UNTRACKED_CONFLICT`, or an unaccepted `RETIRED_PATH`.
|
|
136
|
+
6. If the consumer is on its default branch, create/switch to a short-lived branch such as `chore/sync-core-<version-or-short-sha>`.
|
|
137
|
+
7. Apply only safe Core additions/updates and refresh `CORE_BASELINE.json` using canonical `tools/package/sync.py`.
|
|
143
138
|
|
|
144
|
-
Do not manually copy
|
|
139
|
+
Do not manually copy managed files as a substitute for the canonical tool.
|
|
145
140
|
|
|
146
|
-
##
|
|
141
|
+
## 7. Remote compatibility path
|
|
147
142
|
|
|
148
|
-
Remote orchestration is consumer configuration
|
|
149
|
-
|
|
150
|
-
```json
|
|
151
|
-
{
|
|
152
|
-
"schemaVersion": 1,
|
|
153
|
-
"remote": {
|
|
154
|
-
"type": "github-issue-control-plane",
|
|
155
|
-
"repository": "owner/control-plane-repo",
|
|
156
|
-
"titleTemplate": "[sync-core] {owner}/{repository}",
|
|
157
|
-
"requireEmptyBody": true
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
```
|
|
143
|
+
Remote orchestration is consumer configuration. Read `.github/lean-core-sync.json` and require its configured provider contract, for example `github-issue-control-plane` with an owner/repository title template and an empty body.
|
|
161
144
|
|
|
162
|
-
|
|
145
|
+
Create exactly the configured request. Do not put product requirements, baseline JSON, source code, secrets, or other private consumer details into a public request.
|
|
163
146
|
|
|
164
|
-
|
|
147
|
+
The provider is expected to validate target authorization, obtain its own short-lived credentials, run canonical Core sync, refuse unsafe drift/conflicts, publish a short-lived consumer branch/PR, and observe consumer CI.
|
|
165
148
|
|
|
166
|
-
|
|
149
|
+
If the provider cannot satisfy that contract, report `REMOTE SYNC UNAVAILABLE`; do not silently clone Core or invent another synchronization mechanism.
|
|
167
150
|
|
|
168
|
-
|
|
169
|
-
- obtain its own short-lived source/target credentials,
|
|
170
|
-
- resolve the accepted Core source,
|
|
171
|
-
- run the canonical Core sync contract against the target consumer,
|
|
172
|
-
- refuse unsafe consumer drift/conflicts,
|
|
173
|
-
- update exact Core provenance,
|
|
174
|
-
- publish the result on a short-lived consumer branch and PR,
|
|
175
|
-
- run/observe consumer CI.
|
|
151
|
+
## 8. Verification
|
|
176
152
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
## 7. Verification
|
|
180
|
-
|
|
181
|
-
### Local path
|
|
182
|
-
|
|
183
|
-
After apply, run:
|
|
153
|
+
For a local apply run:
|
|
184
154
|
|
|
185
155
|
```text
|
|
186
156
|
python tools/lean-core/check-core-baseline.py --root .
|
|
@@ -189,32 +159,20 @@ git diff --stat
|
|
|
189
159
|
git diff -- CORE_BASELINE.json
|
|
190
160
|
```
|
|
191
161
|
|
|
192
|
-
Confirm
|
|
193
|
-
|
|
194
|
-
- managed paths match the refreshed hashes,
|
|
195
|
-
- consumer-owned paths were not overwritten,
|
|
196
|
-
- the baseline records the exact Core commit actually applied,
|
|
197
|
-
- only the intended sync branch changed.
|
|
198
|
-
|
|
199
|
-
Present the meaningful diff for human review. After acceptance, recommend `/deliver` for normal commit/push/PR/CI mechanics.
|
|
200
|
-
|
|
201
|
-
### Remote path
|
|
202
|
-
|
|
203
|
-
Observe the provider result when available. Report the target branch/PR and exact Core commit applied. The human reviews the consumer PR and retains the normal explicit merge/finalize gate.
|
|
162
|
+
Confirm exact Core provenance, managed hashes, consumer-owned preservation, and intended branch scope. Present the meaningful diff and recommend `/deliver` after human acceptance.
|
|
204
163
|
|
|
205
|
-
|
|
164
|
+
For a remote path, report the resulting PR and exact Core commit when observed. Merge remains the normal explicit final gate.
|
|
206
165
|
|
|
207
|
-
##
|
|
166
|
+
## 9. Boundaries
|
|
208
167
|
|
|
209
168
|
`/core-sync` never:
|
|
210
169
|
|
|
211
|
-
-
|
|
212
|
-
-
|
|
213
|
-
-
|
|
214
|
-
- treats managed consumer drift as disposable
|
|
215
|
-
-
|
|
216
|
-
-
|
|
217
|
-
- merges the consumer sync PR without the normal explicit final gate,
|
|
170
|
+
- directly synchronizes Core when `LEAN_BASELINE.json` exists;
|
|
171
|
+
- uses direct Core sync as a substitute for `/lean-update`;
|
|
172
|
+
- modifies ambiguous local Core state;
|
|
173
|
+
- treats managed consumer drift as disposable;
|
|
174
|
+
- publishes Core or Lean package releases/tags;
|
|
175
|
+
- merges the consumer sync PR;
|
|
218
176
|
- deploys production.
|
|
219
177
|
|
|
220
|
-
If reusable Core
|
|
178
|
+
If reusable Core behavior itself is wrong, fix Core canonically through `/upstream-fix`; then adopt it through the update channel appropriate to the consumer's provenance model.
|