myconvergio 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/business_operations/andrea-customer-success-manager.md +175 -0
- package/.claude/agents/business_operations/anna-executive-assistant.md +268 -0
- package/.claude/agents/business_operations/dave-change-management-specialist.md +200 -0
- package/.claude/agents/business_operations/davide-project-manager.md +203 -0
- package/.claude/agents/business_operations/enrico-business-process-engineer.md +180 -0
- package/.claude/agents/business_operations/fabio-sales-business-development.md +175 -0
- package/.claude/agents/business_operations/luke-program-manager.md +105 -0
- package/.claude/agents/business_operations/marcello-pm.md +130 -0
- package/.claude/agents/business_operations/oliver-pm.md +134 -0
- package/.claude/agents/business_operations/sofia-marketing-strategist.md +175 -0
- package/.claude/agents/business_operations/steve-executive-communication-strategist.md +111 -0
- package/.claude/agents/compliance_legal/dr-enzo-healthcare-compliance-manager.md +198 -0
- package/.claude/agents/compliance_legal/elena-legal-compliance-expert.md +169 -0
- package/.claude/agents/compliance_legal/guardian-ai-security-validator.md +207 -0
- package/.claude/agents/compliance_legal/luca-security-expert.md +229 -0
- package/.claude/agents/compliance_legal/sophia-govaffairs.md +132 -0
- package/.claude/agents/core_utility/CONSTITUTION.md +365 -0
- package/.claude/agents/core_utility/CommonValuesAndPrinciples.md +296 -0
- package/.claude/agents/core_utility/MICROSOFT_VALUES.md +121 -0
- package/.claude/agents/core_utility/SECURITY_FRAMEWORK_TEMPLATE.md +137 -0
- package/.claude/agents/core_utility/diana-performance-dashboard.md +238 -0
- package/.claude/agents/core_utility/marcus-context-memory-keeper.md +218 -0
- package/.claude/agents/core_utility/po-prompt-optimizer.md +194 -0
- package/.claude/agents/core_utility/socrates-first-principles-reasoning.md +260 -0
- package/.claude/agents/core_utility/strategic-planner.md +292 -0
- package/.claude/agents/core_utility/taskmaster-strategic-task-decomposition-master.md +152 -0
- package/.claude/agents/core_utility/thor-quality-assurance-guardian.md +223 -0
- package/.claude/agents/core_utility/wanda-workflow-orchestrator.md +247 -0
- package/.claude/agents/core_utility/xavier-coordination-patterns.md +251 -0
- package/.claude/agents/design_ux/jony-creative-director.md +172 -0
- package/.claude/agents/design_ux/sara-ux-ui-designer.md +166 -0
- package/.claude/agents/design_ux/stefano-design-thinking-facilitator.md +180 -0
- package/.claude/agents/leadership_strategy/ali-chief-of-staff.md +594 -0
- package/.claude/agents/leadership_strategy/amy-cfo.md +179 -0
- package/.claude/agents/leadership_strategy/antonio-strategy-expert.md +217 -0
- package/.claude/agents/leadership_strategy/dan-engineering-gm.md +260 -0
- package/.claude/agents/leadership_strategy/domik-mckinsey-strategic-decision-maker.md +324 -0
- package/.claude/agents/leadership_strategy/matteo-strategic-business-architect.md +177 -0
- package/.claude/agents/leadership_strategy/satya-board-of-directors.md +222 -0
- package/.claude/agents/release_management/app-release-manager.md +2352 -0
- package/.claude/agents/release_management/feature-release-manager.md +235 -0
- package/.claude/agents/specialized_experts/angela-da.md +140 -0
- package/.claude/agents/specialized_experts/ava-analytics-insights-virtuoso.md +203 -0
- package/.claude/agents/specialized_experts/behice-cultural-coach.md +202 -0
- package/.claude/agents/specialized_experts/coach-team-coach.md +180 -0
- package/.claude/agents/specialized_experts/ethan-da.md +139 -0
- package/.claude/agents/specialized_experts/evan-ic6da.md +140 -0
- package/.claude/agents/specialized_experts/fiona-market-analyst.md +148 -0
- package/.claude/agents/specialized_experts/giulia-hr-talent-acquisition.md +175 -0
- package/.claude/agents/specialized_experts/jenny-inclusive-accessibility-champion.md +200 -0
- package/.claude/agents/specialized_experts/michael-vc.md +130 -0
- package/.claude/agents/specialized_experts/riccardo-storyteller.md +158 -0
- package/.claude/agents/specialized_experts/sam-startupper.md +253 -0
- package/.claude/agents/specialized_experts/wiz-investor-venture-capital.md +182 -0
- package/.claude/agents/technical_development/baccio-tech-architect.md +210 -0
- package/.claude/agents/technical_development/dario-debugger.md +250 -0
- package/.claude/agents/technical_development/marco-devops-engineer.md +200 -0
- package/.claude/agents/technical_development/omri-data-scientist.md +194 -0
- package/.claude/agents/technical_development/otto-performance-optimizer.md +262 -0
- package/.claude/agents/technical_development/paolo-best-practices-enforcer.md +303 -0
- package/.claude/agents/technical_development/rex-code-reviewer.md +231 -0
- package/.claude/rules/api-development.md +358 -0
- package/.claude/rules/code-style.md +129 -0
- package/.claude/rules/documentation-standards.md +359 -0
- package/.claude/rules/ethical-guidelines.md +383 -0
- package/.claude/rules/security-requirements.md +182 -0
- package/.claude/rules/testing-standards.md +266 -0
- package/.claude/skills/architecture/SKILL.md +228 -0
- package/.claude/skills/code-review/SKILL.md +140 -0
- package/.claude/skills/debugging/SKILL.md +192 -0
- package/.claude/skills/performance/SKILL.md +277 -0
- package/.claude/skills/project-management/SKILL.md +382 -0
- package/.claude/skills/release-management/SKILL.md +342 -0
- package/.claude/skills/security-audit/SKILL.md +276 -0
- package/.claude/skills/strategic-analysis/SKILL.md +338 -0
- package/LICENSE +60 -0
- package/README.md +379 -0
- package/VERSION +29 -0
- package/bin/myconvergio.js +304 -0
- package/package.json +43 -0
- package/scripts/bump-agent-version.sh +220 -0
- package/scripts/postinstall.js +172 -0
- package/scripts/sync-from-convergiocli.sh +169 -0
- package/scripts/test-deployment.sh +188 -0
- package/scripts/version-manager.sh +213 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# Code Style Standards
|
|
2
|
+
|
|
3
|
+
> This rule is enforced by the MyConvergio agent ecosystem.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
Consistent code formatting and style standards across all languages in the MyConvergio ecosystem. These standards ensure readability, maintainability, and team collaboration efficiency.
|
|
7
|
+
|
|
8
|
+
## Requirements
|
|
9
|
+
|
|
10
|
+
### TypeScript/JavaScript
|
|
11
|
+
- Use ESLint with Prettier for automated formatting
|
|
12
|
+
- Prefer `const` over `let`, never use `var`
|
|
13
|
+
- Use arrow functions for callbacks and short functions
|
|
14
|
+
- Maximum line length: 100 characters
|
|
15
|
+
- Use camelCase for variables and functions
|
|
16
|
+
- Use PascalCase for classes and React components
|
|
17
|
+
- Use UPPER_SNAKE_CASE for constants
|
|
18
|
+
- Use async/await over callbacks and raw Promises
|
|
19
|
+
- Always use semicolons
|
|
20
|
+
- Use single quotes for strings (except when avoiding escapes)
|
|
21
|
+
- Trailing commas in multiline arrays and objects
|
|
22
|
+
|
|
23
|
+
### Python
|
|
24
|
+
- Follow PEP 8 style guide
|
|
25
|
+
- Use Black formatter with default settings
|
|
26
|
+
- Maximum line length: 100 characters
|
|
27
|
+
- Use snake_case for functions and variables
|
|
28
|
+
- Use PascalCase for classes
|
|
29
|
+
- Use UPPER_SNAKE_CASE for constants
|
|
30
|
+
- Type hints required for all public functions
|
|
31
|
+
- Docstrings required for all public modules, classes, and functions
|
|
32
|
+
- Use f-strings for string formatting
|
|
33
|
+
- Prefer list comprehensions over map/filter where readable
|
|
34
|
+
|
|
35
|
+
### General Principles
|
|
36
|
+
- Meaningful variable names (no single letters except `i`, `j`, `k` for loop counters)
|
|
37
|
+
- Function names should be verbs describing what they do
|
|
38
|
+
- Class names should be nouns describing what they represent
|
|
39
|
+
- Constants should clearly indicate their purpose
|
|
40
|
+
- Avoid magic numbers - use named constants
|
|
41
|
+
- Keep functions small and focused (single responsibility)
|
|
42
|
+
- DRY principle: Don't Repeat Yourself
|
|
43
|
+
- Comments explain "why", not "what"
|
|
44
|
+
|
|
45
|
+
## Examples
|
|
46
|
+
|
|
47
|
+
### Good Examples
|
|
48
|
+
|
|
49
|
+
#### TypeScript/JavaScript
|
|
50
|
+
```typescript
|
|
51
|
+
// Good: Meaningful names, const, async/await
|
|
52
|
+
const getUserProfile = async (userId: string): Promise<UserProfile> => {
|
|
53
|
+
const response = await fetch(`/api/users/${userId}`);
|
|
54
|
+
if (!response.ok) {
|
|
55
|
+
throw new Error(`Failed to fetch user: ${response.status}`);
|
|
56
|
+
}
|
|
57
|
+
return response.json();
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
// Good: Named constant
|
|
61
|
+
const MAX_RETRY_ATTEMPTS = 3;
|
|
62
|
+
const API_TIMEOUT_MS = 5000;
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
#### Python
|
|
66
|
+
```python
|
|
67
|
+
# Good: Type hints, meaningful names, snake_case
|
|
68
|
+
def calculate_total_price(items: list[Item], discount_rate: float) -> float:
|
|
69
|
+
"""Calculate total price with discount applied.
|
|
70
|
+
|
|
71
|
+
Args:
|
|
72
|
+
items: List of items to price
|
|
73
|
+
discount_rate: Discount as decimal (0.1 = 10%)
|
|
74
|
+
|
|
75
|
+
Returns:
|
|
76
|
+
Total price after discount
|
|
77
|
+
"""
|
|
78
|
+
subtotal = sum(item.price for item in items)
|
|
79
|
+
return subtotal * (1 - discount_rate)
|
|
80
|
+
|
|
81
|
+
# Good: Named constant
|
|
82
|
+
MAX_FILE_SIZE_MB = 10
|
|
83
|
+
DEFAULT_TIMEOUT_SECONDS = 30
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Bad Examples
|
|
87
|
+
|
|
88
|
+
#### TypeScript/JavaScript
|
|
89
|
+
```javascript
|
|
90
|
+
// Bad: var, single letter variable, no async/await
|
|
91
|
+
var u = function(id, cb) {
|
|
92
|
+
fetch('/api/users/' + id).then(function(r) {
|
|
93
|
+
r.json().then(function(d) {
|
|
94
|
+
cb(d);
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
// Bad: Magic numbers, unclear names
|
|
100
|
+
function process(x) {
|
|
101
|
+
if (x > 100) {
|
|
102
|
+
return x * 0.9;
|
|
103
|
+
}
|
|
104
|
+
return x;
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
#### Python
|
|
109
|
+
```python
|
|
110
|
+
# Bad: No type hints, camelCase in Python, no docstring
|
|
111
|
+
def processData(d):
|
|
112
|
+
r = []
|
|
113
|
+
for x in d:
|
|
114
|
+
if x > 100: # Magic number
|
|
115
|
+
r.append(x * 0.9) # Magic number
|
|
116
|
+
return r
|
|
117
|
+
|
|
118
|
+
# Bad: Single letter variables, unclear purpose
|
|
119
|
+
def calc(a, b, c):
|
|
120
|
+
return a + b - c
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## References
|
|
124
|
+
- [TypeScript Style Guide](https://google.github.io/styleguide/tsguide.html)
|
|
125
|
+
- [Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript)
|
|
126
|
+
- [PEP 8 - Python Style Guide](https://peps.python.org/pep-0008/)
|
|
127
|
+
- [Black - Python Code Formatter](https://black.readthedocs.io/)
|
|
128
|
+
- [Prettier - Code Formatter](https://prettier.io/)
|
|
129
|
+
- [Clean Code by Robert C. Martin](https://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882)
|
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
# Documentation Standards
|
|
2
|
+
|
|
3
|
+
> This rule is enforced by the MyConvergio agent ecosystem.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
Clear, comprehensive documentation is essential for maintainability, knowledge transfer, and team collaboration. All code in the MyConvergio ecosystem must include appropriate documentation at multiple levels, from inline comments to architectural decision records.
|
|
7
|
+
|
|
8
|
+
## Requirements
|
|
9
|
+
|
|
10
|
+
### Code Documentation
|
|
11
|
+
- JSDoc (TypeScript/JavaScript) or docstrings (Python) required for all public APIs
|
|
12
|
+
- Document function parameters, return types, and exceptions
|
|
13
|
+
- Include usage examples for complex functions
|
|
14
|
+
- Document class purposes and responsibilities
|
|
15
|
+
- Explain "why" in comments, not "what" (code should be self-documenting)
|
|
16
|
+
|
|
17
|
+
### Module Documentation
|
|
18
|
+
- Every module/package must have a README.md
|
|
19
|
+
- Explain module purpose and responsibilities
|
|
20
|
+
- Document public APIs and exports
|
|
21
|
+
- Include usage examples
|
|
22
|
+
- List dependencies and prerequisites
|
|
23
|
+
- Provide installation/setup instructions
|
|
24
|
+
|
|
25
|
+
### API Documentation
|
|
26
|
+
- Document all REST endpoints (method, path, parameters, responses)
|
|
27
|
+
- Use OpenAPI/Swagger specification for REST APIs
|
|
28
|
+
- Include example requests and responses
|
|
29
|
+
- Document error codes and their meanings
|
|
30
|
+
- Specify authentication requirements
|
|
31
|
+
- Version API documentation with the API
|
|
32
|
+
|
|
33
|
+
### Architectural Decision Records (ADRs)
|
|
34
|
+
- Document all significant architectural decisions
|
|
35
|
+
- Use ADR format: Context, Decision, Consequences
|
|
36
|
+
- Store in `/docs/adr/` directory
|
|
37
|
+
- Number ADRs sequentially (0001-title.md)
|
|
38
|
+
- Link related ADRs
|
|
39
|
+
- Update when decisions are superseded
|
|
40
|
+
|
|
41
|
+
### Changelog Maintenance
|
|
42
|
+
- Keep CHANGELOG.md updated with all releases
|
|
43
|
+
- Follow Keep a Changelog format
|
|
44
|
+
- Group changes by type: Added, Changed, Deprecated, Removed, Fixed, Security
|
|
45
|
+
- Include version numbers and dates
|
|
46
|
+
- Reference issue/PR numbers
|
|
47
|
+
|
|
48
|
+
### Comments Guidelines
|
|
49
|
+
- Comments explain "why", not "what"
|
|
50
|
+
- Avoid comments that restate the code
|
|
51
|
+
- Update comments when code changes
|
|
52
|
+
- Remove commented-out code (use version control)
|
|
53
|
+
- Use TODO comments sparingly and track them
|
|
54
|
+
- Mark complex algorithms with explanations
|
|
55
|
+
|
|
56
|
+
### Diagrams and Visuals
|
|
57
|
+
- Include architecture diagrams for complex systems
|
|
58
|
+
- Use consistent notation (C4, UML, or informal)
|
|
59
|
+
- Keep diagrams up to date with code
|
|
60
|
+
- Store diagrams as code when possible (Mermaid, PlantUML)
|
|
61
|
+
|
|
62
|
+
### README Standards
|
|
63
|
+
- Every repository needs a comprehensive README
|
|
64
|
+
- Include: project description, prerequisites, installation, usage, contributing guidelines
|
|
65
|
+
- Add badges for build status, coverage, version
|
|
66
|
+
- Link to detailed documentation
|
|
67
|
+
- Provide quick-start examples
|
|
68
|
+
|
|
69
|
+
## Examples
|
|
70
|
+
|
|
71
|
+
### Good Examples
|
|
72
|
+
|
|
73
|
+
#### JSDoc (TypeScript)
|
|
74
|
+
```typescript
|
|
75
|
+
/**
|
|
76
|
+
* Calculates the total price after applying discount and tax.
|
|
77
|
+
*
|
|
78
|
+
* @param items - Array of items to price
|
|
79
|
+
* @param discountRate - Discount as decimal (0.1 = 10% off)
|
|
80
|
+
* @param taxRate - Tax rate as decimal (0.08 = 8% tax)
|
|
81
|
+
* @returns Total price including discount and tax
|
|
82
|
+
* @throws {ValidationError} If discount or tax rate is negative
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```typescript
|
|
86
|
+
* const items = [{ price: 10 }, { price: 20 }];
|
|
87
|
+
* const total = calculateTotal(items, 0.1, 0.08);
|
|
88
|
+
* // Returns: 29.16 (30 - 10% discount + 8% tax)
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
export function calculateTotal(
|
|
92
|
+
items: Item[],
|
|
93
|
+
discountRate: number,
|
|
94
|
+
taxRate: number
|
|
95
|
+
): number {
|
|
96
|
+
if (discountRate < 0 || taxRate < 0) {
|
|
97
|
+
throw new ValidationError('Rates cannot be negative');
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const subtotal = items.reduce((sum, item) => sum + item.price, 0);
|
|
101
|
+
const afterDiscount = subtotal * (1 - discountRate);
|
|
102
|
+
return afterDiscount * (1 + taxRate);
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
#### Python Docstring
|
|
107
|
+
```python
|
|
108
|
+
def process_payment(
|
|
109
|
+
amount: Decimal,
|
|
110
|
+
payment_method: PaymentMethod,
|
|
111
|
+
user_id: str
|
|
112
|
+
) -> PaymentResult:
|
|
113
|
+
"""Process a payment transaction for a user.
|
|
114
|
+
|
|
115
|
+
This function handles payment processing through various payment methods,
|
|
116
|
+
including credit cards, PayPal, and bank transfers. It validates the
|
|
117
|
+
payment, processes it through the appropriate gateway, and records the
|
|
118
|
+
transaction in the database.
|
|
119
|
+
|
|
120
|
+
Args:
|
|
121
|
+
amount: Payment amount in USD (must be positive)
|
|
122
|
+
payment_method: Payment method configuration with credentials
|
|
123
|
+
user_id: ID of the user making the payment
|
|
124
|
+
|
|
125
|
+
Returns:
|
|
126
|
+
PaymentResult containing transaction ID, status, and receipt URL
|
|
127
|
+
|
|
128
|
+
Raises:
|
|
129
|
+
ValidationError: If amount is invalid or payment method is not configured
|
|
130
|
+
PaymentGatewayError: If payment gateway rejects the transaction
|
|
131
|
+
InsufficientFundsError: If user account has insufficient balance
|
|
132
|
+
|
|
133
|
+
Example:
|
|
134
|
+
>>> method = PaymentMethod(type='credit_card', token='tok_visa')
|
|
135
|
+
>>> result = process_payment(Decimal('99.99'), method, 'user_123')
|
|
136
|
+
>>> print(result.transaction_id)
|
|
137
|
+
'txn_abc123'
|
|
138
|
+
|
|
139
|
+
Note:
|
|
140
|
+
This function is idempotent - duplicate calls with the same parameters
|
|
141
|
+
will return the same transaction without charging twice.
|
|
142
|
+
"""
|
|
143
|
+
# Implementation...
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
#### Architectural Decision Record
|
|
147
|
+
```markdown
|
|
148
|
+
# ADR 0003: Use PostgreSQL with JSONB for Document Storage
|
|
149
|
+
|
|
150
|
+
## Status
|
|
151
|
+
Accepted
|
|
152
|
+
|
|
153
|
+
## Context
|
|
154
|
+
We need to store semi-structured product data that varies significantly between
|
|
155
|
+
product categories. Some products have 5 attributes, others have 50+. The schema
|
|
156
|
+
needs to be flexible while maintaining query performance.
|
|
157
|
+
|
|
158
|
+
Options considered:
|
|
159
|
+
1. MongoDB - NoSQL document store
|
|
160
|
+
2. PostgreSQL with JSONB columns
|
|
161
|
+
3. DynamoDB - AWS managed NoSQL
|
|
162
|
+
4. Traditional normalized PostgreSQL schema
|
|
163
|
+
|
|
164
|
+
## Decision
|
|
165
|
+
We will use PostgreSQL with JSONB columns for product attributes while keeping
|
|
166
|
+
core fields (id, name, price) in regular columns.
|
|
167
|
+
|
|
168
|
+
Rationale:
|
|
169
|
+
- JSONB provides flexible schema for varying attributes
|
|
170
|
+
- Strong indexing and query capabilities for JSON data
|
|
171
|
+
- Maintains ACID guarantees unlike MongoDB
|
|
172
|
+
- Team has existing PostgreSQL expertise
|
|
173
|
+
- Avoids vendor lock-in with AWS-specific solution
|
|
174
|
+
- Can use SQL for complex queries across structured and unstructured data
|
|
175
|
+
|
|
176
|
+
## Consequences
|
|
177
|
+
|
|
178
|
+
### Positive
|
|
179
|
+
- Single database technology (PostgreSQL) reduces operational complexity
|
|
180
|
+
- JSONB indexing provides good query performance
|
|
181
|
+
- Schema flexibility for product attributes
|
|
182
|
+
- Strong consistency guarantees
|
|
183
|
+
- Familiar SQL query language
|
|
184
|
+
|
|
185
|
+
### Negative
|
|
186
|
+
- JSONB queries are less performant than indexed columns
|
|
187
|
+
- Limited to PostgreSQL-specific features (not portable to MySQL)
|
|
188
|
+
- Larger storage footprint than normalized tables
|
|
189
|
+
- Need to educate team on JSONB best practices
|
|
190
|
+
|
|
191
|
+
## References
|
|
192
|
+
- [PostgreSQL JSONB Documentation](https://www.postgresql.org/docs/current/datatype-json.html)
|
|
193
|
+
- [JSONB Performance Benchmarks](internal-link)
|
|
194
|
+
- Related ADRs: #0001 (Database Selection), #0002 (Product Catalog Design)
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
#### API Documentation (OpenAPI)
|
|
198
|
+
```yaml
|
|
199
|
+
# Good: Complete endpoint documentation
|
|
200
|
+
/api/users/{userId}/profile:
|
|
201
|
+
get:
|
|
202
|
+
summary: Get user profile
|
|
203
|
+
description: Retrieves detailed profile information for a specific user
|
|
204
|
+
parameters:
|
|
205
|
+
- name: userId
|
|
206
|
+
in: path
|
|
207
|
+
required: true
|
|
208
|
+
schema:
|
|
209
|
+
type: string
|
|
210
|
+
format: uuid
|
|
211
|
+
description: Unique identifier for the user
|
|
212
|
+
responses:
|
|
213
|
+
200:
|
|
214
|
+
description: User profile retrieved successfully
|
|
215
|
+
content:
|
|
216
|
+
application/json:
|
|
217
|
+
schema:
|
|
218
|
+
$ref: '#/components/schemas/UserProfile'
|
|
219
|
+
example:
|
|
220
|
+
id: "123e4567-e89b-12d3-a456-426614174000"
|
|
221
|
+
email: "user@example.com"
|
|
222
|
+
name: "John Doe"
|
|
223
|
+
createdAt: "2025-01-15T10:30:00Z"
|
|
224
|
+
404:
|
|
225
|
+
description: User not found
|
|
226
|
+
content:
|
|
227
|
+
application/json:
|
|
228
|
+
schema:
|
|
229
|
+
$ref: '#/components/schemas/Error'
|
|
230
|
+
401:
|
|
231
|
+
description: Unauthorized - authentication required
|
|
232
|
+
security:
|
|
233
|
+
- bearerAuth: []
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
#### README Example
|
|
237
|
+
```markdown
|
|
238
|
+
# MyConvergio Payment Service
|
|
239
|
+
|
|
240
|
+
High-performance payment processing microservice for the MyConvergio ecosystem.
|
|
241
|
+
|
|
242
|
+
[](https://github.com/myconvergio/payment-service/actions)
|
|
243
|
+
[](https://codecov.io/gh/myconvergio/payment-service)
|
|
244
|
+
[](https://www.npmjs.com/package/@myconvergio/payment-service)
|
|
245
|
+
|
|
246
|
+
## Features
|
|
247
|
+
- Multi-gateway support (Stripe, PayPal, Square)
|
|
248
|
+
- PCI-DSS compliant tokenization
|
|
249
|
+
- Automatic retry with exponential backoff
|
|
250
|
+
- Real-time webhook processing
|
|
251
|
+
- Comprehensive audit logging
|
|
252
|
+
|
|
253
|
+
## Prerequisites
|
|
254
|
+
- Node.js 18+
|
|
255
|
+
- PostgreSQL 14+
|
|
256
|
+
- Redis 6+ (for job queue)
|
|
257
|
+
|
|
258
|
+
## Quick Start
|
|
259
|
+
|
|
260
|
+
bash
|
|
261
|
+
# Install dependencies
|
|
262
|
+
npm install
|
|
263
|
+
|
|
264
|
+
# Configure environment
|
|
265
|
+
cp .env.example .env
|
|
266
|
+
# Edit .env with your settings
|
|
267
|
+
|
|
268
|
+
# Run migrations
|
|
269
|
+
npm run migrate
|
|
270
|
+
|
|
271
|
+
# Start development server
|
|
272
|
+
npm run dev
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
## Usage Example
|
|
276
|
+
|
|
277
|
+
typescript
|
|
278
|
+
import { PaymentService } from '@myconvergio/payment-service';
|
|
279
|
+
|
|
280
|
+
const service = new PaymentService({
|
|
281
|
+
apiKey: process.env.PAYMENT_API_KEY
|
|
282
|
+
});
|
|
283
|
+
|
|
284
|
+
const result = await service.processPayment({
|
|
285
|
+
amount: 1999, // cents
|
|
286
|
+
currency: 'USD',
|
|
287
|
+
paymentMethod: 'pm_card_visa',
|
|
288
|
+
customerId: 'cus_123'
|
|
289
|
+
});
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
## Documentation
|
|
293
|
+
- [API Reference](./docs/api.md)
|
|
294
|
+
- [Architecture Overview](./docs/architecture.md)
|
|
295
|
+
- [Deployment Guide](./docs/deployment.md)
|
|
296
|
+
|
|
297
|
+
## Contributing
|
|
298
|
+
See [CONTRIBUTING.md](./CONTRIBUTING.md)
|
|
299
|
+
|
|
300
|
+
## License
|
|
301
|
+
MIT
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
### Bad Examples
|
|
305
|
+
|
|
306
|
+
#### Poor JSDoc
|
|
307
|
+
```typescript
|
|
308
|
+
// Bad: States the obvious, no examples
|
|
309
|
+
/**
|
|
310
|
+
* Gets user.
|
|
311
|
+
* @param id user id
|
|
312
|
+
* @returns user
|
|
313
|
+
*/
|
|
314
|
+
function getUser(id: string): User {
|
|
315
|
+
// ...
|
|
316
|
+
}
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
#### Useless Comments
|
|
320
|
+
```typescript
|
|
321
|
+
// Bad: Comment restates the code
|
|
322
|
+
// Increment counter by 1
|
|
323
|
+
counter++;
|
|
324
|
+
|
|
325
|
+
// Bad: Commented-out code
|
|
326
|
+
// const oldImplementation = () => {
|
|
327
|
+
// return data.map(x => x.value);
|
|
328
|
+
// };
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
#### Missing Context
|
|
332
|
+
```python
|
|
333
|
+
# Bad: No explanation of complex logic
|
|
334
|
+
def process(data):
|
|
335
|
+
# Why this specific calculation?
|
|
336
|
+
result = sum(data) * 0.7 + 15
|
|
337
|
+
return result
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
#### Outdated Documentation
|
|
341
|
+
```typescript
|
|
342
|
+
/**
|
|
343
|
+
* Sends email to user
|
|
344
|
+
* @param email - User email address
|
|
345
|
+
*/
|
|
346
|
+
function notifyUser(userId: string, channel: NotificationChannel) {
|
|
347
|
+
// Function signature changed but docs didn't!
|
|
348
|
+
}
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
## References
|
|
352
|
+
- [JSDoc Documentation](https://jsdoc.app/)
|
|
353
|
+
- [Python Docstring Conventions (PEP 257)](https://peps.python.org/pep-0257/)
|
|
354
|
+
- [OpenAPI Specification](https://swagger.io/specification/)
|
|
355
|
+
- [Keep a Changelog](https://keepachangelog.com/)
|
|
356
|
+
- [Architectural Decision Records](https://adr.github.io/)
|
|
357
|
+
- [Writing Great Documentation](https://www.writethedocs.org/guide/)
|
|
358
|
+
- [Google Developer Documentation Style Guide](https://developers.google.com/style)
|
|
359
|
+
- [README Best Practices](https://github.com/matiassingers/awesome-readme)
|