TWPA0004: universal #region Purpose enforcement; convention-analyzers wired repo-wide#269
Merged
Conversation
…0004) Maintainer design decision: universal rule, not a non-trivial heuristic — trivial files get a one-line Purpose instead of an exemption, so the analyzer is exact (no threshold, no misclassification, no suppression management). Includes assembly rename to convention-analyzers + single Directory.Build.props wiring, which absorbs 082 and flows enforcement into generated apps. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…analyzers wired repo-wide Rule is universal by design (maintainer): every compiled, non-generated .cs file requires #region Purpose — trivial files get a one-line region instead of an exemption, so the analyzer needs no triviality heuristic. #region Design is deliberately not enforced (judgment, governed by AGENTS.md). - Assembly renamed timewarp-architecture-contract-analyzers -> timewarp-architecture-convention-analyzers; wired ONCE in source/Directory.Build.props (self-excluded, IsAspireProjectResource=false), replacing the per-csproj web-contracts reference. Absorbs task 082: TWPA0002/0003 now reach every source project — and generated apps inherit all three rules from the template. - Backfill to 304/304 coverage: 51 formulaic files scripted (markers, global-usings), 88 small files via 8-agent fan-out (one-line Purpose; Design only where genuine). - Broadened TWPA0003 caught a real one: sample-options.cs SampleOption = string.Empty with a NotEmpty() options validator -> = null!. - Analyzer defect found by the test framework's suppression pass: reporting at TextSpan(0,0) made the diagnostic unsuppressable by a leading #pragma. Fixed: anchor on the file's first token; trivia-only files exempt. Verified: dev build 0/0; analyzer tests 21/21; sourcegen 14/14; web-server integration 11 passed. Skill updated (universal Purpose) in timewarp-flow 25e288b and synced. Tasks 084 done, 082 closed as absorbed. Co-Authored-By: Claude Fable 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.
Summary
Completes kanban 084 (absorbs 082): the agent-context-regions convention gets its 080-style enforcement backstop.
The rule (maintainer-decided: universal, no triviality heuristic)
.csfile requires#region Purpose. Trivial files satisfy it with one honest line instead of an exemption, so the analyzer needs no threshold to tune.#region Designis deliberately not enforced (judgment, governed by AGENTS.md).#if false) have no first token and are structurally exempt.Architecture
timewarp-architecture-contract-analyzers→timewarp-architecture-convention-analyzers(hosts contract rules TWPA0002/0003 + repo-wide convention rules).source/Directory.Build.props(self-excluded,IsAspireProjectResource="false"), replacing the per-csproj reference — every source project is enforced, and generated apps inherit all three rules from the template. This absorbs task 082's scope.Backfill + finds
sample-options.cs= string.Emptywith aNotEmpty()options validator →= null!(the options-validation teaching sample, copied by generated apps).TextSpan(0,0)made the diagnostic unsuppressable by a leading#pragma. Fixed by anchoring on the file's first token.Verification
dev buildgreen (0 warnings / 0 errors), analyzer tests 21/21 (5 new), sourcegen 14/14, web-server integration 11 passed.agent-context-regions) updated to the universal rule in timewarp-flow and synced.🤖 Generated with Claude Code