Skip to content

Add architecture rules with swift-llm-check and a CI workflow - #31

Merged
mackoj merged 2 commits into
mainfrom
chore/architecture-rules
Nov 14, 2026
Merged

mackoj merged 2 commits into
mainfrom
chore/architecture-rules

Conversation

@mackoj

@mackoj mackoj commented Nov 14, 2026

Copy link
Copy Markdown
Owner

What

  • Architecture/: a separate, test-only package on swift-llm-check that runs the repository's mechanical conventions as Swift Testing tests, with unit tests for every detector.
  • .llm-check.yaml, CODING_STANDARDS.md (derived from .github/copilot-instructions.md and the code) and the generated docs/architecture-rules.md.
  • .github/workflows/ci.yml: the repository had no CI. macOS (arm64, because package-generator-cli is an arm64 binary): swift build --build-tests, swift test, swift test --package-path Architecture.

Rules

id checks
test-sources-link-the-plugin-files Tests/PackageGeneratorTests/Shared/*.swift are symlinks into Plugins/PackageGenerator, never copies
core-files-import-only-foundation the plugin files the tests link import only Foundation
plugin-reports-through-diagnostics no print in the plugin
external-products-use-package-identity no displayName (use package.id)
apple-sdk-filtering-is-deferred filterImports never consults appleDefaultSDKs
plugin-uses-url-apis no deprecated directory / pluginWorkDirectory / tool.path
tests-use-swift-testing, tests-are-not-disabled test hygiene

All rules pass on the current code; no source changes. The plugin's own dependencies are unchanged.

Encode the plugin's conventions (pure core linked into the tests, Diagnostics
over print, package identity over displayName, deferred Apple SDK filtering,
URL-based PackagePlugin APIs, Swift Testing) as an Architecture/ test package,
document them in CODING_STANDARDS.md and docs/architecture-rules.md, and add a
macOS CI workflow that builds, tests and runs the rules.
@mackoj
mackoj merged commit 9ba4469 into main Nov 14, 2026
1 check passed
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