main
md 103 lines 3.96 KB
Rendered Raw
1 # RAI Policy
2
3 > Responsible AI policy for this project. Rai enforces these standards.
4
5 ## Principles
6
7 1. **Safety first** — No output should cause harm to individuals or groups.
8 2. **Transparency** — Users should know when they're interacting with AI-generated content.
9 3. **Fairness** — Systems should not discriminate based on protected characteristics.
10 4. **Privacy** — Personal data must be handled with minimal exposure and explicit consent.
11 5. **Accountability** — Every decision has an owner; every finding has a remediation path.
12
13 ## Critical Violations (🔴 — Always Blocked)
14
15 These CANNOT be shipped. No opt-out. No exceptions.
16
17 ### Credentials & Secrets
18 - Hardcoded API keys, tokens, passwords, connection strings
19 - Private keys committed to source control
20 - Secrets in environment variable defaults or config templates
21
22 ### Injection Vulnerabilities
23 - SQL injection (unsanitized user input in queries)
24 - Command injection (user input in shell commands)
25 - Path traversal (user input in file paths without validation)
26
27 ### Harmful Content
28 - Hate speech, slurs, or derogatory language targeting groups
29 - Content promoting violence or self-harm
30 - Sexually explicit content without appropriate context/gating
31
32 ### Deceptive Patterns
33 - Ungrounded factual claims presented as authoritative
34 - Hallucinated citations, references, or statistics
35 - Instructions that bypass AI safety guidelines or content filters
36
37 ## Advisory Concerns (🟡 — Flagged, Not Blocked)
38
39 These are recommendations. Work proceeds with suggestions attached.
40
41 ### Privacy & Data
42 - PII (names, emails, phone numbers) in logs or responses
43 - Overly broad data collection without stated purpose
44 - Missing data retention or deletion policies
45
46 ### Bias & Fairness
47 - Algorithms using demographic features (age, gender, race) without justification
48 - Proxy attributes that correlate with protected characteristics
49 - Training data with known representation gaps
50
51 ### Inclusive Language
52 - Gendered terms where neutral alternatives exist (e.g., "guys" → "everyone")
53 - Ableist language (e.g., "blind spot" → "oversight", "sanity check" → "validation")
54 - Culturally assumptive terms (e.g., assuming Western holidays, naming conventions)
55
56 ### Security Posture
57 - Missing rate limiting on user-facing endpoints
58 - Overly permissive CORS or authentication policies
59 - Insufficient input validation on public interfaces
60
61 ### Accessibility
62 - Missing alt text on images
63 - Insufficient color contrast
64 - Missing ARIA labels on interactive elements
65
66 ## Terminology Standards
67
68 | Avoid | Prefer | Reason |
69 |-------|--------|--------|
70 | whitelist/blacklist | allowlist/blocklist | Racial connotation |
71 | master/slave | primary/replica | Racial connotation |
72 | sanity check | validation, smoke test | Ableist |
73 | dummy value | placeholder, sample | Potentially offensive |
74 | guys | everyone, team, folks | Gendered |
75 | man-hours | person-hours, effort | Gendered |
76
77 ## Review Scope by Change Type
78
79 | Change Type | Review Level | Rationale |
80 |-------------|-------------|-----------|
81 | Source code (new features) | Full check suite | Highest risk surface |
82 | Source code (bug fixes) | Credential + injection checks | Targeted risk |
83 | Documentation | Content + terminology only | Lower risk |
84 | Test files | Credential checks only | Minimal risk |
85 | Dependency updates | Skip (fast-path) | No authored content |
86 | Configuration | Credential checks only | Secret exposure risk |
87
88 ## Escalation Path
89
90 1. **🟢 Green** — No action needed. Work proceeds.
91 2. **🟡 Yellow** — Suggestions attached to work output. Author decides.
92 3. **🔴 Red** — Work blocked. Reviewer Rejection Protocol activates:
93 - Original author locked out of revision
94 - Rai recommends fix agent
95 - Rai provides pair-mode guidance during revision
96 - Re-review required before work can ship
97
98 ## Policy Updates
99
100 This policy evolves. Changes require:
101 - Justification logged to `.squad/rai/audit-trail.md`
102 - Team acknowledgment (via decisions inbox)
103 - No retroactive enforcement (new rules apply forward only)