|
1 | | -# claude-obsidian: GitHub Copilot Instructions |
| 1 | +# claude-obsidian Copilot instructions |
2 | 2 |
|
3 | | -This repository is a **Claude Code plugin and Obsidian vault** that builds persistent, compounding knowledge bases using Andrej Karpathy's LLM Wiki pattern. It is markdown-only. No build step, no compiled code, no runtime dependencies. |
| 3 | +Read `AGENTS.md` before proposing changes. The repository is an Agent Skills |
| 4 | +package, Claude Code adapter, standard-library Python core, and deterministic |
| 5 | +vault template—not the default live user vault. |
4 | 6 |
|
5 | | -## Project Type |
| 7 | +When editing: |
6 | 8 |
|
7 | | -- Agent Skills package (cross-platform Agent Skills standard) |
8 | | -- Obsidian vault (interpretable by Obsidian directly) |
9 | | -- Claude Code plugin (installable via marketplace) |
| 9 | +- Keep skill frontmatter to exactly `name` and single-line `description`. |
| 10 | +- Use Obsidian Flavored Markdown, flat YAML properties, and `YYYY-MM-DD` dates. |
| 11 | +- Never modify existing raw source payloads. |
| 12 | +- Route all logical knowledge mutations through one inspected operation bundle. |
| 13 | +- Keep workers draft-only and lint/query read-only. |
| 14 | +- Preserve vault path containment and product/vault separation. |
| 15 | +- Add hermetic regression tests for behavior changes and run `make test`. |
| 16 | +- Do not add secrets, private paths, unsupported capability claims, or duplicate |
| 17 | + command wrappers. |
10 | 18 |
|
11 | | -## Repository Layout |
12 | | - |
13 | | -- `skills/`: 10 skills, each with a `SKILL.md` defining trigger phrases and instructions |
14 | | -- `hooks/hooks.json`: Claude Code lifecycle hooks (SessionStart, PostCompact, PostToolUse, Stop) |
15 | | -- `.claude-plugin/plugin.json`: plugin manifest |
16 | | -- `wiki/`: generated knowledge base (Markdown files with YAML frontmatter) |
17 | | -- `.raw/`: immutable source documents (never modify) |
18 | | -- `_templates/`: Obsidian Templater templates |
19 | | -- `_attachments/`: images and PDFs referenced by wiki pages |
20 | | - |
21 | | -## Conventions Copilot Should Follow |
22 | | - |
23 | | -When suggesting edits: |
24 | | - |
25 | | -1. **Frontmatter is flat YAML** with plural keys: `tags`, `aliases`, `cssclasses` |
26 | | -2. **Internal links are wikilinks**: `[[Note Name]]`, not Markdown links to `.md` paths |
27 | | -3. **Dates are `YYYY-MM-DD`**, not ISO datetimes |
28 | | -4. **`.raw/` is immutable**. Never suggest edits to anything under that path |
29 | | -5. **`wiki/log.md` is append-only**, with new entries at the top |
30 | | -6. **`wiki/hot.md` is overwritten** at session end, not appended to |
31 | | -7. **Skills use only `name` and `description` in frontmatter**. No `allowed-tools`, no `triggers`, no `globs` (these are not part of the Agent Skills spec) |
32 | | -8. **Custom callouts**: this vault defines `[!contradiction]`, `[!gap]`, `[!key-insight]`, `[!stale]` in `.obsidian/snippets/vault-colors.css`. These render only with that snippet enabled. |
33 | | - |
34 | | -## When Editing Skills (`skills/<name>/SKILL.md`) |
35 | | - |
36 | | -- Frontmatter: `name` (matches directory name) and `description` (single quoted line, max ~250 useful chars) |
37 | | -- Body: short, imperative instructions. Reference files with backticks. Do not paste large code blocks unless they're essential. |
38 | | -- Trigger phrases go in the `description` field, not in body or non-standard fields |
39 | | - |
40 | | -## When Editing Hooks (`hooks/hooks.json`) |
41 | | - |
42 | | -- Valid event names only: `SessionStart`, `Stop`, `PreToolUse`, `PostToolUse`, `PreCompact`, `PostCompact`, `UserPromptSubmit` |
43 | | -- Hook types: `command` (shell), `prompt` (LLM), `http` (POST), `agent` (subagent) |
44 | | -- `matcher` field uses regex against tool names for `PreToolUse`/`PostToolUse` |
45 | | -- For `SessionStart`: matcher uses `startup`, `resume`, `clear`, or `compact` |
46 | | - |
47 | | -## Cross-Reference |
48 | | - |
49 | | -- Plugin: https://github.com/AgriciDaniel/claude-obsidian |
50 | | -- Pattern source: https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f |
51 | | -- Authoritative Obsidian-specific skills: https://github.com/kepano/obsidian-skills |
| 19 | +Public canonical: https://github.com/AgriciDaniel/claude-obsidian |
0 commit comments