obsidian-dev-skills 1.0.0
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/LICENSE +21 -0
- package/README.md +80 -0
- package/obsidian-ops/SKILL.md +35 -0
- package/obsidian-ops/references/build-workflow.md +75 -0
- package/obsidian-ops/references/performance.md +14 -0
- package/obsidian-ops/references/quick-reference.md +169 -0
- package/obsidian-ops/references/quick-sync-guide.md +166 -0
- package/obsidian-ops/references/release-readiness.md +210 -0
- package/obsidian-ops/references/security-privacy.md +61 -0
- package/obsidian-ops/references/summarize-commands.md +153 -0
- package/obsidian-ops/references/sync-procedure.md +381 -0
- package/obsidian-ops/references/testing.md +17 -0
- package/obsidian-ops/references/troubleshooting.md +114 -0
- package/obsidian-ops/references/versioning-releases.md +16 -0
- package/obsidian-ref/SKILL.md +35 -0
- package/obsidian-ref/references/environment.md +52 -0
- package/obsidian-ref/references/file-conventions.md +65 -0
- package/obsidian-ref/references/manifest.md +39 -0
- package/obsidian-ref/references/mobile.md +14 -0
- package/obsidian-ref/references/obsidian-file-formats.md +759 -0
- package/obsidian-ref/references/ref-instructions.md +548 -0
- package/obsidian-ref/references/references.md +22 -0
- package/obsidian-ref/references/ux-copy.md +15 -0
- package/package.json +29 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-2026 David V. Kimball
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Obsidian Development Skills
|
|
2
|
+
|
|
3
|
+
This repository contains centralized AI agent skills for Obsidian plugin and theme development. It provides a single source of truth for development guidance, patterns, and best practices.
|
|
4
|
+
|
|
5
|
+
## Repository Structure
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
obsidian-dev-skills/
|
|
9
|
+
├── obsidian-dev-plugins/ # Plugin development skills
|
|
10
|
+
├── obsidian-dev-themes/ # Theme development skills
|
|
11
|
+
├── obsidian-ops/ # Operations & workflows
|
|
12
|
+
└── obsidian-ref/ # Technical references
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Getting Started
|
|
16
|
+
|
|
17
|
+
### For Developers
|
|
18
|
+
|
|
19
|
+
This repository is automatically set up by the `setup-ref-links` script in the template projects.
|
|
20
|
+
|
|
21
|
+
### For Users
|
|
22
|
+
|
|
23
|
+
This repository is automatically managed by the template projects. Simply run the `setup-ref-links` script in your template project to get started.
|
|
24
|
+
|
|
25
|
+
### For Developers
|
|
26
|
+
|
|
27
|
+
The `setup-ref-links` script clones this repository to your `.ref` folder and creates the necessary symlinks.
|
|
28
|
+
|
|
29
|
+
## Skills Overview
|
|
30
|
+
|
|
31
|
+
### obsidian-dev-plugins
|
|
32
|
+
- TypeScript/JavaScript development patterns
|
|
33
|
+
- Obsidian API usage
|
|
34
|
+
- Plugin lifecycle management
|
|
35
|
+
- Command and settings implementation
|
|
36
|
+
|
|
37
|
+
### obsidian-dev-themes
|
|
38
|
+
- CSS/SCSS development patterns
|
|
39
|
+
- Obsidian CSS variables
|
|
40
|
+
- Responsive design
|
|
41
|
+
- Dark/light mode support
|
|
42
|
+
|
|
43
|
+
### obsidian-ops
|
|
44
|
+
- Build and release workflows
|
|
45
|
+
- Version management
|
|
46
|
+
- Sync procedures
|
|
47
|
+
- Testing and quality assurance
|
|
48
|
+
|
|
49
|
+
### obsidian-ref
|
|
50
|
+
- API documentation
|
|
51
|
+
- Manifest requirements
|
|
52
|
+
- File formats
|
|
53
|
+
- UI/UX guidelines
|
|
54
|
+
|
|
55
|
+
## Project-Specific Skills
|
|
56
|
+
|
|
57
|
+
Each project should also have a `project/` skill in `.agent/skills/project/` that contains:
|
|
58
|
+
- Project-specific architecture details
|
|
59
|
+
- Unique conventions and patterns
|
|
60
|
+
- Maintenance tasks
|
|
61
|
+
- Local workflow documentation
|
|
62
|
+
|
|
63
|
+
## Maintenance
|
|
64
|
+
|
|
65
|
+
### Updating Skills
|
|
66
|
+
|
|
67
|
+
When skills are updated in this repository, all linked projects automatically get the updates. No manual sync required.
|
|
68
|
+
|
|
69
|
+
### Tracking Sync Status
|
|
70
|
+
|
|
71
|
+
Each project maintains its own `sync-status.json` file to track when reference materials were last updated.
|
|
72
|
+
|
|
73
|
+
## Compatibility
|
|
74
|
+
|
|
75
|
+
- **Cursor**: Primary supported AI agent
|
|
76
|
+
- **Open Cognitive Skills (OCS) Specification**: [https://github.com/AI-CAMEL/Skills-Specification](https://github.com/AI-CAMEL/Skills-Specification)
|
|
77
|
+
|
|
78
|
+
## Contributing
|
|
79
|
+
|
|
80
|
+
Skills are maintained centrally to ensure consistency across all Obsidian projects. Updates should be made here and will automatically propagate to all linked projects.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: obsidian-ops
|
|
3
|
+
description: Operations, syncing, versioning, and release management for Obsidian projects. Load when running builds, syncing references, bumping versions, or preparing for release.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Obsidian Operations Skill
|
|
7
|
+
|
|
8
|
+
This skill covers the operational aspects of maintaining an Obsidian project, including build workflows, sync procedures, and release management.
|
|
9
|
+
|
|
10
|
+
## Purpose
|
|
11
|
+
|
|
12
|
+
To ensure reliable builds, consistent reference materials, and safe release processes while strictly following project policies.
|
|
13
|
+
|
|
14
|
+
## When to Use
|
|
15
|
+
|
|
16
|
+
Load this skill when:
|
|
17
|
+
- Running build or lint commands.
|
|
18
|
+
- Syncing reference documentation from external sources.
|
|
19
|
+
- Bumping project versions or preparing releases.
|
|
20
|
+
- Troubleshooting build or environment issues.
|
|
21
|
+
|
|
22
|
+
## Core Rules
|
|
23
|
+
|
|
24
|
+
- **NEVER perform automatic git operations**: AI agents must never execute `git commit`, `git push`, or any command that automatically stages or commits changes without explicit user approval for each step.
|
|
25
|
+
- **Verify Build**: Always run a build/lint after significant changes to ensure compatibility.
|
|
26
|
+
- **Sync Status**: Keep `sync-status.json` updated when updating reference materials.
|
|
27
|
+
|
|
28
|
+
## Bundled Resources
|
|
29
|
+
|
|
30
|
+
- `references/build-workflow.md`: Standard build and development commands.
|
|
31
|
+
- `references/release-readiness.md`: Checklist for ensuring a project is ready for release.
|
|
32
|
+
- `references/sync-procedure.md`: How to pull updates from reference repositories.
|
|
33
|
+
- `references/versioning-releases.md`: Workflow for versioning and GitHub releases.
|
|
34
|
+
- `references/troubleshooting.md`: Common issues and their resolutions.
|
|
35
|
+
- `references/quick-reference.md`: One-page cheat sheet for common operations.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Source: Project-specific workflow
|
|
3
|
+
Last synced: See sync-status.json for authoritative sync dates
|
|
4
|
+
Update frequency: Update as build process evolves
|
|
5
|
+
-->
|
|
6
|
+
|
|
7
|
+
# Build Workflow
|
|
8
|
+
|
|
9
|
+
**CRITICAL**: Always run the build command after making changes to catch errors early.
|
|
10
|
+
|
|
11
|
+
After making any changes to theme code:
|
|
12
|
+
|
|
13
|
+
### Simple CSS Themes
|
|
14
|
+
|
|
15
|
+
If your theme is simple with just `theme.css` in the root and no build tools:
|
|
16
|
+
|
|
17
|
+
- **No build step required** - just edit `theme.css` directly
|
|
18
|
+
- Changes take effect immediately when Obsidian reloads the theme (reload Obsidian with Ctrl+R / Cmd+R)
|
|
19
|
+
- **Linting**: Run `npm run lint` to check CSS quality (optional but recommended)
|
|
20
|
+
|
|
21
|
+
**How to detect**: If you have `theme.css` in root and no `src/scss/` directory, you have a simple CSS theme.
|
|
22
|
+
|
|
23
|
+
### Complex Themes (SCSS + Build Tools)
|
|
24
|
+
|
|
25
|
+
If your theme uses build tools (Grunt, npm scripts, SCSS compiler, etc.) and has `src/scss/` directory:
|
|
26
|
+
|
|
27
|
+
1. **Run the build** (assume npm is already installed):
|
|
28
|
+
```powershell
|
|
29
|
+
# For themes using Grunt (like obsidian-oxygen)
|
|
30
|
+
npx grunt build
|
|
31
|
+
|
|
32
|
+
# For themes using npm scripts
|
|
33
|
+
npm run build
|
|
34
|
+
|
|
35
|
+
# For themes using Grunt watch mode (auto-rebuild on changes)
|
|
36
|
+
npx grunt
|
|
37
|
+
|
|
38
|
+
# Or whatever build command your theme uses
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
2. **If the build fails with npm/node errors**, then check if npm is installed:
|
|
42
|
+
```powershell
|
|
43
|
+
npm --version
|
|
44
|
+
```
|
|
45
|
+
- If npm is not found, inform the user that Node.js (which includes npm) needs to be installed
|
|
46
|
+
- Do not automatically install npm - let the user handle installation
|
|
47
|
+
|
|
48
|
+
3. **Check for errors** and fix any build issues before proceeding. See [troubleshooting.md](troubleshooting.md) for common build issues.
|
|
49
|
+
|
|
50
|
+
4. **Linting**: Run `npm run lint` to check SCSS/CSS quality. The lint wrapper automatically detects SCSS files in `src/scss/` and lints them appropriately.
|
|
51
|
+
|
|
52
|
+
**How to detect**: If you have a `src/scss/` directory, you have a complex theme with build tools. Check for `Gruntfile.js`, `package.json` scripts, or other build configuration files.
|
|
53
|
+
|
|
54
|
+
**Common build tools**:
|
|
55
|
+
- **Grunt**: Look for `Gruntfile.js` → Run `npx grunt build` or `npx grunt` (watch mode)
|
|
56
|
+
- **npm scripts**: Check `package.json` for `build` script → Run `npm run build`
|
|
57
|
+
- **Sass CLI**: Some themes use `sass` directly → Check `package.json` scripts
|
|
58
|
+
|
|
59
|
+
## Why This Matters
|
|
60
|
+
|
|
61
|
+
- **Catches errors early**: Build errors are easier to fix immediately after making changes
|
|
62
|
+
- **Prevents broken code**: Ensures the project always builds successfully
|
|
63
|
+
- **Saves time**: Fixing build errors right away is faster than discovering them later
|
|
64
|
+
- **Maintains quality**: Keeps the codebase in a working state
|
|
65
|
+
|
|
66
|
+
## Automated Workflow
|
|
67
|
+
|
|
68
|
+
When making changes:
|
|
69
|
+
1. Make the code change
|
|
70
|
+
2. **Immediately run the build command**
|
|
71
|
+
3. If build fails, fix errors
|
|
72
|
+
4. Repeat until build succeeds
|
|
73
|
+
5. Then proceed with testing or other tasks
|
|
74
|
+
|
|
75
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Source: Based on Obsidian community best practices
|
|
3
|
+
Last synced: See sync-status.json for authoritative sync dates
|
|
4
|
+
Update frequency: Check Obsidian community discussions for updates
|
|
5
|
+
-->
|
|
6
|
+
|
|
7
|
+
# Performance
|
|
8
|
+
|
|
9
|
+
- Keep CSS file size reasonable. Large themes can slow down Obsidian startup.
|
|
10
|
+
- Use CSS variables efficiently. Avoid excessive specificity.
|
|
11
|
+
- Minimize use of complex selectors that require expensive DOM queries.
|
|
12
|
+
- Test theme performance on lower-end devices, especially mobile.
|
|
13
|
+
|
|
14
|
+
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Source: Condensed from all reference documentation
|
|
3
|
+
Last synced: See sync-status.json for authoritative sync dates
|
|
4
|
+
Update frequency: Update as workflows evolve
|
|
5
|
+
-->
|
|
6
|
+
|
|
7
|
+
# Quick Reference
|
|
8
|
+
|
|
9
|
+
One-page cheat sheet for common Obsidian theme development tasks.
|
|
10
|
+
|
|
11
|
+
## Quick Commands
|
|
12
|
+
|
|
13
|
+
**One-word or short commands that trigger automatic actions:**
|
|
14
|
+
|
|
15
|
+
| Command | Action |
|
|
16
|
+
|---------|--------|
|
|
17
|
+
| `build` | Run build command (varies by theme: `npx grunt build`, `npm run build`, etc.) |
|
|
18
|
+
| `sync` or `quick sync` | Pull latest changes from all 6 core `.ref` repos |
|
|
19
|
+
| `what's the latest` or `check updates` | Check what's new in reference repos (read-only, then ask to pull) |
|
|
20
|
+
| `release ready?` or `is my theme ready for release?` | Run comprehensive release readiness checklist |
|
|
21
|
+
| `summarize` | Generate git commit message from all changed files |
|
|
22
|
+
| `summarize for release` | Generate markdown release notes for GitHub |
|
|
23
|
+
| `bump the version` or `bump version` | Bump version by 0.0.1 (patch) by default, or specify: `patch`, `minor`, `major`, or exact version |
|
|
24
|
+
| `add ref [name]` | Add a reference project (external URL or local path) |
|
|
25
|
+
| `check API [feature]` | Look up a feature in `.ref/obsidian-api/obsidian.d.ts` |
|
|
26
|
+
|
|
27
|
+
**Usage examples:**
|
|
28
|
+
- `build` → Runs build command automatically
|
|
29
|
+
- `sync` → Pulls latest from all core repos automatically
|
|
30
|
+
- `bump the version` → Bumps version by 0.0.1 (patch) in manifest.json
|
|
31
|
+
- `bump version minor` → Bumps minor version (e.g., 1.0.0 → 1.1.0)
|
|
32
|
+
- `bump version major` → Bumps major version (e.g., 1.0.0 → 2.0.0)
|
|
33
|
+
- `add ref my-plugin https://github.com/user/my-plugin.git` → Clones external repo
|
|
34
|
+
- `add ref ../my-local-plugin` → Creates symlink to local project
|
|
35
|
+
- `check API [feature]` → Searches obsidian.d.ts for feature (for theme CSS variables, etc.)
|
|
36
|
+
|
|
37
|
+
**Note**: These commands are interpreted by AI agents and execute the corresponding workflows automatically. See detailed documentation in [AGENTS.md](../../AGENTS.md) for full workflows.
|
|
38
|
+
|
|
39
|
+
## Build Commands
|
|
40
|
+
|
|
41
|
+
**Simple CSS themes**: No build step required - just edit `theme.css` directly.
|
|
42
|
+
|
|
43
|
+
**Complex themes with build tools**:
|
|
44
|
+
```powershell
|
|
45
|
+
npx grunt build # For themes using Grunt
|
|
46
|
+
npm run build # For themes using npm scripts
|
|
47
|
+
npx grunt # Watch mode (auto-rebuild on changes)
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**Always run build after making changes** to catch errors early. See [build-workflow.md](build-workflow.md).
|
|
51
|
+
|
|
52
|
+
## File Paths
|
|
53
|
+
|
|
54
|
+
**Theme location** (in vault):
|
|
55
|
+
```
|
|
56
|
+
<Vault>/.obsidian/themes/<theme-name>/
|
|
57
|
+
├── theme.css # Compiled theme CSS
|
|
58
|
+
└── manifest.json # Theme manifest
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**Build output**: Must be at top level of theme folder in vault.
|
|
62
|
+
|
|
63
|
+
## CSS Patterns
|
|
64
|
+
|
|
65
|
+
**CSS Variables** (for theming):
|
|
66
|
+
```css
|
|
67
|
+
:root {
|
|
68
|
+
--color-base-00: #ffffff;
|
|
69
|
+
--color-base-10: #f7f6f3;
|
|
70
|
+
--color-text-normal: #383a42;
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**Dark Mode**:
|
|
75
|
+
```css
|
|
76
|
+
.theme-dark {
|
|
77
|
+
--color-base-00: #1e1e1e;
|
|
78
|
+
--color-base-10: #252525;
|
|
79
|
+
--color-text-normal: #dcddde;
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
See Obsidian's CSS variables documentation for complete variable list.
|
|
84
|
+
|
|
85
|
+
## Git Workflow
|
|
86
|
+
|
|
87
|
+
**Commit message format** (from [summarize-commands.md](summarize-commands.md)):
|
|
88
|
+
```
|
|
89
|
+
[Summary of changes]
|
|
90
|
+
- [detailed item 1]
|
|
91
|
+
- [detailed item 2]
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**Release notes format** (markdown):
|
|
95
|
+
```markdown
|
|
96
|
+
### Release v1.2.0 - Title
|
|
97
|
+
|
|
98
|
+
### Features
|
|
99
|
+
- Feature description
|
|
100
|
+
|
|
101
|
+
### Improvements
|
|
102
|
+
- Improvement description
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Release Preparation
|
|
106
|
+
|
|
107
|
+
**Before releasing**:
|
|
108
|
+
- Run release readiness check: See [release-readiness.md](release-readiness.md)
|
|
109
|
+
- Verify all checklist items (platform testing, files, policies, etc.)
|
|
110
|
+
- Ensure LICENSE file exists and third-party code is properly attributed
|
|
111
|
+
|
|
112
|
+
See [versioning-releases.md](versioning-releases.md) for release process.
|
|
113
|
+
|
|
114
|
+
## Sync Reference Repos
|
|
115
|
+
|
|
116
|
+
**Quick pull all 6 core repos** (from [quick-sync-guide.md](quick-sync-guide.md)):
|
|
117
|
+
```bash
|
|
118
|
+
# Navigate to central .ref location (adjust path as needed)
|
|
119
|
+
cd ../.ref/obsidian-dev # or cd ~/Development/.ref/obsidian-dev
|
|
120
|
+
|
|
121
|
+
# Pull all repos
|
|
122
|
+
cd obsidian-api && git pull && cd ..
|
|
123
|
+
cd obsidian-sample-plugin && git pull && cd ..
|
|
124
|
+
cd obsidian-developer-docs && git pull && cd ..
|
|
125
|
+
cd obsidian-plugin-docs && git pull && cd ..
|
|
126
|
+
cd obsidian-sample-theme && git pull && cd ..
|
|
127
|
+
cd eslint-plugin && git pull && cd ..
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**Note**: If using symlinks, navigate to the actual target location (usually `..\.ref\obsidian-dev`) before running git commands. See [quick-sync-guide.md](quick-sync-guide.md) for setup detection.
|
|
131
|
+
|
|
132
|
+
## Reference Materials
|
|
133
|
+
|
|
134
|
+
**Check `.ref/obsidian-api/obsidian.d.ts`** for CSS variable definitions and Obsidian's internal structure (useful for advanced theming).
|
|
135
|
+
|
|
136
|
+
## Testing
|
|
137
|
+
|
|
138
|
+
**Manual installation**:
|
|
139
|
+
1. Build theme (if using build tools) or ensure `theme.css` is ready
|
|
140
|
+
2. Copy `manifest.json` and `theme.css` to vault `.obsidian/themes/<theme-name>/`
|
|
141
|
+
3. Select theme in Obsidian: **Settings → Appearance → Themes**
|
|
142
|
+
4. Reload Obsidian (Ctrl+R / Cmd+R) to see changes
|
|
143
|
+
|
|
144
|
+
See [testing.md](testing.md) for details.
|
|
145
|
+
|
|
146
|
+
## Common File Structure
|
|
147
|
+
|
|
148
|
+
**Simple CSS theme**:
|
|
149
|
+
```
|
|
150
|
+
theme.css # Source CSS (edit directly)
|
|
151
|
+
manifest.json
|
|
152
|
+
package.json
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
**Complex theme with build tools**:
|
|
156
|
+
```
|
|
157
|
+
src/
|
|
158
|
+
scss/
|
|
159
|
+
index.scss
|
|
160
|
+
variables.scss
|
|
161
|
+
components/
|
|
162
|
+
theme.css # Compiled output
|
|
163
|
+
manifest.json
|
|
164
|
+
package.json
|
|
165
|
+
Gruntfile.js # Build configuration (if using Grunt)
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
See [file-conventions.md](file-conventions.md) for details.
|
|
169
|
+
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Source: Project-specific quick reference
|
|
3
|
+
Last synced: See sync-status.json for authoritative sync dates
|
|
4
|
+
Update frequency: Update as needed
|
|
5
|
+
-->
|
|
6
|
+
|
|
7
|
+
# Quick Sync Guide
|
|
8
|
+
|
|
9
|
+
This is a quick reference for pulling the latest changes from reference repositories. For detailed sync procedures, see [sync-procedure.md](sync-procedure.md).
|
|
10
|
+
|
|
11
|
+
## Determine Your Setup First
|
|
12
|
+
|
|
13
|
+
**IMPORTANT**: Before syncing, check if `.ref` contains symlinks or actual repos. Git operations must be performed on the **actual target location**, not on symlinks.
|
|
14
|
+
|
|
15
|
+
**Windows (PowerShell)**:
|
|
16
|
+
```powershell
|
|
17
|
+
Get-Item .ref/obsidian-api | Select-Object LinkType, Target
|
|
18
|
+
# If LinkType shows "Junction" or "SymbolicLink", you're using symlinks
|
|
19
|
+
# The Target property shows where the symlink points (usually ..\.ref\obsidian-dev)
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
**macOS/Linux**:
|
|
23
|
+
```bash
|
|
24
|
+
ls -la .ref/obsidian-api
|
|
25
|
+
# If it shows "->" with a path, it's a symlink
|
|
26
|
+
# Use readlink to see the target: readlink -f .ref/obsidian-api
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**If using symlinks**: Navigate to the central location (usually `..\.ref\obsidian-dev` or `~/Development/.ref/obsidian-dev`) before running git commands.
|
|
30
|
+
|
|
31
|
+
**If using local clones**: Run commands from project root, navigating to each `.ref/` subdirectory.
|
|
32
|
+
|
|
33
|
+
## What Does `git pull` Do?
|
|
34
|
+
|
|
35
|
+
When you run `git pull` in a reference repository:
|
|
36
|
+
1. **Fetches** the latest commits from the remote repository (GitHub)
|
|
37
|
+
2. **Merges** those changes into your local copy
|
|
38
|
+
3. **Updates** all files in that repository to the latest version
|
|
39
|
+
|
|
40
|
+
**Important**: This only updates the files in `.ref/` - it does NOT automatically update your `.agents/` files. You need to manually review and sync changes.
|
|
41
|
+
|
|
42
|
+
## Quick Pull Commands
|
|
43
|
+
|
|
44
|
+
### If Using Symlinks (Central Location)
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# Navigate to your central refs directory (adjust path as needed)
|
|
48
|
+
cd ../.ref/obsidian-dev # or cd ~/Development/.ref/obsidian-dev
|
|
49
|
+
|
|
50
|
+
# Pull all repos at once
|
|
51
|
+
cd obsidian-api && git pull && cd ..
|
|
52
|
+
cd obsidian-sample-plugin && git pull && cd ..
|
|
53
|
+
cd obsidian-developer-docs && git pull && cd ..
|
|
54
|
+
cd obsidian-plugin-docs && git pull && cd ..
|
|
55
|
+
cd obsidian-sample-theme && git pull && cd ..
|
|
56
|
+
cd eslint-plugin && git pull && cd ..
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Or use a simple loop (bash/zsh):
|
|
60
|
+
```bash
|
|
61
|
+
cd ../.ref/obsidian-dev # or cd ~/Development/.ref/obsidian-dev
|
|
62
|
+
for repo in obsidian-api obsidian-sample-plugin obsidian-developer-docs obsidian-plugin-docs obsidian-sample-theme eslint-plugin; do
|
|
63
|
+
echo "Pulling $repo..."
|
|
64
|
+
cd "$repo" && git pull && cd ..
|
|
65
|
+
done
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Or PowerShell (Windows):
|
|
69
|
+
```powershell
|
|
70
|
+
cd ..\.ref\obsidian-dev # Adjust path as needed
|
|
71
|
+
foreach ($repo in @('obsidian-api', 'obsidian-sample-plugin', 'obsidian-developer-docs', 'obsidian-plugin-docs', 'obsidian-sample-theme', 'eslint-plugin')) {
|
|
72
|
+
Write-Host "Pulling $repo..."
|
|
73
|
+
cd $repo
|
|
74
|
+
git pull
|
|
75
|
+
cd ..
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### If Using Local Clones (In Project)
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
# From your project root
|
|
83
|
+
cd .ref
|
|
84
|
+
|
|
85
|
+
# Pull each repo (always start from project root for each command)
|
|
86
|
+
cd obsidian-api && git pull && cd ../..
|
|
87
|
+
cd obsidian-sample-plugin && git pull && cd ../..
|
|
88
|
+
cd obsidian-developer-docs && git pull && cd ../..
|
|
89
|
+
cd obsidian-plugin-docs && git pull && cd ../..
|
|
90
|
+
cd obsidian-sample-theme && git pull && cd ../..
|
|
91
|
+
cd eslint-plugin && git pull && cd ../..
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Check What Changed
|
|
95
|
+
|
|
96
|
+
After pulling, see what's new:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
# See recent commits in a repo
|
|
100
|
+
cd .ref/obsidian-sample-plugin
|
|
101
|
+
git log --oneline -10
|
|
102
|
+
|
|
103
|
+
# See what files changed in the last update
|
|
104
|
+
git diff HEAD~1 HEAD --name-only
|
|
105
|
+
|
|
106
|
+
# See detailed changes to a specific file (e.g., AGENTS.md)
|
|
107
|
+
git diff HEAD~1 HEAD -- AGENTS.md
|
|
108
|
+
|
|
109
|
+
# See changes since your last pull (if you know the commit)
|
|
110
|
+
git log --oneline --since="2 weeks ago"
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## What to Look For
|
|
114
|
+
|
|
115
|
+
After pulling, check these key files for changes:
|
|
116
|
+
|
|
117
|
+
- **obsidian-sample-plugin/AGENTS.md** → Compare with your `.agents/` files
|
|
118
|
+
- **obsidian-sample-plugin/README.md** → Check for new setup instructions
|
|
119
|
+
- **obsidian-api/** → Look for new API documentation or breaking changes
|
|
120
|
+
- **obsidian-developer-docs/en/** → Check for updated official documentation
|
|
121
|
+
- **obsidian-plugin-docs/** → Review for new plugin guidance
|
|
122
|
+
|
|
123
|
+
## Next Steps
|
|
124
|
+
|
|
125
|
+
After pulling and reviewing changes:
|
|
126
|
+
|
|
127
|
+
1. **Compare** relevant files from `.ref/` with your `.agents/` files
|
|
128
|
+
2. **Update** `.agents/` files with new information
|
|
129
|
+
3. **Update** the "Last synced" date in file headers
|
|
130
|
+
4. **Commit** your changes
|
|
131
|
+
|
|
132
|
+
See [sync-procedure.md](sync-procedure.md) for the complete workflow.
|
|
133
|
+
|
|
134
|
+
## Example: Quick Check Workflow
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
# 1. Pull all repos (using symlinks - adjust path as needed)
|
|
138
|
+
cd ../.ref/obsidian-dev # or cd ~/Development/.ref/obsidian-dev
|
|
139
|
+
for repo in obsidian-api obsidian-sample-plugin obsidian-developer-docs obsidian-plugin-docs obsidian-sample-theme eslint-plugin; do
|
|
140
|
+
cd "$repo" && git pull && cd ..
|
|
141
|
+
done
|
|
142
|
+
|
|
143
|
+
# 2. Check if Sample Plugin's AGENTS.md changed
|
|
144
|
+
cd obsidian-sample-plugin
|
|
145
|
+
git log --oneline -5 -- AGENTS.md
|
|
146
|
+
|
|
147
|
+
# 3. If it changed, see the diff
|
|
148
|
+
git diff HEAD~1 HEAD -- AGENTS.md
|
|
149
|
+
|
|
150
|
+
# 4. Now you can manually update your .agents files based on what changed
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
**PowerShell version (Windows)**:
|
|
154
|
+
```powershell
|
|
155
|
+
# 1. Pull all repos (using symlinks - adjust path as needed)
|
|
156
|
+
cd ..\.ref\obsidian-dev
|
|
157
|
+
foreach ($repo in @('obsidian-api', 'obsidian-sample-plugin', 'obsidian-developer-docs', 'obsidian-plugin-docs', 'obsidian-sample-theme', 'eslint-plugin')) {
|
|
158
|
+
cd $repo
|
|
159
|
+
git pull
|
|
160
|
+
cd ..
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
# 2-4. Same as above
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
|