devendra-skill-package 1.0.2

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 (223) hide show
  1. package/.github/skills/boiler-project-generator/SKILL.md +103 -0
  2. package/.github/skills/boiler-project-generator/assets/templates/android/README.md +3 -0
  3. package/.github/skills/boiler-project-generator/assets/templates/angular/README.md +3 -0
  4. package/.github/skills/boiler-project-generator/assets/templates/flutter/README.md +3 -0
  5. package/.github/skills/boiler-project-generator/assets/templates/ios/README.md +3 -0
  6. package/.github/skills/boiler-project-generator/assets/templates/react/README.md +3 -0
  7. package/.github/skills/boiler-project-generator/assets/templates/react-native/README.md +3 -0
  8. package/.github/skills/boiler-project-generator/assets/templates/react-native/api-setup.ts +76 -0
  9. package/.github/skills/boiler-project-generator/assets/templates/react-native/component-primary-button.tsx +29 -0
  10. package/.github/skills/boiler-project-generator/assets/templates/react-native/env-config.env +4 -0
  11. package/.github/skills/boiler-project-generator/assets/templates/react-native/feature-auth-screen.tsx +45 -0
  12. package/.github/skills/boiler-project-generator/assets/templates/react-native/feature-dashboard-screen.tsx +45 -0
  13. package/.github/skills/boiler-project-generator/assets/templates/react-native/feature-profile-screen.tsx +45 -0
  14. package/.github/skills/boiler-project-generator/assets/templates/react-native/hook-use-app-boot.ts +11 -0
  15. package/.github/skills/boiler-project-generator/assets/templates/react-native/navigation-setup.tsx +25 -0
  16. package/.github/skills/boiler-project-generator/assets/templates/react-native/project-structure.md +24 -0
  17. package/.github/skills/boiler-project-generator/assets/templates/react-native/redux-hooks.ts +5 -0
  18. package/.github/skills/boiler-project-generator/assets/templates/react-native/redux-session-slice.ts +29 -0
  19. package/.github/skills/boiler-project-generator/assets/templates/react-native/redux-store.ts +15 -0
  20. package/.github/skills/boiler-project-generator/assets/templates/react-native/theme-index.ts +23 -0
  21. package/.github/skills/boiler-project-generator/assets/templates/react-native/utils-helpers.ts +7 -0
  22. package/.github/skills/boiler-project-generator/metadata.yaml +29 -0
  23. package/.github/skills/boiler-project-generator/references/android.md +19 -0
  24. package/.github/skills/boiler-project-generator/references/angular.md +14 -0
  25. package/.github/skills/boiler-project-generator/references/flutter.md +17 -0
  26. package/.github/skills/boiler-project-generator/references/ios.md +17 -0
  27. package/.github/skills/boiler-project-generator/references/react-native.md +103 -0
  28. package/.github/skills/boiler-project-generator/references/react.md +17 -0
  29. package/.github/skills/boiler-project-generator/scripts/angular.js +43 -0
  30. package/.github/skills/boiler-project-generator/scripts/generate-project.mjs +107 -0
  31. package/.github/skills/boiler-project-generator/scripts/init.js +105 -0
  32. package/.github/skills/boiler-project-generator/scripts/react-native.js +1041 -0
  33. package/.github/skills/boiler-project-generator/scripts/react.js +32 -0
  34. package/.github/skills/clean-architecture-generator/SKILL.md +235 -0
  35. package/.github/skills/clean-architecture-generator/references/architecture-core.md +126 -0
  36. package/.github/skills/clean-architecture-generator/references/platform-angular.md +374 -0
  37. package/.github/skills/clean-architecture-generator/references/platform-flutter.md +366 -0
  38. package/.github/skills/clean-architecture-generator/references/platform-react-native.md +590 -0
  39. package/.github/skills/clean-architecture-generator/references/platform-react.md +261 -0
  40. package/.github/skills/code-test-coverage-analyzer/SKILL.md +1358 -0
  41. package/.github/skills/code-test-coverage-analyzer/assets/config-questionnaire.md +118 -0
  42. package/.github/skills/code-test-coverage-analyzer/assets/conflict-resolution-protocol.md +99 -0
  43. package/.github/skills/code-test-coverage-analyzer/assets/coverage-calculation-rules.md +294 -0
  44. package/.github/skills/code-test-coverage-analyzer/assets/multi-strategy-search.md +145 -0
  45. package/.github/skills/code-test-coverage-analyzer/assets/output-file-contracts.md +651 -0
  46. package/.github/skills/code-test-coverage-analyzer/assets/status-definitions.md +273 -0
  47. package/.github/skills/code-test-coverage-analyzer/examples/example-invocation.md +208 -0
  48. package/.github/skills/code-test-coverage-analyzer/references/android-patterns.md +229 -0
  49. package/.github/skills/code-test-coverage-analyzer/references/angular-patterns.md +177 -0
  50. package/.github/skills/code-test-coverage-analyzer/references/backend-patterns.md +383 -0
  51. package/.github/skills/code-test-coverage-analyzer/references/flutter-patterns.md +254 -0
  52. package/.github/skills/code-test-coverage-analyzer/references/ios-patterns.md +228 -0
  53. package/.github/skills/code-test-coverage-analyzer/references/react-native-patterns.md +431 -0
  54. package/.github/skills/code-test-coverage-analyzer/references/react-patterns.md +206 -0
  55. package/.github/skills/code-test-coverage-analyzer/scripts/detect-platform.ps1 +261 -0
  56. package/.github/skills/code-test-coverage-analyzer/scripts/scan-repository.ps1 +242 -0
  57. package/.github/skills/code-test-coverage-analyzer/templates/brd-compliance-row.md +107 -0
  58. package/.github/skills/code-test-coverage-analyzer/templates/test-case-row.md +130 -0
  59. package/.github/skills/code-test-coverage-analyzer/templates/user-story-compliance-row.md +170 -0
  60. package/.github/skills/custom-font-integrator/SKILL.md +373 -0
  61. package/.github/skills/custom-font-integrator/assets/FontTestScreen.js +150 -0
  62. package/.github/skills/custom-font-integrator/references/example-info-plist.xml +21 -0
  63. package/.github/skills/custom-font-integrator/scripts/setup-fonts.sh +99 -0
  64. package/.github/skills/encryption-decryption-utility/Instructions.md +282 -0
  65. package/.github/skills/encryption-decryption-utility/README.md +222 -0
  66. package/.github/skills/encryption-decryption-utility/SKILL.md +645 -0
  67. package/.github/skills/encryption-decryption-utility/assets/encryption-config-template.json +13 -0
  68. package/.github/skills/encryption-decryption-utility/assets/platform-matrix.json +180 -0
  69. package/.github/skills/encryption-decryption-utility/metadata.yaml +51 -0
  70. package/.github/skills/encryption-decryption-utility/references/android-crypto.md +157 -0
  71. package/.github/skills/encryption-decryption-utility/references/angular-crypto.md +130 -0
  72. package/.github/skills/encryption-decryption-utility/references/approach-1-webcrypto.md +95 -0
  73. package/.github/skills/encryption-decryption-utility/references/approach-2-rsa-aes-cbc.md +111 -0
  74. package/.github/skills/encryption-decryption-utility/references/approach-3-aes-sharedkey.md +114 -0
  75. package/.github/skills/encryption-decryption-utility/references/architecture.md +233 -0
  76. package/.github/skills/encryption-decryption-utility/references/backend-alignment.md +506 -0
  77. package/.github/skills/encryption-decryption-utility/references/dependency-guidance.md +234 -0
  78. package/.github/skills/encryption-decryption-utility/references/ec-implementation.md +832 -0
  79. package/.github/skills/encryption-decryption-utility/references/error-handling-playbook.md +234 -0
  80. package/.github/skills/encryption-decryption-utility/references/flutter-crypto.md +105 -0
  81. package/.github/skills/encryption-decryption-utility/references/ios-crypto.md +338 -0
  82. package/.github/skills/encryption-decryption-utility/references/native-rsa-implementation.md +373 -0
  83. package/.github/skills/encryption-decryption-utility/references/node-crypto.md +86 -0
  84. package/.github/skills/encryption-decryption-utility/references/react-crypto.md +105 -0
  85. package/.github/skills/encryption-decryption-utility/references/react-native-crypto.md +1001 -0
  86. package/.github/skills/encryption-decryption-utility/references/react-web-crypto.md +668 -0
  87. package/.github/skills/encryption-decryption-utility/references/security-checklist.md +176 -0
  88. package/.github/skills/encryption-decryption-utility/references/web-crypto.md +74 -0
  89. package/.github/skills/encryption-decryption-utility/scripts/detect.js +128 -0
  90. package/.github/skills/encryption-decryption-utility/scripts/install.js +1713 -0
  91. package/.github/skills/encryption-decryption-utility/scripts/setup.js +800 -0
  92. package/.github/skills/encryption-decryption-utility/template.md +241 -0
  93. package/.github/skills/encryption-decryption-utility/templates/config-questionnaire.md +467 -0
  94. package/.github/skills/encryption-decryption-utility/templates/delivery-checklist.md +206 -0
  95. package/.github/skills/encryption-decryption-utility/templates/implementation-plan.md +304 -0
  96. package/.github/skills/feature-generator/SKILL.MD +2741 -0
  97. package/.github/skills/feature-generator/assets/fingerprint-schema.json +385 -0
  98. package/.github/skills/feature-generator/assets/spec-template.md +172 -0
  99. package/.github/skills/feature-generator/assets/transform-rules.json +82 -0
  100. package/.github/skills/feature-generator/references/api-envelope-patterns.md +327 -0
  101. package/.github/skills/feature-generator/references/screen-logic-patterns.md +399 -0
  102. package/.github/skills/feature-generator/references/state-library-patterns.md +464 -0
  103. package/.github/skills/figma-ui-mapper/README.md +34 -0
  104. package/.github/skills/figma-ui-mapper/SKILL.md +101 -0
  105. package/.github/skills/figma-ui-mapper/assets/templates/component-map-template.md +30 -0
  106. package/.github/skills/figma-ui-mapper/assets/templates/generation-report-template.md +49 -0
  107. package/.github/skills/figma-ui-mapper/metadata.yaml +22 -0
  108. package/.github/skills/figma-ui-mapper/references/android.md +11 -0
  109. package/.github/skills/figma-ui-mapper/references/angular.md +18 -0
  110. package/.github/skills/figma-ui-mapper/references/capacitor.md +18 -0
  111. package/.github/skills/figma-ui-mapper/references/common.md +23 -0
  112. package/.github/skills/figma-ui-mapper/references/expo.md +18 -0
  113. package/.github/skills/figma-ui-mapper/references/flutter.md +18 -0
  114. package/.github/skills/figma-ui-mapper/references/frameworks/angular/rules.md +23 -0
  115. package/.github/skills/figma-ui-mapper/references/frameworks/capacitor/rules.md +23 -0
  116. package/.github/skills/figma-ui-mapper/references/frameworks/expo/rules.md +23 -0
  117. package/.github/skills/figma-ui-mapper/references/frameworks/flutter/rules.md +23 -0
  118. package/.github/skills/figma-ui-mapper/references/frameworks/ionic/rules.md +23 -0
  119. package/.github/skills/figma-ui-mapper/references/frameworks/kotlin-multiplatform/rules.md +23 -0
  120. package/.github/skills/figma-ui-mapper/references/frameworks/native-android/rules.md +23 -0
  121. package/.github/skills/figma-ui-mapper/references/frameworks/native-ios/rules.md +23 -0
  122. package/.github/skills/figma-ui-mapper/references/frameworks/next/rules.md +23 -0
  123. package/.github/skills/figma-ui-mapper/references/frameworks/nuxt/rules.md +23 -0
  124. package/.github/skills/figma-ui-mapper/references/frameworks/react/rules.md +19 -0
  125. package/.github/skills/figma-ui-mapper/references/frameworks/react-native/rules.md +23 -0
  126. package/.github/skills/figma-ui-mapper/references/frameworks/svelte/rules.md +23 -0
  127. package/.github/skills/figma-ui-mapper/references/frameworks/vue/rules.md +23 -0
  128. package/.github/skills/figma-ui-mapper/references/ionic.md +18 -0
  129. package/.github/skills/figma-ui-mapper/references/ios.md +11 -0
  130. package/.github/skills/figma-ui-mapper/references/kotlin-multiplatform.md +18 -0
  131. package/.github/skills/figma-ui-mapper/references/native-android.md +18 -0
  132. package/.github/skills/figma-ui-mapper/references/native-ios.md +18 -0
  133. package/.github/skills/figma-ui-mapper/references/next.md +18 -0
  134. package/.github/skills/figma-ui-mapper/references/nuxt.md +18 -0
  135. package/.github/skills/figma-ui-mapper/references/react-figma-guideline.md +21 -0
  136. package/.github/skills/figma-ui-mapper/references/react-native.md +18 -0
  137. package/.github/skills/figma-ui-mapper/references/react.md +18 -0
  138. package/.github/skills/figma-ui-mapper/references/script-usage.md +46 -0
  139. package/.github/skills/figma-ui-mapper/references/svelte.md +18 -0
  140. package/.github/skills/figma-ui-mapper/references/vue.md +18 -0
  141. package/.github/skills/figma-ui-mapper/references/workflow.md +74 -0
  142. package/.github/skills/figma-ui-mapper/scripts/generate-page-through-figma.js +635 -0
  143. package/.github/skills/figma-ui-mapper/scripts/generate-react-page-through-figma.js +4 -0
  144. package/.github/skills/frontend-task-breakdown/SKILL.md +734 -0
  145. package/.github/skills/md-file-converter/SKILL.md +291 -0
  146. package/.github/skills/md-file-converter/config/formats.json +114 -0
  147. package/.github/skills/md-file-converter/extractors/extract-docx.sh +120 -0
  148. package/.github/skills/md-file-converter/extractors/extract-eml.py +108 -0
  149. package/.github/skills/md-file-converter/extractors/extract-pdf.sh +97 -0
  150. package/.github/skills/md-file-converter/extractors/extract-pptx.py +143 -0
  151. package/.github/skills/md-file-converter/extractors/extract-xlsx.py +175 -0
  152. package/.github/skills/md-file-converter/scripts/check-tools.sh +47 -0
  153. package/.github/skills/md-file-converter/scripts/extract-archive.sh +83 -0
  154. package/.github/skills/md-file-converter/scripts/extract-ocr.sh +77 -0
  155. package/.github/skills/md-file-converter/scripts/get-metadata.sh +57 -0
  156. package/.github/skills/md-file-converter/templates/output.md +73 -0
  157. package/.github/skills/md-file-converter/templates/unsupported-object.md +6 -0
  158. package/.github/skills/mockAPI-contract-generator/SKILL.md +607 -0
  159. package/.github/skills/test-case-validator/CHANGELOG.md +155 -0
  160. package/.github/skills/test-case-validator/CONFIGURATION.md +130 -0
  161. package/.github/skills/test-case-validator/EXAMPLES.md +50 -0
  162. package/.github/skills/test-case-validator/QUALITY_SCORING.md +98 -0
  163. package/.github/skills/test-case-validator/README.md +111 -0
  164. package/.github/skills/test-case-validator/REPORT_TEMPLATE.md +116 -0
  165. package/.github/skills/test-case-validator/SKILL.md +209 -0
  166. package/.github/skills/test-case-validator/SYSTEM_PROMPT.md +127 -0
  167. package/.github/skills/test-case-validator/TRACEABILITY_ENGINE.md +152 -0
  168. package/.github/skills/test-case-validator/VALIDATION_RULES.md +411 -0
  169. package/.github/skills/test-case-validator/config/default.config.yaml +62 -0
  170. package/.github/skills/test-case-validator/docs/ARCHITECTURE.md +66 -0
  171. package/.github/skills/test-case-validator/docs/EXTENDING.md +85 -0
  172. package/.github/skills/test-case-validator/docs/FAQ.md +88 -0
  173. package/.github/skills/test-case-validator/docs/VERSIONING.md +55 -0
  174. package/.github/skills/test-case-validator/examples/example-1-manual-qa-ecommerce/input-brd.md +43 -0
  175. package/.github/skills/test-case-validator/examples/example-1-manual-qa-ecommerce/input-test-cases.csv +9 -0
  176. package/.github/skills/test-case-validator/examples/example-1-manual-qa-ecommerce/input-user-story.md +29 -0
  177. package/.github/skills/test-case-validator/examples/example-1-manual-qa-ecommerce/output-report.md +303 -0
  178. package/.github/skills/test-case-validator/examples/example-2-automated-frontend-suite/input-spec.md +43 -0
  179. package/.github/skills/test-case-validator/examples/example-2-automated-frontend-suite/input-test-files-index.md +56 -0
  180. package/.github/skills/test-case-validator/examples/example-2-automated-frontend-suite/output-report.md +274 -0
  181. package/.github/skills/test-case-validator/prompts/00-applicability-resolution.md +61 -0
  182. package/.github/skills/test-case-validator/prompts/01-extraction-user-story.md +58 -0
  183. package/.github/skills/test-case-validator/prompts/02-extraction-brd.md +64 -0
  184. package/.github/skills/test-case-validator/prompts/03-extraction-test-cases.md +92 -0
  185. package/.github/skills/test-case-validator/prompts/04-traceability-matrix.md +41 -0
  186. package/.github/skills/test-case-validator/prompts/05-coverage-analysis.md +46 -0
  187. package/.github/skills/test-case-validator/prompts/06-missing-scenario-detection.md +32 -0
  188. package/.github/skills/test-case-validator/prompts/07-duplicate-detection.md +36 -0
  189. package/.github/skills/test-case-validator/prompts/08-risk-analysis.md +39 -0
  190. package/.github/skills/test-case-validator/prompts/09-gated-wiring-validation.md +53 -0
  191. package/.github/skills/test-case-validator/prompts/10-observation-report.md +56 -0
  192. package/.github/skills/test-case-validator/prompts/11-final-report-assembly.md +57 -0
  193. package/.github/skills/test-case-validator/templates/coverage-table.md +25 -0
  194. package/.github/skills/test-case-validator/templates/executive-summary.md +38 -0
  195. package/.github/skills/test-case-validator/templates/final-summary-block.md +87 -0
  196. package/.github/skills/test-case-validator/templates/observation-entry.md +41 -0
  197. package/.github/skills/test-case-validator/templates/rtm-row.md +25 -0
  198. package/.github/skills/validation-engine-builder/README.md +50 -0
  199. package/.github/skills/validation-engine-builder/SKILL.md +241 -0
  200. package/.github/skills/validation-engine-builder/references/core.md +158 -0
  201. package/.github/skills/validation-engine-builder/references/platform-angular.md +166 -0
  202. package/.github/skills/validation-engine-builder/references/platform-flutter.md +118 -0
  203. package/.github/skills/validation-engine-builder/references/platform-react-native.md +170 -0
  204. package/.github/skills/validation-engine-builder/references/platform-react.md +94 -0
  205. package/.github/skills/validation-engine-builder/scripts/apply-to-project.js +80 -0
  206. package/.github/skills/validation-engine-builder/scripts/generate-angular.js +271 -0
  207. package/.github/skills/validation-engine-builder/scripts/generate-flutter.js +298 -0
  208. package/.github/skills/validation-engine-builder/scripts/generate-react-native.js +217 -0
  209. package/.github/skills/validation-engine-builder/scripts/generate-react.js +163 -0
  210. package/.github/skills/validation-engine-builder/scripts/install-deps.js +53 -0
  211. package/.github/skills/validation-engine-builder/scripts/shared/detect-platform.js +68 -0
  212. package/.github/skills/validation-engine-builder/scripts/shared/npm-deps.js +103 -0
  213. package/.github/skills/validation-engine-builder/scripts/shared/rhf-hook.js +43 -0
  214. package/.github/skills/validation-engine-builder/scripts/shared/ts-messages-regex.js +62 -0
  215. package/.github/skills/validation-engine-builder/scripts/shared/util.js +44 -0
  216. package/.github/skills/validation-engine-builder/scripts/shared/yup-schemas.js +80 -0
  217. package/.github/skills/validation-engine-builder/template.md +73 -0
  218. package/.github/skills/validation-engine-builder/templates/messages.json +22 -0
  219. package/.github/skills/validation-engine-builder/templates/regex.json +16 -0
  220. package/.github/skills/validation-engine-builder/templates/schemas.json +48 -0
  221. package/bin/index.js +145 -0
  222. package/package.json +22 -0
  223. package/readme.md +0 -0
@@ -0,0 +1,32 @@
1
+ const { execSync } = require('node:child_process');
2
+
3
+ function getFlag(name) {
4
+ const idx = process.argv.indexOf(name);
5
+ if (idx === -1) return null;
6
+ return process.argv[idx + 1] || null;
7
+ }
8
+
9
+ if (process.argv.includes('--help') || process.argv.includes('-h')) {
10
+ console.log('Usage: node react.js <projectName> <language> [--template <name>]');
11
+ process.exit(0);
12
+ }
13
+
14
+ const projectName = getFlag('--project') || process.argv[2] || 'my-react-app';
15
+ const language = getFlag('--language') || process.argv[3] || 'javascript';
16
+ const template = getFlag('--template');
17
+
18
+ console.log('Creating React project...');
19
+
20
+ try {
21
+ execSync(
22
+ language === 'typescript'
23
+ ? `npx create-react-app ${projectName} --template typescript`
24
+ : `npx create-react-app ${projectName}`,
25
+ { stdio: 'inherit' }
26
+ );
27
+ } catch (err) {
28
+ console.error('React project creation failed:', err.message);
29
+ process.exit(2);
30
+ }
31
+
32
+ console.log('React project ready!');
@@ -0,0 +1,235 @@
1
+ ---
2
+ name: clean-architecture-generator
3
+ description: Enforce Clean Architecture with vertical feature slicing across React Native, React (web), Angular, and Flutter. Detects which platform the target project is, then detects the project's actual state-management/HTTP-client/storage/navigation/DI stack before generating any code — never assumes a fixed stack. Use when starting a new project, adding a new feature, scaffolding a new screen/page/component/widget, use case, repository, DI wiring, or any layer artifact under Clean Architecture. Enforces folder structure, naming conventions, dependency rules, and platform-appropriate patterns. Trigger phrases: new feature, scaffold feature, add screen, add page, add use case, add repository, clean architecture, vertical slice.
4
+ ---
5
+
6
+ ## Purpose
7
+
8
+ Scaffold and enforce Clean Architecture (vertical feature slice: `domain/` → `data/` →
9
+ `presentation/`, plus DI wiring) on whichever of the four supported platforms the target project
10
+ actually is — React Native, React (web), Angular, or Flutter. The layering and dependency rules are
11
+ identical across all four; the concrete folder names, DI mechanism, state pattern, and file naming
12
+ are platform-specific and come from a per-platform reference file, never invented inline.
13
+
14
+ **This skill never assumes a fixed tech stack.** It detects the platform first, then detects the
15
+ project's actual state-management/HTTP-client/storage/navigation/DI libraries by reading the repo.
16
+ A per-platform default is only used when the project is greenfield (nothing detected) — and it is
17
+ always logged as a default, never silently treated as a requirement.
18
+
19
+ ## Supported Platforms
20
+
21
+ | Platform | Detection signal | Reference file |
22
+ |---|---|---|
23
+ | React Native | `package.json` has `react-native` dependency | `references/platform-react-native.md` |
24
+ | React (web) | `package.json` has `react` + `react-dom`, no `react-native` | `references/platform-react.md` |
25
+ | Angular | `angular.json` at repo root | `references/platform-angular.md` |
26
+ | Flutter | `pubspec.yaml` with a `flutter:` SDK entry | `references/platform-flutter.md` |
27
+
28
+ ## When to Use
29
+
30
+ - Starting a new project on any of the four platforms above
31
+ - Adding a new feature folder (a vertical slice: `domain/` + `data/` + `presentation/` + DI wiring)
32
+ - Creating any layer artifact: entity, use case, repository, API client/data source, DTO/model,
33
+ mapper, state slice/store/bloc, screen/page/component/widget, hook, DI container/provider
34
+ - Reviewing or fixing an existing file that may violate layer boundaries or naming conventions
35
+ - Setting up the app's state store, navigation/routing, or security layer
36
+
37
+ Do **not** use this skill for platforms outside the four above (e.g. plain Node.js backend
38
+ services, native Android/iOS in Kotlin/Swift, Vue) — it has no reference file for them and
39
+ generating from memory for an unsupported platform is exactly the kind of assumption this skill
40
+ exists to avoid. If asked for one of those, say so explicitly rather than approximating from the
41
+ closest supported platform.
42
+
43
+ ---
44
+
45
+ ## STOP — READ REFERENCE FILES BEFORE ANY CODE
46
+
47
+ Always read, in this order:
48
+
49
+ ```
50
+ .github/skills/clean-architecture-generator/references/architecture-core.md
51
+ .github/skills/clean-architecture-generator/references/platform-[detected-platform].md
52
+ ```
53
+
54
+ - `architecture-core.md` — the layers, the dependency rule, universal naming, universal
55
+ anti-patterns. Applies on every platform, always read first.
56
+ - Exactly **one** `platform-*.md` file — the concrete folder tree, DI mechanism, state/HTTP/
57
+ storage/navigation patterns, platform-specific naming, and platform-specific anti-patterns for
58
+ the platform detected in Phase 0. Never read more than one platform file for a single artifact —
59
+ if the repo genuinely contains more than one platform (see Phase 0, Multi-Platform Repos), each
60
+ artifact is generated against the one platform file matching where it will actually live.
61
+
62
+ ---
63
+
64
+ ## Phase 0 — Platform Detection
65
+
66
+ Run before anything else, every time this skill is invoked in a repo it hasn't already confirmed
67
+ the platform for in the current session.
68
+
69
+ 1. Check for `pubspec.yaml` at the repo root (or the target sub-package root in a monorepo) with a
70
+ `flutter:` entry under `dependencies` → **Flutter**.
71
+ 2. Check for `angular.json` at the repo root (or target sub-package root) → **Angular**.
72
+ 3. Check `package.json`:
73
+ - `dependencies`/`devDependencies` contains `react-native` → **React Native**. Also check
74
+ `app.json`/`app.config.*` for an `expo` key or `expo` dependency and note Expo vs. bare — the
75
+ clean-architecture layering is identical either way, but it affects native-module
76
+ availability, which the platform file's Security Rules may depend on.
77
+ - `dependencies` contains `react` + `react-dom`, and **not** `react-native` → **React (web)**.
78
+ Then run the Sub-Variant Detection table at the top of `platform-react.md` (Next.js/CRA/Vite).
79
+ 4. **Multi-platform repos**: if more than one signal matches (e.g. an Nx/Turborepo monorepo with
80
+ both `apps/mobile` running React Native and `apps/web` running React), list every candidate
81
+ app/package found and ask the user which one this request targets — never guess which one based
82
+ on repo-root proximity or file recency.
83
+ 5. **No signal matches**: ask the user which of the four supported platforms this is — never guess
84
+ and never fall back to a default platform.
85
+
86
+ State the detected (or user-confirmed) platform before proceeding, and load exactly that one
87
+ `platform-*.md` file for the remainder of this request.
88
+
89
+ ---
90
+
91
+ ## Phase 1 — Stack Fingerprint Detection
92
+
93
+ Each platform file has a "Stack Fingerprint Defaults" table listing, per concern (state
94
+ management, HTTP client, storage, navigation, DI mechanism, test runner), what to search for in the
95
+ target repo and what default applies only if nothing is found. Run that table now:
96
+
97
+ 1. For each row, search the target repo using the "Detect first" column's patterns — dependency
98
+ manifests (`package.json`/`pubspec.yaml`) first, then a grep across existing source for the
99
+ literal usage patterns listed (e.g. `createSlice(`, `Dio(`, `@ngrx/store`).
100
+ 2. If a row's pattern is found, that is the project's real stack for that concern — use it for
101
+ every artifact generated in this request, and do not substitute the platform file's default.
102
+ 3. If a row's pattern is not found anywhere in the repo, the project is greenfield for that
103
+ concern — apply the platform file's labeled default, and say so explicitly (e.g. "No state
104
+ management library detected — applying default: Redux Toolkit + RTK Query").
105
+ 4. Never mix two different libraries for the same concern within one feature (e.g. do not add
106
+ Riverpod to a Flutter feature that already uses Bloc elsewhere in the same app) — if the repo
107
+ has genuinely inconsistent choices across features, ask which one this new feature should follow
108
+ rather than picking silently.
109
+
110
+ Record the resolved fingerprint (state lib, HTTP client, storage, navigation, DI mechanism) and use
111
+ it consistently for every file generated in the rest of this request.
112
+
113
+ ---
114
+
115
+ ## Execution Steps
116
+
117
+ ### Step 1 — Identify the artifact type
118
+
119
+ | Request | Artifact(s) to create |
120
+ |---------|----------------------|
121
+ | New feature | Full vertical slice: `domain/`, `data/`, `presentation/`, DI wiring, tests, public API surface (per platform file) |
122
+ | New screen / page / widget | One presentation file (see platform file's Naming Extensions for the exact term and suffix) + a state entry if it fetches data |
123
+ | New use case | Domain use case file + repository contract update if a new repository method is needed |
124
+ | New repository | Domain repository contract (interface/abstract class — platform-specific, never `I`-prefix on Angular/Flutter) + data-layer implementation |
125
+ | New API call | Data-layer API client/data source + DTO/model + mapper |
126
+ | New state concern | Whatever the resolved fingerprint's state library uses (slice+thunk+selectors, a Bloc, an RxJS store service, etc. — see platform file) |
127
+ | New DI wiring | Whatever the resolved fingerprint's DI mechanism uses (manual container, Angular providers array, get_it registration, Riverpod provider — see platform file) |
128
+
129
+ ### Step 2 — Confirm platform + fingerprint
130
+
131
+ If Phase 0/Phase 1 haven't run yet in this session for this repo, run them now. Otherwise reuse the
132
+ already-confirmed platform and fingerprint — do not re-detect on every single artifact within the
133
+ same request.
134
+
135
+ ### Step 3 — Apply naming conventions
136
+
137
+ Read `architecture-core.md`'s Universal Naming Conventions table, then the platform file's Naming
138
+ Extensions table. Derive all file and symbol names before writing any code.
139
+
140
+ ### Step 4 — Verify dependency rules
141
+
142
+ Read `architecture-core.md`'s Dependency Rule section, plus the platform file's Dependency Rules
143
+ detail (if it adds any, e.g. a monorepo `packages/*` structure). Confirm the file being created is
144
+ in the correct layer and will only import from allowed layers.
145
+
146
+ ### Step 5 — Apply the correct pattern
147
+
148
+ Read the platform file's code patterns for the artifact type, using the resolved fingerprint from
149
+ Phase 1 (the project's real state/HTTP/storage/navigation library, not necessarily the platform
150
+ file's labeled default). Do not invent variations on the pattern shown.
151
+
152
+ ### Step 6 — Check anti-patterns
153
+
154
+ Read `architecture-core.md`'s Universal Anti-Patterns, then the platform file's platform-specific
155
+ anti-patterns. Reject any pattern that appears in either list before emitting code.
156
+
157
+ ### Step 7 — Expose the public API surface (platform-conditional)
158
+
159
+ - **React Native / React / Angular**: every new public artifact must be exported from its layer's
160
+ `index.ts` and the feature's root `index.ts` barrel (Angular: from the feature's `.providers.ts`/
161
+ `.routes.ts` where relevant — Angular features are consumed via routes, not a barrel import).
162
+ - **Flutter**: Dart apps typically import feature files directly rather than through a barrel — do
163
+ not invent a barrel-export file unless the target project already uses one (check for an existing
164
+ `lib/features/[feature]/[feature].dart` library-export file before deciding either way).
165
+
166
+ ### Step 8 — Register in the composition root
167
+
168
+ - **React Native / React**: add the reducer/slice to the app store and spread the DI container into
169
+ `extraArgument`, in the platform file's `app/state/store.ts`.
170
+ - **Angular**: register the feature's providers array on its lazy route in `app.routes.ts` (or the
171
+ feature's `NgModule`, if the target project is NgModule-based).
172
+ - **Flutter**: call the feature's `init[Feature]Dependencies()` from `app/di/injection_container.dart`'s
173
+ `init()`, and add the feature's route to `app/routing/app_router.dart`.
174
+
175
+ ---
176
+
177
+ ## Dependency Rule (summary — full detail in architecture-core.md)
178
+
179
+ ```
180
+ domain/ ← imports nothing from data/, presentation/, or any framework
181
+ data/ ← implements own domain/ contracts + infrastructure SDKs
182
+ presentation/ ← imports own domain/ + own data/ only through DI, never directly
183
+ core/ (infra) ← never imports from features/*
184
+ features/[x]/ ← self-contained; consumed by others only through its public surface
185
+ app/ (bootstrap) ← imports all features/*, orchestration only
186
+ ```
187
+
188
+ ---
189
+
190
+ ## Strict Rules
191
+
192
+ 1. `domain/` layer: zero framework imports on every platform — pure language code only.
193
+ 2. UI code (screen/page/component/widget) never calls the HTTP client, DB, or any SDK directly —
194
+ always through a use case → repository.
195
+ 3. Never import from `features/` inside `core/`/shared infra.
196
+ 4. Loading/state status is always an explicit union/enum/sealed-class (`'idle' | 'loading' |
197
+ 'succeeded' | 'failed'`, or the platform's equivalent) — never a bare `boolean`.
198
+ 5. Follow the resolved fingerprint's DI mechanism exactly as the platform file documents it — manual
199
+ container (RN/React), framework DI via abstract-class token (Angular), or `get_it`/Riverpod
200
+ provider (Flutter). Never port one platform's DI mechanism onto another.
201
+ 6. Never import a sub-path of a feature from outside that feature.
202
+ 7. Never use an untyped escape hatch (`any`, `dynamic`) to skip modeling a type.
203
+ 8. Never hardcode configuration values (URLs, keys, timeouts) in a component/service file.
204
+ 9. See the loaded platform file for additional platform-specific strict rules (storage/security
205
+ rules differ meaningfully between mobile, web, and Angular/Flutter).
206
+
207
+ ---
208
+
209
+ ## Output Format
210
+
211
+ For each artifact created, report using the platform file's actual naming convention (this is a
212
+ shape, not literal text — substitute the real file names):
213
+
214
+ ```
215
+ Platform: <detected platform> (Sub-variant: <if applicable>)
216
+ Stack fingerprint: state=<detected-or-default> http=<detected-or-default> storage=<detected-or-default> nav=<detected-or-default> di=<detected-or-default>
217
+
218
+ Created:
219
+ <platform-appropriate paths for each generated file>
220
+
221
+ Updated:
222
+ <composition-root files touched, e.g. store.ts / app.routes.ts / injection_container.dart>
223
+
224
+ Dependency check: PASS — no layer boundary violations detected
225
+ ```
226
+
227
+ If any fingerprint field used a default rather than a detected value, state that explicitly, e.g.
228
+ `state=Redux Toolkit (default — none detected in repo)`.
229
+
230
+ ---
231
+
232
+ ## Example
233
+
234
+ See the "Worked Example" section at the end of each platform file for a fully worked "add a
235
+ watchlist feature" example in that platform's own naming convention and file layout.
@@ -0,0 +1,126 @@
1
+ # Architecture Core — Platform-Agnostic Rules
2
+
3
+ These rules apply **regardless of platform** (React Native, React, Angular, Flutter). They define
4
+ what "Clean Architecture with vertical feature slicing" means independent of any specific framework,
5
+ state-management library, or HTTP client. Read this file first, always. Then read exactly one
6
+ `platform-*.md` file for the concrete implementation of these rules on the detected platform.
7
+
8
+ ---
9
+
10
+ ## The Three Layers (every feature has exactly these)
11
+
12
+ ```
13
+ features/[feature-name]/
14
+ ├── domain/ ← business rules. Zero framework imports. Pure language code only.
15
+ │ ├── entities/ one file per business object
16
+ │ ├── repositories/ interfaces/contracts only — no implementation
17
+ │ └── usecases/ one class per business operation
18
+
19
+ ├── data/ ← implements the domain contracts using real infrastructure
20
+ │ ├── dtos/ raw shapes exactly as the API/DB returns them
21
+ │ ├── mappers/ pure functions: DTO → domain entity
22
+ │ ├── repositories/ concrete classes implementing the domain interfaces
23
+ │ └── (api/datasources/config — platform-specific subfolder, see platform file)
24
+
25
+ └── presentation/ ← UI framework code. Never talks to the network/DB/storage directly.
26
+ ├── screens|pages|views/ one per user-visible view
27
+ ├── components|widgets/ reusable UI pieces local to this feature
28
+ ├── state/ whatever state mechanism the platform/project uses
29
+ └── (hooks/navigation/routing — platform-specific, see platform file)
30
+ ```
31
+
32
+ A feature also owns a **DI wiring point** (a container, a provider registration, a module — the
33
+ concrete mechanism is platform-specific, see the platform file) that supplies concrete `data/`
34
+ implementations to `domain/` use cases, and supplies use cases to `presentation/`.
35
+
36
+ ---
37
+
38
+ ## The Dependency Rule (never violated, on any platform)
39
+
40
+ ```
41
+ domain/ ← imports nothing from data/, presentation/, or any UI/HTTP/storage framework
42
+ data/ ← imports own domain/ (to implement its contracts) + infrastructure SDKs
43
+ presentation/ ← imports own domain/ (types/use cases) + own data/ only through DI, never directly
44
+ core/ (infra) ← shared infrastructure; NEVER imports from features/*
45
+ features/[x]/ ← self-contained; another feature may only import [x]'s public barrel/export
46
+ app/ (bootstrap) ← imports all features/*, orchestration only, zero business logic
47
+ ```
48
+
49
+ **Why this exists:** `domain/` encodes business rules that must survive a framework migration,
50
+ a state-library swap, or an HTTP-client change untouched. If `domain/` imports React, Redux, Axios,
51
+ Angular's `HttpClient`, or Flutter's `Dio`, that guarantee is broken. This is the one rule that does
52
+ not change no matter which platform file you load next.
53
+
54
+ ---
55
+
56
+ ## Universal Naming Conventions
57
+
58
+ These names are the same concept on every platform; only the file-casing convention differs
59
+ (see the platform file's "Naming Extensions" section for the platform's casing rules).
60
+
61
+ | Artifact | What it is | Platform file governs |
62
+ |---|---|---|
63
+ | Entity | A plain business object, no framework types inside | casing/file suffix |
64
+ | Repository interface/contract | Abstract description of a data operation, no implementation | whether it's a TS `interface`, a TS `abstract class`, or a Dart `abstract class` — **not interchangeable, see platform file** |
65
+ | Repository implementation | Concrete class implementing the contract, calls the real HTTP client/DB | suffix (`Impl`, `.impl.ts`, etc.) |
66
+ | Use case | One class per business operation, depends only on a repository contract | casing/file suffix |
67
+ | DTO | Raw API/DB response shape — belongs in `data/`, never `domain/` | casing/file suffix; some platforms call this a "Model" instead (see platform file) |
68
+ | Mapper | Pure function converting a DTO to a domain entity | naming prefix (`mapTo…`, etc.) |
69
+ | Test file | Test for any of the above | suffix convention (`.test.ts`, `.spec.ts`, `_test.dart`) |
70
+
71
+ **Do not guess a platform's casing convention from this table.** Each platform has an actual
72
+ official or de-facto style guide (Effective Dart, Angular style guide, etc.) — the platform file
73
+ states the real convention, not an invented one.
74
+
75
+ ---
76
+
77
+ ## Universal Anti-Patterns (blocking on every platform)
78
+
79
+ Treat any of the following as a blocking error, on any platform. Fix before emitting code.
80
+ The platform file adds platform-specific anti-patterns on top of this list — it never removes
81
+ or contradicts an item here.
82
+
83
+ ### Layer boundary violations
84
+
85
+ - **Never** call the HTTP client, database, or any infrastructure SDK directly from UI code
86
+ (`presentation/`) — it always goes through a use case → repository.
87
+ - **Never** put business logic inside a UI component/screen/page/widget — it belongs in a use case.
88
+ - **Never** put a DTO/Model type in `domain/` — DTOs/Models live in `data/`, domain entities live
89
+ in `domain/entities/`.
90
+ - **Never** share one feature's state (store/slice/service/bloc — whatever the platform calls it)
91
+ between two features — each feature owns its own state.
92
+ - **Never** import from `features/` inside `core/` (or the platform's equivalent shared-infra root).
93
+ - **Never** import a sub-path of a feature from outside that feature — always go through the
94
+ feature's public barrel/export.
95
+
96
+ ### Language-level
97
+
98
+ - **Never** use an untyped escape hatch (`any` in TypeScript, `dynamic` in Dart) to avoid modeling
99
+ a type properly — use a specific type or the platform's safe-unknown equivalent.
100
+ - **Never** suppress a compiler/linter error about a type mismatch without a documented reason.
101
+
102
+ ### General
103
+
104
+ - **Never** add features or files beyond what was asked.
105
+ - **Never** hardcode configuration values (URLs, keys, timeouts) inside a component or service file
106
+ — they belong in the feature's `data/config/` or the shared infra config module.
107
+ - **Never** leave mock/fixture data reachable from a production code path — mock files are dev/test
108
+ only.
109
+
110
+ ---
111
+
112
+ ## How This File Relates to the Platform Files
113
+
114
+ 1. This file (`architecture-core.md`) defines the layers, the dependency rule, and the rules that
115
+ hold regardless of platform.
116
+ 2. `SKILL.md` Phase 0 detects which platform the target project is (or asks, if ambiguous) and which
117
+ platform file to load.
118
+ 3. `SKILL.md` Phase 1 detects the project's **actual** state-management/HTTP/storage/navigation/DI
119
+ stack by reading the repo — never assumes a fixed stack. Only when the project is greenfield
120
+ (nothing detected) does the platform file's labeled default apply.
121
+ 4. The platform file then supplies: the concrete folder tree, the concrete DI mechanism, the
122
+ concrete state/HTTP/storage/navigation code patterns, platform-specific naming, and
123
+ platform-specific anti-patterns.
124
+
125
+ Never generate code from this file alone — it has no concrete syntax. Always pair it with exactly
126
+ one platform file.