Project Reconstruction From Screenshots
Overview
This skill handles the situation where a user shows a screenshot of a project/task structure (often from a mobile WorkBuddy session) and asks to pull the files to the current workspace. If the original files cannot be located on the computer, this skill guides the reconstruction of the project based on the visible structure and known project context.
When to Use
- User asks to "pull files to current workspace" from a mobile WorkBuddy screenshot.
- The screenshot shows a file tree or directory structure.
- The files are claimed to be "synced" but cannot be found in local directories, session snapshots, or artifact indexes.
- User explicitly says: "if you can't fetch them, recreate according to the requirements."
- The task is complex enough to require a full project skeleton (backend, frontend, data, config, etc.).
Workflow
-
Read the screenshot(s).
- Extract the file/directory structure and any visible business requirements.
- Note the claimed sync path (e.g.,/workspace/...), file count, and key features. -
Search local storage for the claimed files.
- Check current workspace.
- Check WorkBuddy session snapshots (~/.workbuddy/workspace/sessions).
- Check artifact indexes (~/.workbuddy/artifact-index).
- Check Downloads, Temp, and WeChat/clipboard directories if relevant.
- Report search results to the user. -
Decide: fetch or recreate?
- If files are found, copy them into the current workspace.
- If not found, ask for confirmation (or proceed if the user already said to recreate).
- Try to extract as much detail as possible from the screenshot(s), including requirements, visible configuration, and project context. -
Reconstruct the project.
- Create the exact directory structure shown.
- Implement each module according to its label/comment in the screenshot (e.g.,app.py # FastAPI 后端,notify.py # 企微/钉钉推送).
- Add reasonable default data files and sample content.
- Create aREADME.mdand a startup script (e.g.,start.sh) matching the screenshot instructions.
- Addrequirements.txtif needed for Python projects. -
Validate.
- Run syntax checks on code files.
- Install dependencies and start the service briefly to test core endpoints.
- Fix any obvious runtime errors. -
Document and report.
- Update the workspace memory note.
- Summarize what was found, what was reconstructed, and what assumptions were made.
- Ask the user to review and provide missing details or corrections.
Implementation Notes
- Use absolute paths when operating outside the current workspace, but make internal cross-references (imports, static links) relative.
- For Python backends, prefer FastAPI + Pydantic, and use JSON/Markdown files for local data storage when the screenshot shows a simple file-based knowledge base.
- For frontend pages, use plain HTML/CSS/JS unless the screenshot suggests a framework.
- If the screenshot is too low-resolution to read requirements, state that clearly and reconstruct based on the visible structure and known project context.
Common Pitfalls
- Do not assume the AI's "synced" message means the files physically exist on disk. Always verify.
- Low-resolution long screenshots may not be OCR-able. Rely on structure and context rather than guessing hidden requirements.
- Keep the reconstructed project runnable; avoid dependencies that are hard to install in a sandboxed environment.