anchi-kit 1.2.2 → 1.2.3

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.
@@ -0,0 +1,40 @@
1
+ # Pack: Architecture
2
+
3
+ Tier: Core
4
+ Load Cost: High
5
+ Keywords: ddd, solid, patterns, planning, system-design
6
+
7
+ ## Scope
8
+
9
+ This pack covers **Software Architecture and High-Level Planning**.
10
+
11
+ - **Includes**: Domain-Driven Design (DDD), Modular Monolith, SOLID principles, Project Structure, Implementation Planning.
12
+ - **Excludes**: Specific coding syntax.
13
+
14
+ ## Canonical Patterns (Best Practices)
15
+
16
+ ### 1. Structure (Modular Monolith)
17
+
18
+ - **Feature Modules**: Group by feature (`features/billing/`), not type (`controllers/`).
19
+ - **Encapsulation**: Modules expose a Public API (`index.ts`); internals are private.
20
+ - **Dependency Rule**: Outer layers depend on inner layers (Core Domain).
21
+
22
+ ### 2. SOLID Principles
23
+
24
+ - **SRP**: Single Responsibility per class/module.
25
+ - **DIP**: Depend on abstractions (interfaces), not concretions.
26
+
27
+ ### 3. Planning
28
+
29
+ - **Implementation Plan**: Always create `implementation_plan.md` before coding complex features.
30
+ - **Task Breakdown**: Break tasks into < 1 hour chunks.
31
+
32
+ ## Anti-Patterns (What to Avoid)
33
+
34
+ - ❌ **Big Ball of Mud**: Circular dependencies between all modules.
35
+ - ❌ **God Objects**: Classes that do everything.
36
+ - ❌ **Coding without Plan**: Jumping into code for complex tasks.
37
+
38
+ ## Load Confirmation
39
+
40
+ > Rule: If you use this pack, you must explicitly state: "Loaded Architecture Pack."
@@ -0,0 +1,43 @@
1
+ # Pack: DevOps
2
+
3
+ Tier: Domain
4
+ Load Cost: Medium
5
+ Keywords: docker, ci-cd, git, deployment, infrastructure, automation
6
+
7
+ ## Scope
8
+
9
+ This pack covers **Development Operations, Infrastructure, and Automation**.
10
+
11
+ - **Includes**: Git workflow, CI/CD pipelines (GitHub Actions), Docker containers, Deployment scripts, MCP Server management.
12
+ - **Excludes**: Application code logic (Frontend/Backend).
13
+
14
+ ## Canonical Patterns (Best Practices)
15
+
16
+ ### 1. Git Workflow
17
+
18
+ - **Conventional Commits**: `feat:`, `fix:`, `chore:`, `docs:`.
19
+ - **Branching**: `main` (stable), `develop` (integration), `feature/xyz`.
20
+ - **Clean History**: Rebase before merge preferred over merge commits for cleaner history.
21
+
22
+ ### 2. CI/CD (GitHub Actions)
23
+
24
+ - **Fast Feedback**: Run lint and tests on every PR.
25
+ - **Cache Dependencies**: Use `actions/cache` for npm/pnpm.
26
+ - **Secret Management**: Use GitHub Secrets, never hardcode tokens in YAML.
27
+
28
+ ### 3. MCP (Model Context Protocol)
29
+
30
+ - **Builder**: Use standard MCP SDKs.
31
+ - **Management**: Register servers via config files, not ad-hoc commands.
32
+ - **Security**: MCP servers run locally; trust bounds apply.
33
+
34
+ ## Anti-Patterns (What to Avoid)
35
+
36
+ - ❌ **Commit "WIP"**: Avoid vague messages. Squash WIP commits before merge.
37
+ - ❌ **Broken Build**: Never merge code that fails CI.
38
+ - ❌ **Manual Deploys**: Automate via pipeline whenever possible.
39
+ - ❌ **Root Keys**: Never use root access keys in CI; use scoped service accounts.
40
+
41
+ ## Load Confirmation
42
+
43
+ > Rule: If you use this pack, you must explicitly state: "Loaded DevOps Pack."
@@ -0,0 +1,37 @@
1
+ # Pack: Productivity
2
+
3
+ Tier: Core
4
+ Load Cost: Low
5
+ Keywords: files, research, data, docs, organization
6
+
7
+ ## Scope
8
+
9
+ This pack covers **General Productivity, File Management, and Data Handling**.
10
+
11
+ - **Includes**: File searching, filtering, documentation organization, data analysis (CSV/JSON), learning patterns.
12
+
13
+ ## Canonical Patterns (Best Practices)
14
+
15
+ ### 1. File Management
16
+
17
+ - **Search**: Use `scout` or `fd` to find files efficiently.
18
+ - **Organization**: Keep directories flat where possible; group by domain.
19
+
20
+ ### 2. Documentation
21
+
22
+ - **Proximity**: Keep docs close to code (`README.md` in folders).
23
+ - **Updates**: Update docs _with_ code changes in the same PR.
24
+
25
+ ### 3. Data Analysis
26
+
27
+ - **Validation**: Validate input data schema.
28
+ - **Visualization**: Summarize data trends clearly.
29
+
30
+ ## Anti-Patterns (What to Avoid)
31
+
32
+ - ❌ **Stale Docs**: Documentation that contradicts code.
33
+ - ❌ **Messy Workspace**: files scattered in root.
34
+
35
+ ## Load Confirmation
36
+
37
+ > Rule: If you use this pack, you must explicitly state: "Loaded Productivity Pack."
@@ -0,0 +1,41 @@
1
+ # Pack: Quality
2
+
3
+ Tier: Domain
4
+ Load Cost: Medium
5
+ Keywords: testing, debug, review, security, performance, kaizen
6
+
7
+ ## Scope
8
+
9
+ This pack covers **Quality Assurance, Testing, and Code Review**.
10
+
11
+ - **Includes**: Unit Testing (Vitest/Jest), E2E (Playwright), Debugging strategies, Security audits, Performance profiling.
12
+ - **Excludes**: Implementation details.
13
+
14
+ ## Canonical Patterns (Best Practices)
15
+
16
+ ### 1. Testing (TDD)
17
+
18
+ - **Red-Green-Refactor**: Write test -> Fail -> Pass -> Clean.
19
+ - **AAA Pattern**: Arrange, Act, Assert.
20
+ - **Mocking**: Mock external boundaries (API, DB), test logic in isolation.
21
+
22
+ ### 2. Review
23
+
24
+ - **Readability**: Code should be self-documenting.
25
+ - **Maintainability**: Avoid complex abstractions early.
26
+ - **Security**: Sanitize inputs, check authorization.
27
+
28
+ ### 3. Debugging
29
+
30
+ - **Systematic Approach**: Reproduce -> Isolate -> Fix -> Verify.
31
+ - **Logs**: Use structured logging.
32
+
33
+ ## Anti-Patterns (What to Avoid)
34
+
35
+ - ❌ **Testing Implementation**: Test behavior, not internal state.
36
+ - ❌ **Flaky Tests**: Tests relying on timing/network without mocks.
37
+ - ❌ **Premature Optimization**: Optimize only after profiling.
38
+
39
+ ## Load Confirmation
40
+
41
+ > Rule: If you use this pack, you must explicitly state: "Loaded Quality Pack."
@@ -0,0 +1,41 @@
1
+ # Pack: AI (Cognitive)
2
+
3
+ Tier: Core
4
+ Load Cost: Medium
5
+ Keywords: llm, prompt, mcp, agents, reasoning, research
6
+
7
+ ## Scope
8
+
9
+ This pack covers **AI Capabilities, Reasoning Strategies, and Research**.
10
+
11
+ - **Includes**: Prompt Engineering, Agent Personas, Sequential Thinking, Research methodologies, Context Management.
12
+ - **Excludes**: Specific implementation details (coding).
13
+
14
+ ## Canonical Patterns (Best Practices)
15
+
16
+ ### 1. Sequential Thinking
17
+
18
+ - **Step-by-Step**: Break complex problems into atomic steps.
19
+ - **Self-Correction**: Review previous steps before proceeding.
20
+ - **Hypothesis Testing**: Formulate hypotheses and verifying them effectively.
21
+
22
+ ### 2. Research (Scout)
23
+
24
+ - **Breadth-First**: Scan wide before diving deep.
25
+ - **Source Verification**: Prefer official docs and code over generic articles.
26
+ - **Synthesis**: Combine multiple sources into a coherent answer.
27
+
28
+ ### 3. Multi-Modal
29
+
30
+ - **Images**: Analyze UI screenshots for design fidelity.
31
+ - **Context**: Provide relevant context files, not whole folders.
32
+
33
+ ## Anti-Patterns (What to Avoid)
34
+
35
+ - ❌ **Hallucination**: Inventing APIs or libraries. Always verify.
36
+ - ❌ **Looping**: Getting stuck in "I will fix" loops without changing strategy.
37
+ - ❌ **Ignoring Constraints**: Forgetting project-specific rules (e.g., "No Tailwind").
38
+
39
+ ## Load Confirmation
40
+
41
+ > Rule: If you use this pack, you must explicitly state: "Loaded AI Pack."
@@ -0,0 +1,36 @@
1
+ # Pack: Data Science
2
+
3
+ Tier: Domain
4
+ Load Cost: High
5
+ Keywords: python, pandas, numpy, visualization, analysis, machine-learning, plot
6
+
7
+ ## Scope
8
+
9
+ This pack covers **Deep Data Science and Analysis**.
10
+
11
+ - **Includes**: Data manipulation (Pandas/Polars), Visualization (Matplotlib/Seaborn), Statistical Analysis, Basic ML (Scikit-learn).
12
+ - **Primary Lang**: Python (assumed execution environment or script generation).
13
+
14
+ ## Canonical Patterns (Best Practices)
15
+
16
+ ### 1. Data Pipeline
17
+
18
+ - **ETL**: Extract -> Transform -> Load. Clean data before analysis.
19
+ - **Vectorization**: Use Pandas/NumPy vector operations, avoid Python loops.
20
+ - **Reproducibility**: Use Jupyter Notebooks or scripts with seed fixing.
21
+
22
+ ### 2. Visualization
23
+
24
+ - **Clarity**: Label axes, titles, and legends.
25
+ - **Color**: Use accessible color palettes.
26
+ - **Context**: Annotate outliers or key events.
27
+
28
+ ## Anti-Patterns (What to Avoid)
29
+
30
+ - ❌ **Mutating Data**: Modifying DataFrames in-place implicitly.
31
+ - ❌ **Magic Numbers**: Hardcoding boundaries without explanation.
32
+ - ❌ **Overfitting**: training on test data.
33
+
34
+ ## Load Confirmation
35
+
36
+ > Rule: If you use this pack, you must explicitly state: "Loaded Data Science Pack."
@@ -0,0 +1,40 @@
1
+ # Pack: Mobile
2
+
3
+ Tier: Domain
4
+ Load Cost: Medium
5
+ Keywords: react-native, expo, ios, android, mobile
6
+
7
+ ## Scope
8
+
9
+ This pack covers **Mobile App Development** using React Native and Expo.
10
+
11
+ - **Includes**: Native Components, Navigation (React Navigation/Expo Router), native modules, platform-specific code.
12
+ - **Excludes**: Pure web components (DOM-based).
13
+
14
+ ## Canonical Patterns (Best Practices)
15
+
16
+ ### 1. Framework
17
+
18
+ - **Expo Framework**: Preferred for new projects (File-based routing, Prebuild).
19
+ - **NativeWind**: Tailwind CSS for React Native.
20
+
21
+ ### 2. Components
22
+
23
+ - **Core Components**: Use `<View>`, `<Text>`, `<Pressable>` (not `<div>`, `<span>`).
24
+ - **Lists**: Use `<FlatList>` or `<FlashList>` for long lists (virtualization).
25
+ - **Images**: Use `expo-image` for caching and performance.
26
+
27
+ ### 3. Navigation
28
+
29
+ - **Architecture**: Stack Navigator for flows, Tab Navigator for main shell.
30
+ - **Deep Linking**: Configure schemes for external access.
31
+
32
+ ## Anti-Patterns (What to Avoid)
33
+
34
+ - ❌ **Web-only APIs**: Using `window`, `document`, or `localStorage` (Use `AsyncStorage`).
35
+ - ❌ **Blocking JS Thread**: Heavy computations on UI thread. Use Worklets (Reanimated).
36
+ - ❌ **Unoptimized Images**: Loading huge raw images.
37
+
38
+ ## Load Confirmation
39
+
40
+ > Rule: If you use this pack, you must explicitly state: "Loaded Mobile Pack."
@@ -0,0 +1,61 @@
1
+ # Pack: Backend
2
+
3
+ Tier: Domain
4
+ Load Cost: High
5
+ Keywords: node, api, database, auth, payment, backend, server
6
+
7
+ ## Scope
8
+
9
+ This pack covers **Backend Development** logic, API design, and Data Management.
10
+
11
+ - **Includes**: API endpoints (Next.js App Router), Database interactions (Prisma/Drizzle), Authentication (Auth.js), Payments (Stripe), Business Logic.
12
+ - **Excludes**: UI components, detailed DevOps/Infrastructure (see `pack-devops`).
13
+
14
+ ## Canonical Patterns (Best Practices)
15
+
16
+ ### 1. API Design
17
+
18
+ - **Resource Oriented**: `GET /api/users`, `POST /api/users`.
19
+ - **Validation**: Use Zod for all request body/param validation.
20
+ - **Error Handling**: Return structured errors `{ code, message, details }`.
21
+ - **Type Safety**: Share types between Backend and Frontend (Monorepo/RPC).
22
+
23
+ ### 2. Database Interactions
24
+
25
+ - **ORM**: Use Prisma or Drizzle.
26
+ - **Migrations**: Always verify migrations locally before commit.
27
+ - **Indexing**: Add indexes for foreign keys and frequently searched columns.
28
+ - **Connection Pooling**: Use connection pooling for Serverless environments.
29
+
30
+ ### 3. Authentication & Security
31
+
32
+ - **Auth.js / Better-Auth**: Standard implementations preferred.
33
+ - **Middleware**: Protect routes via middleware, not just client-side checks.
34
+ - **RBAC**: Implement Role-Based Access Control logic in services.
35
+ - **Secrets**: Never commit `.env`. Access via `process.env`.
36
+
37
+ ### 4. Payments (Stripe)
38
+
39
+ - **Webhooks**: Always verify webhook signatures securely.
40
+ - **Idempotency**: Handle duplicate webhook events gracefully.
41
+ - **Client/Server Split**: Create PaymentIntent on server, confirm on client.
42
+
43
+ ## Anti-Patterns (What to Avoid)
44
+
45
+ - ❌ **Logic in Controllers**: Keep Route Handlers thin; move logic to Services/UseCases.
46
+ - ❌ **N+1 Queries**: Loop queries inside loops. Use `include` or `Promise.all`.
47
+ - ❌ **Trusting Client**: Never trust `req.body` without Zod validation.
48
+ - ❌ **SQL Injection**: Never concat strings for queries. Use ORM or parametrized queries.
49
+ - ❌ **Hardcoded IDs**: Do not rely on specific DB IDs in logic.
50
+
51
+ ## Specialized Modules
52
+
53
+ ### Shopify Integration
54
+
55
+ - Use Shopify Admin API / Storefront API.
56
+ - Respect rate limits.
57
+ - Handle webhook HMAC verification strict.
58
+
59
+ ## Load Confirmation
60
+
61
+ > Rule: If you use this pack, you must explicitly state: "Loaded Backend Pack."
@@ -0,0 +1,66 @@
1
+ # Pack: Frontend
2
+
3
+ Tier: Domain
4
+ Load Cost: High
5
+ Keywords: react, nextjs, tailwind, ui, ux, components, frontend
6
+
7
+ ## Scope
8
+
9
+ This pack covers all aspects of **Frontend Development** within the Anchi-Kit ecosystem.
10
+
11
+ - **Includes**: Component architecture, UI styling (Tailwind), State Management, React Hooks, Next.js Routing, Client-Side logic, Accessibility (a11y), Animations.
12
+ - **Excludes**: Backend API logic (see `pack-backend`), Database schemas, DevOps pipelines.
13
+
14
+ ## Canonical Patterns (Best Practices)
15
+
16
+ ### 1. Component Design
17
+
18
+ - **Single Responsibility**: Each component should do one thing well.
19
+ - **Composition over Inheritance**: Use children props and slots.
20
+ - **Props Interface**: Always define explicit interfaces for props (TypeScript).
21
+ - **Atomic Design**: Structure components as Atoms, Molecules, Organisms, Templates.
22
+
23
+ ### 2. Styling (Tailwind CSS)
24
+
25
+ - **Utility-First**: Use Tailwind classes directly in markup.
26
+ - **Tokens**: Use `theme('colors...')` for consistency.
27
+ - **Responsive**: Mobile-first design (`min-width` default, `md:`, `lg:` overrides).
28
+ - **ClassName Merging**: Use `cn()` utility (clsx + tailwind-merge) for conditional classes.
29
+
30
+ ### 3. State Management
31
+
32
+ - **Local State**: `useState` for simple UI toggles.
33
+ - **Server State**: Use `useQuery` or Next.js Server Components for data fetching.
34
+ - **Global State**: Minimal use of Context/Zustand only when absolutely necessary (e.g., Theme, Auth User).
35
+
36
+ ### 4. Performance
37
+
38
+ - **Image Optimization**: Use `next/image`.
39
+ - **Lazy Loading**: Use `dynamic()` for heavy components below the fold.
40
+ - **Memoization**: `useMemo`/`useCallback` only when profiling shows re-render issues.
41
+
42
+ ## Anti-Patterns (What to Avoid)
43
+
44
+ - ❌ **Hardcoded Styles**: Avoid `style={{ margin: 10 }}`. Use Tailwind classes.
45
+ - ❌ **Prop Drilling**: Passing data through >3 layers. Use Composition or Context.
46
+ - ❌ **Client-Side Heavy**: Making everything `"use client"`. Default to Server Components.
47
+ - ❌ **Magic Numbers**: Using arbitrary pixel values (e.g., `width: 317px`). Use design tokens.
48
+ - ❌ **Huge Components**: Files > 300 lines should likely be split.
49
+
50
+ ## Specialized Modules
51
+
52
+ ### 3D / WebGL (Three.js)
53
+
54
+ - Use `@react-three/fiber`.
55
+ - Keep canvas logic separate from DOM UI.
56
+ - optimize models (GLB/GLTF) via `gltfjsx`.
57
+
58
+ ### Mobile (React Native / Expo)
59
+
60
+ - Use `StyleSheet.create` or strict Tailwind integration (NativeWind).
61
+ - Handle platform differences (`Platform.OS`).
62
+ - Avoid web-only APIs is critical paths.
63
+
64
+ ## Load Confirmation
65
+
66
+ > Rule: If you use this pack, you must explicitly state: "Loaded Frontend Pack."
@@ -0,0 +1,37 @@
1
+ # Pack: Blockchain
2
+
3
+ Tier: Domain
4
+ Load Cost: High
5
+ Keywords: blockchain, web3, solidity, smart-contract, ethereum, crypto, wallet
6
+
7
+ ## Scope
8
+
9
+ This pack covers **Web3 and Blockchain Development**.
10
+
11
+ - **Includes**: Smart Contract development (Solidity), Interaction (Ethers.js/Viem), Testing (Hardhat/Foundry), Security (Reentrancy prevention).
12
+ - **Excludes**: Creating new L1 chains (Core Protocol Dev).
13
+
14
+ ## Canonical Patterns (Best Practices)
15
+
16
+ ### 1. Smart Contracts (Solidity)
17
+
18
+ - **Security First**: Use OpenZeppelin contracts (standard libraries).
19
+ - **Checks-Effects-Interactions**: Update state _before_ external calls to prevent Reentrancy.
20
+ - **Gas Optimization**: Use `calldata` vs `memory`, pack variables, avoid loops.
21
+
22
+ ### 2. Integration
23
+
24
+ - **Wagmi/Viem**: Modern React hooks for wallet connection.
25
+ - **Event Listening**: Index events for UI updates (The Graph or direct listeners).
26
+ - **Error Handling**: Handle chain-specific errors (UserRejected, InsufficientFunds).
27
+
28
+ ## Anti-Patterns (What to Avoid)
29
+
30
+ - ❌ **Rolling Crypto**: Never invent your own encryption/hashing.
31
+ - ❌ **Unchecked Calls**: Always check return values of low-level calls.
32
+ - ❌ **Timestamp Dependence**: Block timestamps can be manipulated by miners.
33
+ - ❌ **Private Logic**: Nothing on-chain is truly private.
34
+
35
+ ## Load Confirmation
36
+
37
+ > Rule: If you use this pack, you must explicitly state: "Loaded Blockchain Pack."
@@ -0,0 +1,40 @@
1
+ # Pack: Architecture
2
+
3
+ Tier: Core
4
+ Load Cost: High
5
+ Keywords: ddd, solid, patterns, planning, system-design
6
+
7
+ ## Scope
8
+
9
+ This pack covers **Software Architecture and High-Level Planning**.
10
+
11
+ - **Includes**: Domain-Driven Design (DDD), Modular Monolith, SOLID principles, Project Structure, Implementation Planning.
12
+ - **Excludes**: Specific coding syntax.
13
+
14
+ ## Canonical Patterns (Best Practices)
15
+
16
+ ### 1. Structure (Modular Monolith)
17
+
18
+ - **Feature Modules**: Group by feature (`features/billing/`), not type (`controllers/`).
19
+ - **Encapsulation**: Modules expose a Public API (`index.ts`); internals are private.
20
+ - **Dependency Rule**: Outer layers depend on inner layers (Core Domain).
21
+
22
+ ### 2. SOLID Principles
23
+
24
+ - **SRP**: Single Responsibility per class/module.
25
+ - **DIP**: Depend on abstractions (interfaces), not concretions.
26
+
27
+ ### 3. Planning
28
+
29
+ - **Implementation Plan**: Always create `implementation_plan.md` before coding complex features.
30
+ - **Task Breakdown**: Break tasks into < 1 hour chunks.
31
+
32
+ ## Anti-Patterns (What to Avoid)
33
+
34
+ - ❌ **Big Ball of Mud**: Circular dependencies between all modules.
35
+ - ❌ **God Objects**: Classes that do everything.
36
+ - ❌ **Coding without Plan**: Jumping into code for complex tasks.
37
+
38
+ ## Load Confirmation
39
+
40
+ > Rule: If you use this pack, you must explicitly state: "Loaded Architecture Pack."
@@ -0,0 +1,43 @@
1
+ # Pack: DevOps
2
+
3
+ Tier: Domain
4
+ Load Cost: Medium
5
+ Keywords: docker, ci-cd, git, deployment, infrastructure, automation
6
+
7
+ ## Scope
8
+
9
+ This pack covers **Development Operations, Infrastructure, and Automation**.
10
+
11
+ - **Includes**: Git workflow, CI/CD pipelines (GitHub Actions), Docker containers, Deployment scripts, MCP Server management.
12
+ - **Excludes**: Application code logic (Frontend/Backend).
13
+
14
+ ## Canonical Patterns (Best Practices)
15
+
16
+ ### 1. Git Workflow
17
+
18
+ - **Conventional Commits**: `feat:`, `fix:`, `chore:`, `docs:`.
19
+ - **Branching**: `main` (stable), `develop` (integration), `feature/xyz`.
20
+ - **Clean History**: Rebase before merge preferred over merge commits for cleaner history.
21
+
22
+ ### 2. CI/CD (GitHub Actions)
23
+
24
+ - **Fast Feedback**: Run lint and tests on every PR.
25
+ - **Cache Dependencies**: Use `actions/cache` for npm/pnpm.
26
+ - **Secret Management**: Use GitHub Secrets, never hardcode tokens in YAML.
27
+
28
+ ### 3. MCP (Model Context Protocol)
29
+
30
+ - **Builder**: Use standard MCP SDKs.
31
+ - **Management**: Register servers via config files, not ad-hoc commands.
32
+ - **Security**: MCP servers run locally; trust bounds apply.
33
+
34
+ ## Anti-Patterns (What to Avoid)
35
+
36
+ - ❌ **Commit "WIP"**: Avoid vague messages. Squash WIP commits before merge.
37
+ - ❌ **Broken Build**: Never merge code that fails CI.
38
+ - ❌ **Manual Deploys**: Automate via pipeline whenever possible.
39
+ - ❌ **Root Keys**: Never use root access keys in CI; use scoped service accounts.
40
+
41
+ ## Load Confirmation
42
+
43
+ > Rule: If you use this pack, you must explicitly state: "Loaded DevOps Pack."
@@ -0,0 +1,37 @@
1
+ # Pack: Productivity
2
+
3
+ Tier: Core
4
+ Load Cost: Low
5
+ Keywords: files, research, data, docs, organization
6
+
7
+ ## Scope
8
+
9
+ This pack covers **General Productivity, File Management, and Data Handling**.
10
+
11
+ - **Includes**: File searching, filtering, documentation organization, data analysis (CSV/JSON), learning patterns.
12
+
13
+ ## Canonical Patterns (Best Practices)
14
+
15
+ ### 1. File Management
16
+
17
+ - **Search**: Use `scout` or `fd` to find files efficiently.
18
+ - **Organization**: Keep directories flat where possible; group by domain.
19
+
20
+ ### 2. Documentation
21
+
22
+ - **Proximity**: Keep docs close to code (`README.md` in folders).
23
+ - **Updates**: Update docs _with_ code changes in the same PR.
24
+
25
+ ### 3. Data Analysis
26
+
27
+ - **Validation**: Validate input data schema.
28
+ - **Visualization**: Summarize data trends clearly.
29
+
30
+ ## Anti-Patterns (What to Avoid)
31
+
32
+ - ❌ **Stale Docs**: Documentation that contradicts code.
33
+ - ❌ **Messy Workspace**: files scattered in root.
34
+
35
+ ## Load Confirmation
36
+
37
+ > Rule: If you use this pack, you must explicitly state: "Loaded Productivity Pack."
@@ -0,0 +1,41 @@
1
+ # Pack: Quality
2
+
3
+ Tier: Domain
4
+ Load Cost: Medium
5
+ Keywords: testing, debug, review, security, performance, kaizen
6
+
7
+ ## Scope
8
+
9
+ This pack covers **Quality Assurance, Testing, and Code Review**.
10
+
11
+ - **Includes**: Unit Testing (Vitest/Jest), E2E (Playwright), Debugging strategies, Security audits, Performance profiling.
12
+ - **Excludes**: Implementation details.
13
+
14
+ ## Canonical Patterns (Best Practices)
15
+
16
+ ### 1. Testing (TDD)
17
+
18
+ - **Red-Green-Refactor**: Write test -> Fail -> Pass -> Clean.
19
+ - **AAA Pattern**: Arrange, Act, Assert.
20
+ - **Mocking**: Mock external boundaries (API, DB), test logic in isolation.
21
+
22
+ ### 2. Review
23
+
24
+ - **Readability**: Code should be self-documenting.
25
+ - **Maintainability**: Avoid complex abstractions early.
26
+ - **Security**: Sanitize inputs, check authorization.
27
+
28
+ ### 3. Debugging
29
+
30
+ - **Systematic Approach**: Reproduce -> Isolate -> Fix -> Verify.
31
+ - **Logs**: Use structured logging.
32
+
33
+ ## Anti-Patterns (What to Avoid)
34
+
35
+ - ❌ **Testing Implementation**: Test behavior, not internal state.
36
+ - ❌ **Flaky Tests**: Tests relying on timing/network without mocks.
37
+ - ❌ **Premature Optimization**: Optimize only after profiling.
38
+
39
+ ## Load Confirmation
40
+
41
+ > Rule: If you use this pack, you must explicitly state: "Loaded Quality Pack."
@@ -0,0 +1,41 @@
1
+ # Pack: AI (Cognitive)
2
+
3
+ Tier: Core
4
+ Load Cost: Medium
5
+ Keywords: llm, prompt, mcp, agents, reasoning, research
6
+
7
+ ## Scope
8
+
9
+ This pack covers **AI Capabilities, Reasoning Strategies, and Research**.
10
+
11
+ - **Includes**: Prompt Engineering, Agent Personas, Sequential Thinking, Research methodologies, Context Management.
12
+ - **Excludes**: Specific implementation details (coding).
13
+
14
+ ## Canonical Patterns (Best Practices)
15
+
16
+ ### 1. Sequential Thinking
17
+
18
+ - **Step-by-Step**: Break complex problems into atomic steps.
19
+ - **Self-Correction**: Review previous steps before proceeding.
20
+ - **Hypothesis Testing**: Formulate hypotheses and verifying them effectively.
21
+
22
+ ### 2. Research (Scout)
23
+
24
+ - **Breadth-First**: Scan wide before diving deep.
25
+ - **Source Verification**: Prefer official docs and code over generic articles.
26
+ - **Synthesis**: Combine multiple sources into a coherent answer.
27
+
28
+ ### 3. Multi-Modal
29
+
30
+ - **Images**: Analyze UI screenshots for design fidelity.
31
+ - **Context**: Provide relevant context files, not whole folders.
32
+
33
+ ## Anti-Patterns (What to Avoid)
34
+
35
+ - ❌ **Hallucination**: Inventing APIs or libraries. Always verify.
36
+ - ❌ **Looping**: Getting stuck in "I will fix" loops without changing strategy.
37
+ - ❌ **Ignoring Constraints**: Forgetting project-specific rules (e.g., "No Tailwind").
38
+
39
+ ## Load Confirmation
40
+
41
+ > Rule: If you use this pack, you must explicitly state: "Loaded AI Pack."
@@ -0,0 +1,36 @@
1
+ # Pack: Data Science
2
+
3
+ Tier: Domain
4
+ Load Cost: High
5
+ Keywords: python, pandas, numpy, visualization, analysis, machine-learning, plot
6
+
7
+ ## Scope
8
+
9
+ This pack covers **Deep Data Science and Analysis**.
10
+
11
+ - **Includes**: Data manipulation (Pandas/Polars), Visualization (Matplotlib/Seaborn), Statistical Analysis, Basic ML (Scikit-learn).
12
+ - **Primary Lang**: Python (assumed execution environment or script generation).
13
+
14
+ ## Canonical Patterns (Best Practices)
15
+
16
+ ### 1. Data Pipeline
17
+
18
+ - **ETL**: Extract -> Transform -> Load. Clean data before analysis.
19
+ - **Vectorization**: Use Pandas/NumPy vector operations, avoid Python loops.
20
+ - **Reproducibility**: Use Jupyter Notebooks or scripts with seed fixing.
21
+
22
+ ### 2. Visualization
23
+
24
+ - **Clarity**: Label axes, titles, and legends.
25
+ - **Color**: Use accessible color palettes.
26
+ - **Context**: Annotate outliers or key events.
27
+
28
+ ## Anti-Patterns (What to Avoid)
29
+
30
+ - ❌ **Mutating Data**: Modifying DataFrames in-place implicitly.
31
+ - ❌ **Magic Numbers**: Hardcoding boundaries without explanation.
32
+ - ❌ **Overfitting**: training on test data.
33
+
34
+ ## Load Confirmation
35
+
36
+ > Rule: If you use this pack, you must explicitly state: "Loaded Data Science Pack."
@@ -0,0 +1,40 @@
1
+ # Pack: Mobile
2
+
3
+ Tier: Domain
4
+ Load Cost: Medium
5
+ Keywords: react-native, expo, ios, android, mobile
6
+
7
+ ## Scope
8
+
9
+ This pack covers **Mobile App Development** using React Native and Expo.
10
+
11
+ - **Includes**: Native Components, Navigation (React Navigation/Expo Router), native modules, platform-specific code.
12
+ - **Excludes**: Pure web components (DOM-based).
13
+
14
+ ## Canonical Patterns (Best Practices)
15
+
16
+ ### 1. Framework
17
+
18
+ - **Expo Framework**: Preferred for new projects (File-based routing, Prebuild).
19
+ - **NativeWind**: Tailwind CSS for React Native.
20
+
21
+ ### 2. Components
22
+
23
+ - **Core Components**: Use `<View>`, `<Text>`, `<Pressable>` (not `<div>`, `<span>`).
24
+ - **Lists**: Use `<FlatList>` or `<FlashList>` for long lists (virtualization).
25
+ - **Images**: Use `expo-image` for caching and performance.
26
+
27
+ ### 3. Navigation
28
+
29
+ - **Architecture**: Stack Navigator for flows, Tab Navigator for main shell.
30
+ - **Deep Linking**: Configure schemes for external access.
31
+
32
+ ## Anti-Patterns (What to Avoid)
33
+
34
+ - ❌ **Web-only APIs**: Using `window`, `document`, or `localStorage` (Use `AsyncStorage`).
35
+ - ❌ **Blocking JS Thread**: Heavy computations on UI thread. Use Worklets (Reanimated).
36
+ - ❌ **Unoptimized Images**: Loading huge raw images.
37
+
38
+ ## Load Confirmation
39
+
40
+ > Rule: If you use this pack, you must explicitly state: "Loaded Mobile Pack."
@@ -0,0 +1,61 @@
1
+ # Pack: Backend
2
+
3
+ Tier: Domain
4
+ Load Cost: High
5
+ Keywords: node, api, database, auth, payment, backend, server
6
+
7
+ ## Scope
8
+
9
+ This pack covers **Backend Development** logic, API design, and Data Management.
10
+
11
+ - **Includes**: API endpoints (Next.js App Router), Database interactions (Prisma/Drizzle), Authentication (Auth.js), Payments (Stripe), Business Logic.
12
+ - **Excludes**: UI components, detailed DevOps/Infrastructure (see `pack-devops`).
13
+
14
+ ## Canonical Patterns (Best Practices)
15
+
16
+ ### 1. API Design
17
+
18
+ - **Resource Oriented**: `GET /api/users`, `POST /api/users`.
19
+ - **Validation**: Use Zod for all request body/param validation.
20
+ - **Error Handling**: Return structured errors `{ code, message, details }`.
21
+ - **Type Safety**: Share types between Backend and Frontend (Monorepo/RPC).
22
+
23
+ ### 2. Database Interactions
24
+
25
+ - **ORM**: Use Prisma or Drizzle.
26
+ - **Migrations**: Always verify migrations locally before commit.
27
+ - **Indexing**: Add indexes for foreign keys and frequently searched columns.
28
+ - **Connection Pooling**: Use connection pooling for Serverless environments.
29
+
30
+ ### 3. Authentication & Security
31
+
32
+ - **Auth.js / Better-Auth**: Standard implementations preferred.
33
+ - **Middleware**: Protect routes via middleware, not just client-side checks.
34
+ - **RBAC**: Implement Role-Based Access Control logic in services.
35
+ - **Secrets**: Never commit `.env`. Access via `process.env`.
36
+
37
+ ### 4. Payments (Stripe)
38
+
39
+ - **Webhooks**: Always verify webhook signatures securely.
40
+ - **Idempotency**: Handle duplicate webhook events gracefully.
41
+ - **Client/Server Split**: Create PaymentIntent on server, confirm on client.
42
+
43
+ ## Anti-Patterns (What to Avoid)
44
+
45
+ - ❌ **Logic in Controllers**: Keep Route Handlers thin; move logic to Services/UseCases.
46
+ - ❌ **N+1 Queries**: Loop queries inside loops. Use `include` or `Promise.all`.
47
+ - ❌ **Trusting Client**: Never trust `req.body` without Zod validation.
48
+ - ❌ **SQL Injection**: Never concat strings for queries. Use ORM or parametrized queries.
49
+ - ❌ **Hardcoded IDs**: Do not rely on specific DB IDs in logic.
50
+
51
+ ## Specialized Modules
52
+
53
+ ### Shopify Integration
54
+
55
+ - Use Shopify Admin API / Storefront API.
56
+ - Respect rate limits.
57
+ - Handle webhook HMAC verification strict.
58
+
59
+ ## Load Confirmation
60
+
61
+ > Rule: If you use this pack, you must explicitly state: "Loaded Backend Pack."
@@ -0,0 +1,66 @@
1
+ # Pack: Frontend
2
+
3
+ Tier: Domain
4
+ Load Cost: High
5
+ Keywords: react, nextjs, tailwind, ui, ux, components, frontend
6
+
7
+ ## Scope
8
+
9
+ This pack covers all aspects of **Frontend Development** within the Anchi-Kit ecosystem.
10
+
11
+ - **Includes**: Component architecture, UI styling (Tailwind), State Management, React Hooks, Next.js Routing, Client-Side logic, Accessibility (a11y), Animations.
12
+ - **Excludes**: Backend API logic (see `pack-backend`), Database schemas, DevOps pipelines.
13
+
14
+ ## Canonical Patterns (Best Practices)
15
+
16
+ ### 1. Component Design
17
+
18
+ - **Single Responsibility**: Each component should do one thing well.
19
+ - **Composition over Inheritance**: Use children props and slots.
20
+ - **Props Interface**: Always define explicit interfaces for props (TypeScript).
21
+ - **Atomic Design**: Structure components as Atoms, Molecules, Organisms, Templates.
22
+
23
+ ### 2. Styling (Tailwind CSS)
24
+
25
+ - **Utility-First**: Use Tailwind classes directly in markup.
26
+ - **Tokens**: Use `theme('colors...')` for consistency.
27
+ - **Responsive**: Mobile-first design (`min-width` default, `md:`, `lg:` overrides).
28
+ - **ClassName Merging**: Use `cn()` utility (clsx + tailwind-merge) for conditional classes.
29
+
30
+ ### 3. State Management
31
+
32
+ - **Local State**: `useState` for simple UI toggles.
33
+ - **Server State**: Use `useQuery` or Next.js Server Components for data fetching.
34
+ - **Global State**: Minimal use of Context/Zustand only when absolutely necessary (e.g., Theme, Auth User).
35
+
36
+ ### 4. Performance
37
+
38
+ - **Image Optimization**: Use `next/image`.
39
+ - **Lazy Loading**: Use `dynamic()` for heavy components below the fold.
40
+ - **Memoization**: `useMemo`/`useCallback` only when profiling shows re-render issues.
41
+
42
+ ## Anti-Patterns (What to Avoid)
43
+
44
+ - ❌ **Hardcoded Styles**: Avoid `style={{ margin: 10 }}`. Use Tailwind classes.
45
+ - ❌ **Prop Drilling**: Passing data through >3 layers. Use Composition or Context.
46
+ - ❌ **Client-Side Heavy**: Making everything `"use client"`. Default to Server Components.
47
+ - ❌ **Magic Numbers**: Using arbitrary pixel values (e.g., `width: 317px`). Use design tokens.
48
+ - ❌ **Huge Components**: Files > 300 lines should likely be split.
49
+
50
+ ## Specialized Modules
51
+
52
+ ### 3D / WebGL (Three.js)
53
+
54
+ - Use `@react-three/fiber`.
55
+ - Keep canvas logic separate from DOM UI.
56
+ - optimize models (GLB/GLTF) via `gltfjsx`.
57
+
58
+ ### Mobile (React Native / Expo)
59
+
60
+ - Use `StyleSheet.create` or strict Tailwind integration (NativeWind).
61
+ - Handle platform differences (`Platform.OS`).
62
+ - Avoid web-only APIs is critical paths.
63
+
64
+ ## Load Confirmation
65
+
66
+ > Rule: If you use this pack, you must explicitly state: "Loaded Frontend Pack."
@@ -0,0 +1,37 @@
1
+ # Pack: Blockchain
2
+
3
+ Tier: Domain
4
+ Load Cost: High
5
+ Keywords: blockchain, web3, solidity, smart-contract, ethereum, crypto, wallet
6
+
7
+ ## Scope
8
+
9
+ This pack covers **Web3 and Blockchain Development**.
10
+
11
+ - **Includes**: Smart Contract development (Solidity), Interaction (Ethers.js/Viem), Testing (Hardhat/Foundry), Security (Reentrancy prevention).
12
+ - **Excludes**: Creating new L1 chains (Core Protocol Dev).
13
+
14
+ ## Canonical Patterns (Best Practices)
15
+
16
+ ### 1. Smart Contracts (Solidity)
17
+
18
+ - **Security First**: Use OpenZeppelin contracts (standard libraries).
19
+ - **Checks-Effects-Interactions**: Update state _before_ external calls to prevent Reentrancy.
20
+ - **Gas Optimization**: Use `calldata` vs `memory`, pack variables, avoid loops.
21
+
22
+ ### 2. Integration
23
+
24
+ - **Wagmi/Viem**: Modern React hooks for wallet connection.
25
+ - **Event Listening**: Index events for UI updates (The Graph or direct listeners).
26
+ - **Error Handling**: Handle chain-specific errors (UserRejected, InsufficientFunds).
27
+
28
+ ## Anti-Patterns (What to Avoid)
29
+
30
+ - ❌ **Rolling Crypto**: Never invent your own encryption/hashing.
31
+ - ❌ **Unchecked Calls**: Always check return values of low-level calls.
32
+ - ❌ **Timestamp Dependence**: Block timestamps can be manipulated by miners.
33
+ - ❌ **Private Logic**: Nothing on-chain is truly private.
34
+
35
+ ## Load Confirmation
36
+
37
+ > Rule: If you use this pack, you must explicitly state: "Loaded Blockchain Pack."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anchi-kit",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "The Ultimate AI-Native Toolkit for Cursor & Gemini. Installs into any existing project. Includes commands, agents, skills, and architecture presets.",
5
5
  "main": "src/cli.js",
6
6
  "bin": {
@@ -41,6 +41,7 @@
41
41
  "scripts/",
42
42
  ".cursor/commands/",
43
43
  ".cursor/agents/",
44
+ ".cursor/skills/_packs/",
44
45
  ".cursor/skills/*/SKILL.md",
45
46
  ".cursor/skills/*/references/",
46
47
  ".cursor/workflows/",
@@ -55,6 +56,7 @@
55
56
  ".cursor/UX_GUIDELINES.md",
56
57
  ".antigravity/commands/",
57
58
  ".antigravity/agents/",
59
+ ".antigravity/skills/_packs/",
58
60
  ".antigravity/skills/*/SKILL.md",
59
61
  ".antigravity/skills/*/references/",
60
62
  ".antigravity/workflows/",