Skip to content

chore: clarify and prune design guidelines - #38463

Open
otaviomacedo wants to merge 2 commits into
mainfrom
otaviom/design-guidelines-cleanup
Open

chore: clarify and prune design guidelines#38463
otaviomacedo wants to merge 2 commits into
mainfrom
otaviom/design-guidelines-cleanup

Conversation

@otaviomacedo

Copy link
Copy Markdown
Contributor

Editorial pass over docs/DESIGN_GUIDELINES.md (with a small companion fix in
AGENTS.md) to make the guidance clearer, self-explanatory, and free of stale
references. No behavioral or code changes.

Highlights:

  • Static type checks / instanceof: explain why instanceof is
    unreliable in CDK (multiple copies of a package in node_modules, multiple
    versions in one tree, jsii cross-language boundaries) rather than just
    asserting the rule. AGENTS.md updated to match: L1 Cfn* checks are
    auto-generated via spec2cdk; core classes like App/Stack/Stage
    implement the pattern by hand.
  • Versioning: replaced the cryptic bullet "Semantic versioning Construct ID
    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
    -alpha modules.
  • Fn::Sub: replaced the bare "Do not use FnSub" with the rationale (it
    embeds logical IDs as literal strings, bypassing CDK's reference/dependency
    tracking) and the recommended alternatives.
  • Removed stale content: obsolete CDKv1→v2 note about removing pattern
    libraries, the deCDK prop-type restrictions, and dangling awslint rule tags
    ([_awslint:...]) that no longer correspond to active lint rules.
  • Trait/Facade section: trimmed duplicated explanation of Facades providing
    Trait implementations.
  • Misc: removed a leftover "Suggestion for alternative syntax?" author note
    (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

@aws-cdk-automation
aws-cdk-automation requested a review from a team July 31, 2026 15:04
@github-actions github-actions Bot added the p2 label Jul 31, 2026
@mergify mergify Bot added the contribution/core This is a PR that came from AWS. label Jul 31, 2026
@mergify
mergify Bot temporarily deployed to automation July 31, 2026 15:04 Inactive
@mergify
mergify Bot temporarily deployed to automation July 31, 2026 15:04 Inactive
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ This pull request description does not follow the correct template structure.

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 Closes #123 in the Issue section. If no existing issue matches your change, create one first.

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Jul 31, 2026
@mergify

mergify Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

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).

@mergify

mergify Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • Entered queue2026-08-07 09:15 UTC · Rule: default-squash · triggered by rule automatic merge
  • 🟠 Checks running · in-place · dashboard
  • ⏳ Merge · ETA: 2026-08-07 09:53 UTC 🚀
Waiting for any of
  • check-neutral = build
  • check-skipped = build
  • check-success = build
All merge conditions
Waiting for any of
  • all of: [📌 queue conditions of queue rule default-merge]
    • check-success=build
    • label~=no-squash
    • any of: [🛡 GitHub branch protection]
      • check-neutral = build
      • check-skipped = build
      • check-success = build
  • all of: [📌 queue conditions of queue rule default-squash]
    • check-success=build
    • any of: [🛡 GitHub branch protection]
      • check-neutral = build
      • check-skipped = build
      • check-success = build
  • all of: [📌 queue conditions of queue rule priority-squash]
    • check-success=build
    • label~=priority-pr
    • any of: [🛡 GitHub branch protection]
      • check-neutral = build
      • check-skipped = build
      • check-success = build
All queue conditions
  • any of [🔀 queue conditions]:
    • all of [📌 queue conditions of queue rule default-merge]:
      • check-success=build
      • label~=no-squash
      • any of [🛡 GitHub branch protection]:
        • check-neutral = build
        • check-skipped = build
        • check-success = build
      • #approved-reviews-by>=1
      • #changes-requested-reviews-by=0
      • -approved-reviews-by~=author
      • -closed
      • -label~=(blocked|do-not-merge|agent-docs-review-needed)
      • -merged
      • -title~=(WIP|wip)
      • check-success=validate-pr
      • github-review-approved [🛡 GitHub branch protection]
      • any of:
        • -label~=pr/needs-integration-tests-deployment
        • check-success=Deploy integration test snapshots (requires pr/needs-integration-tests-deployment label)
      • any of [🛡 GitHub branch protection]:
        • check-success = validate-pr
        • check-neutral = validate-pr
        • check-skipped = validate-pr
    • all of [📌 queue conditions of queue rule default-squash]:
      • check-success=build
      • any of [🛡 GitHub branch protection]:
        • check-neutral = build
        • check-skipped = build
        • check-success = build
      • #approved-reviews-by>=1
      • #changes-requested-reviews-by=0
      • -approved-reviews-by~=author
      • -closed
      • -label~=(blocked|do-not-merge|agent-docs-review-needed|no-squash|priority-pr)
      • -merged
      • -title~=(WIP|wip)
      • base!=release
      • check-success=validate-pr
      • github-review-approved [🛡 GitHub branch protection]
      • any of:
        • -label~=pr/needs-integration-tests-deployment
        • check-success=Deploy integration test snapshots (requires pr/needs-integration-tests-deployment label)
      • any of [🛡 GitHub branch protection]:
        • check-success = validate-pr
        • check-neutral = validate-pr
        • check-skipped = validate-pr
    • all of [📌 queue conditions of queue rule priority-squash]:
      • check-success=build
      • label~=priority-pr
      • any of [🛡 GitHub branch protection]:
        • check-neutral = build
        • check-skipped = build
        • check-success = build
      • #approved-reviews-by>=1
      • #changes-requested-reviews-by=0
      • -approved-reviews-by~=author
      • -closed
      • -label~=(blocked|do-not-merge|agent-docs-review-needed|no-squash)
      • -merged
      • -title~=(WIP|wip)
      • base!=release
      • check-success=validate-pr
      • github-review-approved [🛡 GitHub branch protection]
      • any of:
        • -label~=pr/needs-integration-tests-deployment
        • check-success=Deploy integration test snapshots (requires pr/needs-integration-tests-deployment label)
      • any of [🛡 GitHub branch protection]:
        • check-success = validate-pr
        • check-neutral = validate-pr
        • check-skipped = validate-pr
  • -closed [📌 queue requirement]
  • -conflict [📌 queue requirement]
  • -draft [📌 queue requirement]
  • any of [📌 queue -> configuration change requirements]:
    • -mergify-configuration-changed
    • check-success = Configuration changed
  • any of [📌 queue requirement]:
    • check-neutral = Mergify Merge Protections
    • check-skipped = Mergify Merge Protections
    • check-success = Mergify Merge Protections

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution/core This is a PR that came from AWS. p2 pr/needs-maintainer-review This PR needs a review from a Core Team Member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants