@el-j/magic-helix-plugins 4.0.0-beta.2 → 4.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/dist/architecture/codeowners.md +123 -0
  2. package/dist/architecture/monorepo.md +146 -0
  3. package/dist/architecture/nx.md +122 -0
  4. package/dist/architecture/turborepo.md +114 -0
  5. package/dist/ci/github-actions.md +268 -0
  6. package/dist/ci/gitlab-ci.md +330 -0
  7. package/dist/containers/docker-multistage.md +120 -0
  8. package/dist/containers/kubernetes-deploy.md +210 -0
  9. package/dist/cpp/index.cjs +79 -0
  10. package/dist/cpp/index.mjs +209 -0
  11. package/dist/csharp/index.cjs +2 -2
  12. package/dist/csharp/{index.js → index.mjs} +17 -11
  13. package/dist/csharp/templates/framework-aspnetcore.md +205 -0
  14. package/dist/csharp/templates/framework-blazor.md +271 -0
  15. package/dist/csharp/templates/lang-csharp.md +162 -0
  16. package/dist/devops/docker-compose.md +111 -0
  17. package/dist/devops/docker-dockerfile.md +94 -0
  18. package/dist/devops/github-actions.md +160 -0
  19. package/dist/devops/gitlab-ci.md +210 -0
  20. package/dist/generic/lang-typescript.md +57 -0
  21. package/dist/generic/state-redux.md +21 -0
  22. package/dist/generic/state-rxjs.md +6 -0
  23. package/dist/generic/style-mui.md +23 -0
  24. package/dist/generic/style-tailwind.md +76 -0
  25. package/dist/generic/test-cypress.md +21 -0
  26. package/dist/generic/test-jest.md +20 -0
  27. package/dist/generic/test-playwright.md +21 -0
  28. package/dist/generic/test-vitest.md +131 -0
  29. package/dist/go/index.cjs +3 -3
  30. package/dist/go/{index.js → index.mjs} +18 -15
  31. package/dist/go/templates/lang-go.md +571 -0
  32. package/dist/index.cjs +1 -1
  33. package/dist/index.mjs +24 -0
  34. package/dist/java/index.cjs +2 -2
  35. package/dist/java/{index.js → index.mjs} +25 -19
  36. package/dist/java/templates/build-gradle.md +102 -0
  37. package/dist/java/templates/build-maven.md +86 -0
  38. package/dist/java/templates/framework-spring-boot.md +179 -0
  39. package/dist/java/templates/lang-java.md +78 -0
  40. package/dist/java/templates/lang-kotlin.md +88 -0
  41. package/dist/meta/magic-helix-meta.md +213 -0
  42. package/dist/meta/meta-debug.md +459 -0
  43. package/dist/meta/meta-implement.md +450 -0
  44. package/dist/meta/meta-roadmap.md +265 -0
  45. package/dist/nodejs/templates/angular-core.md +19 -0
  46. package/dist/nodejs/templates/lang-typescript.md +57 -0
  47. package/dist/nodejs/templates/nestjs-core.md +7 -0
  48. package/dist/nodejs/templates/react-core.md +677 -0
  49. package/dist/nodejs/templates/react-zustand.md +7 -0
  50. package/dist/nodejs/templates/state-redux.md +21 -0
  51. package/dist/nodejs/templates/state-rxjs.md +6 -0
  52. package/dist/nodejs/templates/style-primevue.md +6 -0
  53. package/dist/nodejs/templates/style-quasar.md +22 -0
  54. package/dist/nodejs/templates/style-tailwind.md +76 -0
  55. package/dist/nodejs/templates/test-cypress.md +21 -0
  56. package/dist/nodejs/templates/test-jest.md +20 -0
  57. package/dist/nodejs/templates/test-playwright.md +21 -0
  58. package/dist/nodejs/templates/test-vitest.md +131 -0
  59. package/dist/nodejs/templates/vue-core.md +108 -0
  60. package/dist/nodejs/templates/vue-pinia.md +5 -0
  61. package/dist/patterns/architecture/clean-architecture.md +469 -0
  62. package/dist/patterns/architecture/dependency-injection.md +517 -0
  63. package/dist/patterns/architecture/domain-driven-design.md +621 -0
  64. package/dist/patterns/architecture/layered-architecture.md +382 -0
  65. package/dist/patterns/architecture/repository-pattern.md +408 -0
  66. package/dist/patterns/domain-expertise/nextjs-rules.md +115 -0
  67. package/dist/patterns/domain-expertise/react-patterns.md +181 -0
  68. package/dist/patterns/domain-expertise/server-components.md +212 -0
  69. package/dist/patterns/domain-expertise/shadcn-ui.md +52 -0
  70. package/dist/patterns/domain-expertise/tailwind-patterns.md +52 -0
  71. package/dist/patterns/environment/container-awareness.md +17 -0
  72. package/dist/patterns/environment/ide-features.md +17 -0
  73. package/dist/patterns/environment/os-commands.md +17 -0
  74. package/dist/patterns/organization/heading-hierarchy.md +103 -0
  75. package/dist/patterns/organization/sequential-workflows.md +102 -0
  76. package/dist/patterns/organization/xml-rule-groups.md +64 -0
  77. package/dist/patterns/reasoning/agent-loop.md +151 -0
  78. package/dist/patterns/reasoning/confirmation-gates.md +141 -0
  79. package/dist/patterns/reasoning/dependency-analysis.md +132 -0
  80. package/dist/patterns/reasoning/one-tool-per-iteration.md +152 -0
  81. package/dist/patterns/reasoning/preview-before-action.md +194 -0
  82. package/dist/patterns/reasoning/reflection-checkpoints.md +166 -0
  83. package/dist/patterns/reasoning/result-verification.md +157 -0
  84. package/dist/patterns/reasoning/subtask-breakdown.md +131 -0
  85. package/dist/patterns/reasoning/thinking-tags.md +100 -0
  86. package/dist/patterns/role-definition/capability-declarations.md +72 -0
  87. package/dist/patterns/role-definition/expert-identity.md +45 -0
  88. package/dist/patterns/role-definition/scope-boundaries.md +61 -0
  89. package/dist/patterns/safety/code-safety-rules.md +17 -0
  90. package/dist/patterns/safety/credential-handling.md +17 -0
  91. package/dist/patterns/safety/destructive-warnings.md +17 -0
  92. package/dist/patterns/safety/refusal-messages.md +17 -0
  93. package/dist/patterns/tone/adaptive-tone.md +17 -0
  94. package/dist/patterns/tone/concise-communication.md +17 -0
  95. package/dist/patterns/tone/forbidden-phrases.md +17 -0
  96. package/dist/patterns/tool-guidelines/function-schemas.md +143 -0
  97. package/dist/patterns/tool-guidelines/parameter-examples.md +137 -0
  98. package/dist/patterns/tool-guidelines/usage-policies.md +105 -0
  99. package/dist/php/index.cjs +2 -2
  100. package/dist/php/{index.js → index.mjs} +12 -6
  101. package/dist/php/templates/framework-laravel.md +112 -0
  102. package/dist/php/templates/lang-php.md +94 -0
  103. package/dist/python/index.cjs +4 -4
  104. package/dist/python/{index.js → index.mjs} +10 -7
  105. package/dist/python/templates/lang-python.md +508 -0
  106. package/dist/ruby/index.cjs +2 -2
  107. package/dist/ruby/{index.js → index.mjs} +16 -10
  108. package/dist/ruby/templates/framework-rails.md +309 -0
  109. package/dist/ruby/templates/framework-sinatra.md +227 -0
  110. package/dist/ruby/templates/lang-ruby.md +216 -0
  111. package/dist/rust/index.cjs +3 -3
  112. package/dist/rust/{index.js → index.mjs} +24 -18
  113. package/dist/rust/templates/lang-rust.md +89 -0
  114. package/dist/swift/index.cjs +32 -0
  115. package/dist/swift/index.mjs +112 -0
  116. package/dist/swift/templates/framework-vapor.md +352 -0
  117. package/dist/swift/templates/lang-swift.md +291 -0
  118. package/package.json +31 -21
  119. package/dist/index.js +0 -20
  120. /package/dist/nodejs/{index.js → index.mjs} +0 -0
@@ -0,0 +1,123 @@
1
+ # CODEOWNERS Guidelines
2
+
3
+ ## Overview
4
+ This project uses CODEOWNERS file to define code ownership and automate review requests.
5
+
6
+ ## File Location
7
+ - `.github/CODEOWNERS` (recommended)
8
+ - `CODEOWNERS` (root)
9
+ - `docs/CODEOWNERS`
10
+
11
+ ## Syntax
12
+ ```
13
+ # Comments start with #
14
+ # Each line: pattern followed by owners
15
+
16
+ # Default owners for everything
17
+ * @org/default-team
18
+
19
+ # Specific directories
20
+ /docs/ @org/docs-team @user1
21
+ /src/api/ @org/backend-team
22
+ /src/ui/ @org/frontend-team
23
+
24
+ # Specific files
25
+ package.json @org/platform-team
26
+ Dockerfile @org/devops-team
27
+
28
+ # Wildcards
29
+ *.md @org/docs-team
30
+ **/*.test.ts @org/qa-team
31
+
32
+ # Multiple owners
33
+ /src/auth/ @org/security-team @org/backend-team
34
+ ```
35
+
36
+ ## Pattern Matching
37
+ - `*`: Matches any files
38
+ - `**`: Matches directories recursively
39
+ - `?`: Matches single character
40
+ - `[abc]`: Matches a, b, or c
41
+ - Last matching pattern takes precedence
42
+
43
+ ## Owner Types
44
+ - Individual users: `@username`
45
+ - Teams: `@org/team-name`
46
+ - Email addresses: `user@example.com`
47
+
48
+ ## Best Practices
49
+ - Define default owners at the top
50
+ - Be specific with critical paths
51
+ - Assign multiple owners for coverage
52
+ - Keep teams small and focused
53
+ - Document ownership rationale
54
+ - Review and update regularly
55
+
56
+ ## Review Requirements
57
+ - Owners are automatically requested for reviews
58
+ - Can require approval from code owners (branch protection)
59
+ - Blocks merge without owner approval
60
+
61
+ ## Responsibilities
62
+ - Code owners should:
63
+ - Review PRs affecting their code
64
+ - Maintain code quality
65
+ - Update documentation
66
+ - Mentor contributors
67
+ - Keep ownership updated
68
+
69
+ ## Common Patterns
70
+ ```
71
+ # Backend API
72
+ /src/api/**/*.ts @org/backend-team
73
+
74
+ # Frontend Components
75
+ /src/components/**/*.tsx @org/frontend-team
76
+
77
+ # Infrastructure
78
+ /infrastructure/ @org/devops-team
79
+ /.github/workflows/ @org/devops-team
80
+
81
+ # Documentation
82
+ /docs/ @org/docs-team
83
+ *.md @org/docs-team
84
+
85
+ # Configuration
86
+ *.config.js @org/platform-team
87
+ package.json @org/platform-team
88
+
89
+ # Database
90
+ /migrations/ @org/backend-team @org/dba-team
91
+
92
+ # Security
93
+ /src/auth/ @org/security-team
94
+ ```
95
+
96
+ ## Branch Protection
97
+ - Enable "Require review from Code Owners"
98
+ - Set minimum number of approvals
99
+ - Dismiss stale reviews on push
100
+
101
+ ## Notifications
102
+ - Owners receive review requests
103
+ - Configure notification preferences
104
+ - Use team mentions for broader awareness
105
+
106
+ ## Troubleshooting
107
+ - Validate CODEOWNERS syntax
108
+ - Check team membership
109
+ - Verify file patterns match
110
+ - Test with specific files
111
+
112
+ ## Integration
113
+ - Works with pull requests
114
+ - Integrates with branch protection
115
+ - Appears in PR sidebar
116
+ - Can be queried via API
117
+
118
+ ## Maintenance
119
+ - Review quarterly
120
+ - Update for new teams/members
121
+ - Remove inactive owners
122
+ - Refactor for restructuring
123
+ - Document in team wiki
@@ -0,0 +1,146 @@
1
+ # Monorepo Development Guidelines
2
+
3
+ ## Overview
4
+ This project uses a monorepo structure to manage multiple packages/applications in a single repository.
5
+
6
+ ## Structure
7
+ ```
8
+ project-root/
9
+ ├── packages/
10
+ │ ├── package-a/
11
+ │ ├── package-b/
12
+ │ └── shared/
13
+ ├── apps/
14
+ │ ├── web/
15
+ │ └── mobile/
16
+ ├── package.json (workspace root)
17
+ └── turbo.json or nx.json
18
+ ```
19
+
20
+ ## Workspace Commands
21
+ - Install all dependencies: `npm install` (at root)
22
+ - Run script in workspace: `npm run <script> --workspace=<package-name>`
23
+ - Run script in all workspaces: `npm run <script> --workspaces`
24
+ - Add dependency to workspace: `npm install <pkg> --workspace=<name>`
25
+
26
+ ## Benefits
27
+ - Code sharing between packages
28
+ - Atomic changes across multiple packages
29
+ - Unified versioning and releases
30
+ - Shared tooling and configuration
31
+ - Single source of truth
32
+
33
+ ## Package Dependencies
34
+ - Reference workspace packages: `"package-a": "*"` or `"workspace:*"`
35
+ - Changes in dependencies trigger downstream rebuilds
36
+ - Use semver for external dependencies
37
+
38
+ ## Build Orchestration
39
+ - Define build order based on dependencies
40
+ - Use `turbo` or `nx` for caching and parallelization
41
+ - Run only affected packages on changes
42
+
43
+ ## Common Tools
44
+
45
+ ### Turborepo
46
+ ```json
47
+ {
48
+ "pipeline": {
49
+ "build": {
50
+ "dependsOn": ["^build"],
51
+ "outputs": ["dist/**"]
52
+ },
53
+ "test": {
54
+ "dependsOn": ["build"]
55
+ }
56
+ }
57
+ }
58
+ ```
59
+
60
+ ### Nx
61
+ ```json
62
+ {
63
+ "tasksRunnerOptions": {
64
+ "default": {
65
+ "runner": "@nrwl/workspace/tasks-runners/default",
66
+ "options": {
67
+ "cacheableOperations": ["build", "test"]
68
+ }
69
+ }
70
+ }
71
+ }
72
+ ```
73
+
74
+ ## Best Practices
75
+ - Keep packages focused and small
76
+ - Use consistent naming conventions
77
+ - Share common configuration files
78
+ - Version packages independently or together
79
+ - Document package purposes in README
80
+ - Use path mappings for imports
81
+ - Hoist dependencies when possible
82
+
83
+ ## Scripts Management
84
+ - Define common scripts at root
85
+ - Delegate to workspace-specific scripts
86
+ - Use parallel execution for independent tasks
87
+ - Run affected packages only
88
+
89
+ ## Testing
90
+ - Run tests from root: `npm test --workspaces`
91
+ - Run tests for specific package: `npm test --workspace=<name>`
92
+ - Use shared test configuration
93
+ - Test cross-package integration
94
+
95
+ ## Versioning
96
+ - **Independent**: Each package has own version
97
+ - **Fixed**: All packages share same version
98
+ - Use changesets for version management
99
+ - Document breaking changes
100
+
101
+ ## Publishing
102
+ - Publish packages independently
103
+ - Use automated versioning tools
104
+ - Test before publishing
105
+ - Update changelogs
106
+
107
+ ## TypeScript Configuration
108
+ ```json
109
+ {
110
+ "references": [
111
+ { "path": "./packages/package-a" },
112
+ { "path": "./packages/package-b" }
113
+ ]
114
+ }
115
+ ```
116
+
117
+ ## Import Paths
118
+ - Use path aliases: `@company/package-name`
119
+ - Configure in `tsconfig.json` paths
120
+ - Set up module resolution
121
+
122
+ ## Challenges & Solutions
123
+ - **Problem**: Dependency hell
124
+ - **Solution**: Use workspaces, hoist dependencies
125
+ - **Problem**: Slow builds
126
+ - **Solution**: Use caching (turbo/nx), build affected only
127
+ - **Problem**: Complex tooling
128
+ - **Solution**: Share configs, document setup
129
+
130
+ ## CI/CD
131
+ - Build only affected packages
132
+ - Cache build outputs
133
+ - Run tasks in parallel
134
+ - Use matrix builds for packages
135
+
136
+ ## Performance
137
+ - Enable caching for build outputs
138
+ - Use incremental builds
139
+ - Parallelize independent tasks
140
+ - Skip unchanged packages
141
+
142
+ ## Documentation
143
+ - Maintain root-level README
144
+ - Document each package purpose
145
+ - Explain workspace structure
146
+ - Provide contribution guidelines
@@ -0,0 +1,122 @@
1
+ # Nx Monorepo Guidelines
2
+
3
+ ## Overview
4
+ This monorepo uses Nx for build orchestration, code generation, and project management.
5
+
6
+ ## Commands
7
+ - Run target: `nx run <project>:<target>`
8
+ - Run for all projects: `nx run-many --target=build --all`
9
+ - Run affected: `nx affected --target=build`
10
+ - Show dependency graph: `nx graph`
11
+ - Generate code: `nx generate @nx/react:component`
12
+
13
+ ## Project Configuration
14
+ ```json
15
+ {
16
+ "name": "my-app",
17
+ "targets": {
18
+ "build": {
19
+ "executor": "@nx/webpack:webpack",
20
+ "outputs": ["{workspaceRoot}/dist/apps/my-app"],
21
+ "options": {
22
+ "outputPath": "dist/apps/my-app"
23
+ }
24
+ }
25
+ }
26
+ }
27
+ ```
28
+
29
+ ## Affected Commands
30
+ - Build affected: `nx affected:build`
31
+ - Test affected: `nx affected:test`
32
+ - Lint affected: `nx affected:lint`
33
+ - Based on git diff from base branch
34
+
35
+ ## Caching
36
+ - Nx caches task outputs automatically
37
+ - Cache key based on inputs
38
+ - Restore from cache for unchanged code
39
+ - Configure cacheable operations
40
+
41
+ ## Generators
42
+ - Generate applications: `nx g @nx/react:app`
43
+ - Generate libraries: `nx g @nx/js:lib`
44
+ - Custom generators for consistency
45
+ - Automated code scaffolding
46
+
47
+ ## Project Graph
48
+ - Visualize dependencies: `nx graph`
49
+ - See affected projects
50
+ - Understand project relationships
51
+ - Detect circular dependencies
52
+
53
+ ## Configuration Files
54
+ - `nx.json`: Nx configuration
55
+ - `workspace.json` or `project.json`: Project config
56
+ - `.nxignore`: Files to ignore
57
+
58
+ ## Task Pipeline
59
+ ```json
60
+ {
61
+ "targetDefaults": {
62
+ "build": {
63
+ "dependsOn": ["^build"]
64
+ }
65
+ }
66
+ }
67
+ ```
68
+
69
+ ## Plugins
70
+ - Framework-specific plugins: React, Angular, Next.js
71
+ - Tool-specific plugins: Jest, Cypress, ESLint
72
+ - Custom plugins for specific needs
73
+
74
+ ## Workspace Libraries
75
+ - Organize code into libraries
76
+ - Enforce module boundaries
77
+ - Share code between apps
78
+ - Use tags for constraints
79
+
80
+ ## Best Practices
81
+ - Use affected commands in CI
82
+ - Organize libs by scope and type
83
+ - Set up import restrictions
84
+ - Use generators for consistency
85
+ - Enable computation caching
86
+ - Configure remote caching for teams
87
+
88
+ ## CI/CD Integration
89
+ ```yaml
90
+ - name: Nx Cache
91
+ uses: actions/cache@v4
92
+ with:
93
+ path: node_modules/.cache/nx
94
+ key: nx-${{ github.sha }}
95
+ restore-keys: nx-
96
+
97
+ - name: Build affected
98
+ run: nx affected --target=build --base=origin/main
99
+ ```
100
+
101
+ ## Performance
102
+ - Parallel execution of independent tasks
103
+ - Computation caching
104
+ - Remote caching with Nx Cloud
105
+ - Affected-only builds in CI
106
+
107
+ ## Module Boundaries
108
+ ```json
109
+ {
110
+ "@nx/enforce-module-boundaries": [
111
+ "error",
112
+ {
113
+ "depConstraints": [
114
+ {
115
+ "sourceTag": "scope:shared",
116
+ "onlyDependOnLibsWithTags": ["scope:shared"]
117
+ }
118
+ ]
119
+ }
120
+ ]
121
+ }
122
+ ```
@@ -0,0 +1,114 @@
1
+ # Turborepo Guidelines
2
+
3
+ ## Overview
4
+ This monorepo uses Turborepo for build orchestration and caching.
5
+
6
+ ## Configuration
7
+ ```json
8
+ {
9
+ "$schema": "https://turbo.build/schema.json",
10
+ "pipeline": {
11
+ "build": {
12
+ "dependsOn": ["^build"],
13
+ "outputs": ["dist/**", ".next/**"]
14
+ },
15
+ "test": {
16
+ "dependsOn": ["build"],
17
+ "outputs": []
18
+ },
19
+ "lint": {
20
+ "outputs": []
21
+ },
22
+ "dev": {
23
+ "cache": false
24
+ }
25
+ }
26
+ }
27
+ ```
28
+
29
+ ## Commands
30
+ - Run task across all workspaces: `turbo run build`
31
+ - Run task in specific workspace: `turbo run build --filter=package-name`
32
+ - Run with no cache: `turbo run build --force`
33
+ - Clear cache: `turbo run build --no-cache`
34
+ - Dry run: `turbo run build --dry-run`
35
+
36
+ ## Pipeline Configuration
37
+ - `dependsOn`: Task dependencies
38
+ - `^dependsOn`: Dependencies from workspace dependencies
39
+ - `outputs`: Files to cache
40
+ - `cache`: Enable/disable caching
41
+ - `inputs`: Files that affect cache validity
42
+
43
+ ## Caching
44
+ - Turborepo caches task outputs
45
+ - Cache key based on inputs (files, env vars)
46
+ - Shared cache across team (remote caching)
47
+ - Restore from cache for unchanged code
48
+
49
+ ## Filtering
50
+ - By package: `--filter=package-name`
51
+ - By directory: `--filter=./apps/*`
52
+ - By dependency: `--filter=...package-name`
53
+ - By changed files: `--filter=[HEAD^1]`
54
+
55
+ ## Remote Caching
56
+ ```bash
57
+ # Enable remote cache
58
+ turbo login
59
+ turbo link
60
+
61
+ # Or use Vercel
62
+ vercel link
63
+ ```
64
+
65
+ ## Environment Variables
66
+ - Automatically included in cache key
67
+ - Prefix with `TURBO_` for Turbo-specific vars
68
+ - Use `.env` files for local development
69
+
70
+ ## Performance
71
+ - Tasks run in parallel when possible
72
+ - Skips cached tasks
73
+ - Shows cache hit ratio
74
+ - Optimizes based on dependencies
75
+
76
+ ## Best Practices
77
+ - Define clear task dependencies
78
+ - Specify all outputs for caching
79
+ - Use `^` for workspace dependencies
80
+ - Enable remote caching for teams
81
+ - Run affected tasks only in CI
82
+ - Keep pipeline config simple
83
+
84
+ ## Monorepo Commands
85
+ ```json
86
+ {
87
+ "scripts": {
88
+ "build": "turbo run build",
89
+ "dev": "turbo run dev --parallel",
90
+ "test": "turbo run test",
91
+ "lint": "turbo run lint"
92
+ }
93
+ }
94
+ ```
95
+
96
+ ## CI/CD Integration
97
+ ```yaml
98
+ # GitHub Actions
99
+ - name: Setup Turborepo cache
100
+ uses: actions/cache@v4
101
+ with:
102
+ path: .turbo
103
+ key: turbo-${{ github.sha }}
104
+ restore-keys: turbo-
105
+
106
+ - name: Build
107
+ run: turbo run build
108
+ ```
109
+
110
+ ## Debugging
111
+ - Use `--dry-run` to see execution plan
112
+ - Check `.turbo/runs/*.json` for logs
113
+ - Enable verbose output: `--verbose`
114
+ - View graph: `turbo run build --graph`