mirror of
https://github.com/wshobson/agents.git
synced 2026-03-18 01:27:16 +00:00
fix(skills): remove phantom resource references and fix CoC links (#447)
Remove references to non-existent resource files (references/, assets/, scripts/, examples/) from 115 skill SKILL.md files. These sections pointed to directories and files that were never created, causing confusion when users install skills. Also fix broken Code of Conduct links in issue templates to use absolute GitHub URLs instead of relative paths that 404.
This commit is contained in:
2
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
2
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -20,7 +20,7 @@ body:
|
||||
label: Preliminary Checks
|
||||
description: Please confirm you have completed these steps
|
||||
options:
|
||||
- label: I have read the [Code of Conduct](.github/CODE_OF_CONDUCT.md)
|
||||
- label: I have read the [Code of Conduct](https://github.com/wshobson/agents/blob/main/.github/CODE_OF_CONDUCT.md)
|
||||
required: true
|
||||
- label: >-
|
||||
I have searched existing issues to ensure this is not a duplicate
|
||||
|
||||
2
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
2
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
@@ -19,7 +19,7 @@ body:
|
||||
label: Preliminary Checks
|
||||
description: Please confirm you have completed these steps
|
||||
options:
|
||||
- label: I have read the [Code of Conduct](.github/CODE_OF_CONDUCT.md)
|
||||
- label: I have read the [Code of Conduct](https://github.com/wshobson/agents/blob/main/.github/CODE_OF_CONDUCT.md)
|
||||
required: true
|
||||
- label: >-
|
||||
I have searched existing issues to ensure this is not a duplicate
|
||||
|
||||
2
.github/ISSUE_TEMPLATE/new_subagent.yml
vendored
2
.github/ISSUE_TEMPLATE/new_subagent.yml
vendored
@@ -20,7 +20,7 @@ body:
|
||||
label: Preliminary Checks
|
||||
description: Please confirm you have completed these steps
|
||||
options:
|
||||
- label: I have read the [Code of Conduct](.github/CODE_OF_CONDUCT.md)
|
||||
- label: I have read the [Code of Conduct](https://github.com/wshobson/agents/blob/main/.github/CODE_OF_CONDUCT.md)
|
||||
required: true
|
||||
- label: >-
|
||||
I have reviewed existing subagents to ensure this is not a duplicate
|
||||
|
||||
@@ -536,10 +536,3 @@ function logAccessibleName(element) {
|
||||
- **Don't test only happy path** - Test error states
|
||||
- **Don't skip dynamic content** - Most common issues
|
||||
- **Don't rely on visual testing** - Different experience
|
||||
|
||||
## Resources
|
||||
|
||||
- [VoiceOver User Guide](https://support.apple.com/guide/voiceover/welcome/mac)
|
||||
- [NVDA User Guide](https://www.nvaccess.org/files/nvda/documentation/userGuide.html)
|
||||
- [JAWS Documentation](https://support.freedomscientific.com/Products/Blindness/JAWS)
|
||||
- [WebAIM Screen Reader Survey](https://webaim.org/projects/screenreadersurvey/)
|
||||
|
||||
@@ -546,10 +546,3 @@ class AccessibleDropdown extends HTMLElement {
|
||||
- **Don't hide focus outlines** - Keyboard users need them
|
||||
- **Don't disable zoom** - Users need to resize
|
||||
- **Don't use color alone** - Multiple indicators needed
|
||||
|
||||
## Resources
|
||||
|
||||
- [WCAG 2.2 Guidelines](https://www.w3.org/TR/WCAG22/)
|
||||
- [WebAIM](https://webaim.org/)
|
||||
- [A11y Project Checklist](https://www.a11yproject.com/checklist/)
|
||||
- [axe DevTools](https://www.deque.com/axe/)
|
||||
|
||||
@@ -538,30 +538,3 @@ async def test_create_user(client):
|
||||
assert data["email"] == "test@example.com"
|
||||
assert "id" in data
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- **references/fastapi-architecture.md**: Detailed architecture guide
|
||||
- **references/async-best-practices.md**: Async/await patterns
|
||||
- **references/testing-strategies.md**: Comprehensive testing guide
|
||||
- **assets/project-template/**: Complete FastAPI project
|
||||
- **assets/docker-compose.yml**: Development environment setup
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. **Async All The Way**: Use async for database, external APIs
|
||||
2. **Dependency Injection**: Leverage FastAPI's DI system
|
||||
3. **Repository Pattern**: Separate data access from business logic
|
||||
4. **Service Layer**: Keep business logic out of routes
|
||||
5. **Pydantic Schemas**: Strong typing for request/response
|
||||
6. **Error Handling**: Consistent error responses
|
||||
7. **Testing**: Test all layers independently
|
||||
|
||||
## Common Pitfalls
|
||||
|
||||
- **Blocking Code in Async**: Using synchronous database drivers
|
||||
- **No Service Layer**: Business logic in route handlers
|
||||
- **Missing Type Hints**: Loses FastAPI's benefits
|
||||
- **Ignoring Sessions**: Not properly managing database sessions
|
||||
- **No Testing**: Skipping integration tests
|
||||
- **Tight Coupling**: Direct database access in routes
|
||||
|
||||
@@ -516,13 +516,3 @@ def create_context():
|
||||
- **Poor Documentation**: Undocumented APIs frustrate developers
|
||||
- **Ignoring HTTP Semantics**: POST for idempotent operations breaks expectations
|
||||
- **Tight Coupling**: API structure shouldn't mirror database schema
|
||||
|
||||
## Resources
|
||||
|
||||
- **references/rest-best-practices.md**: Comprehensive REST API design guide
|
||||
- **references/graphql-schema-design.md**: GraphQL schema patterns and anti-patterns
|
||||
- **references/api-versioning-strategies.md**: Versioning approaches and migration paths
|
||||
- **assets/rest-api-template.py**: FastAPI REST API template
|
||||
- **assets/graphql-schema-template.graphql**: Complete GraphQL schema example
|
||||
- **assets/api-design-checklist.md**: Pre-implementation review checklist
|
||||
- **scripts/openapi-generator.py**: Generate OpenAPI specs from code
|
||||
|
||||
@@ -464,31 +464,3 @@ class OrderRepository:
|
||||
await self._publish_events(order._events)
|
||||
order._events.clear()
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- **references/clean-architecture-guide.md**: Detailed layer breakdown
|
||||
- **references/hexagonal-architecture-guide.md**: Ports and adapters patterns
|
||||
- **references/ddd-tactical-patterns.md**: Entities, value objects, aggregates
|
||||
- **assets/clean-architecture-template/**: Complete project structure
|
||||
- **assets/ddd-examples/**: Domain modeling examples
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. **Dependency Rule**: Dependencies always point inward
|
||||
2. **Interface Segregation**: Small, focused interfaces
|
||||
3. **Business Logic in Domain**: Keep frameworks out of core
|
||||
4. **Test Independence**: Core testable without infrastructure
|
||||
5. **Bounded Contexts**: Clear domain boundaries
|
||||
6. **Ubiquitous Language**: Consistent terminology
|
||||
7. **Thin Controllers**: Delegate to use cases
|
||||
8. **Rich Domain Models**: Behavior with data
|
||||
|
||||
## Common Pitfalls
|
||||
|
||||
- **Anemic Domain**: Entities with only data, no behavior
|
||||
- **Framework Coupling**: Business logic depends on frameworks
|
||||
- **Fat Controllers**: Business logic in controllers
|
||||
- **Repository Leakage**: Exposing ORM objects
|
||||
- **Missing Abstractions**: Concrete dependencies in core
|
||||
- **Over-Engineering**: Clean architecture for simple CRUD
|
||||
|
||||
@@ -547,8 +547,3 @@ class ConsistentQueryHandler:
|
||||
- **Don't couple read/write schemas** - Independent evolution
|
||||
- **Don't over-engineer** - Start simple
|
||||
- **Don't ignore consistency SLAs** - Define acceptable lag
|
||||
|
||||
## Resources
|
||||
|
||||
- [CQRS Pattern](https://martinfowler.com/bliki/CQRS.html)
|
||||
- [Microsoft CQRS Guidance](https://docs.microsoft.com/en-us/azure/architecture/patterns/cqrs)
|
||||
|
||||
@@ -429,9 +429,3 @@ Capacity: On-demand or provisioned based on throughput needs
|
||||
- **Don't store large payloads** - Keep events small
|
||||
- **Don't skip optimistic concurrency** - Prevents data corruption
|
||||
- **Don't ignore backpressure** - Handle slow consumers
|
||||
|
||||
## Resources
|
||||
|
||||
- [EventStoreDB](https://www.eventstore.com/)
|
||||
- [Marten Events](https://martendb.io/events/)
|
||||
- [Event Sourcing Pattern](https://docs.microsoft.com/en-us/azure/architecture/patterns/event-sourcing)
|
||||
|
||||
@@ -562,34 +562,3 @@ async def call_payment_service(payment_data: dict):
|
||||
payment_data
|
||||
)
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- **references/service-decomposition-guide.md**: Breaking down monoliths
|
||||
- **references/communication-patterns.md**: Sync vs async patterns
|
||||
- **references/saga-implementation.md**: Distributed transactions
|
||||
- **assets/circuit-breaker.py**: Production circuit breaker
|
||||
- **assets/event-bus-template.py**: Kafka event bus implementation
|
||||
- **assets/api-gateway-template.py**: Complete API gateway
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. **Service Boundaries**: Align with business capabilities
|
||||
2. **Database Per Service**: No shared databases
|
||||
3. **API Contracts**: Versioned, backward compatible
|
||||
4. **Async When Possible**: Events over direct calls
|
||||
5. **Circuit Breakers**: Fail fast on service failures
|
||||
6. **Distributed Tracing**: Track requests across services
|
||||
7. **Service Registry**: Dynamic service discovery
|
||||
8. **Health Checks**: Liveness and readiness probes
|
||||
|
||||
## Common Pitfalls
|
||||
|
||||
- **Distributed Monolith**: Tightly coupled services
|
||||
- **Chatty Services**: Too many inter-service calls
|
||||
- **Shared Databases**: Tight coupling through data
|
||||
- **No Circuit Breakers**: Cascade failures
|
||||
- **Synchronous Everything**: Tight coupling, poor resilience
|
||||
- **Premature Microservices**: Starting with microservices
|
||||
- **Ignoring Network Failures**: Assuming reliable network
|
||||
- **No Compensation Logic**: Can't undo failed transactions
|
||||
|
||||
@@ -483,8 +483,3 @@ class CustomerActivityProjection(Projection):
|
||||
- **Don't skip error handling** - Log and alert on failures
|
||||
- **Don't ignore ordering** - Events must be processed in order
|
||||
- **Don't over-normalize** - Denormalize for query patterns
|
||||
|
||||
## Resources
|
||||
|
||||
- [CQRS Pattern](https://docs.microsoft.com/en-us/azure/architecture/patterns/cqrs)
|
||||
- [Projection Building Blocks](https://zimarev.com/blog/event-sourcing/projections/)
|
||||
|
||||
@@ -477,8 +477,3 @@ class TimeoutSagaOrchestrator(SagaOrchestrator):
|
||||
- **Don't skip compensation testing** - Most critical part
|
||||
- **Don't couple services** - Use async messaging
|
||||
- **Don't ignore partial failures** - Handle gracefully
|
||||
|
||||
## Resources
|
||||
|
||||
- [Saga Pattern](https://microservices.io/patterns/data/saga.html)
|
||||
- [Designing Data-Intensive Applications](https://dataintensive.net/)
|
||||
|
||||
@@ -422,33 +422,3 @@ contract FlashLoanReceiver is IFlashLoanReceiver {
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- **references/staking.md**: Staking mechanics and reward distribution
|
||||
- **references/liquidity-pools.md**: AMM mathematics and pricing
|
||||
- **references/governance-tokens.md**: Governance and voting systems
|
||||
- **references/lending-protocols.md**: Lending/borrowing implementation
|
||||
- **references/flash-loans.md**: Flash loan security and use cases
|
||||
- **assets/staking-contract.sol**: Production staking template
|
||||
- **assets/amm-contract.sol**: Full AMM implementation
|
||||
- **assets/governance-token.sol**: Governance system
|
||||
- **assets/lending-protocol.sol**: Lending platform template
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. **Use Established Libraries**: OpenZeppelin, Solmate
|
||||
2. **Test Thoroughly**: Unit tests, integration tests, fuzzing
|
||||
3. **Audit Before Launch**: Professional security audits
|
||||
4. **Start Simple**: MVP first, add features incrementally
|
||||
5. **Monitor**: Track contract health and user activity
|
||||
6. **Upgradability**: Consider proxy patterns for upgrades
|
||||
7. **Emergency Controls**: Pause mechanisms for critical issues
|
||||
|
||||
## Common DeFi Patterns
|
||||
|
||||
- **Time-Weighted Average Price (TWAP)**: Price oracle resistance
|
||||
- **Liquidity Mining**: Incentivize liquidity provision
|
||||
- **Vesting**: Lock tokens with gradual release
|
||||
- **Multisig**: Require multiple signatures for critical operations
|
||||
- **Timelocks**: Delay execution of governance decisions
|
||||
|
||||
@@ -353,31 +353,3 @@ contract OptimizedNFT is ERC721A {
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- **references/erc721.md**: ERC-721 specification details
|
||||
- **references/erc1155.md**: ERC-1155 multi-token standard
|
||||
- **references/metadata-standards.md**: Metadata best practices
|
||||
- **references/enumeration.md**: Token enumeration patterns
|
||||
- **assets/erc721-contract.sol**: Production ERC-721 template
|
||||
- **assets/erc1155-contract.sol**: Production ERC-1155 template
|
||||
- **assets/metadata-schema.json**: Standard metadata format
|
||||
- **assets/metadata-uploader.py**: IPFS upload utility
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. **Use OpenZeppelin**: Battle-tested implementations
|
||||
2. **Pin Metadata**: Use IPFS with pinning service
|
||||
3. **Implement Royalties**: EIP-2981 for marketplace compatibility
|
||||
4. **Gas Optimization**: Use ERC721A for batch minting
|
||||
5. **Reveal Mechanism**: Placeholder → reveal pattern
|
||||
6. **Enumeration**: Support walletOfOwner for marketplaces
|
||||
7. **Whitelist**: Merkle trees for efficient whitelisting
|
||||
|
||||
## Marketplace Integration
|
||||
|
||||
- OpenSea: ERC-721/1155, metadata standards
|
||||
- LooksRare: Royalty enforcement
|
||||
- Rarible: Protocol fees, lazy minting
|
||||
- Blur: Gas-optimized trading
|
||||
|
||||
@@ -494,32 +494,3 @@ contract WellDocumentedContract {
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- **references/reentrancy.md**: Comprehensive reentrancy prevention
|
||||
- **references/access-control.md**: Role-based access patterns
|
||||
- **references/overflow-underflow.md**: SafeMath and integer safety
|
||||
- **references/gas-optimization.md**: Gas saving techniques
|
||||
- **references/vulnerability-patterns.md**: Common vulnerability catalog
|
||||
- **assets/solidity-contracts-templates.sol**: Secure contract templates
|
||||
- **assets/security-checklist.md**: Pre-audit checklist
|
||||
- **scripts/analyze-contract.sh**: Static analysis tools
|
||||
|
||||
## Tools for Security Analysis
|
||||
|
||||
- **Slither**: Static analysis tool
|
||||
- **Mythril**: Security analysis tool
|
||||
- **Echidna**: Fuzzing tool
|
||||
- **Manticore**: Symbolic execution
|
||||
- **Securify**: Automated security scanner
|
||||
|
||||
## Common Pitfalls
|
||||
|
||||
1. **Using `tx.origin` for Authentication**: Use `msg.sender` instead
|
||||
2. **Unchecked External Calls**: Always check return values
|
||||
3. **Delegatecall to Untrusted Contracts**: Can hijack your contract
|
||||
4. **Floating Pragma**: Pin to specific Solidity version
|
||||
5. **Missing Events**: Emit events for state changes
|
||||
6. **Excessive Gas in Loops**: Can hit block gas limit
|
||||
7. **No Upgrade Path**: Consider proxy patterns if upgrades needed
|
||||
|
||||
@@ -388,28 +388,3 @@ jobs:
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v2
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- **references/hardhat-setup.md**: Hardhat configuration guide
|
||||
- **references/foundry-setup.md**: Foundry testing framework
|
||||
- **references/test-patterns.md**: Testing best practices
|
||||
- **references/mainnet-forking.md**: Fork testing strategies
|
||||
- **references/contract-verification.md**: Etherscan verification
|
||||
- **assets/hardhat-config.js**: Complete Hardhat configuration
|
||||
- **assets/test-suite.js**: Comprehensive test examples
|
||||
- **assets/foundry.toml**: Foundry configuration
|
||||
- **scripts/test-contract.sh**: Automated testing script
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. **Test Coverage**: Aim for >90% coverage
|
||||
2. **Edge Cases**: Test boundary conditions
|
||||
3. **Gas Limits**: Verify functions don't hit block gas limit
|
||||
4. **Reentrancy**: Test for reentrancy vulnerabilities
|
||||
5. **Access Control**: Test unauthorized access attempts
|
||||
6. **Events**: Verify event emissions
|
||||
7. **Fixtures**: Use fixtures to avoid code duplication
|
||||
8. **Mainnet Fork**: Test with real contracts
|
||||
9. **Fuzzing**: Use property-based testing
|
||||
10. **CI/CD**: Automate testing on every commit
|
||||
|
||||
@@ -445,9 +445,3 @@ Present ranges:
|
||||
- **Don't use jargon** - Match audience vocabulary
|
||||
- **Don't show methodology first** - Context, then method
|
||||
- **Don't forget the narrative** - Numbers need meaning
|
||||
|
||||
## Resources
|
||||
|
||||
- [Storytelling with Data (Cole Nussbaumer)](https://www.storytellingwithdata.com/)
|
||||
- [The Pyramid Principle (Barbara Minto)](https://www.amazon.com/Pyramid-Principle-Logic-Writing-Thinking/dp/0273710516)
|
||||
- [Resonate (Nancy Duarte)](https://www.duarte.com/resonate/)
|
||||
|
||||
@@ -420,9 +420,3 @@ for alert in alerts:
|
||||
- **Don't use 3D charts** - They distort perception
|
||||
- **Don't hide methodology** - Document calculations
|
||||
- **Don't ignore mobile** - Ensure responsive design
|
||||
|
||||
## Resources
|
||||
|
||||
- [Stephen Few's Dashboard Design](https://www.perceptualedge.com/articles/visual_business_intelligence/rules_for_using_color.pdf)
|
||||
- [Edward Tufte's Principles](https://www.edwardtufte.com/tufte/)
|
||||
- [Google Data Studio Gallery](https://datastudio.google.com/gallery)
|
||||
|
||||
@@ -351,10 +351,6 @@ kubectl rollout undo deployment/my-app --to-revision=3
|
||||
fi
|
||||
```
|
||||
|
||||
## Reference Files
|
||||
|
||||
- `references/pipeline-orchestration.md` - Complex pipeline patterns
|
||||
- `assets/approval-gate-template.yml` - Approval workflow templates
|
||||
|
||||
## Related Skills
|
||||
|
||||
|
||||
@@ -320,12 +320,6 @@ jobs:
|
||||
}
|
||||
```
|
||||
|
||||
## Reference Files
|
||||
|
||||
- `assets/test-workflow.yml` - Testing workflow template
|
||||
- `assets/deploy-workflow.yml` - Deployment workflow template
|
||||
- `assets/matrix-build.yml` - Matrix build template
|
||||
- `references/common-workflows.md` - Common workflow patterns
|
||||
|
||||
## Related Skills
|
||||
|
||||
|
||||
@@ -246,10 +246,6 @@ trigger-child:
|
||||
strategy: depend
|
||||
```
|
||||
|
||||
## Reference Files
|
||||
|
||||
- `assets/gitlab-ci.yml.template` - Complete pipeline template
|
||||
- `references/pipeline-stages.md` - Stage organization patterns
|
||||
|
||||
## Best Practices
|
||||
|
||||
|
||||
@@ -339,10 +339,6 @@ secret-scan:
|
||||
allow_failure: false
|
||||
```
|
||||
|
||||
## Reference Files
|
||||
|
||||
- `references/vault-setup.md` - HashiCorp Vault configuration
|
||||
- `references/github-secrets.md` - GitHub Secrets best practices
|
||||
|
||||
## Related Skills
|
||||
|
||||
|
||||
@@ -284,10 +284,6 @@ resource "aws_cloudwatch_metric_alarm" "cpu_high" {
|
||||
- **GCP:** Cost Management, Recommender
|
||||
- **Multi-cloud:** CloudHealth, Cloudability, Kubecost
|
||||
|
||||
## Reference Files
|
||||
|
||||
- `references/tagging-standards.md` - Tagging conventions
|
||||
- `assets/cost-analysis-template.xlsx` - Cost analysis spreadsheet
|
||||
|
||||
## Related Skills
|
||||
|
||||
|
||||
@@ -230,10 +230,6 @@ az network vpn-connection show-device-config-script
|
||||
5. **Use Direct Connect** for high bandwidth
|
||||
6. **Implement caching** to reduce traffic
|
||||
|
||||
## Reference Files
|
||||
|
||||
- `references/vpn-setup.md` - VPN configuration guide
|
||||
- `references/direct-connect.md` - Direct Connect setup
|
||||
|
||||
## Related Skills
|
||||
|
||||
|
||||
@@ -319,9 +319,3 @@ istioctl proxy-config endpoints deploy/my-app
|
||||
# Debug traffic
|
||||
istioctl proxy-config log deploy/my-app --level debug
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- [Istio Traffic Management](https://istio.io/latest/docs/concepts/traffic-management/)
|
||||
- [Virtual Service Reference](https://istio.io/latest/docs/reference/config/networking/virtual-service/)
|
||||
- [Destination Rule Reference](https://istio.io/latest/docs/reference/config/networking/destination-rule/)
|
||||
|
||||
@@ -303,9 +303,3 @@ linkerd viz tap deploy/my-app --to deploy/my-backend
|
||||
- **Don't over-configure** - Linkerd defaults are sensible
|
||||
- **Don't ignore ServiceProfiles** - They unlock advanced features
|
||||
- **Don't forget timeouts** - Set appropriate values per route
|
||||
|
||||
## Resources
|
||||
|
||||
- [Linkerd Documentation](https://linkerd.io/2.14/overview/)
|
||||
- [Service Profiles](https://linkerd.io/2.14/features/service-profiles/)
|
||||
- [Authorization Policy](https://linkerd.io/2.14/features/server-policy/)
|
||||
|
||||
@@ -340,10 +340,3 @@ linkerd viz tap deploy/my-app --to deploy/my-backend
|
||||
- **Don't ignore cert expiry** - Automate rotation
|
||||
- **Don't use self-signed certs** - Use proper CA hierarchy
|
||||
- **Don't skip verification** - Verify the full chain
|
||||
|
||||
## Resources
|
||||
|
||||
- [Istio Security](https://istio.io/latest/docs/concepts/security/)
|
||||
- [SPIFFE/SPIRE](https://spiffe.io/)
|
||||
- [cert-manager](https://cert-manager.io/)
|
||||
- [Zero Trust Architecture (NIST)](https://www.nist.gov/publications/zero-trust-architecture)
|
||||
|
||||
@@ -169,10 +169,6 @@ AWS / Azure / GCP
|
||||
9. **Test disaster recovery** procedures
|
||||
10. **Train teams** on multiple clouds
|
||||
|
||||
## Reference Files
|
||||
|
||||
- `references/service-comparison.md` - Complete service comparison
|
||||
- `references/multi-cloud-patterns.md` - Architecture patterns
|
||||
|
||||
## Related Skills
|
||||
|
||||
|
||||
@@ -376,10 +376,3 @@ spec:
|
||||
- **Don't ignore cardinality** - Limit label values
|
||||
- **Don't skip dashboards** - Visualize dependencies
|
||||
- **Don't forget costs** - Monitor observability costs
|
||||
|
||||
## Resources
|
||||
|
||||
- [Istio Observability](https://istio.io/latest/docs/tasks/observability/)
|
||||
- [Linkerd Observability](https://linkerd.io/2.14/features/dashboard/)
|
||||
- [OpenTelemetry](https://opentelemetry.io/)
|
||||
- [Kiali](https://kiali.io/)
|
||||
|
||||
@@ -213,13 +213,6 @@ module "rds" {
|
||||
}
|
||||
```
|
||||
|
||||
## Reference Files
|
||||
|
||||
- `assets/vpc-module/` - Complete VPC module example
|
||||
- `assets/rds-module/` - RDS module example
|
||||
- `references/aws-modules.md` - AWS module patterns
|
||||
- `references/azure-modules.md` - Azure module patterns
|
||||
- `references/gcp-modules.md` - GCP module patterns
|
||||
|
||||
## Testing
|
||||
|
||||
|
||||
@@ -517,9 +517,3 @@ airflow/
|
||||
- **Don't use global state** - Tasks should be stateless
|
||||
- **Don't skip catchup blindly** - Understand implications
|
||||
- **Don't put heavy logic in DAG file** - Import from modules
|
||||
|
||||
## Resources
|
||||
|
||||
- [Airflow Documentation](https://airflow.apache.org/docs/)
|
||||
- [Astronomer Guides](https://docs.astronomer.io/learn)
|
||||
- [TaskFlow API](https://airflow.apache.org/docs/apache-airflow/stable/tutorial/taskflow.html)
|
||||
|
||||
@@ -581,10 +581,3 @@ if not all(r.passed for r in results.values()):
|
||||
- **Don't skip freshness** - Stale data is bad data
|
||||
- **Don't hardcode thresholds** - Use dynamic baselines
|
||||
- **Don't test in isolation** - Test relationships too
|
||||
|
||||
## Resources
|
||||
|
||||
- [Great Expectations Documentation](https://docs.greatexpectations.io/)
|
||||
- [dbt Testing Documentation](https://docs.getdbt.com/docs/build/tests)
|
||||
- [Data Contract Specification](https://datacontract.com/)
|
||||
- [Soda Core](https://docs.soda.io/soda-core/overview.html)
|
||||
|
||||
@@ -554,10 +554,3 @@ dbt ls --select tag:critical # List models by tag
|
||||
- **Don't repeat logic** - Extract to macros
|
||||
- **Don't test in prod** - Use dev target
|
||||
- **Don't ignore freshness** - Monitor source data
|
||||
|
||||
## Resources
|
||||
|
||||
- [dbt Documentation](https://docs.getdbt.com/)
|
||||
- [dbt Best Practices](https://docs.getdbt.com/guides/best-practices)
|
||||
- [dbt-utils Package](https://hub.getdbt.com/dbt-labs/dbt_utils/latest/)
|
||||
- [dbt Discourse](https://discourse.getdbt.com/)
|
||||
|
||||
@@ -409,9 +409,3 @@ spark_configs = {
|
||||
- **Don't over-cache** - Memory is limited
|
||||
- **Don't ignore data skew** - It dominates job time
|
||||
- **Don't use `.count()` for existence** - Use `.take(1)` or `.isEmpty()`
|
||||
|
||||
## Resources
|
||||
|
||||
- [Spark Performance Tuning](https://spark.apache.org/docs/latest/sql-performance-tuning.html)
|
||||
- [Spark Configuration](https://spark.apache.org/docs/latest/configuration.html)
|
||||
- [Databricks Optimization Guide](https://docs.databricks.com/en/optimizations/index.html)
|
||||
|
||||
@@ -636,12 +636,3 @@ app.use("/api/", apiLimiter);
|
||||
- **Insecure Password Reset**: Use secure tokens with expiration
|
||||
- **No Rate Limiting**: Vulnerable to brute force
|
||||
- **Trusting Client Data**: Always validate on server
|
||||
|
||||
## Resources
|
||||
|
||||
- **references/jwt-best-practices.md**: JWT implementation guide
|
||||
- **references/oauth2-flows.md**: OAuth2 flow diagrams and examples
|
||||
- **references/session-security.md**: Secure session management
|
||||
- **assets/auth-security-checklist.md**: Security review checklist
|
||||
- **assets/password-policy-template.md**: Password requirements template
|
||||
- **scripts/token-validator.ts**: JWT validation utility
|
||||
|
||||
@@ -379,9 +379,3 @@ bazel build //... --notrack_incremental_state
|
||||
- **Don't commit bazel-\* dirs** - Add to .gitignore
|
||||
- **Don't skip WORKSPACE setup** - Foundation of build
|
||||
- **Don't ignore build warnings** - Technical debt
|
||||
|
||||
## Resources
|
||||
|
||||
- [Bazel Documentation](https://bazel.build/docs)
|
||||
- [Bazel Remote Execution](https://bazel.build/docs/remote-execution)
|
||||
- [rules_js](https://github.com/aspect-build/rules_js)
|
||||
|
||||
@@ -527,12 +527,3 @@ When author disagrees with your feedback:
|
||||
|
||||
✅ Approve after addressing required changes
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- **references/code-review-best-practices.md**: Comprehensive review guidelines
|
||||
- **references/common-bugs-checklist.md**: Language-specific bugs to watch for
|
||||
- **references/security-review-guide.md**: Security-focused review checklist
|
||||
- **assets/pr-review-template.md**: Standard review comment template
|
||||
- **assets/review-checklist.md**: Quick reference checklist
|
||||
- **scripts/pr-analyzer.py**: Analyze PR complexity and suggest reviewers
|
||||
|
||||
@@ -525,12 +525,3 @@ afterEach(() => {
|
||||
- [ ] Cache issues (clear cache)
|
||||
- [ ] Stale data (refresh database)
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- **references/debugging-tools-guide.md**: Comprehensive tool documentation
|
||||
- **references/performance-profiling.md**: Performance debugging guide
|
||||
- **references/production-debugging.md**: Debugging live systems
|
||||
- **assets/debugging-checklist.md**: Quick reference checklist
|
||||
- **assets/common-bugs.md**: Common bug patterns
|
||||
- **scripts/debug-helper.ts**: Debugging utility functions
|
||||
|
||||
@@ -533,12 +533,3 @@ test('checkout flow', async ({ page }) => {
|
||||
// 5. Inspect page state
|
||||
await page.pause(); // Pauses execution, opens inspector
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- **references/playwright-best-practices.md**: Playwright-specific patterns
|
||||
- **references/cypress-best-practices.md**: Cypress-specific patterns
|
||||
- **references/flaky-test-debugging.md**: Debugging unreliable tests
|
||||
- **assets/e2e-testing-checklist.md**: What to test with E2E
|
||||
- **assets/selector-strategies.md**: Finding reliable selectors
|
||||
- **scripts/test-analyzer.ts**: Analyze test flakiness and duration
|
||||
|
||||
@@ -630,12 +630,3 @@ def process_order(order_id: str) -> Order:
|
||||
- **Poor Error Messages**: "Error occurred" is not helpful
|
||||
- **Returning Error Codes**: Use exceptions or Result types
|
||||
- **Ignoring Async Errors**: Unhandled promise rejections
|
||||
|
||||
## Resources
|
||||
|
||||
- **references/exception-hierarchy-design.md**: Designing error class hierarchies
|
||||
- **references/error-recovery-strategies.md**: Recovery patterns for different scenarios
|
||||
- **references/async-error-handling.md**: Handling errors in concurrent code
|
||||
- **assets/error-handling-checklist.md**: Review checklist for error handling
|
||||
- **assets/error-message-guide.md**: Writing helpful error messages
|
||||
- **scripts/error-analyzer.py**: Analyze error patterns in logs
|
||||
|
||||
@@ -394,12 +394,3 @@ git reset --hard HEAD^
|
||||
git reflog
|
||||
git branch recovered-branch abc123
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- **references/git-rebase-guide.md**: Deep dive into interactive rebase
|
||||
- **references/git-conflict-resolution.md**: Advanced conflict resolution strategies
|
||||
- **references/git-history-rewriting.md**: Safely rewriting Git history
|
||||
- **assets/git-workflow-checklist.md**: Pre-PR cleanup checklist
|
||||
- **assets/git-aliases.md**: Useful Git aliases for advanced workflows
|
||||
- **scripts/git-clean-branches.sh**: Clean up merged and stale branches
|
||||
|
||||
@@ -612,12 +612,3 @@ pnpm changeset publish
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- **references/turborepo-guide.md**: Comprehensive Turborepo documentation
|
||||
- **references/nx-guide.md**: Nx monorepo patterns
|
||||
- **references/pnpm-workspaces.md**: pnpm workspace features
|
||||
- **assets/monorepo-checklist.md**: Setup checklist
|
||||
- **assets/migration-guide.md**: Multi-repo to monorepo migration
|
||||
- **scripts/dependency-graph.ts**: Visualize package dependencies
|
||||
|
||||
@@ -449,9 +449,3 @@ nx migrate --run-migrations
|
||||
- **Don't skip affected** - Test only what changed
|
||||
- **Don't ignore boundaries** - Tech debt accumulates
|
||||
- **Don't over-granularize** - Balance lib count
|
||||
|
||||
## Resources
|
||||
|
||||
- [Nx Documentation](https://nx.dev/getting-started/intro)
|
||||
- [Module Boundaries](https://nx.dev/core-features/enforce-module-boundaries)
|
||||
- [Nx Cloud](https://nx.app/)
|
||||
|
||||
@@ -497,13 +497,3 @@ FROM pg_stat_user_indexes
|
||||
WHERE idx_scan = 0
|
||||
ORDER BY pg_relation_size(indexrelid) DESC;
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- **references/postgres-optimization-guide.md**: PostgreSQL-specific optimization
|
||||
- **references/mysql-optimization-guide.md**: MySQL/MariaDB optimization
|
||||
- **references/query-plan-analysis.md**: Deep dive into EXPLAIN plans
|
||||
- **assets/index-strategy-checklist.md**: When and how to create indexes
|
||||
- **assets/query-optimization-checklist.md**: Step-by-step optimization guide
|
||||
- **scripts/analyze-slow-queries.sql**: Identify slow queries in your database
|
||||
- **scripts/index-recommendations.sql**: Generate index recommendations
|
||||
|
||||
@@ -368,9 +368,3 @@ TURBO_LOG_VERBOSITY=debug turbo build --filter=@myorg/web
|
||||
- **Don't include secrets in env** - Use runtime env vars
|
||||
- **Don't ignore dependsOn** - Causes race conditions
|
||||
- **Don't over-filter** - May miss dependencies
|
||||
|
||||
## Resources
|
||||
|
||||
- [Turborepo Documentation](https://turbo.build/repo/docs)
|
||||
- [Caching Guide](https://turbo.build/repo/docs/core-concepts/caching)
|
||||
- [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching)
|
||||
|
||||
@@ -439,10 +439,3 @@ adr link 2 "Complements" 1 "Is complemented by"
|
||||
- **Don't hide failures** - Rejected decisions are valuable
|
||||
- **Don't be vague** - Specific decisions, specific consequences
|
||||
- **Don't forget implementation** - ADR without action is waste
|
||||
|
||||
## Resources
|
||||
|
||||
- [Documenting Architecture Decisions (Michael Nygard)](https://cognitect.com/blog/2011/11/15/documenting-architecture-decisions)
|
||||
- [MADR Template](https://adr.github.io/madr/)
|
||||
- [ADR GitHub Organization](https://adr.github.io/)
|
||||
- [adr-tools](https://github.com/npryce/adr-tools)
|
||||
|
||||
@@ -570,11 +570,3 @@ Reviewed-by: @alice
|
||||
- **Don't manual edit** - Generated changelogs only
|
||||
- **Don't forget breaking changes** - Mark with `!` or footer
|
||||
- **Don't ignore CI** - Validate commits in pipeline
|
||||
|
||||
## Resources
|
||||
|
||||
- [Keep a Changelog](https://keepachangelog.com/)
|
||||
- [Conventional Commits](https://www.conventionalcommits.org/)
|
||||
- [Semantic Versioning](https://semver.org/)
|
||||
- [semantic-release](https://semantic-release.gitbook.io/)
|
||||
- [git-cliff](https://git-cliff.org/)
|
||||
|
||||
@@ -1015,10 +1015,3 @@ openapi-generator-cli generate \
|
||||
- **Don't forget nullable** - Be explicit about null
|
||||
- **Don't mix styles** - Consistent naming throughout
|
||||
- **Don't hardcode URLs** - Use server variables
|
||||
|
||||
## Resources
|
||||
|
||||
- [OpenAPI 3.1 Specification](https://spec.openapis.org/oas/v3.1.0)
|
||||
- [Swagger Editor](https://editor.swagger.io/)
|
||||
- [Redocly](https://redocly.com/)
|
||||
- [Spectral](https://stoplight.io/open-source/spectral)
|
||||
|
||||
@@ -808,10 +808,3 @@ public class ProductsApiTests : IClassFixture<WebApplicationFactory<Program>>
|
||||
- **Missing Indexes**: Check query plans, add indexes for common filters
|
||||
- **Timeout Issues**: Configure appropriate timeouts for HTTP clients
|
||||
- **Cache Stampede**: Use distributed locks for cache population
|
||||
|
||||
## Resources
|
||||
|
||||
- **assets/service-template.cs**: Complete service implementation template
|
||||
- **assets/repository-template.cs**: Repository pattern implementation
|
||||
- **references/ef-core-best-practices.md**: EF Core optimization guide
|
||||
- **references/dapper-patterns.md**: Advanced Dapper usage patterns
|
||||
|
||||
@@ -384,32 +384,3 @@ Phase 4: Cleanup (1-2 weeks)
|
||||
- Optimize bundle
|
||||
- Final testing
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- **references/hybrid-mode.md**: Hybrid app patterns
|
||||
- **references/component-migration.md**: Component conversion guide
|
||||
- **references/dependency-injection.md**: DI migration strategies
|
||||
- **references/routing.md**: Routing migration
|
||||
- **assets/hybrid-bootstrap.ts**: Hybrid app template
|
||||
- **assets/migration-timeline.md**: Project planning
|
||||
- **scripts/analyze-angular-app.sh**: App analysis script
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. **Start with Services**: Migrate services first (easier)
|
||||
2. **Incremental Approach**: Feature-by-feature migration
|
||||
3. **Test Continuously**: Test at every step
|
||||
4. **Use TypeScript**: Migrate to TypeScript early
|
||||
5. **Follow Style Guide**: Angular style guide from day 1
|
||||
6. **Optimize Later**: Get it working, then optimize
|
||||
7. **Document**: Keep migration notes
|
||||
|
||||
## Common Pitfalls
|
||||
|
||||
- Not setting up hybrid app correctly
|
||||
- Migrating UI before logic
|
||||
- Ignoring change detection differences
|
||||
- Not handling scope properly
|
||||
- Mixing patterns (AngularJS + Angular)
|
||||
- Inadequate testing
|
||||
|
||||
@@ -401,33 +401,3 @@ module.exports = {
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- **references/orm-switching.md**: ORM migration guides
|
||||
- **references/schema-migration.md**: Schema transformation patterns
|
||||
- **references/data-transformation.md**: Data migration scripts
|
||||
- **references/rollback-strategies.md**: Rollback procedures
|
||||
- **assets/schema-migration-template.sql**: SQL migration templates
|
||||
- **assets/data-migration-script.py**: Data migration utilities
|
||||
- **scripts/test-migration.sh**: Migration testing script
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. **Always Provide Rollback**: Every up() needs a down()
|
||||
2. **Test Migrations**: Test on staging first
|
||||
3. **Use Transactions**: Atomic migrations when possible
|
||||
4. **Backup First**: Always backup before migration
|
||||
5. **Small Changes**: Break into small, incremental steps
|
||||
6. **Monitor**: Watch for errors during deployment
|
||||
7. **Document**: Explain why and how
|
||||
8. **Idempotent**: Migrations should be rerunnable
|
||||
|
||||
## Common Pitfalls
|
||||
|
||||
- Not testing rollback procedures
|
||||
- Making breaking changes without downtime strategy
|
||||
- Forgetting to handle NULL values
|
||||
- Not considering index performance
|
||||
- Ignoring foreign key constraints
|
||||
- Migrating too much data at once
|
||||
|
||||
@@ -366,64 +366,3 @@ npm install --workspaces
|
||||
# Update specific workspace
|
||||
npm install package@latest --workspace=packages/app
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- **references/semver.md**: Semantic versioning guide
|
||||
- **references/compatibility-matrix.md**: Common compatibility issues
|
||||
- **references/staged-upgrades.md**: Incremental upgrade strategies
|
||||
- **references/testing-strategy.md**: Comprehensive testing approaches
|
||||
- **assets/upgrade-checklist.md**: Step-by-step checklist
|
||||
- **assets/compatibility-matrix.csv**: Version compatibility table
|
||||
- **scripts/audit-dependencies.sh**: Dependency audit script
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. **Read Changelogs**: Understand what changed
|
||||
2. **Upgrade Incrementally**: One major version at a time
|
||||
3. **Test Thoroughly**: Unit, integration, E2E tests
|
||||
4. **Check Peer Dependencies**: Resolve conflicts early
|
||||
5. **Use Lock Files**: Ensure reproducible installs
|
||||
6. **Automate Updates**: Use Renovate or Dependabot
|
||||
7. **Monitor**: Watch for runtime errors post-upgrade
|
||||
8. **Document**: Keep upgrade notes
|
||||
|
||||
## Upgrade Checklist
|
||||
|
||||
```markdown
|
||||
Pre-Upgrade:
|
||||
|
||||
- [ ] Review current dependency versions
|
||||
- [ ] Read changelogs for breaking changes
|
||||
- [ ] Create feature branch
|
||||
- [ ] Backup current state (git tag)
|
||||
- [ ] Run full test suite (baseline)
|
||||
|
||||
During Upgrade:
|
||||
|
||||
- [ ] Upgrade one dependency at a time
|
||||
- [ ] Update peer dependencies
|
||||
- [ ] Fix TypeScript errors
|
||||
- [ ] Update tests if needed
|
||||
- [ ] Run test suite after each upgrade
|
||||
- [ ] Check bundle size impact
|
||||
|
||||
Post-Upgrade:
|
||||
|
||||
- [ ] Full regression testing
|
||||
- [ ] Performance testing
|
||||
- [ ] Update documentation
|
||||
- [ ] Deploy to staging
|
||||
- [ ] Monitor for errors
|
||||
- [ ] Deploy to production
|
||||
```
|
||||
|
||||
## Common Pitfalls
|
||||
|
||||
- Upgrading all dependencies at once
|
||||
- Not testing after each upgrade
|
||||
- Ignoring peer dependency warnings
|
||||
- Forgetting to update lock file
|
||||
- Not reading breaking change notes
|
||||
- Skipping major versions
|
||||
- Not having rollback plan
|
||||
|
||||
@@ -495,32 +495,3 @@ function List<T>({ items, renderItem }: ListProps<T>) {
|
||||
- [ ] Check for warnings in console
|
||||
- [ ] Performance testing
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- **references/breaking-changes.md**: Version-specific breaking changes
|
||||
- **references/codemods.md**: Codemod usage guide
|
||||
- **references/hooks-migration.md**: Comprehensive hooks patterns
|
||||
- **references/concurrent-features.md**: React 18 concurrent features
|
||||
- **assets/codemod-config.json**: Codemod configurations
|
||||
- **assets/migration-checklist.md**: Step-by-step checklist
|
||||
- **scripts/apply-codemods.sh**: Automated codemod script
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. **Incremental Migration**: Don't migrate everything at once
|
||||
2. **Test Thoroughly**: Comprehensive testing at each step
|
||||
3. **Use Codemods**: Automate repetitive transformations
|
||||
4. **Start Simple**: Begin with leaf components
|
||||
5. **Leverage StrictMode**: Catch issues early
|
||||
6. **Monitor Performance**: Measure before and after
|
||||
7. **Document Changes**: Keep migration log
|
||||
|
||||
## Common Pitfalls
|
||||
|
||||
- Forgetting useEffect dependencies
|
||||
- Over-using useMemo/useCallback
|
||||
- Not handling cleanup in useEffect
|
||||
- Mixing class and functional patterns
|
||||
- Ignoring StrictMode warnings
|
||||
- Breaking change assumptions
|
||||
|
||||
@@ -535,9 +535,3 @@ export async function updateProduct(id: string, data: ProductData) {
|
||||
- **Don't fetch in Client Components** - Use Server Components or React Query
|
||||
- **Don't over-nest layouts** - Each layout adds to the component tree
|
||||
- **Don't ignore loading states** - Always provide loading.tsx or Suspense
|
||||
|
||||
## Resources
|
||||
|
||||
- [Next.js App Router Documentation](https://nextjs.org/docs/app)
|
||||
- [Server Components RFC](https://github.com/reactjs/rfcs/blob/main/text/0188-server-components.md)
|
||||
- [Vercel Templates](https://vercel.com/templates/next.js)
|
||||
|
||||
@@ -664,10 +664,3 @@ eas update --branch production --message "Bug fixes"
|
||||
- **Don't ignore platform differences** - Test on both iOS and Android
|
||||
- **Don't store secrets in code** - Use environment variables
|
||||
- **Don't skip error boundaries** - Mobile crashes are unforgiving
|
||||
|
||||
## Resources
|
||||
|
||||
- [Expo Documentation](https://docs.expo.dev/)
|
||||
- [Expo Router](https://docs.expo.dev/router/introduction/)
|
||||
- [React Native Performance](https://reactnative.dev/docs/performance)
|
||||
- [FlashList](https://shopify.github.io/flash-list/)
|
||||
|
||||
@@ -428,10 +428,3 @@ const todosSlice = createSlice({
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- [Redux Toolkit Documentation](https://redux-toolkit.js.org/)
|
||||
- [Zustand GitHub](https://github.com/pmndrs/zustand)
|
||||
- [Jotai Documentation](https://jotai.org/)
|
||||
- [TanStack Query](https://tanstack.com/query)
|
||||
|
||||
@@ -864,11 +864,3 @@ Define reusable custom utilities:
|
||||
- **Don't use arbitrary values** - Extend `@theme` instead
|
||||
- **Don't hardcode colors** - Use semantic tokens
|
||||
- **Don't forget dark mode** - Test both themes
|
||||
|
||||
## Resources
|
||||
|
||||
- [Tailwind CSS v4 Documentation](https://tailwindcss.com/docs)
|
||||
- [Tailwind v4 Beta Announcement](https://tailwindcss.com/blog/tailwindcss-v4-beta)
|
||||
- [CVA Documentation](https://cva.style/docs)
|
||||
- [shadcn/ui](https://ui.shadcn.com/)
|
||||
- [Radix Primitives](https://www.radix-ui.com/primitives)
|
||||
|
||||
@@ -799,9 +799,3 @@ func _on_off_screen() -> void:
|
||||
- **Don't put logic in resources** - Keep them data-only
|
||||
- **Don't ignore the Profiler** - Monitor performance
|
||||
- **Don't fight the scene tree** - Work with Godot's design
|
||||
|
||||
## Resources
|
||||
|
||||
- [Godot Documentation](https://docs.godotengine.org/en/stable/)
|
||||
- [GDQuest Tutorials](https://www.gdquest.com/)
|
||||
- [Godot Recipes](https://kidscancode.org/godot_recipes/)
|
||||
|
||||
@@ -620,9 +620,3 @@ public struct Disabled : IComponentData, IEnableableComponent { }
|
||||
- **Don't over-architect** - Start simple
|
||||
- **Don't ignore chunk utilization** - Group similar entities
|
||||
- **Don't forget disposal** - Native collections leak
|
||||
|
||||
## Resources
|
||||
|
||||
- [Unity DOTS Documentation](https://docs.unity3d.com/Packages/com.unity.entities@latest)
|
||||
- [Unity DOTS Samples](https://github.com/Unity-Technologies/EntityComponentSystemSamples)
|
||||
- [Burst User Guide](https://docs.unity3d.com/Packages/com.unity.burst@latest)
|
||||
|
||||
@@ -518,10 +518,3 @@ Date: ************\_************
|
||||
- **Don't discriminate** - In language or application
|
||||
- **Don't forget at-will language** - Where applicable
|
||||
- **Don't skip review** - Have legal counsel review all documents
|
||||
|
||||
## Resources
|
||||
|
||||
- [SHRM Employment Templates](https://www.shrm.org/)
|
||||
- [Department of Labor](https://www.dol.gov/)
|
||||
- [EEOC Guidance](https://www.eeoc.gov/)
|
||||
- State-specific labor departments
|
||||
|
||||
@@ -622,9 +622,3 @@ class BreachNotificationHandler:
|
||||
- **Don't retain indefinitely** - Define and enforce retention
|
||||
- **Don't ignore DSARs** - 30-day response required
|
||||
- **Don't transfer without safeguards** - SCCs or adequacy decisions
|
||||
|
||||
## Resources
|
||||
|
||||
- [GDPR Full Text](https://gdpr-info.eu/)
|
||||
- [ICO Guidance](https://ico.org.uk/for-organisations/guide-to-data-protection/guide-to-the-general-data-protection-regulation-gdpr/)
|
||||
- [EDPB Guidelines](https://edpb.europa.eu/our-work-tools/general-guidance/gdpr-guidelines-recommendations-best-practices_en)
|
||||
|
||||
@@ -397,10 +397,3 @@ psql -c "VACUUM FULL large_table;"
|
||||
- **Don't forget communication** - Keep stakeholders informed
|
||||
- **Don't work alone** - Escalate early
|
||||
- **Don't skip postmortems** - Learn from every incident
|
||||
|
||||
## Resources
|
||||
|
||||
- [Google SRE Book - Incident Management](https://sre.google/sre-book/managing-incidents/)
|
||||
- [PagerDuty Incident Response](https://response.pagerduty.com/)
|
||||
- [Atlassian Incident Management](https://www.atlassian.com/incident-management)
|
||||
```
|
||||
|
||||
@@ -307,176 +307,3 @@ I'll be available on Slack until 17:00 today.
|
||||
- Status page: Updated at 08:45
|
||||
- Customer support: Notified
|
||||
- Exec team: Aware
|
||||
|
||||
## Resources
|
||||
|
||||
- Incident channel: #inc-20240122-payment
|
||||
- Dashboard: [Payment Service](https://grafana/d/payments)
|
||||
- Runbook: [Payment Degradation](https://wiki/runbooks/payments)
|
||||
|
||||
---
|
||||
|
||||
**Incoming on-call (@bob) - Please confirm you have:**
|
||||
|
||||
- [ ] Joined #inc-20240122-payment
|
||||
- [ ] Access to dashboards
|
||||
- [ ] Understand current state
|
||||
- [ ] Know escalation path
|
||||
```
|
||||
|
||||
## Handoff Sync Meeting
|
||||
|
||||
### Agenda (15 minutes)
|
||||
|
||||
```markdown
|
||||
## Handoff Sync: @alice → @bob
|
||||
|
||||
1. **Active Issues** (5 min)
|
||||
- Walk through any ongoing incidents
|
||||
- Discuss investigation status
|
||||
- Transfer context and theories
|
||||
|
||||
2. **Recent Changes** (3 min)
|
||||
- Deployments to watch
|
||||
- Config changes
|
||||
- Known regressions
|
||||
|
||||
3. **Upcoming Events** (3 min)
|
||||
- Maintenance windows
|
||||
- Expected traffic changes
|
||||
- Releases planned
|
||||
|
||||
4. **Questions** (4 min)
|
||||
- Clarify anything unclear
|
||||
- Confirm access and alerting
|
||||
- Exchange contact info
|
||||
```
|
||||
|
||||
## On-Call Best Practices
|
||||
|
||||
### Before Your Shift
|
||||
|
||||
```markdown
|
||||
## Pre-Shift Checklist
|
||||
|
||||
### Access Verification
|
||||
|
||||
- [ ] VPN working
|
||||
- [ ] kubectl access to all clusters
|
||||
- [ ] Database read access
|
||||
- [ ] Log aggregator access (Splunk/Datadog)
|
||||
- [ ] PagerDuty app installed and logged in
|
||||
|
||||
### Alerting Setup
|
||||
|
||||
- [ ] PagerDuty schedule shows you as primary
|
||||
- [ ] Phone notifications enabled
|
||||
- [ ] Slack notifications for incident channels
|
||||
- [ ] Test alert received and acknowledged
|
||||
|
||||
### Knowledge Refresh
|
||||
|
||||
- [ ] Review recent incidents (past 2 weeks)
|
||||
- [ ] Check service changelog
|
||||
- [ ] Skim critical runbooks
|
||||
- [ ] Know escalation contacts
|
||||
|
||||
### Environment Ready
|
||||
|
||||
- [ ] Laptop charged and accessible
|
||||
- [ ] Phone charged
|
||||
- [ ] Quiet space available for calls
|
||||
- [ ] Secondary contact identified (if traveling)
|
||||
```
|
||||
|
||||
### During Your Shift
|
||||
|
||||
```markdown
|
||||
## Daily On-Call Routine
|
||||
|
||||
### Morning (start of day)
|
||||
|
||||
- [ ] Check overnight alerts
|
||||
- [ ] Review dashboards for anomalies
|
||||
- [ ] Check for any P0/P1 tickets created
|
||||
- [ ] Skim incident channels for context
|
||||
|
||||
### Throughout Day
|
||||
|
||||
- [ ] Respond to alerts within SLA
|
||||
- [ ] Document investigation progress
|
||||
- [ ] Update team on significant issues
|
||||
- [ ] Triage incoming pages
|
||||
|
||||
### End of Day
|
||||
|
||||
- [ ] Hand off any active issues
|
||||
- [ ] Update investigation docs
|
||||
- [ ] Note anything for next shift
|
||||
```
|
||||
|
||||
### After Your Shift
|
||||
|
||||
```markdown
|
||||
## Post-Shift Checklist
|
||||
|
||||
- [ ] Complete handoff document
|
||||
- [ ] Sync with incoming on-call
|
||||
- [ ] Verify PagerDuty routing changed
|
||||
- [ ] Close/update investigation tickets
|
||||
- [ ] File postmortems for any incidents
|
||||
- [ ] Take time off if shift was stressful
|
||||
```
|
||||
|
||||
## Escalation Guidelines
|
||||
|
||||
### When to Escalate
|
||||
|
||||
```markdown
|
||||
## Escalation Triggers
|
||||
|
||||
### Immediate Escalation
|
||||
|
||||
- SEV1 incident declared
|
||||
- Data breach suspected
|
||||
- Unable to diagnose within 30 min
|
||||
- Customer or legal escalation received
|
||||
|
||||
### Consider Escalation
|
||||
|
||||
- Issue spans multiple teams
|
||||
- Requires expertise you don't have
|
||||
- Business impact exceeds threshold
|
||||
- You're uncertain about next steps
|
||||
|
||||
### How to Escalate
|
||||
|
||||
1. Page the appropriate escalation path
|
||||
2. Provide brief context in Slack
|
||||
3. Stay engaged until escalation acknowledges
|
||||
4. Hand off cleanly, don't just disappear
|
||||
```
|
||||
|
||||
## Best Practices
|
||||
|
||||
### Do's
|
||||
|
||||
- **Document everything** - Future you will thank you
|
||||
- **Escalate early** - Better safe than sorry
|
||||
- **Take breaks** - Alert fatigue is real
|
||||
- **Keep handoffs synchronous** - Async loses context
|
||||
- **Test your setup** - Before incidents, not during
|
||||
|
||||
### Don'ts
|
||||
|
||||
- **Don't skip handoffs** - Context loss causes incidents
|
||||
- **Don't hero** - Escalate when needed
|
||||
- **Don't ignore alerts** - Even if they seem minor
|
||||
- **Don't work sick** - Swap shifts instead
|
||||
- **Don't disappear** - Stay reachable during shift
|
||||
|
||||
## Resources
|
||||
|
||||
- [Google SRE - Being On-Call](https://sre.google/sre-book/being-on-call/)
|
||||
- [PagerDuty On-Call Guide](https://www.pagerduty.com/resources/learn/on-call-management/)
|
||||
- [Increment On-Call Issue](https://increment.com/on-call/)
|
||||
|
||||
@@ -388,9 +388,3 @@ Don't full-flush cache in production; use targeted invalidation.
|
||||
- **Don't make it a blame doc** - That kills learning
|
||||
- **Don't create busywork** - Actions should be meaningful
|
||||
- **Don't skip follow-up** - Verify actions completed
|
||||
|
||||
## Resources
|
||||
|
||||
- [Google SRE - Postmortem Culture](https://sre.google/sre-book/postmortem-culture/)
|
||||
- [Etsy's Blameless Postmortems](https://codeascraft.com/2012/05/22/blameless-postmortems/)
|
||||
- [PagerDuty Postmortem Guide](https://postmortems.pagerduty.com/)
|
||||
|
||||
@@ -1012,10 +1012,3 @@ it("should call function after delay", () => {
|
||||
vi.useRealTimers();
|
||||
});
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- **Jest Documentation**: https://jestjs.io/
|
||||
- **Vitest Documentation**: https://vitest.dev/
|
||||
- **Testing Library**: https://testing-library.com/
|
||||
- **Kent C. Dodds Testing Blog**: https://kentcdodds.com/blog/
|
||||
|
||||
@@ -917,11 +917,3 @@ const first = doubled.next().value; // Only computes first value
|
||||
6. **Blocking event loop**: Avoid synchronous operations
|
||||
7. **Memory leaks**: Clean up event listeners and timers
|
||||
8. **Not handling promise rejections**: Use catch() or try/catch
|
||||
|
||||
## Resources
|
||||
|
||||
- **MDN Web Docs**: https://developer.mozilla.org/en-US/docs/Web/JavaScript
|
||||
- **JavaScript.info**: https://javascript.info/
|
||||
- **You Don't Know JS**: https://github.com/getify/You-Dont-Know-JS
|
||||
- **Eloquent JavaScript**: https://eloquentjavascript.net/
|
||||
- **ES6 Features**: http://es6-features.org/
|
||||
|
||||
@@ -1039,10 +1039,3 @@ export class ApiResponse {
|
||||
## Testing Patterns
|
||||
|
||||
See `javascript-testing-patterns` skill for comprehensive testing guidance.
|
||||
|
||||
## Resources
|
||||
|
||||
- **Node.js Best Practices**: https://github.com/goldbergyoni/nodebestpractices
|
||||
- **Express.js Guide**: https://expressjs.com/en/guide/
|
||||
- **Fastify Documentation**: https://www.fastify.io/docs/
|
||||
- **TypeScript Node Starter**: https://github.com/microsoft/TypeScript-Node-Starter
|
||||
|
||||
@@ -715,10 +715,3 @@ type ShouldError = ExpectError<AssertEqual<string, number>>;
|
||||
- Cache complex type computations
|
||||
- Limit recursion depth in recursive types
|
||||
- Use build tools to skip type checking in production
|
||||
|
||||
## Resources
|
||||
|
||||
- **TypeScript Handbook**: https://www.typescriptlang.org/docs/handbook/
|
||||
- **Type Challenges**: https://github.com/type-challenges/type-challenges
|
||||
- **TypeScript Deep Dive**: https://basarat.gitbook.io/typescript/
|
||||
- **Effective TypeScript**: Book by Dan Vanderkam
|
||||
|
||||
@@ -553,12 +553,6 @@ helm install my-app ./my-app --dry-run --debug
|
||||
kubectl get events --sort-by='.lastTimestamp'
|
||||
```
|
||||
|
||||
## Reference Files
|
||||
|
||||
- `assets/Chart.yaml.template` - Chart metadata template
|
||||
- `assets/values.yaml.template` - Values structure template
|
||||
- `scripts/validate-chart.sh` - Validation script
|
||||
- `references/chart-structure.md` - Detailed chart organization
|
||||
|
||||
## Related Skills
|
||||
|
||||
|
||||
@@ -340,11 +340,6 @@ kubectl auth can-i list pods --as system:serviceaccount:default:my-sa
|
||||
kubectl auth can-i '*' '*' --as system:serviceaccount:default:my-sa
|
||||
```
|
||||
|
||||
## Reference Files
|
||||
|
||||
- `assets/network-policy-template.yaml` - Network policy examples
|
||||
- `assets/pod-security-template.yaml` - Pod security policies
|
||||
- `references/rbac-patterns.md` - RBAC configuration patterns
|
||||
|
||||
## Related Skills
|
||||
|
||||
|
||||
@@ -598,11 +598,3 @@ def compare_embedding_models(
|
||||
- **Don't skip preprocessing**: Garbage in, garbage out
|
||||
- **Don't over-chunk**: Lose important context
|
||||
- **Don't forget metadata**: Essential for filtering and debugging
|
||||
|
||||
## Resources
|
||||
|
||||
- [Voyage AI Documentation](https://docs.voyageai.com/)
|
||||
- [OpenAI Embeddings Guide](https://platform.openai.com/docs/guides/embeddings)
|
||||
- [Sentence Transformers](https://www.sbert.net/)
|
||||
- [MTEB Benchmark](https://huggingface.co/spaces/mteb/leaderboard)
|
||||
- [LangChain Embedding Models](https://python.langchain.com/docs/integrations/text_embedding/)
|
||||
|
||||
@@ -562,9 +562,3 @@ class HybridRAGPipeline:
|
||||
- **Don't skip keyword search** - Handles exact matches better
|
||||
- **Don't over-fetch** - Balance recall vs latency
|
||||
- **Don't ignore edge cases** - Empty results, single word queries
|
||||
|
||||
## Resources
|
||||
|
||||
- [RRF Paper](https://plg.uwaterloo.ca/~gvcormac/cormacksigir09-rrf.pdf)
|
||||
- [Vespa Hybrid Search](https://blog.vespa.ai/improving-text-ranking-with-few-shot-prompting/)
|
||||
- [Cohere Rerank](https://docs.cohere.com/docs/reranking)
|
||||
|
||||
@@ -632,35 +632,3 @@ index = pc.Index("my-index")
|
||||
# Create vector store with existing index
|
||||
vectorstore = PineconeVectorStore(index=index, embedding=embeddings)
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- [LangChain Documentation](https://python.langchain.com/docs/)
|
||||
- [LangGraph Documentation](https://langchain-ai.github.io/langgraph/)
|
||||
- [LangSmith Platform](https://smith.langchain.com/)
|
||||
- [LangChain GitHub](https://github.com/langchain-ai/langchain)
|
||||
- [LangGraph GitHub](https://github.com/langchain-ai/langgraph)
|
||||
|
||||
## Common Pitfalls
|
||||
|
||||
1. **Using Deprecated APIs**: Use LangGraph for agents, not `initialize_agent`
|
||||
2. **Memory Overflow**: Use checkpointers with TTL for long-running agents
|
||||
3. **Poor Tool Descriptions**: Clear descriptions help LLM select correct tools
|
||||
4. **Context Window Exceeded**: Use summarization or sliding window memory
|
||||
5. **No Error Handling**: Wrap tool functions with try/except
|
||||
6. **Blocking Operations**: Use async methods (`ainvoke`, `astream`)
|
||||
7. **Missing Observability**: Always enable LangSmith tracing in production
|
||||
|
||||
## Production Checklist
|
||||
|
||||
- [ ] Use LangGraph StateGraph for agent orchestration
|
||||
- [ ] Implement async patterns throughout (`ainvoke`, `astream`)
|
||||
- [ ] Add production checkpointer (PostgreSQL, Redis)
|
||||
- [ ] Enable LangSmith tracing
|
||||
- [ ] Implement structured tools with Pydantic schemas
|
||||
- [ ] Add timeout limits for agent execution
|
||||
- [ ] Implement rate limiting
|
||||
- [ ] Add comprehensive error handling
|
||||
- [ ] Set up health checks
|
||||
- [ ] Version control prompts and configurations
|
||||
- [ ] Write integration tests for agent workflows
|
||||
|
||||
@@ -664,32 +664,3 @@ class BenchmarkRunner:
|
||||
for metric, scores in results.items()
|
||||
}
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- [LangSmith Evaluation Guide](https://docs.smith.langchain.com/evaluation)
|
||||
- [RAGAS Framework](https://docs.ragas.io/)
|
||||
- [DeepEval Library](https://docs.deepeval.com/)
|
||||
- [Arize Phoenix](https://docs.arize.com/phoenix/)
|
||||
- [HELM Benchmark](https://crfm.stanford.edu/helm/)
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. **Multiple Metrics**: Use diverse metrics for comprehensive view
|
||||
2. **Representative Data**: Test on real-world, diverse examples
|
||||
3. **Baselines**: Always compare against baseline performance
|
||||
4. **Statistical Rigor**: Use proper statistical tests for comparisons
|
||||
5. **Continuous Evaluation**: Integrate into CI/CD pipeline
|
||||
6. **Human Validation**: Combine automated metrics with human judgment
|
||||
7. **Error Analysis**: Investigate failures to understand weaknesses
|
||||
8. **Version Control**: Track evaluation results over time
|
||||
|
||||
## Common Pitfalls
|
||||
|
||||
- **Single Metric Obsession**: Optimizing for one metric at the expense of others
|
||||
- **Small Sample Size**: Drawing conclusions from too few examples
|
||||
- **Data Contamination**: Testing on training data
|
||||
- **Ignoring Variance**: Not accounting for statistical uncertainty
|
||||
- **Metric Mismatch**: Using metrics not aligned with business goals
|
||||
- **Position Bias**: In pairwise evals, randomize order
|
||||
- **Overfitting Prompts**: Optimizing for test set instead of real use
|
||||
|
||||
@@ -471,10 +471,3 @@ Track these KPIs for your prompts:
|
||||
- **Token Usage**: Average tokens per request
|
||||
- **Success Rate**: Percentage of valid, parseable outputs
|
||||
- **User Satisfaction**: Ratings and feedback
|
||||
|
||||
## Resources
|
||||
|
||||
- [Anthropic Prompt Engineering Guide](https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering)
|
||||
- [Claude Prompt Caching](https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching)
|
||||
- [OpenAI Prompt Engineering](https://platform.openai.com/docs/guides/prompt-engineering)
|
||||
- [LangChain Prompts](https://python.langchain.com/docs/concepts/prompts/)
|
||||
|
||||
@@ -540,31 +540,3 @@ async def evaluate_rag_system(
|
||||
|
||||
return {k: sum(v) / len(v) for k, v in metrics.items()}
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- [LangChain RAG Tutorial](https://python.langchain.com/docs/tutorials/rag/)
|
||||
- [LangGraph RAG Examples](https://langchain-ai.github.io/langgraph/tutorials/rag/)
|
||||
- [Pinecone Best Practices](https://docs.pinecone.io/guides/get-started/overview)
|
||||
- [Voyage AI Embeddings](https://docs.voyageai.com/)
|
||||
- [RAG Evaluation Guide](https://docs.ragas.io/)
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. **Chunk Size**: Balance between context (larger) and specificity (smaller) - typically 500-1000 tokens
|
||||
2. **Overlap**: Use 10-20% overlap to preserve context at boundaries
|
||||
3. **Metadata**: Include source, page, timestamp for filtering and debugging
|
||||
4. **Hybrid Search**: Combine semantic and keyword search for best recall
|
||||
5. **Reranking**: Use cross-encoder reranking for precision-critical applications
|
||||
6. **Citations**: Always return source documents for transparency
|
||||
7. **Evaluation**: Continuously test retrieval quality and answer accuracy
|
||||
8. **Monitoring**: Track retrieval metrics and latency in production
|
||||
|
||||
## Common Issues
|
||||
|
||||
- **Poor Retrieval**: Check embedding quality, chunk size, query formulation
|
||||
- **Irrelevant Results**: Add metadata filtering, use hybrid search, rerank
|
||||
- **Missing Information**: Ensure documents are properly indexed, check chunking
|
||||
- **Slow Queries**: Optimize vector store, use caching, reduce k
|
||||
- **Hallucinations**: Improve grounding prompt, add verification step
|
||||
- **Context Too Long**: Use compression or parent document retriever
|
||||
|
||||
@@ -551,10 +551,3 @@ class WeaviateVectorStore:
|
||||
- **Don't over-index** - Start with flat, scale up
|
||||
- **Don't ignore latency** - P99 matters for UX
|
||||
- **Don't forget costs** - Vector storage adds up
|
||||
|
||||
## Resources
|
||||
|
||||
- [Pinecone Docs](https://docs.pinecone.io/)
|
||||
- [Qdrant Docs](https://qdrant.tech/documentation/)
|
||||
- [pgvector](https://github.com/pgvector/pgvector)
|
||||
- [Weaviate Docs](https://weaviate.io/developers/weaviate)
|
||||
|
||||
@@ -515,9 +515,3 @@ def profile_index_build(
|
||||
- **Don't ignore build time** - Index updates have cost
|
||||
- **Don't forget reindexing** - Plan for maintenance
|
||||
- **Don't skip warming** - Cold indexes are slow
|
||||
|
||||
## Resources
|
||||
|
||||
- [HNSW Paper](https://arxiv.org/abs/1603.09320)
|
||||
- [Faiss Wiki](https://github.com/facebookresearch/faiss/wiki)
|
||||
- [ANN Benchmarks](https://ann-benchmarks.com/)
|
||||
|
||||
@@ -441,11 +441,6 @@ def process_request():
|
||||
- Use batch span processor
|
||||
- Check exporter configuration
|
||||
|
||||
## Reference Files
|
||||
|
||||
- `references/jaeger-setup.md` - Jaeger installation
|
||||
- `references/instrumentation.md` - Instrumentation patterns
|
||||
- `assets/jaeger-config.yaml.template` - Jaeger configuration
|
||||
|
||||
## Related Skills
|
||||
|
||||
|
||||
@@ -375,12 +375,6 @@ resource "grafana_folder" "monitoring" {
|
||||
notify: restart grafana
|
||||
```
|
||||
|
||||
## Reference Files
|
||||
|
||||
- `assets/api-dashboard.json` - API monitoring dashboard
|
||||
- `assets/infrastructure-dashboard.json` - Infrastructure dashboard
|
||||
- `assets/database-dashboard.json` - Database monitoring dashboard
|
||||
- `references/dashboard-design.md` - Dashboard design guide
|
||||
|
||||
## Related Skills
|
||||
|
||||
|
||||
@@ -386,12 +386,6 @@ curl http://localhost:9090/api/v1/status/config
|
||||
curl 'http://localhost:9090/api/v1/query?query=up'
|
||||
```
|
||||
|
||||
## Reference Files
|
||||
|
||||
- `assets/prometheus.yml.template` - Complete configuration template
|
||||
- `references/scrape-configs.md` - Scrape configuration patterns
|
||||
- `references/recording-rules.md` - Recording rule examples
|
||||
- `scripts/validate-prometheus.sh` - Validation script
|
||||
|
||||
## Related Skills
|
||||
|
||||
|
||||
@@ -326,11 +326,6 @@ rules:
|
||||
9. **Automate SLO reporting**
|
||||
10. **Use SLOs for prioritization**
|
||||
|
||||
## Reference Files
|
||||
|
||||
- `assets/slo-template.md` - SLO definition template
|
||||
- `references/slo-definitions.md` - SLO definition patterns
|
||||
- `references/error-budget.md` - Error budget calculations
|
||||
|
||||
## Related Skills
|
||||
|
||||
|
||||
@@ -535,32 +535,3 @@ class UsageBillingEngine:
|
||||
|
||||
return charge
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- **references/billing-cycles.md**: Billing cycle management
|
||||
- **references/dunning-management.md**: Failed payment recovery
|
||||
- **references/proration.md**: Prorated charge calculations
|
||||
- **references/tax-calculation.md**: Tax/VAT/GST handling
|
||||
- **references/invoice-lifecycle.md**: Invoice state management
|
||||
- **assets/billing-state-machine.yaml**: Billing workflow
|
||||
- **assets/invoice-template.html**: Invoice templates
|
||||
- **assets/dunning-policy.yaml**: Dunning configuration
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. **Automate Everything**: Minimize manual intervention
|
||||
2. **Clear Communication**: Notify customers of billing events
|
||||
3. **Flexible Retry Logic**: Balance recovery with customer experience
|
||||
4. **Accurate Proration**: Fair calculation for plan changes
|
||||
5. **Tax Compliance**: Calculate correct tax for jurisdiction
|
||||
6. **Audit Trail**: Log all billing events
|
||||
7. **Graceful Degradation**: Handle edge cases without breaking
|
||||
|
||||
## Common Pitfalls
|
||||
|
||||
- **Incorrect Proration**: Not accounting for partial periods
|
||||
- **Missing Tax**: Forgetting to add tax to invoices
|
||||
- **Aggressive Dunning**: Canceling too quickly
|
||||
- **No Notifications**: Not informing customers of failures
|
||||
- **Hardcoded Cycles**: Not supporting custom billing dates
|
||||
|
||||
@@ -448,31 +448,3 @@ def test_payment_flow():
|
||||
# captured = client.capture_order(order['id'])
|
||||
# assert captured['status'] == 'COMPLETED'
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- **references/express-checkout.md**: Express Checkout implementation guide
|
||||
- **references/ipn-handling.md**: IPN verification and processing
|
||||
- **references/refund-workflows.md**: Refund handling patterns
|
||||
- **references/billing-agreements.md**: Recurring billing setup
|
||||
- **assets/paypal-client.py**: Production PayPal client
|
||||
- **assets/ipn-processor.py**: IPN webhook processor
|
||||
- **assets/recurring-billing.py**: Subscription management
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. **Always Verify IPN**: Never trust IPN without verification
|
||||
2. **Idempotent Processing**: Handle duplicate IPN notifications
|
||||
3. **Error Handling**: Implement robust error handling
|
||||
4. **Logging**: Log all transactions and errors
|
||||
5. **Test Thoroughly**: Use sandbox extensively
|
||||
6. **Webhook Backup**: Don't rely solely on client-side callbacks
|
||||
7. **Currency Handling**: Always specify currency explicitly
|
||||
|
||||
## Common Pitfalls
|
||||
|
||||
- **Not Verifying IPN**: Accepting IPN without verification
|
||||
- **Duplicate Processing**: Not checking for duplicate transactions
|
||||
- **Wrong Environment**: Mixing sandbox and production URLs/credentials
|
||||
- **Missing Webhooks**: Not handling all payment states
|
||||
- **Hardcoded Values**: Not making configurable for different environments
|
||||
|
||||
@@ -446,35 +446,3 @@ PCI_COMPLIANCE_CHECKLIST = {
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- **references/data-minimization.md**: Never store prohibited data
|
||||
- **references/tokenization.md**: Tokenization strategies
|
||||
- **references/encryption.md**: Encryption requirements
|
||||
- **references/access-control.md**: Role-based access
|
||||
- **references/audit-logging.md**: Comprehensive logging
|
||||
- **assets/pci-compliance-checklist.md**: Complete checklist
|
||||
- **assets/encrypted-storage.py**: Encryption utilities
|
||||
- **scripts/audit-payment-system.sh**: Compliance audit script
|
||||
|
||||
## Common Violations
|
||||
|
||||
1. **Storing CVV**: Never store card verification codes
|
||||
2. **Unencrypted PAN**: Card numbers must be encrypted at rest
|
||||
3. **Weak Encryption**: Use AES-256 or equivalent
|
||||
4. **No Access Controls**: Restrict who can access cardholder data
|
||||
5. **Missing Audit Logs**: Must log all access to payment data
|
||||
6. **Insecure Transmission**: Always use TLS 1.2+
|
||||
7. **Default Passwords**: Change all default credentials
|
||||
8. **No Security Testing**: Regular penetration testing required
|
||||
|
||||
## Reducing PCI Scope
|
||||
|
||||
1. **Use Hosted Payments**: Stripe Checkout, PayPal, etc.
|
||||
2. **Tokenization**: Replace card data with tokens
|
||||
3. **Network Segmentation**: Isolate cardholder data environment
|
||||
4. **Outsource**: Use PCI-compliant payment processors
|
||||
5. **No Storage**: Never store full card details
|
||||
|
||||
By minimizing systems that touch card data, you reduce compliance burden significantly.
|
||||
|
||||
@@ -490,33 +490,3 @@ def test_payment_flow():
|
||||
|
||||
assert confirmed.status == 'succeeded'
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- **references/checkout-flows.md**: Detailed checkout implementation
|
||||
- **references/webhook-handling.md**: Webhook security and processing
|
||||
- **references/subscription-management.md**: Subscription lifecycle
|
||||
- **references/customer-management.md**: Customer and payment method handling
|
||||
- **references/invoice-generation.md**: Invoicing and billing
|
||||
- **assets/stripe-client.py**: Production-ready Stripe client wrapper
|
||||
- **assets/webhook-handler.py**: Complete webhook processor
|
||||
- **assets/checkout-config.json**: Checkout configuration templates
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. **Always Use Webhooks**: Don't rely solely on client-side confirmation
|
||||
2. **Idempotency**: Handle webhook events idempotently
|
||||
3. **Error Handling**: Gracefully handle all Stripe errors
|
||||
4. **Test Mode**: Thoroughly test with test keys before production
|
||||
5. **Metadata**: Use metadata to link Stripe objects to your database
|
||||
6. **Monitoring**: Track payment success rates and errors
|
||||
7. **PCI Compliance**: Never handle raw card data on your server
|
||||
8. **SCA Ready**: Implement 3D Secure for European payments
|
||||
|
||||
## Common Pitfalls
|
||||
|
||||
- **Not Verifying Webhooks**: Always verify webhook signatures
|
||||
- **Missing Webhook Events**: Handle all relevant webhook events
|
||||
- **Hardcoded Amounts**: Use cents/smallest currency unit
|
||||
- **No Retry Logic**: Implement retries for API calls
|
||||
- **Ignoring Test Mode**: Test all edge cases with test cards
|
||||
|
||||
@@ -733,25 +733,3 @@ async def test_with_timeout():
|
||||
with pytest.raises(asyncio.TimeoutError):
|
||||
await asyncio.wait_for(slow_operation(5), timeout=1.0)
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- **Python asyncio documentation**: https://docs.python.org/3/library/asyncio.html
|
||||
- **aiohttp**: Async HTTP client/server
|
||||
- **FastAPI**: Modern async web framework
|
||||
- **asyncpg**: Async PostgreSQL driver
|
||||
- **motor**: Async MongoDB driver
|
||||
|
||||
## Best Practices Summary
|
||||
|
||||
1. **Use asyncio.run()** for entry point (Python 3.7+)
|
||||
2. **Always await coroutines** to execute them
|
||||
3. **Limit concurrency with semaphores** - unbounded `gather()` can exhaust resources
|
||||
4. **Implement proper error handling** with try/except
|
||||
5. **Use timeouts** to prevent hanging operations
|
||||
6. **Pool connections** for better performance
|
||||
7. **Never block the event loop** - use `asyncio.to_thread()` for sync code
|
||||
8. **Use semaphores** for rate limiting external API calls
|
||||
9. **Handle task cancellation** properly - always re-raise `CancelledError`
|
||||
10. **Test async code** with pytest-asyncio
|
||||
11. **Stay consistent** - fully sync or fully async, avoid mixing
|
||||
|
||||
@@ -864,25 +864,3 @@ recursive-exclude * *.py[co]
|
||||
- [ ] GitHub repository linked
|
||||
- [ ] Tested on TestPyPI first
|
||||
- [ ] Git tag created for release
|
||||
|
||||
## Resources
|
||||
|
||||
- **Python Packaging Guide**: https://packaging.python.org/
|
||||
- **PyPI**: https://pypi.org/
|
||||
- **TestPyPI**: https://test.pypi.org/
|
||||
- **setuptools documentation**: https://setuptools.pypa.io/
|
||||
- **build**: https://pypa-build.readthedocs.io/
|
||||
- **twine**: https://twine.readthedocs.io/
|
||||
|
||||
## Best Practices Summary
|
||||
|
||||
1. **Use src/ layout** for cleaner package structure
|
||||
2. **Use pyproject.toml** for modern packaging
|
||||
3. **Pin build dependencies** in build-system.requires
|
||||
4. **Version appropriately** with semantic versioning
|
||||
5. **Include all metadata** (classifiers, URLs, etc.)
|
||||
6. **Test installation** in clean environments
|
||||
7. **Use TestPyPI** before publishing to PyPI
|
||||
8. **Document thoroughly** with README and docstrings
|
||||
9. **Include LICENSE** file
|
||||
10. **Automate publishing** with CI/CD
|
||||
|
||||
@@ -849,26 +849,3 @@ def test_map_function(benchmark):
|
||||
- Ignoring algorithmic complexity
|
||||
- Over-optimizing rare code paths
|
||||
- Not considering memory usage
|
||||
|
||||
## Resources
|
||||
|
||||
- **cProfile**: Built-in CPU profiler
|
||||
- **memory_profiler**: Memory usage profiling
|
||||
- **line_profiler**: Line-by-line profiling
|
||||
- **py-spy**: Sampling profiler for production
|
||||
- **NumPy**: High-performance numerical computing
|
||||
- **Cython**: Compile Python to C
|
||||
- **PyPy**: Alternative Python interpreter with JIT
|
||||
|
||||
## Performance Checklist
|
||||
|
||||
- [ ] Profiled code to identify bottlenecks
|
||||
- [ ] Used appropriate data structures
|
||||
- [ ] Implemented caching where beneficial
|
||||
- [ ] Optimized database queries
|
||||
- [ ] Used generators for large datasets
|
||||
- [ ] Considered multiprocessing for CPU-bound tasks
|
||||
- [ ] Used async I/O for I/O-bound tasks
|
||||
- [ ] Minimized function call overhead in hot loops
|
||||
- [ ] Checked for memory leaks
|
||||
- [ ] Benchmarked before and after optimization
|
||||
|
||||
@@ -1026,25 +1026,3 @@ exclude_lines = [
|
||||
"raise NotImplementedError",
|
||||
]
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- **pytest documentation**: https://docs.pytest.org/
|
||||
- **unittest.mock**: https://docs.python.org/3/library/unittest.mock.html
|
||||
- **hypothesis**: Property-based testing
|
||||
- **pytest-asyncio**: Testing async code
|
||||
- **pytest-cov**: Coverage reporting
|
||||
- **pytest-mock**: pytest wrapper for mock
|
||||
|
||||
## Best Practices Summary
|
||||
|
||||
1. **Write tests first** (TDD) or alongside code
|
||||
2. **One assertion per test** when possible
|
||||
3. **Use descriptive test names** that explain behavior
|
||||
4. **Keep tests independent** and isolated
|
||||
5. **Use fixtures** for setup and teardown
|
||||
6. **Mock external dependencies** appropriately
|
||||
7. **Parametrize tests** to reduce duplication
|
||||
8. **Test edge cases** and error conditions
|
||||
9. **Measure coverage** but focus on quality
|
||||
10. **Run tests in CI/CD** on every commit
|
||||
|
||||
@@ -811,24 +811,3 @@ uv cache clean # Clear cache
|
||||
uv cache dir # Show cache location
|
||||
uv --version # Show version
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- **Official documentation**: https://docs.astral.sh/uv/
|
||||
- **GitHub repository**: https://github.com/astral-sh/uv
|
||||
- **Astral blog**: https://astral.sh/blog
|
||||
- **Migration guides**: https://docs.astral.sh/uv/guides/
|
||||
- **Comparison with other tools**: https://docs.astral.sh/uv/pip/compatibility/
|
||||
|
||||
## Best Practices Summary
|
||||
|
||||
1. **Use uv for all new projects** - Start with `uv init`
|
||||
2. **Commit lockfiles** - Ensure reproducible builds
|
||||
3. **Pin Python versions** - Use .python-version
|
||||
4. **Use uv run** - Avoid manual venv activation
|
||||
5. **Leverage caching** - Let uv manage global cache
|
||||
6. **Use --frozen in CI** - Exact reproduction
|
||||
7. **Keep uv updated** - Fast-moving project
|
||||
8. **Use workspaces** - For monorepo projects
|
||||
9. **Export for compatibility** - Generate requirements.txt when needed
|
||||
10. **Read the docs** - uv is feature-rich and evolving
|
||||
|
||||
@@ -655,9 +655,3 @@ def calculate_metrics(returns: pd.Series, rf_rate: float = 0.02) -> Dict[str, fl
|
||||
- **Don't use adjusted data carelessly** - Understand adjustments
|
||||
- **Don't optimize on full history** - Reserve test set
|
||||
- **Don't ignore capacity** - Market impact matters
|
||||
|
||||
## Resources
|
||||
|
||||
- [Advances in Financial Machine Learning (Marcos López de Prado)](https://www.amazon.com/Advances-Financial-Machine-Learning-Marcos/dp/1119482089)
|
||||
- [Quantitative Trading (Ernest Chan)](https://www.amazon.com/Quantitative-Trading-Build-Algorithmic-Business/dp/1119800064)
|
||||
- [Backtrader Documentation](https://www.backtrader.com/docu/)
|
||||
|
||||
@@ -549,9 +549,3 @@ for metric, value in summary.items():
|
||||
- **Don't ignore correlation** - Increases in stress
|
||||
- **Don't use short lookbacks** - Miss regime changes
|
||||
- **Don't forget transaction costs** - Affects realized risk
|
||||
|
||||
## Resources
|
||||
|
||||
- [Risk Management and Financial Institutions (John Hull)](https://www.amazon.com/Risk-Management-Financial-Institutions-5th/dp/1119448115)
|
||||
- [Quantitative Risk Management (McNeil, Frey, Embrechts)](https://www.amazon.com/Quantitative-Risk-Management-Techniques-Princeton/dp/0691166277)
|
||||
- [pyfolio Documentation](https://quantopian.github.io/pyfolio/)
|
||||
|
||||
@@ -679,9 +679,3 @@ class AttackPathAnalyzer:
|
||||
- **Don't forget insider threats** - Not all attackers are external
|
||||
- **Don't skip mitigations** - Trees are for defense planning
|
||||
- **Don't make it static** - Threat landscape evolves
|
||||
|
||||
## Resources
|
||||
|
||||
- [Attack Trees by Bruce Schneier](https://www.schneier.com/academic/archives/1999/12/attack_trees.html)
|
||||
- [MITRE ATT&CK Framework](https://attack.mitre.org/)
|
||||
- [OWASP Attack Surface Analysis](https://owasp.org/www-community/controls/Attack_Surface_Analysis_Cheat_Sheet)
|
||||
|
||||
@@ -671,9 +671,3 @@ This epic covers all security requirements related to {domain.value.replace('_',
|
||||
- **Don't ignore priorities** - Not all requirements are equal
|
||||
- **Don't forget testability** - If you can't test it, you can't verify it
|
||||
- **Don't work in isolation** - Involve stakeholders
|
||||
|
||||
## Resources
|
||||
|
||||
- [OWASP ASVS](https://owasp.org/www-project-application-security-verification-standard/)
|
||||
- [NIST SP 800-53](https://csrc.nist.gov/publications/detail/sp/800-53/rev-5/final)
|
||||
- [Security User Stories](https://www.oreilly.com/library/view/agile-application-security/9781491938836/)
|
||||
|
||||
@@ -656,9 +656,3 @@ class StridePerInteraction:
|
||||
- **Don't work in isolation** - Collaborative modeling is better
|
||||
- **Don't ignore low-probability** - High-impact threats matter
|
||||
- **Don't stop at identification** - Follow through with mitigations
|
||||
|
||||
## Resources
|
||||
|
||||
- [Microsoft STRIDE Documentation](https://docs.microsoft.com/en-us/azure/security/develop/threat-modeling-tool-threats)
|
||||
- [OWASP Threat Modeling](https://owasp.org/www-community/Threat_Modeling)
|
||||
- [Threat Modeling: Designing for Security](https://www.wiley.com/en-us/Threat+Modeling%3A+Designing+for+Security-p-9781118809990)
|
||||
|
||||
@@ -739,9 +739,3 @@ class ControlTester:
|
||||
- **Don't skip testing** - Untested controls may fail
|
||||
- **Don't set and forget** - Continuous improvement
|
||||
- **Don't ignore people/process** - Technology alone isn't enough
|
||||
|
||||
## Resources
|
||||
|
||||
- [NIST Cybersecurity Framework](https://www.nist.gov/cyberframework)
|
||||
- [CIS Controls](https://www.cisecurity.org/controls)
|
||||
- [MITRE D3FEND](https://d3fend.mitre.org/)
|
||||
|
||||
@@ -531,9 +531,3 @@ check_dependencies
|
||||
12. **Test error paths** - Ensure error handling works correctly
|
||||
13. **Use `command -v`** - Safer than `which` for checking executables
|
||||
14. **Prefer printf over echo** - More predictable across systems
|
||||
|
||||
## Resources
|
||||
|
||||
- **Bash Strict Mode**: http://redsymbol.net/articles/unofficial-bash-strict-mode/
|
||||
- **Google Shell Style Guide**: https://google.github.io/styleguide/shellguide.html
|
||||
- **Defensive BASH Programming**: https://www.lifepipe.net/
|
||||
|
||||
@@ -622,10 +622,3 @@ coverage: test
|
||||
8. **Test across shell dialects** - Ensure portability
|
||||
9. **Keep tests fast** - Run in parallel when possible
|
||||
10. **Document complex test setup** - Explain unusual patterns
|
||||
|
||||
## Resources
|
||||
|
||||
- **Bats GitHub**: https://github.com/bats-core/bats-core
|
||||
- **Bats Documentation**: https://bats-core.readthedocs.io/
|
||||
- **TAP Protocol**: https://testanything.org/
|
||||
- **Test-Driven Development**: https://en.wikipedia.org/wiki/Test-driven_development
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user