maxsim-flutter 1.25.0 → 1.27.0
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/plan/app-type-classifier.d.ts +13 -0
- package/dist/plan/app-type-classifier.d.ts.map +1 -0
- package/dist/plan/app-type-classifier.js +129 -0
- package/dist/plan/app-type-classifier.js.map +1 -0
- package/dist/plan/architecture-generator.d.ts +8 -0
- package/dist/plan/architecture-generator.d.ts.map +1 -0
- package/dist/plan/architecture-generator.js +222 -0
- package/dist/plan/architecture-generator.js.map +1 -0
- package/dist/plan/journey-to-stories.d.ts +7 -0
- package/dist/plan/journey-to-stories.d.ts.map +1 -0
- package/dist/plan/journey-to-stories.js +111 -0
- package/dist/plan/journey-to-stories.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type AppType = 'team-collaboration' | 'e-commerce' | 'content-social' | 'utility-tool' | 'fitness-health' | 'education' | 'general';
|
|
2
|
+
export interface ModuleSuggestion {
|
|
3
|
+
moduleId: string;
|
|
4
|
+
priority: 'high' | 'medium' | 'low';
|
|
5
|
+
rationale: string;
|
|
6
|
+
}
|
|
7
|
+
export interface AppTypeResult {
|
|
8
|
+
type: AppType;
|
|
9
|
+
confidence: number;
|
|
10
|
+
suggestedModules: ModuleSuggestion[];
|
|
11
|
+
}
|
|
12
|
+
export declare function classifyAppType(description: string): AppTypeResult;
|
|
13
|
+
//# sourceMappingURL=app-type-classifier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-type-classifier.d.ts","sourceRoot":"","sources":["../../src/plan/app-type-classifier.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GACf,oBAAoB,GACpB,YAAY,GACZ,gBAAgB,GAChB,cAAc,GACd,gBAAgB,GAChB,WAAW,GACX,SAAS,CAAC;AAEd,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;IACpC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,gBAAgB,EAAE,CAAC;CACtC;AAwGD,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,aAAa,CAqClE"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
const APP_TYPE_DEFINITIONS = {
|
|
2
|
+
'team-collaboration': {
|
|
3
|
+
keywords: [
|
|
4
|
+
'team', 'chat', 'channel', 'message', 'collaborate', 'collaboration',
|
|
5
|
+
'workspace', 'task', 'project management', 'kanban', 'board', 'member',
|
|
6
|
+
'invite', 'mention', 'thread', 'notification',
|
|
7
|
+
],
|
|
8
|
+
modules: [
|
|
9
|
+
{ moduleId: 'auth', priority: 'high', rationale: 'Team members need accounts and authentication' },
|
|
10
|
+
{ moduleId: 'push', priority: 'high', rationale: 'Real-time notifications for messages and task updates' },
|
|
11
|
+
{ moduleId: 'database', priority: 'high', rationale: 'Persistent storage for messages, tasks, and team data' },
|
|
12
|
+
{ moduleId: 'analytics', priority: 'medium', rationale: 'Track team engagement and feature usage' },
|
|
13
|
+
{ moduleId: 'deep-linking', priority: 'medium', rationale: 'Deep links to specific channels or tasks' },
|
|
14
|
+
{ moduleId: 'theme', priority: 'low', rationale: 'Branding and dark mode for extended use' },
|
|
15
|
+
],
|
|
16
|
+
},
|
|
17
|
+
'e-commerce': {
|
|
18
|
+
keywords: [
|
|
19
|
+
'shop', 'store', 'product', 'catalog', 'cart', 'checkout', 'payment',
|
|
20
|
+
'order', 'purchase', 'buy', 'sell', 'merchant', 'inventory', 'price',
|
|
21
|
+
'discount', 'coupon', 'shipping', 'delivery', 'ecommerce', 'e-commerce',
|
|
22
|
+
],
|
|
23
|
+
modules: [
|
|
24
|
+
{ moduleId: 'auth', priority: 'high', rationale: 'User accounts for order history and personalization' },
|
|
25
|
+
{ moduleId: 'database', priority: 'high', rationale: 'Product catalog, orders, and user data storage' },
|
|
26
|
+
{ moduleId: 'api', priority: 'high', rationale: 'Payment gateway and external service integrations' },
|
|
27
|
+
{ moduleId: 'push', priority: 'medium', rationale: 'Order status and promotional notifications' },
|
|
28
|
+
{ moduleId: 'analytics', priority: 'medium', rationale: 'Track conversions, cart abandonment, and revenue' },
|
|
29
|
+
{ moduleId: 'deep-linking', priority: 'medium', rationale: 'Product links for marketing campaigns' },
|
|
30
|
+
{ moduleId: 'theme', priority: 'low', rationale: 'Brand identity and visual consistency' },
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
'content-social': {
|
|
34
|
+
keywords: [
|
|
35
|
+
'social', 'feed', 'post', 'story', 'like', 'comment', 'share', 'follow',
|
|
36
|
+
'follower', 'profile', 'content', 'media', 'photo', 'video', 'reel',
|
|
37
|
+
'community', 'network', 'timeline', 'trending', 'hashtag',
|
|
38
|
+
],
|
|
39
|
+
modules: [
|
|
40
|
+
{ moduleId: 'auth', priority: 'high', rationale: 'User profiles and social identity' },
|
|
41
|
+
{ moduleId: 'analytics', priority: 'high', rationale: 'Content performance and user engagement metrics' },
|
|
42
|
+
{ moduleId: 'database', priority: 'high', rationale: 'Posts, comments, relationships, and media metadata' },
|
|
43
|
+
{ moduleId: 'push', priority: 'high', rationale: 'Engagement notifications for likes and comments' },
|
|
44
|
+
{ moduleId: 'deep-linking', priority: 'medium', rationale: 'Share links to specific posts or profiles' },
|
|
45
|
+
{ moduleId: 'i18n', priority: 'medium', rationale: 'Reach global audiences with localization' },
|
|
46
|
+
{ moduleId: 'theme', priority: 'low', rationale: 'Visual identity and user personalization' },
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
'utility-tool': {
|
|
50
|
+
keywords: [
|
|
51
|
+
'utility', 'tool', 'calculator', 'converter', 'scanner', 'generator',
|
|
52
|
+
'tracker', 'planner', 'organizer', 'note', 'reminder', 'timer', 'stopwatch',
|
|
53
|
+
'password', 'qr', 'barcode', 'pdf', 'file', 'offline', 'simple',
|
|
54
|
+
],
|
|
55
|
+
modules: [
|
|
56
|
+
{ moduleId: 'theme', priority: 'high', rationale: 'Clean UI with dark mode support for a polished tool' },
|
|
57
|
+
{ moduleId: 'i18n', priority: 'medium', rationale: 'Localize for wider audience reach' },
|
|
58
|
+
{ moduleId: 'analytics', priority: 'low', rationale: 'Understand which features are most used' },
|
|
59
|
+
],
|
|
60
|
+
},
|
|
61
|
+
'fitness-health': {
|
|
62
|
+
keywords: [
|
|
63
|
+
'fitness', 'health', 'workout', 'exercise', 'gym', 'training', 'run',
|
|
64
|
+
'step', 'calorie', 'diet', 'nutrition', 'sleep', 'heart rate', 'weight',
|
|
65
|
+
'bmi', 'yoga', 'meditation', 'wellness', 'habit', 'goal',
|
|
66
|
+
],
|
|
67
|
+
modules: [
|
|
68
|
+
{ moduleId: 'auth', priority: 'high', rationale: 'Personal health data requires secure user accounts' },
|
|
69
|
+
{ moduleId: 'database', priority: 'high', rationale: 'Persist workout logs, metrics, and progress history' },
|
|
70
|
+
{ moduleId: 'push', priority: 'high', rationale: 'Workout reminders and goal achievement notifications' },
|
|
71
|
+
{ moduleId: 'analytics', priority: 'medium', rationale: 'Progress trends and engagement insights' },
|
|
72
|
+
{ moduleId: 'theme', priority: 'medium', rationale: 'Energizing visuals and accessible dark mode' },
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
'education': {
|
|
76
|
+
keywords: [
|
|
77
|
+
'education', 'learning', 'course', 'lesson', 'quiz', 'exam', 'student',
|
|
78
|
+
'teacher', 'tutor', 'curriculum', 'lecture', 'e-learning', 'elearning',
|
|
79
|
+
'training', 'certificate', 'skill', 'knowledge', 'study', 'flashcard',
|
|
80
|
+
],
|
|
81
|
+
modules: [
|
|
82
|
+
{ moduleId: 'auth', priority: 'high', rationale: 'Student and instructor accounts with role management' },
|
|
83
|
+
{ moduleId: 'database', priority: 'high', rationale: 'Courses, progress, quiz results, and certificates' },
|
|
84
|
+
{ moduleId: 'api', priority: 'high', rationale: 'Content delivery and third-party learning integrations' },
|
|
85
|
+
{ moduleId: 'push', priority: 'medium', rationale: 'Study reminders and course update notifications' },
|
|
86
|
+
{ moduleId: 'i18n', priority: 'medium', rationale: 'Multilingual content for global learners' },
|
|
87
|
+
{ moduleId: 'analytics', priority: 'low', rationale: 'Track learning outcomes and completion rates' },
|
|
88
|
+
],
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
const GENERAL_MODULES = [
|
|
92
|
+
{ moduleId: 'auth', priority: 'high', rationale: 'User authentication is a common requirement for most apps' },
|
|
93
|
+
{ moduleId: 'api', priority: 'high', rationale: 'Backend API integration for data persistence and sync' },
|
|
94
|
+
{ moduleId: 'theme', priority: 'medium', rationale: 'Consistent branding and dark mode support' },
|
|
95
|
+
];
|
|
96
|
+
export function classifyAppType(description) {
|
|
97
|
+
const lower = description.toLowerCase();
|
|
98
|
+
let bestType = null;
|
|
99
|
+
let bestScore = 0;
|
|
100
|
+
let totalKeywords = 0;
|
|
101
|
+
for (const [type, definition] of Object.entries(APP_TYPE_DEFINITIONS)) {
|
|
102
|
+
let matchCount = 0;
|
|
103
|
+
for (const keyword of definition.keywords) {
|
|
104
|
+
if (lower.includes(keyword)) {
|
|
105
|
+
matchCount++;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
totalKeywords = definition.keywords.length;
|
|
109
|
+
if (matchCount > bestScore) {
|
|
110
|
+
bestScore = matchCount;
|
|
111
|
+
bestType = type;
|
|
112
|
+
totalKeywords = definition.keywords.length;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
if (bestType === null || bestScore === 0) {
|
|
116
|
+
return {
|
|
117
|
+
type: 'general',
|
|
118
|
+
confidence: 0.1,
|
|
119
|
+
suggestedModules: GENERAL_MODULES,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
const confidence = Math.min(bestScore / Math.max(3, totalKeywords * 0.4), 1);
|
|
123
|
+
return {
|
|
124
|
+
type: bestType,
|
|
125
|
+
confidence,
|
|
126
|
+
suggestedModules: APP_TYPE_DEFINITIONS[bestType].modules,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=app-type-classifier.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-type-classifier.js","sourceRoot":"","sources":["../../src/plan/app-type-classifier.ts"],"names":[],"mappings":"AA0BA,MAAM,oBAAoB,GAA2D;IACnF,oBAAoB,EAAE;QACpB,QAAQ,EAAE;YACR,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,eAAe;YACpE,WAAW,EAAE,MAAM,EAAE,oBAAoB,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ;YACtE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc;SAC9C;QACD,OAAO,EAAE;YACP,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,+CAA+C,EAAE;YAClG,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,uDAAuD,EAAE;YAC1G,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,uDAAuD,EAAE;YAC9G,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,yCAAyC,EAAE;YACnG,EAAE,QAAQ,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,0CAA0C,EAAE;YACvG,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,yCAAyC,EAAE;SAC7F;KACF;IACD,YAAY,EAAE;QACZ,QAAQ,EAAE;YACR,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,E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YACvB,QAAQ,GAAG,IAAI,CAAC;YAChB,aAAa,GAAG,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC;QAC7C,CAAC;IACH,CAAC;IAED,IAAI,QAAQ,KAAK,IAAI,IAAI,SAAS,KAAK,CAAC,EAAE,CAAC;QACzC,OAAO;YACL,IAAI,EAAE,SAAS;YACf,UAAU,EAAE,GAAG;YACf,gBAAgB,EAAE,eAAe;SAClC,CAAC;IACJ,CAAC;IAED,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,aAAa,GAAG,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;IAE7E,OAAO;QACL,IAAI,EAAE,QAAQ;QACd,UAAU;QACV,gBAAgB,EAAE,oBAAoB,CAAC,QAAQ,CAAC,CAAC,OAAO;KACzD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ProjectContext } from '../core/context.js';
|
|
2
|
+
/**
|
|
3
|
+
* Generates an architecture.md document for the scaffolded Flutter project.
|
|
4
|
+
* Includes tech stack, module overview, ASCII provider tree, navigation flow,
|
|
5
|
+
* and (conditionally) a database schema outline.
|
|
6
|
+
*/
|
|
7
|
+
export declare function generateArchitectureDoc(context: ProjectContext): string;
|
|
8
|
+
//# sourceMappingURL=architecture-generator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"architecture-generator.d.ts","sourceRoot":"","sources":["../../src/plan/architecture-generator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,CAevE"}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generates an architecture.md document for the scaffolded Flutter project.
|
|
3
|
+
* Includes tech stack, module overview, ASCII provider tree, navigation flow,
|
|
4
|
+
* and (conditionally) a database schema outline.
|
|
5
|
+
*/
|
|
6
|
+
export function generateArchitectureDoc(context) {
|
|
7
|
+
const sections = [
|
|
8
|
+
`# Architecture — ${context.projectName}`,
|
|
9
|
+
'',
|
|
10
|
+
buildTechStackSection(context),
|
|
11
|
+
buildModuleArchitectureSection(context),
|
|
12
|
+
buildProviderTreeSection(context),
|
|
13
|
+
buildNavigationFlowSection(context),
|
|
14
|
+
];
|
|
15
|
+
if (context.modules.database) {
|
|
16
|
+
sections.push(buildDatabaseSchemaSection(context.modules.database));
|
|
17
|
+
}
|
|
18
|
+
return sections.join('\n') + '\n';
|
|
19
|
+
}
|
|
20
|
+
// ---------------------------------------------------------------------------
|
|
21
|
+
// Tech Stack
|
|
22
|
+
// ---------------------------------------------------------------------------
|
|
23
|
+
function buildTechStackSection(context) {
|
|
24
|
+
const entries = [
|
|
25
|
+
'| Technology | Purpose | Rationale |',
|
|
26
|
+
'|-----------|---------|-----------|',
|
|
27
|
+
'| Flutter | UI framework | Cross-platform native UI |',
|
|
28
|
+
'| Riverpod | State management | Compile-safe, testable providers |',
|
|
29
|
+
'| go_router | Navigation | Type-safe, declarative routing |',
|
|
30
|
+
'| freezed | Immutable models | Code-gen for value types |',
|
|
31
|
+
'| dio | HTTP client | Interceptor-first, composable |',
|
|
32
|
+
];
|
|
33
|
+
if (context.modules.auth) {
|
|
34
|
+
const { provider } = context.modules.auth;
|
|
35
|
+
if (provider === 'firebase') {
|
|
36
|
+
entries.push('| Firebase Auth | Authentication | BaaS with Flutter SDK |');
|
|
37
|
+
}
|
|
38
|
+
else if (provider === 'supabase') {
|
|
39
|
+
entries.push('| Supabase | Authentication | Open-source BaaS |');
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
entries.push('| Custom Auth | Authentication | Project-specific auth logic |');
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
if (context.modules.database) {
|
|
46
|
+
const { engine } = context.modules.database;
|
|
47
|
+
if (engine === 'drift') {
|
|
48
|
+
entries.push('| Drift | Local database | Type-safe SQLite ORM with code-gen |');
|
|
49
|
+
}
|
|
50
|
+
else if (engine === 'hive') {
|
|
51
|
+
entries.push('| Hive | Local database | Lightweight key-value NoSQL store |');
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
entries.push('| Isar | Local database | High-performance embedded NoSQL |');
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
if (context.modules.push) {
|
|
58
|
+
const { provider } = context.modules.push;
|
|
59
|
+
if (provider === 'firebase') {
|
|
60
|
+
entries.push('| Firebase Cloud Messaging | Push notifications | Cross-platform push via Firebase |');
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
entries.push('| OneSignal | Push notifications | Managed push notification service |');
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
if (context.modules.i18n) {
|
|
67
|
+
entries.push('| flutter_localizations | Internationalisation | ARB-based i18n with gen-l10n |');
|
|
68
|
+
}
|
|
69
|
+
if (context.modules.analytics) {
|
|
70
|
+
entries.push('| Analytics | Event tracking | Screen views and custom events |');
|
|
71
|
+
}
|
|
72
|
+
return ['## Tech Stack', '', ...entries].join('\n');
|
|
73
|
+
}
|
|
74
|
+
// ---------------------------------------------------------------------------
|
|
75
|
+
// Module Architecture
|
|
76
|
+
// ---------------------------------------------------------------------------
|
|
77
|
+
function buildModuleArchitectureSection(context) {
|
|
78
|
+
const { modules } = context;
|
|
79
|
+
const enabledModules = [];
|
|
80
|
+
if (modules.auth)
|
|
81
|
+
enabledModules.push('auth');
|
|
82
|
+
if (modules.api)
|
|
83
|
+
enabledModules.push('api');
|
|
84
|
+
if (modules.database)
|
|
85
|
+
enabledModules.push('database');
|
|
86
|
+
if (modules.i18n)
|
|
87
|
+
enabledModules.push('i18n');
|
|
88
|
+
if (modules.theme)
|
|
89
|
+
enabledModules.push('theme');
|
|
90
|
+
if (modules.push)
|
|
91
|
+
enabledModules.push('push');
|
|
92
|
+
if (modules.analytics)
|
|
93
|
+
enabledModules.push('analytics');
|
|
94
|
+
if (modules.cicd)
|
|
95
|
+
enabledModules.push('cicd');
|
|
96
|
+
if (modules.deepLinking)
|
|
97
|
+
enabledModules.push('deepLinking');
|
|
98
|
+
const lines = ['## Module Architecture', ''];
|
|
99
|
+
if (enabledModules.length === 0) {
|
|
100
|
+
lines.push('Core-only setup — no optional modules enabled.');
|
|
101
|
+
lines.push('');
|
|
102
|
+
lines.push('Each feature follows Clean Architecture:');
|
|
103
|
+
lines.push('');
|
|
104
|
+
lines.push('```');
|
|
105
|
+
lines.push('lib/features/<feature>/');
|
|
106
|
+
lines.push(' domain/ # entities, repository interfaces, use-cases');
|
|
107
|
+
lines.push(' data/ # repository impls, data sources');
|
|
108
|
+
lines.push(' presentation/ # pages, widgets, providers');
|
|
109
|
+
lines.push('```');
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
lines.push(`Enabled modules: **${enabledModules.join(', ')}**`);
|
|
113
|
+
lines.push('');
|
|
114
|
+
lines.push('Each module lives in `lib/features/<module>/` and follows Clean Architecture:');
|
|
115
|
+
lines.push('');
|
|
116
|
+
lines.push('```');
|
|
117
|
+
lines.push('lib/features/<module>/');
|
|
118
|
+
lines.push(' domain/ # entities, repository interfaces, use-cases');
|
|
119
|
+
lines.push(' data/ # repository impls, data sources');
|
|
120
|
+
lines.push(' presentation/ # pages, widgets, providers');
|
|
121
|
+
lines.push('```');
|
|
122
|
+
}
|
|
123
|
+
lines.push('');
|
|
124
|
+
return lines.join('\n');
|
|
125
|
+
}
|
|
126
|
+
// ---------------------------------------------------------------------------
|
|
127
|
+
// Provider Tree
|
|
128
|
+
// ---------------------------------------------------------------------------
|
|
129
|
+
function buildProviderTreeSection(context) {
|
|
130
|
+
const { modules } = context;
|
|
131
|
+
const lines = ['## Provider Tree', '', '```'];
|
|
132
|
+
lines.push('ProviderScope');
|
|
133
|
+
lines.push('├── routerProvider');
|
|
134
|
+
const providers = [];
|
|
135
|
+
if (modules.auth)
|
|
136
|
+
providers.push('authRepositoryProvider');
|
|
137
|
+
if (modules.api)
|
|
138
|
+
providers.push('dioClientProvider');
|
|
139
|
+
if (modules.database)
|
|
140
|
+
providers.push('databaseProvider');
|
|
141
|
+
if (modules.push)
|
|
142
|
+
providers.push('pushTokenProvider');
|
|
143
|
+
if (modules.analytics)
|
|
144
|
+
providers.push('analyticsServiceProvider');
|
|
145
|
+
if (modules.theme)
|
|
146
|
+
providers.push('appThemeModeProvider');
|
|
147
|
+
if (modules.i18n)
|
|
148
|
+
providers.push('localeProvider');
|
|
149
|
+
for (let i = 0; i < providers.length; i++) {
|
|
150
|
+
const isLast = i === providers.length - 1;
|
|
151
|
+
lines.push(`${isLast ? '└──' : '├──'} ${providers[i]}`);
|
|
152
|
+
}
|
|
153
|
+
lines.push('```');
|
|
154
|
+
lines.push('');
|
|
155
|
+
return lines.join('\n');
|
|
156
|
+
}
|
|
157
|
+
// ---------------------------------------------------------------------------
|
|
158
|
+
// Navigation Flow
|
|
159
|
+
// ---------------------------------------------------------------------------
|
|
160
|
+
function buildNavigationFlowSection(context) {
|
|
161
|
+
const { modules } = context;
|
|
162
|
+
const lines = ['## Navigation Flow', '', '```'];
|
|
163
|
+
lines.push('/ (HomeRoute)');
|
|
164
|
+
if (modules.auth) {
|
|
165
|
+
lines.push('├── /login (LoginRoute)');
|
|
166
|
+
lines.push('├── /register (RegisterRoute)');
|
|
167
|
+
}
|
|
168
|
+
if (modules.deepLinking) {
|
|
169
|
+
const { scheme, host } = modules.deepLinking;
|
|
170
|
+
const example = scheme && host ? `${scheme}://${host}` : 'app://host';
|
|
171
|
+
lines.push(`└── [deep-link] ${example} → resolved by go_router`);
|
|
172
|
+
}
|
|
173
|
+
lines.push('```');
|
|
174
|
+
lines.push('');
|
|
175
|
+
return lines.join('\n');
|
|
176
|
+
}
|
|
177
|
+
// ---------------------------------------------------------------------------
|
|
178
|
+
// Database Schema
|
|
179
|
+
// ---------------------------------------------------------------------------
|
|
180
|
+
function buildDatabaseSchemaSection(database) {
|
|
181
|
+
const { engine } = database;
|
|
182
|
+
const lines = ['## Database Schema', ''];
|
|
183
|
+
if (engine === 'drift') {
|
|
184
|
+
lines.push('Engine: **Drift** (type-safe SQLite ORM with code generation)');
|
|
185
|
+
lines.push('');
|
|
186
|
+
lines.push('```sql');
|
|
187
|
+
lines.push('-- Example Drift table (add your tables in lib/features/database/)');
|
|
188
|
+
lines.push('CREATE TABLE items (');
|
|
189
|
+
lines.push(' id INTEGER PRIMARY KEY AUTOINCREMENT,');
|
|
190
|
+
lines.push(' name TEXT NOT NULL,');
|
|
191
|
+
lines.push(' created_at INTEGER NOT NULL');
|
|
192
|
+
lines.push(');');
|
|
193
|
+
lines.push('```');
|
|
194
|
+
}
|
|
195
|
+
else if (engine === 'hive') {
|
|
196
|
+
lines.push('Engine: **Hive** (lightweight key-value NoSQL)');
|
|
197
|
+
lines.push('');
|
|
198
|
+
lines.push('```dart');
|
|
199
|
+
lines.push('// Example Hive box (define adapters in lib/features/database/)');
|
|
200
|
+
lines.push('@HiveType(typeId: 0)');
|
|
201
|
+
lines.push('class ItemModel extends HiveObject {');
|
|
202
|
+
lines.push(' @HiveField(0)');
|
|
203
|
+
lines.push(' late String name;');
|
|
204
|
+
lines.push('}');
|
|
205
|
+
lines.push('```');
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
lines.push('Engine: **Isar** (high-performance embedded NoSQL)');
|
|
209
|
+
lines.push('');
|
|
210
|
+
lines.push('```dart');
|
|
211
|
+
lines.push('// Example Isar collection (define in lib/features/database/)');
|
|
212
|
+
lines.push('@collection');
|
|
213
|
+
lines.push('class Item {');
|
|
214
|
+
lines.push(' Id id = Isar.autoIncrement;');
|
|
215
|
+
lines.push(' late String name;');
|
|
216
|
+
lines.push('}');
|
|
217
|
+
lines.push('```');
|
|
218
|
+
}
|
|
219
|
+
lines.push('');
|
|
220
|
+
return lines.join('\n');
|
|
221
|
+
}
|
|
222
|
+
//# sourceMappingURL=architecture-generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"architecture-generator.js","sourceRoot":"","sources":["../../src/plan/architecture-generator.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CAAC,OAAuB;IAC7D,MAAM,QAAQ,GAAa;QACzB,oBAAoB,OAAO,CAAC,WAAW,EAAE;QACzC,EAAE;QACF,qBAAqB,CAAC,OAAO,CAAC;QAC9B,8BAA8B,CAAC,OAAO,CAAC;QACvC,wBAAwB,CAAC,OAAO,CAAC;QACjC,0BAA0B,CAAC,OAAO,CAAC;KACpC,CAAC;IAEF,IAAI,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;QAC7B,QAAQ,CAAC,IAAI,CAAC,0BAA0B,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IACtE,CAAC;IAED,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AACpC,CAAC;AAED,8EAA8E;AAC9E,aAAa;AACb,8EAA8E;AAE9E,SAAS,qBAAqB,CAAC,OAAuB;IACpD,MAAM,OAAO,GAAa;QACxB,sCAAsC;QACtC,qCAAqC;QACrC,uDAAuD;QACvD,oEAAoE;QACpE,6DAA6D;QAC7D,2DAA2D;QAC3D,uDAAuD;KACxD,CAAC;IAEF,IAAI,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QACzB,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC;QAC1C,IAAI,QAAQ,KAAK,UAAU,EAAE,CAAC;YAC5B,OAAO,CAAC,IAAI,CAAC,4DAA4D,CAAC,CAAC;QAC7E,CAAC;aAAM,IAAI,QAAQ,KAAK,UAAU,EAAE,CAAC;YACnC,OAAO,CAAC,IAAI,CAAC,kDAAkD,CAAC,CAAC;QACnE,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,IAAI,CAA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CAAC;IACpB,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generates a prompt/template for decomposing user journeys into PRD stories.
|
|
3
|
+
* This prompt is embedded in the plan-app skill to instruct Claude on how
|
|
4
|
+
* to break each user journey into domain → data → presentation → tests layers.
|
|
5
|
+
*/
|
|
6
|
+
export declare function generateJourneyDecompositionPrompt(journeys: string[]): string;
|
|
7
|
+
//# sourceMappingURL=journey-to-stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"journey-to-stories.d.ts","sourceRoot":"","sources":["../../src/plan/journey-to-stories.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,kCAAkC,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,CA0G7E"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generates a prompt/template for decomposing user journeys into PRD stories.
|
|
3
|
+
* This prompt is embedded in the plan-app skill to instruct Claude on how
|
|
4
|
+
* to break each user journey into domain → data → presentation → tests layers.
|
|
5
|
+
*/
|
|
6
|
+
export function generateJourneyDecompositionPrompt(journeys) {
|
|
7
|
+
const journeyList = journeys.length > 0
|
|
8
|
+
? journeys.map((j, i) => `${i + 1}. ${j}`).join('\n')
|
|
9
|
+
: '_No journeys provided. Identify user journeys from the project brief first._';
|
|
10
|
+
return [
|
|
11
|
+
'# Journey-to-Stories Decomposition',
|
|
12
|
+
'',
|
|
13
|
+
'Decompose each user journey into PRD stories following Clean Architecture layers.',
|
|
14
|
+
'',
|
|
15
|
+
'## User Journeys to Decompose',
|
|
16
|
+
'',
|
|
17
|
+
journeyList,
|
|
18
|
+
'',
|
|
19
|
+
'## Decomposition Rules',
|
|
20
|
+
'',
|
|
21
|
+
'For each journey, create 2-4 stories following this layer order:',
|
|
22
|
+
'',
|
|
23
|
+
'1. **Domain story** — entities, repository interfaces, use cases (no dependencies)',
|
|
24
|
+
'2. **Data story** — models, data sources, repository implementations (depends on domain story)',
|
|
25
|
+
'3. **Presentation story** — providers, pages, widgets (depends on domain story)',
|
|
26
|
+
'4. **Tests story** (optional) — integration and widget tests for the full feature',
|
|
27
|
+
'',
|
|
28
|
+
'### Dependency Chain',
|
|
29
|
+
'',
|
|
30
|
+
'Always maintain this dependency ordering:',
|
|
31
|
+
'',
|
|
32
|
+
'```',
|
|
33
|
+
'domain ← data ← presentation ← tests',
|
|
34
|
+
'```',
|
|
35
|
+
'',
|
|
36
|
+
'- Domain story has no dependencies',
|
|
37
|
+
'- Data story depends on domain story',
|
|
38
|
+
'- Presentation story depends on domain story',
|
|
39
|
+
'- Tests story depends on presentation story (and implicitly all others)',
|
|
40
|
+
'',
|
|
41
|
+
'## Story Format',
|
|
42
|
+
'',
|
|
43
|
+
'Each story must follow this structure:',
|
|
44
|
+
'',
|
|
45
|
+
'```json',
|
|
46
|
+
'{',
|
|
47
|
+
' "phase": <number>,',
|
|
48
|
+
' "priority": "P0" | "P1" | "P2",',
|
|
49
|
+
' "title": "<imperative verb> <domain concept>",',
|
|
50
|
+
' "description": "<detailed implementation requirements>",',
|
|
51
|
+
' "layer": "domain" | "data" | "presentation" | "tests",',
|
|
52
|
+
' "storyPoints": <Fibonacci: 1, 2, 3, 5, 8>,',
|
|
53
|
+
' "dependencies": ["<story-id>"],',
|
|
54
|
+
' "acceptanceCriteria": [',
|
|
55
|
+
' {',
|
|
56
|
+
' "description": "<human-readable criterion>",',
|
|
57
|
+
' "predicate": "<machine-checkable assertion>"',
|
|
58
|
+
' }',
|
|
59
|
+
' ]',
|
|
60
|
+
'}',
|
|
61
|
+
'```',
|
|
62
|
+
'',
|
|
63
|
+
'## Acceptance Criteria Requirements',
|
|
64
|
+
'',
|
|
65
|
+
'- Each story must have >= 3 acceptance criteria',
|
|
66
|
+
'- Every criterion must include a `predicate` field (machine-checkable assertion)',
|
|
67
|
+
'- Predicates must be specific and testable (e.g., "authState is AuthStateAuthenticated")',
|
|
68
|
+
'- Predicates use present tense: "UserEntity has id, email, name fields"',
|
|
69
|
+
'',
|
|
70
|
+
'## Story Points (Fibonacci)',
|
|
71
|
+
'',
|
|
72
|
+
'| Layer | Typical Points |',
|
|
73
|
+
'|-------|---------------|',
|
|
74
|
+
'| Domain | 2-3 |',
|
|
75
|
+
'| Data | 3-5 |',
|
|
76
|
+
'| Presentation | 3-8 |',
|
|
77
|
+
'| Tests | 1-3 |',
|
|
78
|
+
'',
|
|
79
|
+
'Valid values: 1, 2, 3, 5, 8 (Fibonacci sequence only)',
|
|
80
|
+
'',
|
|
81
|
+
'## Example Output',
|
|
82
|
+
'',
|
|
83
|
+
'For journey "User signs up and logs in":',
|
|
84
|
+
'',
|
|
85
|
+
'1. **Domain** (3pts): Define Auth entities and repository interface',
|
|
86
|
+
' - `AuthRepository` abstract class with `signUp`, `signIn`, `signOut`',
|
|
87
|
+
' - `User` entity with freezed',
|
|
88
|
+
' - No dependencies',
|
|
89
|
+
'',
|
|
90
|
+
'2. **Data** (5pts): Implement auth data source and repository',
|
|
91
|
+
' - `AuthDataSourceImpl` connecting to backend',
|
|
92
|
+
' - `AuthRepositoryImpl` implementing domain interface',
|
|
93
|
+
' - Depends on domain story',
|
|
94
|
+
'',
|
|
95
|
+
'3. **Presentation** (5pts): Build login and register screens',
|
|
96
|
+
' - `LoginPage` and `RegisterPage` with ConsumerWidget',
|
|
97
|
+
' - `authNotifierProvider` with AsyncNotifier',
|
|
98
|
+
' - Depends on domain story',
|
|
99
|
+
'',
|
|
100
|
+
'4. **Tests** (2pts): Integration tests for auth flows',
|
|
101
|
+
' - Happy path sign-up and login flow',
|
|
102
|
+
' - Depends on presentation story',
|
|
103
|
+
'',
|
|
104
|
+
'## Output',
|
|
105
|
+
'',
|
|
106
|
+
'Return a JSON array of story objects for all journeys.',
|
|
107
|
+
'Maintain dependency ordering within each journey\'s stories.',
|
|
108
|
+
'Ensure every story ID is unique and referenced correctly in dependencies.',
|
|
109
|
+
].join('\n');
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=journey-to-stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"journey-to-stories.js","sourceRoot":"","sources":["../../src/plan/journey-to-stories.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,UAAU,kCAAkC,CAAC,QAAkB;IACnE,MAAM,WAAW,GACf,QAAQ,CAAC,MAAM,GAAG,CAAC;QACjB,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QACrD,CAAC,CAAC,8EAA8E,CAAC;IAErF,OAAO;QACL,oCAAoC;QACpC,EAAE;QACF,mFAAmF;QACnF,EAAE;QACF,+BAA+B;QAC/B,EAAE;QACF,WAAW;QACX,EAAE;QACF,wBAAwB;QACxB,EAAE;QACF,kEAAkE;QAClE,EAAE;QACF,oFAAoF;QACpF,gGAAgG;QAChG,iFAAiF;QACjF,mFAAmF;QACnF,EAAE;QACF,sBAAsB;QACtB,EAAE;QACF,2CAA2C;QAC3C,EAAE;QACF,KAAK;QACL,sCAAsC;QACtC,KAAK;QACL,EAAE;QACF,oCAAoC;QACpC,sCAAsC;QACtC,8CAA8C;QAC9C,yEAAyE;QACzE,EAAE;QACF,iBAAiB;QACjB,EAAE;QACF,wCAAwC;QACxC,EAAE;QACF,SAAS;QACT,GAAG;QACH,sBAAsB;QACtB,mCAAmC;QACnC,kDAAkD;QAClD,4DAA4D;QAC5D,0DAA0D;QAC1D,8CAA8C;QAC9C,mCAAmC;QACnC,2BAA2B;QAC3B,OAAO;QACP,oDAAoD;QACpD,oDAAoD;QACpD,OAAO;QACP,KAAK;QACL,GAAG;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