mycontext-cli 1.0.24 ā 1.0.25
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/cli.js +3 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/generate-components.d.ts +1 -0
- package/dist/commands/generate-components.d.ts.map +1 -1
- package/dist/commands/generate-components.js +105 -2
- package/dist/commands/generate-components.js.map +1 -1
- package/dist/commands/generate.d.ts +2 -0
- package/dist/commands/generate.d.ts.map +1 -1
- package/dist/commands/generate.js +493 -48
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/init.d.ts +2 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +102 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/track.d.ts +29 -0
- package/dist/commands/track.d.ts.map +1 -0
- package/dist/commands/track.js +333 -0
- package/dist/commands/track.js.map +1 -0
- package/dist/utils/fileSystem.d.ts.map +1 -1
- package/dist/utils/fileSystem.js +24 -0
- package/dist/utils/fileSystem.js.map +1 -1
- package/package.json +1 -1
|
@@ -412,6 +412,46 @@ 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
|
+
}
|
|
415
455
|
// Get active playbook for additional context
|
|
416
456
|
const activePlaybook = await this.getActivePlaybook();
|
|
417
457
|
const prompt = [
|
|
@@ -1533,45 +1573,201 @@ Make the CSS immediately usable - no placeholders, actual working values!`;
|
|
|
1533
1573
|
ctx.brand.split("\n").slice(0, 40).join("\n"),
|
|
1534
1574
|
"",
|
|
1535
1575
|
"Available shadcn/ui primitives (import from '@/components/ui/<component>'):",
|
|
1536
|
-
|
|
1537
|
-
.slice(0, 60)
|
|
1538
|
-
.join(", "),
|
|
1576
|
+
this.getComprehensiveShadcnList().join(", "),
|
|
1539
1577
|
"",
|
|
1540
|
-
"Return strictly valid JSON ONLY with this
|
|
1578
|
+
"Return strictly valid JSON ONLY with this ATOMIC ā COMPOSITE ā PAGE hierarchical structure:",
|
|
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:",
|
|
1541
1584
|
"{",
|
|
1542
|
-
' "
|
|
1585
|
+
' "pages": [',
|
|
1543
1586
|
" {",
|
|
1544
|
-
' "name":
|
|
1545
|
-
' "description":
|
|
1546
|
-
' "
|
|
1587
|
+
' "name": "PageName" (PascalCase),',
|
|
1588
|
+
' "description": "Main page description",',
|
|
1589
|
+
' "type": "page",',
|
|
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": [',
|
|
1547
1601
|
" {",
|
|
1548
|
-
' "name":
|
|
1549
|
-
' "description":
|
|
1550
|
-
' "type": "
|
|
1551
|
-
' "priority": "high"
|
|
1552
|
-
' "
|
|
1553
|
-
'
|
|
1554
|
-
'
|
|
1555
|
-
'
|
|
1602
|
+
' "name": "CompositeName" (PascalCase),',
|
|
1603
|
+
' "description": "Larger structural component",',
|
|
1604
|
+
' "type": "composite",',
|
|
1605
|
+
' "priority": "high",',
|
|
1606
|
+
' "development": {',
|
|
1607
|
+
' "status": "planned|in-progress|completed|testing|deployed",',
|
|
1608
|
+
' "progress": 0-100,',
|
|
1609
|
+
' "assignedTo": "developer-name",',
|
|
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
|
+
" ]",
|
|
1556
1636
|
" }",
|
|
1557
1637
|
" ]",
|
|
1558
1638
|
" }",
|
|
1559
|
-
" ]",
|
|
1560
|
-
|
|
1639
|
+
" ],",
|
|
1640
|
+
' "standaloneComposites": [',
|
|
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
|
+
" ],",
|
|
1561
1699
|
' "metadata": {',
|
|
1562
1700
|
' "coreCandidates": [',
|
|
1563
|
-
' { "name": string, "
|
|
1564
|
-
' { "name": string, "
|
|
1565
|
-
' { "name": string, "
|
|
1701
|
+
' { "name": string, "type": "page|composite|atomic", "reason": string },',
|
|
1702
|
+
' { "name": string, "type": "page|composite|atomic", "reason": string },',
|
|
1703
|
+
' { "name": string, "type": "page|composite|atomic", "reason": 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"',
|
|
1566
1732
|
" ]",
|
|
1567
1733
|
" }",
|
|
1568
1734
|
"}",
|
|
1569
1735
|
"",
|
|
1570
|
-
"
|
|
1736
|
+
"ATOMIC ā COMPOSITE ā PAGE RULES:",
|
|
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:",
|
|
1571
1767
|
"- No code fences, no comments, no trailing commas.",
|
|
1572
1768
|
"- Use only the fields above.",
|
|
1573
1769
|
"- Ensure arrays/objects have no extra commas.",
|
|
1574
|
-
"- Provide up to 3 'coreCandidates' that best represent the design anchor
|
|
1770
|
+
"- Provide up to 3 'coreCandidates' that best represent the design anchor.",
|
|
1575
1771
|
].join("\n");
|
|
1576
1772
|
try {
|
|
1577
1773
|
// Check if user has local AI keys configured
|
|
@@ -1690,38 +1886,214 @@ Make the CSS immediately usable - no placeholders, actual working values!`;
|
|
|
1690
1886
|
}
|
|
1691
1887
|
}
|
|
1692
1888
|
buildFallbackComponentList(projectContext) {
|
|
1693
|
-
//
|
|
1889
|
+
// Atomic ā Composite ā Page hierarchical structure
|
|
1694
1890
|
return {
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
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",
|
|
1891
|
+
pages: [
|
|
1892
|
+
{
|
|
1893
|
+
name: "HomePage",
|
|
1894
|
+
description: "Main landing page",
|
|
1895
|
+
type: "page",
|
|
1711
1896
|
priority: "high",
|
|
1712
|
-
|
|
1897
|
+
development: {
|
|
1898
|
+
status: "planned",
|
|
1899
|
+
progress: 0,
|
|
1900
|
+
assignedTo: "unassigned",
|
|
1901
|
+
startDate: new Date().toISOString().split("T")[0],
|
|
1902
|
+
targetDate: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000)
|
|
1903
|
+
.toISOString()
|
|
1904
|
+
.split("T")[0],
|
|
1905
|
+
lastUpdated: new Date().toISOString(),
|
|
1906
|
+
notes: "Initial page setup and planning",
|
|
1907
|
+
},
|
|
1908
|
+
composites: [
|
|
1713
1909
|
{
|
|
1714
|
-
name: "
|
|
1715
|
-
description: "
|
|
1716
|
-
type: "
|
|
1910
|
+
name: "HeroSection",
|
|
1911
|
+
description: "Main hero section with call-to-action",
|
|
1912
|
+
type: "composite",
|
|
1717
1913
|
priority: "high",
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
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
|
+
],
|
|
1722
1972
|
},
|
|
1723
1973
|
],
|
|
1724
1974
|
},
|
|
1975
|
+
],
|
|
1976
|
+
standaloneComposites: [
|
|
1977
|
+
{
|
|
1978
|
+
name: "NavigationBar",
|
|
1979
|
+
description: "Main navigation component",
|
|
1980
|
+
type: "composite",
|
|
1981
|
+
priority: "high",
|
|
1982
|
+
development: {
|
|
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: [
|
|
1994
|
+
{
|
|
1995
|
+
name: "NavLink",
|
|
1996
|
+
description: "Navigation link component",
|
|
1997
|
+
type: "atomic",
|
|
1998
|
+
priority: "high",
|
|
1999
|
+
dependencies: ["@/components/ui/link"],
|
|
2000
|
+
tags: ["navigation", "link"],
|
|
2001
|
+
acceptanceCriteria: ["Clickable", "Active state"],
|
|
2002
|
+
context: "Navigation bar links",
|
|
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],
|
|
2089
|
+
},
|
|
2090
|
+
],
|
|
2091
|
+
},
|
|
2092
|
+
availableShadcnComponents: this.getComprehensiveShadcnList(),
|
|
2093
|
+
version: "1.0.0",
|
|
2094
|
+
generatedAt: new Date().toISOString(),
|
|
2095
|
+
ai: false,
|
|
2096
|
+
provider: "fallback",
|
|
1725
2097
|
},
|
|
1726
2098
|
};
|
|
1727
2099
|
}
|
|
@@ -2833,6 +3205,29 @@ export function Typography({ variant, children, className }: TypographyProps) {
|
|
|
2833
3205
|
// 4) Fallback: wrap into minimal valid envelope
|
|
2834
3206
|
return JSON.stringify({ error: "Invalid JSON from AI", raw }, null, 2);
|
|
2835
3207
|
}
|
|
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
|
+
}
|
|
2836
3231
|
async readContextArtifacts() {
|
|
2837
3232
|
try {
|
|
2838
3233
|
const cwd = process.cwd();
|
|
@@ -2965,6 +3360,56 @@ export function Typography({ variant, children, className }: TypographyProps) {
|
|
|
2965
3360
|
"Typography",
|
|
2966
3361
|
];
|
|
2967
3362
|
}
|
|
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
|
+
}
|
|
2968
3413
|
repairJson(raw) {
|
|
2969
3414
|
// Remove any fenced code blocks markers
|
|
2970
3415
|
let s = raw.replace(/```json\n?|```/gi, "");
|