centralize guides and rails under mosaic with runtime compatibility links
This commit is contained in:
18
templates/agent/fragments/campsite-rule.md
Normal file
18
templates/agent/fragments/campsite-rule.md
Normal file
@@ -0,0 +1,18 @@
|
||||
## Campsite Rule (MANDATORY)
|
||||
|
||||
If you modify a line containing a policy violation, you MUST either:
|
||||
1. **Fix the violation properly** in the same change, OR
|
||||
2. **Flag it as a deferred item** with documented rationale
|
||||
|
||||
**"It was already there" is NEVER an acceptable justification** for perpetuating a violation in code you touched. Touching it makes it yours.
|
||||
|
||||
Examples of violations you must fix when you touch the line:
|
||||
- `as unknown as Type` double assertions — use type guards instead
|
||||
- `any` types — narrow to `unknown` with validation or define a proper interface
|
||||
- Missing error handling — add it if you're modifying the surrounding code
|
||||
- Suppressed linting rules (`// eslint-disable`) — fix the underlying issue
|
||||
|
||||
If the proper fix is too large for the current scope, you MUST:
|
||||
- Create a TODO comment with issue reference: `// TODO(#123): Replace double assertion with type guard`
|
||||
- Document the deferral in your PR/commit description
|
||||
- Never silently carry the violation forward
|
||||
Reference in New Issue
Block a user