This file is the canonical instruction surface for this repository.
Nested AGENTS.md files may refine behavior for their own subtree. AGENT.md is a compatibility alias only. README.md is for orientation and quickstart, not for replacing policy. docs/ owns architecture, security, testing, release, and decision records.
This repository is an Obsidian community-plugin codebase for a GitHub-API-based sync plugin. Treat it as a browser-safe, Obsidian-hosted application first, not as a generic Node.js service.
- Platform and security floors: Obsidian plugin constraints, GitHub security/release rules, and applicable licenses.
- This root
AGENTS.md. - Path-scoped nested
AGENTS.mdfiles. - Canonical documents under
docs/. - Task-local instructions that narrow scope without weakening the above.
- Preserve the plugin's GitHub-API sync scope unless an ADR explicitly expands it.
- Default to browser-safe and mobile-safe plugin code. Do not introduce top-level Node.js or Electron dependencies into runtime code without explicit gating and documentation.
- Do not add telemetry, analytics, or hidden network traffic.
- Treat tokens, vault paths, and sync logs as sensitive. Never log secrets.
- Changes to auth, token storage, conflict semantics, or
.obsidianhandling require tests and documentation updates. - Do not silently widen what leaves the local vault. README and security docs must disclose any trust-boundary change.
- Prefer integration over reinvention when the platform or GitHub already provides the needed capability.
- Do not mark work done until verification evidence exists.
README.mddocs/architecture.mddocs/security-model.mddocs/testing.mddocs/release.mddocs/github-repo-settings.mdwhen the work touches repository settings, workflows, or security posture- relevant ADRs under
docs/decisions/ src/AGENTS.mdwhen editing runtime codetests/AGENTS.mdwhen editing tests
- analyze first
- make the smallest clean change that solves the problem
- verify with commands
- update docs when behavior or trust boundaries changed
- keep follow-up artifacts practical and reusable
A non-trivial change is not done until all relevant items below are true:
npm run validatenpm run typechecknpm run lintnpm testnpm run buildnpm run release:preflight- docs and ADRs updated if behavior, security posture, or release policy changed
When asked to analyze or review, do not stop at the first file. Read transitive constraints: root policy, path policy, canonical docs, relevant tests, workflows, and platform rules.
Before proposing new custom machinery, check whether Obsidian, GitHub, or GitHub Actions already provide the capability in a safer or simpler way. If integration is better, document that instead of rebuilding casually.