Loadout system design
Complete system design reference for the Loadout VSCode extension — a GUI panel for managing Claude Code agents, skills, and commands as swappable equipment loadouts. Use at the start of ANY implementation task to ensure design consistency. Covers: two-process architecture (Extension Host Node.js + Angular 21 Webview), postMessage protocol, data.js filesystem layer, signal-based state services, storage layout, and non-negotiable coding rules. Invoke when implementing stories, adding features, reviewing code, making ANY UI/styling change (design tokens, SCSS, components, animations), or when any system design question arises in Loadout.From its SKILL.md
npx -y skills add JOndarza/loadout --skill loadout-system-designAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
- runs commandsInstructs the agent to run 1 command, including `cd webview && npm run build`.
SKILL.md
4.2 KB, 871 tokens by cl100k_base, as published. Nobody here has run it
Loadout — System Design Reference
Quick Navigation
| What you need | Load |
|---|---|
| Two-process overview, file map, state flow, build pipeline | references/architecture.md |
| Extension entry, src/ modules, data.js API, security model | references/extension-host.md |
| Angular 21, state services, DataSyncService, shared primitives | references/webview-angular.md |
| Full message catalogue (WebviewMessage + ExtensionMessage types) | references/messaging-protocol.md |
| Domain types, storage paths, profiles, hash/sync mechanics | references/domain-storage.md |
| File size limits, CommonJS rules, Angular rules, git, formatting | references/coding-rules.md |
| Design tokens, color palettes, SCSS mixins, animations, a11y | references/ui-design-system.md |
Non-negotiable invariants
These apply everywhere, always — no exceptions.
- No VSCode API in webview — never
import vscodeor usefs/path/osfrom any file underwebview/. - All filesystem mutations go through
data.js— no ad-hocfs.writeFileSyncinsrc/modules. - Every Angular component:
standalone: true+ChangeDetectionStrategy.OnPush— no exceptions. - State in
core/state/*.state.tssignal services only — components are dumb views; no component-local mutable state for domain data. - Signals for state, RxJS only for the bridge stream — no
BehaviorSubject/ReplaySubjectfor state. - File size cap ~400 lines — split into a new
src/module or Angular subcomponent when approaching this. - Profiles store filenames only — never copy file content into
profiles.json. - Icons:
lucide-angularonly — no SVG file imports, no inline<svg>. - CommonJS in extension host —
require()/module.exportsin all.jsroot files;update-claude.mjsis the sole ESM exception. - Build
webview-dist/before committing UI changes — runcd webview && npm run build.
Feature implementation checklist
When adding a new feature end-to-end, follow this order:
- Domain — add or extend types in
webview/src/app/core/messages.ts(single source of truth for all shared types). - Storage — decide persistence:
profiles.json,ui-state.json, or a newdata.jsfunction. Updatedata.jsandsrc/snapshot.js::buildInitialDataifInitialDatachanges. - Extension messages — add the
WebviewMessageunion variant and/orExtensionMessagevariant tomessages.ts; handle the new case insrc/message-handler.js. - data.js — implement the filesystem operation (pure I/O, no VSCode API, no side effects beyond fs).
- State service — update the relevant
core/state/*.state.tsto expose new signals or a setter; updateDataSyncService.applyData()ifInitialDatafields changed. - Component — create a standalone
OnPushcomponent or extend an existing feature. Inject the state service; never own domain state locally. Send actions viabridge.send()in methods, not templates. - Validators — if new user-supplied input crosses the bridge, add a guard in
src/validators.jsand call it inmessage-handler.jsbefore acting. - Build — run
cd webview && npm run build, verifywebview-dist/is updated. - Git — stage specific files by name; conventional commit in imperative mood.
What ships with it: 7 files
45.0 KB alongside SKILL.md
references/
- architecture.md6.3 KB
- coding-rules.md3.0 KB
- domain-storage.md6.2 KB
- extension-host.md6.7 KB
- messaging-protocol.md5.8 KB
- ui-design-system.md8.7 KB
- webview-angular.md8.3 KB