Repository navigation
Conversation
Ask for Model/Agent/Use Case/Tool (or custom free text, defaulting to Model) and fill {record-type} placeholders in install and next-steps mini-templates so newly generated notebooks can target different inventory record types.
Co-authored-by: Cursor <cursoragent@cursor.com>
Reword the "record" key concept so it no longer defines a record via "such as a model" (and keep Key concepts free of variables), and genericize "model identifier credentials" to "{record-type} identifier credentials" in the code-snippet step so it follows the selected inventory record type.
Co-authored-by: Cursor <cursoragent@cursor.com>
juanmleng
left a comment
There was a problem hiding this comment.
Review: #553 at 07a2825 (merge-base 21fffbb)
Verdict: Merge with recommendations
Computed by the calibrated-review skill, run by @juanmleng.
Summary
- What changed: Notebook generation now asks for an inventory record type (Model, Agent, Use Case, Tool, or free text; Enter defaults to Model) and fills
{record-type}in the install and next-steps mini-templates. - Result: No blocking issues; three small fixes recommended.
- Main thing to know: A custom record type containing a
"or\produces a notebook that will not open. - Next step: Apply the three fixes below (each a few lines) and answer the two wording questions; then good to merge.
Fix now
- What: Some custom record types produce a notebook that won't open.
- Why: A notebook file is structured text where quote marks have a special meaning, and the tool pastes the record type in exactly as typed. If someone enters a custom type with a quote in it, such as
My "core" model, the file breaks and Jupyter can't open it. I tried this and it fails. It's rare, but the fix is one line. - Where:
notebooks/templates/e2e_template.py:412 - Suggested fix: Have the tool make the typed text safe before pasting it in. For whoever implements it:
content.replace("{record-type}", json.dumps(value)[1:-1]).
- What: A typo quietly becomes the record type.
- Why: The menu offers 1–4 for the standard types and 5 for "type your own". Anything else is taken as a custom type without a warning, so a slip like typing
6gives a notebook that says "Click + Register 6" all the way through. Option 5 already covers custom text, so the only thing this catches is mistakes. - Where:
notebooks/templates/e2e_template.py:383 - Suggested fix: If the answer isn't 1–5 or blank, say it isn't an option and ask again.
- What: One instruction still shows a placeholder after the type is filled in.
- Why: Step 3 of the registration instructions reads: "Select
Agentby clicking on {Record} Inventory, where{Record}is the currently active type of record." By then the notebook knows it's Agent, so the{Record}part looks like a leftover bug to the reader. - Where: step 3 of "Register sample {record-type}" in:
notebooks/templates/install-validmind/_install-initialize-with-development.ipynbnotebooks/templates/install-validmind/_install-initialize-with-monitoring.ipynbnotebooks/templates/install-validmind/_install-initialize-with-validation.ipynb
- Suggested fix: Change the step to "Click {record-type} Inventory." so it reads "Click Agent Inventory", and drop the "where
{Record}is…" explanation.
Questions for a human
- Owner: PR author
- Question: Are capitalised record types mid-sentence intended?
- Context: The values are capitalised to match button labels ("Register Model"), so prose reads "once you've registered your Use Case" or "unique to your Agent". Fine for labels, slightly odd in sentences. You flagged this wording for review; either accept it or substitute a lowercase form in prose.
- Owner: PR author
- Question: Should the Shortcut link come out of the PR description?
- Context: This repo is public, and the body links to the internal Shortcut story. The
[sc-…]tag in the title is enough for the integration to link the PR.
Accepted risks
- What I checked: The about-validmind edits (dropping "such as a model" from the definition of a record) are outside the generator change.
- Why it is acceptable: Docs-only wording, in line with the record-type direction of the PR; no behaviour change.
- What I checked:
replace_record_typeruns after every appended mini-template and rewrites the whole notebook, so it would also substitute{record-type}typed by the author elsewhere in the notebook. - Why it is acceptable: That is the intended behaviour of a template placeholder, and it only affects newly generated notebooks.
Verification performed
- Diff read in full (12 files).
replace_record_typecalled on_next-steps-development.ipynbat the PR head withMy "core" model, thenjson.load→Expecting ',' delimiter(notebook corrupted).- Run with
nbformatstubbed, since only the replacement function was under test.
- Run with
make notebookend to end → NOT CHECKED.- PR-body claim "Enter → Model, no leftover
{record-type}" → checked by reading the code only, not run. - No unit tests exist for the new functions; none run.
- Escape the record type before writing it into the notebook, so a custom value with quotes or backslashes no longer produces an unreadable file - Re-prompt on input other than 1-5 or Enter instead of taking a typo as a custom record type - Name the inventory directly in the register step now that the record type is known Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Add a {record-type-lower} placeholder for sentences ("your agent") and
keep {record-type} for UI labels ("Register Agent")
- Lowercase only the built-in types; custom values stay as typed
- Document both placeholders in the templates README
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@emmavdh I pushed the review fixes straight to your branch in 5e1a50a and b0384b6, so please pull before you push again. The record type is now lowercase in sentences ("your agent") and stays capitalised on buttons ("Register Agent"); custom types are used as typed. One small change: the menu now only accepts the listed options (1–5, or Enter for Model). Typing the word "Agent" instead of "2" will ask again — that's what stops a typo like "6" ending up in the notebook. Happy to revert that if you'd rather keep it. |
|
@juanmleng one thing before merging: |
…ropdown Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Thanks @cachafla, good catches. Fixed in fe87b13: typing any non-numeric name (like |
What and why?
Adds an inventory record type step to notebook generation (
make notebook/e2e-notebook.ipynb) so newly authored notebooks can target Model, Agent, Use Case, Tool, or a custom free-text type.{record-type}placeholders in install and next-steps mini-templatesShortcut: https://app.shortcut.com/validmind/story/16131
How to test
make notebook(or runnotebooks/templates/e2e-notebook.ipynb)1–4, custom5/ free text, and Enter → Model{record-type})What needs special review?
Wording of
{record-type}substitutions in install/next-steps mini-templates (UI labels likeRegister {record-type}).Dependencies, breaking changes, and deployment notes
None. Existing published notebooks are unchanged; only the generator and mini-templates used for new notebooks are affected.
Release notes
Internal contributor tooling for notebook authoring.
Checklist