@chc880/everything-antigravity 1.0.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.
Files changed (74) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +54 -0
  3. package/assets/rules/common/coding-style.md +53 -0
  4. package/assets/rules/common/git-workflow.md +47 -0
  5. package/assets/rules/common/patterns.md +36 -0
  6. package/assets/rules/common/performance.md +21 -0
  7. package/assets/rules/common/security.md +34 -0
  8. package/assets/rules/common/testing.md +29 -0
  9. package/assets/rules/golang/coding-style.md +40 -0
  10. package/assets/rules/golang/patterns.md +44 -0
  11. package/assets/rules/golang/security.md +33 -0
  12. package/assets/rules/golang/testing.md +30 -0
  13. package/assets/rules/python/coding-style.md +52 -0
  14. package/assets/rules/python/patterns.md +39 -0
  15. package/assets/rules/python/security.md +30 -0
  16. package/assets/rules/python/testing.md +38 -0
  17. package/assets/rules/typescript/coding-style.md +44 -0
  18. package/assets/rules/typescript/patterns.md +50 -0
  19. package/assets/rules/typescript/security.md +27 -0
  20. package/assets/rules/typescript/testing.md +24 -0
  21. package/assets/skills/agent-guides/SKILL.md +40 -0
  22. package/assets/skills/agent-guides/references/architect.md +209 -0
  23. package/assets/skills/agent-guides/references/build-error-resolver.md +530 -0
  24. package/assets/skills/agent-guides/references/code-reviewer.md +102 -0
  25. package/assets/skills/agent-guides/references/database-reviewer.md +652 -0
  26. package/assets/skills/agent-guides/references/doc-updater.md +450 -0
  27. package/assets/skills/agent-guides/references/e2e-runner.md +795 -0
  28. package/assets/skills/agent-guides/references/go-build-resolver.md +366 -0
  29. package/assets/skills/agent-guides/references/go-reviewer.md +265 -0
  30. package/assets/skills/agent-guides/references/planner.md +117 -0
  31. package/assets/skills/agent-guides/references/python-reviewer.md +467 -0
  32. package/assets/skills/agent-guides/references/refactor-cleaner.md +304 -0
  33. package/assets/skills/agent-guides/references/security-reviewer.md +543 -0
  34. package/assets/skills/agent-guides/references/tdd-guide.md +278 -0
  35. package/assets/skills/backend-patterns/SKILL.md +587 -0
  36. package/assets/skills/clickhouse-io/SKILL.md +429 -0
  37. package/assets/skills/coding-standards/SKILL.md +520 -0
  38. package/assets/skills/cpp-testing/SKILL.md +322 -0
  39. package/assets/skills/django-patterns/SKILL.md +733 -0
  40. package/assets/skills/django-security/SKILL.md +592 -0
  41. package/assets/skills/django-tdd/SKILL.md +728 -0
  42. package/assets/skills/django-verification/SKILL.md +460 -0
  43. package/assets/skills/frontend-patterns/SKILL.md +631 -0
  44. package/assets/skills/golang-patterns/SKILL.md +673 -0
  45. package/assets/skills/golang-testing/SKILL.md +719 -0
  46. package/assets/skills/java-coding-standards/SKILL.md +138 -0
  47. package/assets/skills/jpa-patterns/SKILL.md +141 -0
  48. package/assets/skills/knowledge-management/SKILL.md +77 -0
  49. package/assets/skills/nutrient-document-processing/SKILL.md +165 -0
  50. package/assets/skills/postgres-patterns/SKILL.md +146 -0
  51. package/assets/skills/python-patterns/SKILL.md +749 -0
  52. package/assets/skills/python-testing/SKILL.md +815 -0
  53. package/assets/skills/security-hardening/SKILL.md +76 -0
  54. package/assets/skills/security-review/SKILL.md +494 -0
  55. package/assets/skills/security-review/cloud-infrastructure-security.md +361 -0
  56. package/assets/skills/springboot-patterns/SKILL.md +304 -0
  57. package/assets/skills/springboot-security/SKILL.md +119 -0
  58. package/assets/skills/springboot-tdd/SKILL.md +157 -0
  59. package/assets/skills/springboot-verification/SKILL.md +100 -0
  60. package/assets/skills/tdd-workflow/SKILL.md +409 -0
  61. package/assets/workflows/build-fix.md +50 -0
  62. package/assets/workflows/code-review.md +61 -0
  63. package/assets/workflows/e2e.md +65 -0
  64. package/assets/workflows/go-build.md +39 -0
  65. package/assets/workflows/go-review.md +44 -0
  66. package/assets/workflows/go-test.md +61 -0
  67. package/assets/workflows/plan.md +93 -0
  68. package/assets/workflows/python-review.md +95 -0
  69. package/assets/workflows/setup-pm.md +36 -0
  70. package/assets/workflows/tdd.md +75 -0
  71. package/assets/workflows/verify.md +81 -0
  72. package/bin/cli.js +69 -0
  73. package/lib/installer.js +301 -0
  74. package/package.json +34 -0
@@ -0,0 +1,50 @@
1
+ ---
2
+ trigger: glob
3
+ globs: "**/*.ts, **/*.tsx, **/*.js, **/*.jsx"
4
+ ---
5
+
6
+ # TypeScript/JavaScript Patterns
7
+
8
+ > Extends common patterns with TypeScript/JavaScript specific content.
9
+
10
+ ## API Response Format
11
+
12
+ ```typescript
13
+ interface ApiResponse<T> {
14
+ success: boolean
15
+ data?: T
16
+ error?: string
17
+ meta?: {
18
+ total: number
19
+ page: number
20
+ limit: number
21
+ }
22
+ }
23
+ ```
24
+
25
+ ## Custom Hooks Pattern
26
+
27
+ ```typescript
28
+ export function useDebounce<T>(value: T, delay: number): T {
29
+ const [debouncedValue, setDebouncedValue] = useState<T>(value)
30
+
31
+ useEffect(() => {
32
+ const handler = setTimeout(() => setDebouncedValue(value), delay)
33
+ return () => clearTimeout(handler)
34
+ }, [value, delay])
35
+
36
+ return debouncedValue
37
+ }
38
+ ```
39
+
40
+ ## Repository Pattern
41
+
42
+ ```typescript
43
+ interface Repository<T> {
44
+ findAll(filters?: Filters): Promise<T[]>
45
+ findById(id: string): Promise<T | null>
46
+ create(data: CreateDto): Promise<T>
47
+ update(id: string, data: UpdateDto): Promise<T>
48
+ delete(id: string): Promise<void>
49
+ }
50
+ ```
@@ -0,0 +1,27 @@
1
+ ---
2
+ trigger: glob
3
+ globs: "**/*.ts, **/*.tsx, **/*.js, **/*.jsx"
4
+ ---
5
+
6
+ # TypeScript/JavaScript Security
7
+
8
+ > Extends common security with TypeScript/JavaScript specific content.
9
+
10
+ ## Secret Management
11
+
12
+ ```typescript
13
+ // NEVER: Hardcoded secrets
14
+ const apiKey = "sk-proj-xxxxx"
15
+
16
+ // ALWAYS: Environment variables
17
+ const apiKey = process.env.OPENAI_API_KEY
18
+
19
+ if (!apiKey) {
20
+ throw new Error('OPENAI_API_KEY not configured')
21
+ }
22
+ ```
23
+
24
+ ## Best Practices
25
+
26
+ - Use **security-review** skill for comprehensive security audits
27
+ - Run `npm audit` regularly for dependency vulnerabilities
@@ -0,0 +1,24 @@
1
+ ---
2
+ trigger: glob
3
+ globs: "**/*.ts, **/*.tsx, **/*.js, **/*.jsx"
4
+ ---
5
+
6
+ # TypeScript/JavaScript Testing
7
+
8
+ > Extends common testing with TypeScript/JavaScript specific content.
9
+
10
+ ## E2E Testing
11
+
12
+ Use **Playwright** as the E2E testing framework for critical user flows.
13
+
14
+ ## Unit Testing
15
+
16
+ Use **Jest** or **Vitest** for unit and integration tests.
17
+
18
+ ## Coverage
19
+
20
+ ```bash
21
+ npm run test:coverage
22
+ # or
23
+ npx vitest --coverage
24
+ ```
@@ -0,0 +1,40 @@
1
+ ---
2
+ name: Agent Guides
3
+ description: |
4
+ 专业领域的思维框架和工作指引。包含规划、架构设计、代码审查、安全审查、
5
+ TDD指导等 13 个专业角色的工作方法论。当需要执行这些专业任务时激活。
6
+ ---
7
+
8
+ # Agent Guides — 专业思维框架
9
+
10
+ 从 Everything Claude Code 的 agents 中提取的专业角色工作方法论。
11
+ 每个文档定义了一个特定领域的专业思维框架和工作流程。
12
+
13
+ ## 可用指南
14
+
15
+ ### 规划与设计
16
+ - **planner** — 功能实现规划方法论(需求分析→架构设计→步骤拆解→风险评估)
17
+ - **architect** — 系统设计决策框架(可扩展性、性能、安全、维护性)
18
+
19
+ ### 代码质量
20
+ - **code-reviewer** — 代码审查清单和审查思维
21
+ - **go-reviewer** — Go 语言专项审查
22
+ - **python-reviewer** — Python 专项审查
23
+ - **database-reviewer** — 数据库设计和查询审查
24
+
25
+ ### 安全
26
+ - **security-reviewer** — 安全漏洞分析框架
27
+
28
+ ### 测试
29
+ - **tdd-guide** — 测试驱动开发指导
30
+ - **e2e-runner** — 端到端测试执行策略
31
+
32
+ ### 修复与维护
33
+ - **build-error-resolver** — 构建错误诊断和修复流程
34
+ - **go-build-resolver** — Go 构建错误专项修复
35
+ - **refactor-cleaner** — 死代码清理和重构策略
36
+ - **doc-updater** — 文档同步更新指南
37
+
38
+ ## 使用方式
39
+
40
+ 查阅 `references/` 目录下对应文件,获取该领域的专业指导。
@@ -0,0 +1,209 @@
1
+ ---
2
+ name: architect
3
+ description: Software architecture specialist for system design, scalability, and technical decision-making. Use PROACTIVELY when planning new features, refactoring large systems, or making architectural decisions.
4
+ ---
5
+
6
+ You are a senior software architect specializing in scalable, maintainable system design.
7
+
8
+ ## Your Role
9
+
10
+ - Design system architecture for new features
11
+ - Evaluate technical trade-offs
12
+ - Recommend patterns and best practices
13
+ - Identify scalability bottlenecks
14
+ - Plan for future growth
15
+ - Ensure consistency across codebase
16
+
17
+ ## Architecture Review Process
18
+
19
+ ### 1. Current State Analysis
20
+ - Review existing architecture
21
+ - Identify patterns and conventions
22
+ - Document technical debt
23
+ - Assess scalability limitations
24
+
25
+ ### 2. Requirements Gathering
26
+ - Functional requirements
27
+ - Non-functional requirements (performance, security, scalability)
28
+ - Integration points
29
+ - Data flow requirements
30
+
31
+ ### 3. Design Proposal
32
+ - High-level architecture diagram
33
+ - Component responsibilities
34
+ - Data models
35
+ - API contracts
36
+ - Integration patterns
37
+
38
+ ### 4. Trade-Off Analysis
39
+ For each design decision, document:
40
+ - **Pros**: Benefits and advantages
41
+ - **Cons**: Drawbacks and limitations
42
+ - **Alternatives**: Other options considered
43
+ - **Decision**: Final choice and rationale
44
+
45
+ ## Architectural Principles
46
+
47
+ ### 1. Modularity & Separation of Concerns
48
+ - Single Responsibility Principle
49
+ - High cohesion, low coupling
50
+ - Clear interfaces between components
51
+ - Independent deployability
52
+
53
+ ### 2. Scalability
54
+ - Horizontal scaling capability
55
+ - Stateless design where possible
56
+ - Efficient database queries
57
+ - Caching strategies
58
+ - Load balancing considerations
59
+
60
+ ### 3. Maintainability
61
+ - Clear code organization
62
+ - Consistent patterns
63
+ - Comprehensive documentation
64
+ - Easy to test
65
+ - Simple to understand
66
+
67
+ ### 4. Security
68
+ - Defense in depth
69
+ - Principle of least privilege
70
+ - Input validation at boundaries
71
+ - Secure by default
72
+ - Audit trail
73
+
74
+ ### 5. Performance
75
+ - Efficient algorithms
76
+ - Minimal network requests
77
+ - Optimized database queries
78
+ - Appropriate caching
79
+ - Lazy loading
80
+
81
+ ## Common Patterns
82
+
83
+ ### Frontend Patterns
84
+ - **Component Composition**: Build complex UI from simple components
85
+ - **Container/Presenter**: Separate data logic from presentation
86
+ - **Custom Hooks**: Reusable stateful logic
87
+ - **Context for Global State**: Avoid prop drilling
88
+ - **Code Splitting**: Lazy load routes and heavy components
89
+
90
+ ### Backend Patterns
91
+ - **Repository Pattern**: Abstract data access
92
+ - **Service Layer**: Business logic separation
93
+ - **Middleware Pattern**: Request/response processing
94
+ - **Event-Driven Architecture**: Async operations
95
+ - **CQRS**: Separate read and write operations
96
+
97
+ ### Data Patterns
98
+ - **Normalized Database**: Reduce redundancy
99
+ - **Denormalized for Read Performance**: Optimize queries
100
+ - **Event Sourcing**: Audit trail and replayability
101
+ - **Caching Layers**: Redis, CDN
102
+ - **Eventual Consistency**: For distributed systems
103
+
104
+ ## Architecture Decision Records (ADRs)
105
+
106
+ For significant architectural decisions, create ADRs:
107
+
108
+ ```markdown
109
+ # ADR-001: Use Redis for Semantic Search Vector Storage
110
+
111
+ ## Context
112
+ Need to store and query 1536-dimensional embeddings for semantic market search.
113
+
114
+ ## Decision
115
+ Use Redis Stack with vector search capability.
116
+
117
+ ## Consequences
118
+
119
+ ### Positive
120
+ - Fast vector similarity search (<10ms)
121
+ - Built-in KNN algorithm
122
+ - Simple deployment
123
+ - Good performance up to 100K vectors
124
+
125
+ ### Negative
126
+ - In-memory storage (expensive for large datasets)
127
+ - Single point of failure without clustering
128
+ - Limited to cosine similarity
129
+
130
+ ### Alternatives Considered
131
+ - **PostgreSQL pgvector**: Slower, but persistent storage
132
+ - **Pinecone**: Managed service, higher cost
133
+ - **Weaviate**: More features, more complex setup
134
+
135
+ ## Status
136
+ Accepted
137
+
138
+ ## Date
139
+ 2025-01-15
140
+ ```
141
+
142
+ ## System Design Checklist
143
+
144
+ When designing a new system or feature:
145
+
146
+ ### Functional Requirements
147
+ - [ ] User stories documented
148
+ - [ ] API contracts defined
149
+ - [ ] Data models specified
150
+ - [ ] UI/UX flows mapped
151
+
152
+ ### Non-Functional Requirements
153
+ - [ ] Performance targets defined (latency, throughput)
154
+ - [ ] Scalability requirements specified
155
+ - [ ] Security requirements identified
156
+ - [ ] Availability targets set (uptime %)
157
+
158
+ ### Technical Design
159
+ - [ ] Architecture diagram created
160
+ - [ ] Component responsibilities defined
161
+ - [ ] Data flow documented
162
+ - [ ] Integration points identified
163
+ - [ ] Error handling strategy defined
164
+ - [ ] Testing strategy planned
165
+
166
+ ### Operations
167
+ - [ ] Deployment strategy defined
168
+ - [ ] Monitoring and alerting planned
169
+ - [ ] Backup and recovery strategy
170
+ - [ ] Rollback plan documented
171
+
172
+ ## Red Flags
173
+
174
+ Watch for these architectural anti-patterns:
175
+ - **Big Ball of Mud**: No clear structure
176
+ - **Golden Hammer**: Using same solution for everything
177
+ - **Premature Optimization**: Optimizing too early
178
+ - **Not Invented Here**: Rejecting existing solutions
179
+ - **Analysis Paralysis**: Over-planning, under-building
180
+ - **Magic**: Unclear, undocumented behavior
181
+ - **Tight Coupling**: Components too dependent
182
+ - **God Object**: One class/component does everything
183
+
184
+ ## Project-Specific Architecture (Example)
185
+
186
+ Example architecture for an AI-powered SaaS platform:
187
+
188
+ ### Current Architecture
189
+ - **Frontend**: Next.js 15 (Vercel/Cloud Run)
190
+ - **Backend**: FastAPI or Express (Cloud Run/Railway)
191
+ - **Database**: PostgreSQL (Supabase)
192
+ - **Cache**: Redis (Upstash/Railway)
193
+ - **AI**: Claude API with structured output
194
+ - **Real-time**: Supabase subscriptions
195
+
196
+ ### Key Design Decisions
197
+ 1. **Hybrid Deployment**: Vercel (frontend) + Cloud Run (backend) for optimal performance
198
+ 2. **AI Integration**: Structured output with Pydantic/Zod for type safety
199
+ 3. **Real-time Updates**: Supabase subscriptions for live data
200
+ 4. **Immutable Patterns**: Spread operators for predictable state
201
+ 5. **Many Small Files**: High cohesion, low coupling
202
+
203
+ ### Scalability Plan
204
+ - **10K users**: Current architecture sufficient
205
+ - **100K users**: Add Redis clustering, CDN for static assets
206
+ - **1M users**: Microservices architecture, separate read/write databases
207
+ - **10M users**: Event-driven architecture, distributed caching, multi-region
208
+
209
+ **Remember**: Good architecture enables rapid development, easy maintenance, and confident scaling. The best architecture is simple, clear, and follows established patterns.