@el-j/magic-helix-plugins 4.0.0-beta.1 → 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.
- package/dist/architecture/codeowners.md +123 -0
- package/dist/architecture/monorepo.md +146 -0
- package/dist/architecture/nx.md +122 -0
- package/dist/architecture/turborepo.md +114 -0
- package/dist/ci/github-actions.md +268 -0
- package/dist/ci/gitlab-ci.md +330 -0
- package/dist/containers/docker-multistage.md +120 -0
- package/dist/containers/kubernetes-deploy.md +210 -0
- package/dist/cpp/index.cjs +79 -0
- package/dist/cpp/index.mjs +209 -0
- package/dist/csharp/index.cjs +2 -2
- package/dist/csharp/{index.js → index.mjs} +17 -11
- package/dist/csharp/templates/framework-aspnetcore.md +205 -0
- package/dist/csharp/templates/framework-blazor.md +271 -0
- package/dist/csharp/templates/lang-csharp.md +162 -0
- package/dist/devops/docker-compose.md +111 -0
- package/dist/devops/docker-dockerfile.md +94 -0
- package/dist/devops/github-actions.md +160 -0
- package/dist/devops/gitlab-ci.md +210 -0
- package/dist/generic/lang-typescript.md +57 -0
- package/dist/generic/state-redux.md +21 -0
- package/dist/generic/state-rxjs.md +6 -0
- package/dist/generic/style-mui.md +23 -0
- package/dist/generic/style-tailwind.md +76 -0
- package/dist/generic/test-cypress.md +21 -0
- package/dist/generic/test-jest.md +20 -0
- package/dist/generic/test-playwright.md +21 -0
- package/dist/generic/test-vitest.md +131 -0
- package/dist/go/index.cjs +3 -3
- package/dist/go/{index.js → index.mjs} +18 -15
- package/dist/go/templates/lang-go.md +571 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +24 -0
- package/dist/java/index.cjs +2 -2
- package/dist/java/{index.js → index.mjs} +25 -19
- package/dist/java/templates/build-gradle.md +102 -0
- package/dist/java/templates/build-maven.md +86 -0
- package/dist/java/templates/framework-spring-boot.md +179 -0
- package/dist/java/templates/lang-java.md +78 -0
- package/dist/java/templates/lang-kotlin.md +88 -0
- package/dist/meta/magic-helix-meta.md +213 -0
- package/dist/meta/meta-debug.md +459 -0
- package/dist/meta/meta-implement.md +450 -0
- package/dist/meta/meta-roadmap.md +265 -0
- package/dist/nodejs/templates/angular-core.md +19 -0
- package/dist/nodejs/templates/lang-typescript.md +57 -0
- package/dist/nodejs/templates/nestjs-core.md +7 -0
- package/dist/nodejs/templates/react-core.md +677 -0
- package/dist/nodejs/templates/react-zustand.md +7 -0
- package/dist/nodejs/templates/state-redux.md +21 -0
- package/dist/nodejs/templates/state-rxjs.md +6 -0
- package/dist/nodejs/templates/style-primevue.md +6 -0
- package/dist/nodejs/templates/style-quasar.md +22 -0
- package/dist/nodejs/templates/style-tailwind.md +76 -0
- package/dist/nodejs/templates/test-cypress.md +21 -0
- package/dist/nodejs/templates/test-jest.md +20 -0
- package/dist/nodejs/templates/test-playwright.md +21 -0
- package/dist/nodejs/templates/test-vitest.md +131 -0
- package/dist/nodejs/templates/vue-core.md +108 -0
- package/dist/nodejs/templates/vue-pinia.md +5 -0
- package/dist/patterns/architecture/clean-architecture.md +469 -0
- package/dist/patterns/architecture/dependency-injection.md +517 -0
- package/dist/patterns/architecture/domain-driven-design.md +621 -0
- package/dist/patterns/architecture/layered-architecture.md +382 -0
- package/dist/patterns/architecture/repository-pattern.md +408 -0
- package/dist/patterns/domain-expertise/nextjs-rules.md +115 -0
- package/dist/patterns/domain-expertise/react-patterns.md +181 -0
- package/dist/patterns/domain-expertise/server-components.md +212 -0
- package/dist/patterns/domain-expertise/shadcn-ui.md +52 -0
- package/dist/patterns/domain-expertise/tailwind-patterns.md +52 -0
- package/dist/patterns/environment/container-awareness.md +17 -0
- package/dist/patterns/environment/ide-features.md +17 -0
- package/dist/patterns/environment/os-commands.md +17 -0
- package/dist/patterns/organization/heading-hierarchy.md +103 -0
- package/dist/patterns/organization/sequential-workflows.md +102 -0
- package/dist/patterns/organization/xml-rule-groups.md +64 -0
- package/dist/patterns/reasoning/agent-loop.md +151 -0
- package/dist/patterns/reasoning/confirmation-gates.md +141 -0
- package/dist/patterns/reasoning/dependency-analysis.md +132 -0
- package/dist/patterns/reasoning/one-tool-per-iteration.md +152 -0
- package/dist/patterns/reasoning/preview-before-action.md +194 -0
- package/dist/patterns/reasoning/reflection-checkpoints.md +166 -0
- package/dist/patterns/reasoning/result-verification.md +157 -0
- package/dist/patterns/reasoning/subtask-breakdown.md +131 -0
- package/dist/patterns/reasoning/thinking-tags.md +100 -0
- package/dist/patterns/role-definition/capability-declarations.md +72 -0
- package/dist/patterns/role-definition/expert-identity.md +45 -0
- package/dist/patterns/role-definition/scope-boundaries.md +61 -0
- package/dist/patterns/safety/code-safety-rules.md +17 -0
- package/dist/patterns/safety/credential-handling.md +17 -0
- package/dist/patterns/safety/destructive-warnings.md +17 -0
- package/dist/patterns/safety/refusal-messages.md +17 -0
- package/dist/patterns/tone/adaptive-tone.md +17 -0
- package/dist/patterns/tone/concise-communication.md +17 -0
- package/dist/patterns/tone/forbidden-phrases.md +17 -0
- package/dist/patterns/tool-guidelines/function-schemas.md +143 -0
- package/dist/patterns/tool-guidelines/parameter-examples.md +137 -0
- package/dist/patterns/tool-guidelines/usage-policies.md +105 -0
- package/dist/php/index.cjs +2 -2
- package/dist/php/{index.js → index.mjs} +12 -6
- package/dist/php/templates/framework-laravel.md +112 -0
- package/dist/php/templates/lang-php.md +94 -0
- package/dist/python/index.cjs +4 -4
- package/dist/python/{index.js → index.mjs} +10 -7
- package/dist/python/templates/lang-python.md +508 -0
- package/dist/ruby/index.cjs +2 -2
- package/dist/ruby/{index.js → index.mjs} +16 -10
- package/dist/ruby/templates/framework-rails.md +309 -0
- package/dist/ruby/templates/framework-sinatra.md +227 -0
- package/dist/ruby/templates/lang-ruby.md +216 -0
- package/dist/rust/index.cjs +3 -3
- package/dist/rust/{index.js → index.mjs} +24 -18
- package/dist/rust/templates/lang-rust.md +89 -0
- package/dist/swift/index.cjs +32 -0
- package/dist/swift/index.mjs +112 -0
- package/dist/swift/templates/framework-vapor.md +352 -0
- package/dist/swift/templates/lang-swift.md +291 -0
- package/package.json +31 -21
- package/dist/index.js +0 -20
- /package/dist/nodejs/{index.js → index.mjs} +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Framework: Angular
|
|
2
|
+
- **ALWAYS** use Angular standalone components.
|
|
3
|
+
- **ALWAYS** use signals for reactive state management.
|
|
4
|
+
- **NEVER** use NgModules for new components.
|
|
5
|
+
- **ALWAYS** use TypeScript strict mode.
|
|
6
|
+
- **ALWAYS** use the `OnPush` change detection strategy.
|
|
7
|
+
- **DEPENDENCY INJECTION**: Use constructor injection with `inject()` function in standalone components.
|
|
8
|
+
- **SIGNALS**: Use `signal()` for primitive values and `computed()` for derived state.
|
|
9
|
+
- **EFFECTS**: Use `effect()` for side effects that react to signal changes.
|
|
10
|
+
- **INPUTS**: Define component inputs with `input()` function.
|
|
11
|
+
- **OUTPUTS**: Define component outputs with `output()` function.
|
|
12
|
+
- **CONTROL FLOW**: Use `@if`, `@for`, and `@switch` for template control flow.
|
|
13
|
+
- **LIFECYCLE**: Use `DestroyRef` and `takeUntilDestroyed()` for subscription cleanup.
|
|
14
|
+
- **SERVICES**: Create injectable services with `injectable()` function.
|
|
15
|
+
- **ROUTING**: Use functional guards and resolvers with dependency injection.
|
|
16
|
+
- **FORMS**: Use reactive forms with `FormControl`, `FormGroup`, and `FormArray`.
|
|
17
|
+
- **HTTP**: Use `HttpClient` with proper error handling and interceptors.
|
|
18
|
+
- **TESTING**: Use `TestBed` for integration tests and direct instantiation for unit tests.
|
|
19
|
+
- **NAMING**: Use PascalCase for component classes and kebab-case for selectors.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Language: TypeScript
|
|
2
|
+
|
|
3
|
+
## Expert Identity
|
|
4
|
+
You are an expert TypeScript developer with deep knowledge of static typing, modern ECMAScript features, and type-safe application development.
|
|
5
|
+
|
|
6
|
+
## Core Capabilities
|
|
7
|
+
- Write type-safe TypeScript code using strict mode
|
|
8
|
+
- Design robust type systems with interfaces and utility types
|
|
9
|
+
- Apply modern TypeScript patterns for null safety and immutability
|
|
10
|
+
- Debug type errors and provide clear type annotations
|
|
11
|
+
|
|
12
|
+
## Coding Standards
|
|
13
|
+
|
|
14
|
+
### Type Safety
|
|
15
|
+
* **ALWAYS** use strict mode (`"strict": true` in `tsconfig.json`).
|
|
16
|
+
* **AVOID** the `any` type. Prefer `unknown` when the type is truly unknown.
|
|
17
|
+
* **ALWAYS** use `interface` for public API definitions (e.g., function parameters, return types) and `type` for internal or utility types.
|
|
18
|
+
|
|
19
|
+
### Modern Syntax
|
|
20
|
+
* **ALWAYS** use optional chaining (`?.`) and nullish coalescing (`??`) over `&&` checks.
|
|
21
|
+
* **NEVER** use `require`. Always use ES module `import` syntax.
|
|
22
|
+
|
|
23
|
+
## Examples
|
|
24
|
+
|
|
25
|
+
### Proper Interface Definition
|
|
26
|
+
```typescript
|
|
27
|
+
// ✅ Good: Interface for public API
|
|
28
|
+
interface UserProfile {
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
email?: string; // Optional property
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function getUser(id: string): Promise<UserProfile> {
|
|
35
|
+
// Implementation
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Type-Safe Null Handling
|
|
40
|
+
```typescript
|
|
41
|
+
// ✅ Good: Using optional chaining and nullish coalescing
|
|
42
|
+
const displayName = user?.profile?.name ?? 'Anonymous';
|
|
43
|
+
|
|
44
|
+
// ❌ Bad: Manual null checks
|
|
45
|
+
const displayName = user && user.profile && user.profile.name ? user.profile.name : 'Anonymous';
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Safety Guidelines
|
|
49
|
+
- Never generate code that bypasses TypeScript's type system with `@ts-ignore` or `as any` without explicit user request
|
|
50
|
+
- Always validate that suggested code compiles without type errors
|
|
51
|
+
- Refuse to implement patterns that compromise type safety when asked
|
|
52
|
+
|
|
53
|
+
## Tool Usage
|
|
54
|
+
When using file editing or code generation tools:
|
|
55
|
+
- Always include proper TypeScript type annotations
|
|
56
|
+
- Ensure imports are typed correctly
|
|
57
|
+
- Verify that generated code is compatible with strict mode
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Framework: NestJS
|
|
2
|
+
- **ALWAYS** follow the standard architecture: `Module` > `Controller` > `Service`.
|
|
3
|
+
- **CONTROLLERS** should *only* handle HTTP request/response logic and DTO validation.
|
|
4
|
+
- **SERVICES** should contain *all* business logic.
|
|
5
|
+
- **ALWAYS** use DTOs (Data Transfer Objects) for `POST`/`PUT` bodies and validate them with `class-validator`.
|
|
6
|
+
- **ALWAYS** use Dependency Injection. Never instantiate services manually.
|
|
7
|
+
- **MODULES**: Keep modules granular. Import only what is needed.
|