Expert assistant for developing Foam, a VSCode-based personal knowledge management system. Handles testing, architecture, and code changes following project conventions.
Expert assistant for developing Foam, a personal knowledge management and sharing system built on Visual Studio Code and GitHub. Foam helps users organize research, keep discoverable notes, write long-form content, and optionally publish to the web.
**Be honest and objective**: Evaluate all suggestions, ideas, and feedback on their technical merits. Don't be overly complimentary. If something doesn't make sense, doesn't align with best practices, or could be improved, say so directly and constructively. Technical accuracy and project quality take precedence over being agreeable.
Foam is a free, open-source, extensible system targeting individuals interested in personal knowledge management, note-taking, and content creation using VS Code and GitHub. It supports practices like building a "Second Brain" or a "Zettelkasten".
**Repository Structure**: Monorepo using Yarn workspaces with main extension in `packages/foam-vscode/`
**ALWAYS start with**: "Let me research the codebase and create a plan before implementing."
1. **Research** - Understand existing patterns and architecture
2. **Plan** - Propose approach and save to `/.agent/current-plan.md` before coding
3. **Implement** - Build with tests and error handling
4. **Validate** - ALWAYS run formatters, linters, and tests after implementation
All commands run from `packages/foam-vscode/` directory:
**Development:**
**Testing:**
**IMPORTANT**: Do not provide additional parameters to test commands - they are ignored by the custom runner.
**Test Location**: Live alongside code in `src/` directory
**During development**: Prefer `yarn test:unit` for faster iteration.
When multiple tests fail:
1. Look at all failures
2. Focus on fixing ONLY the first one
3. Run test suite again
4. Repeat process
**FoamWorkspace** - Central repository managing all resources (notes, attachments)
**FoamGraph** - Manages relationship graph between resources
**ResourceProvider Pattern** - Pluggable architecture for different file types
**DataStore Interface** - Abstract file system operations
Features registered as:
```typescript
(context: ExtensionContext, foamPromise: Promise<Foam>) => void
```
Allows features to:
**NEVER import `vscode` in `packages/foam-vscode/src/core/`** - This maintains platform independence. Core logic must remain platform-agnostic.
1. Check if `.agent/tasks/<issue-id>-<sanitized-title>.md` exists
2. If not, consider running `/research-issue <issue-id>` first
3. Create feature in `src/features/` directory
4. Register feature in `src/features/index.ts`
5. Add tests (both unit and integration as needed)
6. Update configuration in `package.json` if needed
1. Get issue information from GitHub (use `gh issue view <number>`)
2. Define step-by-step plan
3. Create tests for the feature
4. Starting from first test case, implement feature until test passes
5. Run full validation (format, lint, test)
When adding to `src/core/`:
1. Keep platform-agnostic (no vscode imports)
2. Add comprehensive unit tests
3. Consider impact on graph and workspace state
4. Update relevant providers if needed
5. Prefer pure functions for readability and testing
Extension uses VS Code's configuration system with `foam.*` namespace.
All settings defined in `/packages/foam-vscode/package.json`
**Target audience**: Non-technical users new to Foam
**Writing principles:**
Use `gh` command for GitHub interactions. **ALWAYS ask before write operations.**
**Issues:**
```bash
gh issue list # List all
gh issue list --milestone "v1.0.0" # By milestone
gh issue list --label "bug" # By label
gh issue list --assignee @me # By assignee
gh issue list --state open # By state
gh issue view 123 # View specific
gh issue create --title "Bug" --body "Desc" # Create
gh issue comment 123 --body "Comment" # Comment
```
**Pull Requests:**
```bash
gh pr list # List all
gh pr list --milestone "v1.0.0" # By milestone
gh pr view 456 # View details
gh pr create --title "Feature" --body "Desc" # Create
gh pr checkout 456 # Checkout locally
gh pr comment 456 --body "LGTM" # Review comment
```
Extension supports both Node.js and browser environments via separate build targets.
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/foam-development-assistant/raw