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.
- package/.github/skills/boiler-project-generator/SKILL.md +103 -0
- package/.github/skills/boiler-project-generator/assets/templates/android/README.md +3 -0
- package/.github/skills/boiler-project-generator/assets/templates/angular/README.md +3 -0
- package/.github/skills/boiler-project-generator/assets/templates/flutter/README.md +3 -0
- package/.github/skills/boiler-project-generator/assets/templates/ios/README.md +3 -0
- package/.github/skills/boiler-project-generator/assets/templates/react/README.md +3 -0
- package/.github/skills/boiler-project-generator/assets/templates/react-native/README.md +3 -0
- package/.github/skills/boiler-project-generator/assets/templates/react-native/api-setup.ts +76 -0
- package/.github/skills/boiler-project-generator/assets/templates/react-native/component-primary-button.tsx +29 -0
- package/.github/skills/boiler-project-generator/assets/templates/react-native/env-config.env +4 -0
- package/.github/skills/boiler-project-generator/assets/templates/react-native/feature-auth-screen.tsx +45 -0
- package/.github/skills/boiler-project-generator/assets/templates/react-native/feature-dashboard-screen.tsx +45 -0
- package/.github/skills/boiler-project-generator/assets/templates/react-native/feature-profile-screen.tsx +45 -0
- package/.github/skills/boiler-project-generator/assets/templates/react-native/hook-use-app-boot.ts +11 -0
- package/.github/skills/boiler-project-generator/assets/templates/react-native/navigation-setup.tsx +25 -0
- package/.github/skills/boiler-project-generator/assets/templates/react-native/project-structure.md +24 -0
- package/.github/skills/boiler-project-generator/assets/templates/react-native/redux-hooks.ts +5 -0
- package/.github/skills/boiler-project-generator/assets/templates/react-native/redux-session-slice.ts +29 -0
- package/.github/skills/boiler-project-generator/assets/templates/react-native/redux-store.ts +15 -0
- package/.github/skills/boiler-project-generator/assets/templates/react-native/theme-index.ts +23 -0
- package/.github/skills/boiler-project-generator/assets/templates/react-native/utils-helpers.ts +7 -0
- package/.github/skills/boiler-project-generator/metadata.yaml +29 -0
- package/.github/skills/boiler-project-generator/references/android.md +19 -0
- package/.github/skills/boiler-project-generator/references/angular.md +14 -0
- package/.github/skills/boiler-project-generator/references/flutter.md +17 -0
- package/.github/skills/boiler-project-generator/references/ios.md +17 -0
- package/.github/skills/boiler-project-generator/references/react-native.md +103 -0
- package/.github/skills/boiler-project-generator/references/react.md +17 -0
- package/.github/skills/boiler-project-generator/scripts/angular.js +43 -0
- package/.github/skills/boiler-project-generator/scripts/generate-project.mjs +107 -0
- package/.github/skills/boiler-project-generator/scripts/init.js +105 -0
- package/.github/skills/boiler-project-generator/scripts/react-native.js +1041 -0
- package/.github/skills/boiler-project-generator/scripts/react.js +32 -0
- package/.github/skills/clean-architecture-generator/SKILL.md +235 -0
- package/.github/skills/clean-architecture-generator/references/architecture-core.md +126 -0
- package/.github/skills/clean-architecture-generator/references/platform-angular.md +374 -0
- package/.github/skills/clean-architecture-generator/references/platform-flutter.md +366 -0
- package/.github/skills/clean-architecture-generator/references/platform-react-native.md +590 -0
- package/.github/skills/clean-architecture-generator/references/platform-react.md +261 -0
- package/.github/skills/code-test-coverage-analyzer/SKILL.md +1358 -0
- package/.github/skills/code-test-coverage-analyzer/assets/config-questionnaire.md +118 -0
- package/.github/skills/code-test-coverage-analyzer/assets/conflict-resolution-protocol.md +99 -0
- package/.github/skills/code-test-coverage-analyzer/assets/coverage-calculation-rules.md +294 -0
- package/.github/skills/code-test-coverage-analyzer/assets/multi-strategy-search.md +145 -0
- package/.github/skills/code-test-coverage-analyzer/assets/output-file-contracts.md +651 -0
- package/.github/skills/code-test-coverage-analyzer/assets/status-definitions.md +273 -0
- package/.github/skills/code-test-coverage-analyzer/examples/example-invocation.md +208 -0
- package/.github/skills/code-test-coverage-analyzer/references/android-patterns.md +229 -0
- package/.github/skills/code-test-coverage-analyzer/references/angular-patterns.md +177 -0
- package/.github/skills/code-test-coverage-analyzer/references/backend-patterns.md +383 -0
- package/.github/skills/code-test-coverage-analyzer/references/flutter-patterns.md +254 -0
- package/.github/skills/code-test-coverage-analyzer/references/ios-patterns.md +228 -0
- package/.github/skills/code-test-coverage-analyzer/references/react-native-patterns.md +431 -0
- package/.github/skills/code-test-coverage-analyzer/references/react-patterns.md +206 -0
- package/.github/skills/code-test-coverage-analyzer/scripts/detect-platform.ps1 +261 -0
- package/.github/skills/code-test-coverage-analyzer/scripts/scan-repository.ps1 +242 -0
- package/.github/skills/code-test-coverage-analyzer/templates/brd-compliance-row.md +107 -0
- package/.github/skills/code-test-coverage-analyzer/templates/test-case-row.md +130 -0
- package/.github/skills/code-test-coverage-analyzer/templates/user-story-compliance-row.md +170 -0
- package/.github/skills/custom-font-integrator/SKILL.md +373 -0
- package/.github/skills/custom-font-integrator/assets/FontTestScreen.js +150 -0
- package/.github/skills/custom-font-integrator/references/example-info-plist.xml +21 -0
- package/.github/skills/custom-font-integrator/scripts/setup-fonts.sh +99 -0
- package/.github/skills/encryption-decryption-utility/Instructions.md +282 -0
- package/.github/skills/encryption-decryption-utility/README.md +222 -0
- package/.github/skills/encryption-decryption-utility/SKILL.md +645 -0
- package/.github/skills/encryption-decryption-utility/assets/encryption-config-template.json +13 -0
- package/.github/skills/encryption-decryption-utility/assets/platform-matrix.json +180 -0
- package/.github/skills/encryption-decryption-utility/metadata.yaml +51 -0
- package/.github/skills/encryption-decryption-utility/references/android-crypto.md +157 -0
- package/.github/skills/encryption-decryption-utility/references/angular-crypto.md +130 -0
- package/.github/skills/encryption-decryption-utility/references/approach-1-webcrypto.md +95 -0
- package/.github/skills/encryption-decryption-utility/references/approach-2-rsa-aes-cbc.md +111 -0
- package/.github/skills/encryption-decryption-utility/references/approach-3-aes-sharedkey.md +114 -0
- package/.github/skills/encryption-decryption-utility/references/architecture.md +233 -0
- package/.github/skills/encryption-decryption-utility/references/backend-alignment.md +506 -0
- package/.github/skills/encryption-decryption-utility/references/dependency-guidance.md +234 -0
- package/.github/skills/encryption-decryption-utility/references/ec-implementation.md +832 -0
- package/.github/skills/encryption-decryption-utility/references/error-handling-playbook.md +234 -0
- package/.github/skills/encryption-decryption-utility/references/flutter-crypto.md +105 -0
- package/.github/skills/encryption-decryption-utility/references/ios-crypto.md +338 -0
- package/.github/skills/encryption-decryption-utility/references/native-rsa-implementation.md +373 -0
- package/.github/skills/encryption-decryption-utility/references/node-crypto.md +86 -0
- package/.github/skills/encryption-decryption-utility/references/react-crypto.md +105 -0
- package/.github/skills/encryption-decryption-utility/references/react-native-crypto.md +1001 -0
- package/.github/skills/encryption-decryption-utility/references/react-web-crypto.md +668 -0
- package/.github/skills/encryption-decryption-utility/references/security-checklist.md +176 -0
- package/.github/skills/encryption-decryption-utility/references/web-crypto.md +74 -0
- package/.github/skills/encryption-decryption-utility/scripts/detect.js +128 -0
- package/.github/skills/encryption-decryption-utility/scripts/install.js +1713 -0
- package/.github/skills/encryption-decryption-utility/scripts/setup.js +800 -0
- package/.github/skills/encryption-decryption-utility/template.md +241 -0
- package/.github/skills/encryption-decryption-utility/templates/config-questionnaire.md +467 -0
- package/.github/skills/encryption-decryption-utility/templates/delivery-checklist.md +206 -0
- package/.github/skills/encryption-decryption-utility/templates/implementation-plan.md +304 -0
- package/.github/skills/feature-generator/SKILL.MD +2741 -0
- package/.github/skills/feature-generator/assets/fingerprint-schema.json +385 -0
- package/.github/skills/feature-generator/assets/spec-template.md +172 -0
- package/.github/skills/feature-generator/assets/transform-rules.json +82 -0
- package/.github/skills/feature-generator/references/api-envelope-patterns.md +327 -0
- package/.github/skills/feature-generator/references/screen-logic-patterns.md +399 -0
- package/.github/skills/feature-generator/references/state-library-patterns.md +464 -0
- package/.github/skills/figma-ui-mapper/README.md +34 -0
- package/.github/skills/figma-ui-mapper/SKILL.md +101 -0
- package/.github/skills/figma-ui-mapper/assets/templates/component-map-template.md +30 -0
- package/.github/skills/figma-ui-mapper/assets/templates/generation-report-template.md +49 -0
- package/.github/skills/figma-ui-mapper/metadata.yaml +22 -0
- package/.github/skills/figma-ui-mapper/references/android.md +11 -0
- package/.github/skills/figma-ui-mapper/references/angular.md +18 -0
- package/.github/skills/figma-ui-mapper/references/capacitor.md +18 -0
- package/.github/skills/figma-ui-mapper/references/common.md +23 -0
- package/.github/skills/figma-ui-mapper/references/expo.md +18 -0
- package/.github/skills/figma-ui-mapper/references/flutter.md +18 -0
- package/.github/skills/figma-ui-mapper/references/frameworks/angular/rules.md +23 -0
- package/.github/skills/figma-ui-mapper/references/frameworks/capacitor/rules.md +23 -0
- package/.github/skills/figma-ui-mapper/references/frameworks/expo/rules.md +23 -0
- package/.github/skills/figma-ui-mapper/references/frameworks/flutter/rules.md +23 -0
- package/.github/skills/figma-ui-mapper/references/frameworks/ionic/rules.md +23 -0
- package/.github/skills/figma-ui-mapper/references/frameworks/kotlin-multiplatform/rules.md +23 -0
- package/.github/skills/figma-ui-mapper/references/frameworks/native-android/rules.md +23 -0
- package/.github/skills/figma-ui-mapper/references/frameworks/native-ios/rules.md +23 -0
- package/.github/skills/figma-ui-mapper/references/frameworks/next/rules.md +23 -0
- package/.github/skills/figma-ui-mapper/references/frameworks/nuxt/rules.md +23 -0
- package/.github/skills/figma-ui-mapper/references/frameworks/react/rules.md +19 -0
- package/.github/skills/figma-ui-mapper/references/frameworks/react-native/rules.md +23 -0
- package/.github/skills/figma-ui-mapper/references/frameworks/svelte/rules.md +23 -0
- package/.github/skills/figma-ui-mapper/references/frameworks/vue/rules.md +23 -0
- package/.github/skills/figma-ui-mapper/references/ionic.md +18 -0
- package/.github/skills/figma-ui-mapper/references/ios.md +11 -0
- package/.github/skills/figma-ui-mapper/references/kotlin-multiplatform.md +18 -0
- package/.github/skills/figma-ui-mapper/references/native-android.md +18 -0
- package/.github/skills/figma-ui-mapper/references/native-ios.md +18 -0
- package/.github/skills/figma-ui-mapper/references/next.md +18 -0
- package/.github/skills/figma-ui-mapper/references/nuxt.md +18 -0
- package/.github/skills/figma-ui-mapper/references/react-figma-guideline.md +21 -0
- package/.github/skills/figma-ui-mapper/references/react-native.md +18 -0
- package/.github/skills/figma-ui-mapper/references/react.md +18 -0
- package/.github/skills/figma-ui-mapper/references/script-usage.md +46 -0
- package/.github/skills/figma-ui-mapper/references/svelte.md +18 -0
- package/.github/skills/figma-ui-mapper/references/vue.md +18 -0
- package/.github/skills/figma-ui-mapper/references/workflow.md +74 -0
- package/.github/skills/figma-ui-mapper/scripts/generate-page-through-figma.js +635 -0
- package/.github/skills/figma-ui-mapper/scripts/generate-react-page-through-figma.js +4 -0
- package/.github/skills/frontend-task-breakdown/SKILL.md +734 -0
- package/.github/skills/md-file-converter/SKILL.md +291 -0
- package/.github/skills/md-file-converter/config/formats.json +114 -0
- package/.github/skills/md-file-converter/extractors/extract-docx.sh +120 -0
- package/.github/skills/md-file-converter/extractors/extract-eml.py +108 -0
- package/.github/skills/md-file-converter/extractors/extract-pdf.sh +97 -0
- package/.github/skills/md-file-converter/extractors/extract-pptx.py +143 -0
- package/.github/skills/md-file-converter/extractors/extract-xlsx.py +175 -0
- package/.github/skills/md-file-converter/scripts/check-tools.sh +47 -0
- package/.github/skills/md-file-converter/scripts/extract-archive.sh +83 -0
- package/.github/skills/md-file-converter/scripts/extract-ocr.sh +77 -0
- package/.github/skills/md-file-converter/scripts/get-metadata.sh +57 -0
- package/.github/skills/md-file-converter/templates/output.md +73 -0
- package/.github/skills/md-file-converter/templates/unsupported-object.md +6 -0
- package/.github/skills/mockAPI-contract-generator/SKILL.md +607 -0
- package/.github/skills/test-case-validator/CHANGELOG.md +155 -0
- package/.github/skills/test-case-validator/CONFIGURATION.md +130 -0
- package/.github/skills/test-case-validator/EXAMPLES.md +50 -0
- package/.github/skills/test-case-validator/QUALITY_SCORING.md +98 -0
- package/.github/skills/test-case-validator/README.md +111 -0
- package/.github/skills/test-case-validator/REPORT_TEMPLATE.md +116 -0
- package/.github/skills/test-case-validator/SKILL.md +209 -0
- package/.github/skills/test-case-validator/SYSTEM_PROMPT.md +127 -0
- package/.github/skills/test-case-validator/TRACEABILITY_ENGINE.md +152 -0
- package/.github/skills/test-case-validator/VALIDATION_RULES.md +411 -0
- package/.github/skills/test-case-validator/config/default.config.yaml +62 -0
- package/.github/skills/test-case-validator/docs/ARCHITECTURE.md +66 -0
- package/.github/skills/test-case-validator/docs/EXTENDING.md +85 -0
- package/.github/skills/test-case-validator/docs/FAQ.md +88 -0
- package/.github/skills/test-case-validator/docs/VERSIONING.md +55 -0
- package/.github/skills/test-case-validator/examples/example-1-manual-qa-ecommerce/input-brd.md +43 -0
- package/.github/skills/test-case-validator/examples/example-1-manual-qa-ecommerce/input-test-cases.csv +9 -0
- package/.github/skills/test-case-validator/examples/example-1-manual-qa-ecommerce/input-user-story.md +29 -0
- package/.github/skills/test-case-validator/examples/example-1-manual-qa-ecommerce/output-report.md +303 -0
- package/.github/skills/test-case-validator/examples/example-2-automated-frontend-suite/input-spec.md +43 -0
- package/.github/skills/test-case-validator/examples/example-2-automated-frontend-suite/input-test-files-index.md +56 -0
- package/.github/skills/test-case-validator/examples/example-2-automated-frontend-suite/output-report.md +274 -0
- package/.github/skills/test-case-validator/prompts/00-applicability-resolution.md +61 -0
- package/.github/skills/test-case-validator/prompts/01-extraction-user-story.md +58 -0
- package/.github/skills/test-case-validator/prompts/02-extraction-brd.md +64 -0
- package/.github/skills/test-case-validator/prompts/03-extraction-test-cases.md +92 -0
- package/.github/skills/test-case-validator/prompts/04-traceability-matrix.md +41 -0
- package/.github/skills/test-case-validator/prompts/05-coverage-analysis.md +46 -0
- package/.github/skills/test-case-validator/prompts/06-missing-scenario-detection.md +32 -0
- package/.github/skills/test-case-validator/prompts/07-duplicate-detection.md +36 -0
- package/.github/skills/test-case-validator/prompts/08-risk-analysis.md +39 -0
- package/.github/skills/test-case-validator/prompts/09-gated-wiring-validation.md +53 -0
- package/.github/skills/test-case-validator/prompts/10-observation-report.md +56 -0
- package/.github/skills/test-case-validator/prompts/11-final-report-assembly.md +57 -0
- package/.github/skills/test-case-validator/templates/coverage-table.md +25 -0
- package/.github/skills/test-case-validator/templates/executive-summary.md +38 -0
- package/.github/skills/test-case-validator/templates/final-summary-block.md +87 -0
- package/.github/skills/test-case-validator/templates/observation-entry.md +41 -0
- package/.github/skills/test-case-validator/templates/rtm-row.md +25 -0
- package/.github/skills/validation-engine-builder/README.md +50 -0
- package/.github/skills/validation-engine-builder/SKILL.md +241 -0
- package/.github/skills/validation-engine-builder/references/core.md +158 -0
- package/.github/skills/validation-engine-builder/references/platform-angular.md +166 -0
- package/.github/skills/validation-engine-builder/references/platform-flutter.md +118 -0
- package/.github/skills/validation-engine-builder/references/platform-react-native.md +170 -0
- package/.github/skills/validation-engine-builder/references/platform-react.md +94 -0
- package/.github/skills/validation-engine-builder/scripts/apply-to-project.js +80 -0
- package/.github/skills/validation-engine-builder/scripts/generate-angular.js +271 -0
- package/.github/skills/validation-engine-builder/scripts/generate-flutter.js +298 -0
- package/.github/skills/validation-engine-builder/scripts/generate-react-native.js +217 -0
- package/.github/skills/validation-engine-builder/scripts/generate-react.js +163 -0
- package/.github/skills/validation-engine-builder/scripts/install-deps.js +53 -0
- package/.github/skills/validation-engine-builder/scripts/shared/detect-platform.js +68 -0
- package/.github/skills/validation-engine-builder/scripts/shared/npm-deps.js +103 -0
- package/.github/skills/validation-engine-builder/scripts/shared/rhf-hook.js +43 -0
- package/.github/skills/validation-engine-builder/scripts/shared/ts-messages-regex.js +62 -0
- package/.github/skills/validation-engine-builder/scripts/shared/util.js +44 -0
- package/.github/skills/validation-engine-builder/scripts/shared/yup-schemas.js +80 -0
- package/.github/skills/validation-engine-builder/template.md +73 -0
- package/.github/skills/validation-engine-builder/templates/messages.json +22 -0
- package/.github/skills/validation-engine-builder/templates/regex.json +16 -0
- package/.github/skills/validation-engine-builder/templates/schemas.json +48 -0
- package/bin/index.js +145 -0
- package/package.json +22 -0
- package/readme.md +0 -0
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
<#
|
|
2
|
+
.SYNOPSIS
|
|
3
|
+
Auto-detects the technology platform of a software project.
|
|
4
|
+
.DESCRIPTION
|
|
5
|
+
Scans the project root for marker files and returns a JSON object with:
|
|
6
|
+
- platform: detected platform name
|
|
7
|
+
- source: what marker file led to the detection
|
|
8
|
+
- confidence: 0 (unknown) or 1 (detected)
|
|
9
|
+
- frameworkVersion: version string if available
|
|
10
|
+
- stateLibrary: detected state management library
|
|
11
|
+
- httpClient: detected HTTP client
|
|
12
|
+
- promptMessage: message to show if confidence=0
|
|
13
|
+
.PARAMETER ProjectRoot
|
|
14
|
+
Absolute or relative path to the project root directory.
|
|
15
|
+
.EXAMPLE
|
|
16
|
+
.\detect-platform.ps1 -ProjectRoot "C:\Projects\MyApp"
|
|
17
|
+
#>
|
|
18
|
+
|
|
19
|
+
param(
|
|
20
|
+
[Parameter(Mandatory=$true)]
|
|
21
|
+
[string]$ProjectRoot
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
function Get-PackageJsonValue {
|
|
25
|
+
param([string]$PackageJsonPath, [string]$Key)
|
|
26
|
+
if (-not (Test-Path $PackageJsonPath)) { return $null }
|
|
27
|
+
try {
|
|
28
|
+
$json = Get-Content $PackageJsonPath -Raw | ConvertFrom-Json
|
|
29
|
+
$deps = @{}
|
|
30
|
+
if ($json.dependencies) { $json.dependencies.PSObject.Properties | ForEach-Object { $deps[$_.Name] = $_.Value } }
|
|
31
|
+
if ($json.devDependencies) { $json.devDependencies.PSObject.Properties | ForEach-Object { $deps[$_.Name] = $_.Value } }
|
|
32
|
+
return $deps
|
|
33
|
+
} catch { return $null }
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
$result = @{
|
|
37
|
+
platform = "Unknown"
|
|
38
|
+
source = ""
|
|
39
|
+
confidence = 0
|
|
40
|
+
frameworkVersion = ""
|
|
41
|
+
stateLibrary = "None"
|
|
42
|
+
httpClient = "None"
|
|
43
|
+
promptMessage = "Could not auto-detect platform. Please select: (1) React Native (2) React (3) Angular (4) Flutter (5) Android (6) iOS (7) NestJS (8) Node.js/Express (9) Spring Boot (10) .NET Core (11) Go"
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
# ── React Native ──────────────────────────────────────────────────────────────
|
|
47
|
+
$packageJson = Join-Path $ProjectRoot "package.json"
|
|
48
|
+
if (Test-Path $packageJson) {
|
|
49
|
+
$deps = Get-PackageJsonValue -PackageJsonPath $packageJson
|
|
50
|
+
if ($deps -and ($deps.ContainsKey("react-native") -or $deps.ContainsKey("expo"))) {
|
|
51
|
+
$result.platform = "ReactNative"
|
|
52
|
+
$result.source = "package.json — react-native or expo dependency"
|
|
53
|
+
$result.confidence = 1
|
|
54
|
+
$result.frameworkVersion = if ($deps["react-native"]) { $deps["react-native"] } else { $deps["expo"] }
|
|
55
|
+
|
|
56
|
+
# State library detection
|
|
57
|
+
if ($deps.ContainsKey("@reduxjs/toolkit")) { $result.stateLibrary = "Redux Toolkit" }
|
|
58
|
+
elseif ($deps.ContainsKey("redux")) { $result.stateLibrary = "Redux" }
|
|
59
|
+
elseif ($deps.ContainsKey("zustand")) { $result.stateLibrary = "Zustand" }
|
|
60
|
+
elseif ($deps.ContainsKey("jotai")) { $result.stateLibrary = "Jotai" }
|
|
61
|
+
elseif ($deps.ContainsKey("mobx")) { $result.stateLibrary = "MobX" }
|
|
62
|
+
|
|
63
|
+
# HTTP client detection
|
|
64
|
+
if ($deps.ContainsKey("axios")) { $result.httpClient = "Axios" }
|
|
65
|
+
else { $result.httpClient = "fetch (native)" }
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
# ── Angular ───────────────────────────────────────────────────────────────────
|
|
70
|
+
if ($result.confidence -eq 0) {
|
|
71
|
+
$angularJson = Join-Path $ProjectRoot "angular.json"
|
|
72
|
+
if (Test-Path $angularJson) {
|
|
73
|
+
$result.platform = "Angular"
|
|
74
|
+
$result.source = "angular.json"
|
|
75
|
+
$result.confidence = 1
|
|
76
|
+
|
|
77
|
+
if (Test-Path $packageJson) {
|
|
78
|
+
$deps = Get-PackageJsonValue -PackageJsonPath $packageJson
|
|
79
|
+
if ($deps) {
|
|
80
|
+
if ($deps.ContainsKey("@ngrx/store")) { $result.stateLibrary = "NgRx" }
|
|
81
|
+
elseif ($deps.ContainsKey("@ngxs/store")) { $result.stateLibrary = "NGXS" }
|
|
82
|
+
elseif ($deps.ContainsKey("@datorama/akita")) { $result.stateLibrary = "Akita" }
|
|
83
|
+
if ($deps.ContainsKey("axios")) { $result.httpClient = "Axios" }
|
|
84
|
+
else { $result.httpClient = "HttpClient (Angular)" }
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
# ── React (Web) ───────────────────────────────────────────────────────────────
|
|
91
|
+
if ($result.confidence -eq 0 -and (Test-Path $packageJson)) {
|
|
92
|
+
$deps = Get-PackageJsonValue -PackageJsonPath $packageJson
|
|
93
|
+
if ($deps -and ($deps.ContainsKey("react") -and -not $deps.ContainsKey("react-native"))) {
|
|
94
|
+
$result.platform = "React"
|
|
95
|
+
$result.source = "package.json — react dependency (no react-native)"
|
|
96
|
+
$result.confidence = 1
|
|
97
|
+
$result.frameworkVersion = $deps["react"]
|
|
98
|
+
|
|
99
|
+
if ($deps.ContainsKey("@reduxjs/toolkit")) { $result.stateLibrary = "Redux Toolkit" }
|
|
100
|
+
elseif ($deps.ContainsKey("zustand")) { $result.stateLibrary = "Zustand" }
|
|
101
|
+
elseif ($deps.ContainsKey("@tanstack/react-query")) { $result.stateLibrary = "TanStack Query" }
|
|
102
|
+
elseif ($deps.ContainsKey("jotai")) { $result.stateLibrary = "Jotai" }
|
|
103
|
+
|
|
104
|
+
if ($deps.ContainsKey("axios")) { $result.httpClient = "Axios" }
|
|
105
|
+
else { $result.httpClient = "fetch (native)" }
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
# ── Flutter ───────────────────────────────────────────────────────────────────
|
|
110
|
+
if ($result.confidence -eq 0) {
|
|
111
|
+
$pubspecYaml = Join-Path $ProjectRoot "pubspec.yaml"
|
|
112
|
+
if (Test-Path $pubspecYaml) {
|
|
113
|
+
$content = Get-Content $pubspecYaml -Raw
|
|
114
|
+
if ($content -match "flutter:") {
|
|
115
|
+
$result.platform = "Flutter"
|
|
116
|
+
$result.source = "pubspec.yaml — flutter dependency"
|
|
117
|
+
$result.confidence = 1
|
|
118
|
+
|
|
119
|
+
$stateLibs = @()
|
|
120
|
+
if ($content -match "flutter_bloc") { $stateLibs += "BLoC" }
|
|
121
|
+
if ($content -match "flutter_riverpod|riverpod") { $stateLibs += "Riverpod" }
|
|
122
|
+
if ($content -match "(?<!flutter_)get:") { $stateLibs += "GetX" }
|
|
123
|
+
if ($content -match "mobx") { $stateLibs += "MobX" }
|
|
124
|
+
if ($content -match "\bprovider:") { $stateLibs += "Provider" }
|
|
125
|
+
$result.stateLibrary = if ($stateLibs.Count -gt 0) { $stateLibs -join " + " } else { "None" }
|
|
126
|
+
|
|
127
|
+
if ($content -match "\bdio:") { $result.httpClient = "Dio" }
|
|
128
|
+
elseif ($content -match "\bhttp:") { $result.httpClient = "http" }
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
# ── Android ───────────────────────────────────────────────────────────────────
|
|
134
|
+
if ($result.confidence -eq 0) {
|
|
135
|
+
$buildGradle = Join-Path $ProjectRoot "build.gradle"
|
|
136
|
+
$appBuildGradle = Join-Path $ProjectRoot "app" "build.gradle"
|
|
137
|
+
$buildGradleKts = Join-Path $ProjectRoot "build.gradle.kts"
|
|
138
|
+
$appBuildGradleKts = Join-Path $ProjectRoot "app" "build.gradle.kts"
|
|
139
|
+
|
|
140
|
+
$foundAndroid = (Test-Path $buildGradle) -or (Test-Path $buildGradleKts)
|
|
141
|
+
$foundAndroidApp = (Test-Path $appBuildGradle) -or (Test-Path $appBuildGradleKts)
|
|
142
|
+
|
|
143
|
+
if ($foundAndroid -and $foundAndroidApp) {
|
|
144
|
+
$result.platform = "Android"
|
|
145
|
+
$result.source = "build.gradle + app/build.gradle"
|
|
146
|
+
$result.confidence = 1
|
|
147
|
+
|
|
148
|
+
$gradleContent = ""
|
|
149
|
+
if (Test-Path $appBuildGradle) { $gradleContent = Get-Content $appBuildGradle -Raw }
|
|
150
|
+
elseif (Test-Path $appBuildGradleKts) { $gradleContent = Get-Content $appBuildGradleKts -Raw }
|
|
151
|
+
|
|
152
|
+
if ($gradleContent -match "lifecycle-viewmodel") { $result.stateLibrary = "ViewModel + LiveData/StateFlow" }
|
|
153
|
+
if ($gradleContent -match "retrofit2|retrofit") { $result.httpClient = "Retrofit + OkHttp" }
|
|
154
|
+
elseif ($gradleContent -match "okhttp") { $result.httpClient = "OkHttp" }
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
# ── iOS ───────────────────────────────────────────────────────────────────────
|
|
159
|
+
if ($result.confidence -eq 0) {
|
|
160
|
+
$xcodeprojs = Get-ChildItem -Path $ProjectRoot -Filter "*.xcodeproj" -ErrorAction SilentlyContinue
|
|
161
|
+
$podfile = Join-Path $ProjectRoot "Podfile"
|
|
162
|
+
$packageSwift = Join-Path $ProjectRoot "Package.swift"
|
|
163
|
+
|
|
164
|
+
if ($xcodeprojs.Count -gt 0 -or (Test-Path $podfile) -or (Test-Path $packageSwift)) {
|
|
165
|
+
$result.platform = "iOS"
|
|
166
|
+
$result.source = if ($xcodeprojs.Count -gt 0) { "$($xcodeprojs[0].Name)" } elseif (Test-Path $podfile) { "Podfile" } else { "Package.swift" }
|
|
167
|
+
$result.confidence = 1
|
|
168
|
+
|
|
169
|
+
$podContent = if (Test-Path $podfile) { Get-Content $podfile -Raw } else { "" }
|
|
170
|
+
if ($podContent -match "Alamofire") { $result.httpClient = "Alamofire" }
|
|
171
|
+
else { $result.httpClient = "URLSession" }
|
|
172
|
+
|
|
173
|
+
if ($podContent -match "RxSwift") { $result.stateLibrary = "RxSwift" }
|
|
174
|
+
elseif ($podContent -match "ComposableArchitecture") { $result.stateLibrary = "TCA (The Composable Architecture)" }
|
|
175
|
+
else { $result.stateLibrary = "MVVM + Combine" }
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
# ── NestJS ───────────────────────────────────────────────────────────────────
|
|
180
|
+
if ($result.confidence -eq 0 -and (Test-Path $packageJson)) {
|
|
181
|
+
$deps = Get-PackageJsonValue -PackageJsonPath $packageJson
|
|
182
|
+
if ($deps -and $deps.ContainsKey("@nestjs/core")) {
|
|
183
|
+
$result.platform = "NestJS"
|
|
184
|
+
$result.source = "package.json — @nestjs/core dependency"
|
|
185
|
+
$result.confidence = 1
|
|
186
|
+
$result.frameworkVersion = $deps["@nestjs/core"]
|
|
187
|
+
if ($deps.ContainsKey("axios")) { $result.httpClient = "Axios" }
|
|
188
|
+
elseif ($deps.ContainsKey("@nestjs/axios")) { $result.httpClient = "@nestjs/axios" }
|
|
189
|
+
if ($deps.ContainsKey("typeorm")) { $result.stateLibrary = "TypeORM" }
|
|
190
|
+
elseif ($deps.ContainsKey("@prisma/client")) { $result.stateLibrary = "Prisma" }
|
|
191
|
+
elseif ($deps.ContainsKey("mongoose")) { $result.stateLibrary = "Mongoose" }
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
# ── Node.js / Express ─────────────────────────────────────────────────────────
|
|
196
|
+
if ($result.confidence -eq 0 -and (Test-Path $packageJson)) {
|
|
197
|
+
$deps = Get-PackageJsonValue -PackageJsonPath $packageJson
|
|
198
|
+
if ($deps -and $deps.ContainsKey("express")) {
|
|
199
|
+
$result.platform = "NodeJS"
|
|
200
|
+
$result.source = "package.json — express dependency"
|
|
201
|
+
$result.confidence = 1
|
|
202
|
+
$result.frameworkVersion = $deps["express"]
|
|
203
|
+
if ($deps.ContainsKey("axios")) { $result.httpClient = "Axios" }
|
|
204
|
+
if ($deps.ContainsKey("mongoose")) { $result.stateLibrary = "Mongoose" }
|
|
205
|
+
elseif ($deps.ContainsKey("sequelize")) { $result.stateLibrary = "Sequelize" }
|
|
206
|
+
elseif ($deps.ContainsKey("@prisma/client")) { $result.stateLibrary = "Prisma" }
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
# ── Spring Boot ───────────────────────────────────────────────────────────────
|
|
211
|
+
if ($result.confidence -eq 0) {
|
|
212
|
+
$pomXml = Join-Path $ProjectRoot "pom.xml"
|
|
213
|
+
$gradleFile = Join-Path $ProjectRoot "build.gradle"
|
|
214
|
+
$gradleKts = Join-Path $ProjectRoot "build.gradle.kts"
|
|
215
|
+
$isSpring = $false
|
|
216
|
+
if (Test-Path $pomXml) {
|
|
217
|
+
$pomContent = Get-Content $pomXml -Raw
|
|
218
|
+
if ($pomContent -match "spring-boot") { $isSpring = $true; $result.source = "pom.xml — spring-boot" }
|
|
219
|
+
} elseif (Test-Path $gradleFile) {
|
|
220
|
+
$gradleContent = Get-Content $gradleFile -Raw
|
|
221
|
+
if ($gradleContent -match "spring-boot") { $isSpring = $true; $result.source = "build.gradle — spring-boot" }
|
|
222
|
+
} elseif (Test-Path $gradleKts) {
|
|
223
|
+
$gradleContent = Get-Content $gradleKts -Raw
|
|
224
|
+
if ($gradleContent -match "spring-boot") { $isSpring = $true; $result.source = "build.gradle.kts — spring-boot" }
|
|
225
|
+
}
|
|
226
|
+
if ($isSpring) {
|
|
227
|
+
$result.platform = "SpringBoot"
|
|
228
|
+
$result.confidence = 1
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
# ── .NET Core ─────────────────────────────────────────────────────────────────
|
|
233
|
+
if ($result.confidence -eq 0) {
|
|
234
|
+
$csprojFiles = Get-ChildItem -Path $ProjectRoot -Filter "*.csproj" -Recurse -ErrorAction SilentlyContinue | Select-Object -First 1
|
|
235
|
+
if ($csprojFiles) {
|
|
236
|
+
$csprojContent = Get-Content $csprojFiles.FullName -Raw
|
|
237
|
+
if ($csprojContent -match "net[5-9]\.|net[1-9][0-9]\.|netstandard") {
|
|
238
|
+
$result.platform = "DotNet"
|
|
239
|
+
$result.source = $csprojFiles.Name
|
|
240
|
+
$result.confidence = 1
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
# ── Go ────────────────────────────────────────────────────────────────────────
|
|
246
|
+
if ($result.confidence -eq 0) {
|
|
247
|
+
$goMod = Join-Path $ProjectRoot "go.mod"
|
|
248
|
+
if (Test-Path $goMod) {
|
|
249
|
+
$result.platform = "Go"
|
|
250
|
+
$result.source = "go.mod"
|
|
251
|
+
$result.confidence = 1
|
|
252
|
+
$goContent = Get-Content $goMod -Raw
|
|
253
|
+
if ($goContent -match "gin-gonic/gin") { $result.httpClient = "Gin" }
|
|
254
|
+
elseif ($goContent -match "labstack/echo") { $result.httpClient = "Echo" }
|
|
255
|
+
elseif ($goContent -match "gorilla/mux") { $result.httpClient = "Gorilla Mux" }
|
|
256
|
+
elseif ($goContent -match "go-chi/chi") { $result.httpClient = "Chi" }
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
# ── Output ────────────────────────────────────────────────────────────────────
|
|
261
|
+
$result | ConvertTo-Json -Depth 3
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
<#
|
|
2
|
+
.SYNOPSIS
|
|
3
|
+
Scans a project repository and returns a structured file inventory for the compliance auditor.
|
|
4
|
+
.DESCRIPTION
|
|
5
|
+
Generates a JSON inventory of all source files categorized by type, along with file counts
|
|
6
|
+
per category. This inventory is used by the AI to plan its multi-pass analysis.
|
|
7
|
+
Excludes: node_modules, .git, build, dist, .dart_tool, .gradle, .idea, Pods, DerivedData,
|
|
8
|
+
__pycache__, .cache, coverage, .nyc_output, and other generated/vendor directories.
|
|
9
|
+
.PARAMETER ProjectRoot
|
|
10
|
+
Absolute or relative path to the project root.
|
|
11
|
+
.PARAMETER Platform
|
|
12
|
+
Platform name: ReactNative | React | Angular | Flutter | Android | iOS
|
|
13
|
+
.EXAMPLE
|
|
14
|
+
.\scan-repository.ps1 -ProjectRoot "C:\Projects\MyApp" -Platform "ReactNative"
|
|
15
|
+
#>
|
|
16
|
+
|
|
17
|
+
param(
|
|
18
|
+
[Parameter(Mandatory=$true)]
|
|
19
|
+
[string]$ProjectRoot,
|
|
20
|
+
|
|
21
|
+
[Parameter(Mandatory=$true)]
|
|
22
|
+
[ValidateSet("ReactNative","React","Angular","Flutter","Android","iOS","NestJS","NodeJS","SpringBoot","DotNet","Go","Unknown")]
|
|
23
|
+
[string]$Platform
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
# Directories to always exclude
|
|
27
|
+
$ExcludeDirs = @(
|
|
28
|
+
"node_modules", ".git", "build", "dist", ".dart_tool", ".flutter-plugins",
|
|
29
|
+
".gradle", ".idea", "Pods", "DerivedData", "__pycache__", ".cache",
|
|
30
|
+
"coverage", ".nyc_output", ".expo", ".expo-shared", "android/.gradle",
|
|
31
|
+
"ios/.build", "ios/Pods", "ios/DerivedData", ".turbo", ".next",
|
|
32
|
+
"out", ".output", "generated", "auto-generated", ".github"
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
function Test-ExcludedPath {
|
|
36
|
+
param([string]$Path)
|
|
37
|
+
foreach ($excl in $ExcludeDirs) {
|
|
38
|
+
if ($Path -match [regex]::Escape($excl)) { return $true }
|
|
39
|
+
}
|
|
40
|
+
return $false
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
$inventory = @{
|
|
44
|
+
projectRoot = $ProjectRoot
|
|
45
|
+
platform = $Platform
|
|
46
|
+
totalFiles = 0
|
|
47
|
+
categories = @{}
|
|
48
|
+
topLevelFolders = @()
|
|
49
|
+
fileTree = @()
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
# Platform-specific file extensions
|
|
53
|
+
$extensions = switch ($Platform) {
|
|
54
|
+
"ReactNative" { @("*.ts","*.tsx","*.js","*.jsx","*.json") }
|
|
55
|
+
"React" { @("*.ts","*.tsx","*.js","*.jsx","*.json","*.css","*.scss") }
|
|
56
|
+
"Angular" { @("*.ts","*.html","*.scss","*.json") }
|
|
57
|
+
"Flutter" { @("*.dart","*.yaml","*.json") }
|
|
58
|
+
"Android" { @("*.kt","*.java","*.xml","*.gradle","*.kts") }
|
|
59
|
+
"iOS" { @("*.swift","*.m","*.h","*.storyboard","*.xib","*.plist") }
|
|
60
|
+
"NestJS" { @("*.ts","*.json") }
|
|
61
|
+
"NodeJS" { @("*.ts","*.js","*.json") }
|
|
62
|
+
"SpringBoot" { @("*.java","*.kt","*.xml","*.yaml","*.yml","*.properties") }
|
|
63
|
+
"DotNet" { @("*.cs","*.json","*.xml","*.yaml","*.yml") }
|
|
64
|
+
"Go" { @("*.go","*.yaml","*.yml","*.json") }
|
|
65
|
+
default { @("*.ts","*.tsx","*.js","*.dart","*.kt","*.swift","*.java","*.cs","*.go") }
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
# Category classification rules per platform
|
|
69
|
+
function Get-FileCategory {
|
|
70
|
+
param([string]$FilePath, [string]$FileName, [string]$Platform)
|
|
71
|
+
|
|
72
|
+
$lower = $FilePath.ToLower()
|
|
73
|
+
$file = $FileName.ToLower()
|
|
74
|
+
|
|
75
|
+
# Tests — check first to avoid mis-classifying test helpers as business logic
|
|
76
|
+
if ($lower -match "\\test\\|\\tests\\|\\spec\\|\\__tests__\\|\\mocks\\|\\fixtures\\|\\__mocks__\\" -or
|
|
77
|
+
$file -match "\.test\.|\.spec\.|_test\.|_spec\.|\.mock\.|_mock\.") { return "Tests" }
|
|
78
|
+
|
|
79
|
+
# Assets — skip binary files early
|
|
80
|
+
if ($FileName -match "\.(png|jpg|jpeg|svg|ttf|otf|gif|webp|woff|woff2|mp4|mp3|lottie)$") { return "Assets" }
|
|
81
|
+
|
|
82
|
+
# Backend Controllers — NestJS/Express/Spring/DotNet/Go (treated as Screens: they are request entry points)
|
|
83
|
+
if ($file -match "\.controller\.(ts|js)$" -or
|
|
84
|
+
$file -match "controller\.(ts|js)$" -or
|
|
85
|
+
$FileName -match "Controller\.(java|kt|cs)$" -or
|
|
86
|
+
$file -match "_handler\.(go|ts|js)$" -or
|
|
87
|
+
($Platform -eq "Go" -and $lower -match "\\handlers\\")) { return "Screens" }
|
|
88
|
+
|
|
89
|
+
# Backend Guards / Security Filters — must come before generic Core/Security
|
|
90
|
+
if ($file -match "\.guard\.(ts|js)$" -or
|
|
91
|
+
$FileName -match "Security.*\.(java|kt|cs)$" -or
|
|
92
|
+
$FileName -match ".*Filter\.(java|kt|cs)$" -or
|
|
93
|
+
$file -match "\.filter\.(ts|js)$") { return "Core/Security" }
|
|
94
|
+
|
|
95
|
+
# Backend Services (NestJS/Express .service.ts, Spring @Service)
|
|
96
|
+
if (($Platform -match "NestJS|NodeJS") -and $file -match "\.service\.(ts|js)$") { return "APILayer" }
|
|
97
|
+
|
|
98
|
+
# Backend DTOs / Entities / Models (NestJS .dto.ts, Spring entities)
|
|
99
|
+
if ($file -match "\.dto\.(ts|js)$" -or
|
|
100
|
+
$file -match "\.entity\.(ts|js)$" -or
|
|
101
|
+
$FileName -match ".*Dto\.(java|kt|cs)$" -or
|
|
102
|
+
$FileName -match ".*Entity\.(java|kt|cs)$") { return "Models" }
|
|
103
|
+
|
|
104
|
+
# Backend Modules (NestJS .module.ts → treated as Constants/Config)
|
|
105
|
+
if ($file -match "\.module\.(ts|js)$") { return "Constants" }
|
|
106
|
+
|
|
107
|
+
# Core / Security — must come before generic API/Service to catch interceptors
|
|
108
|
+
if ($lower -match "\\security\\|\\crypto\\|\\encryption\\|\\ecdh\\|\\cipher\\|\\session\\" -or
|
|
109
|
+
$file -match "interceptor\.|axiosClient\.|apiClient\.|httpClient\.|networkClient\." -or
|
|
110
|
+
$file -match "ecdh\.|aes\.|cipher\.|session.*manager\.|keyDerivation\." -or
|
|
111
|
+
($lower -match "\\core\\" -and ($file -match "security|crypto|encrypt|session|auth"))) { return "Core/Security" }
|
|
112
|
+
|
|
113
|
+
# Navigation
|
|
114
|
+
if ($lower -match "\\navigation\\|\\navigator\\|\\routing\\" -or
|
|
115
|
+
$file -match "^router\.|^navigator\.|routes\.|navigation\." -or
|
|
116
|
+
$lower -match "navgraph|nav_graph") { return "Navigation" }
|
|
117
|
+
|
|
118
|
+
# Hooks — custom hooks (use* prefix) before screens/components
|
|
119
|
+
# ^use[A-Z] matches React/RN camelCase hooks (useAuth, useForm) but NOT user.ts, utils.ts, usecase.ts
|
|
120
|
+
if ($file -match "^use[A-Z]" -or $lower -match "\\hooks\\") { return "Hooks" }
|
|
121
|
+
|
|
122
|
+
# Screens — full-page screens before components
|
|
123
|
+
if ($lower -match "\\screens\\|\\pages\\|\\views\\" -or
|
|
124
|
+
$file -match "screen\.|page\.|_screen\.|_page\." -or
|
|
125
|
+
($lower -match "activity|fragment|viewcontroller" -and -not ($lower -match "\\component\\"))) { return "Screens" }
|
|
126
|
+
|
|
127
|
+
# Components — shared / reusable UI
|
|
128
|
+
if ($lower -match "\\components\\|\\ui\\|\\shared\\|\\common\\|\\widgets\\" -or
|
|
129
|
+
$file -match "component\.|button\.|card\.|input\.|field\.|modal\.|sheet\.|loader\.|spinner\." -or
|
|
130
|
+
$file -match "banner\.|toast\.|header\.|footer\.|item\.|badge\.|chip\.|dropdown\.|picker\." -or
|
|
131
|
+
$file -match "otpinput\.|pininput\.|apptext|appbutton|appinput|apptextinput|custombutton|custominput|customtext" -or
|
|
132
|
+
$lower -match "\\atom\\|\\molecule\\|\\organism\\") { return "Components" }
|
|
133
|
+
|
|
134
|
+
# State Management
|
|
135
|
+
if ($lower -match "\\store\\|\\redux\\|\\zustand\\|\\jotai\\|\\mobx\\|\\bloc\\|\\cubit\\|\\ngrx\\" -or
|
|
136
|
+
$file -match "slice\.|reducer\.|actions\.|effect\.|bloc\.|cubit\.|viewmodel\.|_controller\." -or
|
|
137
|
+
$file -match "thunk\.|selector\.|\.store\.") { return "StateManagement" }
|
|
138
|
+
|
|
139
|
+
# API Layer / Services / Repositories
|
|
140
|
+
if ($lower -match "\\services\\|\\repositories\\|\\datasources\\|\\api\\|\\network\\|\\remote\\" -or
|
|
141
|
+
$file -match "service\.|repository\.|datasource\.|_api\.|_remote\." -or
|
|
142
|
+
$file -match "\.service\.|\.repository\.") { return "APILayer" }
|
|
143
|
+
|
|
144
|
+
# Validation / Schemas
|
|
145
|
+
if ($lower -match "\\validation\\|\\validators\\|\\schemas\\" -or
|
|
146
|
+
$file -match "schema\.|validator\.|validation\.|_schema\." -or
|
|
147
|
+
$file -match "yup\.|zod\.|joi\.") { return "Validation" }
|
|
148
|
+
|
|
149
|
+
# Business Logic / Use Cases
|
|
150
|
+
if ($lower -match "\\usecases\\|\\interactors\\|\\domain\\|\\business\\" -or
|
|
151
|
+
$file -match "usecase\.|interactor\.|_usecase\." -or
|
|
152
|
+
$file -match "calculate.*\.|compute.*\.|calculator\.") { return "BusinessLogic" }
|
|
153
|
+
|
|
154
|
+
# Models / DTOs
|
|
155
|
+
if ($lower -match "\\models\\|\\dto\\|\\entities\\" -or
|
|
156
|
+
$file -match "_model\.|_dto\.|_entity\.|_response\.|_request\.|model\.|dto\.") { return "Models" }
|
|
157
|
+
|
|
158
|
+
# Constants / Config
|
|
159
|
+
if ($lower -match "\\constants\\|\\config\\|\\configs\\|\\settings\\" -or
|
|
160
|
+
$file -match "constant\.|constants\.|config\.|theme\.|colors\.|typography\." -or
|
|
161
|
+
$FileName -match "^\.env" -or $file -match "app\.config\.|app\.json") { return "Constants" }
|
|
162
|
+
|
|
163
|
+
# Utilities / Helpers
|
|
164
|
+
if ($lower -match "\\utils\\|\\helpers\\|\\utilities\\|\\lib\\" -or
|
|
165
|
+
$file -match "util\.|helper\.|utils\.|helpers\.|format\.|formatter\.") { return "Utilities" }
|
|
166
|
+
|
|
167
|
+
# Localization
|
|
168
|
+
if ($lower -match "\\i18n\\|\\l10n\\|\\locales\\|\\translations\\|\\strings\\" -or
|
|
169
|
+
$file -match "strings\.|messages\.|locale\.|translation\." -or
|
|
170
|
+
$FileName -match "\.arb$|\.strings$|en\.json$|fr\.json$") { return "Localization" }
|
|
171
|
+
|
|
172
|
+
# Assets
|
|
173
|
+
if ($lower -match "\\assets\\|\\images\\|\\icons\\|\\fonts\\") { return "Assets" }
|
|
174
|
+
|
|
175
|
+
return "Other"
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
# Scan all files
|
|
179
|
+
$allFiles = @()
|
|
180
|
+
foreach ($ext in $extensions) {
|
|
181
|
+
$found = Get-ChildItem -Path $ProjectRoot -Filter $ext -Recurse -ErrorAction SilentlyContinue |
|
|
182
|
+
Where-Object {
|
|
183
|
+
-not (Test-ExcludedPath $_.FullName) -and
|
|
184
|
+
# Exclude TypeScript declaration files (compiler-generated)
|
|
185
|
+
$_.Name -notmatch "\.d\.ts$" -and
|
|
186
|
+
# Exclude Jest snapshot files (test artifacts)
|
|
187
|
+
$_.Name -notmatch "\.snap$" -and
|
|
188
|
+
# Exclude Flutter/Dart generated files
|
|
189
|
+
$_.Name -notmatch "\.g\.dart$" -and
|
|
190
|
+
$_.Name -notmatch "\.freezed\.dart$" -and
|
|
191
|
+
$_.Name -notmatch "\.gr\.dart$" -and
|
|
192
|
+
$_.Name -notmatch "\.mocks\.dart$" -and
|
|
193
|
+
# Exclude directory names that contain snapshots
|
|
194
|
+
$_.FullName -notmatch "__snapshots__"
|
|
195
|
+
}
|
|
196
|
+
$allFiles += $found
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
# Remove duplicates
|
|
200
|
+
$allFiles = $allFiles | Sort-Object FullName -Unique
|
|
201
|
+
|
|
202
|
+
$inventory.totalFiles = $allFiles.Count
|
|
203
|
+
|
|
204
|
+
# Build category buckets
|
|
205
|
+
$categories = @{}
|
|
206
|
+
foreach ($file in $allFiles) {
|
|
207
|
+
$relativePath = $file.FullName.Replace($ProjectRoot, "").TrimStart("\", "/")
|
|
208
|
+
$category = Get-FileCategory -FilePath $relativePath -FileName $file.Name -Platform $Platform
|
|
209
|
+
|
|
210
|
+
if (-not $categories.ContainsKey($category)) {
|
|
211
|
+
$categories[$category] = @{ count = 0; files = @() }
|
|
212
|
+
}
|
|
213
|
+
$categories[$category].count++
|
|
214
|
+
$categories[$category].files += $relativePath
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
$inventory.categories = $categories
|
|
218
|
+
|
|
219
|
+
# Top-level folders
|
|
220
|
+
$inventory.topLevelFolders = Get-ChildItem -Path $ProjectRoot -Directory -ErrorAction SilentlyContinue |
|
|
221
|
+
Where-Object { -not (Test-ExcludedPath $_.FullName) } |
|
|
222
|
+
Select-Object -ExpandProperty Name
|
|
223
|
+
|
|
224
|
+
# Output summary (concise for AI consumption)
|
|
225
|
+
$summary = @{
|
|
226
|
+
projectRoot = $inventory.projectRoot
|
|
227
|
+
platform = $inventory.platform
|
|
228
|
+
totalFiles = $inventory.totalFiles
|
|
229
|
+
topLevelFolders = $inventory.topLevelFolders
|
|
230
|
+
categorySummary = @{}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
foreach ($cat in $categories.Keys) {
|
|
234
|
+
$summary.categorySummary[$cat] = @{
|
|
235
|
+
count = $categories[$cat].count
|
|
236
|
+
# Return ALL files — the AI's read obligation is based on this complete list.
|
|
237
|
+
# A capped list produces an incomplete Master File List and silent audit gaps.
|
|
238
|
+
files = $categories[$cat].files
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
$summary | ConvertTo-Json -Depth 5
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# BRD Compliance Row Template
|
|
2
|
+
|
|
3
|
+
Use this template for each row in the `02_BRD_COMPLIANCE.md` detailed requirement tables.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Full Row Template
|
|
8
|
+
|
|
9
|
+
```markdown
|
|
10
|
+
| {BRD-ID} | {Priority: Critical/High/Medium/Low} | {Requirement text — truncated to 80 chars if long} | {STATUS} | {Coverage %: 100% if IMPLEMENTED, XX% if PARTIAL, 0% if MISSING} | {Evidence: "file/path.ts → functionName()" or "None — not found"} | {Issues: empty if IMPLEMENTED} | {Recommendation: empty if IMPLEMENTED} |
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Status Values (use exactly as shown)
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
IMPLEMENTED
|
|
19
|
+
PARTIALLY_IMPLEMENTED
|
|
20
|
+
MISSING
|
|
21
|
+
INCORRECT
|
|
22
|
+
EXTRA
|
|
23
|
+
NOT_VERIFIED
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Evidence Format
|
|
29
|
+
|
|
30
|
+
**For IMPLEMENTED or PARTIALLY_IMPLEMENTED:**
|
|
31
|
+
```
|
|
32
|
+
src/features/auth/LoginScreen.tsx → handleLogin()
|
|
33
|
+
src/services/AuthService.ts → login()
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**For MISSING:**
|
|
37
|
+
```
|
|
38
|
+
None — searched: *Login*, *auth*, "handleLogin", no match found
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**For INCORRECT:**
|
|
42
|
+
```
|
|
43
|
+
src/features/auth/LoginScreen.tsx → handleLogin() [implements incorrectly: uses GET instead of POST]
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Issues Column Format
|
|
49
|
+
|
|
50
|
+
**For IMPLEMENTED**: leave empty (single dash `-`)
|
|
51
|
+
|
|
52
|
+
**For PARTIALLY_IMPLEMENTED**: describe the specific gap:
|
|
53
|
+
```
|
|
54
|
+
Missing: email format validation. Implements only required-field check.
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**For MISSING**: describe what should exist:
|
|
58
|
+
```
|
|
59
|
+
Login API call (POST /auth/login) not found anywhere in codebase.
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**For INCORRECT**: describe the contradiction:
|
|
63
|
+
```
|
|
64
|
+
Required: redirect to Dashboard on success. Actual: redirects to Home screen.
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Recommendation Column Format
|
|
70
|
+
|
|
71
|
+
**For IMPLEMENTED**: `-`
|
|
72
|
+
|
|
73
|
+
**For others**:
|
|
74
|
+
```
|
|
75
|
+
Add email format validation in LoginScreen.tsx using Yup regex.
|
|
76
|
+
```
|
|
77
|
+
or
|
|
78
|
+
```
|
|
79
|
+
Implement POST /auth/login call in AuthService.ts with JWT token storage.
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Coverage % Calculation
|
|
85
|
+
|
|
86
|
+
For PARTIALLY_IMPLEMENTED requirements, estimate the percentage covered.
|
|
87
|
+
|
|
88
|
+
Example: A requirement has 4 aspects:
|
|
89
|
+
- Aspect 1 (field display): DONE
|
|
90
|
+
- Aspect 2 (validation): DONE
|
|
91
|
+
- Aspect 3 (API call): DONE
|
|
92
|
+
- Aspect 4 (navigation on success): MISSING
|
|
93
|
+
|
|
94
|
+
Coverage = 3/4 = 75%
|
|
95
|
+
|
|
96
|
+
Show: `75% (3/4 aspects)`
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Example Rows
|
|
101
|
+
|
|
102
|
+
```markdown
|
|
103
|
+
| BRD-001 | High | User must be able to log in with mobile number and PIN | IMPLEMENTED | 100% | src/screens/LoginScreen.tsx → handleSubmit() | - | - |
|
|
104
|
+
| BRD-002 | High | PIN must be exactly 6 digits | PARTIALLY_IMPLEMENTED | 50% | src/screens/LoginScreen.tsx → validatePIN() | Missing: no regex validation — only checks length is > 0 | Add Yup pattern validation: /^\d{6}$/ |
|
|
105
|
+
| BRD-003 | Critical | Show "Invalid PIN" message on 3 failed attempts | MISSING | 0% | None — searched: attempt, failCount, invalidPIN — not found | Login attempt counter and lockout not implemented | Implement attempt counter in AuthService, trigger lockout after 3 failures |
|
|
106
|
+
| BRD-004 | Medium | User can reset PIN via OTP | INCORRECT | 0% | src/screens/ResetPINScreen.tsx → resetPIN() [navigates to Home instead of PIN Entry] | Navigates to wrong screen after OTP verification | Fix navigation in resetPIN() to navigate to PINEntryScreen |
|
|
107
|
+
```
|