nb-venv-kernels 1.0.8__tar.gz

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 (55) hide show
  1. nb_venv_kernels-1.0.8/.claude/CLAUDE.md +549 -0
  2. nb_venv_kernels-1.0.8/.claude/JOURNAL.md +53 -0
  3. nb_venv_kernels-1.0.8/.claude/settings.local.json +48 -0
  4. nb_venv_kernels-1.0.8/.copier-answers.yml +16 -0
  5. nb_venv_kernels-1.0.8/.gitignore +128 -0
  6. nb_venv_kernels-1.0.8/.prettierignore +6 -0
  7. nb_venv_kernels-1.0.8/.resources/screenshot.png +0 -0
  8. nb_venv_kernels-1.0.8/.yarnrc.yml +1 -0
  9. nb_venv_kernels-1.0.8/CHANGELOG.md +76 -0
  10. nb_venv_kernels-1.0.8/LICENSE +29 -0
  11. nb_venv_kernels-1.0.8/Makefile +118 -0
  12. nb_venv_kernels-1.0.8/PKG-INFO +150 -0
  13. nb_venv_kernels-1.0.8/README.md +87 -0
  14. nb_venv_kernels-1.0.8/RELEASE.md +80 -0
  15. nb_venv_kernels-1.0.8/babel.config.js +1 -0
  16. nb_venv_kernels-1.0.8/conftest.py +8 -0
  17. nb_venv_kernels-1.0.8/doc/NB_CONDA_ENV_DISCOVERY.md +206 -0
  18. nb_venv_kernels-1.0.8/install.json +5 -0
  19. nb_venv_kernels-1.0.8/jest.config.js +28 -0
  20. nb_venv_kernels-1.0.8/jupyter-config/jupyter_config.json +8 -0
  21. nb_venv_kernels-1.0.8/jupyter-config/notebook-config/nb_venv_kernels.json +7 -0
  22. nb_venv_kernels-1.0.8/jupyter-config/server-config/nb_venv_kernels.json +7 -0
  23. nb_venv_kernels-1.0.8/nb_venv_kernels/__init__.py +60 -0
  24. nb_venv_kernels-1.0.8/nb_venv_kernels/_version.py +4 -0
  25. nb_venv_kernels-1.0.8/nb_venv_kernels/cli.py +347 -0
  26. nb_venv_kernels-1.0.8/nb_venv_kernels/labextension/package.json +212 -0
  27. nb_venv_kernels-1.0.8/nb_venv_kernels/labextension/static/509.9f074093ee68761537e2.js +1 -0
  28. nb_venv_kernels-1.0.8/nb_venv_kernels/labextension/static/728.86e8b31f1ae99c482623.js +1 -0
  29. nb_venv_kernels-1.0.8/nb_venv_kernels/labextension/static/remoteEntry.2aa8b7753b0e8c4e6e70.js +1 -0
  30. nb_venv_kernels-1.0.8/nb_venv_kernels/labextension/static/style.js +4 -0
  31. nb_venv_kernels-1.0.8/nb_venv_kernels/labextension/static/third-party-licenses.json +16 -0
  32. nb_venv_kernels-1.0.8/nb_venv_kernels/manager.py +362 -0
  33. nb_venv_kernels-1.0.8/nb_venv_kernels/registry.py +193 -0
  34. nb_venv_kernels-1.0.8/nb_venv_kernels/routes.py +29 -0
  35. nb_venv_kernels-1.0.8/nb_venv_kernels/runner.py +71 -0
  36. nb_venv_kernels-1.0.8/nb_venv_kernels/tests/__init__.py +1 -0
  37. nb_venv_kernels-1.0.8/nb_venv_kernels/tests/test_routes.py +17 -0
  38. nb_venv_kernels-1.0.8/package-lock.json +15467 -0
  39. nb_venv_kernels-1.0.8/package.json +207 -0
  40. nb_venv_kernels-1.0.8/pyproject.toml +95 -0
  41. nb_venv_kernels-1.0.8/setup.py +1 -0
  42. nb_venv_kernels-1.0.8/src/__tests__/nb_venv_kernel.spec.ts +9 -0
  43. nb_venv_kernels-1.0.8/src/index.ts +22 -0
  44. nb_venv_kernels-1.0.8/style/base.css +5 -0
  45. nb_venv_kernels-1.0.8/style/index.css +1 -0
  46. nb_venv_kernels-1.0.8/style/index.js +1 -0
  47. nb_venv_kernels-1.0.8/tsconfig.json +25 -0
  48. nb_venv_kernels-1.0.8/tsconfig.test.json +3 -0
  49. nb_venv_kernels-1.0.8/ui-tests/README.md +167 -0
  50. nb_venv_kernels-1.0.8/ui-tests/jupyter_server_test_config.py +12 -0
  51. nb_venv_kernels-1.0.8/ui-tests/package.json +15 -0
  52. nb_venv_kernels-1.0.8/ui-tests/playwright.config.js +14 -0
  53. nb_venv_kernels-1.0.8/ui-tests/tests/nb_venv_kernel.spec.ts +21 -0
  54. nb_venv_kernels-1.0.8/ui-tests/yarn.lock +0 -0
  55. nb_venv_kernels-1.0.8/yarn.lock +11086 -0
@@ -0,0 +1,549 @@
1
+ <!-- #region -->
2
+
3
+ # Code and Content Generation Rules
4
+ - always consider JOURNAL instructions
5
+ - always consider markdown instructions and guidelines when creating documentation
6
+ - alwys obey mermaid diagramming rules when creating diagrams
7
+ - always consider GITHUB instructions when working with GitHub-hosted projects
8
+ - always consider DATASCIENCE instructions when working with data science projects
9
+ - always consider RICH instructions when formatting output in notebooks and scripts
10
+
11
+ ## Project Boundary Rules
12
+
13
+ **MANDATORY**: Never reach outside current project unless explicitly instructed by the user
14
+
15
+ **Prohibited Actions**:
16
+ - Web searches or WebFetch operations without explicit user request
17
+ - Accessing external documentation, APIs, or resources not part of the current workspace
18
+ - Consulting external knowledge bases, wikis, or reference materials
19
+ - Reaching out to external services, repositories, or networks
20
+
21
+ **Allowed Actions**:
22
+ - Reading files within `/home/lab/workspace`
23
+ - Using local tools (Bash, Git, conda, etc.) within the workspace
24
+ - Accessing submodules or dependencies already present in the project
25
+ - Consulting files explicitly referenced by the user
26
+
27
+ **When User Explicitly Requests External Access**:
28
+ - Web searches when user asks "search for...", "look up...", "find documentation for..."
29
+ - WebFetch when user provides a URL or asks to "fetch..." from external source
30
+ - External tool usage when user specifically requests it
31
+
32
+ **Enforcement**: If uncertain whether action crosses project boundary, ask the user for explicit permission first
33
+
34
+ ## Git Commit Policy
35
+
36
+ **MANDATORY**: Never create git commits, push to remote repositories, or create tags without explicit user approval EVERY SINGLE TIME
37
+
38
+ **Prohibited Actions**:
39
+ - Running `git commit` without user explicitly requesting it
40
+ - Running `git push` without user explicitly requesting it
41
+ - Running `git tag` without user explicitly requesting it
42
+ - Automatic commits after completing tasks
43
+ - Batching commits without user confirmation
44
+ - Creating or pushing tags without explicit user request
45
+
46
+ **Allowed Actions**:
47
+ - Staging files with `git add` when preparing for user-approved commits
48
+ - Running `git status`, `git diff`, `git log` for informational purposes
49
+ - Creating commits only when user explicitly says "commit", "push", "make a commit", or similar direct instructions
50
+ - Creating tags only when user explicitly says "tag" or "create tag"
51
+
52
+ **Critical Enforcement**:
53
+ - EVERY SINGLE TIME before running git commit, push, or tag, you MUST have explicit user approval for that specific action in that specific session
54
+ - Even if user previously requested commits/pushes, you MUST get approval again for each new commit/push/tag
55
+ - Never assume permission from previous interactions
56
+ - Always wait for explicit user approval before executing any git commit, push, or tag operations
57
+ - When work is complete, inform the user and ask if they want to commit the changes
58
+
59
+ ## GitHub Project Instructions
60
+
61
+ **MANDATORY**: When working with GitHub-hosted repositories, consult `.claude/GITHUB.md` for specific instructions
62
+
63
+ **GitHub-Specific Rules**:
64
+ - Add standardized badges to README.md files (GitHub Actions, npm version, PyPI version)
65
+ - Follow repository and package naming conventions
66
+ - Verify workflow files before adding badges
67
+ - Validate badge URLs match actual repository owner and package names
68
+ - Configure link checker to ignore badge URLs that fail automated checks
69
+
70
+ **Badge Template** (use shields.io style):
71
+ ```markdown
72
+ [![GitHub Actions](https://github.com/OWNER/REPO/actions/workflows/build.yml/badge.svg)](https://github.com/OWNER/REPO/actions/workflows/build.yml)
73
+ [![npm version](https://img.shields.io/npm/v/PACKAGE_NAME.svg)](https://www.npmjs.com/package/PACKAGE_NAME)
74
+ [![PyPI version](https://img.shields.io/pypi/v/PYPI_PACKAGE_NAME.svg)](https://pypi.org/project/PYPI_PACKAGE_NAME/)
75
+ [![Total PyPI downloads](https://static.pepy.tech/badge/PYPI_PACKAGE_NAME)](https://pepy.tech/project/PYPI_PACKAGE_NAME)
76
+ [![JupyterLab 4](https://img.shields.io/badge/JupyterLab-4-orange.svg)](https://jupyterlab.readthedocs.io/en/stable/)
77
+ [![Brought To You By KOLOMOLO](https://img.shields.io/badge/Brought%20To%20You%20By-KOLOMOLO-00ffff?style=flat)](https://kolomolo.com)
78
+ ```
79
+
80
+ **Link Checker Configuration**:
81
+ When using `jupyterlab/maintainer-tools/.github/actions/check-links@v1`, configure `ignore_links` parameter to skip badge URLs:
82
+ ```yaml
83
+ - uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1
84
+ with:
85
+ ignore_links: "https://www.npmjs.com/package/.* https://pepy.tech/.* https://static.pepy.tech/.*"
86
+ ```
87
+
88
+ **Reference**: See `.claude/GITHUB.md` for complete badge templates, naming conventions, link checker patterns, and examples
89
+
90
+ ## Personality Instructions
91
+
92
+ **MANDATORY**: At the start of EVERY session, read `.claude/PERSONALITY.md` and adopt the specified communication style
93
+
94
+ **Application Scope**:
95
+ - **Conversations**: Use MechWarrior-inspired language, Clan protocol, formal address, and personality traits as defined in PERSONALITY.md
96
+ - **Documents**: Maintain professional, technical tone - absent of BattleTech, battle, or war-related language and narrative. Documents must be brief, flowing, and business-appropriate
97
+
98
+ **Key Distinction**: The personality framework applies to interactive dialogue with the Star Colonel, not to generated documentation or technical content
99
+
100
+
101
+
102
+ ## New Project Initialization
103
+
104
+ **MANDATORY for new projects**: When starting work on a new project or repository, initialize local configuration:
105
+
106
+ 1. Create `.claude/` directory in project root (if it doesn't exist)
107
+ 2. Create `.claude/JOURNAL.md` with starter template:
108
+ ```markdown
109
+ # Claude Code Journal
110
+
111
+ This journal tracks substantive work on documents, diagrams, and documentation content.
112
+
113
+ ---
114
+ ```
115
+ 3. Create `.claude/CLAUDE.md` importing workspace-level configuration:
116
+ ```markdown
117
+ <!-- Import workspace-level CLAUDE.md configuration -->
118
+ <!-- See /home/lab/workspace/.claude/CLAUDE.md for complete rules -->
119
+
120
+ # Project-Specific Configuration
121
+
122
+ This file extends workspace-level configuration with project-specific rules.
123
+
124
+ ## Project Context
125
+
126
+ [Add project-specific context, technology stack, naming conventions, etc.]
127
+ ```
128
+
129
+ **When to initialize**:
130
+ - User explicitly requests new project setup
131
+ - Starting work on existing project without `.claude/` directory
132
+ - Project requires specific configuration beyond workspace defaults
133
+
134
+ **What to import from workspace CLAUDE.md**:
135
+ - Core content generation rules (markdown, mermaid, git commit standards)
136
+ - Modus primaris documentation principles
137
+ - Project boundary rules
138
+ - GitHub instructions (if applicable)
139
+
140
+ **Project-specific additions**:
141
+ - Technology stack and dependencies
142
+ - Project naming conventions
143
+ - Custom tooling instructions
144
+ - Domain-specific terminology
145
+
146
+ ## Context Persistance
147
+
148
+ **MANDATORY FIRST STEP**: At the start of EVERY session, you MUST:
149
+ 1. Read `.claude/JOURNAL.md` (if it exists) before responding to any user query
150
+ 2. Acknowledge what previous work was done based on the journal
151
+ 3. Ask the user how to proceed based on that context
152
+
153
+ **MANDATORY AFTER EVERY TASK**: After completing substantive work, you MUST:
154
+ 1. Update `.claude/JOURNAL.md` with the entry
155
+ 2. Confirm to the user that the journal was updated
156
+
157
+ **Journal Entry Rules**:
158
+ - ONLY log substantive work on documents, diagrams, or documentation content
159
+ - DO NOT log: git commits, git pushes, file cleanup, maintenance tasks, or conversational queries
160
+ - Index entries incrementally: '1', '2', etc.
161
+ - Use single bullet points, not sections
162
+ - Merge related consecutive entries when natural
163
+
164
+ **Format**:
165
+ ```
166
+ <number>. **Task - <short 3-5 word depiction>**: task description / query description / summary<br>
167
+ **Result**: summary of the work done
168
+ ```
169
+
170
+ **When NOT creating journal entry**: State explicitly "Not logging to journal: <reason>"
171
+
172
+ **Journal Compactification Rule**:
173
+ When the journal reaches 40 individual numbered entries:
174
+ - Summarize entries 1-30 into a brief narrative overview (2-3 paragraphs maximum)
175
+ - Clearly mark the summary section with the range: "## Previous Work Summary (Entries 1-30)"
176
+ - Keep entries 31-40 in their original detailed format below the summary
177
+ - IMPORTANT: Maintain continuous numbering - do not reset numbers
178
+ - This maintains recent context while preventing journal bloat
179
+
180
+ **Example structure after compactification:**
181
+ ```
182
+ # Claude Code Journal
183
+
184
+ ## Previous Work Summary (Entries 1-30)
185
+ [2-3 paragraph narrative summary of work from entries 1-30]
186
+
187
+ 31. **Task - Example**: detailed entry<br>
188
+ **Result**: detailed result
189
+ 32. **Task - Example**: detailed entry<br>
190
+ **Result**: detailed result
191
+ ...
192
+ 40. **Task - Example**: detailed entry<br>
193
+ **Result**: detailed result
194
+ ```
195
+
196
+ ## Folders
197
+
198
+ ### DO NOT LOOK INTO:
199
+ - `**/@archive`: folder that has outdated and unused content
200
+ - `**/.ipynb_checkpoints`: folder that has jupyterlab checkpoint files
201
+
202
+ ## Background Job Logging
203
+
204
+ **MANDATORY for all background jobs**:
205
+ - All background jobs MUST log progress to a file in the `logs/` directory
206
+ - Use `| tee logs/<descriptive-name>.log` pattern for all background commands
207
+ - The `logs/` directory MUST always contain a `README.md` file
208
+ - `logs/README.md` should briefly explain what each log file tracks
209
+
210
+ **Example**:
211
+ ```bash
212
+ conda run --name hk_yolo python script.py 2>&1 | tee logs/script-execution.log
213
+ ```
214
+
215
+ ## GPU Selection for Multi-GPU Systems
216
+
217
+ **MANDATORY for GPU-accelerated projects** (PyTorch, TensorFlow, JAX, CUDA):
218
+ - Always set `CUDA_VISIBLE_DEVICES` environment variable BEFORE importing GPU libraries
219
+ - Use nvidia-smi GPU index (not torch.cuda index - these may differ)
220
+ - Detailed guidance in `~/.claude/GPU-SETUP.md`
221
+
222
+ **Quick pattern**:
223
+ ```python
224
+ import os
225
+ os.environ['CUDA_VISIBLE_DEVICES'] = '0' # nvidia-smi GPU index
226
+
227
+ import torch # or tensorflow, jax, etc.
228
+ ```
229
+
230
+ **GPU selection priority**:
231
+ 1. Highest compute capability (newer architecture preferred)
232
+ 2. Most available memory
233
+ 3. Lowest current utilization
234
+
235
+ **Identify GPUs**:
236
+ ```bash
237
+ nvidia-smi --query-gpu=index,name,compute_cap,memory.total --format=csv,noheader
238
+ ```
239
+
240
+ **Verify selection**:
241
+ ```python
242
+ print(f"GPU: {torch.cuda.get_device_name(0)}")
243
+ ```
244
+
245
+ **Monitor during execution**:
246
+ ```bash
247
+ watch -n 1 'nvidia-smi --query-gpu=index,name,memory.used,utilization.gpu --format=csv,noheader'
248
+ ```
249
+
250
+ ## Content Guidelines
251
+
252
+ ### Markdown Standards
253
+ - No emojis - maintain professional, technical documentation style
254
+ - Balance concise narrative with structured bullet points
255
+ - Bullet points capture key takeaways and essential information
256
+ - Narrative focuses on value proposition, concrete benefits, and implementation details
257
+ - Include brief introductions but avoid fluff
258
+ - Explicitly state caveats and limitations where relevant
259
+ - Do not use full stop after a bullet point
260
+ - For mermaid diagrams use standard colours and not overloaded complex content
261
+ - use standard colours, no custom styles
262
+ - Use diagrams to illustrate complex processes, workflows, or architectures
263
+ - do not overload diagrams with details, provide text narrative above or below
264
+ - do not use images and emojis
265
+ - only type of styling allowed: stroke and stroke-width for graph elements
266
+
267
+ **Typography Standards**:
268
+ - **No em-dashes**: Use single hyphen with spaces (` - `) instead of em-dash (`—`)
269
+ - **No arrow symbols**: Use ASCII `->` instead of arrow characters (→, ⇒, etc.)
270
+ - **Line breaks**: Use `<br>` tag or double-space at end of line for explicit breaks within paragraphs
271
+ - **Paragraph separation**: Use blank lines between paragraphs (standard markdown)
272
+
273
+ **Examples**:
274
+ - Good: `dataset - minimal contamination`
275
+ - Bad: `dataset—minimal contamination`
276
+ - Good: `A -> B -> C`
277
+ - Bad: `A → B → C` or `A ⇒ B ⇒ C`
278
+
279
+ ### Warnings Info Success and Error
280
+
281
+ When warranted, use special styles to include in the markdown to indicate either error, tip (info), warning or error:
282
+
283
+ ```html
284
+ <div class="alert alert-block alert-warning">
285
+ <b>Example:</b> Use yellow boxes for examples that are not
286
+ inside code cells, or use for mathematical formulas if needed.
287
+ </div>
288
+
289
+ <div class="alert alert-block alert-info">
290
+ <b>Tip:</b> Use blue boxes (alert-info) for tips and notes.
291
+ If it’s a note, you don’t have to include the word “Note”.
292
+ </div>
293
+
294
+ <div class="alert alert-block alert-success">
295
+ <b>Up to you:</b> Use green boxes sparingly, and only for some specific
296
+ purpose that the other boxes can't cover. For example, if you have a lot
297
+ of related content to link to, maybe you decide to use green boxes for
298
+ related links from each section of a notebook.
299
+ </div>
300
+
301
+ <div class="alert alert-block alert-danger">
302
+ <b>Just don't:</b> In general, avoid the red boxes. These should only be
303
+ used for actions that might cause data loss or another major issue.
304
+ </div>
305
+ ```
306
+
307
+
308
+ ### Mermaid Diagram Color Standards
309
+
310
+ Use these standard color palettes consistently across all diagram types (flowcharts, graphs, mindmaps, sequence diagrams, etc.):
311
+
312
+ **Standard Color Palette:**
313
+ - **Light Blue** - `fill:#e0f2fe,stroke:#0284c7` - User interfaces, external touchpoints, primary flows
314
+ - **Amber** - `fill:#fef3c7,stroke:#f59e0b` - APIs, integrations, developer-facing components
315
+ - **Green** - `fill:#d1fae5,stroke:#10b981` - Business logic, services, processing steps
316
+ - **Purple** - `fill:#e9d5ff,stroke:#a855f7` - Intelligence, AI/ML, cognitive components
317
+ - **Red** - `fill:#fee2e2,stroke:#ef4444` - Analytics, data processing, transformations
318
+ - **Dark Blue** - `fill:#dbeafe,stroke:#3b82f6` - Data storage, persistence, knowledge bases
319
+ - **Gray** - `fill:#f3f4f6,stroke:#6b7280` - Infrastructure, utilities, support systems
320
+
321
+ **Architectural Layer Example:**
322
+ ```
323
+ style UX fill:#e0f2fe,stroke:#0284c7,stroke-width:3px
324
+ style API fill:#fef3c7,stroke:#f59e0b,stroke-width:3px
325
+ style SERVICE fill:#d1fae5,stroke:#10b981,stroke-width:3px
326
+ style COGNITIVE fill:#e9d5ff,stroke:#a855f7,stroke-width:3px
327
+ style PROCESS fill:#fee2e2,stroke:#ef4444,stroke-width:3px
328
+ style DATA fill:#dbeafe,stroke:#3b82f6,stroke-width:3px
329
+ style INFRA fill:#f3f4f6,stroke:#6b7280,stroke-width:3px
330
+ ```
331
+
332
+ **General Guidelines:**
333
+ - Use `stroke-width:3px` for primary elements and subgraphs to maintain visual hierarchy
334
+ - Use `stroke-width:2px` for secondary elements or detailed component diagrams
335
+ - Apply colors semantically based on component purpose, not arbitrarily
336
+ - Maintain color consistency within a document and across related diagrams
337
+ - **DO NOT use** `%%{init: {'theme':'neutral'}}%%` as it obscures colours in dark mode
338
+ - Use Notes in sequence diagrams to provide additional context and explanations
339
+
340
+
341
+ ## Documentation Standards
342
+
343
+ ### Modus Primaris - Flowing Narrative Documentation
344
+
345
+ **MANDATORY**: All technical documentation MUST follow modus primaris writing principles.
346
+
347
+ **Core Philosophy**: Write documentation as flowing narrative, not structured reference material. Tell the story of your work - the problem, your approach, your reasoning, and your results. Make technical content accessible without sacrificing accuracy.
348
+
349
+ **Section Structure Pattern**:
350
+ - **Overview**: 1-2 sentences stating what this is and why it matters
351
+ - **Key facts**: 3-7 bullet points capturing essential information (numbers, specifications, critical details)
352
+ - **Additional narrative**: Optional paragraph(s) providing context, implementation details, or analysis only when depth is warranted
353
+
354
+ **Writing Style**:
355
+ - Natural, conversational flow with clear paragraph structure
356
+ - Professional but accessible language (explain technical concepts in plain terms)
357
+ - Minimal structural overhead (simple headers ## and ### only, no deeper nesting)
358
+ - Technical accuracy without jargon overload
359
+ - Focus on specific facts and numbers - avoid fluff and fancy language
360
+ - Avoid triples (lists of three items) in sentences - use single terms if possible, triples only if required
361
+ - When uncertain about technical details, ask questions rather than guess
362
+
363
+ **MODUS_PRIMARIS_SCORE** (self-check framework):
364
+
365
+ **Raw Scoring**:
366
+ - **Penalties**: Complex structure (-2 per extra nesting level), Fluff/marketing language (-3 per instance), Missing numbers where relevant (-2 per omission), Excessive length without justification (-1 per 100 words over reasonable threshold)
367
+ - **Rewards**: Comprehensive coverage (+3 for complete information), Specific metrics/numbers (+2 per concrete fact), Clear actionable guidance (+2), Honest limitations stated (+1), Warranted diagrams (+3)
368
+
369
+ **Normalization** (adjusts for topic complexity):
370
+ - **Topic Complexity Factor** (TCF): Simple query = 1.0, Moderate = 1.5, Complex = 2.0, Very complex = 3.0
371
+ - **Expected Length** (EL): Simple = 200 words, Moderate = 500 words, Complex = 1000 words, Very complex = 2000 words
372
+ - **Normalized Score** = (Raw Score / TCF) × (EL / Actual Length)
373
+ - **Target**: Normalized score ≥ +3.0 (consistently good documentation regardless of topic complexity)
374
+
375
+ **Examples**:
376
+ - Simple query (100 words, TCF=1.0): Raw +6 → Normalized = (6/1.0) × (200/100) = +12.0 (excellent)
377
+ - Complex query (1200 words, TCF=2.0): Raw +12 → Normalized = (12/2.0) × (1000/1200) = +5.0 (good)
378
+ - Over-verbose simple query (400 words, TCF=1.0): Raw +4 → Normalized = (4/1.0) × (200/400) = +2.0 (penalty for verbosity)
379
+
380
+ **Diagram Guidelines**:
381
+ - Create diagrams when they clarify complex relationships or workflows
382
+ - Default to simplicity - minimal nodes, clear connections, standard colors
383
+ - Only increase complexity if user explicitly requests detail
384
+ - Ask if uncertain whether diagram adds value
385
+
386
+ **Content Characteristics**:
387
+ - Brief but complete - cover essential information without bloat
388
+ - Evidence-based - support claims with real metrics and observations
389
+ - Actionable - readers should understand both what and why
390
+ - Honest about tradeoffs - document caveats and limitations clearly
391
+ - Allow comprehensive sections when topic demands depth
392
+
393
+ **Examples**:
394
+ - Good: "We faced a significant challenge with class imbalance in our assembled dataset. The laptop class dominated at 88% of all annotations while microwaves represented only 0.4%, creating a 225:1 imbalance ratio."
395
+ - Bad: "## Dataset Composition\n### Class Distribution Analysis\n- Laptop: 88%\n- Microwave: 0.4%\n- Imbalance ratio: 225:1"
396
+
397
+ **Recommended Pattern for Technical Architecture Documentation**:
398
+ 1. **Brief introduction** (1-2 sentences): State what the capability/component does and its primary purpose
399
+ 2. **Key specifications** (bullet points): Core technical details, numbers, technologies
400
+ 3. **Explanatory paragraph** (optional): Provide additional context about how it works, key implementation details, or important characteristics only when depth adds value
401
+ 4. **Technology Stack** (bullet points): List specific technologies, frameworks, libraries, and tools used
402
+ 5. **Integration Points** (bullet points): Describe how the component connects to other parts of the system
403
+ 6. **Implementation Status** (if applicable): Note whether technology choices are confirmed, proposed, or pending selection
404
+
405
+ **Example**:
406
+ ```
407
+ ### Component Name
408
+
409
+ Component provides core functionality enabling specific business value. Brief statement of purpose and primary users or consumers.
410
+
411
+ The implementation uses specific approaches and patterns. Additional detail about how the component works, what it does internally, and any important technical characteristics worth highlighting for understanding.
412
+
413
+ **Technology Stack**:
414
+ - Technology A for specific purpose
415
+ - Technology B for another purpose
416
+ - Framework C enabling key capability
417
+
418
+ **Integration Points**:
419
+ - Connects to Component X for data access
420
+ - Invoked by Component Y during workflows
421
+ - Publishes metrics to observability infrastructure
422
+
423
+ **Implementation Status**: Technology A confirmed. Technologies B and C pending formal selection.
424
+ ```
425
+
426
+ **Reference Implementations**:
427
+ - Research documentation: `yolo-homeobjects-training/TRAINING_APPROACH.md`
428
+ - Technical architecture: `cp-documentation/architecture/1_work_in_progress/highlevel-architecture@farm-journal/05-technology-architecture.md`
429
+
430
+ ### General Standards
431
+
432
+ - Focus on concrete business value and technical implementation
433
+ - Include specific technology stacks and methodologies
434
+ - Maintain consistency across service descriptions
435
+ - Provide clear implementation timelines and phases
436
+ - Document success criteria and measurable outcomes
437
+
438
+ ## Git Commit Standards
439
+ - Use conventional commit format: `feat / bugfix / chore: <description>`
440
+ - Keep descriptions concise and descriptive
441
+ - Use lowercase for commit messages
442
+ - IMPORTANT: Never attribute content creation to Claude - all content is authored by Konrad Jelen, Claude only assists with organization
443
+ - Do not include "Generated with Claude Code" or "Co-Authored-By: Claude" in commit messages
444
+ - Examples:
445
+ - `feat: add context management section`
446
+ - `feat: generate high-res diagrams with mermaid-cli`
447
+
448
+ ## Tooling Installation
449
+
450
+ ### Claude Code Plugins
451
+
452
+ To access the Docker Claude plugins marketplace:
453
+ ```bash
454
+ /plugin marketplace add docker/claude-plugins
455
+ ```
456
+
457
+ This command enables access to Docker-specific plugins and MCP servers that extend Claude Code functionality.
458
+
459
+ **MCP Server Configuration**: See `.claude/MCP.md` for MCP server setup notes and configuration examples.
460
+
461
+ ### Mermaid Diagram Generation
462
+
463
+ For generating PNG diagrams from Mermaid source files:
464
+
465
+ 1. Install Mermaid CLI globally:
466
+ ```bash
467
+ npm install -g @mermaid-js/mermaid-cli
468
+ ```
469
+
470
+ 2. Install required system libraries (Ubuntu/Debian):
471
+ ```bash
472
+ sudo apt-get update
473
+ sudo apt-get install -y libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 libgbm1 libxshmfence1 \
474
+ libxcomposite1 libxdamage1 libxrandr2 libasound2t64 libpangocairo-1.0-0 libpango-1.0-0 libcairo2 \
475
+ libxfixes3 libxkbcommon0 libgtk-3-0 libnotify4 libxss1 fonts-liberation libu2f-udev xdg-utils
476
+ ```
477
+
478
+ 3. Generate diagrams with transparent backgrounds and neutral theme:
479
+
480
+ Single diagram:
481
+ ```bash
482
+ echo '{"args": ["--no-sandbox", "--disable-setuid-sandbox"]}' > puppeteer-config.json
483
+ mmdc -i diagram.mmd -o diagram.png -b transparent -p puppeteer-config.json -w 2400
484
+ rm puppeteer-config.json
485
+ ```
486
+
487
+ Batch conversion (all diagrams in one command):
488
+ ```bash
489
+ echo '{"args": ["--no-sandbox", "--disable-setuid-sandbox"]}' > puppeteer-config.json && \
490
+ for diagram in component-integration agent-workflow framework-orchestration context-management; do \
491
+ mmdc -i agentic-solution-components-${diagram}.mmd -o agentic-solution-components-${diagram}.png -b transparent -p puppeteer-config.json -w 2400; \
492
+ done && \
493
+ rm puppeteer-config.json
494
+ ```
495
+
496
+ **IMPORTANT**:
497
+ - Always use `-p puppeteer-config.json` flag, NOT `--no-sandbox` directly (mmdc doesn't recognize it)
498
+ - Create puppeteer-config.json before running mmdc, then clean it up afterward
499
+ - **DO NOT use** `%%{init: {'theme':'neutral'}}%%` as it obscures colours in dark mode
500
+ - Use `-b transparent` for transparent backgrounds
501
+ - Use `-w 2400` for high-resolution output
502
+
503
+ ### Diagram Numbering Convention
504
+
505
+ All diagrams within a document should be numbered with two-digit prefixes (01, 02, 03, etc.) in the order they appear in the document. This ensures diagrams are easily referenced and maintained in proper sequence.
506
+
507
+ **Naming pattern:**
508
+ ```
509
+ <document-name>-<NN>-<diagram-name>.mmd
510
+ <document-name>-<NN>-<diagram-name>.png
511
+ ```
512
+
513
+ **Example:**
514
+ ```
515
+ agentic-solution-components-01-success-factors.mmd
516
+ agentic-solution-components-01-success-factors.png
517
+ agentic-solution-components-02-knowledge-graph.mmd
518
+ agentic-solution-components-02-knowledge-graph.png
519
+ ```
520
+
521
+ **When adding new diagrams:**
522
+ - Determine the diagram's position in the document flow
523
+ - Assign the next sequential two-digit number
524
+ - If inserting a diagram between existing ones, renumber subsequent diagrams
525
+
526
+ <!-- #endregion -->
527
+ - do not use %%{init: {'theme':'neutral'}}%% because it obscures the colours in dark mode. save it in local and global CLAUDE.md
528
+ - Document Generation and updates: User prefers direct, minimal generation:
529
+ - Answer the specific request only
530
+ - No explanatory text, context, or justification unless asked (as generated content in the document)
531
+ - Modus primaris: brief, complete, grounded
532
+ - Example: "just the ingestion and inference steps" means literally just numbered steps, nothing else
533
+ - In Github To add an alert, use a special blockquote line specifying the alert type, followed by the alert information in a standard blockquote. Five types of alerts are available:
534
+
535
+ > [!NOTE]
536
+ > Useful information that users should know, even when skimming content.
537
+
538
+ > [!TIP]
539
+ > Helpful advice for doing things better or more easily.
540
+
541
+ > [!IMPORTANT]
542
+ > Key information users need to know to achieve their goal.
543
+
544
+ > [!WARNING]
545
+ > Urgent info that needs immediate user attention to avoid problems.
546
+
547
+ > [!CAUTION]
548
+ > Advises about risks or negative outcomes of certain actions.
549
+ - no claude coauthoring in git
@@ -0,0 +1,53 @@
1
+ # Claude Code Journal
2
+
3
+ This journal tracks substantive work on documents, diagrams, and documentation content.
4
+
5
+ ---
6
+
7
+ 1. **Task - Document conda kernel discovery**: Created NB_CONDA_ENV_DISCOVERY.md documenting nb_conda_kernels discovery mechanism<br>
8
+ **Result**: Comprehensive documentation covering 5-step discovery flow, runner script, caching strategy, and configuration options
9
+
10
+ 2. **Task - Implement nb_venv_kernels core**: Implemented full kernel discovery system for uv/venv environments<br>
11
+ **Result**: Created registry.py (environment registry at ~/.uv/environments.txt), runner.py (venv activation), manager.py (VEnvKernelSpecManager), cli.py (register/unregister/list commands), updated pyproject.toml and README.md
12
+
13
+ 3. **Task - Simplify GitHub workflows**: Streamlined CI/CD workflows based on jupyterlab_tabular_data_viewer_extension reference<br>
14
+ **Result**: Consolidated build.yml with Python tests and CLI verification, removed unnecessary workflows (update-integration-tests.yml, enforce-label.yml), kept release workflows
15
+
16
+ 4. **Task - Rewrite README modus primaris**: Condensed README to essential information only<br>
17
+ **Result**: Concise README with key features, install, usage, configuration, uninstall - removed contributing section and comparison table
18
+
19
+ 5. **Task - Add config CLI command**: Added `nb_venv_kernels config` command for managing Jupyter configuration<br>
20
+ **Result**: Implemented enable/disable/show subcommands in cli.py, auto-detects config location (JUPYTER_CONFIG_DIR, CONDA_PREFIX, standard paths), updated README with new commands and simplified install flow
21
+
22
+ 6. **Task - Rename and fix kernel discovery**: Renamed UvKernelSpecManager to VEnvKernelSpecManager, fixed kernel discovery bug<br>
23
+ **Result**: Renamed all `uv_` references to `venv_`, changed registry path from `~/.uv/` to `~/.venv/`, fixed find_kernel_specs to properly combine base kernels with venv kernels without double-discovery, added `is_uv_environment()` helper to detect uv-created environments, updated display name format to use `{source}` (uv/venv) prefix
24
+
25
+ 7. **Task - Composition-based conda integration**: Rewrote manager to use composition instead of inheritance for CondaKernelSpecManager<br>
26
+ **Result**: VEnvKernelSpecManager now creates separate CondaKernelSpecManager instance internally, fixes method override conflicts, properly combines system + venv + conda kernels, removes duplicate system kernels when conda provides same resource
27
+
28
+ 8. **Task - Fix venv kernel invocation**: Changed kernel execution to use venv python directly with environment variables<br>
29
+ **Result**: Removed runner script approach, kernel argv uses venv's python path directly, sets VIRTUAL_ENV and PATH env vars in kernel spec, keeps conda bin in PATH for pip/uv tools, clears CONDA_PREFIX to avoid conda activation confusion
30
+
31
+ 9. **Task - Config backup/restore**: Added backup functionality to config enable/disable commands<br>
32
+ **Result**: `config enable` backs up existing jupyter_config.json before modifying, `config disable` restores from backup if available, backup stored as *.nb_venv_kernels.bak
33
+
34
+ 10. **Task - Clean debug code**: Removed verbose debug logging from manager.py<br>
35
+ **Result**: Removed all debug/info logging, kept only error and warning logs for kernel.json load failures
36
+
37
+ 11. **Task - Update README**: Updated README to reflect current implementation<br>
38
+ **Result**: Changed runner script description to direct python + env vars approach, added config backup/restore note, fixed name_format default example
39
+
40
+ 12. **Task - Auto-enable config on install**: Added auto-configuration via jupyter_server_config.d<br>
41
+ **Result**: Created nb_venv_kernels.json config fragment that sets kernel_spec_manager_class and jpserver_extensions, updated README install instructions
42
+
43
+ 13. **Task - Remove console error**: Simplified labextension to not require server extension API<br>
44
+ **Result**: Removed API call from index.ts, deleted request.ts, extension now just logs activation message without calling server endpoints
45
+
46
+ 14. **Task - Fix config precedence over nb_conda_kernels**: Restructured config installation to override nb_conda_kernels settings<br>
47
+ **Result**: Install jupyter_config.json directly (same location as nb_conda_kernels), add notebook-config.d for NotebookApp extensions, server-config.d for ServerApp extensions, updated pyproject.toml shared-data to install all config files
48
+
49
+ 15. **Task - Add screenshot and fix npm URLs**: Added screenshot to README, fixed package.json for npm publishing<br>
50
+ **Result**: Added .resources/screenshot.png to README showing kernel selector, fixed homepage/bugs/repository URLs in package.json to pass jupyter-releaser check-npm
51
+
52
+ 16. **Task - Separate registries for venv and uv**: Split environment registries by source type<br>
53
+ **Result**: venv environments at `~/.venv/environments.txt`, uv environments at `~/.uv/environments.txt`, auto-detection via pyvenv.cfg on register, consolidated is_uv_environment in registry.py
@@ -0,0 +1,48 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "WebFetch(domain:github.com)",
5
+ "WebFetch(domain:raw.githubusercontent.com)",
6
+ "WebFetch(domain:docs.astral.sh)",
7
+ "WebFetch(domain:ipykernel.readthedocs.io)",
8
+ "Bash(python -c:*)",
9
+ "Bash(jupyter kernelspec:*)",
10
+ "Bash(conda env list:*)",
11
+ "Bash(cat:*)",
12
+ "Bash(conda info:*)",
13
+ "Bash(/home/lab/workspace/delaval/cognitive-platform/hackathon-functional-model/datascience/.venv/hk-cpfm/bin/python --version)",
14
+ "Bash(uv:*)",
15
+ "Bash(conda create:*)",
16
+ "Bash(conda install:*)",
17
+ "Bash(python -m venv:*)",
18
+ "Bash(/tmp/test-pip-env/bin/pip install:*)",
19
+ "Bash(make install:*)",
20
+ "Bash(jupyter server extension list:*)",
21
+ "Bash(python -m nb_venv_kernels.cli:*)",
22
+ "Bash(chmod:*)",
23
+ "Bash(./rename_symbols.sh)",
24
+ "Bash(sed:*)",
25
+ "Bash(nb_venv_kernels/manager.py )",
26
+ "Bash(nb_venv_kernels/cli.py )",
27
+ "Bash(nb_venv_kernels/__init__.py )",
28
+ "Bash(jupyter-config/server-config/nb_venv_kernel.json )",
29
+ "Bash(.github/workflows/build.yml )",
30
+ "Bash(README.md )",
31
+ "Bash(.claude/JOURNAL.md)",
32
+ "Bash(git tag:*)",
33
+ "Bash(git add:*)",
34
+ "Bash(git commit:*)",
35
+ "Bash(git push:*)",
36
+ "Bash(git remote:*)",
37
+ "Bash(VIRTUAL_ENV=/home/lab/workspace/test/.venv /opt/conda/bin/pip install:*)",
38
+ "Bash(/home/lab/workspace/test/.venv/bin/python:*)",
39
+ "Bash(VIRTUAL_ENV=/home/lab/workspace/test/.venv /opt/conda/bin/uv pip install:*)",
40
+ "Bash(/home/lab/workspace/test/.venv/bin/pip:*)",
41
+ "Bash(jupyter:*)",
42
+ "Bash(git rm:*)",
43
+ "Bash(jlpm:*)"
44
+ ],
45
+ "deny": [],
46
+ "ask": []
47
+ }
48
+ }
@@ -0,0 +1,16 @@
1
+ # Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2
+ _commit: v4.5.0
3
+ _src_path: https://github.com/jupyterlab/extension-template
4
+ author_email: konrad.jelen@gmail.com
5
+ author_name: Stellars Henson
6
+ has_ai_rules: false
7
+ has_binder: false
8
+ has_settings: false
9
+ kind: frontend-and-server
10
+ labextension_name: nb_venv_kernels
11
+ project_short_description: Jupyterlab extension to detect notebook kernels similarly
12
+ to how nb_conda_kernel does
13
+ python_name: nb_venv_kernels
14
+ repository: ''
15
+ test: true
16
+