sw-architecture
Skill4 starsChanged 15 days agoMITView on GitHub
Design the software architecture from approved software requirements (Automotive SPICE SWE.2): components, interfaces, dynamic and resource views, design decisions, and the allocation of every requirement. Use when an architecture is to be created, extended or reworked, or when the trace check reports requirements without allocation (COV-07), components without requirements (COV-08) or missing architecture views (COV-25).
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-detailed-designSkill
- 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
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 2 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
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 14
Every requirement is allocated.
- Very specific: line 33
Run python tools/traceability.py status and python tools/traceability.py check --all (every command takes --project <dir> when the project …
- Very specific: line 52
Run python tools/traceability.py matrix.
- Distinctive: line 58
Read the requirements in scope by ID.
- Very specific: line 69
Read references/architecture-guidance.md first.
- Very specific: line 127
Check both directions with python tools/traceability.py show <ID>: Responsibility covers every requirement of the element, and every …
- Very specific: line 157
Before changing an approved architecture item, say that its approval becomes stale and run python tools/traceability.py impact <ID> to show …
- Very specific: line 190
Do not set status to anything but draft (open for a query), or obsolete for an element the user withdraws, and do not write a review record.
- Very specific: line 192
Do not edit requirements, imported items (a problem with one is a query) or project.yaml, and do not design units.
- Distinctive: line 194
Do not decide between alternatives, lower an ASIL or state a measured value.
≈ “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 architectural design (SWE.2)
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 approved software requirements into an architecture expressed as items: components
in a hierarchy, interfaces precise enough to implement and integrate against, views of
structure, behaviour, execution and resources, and decisions with their alternatives.
Every requirement is allocated. All items are written in state draft, ready for /review.
| Base practice | What this skill does | Evidence it leaves |
| SWE.2.BP1 Develop software architectural design | decomposes the software into components over as many levels as needed, each with its reason | software-component items with part_of, kind, layer, origin; an architecture-view of kind structure |
| SWE.2.BP2 Allocate software requirements | assigns every requirement to the element responsible and checks the result in both directions | fulfils links on the software-component and software-interface items |
| SWE.2.BP3 Define interfaces of software elements | defines each interface with structured data elements or operations, provider, users and error behaviour | software-interface items; realizes links to system-interface items |
| SWE.2.BP4 Describe dynamic behavior | describes modes, start-up, shut-down, error handling, timing chains, tasks and interrupts | Dynamic behavior sections; views of kind state-machine, sequence, execution-model |
| SWE.2.BP5 Define resource consumption objectives | sets budgets per component and totals for the ECU that add up | resource_budget; a view of kind resource-summary |
| SWE.2.BP6 Evaluate alternative software architectures | fixes criteria first and assesses alternatives against them; the user decides | design-decision items with concerns links |
| SWE.2.BP7 Establish bidirectional traceability | sets fulfils, realizes, shows, concerns and part_of links | links; matrix output |
| SWE.2.BP8 Ensure consistency | self-checks against the checklist; the evidence itself comes from /review | proposed findings; review record written by /review |
| SWE.2.BP9 Communicate agreed software architectural design | not done here: /baseline records the baseline and who was informed | - |
Before you start
- No
project.yaml: stop. "This project has no scope yet. Run/aspice-startfirst." SWE.2not inscope.processes: stop. "SWE.2 is out of scope for this project. An architecture delivered from outside is 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
software-requirementitems, approved or imported with an input acceptance review. If there are none, stop and name/sw-requirementsor/import-inputs. - A requirement in
draftorin-review, or with aCOV-19finding, is not settled. Name each one and ask: wait, or design against it at risk. Elements that fulfil it stay indraftuntil it is approved: the check reportsUPSTREAM, and the review refuses to approve an item above one that is not approved. SUSPECTon an existing element means that a requirement it fulfils changed after its review: read the new version first. An openQUERYon an input means a question to its source is unanswered: read the query before designing on that input.
Steps
1. Decide what to cover
- With arguments: the named requirements, component or feature. Without: every
COV-07(requirement not allocated),COV-08(component without a requirement) andCOV-25(required view kind missing) finding, plus existing draft architecture items. - Run
python tools/traceability.py matrix; itsfulfils,part_of,realizesandshowstables show what exists. For the IDs of one type runpython tools/traceability.py list --type software-component. Ask the user whether the list is the right scope.
2. Find what shapes the architecture
- Read the requirements in scope by ID. List those that constrain structure, interfaces, timing, resources, safety or reuse, and add the project goals the user names.
- Propose evaluation criteria from this list and ask the user to rank them before any
structure is drawn. Every
design-decisionuses them (step 8). - A question the user cannot answer is not design input. About an imported item, or
about a supplied or reused component (to its supplier), it becomes a
queryitem (python tools/record.py next-id query; folderrecords/queries;to,asked_at, aQuestionsection,aboutlinking the item). About a requirement the project wrote, it goes back to/sw-requirements.
3. Decompose
- Read
references/architecture-guidance.mdfirst. Propose the components, each with the reason it is an element of its own.part_ofgives the hierarchy; acompositionhas parts and no behaviour of its own. Units belong to/sw-detailed-design. - Per component set
kind,layer,originandexecution_context; writePurpose(why it exists) andResponsibility(what it does, and what it does not do). - Supplied, reused and basic software are component items too, with
supplier(source, version, form of delivery, ASIL developed to) and aPurposesaying why they are present. They take part in interfaces, execution model and budgets like the rest.
4. AUTOSAR Classic
kindandlayerfollow the layered architecture; the mapping is in the guidance.- Where a component description file exists, set
modelto its path and read ports, port interfaces and runnables from it. Never retype them into the component item or invent a name: the model stays the source, and what it lacks is a change to the model. - A model without items yet:
python tools/arxml.py import <file> --dry-run, then, with the user's yes, without--dry-run. It writes drafts with kind, providers, users, data elements, operations andpart_of; purpose, responsibility, layer, origin, ASIL and allocation stay to be written here. - Model and items both exist:
python tools/arxml.py compare <file>lists the components, interfaces, providers, users, data elements and operations that differ. Quote it; a difference is resolved in the model or in the item, as the user decides.
5. Define the interfaces
- One
software-interfaceper exchange between components, with oneprovided_byand allused_by.kinddecides whetherelementsoroperationsare filled;references/interface-template.mdlists what a complete definition holds. Description: what a user may rely on, what each side does in an error case, constraints on use. Setrealizeswhere the interface carries the software side of asystem-interface, and compare ranges and timing with that item.
6. Describe the dynamic behaviour
- A component's own modes, activation and state after initialisation go into its
Dynamic behaviorsection; behaviour across components goes into views. - Cover the operating modes of the ECU, start-up, shut-down, error handling and every
chain with a timing requirement: a view for each, or the reason why none is needed.
references/view-templates.mdsays what each view kind must show. Every view links withshowsto every item that appears in it.
7. Execution model and resource budgets
- One view of kind
execution-model: atasksrow per task and interrupt, every entry function of every component in exactly one row, in calling order.Descriptiongives priorities, preemption, protection of shared data and the resulting processor load. - Give every component a
resource_budget, ornot_relevantwith the reason, and say where each number comes from. Ask the user for capacities and the reserve to keep. - One view of kind
resource-summarywith aresource-totalsrow per resource. No tool adds the numbers: show the user the sums before writing - parts to composition, entries to task budget, tasks to processor load, objective against capacity less reserve.
8. Alternatives
- For each choice that shapes the structure (the decomposition or the adoption of a
given one, task model, make or reuse, partitioning) draft a
design-decision: context, the criteria of step 2, at least two real alternatives, each assessed against each one. - Present the assessment and ask the user to decide.
DecisionandConsequencesrecord what the user decided; an undecided draft is listed as open in the hand-over.
9. Allocate
- Per requirement choose the responsible component, or for
kind: interfacethe interface, and record it asfulfilson that element. Requirements are not edited. - Check both directions with
python tools/traceability.py show <ID>:Responsibilitycovers every requirement of the element, and every element has a requirement or a recorded reason (COV-08). - A need that only the design creates goes to
/sw-requirementsas a requirement withorigin: internal; it is not written here.
10. ASIL and partitioning
- An element carries the highest ASIL of the requirements allocated to it, a composition the highest of its parts, an interface at least that of its most critical use.
COV-23reports an element below an allocated requirement: raise it or re-allocate. A lower ASIL is a decomposition and needs adesign-decisionthatconcernsevery item whose ASIL is lowered, approved through/review. Never lower one on your own.- Where elements of different ASIL coexist, draft a decision on how the lower ones are kept from disturbing the higher ones (memory, timing, exchanged data).
11. Self-check
Apply .claude/docs/checklists/software-architecture.md to the drafts. check --all says
what a draft still needs for review, but not what depends on kind or origin nor what
approval needs: walk the "Needed" column of the templates for those. Show the findings as
proposals; correct what the user accepts.
Writing
- Show a table of the drafts (ID, type, title, kind, ASIL, links) and the allocation, and
ask: "May I write these N items to
spec/software/architecture/,spec/views/andspec/decisions/?" Queries go torecords/queries/. - IDs:
python tools/record.py next-id software-component, likewise for the other types; then count upwards. Statusdraft. File layout:component-template.md,interface-template.md,view-templates.mdanddecision-template.mdinreferences/. - The allocation is written as
links.fulfilson the element; no requirement is edited. - Before changing an approved architecture item, say that its approval becomes stale
and run
python tools/traceability.py impact <ID>to show what depends on it. Change thestatusline todraftfirst, then the content; what depends on it stays as it is and is reported asUPSTREAMand, once the item is approved again, asSUSPECT. - An element the user withdraws becomes
obsoletewithsuperseded_by, after every link to it has moved:LINKandCOV-24report links to an obsolete item. - Inside a baseline, changing or withdrawing an item needs an approved change request
first (
/change-request).
Checks before you finish
Run python tools/traceability.py check --all and python tools/traceability.py matrix.
FORMAT,SCHEMAandLINKfindings on items written in this session: fix them.COV-07,COV-08,COV-23andCOV-24for the scope of this session should be gone. If one remains, report it with the reason. Quote thefulfilstables.- Expected, and to be said:
COV-25until/reviewhas approved the views;COV-23until a decomposition decision is approved;COV-09andCOV-21until the detailed design exists.
Hand-over
Report, in this order:
- The base practice table with what was done in this session and what is open.
- The budget sums against capacity and reserve; what is
NOT ASSESSEDand why. - Decisions the user has not taken; the queries written, by ID; needs and questions
handed to
/sw-requirements. - The remaining findings of the check that concern these items.
- Next:
/review, top down: requirements before the elements that fulfil them, shown items before or together with their views. Then/baseline, then/sw-detailed-design.
Do not
- Do not set
statusto anything butdraft(openfor a query), orobsoletefor an element the user withdraws, and do not write a review record. - Do not edit requirements, imported items (a problem with one is a query) or
project.yaml, and do not design units. - Do not decide between alternatives, lower an ASIL or state a measured value.
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.

