sw-detailed-design
Skill4 starsChanged 15 days agoMITView on GitHub
Develop the detailed design of software components from an approved software architecture: one component design per developed component and its software units with function contracts, data, behaviour and trace links (Automotive SPICE SWE.3, BP1 to BP7). Use when a developed component has no detailed design, when a design is to be extended or reworked, or when the trace check reports COV-09 or COV-21.
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-integration-testSkill
- sw-qualification-testSkill
- sw-requirementsSkill
- 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
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. About 0 are common, 4 are distinctive, and 15 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.
15
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.3 is not in scope.processes, stop: "SWE.3 is out of scope for this project.
- Very specific: line 33
Run python tools/traceability.py status and python tools/traceability.py check --all.
- Very specific: line 34
Every command of this skill takes --project <dir> when the project is not the current directory.
- Very specific: line 44
If the check reports COV-19, SUSPECT, UPSTREAM or QUERY on an input you are about to use, say so before continuing: a design built on such …
- Very specific: line 63
Run python tools/traceability.py show <CMP-ID>: it lists the requirements the component fulfils (fulfils), the interfaces it provides and …
- Very specific: line 82
Read references/designing-units.md before drafting.
- Very specific: line 93
Write functions: a complete contract for every function of category public, scheduled or callback.
- Very specific: line 104
Write Purpose, Behavior and Error handling of every unit.
- Distinctive: line 121
Check each link in both directions: the unit really does what the target asks, and the units together cover the component's requirements …
- Very specific: line 125
Read references/design-evaluation.md.
- Very specific: line 127
Write Design evaluation in the component design: the criteria, a result per criterion that is specific to this component, and every risk …
- Very specific: line 146
When changing an approved item, say first that its approval becomes stale, that code and tests built on it become suspect, and that python …
- Very specific: line 164
Run python tools/traceability.py matrix.
- Very specific: line 186
Do not set status to anything but draft, and do not write a review record.
- Distinctive: line 187
Do not design reused, supplied or composition components, and do not edit imported items.
- Very specific: line 188
Do not write or change code.
- Distinctive: line 189
Do not change a component, an interface or a requirement to fit the design: ask its owner.
- Distinctive: line 190
Do not let the design become a second source for names the component description defines, and do not invent complexity figures, risk owners …
≈ “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 detailed design (SWE.3.BP1 to BP7)
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 an approved software architecture into a detailed design that a developer can
implement without taking design decisions of their own and a tester can derive unit
tests from. The result is one component-design item per developed component and its
software-unit items, in state draft, ready for /review. No code is written here.
| Base practice | What this skill does | Evidence it leaves |
| SWE.3.BP1 Develop software detailed design | splits each developed component into units; writes the design concept, the static structure, and purpose, behaviour and error handling of every unit | component-design and software-unit items |
| SWE.3.BP2 Define interfaces of software units | writes a contract per function and an entry per variable; names the interfaces each unit realizes and uses | functions, data, platform; realizes and uses links |
| SWE.3.BP3 Describe dynamic behavior | describes how the units work together and the states, contexts and timing of each unit, or says why there is nothing to describe | Dynamic behavior sections; trigger, period_ms, call_context, reentrant, protection |
| SWE.3.BP4 Evaluate software detailed design | assesses the design against the criteria the project uses; records risks with owners and decisions between alternatives | Design evaluation section; design-decision items of level detailed-design |
| SWE.3.BP5 Establish bidirectional traceability | sets refines, part_of, realizes, uses and implements; names the files each unit will consist of | links; matrix output |
| SWE.3.BP6 Ensure consistency | self-checks against the checklist; the evidence itself comes from /review | proposed findings; review record written by /review |
| SWE.3.BP7 Communicate agreed software detailed design | not done here: /baseline records the baseline and who was informed | - |
| SWE.3.BP8 Develop software units | not done here: /sw-unit-implement writes the code of approved units | - |
Before you start
- If there is no
project.yaml, stop: "This project has no scope yet. Run/aspice-startfirst." - If
SWE.3is not inscope.processes, stop: "SWE.3 is out of scope for this project. A detailed design delivered from outside is registered with/import-inputs." - Run
python tools/traceability.py statusandpython tools/traceability.py check --all. Every command of this skill takes--project <dir>when the project is not the current directory. - The inputs are the
software-componentto be designed, thesoftware-interfaceitems it provides and uses, thesoftware-requirementitems it fulfils and the software-levelarchitecture-viewitems that show it: approved, or imported and covered by an input acceptance review. If one is missing or not approved, stop and name it and its skill:/sw-architecturefor components, interfaces and views,/sw-requirementsfor requirements,/import-inputsfor delivered inputs. A design item cannot be approved above an input in draft or in review:/reviewrefuses it, and the check reportsUPSTREAM. - If the check reports
COV-19,SUSPECT,UPSTREAMorQUERYon an input you are about to use, say so before continuing: a design built on such an input inherits that uncertainty.
Steps
1. Decide what to design
- With arguments: the named components or units. Without: every
COV-09finding (a developed component without design or units), everyCOV-21finding (a provided interface no unit realizes), plus the design items still in draft (python tools/traceability.py list --status draftshows them with their type; the findings their last review left open are underCOV-19). - Design only components with
origin: developedand akindother thancomposition. Areusedorsuppliedcomponent is not redesigned and gets no design item: its design belongs to its source. Changing such a component is a change of the architecture item first. Details:references/designing-units.md, first section. - Tell the user the list and ask whether it is the right scope for this session.
2. Read the frame the architecture sets
- Run
python tools/traceability.py show <CMP-ID>: it lists the requirements the component fulfils (fulfils), the interfaces it provides and uses, the views and the decisions. Read these items by ID. - Note what binds the design:
asil,execution_context,resource_budget,model, tasks and call order of the execution model, ranges and error behaviour of the interfaces, and whatproject.yamlsays underplatformandsafety. - Collect what is missing or contradictory in architecture and requirements; do not
repair it inside the design. Ask which questions the user can answer now. The rest:
- about an imported item: a
queryitem to the source of the input (python tools/record.py next-id query; folderrecords/queries;to,asked_at, aQuestionsection,aboutlinking the item), written with the other items of this session; - about an item the project wrote: it goes to the owner of that item through the
user, who changes it with
/sw-architectureor/sw-requirements. It is listed in the hand-over and is not aqueryitem.
- about an imported item: a
- For each open question ask: wait, or go on with an assumption that is written into
Design conceptwith its owner and, where there is one, the ID of the query.
3. Design concept and units
- Read
references/designing-units.mdbefore drafting. Propose the design concept and the split into units, each with its reason, and the alternatives you considered. The user decides. A choice between real alternatives becomes adesign-decision(step 8). - Assign every allocated requirement and every provided interface to a unit.
- Per unit set
asil(not lower than the component or any requirement it implements; a lower value is a decomposition and needs an approveddesign-decision),security_relevantandorigin. Name its files by the project's naming convention inStatic structure.source_fileslists only files that exist: leave it out for a unit without code;/sw-unit-implementadds it.
4. Function contracts and data
- Write
functions: a complete contract for every function of categorypublic,scheduledorcallback; name, arguments and return values for everylocalfunction the behaviour description relies on. Writedatafor every variable that keeps its value between calls. Rules per key:references/designing-units.md. - State the
typeof every argument and the return type as they will stand in C:COV-22later compares them with the code. - Where an interface item fixes an operation, take its name and arguments unchanged.
- AUTOSAR Classic: read
references/autosar-classic.md. Runnables go intofunctions, platform resources intoplatform; the component description stays the source.
5. Behaviour and error handling
- Write
Purpose,BehaviorandError handlingof every unit. Apply both tests ofreferences/designing-units.md("How much detail") to every function: no decision left to the developer, and expected results derivable for every input class. - Describe decisions and intent, not statements: text that could only be written by reading code is too detailed.
6. Dynamic behaviour
- Component design: start-up order, one cycle of every periodic path, every event path, what is shared between contexts and how it is protected, one failure path. Unit: states and transitions, execution contexts, preemption, timing.
Not applicable:with the reason is correct only where the item itself shows that there is nothing to describe. The conditions are inreferences/designing-units.md.
7. Trace
component-design:refinesthe component.software-unit: exactly onepart_of;realizesfor every provided interface it serves;usesfor every interface and unit it depends on at run time;implementsfor the requirements it fulfils.- Check each link in both directions: the unit really does what the target asks, and the units together cover the component's requirements and interfaces.
8. Evaluate the design
- Read
references/design-evaluation.md. Ask where the project's evaluation criteria and limits are written. If nowhere, propose them and let the user decide. - Write
Design evaluationin the component design: the criteria, a result per criterion that is specific to this component, and every risk with effect, measure and owner. Owners and acceptances are stated by the user, never invented. - A negative result ends in a design change, a risk with an owner, or an acceptance.
Draft a
design-decisionwithlevel: detailed-designfor each choice between alternatives; the user takes the decision.
9. Self-check
Apply .claude/docs/checklists/software-detailed-design.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 (ID, type, title, ASIL, component, files, requirements) and
ask: "May I write these N design items to
spec/software/design/?" Decisions go tospec/decisions/. - IDs:
python tools/record.py next-id component-design,next-id software-unit,next-id design-decisionandnext-id query, then count upwards. - File layout:
references/item-templates.md. Statusdraft; a query startsopen. - When changing an approved item, say first that its approval becomes stale, that code
and tests built on it become suspect, and that
python tools/traceability.py impact <ID>lists them. Inside a baseline whose purpose is not internal the change needs an approved change request first (/change-request).
Checks before you finish
Run python tools/traceability.py check --all.
FORMAT,SCHEMAandLINKfindings on items written in this session: fix them. For each draft the check lists what is "still to come before review": add it now.COV-09,COV-21,COV-23for the components in scope should be gone; report what remains.- Expected for a unit without code, and warnings once it is approved:
COV-10"designed but not implemented" until/sw-unit-implementhas run, andCOV-12,COV-28,COV-29marked "pending: the unit has no code yet". They do not stand in the way of a design baseline. Say so. - Expected for a changed unit that already has code:
COV-22(the code differs from the design: functions or parameters) andCOV-29for a new function, until/sw-unit-implementand/sw-unit-verifyhave followed the approved design. - Run
python tools/traceability.py matrix; quote itspart_of,realizes,implementstables.
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 it goes to; questions for the owners of architecture and requirements the project wrote, numbered, each with the item ID; assumptions the design rests on, each with its owner.
- Risks from the evaluation that have no owner or no decided measure yet.
- The remaining findings of the check that concern these items.
- Next:
/reviewfor the design items and decisions, a component design together with its units, checklistsoftware-detailed-design v2. Approval goes from the top down: everything a subject links to has to be approved or be a subject of the same review. Then/baselineto record the agreed design and who was informed,/sw-unit-implementfor the approved units, and/sw-unit-verifyto derive test cases from the approved design: every designed function of category public, scheduled or callback needs a test that names it.
Do not
- Do not set
statusto anything butdraft, and do not write a review record. - Do not design reused, supplied or composition components, and do not edit imported items.
- Do not write or change code; a design written after its code says so in
Design notes. - Do not change a component, an interface or a requirement to fit the design: ask its owner.
- Do not let the design become a second source for names the component description defines, and do not invent complexity figures, risk owners or acceptances.
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.

