brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
simulink-curating-library-kgUse this skill when the user wants to curate the SATK library knowledge index for a Simulink project — mark commonly used blocks, correct auto-assigned block categories, or improve block descriptions so the model-building agent picks better blocks from custom libraries. Triggered by phrases like "mark blocks common", "improve block descriptions", "correct b…
Independent GitHub snapshot · Automated classification · Original documentation governs
Curate .satk/library-kg/ for better agent block selection. Infer categories and descriptions from block metadata in .satk/library-cache/*.json, save curation to .satk/library-curation.json, then regenerate the KG.
building-simulink-models Gate 3.configuring-block-policybuilding-simulink-modelsbuilding-simulink-modelssatk-libraries.json or .satk/reuse-libraries.json must exist with libraries declaredmetadataQuality: "low" and "medium" blocks across ALL declared libraries. These blocks have no useful information. Write a short intent-focused description for every such block to help with agent block selection. Do not skip blocks because a file is large or because they seem unrelated to the current task."high" quality blocks are encouraged but optional.Determine mode before starting. Do not proceed without mode selection.
If .satk/library-kg/index.md already exists, start at step 1 (review existing state). If not, start at step 2.
index.md and common.md, summarize current state to user (libraries, block count, categories, common blocks)..satk/library-cache/*.json files in full. If a file exceeds read limits, read it in chunks until every block has been processed. Apply Curation Rules above — write custom descriptions for blocks, prioritizing low/medium quality. Do NOT proceed to Step 4 until descriptions exist for every low/medium quality block across ALL cache files. Save to customDescriptions.commonBlocks.categoryAssignments.library.LibraryCuration.save(projectRoot, curation), then run library.kg.Populate.run(projectRoot). Present the output summary to the user.libConfig = library.LibraryConfig.load(projectRoot);
library.LibraryCatalog.getOrCreate(libConfig, projectRoot);
Read .satk/library-cache/*.json directly. Each file:
{
"libraryName": "MotorLib",
"description": "Motor control library",
"blocks": [
{
"name": "SpeedController",
"maskType": "SpeedCtrl",
"blockType": "SubSystem",
"maskDescription": "Closed-loop speed regulation with anti-windup",
"description": "",
"pathCategory": "Controllers",
"metadataQuality": "high",
"referenceBlock": "MotorLib/Controllers/SpeedController"
}
]
}
projectRoot = prefdir();
curation = library.LibraryCuration.load(projectRoot);
curation.commonBlocks = {'Speed Controller', 'Torque Estimator'};
curation.categories = struct('name', 'motors', 'description', 'Electric motors', 'keywords', {{'motor', 'drive'}});
% Use containers.Map — supports any block name as key
curation.customDescriptions = containers.Map('KeyType', 'char', 'ValueType', 'char');
curation.customDescriptions('Unit Delay') = 'Delay signal by one sample period';
curation.customDescriptions('1-D Lookup Table') = 'Interpolate output from breakpoint-value pairs';
curation.categoryAssignments = containers.Map('KeyType', 'char', 'ValueType', 'char');
curation.categoryAssignments('DC Current Controller') = 'motor-control';
library.LibraryCuration.save(projectRoot, curation);
library.kg.Populate.run(projectRoot);
Important: Use containers.Map (not struct) for customDescriptions and categoryAssignments. Struct field names cannot contain spaces or hyphens, which most Simulink block names have.
{
"customDescriptions": [
{"block": "Unit Delay", "value": "Delay signal by one sample period"},
{"block": "1-D Lookup Table", "value": "Interpolate output from breakpoint-value pairs"}
],
"categoryAssignments": [
{"block": "DC Current Controller", "value": "motor-control"}
]
}
| Field | Type | Effect |
|---|---|---|
commonBlocks | cell array of strings | Always shown in common.md regardless of quality score |
categories | struct array with .name, .description, .keywords | Defines categories with keyword matching for assignment |
categoryAssignments | containers.Map (blockName → categoryName) | Per-block category assignment |
customDescriptions | containers.Map (blockName → description) | Per-block custom description (intent) |
Always:
.satk/library-cache/*.json.library.LibraryCuration.save() and regenerate the KG via library.kg.Populate.run().library.kg.Query.search() for KG lookups.Ask first:
library.LibraryCuration.save().Never:
find_system or get_param on library .slx files..satk/library-cache/*.json or .satk/library-kg/*.md directly — they are auto-generated.library.LibraryCuration.save().Copyright 2026 The MathWorks, Inc.