@famgia/omnify-ai-guides 2.0.15

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 (91) hide show
  1. package/README.md +105 -0
  2. package/dist/chunk-RCTEXK7C.js +549 -0
  3. package/dist/chunk-RCTEXK7C.js.map +1 -0
  4. package/dist/config/rules.yaml +524 -0
  5. package/dist/index.cjs +587 -0
  6. package/dist/index.cjs.map +1 -0
  7. package/dist/index.d.cts +55 -0
  8. package/dist/index.d.ts +55 -0
  9. package/dist/index.js +26 -0
  10. package/dist/index.js.map +1 -0
  11. package/dist/knowledge/agents/architect.md.stub +150 -0
  12. package/dist/knowledge/agents/developer.md.stub +190 -0
  13. package/dist/knowledge/agents/reviewer.md.stub +134 -0
  14. package/dist/knowledge/agents/tester.md.stub +196 -0
  15. package/dist/knowledge/checklists/backend.md.stub +112 -0
  16. package/dist/knowledge/checklists/react.md.stub +108 -0
  17. package/dist/knowledge/claude-rules/laravel-controllers.md.stub +57 -0
  18. package/dist/knowledge/claude-rules/laravel-migrations.md.stub +47 -0
  19. package/dist/knowledge/claude-rules/laravel-tests.md.stub +52 -0
  20. package/dist/knowledge/claude-rules/naming.md.stub +369 -0
  21. package/dist/knowledge/claude-rules/performance.md.stub +256 -0
  22. package/dist/knowledge/claude-rules/php-standards.md.stub +305 -0
  23. package/dist/knowledge/claude-rules/react-components.md.stub +67 -0
  24. package/dist/knowledge/claude-rules/schema-yaml.md.stub +83 -0
  25. package/dist/knowledge/claude-rules/security.md.stub +164 -0
  26. package/dist/knowledge/cursor-rules/antd-deprecations.mdc.stub +62 -0
  27. package/dist/knowledge/cursor-rules/basemodel-readonly.mdc.stub +66 -0
  28. package/dist/knowledge/cursor-rules/baserequest-readonly.mdc.stub +74 -0
  29. package/dist/knowledge/cursor-rules/baseresource-readonly.mdc.stub +78 -0
  30. package/dist/knowledge/cursor-rules/laravel-controller.mdc.stub +421 -0
  31. package/dist/knowledge/cursor-rules/laravel-request.mdc.stub +112 -0
  32. package/dist/knowledge/cursor-rules/laravel-resource.mdc.stub +73 -0
  33. package/dist/knowledge/cursor-rules/laravel-review.mdc.stub +69 -0
  34. package/dist/knowledge/cursor-rules/laravel-testing.mdc.stub +138 -0
  35. package/dist/knowledge/cursor-rules/laravel.mdc.stub +138 -0
  36. package/dist/knowledge/cursor-rules/migrations-workflow.mdc.stub +224 -0
  37. package/dist/knowledge/cursor-rules/model-editable.mdc.stub +120 -0
  38. package/dist/knowledge/cursor-rules/omnify-migrations.mdc.stub +109 -0
  39. package/dist/knowledge/cursor-rules/omnify-schema.mdc.stub +358 -0
  40. package/dist/knowledge/cursor-rules/omnify.mdc.stub +58 -0
  41. package/dist/knowledge/cursor-rules/react-design.mdc.stub +693 -0
  42. package/dist/knowledge/cursor-rules/react-form.mdc.stub +292 -0
  43. package/dist/knowledge/cursor-rules/react-services.mdc.stub +304 -0
  44. package/dist/knowledge/cursor-rules/react.mdc.stub +336 -0
  45. package/dist/knowledge/cursor-rules/request-editable.mdc.stub +111 -0
  46. package/dist/knowledge/cursor-rules/resource-editable.mdc.stub +125 -0
  47. package/dist/knowledge/cursor-rules/schema-create.mdc.stub +440 -0
  48. package/dist/knowledge/cursor-rules/validation-rules.mdc.stub +181 -0
  49. package/dist/knowledge/laravel/README.md.stub +59 -0
  50. package/dist/knowledge/laravel/architecture.md.stub +424 -0
  51. package/dist/knowledge/laravel/authentication.md.stub +588 -0
  52. package/dist/knowledge/laravel/controller.md.stub +484 -0
  53. package/dist/knowledge/laravel/datetime.md.stub +334 -0
  54. package/dist/knowledge/laravel/migrations-team.md.stub +376 -0
  55. package/dist/knowledge/laravel/openapi.md.stub +449 -0
  56. package/dist/knowledge/laravel/request.md.stub +450 -0
  57. package/dist/knowledge/laravel/resource.md.stub +516 -0
  58. package/dist/knowledge/laravel/service.md.stub +503 -0
  59. package/dist/knowledge/laravel/testing.md.stub +1504 -0
  60. package/dist/knowledge/omnify/antdesign-guide.md.stub +401 -0
  61. package/dist/knowledge/omnify/config-guide.md.stub +405 -0
  62. package/dist/knowledge/omnify/japan-guide.md.stub +186 -0
  63. package/dist/knowledge/omnify/laravel-guide.md.stub +61 -0
  64. package/dist/knowledge/omnify/partial-schema-guide.md.stub +353 -0
  65. package/dist/knowledge/omnify/react-form-guide.md.stub +225 -0
  66. package/dist/knowledge/omnify/schema-guide.md.stub +144 -0
  67. package/dist/knowledge/omnify/typescript-guide.md.stub +337 -0
  68. package/dist/knowledge/react/README.md.stub +221 -0
  69. package/dist/knowledge/react/antd-guide.md +528 -0
  70. package/dist/knowledge/react/antd-guide.md.stub +528 -0
  71. package/dist/knowledge/react/checklist.md.stub +108 -0
  72. package/dist/knowledge/react/datetime-guide.md.stub +137 -0
  73. package/dist/knowledge/react/design-philosophy.md.stub +363 -0
  74. package/dist/knowledge/react/i18n-guide.md.stub +211 -0
  75. package/dist/knowledge/react/laravel-integration.md.stub +181 -0
  76. package/dist/knowledge/react/service-pattern.md.stub +180 -0
  77. package/dist/knowledge/react/tanstack-query.md.stub +339 -0
  78. package/dist/knowledge/react/types-guide.md +669 -0
  79. package/dist/knowledge/react/types-guide.md.stub +669 -0
  80. package/dist/knowledge/workflows/bug-fix.md.stub +201 -0
  81. package/dist/knowledge/workflows/code-review.md.stub +164 -0
  82. package/dist/knowledge/workflows/new-feature.md.stub +327 -0
  83. package/dist/plugin-M95GyBll.d.cts +191 -0
  84. package/dist/plugin-M95GyBll.d.ts +191 -0
  85. package/dist/plugin.cjs +573 -0
  86. package/dist/plugin.cjs.map +1 -0
  87. package/dist/plugin.d.cts +2 -0
  88. package/dist/plugin.d.ts +2 -0
  89. package/dist/plugin.js +15 -0
  90. package/dist/plugin.js.map +1 -0
  91. package/package.json +53 -0
@@ -0,0 +1,191 @@
1
+ import { OmnifyPlugin } from '@famgia/omnify-types';
2
+
3
+ /**
4
+ * AI model-specific target config
5
+ */
6
+ interface AITargetConfig {
7
+ /** Whether this target is enabled */
8
+ enabled: boolean;
9
+ /** Output filename */
10
+ filename?: string;
11
+ /** Custom config */
12
+ [key: string]: unknown;
13
+ }
14
+ /**
15
+ * Guide rule configuration
16
+ */
17
+ interface GuideRule {
18
+ /** Unique identifier */
19
+ id: string;
20
+ /** Source file (relative to knowledge/) */
21
+ source: string;
22
+ /** Category (output directory structure) */
23
+ category: string;
24
+ /** AI target-specific config */
25
+ targets: {
26
+ cursor?: CursorTargetConfig;
27
+ claude?: ClaudeTargetConfig;
28
+ antigravity?: AITargetConfig;
29
+ [key: string]: AITargetConfig | undefined;
30
+ };
31
+ }
32
+ /**
33
+ * Cursor-specific target config
34
+ */
35
+ interface CursorTargetConfig extends AITargetConfig {
36
+ /** Description for frontmatter */
37
+ description?: string;
38
+ /** Glob patterns */
39
+ globs?: string[];
40
+ /** Whether to always apply */
41
+ alwaysApply?: boolean;
42
+ }
43
+ /**
44
+ * Claude-specific target config
45
+ */
46
+ interface ClaudeTargetConfig extends AITargetConfig {
47
+ /** Output subdirectory */
48
+ subdir?: string;
49
+ }
50
+ /**
51
+ * Direct copy rule (with frontmatter)
52
+ */
53
+ interface DirectCopyRule {
54
+ /** Source file */
55
+ source: string;
56
+ /** Priority (for Antigravity) */
57
+ priority?: 'high' | 'medium' | 'low';
58
+ /** Tags (for Antigravity) */
59
+ tags?: string[];
60
+ }
61
+ /**
62
+ * Rules config file structure
63
+ */
64
+ interface RulesConfig {
65
+ /** Version */
66
+ version: string;
67
+ /** Placeholder definitions */
68
+ placeholders: Record<string, string>;
69
+ /** Guide rules list */
70
+ guides: GuideRule[];
71
+ /** Cursor direct copy rules */
72
+ cursorRules?: DirectCopyRule[];
73
+ /** Claude direct copy rules */
74
+ claudeRules?: DirectCopyRule[];
75
+ /** Antigravity direct copy rules */
76
+ antigravityRules?: DirectCopyRule[];
77
+ }
78
+ /**
79
+ * AI Adapter interface
80
+ */
81
+ interface AIAdapter {
82
+ /** Adapter name */
83
+ readonly name: string;
84
+ /** Output directory (relative to project root) */
85
+ readonly outputDir: string;
86
+ /**
87
+ * Transform content for this AI model
88
+ */
89
+ transform(content: string, rule: GuideRule, placeholders: Record<string, string>): string;
90
+ /**
91
+ * Get output filename
92
+ */
93
+ getFilename(rule: GuideRule): string;
94
+ /**
95
+ * Check if this guide is enabled for this adapter
96
+ */
97
+ isEnabled(rule: GuideRule): boolean;
98
+ /**
99
+ * Get output path (including category)
100
+ */
101
+ getOutputPath(rule: GuideRule): string;
102
+ }
103
+ /**
104
+ * AI Guides generation result
105
+ */
106
+ interface AIGuidesResult {
107
+ /** File counts by adapter */
108
+ counts: Record<string, number>;
109
+ /** Generated file paths */
110
+ files: string[];
111
+ /** Errors if any */
112
+ errors?: string[];
113
+ }
114
+ /**
115
+ * Guide category
116
+ */
117
+ type GuideCategory = 'omnify' | 'laravel' | 'react';
118
+ /**
119
+ * AI Guides generation options
120
+ */
121
+ interface AIGuidesOptions {
122
+ /** Placeholder values */
123
+ placeholders?: Record<string, string>;
124
+ /** Adapters to use (default: all) */
125
+ adapters?: string[] | undefined;
126
+ /** Categories to generate (default: all) */
127
+ categories?: GuideCategory[] | undefined;
128
+ /** Dry run (don't write files) */
129
+ dryRun?: boolean;
130
+ }
131
+
132
+ /**
133
+ * AI Guides Generator
134
+ *
135
+ * Generates AI guides from knowledge base with category filtering
136
+ */
137
+
138
+ /**
139
+ * Generate AI Guides
140
+ */
141
+ declare function generateAIGuides(rootDir: string, options?: AIGuidesOptions): AIGuidesResult;
142
+ /**
143
+ * Check if AI guides need to be generated
144
+ */
145
+ declare function shouldGenerateAIGuides(rootDir: string): boolean;
146
+ /**
147
+ * Get available adapter names
148
+ */
149
+ declare function getAvailableAdapters(): string[];
150
+ /**
151
+ * Get available categories
152
+ */
153
+ declare function getAvailableCategories(): GuideCategory[];
154
+
155
+ /**
156
+ * AI Guides Plugin for Omnify
157
+ *
158
+ * Generates AI guides for Cursor, Claude, and Antigravity
159
+ */
160
+
161
+ /**
162
+ * AI Guides plugin options
163
+ */
164
+ interface AIGuidesPluginOptions {
165
+ /**
166
+ * Categories to generate
167
+ * @default ['omnify', 'laravel', 'react'] (all)
168
+ */
169
+ categories?: GuideCategory[];
170
+ /**
171
+ * Base path for Laravel files
172
+ * @default 'app'
173
+ */
174
+ laravelBasePath?: string;
175
+ /**
176
+ * Base path for TypeScript/React files
177
+ * @default 'resources/ts'
178
+ */
179
+ typescriptBasePath?: string;
180
+ /**
181
+ * Adapters to use
182
+ * @default ['cursor', 'claude', 'antigravity'] (all)
183
+ */
184
+ adapters?: ('cursor' | 'claude' | 'antigravity')[];
185
+ }
186
+ /**
187
+ * Create AI Guides plugin
188
+ */
189
+ declare function aiGuidesPlugin(options?: AIGuidesPluginOptions): OmnifyPlugin;
190
+
191
+ export { type AIAdapter as A, type GuideCategory as G, type RulesConfig as R, aiGuidesPlugin as a, type AIGuidesPluginOptions as b, getAvailableAdapters as c, getAvailableCategories as d, type AIGuidesOptions as e, type AIGuidesResult as f, generateAIGuides as g, type GuideRule as h, shouldGenerateAIGuides as s };
@@ -0,0 +1,191 @@
1
+ import { OmnifyPlugin } from '@famgia/omnify-types';
2
+
3
+ /**
4
+ * AI model-specific target config
5
+ */
6
+ interface AITargetConfig {
7
+ /** Whether this target is enabled */
8
+ enabled: boolean;
9
+ /** Output filename */
10
+ filename?: string;
11
+ /** Custom config */
12
+ [key: string]: unknown;
13
+ }
14
+ /**
15
+ * Guide rule configuration
16
+ */
17
+ interface GuideRule {
18
+ /** Unique identifier */
19
+ id: string;
20
+ /** Source file (relative to knowledge/) */
21
+ source: string;
22
+ /** Category (output directory structure) */
23
+ category: string;
24
+ /** AI target-specific config */
25
+ targets: {
26
+ cursor?: CursorTargetConfig;
27
+ claude?: ClaudeTargetConfig;
28
+ antigravity?: AITargetConfig;
29
+ [key: string]: AITargetConfig | undefined;
30
+ };
31
+ }
32
+ /**
33
+ * Cursor-specific target config
34
+ */
35
+ interface CursorTargetConfig extends AITargetConfig {
36
+ /** Description for frontmatter */
37
+ description?: string;
38
+ /** Glob patterns */
39
+ globs?: string[];
40
+ /** Whether to always apply */
41
+ alwaysApply?: boolean;
42
+ }
43
+ /**
44
+ * Claude-specific target config
45
+ */
46
+ interface ClaudeTargetConfig extends AITargetConfig {
47
+ /** Output subdirectory */
48
+ subdir?: string;
49
+ }
50
+ /**
51
+ * Direct copy rule (with frontmatter)
52
+ */
53
+ interface DirectCopyRule {
54
+ /** Source file */
55
+ source: string;
56
+ /** Priority (for Antigravity) */
57
+ priority?: 'high' | 'medium' | 'low';
58
+ /** Tags (for Antigravity) */
59
+ tags?: string[];
60
+ }
61
+ /**
62
+ * Rules config file structure
63
+ */
64
+ interface RulesConfig {
65
+ /** Version */
66
+ version: string;
67
+ /** Placeholder definitions */
68
+ placeholders: Record<string, string>;
69
+ /** Guide rules list */
70
+ guides: GuideRule[];
71
+ /** Cursor direct copy rules */
72
+ cursorRules?: DirectCopyRule[];
73
+ /** Claude direct copy rules */
74
+ claudeRules?: DirectCopyRule[];
75
+ /** Antigravity direct copy rules */
76
+ antigravityRules?: DirectCopyRule[];
77
+ }
78
+ /**
79
+ * AI Adapter interface
80
+ */
81
+ interface AIAdapter {
82
+ /** Adapter name */
83
+ readonly name: string;
84
+ /** Output directory (relative to project root) */
85
+ readonly outputDir: string;
86
+ /**
87
+ * Transform content for this AI model
88
+ */
89
+ transform(content: string, rule: GuideRule, placeholders: Record<string, string>): string;
90
+ /**
91
+ * Get output filename
92
+ */
93
+ getFilename(rule: GuideRule): string;
94
+ /**
95
+ * Check if this guide is enabled for this adapter
96
+ */
97
+ isEnabled(rule: GuideRule): boolean;
98
+ /**
99
+ * Get output path (including category)
100
+ */
101
+ getOutputPath(rule: GuideRule): string;
102
+ }
103
+ /**
104
+ * AI Guides generation result
105
+ */
106
+ interface AIGuidesResult {
107
+ /** File counts by adapter */
108
+ counts: Record<string, number>;
109
+ /** Generated file paths */
110
+ files: string[];
111
+ /** Errors if any */
112
+ errors?: string[];
113
+ }
114
+ /**
115
+ * Guide category
116
+ */
117
+ type GuideCategory = 'omnify' | 'laravel' | 'react';
118
+ /**
119
+ * AI Guides generation options
120
+ */
121
+ interface AIGuidesOptions {
122
+ /** Placeholder values */
123
+ placeholders?: Record<string, string>;
124
+ /** Adapters to use (default: all) */
125
+ adapters?: string[] | undefined;
126
+ /** Categories to generate (default: all) */
127
+ categories?: GuideCategory[] | undefined;
128
+ /** Dry run (don't write files) */
129
+ dryRun?: boolean;
130
+ }
131
+
132
+ /**
133
+ * AI Guides Generator
134
+ *
135
+ * Generates AI guides from knowledge base with category filtering
136
+ */
137
+
138
+ /**
139
+ * Generate AI Guides
140
+ */
141
+ declare function generateAIGuides(rootDir: string, options?: AIGuidesOptions): AIGuidesResult;
142
+ /**
143
+ * Check if AI guides need to be generated
144
+ */
145
+ declare function shouldGenerateAIGuides(rootDir: string): boolean;
146
+ /**
147
+ * Get available adapter names
148
+ */
149
+ declare function getAvailableAdapters(): string[];
150
+ /**
151
+ * Get available categories
152
+ */
153
+ declare function getAvailableCategories(): GuideCategory[];
154
+
155
+ /**
156
+ * AI Guides Plugin for Omnify
157
+ *
158
+ * Generates AI guides for Cursor, Claude, and Antigravity
159
+ */
160
+
161
+ /**
162
+ * AI Guides plugin options
163
+ */
164
+ interface AIGuidesPluginOptions {
165
+ /**
166
+ * Categories to generate
167
+ * @default ['omnify', 'laravel', 'react'] (all)
168
+ */
169
+ categories?: GuideCategory[];
170
+ /**
171
+ * Base path for Laravel files
172
+ * @default 'app'
173
+ */
174
+ laravelBasePath?: string;
175
+ /**
176
+ * Base path for TypeScript/React files
177
+ * @default 'resources/ts'
178
+ */
179
+ typescriptBasePath?: string;
180
+ /**
181
+ * Adapters to use
182
+ * @default ['cursor', 'claude', 'antigravity'] (all)
183
+ */
184
+ adapters?: ('cursor' | 'claude' | 'antigravity')[];
185
+ }
186
+ /**
187
+ * Create AI Guides plugin
188
+ */
189
+ declare function aiGuidesPlugin(options?: AIGuidesPluginOptions): OmnifyPlugin;
190
+
191
+ export { type AIAdapter as A, type GuideCategory as G, type RulesConfig as R, aiGuidesPlugin as a, type AIGuidesPluginOptions as b, getAvailableAdapters as c, getAvailableCategories as d, type AIGuidesOptions as e, type AIGuidesResult as f, generateAIGuides as g, type GuideRule as h, shouldGenerateAIGuides as s };