sw-requirements
Skill4 starsChanged 15 days agoMITView on GitHub
Derive, write and analyse software requirements from system requirements and system architecture (Automotive SPICE SWE.1). Use when software requirements are to be created, extended or reworked, or when the trace check reports system requirements not covered by software requirements.
In this repository38 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- aspice-startSkill
- baselineSkill
- change-requestSkill
- component-qualificationSkill
- cybersecurity-conceptSkill
- cybersecurity-planSkill
- documentsSkill
- haraSkill
- import-inputsSkill
- mock-assessmentSkill
- next-stepSkill
- problem-resolutionSkill
- process-gateSkill
- project-planSkill
- project-statusSkill
- quality-assuranceSkill
- releaseSkill
- reviewSkill
- risk-managementSkill
- safety-analysisSkill
- safety-conceptSkill
- safety-planSkill
- supplier-monitoringSkill
- sw-architectureSkill
- sw-detailed-designSkill
- sw-integration-testSkill
- sw-qualification-testSkill
- sw-unit-implementSkill
- sw-unit-verifySkill
- sys-architectureSkill
- sys-integration-testSkill
- sys-qualification-testSkill
- sys-requirementsSkill
- taraSkill
- trace-checkSkill
- vulnerability-managementSkill
- work-breakdownSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 4 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 29
If there is no project.yaml, stop: "This project has no scope yet.
- Very specific: line 31
If SWE.1 is not in scope.processes, stop: "SWE.1 is out of scope for this project.
- Very specific: line 34
Run python tools/traceability.py status and python tools/traceability.py check --all (every command takes --project <dir> when the project …
- Very specific: line 56
Run python tools/traceability.py matrix and read the derived_from table to see what is already covered.
- Distinctive: line 61
Read the input items by ID.
- Very specific: line 71
Read references/writing-requirements.md before drafting.
- Very specific: line 110
Do not allocate here. /sw-architecture records the allocation on the architecture side (fulfils), so that it does not change requirements …
- Very specific: line 123
When changing an existing approved item, say first that its approval becomes stale and that python tools/traceability.py impact <ID> lists …
- Very specific: line 149
Do not set status to anything but draft, and do not write a review record.
- Distinctive: line 150
Do not edit imported items.
- Distinctive: line 151
Do not put design into a requirement: say what is needed, not how it is built.
- Distinctive: line 152
Do not invent a parent to make a requirement look derived.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Software requirements analysis (SWE.1)
Toolkit root:
${CLAUDE_PLUGIN_ROOT}- where this shows a placeholder instead of a folder, it is the repository you are in. Thetools/,schema/,aspice/,iso-26262/,iso-sae-21434/,examples/and.claude/docs/named here and in the references lie in the toolkit root; run its tools from the project folder aspython "<toolkit root>/tools/<script>.py".
Turns the software-relevant content of system requirements and system architecture
into software requirements that each state one need, can be verified, and are traced
to their source. The result is a set of software-requirement items in state draft,
ready for /review.
| Base practice | What this skill does | Evidence it leaves |
| SWE.1.BP1 Specify software requirements | derives functional and non-functional requirements from the inputs | software-requirement items with a Statement section |
| SWE.1.BP2 Structure software requirements | sets kind, priority and release on every item | those attributes |
| SWE.1.BP3 Analyze software requirements | checks correctness, feasibility and verifiability; notes cost and schedule effects | Analysis section; findings reported to the user |
| SWE.1.BP4 Analyze the impact on the operating environment | examines what each requirement asks of hardware, basic software and other elements | Analysis section; queries to the source of the inputs |
| SWE.1.BP5 Develop verification criteria | writes measurable criteria and sets verification_method | Verification criteria section |
| SWE.1.BP6 Establish bidirectional traceability | sets derived_from links; the allocation follows in /sw-architecture | links; matrix output |
| SWE.1.BP7 Ensure consistency | self-checks against the checklist; the evidence itself comes from /review | proposed findings; review record written by /review |
| SWE.1.BP8 Communicate agreed software requirements | not done here: /baseline records the baseline and who was informed | - |
Before you start
- If there is no
project.yaml, stop: "This project has no scope yet. Run/aspice-startfirst." - If
SWE.1is not inscope.processes, stop: "SWE.1 is out of scope for this project. Software requirements delivered from outside are registered with/import-inputs." - Run
python tools/traceability.py statusandpython tools/traceability.py check --all(every command takes--project <dir>when the project is not the current directory). - The inputs are
system-requirement,system-elementandsystem-interfaceitems, either produced by the project (approved) or imported (covered by an input acceptance review). If there are none, stop and say which skill provides them:/import-inputsfor delivered inputs, the system-level skills otherwise. - An input that is not approved - in
draftorin-review, or carryingCOV-19- is not settled. Name each such input and ask the user: wait for its acceptance, or draft against it at risk. Drafting at risk is allowed; the requirements derived from it stay indraftuntil the input is approved, because the check reportsUPSTREAMand the review refuses to approve an item above something that is not approved. SUSPECTon an existing software requirement means its input changed after the last review: read the input's new version and decide with the user whether the requirement changes. An openQUERYon an input means a question to its source is unanswered: read the query before deriving from that input.
Steps
1. Decide what to cover
- With arguments: the named inputs or feature. Without: every
COV-05finding (system requirements allocated to software that no software requirement refines), plus existing draft software requirements. - Run
python tools/traceability.py matrixand read thederived_fromtable to see what is already covered. Tell the user the list and ask whether it is the right scope for this session.
2. Understand each input
- Read the input items by ID. For each one answer: what must the software do or guarantee for this to hold? What is left to hardware or to other elements?
- What is unclear, contradictory or not verifiable in an input is a question to its
source. Do not guess. Ask the user which questions they can answer now. Each of the
rest becomes a
queryitem (python tools/record.py next-id query; folderrecords/queries;to,asked_at, aQuestionsection, andaboutlinking the input), written with the other items of this session. A requirement that depends on an open query says so in itsAnalysissection, by the query's ID.
3. Draft the requirements
- Read
references/writing-requirements.mdbefore drafting. - One need per item. A parent may need several children; several parents may share one.
- Software-internal needs that have no parent (defensive measures, diagnostics the
architecture will need) get
origin: internaland aRationalesection. Before drafting one, read the existing requirements on the same behaviour (python tools/traceability.py list --type software-requirement, then by ID): it must neither repeat nor contradict one of them. Name the ones you compared it with. asilandsecurity_relevantare inherited from the parent. A lower ASIL than the parent is a decomposition and needs an approveddesign-decisionthatconcernsthe requirement; do not lower it on your own. An internal requirement inherits nothing: propose the ASIL of the most critical requirement that relies on it (QM if none does), give the reasoning inRationale, and have the user decide.
4. Structure
kind: functional, non-functional, interface or constraint.priority: must or should.release: ask the user for the release plan; if none exists, propose one release and say so.
5. Analyse
For each draft, write the Analysis section when there is something to say:
- feasibility on the given hardware and platform (timing, memory, resolution);
- what it demands of the operating environment: hardware-software interface, basic software services and their configuration, other system elements;
- interdependencies and conflicts with other requirements;
- effect on cost and schedule that the user should know about; risks. Report conflicts and risks to the user as a list; they decide what happens with them.
6. Verification criteria
- For every requirement write what will be observed and what counts as fulfilled, with values and tolerances. If the statement already carries them, say that and restate the pass condition.
- Set
verification_method.testunless the user agrees that analysis, review or inspection is the appropriate method, with the reason in the section.
7. Trace
links.derived_from: every parent, by ID. Check each link in both directions: the child follows from the parent, and together the children cover the parent.links.relies_on: every software requirement whose term, value or behaviour this one uses ("the report of SWR-0010", "the closing movement as SWR-0006 defines it").- Do not allocate here.
/sw-architecturerecords the allocation on the architecture side (fulfils), so that it does not change requirements that are already approved.
8. Self-check
Apply .claude/docs/checklists/software-requirements.md to the drafts. Show the
findings to the user as proposals, grouped by item, and correct what they accept.
Writing
- Show a table of the drafts (title, kind, ASIL, parents, verification method) and
ask: "May I write these N software requirements to
spec/software/requirements/?" - IDs:
python tools/record.py next-id software-requirement, then count upwards. - File layout:
references/item-template.md. Statusdraft. - When changing an existing approved item, say first that its approval becomes stale
and that
python tools/traceability.py impact <ID>lists what depends on it. Write the changed item withstatus: draft.
Checks before you finish
Run python tools/traceability.py check --all.
FORMAT,SCHEMAandLINKfindings on items written in this session: fix them.COV-05andCOV-06for the inputs in scope of this session should be gone. If one remains, report it with the reason.COV-07(not allocated) is expected until the architecture exists. Say so.UPSTREAMis expected for nothing written here: the new items are drafts. If it appears on an existing approved requirement, its input went back to draft or review.
Hand-over
Report, in this order:
- The base practice table with what was done in this session and what is open.
- The query items written in this session, each with the input it is about, and who the user wants to send them to.
- Conflicts and risks the user has not decided.
- The remaining findings of the check that concern these items.
- Next:
/reviewfor the new requirements;/sw-architectureto allocate them.
Do not
- Do not set
statusto anything butdraft, and do not write a review record. - Do not edit imported items. A problem with an input is a query.
- Do not put design into a requirement: say what is needed, not how it is built.
- Do not invent a parent to make a requirement look derived.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

