Skip to content

Update guiding tenets#374

Draft
calda wants to merge 1 commit intomasterfrom
cal--guiding-tenets
Draft

Update guiding tenets#374
calda wants to merge 1 commit intomasterfrom
cal--guiding-tenets

Conversation

@calda
Copy link
Copy Markdown
Member

@calda calda commented Mar 22, 2026

This PR proposes updates to our guiding tenets.

- Best practices without autocorrect or linting are still welcomed as general advice for humans and [AI agents](https://swift.airbnb.tech/skill).
- We strive to align with best practices of the broader [Swift community](https://forums.swift.org).
- This guide is in addition to the official [Swift API Design Guidelines](https://swift.org/documentation/api-design-guidelines/). These rules should not contradict that document.
- These rules should not fight Xcode's <kbd>^</kbd> + <kbd>I</kbd> indentation behavior.
Copy link
Copy Markdown
Member Author

@calda calda Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have not prioritized this in several years.

  1. Xcode indentation is a moving target
  2. In some areas we disagree with the default indentation behavior, with reasonable justification
  3. We address this internally with a custom Xcode extension that replaces the default ^I functionality

- We strive to align with best practices of the broader [Swift community](https://forums.swift.org).
- This guide is in addition to the official [Swift API Design Guidelines](https://swift.org/documentation/api-design-guidelines/). These rules should not contradict that document.
- These rules should not fight Xcode's <kbd>^</kbd> + <kbd>I</kbd> indentation behavior.
- We strive to make every rule lintable:
Copy link
Copy Markdown
Member Author

@calda calda Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We generally prefer code autocorrect over linting, and now welcome rules with no autocorrect / linting component (e.g. for the AI skill).


</details>

## AI Skill
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still need to ensure this is excluded from generated site content


Following this style guide should:

- Make it easier to read and begin understanding unfamiliar code.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thought this could be simplified

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant