chore(repo): establish project baseline
Track the source-of-truth code, skills, bootstrap rules, docs, and packaging files before adding new features. Exclude local vault config, generated skill mirrors, temporary exports, virtual environments, and business data files from version control. Validation: inspected staged file list and git ignored status before commit.
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
# Obsidian Wiki — Copilot Context
|
||||
|
||||
This project is a **skill-based framework** for building and maintaining an Obsidian knowledge base using AI coding agents. There are no scripts or dependencies — everything is markdown instructions that the agent executes directly.
|
||||
|
||||
## Project Overview
|
||||
|
||||
- **Purpose:** Build and maintain an Obsidian wiki using the LLM Wiki pattern (Andrej Karpathy).
|
||||
- **Tech Stack:** Markdown only. No code, no dependencies. The AI agent IS the runtime.
|
||||
- **Key Config:** `.env` contains `OBSIDIAN_VAULT_PATH` pointing to the vault location.
|
||||
- **Skills:** `.skills/` contains skill folders, each with a `SKILL.md` defining a workflow.
|
||||
|
||||
## Key Concepts
|
||||
|
||||
- The wiki is a **compiled artifact** — knowledge distilled from raw sources into interconnected pages.
|
||||
- Every wiki page has YAML frontmatter: `title`, `category`, `tags`, `sources`, `created`, `updated`.
|
||||
- Pages are connected with Obsidian `[[wikilinks]]`.
|
||||
- A `.manifest.json` in the vault root tracks all ingested sources for delta-based updates.
|
||||
- `index.md` and `log.md` must be updated after every operation.
|
||||
|
||||
## Skills Reference
|
||||
|
||||
| Skill | Folder | Purpose |
|
||||
|---|---|---|
|
||||
| Setup | `.skills/wiki-setup/` | Initialize vault structure |
|
||||
| Ingest | `.skills/wiki-ingest/` | Distill documents into wiki pages |
|
||||
| History Router | `.skills/wiki-history-ingest/` | Route `/wiki-history-ingest <claude|codex>` to the right history skill |
|
||||
| Claude History | `.skills/claude-history-ingest/` | Mine `~/.claude` conversations |
|
||||
| Codex History | `.skills/codex-history-ingest/` | Mine `~/.codex` sessions and rollout logs |
|
||||
| Data Ingest | `.skills/data-ingest/` | Process any text data |
|
||||
| Status | `.skills/wiki-status/` | Audit ingestion state and delta |
|
||||
| Query | `.skills/wiki-query/` | Answer questions from wiki |
|
||||
| Lint | `.skills/wiki-lint/` | Find broken links, orphans |
|
||||
| Rebuild | `.skills/wiki-rebuild/` | Archive and rebuild |
|
||||
| Cross-Linker | `.skills/cross-linker/` | Auto-discover and insert missing wikilinks |
|
||||
| Tag Taxonomy | `.skills/tag-taxonomy/` | Enforce consistent tag vocabulary |
|
||||
| LLM Wiki | `.skills/llm-wiki/` | Core architecture pattern |
|
||||
| Skill Creator | `.skills/skill-creator/` | Create new skills |
|
||||
|
||||
## Coding Conventions
|
||||
|
||||
- When creating wiki pages, always use YAML frontmatter.
|
||||
- Use `[[wikilinks]]` syntax for cross-references — NOT markdown links.
|
||||
- Project-specific knowledge goes in `projects/<name>/`. Global knowledge goes in top-level categories.
|
||||
- Never modify the `.obsidian/` directory.
|
||||
@@ -0,0 +1,65 @@
|
||||
name: publish
|
||||
|
||||
# Build and publish obsidian-wiki to PyPI when a version tag is pushed.
|
||||
#
|
||||
# Setup (one-time): on PyPI, add a Trusted Publisher for this repo with
|
||||
# workflow `publish.yml` and environment `pypi`. No API token needed — the
|
||||
# `id-token: write` permission below mints a short-lived OIDC credential.
|
||||
#
|
||||
# Release: bump `version` in pyproject.toml, commit, then
|
||||
# git tag v0.1.0 && git push origin v0.1.0
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
# Allow a manual build (artifacts only, no publish) for verification.
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.x"
|
||||
- name: Build sdist and wheel
|
||||
run: |
|
||||
python -m pip install --upgrade build
|
||||
python -m build
|
||||
- name: Verify wheel bundles the skills
|
||||
run: |
|
||||
python -m pip install --upgrade twine
|
||||
twine check dist/*
|
||||
wheel=$(ls dist/*.whl)
|
||||
echo "Inspecting $wheel"
|
||||
if ! python -m zipfile -l "$wheel" | grep -q "obsidian_wiki/_data/skills/wiki-setup/SKILL.md"; then
|
||||
echo "::error::wheel is missing bundled skills under obsidian_wiki/_data/skills/"
|
||||
exit 1
|
||||
fi
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: dist
|
||||
path: dist/
|
||||
|
||||
publish:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
# Only publish on a real tag push, not workflow_dispatch.
|
||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
||||
environment: pypi
|
||||
permissions:
|
||||
id-token: write # required for PyPI Trusted Publishing (OIDC)
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: dist
|
||||
path: dist/
|
||||
- name: Publish to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
skip-existing: true
|
||||
@@ -0,0 +1,29 @@
|
||||
name: setup
|
||||
|
||||
# Guards setup.sh against the regression where it rewrites committed
|
||||
# relative symlinks with absolute paths (or any other modification to
|
||||
# tracked files). See #52 for the original bug.
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
install-leaves-tree-clean:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Run setup.sh
|
||||
# stdin closed so the vault-path prompt returns empty rather than hang
|
||||
run: bash setup.sh < /dev/null
|
||||
- name: Working tree must be unchanged
|
||||
run: |
|
||||
if ! git diff --exit-code; then
|
||||
echo "::error::setup.sh modified tracked files. Likely cause: an" \
|
||||
"in-repo symlink mirror is being written with an absolute" \
|
||||
"target instead of a relative one. See install_skills() in setup.sh."
|
||||
exit 1
|
||||
fi
|
||||
- name: Re-run is idempotent
|
||||
run: bash setup.sh < /dev/null && git diff --exit-code
|
||||
Reference in New Issue
Block a user