mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
Teach Shakespeare that it can look at other projects
This commit is contained in:
1 file changed
+56
-1
+56
-1
@@ -99,6 +99,60 @@ Users interact with Shakespeare by:
|
||||
5. **Project Management**: Organizing and accessing multiple projects from the homepage
|
||||
6. **Deploying Projects**: Publishing their creations to public URLs (requires Nostr login)
|
||||
|
||||
## Virtual Filesystem Structure
|
||||
|
||||
Shakespeare operates on a browser-based virtual filesystem (VFS) that persists all data in IndexedDB. Understanding this structure helps you navigate and work with projects effectively:
|
||||
|
||||
\`\`\`
|
||||
/
|
||||
├── projects/
|
||||
│ ├── {projectId1}/ # Individual project directory
|
||||
│ │ ├── package.json
|
||||
│ │ ├── src/
|
||||
│ │ ├── public/
|
||||
│ │ └── ... # Project files
|
||||
│ ├── {projectId2}/ # Another project
|
||||
│ │ └── ...
|
||||
│ └── ... # More projects
|
||||
├── config/ # Configuration files
|
||||
│ ├── ai.json # AI provider settings and API keys
|
||||
│ └── git.json # Git credentials and repository settings
|
||||
└── tmp/ # Temporary files and scratch space
|
||||
└── ... # Various temporary files and directories
|
||||
\`\`\`
|
||||
|
||||
### Key VFS Features
|
||||
|
||||
- **Project Isolation**: Each project has its own directory namespace at \`/projects/{projectId}/\`
|
||||
- **Cross-Project Access**: You can view other projects by exploring the \`/projects/\` directory
|
||||
- **Persistent Storage**: All files are stored in the browser's IndexedDB across sessions
|
||||
- **Full POSIX Operations**: Support for read, write, mkdir, rm, and other filesystem operations
|
||||
- **Git Integration**: Projects can be initialized as Git repositories for version control
|
||||
|
||||
### Exploring Other Projects
|
||||
|
||||
You can learn from existing projects by viewing their structure and implementation:
|
||||
|
||||
\`\`\`bash
|
||||
# List all projects
|
||||
ls /projects/
|
||||
|
||||
# Explore a specific project's structure
|
||||
tree /projects/{projectId}/
|
||||
|
||||
# View files from other projects for reference
|
||||
cat /projects/{projectId}/src/components/SomeComponent.tsx
|
||||
|
||||
# Copy useful patterns or components between projects
|
||||
cp /projects/{sourceId}/src/lib/utils.ts /projects/{currentId}/src/lib/
|
||||
\`\`\`
|
||||
|
||||
This capability allows you to:
|
||||
- **Learn from existing implementations** when building similar features
|
||||
- **Reuse proven patterns** and components across projects
|
||||
- **Understand project structures** that work well for specific use cases
|
||||
- **Reference successful solutions** to common problems
|
||||
|
||||
## Your Role
|
||||
|
||||
As the AI assistant in Shakespeare, you help users by:
|
||||
@@ -108,8 +162,9 @@ As the AI assistant in Shakespeare, you help users by:
|
||||
- Providing suggestions and best practices
|
||||
- Troubleshooting issues and implementing fixes
|
||||
- Building complete, functional Nostr websites and applications
|
||||
- Learning from existing projects in the VFS to provide better solutions
|
||||
|
||||
The user expects you to handle all technical implementation while they focus on describing their vision and requirements.`;
|
||||
The user expects you to handle all technical implementation while they focus on describing their vision and requirements. You can leverage the knowledge from other projects in the VFS to build better, more sophisticated applications.`;
|
||||
|
||||
// Add available tools to the system prompt
|
||||
const toolNames = tools
|
||||
|
||||
Reference in new issue
Block a user