mycontext-cli 1.0.25 ā 1.0.27
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/README.md +30 -66
- package/dist/agents/implementations/InteractiveAgent.js +1 -1
- package/dist/agents/implementations/InteractiveAgent.js.map +1 -1
- package/dist/cli.js +18 -66
- package/dist/cli.js.map +1 -1
- package/dist/commands/agent-flow.d.ts.map +1 -1
- package/dist/commands/agent-flow.js +1 -1
- package/dist/commands/agent-flow.js.map +1 -1
- package/dist/commands/generate-components.d.ts +0 -1
- package/dist/commands/generate-components.d.ts.map +1 -1
- package/dist/commands/generate-components.js +3 -106
- package/dist/commands/generate-components.js.map +1 -1
- package/dist/commands/generate.d.ts +0 -2
- package/dist/commands/generate.d.ts.map +1 -1
- package/dist/commands/generate.js +48 -493
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/init.d.ts +0 -2
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +0 -102
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/migrate.d.ts.map +1 -1
- package/dist/commands/migrate.js +0 -4
- package/dist/commands/migrate.js.map +1 -1
- package/dist/commands/update.d.ts +0 -3
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +11 -83
- package/dist/commands/update.js.map +1 -1
- package/dist/config/ai-providers.json +7 -7
- package/dist/config/dependencies.json +2 -2
- package/dist/utils/fileSystem.d.ts +0 -8
- package/dist/utils/fileSystem.d.ts.map +1 -1
- package/dist/utils/fileSystem.js +0 -50
- package/dist/utils/fileSystem.js.map +1 -1
- package/dist/utils/hybridAIClient.js +1 -1
- package/dist/utils/hybridAIClient.js.map +1 -1
- package/package.json +2 -3
- package/dist/commands/clear.d.ts +0 -25
- package/dist/commands/clear.d.ts.map +0 -1
- package/dist/commands/clear.js +0 -73
- package/dist/commands/clear.js.map +0 -1
- package/dist/commands/history.d.ts +0 -98
- package/dist/commands/history.d.ts.map +0 -1
- package/dist/commands/history.js +0 -308
- package/dist/commands/history.js.map +0 -1
- package/dist/commands/now.d.ts +0 -34
- package/dist/commands/now.d.ts.map +0 -1
- package/dist/commands/now.js +0 -168
- package/dist/commands/now.js.map +0 -1
- package/dist/commands/timestamp.d.ts +0 -28
- package/dist/commands/timestamp.d.ts.map +0 -1
- package/dist/commands/timestamp.js +0 -105
- package/dist/commands/timestamp.js.map +0 -1
- package/dist/commands/track.d.ts +0 -29
- package/dist/commands/track.d.ts.map +0 -1
- package/dist/commands/track.js +0 -333
- package/dist/commands/track.js.map +0 -1
|
@@ -412,46 +412,6 @@ class GenerateCommand {
|
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
414
|
catch { }
|
|
415
|
-
// If no description provided, scan .mycontext folder for context files
|
|
416
|
-
if (!projectContext.description) {
|
|
417
|
-
const contextFiles = await this.scanMyContextFiles();
|
|
418
|
-
if (contextFiles.length > 0) {
|
|
419
|
-
console.log(chalk_1.default.blue(`\nš Found ${contextFiles.length} context files in .mycontext folder:`));
|
|
420
|
-
contextFiles.forEach((file) => {
|
|
421
|
-
console.log(chalk_1.default.gray(` - ${file}`));
|
|
422
|
-
});
|
|
423
|
-
// Let user select which files to use
|
|
424
|
-
const response = await (0, prompts_1.default)({
|
|
425
|
-
type: "multiselect",
|
|
426
|
-
name: "selectedFiles",
|
|
427
|
-
message: "Select files to use as context:",
|
|
428
|
-
choices: contextFiles.map((file) => ({
|
|
429
|
-
title: file,
|
|
430
|
-
value: file,
|
|
431
|
-
selected: true, // Select all by default
|
|
432
|
-
})),
|
|
433
|
-
instructions: "Use arrow keys to navigate, space to select/deselect, enter to confirm",
|
|
434
|
-
});
|
|
435
|
-
if (response.selectedFiles && response.selectedFiles.length > 0) {
|
|
436
|
-
// Read selected files and combine content
|
|
437
|
-
let combinedContent = "";
|
|
438
|
-
for (const file of response.selectedFiles) {
|
|
439
|
-
try {
|
|
440
|
-
const content = await fs.readFile(file, "utf8");
|
|
441
|
-
combinedContent += `\n\n## ${path_1.default.basename(file)}\n\n${content}`;
|
|
442
|
-
}
|
|
443
|
-
catch (error) {
|
|
444
|
-
console.log(chalk_1.default.yellow(`ā ļø Could not read ${file}`));
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
if (combinedContent.trim()) {
|
|
448
|
-
// Update project context with combined content
|
|
449
|
-
projectContext.description = combinedContent.trim();
|
|
450
|
-
console.log(chalk_1.default.green(`ā
Using content from ${response.selectedFiles.length} files as context`));
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
415
|
// Get active playbook for additional context
|
|
456
416
|
const activePlaybook = await this.getActivePlaybook();
|
|
457
417
|
const prompt = [
|
|
@@ -1573,201 +1533,45 @@ Make the CSS immediately usable - no placeholders, actual working values!`;
|
|
|
1573
1533
|
ctx.brand.split("\n").slice(0, 40).join("\n"),
|
|
1574
1534
|
"",
|
|
1575
1535
|
"Available shadcn/ui primitives (import from '@/components/ui/<component>'):",
|
|
1576
|
-
this.
|
|
1536
|
+
(ctx.shadcn.length ? ctx.shadcn : this.getCanonicalShadcnList())
|
|
1537
|
+
.slice(0, 60)
|
|
1538
|
+
.join(", "),
|
|
1577
1539
|
"",
|
|
1578
|
-
"Return strictly valid JSON ONLY with this
|
|
1579
|
-
"",
|
|
1580
|
-
"PHILOSOPHY: Start with the smallest atomic components, then compose them into larger structures, then into full pages.",
|
|
1581
|
-
"This ensures consistency, reusability, and clear context about where each component belongs.",
|
|
1582
|
-
"",
|
|
1583
|
-
"JSON Structure:",
|
|
1540
|
+
"Return strictly valid JSON ONLY with this shape:",
|
|
1584
1541
|
"{",
|
|
1585
|
-
' "
|
|
1542
|
+
' "groups": [',
|
|
1586
1543
|
" {",
|
|
1587
|
-
' "name":
|
|
1588
|
-
' "description":
|
|
1589
|
-
' "
|
|
1590
|
-
' "priority": "high",',
|
|
1591
|
-
' "development": {',
|
|
1592
|
-
' "status": "planned|in-progress|completed|testing|deployed",',
|
|
1593
|
-
' "progress": 0-100,',
|
|
1594
|
-
' "assignedTo": "developer-name",',
|
|
1595
|
-
' "startDate": "YYYY-MM-DD",',
|
|
1596
|
-
' "targetDate": "YYYY-MM-DD",',
|
|
1597
|
-
' "lastUpdated": "YYYY-MM-DDTHH:mm:ss.sssZ",',
|
|
1598
|
-
' "notes": "Development notes and updates"',
|
|
1599
|
-
" },",
|
|
1600
|
-
' "composites": [',
|
|
1544
|
+
' "name": string (PascalCase or words),',
|
|
1545
|
+
' "description": string,',
|
|
1546
|
+
' "components": [',
|
|
1601
1547
|
" {",
|
|
1602
|
-
' "name":
|
|
1603
|
-
' "description":
|
|
1604
|
-
' "type": "
|
|
1605
|
-
' "priority": "high",',
|
|
1606
|
-
' "
|
|
1607
|
-
'
|
|
1608
|
-
'
|
|
1609
|
-
'
|
|
1610
|
-
' "startDate": "YYYY-MM-DD",',
|
|
1611
|
-
' "targetDate": "YYYY-MM-DD",',
|
|
1612
|
-
' "lastUpdated": "YYYY-MM-DDTHH:mm:ss.sssZ",',
|
|
1613
|
-
' "notes": "Development notes and updates"',
|
|
1614
|
-
" },",
|
|
1615
|
-
' "atomics": [',
|
|
1616
|
-
" {",
|
|
1617
|
-
' "name": "AtomicName" (PascalCase),',
|
|
1618
|
-
' "description": "Smallest reusable component",',
|
|
1619
|
-
' "type": "atomic",',
|
|
1620
|
-
' "priority": "high",',
|
|
1621
|
-
' "dependencies": ["shadcn/ui components"],',
|
|
1622
|
-
' "tags": ["specific", "reusable"],',
|
|
1623
|
-
' "acceptanceCriteria": ["specific criteria"],',
|
|
1624
|
-
' "context": "Where this atomic component is used",',
|
|
1625
|
-
' "development": {',
|
|
1626
|
-
' "status": "planned|in-progress|completed|testing|deployed",',
|
|
1627
|
-
' "progress": 0-100,',
|
|
1628
|
-
' "assignedTo": "developer-name",',
|
|
1629
|
-
' "startDate": "YYYY-MM-DD",',
|
|
1630
|
-
' "targetDate": "YYYY-MM-DD",',
|
|
1631
|
-
' "lastUpdated": "YYYY-MM-DDTHH:mm:ss.sssZ",',
|
|
1632
|
-
' "notes": "Development notes and updates"',
|
|
1633
|
-
" }",
|
|
1634
|
-
" }",
|
|
1635
|
-
" ]",
|
|
1548
|
+
' "name": string (PascalCase),',
|
|
1549
|
+
' "description": string,',
|
|
1550
|
+
' "type": "layout"|"display"|"interactive"|"form",',
|
|
1551
|
+
' "priority": "high"|"medium"|"low",',
|
|
1552
|
+
' "dependencies": string[],',
|
|
1553
|
+
' "tags": string[],',
|
|
1554
|
+
' "acceptanceCriteria": string[],',
|
|
1555
|
+
' "context": string',
|
|
1636
1556
|
" }",
|
|
1637
1557
|
" ]",
|
|
1638
1558
|
" }",
|
|
1639
|
-
" ]
|
|
1640
|
-
|
|
1641
|
-
" {",
|
|
1642
|
-
' "name": "StandaloneComposite" (PascalCase),',
|
|
1643
|
-
' "description": "Reusable composite not tied to specific page",',
|
|
1644
|
-
' "type": "composite",',
|
|
1645
|
-
' "priority": "medium",',
|
|
1646
|
-
' "development": {',
|
|
1647
|
-
' "status": "planned|in-progress|completed|testing|deployed",',
|
|
1648
|
-
' "progress": 0-100,',
|
|
1649
|
-
' "assignedTo": "developer-name",',
|
|
1650
|
-
' "startDate": "YYYY-MM-DD",',
|
|
1651
|
-
' "targetDate": "YYYY-MM-DD",',
|
|
1652
|
-
' "lastUpdated": "YYYY-MM-DDTHH:mm:ss.sssZ",',
|
|
1653
|
-
' "notes": "Development notes and updates"',
|
|
1654
|
-
" },",
|
|
1655
|
-
' "atomics": [',
|
|
1656
|
-
" {",
|
|
1657
|
-
' "name": "AtomicName" (PascalCase),',
|
|
1658
|
-
' "description": "Atomic component within standalone composite",',
|
|
1659
|
-
' "type": "atomic",',
|
|
1660
|
-
' "priority": "medium",',
|
|
1661
|
-
' "dependencies": ["shadcn/ui components"],',
|
|
1662
|
-
' "tags": ["reusable", "standalone"],',
|
|
1663
|
-
' "acceptanceCriteria": ["specific criteria"],',
|
|
1664
|
-
' "context": "Context within standalone composite",',
|
|
1665
|
-
' "development": {',
|
|
1666
|
-
' "status": "planned|in-progress|completed|testing|deployed",',
|
|
1667
|
-
' "progress": 0-100,',
|
|
1668
|
-
' "assignedTo": "developer-name",',
|
|
1669
|
-
' "startDate": "YYYY-MM-DD",',
|
|
1670
|
-
' "targetDate": "YYYY-MM-DD",',
|
|
1671
|
-
' "lastUpdated": "YYYY-MM-DDTHH:mm:ss.sssZ",',
|
|
1672
|
-
' "notes": "Development notes and updates"',
|
|
1673
|
-
" }",
|
|
1674
|
-
" }",
|
|
1675
|
-
" ]",
|
|
1676
|
-
" }",
|
|
1677
|
-
" ],",
|
|
1678
|
-
' "standaloneAtomics": [',
|
|
1679
|
-
" {",
|
|
1680
|
-
' "name": "StandaloneAtomic" (PascalCase),',
|
|
1681
|
-
' "description": "Reusable atomic component not tied to specific structure",',
|
|
1682
|
-
' "type": "atomic",',
|
|
1683
|
-
' "priority": "low",',
|
|
1684
|
-
' "dependencies": ["shadcn/ui components"],',
|
|
1685
|
-
' "tags": ["utility", "standalone"],',
|
|
1686
|
-
' "acceptanceCriteria": ["specific criteria"],',
|
|
1687
|
-
' "context": "General utility component",',
|
|
1688
|
-
' "development": {',
|
|
1689
|
-
' "status": "planned|in-progress|completed|testing|deployed",',
|
|
1690
|
-
' "progress": 0-100,',
|
|
1691
|
-
' "assignedTo": "developer-name",',
|
|
1692
|
-
' "startDate": "YYYY-MM-DD",',
|
|
1693
|
-
' "targetDate": "YYYY-MM-DD",',
|
|
1694
|
-
' "lastUpdated": "YYYY-MM-DDTHH:mm:ss.sssZ",',
|
|
1695
|
-
' "notes": "Development notes and updates"',
|
|
1696
|
-
" }",
|
|
1697
|
-
" }",
|
|
1698
|
-
" ],",
|
|
1559
|
+
" ]",
|
|
1560
|
+
" ,",
|
|
1699
1561
|
' "metadata": {',
|
|
1700
1562
|
' "coreCandidates": [',
|
|
1701
|
-
' { "name": string, "
|
|
1702
|
-
' { "name": string, "
|
|
1703
|
-
' { "name": string, "
|
|
1704
|
-
" ],",
|
|
1705
|
-
' "hierarchy": {',
|
|
1706
|
-
' "atomicCount": number,',
|
|
1707
|
-
' "compositeCount": number,',
|
|
1708
|
-
' "pageCount": number,',
|
|
1709
|
-
' "maxDepth": number',
|
|
1710
|
-
" },",
|
|
1711
|
-
' "development": {',
|
|
1712
|
-
' "projectStatus": "planning|in-progress|testing|completed|deployed",',
|
|
1713
|
-
' "overallProgress": 0-100,',
|
|
1714
|
-
' "teamMembers": ["developer1", "developer2"],',
|
|
1715
|
-
' "projectStartDate": "YYYY-MM-DD",',
|
|
1716
|
-
' "projectTargetDate": "YYYY-MM-DD",',
|
|
1717
|
-
' "lastUpdated": "YYYY-MM-DDTHH:mm:ss.sssZ",',
|
|
1718
|
-
' "milestones": [',
|
|
1719
|
-
' { "name": "Phase 1", "status": "completed", "date": "YYYY-MM-DD" },',
|
|
1720
|
-
' { "name": "Phase 2", "status": "in-progress", "date": "YYYY-MM-DD" }',
|
|
1721
|
-
" ]",
|
|
1722
|
-
" },",
|
|
1723
|
-
' "availableShadcnComponents": [',
|
|
1724
|
-
' "accordion", "alert", "alert-dialog", "aspect-ratio", "avatar", "badge",',
|
|
1725
|
-
' "breadcrumb", "button", "calendar", "card", "carousel", "chart",',
|
|
1726
|
-
' "checkbox", "collapsible", "command", "context-menu", "dialog", "drawer",',
|
|
1727
|
-
' "dropdown-menu", "form", "hover-card", "input", "input-otp", "label",',
|
|
1728
|
-
' "menubar", "navigation-menu", "pagination", "popover", "progress",',
|
|
1729
|
-
' "radio-group", "resizable", "scroll-area", "select", "separator", "sheet",',
|
|
1730
|
-
' "sidebar", "skeleton", "slider", "sonner", "switch", "table", "tabs",',
|
|
1731
|
-
' "textarea", "toggle", "toggle-group", "tooltip"',
|
|
1563
|
+
' { "name": string, "group": string, "reason": string },',
|
|
1564
|
+
' { "name": string, "group": string, "reason": string },',
|
|
1565
|
+
' { "name": string, "group": string, "reason": string }',
|
|
1732
1566
|
" ]",
|
|
1733
1567
|
" }",
|
|
1734
1568
|
"}",
|
|
1735
1569
|
"",
|
|
1736
|
-
"
|
|
1737
|
-
"1. ATOMIC: Smallest, most reusable components (Button, Input, Card, Badge)",
|
|
1738
|
-
"2. COMPOSITE: Composed of multiple atomics (PlayerCard, FormSection, NavigationBar)",
|
|
1739
|
-
"3. PAGE: Full page layouts composed of composites (HomePage, DashboardPage)",
|
|
1740
|
-
"4. NESTING: Each level can contain the level below it",
|
|
1741
|
-
"5. CONTEXT: Always specify where each component belongs in the hierarchy",
|
|
1742
|
-
"6. REUSABILITY: Atomic components should be reusable across different contexts",
|
|
1743
|
-
"7. CONSISTENCY: Similar components at the same level should follow similar patterns",
|
|
1744
|
-
"",
|
|
1745
|
-
"DEVELOPMENT TRACKING RULES:",
|
|
1746
|
-
"8. STATUS: Use 'planned' for new components, 'in-progress' for active development",
|
|
1747
|
-
"9. PROGRESS: Set to 0 for planned, 25/50/75 for partial, 100 for completed",
|
|
1748
|
-
"10. ASSIGNMENT: Assign components to team members or 'unassigned'",
|
|
1749
|
-
"11. DATES: Use realistic start/target dates based on component complexity",
|
|
1750
|
-
"12. NOTES: Include development context, blockers, or important updates",
|
|
1751
|
-
"13. HIERARCHY: Update parent progress when child components are completed",
|
|
1752
|
-
"14. MILESTONES: Track major development phases and releases",
|
|
1753
|
-
"",
|
|
1754
|
-
"EXAMPLE STRUCTURE (FTL Transfer Pitch):",
|
|
1755
|
-
"- Page: TransferPitchPage",
|
|
1756
|
-
" - Composite: PitchLayout",
|
|
1757
|
-
" - Atomic: PlayerCard (for starters)",
|
|
1758
|
-
" - Atomic: FormationGrid",
|
|
1759
|
-
" - Composite: BenchSection",
|
|
1760
|
-
" - Atomic: PlayerCard (for substitutes)",
|
|
1761
|
-
" - Atomic: SubstitutionControls",
|
|
1762
|
-
" - Composite: TransferControls",
|
|
1763
|
-
" - Atomic: TransferButton",
|
|
1764
|
-
" - Atomic: BudgetDisplay",
|
|
1765
|
-
"",
|
|
1766
|
-
"JSON RULES:",
|
|
1570
|
+
"Rules:",
|
|
1767
1571
|
"- No code fences, no comments, no trailing commas.",
|
|
1768
1572
|
"- Use only the fields above.",
|
|
1769
1573
|
"- Ensure arrays/objects have no extra commas.",
|
|
1770
|
-
"- Provide up to 3 'coreCandidates' that best represent the design anchor.",
|
|
1574
|
+
"- Provide up to 3 'coreCandidates' that best represent the design anchor (canvas/layout), with a short reason.",
|
|
1771
1575
|
].join("\n");
|
|
1772
1576
|
try {
|
|
1773
1577
|
// Check if user has local AI keys configured
|
|
@@ -1886,214 +1690,38 @@ Make the CSS immediately usable - no placeholders, actual working values!`;
|
|
|
1886
1690
|
}
|
|
1887
1691
|
}
|
|
1888
1692
|
buildFallbackComponentList(projectContext) {
|
|
1889
|
-
//
|
|
1693
|
+
// Neutral skeleton: no assumptions. Valid shape with guidance.
|
|
1890
1694
|
return {
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
},
|
|
1908
|
-
composites: [
|
|
1909
|
-
{
|
|
1910
|
-
name: "HeroSection",
|
|
1911
|
-
description: "Main hero section with call-to-action",
|
|
1912
|
-
type: "composite",
|
|
1913
|
-
priority: "high",
|
|
1914
|
-
development: {
|
|
1915
|
-
status: "planned",
|
|
1916
|
-
progress: 0,
|
|
1917
|
-
assignedTo: "unassigned",
|
|
1918
|
-
startDate: new Date().toISOString().split("T")[0],
|
|
1919
|
-
targetDate: new Date(Date.now() + 3 * 24 * 60 * 60 * 1000)
|
|
1920
|
-
.toISOString()
|
|
1921
|
-
.split("T")[0],
|
|
1922
|
-
lastUpdated: new Date().toISOString(),
|
|
1923
|
-
notes: "Hero section component planning",
|
|
1924
|
-
},
|
|
1925
|
-
atomics: [
|
|
1926
|
-
{
|
|
1927
|
-
name: "HeroTitle",
|
|
1928
|
-
description: "Main page title",
|
|
1929
|
-
type: "atomic",
|
|
1930
|
-
priority: "high",
|
|
1931
|
-
dependencies: ["@/components/ui/typography"],
|
|
1932
|
-
tags: ["title", "hero"],
|
|
1933
|
-
acceptanceCriteria: [
|
|
1934
|
-
"Displays main title",
|
|
1935
|
-
"Responsive text",
|
|
1936
|
-
],
|
|
1937
|
-
context: "Main hero section title",
|
|
1938
|
-
development: {
|
|
1939
|
-
status: "planned",
|
|
1940
|
-
progress: 0,
|
|
1941
|
-
assignedTo: "unassigned",
|
|
1942
|
-
startDate: new Date().toISOString().split("T")[0],
|
|
1943
|
-
targetDate: new Date(Date.now() + 1 * 24 * 60 * 60 * 1000)
|
|
1944
|
-
.toISOString()
|
|
1945
|
-
.split("T")[0],
|
|
1946
|
-
lastUpdated: new Date().toISOString(),
|
|
1947
|
-
notes: "Title component implementation",
|
|
1948
|
-
},
|
|
1949
|
-
},
|
|
1950
|
-
{
|
|
1951
|
-
name: "HeroButton",
|
|
1952
|
-
description: "Primary call-to-action button",
|
|
1953
|
-
type: "atomic",
|
|
1954
|
-
priority: "high",
|
|
1955
|
-
dependencies: ["@/components/ui/button"],
|
|
1956
|
-
tags: ["button", "cta"],
|
|
1957
|
-
acceptanceCriteria: ["Clickable", "Accessible"],
|
|
1958
|
-
context: "Hero section call-to-action",
|
|
1959
|
-
development: {
|
|
1960
|
-
status: "planned",
|
|
1961
|
-
progress: 0,
|
|
1962
|
-
assignedTo: "unassigned",
|
|
1963
|
-
startDate: new Date().toISOString().split("T")[0],
|
|
1964
|
-
targetDate: new Date(Date.now() + 1 * 24 * 60 * 60 * 1000)
|
|
1965
|
-
.toISOString()
|
|
1966
|
-
.split("T")[0],
|
|
1967
|
-
lastUpdated: new Date().toISOString(),
|
|
1968
|
-
notes: "CTA button component implementation",
|
|
1969
|
-
},
|
|
1970
|
-
},
|
|
1971
|
-
],
|
|
1972
|
-
},
|
|
1973
|
-
],
|
|
1974
|
-
},
|
|
1975
|
-
],
|
|
1976
|
-
standaloneComposites: [
|
|
1977
|
-
{
|
|
1978
|
-
name: "NavigationBar",
|
|
1979
|
-
description: "Main navigation component",
|
|
1980
|
-
type: "composite",
|
|
1695
|
+
project: {
|
|
1696
|
+
name: (projectContext?.description || "mycontext-project").slice(0, 40),
|
|
1697
|
+
description: projectContext?.description || "Generated project",
|
|
1698
|
+
},
|
|
1699
|
+
metadata: {
|
|
1700
|
+
version: "1.0.0",
|
|
1701
|
+
generatedAt: new Date().toISOString(),
|
|
1702
|
+
ai: false,
|
|
1703
|
+
provider: "none",
|
|
1704
|
+
},
|
|
1705
|
+
groups: [],
|
|
1706
|
+
guidance: {
|
|
1707
|
+
note: "AI generation timed out. Start by adding groups with components (name, description, type, priority, userStories, actionFunctions, dependencies, tags).",
|
|
1708
|
+
exampleGroup: {
|
|
1709
|
+
name: "Auth",
|
|
1710
|
+
description: "Authentication components",
|
|
1981
1711
|
priority: "high",
|
|
1982
|
-
|
|
1983
|
-
status: "planned",
|
|
1984
|
-
progress: 0,
|
|
1985
|
-
assignedTo: "unassigned",
|
|
1986
|
-
startDate: new Date().toISOString().split("T")[0],
|
|
1987
|
-
targetDate: new Date(Date.now() + 2 * 24 * 60 * 60 * 1000)
|
|
1988
|
-
.toISOString()
|
|
1989
|
-
.split("T")[0],
|
|
1990
|
-
lastUpdated: new Date().toISOString(),
|
|
1991
|
-
notes: "Navigation component planning",
|
|
1992
|
-
},
|
|
1993
|
-
atomics: [
|
|
1712
|
+
components: [
|
|
1994
1713
|
{
|
|
1995
|
-
name: "
|
|
1996
|
-
description: "
|
|
1997
|
-
type: "
|
|
1714
|
+
name: "LoginForm",
|
|
1715
|
+
description: "Email/password form",
|
|
1716
|
+
type: "form",
|
|
1998
1717
|
priority: "high",
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
development: {
|
|
2004
|
-
status: "planned",
|
|
2005
|
-
progress: 0,
|
|
2006
|
-
assignedTo: "unassigned",
|
|
2007
|
-
startDate: new Date().toISOString().split("T")[0],
|
|
2008
|
-
targetDate: new Date(Date.now() + 1 * 24 * 60 * 60 * 1000)
|
|
2009
|
-
.toISOString()
|
|
2010
|
-
.split("T")[0],
|
|
2011
|
-
lastUpdated: new Date().toISOString(),
|
|
2012
|
-
notes: "Navigation link component implementation",
|
|
2013
|
-
},
|
|
2014
|
-
},
|
|
2015
|
-
],
|
|
2016
|
-
},
|
|
2017
|
-
],
|
|
2018
|
-
standaloneAtomics: [
|
|
2019
|
-
{
|
|
2020
|
-
name: "LoadingSpinner",
|
|
2021
|
-
description: "Reusable loading indicator",
|
|
2022
|
-
type: "atomic",
|
|
2023
|
-
priority: "low",
|
|
2024
|
-
dependencies: ["@/components/ui/spinner"],
|
|
2025
|
-
tags: ["utility", "loading"],
|
|
2026
|
-
acceptanceCriteria: ["Animated", "Accessible"],
|
|
2027
|
-
context: "General loading states",
|
|
2028
|
-
development: {
|
|
2029
|
-
status: "planned",
|
|
2030
|
-
progress: 0,
|
|
2031
|
-
assignedTo: "unassigned",
|
|
2032
|
-
startDate: new Date().toISOString().split("T")[0],
|
|
2033
|
-
targetDate: new Date(Date.now() + 1 * 24 * 60 * 60 * 1000)
|
|
2034
|
-
.toISOString()
|
|
2035
|
-
.split("T")[0],
|
|
2036
|
-
lastUpdated: new Date().toISOString(),
|
|
2037
|
-
notes: "Loading spinner utility component",
|
|
2038
|
-
},
|
|
2039
|
-
},
|
|
2040
|
-
],
|
|
2041
|
-
metadata: {
|
|
2042
|
-
coreCandidates: [
|
|
2043
|
-
{ name: "HomePage", type: "page", reason: "Main entry point" },
|
|
2044
|
-
{
|
|
2045
|
-
name: "HeroSection",
|
|
2046
|
-
type: "composite",
|
|
2047
|
-
reason: "Primary content area",
|
|
2048
|
-
},
|
|
2049
|
-
{
|
|
2050
|
-
name: "HeroButton",
|
|
2051
|
-
type: "atomic",
|
|
2052
|
-
reason: "Key interaction element",
|
|
2053
|
-
},
|
|
2054
|
-
],
|
|
2055
|
-
hierarchy: {
|
|
2056
|
-
atomicCount: 4,
|
|
2057
|
-
compositeCount: 2,
|
|
2058
|
-
pageCount: 1,
|
|
2059
|
-
maxDepth: 3,
|
|
2060
|
-
},
|
|
2061
|
-
development: {
|
|
2062
|
-
projectStatus: "planning",
|
|
2063
|
-
overallProgress: 0,
|
|
2064
|
-
teamMembers: ["unassigned"],
|
|
2065
|
-
projectStartDate: new Date().toISOString().split("T")[0],
|
|
2066
|
-
projectTargetDate: new Date(Date.now() + 14 * 24 * 60 * 60 * 1000)
|
|
2067
|
-
.toISOString()
|
|
2068
|
-
.split("T")[0],
|
|
2069
|
-
lastUpdated: new Date().toISOString(),
|
|
2070
|
-
milestones: [
|
|
2071
|
-
{
|
|
2072
|
-
name: "Planning Phase",
|
|
2073
|
-
status: "in-progress",
|
|
2074
|
-
date: new Date().toISOString().split("T")[0],
|
|
2075
|
-
},
|
|
2076
|
-
{
|
|
2077
|
-
name: "Development Phase",
|
|
2078
|
-
status: "planned",
|
|
2079
|
-
date: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000)
|
|
2080
|
-
.toISOString()
|
|
2081
|
-
.split("T")[0],
|
|
2082
|
-
},
|
|
2083
|
-
{
|
|
2084
|
-
name: "Testing Phase",
|
|
2085
|
-
status: "planned",
|
|
2086
|
-
date: new Date(Date.now() + 12 * 24 * 60 * 60 * 1000)
|
|
2087
|
-
.toISOString()
|
|
2088
|
-
.split("T")[0],
|
|
1718
|
+
userStories: ["As a user, I can log in"],
|
|
1719
|
+
actionFunctions: ["onSubmit"],
|
|
1720
|
+
dependencies: ["react"],
|
|
1721
|
+
tags: ["auth", "form"],
|
|
2089
1722
|
},
|
|
2090
1723
|
],
|
|
2091
1724
|
},
|
|
2092
|
-
availableShadcnComponents: this.getComprehensiveShadcnList(),
|
|
2093
|
-
version: "1.0.0",
|
|
2094
|
-
generatedAt: new Date().toISOString(),
|
|
2095
|
-
ai: false,
|
|
2096
|
-
provider: "fallback",
|
|
2097
1725
|
},
|
|
2098
1726
|
};
|
|
2099
1727
|
}
|
|
@@ -3205,29 +2833,6 @@ export function Typography({ variant, children, className }: TypographyProps) {
|
|
|
3205
2833
|
// 4) Fallback: wrap into minimal valid envelope
|
|
3206
2834
|
return JSON.stringify({ error: "Invalid JSON from AI", raw }, null, 2);
|
|
3207
2835
|
}
|
|
3208
|
-
async scanMyContextFiles() {
|
|
3209
|
-
const myContextDir = ".mycontext";
|
|
3210
|
-
const files = [];
|
|
3211
|
-
try {
|
|
3212
|
-
if (await fs.pathExists(myContextDir)) {
|
|
3213
|
-
const items = await fs.readdir(myContextDir);
|
|
3214
|
-
for (const item of items) {
|
|
3215
|
-
const fullPath = path_1.default.join(myContextDir, item);
|
|
3216
|
-
const stat = await fs.stat(fullPath);
|
|
3217
|
-
if (stat.isFile() &&
|
|
3218
|
-
(item.endsWith(".md") ||
|
|
3219
|
-
item.endsWith(".txt") ||
|
|
3220
|
-
item.endsWith(".json"))) {
|
|
3221
|
-
files.push(fullPath);
|
|
3222
|
-
}
|
|
3223
|
-
}
|
|
3224
|
-
}
|
|
3225
|
-
}
|
|
3226
|
-
catch (error) {
|
|
3227
|
-
// Ignore errors, return empty array
|
|
3228
|
-
}
|
|
3229
|
-
return files;
|
|
3230
|
-
}
|
|
3231
2836
|
async readContextArtifacts() {
|
|
3232
2837
|
try {
|
|
3233
2838
|
const cwd = process.cwd();
|
|
@@ -3360,56 +2965,6 @@ export function Typography({ variant, children, className }: TypographyProps) {
|
|
|
3360
2965
|
"Typography",
|
|
3361
2966
|
];
|
|
3362
2967
|
}
|
|
3363
|
-
getComprehensiveShadcnList() {
|
|
3364
|
-
return [
|
|
3365
|
-
"accordion",
|
|
3366
|
-
"alert",
|
|
3367
|
-
"alert-dialog",
|
|
3368
|
-
"aspect-ratio",
|
|
3369
|
-
"avatar",
|
|
3370
|
-
"badge",
|
|
3371
|
-
"breadcrumb",
|
|
3372
|
-
"button",
|
|
3373
|
-
"calendar",
|
|
3374
|
-
"card",
|
|
3375
|
-
"carousel",
|
|
3376
|
-
"chart",
|
|
3377
|
-
"checkbox",
|
|
3378
|
-
"collapsible",
|
|
3379
|
-
"command",
|
|
3380
|
-
"context-menu",
|
|
3381
|
-
"dialog",
|
|
3382
|
-
"drawer",
|
|
3383
|
-
"dropdown-menu",
|
|
3384
|
-
"form",
|
|
3385
|
-
"hover-card",
|
|
3386
|
-
"input",
|
|
3387
|
-
"input-otp",
|
|
3388
|
-
"label",
|
|
3389
|
-
"menubar",
|
|
3390
|
-
"navigation-menu",
|
|
3391
|
-
"pagination",
|
|
3392
|
-
"popover",
|
|
3393
|
-
"progress",
|
|
3394
|
-
"radio-group",
|
|
3395
|
-
"resizable",
|
|
3396
|
-
"scroll-area",
|
|
3397
|
-
"select",
|
|
3398
|
-
"separator",
|
|
3399
|
-
"sheet",
|
|
3400
|
-
"sidebar",
|
|
3401
|
-
"skeleton",
|
|
3402
|
-
"slider",
|
|
3403
|
-
"sonner",
|
|
3404
|
-
"switch",
|
|
3405
|
-
"table",
|
|
3406
|
-
"tabs",
|
|
3407
|
-
"textarea",
|
|
3408
|
-
"toggle",
|
|
3409
|
-
"toggle-group",
|
|
3410
|
-
"tooltip",
|
|
3411
|
-
];
|
|
3412
|
-
}
|
|
3413
2968
|
repairJson(raw) {
|
|
3414
2969
|
// Remove any fenced code blocks markers
|
|
3415
2970
|
let s = raw.replace(/```json\n?|```/gi, "");
|