jupyterlab-proxy-launcher-command-extension 1.0.14__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 (44) hide show
  1. jupyterlab_proxy_launcher_command_extension-1.0.14/.claude/CLAUDE.md +720 -0
  2. jupyterlab_proxy_launcher_command_extension-1.0.14/.claude/JOURNAL.md +26 -0
  3. jupyterlab_proxy_launcher_command_extension-1.0.14/.claude/settings.local.json +8 -0
  4. jupyterlab_proxy_launcher_command_extension-1.0.14/.copier-answers.yml +16 -0
  5. jupyterlab_proxy_launcher_command_extension-1.0.14/.git +1 -0
  6. jupyterlab_proxy_launcher_command_extension-1.0.14/.gitignore +128 -0
  7. jupyterlab_proxy_launcher_command_extension-1.0.14/.prettierignore +6 -0
  8. jupyterlab_proxy_launcher_command_extension-1.0.14/.yarnrc.yml +2 -0
  9. jupyterlab_proxy_launcher_command_extension-1.0.14/CHANGELOG.md +5 -0
  10. jupyterlab_proxy_launcher_command_extension-1.0.14/LICENSE +29 -0
  11. jupyterlab_proxy_launcher_command_extension-1.0.14/Makefile +122 -0
  12. jupyterlab_proxy_launcher_command_extension-1.0.14/PKG-INFO +120 -0
  13. jupyterlab_proxy_launcher_command_extension-1.0.14/README.md +65 -0
  14. jupyterlab_proxy_launcher_command_extension-1.0.14/RELEASE.md +80 -0
  15. jupyterlab_proxy_launcher_command_extension-1.0.14/babel.config.js +1 -0
  16. jupyterlab_proxy_launcher_command_extension-1.0.14/install.json +5 -0
  17. jupyterlab_proxy_launcher_command_extension-1.0.14/jest.config.js +28 -0
  18. jupyterlab_proxy_launcher_command_extension-1.0.14/jupyterlab_proxy_launcher_command_extension/__init__.py +16 -0
  19. jupyterlab_proxy_launcher_command_extension-1.0.14/jupyterlab_proxy_launcher_command_extension/_version.py +4 -0
  20. jupyterlab_proxy_launcher_command_extension-1.0.14/jupyterlab_proxy_launcher_command_extension/labextension/package.json +204 -0
  21. jupyterlab_proxy_launcher_command_extension-1.0.14/jupyterlab_proxy_launcher_command_extension/labextension/static/509.de255d2195ed8f3efde6.js +1 -0
  22. jupyterlab_proxy_launcher_command_extension-1.0.14/jupyterlab_proxy_launcher_command_extension/labextension/static/728.c3bc559a6ff464afc88e.js +1 -0
  23. jupyterlab_proxy_launcher_command_extension-1.0.14/jupyterlab_proxy_launcher_command_extension/labextension/static/remoteEntry.4ede842322d4486faae1.js +1 -0
  24. jupyterlab_proxy_launcher_command_extension-1.0.14/jupyterlab_proxy_launcher_command_extension/labextension/static/style.js +4 -0
  25. jupyterlab_proxy_launcher_command_extension-1.0.14/jupyterlab_proxy_launcher_command_extension/labextension/static/third-party-licenses.json +16 -0
  26. jupyterlab_proxy_launcher_command_extension-1.0.14/package-lock.json +15422 -0
  27. jupyterlab_proxy_launcher_command_extension-1.0.14/package.json +199 -0
  28. jupyterlab_proxy_launcher_command_extension-1.0.14/proxy.svg +141 -0
  29. jupyterlab_proxy_launcher_command_extension-1.0.14/pyproject.toml +77 -0
  30. jupyterlab_proxy_launcher_command_extension-1.0.14/setup.py +1 -0
  31. jupyterlab_proxy_launcher_command_extension-1.0.14/src/__tests__/jupyterlab_proxy_launcher_command_extension.spec.ts +9 -0
  32. jupyterlab_proxy_launcher_command_extension-1.0.14/src/index.ts +316 -0
  33. jupyterlab_proxy_launcher_command_extension-1.0.14/style/base.css +14 -0
  34. jupyterlab_proxy_launcher_command_extension-1.0.14/style/index.css +1 -0
  35. jupyterlab_proxy_launcher_command_extension-1.0.14/style/index.js +1 -0
  36. jupyterlab_proxy_launcher_command_extension-1.0.14/tsconfig.json +26 -0
  37. jupyterlab_proxy_launcher_command_extension-1.0.14/tsconfig.test.json +3 -0
  38. jupyterlab_proxy_launcher_command_extension-1.0.14/ui-tests/README.md +167 -0
  39. jupyterlab_proxy_launcher_command_extension-1.0.14/ui-tests/jupyter_server_test_config.py +12 -0
  40. jupyterlab_proxy_launcher_command_extension-1.0.14/ui-tests/package.json +15 -0
  41. jupyterlab_proxy_launcher_command_extension-1.0.14/ui-tests/playwright.config.js +14 -0
  42. jupyterlab_proxy_launcher_command_extension-1.0.14/ui-tests/tests/jupyterlab_proxy_launcher_command_extension.spec.ts +107 -0
  43. jupyterlab_proxy_launcher_command_extension-1.0.14/ui-tests/yarn.lock +0 -0
  44. jupyterlab_proxy_launcher_command_extension-1.0.14/yarn.lock +11023 -0
@@ -0,0 +1,720 @@
1
+ <!-- @import /home/lab/workspace/.claude/CLAUDE.md -->
2
+
3
+ <!-- #region -->
4
+
5
+ # Project-Specific Configuration
6
+
7
+ This file imports workspace-level configuration from `/home/lab/workspace/.claude/CLAUDE.md`.
8
+ All workspace rules apply. Project-specific rules below strengthen or extend them.
9
+
10
+ The workspace `/home/lab/workspace/.claude/` directory contains additional instruction files
11
+ (MERMAID.md, NOTEBOOK.md, DATASCIENCE.md, GIT.md, JUPYTERLAB_EXTENSION.md, and others) referenced by CLAUDE.md.
12
+ Consult workspace CLAUDE.md and the .claude directory to discover all applicable standards.
13
+
14
+ ## Mandatory Bans (Reinforced)
15
+
16
+ The following workspace rules are STRICTLY ENFORCED for this project:
17
+
18
+ - **No automatic git tags** - only create tags when user explicitly requests
19
+ - **No automatic version changes** - only modify version in package.json/pyproject.toml/etc. when user explicitly requests
20
+ - **No automatic publishing** - never run `make publish`, `npm publish`, `twine upload`, or similar without explicit user request
21
+ - **No manual package installs if Makefile exists** - use `make install` or equivalent Makefile targets, not direct `pip install`/`uv install`/`npm install`
22
+ - **No automatic git commits or pushes** - only when user explicitly requests
23
+
24
+ ## Project Context
25
+
26
+ JupyterLab extension providing commands to launch jupyter-server-proxy connections. Enables launching proxied services in either a new JupyterLab tab or a new browser tab via modal port selection.
27
+
28
+ **Technology Stack**:
29
+
30
+ - TypeScript for frontend extension
31
+ - Python packaging via hatchling
32
+ - JupyterLab 4.x extension API
33
+ - jupyter-releaser for CI/CD
34
+
35
+ ---
36
+
37
+ # Code and Content Generation Rules
38
+
39
+ - always consider JOURNAL instructions
40
+ - always consider markdown instructions and guidelines when creating documentation
41
+ - always follow MERMAID.md for diagram styling standards
42
+ - always consider GITHUB instructions when working with GitHub-hosted projects
43
+ - always consider DATASCIENCE instructions when working with data science projects
44
+ - always consider RICH instructions when formatting output in notebooks and scripts
45
+ - always follow NOTEBOOK.md when creating or modifying Jupyter notebooks
46
+ - always follow GIT.md for commit message conventions
47
+ - always follow JUPYTERLAB_EXTENSION.md when working with JupyterLab extensions and jupyter-releaser CI/CD
48
+
49
+ ## Project Boundary Rules
50
+
51
+ **MANDATORY**: Never reach outside current project unless explicitly instructed by the user
52
+
53
+ **Prohibited Actions**:
54
+
55
+ - Web searches or WebFetch operations without explicit user request
56
+ - Accessing external documentation, APIs, or resources not part of the current workspace
57
+ - Consulting external knowledge bases, wikis, or reference materials
58
+ - Reaching out to external services, repositories, or networks
59
+
60
+ **Allowed Actions**:
61
+
62
+ - Reading files within `/home/lab/workspace`
63
+ - Using local tools (Bash, Git, conda, etc.) within the workspace
64
+ - Accessing submodules or dependencies already present in the project
65
+ - Consulting files explicitly referenced by the user
66
+
67
+ **When User Explicitly Requests External Access**:
68
+
69
+ - Web searches when user asks "search for...", "look up...", "find documentation for..."
70
+ - WebFetch when user provides a URL or asks to "fetch..." from external source
71
+ - External tool usage when user specifically requests it
72
+
73
+ **Enforcement**: If uncertain whether action crosses project boundary, ask the user for explicit permission first
74
+
75
+ ## Git Commit Policy
76
+
77
+ **MANDATORY**: Never create git commits, push to remote repositories, or create tags without explicit user approval EVERY SINGLE TIME
78
+
79
+ **Prohibited Actions**:
80
+
81
+ - Running `git commit` without user explicitly requesting it
82
+ - Running `git push` without user explicitly requesting it
83
+ - Running `git tag` without user explicitly requesting it
84
+ - Automatic commits after completing tasks
85
+ - Batching commits without user confirmation
86
+ - Creating or pushing tags without explicit user request
87
+
88
+ **Allowed Actions**:
89
+
90
+ - Staging files with `git add` when preparing for user-approved commits
91
+ - Running `git status`, `git diff`, `git log` for informational purposes
92
+ - Creating commits only when user explicitly says "commit", "push", "make a commit", or similar direct instructions
93
+ - Creating tags only when user explicitly says "tag" or "create tag"
94
+
95
+ **Critical Enforcement**:
96
+
97
+ - EVERY SINGLE TIME before running git commit, push, or tag, you MUST have explicit user approval for that specific action in that specific session
98
+ - Even if user previously requested commits/pushes, you MUST get approval again for each new commit/push/tag
99
+ - Never assume permission from previous interactions
100
+ - Always wait for explicit user approval before executing any git commit, push, or tag operations
101
+ - When work is complete, inform the user and ask if they want to commit the changes
102
+
103
+ ## Release and Package Management Policy
104
+
105
+ **MANDATORY**: Never perform release, versioning, or package publishing operations without explicit user request
106
+
107
+ **Prohibited Actions**:
108
+
109
+ - Creating git tags automatically - only when user explicitly requests "tag" or "create tag"
110
+ - Changing version numbers in package.json, pyproject.toml, Cargo.toml, or similar - only when user explicitly requests version change
111
+ - Running `make publish`, `npm publish`, `twine upload`, `cargo publish`, or any package publishing command - only when user explicitly requests publishing
112
+ - Running manual package installation/build commands when project has a Makefile: `pip install`, `uv install`, `npm install`, `jlpm install`, `jlpm build`, `yarn install`, `yarn build`, `pnpm install` - use `make install` or equivalent Makefile targets instead
113
+
114
+ **Allowed Actions**:
115
+
116
+ - Running `make install`, `make build`, `make test`, or other Makefile targets for local development
117
+ - Running dependency installation commands only when NO Makefile target exists for the operation
118
+ - Checking current version with read-only commands
119
+
120
+ **Rationale**: Accidental version bumps, tag creation, or package publishing can cause significant issues - duplicate versions on registries, broken release pipelines, version conflicts. These operations are irreversible in many cases.
121
+
122
+ **When User Requests Release**:
123
+
124
+ - Confirm the specific version number before changing
125
+ - Confirm the target registry (npm, PyPI, crates.io) before publishing
126
+ - Use project's Makefile targets when available
127
+
128
+ ## GitHub Project Instructions
129
+
130
+ **MANDATORY**: When working with GitHub-hosted repositories, consult `.claude/GITHUB.md` for specific instructions
131
+
132
+ **GitHub-Specific Rules**:
133
+
134
+ - Add standardized badges to README.md files (GitHub Actions, npm version, PyPI version)
135
+ - Follow repository and package naming conventions
136
+ - Verify workflow files before adding badges
137
+ - Validate badge URLs match actual repository owner and package names
138
+ - Configure link checker to ignore badge URLs that fail automated checks
139
+
140
+ **Badge Template** (use shields.io style):
141
+
142
+ ```markdown
143
+ [![GitHub Actions](https://github.com/OWNER/REPO/actions/workflows/build.yml/badge.svg)](https://github.com/OWNER/REPO/actions/workflows/build.yml)
144
+ [![npm version](https://img.shields.io/npm/v/PACKAGE_NAME.svg)](https://www.npmjs.com/package/PACKAGE_NAME)
145
+ [![PyPI version](https://img.shields.io/pypi/v/PYPI_PACKAGE_NAME.svg)](https://pypi.org/project/PYPI_PACKAGE_NAME/)
146
+ [![Total PyPI downloads](https://static.pepy.tech/badge/PYPI_PACKAGE_NAME)](https://pepy.tech/project/PYPI_PACKAGE_NAME)
147
+ [![JupyterLab 4](https://img.shields.io/badge/JupyterLab-4-orange.svg)](https://jupyterlab.readthedocs.io/en/stable/)
148
+ [![Brought To You By KOLOMOLO](https://img.shields.io/badge/Brought%20To%20You%20By-KOLOMOLO-00ffff?style=flat)](https://kolomolo.com)
149
+ [![Donate PayPal](https://img.shields.io/badge/Donate-PayPal-blue?style=flat)](https://www.paypal.com/donate/?hosted_button_id=B4KPBJDLLXTSA)
150
+ ```
151
+
152
+ **Link Checker Configuration**:
153
+ When using `jupyterlab/maintainer-tools/.github/actions/check-links@v1`, configure `ignore_links` parameter to skip badge URLs:
154
+
155
+ ```yaml
156
+ - uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1
157
+ with:
158
+ ignore_links: 'https://www.npmjs.com/package/.* https://pepy.tech/.* https://static.pepy.tech/.*'
159
+ ```
160
+
161
+ **Reference**: See `.claude/GITHUB.md` for complete badge templates, naming conventions, link checker patterns, and examples
162
+
163
+ ## Personality Instructions
164
+
165
+ **MANDATORY**: At the start of EVERY session, read `.claude/PERSONALITY.md` and adopt the specified communication style
166
+
167
+ **Application Scope**:
168
+
169
+ - **Conversations**: Use MechWarrior-inspired language, Clan protocol, formal address, and personality traits as defined in PERSONALITY.md
170
+ - **Documents**: Maintain professional, technical tone - absent of BattleTech, battle, or war-related language and narrative. Documents must be brief, flowing, and business-appropriate
171
+
172
+ **Key Distinction**: The personality framework applies to interactive dialogue with the Star Colonel, not to generated documentation or technical content
173
+
174
+ ## Agent System Prompts
175
+
176
+ When building agent system prompts, use the structured template in `.claude/AGENT_PROMPT.md`. The template provides tagged sections (PERSONA, CONTEXT, STAKES, METHODOLOGY, CONSTRAINTS, OUTPUT FORMAT, QUALITY CONTROL, TASK) based on prompt engineering research.
177
+
178
+ ## Skills vs Commands
179
+
180
+ **When user asks to create a skill or command**, understand the distinction:
181
+
182
+ | Aspect | Commands | Skills |
183
+ | ---------- | --------------------------------- | ---------------------------------------------- |
184
+ | Location | `.claude/commands/name.md` | `.claude/skills/name/SKILL.md` |
185
+ | Invocation | Explicit `/command-name` | Auto-discovered by Claude based on description |
186
+ | Structure | Single markdown file | Directory with `SKILL.md` + optional resources |
187
+ | Use case | Quick prompts, explicit shortcuts | Complex workflows, auto-triggered capabilities |
188
+
189
+ **Creating a Skill**:
190
+
191
+ ```
192
+ .claude/skills/skill-name/
193
+ └── SKILL.md
194
+ ```
195
+
196
+ SKILL.md requires YAML frontmatter:
197
+
198
+ ```yaml
199
+ ---
200
+ name: skill-name
201
+ description: What it does and when to use it - Claude uses this to auto-trigger
202
+ context: fork # Optional: run in isolated sub-agent
203
+ agent: Explore # Optional: agent type when forked
204
+ allowed-tools: Grep, Glob, Read # Optional: restrict available tools
205
+ ---
206
+ # Skill Name
207
+
208
+ Instructions for Claude to follow...
209
+ ```
210
+
211
+ **Creating a Command**:
212
+ Single file at `.claude/commands/command-name.md` with markdown instructions (no frontmatter required).
213
+
214
+ ## New Project Initialization
215
+
216
+ **MANDATORY for new projects**: When starting work on a new project or repository, initialize local configuration:
217
+
218
+ 1. Create `.claude/` directory in project root (if it doesn't exist)
219
+ 2. Create `.claude/JOURNAL.md` with starter template:
220
+
221
+ ```markdown
222
+ # Claude Code Journal
223
+
224
+ This journal tracks substantive work on documents, diagrams, and documentation content.
225
+
226
+ ---
227
+ ```
228
+
229
+ 3. Create `.claude/CLAUDE.md` importing workspace-level configuration:
230
+
231
+ ```markdown
232
+ <!-- Import workspace-level CLAUDE.md configuration -->
233
+ <!-- See /home/lab/workspace/.claude/CLAUDE.md for complete rules -->
234
+
235
+ # Project-Specific Configuration
236
+
237
+ This file extends workspace-level configuration with project-specific rules.
238
+
239
+ ## Project Context
240
+
241
+ [Add project-specific context, technology stack, naming conventions, etc.]
242
+ ```
243
+
244
+ **When to initialize**:
245
+
246
+ - User explicitly requests new project setup
247
+ - Starting work on existing project without `.claude/` directory
248
+ - Project requires specific configuration beyond workspace defaults
249
+
250
+ **What to import from workspace CLAUDE.md**:
251
+
252
+ - Core content generation rules (markdown, mermaid, git commit standards)
253
+ - Modus primaris documentation principles
254
+ - Project boundary rules
255
+ - GitHub instructions (if applicable)
256
+
257
+ **Project-specific additions**:
258
+
259
+ - Technology stack and dependencies
260
+ - Project naming conventions
261
+ - Custom tooling instructions
262
+ - Domain-specific terminology
263
+
264
+ ## Context Persistance
265
+
266
+ **MANDATORY FIRST STEP**: At the start of EVERY session, you MUST:
267
+
268
+ 1. Read `.claude/JOURNAL.md` (if it exists) before responding to any user query
269
+ 2. Acknowledge what previous work was done based on the journal
270
+ 3. Ask the user how to proceed based on that context
271
+
272
+ **MANDATORY AFTER EVERY TASK**: After completing substantive work, you MUST:
273
+
274
+ 1. Update `.claude/JOURNAL.md` with the entry
275
+ 2. Confirm to the user that the journal was updated
276
+
277
+ **Journal Entry Rules**:
278
+
279
+ - ONLY log substantive work on documents, diagrams, or documentation content
280
+ - DO NOT log: git commits, git pushes, file cleanup, maintenance tasks, or conversational queries
281
+ - Index entries incrementally: '1', '2', etc.
282
+ - Use single bullet points, not sections
283
+ - Merge related consecutive entries when natural
284
+
285
+ **Format**:
286
+
287
+ ```
288
+ <number>. **Task - <short 3-5 word depiction>**: task description / query description / summary<br>
289
+ **Result**: summary of the work done
290
+ ```
291
+
292
+ **Version Tagging**: If the project is versioned (has `package.json`, `pyproject.toml`, `Cargo.toml`, or similar), include the version number in the journal entry format:
293
+
294
+ ```
295
+ <number>. **Task - <short 3-5 word depiction>** (v1.2.3): task description / query description / summary<br>
296
+ **Result**: summary of the work done
297
+ ```
298
+
299
+ **When NOT creating journal entry**: State explicitly "Not logging to journal: <reason>"
300
+
301
+ **Journal Archiving Rule**:
302
+ When the journal exceeds 40 entries or when user requests archiving:
303
+
304
+ - Move older entries to `.claude/JOURNAL_ARCHIVE.md`
305
+ - Keep only the last 20 entries in the main `JOURNAL.md`
306
+ - Add a note at the top of `JOURNAL.md` linking to the archive: `**Note**: Entries 1-N have been archived to [JOURNAL_ARCHIVE.md](JOURNAL_ARCHIVE.md).`
307
+ - IMPORTANT: Maintain continuous numbering - do not reset numbers
308
+ - Archive file should have header explaining it contains archived entries
309
+
310
+ **Archive file structure:**
311
+
312
+ ```
313
+ # Claude Code Journal Archive
314
+
315
+ This file contains archived journal entries from the main JOURNAL.md.
316
+
317
+ ---
318
+
319
+ ## Archived Entries (1-N)
320
+
321
+ 1. **Task - Example**: detailed entry<br>
322
+ **Result**: detailed result
323
+ ...
324
+ N. **Task - Example**: detailed entry<br>
325
+ **Result**: detailed result
326
+ ```
327
+
328
+ **Main journal after archiving:**
329
+
330
+ ```
331
+ # Claude Code Journal
332
+
333
+ This journal tracks substantive work on documents, diagrams, and documentation content.
334
+
335
+ **Note**: Entries 1-N have been archived to [JOURNAL_ARCHIVE.md](JOURNAL_ARCHIVE.md).
336
+
337
+ ---
338
+
339
+ N+1. **Task - Example**: detailed entry<br>
340
+ **Result**: detailed result
341
+ ...
342
+ ```
343
+
344
+ ## Folders
345
+
346
+ ### DO NOT LOOK INTO:
347
+
348
+ - `**/@archive`: folder that has outdated and unused content
349
+ - `**/.ipynb_checkpoints`: folder that has jupyterlab checkpoint files
350
+
351
+ ## Jupyter Notebook Structure
352
+
353
+ **MANDATORY for notebooks**: Follow `.claude/NOTEBOOK.md` for notebook organization.
354
+
355
+ **Key Requirements**:
356
+
357
+ - GPU selection cell BEFORE importing torch/tensorflow/jax
358
+ - Imports grouped by category with inline comments
359
+ - Configuration centralized in one cell with inline comments and rich output
360
+ - Markdown header before each major section
361
+ - Rich Progress bars in separate cell from setup text (avoids overwriting)
362
+
363
+ **Standard Section Order**:
364
+
365
+ 1. Header (title, author, approach)
366
+ 2. GPU Selection
367
+ 3. Imports
368
+ 4. Reproducibility (seeds)
369
+ 5. Configuration
370
+ 6. Data Loading
371
+ 7. Model/Processing
372
+ 8. Execution
373
+ 9. Save/Export
374
+ 10. Evaluation
375
+
376
+ **Reference**: See `.claude/NOTEBOOK.md` for complete patterns and examples.
377
+
378
+ ## Background Job Logging
379
+
380
+ **MANDATORY for all background jobs**:
381
+
382
+ - All background jobs MUST log progress to a file in the `logs/` directory
383
+ - Use `| tee logs/<descriptive-name>.log` pattern for all background commands
384
+ - The `logs/` directory MUST always contain a `README.md` file
385
+ - `logs/README.md` should briefly explain what each log file tracks
386
+
387
+ **Example**:
388
+
389
+ ```bash
390
+ conda run --name hk_yolo python script.py 2>&1 | tee logs/script-execution.log
391
+ ```
392
+
393
+ ## GPU Selection for Multi-GPU Systems
394
+
395
+ **MANDATORY for GPU-accelerated projects** (PyTorch, TensorFlow, JAX, CUDA):
396
+
397
+ - Always set `CUDA_VISIBLE_DEVICES` environment variable BEFORE importing GPU libraries
398
+ - Use nvidia-smi GPU index (not torch.cuda index - these may differ)
399
+ - Detailed guidance in `~/.claude/GPU-SETUP.md`
400
+
401
+ **Quick pattern**:
402
+
403
+ ```python
404
+ import os
405
+ os.environ['CUDA_VISIBLE_DEVICES'] = '0' # nvidia-smi GPU index
406
+
407
+ import torch # or tensorflow, jax, etc.
408
+ ```
409
+
410
+ **GPU selection priority**:
411
+
412
+ 1. Highest compute capability (newer architecture preferred)
413
+ 2. Most available memory
414
+ 3. Lowest current utilization
415
+
416
+ **Identify GPUs**:
417
+
418
+ ```bash
419
+ nvidia-smi --query-gpu=index,name,compute_cap,memory.total --format=csv,noheader
420
+ ```
421
+
422
+ **Verify selection**:
423
+
424
+ ```python
425
+ print(f"GPU: {torch.cuda.get_device_name(0)}")
426
+ ```
427
+
428
+ **Monitor during execution**:
429
+
430
+ ```bash
431
+ watch -n 1 'nvidia-smi --query-gpu=index,name,memory.used,utilization.gpu --format=csv,noheader'
432
+ ```
433
+
434
+ ## Content Guidelines
435
+
436
+ ### Markdown Standards
437
+
438
+ - No emojis - maintain professional, technical documentation style
439
+ - Balance concise narrative with structured bullet points
440
+ - Bullet points capture key takeaways and essential information
441
+ - Narrative focuses on value proposition, concrete benefits, and implementation details
442
+ - Include brief introductions but avoid fluff
443
+ - Explicitly state caveats and limitations where relevant
444
+ - Do not use full stop after a bullet point
445
+ - For mermaid diagrams follow `MERMAID.md` standards
446
+
447
+ **Typography Standards**:
448
+
449
+ - **No em-dashes**: Use single hyphen with spaces (`-`) instead of em-dash (`—`)
450
+ - **No arrow symbols**: Use ASCII `->` instead of arrow characters (→, ⇒, etc.)
451
+ - **Line breaks**: Use `<br>` tag or double-space at end of line for explicit breaks within paragraphs
452
+ - **Paragraph separation**: Use blank lines between paragraphs (standard markdown)
453
+
454
+ **Examples**:
455
+
456
+ - Good: `dataset - minimal contamination`
457
+ - Bad: `dataset—minimal contamination`
458
+ - Good: `A -> B -> C`
459
+ - Bad: `A → B → C` or `A ⇒ B ⇒ C`
460
+
461
+ ### Warnings Info Success and Error
462
+
463
+ When warranted, use special styles to include in the markdown to indicate either error, tip (info), warning or error:
464
+
465
+ ```html
466
+ <div class="alert alert-block alert-warning">
467
+ <b>Example:</b> Use yellow boxes for examples that are not inside code cells,
468
+ or use for mathematical formulas if needed.
469
+ </div>
470
+
471
+ <div class="alert alert-block alert-info">
472
+ <b>Tip:</b> Use blue boxes (alert-info) for tips and notes. If it’s a note,
473
+ you don’t have to include the word “Note”.
474
+ </div>
475
+
476
+ <div class="alert alert-block alert-success">
477
+ <b>Up to you:</b> Use green boxes sparingly, and only for some specific
478
+ purpose that the other boxes can't cover. For example, if you have a lot of
479
+ related content to link to, maybe you decide to use green boxes for related
480
+ links from each section of a notebook.
481
+ </div>
482
+
483
+ <div class="alert alert-block alert-danger">
484
+ <b>Just don't:</b> In general, avoid the red boxes. These should only be used
485
+ for actions that might cause data loss or another major issue.
486
+ </div>
487
+ ```
488
+
489
+ ### ASCII Diagrams
490
+
491
+ For text-based diagrams in code comments, markdown, or plain text contexts, use box-drawing characters. See `.claude/ASCII_DIAGRAMS.md` for character reference and examples.
492
+
493
+ ### Mermaid Diagrams
494
+
495
+ See `MERMAID.md` for complete styling standards including color palette, stroke widths, anti-patterns, and PNG generation.
496
+
497
+ ## Documentation Standards
498
+
499
+ ### Modus Primaris - Flowing Narrative Documentation
500
+
501
+ **MANDATORY**: All technical documentation MUST follow modus primaris writing principles.
502
+
503
+ **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.
504
+
505
+ **Section Structure Pattern**:
506
+
507
+ - **Overview**: 1-2 sentences stating what this is and why it matters
508
+ - **Key facts**: 3-7 bullet points capturing essential information (numbers, specifications, critical details)
509
+ - **Additional narrative**: Optional paragraph(s) providing context, implementation details, or analysis only when depth is warranted
510
+
511
+ **Writing Style**:
512
+
513
+ - Natural, conversational flow with clear paragraph structure
514
+ - Professional but accessible language (explain technical concepts in plain terms)
515
+ - Minimal structural overhead (simple headers ## and ### only, no deeper nesting)
516
+ - Technical accuracy without jargon overload
517
+ - Focus on specific facts and numbers - avoid fluff and fancy language
518
+ - Avoid triples (lists of three items) in sentences - use single terms if possible, triples only if required
519
+ - When uncertain about technical details, ask questions rather than guess
520
+
521
+ **MODUS_PRIMARIS_SCORE** (self-check framework):
522
+
523
+ **Raw Scoring**:
524
+
525
+ - **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)
526
+ - **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)
527
+
528
+ **Normalization** (adjusts for topic complexity):
529
+
530
+ - **Topic Complexity Factor** (TCF): Simple query = 1.0, Moderate = 1.5, Complex = 2.0, Very complex = 3.0
531
+ - **Expected Length** (EL): Simple = 200 words, Moderate = 500 words, Complex = 1000 words, Very complex = 2000 words
532
+ - **Normalized Score** = (Raw Score / TCF) × (EL / Actual Length)
533
+ - **Target**: Normalized score ≥ +3.0 (consistently good documentation regardless of topic complexity)
534
+
535
+ **Examples**:
536
+
537
+ - Simple query (100 words, TCF=1.0): Raw +6 → Normalized = (6/1.0) × (200/100) = +12.0 (excellent)
538
+ - Complex query (1200 words, TCF=2.0): Raw +12 → Normalized = (12/2.0) × (1000/1200) = +5.0 (good)
539
+ - Over-verbose simple query (400 words, TCF=1.0): Raw +4 → Normalized = (4/1.0) × (200/400) = +2.0 (penalty for verbosity)
540
+
541
+ **Diagram Guidelines**:
542
+
543
+ - Create diagrams when they clarify complex relationships or workflows
544
+ - Default to simplicity - minimal nodes, clear connections, standard colors
545
+ - Only increase complexity if user explicitly requests detail
546
+ - Ask if uncertain whether diagram adds value
547
+
548
+ **Content Characteristics**:
549
+
550
+ - Brief but complete - cover essential information without bloat
551
+ - Evidence-based - support claims with real metrics and observations
552
+ - Actionable - readers should understand both what and why
553
+ - Honest about tradeoffs - document caveats and limitations clearly
554
+ - Allow comprehensive sections when topic demands depth
555
+
556
+ **Examples**:
557
+
558
+ - 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."
559
+ - Bad: "## Dataset Composition\n### Class Distribution Analysis\n- Laptop: 88%\n- Microwave: 0.4%\n- Imbalance ratio: 225:1"
560
+
561
+ **Recommended Pattern for Technical Architecture Documentation**:
562
+
563
+ 1. **Brief introduction** (1-2 sentences): State what the capability/component does and its primary purpose
564
+ 2. **Key specifications** (bullet points): Core technical details, numbers, technologies
565
+ 3. **Explanatory paragraph** (optional): Provide additional context about how it works, key implementation details, or important characteristics only when depth adds value
566
+ 4. **Technology Stack** (bullet points): List specific technologies, frameworks, libraries, and tools used
567
+ 5. **Integration Points** (bullet points): Describe how the component connects to other parts of the system
568
+ 6. **Implementation Status** (if applicable): Note whether technology choices are confirmed, proposed, or pending selection
569
+
570
+ **Example**:
571
+
572
+ ```
573
+ ### Component Name
574
+
575
+ Component provides core functionality enabling specific business value. Brief statement of purpose and primary users or consumers.
576
+
577
+ 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.
578
+
579
+ **Technology Stack**:
580
+ - Technology A for specific purpose
581
+ - Technology B for another purpose
582
+ - Framework C enabling key capability
583
+
584
+ **Integration Points**:
585
+ - Connects to Component X for data access
586
+ - Invoked by Component Y during workflows
587
+ - Publishes metrics to observability infrastructure
588
+
589
+ **Implementation Status**: Technology A confirmed. Technologies B and C pending formal selection.
590
+ ```
591
+
592
+ **Reference Implementations**:
593
+
594
+ - Research documentation: `yolo-homeobjects-training/TRAINING_APPROACH.md`
595
+ - Technical architecture: `cp-documentation/architecture/1_work_in_progress/highlevel-architecture@farm-journal/05-technology-architecture.md`
596
+
597
+ ### Modus Secundis - Rich Journal Entries
598
+
599
+ **Purpose**: For development journals and work logs that track technical changes, decisions, and implementations over time. Entries should be information-dense paragraphs that capture the full context of work performed.
600
+
601
+ **Core Philosophy**: Write journal entries as rich, flowing paragraphs that tell the complete story of a technical change - the problem, solution, libraries used, files modified, and conclusions drawn. Avoid heavy markdown structure (no nested bullets, tables, or code blocks unless absolutely necessary). The goal is readable, searchable history that future readers can scan quickly while still finding comprehensive detail.
602
+
603
+ **Entry Format**:
604
+
605
+ ```
606
+ <number>. **Task - <short description>**: <one-line summary of what was done><br>
607
+ **Result**: <rich paragraph with full context>
608
+ ```
609
+
610
+ **Content Requirements**:
611
+
612
+ - Problem or motivation that triggered the work
613
+ - Solution approach and key technical decisions
614
+ - Libraries, packages, or tools introduced or changed (with versions where relevant)
615
+ - Artefacts modified: files created, updated, or removed
616
+ - Conclusions: what worked, what was learned, patterns discovered
617
+ - Side effects or related fixes made during the same work session
618
+
619
+ **Writing Style**:
620
+
621
+ - Dense, information-rich paragraphs (not bullet lists)
622
+ - Technical terms inline with explanation where needed
623
+ - File paths and function names in backticks
624
+ - Cause-and-effect flow: "X required Y because Z"
625
+ - Connect changes to outcomes: "This enables..." or "This eliminates..."
626
+
627
+ **What to Avoid**:
628
+
629
+ - Heavy markdown structure (nested bullets, tables, multiple code blocks)
630
+ - Sparse entries that lack context
631
+ - Separating related information into disconnected sections
632
+ - Generic descriptions without specific artefacts or libraries
633
+
634
+ **Example**:
635
+
636
+ ```
637
+ 74. **Task - PostgreSQL MCP server implementation**: Created pure Python FastMCP PostgreSQL server for AgentCore Gateway mcpServer target<br>
638
+ **Result**: Attempted three Go-based PostgreSQL MCP servers before building custom Python solution. First tried `@modelcontextprotocol/server-postgres` (Node.js) which failed with "Unsupported protocol version: 2024-11-05" because AgentCore Gateway requires protocol version `2025-06-18`. Then tried `tendant/postgres-mcp-go` which uses official Go MCP SDK v0.5.0 but logs to stdout corrupting the stdio JSON-RPC protocol - Lambda logs showed "Failed to parse JSONRPC message from server" with log lines instead of JSON. Finally tried `sgaunet/postgresql-mcp` which uses mark3labs/mcp-go v0.43.0 (same as Neo4j) and logs correctly to stderr, but AgentCore Gateway failed during target synchronization with "Cannot construct instance of `io.swagger.v3.oas.models.media.Schema` - no boolean/Boolean-argument constructor" because the tool's inputSchema uses `"items": true` for the args array parameter which is invalid OpenAPI. Built pure Python solution in `deployment/mcp_postgres_server/` following Neo4j's stdio-to-HTTP bridge pattern. Created `server.py` using FastMCP with psycopg driver providing three tools: `query(sql, max_rows)` for read-only SQL execution with basic injection prevention blocking INSERT/UPDATE/DELETE/DROP statements, `list_tables()` returning schema/table/column_count from pg_catalog excluding system schemas, and `describe_table(table_name, schema_name)` returning column definitions from information_schema. Created `index.py` Lambda handler using `StdioServerAdapterRequestHandler` to spawn `python3 server.py` subprocess with PostgreSQL environment variables passed through. Updated `Dockerfile` to use Python 3.12 Lambda base with `psycopg[binary]>=3.0.0`, `mcp>=1.0.0`, and `run-mcp-servers-with-aws-lambda`. Fixed SSL mode incompatibility where environment had `POSTGRES_SSLMODE=no-verify` but libpq doesn't recognize that value - added mapping in `server.py`: `no-verify` -> `require`. Gateway target `postgres-tools` reached READY status. Agent verification confirmed both databases working: 1,669 products from PostgreSQL, 8 categories from Neo4j.
639
+ ```
640
+
641
+ **When to Use**: Development journals (`.claude/JOURNAL.md`), work logs, change histories, debugging sessions, implementation notes.
642
+
643
+ **Reference**: See `.claude/JOURNAL_EXAMPLE.md` for entry examples at different detail levels (short, normal, extended) with guidance on when to use each.
644
+
645
+ ### General Standards
646
+
647
+ - Focus on concrete business value and technical implementation
648
+ - Include specific technology stacks and methodologies
649
+ - Maintain consistency across service descriptions
650
+ - Provide clear implementation timelines and phases
651
+ - Document success criteria and measurable outcomes
652
+
653
+ ## Git Commit Standards
654
+
655
+ **MANDATORY**: Follow conventional commits with rich, descriptive messages. See `.claude/GIT.md` for complete reference.
656
+
657
+ **Commit Types**: `feat:` | `fix:` | `docs:` | `chore:` | `refactor:` | `style:` | `test:` | `perf:` | `build:` | `ci:`
658
+
659
+ **Message Structure**:
660
+
661
+ ```
662
+ <type>: <concise summary in imperative mood>
663
+
664
+ <body - explain what changed and why>
665
+ ```
666
+
667
+ **Key Rules**:
668
+
669
+ - Imperative mood: "add feature" not "added feature"
670
+ - Lowercase after type prefix, no period at end
671
+ - Body explains rationale, not just what (code shows what)
672
+ - Use bullet points for multiple changes
673
+ - Never attribute to Claude - no "Generated with Claude Code" or "Co-Authored-By"
674
+
675
+ **Reference**: See `.claude/GIT.md` for detailed examples and guidelines.
676
+
677
+ ## Tooling Installation
678
+
679
+ ### Claude Code Plugins
680
+
681
+ To access the Docker Claude plugins marketplace:
682
+
683
+ ```bash
684
+ /plugin marketplace add docker/claude-plugins
685
+ ```
686
+
687
+ This command enables access to Docker-specific plugins and MCP servers that extend Claude Code functionality.
688
+
689
+ **MCP Server Configuration**: See `.claude/MCP.md` for MCP server setup notes and configuration examples.
690
+
691
+ ### Mermaid Diagram Generation
692
+
693
+ See `MERMAID.md` for PNG generation commands, numbering conventions, and CLI installation instructions.
694
+
695
+ <!-- #endregion -->
696
+
697
+ - do not use %%{init: {'theme':'neutral'}}%% because it obscures the colours in dark mode. save it in local and global CLAUDE.md
698
+ - Document Generation and updates: User prefers direct, minimal generation:
699
+ - Answer the specific request only
700
+ - No explanatory text, context, or justification unless asked (as generated content in the document)
701
+ - Modus primaris: brief, complete, grounded
702
+ - Example: "just the ingestion and inference steps" means literally just numbered steps, nothing else
703
+ - 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:
704
+
705
+ > [!NOTE]
706
+ > Useful information that users should know, even when skimming content.
707
+
708
+ > [!TIP]
709
+ > Helpful advice for doing things better or more easily.
710
+
711
+ > [!IMPORTANT]
712
+ > Key information users need to know to achieve their goal.
713
+
714
+ > [!WARNING]
715
+ > Urgent info that needs immediate user attention to avoid problems.
716
+
717
+ > [!CAUTION]
718
+ > Advises about risks or negative outcomes of certain actions.
719
+
720
+ - no claude coauthoring in git