Repository navigation
feat(map,build,review): "must not" rules per folder, enforced by checks (#116) - #124
Merged
Merged
Conversation
…ks (#116) map surveys framework use per folder (new tested folder-imports.sh), suggests 3-6 rules, asks which to keep, and installs each as a SwiftLint rule or fitness test proven green on real code and red on a planted break. Existing breaks become known exceptions that only shrink. CODEBASE.md gets a Folder Rules table that build agents follow and review checks. expect-red.sh gains --no-build-check for lint commands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #116.
In plain words
Agents copy whatever they see and put code wherever it works. Now
mapsuggests a few simple lines each folder must not cross ("Models must not import SwiftUI", "only Payments/ uses StoreKit"), you pick which to keep, and each one becomes a check that fails the moment it's broken.What changed
templates/_scripts/folder-imports.sh: which frameworks each folder uses, plus direct calls that need no import (URLSession,CKContainer,Product.purchase).--files Xlists the files. Skips tests, Pods, build output, and commented-out lines; handles folder names with spaces,@preconcurrency import,import struct Foundation.URL, and new uncommitted files.mapStep 5.7 "Folder Rules":build: agents get the table, never add to the exceptions, and stop and report if a task can't be done without breaking a rule.review: flags new breaks and any growth in an exceptions list (High).expect-red.sh --no-build-check: SwiftLint's rule breaks look like compiler errors, so lint commands need any failure counted as caught.Tests
11 new script tests (folder-imports ×10,
--no-build-check×1). Planted bugs in folder-imports: 4 of 4 caught. One was missed on the first try, which showed a gap in the test (comments naming an API weren't covered); fixed with a new fixture line and test.🤖 Generated with Claude Code