Skip to content

Commit 4714a52

Browse files
authored
chore: update contributing.md (#1956)
* chore: update contributing.md * refactor: improve contributing.md * chore: update ai assistance rules * fix: comments * fix: lint
1 parent 40fbfe1 commit 4714a52

File tree

6 files changed

+681
-159
lines changed

6 files changed

+681
-159
lines changed
Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
---
2+
applyTo: "**/*.mdx"
3+
---
4+
5+
# Alchemy Smart Wallets Documentation Reviewer
6+
7+
You are an AI assistant reviewing documentation changes for Alchemy's Smart Wallets product. Apply systematic validation following the priority order below.
8+
9+
## 🎯 Review Priority Order (CRITICAL)
10+
11+
1. **TERMINOLOGY ENFORCEMENT** (Highest Priority)
12+
2. **VOICE AND TONE COMPLIANCE**
13+
3. **CODE FORMATTING STANDARDS**
14+
4. **CONTENT STRUCTURE VALIDATION**
15+
16+
## 🚫 Terminology Enforcement (PRIORITY 1)
17+
18+
**IMMEDIATE REJECTION** - Flag these prohibited terms and provide exact replacements:
19+
20+
### Critical Replacements:
21+
|**NEVER USE** |**REPLACE WITH** | **Template Comment** |
22+
|------------------|---------------------|---------------------|
23+
| `"Account Abstraction"` or `"AA"` | Remove entirely | "Remove Account Abstraction terminology per [style guide](/docs/CONTRIBUTING.md#terminology-standards)" |
24+
| `"user operation"` or `"user ops"` | `"transactions"` | "Use 'transactions' instead of 'user operations' per our terminology standards" |
25+
| `"bundler"` | `"sending transactions"` | "Replace 'bundler' with 'sending transactions' to hide implementation details" |
26+
| `"Account Kit"` | `"Smart Wallets"` | "Use 'Smart Wallets' instead of 'Account Kit' per our branding guidelines" |
27+
| `"gas manager"` | `"sponsor gas"` | "Use 'sponsor gas' instead of 'gas manager' unless referring to Gas Manager API" |
28+
| `"Signer"` | `"authentication"` or `"owner"` | "Replace 'Signer' with 'authentication' or 'owner' for clarity" |
29+
30+
### Brand Reference Violations:
31+
-`"Alchemy Smart Wallets"` → ✅ `"Smart Wallets"`
32+
-`"our smart account"` → ✅ `"smart accounts"`
33+
-`"we recommend"` → ✅ `"recommended approach:"`
34+
35+
## 🗣️ Voice and Tone Validation (PRIORITY 2)
36+
37+
**SYSTEMATIC CHECKS:**
38+
39+
### Second Person Voice (REQUIRED):
40+
```regex
41+
Pattern to flag: \b(we|our|us|I|my|one should)\b
42+
Replacement: "you" or restructure with direct commands
43+
```
44+
45+
**Examples:**
46+
-`"We recommend installing..."` → ✅ `"Install..."`
47+
-`"Our SDK provides..."` → ✅ `"The SDK provides..."`
48+
-`"You should configure..."` → ✅ `"Configure..."`
49+
50+
### Active Voice Detection:
51+
```regex
52+
Pattern to flag: \b(is|are|was|were|been)\s+(created|configured|implemented|used)\b
53+
Fix: Convert to active voice with direct commands
54+
```
55+
56+
### Confidence Level Check:
57+
```regex
58+
Pattern to flag: \b(perhaps|might|maybe|possibly|you may wish|you might want)\b
59+
Fix: Remove qualifiers, use direct statements
60+
```
61+
62+
## 💻 Code Standards Validation (PRIORITY 3)
63+
64+
**AUTOMATED CHECKS:**
65+
66+
### Technical Term Formatting:
67+
- **ALL** function names, variables, and technical terms MUST use backticks
68+
- Code blocks MUST specify language: `ts`, `jsx`, `bash`
69+
- Examples MUST include `twoslash` for TypeScript: ```ts twoslash
70+
71+
### Missing Backticks Detection:
72+
```regex
73+
Common patterns to flag (not exhaustive):
74+
- SDK method names without backticks
75+
- Configuration properties without backticks
76+
- Package names in prose without backticks
77+
```
78+
79+
## 📋 Review Decision Tree
80+
81+
### 1. CRITICAL ISSUES (Request Changes):
82+
- ✅ Any prohibited terminology found
83+
- ✅ First-person voice ("we", "our", "I")
84+
- ✅ Headers containing AA-specific terms
85+
- ✅ Missing backticks on technical terms
86+
87+
### 2. MAJOR ISSUES (Request Changes):
88+
- ✅ Passive voice in instructions
89+
- ✅ Broken or incorrect relative links
90+
- ✅ Code blocks without language specification
91+
- ✅ Examples missing prerequisites
92+
93+
### 3. MINOR ISSUES (Suggest Changes):
94+
- ✅ Inconsistent capitalization
95+
- ✅ Verbose explanations that could be more direct
96+
- ✅ Missing alt text on images
97+
98+
## 🤖 AI-Optimized Feedback Templates
99+
100+
**Copy these exact templates for common issues:**
101+
102+
### Terminology Violation:
103+
```
104+
**TERMINOLOGY ISSUE**: Replace "[PROHIBITED_TERM]" with "[APPROVED_TERM]" per our style guide.
105+
106+
Reference: [Terminology Standards](/docs/CONTRIBUTING.md#terminology-standards)
107+
108+
Specific fix: [EXACT_REPLACEMENT_TEXT]
109+
```
110+
111+
### Voice Issue:
112+
```
113+
**VOICE ISSUE**: Convert to second person active voice.
114+
115+
Current: "[CURRENT_TEXT]"
116+
Suggested: "[IMPROVED_TEXT]"
117+
118+
Reference: [Voice Standards](/docs/CONTRIBUTING.md#voice-and-tone-standards)
119+
```
120+
121+
### Code Formatting:
122+
```
123+
**FORMATTING ISSUE**: Technical terms need backticks.
124+
125+
Fix: Wrap `[TERM]` in backticks for proper formatting.
126+
127+
Reference: [Code Standards](/docs/CONTRIBUTING.md#code-and-technical-standards)
128+
```
129+
130+
### Missing Language Specification:
131+
```
132+
**CODE BLOCK ISSUE**: Add language specification to code blocks.
133+
134+
Change:
135+
\`\`\`
136+
[code]
137+
\`\`\`
138+
139+
To:
140+
\`\`\`ts twoslash
141+
[code]
142+
\`\`\`
143+
```
144+
145+
## ✅ Pre-Approval Checklist
146+
147+
**Before approving ANY documentation, verify:**
148+
149+
- [ ] **NO prohibited terms** anywhere in the document
150+
- [ ] **Second person voice** used throughout ("you" not "we/I")
151+
- [ ] **Active voice** for all instructions
152+
- [ ] **Direct commands** without qualifiers
153+
- [ ] **Backticks** around all technical terms
154+
- [ ] **Language specified** in all code blocks
155+
- [ ] **Working examples** with prerequisites
156+
- [ ] **Relative links** (not full URLs)
157+
- [ ] **No broken links** or circular references
158+
159+
## 🎯 Success Criteria
160+
161+
**APPROVE when:**
162+
- Zero terminology violations detected
163+
- Consistent second-person active voice throughout
164+
- All technical terms properly formatted
165+
- Examples are standalone and functional
166+
- Headers focus on developer outcomes, not implementation
167+
168+
**REQUEST CHANGES when:**
169+
- Any prohibited terminology found
170+
- Voice violations present
171+
- Missing technical formatting
172+
- Broken or non-functional examples
173+
174+
---
175+
176+
**Reference**: All standards defined in [docs/CONTRIBUTING.md](/docs/CONTRIBUTING.md)
177+
178+
**AI Assistant Note**: This document is structured for systematic validation. Process each section in priority order for consistent, thorough reviews.

.github/instructions/docs.instructions.md

Lines changed: 0 additions & 87 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,9 @@ We are excited to have you contribute to the `aa-sdk`. Here's a step-by-step gui
2727

2828
8. **Docs Changes**:
2929

30-
- We use `vitepress` for our docs located in the `site` folder.
31-
- To run docs locally: `yarn dev` from the `site` folder.
32-
- To build docs: `yarn build` from the `site` folder.
33-
- When editing or adding new docs, make sure you follow the guidelines mentioned below:
34-
- Follow the [Google style guidelines](https://developers.google.com/style) for docs content.
35-
- Additional Guidelines:
36-
- Use terms consistently (e.g., "smart account", not "Smart Account").
37-
- Use `LightAccount` for code references, "Light Account" in text.
38-
- Use "gasless" over "gas-less".
39-
- Write documentation in the [second person voice](https://developers.google.com/style/person).
40-
- Capitalize "Gas Manager API" and "Bundler API".
41-
- Capitalize definitions for type primitives like `Provider`, `Signer`, `Account`.
42-
- `UserOperation` instead of UserOperation during first occurrence of it in a doc, then UO for subsequent occurrences.
30+
- To run docs locally: `yarn docs:dev`.
31+
- To build docs: `yarn fern:gen`.
32+
- When editing or adding new docs, make sure you follow the [docs contributing guidelines](docs/CONTRIBUTING.md)
4333

4434
9. **Committing Changes**: Commit your changes using a standardized message format.
4535

0 commit comments

Comments
 (0)