@gherk/reactive-architecture 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/README.md +151 -0
  2. package/dist/index.d.ts +3 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +57 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/knowledge/backend-folder-structure.d.ts +10 -0
  7. package/dist/knowledge/backend-folder-structure.d.ts.map +1 -0
  8. package/dist/knowledge/backend-folder-structure.js +730 -0
  9. package/dist/knowledge/backend-folder-structure.js.map +1 -0
  10. package/dist/knowledge/backend-guides.d.ts +13 -0
  11. package/dist/knowledge/backend-guides.d.ts.map +1 -0
  12. package/dist/knowledge/backend-guides.js +914 -0
  13. package/dist/knowledge/backend-guides.js.map +1 -0
  14. package/dist/knowledge/examples.d.ts +6 -0
  15. package/dist/knowledge/examples.d.ts.map +1 -0
  16. package/dist/knowledge/examples.js +829 -0
  17. package/dist/knowledge/examples.js.map +1 -0
  18. package/dist/knowledge/folder-structure.d.ts +10 -0
  19. package/dist/knowledge/folder-structure.d.ts.map +1 -0
  20. package/dist/knowledge/folder-structure.js +686 -0
  21. package/dist/knowledge/folder-structure.js.map +1 -0
  22. package/dist/knowledge/philosophy.d.ts +11 -0
  23. package/dist/knowledge/philosophy.d.ts.map +1 -0
  24. package/dist/knowledge/philosophy.js +427 -0
  25. package/dist/knowledge/philosophy.js.map +1 -0
  26. package/dist/knowledge/stack-guides.d.ts +18 -0
  27. package/dist/knowledge/stack-guides.d.ts.map +1 -0
  28. package/dist/knowledge/stack-guides.js +841 -0
  29. package/dist/knowledge/stack-guides.js.map +1 -0
  30. package/dist/knowledge/style-rules.d.ts +8 -0
  31. package/dist/knowledge/style-rules.d.ts.map +1 -0
  32. package/dist/knowledge/style-rules.js +355 -0
  33. package/dist/knowledge/style-rules.js.map +1 -0
  34. package/dist/prompts/plan-feature.d.ts +3 -0
  35. package/dist/prompts/plan-feature.d.ts.map +1 -0
  36. package/dist/prompts/plan-feature.js +79 -0
  37. package/dist/prompts/plan-feature.js.map +1 -0
  38. package/dist/resources/philosophy-resource.d.ts +3 -0
  39. package/dist/resources/philosophy-resource.d.ts.map +1 -0
  40. package/dist/resources/philosophy-resource.js +25 -0
  41. package/dist/resources/philosophy-resource.js.map +1 -0
  42. package/dist/tools/architecture-guide.d.ts +3 -0
  43. package/dist/tools/architecture-guide.d.ts.map +1 -0
  44. package/dist/tools/architecture-guide.js +38 -0
  45. package/dist/tools/architecture-guide.js.map +1 -0
  46. package/dist/tools/backend-folder-structure.d.ts +3 -0
  47. package/dist/tools/backend-folder-structure.d.ts.map +1 -0
  48. package/dist/tools/backend-folder-structure.js +47 -0
  49. package/dist/tools/backend-folder-structure.js.map +1 -0
  50. package/dist/tools/backend-guide.d.ts +3 -0
  51. package/dist/tools/backend-guide.d.ts.map +1 -0
  52. package/dist/tools/backend-guide.js +41 -0
  53. package/dist/tools/backend-guide.js.map +1 -0
  54. package/dist/tools/detect-and-guide.d.ts +3 -0
  55. package/dist/tools/detect-and-guide.d.ts.map +1 -0
  56. package/dist/tools/detect-and-guide.js +130 -0
  57. package/dist/tools/detect-and-guide.js.map +1 -0
  58. package/dist/tools/examples.d.ts +3 -0
  59. package/dist/tools/examples.d.ts.map +1 -0
  60. package/dist/tools/examples.js +28 -0
  61. package/dist/tools/examples.js.map +1 -0
  62. package/dist/tools/folder-structure.d.ts +3 -0
  63. package/dist/tools/folder-structure.d.ts.map +1 -0
  64. package/dist/tools/folder-structure.js +52 -0
  65. package/dist/tools/folder-structure.js.map +1 -0
  66. package/dist/tools/scaffold.d.ts +3 -0
  67. package/dist/tools/scaffold.d.ts.map +1 -0
  68. package/dist/tools/scaffold.js +562 -0
  69. package/dist/tools/scaffold.js.map +1 -0
  70. package/dist/tools/style-rules.d.ts +3 -0
  71. package/dist/tools/style-rules.d.ts.map +1 -0
  72. package/dist/tools/style-rules.js +43 -0
  73. package/dist/tools/style-rules.js.map +1 -0
  74. package/dist/tools/validate.d.ts +3 -0
  75. package/dist/tools/validate.d.ts.map +1 -0
  76. package/dist/tools/validate.js +195 -0
  77. package/dist/tools/validate.js.map +1 -0
  78. package/package.json +37 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"folder-structure.js","sourceRoot":"","sources":["../../src/knowledge/folder-structure.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,sCAAsC;AACtC,gFAAgF;AAChF,0EAA0E;AAC1E,2EAA2E;AAC3E,wCAAwC;AACxC,EAAE;AACF,0EAA0E;AAC1E,wEAAwE;AACxE,gFAAgF;AAUhF,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAC9E,MAAM,iBAAiB,GAAyB;IAC5C,KAAK,EAAE,SAAS;IAChB,WAAW,EAAE,SAAS;IACtB,SAAS,EAAE;QACP,sCAAsC;QACtC,EAAE;QACF,eAAe;QACf,EAAE;QACF,wCAAwC;QACxC,EAAE;QACF,mFAAmF;QACnF,+EAA+E;QAC/E,sEAAsE;QACtE,sCAAsC;QACtC,EAAE;QACF,qBAAqB;QACrB,EAAE;QACF,4FAA4F;QAC5F,qDAAqD;QACrD,iGAAiG;QACjG,6FAA6F;QAC7F,sFAAsF;QACtF,sFAAsF;QACtF,qEAAqE;QACrE,+EAA+E;QAC/E,+FAA+F;QAC/F,yFAAyF;QACzF,uCAAuC;QACvC,2EAA2E;QAC3E,EAAE;QACF,0CAA0C;QAC1C,EAAE;QACF,KAAK;QACL,MAAM;QACN,oFAAoF;QACpF,gCAAgC;QAChC,kCAAkC;QAClC,6FAA6F;QAC7F,GAAG;QACH,mFAAmF;QACnF,iBAAiB;QACjB,2BAA2B;QAC3B,uBAAuB;QACvB,iCAAiC;QACjC,iBAAiB;QACjB,6EAA6E;QAC7E,mBAAmB;QACnB,gCAAgC;QAChC,GAAG;QACH,iFAAiF;QACjF,kBAAkB;QAClB,kBAAkB;QAClB,gBAAgB;QAChB,mBAAmB;QACnB,mBAAmB;QACnB,gBA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AE,gBAAgB;IACxB,MAAM,EAAE,gBAAgB;CAC3B,CAAC;AAEF,MAAM,UAAU,kBAAkB,CAAC,KAAkB;IACjD,MAAM,KAAK,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IACnC,IAAI,CAAC,KAAK;QAAE,OAAO,wEAAwE,CAAC;IAC5F,OAAO;QACH,KAAK,CAAC,SAAS;QACf,EAAE;QACF,KAAK;QACL,EAAE;QACF,eAAe;KAClB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,sBAAsB;IAClC,OAAO;QACH,GAAG,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;QACvD,EAAE;QACF,KAAK;QACL,EAAE;QACF,eAAe;KAClB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,11 @@
1
+ export declare const PHILOSOPHY_OVERVIEW = "\n# Reactive Frontend Architecture Philosophy\n\n## Core Principle\nEvery frontend feature MUST be structured following **three clearly separated layers**:\n\n```\nComponent \u2192 Store \u2192 Service\n (UI) (State) (Data Access)\n```\n\nThis is a **strict, non-negotiable pattern**. It applies to EVERY feature, in EVERY framework (Angular, React, Vue, Svelte, or any other). The technology changes, the philosophy does NOT.\n\n## Why This Pattern?\n\n1. **Predictability**: Data always flows in one direction. You always know where state lives and how it changes.\n2. **Testability**: Each layer can be tested in isolation. Components test rendering, stores test logic, services test data access.\n3. **Reusability**: Services can be shared across stores. Stores can be shared across components. Components are self-contained.\n4. **Scalability**: Adding features doesn't increase complexity because each feature follows the same pattern.\n5. **AI-Friendly**: When AI assistants follow this pattern consistently, the codebase remains coherent regardless of who (or what) writes the code.\n";
2
+ export declare const COMPONENT_LAYER = "\n# Component Layer (UI / Presentation)\n\n## Responsibility\nThe component is **ONLY** responsible for:\n- Rendering UI based on state from the store\n- Capturing user interactions (clicks, input, navigation)\n- Dispatching actions/calls to the store\n- Presentational logic ONLY (formatting dates, toggling CSS classes)\n\n## Rules\n\n### MUST\n- Read all data from the store (via selectors, signals, observables, or reactive primitives)\n- Delegate ALL side effects to the store (loading data, submitting forms, etc.)\n- Be as \"dumb\" as possible \u2014 a template with holes filled by the store\n- Handle only UI concerns: show/hide, enable/disable, format display values\n\n### MUST NOT\n- Call HTTP/fetch/axios directly \u2014 NEVER\n- Contain business logic (validation rules, calculations, transformations)\n- Hold application state in local variables (only ephemeral UI state like \"is dropdown open\")\n- Know about the data access layer (services) \u2014 it only knows the store\n- Import or inject services directly\n\n## Ephemeral UI State (The Exception)\nComponents CAN hold purely ephemeral UI state that has no business meaning:\n- `isDropdownOpen`\n- `currentTabIndex`\n- `isModalVisible`\n\nThis state dies with the component and has no impact on application logic.\n\n## Mental Model\n> Think of the component as a **TV screen**: it displays what the store tells it, and it has a remote control (user interactions) that sends commands to the store. The TV never fetches channels itself.\n";
3
+ export declare const STORE_LAYER = "\n# Store Layer (State Management / Business Logic)\n\n## Responsibility\nThe store is the **single source of truth** for a feature's state. It:\n- Holds the feature state (data, loading, error, filters, pagination, etc.)\n- Exposes reactive selectors/computed values for components to consume\n- Contains business logic (when to load, how to transform, validation orchestration)\n- Orchestrates service calls (calls the service, handles the response, updates state)\n\n## Rules\n\n### MUST\n- Be the ONLY place where feature state lives\n- Expose state as reactive primitives (signals, observables, reactive refs \u2014 depending on framework)\n- Handle loading/error/success states explicitly\n- Call services for any data access needs\n- Be the orchestrator: component asks \u2192 store decides \u2192 service fetches \u2192 store updates \u2192 component reacts\n\n### MUST NOT\n- Make HTTP calls directly \u2014 delegate to services\n- Know about the DOM or UI rendering\n- Depend on component lifecycle (it should be independent)\n- Import component code\n\n## State Shape Convention\nEvery feature store should manage at minimum:\n```typescript\n{\n data: T | T[]; // The actual feature data\n loading: boolean; // Is data being fetched/submitted?\n error: string | null; // Error message if something failed\n loaded: boolean; // Has data been loaded at least once?\n}\n```\n\nAdditional state as needed:\n- `filters`, `sorting`, `pagination` for list features\n- `selectedItem` for detail views\n- `formData`, `formErrors` for form features\n\n## Mental Model\n> Think of the store as the **brain**: it knows the current state of everything, decides what to do when the component asks for something, and tells the service to go fetch or send data. It then updates its knowledge based on what comes back.\n";
4
+ export declare const SERVICE_LAYER = "\n# Service Layer (Data Access)\n\n## Responsibility\nThe service is a **pure data access layer**. It:\n- Makes HTTP requests (GET, POST, PUT, DELETE)\n- Handles WebSocket connections\n- Accesses localStorage/sessionStorage\n- Interacts with any external data source\n\n## Rules\n\n### MUST\n- Be stateless \u2014 no internal state, no caching (that's the store's job)\n- Return data in a clean format (observables, promises, or the framework's preferred async primitive)\n- Handle request configuration (headers, base URL, interceptors)\n- Map API responses to domain models/interfaces if needed\n- Be reusable across different stores\n\n### MUST NOT\n- Hold state \u2014 NEVER\n- Contain business logic (no \"if user is admin, do X\")\n- Know about components or stores (it's a pure utility)\n- Handle loading/error state (that's the store's job)\n- Transform data for display purposes (that's the component's job)\n\n## Service Method Convention\n```typescript\n// GOOD: Clean, simple, one job\ngetUsers(): Observable<User[]> | Promise<User[]>\ngetUserById(id: string): Observable<User> | Promise<User>\ncreateUser(data: CreateUserDto): Observable<User> | Promise<User>\nupdateUser(id: string, data: UpdateUserDto): Observable<User> | Promise<User>\ndeleteUser(id: string): Observable<void> | Promise<void>\n\n// BAD: Doing too much\ngetUsersAndTransformForDisplay() // \u274C Transformation is store/component job\ngetUsersIfNotCached() // \u274C Caching is the store's job\ngetUsersAndSetLoading() // \u274C Loading state is the store's job\n```\n\n## Mental Model\n> Think of the service as a **messenger/courier**: it goes out, gets or delivers the package, and comes back. It doesn't open the package, doesn't decide what to do with it, and doesn't remember what it delivered yesterday.\n";
5
+ export declare const ANTI_PATTERNS = "\n# Anti-patterns \u2014 What NOT To Do\n\n## 1. HTTP in Components \u274C\n```typescript\n// \u274C WRONG: Component calling HTTP directly\nclass UserListComponent {\n users = [];\n async ngOnInit() {\n this.users = await fetch('/api/users').then(r => r.json());\n }\n}\n\n// \u2705 CORRECT: Component reads from store\nclass UserListComponent {\n users = this.userStore.users;\n constructor(private userStore: UserStore) {\n this.userStore.loadUsers();\n }\n}\n```\n\n## 2. Business Logic in Services \u274C\n```typescript\n// \u274C WRONG: Service deciding business rules\nclass UserService {\n async getVisibleUsers() {\n const users = await this.http.get('/users');\n return users.filter(u => u.role !== 'admin' && u.isActive);\n }\n}\n\n// \u2705 CORRECT: Service returns raw data, store filters\nclass UserService {\n getUsers() { return this.http.get('/users'); }\n}\nclass UserStore {\n visibleUsers = computed(() =>\n this.users().filter(u => u.role !== 'admin' && u.isActive)\n );\n}\n```\n\n## 3. State in Services \u274C\n```typescript\n// \u274C WRONG: Service holding state\nclass UserService {\n private users: User[] = [];\n private loading = false;\n\n async loadUsers() {\n this.loading = true;\n this.users = await fetch('/api/users');\n this.loading = false;\n }\n}\n\n// \u2705 CORRECT: State lives in the store\nclass UserStore {\n readonly users = signal<User[]>([]);\n readonly loading = signal(false);\n\n async loadUsers() {\n this.loading.set(true);\n const data = await this.userService.getUsers();\n this.users.set(data);\n this.loading.set(false);\n }\n}\n```\n\n## 4. Component Holding Business State \u274C\n```typescript\n// \u274C WRONG: Component managing complex state\nclass UserListComponent {\n users: User[] = [];\n filteredUsers: User[] = [];\n filters = { search: '', role: 'all' };\n loading = false;\n error = null;\n\n applyFilters() { /* complex filtering */ }\n}\n\n// \u2705 CORRECT: Store manages state, component just reads\nclass UserListComponent {\n users = this.store.filteredUsers;\n loading = this.store.loading;\n error = this.store.error;\n}\n```\n\n## 5. Store Accessing DOM \u274C\n```typescript\n// \u274C WRONG: Store manipulating DOM\nclass UserStore {\n showSuccessMessage() {\n document.getElementById('toast').style.display = 'block';\n }\n}\n\n// \u2705 CORRECT: Store updates state, component reacts\nclass UserStore {\n readonly notification = signal<string | null>(null);\n}\n// Component template reacts to notification signal\n```\n\n## 6. Skipping the Store \u274C\n```typescript\n// \u274C WRONG: Component calling service directly\nclass UserComponent {\n constructor(private userService: UserService) {}\n async save() {\n await this.userService.createUser(this.formData);\n }\n}\n\n// \u2705 CORRECT: Component goes through store\nclass UserComponent {\n constructor(private userStore: UserStore) {}\n save() {\n this.userStore.createUser(this.formData);\n }\n}\n```\n";
6
+ export declare const FILE_STRUCTURE = "\n# File Structure Convention\n\nEvery feature should follow this directory structure:\n\n```\nsrc/\n\u251C\u2500\u2500 features/\n\u2502 \u2514\u2500\u2500 users/ # Feature folder\n\u2502 \u251C\u2500\u2500 components/ # All components for this feature\n\u2502 \u2502 \u251C\u2500\u2500 user-list/\n\u2502 \u2502 \u2502 \u251C\u2500\u2500 user-list.component.ts\n\u2502 \u2502 \u2502 \u251C\u2500\u2500 user-list.component.html # (if framework uses templates)\n\u2502 \u2502 \u2502 \u2514\u2500\u2500 user-list.component.css\n\u2502 \u2502 \u251C\u2500\u2500 user-detail/\n\u2502 \u2502 \u2502 \u2514\u2500\u2500 ...\n\u2502 \u2502 \u2514\u2500\u2500 user-form/\n\u2502 \u2502 \u2514\u2500\u2500 ...\n\u2502 \u251C\u2500\u2500 store/ # Feature store\n\u2502 \u2502 \u251C\u2500\u2500 user.store.ts\n\u2502 \u2502 \u2514\u2500\u2500 user.store.spec.ts\n\u2502 \u251C\u2500\u2500 services/ # Data access services\n\u2502 \u2502 \u251C\u2500\u2500 user.service.ts\n\u2502 \u2502 \u2514\u2500\u2500 user.service.spec.ts\n\u2502 \u251C\u2500\u2500 models/ # TypeScript interfaces & types\n\u2502 \u2502 \u2514\u2500\u2500 user.model.ts\n\u2502 \u2514\u2500\u2500 index.ts # Public API barrel file\n\u251C\u2500\u2500 shared/ # Cross-feature shared code\n\u2502 \u251C\u2500\u2500 components/ # Reusable UI components\n\u2502 \u251C\u2500\u2500 services/ # Shared services (auth, http interceptor)\n\u2502 \u251C\u2500\u2500 stores/ # Shared stores (auth, ui, notifications)\n\u2502 \u2514\u2500\u2500 models/ # Shared interfaces & types\n\u2514\u2500\u2500 core/ # App-wide singletons\n \u251C\u2500\u2500 auth/\n \u251C\u2500\u2500 layout/\n \u2514\u2500\u2500 config/\n```\n\n## Naming Conventions\n- Feature folders: **kebab-case** (e.g., `user-management`)\n- Store files: `<feature>.store.ts`\n- Service files: `<feature>.service.ts`\n- Model files: `<feature>.model.ts`\n- Component files: `<component-name>.component.ts`\n- Test files: `<file>.spec.ts` or `<file>.test.ts`\n\n## Barrel Files (index.ts)\nEvery feature folder MUST have an `index.ts` that exports the public API:\n```typescript\n// features/users/index.ts\nexport { UserListComponent } from './components/user-list/user-list.component';\nexport { UserStore } from './store/user.store';\nexport { UserService } from './services/user.service';\nexport type { User, CreateUserDto } from './models/user.model';\n```\n";
7
+ export declare const IMPLEMENTATION_FLOW = "\n# Implementation Flow \u2014 How to Build a Feature\n\nWhen implementing a new feature, ALWAYS follow this order:\n\n## Step 1: Define the Model\nCreate the TypeScript interfaces/types that represent the data:\n```typescript\n// models/user.model.ts\nexport interface User {\n id: string;\n name: string;\n email: string;\n role: 'admin' | 'user';\n isActive: boolean;\n}\n\nexport interface CreateUserDto {\n name: string;\n email: string;\n role: 'admin' | 'user';\n}\n```\n\n## Step 2: Build the Service\nCreate the data access layer (HTTP calls):\n```typescript\n// services/user.service.ts\n// Returns promises or observables, nothing more\n```\n\n## Step 3: Build the Store\nCreate the state management layer:\n```typescript\n// store/user.store.ts\n// Holds state, calls service, exposes reactive selectors\n```\n\n## Step 4: Build the Component\nCreate the UI that reads from the store:\n```typescript\n// components/user-list/user-list.component.ts\n// Reads from store, dispatches to store, renders UI\n```\n\n## Step 5: Write Tests\n- Service tests: Mock HTTP, verify requests\n- Store tests: Mock service, verify state transitions\n- Component tests: Mock store, verify rendering & interactions\n\n## Why This Order?\n- **Model first**: defines the contract between all layers\n- **Service second**: it has no dependencies, easiest to build and test\n- **Store third**: depends only on service, contains the logic\n- **Component last**: depends on store, is purely visual\n- **Tests alongside or after**: ensures each layer works correctly\n\nThis is a **bottom-up** approach that ensures you never build a layer without its dependency being ready.\n";
8
+ export declare function getFullPhilosophy(): string;
9
+ export declare function getSection(section: string): string | null;
10
+ export declare const AVAILABLE_SECTIONS: string[];
11
+ //# sourceMappingURL=philosophy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"philosophy.d.ts","sourceRoot":"","sources":["../../src/knowledge/philosophy.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,mBAAmB,+kCAoB/B,CAAC;AAEF,eAAO,MAAM,eAAe,0+CAmC3B,CAAC;AAEF,eAAO,MAAM,WAAW,2zDA2CvB,CAAC;AAEF,eAAO,MAAM,aAAa,gyDA2CzB,CAAC;AAEF,eAAO,MAAM,aAAa,y9FA8HzB,CAAC;AAEF,eAAO,MAAM,cAAc,4rFAuD1B,CAAC;AAEF,eAAO,MAAM,mBAAmB,6oDA0D/B,CAAC;AAEF,wBAAgB,iBAAiB,IAAI,MAAM,CAU1C;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAYzD;AAED,eAAO,MAAM,kBAAkB,UAQ9B,CAAC"}
@@ -0,0 +1,427 @@
1
+ // =============================================================================
2
+ // REACTIVE FRONTEND ARCHITECTURE — CORE PHILOSOPHY
3
+ // =============================================================================
4
+ // This is the heart of the MCP server. It contains the complete reactive
5
+ // architecture philosophy that AI assistants should follow when building
6
+ // frontend applications, regardless of the framework.
7
+ // =============================================================================
8
+ export const PHILOSOPHY_OVERVIEW = `
9
+ # Reactive Frontend Architecture Philosophy
10
+
11
+ ## Core Principle
12
+ Every frontend feature MUST be structured following **three clearly separated layers**:
13
+
14
+ \`\`\`
15
+ Component → Store → Service
16
+ (UI) (State) (Data Access)
17
+ \`\`\`
18
+
19
+ This is a **strict, non-negotiable pattern**. It applies to EVERY feature, in EVERY framework (Angular, React, Vue, Svelte, or any other). The technology changes, the philosophy does NOT.
20
+
21
+ ## Why This Pattern?
22
+
23
+ 1. **Predictability**: Data always flows in one direction. You always know where state lives and how it changes.
24
+ 2. **Testability**: Each layer can be tested in isolation. Components test rendering, stores test logic, services test data access.
25
+ 3. **Reusability**: Services can be shared across stores. Stores can be shared across components. Components are self-contained.
26
+ 4. **Scalability**: Adding features doesn't increase complexity because each feature follows the same pattern.
27
+ 5. **AI-Friendly**: When AI assistants follow this pattern consistently, the codebase remains coherent regardless of who (or what) writes the code.
28
+ `;
29
+ export const COMPONENT_LAYER = `
30
+ # Component Layer (UI / Presentation)
31
+
32
+ ## Responsibility
33
+ The component is **ONLY** responsible for:
34
+ - Rendering UI based on state from the store
35
+ - Capturing user interactions (clicks, input, navigation)
36
+ - Dispatching actions/calls to the store
37
+ - Presentational logic ONLY (formatting dates, toggling CSS classes)
38
+
39
+ ## Rules
40
+
41
+ ### MUST
42
+ - Read all data from the store (via selectors, signals, observables, or reactive primitives)
43
+ - Delegate ALL side effects to the store (loading data, submitting forms, etc.)
44
+ - Be as "dumb" as possible — a template with holes filled by the store
45
+ - Handle only UI concerns: show/hide, enable/disable, format display values
46
+
47
+ ### MUST NOT
48
+ - Call HTTP/fetch/axios directly — NEVER
49
+ - Contain business logic (validation rules, calculations, transformations)
50
+ - Hold application state in local variables (only ephemeral UI state like "is dropdown open")
51
+ - Know about the data access layer (services) — it only knows the store
52
+ - Import or inject services directly
53
+
54
+ ## Ephemeral UI State (The Exception)
55
+ Components CAN hold purely ephemeral UI state that has no business meaning:
56
+ - \`isDropdownOpen\`
57
+ - \`currentTabIndex\`
58
+ - \`isModalVisible\`
59
+
60
+ This state dies with the component and has no impact on application logic.
61
+
62
+ ## Mental Model
63
+ > Think of the component as a **TV screen**: it displays what the store tells it, and it has a remote control (user interactions) that sends commands to the store. The TV never fetches channels itself.
64
+ `;
65
+ export const STORE_LAYER = `
66
+ # Store Layer (State Management / Business Logic)
67
+
68
+ ## Responsibility
69
+ The store is the **single source of truth** for a feature's state. It:
70
+ - Holds the feature state (data, loading, error, filters, pagination, etc.)
71
+ - Exposes reactive selectors/computed values for components to consume
72
+ - Contains business logic (when to load, how to transform, validation orchestration)
73
+ - Orchestrates service calls (calls the service, handles the response, updates state)
74
+
75
+ ## Rules
76
+
77
+ ### MUST
78
+ - Be the ONLY place where feature state lives
79
+ - Expose state as reactive primitives (signals, observables, reactive refs — depending on framework)
80
+ - Handle loading/error/success states explicitly
81
+ - Call services for any data access needs
82
+ - Be the orchestrator: component asks → store decides → service fetches → store updates → component reacts
83
+
84
+ ### MUST NOT
85
+ - Make HTTP calls directly — delegate to services
86
+ - Know about the DOM or UI rendering
87
+ - Depend on component lifecycle (it should be independent)
88
+ - Import component code
89
+
90
+ ## State Shape Convention
91
+ Every feature store should manage at minimum:
92
+ \`\`\`typescript
93
+ {
94
+ data: T | T[]; // The actual feature data
95
+ loading: boolean; // Is data being fetched/submitted?
96
+ error: string | null; // Error message if something failed
97
+ loaded: boolean; // Has data been loaded at least once?
98
+ }
99
+ \`\`\`
100
+
101
+ Additional state as needed:
102
+ - \`filters\`, \`sorting\`, \`pagination\` for list features
103
+ - \`selectedItem\` for detail views
104
+ - \`formData\`, \`formErrors\` for form features
105
+
106
+ ## Mental Model
107
+ > Think of the store as the **brain**: it knows the current state of everything, decides what to do when the component asks for something, and tells the service to go fetch or send data. It then updates its knowledge based on what comes back.
108
+ `;
109
+ export const SERVICE_LAYER = `
110
+ # Service Layer (Data Access)
111
+
112
+ ## Responsibility
113
+ The service is a **pure data access layer**. It:
114
+ - Makes HTTP requests (GET, POST, PUT, DELETE)
115
+ - Handles WebSocket connections
116
+ - Accesses localStorage/sessionStorage
117
+ - Interacts with any external data source
118
+
119
+ ## Rules
120
+
121
+ ### MUST
122
+ - Be stateless — no internal state, no caching (that's the store's job)
123
+ - Return data in a clean format (observables, promises, or the framework's preferred async primitive)
124
+ - Handle request configuration (headers, base URL, interceptors)
125
+ - Map API responses to domain models/interfaces if needed
126
+ - Be reusable across different stores
127
+
128
+ ### MUST NOT
129
+ - Hold state — NEVER
130
+ - Contain business logic (no "if user is admin, do X")
131
+ - Know about components or stores (it's a pure utility)
132
+ - Handle loading/error state (that's the store's job)
133
+ - Transform data for display purposes (that's the component's job)
134
+
135
+ ## Service Method Convention
136
+ \`\`\`typescript
137
+ // GOOD: Clean, simple, one job
138
+ getUsers(): Observable<User[]> | Promise<User[]>
139
+ getUserById(id: string): Observable<User> | Promise<User>
140
+ createUser(data: CreateUserDto): Observable<User> | Promise<User>
141
+ updateUser(id: string, data: UpdateUserDto): Observable<User> | Promise<User>
142
+ deleteUser(id: string): Observable<void> | Promise<void>
143
+
144
+ // BAD: Doing too much
145
+ getUsersAndTransformForDisplay() // ❌ Transformation is store/component job
146
+ getUsersIfNotCached() // ❌ Caching is the store's job
147
+ getUsersAndSetLoading() // ❌ Loading state is the store's job
148
+ \`\`\`
149
+
150
+ ## Mental Model
151
+ > Think of the service as a **messenger/courier**: it goes out, gets or delivers the package, and comes back. It doesn't open the package, doesn't decide what to do with it, and doesn't remember what it delivered yesterday.
152
+ `;
153
+ export const ANTI_PATTERNS = `
154
+ # Anti-patterns — What NOT To Do
155
+
156
+ ## 1. HTTP in Components ❌
157
+ \`\`\`typescript
158
+ // ❌ WRONG: Component calling HTTP directly
159
+ class UserListComponent {
160
+ users = [];
161
+ async ngOnInit() {
162
+ this.users = await fetch('/api/users').then(r => r.json());
163
+ }
164
+ }
165
+
166
+ // ✅ CORRECT: Component reads from store
167
+ class UserListComponent {
168
+ users = this.userStore.users;
169
+ constructor(private userStore: UserStore) {
170
+ this.userStore.loadUsers();
171
+ }
172
+ }
173
+ \`\`\`
174
+
175
+ ## 2. Business Logic in Services ❌
176
+ \`\`\`typescript
177
+ // ❌ WRONG: Service deciding business rules
178
+ class UserService {
179
+ async getVisibleUsers() {
180
+ const users = await this.http.get('/users');
181
+ return users.filter(u => u.role !== 'admin' && u.isActive);
182
+ }
183
+ }
184
+
185
+ // ✅ CORRECT: Service returns raw data, store filters
186
+ class UserService {
187
+ getUsers() { return this.http.get('/users'); }
188
+ }
189
+ class UserStore {
190
+ visibleUsers = computed(() =>
191
+ this.users().filter(u => u.role !== 'admin' && u.isActive)
192
+ );
193
+ }
194
+ \`\`\`
195
+
196
+ ## 3. State in Services ❌
197
+ \`\`\`typescript
198
+ // ❌ WRONG: Service holding state
199
+ class UserService {
200
+ private users: User[] = [];
201
+ private loading = false;
202
+
203
+ async loadUsers() {
204
+ this.loading = true;
205
+ this.users = await fetch('/api/users');
206
+ this.loading = false;
207
+ }
208
+ }
209
+
210
+ // ✅ CORRECT: State lives in the store
211
+ class UserStore {
212
+ readonly users = signal<User[]>([]);
213
+ readonly loading = signal(false);
214
+
215
+ async loadUsers() {
216
+ this.loading.set(true);
217
+ const data = await this.userService.getUsers();
218
+ this.users.set(data);
219
+ this.loading.set(false);
220
+ }
221
+ }
222
+ \`\`\`
223
+
224
+ ## 4. Component Holding Business State ❌
225
+ \`\`\`typescript
226
+ // ❌ WRONG: Component managing complex state
227
+ class UserListComponent {
228
+ users: User[] = [];
229
+ filteredUsers: User[] = [];
230
+ filters = { search: '', role: 'all' };
231
+ loading = false;
232
+ error = null;
233
+
234
+ applyFilters() { /* complex filtering */ }
235
+ }
236
+
237
+ // ✅ CORRECT: Store manages state, component just reads
238
+ class UserListComponent {
239
+ users = this.store.filteredUsers;
240
+ loading = this.store.loading;
241
+ error = this.store.error;
242
+ }
243
+ \`\`\`
244
+
245
+ ## 5. Store Accessing DOM ❌
246
+ \`\`\`typescript
247
+ // ❌ WRONG: Store manipulating DOM
248
+ class UserStore {
249
+ showSuccessMessage() {
250
+ document.getElementById('toast').style.display = 'block';
251
+ }
252
+ }
253
+
254
+ // ✅ CORRECT: Store updates state, component reacts
255
+ class UserStore {
256
+ readonly notification = signal<string | null>(null);
257
+ }
258
+ // Component template reacts to notification signal
259
+ \`\`\`
260
+
261
+ ## 6. Skipping the Store ❌
262
+ \`\`\`typescript
263
+ // ❌ WRONG: Component calling service directly
264
+ class UserComponent {
265
+ constructor(private userService: UserService) {}
266
+ async save() {
267
+ await this.userService.createUser(this.formData);
268
+ }
269
+ }
270
+
271
+ // ✅ CORRECT: Component goes through store
272
+ class UserComponent {
273
+ constructor(private userStore: UserStore) {}
274
+ save() {
275
+ this.userStore.createUser(this.formData);
276
+ }
277
+ }
278
+ \`\`\`
279
+ `;
280
+ export const FILE_STRUCTURE = `
281
+ # File Structure Convention
282
+
283
+ Every feature should follow this directory structure:
284
+
285
+ \`\`\`
286
+ src/
287
+ ├── features/
288
+ │ └── users/ # Feature folder
289
+ │ ├── components/ # All components for this feature
290
+ │ │ ├── user-list/
291
+ │ │ │ ├── user-list.component.ts
292
+ │ │ │ ├── user-list.component.html # (if framework uses templates)
293
+ │ │ │ └── user-list.component.css
294
+ │ │ ├── user-detail/
295
+ │ │ │ └── ...
296
+ │ │ └── user-form/
297
+ │ │ └── ...
298
+ │ ├── store/ # Feature store
299
+ │ │ ├── user.store.ts
300
+ │ │ └── user.store.spec.ts
301
+ │ ├── services/ # Data access services
302
+ │ │ ├── user.service.ts
303
+ │ │ └── user.service.spec.ts
304
+ │ ├── models/ # TypeScript interfaces & types
305
+ │ │ └── user.model.ts
306
+ │ └── index.ts # Public API barrel file
307
+ ├── shared/ # Cross-feature shared code
308
+ │ ├── components/ # Reusable UI components
309
+ │ ├── services/ # Shared services (auth, http interceptor)
310
+ │ ├── stores/ # Shared stores (auth, ui, notifications)
311
+ │ └── models/ # Shared interfaces & types
312
+ └── core/ # App-wide singletons
313
+ ├── auth/
314
+ ├── layout/
315
+ └── config/
316
+ \`\`\`
317
+
318
+ ## Naming Conventions
319
+ - Feature folders: **kebab-case** (e.g., \`user-management\`)
320
+ - Store files: \`<feature>.store.ts\`
321
+ - Service files: \`<feature>.service.ts\`
322
+ - Model files: \`<feature>.model.ts\`
323
+ - Component files: \`<component-name>.component.ts\`
324
+ - Test files: \`<file>.spec.ts\` or \`<file>.test.ts\`
325
+
326
+ ## Barrel Files (index.ts)
327
+ Every feature folder MUST have an \`index.ts\` that exports the public API:
328
+ \`\`\`typescript
329
+ // features/users/index.ts
330
+ export { UserListComponent } from './components/user-list/user-list.component';
331
+ export { UserStore } from './store/user.store';
332
+ export { UserService } from './services/user.service';
333
+ export type { User, CreateUserDto } from './models/user.model';
334
+ \`\`\`
335
+ `;
336
+ export const IMPLEMENTATION_FLOW = `
337
+ # Implementation Flow — How to Build a Feature
338
+
339
+ When implementing a new feature, ALWAYS follow this order:
340
+
341
+ ## Step 1: Define the Model
342
+ Create the TypeScript interfaces/types that represent the data:
343
+ \`\`\`typescript
344
+ // models/user.model.ts
345
+ export interface User {
346
+ id: string;
347
+ name: string;
348
+ email: string;
349
+ role: 'admin' | 'user';
350
+ isActive: boolean;
351
+ }
352
+
353
+ export interface CreateUserDto {
354
+ name: string;
355
+ email: string;
356
+ role: 'admin' | 'user';
357
+ }
358
+ \`\`\`
359
+
360
+ ## Step 2: Build the Service
361
+ Create the data access layer (HTTP calls):
362
+ \`\`\`typescript
363
+ // services/user.service.ts
364
+ // Returns promises or observables, nothing more
365
+ \`\`\`
366
+
367
+ ## Step 3: Build the Store
368
+ Create the state management layer:
369
+ \`\`\`typescript
370
+ // store/user.store.ts
371
+ // Holds state, calls service, exposes reactive selectors
372
+ \`\`\`
373
+
374
+ ## Step 4: Build the Component
375
+ Create the UI that reads from the store:
376
+ \`\`\`typescript
377
+ // components/user-list/user-list.component.ts
378
+ // Reads from store, dispatches to store, renders UI
379
+ \`\`\`
380
+
381
+ ## Step 5: Write Tests
382
+ - Service tests: Mock HTTP, verify requests
383
+ - Store tests: Mock service, verify state transitions
384
+ - Component tests: Mock store, verify rendering & interactions
385
+
386
+ ## Why This Order?
387
+ - **Model first**: defines the contract between all layers
388
+ - **Service second**: it has no dependencies, easiest to build and test
389
+ - **Store third**: depends only on service, contains the logic
390
+ - **Component last**: depends on store, is purely visual
391
+ - **Tests alongside or after**: ensures each layer works correctly
392
+
393
+ This is a **bottom-up** approach that ensures you never build a layer without its dependency being ready.
394
+ `;
395
+ export function getFullPhilosophy() {
396
+ return [
397
+ PHILOSOPHY_OVERVIEW,
398
+ COMPONENT_LAYER,
399
+ STORE_LAYER,
400
+ SERVICE_LAYER,
401
+ ANTI_PATTERNS,
402
+ FILE_STRUCTURE,
403
+ IMPLEMENTATION_FLOW,
404
+ ].join('\n\n---\n\n');
405
+ }
406
+ export function getSection(section) {
407
+ const sections = {
408
+ overview: PHILOSOPHY_OVERVIEW,
409
+ component: COMPONENT_LAYER,
410
+ store: STORE_LAYER,
411
+ service: SERVICE_LAYER,
412
+ 'anti-patterns': ANTI_PATTERNS,
413
+ 'file-structure': FILE_STRUCTURE,
414
+ 'implementation-flow': IMPLEMENTATION_FLOW,
415
+ };
416
+ return sections[section] ?? null;
417
+ }
418
+ export const AVAILABLE_SECTIONS = [
419
+ 'overview',
420
+ 'component',
421
+ 'store',
422
+ 'service',
423
+ 'anti-patterns',
424
+ 'file-structure',
425
+ 'implementation-flow',
426
+ ];
427
+ //# sourceMappingURL=philosophy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"philosophy.js","sourceRoot":"","sources":["../../src/knowledge/philosophy.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,mDAAmD;AACnD,gFAAgF;AAChF,yEAAyE;AACzE,yEAAyE;AACzE,sDAAsD;AACtD,gFAAgF;AAEhF,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;CAoBlC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmC9B,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2C1B,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2C5B,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8H5B,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuD7B,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0DlC,CAAC;AAEF,MAAM,UAAU,iBAAiB;IAC7B,OAAO;QACH,mBAAmB;QACnB,eAAe;QACf,WAAW;QACX,aAAa;QACb,aAAa;QACb,cAAc;QACd,mBAAmB;KACtB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;AAC1B,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,OAAe;IACtC,MAAM,QAAQ,GAA2B;QACrC,QAAQ,EAAE,mBAAmB;QAC7B,SAAS,EAAE,eAAe;QAC1B,KAAK,EAAE,WAAW;QAClB,OAAO,EAAE,aAAa;QACtB,eAAe,EAAE,aAAa;QAC9B,gBAAgB,EAAE,cAAc;QAChC,qBAAqB,EAAE,mBAAmB;KAC7C,CAAC;IAEF,OAAO,QAAQ,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC;AACrC,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAC9B,UAAU;IACV,WAAW;IACX,OAAO;IACP,SAAS;IACT,eAAe;IACf,gBAAgB;IAChB,qBAAqB;CACxB,CAAC"}
@@ -0,0 +1,18 @@
1
+ export type Stack = 'angular' | 'react' | 'vue' | 'svelte' | 'unknown';
2
+ export interface StackGuide {
3
+ stack: Stack;
4
+ displayName: string;
5
+ stateLibrary: string;
6
+ httpPattern: string;
7
+ reactivityModel: string;
8
+ guide: string;
9
+ }
10
+ export declare function getStackGuide(stack: Stack): StackGuide;
11
+ export interface DetectedStackInfo {
12
+ stack: Stack;
13
+ stateLib?: 'redux' | 'zustand' | 'tanstack-query' | 'ngrx' | 'pinia' | 'svelte-stores';
14
+ }
15
+ export declare function detectStackFromDependencies(deps: Record<string, string>): Stack;
16
+ export declare function detectStateLibrary(deps: Record<string, string>): string | null;
17
+ export declare function getAllStackGuides(): string;
18
+ //# sourceMappingURL=stack-guides.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stack-guides.d.ts","sourceRoot":"","sources":["../../src/knowledge/stack-guides.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,KAAK,GAAG,SAAS,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEvE,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;CACf;AAqyBD,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,UAAU,CAEtD;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,gBAAgB,GAAG,MAAM,GAAG,OAAO,GAAG,eAAe,CAAC;CACxF;AAED,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,KAAK,CAM/E;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,GAAG,IAAI,CAU9E;AAED,wBAAgB,iBAAiB,IAAI,MAAM,CAK1C"}