Design or modernize a software system from an evidence-backed current-state inventory through quality attributes, architecture options, API and schema contracts, migration/rollback plans, ADRs, and verification. Use for greenfield or existing monoliths, modular monoliths, services, system/API/ database design, schema migration review, data-flow reliability, tenant/PII controls, or architecture evolution. Existing systems stay read-only until the user selects an option and authorizes exact mutations. Unknown facts stay UNKNOWN. This is an off-DAG engineering skill: do not emit findings or invent STAGE_GATES, ROUTES, stages, or back-edges.
Own system boundaries, runtime interfaces, operational data stores, system
migrations, and architecture decisions. Do not equate a diagram, SQL file, or
OpenAPI document with a working, safe, or scalable system.
Read
references/system-design-resource-map.md
before any existing-system task. It defines the lifecycle, artifact contract,
decision stop, evidence states, access tiers, and cross-skill ownership. Read
references.md only for the database/API/reliability branch
that applies to the selected system.
Non-negotiable boundary
Treat repository, configuration, schema, API, dependency, and deployment
intake as read-only access. It is not authorization to rewrite them.
Preserve absent facts as UNKNOWN. Do not infer traffic, SLOs, consistency,
budget, compliance, migration windows, or team capability from the phrase
“system design.”
Present at least a recommendation, a viable alternative, and explicit
rejection/exit conditions. Stop before choosing the database, topology,
compatibility policy, or migration strategy for the user.
Bind any later mutation to a user-selected option and exact authorized
action IDs. Keep before/after locators, SHA-256, verification, and rollback.
Never mutate a production database or configuration. Apply only to a
disposable environment explicitly placed in scope; otherwise deliver a
reviewed plan and scripts.
Describe schema_lint.py as a lexical heuristic. It is not a SQL parser,
query planner, lock simulator, schema diff engine, or zero-downtime proof.
Keep VERIFIED for checks that actually ran and retain their command,
return code, locator, and hash. Use PLANNED, UNKNOWN, or UNAVAILABLE
otherwise.
Keep this skill off the research DAG. Emit no light.findings.v1; add no
STAGE_GATES, ROUTES, stage number, or back-edge; do not attach _shared.
Choose the mode
Situation
Mode
New system with no implementation
greenfield requirements and option design
Existing repository/system
read-only intake, then current-state inventory
Existing monolith or services changing gradually
modernization with compatibility and rollback
API-only change
contract and consumer compatibility branch
Schema-only change
dialect/version/context-specific migration branch
User supplied a completed package
review and evidence verification
Phase 1 — Intake and protection
Capture or preserve as UNKNOWN:
users, business goal, critical use cases, data classification;
load range, latency, availability, durability, and consistency targets;
team/operations capability, budget, deployment environment, compliance, and
migration window;
topology: greenfield, monolith, modular monolith, or services;
Keep --out outside the source root. Read all emitted artifacts and verify
source_unchanged=true.
Phase 2 — Requirements and current state
Produce:
context and quality-attribute scenarios with a measurable stimulus,
environment, response, and target or UNKNOWN;
capacity estimates for request rate, storage growth, fan-out, latency budget,
and any dominant resource; if unknown, write UNKNOWN plus the measurement
plan rather than inventing numbers;
current-state → target-state mapping with explicit gaps. For greenfield,
current state can be none, but the gap list still records missing evidence;
architecture fitness functions: observable signals, thresholds, verification
command/probe, and evidence state. A quality attribute without a fitness
function is still only prose;
a component/interface/store inventory with owner and fact provenance;
synchronous/asynchronous data flows, transaction boundaries, delivery
semantics, idempotency/deduplication, backpressure, timeout/retry, and failure
handling;
risk, assumption, unknown, and stale-fact registers.
Do not silently convert a code search into an architecture truth. Mark each
fact as declared, observed, inferred, or unknown.
Phase 3 — Options and decision stop
Present at least:
a recommended option with reasons;
a viable alternative;
conditions under which each should not be used;
cost/complexity, migration risk, compatibility window, rollback, operations,
and exit criteria;
unresolved facts that could reverse the recommendation.
Then stop. Ask the user to select an option and authorize exact action IDs.
Do not prewrite the user's choice or generate the chosen schema/API/migration/
ADR as if approval already existed.
Before presenting the decision, validate that requirements, capacity estimates,
current/target state, fitness functions, at least two genuinely different
options, hard-constraint and fitness evidence, tradeoffs, rejection conditions,
reversal costs, and migration/deprecation stance are present:
In proposal, PASS means only ready_for_user_decision=true; it never writes
the selection, and the report emits a canonical option_packet_sha256 for each
option. In authorized, the selection must be paired with a
light.system-design.v2.authorization whose option digest still matches,
whose approved action IDs are a subset of that option, whose target is
explicitly disposable, whose rollback cannot be waived, and whose date is not
later than --as-of. The walking skeleton
(entry/core_path/state_boundary/observable_result/failure_probe/verification/action_ids)
may contain only approved actions before ready_for_implementation=true.
For each option, state whether migration/deprecation is applicable. If it is
applicable, the option must be replacement-first. Consumer inventory is a list
of stable consumer/interface IDs, owners, usage status, evidence state,
evidence locator/date, or an explicit measurement plan. Telemetry is a
structured metric/source/evidence record. Rollout is a sequence of phases with
entry, exit, and rollback conditions; rollback has a trigger, action, and
verification. A deprecation compatibility window has start, end, and removal
conditions. Plain strings do not satisfy these fields. If migration is not
applicable, record why; do not leave it blank.
Use
templates/decision-authorization.template.json
after the user responds. Copy the selected digest emitted by
design_readiness.py; a changed requirement, state model, fitness function, or
selected option changes that digest and requires fresh authorization.
Phase 4 — Build the architecture package
After authorization, produce only the selected scope:
context and quality attributes;
component/boundary and data-flow views;
API/event contracts and consumer compatibility policy;
schema and current-to-target change plan;
rollout, backfill, rollback, and deprecation plan;
ADR with alternatives and consequences;
security/privacy design controls and items for specialist review;
verification plan and delivery evidence.
Use
templates/architecture-package.template.md.
Treat bundled SQL/OpenAPI files as dialect/version-labeled examples, never as
production defaults.
For authoritative diff/drift, use a real engine/tool selected for the project
(for example Atlas, Skeema, Alembic, Flyway, Liquibase, or Prisma) and preserve
its command/output. Do not claim this skill implements those engines.
If Mermaid rendering is unavailable, report syntax/structure verification only.
Phase 6 — Verify, rehearse, and deliver
Verify as applicable:
contract and example request/response;
schema creation and migration on the selected database/version;
data preservation, compatibility window, rollback, and reapply;
load assumptions rather than invented load results;
timeout/retry/circuit-breaker and failure drills;
logs, metrics, traces, SLOs, deployment, and rollback observability;
tenant isolation and PII controls with specialist review still pending.
Record authorization binding, source-intake binding, implemented action IDs,
artifact hashes, and verification entries in the package manifest, then run:
Deliver only when the package distinguishes VERIFIED, PLANNED, UNKNOWN,
and UNAVAILABLE; every VERIFIED entry is evidence-backed; the manifest
binds the copied authorization file, option digest, approved action IDs, and
implemented action IDs; and existing-system packages bind the read-only
intake-integrity.json hash. Artifact and verification locators in the
manifest are resolved relative to the manifest's directory and must stay inside
that package directory; ../, absolute paths to outside evidence, or
current-working-directory-dependent locators are not a portable delivery
package.
Cross-skill ownership
system-design: system boundaries, runtime interfaces, operational schema,
system migration, reliability choices, ADRs.
project-structure: visible file tree and authorized file moves. Borrow its
protection discipline; never send schema migration back to it.
data-engineering: research-data quality, lineage, transformations, splits,
and data release. A service database is not a research dataset pipeline.
frontend-design: interaction and interface implementation. This skill owns
backend/API boundaries, not UI.
research-ethics: final ethics/privacy judgment. This skill proposes design
controls and review items only.
orchestrator: may consume delivered state; it receives no invented gate.
Unknown requirements and stale facts stayed explicit.
Capacity/load/storage estimates are explicit; unknowns have measurement
plans instead of invented numbers.
Current-state → target-state gaps are recorded, even for greenfield
(current_state=none).
Every quality attribute has a fitness function and each option has a
fitness result with evidence or an honest UNKNOWN/UNAVAILABLE warning.
Options, tradeoffs, rejection conditions, and a real user decision exist.
Authorization digest still matches the selected option packet; approved
action IDs are in scope, the target is explicitly disposable, and
rollback remains required.
Package manifest binds the authorization file hash, option digest,
implemented action IDs, and read-only intake integrity or an explicit
greenfield/not-applicable reason.
At least two interfaces/options were compared; the first idea was not silently accepted.
The authorized design has the thinnest end-to-end walking skeleton and a failure probe.
Migration/deprecation stance is explicit; applicable migrations are
replacement-first with consumer inventory, telemetry, rollout, rollback,
and compatibility window.
Mutations match authorized action IDs and a disposable target.
API/schema/migration claims state dialect, version, context, and limits.
Every VERIFIED item has command, return code, locator, and SHA-256.
Every verification entry carries action IDs that are inside the
implemented and approved scope.
Package artifact/evidence locators are manifest-relative and do not
escape the package directory.
Rollback and compatibility were exercised or remain visibly planned.
Cross-skill and off-DAG boundaries remain intact.
1---2name: light-system-design3description: Design or modernize a software system from an evidence-backed current-state inventory through quality attributes, architecture options, API and schema contracts, migration/rollback plans, ADRs, and verification. Use for greenfield or existing monoliths, modular monoliths, services, system/API/ database design, schema migration review, data-flow reliability, tenant/PII controls, or architecture evolution. Existing systems stay read-only until the user selects an option and authorizes exact mutations. Unknown facts stay UNKNOWN. This is an off-DAG engineering skill: do not emit findings or invent STAGE_GATES, ROUTES, stages, or back-edges.4---56# System design lifecycle78Own system boundaries, runtime interfaces, operational data stores, system9migrations, and architecture decisions. Do not equate a diagram, SQL file, or10OpenAPI document with a working, safe, or scalable system.1112Read13[`references/system-design-resource-map.md`](references/system-design-resource-map.md)14before any existing-system task. It defines the lifecycle, artifact contract,15decision stop, evidence states, access tiers, and cross-skill ownership. Read16[`references.md`](references.md) only for the database/API/reliability branch17that applies to the selected system.1819## Non-negotiable boundary20211. Treat repository, configuration, schema, API, dependency, and deployment22 intake as read-only access. It is not authorization to rewrite them.232. Preserve absent facts as `UNKNOWN`. Do not infer traffic, SLOs, consistency,24 budget, compliance, migration windows, or team capability from the phrase25 “system design.”263. Present at least a recommendation, a viable alternative, and explicit27 rejection/exit conditions. Stop before choosing the database, topology,28 compatibility policy, or migration strategy for the user.294. Bind any later mutation to a user-selected option and exact authorized30 action IDs. Keep before/after locators, SHA-256, verification, and rollback.315. Never mutate a production database or configuration. Apply only to a32 disposable environment explicitly placed in scope; otherwise deliver a33 reviewed plan and scripts.346. Describe `schema_lint.py` as a lexical heuristic. It is not a SQL parser,35 query planner, lock simulator, schema diff engine, or zero-downtime proof.367. Keep `VERIFIED` for checks that actually ran and retain their command,37 return code, locator, and hash. Use `PLANNED`, `UNKNOWN`, or `UNAVAILABLE`38 otherwise.398. Keep this skill off the research DAG. Emit no `light.findings.v1`; add no40 `STAGE_GATES`, `ROUTES`, stage number, or back-edge; do not attach `_shared`.4142## Choose the mode4344| Situation | Mode |45|---|---|46| New system with no implementation | greenfield requirements and option design |47| Existing repository/system | read-only intake, then current-state inventory |48| Existing monolith or services changing gradually | modernization with compatibility and rollback |49| API-only change | contract and consumer compatibility branch |50| Schema-only change | dialect/version/context-specific migration branch |51| User supplied a completed package | review and evidence verification |5253## Phase 1 — Intake and protection5455Capture or preserve as `UNKNOWN`:5657- users, business goal, critical use cases, data classification;58- load range, latency, availability, durability, and consistency targets;59- team/operations capability, budget, deployment environment, compliance, and60 migration window;61- topology: greenfield, monolith, modular monolith, or services;62- components, owners, interfaces, stores, dependencies, write paths, trust63 boundaries, failure modes, versions, source locators, and freshness;64- existing clients, schema history, deployment/runtime constraints, and65 compatibility promises.6667For an existing system, create an intake manifest from68[`templates/system-intake.template.json`](templates/system-intake.template.json)69and run:7071```text72python scripts/architecture_lifecycle.py intake <root> \73 --manifest <system-intake.json> --out <evidence-dir>74```7576Keep `--out` outside the source root. Read all emitted artifacts and verify77`source_unchanged=true`.7879## Phase 2 — Requirements and current state8081Produce:8283- context and quality-attribute scenarios with a measurable stimulus,84 environment, response, and target or `UNKNOWN`;85- capacity estimates for request rate, storage growth, fan-out, latency budget,86 and any dominant resource; if unknown, write `UNKNOWN` plus the measurement87 plan rather than inventing numbers;88- current-state → target-state mapping with explicit gaps. For greenfield,89 current state can be `none`, but the gap list still records missing evidence;90- architecture fitness functions: observable signals, thresholds, verification91 command/probe, and evidence state. A quality attribute without a fitness92 function is still only prose;93- a component/interface/store inventory with owner and fact provenance;94- synchronous/asynchronous data flows, transaction boundaries, delivery95 semantics, idempotency/deduplication, backpressure, timeout/retry, and failure96 handling;97- risk, assumption, unknown, and stale-fact registers.9899Do not silently convert a code search into an architecture truth. Mark each100fact as declared, observed, inferred, or unknown.101102## Phase 3 — Options and decision stop103104Present at least:1051061. a recommended option with reasons;1072. a viable alternative;1083. conditions under which each should not be used;1094. cost/complexity, migration risk, compatibility window, rollback, operations,110 and exit criteria;1115. unresolved facts that could reverse the recommendation.112113Then stop. Ask the user to select an option and authorize exact action IDs.114Do not prewrite the user's choice or generate the chosen schema/API/migration/115ADR as if approval already existed.116117Before presenting the decision, validate that requirements, capacity estimates,118current/target state, fitness functions, at least two genuinely different119options, hard-constraint and fitness evidence, tradeoffs, rejection conditions,120reversal costs, and migration/deprecation stance are present:121122```text123python scripts/design_readiness.py --input templates/design-readiness.example.json \124 --as-of 2026-07-05125```126127In `proposal`, PASS means only `ready_for_user_decision=true`; it never writes128the selection, and the report emits a canonical `option_packet_sha256` for each129option. In `authorized`, the selection must be paired with a130`light.system-design.v2.authorization` whose option digest still matches,131whose approved action IDs are a subset of that option, whose target is132explicitly disposable, whose rollback cannot be waived, and whose date is not133later than `--as-of`. The walking skeleton134(`entry/core_path/state_boundary/observable_result/failure_probe/verification/action_ids`)135may contain only approved actions before `ready_for_implementation=true`.136137For each option, state whether migration/deprecation is applicable. If it is138applicable, the option must be replacement-first. Consumer inventory is a list139of stable consumer/interface IDs, owners, usage status, evidence state,140evidence locator/date, or an explicit measurement plan. Telemetry is a141structured metric/source/evidence record. Rollout is a sequence of phases with142entry, exit, and rollback conditions; rollback has a trigger, action, and143verification. A deprecation compatibility window has start, end, and removal144conditions. Plain strings do not satisfy these fields. If migration is not145applicable, record why; do not leave it blank.146147Use148[`templates/decision-authorization.template.json`](templates/decision-authorization.template.json)149after the user responds. Copy the selected digest emitted by150`design_readiness.py`; a changed requirement, state model, fitness function, or151selected option changes that digest and requires fresh authorization.152153## Phase 4 — Build the architecture package154155After authorization, produce only the selected scope:156157- context and quality attributes;158- component/boundary and data-flow views;159- API/event contracts and consumer compatibility policy;160- schema and current-to-target change plan;161- rollout, backfill, rollback, and deprecation plan;162- ADR with alternatives and consequences;163- security/privacy design controls and items for specialist review;164- verification plan and delivery evidence.165166Use167[`templates/architecture-package.template.md`](templates/architecture-package.template.md).168Treat bundled SQL/OpenAPI files as dialect/version-labeled examples, never as169production defaults.170171## Phase 5 — Contract, schema, and migration checks172173### API contract174175Define versioning, authn/authz boundary, error model, pagination, idempotency,176compatibility window, and deprecation. Validate OpenAPI with:177178```text179python scripts/contract_validate.py --spec openapi.yaml \180 --examples examples.json --json181```182183`VALIDATED` requires `openapi-spec-validator` plus successful example-schema184checks. `STRUCTURE_ONLY` or `UNAVAILABLE` is not contract validation.185186### Schema and migration187188Keep four tasks separate:1891901. design-time schema review;1912. current-to-target diff/drift;1923. migration SQL risk lint;1934. rollout/backfill/rollback execution tests.194195Run the heuristic linter only with an explicit dialect and relevant context:196197```text198python scripts/schema_lint.py --ddl migration.sql \199 --dialect postgresql --server-version 18 \200 --context migration-context.json --json201```202203For authoritative diff/drift, use a real engine/tool selected for the project204(for example Atlas, Skeema, Alembic, Flyway, Liquibase, or Prisma) and preserve205its command/output. Do not claim this skill implements those engines.206207Generate an ER view from a schema spec:208209```text210python scripts/er_diagram.py --in schema.yaml --strict --out schema.mmd211```212213If Mermaid rendering is unavailable, report syntax/structure verification only.214215## Phase 6 — Verify, rehearse, and deliver216217Verify as applicable:218219- contract and example request/response;220- schema creation and migration on the selected database/version;221- data preservation, compatibility window, rollback, and reapply;222- load assumptions rather than invented load results;223- timeout/retry/circuit-breaker and failure drills;224- logs, metrics, traces, SLOs, deployment, and rollback observability;225- tenant isolation and PII controls with specialist review still pending.226227Record authorization binding, source-intake binding, implemented action IDs,228artifact hashes, and verification entries in the package manifest, then run:229230```text231python scripts/architecture_lifecycle.py verify-package \232 --package package-manifest.json --json233```234235Deliver only when the package distinguishes `VERIFIED`, `PLANNED`, `UNKNOWN`,236and `UNAVAILABLE`; every `VERIFIED` entry is evidence-backed; the manifest237binds the copied authorization file, option digest, approved action IDs, and238implemented action IDs; and existing-system packages bind the read-only239`intake-integrity.json` hash. Artifact and verification locators in the240manifest are resolved relative to the manifest's directory and must stay inside241that package directory; `../`, absolute paths to outside evidence, or242current-working-directory-dependent locators are not a portable delivery243package.244245## Cross-skill ownership246247- `system-design`: system boundaries, runtime interfaces, operational schema,248 system migration, reliability choices, ADRs.249- `project-structure`: visible file tree and authorized file moves. Borrow its250 protection discipline; never send schema migration back to it.251- `data-engineering`: research-data quality, lineage, transformations, splits,252 and data release. A service database is not a research dataset pipeline.253- `frontend-design`: interaction and interface implementation. This skill owns254 backend/API boundaries, not UI.255- `research-ethics`: final ethics/privacy judgment. This skill proposes design256 controls and review items only.257- `orchestrator`: may consume delivered state; it receives no invented gate.258259## Validation260261Run every script self-test:262263```text264python scripts/architecture_lifecycle.py --selftest265python scripts/schema_lint.py --selftest266python scripts/er_diagram.py --selftest267python scripts/contract_validate.py --selftest268python scripts/design_readiness.py --selftest269```270271Before delivery, verify:272273- [ ] Existing-system intake was read-only.274- [ ] Unknown requirements and stale facts stayed explicit.275- [ ] Capacity/load/storage estimates are explicit; unknowns have measurement276 plans instead of invented numbers.277- [ ] Current-state → target-state gaps are recorded, even for greenfield278 (`current_state=none`).279- [ ] Every quality attribute has a fitness function and each option has a280 fitness result with evidence or an honest UNKNOWN/UNAVAILABLE warning.281- [ ] Options, tradeoffs, rejection conditions, and a real user decision exist.282- [ ] Authorization digest still matches the selected option packet; approved283 action IDs are in scope, the target is explicitly disposable, and284 rollback remains required.285- [ ] Package manifest binds the authorization file hash, option digest,286 implemented action IDs, and read-only intake integrity or an explicit287 greenfield/not-applicable reason.288- [ ] At least two interfaces/options were compared; the first idea was not silently accepted.289- [ ] The authorized design has the thinnest end-to-end walking skeleton and a failure probe.290- [ ] Migration/deprecation stance is explicit; applicable migrations are291 replacement-first with consumer inventory, telemetry, rollout, rollback,292 and compatibility window.293- [ ] Mutations match authorized action IDs and a disposable target.294- [ ] API/schema/migration claims state dialect, version, context, and limits.295- [ ] Every `VERIFIED` item has command, return code, locator, and SHA-256.296- [ ] Every verification entry carries action IDs that are inside the297 implemented and approved scope.298- [ ] Package artifact/evidence locators are manifest-relative and do not299 escape the package directory.300- [ ] Rollback and compatibility were exercised or remain visibly planned.301- [ ] Cross-skill and off-DAG boundaries remain intact.
Run npx skillmds@latest add light0305/light-system-design in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Design or modernize a software system from an evidence-backed current-state inventory through quality attributes, architecture options, API and schema contracts, migration/rollback plans, ADRs, and verification. Use for greenfield or existing monoliths, modular monoliths, services, system/API/ database design, schema migration review, data-flow reliability, tenant/PII controls, or architecture evolution. Existing systems stay read-only until the user selects an option and authorizes exact mutations. Unknown facts stay UNKNOWN. This is an off-DAG engineering skill: do not emit findings or invent STAGE_GATES, ROUTES, stages, or back-edges. It is listed under Integrations & APIs on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
light0305 (@light0305) published this skill. Their other Agent Skills are listed on their SkillMD profile.