Логотип Generate Requirement Drafts

Generate Requirement Drafts

ОрганізаціяПопулярне
matlab
generate-requirement-drafts

Створює чернетки вимог на основі моделей Simulink. Використовуйте для створення або оновлення артефактів вимог на основі моделі. За можливості надає перевагу Requirements Toolbox (.slreqx); якщо він недоступний, використовує структурований YAML.

Add to TypingMind

Огляд

Видавецьmatlab
Репозиторійsimulink-agentic-toolkit
Назва навичкиgenerate-requirement-drafts
Зірки
1.2K
Форки
112
Файли в пакеті
5
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Файлів у комплекті: 5

    Скрипти, шаблони й довідкові матеріали, які модель може читати під час роботи. Файли доступні лише для читання й ніколи не виконуються.

  • Відкритий вихідний код

    Видавець на GitHub: matlab. Перед установленням перегляньте вихідні файли навички.

Встановлення

Установіть навичку ШІ Generate Requirement Drafts у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки на GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до розділу «Плагіни» → «Навички».
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/matlab/simulink-agentic-toolkit/tree/main/skills-catalog/model-based-design-core/generate-requirement-drafts
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Додати навичку → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/matlab/simulink-agentic-toolkit.git /tmp/simulink-agentic-toolkit
mkdir -p .claude/skills
cp -r /tmp/simulink-agentic-toolkit/skills-catalog/model-based-design-core/generate-requirement-drafts .claude/skills/generate-requirement-drafts
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Generate Requirement Drafts в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Generate Requirement Drafts, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для певного постачальника, тому навичка Generate Requirement Drafts не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож поки навичка не потрібна, токени на її інструкції не витрачаються.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

Generate Requirement Drafts

Generate draft requirements from Simulink models using the richest artifact the environment supports. All outputs are drafts requiring human review and approval before baselining.

When to Use

  • Drafting or updating requirements from a Simulink model
  • Creating .slreqx or .yaml requirements artifacts
  • Establishing model-to-requirement traceability

When NOT to Use

  • Importing requirements from an existing source of truth (ReqIF, DOORS, Word, Excel) — use Requirements Toolbox import APIs directly
  • Writing or running tests — use the testing-simulink-models skill
  • Free-form prose notes with no saved artifact
  • User explicitly wants a different text format (markdown, Word)

Output Conventions

  • Default file names: <Model>_Requirements.slreqx or <model>_requirements.yaml
  • Stable IDs: REQ_<SYSTEM>_001, REQ_<SYSTEM>_002, … — use one consistent project-wide prefix with sequential integers across all requirements, even when they derive from different subsystems. Do not switch to per-subsystem prefixes or hierarchical decimal numbering (e.g. CB-1.1, TP-1.1).
  • Follow repo conventions if .slreqx or .yaml files already exist
  • When updating an existing artifact, preserve existing IDs — append new IDs, never renumber
  • Every generated requirement must be marked as draft — use "draft" in Keywords (slreq) or status: Draft + keywords: [draft] (YAML)

Writing Good Requirements

Requirements must express behavioral intent (WHAT the system shall do), not restate model topology (HOW it is implemented). Put the WHY in Rationale. Use EARS (Easy Approach to Requirements Syntax) patterns:

EARS Patterns

Choose the pattern that best fits the model behavior:

PatternTemplateWhen to Use
UbiquitousThe <system> shall <response>.Always-on behavior, invariants
Event-drivenWhen <trigger>, the <system> shall <response>.A momentary trigger causes a one-time response: input events, entering a Stateflow state (the transition itself)
State-drivenWhile <state>, the <system> shall <response>.Behavior that holds continuously while in a Stateflow state or mode — the ongoing response, not the entry transition
Unwanted behaviorIf <condition>, then the <system> shall <response>.Error handling, safety limits, saturation
Optional featureWhere <feature>, the <system> shall <response>.Variant subsystems, configurable features
CombinedWhile <state>, when <trigger>, the <system> shall <response>.State + event combinations

Examples — Model Concepts to EARS Requirements

❌ Bad — restates implementation✅ Good — EARS pattern
"Saturation block limits output to [0,1]""If throttle command exceeds ThrottleMax (1.0) or falls below ThrottleMin (0.0), then the controller shall clamp the output to the valid range."
"BrakeLogic subsystem disengages controller""When brake pedal input exceeds BrakeThreshold (0.0), the controller shall disengage cruise control."
"Gain block multiplies by 2.5""While cruise control is active, the controller shall amplify speed error by Kp (2.5) to compute proportional correction."
"Stateflow chart transitions to Idle""When the driver presses the off button, the system shall transition to the Idle state."
"Defrost state runs the heater at full power""While in the Defrost state, the system shall drive the heater at full power."
"Variant subsystem selects Algorithm A""Where the adaptive mode is enabled, the controller shall use the predictive algorithm."

Rules

  • Write requirements using EARS patterns — pick the pattern that matches the model behavior
  • Use block/subsystem names (e.g. Saturation, BrakeLogic) only in Rationale, Description, or provenance notes — never in the requirement Summary. (A workspace parameter rendered as VarName (value) is required in the Summary and is not a block name.)
  • When referencing a numeric value, include the workspace variable name and resolved value: VarName (value). If the model uses a literal with no variable, record the numeric literal directly
  • Put the WHY in Rationale, not in the requirement statement
  • One subsystem may support zero, one, or several behavioral requirements — don't force a 1:1 mapping
  • For a Stateflow state or mode, separate entering it from being in it: the entry transition is event-driven (When <trigger>, … shall transition to <state>), but the behavior that holds throughout the mode is state-driven (While <state>, … shall <response>). When asked for a mode's behavior, prefer the While <state> form — do not fold it into a When entry statement

Backend Decision Gate

Choose once at the start, then stay on that path.

SituationBackend
User explicitly asks for .slreqx, traceability views, or repo already uses .slreqxRequirements Toolbox — if probe fails, inform the user that Requirements Toolbox is unavailable; do NOT silently fall back
User explicitly asks for .yaml, or repo already uses .yaml requirementsStructured YAML
No format specified — probe for Requirements ToolboxRequirements Toolbox if probe succeeds
No format specified and probe failsStructured YAML (silent fallback is OK here since user had no preference)

Probe (run via evaluate_matlab_code):

matlab
hasSlreq = ~isempty(which('slreq.new'));
if hasSlreq, try, slreq.find(Type="Link"); catch, hasSlreq = false; end, end
disp(hasSlreq)

Workflow

  • Call model_overview, model_read, model_query_params, model_resolve_params as MCP tools — never pass their names to evaluate_matlab_code.
  • Use evaluate_matlab_code only for MATLAB code, such as the backend probe and the slreq.* APIs in Path A.
  1. Understand the model — use the model_overview and model_read tools to understand subsystems, interfaces, control logic.

  2. Extract parameters — use the model_query_params / model_resolve_params tools for thresholds, gains, sample times that should appear in requirement text. Record both variable names and resolved values.

  3. Build a capture table (backend-neutral):

    IdParentIdSummaryDescriptionSourceBlockRationaleASILPriorityKeywords
  4. Run the backend path (A or B below).

  5. Review using the gate below.

Path A — Requirements Toolbox (.slreqx)

Use when probe succeeds. For full API patterns see references/slreq-patterns.md.

matlab
model = "CruiseControl";
load_system(model);
rs = slreq.new(model + "_Requirements");

% Add requirements with hierarchy — note behavioral "shall" statements
req = add(rs, Id="REQ_CC_001", ...
    Summary="If throttle command exceeds ThrottleMax (1.0) or falls below ThrottleMin (0.0), then the controller shall clamp the output to the valid range.", ...
    Description="Derived from CruiseControl/ThrottleCmd.");
req.Rationale = "Prevents invalid actuator commands that could damage the throttle body.";
req.Keywords = ["draft","auto-generated","control","safety"];

child = add(req, Id="REQ_CC_002", ...
    Summary="When brake pedal input exceeds BrakeThreshold (0.0), the controller shall disengage cruise control.", ...
    Description="Derived from CruiseControl/BrakeLogic.");
child.Keywords = ["draft","auto-generated","safety","brake"];

% Create traceability links: use block handle from SID (blk_X → X) for robustness
lnk = slreq.createLink(Simulink.ID.getHandle(model + ":5"), req);
slreq.createLink(Simulink.ID.getHandle(model + ":8"), child);

save(rs);
% Save all link sets
linkSets = slreq.find(Type="LinkSet");
for i = 1:numel(linkSets), save(linkSets(i)); end

Link rules:

  • Source = model element, destination = requirement → link type is automatically Implement
  • Prefer subsystem-level links; use block-level only when the requirement is block-specific
  • Every model-derived requirement must have at least one traceability link
  • The model must be loaded (load_system) before creating links with block paths

Path B — Structured YAML fallback

Use when Requirements Toolbox is unavailable. For schema and field rules see references/yaml-requirements.md.

  1. Generate a <model>_requirements.yaml file from the capture table
  2. Set status: Draft and include draft in keywords for every requirement
  3. Self-review: all required fields set, asil/status/priority use valid values, IDs sequential, derived_from references valid IDs or is null
  4. Validate:
bash
python -c "import yaml, sys; yaml.safe_load(open(sys.argv[1])); print('OK')" path/to/requirements.yaml

Guardrails

AlwaysNever
Mark every generated requirement as DRAFTEmit markdown or ad hoc text when .slreqx is available and no text format was requested
Write requirements using EARS patternsRestate block topology as the requirement summary
Include parameter name + value: VarName (value)Create both .slreqx and .yaml unless user asks for both
Link direction: model element → requirementReverse the link direction (requirement → block)
load_system before creating traceability linksOver-link every primitive block — prefer subsystem links
Use only R2023a+ APIsSilently fall back to YAML when user explicitly requested .slreqx
Stay consistent with existing repo formatRenumber existing requirement IDs on regeneration

Review Gate

Before finishing, verify (both backends):

  • Every requirement has Id, Summary, and Description
  • Every requirement is marked as DRAFT (via Keywords or status field)
  • Summaries use EARS patterns, not block-topology restatements
  • Numeric values include parameter name + value where a workspace variable exists
  • IDs are stable and sequential; existing IDs preserved on regeneration

slreq path only:

  • Model-derived requirements have a traceability link to the source model element
  • Link direction is model element → requirement (not reversed)
  • Subsystem-level linking preferred over block-level
  • Requirement set and all link sets are saved

YAML path only:

  • File parses without errors
  • asil and priority use valid enum values (or Unset when unknown)

References

  • references/slreq-patterns.md — Requirements Toolbox API cookbook
  • references/yaml-requirements.md — Structured YAML schema and field rules
  • assets/slreq_from_model.m — End-to-end slreq example
  • assets/requirements.yaml — Structured YAML example

Copyright 2026 The MathWorks, Inc.


Файли в пакеті

Модель читає ці файли за потреби, поки навичку завантажено. Вони доступні для читання й ніколи не виконуються.

Поширені запитання

Що робить навичка ШІ Generate Requirement Drafts?

Створює чернетки вимог на основі моделей Simulink. Використовуйте для створення або оновлення артефактів вимог на основі моделі. За можливості надає перевагу Requirements Toolbox (.slreqx); якщо він недоступний, використовує структурований YAML.

Навіщо використовувати Generate Requirement Drafts у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Generate Requirement Drafts — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Generate Requirement Drafts у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/matlab/simulink-agentic-toolkit/tree/main/skills-catalog/model-based-design-core/generate-requirement-drafts. TypingMind прочитає файл SKILL.md, додасть супровідні файли та встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Generate Requirement Drafts?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Generate Requirement Drafts?

Зі скількома забажаєте. У TypingMind ви можете використовувати Generate Requirement Drafts із будь-якою моделлю, яка підтримує навички, зокрема з GPT, Claude, Gemini, Grok, DeepSeek, Mistral чи Llama. Для цього ви використовуєте власні ключі API.

Чи безкоштовна навичка ШІ Generate Requirement Drafts?

На GitHub цю навичку публікує matlab. Умови ліцензування дивіться в репозиторії. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це набір інструкцій для повторного використання, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти, які вона може викликати, — код, який десь виконується й повертає результат. Натомість навичка ШІ дає моделі знання й пояснює порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний робочий простір зі ШІ вже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇