@mriekki/lean 0.4.3 → 0.4.5
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/assets/components.json +3 -3
- package/assets/core/distribution.json +8 -0
- package/assets/deployment/distribution.json +2 -0
- package/assets/generated/ASSEMBLY.json +73 -23
- package/assets/generated/core/core/instructions/lean-docs.instructions.md +33 -2
- package/assets/generated/core/core/instructions/lean-workflow.instructions.md +42 -0
- package/assets/generated/core/core/learning/DIAGRAM_GUIDE.md +46 -6
- package/assets/generated/core/core/learning/ENGINEERING_LEARNING_WORKBOOK.md +29 -6
- package/assets/generated/core/core/learning/LEARNING_MAP.md +37 -2
- package/assets/generated/core/core/learning/LEARNING_PROGRESS.md +15 -7
- package/assets/generated/core/core/learning/SYSTEM_DESIGN_DRILLS.md +299 -19
- package/assets/generated/core/core/process/COACHING_GUIDE.md +35 -2
- package/assets/generated/core/core/process/DATABASE_LEARNING_WORKBENCH.md +153 -102
- package/assets/generated/core/core/process/DEPLOYMENT_ENABLEMENT.md +108 -71
- package/assets/generated/core/core/process/LEAN_ENGINEERING_GUIDE.md +317 -0
- package/assets/generated/core/core/process/PROJECT_DOCUMENTATION_FRAMEWORK.md +324 -0
- package/assets/generated/core/core/process/SYSTEM_DESIGN_LEARNING_WORKBENCH.md +520 -0
- package/assets/generated/core/core/skills/coach/SKILL.md +31 -4
- package/assets/generated/core/core/skills/db-lab/SKILL.md +59 -16
- package/assets/generated/core/core/skills/deliver/SKILL.md +77 -5
- package/assets/generated/core/core/skills/deploy/SKILL.md +164 -121
- package/assets/generated/core/core/skills/deployment-readiness/SKILL.md +223 -250
- package/assets/generated/core/core/skills/docs/SKILL.md +116 -0
- package/assets/generated/core/core/skills/next-step/SKILL.md +21 -6
- package/assets/generated/core/core/skills/system-lab/SKILL.md +333 -0
- package/assets/generated/core/core/skills/tear-down/SKILL.md +101 -61
- package/assets/generated/core/core/templates/ADR_TEMPLATE.md +41 -0
- package/assets/generated/core/tools/docs_site/docs_site.py +382 -0
- package/assets/generated/core/tools/system_lab/system_workbench.py +243 -0
- package/assets/generated/deployment/src/lean_poc_deployment/entrypoint.py +5 -1
- package/assets/generated/deployment/src/lean_poc_deployment/local_cli.py +112 -0
- package/assets/generated/deployment/src/lean_poc_deployment/local_runtime.py +523 -0
- package/assets/generated/deployment/src/lean_poc_deployment/teardown.py +49 -35
- package/assets/generated/deployment/src/lean_poc_deployment/teardown_cli.py +31 -12
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: tear-down
|
|
3
|
-
description: "Guided destructive
|
|
4
|
-
argument-hint: "[local
|
|
3
|
+
description: "Guided destructive cleanup for local state, one exact named logical environment, or all explicitly configured POC environments. Preserves ownership boundaries and separate Production-data authorization."
|
|
4
|
+
argument-hint: "[local|<environment>|all]"
|
|
5
5
|
user-invocable: true
|
|
6
6
|
disable-model-invocation: true
|
|
7
7
|
---
|
|
@@ -10,129 +10,169 @@ disable-model-invocation: true
|
|
|
10
10
|
|
|
11
11
|
`/tear-down` is the human-facing destructive cleanup workflow for repository-owned POC environments and local runtime state.
|
|
12
12
|
|
|
13
|
-
The skill owns scope selection, read-only preflight, destructive preview, and Human-in-the-Loop authorization. Repository-provided deployment tooling owns
|
|
13
|
+
The skill owns scope selection, read-only preflight, destructive preview, and Human-in-the-Loop authorization. Repository-provided deployment tooling owns deletion mechanics.
|
|
14
|
+
|
|
15
|
+
Logical environments are not limited to Staging and Production. A repository may define `demo`, `qa`, `staging`, `production`, or another safe named environment.
|
|
14
16
|
|
|
15
17
|
Do not implement Docker, filesystem, route, database, registry, or host cleanup directly in the skill when an approved repository command exists.
|
|
16
18
|
|
|
17
19
|
## 1. Begin read-only
|
|
18
20
|
|
|
19
|
-
Invocation starts read-only.
|
|
20
|
-
|
|
21
21
|
Read only the minimum repository context needed to identify:
|
|
22
22
|
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
23
|
+
- approved tear-down entry point and installed Deployment Kit version/baseline when applicable;
|
|
24
|
+
- canonical repository/application identity;
|
|
25
|
+
- repository-defined logical environments, their roles/purposes, and explicit target bindings;
|
|
26
|
+
- which selected environments are Production-class;
|
|
27
|
+
- exact local image/package identity used for POC-owned workstation Docker cleanup;
|
|
28
|
+
- supported tear-down scopes and ownership boundaries.
|
|
29
|
+
|
|
30
|
+
Do not assume:
|
|
28
31
|
|
|
29
|
-
|
|
32
|
+
- Staging/Production are the only environments;
|
|
33
|
+
- Staging and Production use separate physical machines;
|
|
34
|
+
- `all` always means exactly local + Staging + Production;
|
|
35
|
+
- a local package exists;
|
|
36
|
+
- remote target addresses/aliases;
|
|
37
|
+
- container/volume names not established by the deterministic tool.
|
|
30
38
|
|
|
31
|
-
If the repository does not provide an approved deterministic
|
|
39
|
+
If the repository does not provide an approved deterministic command for the requested destructive scope, stop. Do not improvise shell commands.
|
|
32
40
|
|
|
33
|
-
## 2. Select
|
|
41
|
+
## 2. Select exact scope
|
|
34
42
|
|
|
35
|
-
|
|
43
|
+
Generic scope model:
|
|
36
44
|
|
|
37
45
|
```text
|
|
38
46
|
local
|
|
39
|
-
|
|
40
|
-
production
|
|
47
|
+
<one exact repository-defined named environment>
|
|
41
48
|
all
|
|
42
49
|
```
|
|
43
50
|
|
|
44
|
-
If
|
|
51
|
+
If no scope is named, present only scopes the current repository actually supports.
|
|
45
52
|
|
|
46
53
|
Rules:
|
|
47
54
|
|
|
48
|
-
- never silently default to
|
|
49
|
-
- never infer destructive scope from a
|
|
50
|
-
- never widen
|
|
51
|
-
- `all` means all
|
|
52
|
-
- selecting
|
|
55
|
+
- never silently default to a Production environment or `all`;
|
|
56
|
+
- never infer destructive scope from a prior deploy/conversation;
|
|
57
|
+
- never widen scope after failure;
|
|
58
|
+
- `all` means all explicitly configured/supplied scopes for this one POC, never machine-wide cleanup;
|
|
59
|
+
- selecting scope never authorizes deletion.
|
|
60
|
+
|
|
61
|
+
A named environment is independently targetable even when multiple environments share one physical target/failure domain.
|
|
62
|
+
|
|
63
|
+
If a named environment is unsupported/unconfigured, fail explicitly rather than falling back to another environment on the same host.
|
|
53
64
|
|
|
54
|
-
|
|
65
|
+
## 3. Resolve ownership and Production classification
|
|
55
66
|
|
|
56
|
-
|
|
67
|
+
Before an authorization gate, resolve non-secret ownership/evidence required by the installed tear-down contract.
|
|
68
|
+
|
|
69
|
+
For local cleanup identify the exact POC-owned local runtime/package boundary.
|
|
70
|
+
|
|
71
|
+
For each selected remote environment identify:
|
|
72
|
+
|
|
73
|
+
```text
|
|
74
|
+
environment name
|
|
75
|
+
role/purpose (including Production classification)
|
|
76
|
+
configured logical target
|
|
77
|
+
repository/application identity
|
|
78
|
+
ownership markers required by the deterministic tool
|
|
79
|
+
```
|
|
57
80
|
|
|
58
|
-
|
|
81
|
+
The literal environment name `production` should be treated as Production when the installed Deployment Kit does so for compatibility. Repositories may also classify another named environment as Production; pass that classification only through the installed tool's supported contract (for example `--production-environment <name>`).
|
|
59
82
|
|
|
60
|
-
|
|
83
|
+
Physical colocation never merges ownership. `staging` cleanup must not remove `production` because both bind to the same VPS.
|
|
61
84
|
|
|
62
|
-
Preserve
|
|
85
|
+
Preserve shared-resource boundaries. Normal POC tear-down must not broaden into shared platform infrastructure, unrelated POCs/environments, workstation trust/credentials, or registry packages unless a separate explicit lifecycle operation owns those resources.
|
|
63
86
|
|
|
64
|
-
If ownership is ambiguous, a
|
|
87
|
+
If ownership is ambiguous, a binding/evidence set changed, host identity cannot be verified where required, or the tool reports mismatched ownership, stop without deletion.
|
|
65
88
|
|
|
66
|
-
## 4. Present
|
|
89
|
+
## 4. Present exact destructive preview
|
|
67
90
|
|
|
68
|
-
|
|
91
|
+
Show what will be removed and preserved using current repository/tool evidence.
|
|
69
92
|
|
|
70
|
-
|
|
93
|
+
Example:
|
|
71
94
|
|
|
72
95
|
```text
|
|
73
96
|
TEAR-DOWN READY
|
|
74
97
|
|
|
75
|
-
Scope: <local|staging|production|all>
|
|
98
|
+
Scope: <local|demo|staging|production|other|all>
|
|
76
99
|
Repository/app: <verified identity>
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
Local package/runtime
|
|
100
|
+
Selected environments:
|
|
101
|
+
<env> → <logical target> — <Production/non-Production>
|
|
102
|
+
Local package/runtime: <exact identity or NOT SELECTED>
|
|
80
103
|
|
|
81
104
|
Will remove:
|
|
82
|
-
<repository-supported owned resources>
|
|
105
|
+
<tool/repository-supported owned resources for exactly these scopes>
|
|
83
106
|
|
|
84
107
|
Will preserve:
|
|
85
|
-
<shared/unrelated resources
|
|
108
|
+
<shared/unrelated environments/resources>
|
|
86
109
|
```
|
|
87
110
|
|
|
88
|
-
For Deployment-Kit consumers
|
|
111
|
+
For current Deployment-Kit consumers:
|
|
89
112
|
|
|
90
|
-
- `local` — exact-package local containers/images and Docker-managed anonymous volumes attached to those
|
|
91
|
-
-
|
|
92
|
-
- `
|
|
93
|
-
- `all` — Staging + Production + local for the selected POC only.
|
|
113
|
+
- `local` — exact-package local containers/images and Docker-managed anonymous volumes attached to those exact containers;
|
|
114
|
+
- `<environment>` — only that exact owned route/runtime/release/evidence/persistent-data/backup scope;
|
|
115
|
+
- `all` — all explicitly supplied named environment bindings plus optional exact-package local state when supplied.
|
|
94
116
|
|
|
95
|
-
Do not promise deletion of named/shared Docker volumes or other resources unless
|
|
117
|
+
Do not promise deletion of named/shared Docker volumes or other resources unless independent ownership can be proven.
|
|
96
118
|
|
|
97
|
-
|
|
119
|
+
When selected logical environments share one physical target, say so in the preview so the user can verify that the deletion set remains environment-scoped.
|
|
98
120
|
|
|
99
|
-
|
|
121
|
+
## 5. Authorization gates
|
|
122
|
+
|
|
123
|
+
Every modifying tear-down requires:
|
|
100
124
|
|
|
101
125
|
```text
|
|
102
126
|
[POC TEAR DOWN]
|
|
103
127
|
```
|
|
104
128
|
|
|
105
|
-
|
|
129
|
+
Additionally, whenever **any selected environment is Production-class**, require:
|
|
106
130
|
|
|
107
131
|
```text
|
|
108
132
|
[PRODUCTION DATA DELETE]
|
|
109
133
|
```
|
|
110
134
|
|
|
111
|
-
|
|
135
|
+
Do not tie the Production-data gate only to literal scope strings `production` or `all`. It depends on the resolved deletion set and Production classification.
|
|
136
|
+
|
|
137
|
+
Deployment authorization, prior testing, CI, merge approval, environment selection, and physical colocation do not authorize persistent Production data deletion.
|
|
138
|
+
|
|
139
|
+
If repository/app identity, selected environments, Production classification, target binding, ownership evidence, or deletion set changes after preview, require renewed review/authorization.
|
|
140
|
+
|
|
141
|
+
## 6. Execute only repository-provided command
|
|
142
|
+
|
|
143
|
+
After exact authorization, invoke only the approved tear-down command with the exact selected scopes and resolved inputs.
|
|
112
144
|
|
|
113
|
-
|
|
145
|
+
For generalized Deployment Kit consumers this may include repeated explicit environment bindings such as:
|
|
114
146
|
|
|
115
|
-
|
|
147
|
+
```text
|
|
148
|
+
--environment-target demo=<target>
|
|
149
|
+
--environment-target staging=<target>
|
|
150
|
+
--environment-target production=<target>
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
and, when needed for a non-literal Production environment:
|
|
116
154
|
|
|
117
|
-
|
|
155
|
+
```text
|
|
156
|
+
--production-environment prod-east
|
|
157
|
+
```
|
|
118
158
|
|
|
119
|
-
|
|
159
|
+
Do not manually substitute another binding format if the installed version has a different contract; inspect the distributed tool/help/docs first.
|
|
120
160
|
|
|
121
|
-
|
|
161
|
+
Never add machine-wide Docker prune, shared-network/Caddy/Avahi removal, unrelated environment cleanup, registry-package deletion, host reprovisioning, target rebinding, or secret/trust deletion unless separately defined and explicitly authorized.
|
|
122
162
|
|
|
123
|
-
If
|
|
163
|
+
If an aggregate `all` operation stops partway, report completed/remaining scopes. Do not manually compensate by deleting the rest.
|
|
124
164
|
|
|
125
|
-
## 7. Verify
|
|
165
|
+
## 7. Verify/report outcome
|
|
126
166
|
|
|
127
|
-
Use repository-provided evidence/status commands when available. Report only
|
|
167
|
+
Use repository-provided evidence/status commands when available. Report only supported evidence:
|
|
128
168
|
|
|
129
169
|
- requested scope;
|
|
130
170
|
- repository/application identity;
|
|
131
|
-
- environments/targets
|
|
132
|
-
-
|
|
133
|
-
-
|
|
171
|
+
- exact logical environments/targets processed;
|
|
172
|
+
- Production-class environments included;
|
|
173
|
+
- local runtime state processed;
|
|
134
174
|
- removed versus already-absent resources;
|
|
135
|
-
-
|
|
136
|
-
-
|
|
175
|
+
- failure point/remaining scopes after a partial stop;
|
|
176
|
+
- preservation of shared/unrelated resources only when evidence supports it.
|
|
137
177
|
|
|
138
|
-
The operation should remain safe to rerun for already-absent owned resources when the
|
|
178
|
+
The operation should remain safe to rerun for already-absent owned resources when the installed tear-down contract is idempotent.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# ADR-NNN — <Decision title>
|
|
2
|
+
|
|
3
|
+
Status: **PROPOSED**
|
|
4
|
+
|
|
5
|
+
Date: `<YYYY-MM-DD>`
|
|
6
|
+
|
|
7
|
+
## Context
|
|
8
|
+
|
|
9
|
+
What engineering/product constraint or tradeoff requires a durable decision?
|
|
10
|
+
|
|
11
|
+
## Decision
|
|
12
|
+
|
|
13
|
+
What was decided?
|
|
14
|
+
|
|
15
|
+
Do not mark an ADR accepted until the human/repository process has actually accepted the decision.
|
|
16
|
+
|
|
17
|
+
## Alternatives considered
|
|
18
|
+
|
|
19
|
+
- `<alternative>` — why it was considered and why it was not selected.
|
|
20
|
+
- `<alternative>` — why it was considered and why it was not selected.
|
|
21
|
+
|
|
22
|
+
## Tradeoffs / consequences
|
|
23
|
+
|
|
24
|
+
### Benefits
|
|
25
|
+
|
|
26
|
+
- `<benefit>`
|
|
27
|
+
|
|
28
|
+
### Costs / risks
|
|
29
|
+
|
|
30
|
+
- `<cost or risk>`
|
|
31
|
+
|
|
32
|
+
## Evidence / links
|
|
33
|
+
|
|
34
|
+
- Work item: `<ID or link>`
|
|
35
|
+
- Relevant code/config: `<path>`
|
|
36
|
+
- System Lab scenario/component: `<reference when useful>`
|
|
37
|
+
- Other docs: `<link>`
|
|
38
|
+
|
|
39
|
+
## Follow-up / review trigger
|
|
40
|
+
|
|
41
|
+
What future condition should cause this decision to be revisited?
|