chore: clarify and prune design guidelines - #38463
Conversation
|
PRs without a linked issue will receive lower priority for review and merging. Please update the description to follow the PR template and include a line like |
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Merge Queue Status
This pull request spent 55 minutes 14 seconds in the queue, including 54 minutes 45 seconds running CI. Required conditions to merge
|
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
|
Comments on closed issues and PRs are hard for our team to see. |
Editorial pass over
docs/DESIGN_GUIDELINES.md(with a small companion fix inAGENTS.md) to make the guidance clearer, self-explanatory, and free of stalereferences. No behavioral or code changes.
Highlights:
instanceof: explain whyinstanceofisunreliable in CDK (multiple copies of a package in
node_modules, multipleversions in one tree, jsii cross-language boundaries) rather than just
asserting the rule.
AGENTS.mdupdated to match: L1Cfn*checks areauto-generated via
spec2cdk; core classes likeApp/Stack/Stageimplement the pattern by hand.
changes or scope hierarchy" with a full explanation — changing a construct's
ID or scope position changes the derived logical ID, which replaces resources
and causes data loss, so such changes are breaking and only allowed in
-alphamodules.Fn::Sub: replaced the bare "Do not use FnSub" with the rationale (itembeds logical IDs as literal strings, bypassing CDK's reference/dependency
tracking) and the recommended alternatives.
libraries, the deCDK prop-type restrictions, and dangling awslint rule tags
(
[_awslint:...]) that no longer correspond to active lint rules.Trait implementations.
(replaced with a proper explanation of static factory methods), de-duplicated
the "be concise" props guidance, and minor wording/typo fixes.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license