-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy path.ralph-session.json
More file actions
67 lines (67 loc) · 5.18 KB
/
.ralph-session.json
File metadata and controls
67 lines (67 loc) · 5.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{
"id": "ralph-ml9vloog-5nog7j",
"createdAt": "2026-02-05T19:55:14.605Z",
"updatedAt": "2026-02-05T20:00:15.399Z",
"status": "completed",
"iteration": 1,
"maxIterations": 8,
"task": "Build the following project based on this specification:\n\n# Issue #81: feat: Figma content extraction mode - apply to existing templates\n\n**Repository:** multivmlabs/ralph-ideas\n**State:** OPEN\n**Labels:** enhancement, P2, auto-ready\n\n---\n\n## Summary\nExtract text content and information architecture from Figma designs and apply directly to existing project templates/components.\n\n## Use Case\nUser has an existing project with a design system. They want to:\n1. Extract content (text, labels, copy) from Figma mockups\n2. Extract IA (page structure, navigation hierarchy)\n3. Apply that content to their existing React/Vue/etc components\n\n## Usage\n```bash\n# Extract content from Figma and apply to existing project\nralph-starter run --from figma:<file-url> --figma-mode content\n\n# Specify which components to update\nralph-starter run --from figma:<file-url> --figma-mode content --figma-target \"src/pages\"\n```\n\n## Implementation\n\n### Task 1: Content Extraction\n- [ ] Extract all text layers from Figma file\n- [ ] Organize by frame/page hierarchy\n- [ ] Identify semantic roles (heading, body, button, label, etc.)\n- [ ] Map to content structure\n\n### Task 2: IA Extraction\n- [ ] Detect page/screen structure\n- [ ] Extract navigation patterns\n- [ ] Identify component hierarchy\n- [ ] Build content map\n\n### Task 3: Template Matching\n- [ ] Scan existing project for components\n- [ ] Match Figma frames to project components\n- [ ] Identify text slots in templates\n- [ ] Map Figma content to component props\n\n### Task 4: Content Application\n- [ ] Update component props with extracted text\n- [ ] Preserve existing styling/structure\n- [ ] Handle dynamic content (arrays, conditionals)\n- [ ] Generate content diff for review\n\n### Task 5: CLI Options\n- [ ] Add `--figma-mode content` option\n- [ ] Add `--figma-target <path>` for target directory\n- [ ] Add `--figma-preview` to show changes without applying\n- [ ] Add `--figma-mapping <file>` for custom content mapping\n\n### Task 6: Documentation\n- [ ] Add content mode section to README.md\n- [ ] Create `docs/figma-content-mode.md` for Docusaurus\n- [ ] Document content mapping patterns\n- [ ] Add examples for common frameworks\n\n## Content Structure Example\n```json\n{\n \"pages\": {\n \"home\": {\n \"hero\": {\n \"heading\": \"Welcome to Our App\",\n \"subheading\": \"The best solution for...\",\n \"cta\": \"Get Started\"\n },\n \"features\": [\n { \"title\": \"Feature 1\", \"description\": \"...\" },\n { \"title\": \"Feature 2\", \"description\": \"...\" }\n ]\n }\n },\n \"navigation\": {\n \"primary\": [\"Home\", \"Features\", \"Pricing\", \"Contact\"],\n \"footer\": [\"Privacy\", \"Terms\", \"Support\"]\n }\n}\n```\n\n## Files to Create/Modify\n- `src/integrations/figma/content-extractor.ts` (new)\n- `src/integrations/figma/template-matcher.ts` (new)\n- `src/integrations/figma/content-applier.ts` (new)\n- `src/integrations/figma/index.ts` (add content mode)\n- `src/cli.ts` (add --figma-target option)\n- `README.md` (add content mode docs)\n- `docs/figma-content-mode.md` (new - Docusaurus)\n\n## Considerations\n- Handle component libraries (Chakra, MUI, etc.)\n- Support multiple frameworks (React, Vue, Svelte)\n- Preserve JSX structure when updating\n- Handle edge cases (images with alt text, aria-labels)\n\n## Implementation Tracking\n\nAn IMPLEMENTATION_PLAN.md file has been created with tasks extracted from this spec.\nAs you complete each task, mark it done by changing [ ] to [x] in IMPLEMENTATION_PLAN.md.\nFocus on one task at a time.",
"cwd": "/Users/ruben/learn/ralph-starter",
"agent": {
"name": "Claude Code",
"command": "claude"
},
"options": {
"auto": true,
"prTitle": "Ralph: Build the following project based on this specific",
"trackProgress": true,
"checkFileCompletion": true,
"trackCost": true,
"model": "claude-3-sonnet"
},
"commits": [],
"stats": {
"totalDuration": 300788,
"validationFailures": 0,
"costStats": {
"totalIterations": 1,
"totalTokens": {
"inputTokens": 995,
"outputTokens": 249757,
"totalTokens": 250752
},
"totalCost": {
"inputCost": 0.002985,
"outputCost": 3.7463550000000003,
"totalCost": 3.74934
},
"avgTokensPerIteration": {
"inputTokens": 995,
"outputTokens": 249757,
"totalTokens": 250752
},
"avgCostPerIteration": {
"inputCost": 0.002985,
"outputCost": 3.7463550000000003,
"totalCost": 3.74934
},
"iterations": [
{
"iteration": 1,
"tokens": {
"inputTokens": 995,
"outputTokens": 249757,
"totalTokens": 250752
},
"cost": {
"inputCost": 0.002985,
"outputCost": 3.7463550000000003,
"totalCost": 3.74934
},
"timestamp": "2026-02-05T20:00:14.617Z"
}
]
}
},
"exitReason": "completed"
}