@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.
Files changed (35) hide show
  1. package/assets/components.json +3 -3
  2. package/assets/core/distribution.json +8 -0
  3. package/assets/deployment/distribution.json +2 -0
  4. package/assets/generated/ASSEMBLY.json +73 -23
  5. package/assets/generated/core/core/instructions/lean-docs.instructions.md +33 -2
  6. package/assets/generated/core/core/instructions/lean-workflow.instructions.md +42 -0
  7. package/assets/generated/core/core/learning/DIAGRAM_GUIDE.md +46 -6
  8. package/assets/generated/core/core/learning/ENGINEERING_LEARNING_WORKBOOK.md +29 -6
  9. package/assets/generated/core/core/learning/LEARNING_MAP.md +37 -2
  10. package/assets/generated/core/core/learning/LEARNING_PROGRESS.md +15 -7
  11. package/assets/generated/core/core/learning/SYSTEM_DESIGN_DRILLS.md +299 -19
  12. package/assets/generated/core/core/process/COACHING_GUIDE.md +35 -2
  13. package/assets/generated/core/core/process/DATABASE_LEARNING_WORKBENCH.md +153 -102
  14. package/assets/generated/core/core/process/DEPLOYMENT_ENABLEMENT.md +108 -71
  15. package/assets/generated/core/core/process/LEAN_ENGINEERING_GUIDE.md +317 -0
  16. package/assets/generated/core/core/process/PROJECT_DOCUMENTATION_FRAMEWORK.md +324 -0
  17. package/assets/generated/core/core/process/SYSTEM_DESIGN_LEARNING_WORKBENCH.md +520 -0
  18. package/assets/generated/core/core/skills/coach/SKILL.md +31 -4
  19. package/assets/generated/core/core/skills/db-lab/SKILL.md +59 -16
  20. package/assets/generated/core/core/skills/deliver/SKILL.md +77 -5
  21. package/assets/generated/core/core/skills/deploy/SKILL.md +164 -121
  22. package/assets/generated/core/core/skills/deployment-readiness/SKILL.md +223 -250
  23. package/assets/generated/core/core/skills/docs/SKILL.md +116 -0
  24. package/assets/generated/core/core/skills/next-step/SKILL.md +21 -6
  25. package/assets/generated/core/core/skills/system-lab/SKILL.md +333 -0
  26. package/assets/generated/core/core/skills/tear-down/SKILL.md +101 -61
  27. package/assets/generated/core/core/templates/ADR_TEMPLATE.md +41 -0
  28. package/assets/generated/core/tools/docs_site/docs_site.py +382 -0
  29. package/assets/generated/core/tools/system_lab/system_workbench.py +243 -0
  30. package/assets/generated/deployment/src/lean_poc_deployment/entrypoint.py +5 -1
  31. package/assets/generated/deployment/src/lean_poc_deployment/local_cli.py +112 -0
  32. package/assets/generated/deployment/src/lean_poc_deployment/local_runtime.py +523 -0
  33. package/assets/generated/deployment/src/lean_poc_deployment/teardown.py +49 -35
  34. package/assets/generated/deployment/src/lean_poc_deployment/teardown_cli.py +31 -12
  35. package/package.json +1 -1
@@ -0,0 +1,520 @@
1
+ # System Design Learning Workbench
2
+
3
+ Use this only when advanced system-design learning would help. It is read-only, optional, and non-blocking.
4
+
5
+ `/coach system design` teaches and assesses concepts adaptively. `/system-lab` grounds those concepts in the current repository and a disposable interactive model.
6
+
7
+ ## Quick start
8
+
9
+ ```text
10
+ /coach system design
11
+ /system-lab
12
+ /system-lab architecture
13
+ /system-lab runtime <scenario>
14
+ /system-lab changes <work-item>
15
+ /system-lab failure
16
+ /system-lab capacity
17
+ /system-lab performance
18
+ /system-lab observability
19
+ /system-lab security
20
+ /system-lab messaging
21
+ /system-lab deployment
22
+ /system-lab testing
23
+ /system-lab debug <symptom>
24
+ /system-lab evolve <constraint>
25
+ /system-lab compare <choice-a> <choice-b>
26
+ /system-lab interview
27
+ ```
28
+
29
+ Running the lab means **inspect current evidence and show the current view**. The learner should not need to remember to refresh, rebuild, or manually maintain generated diagrams.
30
+
31
+ ## What the lab teaches
32
+
33
+ Treat system design as independent competencies:
34
+
35
+ ```text
36
+ requirements + scope framing
37
+ capacity estimation + workload modeling
38
+ API + contract design
39
+ service/module decomposition
40
+ data/storage selection
41
+ caching
42
+ messaging + asynchronous workflows
43
+ consistency + distributed coordination
44
+ scaling + partitioning
45
+ availability + fault tolerance
46
+ latency + performance
47
+ runtime/deployment topology
48
+ observability + SLO reasoning
49
+ security + abuse resistance
50
+ cost/complexity awareness
51
+ architecture evolution
52
+ incident/debug reasoning
53
+ testing/verification strategy
54
+ tradeoff defense
55
+ interview communication
56
+ ```
57
+
58
+ Use L1-L6 per competency rather than one generic system-design score.
59
+
60
+ ## Current-by-default artifact lifecycle
61
+
62
+ Generated HTML/JSON is a disposable projection:
63
+
64
+ ```text
65
+ current repository evidence
66
+ → discover components/dependencies/provenance
67
+ → merge optional explicit architecture evidence
68
+ → calculate evidence fingerprint
69
+ → compare prior disposable snapshot when present
70
+ → generate current workbench
71
+ ```
72
+
73
+ The workbench always regenerates when invoked. Reusing a stable temp output directory is useful because the previous `workbench.json` can act as a disposable comparison baseline before being replaced.
74
+
75
+ This avoids the stale-diagram problem without turning diagrams into tracked documentation.
76
+
77
+ ## Evidence labels
78
+
79
+ Use:
80
+
81
+ ```text
82
+ CONFIRMED BY CODE
83
+ CONFIRMED BY RUNTIME
84
+ DOCUMENTED INTENT
85
+ INFERRED
86
+ UNKNOWN
87
+ LEARNER ASSUMPTION
88
+ ```
89
+
90
+ Static package references, config, naming, or topology can support an inference without proving a runtime call occurred. Make that visible.
91
+
92
+ ## Interactive workbench
93
+
94
+ Greenfield consumers receive:
95
+
96
+ ```text
97
+ tools/lean-system-lab/system-workbench.py
98
+ ```
99
+
100
+ It uses only the Python standard library.
101
+
102
+ PowerShell:
103
+
104
+ ```powershell
105
+ Set-Location D:\Projects\<repo>
106
+ $out = Join-Path $env:TEMP "lean-system-lab"
107
+ python .\tools\lean-system-lab\system-workbench.py export `
108
+ --repo . `
109
+ --out $out
110
+ Start-Process (Join-Path $out "index.html")
111
+ ```
112
+
113
+ macOS/Linux:
114
+
115
+ ```bash
116
+ cd /path/to/repo
117
+ out="${TMPDIR:-/tmp}/lean-system-lab"
118
+ python3 tools/lean-system-lab/system-workbench.py export \
119
+ --repo . \
120
+ --out "$out"
121
+ open "$out/index.html" 2>/dev/null || xdg-open "$out/index.html"
122
+ ```
123
+
124
+ The output directory contains:
125
+
126
+ ```text
127
+ index.html
128
+ workbench.json
129
+ ```
130
+
131
+ The generated viewer supports:
132
+
133
+ - draggable architecture nodes;
134
+ - zoom/reset and component search;
135
+ - clickable nodes and dependency edges;
136
+ - architecture/runtime/API/data/failure/capacity/performance/observability/security/messaging/deployment/testing/changes/evolution/interview lenses;
137
+ - scenario-to-architecture highlighting;
138
+ - topological failure-blast-radius exploration with prediction-before-reveal;
139
+ - current-vs-prior snapshot change highlighting;
140
+ - work-item changed-file overlays;
141
+ - capacity estimation from learner assumptions;
142
+ - latency-budget exploration;
143
+ - scale/evolution prompts;
144
+ - tradeoff and "why not?" drills;
145
+ - interview perturbations;
146
+ - evidence/provenance detail;
147
+ - visible handoff to `/db-lab` for database internals.
148
+
149
+ ## Automatic repository evidence
150
+
151
+ The scanner deliberately stays conservative. It can recognize evidence such as:
152
+
153
+ - `.csproj`, `package.json`, `pyproject.toml`, `pom.xml`, Gradle and Go module roots;
154
+ - common web/API framework signals;
155
+ - SQLite/PostgreSQL/SQL Server/MySQL persistence references;
156
+ - Redis/cache references;
157
+ - Kafka/RabbitMQ/MassTransit/Azure Service Bus/SQS-style messaging signals;
158
+ - outbound HTTP client signals;
159
+ - Dockerfiles and Compose service/dependency topology;
160
+ - common Kubernetes manifests;
161
+ - authentication/authorization signals;
162
+ - common OpenTelemetry/logging/metrics signals;
163
+ - tests near a component;
164
+ - ADR/documented-decision files.
165
+
166
+ This is evidence discovery, not a general-purpose static analyzer. Ambiguous findings stay `INFERRED` or `UNKNOWN`.
167
+
168
+ The tool must never emit secret/config values merely because it scanned a configuration file.
169
+
170
+ ## Optional explicit system model
171
+
172
+ For richer learning, provide an optional JSON file:
173
+
174
+ ```powershell
175
+ python .\tools\lean-system-lab\system-workbench.py export `
176
+ --repo . `
177
+ --out $out `
178
+ --model .\docs\system-learning-model.json
179
+ ```
180
+
181
+ Example:
182
+
183
+ ```json
184
+ {
185
+ "components": [
186
+ {
187
+ "id": "web",
188
+ "name": "Web App",
189
+ "kind": "frontend",
190
+ "responsibilities": ["Collect checkout input"],
191
+ "interfaces": ["POST /api/orders"],
192
+ "security": ["Public browser boundary"]
193
+ },
194
+ {
195
+ "id": "orders",
196
+ "name": "Order Service",
197
+ "kind": "service",
198
+ "responsibilities": ["Validate and create orders"],
199
+ "telemetry": ["request latency", "order failures"]
200
+ },
201
+ {
202
+ "id": "orders-db",
203
+ "name": "Orders DB",
204
+ "kind": "database",
205
+ "state": ["Orders", "OrderItems"]
206
+ }
207
+ ],
208
+ "edges": [
209
+ {
210
+ "id": "web-orders",
211
+ "from": "web",
212
+ "to": "orders",
213
+ "kind": "http",
214
+ "protocol": "HTTPS"
215
+ },
216
+ {
217
+ "id": "orders-db",
218
+ "from": "orders",
219
+ "to": "orders-db",
220
+ "kind": "data",
221
+ "protocol": "SQL"
222
+ }
223
+ ],
224
+ "scenarios": [
225
+ {
226
+ "id": "checkout",
227
+ "name": "User checks out",
228
+ "components": ["web", "orders", "orders-db"],
229
+ "edges": ["web-orders", "orders-db"],
230
+ "steps": [
231
+ "Browser submits order",
232
+ "Order Service validates request",
233
+ "Order state is persisted"
234
+ ]
235
+ }
236
+ ],
237
+ "failures": [
238
+ {
239
+ "id": "orders-db-down",
240
+ "name": "Orders DB unavailable",
241
+ "startComponent": "orders-db",
242
+ "notes": ["Order creation cannot complete"]
243
+ }
244
+ ],
245
+ "decisions": [
246
+ {
247
+ "title": "Keep order creation synchronous",
248
+ "context": "Caller requires immediate validation result",
249
+ "tradeoffs": ["simpler semantics", "downstream latency is user-visible"],
250
+ "revisitWhen": "external dependency latency dominates the SLO"
251
+ }
252
+ ]
253
+ }
254
+ ```
255
+
256
+ Explicit model data supplements discovered evidence. It should represent known project facts or clearly labeled design assumptions; do not use it to launder guesses into `CONFIRMED` claims.
257
+
258
+ ## Work-item change overlay
259
+
260
+ When the accepted PR/work-item file list is known, pass paths repeatedly:
261
+
262
+ ```powershell
263
+ python .\tools\lean-system-lab\system-workbench.py export `
264
+ --repo . `
265
+ --out $out `
266
+ --changed-file src\Orders\OrderService.cs `
267
+ --changed-file docker-compose.yml
268
+ ```
269
+
270
+ The tool maps changed paths to discovered components and marks those components as touched. This means **the component was changed**, not that every runtime characteristic changed.
271
+
272
+ `/system-lab changes <work-item>` should combine this with actual diff/PR evidence and explain architecture implications conservatively.
273
+
274
+ ## Scenario-to-architecture highlighting
275
+
276
+ A selected scenario should dim unrelated nodes and emphasize the participating nodes/edges. Beside the graph, explain the sequence and provenance.
277
+
278
+ Runtime evidence is stronger than topology inference. For example:
279
+
280
+ ```text
281
+ captured distributed trace → CONFIRMED BY RUNTIME
282
+ controller → service call in code → CONFIRMED BY CODE
283
+ package/config dependency only → INFERRED topology
284
+ ```
285
+
286
+ ## Failure exploration
287
+
288
+ The viewer may compute graph reachability from a failed component to propose a **topological blast-radius hypothesis**.
289
+
290
+ The learner should predict first. Revealing the graph traversal does not prove production behavior; retries, bulkheads, caches, fallbacks, queues, timeouts, and user behavior may change the real outcome.
291
+
292
+ Use richer explicit failure metadata or safe runtime evidence when available.
293
+
294
+ ## Capacity playground
295
+
296
+ The viewer accepts learner assumptions such as:
297
+
298
+ ```text
299
+ DAU
300
+ requests/user/day
301
+ peak multiplier
302
+ write ratio
303
+ average payload size
304
+ retention days
305
+ ```
306
+
307
+ It derives approximate:
308
+
309
+ ```text
310
+ average RPS
311
+ peak RPS
312
+ peak write RPS
313
+ bandwidth
314
+ write-data growth
315
+ retained write-data footprint
316
+ ```
317
+
318
+ These are teaching calculations. State simplifying assumptions and do not present them as measured production capacity.
319
+
320
+ ## Latency-budget playground
321
+
322
+ Start with a learner-supplied p95/p99 target and stage estimates:
323
+
324
+ ```text
325
+ network
326
+ edge/gateway
327
+ application
328
+ primary datastore
329
+ external dependency
330
+ ```
331
+
332
+ Compare the total with the target and discuss parallelism, fan-out, caching, queuing, timeout budgets, tail latency, and whether work belongs on the synchronous path.
333
+
334
+ ## Scale/evolution mode
335
+
336
+ The scale control is a reasoning prompt rather than an automatic technology recommender.
337
+
338
+ At each larger workload ask:
339
+
340
+ - Which observed bottleneck appears first?
341
+ - What evidence would justify another component?
342
+ - Can the current relational database continue to satisfy the workload?
343
+ - Does caching reduce the actual constrained resource?
344
+ - Is asynchronous work justified?
345
+ - What new failure modes/costs does the change introduce?
346
+ - Can the system stay simpler?
347
+
348
+ ## Consistency and messaging timelines
349
+
350
+ For event-driven work, use sequence/timeline reasoning around:
351
+
352
+ ```text
353
+ write state
354
+ → publish event
355
+ → consume event
356
+ → duplicate/delay/reorder/failure
357
+ → retry or compensation
358
+ ```
359
+
360
+ Ask what is durable at each point, what can happen twice, what can be observed out of order, and where idempotency/deduplication belongs.
361
+
362
+ ## API lens
363
+
364
+ Trace:
365
+
366
+ ```text
367
+ caller
368
+ → route/contract
369
+ → validation/auth
370
+ → application boundary
371
+ → downstream dependencies
372
+ → response/error behavior
373
+ ```
374
+
375
+ Discuss versioning, pagination, idempotency, partial failure, coupling, and compatibility where relevant.
376
+
377
+ ## Security lens
378
+
379
+ Overlay available evidence for:
380
+
381
+ - public/private boundaries;
382
+ - authentication;
383
+ - authorization;
384
+ - secrets/config boundaries;
385
+ - PII/data classification;
386
+ - replay/abuse/rate limits;
387
+ - dependency trust.
388
+
389
+ Missing controls are questions first, not automatic vulnerabilities.
390
+
391
+ ## Observability lens
392
+
393
+ Connect architecture to operational evidence:
394
+
395
+ ```text
396
+ request/event
397
+ → trace/span boundaries
398
+ → component metrics
399
+ → structured logs
400
+ → dependency health
401
+ → saturation/queue depth
402
+ → SLO/user impact
403
+ ```
404
+
405
+ Ask which signals distinguish competing hypotheses.
406
+
407
+ ## Testing lens
408
+
409
+ Map available tests to components/boundaries and ask:
410
+
411
+ - Which contracts have integration/contract coverage?
412
+ - Which failure paths are exercised?
413
+ - Where would a unit test give false confidence?
414
+ - Which architecture risk requires an end-to-end or fault-oriented test?
415
+
416
+ Do not infer behavioral coverage solely from a test filename.
417
+
418
+ ## Architecture decisions and counterfactuals
419
+
420
+ Use ADRs when they exist. Otherwise keep design explorations disposable.
421
+
422
+ Good prompts:
423
+
424
+ ```text
425
+ What if we removed Redis?
426
+ What if this path became asynchronous?
427
+ What if traffic increased 100x?
428
+ What if SQLite moved to PostgreSQL?
429
+ What if one dependency became unreliable?
430
+ What if p99 must be below 200 ms?
431
+ Why not keep this a monolith?
432
+ Why not use a queue?
433
+ Why not shard yet?
434
+ ```
435
+
436
+ For every proposed change explain the benefit, added complexity, new failure modes, migration path, and trigger that would justify it.
437
+
438
+ ## Interview mode
439
+
440
+ A strong interview loop is:
441
+
442
+ ```text
443
+ requirements
444
+ → scale assumptions
445
+ → API/contracts
446
+ → data model/storage
447
+ → architecture
448
+ → one deep dive
449
+ → bottleneck/failure
450
+ → consistency/reliability
451
+ → security/observability
452
+ → evolution
453
+ → defense
454
+ ```
455
+
456
+ Perturb constraints after the learner commits to a design. Do not let the learner reproduce the current repository verbatim when the exercise should test transfer.
457
+
458
+ ## Cross-lab learning
459
+
460
+ Use System Lab for system context and Database Lab for database depth.
461
+
462
+ Examples:
463
+
464
+ ```text
465
+ /system-lab runtime checkout
466
+ → identify Orders DB
467
+ → /db-lab trace <order query>
468
+
469
+ /db-lab plan <query>
470
+ → database is healthy but end-to-end latency is high
471
+ → /system-lab performance checkout
472
+ ```
473
+
474
+ ## Delivery-completion learning reminder
475
+
476
+ Successful engineering delivery may end with a visible optional learning section:
477
+
478
+ ```text
479
+ OPTIONAL LEARNING — recommended while this change is fresh
480
+
481
+ ★ /system-lab changes WI-17
482
+ This work changed system structure or runtime behavior.
483
+ Explore affected components, flows, dependencies, tradeoffs, and failure modes.
484
+
485
+ ★ /db-lab changes WI-17
486
+ This work changed database structure or behavior.
487
+ Explore affected relationships, queries, indexes, constraints, and ORM behavior.
488
+
489
+ ○ /code-walkthrough WI-17
490
+ Walk through the implementation.
491
+
492
+ ○ /learning-review WI-17
493
+ Test your understanding.
494
+ ```
495
+
496
+ Only mark a lab with `★` when the accepted change actually provides relevant evidence. Otherwise keep it available with `○` or omit it to stay concise.
497
+
498
+ Do not say "rebuild" or "refresh" in the learner-facing reminder. Current evidence is already part of invoking the lab.
499
+
500
+ ## Best-effort automatic artifact generation after delivery
501
+
502
+ After merge + satisfactory post-merge evidence, `/deliver` may generate disposable learning workbenches automatically when the accepted change is relevant and the required local evidence is safely available.
503
+
504
+ Rules:
505
+
506
+ - write only to temp/cache output;
507
+ - never commit generated workbench output;
508
+ - never inspect Production credentials/data;
509
+ - system-workbench generation may run against the updated default-branch checkout;
510
+ - DB workbench generation requires a known safe development/test database; do not guess a database path or create/apply migrations just to generate it;
511
+ - artifact generation failure must not change `DELIVERY COMPLETE`;
512
+ - generation is not evidence that the human learned or reviewed anything.
513
+
514
+ ## Safety and fallbacks
515
+
516
+ If the interactive tool is unavailable, use ephemeral Mermaid/text diagrams and the same evidence labels.
517
+
518
+ If repository evidence is insufficient, say what is unknown and convert the gap into a design question.
519
+
520
+ Never use System Lab to perform production deployment, mutate infrastructure, change data, apply migrations, run destructive fault injection, or silently fix discovered defects.
@@ -44,7 +44,7 @@ L6 Interview Ready
44
44
 
45
45
  These measure understanding, not seniority. Do not inflate mastery.
46
46
 
47
- ## 4. Modes
47
+ ## 4. Modes and lab routing
48
48
 
49
49
  Support:
50
50
  1. learn a concept,
@@ -64,7 +64,11 @@ Use installed learning assets when present; do not assume they exist.
64
64
 
65
65
  For a structured walkthrough of implementation changes across a Git/PR/commit change set, prefer `/code-walkthrough`. Coach remains available for ad-hoc explanation of a file, symbol, concept, design choice, or selected code block.
66
66
 
67
- For database learning, use `/coach` for concept teaching, adaptive questioning, gap assessment, and interview pressure. When the task needs concrete repository/database evidence — schema exploration, ORM-to-SQL tracing, query plans, migrations, database debugging, or query-to-ERD highlighting — route to `/db-lab` when that skill is installed.
67
+ For database learning, use `/coach` for concept teaching, adaptive questioning, gap assessment, and interview pressure. When the task needs concrete repository/database evidence — schema exploration, ORM-to-SQL tracing, query plans, migrations, database debugging, query-to-ERD highlighting, or database-change impact — route to `/db-lab` when that skill is installed.
68
+
69
+ For system-design learning, use `/coach` for concepts, mental models, adaptive questioning, tradeoff practice, and interview pressure. When the task needs concrete repository/system evidence — architecture/components, runtime scenarios, APIs, dependencies, messaging, failure behavior, capacity/performance, observability, security, deployment, testing, architecture-change impact, or an interactive system view — route to `/system-lab` when installed.
70
+
71
+ `/db-lab` and `/system-lab` are sibling evidence labs. Do not duplicate a database query-plan deep dive in System Lab or a system-wide availability discussion in Database Lab when the other lab is available.
68
72
 
69
73
  ## 5. Continuous adaptive cadence
70
74
 
@@ -83,6 +87,8 @@ Adapt difficulty:
83
87
  - strong: tradeoff/debug/design;
84
88
  - very strong: interviewer pressure or changed scale/assumptions.
85
89
 
90
+ For advanced database/system-design work, prefer **prediction before reveal** when practical: ask what the learner expects from a plan, failure, scale change, duplicate message, timeout, or architecture perturbation before showing the strongest evidence. Do not force quiz mode when the learner explicitly wants explanation first.
91
+
86
92
  ## 6. Mode guidance
87
93
 
88
94
  Concept:
@@ -122,20 +128,41 @@ requirements/schema/query problem
122
128
 
123
129
  Treat relational modeling, constraints, normalization, querying, indexes/plans, transactions, ORM translation, migrations, debugging, and design defense as separate competencies rather than one SQL score. Prefer `/db-lab` for hands-on evidence.
124
130
 
125
- System design: start from the actual repository, ask one question at a time, and make the human drive the design.
131
+ System design:
132
+
133
+ ```text
134
+ requirements + constraints
135
+ → learner states assumptions
136
+ → architecture/API/data choices
137
+ → runtime/data/event trace
138
+ → failure + consistency reasoning
139
+ → capacity/latency/scaling
140
+ → security/observability/deployment/testing
141
+ → alternatives + why-not questions
142
+ → changed constraint / evolution
143
+ → design defense
144
+ ```
145
+
146
+ Treat requirements framing, capacity, API design, decomposition, data/storage, caching, messaging, consistency, scaling, availability, performance, deployment, observability, security, cost/complexity, evolution, incident/debugging, testing strategy, tradeoff defense, and interview communication as separate competencies rather than one system-design score. Prefer `/system-lab` for hands-on evidence.
147
+
148
+ Challenge cargo-cult complexity. Ask credible questions such as `Why not keep the monolith?`, `Why not use the existing relational database?`, `Why not make this synchronous?`, `Why not avoid the cache?`, `Why not wait to shard?`, or `What evidence justifies this queue/service?`.
126
149
 
127
- Interview drill: critique correctness, depth, credibility, structure, concision, overstatement, and missed follow-ups.
150
+ Interview drill: critique correctness, depth, credibility, structure, concision, overstatement, adaptability to changed constraints, and missed follow-ups.
128
151
 
129
152
  ## 7. Diagrams/resources
130
153
 
131
154
  Mermaid diagrams in chat may be used for architecture, request/sequence/state/data/CI/deployment/concurrency understanding. Diagrams are ephemeral unless explicitly requested as durable artifacts.
132
155
 
156
+ When `/db-lab` or `/system-lab` provides an interactive view, treat it as a disposable projection of current evidence, not a source of truth. The lab should re-discover current evidence when invoked so the human does not need to maintain or manually refresh learning diagrams.
157
+
133
158
  External resources are optional. Prefer official docs/vendor tutorials, then a small number of current high-quality resources. Show 1–3 at a time, not a link dump. Never make external resources an engineering prerequisite.
134
159
 
135
160
  ## 8. Optional learning progress
136
161
 
137
162
  Only update a learning-progress tracker when the human explicitly chooses to do so. Skipping it has no engineering impact.
138
163
 
164
+ A generated lab artifact or completed walkthrough is evidence of learning activity, not automatic mastery. Record demonstrated understanding conservatively and by competency when depth matters.
165
+
139
166
  ## 9. Credibility
140
167
 
141
168
  For interview/portfolio discussion distinguish: