foliko 1.1.2 → 1.1.4

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 (205) hide show
  1. package/.agent/agents/code-assistant.json +14 -0
  2. package/.agent/agents/email-assistant.json +14 -0
  3. package/.agent/agents/file-assistant.json +15 -0
  4. package/.agent/agents/system-assistant.json +15 -0
  5. package/.agent/agents/web-assistant.json +12 -0
  6. package/.agent/data/ambient/goals.json +50 -0
  7. package/.agent/data/ambient/memories.json +7 -0
  8. package/.agent/data/default.json +3 -412
  9. package/.agent/data/plugins-state.json +174 -173
  10. package/.agent/data/scheduler/tasks.json +1 -0
  11. package/.agent/memory/core.md +1 -0
  12. package/.agent/memory/project/mnn93ogy-ypjn27.md +9 -0
  13. package/.agent/memory/project/mnn98fqy-5nhc1u.md +25 -0
  14. package/.agent/memory/reference/mnq3oenw-46haj6.md +63 -0
  15. package/.agent/memory/reference/mnq5qxm2-mjoooh.md +116 -0
  16. package/.agent/memory/user/mnm67t9m-x8rekk.md +9 -0
  17. package/.agent/memory/user/mnn5mmqh-w6aktx.md +11 -0
  18. package/.agent/memory/user/mnnbfhhn-dk1bd1.md +22 -0
  19. package/.agent/package.json +8 -0
  20. package/.agent/plugins/__pycache__/file_writer.cpython-312.pyc +0 -0
  21. package/.agent/plugins/daytona/README.md +89 -0
  22. package/.agent/plugins/daytona/index.js +377 -0
  23. package/.agent/plugins/daytona/package.json +12 -0
  24. package/.agent/plugins/marknative/README.md +134 -0
  25. package/.agent/plugins/marknative/fonts/SegoeUI Emoji.ttf +0 -0
  26. package/.agent/plugins/marknative/index.js +256 -0
  27. package/.agent/plugins/marknative/package.json +12 -0
  28. package/.agent/plugins/marknative/update-readme.js +134 -0
  29. package/.agent/plugins/poster-plugin/emojis/rocket.png +1 -0
  30. package/.agent/plugins/poster-plugin/fonts/SegoeUI Emoji.ttf +0 -0
  31. package/.agent/plugins/poster-plugin/src/elements/text.js +3 -1
  32. package/.agent/plugins/poster-plugin/src/fonts.js +10 -0
  33. package/.agent/plugins/poster-plugin/yarn.lock +1007 -0
  34. package/.agent/plugins/system-info/index.js +387 -0
  35. package/.agent/plugins/system-info/package.json +4 -0
  36. package/.agent/plugins/system-info/test.js +40 -0
  37. package/.agent/plugins.json +11 -5
  38. package/.agent/python-scripts/test_sample.py +24 -0
  39. package/.agent/sessions/cli_default.json +1869 -691
  40. package/.agent/skills/agent-browser/SKILL.md +311 -0
  41. package/.agent/skills/agent-browser/TEST_PLAN.md +200 -0
  42. package/.agent/skills/sysinfo/SKILL.md +38 -0
  43. package/.agent/skills/sysinfo/system-info.sh +130 -0
  44. package/.agent/skills/workflow/SKILL.md +324 -0
  45. package/.agent/weixin.json +6 -0
  46. package/.agent/workflows/email-digest.json +50 -0
  47. package/.agent/workflows/file-backup.json +21 -0
  48. package/.agent/workflows/get-ip-notify.json +32 -0
  49. package/.agent/workflows/news-aggregator.json +93 -0
  50. package/.agent/workflows/news-dashboard-v2.json +94 -0
  51. package/.agent/workflows/notification-batch.json +32 -0
  52. package/.claude/settings.local.json +1 -20
  53. package/.env.example +56 -56
  54. package/README.md +441 -441
  55. package/cli/src/commands/chat.js +22 -13
  56. package/cli/src/ui/chat-ui.js +50 -37
  57. package/output/emoji-segoe-test-v2.png +0 -0
  58. package/output/emoji-segoe-test.png +0 -0
  59. package/output/emoji-test.png +0 -0
  60. package/output/emoji-windows-test.png +0 -0
  61. package/output/foliko-emoji-poster.png +0 -0
  62. package/output/foliko-muji-poster-final.png +0 -0
  63. package/output/foliko-muji-poster-v2.png +0 -0
  64. package/output/foliko-muji-poster.png +0 -0
  65. package/output/foliko-share.png +0 -0
  66. package/output/progress-circle-test.png +0 -0
  67. package/output/vb-agent-poster.png +0 -0
  68. package/package.json +1 -2
  69. package/plugins/default-plugins.js +4 -3
  70. package/plugins/extension-executor-plugin.js +12 -91
  71. package/plugins/file-system-plugin.js +19 -4
  72. package/plugins/memory-plugin.js +33 -4
  73. package/plugins/subagent-plugin.js +14 -37
  74. package/plugins/weixin-plugin.js +40 -168
  75. package/skills/find-skills/AGENTS.md +162 -162
  76. package/skills/find-skills/SKILL.md +133 -133
  77. package/skills/poster-guide/SKILL.md +669 -1426
  78. package/src/core/agent-chat.js +439 -269
  79. package/src/core/agent.js +3 -6
  80. package/.agent/.shared/ui-ux-pro-max/data/charts.csv +0 -26
  81. package/.agent/.shared/ui-ux-pro-max/data/colors.csv +0 -97
  82. package/.agent/.shared/ui-ux-pro-max/data/icons.csv +0 -101
  83. package/.agent/.shared/ui-ux-pro-max/data/landing.csv +0 -31
  84. package/.agent/.shared/ui-ux-pro-max/data/products.csv +0 -97
  85. package/.agent/.shared/ui-ux-pro-max/data/prompts.csv +0 -24
  86. package/.agent/.shared/ui-ux-pro-max/data/react-performance.csv +0 -45
  87. package/.agent/.shared/ui-ux-pro-max/data/stacks/flutter.csv +0 -53
  88. package/.agent/.shared/ui-ux-pro-max/data/stacks/html-tailwind.csv +0 -56
  89. package/.agent/.shared/ui-ux-pro-max/data/stacks/jetpack-compose.csv +0 -53
  90. package/.agent/.shared/ui-ux-pro-max/data/stacks/nextjs.csv +0 -53
  91. package/.agent/.shared/ui-ux-pro-max/data/stacks/nuxt-ui.csv +0 -51
  92. package/.agent/.shared/ui-ux-pro-max/data/stacks/nuxtjs.csv +0 -59
  93. package/.agent/.shared/ui-ux-pro-max/data/stacks/react-native.csv +0 -52
  94. package/.agent/.shared/ui-ux-pro-max/data/stacks/react.csv +0 -54
  95. package/.agent/.shared/ui-ux-pro-max/data/stacks/shadcn.csv +0 -61
  96. package/.agent/.shared/ui-ux-pro-max/data/stacks/svelte.csv +0 -54
  97. package/.agent/.shared/ui-ux-pro-max/data/stacks/swiftui.csv +0 -51
  98. package/.agent/.shared/ui-ux-pro-max/data/stacks/vue.csv +0 -50
  99. package/.agent/.shared/ui-ux-pro-max/data/styles.csv +0 -59
  100. package/.agent/.shared/ui-ux-pro-max/data/typography.csv +0 -58
  101. package/.agent/.shared/ui-ux-pro-max/data/ui-reasoning.csv +0 -101
  102. package/.agent/.shared/ui-ux-pro-max/data/ux-guidelines.csv +0 -100
  103. package/.agent/.shared/ui-ux-pro-max/data/web-interface.csv +0 -31
  104. package/.agent/.shared/ui-ux-pro-max/scripts/__pycache__/core.cpython-313.pyc +0 -0
  105. package/.agent/.shared/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-313.pyc +0 -0
  106. package/.agent/.shared/ui-ux-pro-max/scripts/core.py +0 -258
  107. package/.agent/.shared/ui-ux-pro-max/scripts/design_system.py +0 -1067
  108. package/.agent/.shared/ui-ux-pro-max/scripts/search.py +0 -106
  109. package/.agent/ARCHITECTURE.md +0 -288
  110. package/.agent/agents/ambient-agent.md +0 -57
  111. package/.agent/agents/debugger.md +0 -55
  112. package/.agent/agents/email-assistant.md +0 -49
  113. package/.agent/agents/file-manager.md +0 -42
  114. package/.agent/agents/python-developer.md +0 -60
  115. package/.agent/agents/scheduler.md +0 -59
  116. package/.agent/agents/web-developer.md +0 -45
  117. package/.agent/data/puppeteer-sessions/undefined.json +0 -6
  118. package/.agent/data/weixin-media/2026-04-08/img_1775618677512.jpg +0 -0
  119. package/.agent/data/weixin-media/2026-04-08/img_1775619073340.jpg +0 -0
  120. package/.agent/data/weixin-media/2026-04-08/img_1775619097536.jpg +0 -0
  121. package/.agent/data/weixin-media/2026-04-08/img_1775619209388.jpg +0 -0
  122. package/.agent/mcp_config_updated.json +0 -12
  123. package/.agent/plugins/poster-plugin/fonts/NotoColorEmoji-Regular.ttf +0 -0
  124. package/.agent/plugins/puppeteer-plugin/README.md +0 -147
  125. package/.agent/plugins/puppeteer-plugin/index.js +0 -1418
  126. package/.agent/plugins/puppeteer-plugin/package.json +0 -9
  127. package/.agent/rules/GEMINI.md +0 -273
  128. package/.agent/rules/allow-rule.md +0 -77
  129. package/.agent/rules/log-rule.md +0 -83
  130. package/.agent/rules/security-rule.md +0 -93
  131. package/.agent/scripts/auto_preview.py +0 -148
  132. package/.agent/scripts/checklist.py +0 -217
  133. package/.agent/scripts/session_manager.py +0 -120
  134. package/.agent/scripts/verify_all.py +0 -327
  135. package/.agent/sessions/weixin_o9cq80zgZqKPA2-s59PN43GdDy1w@im.wechat.json +0 -11097
  136. package/.agent/skills/api-patterns/SKILL.md +0 -81
  137. package/.agent/skills/api-patterns/api-style.md +0 -42
  138. package/.agent/skills/api-patterns/auth.md +0 -24
  139. package/.agent/skills/api-patterns/documentation.md +0 -26
  140. package/.agent/skills/api-patterns/graphql.md +0 -41
  141. package/.agent/skills/api-patterns/rate-limiting.md +0 -31
  142. package/.agent/skills/api-patterns/response.md +0 -37
  143. package/.agent/skills/api-patterns/rest.md +0 -40
  144. package/.agent/skills/api-patterns/scripts/api_validator.py +0 -211
  145. package/.agent/skills/api-patterns/security-testing.md +0 -122
  146. package/.agent/skills/api-patterns/trpc.md +0 -41
  147. package/.agent/skills/api-patterns/versioning.md +0 -22
  148. package/.agent/skills/app-builder/SKILL.md +0 -75
  149. package/.agent/skills/app-builder/agent-coordination.md +0 -71
  150. package/.agent/skills/app-builder/feature-building.md +0 -53
  151. package/.agent/skills/app-builder/project-detection.md +0 -34
  152. package/.agent/skills/app-builder/scaffolding.md +0 -118
  153. package/.agent/skills/app-builder/tech-stack.md +0 -40
  154. package/.agent/skills/app-builder/templates/SKILL.md +0 -39
  155. package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +0 -76
  156. package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +0 -92
  157. package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +0 -88
  158. package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +0 -88
  159. package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +0 -83
  160. package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +0 -90
  161. package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +0 -90
  162. package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +0 -122
  163. package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +0 -122
  164. package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +0 -169
  165. package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +0 -134
  166. package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +0 -83
  167. package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +0 -119
  168. package/.agent/skills/architecture/SKILL.md +0 -55
  169. package/.agent/skills/architecture/context-discovery.md +0 -43
  170. package/.agent/skills/architecture/examples.md +0 -94
  171. package/.agent/skills/architecture/pattern-selection.md +0 -68
  172. package/.agent/skills/architecture/patterns-reference.md +0 -50
  173. package/.agent/skills/architecture/trade-off-analysis.md +0 -77
  174. package/.agent/skills/clean-code/SKILL.md +0 -201
  175. package/.agent/skills/doc.md +0 -177
  176. package/.agent/skills/frontend-design/SKILL.md +0 -418
  177. package/.agent/skills/frontend-design/animation-guide.md +0 -331
  178. package/.agent/skills/frontend-design/color-system.md +0 -311
  179. package/.agent/skills/frontend-design/decision-trees.md +0 -418
  180. package/.agent/skills/frontend-design/motion-graphics.md +0 -306
  181. package/.agent/skills/frontend-design/scripts/accessibility_checker.py +0 -183
  182. package/.agent/skills/frontend-design/scripts/ux_audit.py +0 -722
  183. package/.agent/skills/frontend-design/typography-system.md +0 -345
  184. package/.agent/skills/frontend-design/ux-psychology.md +0 -1116
  185. package/.agent/skills/frontend-design/visual-effects.md +0 -383
  186. package/.agent/skills/i18n-localization/SKILL.md +0 -154
  187. package/.agent/skills/i18n-localization/scripts/i18n_checker.py +0 -241
  188. package/.agent/skills/mcp-builder/SKILL.md +0 -176
  189. package/.agent/skills/web-design-guidelines/SKILL.md +0 -57
  190. package/.agent/workflows/brainstorm.md +0 -113
  191. package/.agent/workflows/create.md +0 -59
  192. package/.agent/workflows/debug.md +0 -103
  193. package/.agent/workflows/deploy.md +0 -176
  194. package/.agent/workflows/enhance.md +0 -63
  195. package/.agent/workflows/orchestrate.md +0 -237
  196. package/.agent/workflows/plan.md +0 -89
  197. package/.agent/workflows/preview.md +0 -81
  198. package/.agent/workflows/simple-test.md +0 -42
  199. package/.agent/workflows/status.md +0 -86
  200. package/.agent/workflows/structured-orchestrate.md +0 -180
  201. package/.agent/workflows/test.md +0 -144
  202. package/.agent/workflows/ui-ux-pro-max.md +0 -296
  203. package/output/beef-love-poster.png +0 -0
  204. package/output/international-news-daily.png +0 -0
  205. package/poster-test-2.png +0 -0
@@ -1,68 +0,0 @@
1
- # Pattern Selection Guidelines
2
-
3
- > Decision trees for choosing architectural patterns.
4
-
5
- ## Main Decision Tree
6
-
7
- ```
8
- START: What's your MAIN concern?
9
-
10
- ┌─ Data Access Complexity?
11
- │ ├─ HIGH (complex queries, testing needed)
12
- │ │ → Repository Pattern + Unit of Work
13
- │ │ VALIDATE: Will data source change frequently?
14
- │ │ ├─ YES → Repository worth the indirection
15
- │ │ └─ NO → Consider simpler ORM direct access
16
- │ └─ LOW (simple CRUD, single database)
17
- │ → ORM directly (Prisma, Drizzle)
18
- │ Simpler = Better, Faster
19
-
20
- ├─ Business Rules Complexity?
21
- │ ├─ HIGH (domain logic, rules vary by context)
22
- │ │ → Domain-Driven Design
23
- │ │ VALIDATE: Do you have domain experts on team?
24
- │ │ ├─ YES → Full DDD (Aggregates, Value Objects)
25
- │ │ └─ NO → Partial DDD (rich entities, clear boundaries)
26
- │ └─ LOW (mostly CRUD, simple validation)
27
- │ → Transaction Script pattern
28
- │ Simpler = Better, Faster
29
-
30
- ├─ Independent Scaling Needed?
31
- │ ├─ YES (different components scale differently)
32
- │ │ → Microservices WORTH the complexity
33
- │ │ REQUIREMENTS (ALL must be true):
34
- │ │ - Clear domain boundaries
35
- │ │ - Team > 10 developers
36
- │ │ - Different scaling needs per service
37
- │ │ IF NOT ALL MET → Modular Monolith instead
38
- │ └─ NO (everything scales together)
39
- │ → Modular Monolith
40
- │ Can extract services later when proven needed
41
-
42
- └─ Real-time Requirements?
43
- ├─ HIGH (immediate updates, multi-user sync)
44
- │ → Event-Driven Architecture
45
- │ → Message Queue (RabbitMQ, Redis, Kafka)
46
- │ VALIDATE: Can you handle eventual consistency?
47
- │ ├─ YES → Event-driven valid
48
- │ └─ NO → Synchronous with polling
49
- └─ LOW (eventual consistency acceptable)
50
- → Synchronous (REST/GraphQL)
51
- Simpler = Better, Faster
52
- ```
53
-
54
- ## The 3 Questions (Before ANY Pattern)
55
-
56
- 1. **Problem Solved**: What SPECIFIC problem does this pattern solve?
57
- 2. **Simpler Alternative**: Is there a simpler solution?
58
- 3. **Deferred Complexity**: Can we add this LATER when needed?
59
-
60
- ## Red Flags (Anti-patterns)
61
-
62
- | Pattern | Anti-pattern | Simpler Alternative |
63
- |---------|-------------|-------------------|
64
- | Microservices | Premature splitting | Start monolith, extract later |
65
- | Clean/Hexagonal | Over-abstraction | Concrete first, interfaces later |
66
- | Event Sourcing | Over-engineering | Append-only audit log |
67
- | CQRS | Unnecessary complexity | Single model |
68
- | Repository | YAGNI for simple CRUD | ORM direct access |
@@ -1,50 +0,0 @@
1
- # Architecture Patterns Reference
2
-
3
- > Quick reference for common patterns with usage guidance.
4
-
5
- ## Data Access Patterns
6
-
7
- | Pattern | When to Use | When NOT to Use | Complexity |
8
- |---------|-------------|-----------------|------------|
9
- | **Active Record** | Simple CRUD, rapid prototyping | Complex queries, multiple sources | Low |
10
- | **Repository** | Testing needed, multiple sources | Simple CRUD, single database | Medium |
11
- | **Unit of Work** | Complex transactions | Simple operations | High |
12
- | **Data Mapper** | Complex domain, performance | Simple CRUD, rapid dev | High |
13
-
14
- ## Domain Logic Patterns
15
-
16
- | Pattern | When to Use | When NOT to Use | Complexity |
17
- |---------|-------------|-----------------|------------|
18
- | **Transaction Script** | Simple CRUD, procedural | Complex business rules | Low |
19
- | **Table Module** | Record-based logic | Rich behavior needed | Low |
20
- | **Domain Model** | Complex business logic | Simple CRUD | Medium |
21
- | **DDD (Full)** | Complex domain, domain experts | Simple domain, no experts | High |
22
-
23
- ## Distributed System Patterns
24
-
25
- | Pattern | When to Use | When NOT to Use | Complexity |
26
- |---------|-------------|-----------------|------------|
27
- | **Modular Monolith** | Small teams, unclear boundaries | Clear contexts, different scales | Medium |
28
- | **Microservices** | Different scales, large teams | Small teams, simple domain | Very High |
29
- | **Event-Driven** | Real-time, loose coupling | Simple workflows, strong consistency | High |
30
- | **CQRS** | Read/write performance diverges | Simple CRUD, same model | High |
31
- | **Saga** | Distributed transactions | Single database, simple ACID | High |
32
-
33
- ## API Patterns
34
-
35
- | Pattern | When to Use | When NOT to Use | Complexity |
36
- |---------|-------------|-----------------|------------|
37
- | **REST** | Standard CRUD, resources | Real-time, complex queries | Low |
38
- | **GraphQL** | Flexible queries, multiple clients | Simple CRUD, caching needs | Medium |
39
- | **gRPC** | Internal services, performance | Public APIs, browser clients | Medium |
40
- | **WebSocket** | Real-time updates | Simple request/response | Medium |
41
-
42
- ---
43
-
44
- ## Simplicity Principle
45
-
46
- **"Start simple, add complexity only when proven necessary."**
47
-
48
- - You can always add patterns later
49
- - Removing complexity is MUCH harder than adding it
50
- - When in doubt, choose simpler option
@@ -1,77 +0,0 @@
1
- # Trade-off Analysis & ADR
2
-
3
- > Document every architectural decision with trade-offs.
4
-
5
- ## Decision Framework
6
-
7
- For EACH architectural component, document:
8
-
9
- ```markdown
10
- ## Architecture Decision Record
11
-
12
- ### Context
13
- - **Problem**: [What problem are we solving?]
14
- - **Constraints**: [Team size, scale, timeline, budget]
15
-
16
- ### Options Considered
17
-
18
- | Option | Pros | Cons | Complexity | When Valid |
19
- |--------|------|------|------------|-----------|
20
- | Option A | Benefit 1 | Cost 1 | Low | [Conditions] |
21
- | Option B | Benefit 2 | Cost 2 | High | [Conditions] |
22
-
23
- ### Decision
24
- **Chosen**: [Option B]
25
-
26
- ### Rationale
27
- 1. [Reason 1 - tied to constraints]
28
- 2. [Reason 2 - tied to requirements]
29
-
30
- ### Trade-offs Accepted
31
- - [What we're giving up]
32
- - [Why this is acceptable]
33
-
34
- ### Consequences
35
- - **Positive**: [Benefits we gain]
36
- - **Negative**: [Costs/risks we accept]
37
- - **Mitigation**: [How we'll address negatives]
38
-
39
- ### Revisit Trigger
40
- - [When to reconsider this decision]
41
- ```
42
-
43
- ## ADR Template
44
-
45
- ```markdown
46
- # ADR-[XXX]: [Decision Title]
47
-
48
- ## Status
49
- Proposed | Accepted | Deprecated | Superseded by [ADR-YYY]
50
-
51
- ## Context
52
- [What problem? What constraints?]
53
-
54
- ## Decision
55
- [What we chose - be specific]
56
-
57
- ## Rationale
58
- [Why - tie to requirements and constraints]
59
-
60
- ## Trade-offs
61
- [What we're giving up - be honest]
62
-
63
- ## Consequences
64
- - **Positive**: [Benefits]
65
- - **Negative**: [Costs]
66
- - **Mitigation**: [How to address]
67
- ```
68
-
69
- ## ADR Storage
70
-
71
- ```
72
- docs/
73
- └── architecture/
74
- ├── adr-001-use-nextjs.md
75
- ├── adr-002-postgresql-over-mongodb.md
76
- └── adr-003-adopt-repository-pattern.md
77
- ```
@@ -1,201 +0,0 @@
1
- ---
2
- name: clean-code
3
- description: Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments
4
- allowed-tools: Read, Write, Edit
5
- version: 2.0
6
- priority: CRITICAL
7
- ---
8
-
9
- # Clean Code - Pragmatic AI Coding Standards
10
-
11
- > **CRITICAL SKILL** - Be **concise, direct, and solution-focused**.
12
-
13
- ---
14
-
15
- ## Core Principles
16
-
17
- | Principle | Rule |
18
- |-----------|------|
19
- | **SRP** | Single Responsibility - each function/class does ONE thing |
20
- | **DRY** | Don't Repeat Yourself - extract duplicates, reuse |
21
- | **KISS** | Keep It Simple - simplest solution that works |
22
- | **YAGNI** | You Aren't Gonna Need It - don't build unused features |
23
- | **Boy Scout** | Leave code cleaner than you found it |
24
-
25
- ---
26
-
27
- ## Naming Rules
28
-
29
- | Element | Convention |
30
- |---------|------------|
31
- | **Variables** | Reveal intent: `userCount` not `n` |
32
- | **Functions** | Verb + noun: `getUserById()` not `user()` |
33
- | **Booleans** | Question form: `isActive`, `hasPermission`, `canEdit` |
34
- | **Constants** | SCREAMING_SNAKE: `MAX_RETRY_COUNT` |
35
-
36
- > **Rule:** If you need a comment to explain a name, rename it.
37
-
38
- ---
39
-
40
- ## Function Rules
41
-
42
- | Rule | Description |
43
- |------|-------------|
44
- | **Small** | Max 20 lines, ideally 5-10 |
45
- | **One Thing** | Does one thing, does it well |
46
- | **One Level** | One level of abstraction per function |
47
- | **Few Args** | Max 3 arguments, prefer 0-2 |
48
- | **No Side Effects** | Don't mutate inputs unexpectedly |
49
-
50
- ---
51
-
52
- ## Code Structure
53
-
54
- | Pattern | Apply |
55
- |---------|-------|
56
- | **Guard Clauses** | Early returns for edge cases |
57
- | **Flat > Nested** | Avoid deep nesting (max 2 levels) |
58
- | **Composition** | Small functions composed together |
59
- | **Colocation** | Keep related code close |
60
-
61
- ---
62
-
63
- ## AI Coding Style
64
-
65
- | Situation | Action |
66
- |-----------|--------|
67
- | User asks for feature | Write it directly |
68
- | User reports bug | Fix it, don't explain |
69
- | No clear requirement | Ask, don't assume |
70
-
71
- ---
72
-
73
- ## Anti-Patterns (DON'T)
74
-
75
- | ❌ Pattern | ✅ Fix |
76
- |-----------|-------|
77
- | Comment every line | Delete obvious comments |
78
- | Helper for one-liner | Inline the code |
79
- | Factory for 2 objects | Direct instantiation |
80
- | utils.ts with 1 function | Put code where used |
81
- | "First we import..." | Just write code |
82
- | Deep nesting | Guard clauses |
83
- | Magic numbers | Named constants |
84
- | God functions | Split by responsibility |
85
-
86
- ---
87
-
88
- ## 🔴 Before Editing ANY File (THINK FIRST!)
89
-
90
- **Before changing a file, ask yourself:**
91
-
92
- | Question | Why |
93
- |----------|-----|
94
- | **What imports this file?** | They might break |
95
- | **What does this file import?** | Interface changes |
96
- | **What tests cover this?** | Tests might fail |
97
- | **Is this a shared component?** | Multiple places affected |
98
-
99
- **Quick Check:**
100
- ```
101
- File to edit: UserService.ts
102
- └── Who imports this? → UserController.ts, AuthController.ts
103
- └── Do they need changes too? → Check function signatures
104
- ```
105
-
106
- > 🔴 **Rule:** Edit the file + all dependent files in the SAME task.
107
- > 🔴 **Never leave broken imports or missing updates.**
108
-
109
- ---
110
-
111
- ## Summary
112
-
113
- | Do | Don't |
114
- |----|-------|
115
- | Write code directly | Write tutorials |
116
- | Let code self-document | Add obvious comments |
117
- | Fix bugs immediately | Explain the fix first |
118
- | Inline small things | Create unnecessary files |
119
- | Name things clearly | Use abbreviations |
120
- | Keep functions small | Write 100+ line functions |
121
-
122
- > **Remember: The user wants working code, not a programming lesson.**
123
-
124
- ---
125
-
126
- ## 🔴 Self-Check Before Completing (MANDATORY)
127
-
128
- **Before saying "task complete", verify:**
129
-
130
- | Check | Question |
131
- |-------|----------|
132
- | ✅ **Goal met?** | Did I do exactly what user asked? |
133
- | ✅ **Files edited?** | Did I modify all necessary files? |
134
- | ✅ **Code works?** | Did I test/verify the change? |
135
- | ✅ **No errors?** | Lint and TypeScript pass? |
136
- | ✅ **Nothing forgotten?** | Any edge cases missed? |
137
-
138
- > 🔴 **Rule:** If ANY check fails, fix it before completing.
139
-
140
- ---
141
-
142
- ## Verification Scripts (MANDATORY)
143
-
144
- > 🔴 **CRITICAL:** Each agent runs ONLY their own skill's scripts after completing work.
145
-
146
- ### Agent → Script Mapping
147
-
148
- | Agent | Script | Command |
149
- |-------|--------|---------|
150
- | **frontend-specialist** | UX Audit | `python .agent/skills/frontend-design/scripts/ux_audit.py .` |
151
- | **frontend-specialist** | A11y Check | `python .agent/skills/frontend-design/scripts/accessibility_checker.py .` |
152
- | **backend-specialist** | API Validator | `python .agent/skills/api-patterns/scripts/api_validator.py .` |
153
- | **mobile-developer** | Mobile Audit | `python .agent/skills/mobile-design/scripts/mobile_audit.py .` |
154
- | **database-architect** | Schema Validate | `python .agent/skills/database-design/scripts/schema_validator.py .` |
155
- | **security-auditor** | Security Scan | `python .agent/skills/vulnerability-scanner/scripts/security_scan.py .` |
156
- | **seo-specialist** | SEO Check | `python .agent/skills/seo-fundamentals/scripts/seo_checker.py .` |
157
- | **seo-specialist** | GEO Check | `python .agent/skills/geo-fundamentals/scripts/geo_checker.py .` |
158
- | **performance-optimizer** | Lighthouse | `python .agent/skills/performance-profiling/scripts/lighthouse_audit.py <url>` |
159
- | **test-engineer** | Test Runner | `python .agent/skills/testing-patterns/scripts/test_runner.py .` |
160
- | **test-engineer** | Playwright | `python .agent/skills/webapp-testing/scripts/playwright_runner.py <url>` |
161
- | **Any agent** | Lint Check | `python .agent/skills/lint-and-validate/scripts/lint_runner.py .` |
162
- | **Any agent** | Type Coverage | `python .agent/skills/lint-and-validate/scripts/type_coverage.py .` |
163
- | **Any agent** | i18n Check | `python .agent/skills/i18n-localization/scripts/i18n_checker.py .` |
164
-
165
- > ❌ **WRONG:** `test-engineer` running `ux_audit.py`
166
- > ✅ **CORRECT:** `frontend-specialist` running `ux_audit.py`
167
-
168
- ---
169
-
170
- ### 🔴 Script Output Handling (READ → SUMMARIZE → ASK)
171
-
172
- **When running a validation script, you MUST:**
173
-
174
- 1. **Run the script** and capture ALL output
175
- 2. **Parse the output** - identify errors, warnings, and passes
176
- 3. **Summarize to user** in this format:
177
-
178
- ```markdown
179
- ## Script Results: [script_name.py]
180
-
181
- ### ❌ Errors Found (X items)
182
- - [File:Line] Error description 1
183
- - [File:Line] Error description 2
184
-
185
- ### ⚠️ Warnings (Y items)
186
- - [File:Line] Warning description
187
-
188
- ### ✅ Passed (Z items)
189
- - Check 1 passed
190
- - Check 2 passed
191
-
192
- **Should I fix the X errors?**
193
- ```
194
-
195
- 4. **Wait for user confirmation** before fixing
196
- 5. **After fixing** → Re-run script to confirm
197
-
198
- > 🔴 **VIOLATION:** Running script and ignoring output = FAILED task.
199
- > 🔴 **VIOLATION:** Auto-fixing without asking = Not allowed.
200
- > 🔴 **Rule:** Always READ output → SUMMARIZE → ASK → then fix.
201
-
@@ -1,177 +0,0 @@
1
- # Antigravity Skills
2
-
3
- > **Guide to creating and using Skills in the Antigravity Kit**
4
-
5
- ---
6
-
7
- ## 📋 Overview
8
-
9
- While Antigravity's base models (like Gemini) are powerful generalists, they don't know your specific project context or your team's standards. Loading every rule or tool into the agent's context window leads to "tool bloat," higher costs, latency, and confusion.
10
-
11
- **Antigravity Skills** solve this through **Progressive Disclosure**. A Skill is a package of specialized knowledge that remains dormant until needed. This information is only loaded into the agent's context when your specific request matches the skill's description.
12
-
13
- ---
14
-
15
- ## 📁 Structure and Scope
16
-
17
- Skills are folder-based packages. You can define these scopes based on your needs:
18
-
19
- | Scope | Path | Description |
20
- | ------------- | --------------------------------- | ------------------------------------ |
21
- | **Workspace** | `<workspace-root>/.agent/skills/` | Available only in a specific project |
22
-
23
- ### Skill Directory Structure
24
-
25
- ```
26
- my-skill/
27
- ├── SKILL.md # (Required) Metadata & instructions
28
- ├── scripts/ # (Optional) Python or Bash scripts
29
- ├── references/ # (Optional) Text, documentation, templates
30
- └── assets/ # (Optional) Images or logos
31
- ```
32
-
33
- ---
34
-
35
- ## 🔍 Example 1: Code Review Skill
36
-
37
- This is an instruction-only skill; you only need to create the `SKILL.md` file.
38
-
39
- ### Step 1: Create the directory
40
-
41
- ```bash
42
- mkdir -p .agent/skills/code-review
43
- ```
44
-
45
- ### Step 2: Create SKILL.md
46
-
47
- ```markdown
48
- ---
49
- name: code-review
50
- description: Reviews code changes for bugs, style issues, and best practices. Use when reviewing PRs or checking code quality.
51
- ---
52
-
53
- # Code Review Skill
54
-
55
- When reviewing code, follow these steps:
56
-
57
- ## Review checklist
58
-
59
- 1. **Correctness**: Does the code do what it's supposed to?
60
- 2. **Edge cases**: Are error conditions handled?
61
- 3. **Style**: Does it follow project conventions?
62
- 4. **Performance**: Are there obvious inefficiencies?
63
-
64
- ## How to provide feedback
65
-
66
- - Be specific about what needs to change
67
- - Explain why, not just what
68
- - Suggest alternatives when possible
69
- ```
70
-
71
- > **Note**: The `SKILL.md` file contains metadata (name, description) at the top, followed by the instructions. The agent will only read the metadata and load the full instructions only when needed.
72
-
73
- ### Try it out
74
-
75
- Create a file `demo_bad_code.py`:
76
-
77
- ```python
78
- import time
79
-
80
- def get_user_data(users, id):
81
- # Find user by ID
82
- for u in users:
83
- if u['id'] == id:
84
- return u
85
- return None
86
-
87
- def process_payments(items):
88
- total = 0
89
- for i in items:
90
- # Calculate tax
91
- tax = i['price'] * 0.1
92
- total = total + i['price'] + tax
93
- time.sleep(0.1) # Simulate slow network call
94
- return total
95
-
96
- def run_batch():
97
- users = [{'id': 1, 'name': 'Alice'}, {'id': 2, 'name': 'Bob'}]
98
- items = [{'price': 10}, {'price': 20}, {'price': 100}]
99
-
100
- u = get_user_data(users, 3)
101
- print("User found: " + u['name']) # Will crash if None
102
-
103
- print("Total: " + str(process_payments(items)))
104
-
105
- if __name__ == "__main__":
106
- run_batch()
107
- ```
108
-
109
- **Prompt**: `review the @demo_bad_code.py file`
110
-
111
- The Agent will automatically identify the `code-review` skill, load the information, and follow the instructions.
112
-
113
- ---
114
-
115
- ## 📄 Example 2: License Header Skill
116
-
117
- This skill uses a reference file in the `resources/` (or `references/`) directory.
118
-
119
- ### Step 1: Create the directory
120
-
121
- ```bash
122
- mkdir -p .agent/skills/license-header-adder/resources
123
- ```
124
-
125
- ### Step 2: Create the template file
126
-
127
- **`.agent/skills/license-header-adder/resources/HEADER.txt`**:
128
-
129
- ```
130
- /*
131
- * Copyright (c) 2026 YOUR_COMPANY_NAME LLC.
132
- * All rights reserved.
133
- * This code is proprietary and confidential.
134
- */
135
- ```
136
-
137
- ### Step 3: Create SKILL.md
138
-
139
- **`.agent/skills/license-header-adder/SKILL.md`**:
140
-
141
- ```markdown
142
- ---
143
- name: license-header-adder
144
- description: Adds the standard corporate license header to new source files.
145
- ---
146
-
147
- # License Header Adder
148
-
149
- This skill ensures that all new source files have the correct copyright header.
150
-
151
- ## Instructions
152
-
153
- 1. **Read the Template**: Read the content of `resources/HEADER.txt`.
154
- 2. **Apply to File**: When creating a new file, prepend this exact content.
155
- 3. **Adapt Syntax**:
156
- - For C-style languages (Java, TS), keep the `/* */` block.
157
- - For Python/Shell, convert to `#` comments.
158
- ```
159
-
160
- ### Try it out
161
-
162
- **Prompt**: `Create a new Python script named data_processor.py that prints 'Hello World'.`
163
-
164
- The Agent will read the template, convert the comments to Python style, and automatically add it to the top of the file.
165
-
166
- ---
167
-
168
- ## 🎯 Conclusion
169
-
170
- By creating Skills, you transform a general AI model into an expert for your project:
171
-
172
- - ✅ Systematize best practices
173
- - ✅ Adhere to code review rules
174
- - ✅ Automatically add license headers
175
- - ✅ The Agent automatically knows how to work with your team
176
-
177
- Instead of constantly reminding the AI to "remember to add the license" or "fix the commit format," now the Agent will do it automatically!