@shahmilsaari/memory-core 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +538 -0
- package/dist/cli.js +1171 -0
- package/package.json +51 -0
- package/profiles/angular.yml +33 -0
- package/profiles/clean-architecture.yml +33 -0
- package/profiles/hexagonal.yml +28 -0
- package/profiles/laravel-service-repository.yml +32 -0
- package/profiles/modular-monolith.yml +28 -0
- package/profiles/mvc.yml +27 -0
- package/profiles/nextjs.yml +32 -0
- package/profiles/nuxt.yml +32 -0
- package/profiles/react-native.yml +35 -0
- package/profiles/react.yml +37 -0
- package/profiles/svelte.yml +29 -0
- package/profiles/vue.yml +35 -0
- package/templates/AGENTS.md.hbs +42 -0
- package/templates/AI_RULES.md.hbs +39 -0
- package/templates/ARCHITECTURE.md.hbs +51 -0
- package/templates/CLAUDE.md.hbs +52 -0
- package/templates/DEVIN.md.hbs +26 -0
- package/templates/PROJECT_MEMORY.md.hbs +31 -0
- package/templates/aider.conf.yml.hbs +8 -0
- package/templates/amazonq-guidelines.md.hbs +26 -0
- package/templates/clinerules.hbs +26 -0
- package/templates/continue-config.json.hbs +5 -0
- package/templates/copilot-instructions.md.hbs +32 -0
- package/templates/cursor-rule.mdc.hbs +30 -0
- package/templates/cursorrules.hbs +28 -0
- package/templates/gemini-styleguide.md.hbs +26 -0
- package/templates/jetbrains-ai.md.hbs +26 -0
- package/templates/roo-rule.md.hbs +28 -0
- package/templates/windsurfrules.hbs +26 -0
- package/templates/zed-settings.json.hbs +9 -0
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@shahmilsaari/memory-core",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Universal AI memory core — generate AI context files from architecture profiles with RAG support",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"memory-core": "dist/cli.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"templates",
|
|
12
|
+
"profiles"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsup",
|
|
16
|
+
"dev": "tsx src/cli.ts",
|
|
17
|
+
"start": "node dist/cli.js"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@inquirer/prompts": "^5.0.0",
|
|
21
|
+
"chalk": "^5.3.0",
|
|
22
|
+
"commander": "^12.0.0",
|
|
23
|
+
"dotenv": "^16.4.0",
|
|
24
|
+
"handlebars": "^4.7.8",
|
|
25
|
+
"js-yaml": "^4.1.0",
|
|
26
|
+
"ora": "^8.0.0",
|
|
27
|
+
"pg": "^8.11.0"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@types/js-yaml": "^4.0.9",
|
|
31
|
+
"@types/node": "^20.0.0",
|
|
32
|
+
"@types/pg": "^8.11.0",
|
|
33
|
+
"tsup": "^8.0.0",
|
|
34
|
+
"tsx": "^4.7.0",
|
|
35
|
+
"typescript": "^5.4.0"
|
|
36
|
+
},
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=18.0.0"
|
|
39
|
+
},
|
|
40
|
+
"keywords": [
|
|
41
|
+
"ai",
|
|
42
|
+
"memory",
|
|
43
|
+
"rag",
|
|
44
|
+
"architecture",
|
|
45
|
+
"copilot",
|
|
46
|
+
"cursor",
|
|
47
|
+
"claude",
|
|
48
|
+
"context"
|
|
49
|
+
],
|
|
50
|
+
"license": "MIT"
|
|
51
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: angular
|
|
2
|
+
displayName: Angular
|
|
3
|
+
layer: frontend
|
|
4
|
+
description: Angular with smart/dumb components, signals, standalone components, and OnPush
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- Use standalone components — no NgModules for new features
|
|
8
|
+
- Use Angular Signals for reactive state — prefer signals over RxJS for simple state
|
|
9
|
+
- Use OnPush change detection on all components — default is too expensive
|
|
10
|
+
- Follow smart/dumb component pattern — containers fetch data, presentational components render it
|
|
11
|
+
- Keep all HTTP calls inside services — never call HttpClient in components
|
|
12
|
+
- Use inject() function instead of constructor injection in modern Angular (v17+)
|
|
13
|
+
- Use the Angular Router with lazy-loaded routes for every feature
|
|
14
|
+
- Use reactive forms (FormBuilder) — never template-driven forms for complex forms
|
|
15
|
+
- Unsubscribe from observables using takeUntilDestroyed() or async pipe
|
|
16
|
+
- Use NgRx only for complex shared state — prefer component store or signals for local state
|
|
17
|
+
|
|
18
|
+
folders:
|
|
19
|
+
- src/app/core
|
|
20
|
+
- src/app/shared/components
|
|
21
|
+
- src/app/shared/services
|
|
22
|
+
- src/app/features/<feature-name>/components
|
|
23
|
+
- src/app/features/<feature-name>/services
|
|
24
|
+
- src/app/features/<feature-name>/store
|
|
25
|
+
- src/app/layout
|
|
26
|
+
|
|
27
|
+
avoid:
|
|
28
|
+
- NgModules for new features — use standalone components
|
|
29
|
+
- Default change detection — always set OnPush
|
|
30
|
+
- HTTP calls in components — use services
|
|
31
|
+
- Memory leaks from unsubscribed observables
|
|
32
|
+
- Logic in templates — move to component class
|
|
33
|
+
- God services with unrelated responsibilities
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: clean-architecture
|
|
2
|
+
displayName: Clean Architecture
|
|
3
|
+
layer: backend
|
|
4
|
+
description: Separation into domain, application, infrastructure, and interface layers
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- Entities encapsulate core business logic and have no external dependencies
|
|
8
|
+
- Use cases orchestrate application workflows and call domain entities
|
|
9
|
+
- Controllers must only validate input and delegate to use cases
|
|
10
|
+
- Infrastructure layer (DB, HTTP, queues) depends on application — never the reverse
|
|
11
|
+
- Domain layer must not import any framework or library code
|
|
12
|
+
- Use DTOs to transfer data across layer boundaries
|
|
13
|
+
- Repository interfaces are defined in the domain/application layer, implemented in infrastructure
|
|
14
|
+
- Validation happens at the interface/controller layer only
|
|
15
|
+
|
|
16
|
+
folders:
|
|
17
|
+
- src/domain/entities
|
|
18
|
+
- src/domain/repositories
|
|
19
|
+
- src/domain/value-objects
|
|
20
|
+
- src/application/use-cases
|
|
21
|
+
- src/application/services
|
|
22
|
+
- src/application/dtos
|
|
23
|
+
- src/infrastructure/database
|
|
24
|
+
- src/infrastructure/http
|
|
25
|
+
- src/interfaces/controllers
|
|
26
|
+
- src/interfaces/presenters
|
|
27
|
+
|
|
28
|
+
avoid:
|
|
29
|
+
- Business logic in controllers or route handlers
|
|
30
|
+
- Direct database queries inside use cases
|
|
31
|
+
- Framework-specific imports in the domain layer
|
|
32
|
+
- Calling use cases from other use cases directly
|
|
33
|
+
- Fat repositories that contain business logic
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: hexagonal
|
|
2
|
+
displayName: Hexagonal Architecture
|
|
3
|
+
layer: backend
|
|
4
|
+
description: Ports and adapters — application core is isolated from all external systems
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- The application core defines ports (interfaces) for everything external
|
|
8
|
+
- Adapters implement ports — one adapter per external system (DB, HTTP, queue, etc.)
|
|
9
|
+
- The core must never instantiate or import adapters directly
|
|
10
|
+
- Dependency injection wires adapters to ports at startup
|
|
11
|
+
- All business logic lives inside the core/domain
|
|
12
|
+
- Driving adapters (HTTP, CLI, tests) call the core through primary ports
|
|
13
|
+
- Driven adapters (DB, email, payment) are called by the core through secondary ports
|
|
14
|
+
|
|
15
|
+
folders:
|
|
16
|
+
- src/core/domain
|
|
17
|
+
- src/core/ports/inbound
|
|
18
|
+
- src/core/ports/outbound
|
|
19
|
+
- src/adapters/inbound/http
|
|
20
|
+
- src/adapters/inbound/cli
|
|
21
|
+
- src/adapters/outbound/database
|
|
22
|
+
- src/adapters/outbound/messaging
|
|
23
|
+
|
|
24
|
+
avoid:
|
|
25
|
+
- Direct imports of adapter code inside the core
|
|
26
|
+
- Leaking infrastructure types into domain models
|
|
27
|
+
- Bypassing ports to call adapters directly
|
|
28
|
+
- Framework annotations inside domain classes
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: laravel-service-repository
|
|
2
|
+
displayName: Laravel Service Repository
|
|
3
|
+
layer: backend
|
|
4
|
+
description: Laravel with service and repository layers for business logic separation
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- Controllers are thin — validate request, call service, return response
|
|
8
|
+
- Services contain all business logic and orchestration
|
|
9
|
+
- Repositories abstract all Eloquent/database queries
|
|
10
|
+
- Repository interfaces are defined and bound via service container
|
|
11
|
+
- Use Form Requests for validation logic
|
|
12
|
+
- Use API Resources for response transformation
|
|
13
|
+
- Keep Eloquent models as data containers — relationships and casts only
|
|
14
|
+
- Events and listeners handle side effects (emails, notifications, cache)
|
|
15
|
+
|
|
16
|
+
folders:
|
|
17
|
+
- app/Http/Controllers
|
|
18
|
+
- app/Http/Requests
|
|
19
|
+
- app/Http/Resources
|
|
20
|
+
- app/Services
|
|
21
|
+
- app/Repositories
|
|
22
|
+
- app/Repositories/Interfaces
|
|
23
|
+
- app/Models
|
|
24
|
+
- app/Events
|
|
25
|
+
- app/Listeners
|
|
26
|
+
|
|
27
|
+
avoid:
|
|
28
|
+
- Business logic in controllers or models
|
|
29
|
+
- Raw DB queries in controllers
|
|
30
|
+
- Direct Eloquent calls inside services (use repositories)
|
|
31
|
+
- Logic inside Blade templates
|
|
32
|
+
- Fat models with business methods
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: modular-monolith
|
|
2
|
+
displayName: Modular Monolith
|
|
3
|
+
layer: backend
|
|
4
|
+
description: Self-contained feature modules with clear boundaries and no cross-module coupling
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- Each module owns its own data model, service, and controller
|
|
8
|
+
- Modules communicate only through public interfaces or events — never by importing internals
|
|
9
|
+
- Shared utilities live in a shared/ or common/ module
|
|
10
|
+
- Database tables are namespaced per module
|
|
11
|
+
- Each module can be extracted to a microservice independently
|
|
12
|
+
- Cross-module calls must go through a module's public API class
|
|
13
|
+
- No circular dependencies between modules
|
|
14
|
+
|
|
15
|
+
folders:
|
|
16
|
+
- src/modules/<module-name>/controllers
|
|
17
|
+
- src/modules/<module-name>/services
|
|
18
|
+
- src/modules/<module-name>/repositories
|
|
19
|
+
- src/modules/<module-name>/dtos
|
|
20
|
+
- src/modules/<module-name>/entities
|
|
21
|
+
- src/shared/utils
|
|
22
|
+
- src/shared/types
|
|
23
|
+
|
|
24
|
+
avoid:
|
|
25
|
+
- Importing private files from another module directly
|
|
26
|
+
- Shared mutable state between modules
|
|
27
|
+
- God services that span multiple module domains
|
|
28
|
+
- Circular module dependencies
|
package/profiles/mvc.yml
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: mvc
|
|
2
|
+
displayName: MVC
|
|
3
|
+
layer: backend
|
|
4
|
+
description: Model-View-Controller with thin controllers and fat models/services
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- Controllers handle HTTP only — parse input, call service, return response
|
|
8
|
+
- Models represent data and database schema
|
|
9
|
+
- Business logic lives in services, not controllers or models
|
|
10
|
+
- Views render output and contain no logic
|
|
11
|
+
- Services are testable independently of the HTTP layer
|
|
12
|
+
- Use a service layer between controllers and models
|
|
13
|
+
- Group files by feature, not by type (e.g. /users not /controllers)
|
|
14
|
+
|
|
15
|
+
folders:
|
|
16
|
+
- src/controllers
|
|
17
|
+
- src/models
|
|
18
|
+
- src/services
|
|
19
|
+
- src/views
|
|
20
|
+
- src/middleware
|
|
21
|
+
- src/routes
|
|
22
|
+
|
|
23
|
+
avoid:
|
|
24
|
+
- Logic in controllers beyond input parsing and response formatting
|
|
25
|
+
- Direct database calls in controllers
|
|
26
|
+
- Business rules inside model callbacks
|
|
27
|
+
- Fat controllers with inline queries
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: nextjs
|
|
2
|
+
displayName: Next.js App Router
|
|
3
|
+
layer: fullstack
|
|
4
|
+
description: Next.js 13+ App Router with server components, server actions, and colocation
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- Use Server Components by default — add 'use client' only when interactivity is required
|
|
8
|
+
- Data fetching happens in Server Components, not client hooks
|
|
9
|
+
- Use Server Actions for form mutations and data writes
|
|
10
|
+
- Keep page.tsx files thin — delegate to feature components
|
|
11
|
+
- Colocate components, hooks, and utilities near the route that uses them
|
|
12
|
+
- Shared UI lives in src/components/, shared logic in src/lib/
|
|
13
|
+
- API routes are for external integrations only — prefer Server Actions for internal mutations
|
|
14
|
+
- Use Route Groups to organize without affecting URL structure
|
|
15
|
+
- Environment variables exposed to client must be prefixed NEXT_PUBLIC_
|
|
16
|
+
|
|
17
|
+
folders:
|
|
18
|
+
- app/(routes)
|
|
19
|
+
- app/api
|
|
20
|
+
- src/components/ui
|
|
21
|
+
- src/components/features
|
|
22
|
+
- src/lib/utils
|
|
23
|
+
- src/lib/actions
|
|
24
|
+
- src/lib/db
|
|
25
|
+
- src/types
|
|
26
|
+
|
|
27
|
+
avoid:
|
|
28
|
+
- Data fetching in Client Components (use Server Components instead)
|
|
29
|
+
- useEffect for data loading
|
|
30
|
+
- Business logic inside page.tsx
|
|
31
|
+
- Mixing server and client code in the same file
|
|
32
|
+
- Exposing secrets via NEXT_PUBLIC_ variables
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: nuxt
|
|
2
|
+
displayName: Nuxt 3
|
|
3
|
+
layer: fullstack
|
|
4
|
+
description: Nuxt 3 with auto-imports, server routes, and composable-driven architecture
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- Use Nuxt auto-imports — no manual imports for composables, utils, or Vue APIs
|
|
8
|
+
- Use useFetch or useAsyncData for all data fetching — never axios or fetch directly in setup
|
|
9
|
+
- Use server/api/ routes for backend logic — keep business logic out of components
|
|
10
|
+
- Use useState for SSR-safe shared state — Pinia for complex global state
|
|
11
|
+
- Use definePageMeta for per-page middleware, layout, and head configuration
|
|
12
|
+
- Keep pages thin — delegate to feature components
|
|
13
|
+
- Use Nuxt plugins for third-party SDK initialization
|
|
14
|
+
- Use runtime config (useRuntimeConfig) for environment variables — never process.env in components
|
|
15
|
+
|
|
16
|
+
folders:
|
|
17
|
+
- components/ui
|
|
18
|
+
- components/features
|
|
19
|
+
- composables
|
|
20
|
+
- server/api
|
|
21
|
+
- server/middleware
|
|
22
|
+
- pages
|
|
23
|
+
- layouts
|
|
24
|
+
- stores
|
|
25
|
+
- utils
|
|
26
|
+
- types
|
|
27
|
+
|
|
28
|
+
avoid:
|
|
29
|
+
- Direct process.env access in components — use useRuntimeConfig
|
|
30
|
+
- Heavy logic in pages — delegate to composables and components
|
|
31
|
+
- Client-only libraries without <ClientOnly> wrapper or .client.ts suffix
|
|
32
|
+
- Mixing server and client code without clear separation
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: react-native
|
|
2
|
+
displayName: React Native
|
|
3
|
+
layer: frontend
|
|
4
|
+
description: React Native with functional components, hooks, and mobile-first architecture
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- Use functional components with hooks — never class components
|
|
8
|
+
- Use React Navigation for all routing — never manipulate navigation stack manually
|
|
9
|
+
- Use React Query for server state — never useEffect for data fetching
|
|
10
|
+
- Use Zustand for global client state — Context only for theme and auth
|
|
11
|
+
- Separate business logic from UI — put in custom hooks or service files
|
|
12
|
+
- Use StyleSheet.create() for all styles — never inline style objects in JSX
|
|
13
|
+
- Memoize expensive list items with React.memo — FlatList performance depends on it
|
|
14
|
+
- Always provide keyExtractor on FlatList — never use index as key
|
|
15
|
+
- Handle loading and error states explicitly in every screen
|
|
16
|
+
- Use expo-secure-store for sensitive data — never AsyncStorage for tokens
|
|
17
|
+
|
|
18
|
+
folders:
|
|
19
|
+
- src/screens
|
|
20
|
+
- src/components/ui
|
|
21
|
+
- src/components/features
|
|
22
|
+
- src/hooks
|
|
23
|
+
- src/store
|
|
24
|
+
- src/navigation
|
|
25
|
+
- src/services/api
|
|
26
|
+
- src/utils
|
|
27
|
+
- src/types
|
|
28
|
+
|
|
29
|
+
avoid:
|
|
30
|
+
- Class components
|
|
31
|
+
- Inline style objects — use StyleSheet.create
|
|
32
|
+
- useEffect for data fetching — use React Query
|
|
33
|
+
- AsyncStorage for auth tokens — use secure storage
|
|
34
|
+
- Deep prop drilling — use global state
|
|
35
|
+
- ScrollView for long dynamic lists — use FlatList
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: react
|
|
2
|
+
displayName: React
|
|
3
|
+
layer: frontend
|
|
4
|
+
description: Component-driven UI with functional components, hooks, and React Query
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- Use functional components only — never class components
|
|
8
|
+
- Extract all stateful and side-effect logic into custom hooks (use* prefix)
|
|
9
|
+
- Keep components under 150 lines — split into smaller focused components
|
|
10
|
+
- Co-locate state as close to where it is used as possible
|
|
11
|
+
- Lift state only when two or more siblings share the same data
|
|
12
|
+
- Use React Query or SWR for all server data fetching — never useEffect for data loading
|
|
13
|
+
- Use Zustand or Jotai for global client state — avoid large React Context for frequent updates
|
|
14
|
+
- Wrap async operations in useEffect with cleanup to prevent memory leaks
|
|
15
|
+
- Add Error Boundaries around major feature sections
|
|
16
|
+
- Lazy load route-level components with React.lazy + Suspense
|
|
17
|
+
- Never mutate state directly — always return new objects or arrays
|
|
18
|
+
- Memoize with React.memo, useMemo, useCallback only after profiling confirms a problem
|
|
19
|
+
|
|
20
|
+
folders:
|
|
21
|
+
- src/components/ui
|
|
22
|
+
- src/components/features
|
|
23
|
+
- src/hooks
|
|
24
|
+
- src/store
|
|
25
|
+
- src/services/api
|
|
26
|
+
- src/pages
|
|
27
|
+
- src/utils
|
|
28
|
+
- src/types
|
|
29
|
+
|
|
30
|
+
avoid:
|
|
31
|
+
- Class components
|
|
32
|
+
- Prop drilling beyond two levels — use context or global state
|
|
33
|
+
- Business logic inside JSX — move to hooks or service functions
|
|
34
|
+
- useEffect for data fetching on mount
|
|
35
|
+
- Array index as key in dynamic lists
|
|
36
|
+
- God components over 200 lines
|
|
37
|
+
- Inline style objects for non-dynamic values
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: svelte
|
|
2
|
+
displayName: Svelte / SvelteKit
|
|
3
|
+
layer: frontend
|
|
4
|
+
description: Svelte 5 with runes, stores, and SvelteKit file-based routing
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- Use Svelte 5 runes ($state, $derived, $effect) for reactivity — avoid legacy reactive declarations
|
|
8
|
+
- Use $props() rune for component props with TypeScript types
|
|
9
|
+
- Use Svelte stores (writable, readable, derived) for shared state across components
|
|
10
|
+
- Keep components small and single-purpose — extract logic into .ts utility files
|
|
11
|
+
- Use SvelteKit load functions for data fetching — never fetch in onMount for SSR routes
|
|
12
|
+
- Use form actions for mutations — avoid manual fetch() for form submissions
|
|
13
|
+
- Co-locate component styles with scoped <style> blocks — no global CSS in components
|
|
14
|
+
- Use $effect sparingly — prefer derived state over side effects
|
|
15
|
+
|
|
16
|
+
folders:
|
|
17
|
+
- src/lib/components/ui
|
|
18
|
+
- src/lib/components/features
|
|
19
|
+
- src/lib/stores
|
|
20
|
+
- src/lib/utils
|
|
21
|
+
- src/lib/types
|
|
22
|
+
- src/routes
|
|
23
|
+
|
|
24
|
+
avoid:
|
|
25
|
+
- Legacy reactive declarations ($:) in new Svelte 5 code — use runes
|
|
26
|
+
- Fetching data in onMount for server-rendered pages — use load functions
|
|
27
|
+
- Global unscoped styles — use scoped <style> blocks
|
|
28
|
+
- Two-way binding on complex objects — keep data flow predictable
|
|
29
|
+
- Large components with mixed responsibilities
|
package/profiles/vue.yml
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: vue
|
|
2
|
+
displayName: Vue 3
|
|
3
|
+
layer: frontend
|
|
4
|
+
description: Vue 3 with Composition API, Pinia, and composable-driven architecture
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- Use Composition API with <script setup> — never Options API for new code
|
|
8
|
+
- Extract reusable logic into composables (use* prefix) in src/composables/
|
|
9
|
+
- Use Pinia for all global state — one store per domain (useUserStore, useCartStore)
|
|
10
|
+
- Use defineProps and defineEmits with full TypeScript types
|
|
11
|
+
- Follow props-down events-up pattern strictly — never mutate props
|
|
12
|
+
- Use Vue Router with lazy-loaded route components
|
|
13
|
+
- Use <Suspense> for async component loading
|
|
14
|
+
- Keep components under 200 lines — extract logic to composables
|
|
15
|
+
- Use v-model with defineModel() for two-way binding in child components
|
|
16
|
+
- Use provide/inject only for deeply nested component trees
|
|
17
|
+
|
|
18
|
+
folders:
|
|
19
|
+
- src/components/ui
|
|
20
|
+
- src/components/features
|
|
21
|
+
- src/composables
|
|
22
|
+
- src/stores
|
|
23
|
+
- src/router
|
|
24
|
+
- src/views
|
|
25
|
+
- src/services
|
|
26
|
+
- src/utils
|
|
27
|
+
- src/types
|
|
28
|
+
|
|
29
|
+
avoid:
|
|
30
|
+
- Options API in new components
|
|
31
|
+
- Mutating props directly — emit events instead
|
|
32
|
+
- Vuex — use Pinia
|
|
33
|
+
- Heavy logic inside templates
|
|
34
|
+
- Direct DOM manipulation — use template refs
|
|
35
|
+
- God components with mixed responsibilities
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# AGENTS.md — {{projectName}}
|
|
2
|
+
<!-- Generated by memory-core on {{generatedAt}} — run: memory-core sync -->
|
|
3
|
+
|
|
4
|
+
**Type:** {{projectType}} | **Language:** {{language}}
|
|
5
|
+
{{#if hasBackend}}**Backend:** {{backendArchitecture}}{{/if}}
|
|
6
|
+
{{#if hasFrontend}}**Frontend:** {{frontendFramework}}{{/if}}
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
{{#if hasBackend}}
|
|
10
|
+
## Backend Rules — {{backendArchitecture}}
|
|
11
|
+
{{bullet backendRules}}
|
|
12
|
+
|
|
13
|
+
### Structure
|
|
14
|
+
{{bullet backendFolders}}
|
|
15
|
+
|
|
16
|
+
### Never
|
|
17
|
+
{{bullet backendAvoid}}
|
|
18
|
+
{{/if}}
|
|
19
|
+
{{#if hasFrontend}}
|
|
20
|
+
|
|
21
|
+
## Frontend Rules — {{frontendFramework}}
|
|
22
|
+
{{bullet frontendRules}}
|
|
23
|
+
|
|
24
|
+
### Structure
|
|
25
|
+
{{bullet frontendFolders}}
|
|
26
|
+
|
|
27
|
+
### Never
|
|
28
|
+
{{bullet frontendAvoid}}
|
|
29
|
+
{{/if}}
|
|
30
|
+
{{#if hasMemories}}
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
## Memory from Previous Projects
|
|
34
|
+
{{#each memories}}
|
|
35
|
+
- [{{type}}{{#if this.architecture}} · {{this.architecture}}{{/if}}] {{content}}
|
|
36
|
+
{{/each}}
|
|
37
|
+
{{/if}}
|
|
38
|
+
{{#if caveman.enabled}}
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
Caveman ({{caveman.intensity}}): terse fragments only.
|
|
42
|
+
{{/if}}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# AI Rules — {{projectName}}
|
|
2
|
+
<!-- Generated by memory-core on {{generatedAt}} -->
|
|
3
|
+
|
|
4
|
+
These rules apply to ALL AI agents in this project.
|
|
5
|
+
|
|
6
|
+
**Type:** {{projectType}} | **Language:** {{language}}
|
|
7
|
+
{{#if hasBackend}}**Backend:** {{backendArchitecture}}{{/if}}
|
|
8
|
+
{{#if hasFrontend}}**Frontend:** {{frontendFramework}}{{/if}}
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
{{#if hasBackend}}
|
|
12
|
+
## Backend — {{backendArchitecture}}
|
|
13
|
+
{{numbered backendRules}}
|
|
14
|
+
|
|
15
|
+
**Avoid:**
|
|
16
|
+
{{bullet backendAvoid}}
|
|
17
|
+
{{/if}}
|
|
18
|
+
{{#if hasFrontend}}
|
|
19
|
+
|
|
20
|
+
## Frontend — {{frontendFramework}}
|
|
21
|
+
{{numbered frontendRules}}
|
|
22
|
+
|
|
23
|
+
**Avoid:**
|
|
24
|
+
{{bullet frontendAvoid}}
|
|
25
|
+
{{/if}}
|
|
26
|
+
{{#if hasMemories}}
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
## Inherited Decisions
|
|
30
|
+
{{#each memories}}
|
|
31
|
+
{{@index}}. **[{{type}}]** {{content}}
|
|
32
|
+
{{#if tags.length}}_tags: {{join tags ", "}}_{{/if}}
|
|
33
|
+
{{/each}}
|
|
34
|
+
{{/if}}
|
|
35
|
+
{{#if caveman.enabled}}
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
_Caveman {{caveman.intensity}} active — terse output only._
|
|
39
|
+
{{/if}}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Architecture — {{projectName}}
|
|
2
|
+
<!-- Generated by memory-core on {{generatedAt}} -->
|
|
3
|
+
|
|
4
|
+
**Type:** {{projectType}} | **Language:** {{language}}
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
{{#if hasBackend}}
|
|
8
|
+
## Backend — {{backendArchitecture}}
|
|
9
|
+
|
|
10
|
+
{{backendDescription}}
|
|
11
|
+
|
|
12
|
+
### Rules
|
|
13
|
+
{{numbered backendRules}}
|
|
14
|
+
|
|
15
|
+
### Folder Structure
|
|
16
|
+
```
|
|
17
|
+
{{#each backendFolders}}
|
|
18
|
+
{{this}}/
|
|
19
|
+
{{/each}}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Avoid
|
|
23
|
+
{{bullet backendAvoid}}
|
|
24
|
+
{{/if}}
|
|
25
|
+
{{#if hasFrontend}}
|
|
26
|
+
|
|
27
|
+
## Frontend — {{frontendFramework}}
|
|
28
|
+
|
|
29
|
+
{{frontendDescription}}
|
|
30
|
+
|
|
31
|
+
### Rules
|
|
32
|
+
{{numbered frontendRules}}
|
|
33
|
+
|
|
34
|
+
### Folder Structure
|
|
35
|
+
```
|
|
36
|
+
{{#each frontendFolders}}
|
|
37
|
+
{{this}}/
|
|
38
|
+
{{/each}}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Avoid
|
|
42
|
+
{{bullet frontendAvoid}}
|
|
43
|
+
{{/if}}
|
|
44
|
+
{{#if hasMemories}}
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
## Architectural Decisions
|
|
48
|
+
{{#each memories}}
|
|
49
|
+
> **[{{type}}]** {{content}}
|
|
50
|
+
{{/each}}
|
|
51
|
+
{{/if}}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
<!-- Generated by memory-core on {{generatedAt}} — run: memory-core sync to refresh -->
|
|
3
|
+
|
|
4
|
+
## Project
|
|
5
|
+
**Name:** {{projectName}}
|
|
6
|
+
**Type:** {{projectType}}
|
|
7
|
+
**Language:** {{language}}
|
|
8
|
+
{{#if hasBackend}}**Backend:** {{backendArchitecture}}{{/if}}
|
|
9
|
+
{{#if hasFrontend}}**Frontend:** {{frontendFramework}}{{/if}}
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
{{#if hasBackend}}
|
|
13
|
+
## Backend — {{backendArchitecture}}
|
|
14
|
+
> {{backendDescription}}
|
|
15
|
+
|
|
16
|
+
### Rules
|
|
17
|
+
{{bullet backendRules}}
|
|
18
|
+
|
|
19
|
+
### Structure
|
|
20
|
+
{{bullet backendFolders}}
|
|
21
|
+
|
|
22
|
+
### Avoid
|
|
23
|
+
{{bullet backendAvoid}}
|
|
24
|
+
{{/if}}
|
|
25
|
+
{{#if hasFrontend}}
|
|
26
|
+
|
|
27
|
+
## Frontend — {{frontendFramework}}
|
|
28
|
+
> {{frontendDescription}}
|
|
29
|
+
|
|
30
|
+
### Rules
|
|
31
|
+
{{bullet frontendRules}}
|
|
32
|
+
|
|
33
|
+
### Structure
|
|
34
|
+
{{bullet frontendFolders}}
|
|
35
|
+
|
|
36
|
+
### Avoid
|
|
37
|
+
{{bullet frontendAvoid}}
|
|
38
|
+
{{/if}}
|
|
39
|
+
{{#if hasMemories}}
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
## Relevant Memories
|
|
43
|
+
{{#each memories}}
|
|
44
|
+
- [{{type}}] {{content}}{{#if tags.length}} _({{join tags ", "}})_{{/if}}
|
|
45
|
+
{{/each}}
|
|
46
|
+
{{/if}}
|
|
47
|
+
{{#if caveman.enabled}}
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
## Token Optimization
|
|
51
|
+
Caveman active ({{caveman.intensity}}). Terse fragments. No summaries unless asked.
|
|
52
|
+
{{/if}}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# DEVIN.md — {{projectName}}
|
|
2
|
+
<!-- Generated by memory-core on {{generatedAt}} -->
|
|
3
|
+
|
|
4
|
+
## Architecture
|
|
5
|
+
{{architecture}} — {{language}} / {{framework}}
|
|
6
|
+
|
|
7
|
+
## Rules
|
|
8
|
+
{{bullet rules}}
|
|
9
|
+
|
|
10
|
+
## Structure
|
|
11
|
+
{{bullet folders}}
|
|
12
|
+
|
|
13
|
+
## Avoid
|
|
14
|
+
{{bullet avoid}}
|
|
15
|
+
{{#if hasMemories}}
|
|
16
|
+
|
|
17
|
+
## Project Memory
|
|
18
|
+
{{#each memories}}
|
|
19
|
+
- [{{type}}] {{content}}
|
|
20
|
+
{{/each}}
|
|
21
|
+
{{/if}}
|
|
22
|
+
{{#if caveman.enabled}}
|
|
23
|
+
|
|
24
|
+
## Response Style
|
|
25
|
+
Terse. Minimal. No padding. Caveman {{caveman.intensity}}.
|
|
26
|
+
{{/if}}
|