project-cairn

iBlinkQMIT活跃维护

把项目开发过程中积累的经验沉淀成可复用的知识库,是给 Claude Code 和 Codex 用的 AI Agent 技能,解决每次重做项目都要从头摸索的问题。

Turn project work into reusable knowledge — an AI-agent skill for Claude Code & Codex

v0.2.0发布于 2026-07-28 16:17 UTC253star49fork同步于 2026-11-11 00:01 UTC

怎么上手

由 README 提炼,执行前请确认
git clone https://github.com/iBlinkQ/project-cairn.git ~/.claude/skills/project-cairn
git clone https://github.com/iBlinkQ/project-cairn.git ~/.agents/skills/project-cairn
硬件要求按 README 说明

README 未说明硬件要求;前置依赖为 git,运行 scripts/*.sh 需要 bash,脚本已在 macOS 与 Linux 验证,Windows 需 WSL 或 Git Bash,Python 脚本需 Python 3

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

把项目过程中沉淀的经验变成可复用知识库的 AI Agent 技能,支持 Claude Code 与 Codex

把项目开发过程中积累的经验沉淀成可复用的知识库,是给 Claude Code 和 Codex 用的 AI Agent 技能,解决每次重做项目都要从头摸索的问题。

核心能力

  • 用 AGENTS.md 承载规则、cairn/ 目录分层存放日志、路线图与主题结论
  • 经人工确认后把可复用经验毕业到 Obsidian、Notion、飞书知识库
  • 用 Cited.md 记录引用指针,避免跨项目重复复制知识正文
  • 提供 Obsidian、Notion、飞书只读预检脚本,写入前校验认证与权限
  • 支持对已有项目整理经验,也支持对已完成文件夹做一次性毕业

容易踩的坑

SKILL.md 必须直接位于 project-cairn/ 根目录,不能多套一层文件夹;notion-graduate-batch.py 额外依赖 PyYAML;目前没有包管理器发布版本,只能通过 git clone 或 ZIP 导入安装

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

2 个版本v0.2.0
  1. v0.2.0v0.2.0 — Safer graduation, clearer public workflow最新正式版2026-07-28 · 2026-07-28 16:17 UTC

    Turn project work into reusable knowledge.

    Project Cairn v0.2.0 is the first substantial update after the initial public release. It keeps the documentation-first architecture while making the Skill easier to understand, safer to operate, and cheaper to load in context.

    Highlights

    • Progressive disclosure for graduation providers. The shared graduation workflow now loads separately from the Lark, Notion, and Obsidian execution paths. Candidate assessment uses 41.8% less selected graduation context; the largest single-provider path uses 22.5% less.
    • A stricter write gate. Provider-side writes require the selected provider reference to be read and that provider's read-only preflight to return status: ok; a dry-run does not substitute for the gate.
    • Human provenance and origin quotes. Project and knowledge-base notes can preserve contributors, human confirmers, and short attributed quotes while keeping sensitive material out.
    • Safe re-graduation. Obsidian, Lark, and Notion adapters update the same destination object and union provenance instead of creating duplicates.
    • Instance upgrade guidance. skill_spec_date, references/upgrade.md, and audit checks make drift in previously initialized projects visible without background update hooks.
    • Deferred provider setup. A project can start with graduation.provider: none and connect Obsidian, Notion, or Lark only when the first real graduation is ready.
    • A clearer public entry point. The bilingual README, diagrams, WorkBuddy installation path, and interactive GitHub Pages guide now explain the workflow before implementation details.

    Verification

    • 9/9 fixture scenarios passed their deterministic red-to-green checks.
    • Provider update and provenance regression suites passed for Obsidian, Lark, and Notion.
    • Recursive reference routing, anchor, live-link, and character-budget checks passed.
    • Shell syntax, Python compilation, Skill metadata validation, public asset checks, and sensitive-material scans passed.

    Upgrade notes

    The graduation reference split does not require changes to initialized projects or graduated notes. Existing projects can use the audit and upgrade flow in references/upgrade.md to detect earlier spec drift. Project Cairn remains documentation-first: no CLI daemon, background hook, silent provider write, or automatic migration was added.

  2. v0.1.0v0.1.0 — First public release2026-07-03 · 2026-07-03 13:52 UTC
    查看更新说明

    Turn project work into reusable knowledge.

    Project Cairn is an AI-agent skill for Claude Code, Codex, and compatible agents. It turns what an AI-collaboration project did — decisions, dead ends, solved pitfalls, validated approaches — into reusable knowledge that travels to the next project instead of dying with the session.

    This is the first public release: documentation-first, v0.1. Instructions, templates, and provider adapter scripts only — no CLI, MCP server, or background hook to install.

    What's in it

    • Two-layer model — project-side AGENTS.md + cairn/ (rules, state, local conclusions) and a knowledge-base layer (cross-project, reusable domain knowledge), connected by one-directional graduation: knowledge moves project → knowledge base at the moment it's validated as reusable, never silently back.
    • Three verified graduation providers, each adapted to how the platform actually works rather than forced into one generic shape: Obsidian (vault-relative files + INDEX.md, native WikiLinks), Lark/Feishu wiki (native resource API, wiki:wiki scope), Notion (direct REST, database-as-container-and-index).
    • Trigger-based creation — a new project only needs AGENTS.md. Topic notes, ROADMAP.md, Reference/, Cited.md are created only when a real signal shows up, not pre-built as empty shells.
    • User-level cascading config — save your usual provider targets, git policy, and language once; every later cairn init offers a one-key reuse instead of re-asking.
    • Branch-closure review — before an exploration branch is merged, abandoned, or rolled back, a lightweight review salvages anything worth keeping.
    • Audit — checks for drift, contradictions, missing graduation back-pointers, and engineering assets that leaked into the knowledge layer.

    Install

    git clone https://github.com/iBlinkQ/project-cairn.git ~/.claude/skills/project-cairn   # Claude Code
    git clone https://github.com/iBlinkQ/project-cairn.git ~/.agents/skills/project-cairn   # Codex
    

    See README.md (also available in Chinese) for the full quick start and docs map.

    License

    MIT

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    English | 中文

    Project Cairn

    Turn project work into reusable knowledge.

    Open the interactive guide to learn more about the Skill

    Project Cairn interactive visual overview in English

    Sound familiar?

    • The same problem comes back in the next project.
    • Start a new session or switch agents, and you are explaining the context and rules all over again.
    • Plans, progress, and conclusions are scattered, so the agent keeps jumping between old and new directions.
    • You know the answer exists. It is just buried somewhere in an old chat.

    What Project Cairn does

    Project Cairn is an agent skill. During normal project work, it helps the agent keep validated pitfall lessons, key decisions, exploration findings, and sparks of insight inside the project. When something is genuinely reusable elsewhere, the agent can prepare it for a long-term knowledge base after you confirm it.

    How Project Cairn connects AI agents, knowledge bases, and adjacent tools

    The files have distinct jobs:

    • AGENTS.md holds the rules the agent reads whenever it enters the project.
    • cairn/LOG.md records what happened, with short summaries and pointers.
    • cairn/ROADMAP.md keeps the overall goal, plan, and current progress.
    • cairn/<topic>.md holds the current conclusion for one subject.
    • cairn/Cited.md points to external knowledge that actually shaped the project, without copying its body.

    A cairn is a trail marker built by earlier travelers. The name captures the goal: let the next project see where the previous one found a safe route.

    Who it is for

    Project Cairn is useful when you run several AI-collaboration projects, switch between skill-compatible agents such as Claude Code and Codex, or need project knowledge to survive beyond one person's memory.

    Install

    Claude Code, user-level installation:

    git clone https://github.com/iBlinkQ/project-cairn.git ~/.claude/skills/project-cairn
    

    Codex, user-level direct skill path:

    git clone https://github.com/iBlinkQ/project-cairn.git ~/.agents/skills/project-cairn
    

    WorkBuddy, import the local skill package:

    1. Download the Project Cairn ZIP.
    2. Open Skills from the WorkBuddy sidebar. Select Add Skill, then Upload Skill.
    3. Choose the downloaded ZIP file. WorkBuddy configures it automatically, so you do not need to copy it into a directory.

    See the official WorkBuddy skill guide for the installation interface.

    The skill holds the method, and the project's AGENTS.md carries the rules the agent keeps every turn. WorkBuddy loads that file when you open the project folder in a WorkBuddy Project for code development. For other tasks, add one line to the Project's Instructions: "Read AGENTS.md at the project root and follow it as project rules." If the project already has a CODEBUDDY.md, WorkBuddy reads that file instead of AGENTS.md, so init adds an @AGENTS.md import line to it.

    For another skill-compatible agent, clone the repository into the directory where that agent loads skills. SKILL.md should sit directly at the root of project-cairn/, not inside another nested folder.

    Prerequisites are git, plus bash for scripts/*.sh. The shell scripts have been verified on macOS and Linux; Windows users need WSL or Git Bash. Python scripts require Python 3; notion-graduate-batch.py additionally requires PyYAML. There is no package-manager release yet.

    Start in three steps

    1. Ask the agent to "Initialize Project Cairn in this project." It will collect the project summary, git policy, and migration choice, then create the rules and configuration. Connecting a knowledge-base provider can be deferred until the first graduation.
    2. Keep working normally. During ordinary collaboration turns, the agent follows AGENTS.md to maintain progress and current conclusions. There is no separate recording service to run.
    3. When a validated lesson could help another project, ask the agent to prepare a graduation candidate. Nothing is written to the long-term knowledge base until you confirm the scope. Later projects search first and add a pointer to cairn/Cited.md only when a result actually influences the work.

    Already have an ongoing project or a finished project folder?

    • Ongoing projects: after initializing, ask the agent to organize existing experience ("整理已有经验"). It scans existing proposals, meeting notes, and in-project experience/convention documents, updates cairn/ROADMAP.md, and distills still-valid conclusions into topic notes while leaving original files untouched.
    • Finished or uninitialized folders (one-shot graduation): no initialization or cairn/ folder is needed. Open the folder and ask "See what experience in this folder can graduate" ("看看这个文件夹里有什么经验可以毕业"), or name a specific retrospective/summary note directly. The agent reads ~/.config/cairn/config.yaml, excludes external reference material, proposes reusable candidates, and — once you confirm — writes the knowledge-base note (type: project_insight), updates INDEX.md, adds only graduated_to / graduated_at back-pointers to the source note, and logs a 毕业:[[...]] line under today's date if a project record note exists.
    • Knowledge-base audit (项目经验库体检): run directly against an Obsidian knowledge-base folder without project init to backfill manually written notes into INDEX.md and propose fixes for notes missing type / summary or not opening with Background (manual notes without graduated_from are valid and not flagged).

    The two sides

    Project Cairn separates two lifecycles instead of putting every kind of information into one ever-growing file.

    SideWhat it keepsTypical homeWhen it is read
    Project sideRules, progress, current conclusions, and local casesroot AGENTS.md and cairn/while entering and advancing the project
    Knowledge-base sideDistilled knowledge that can be reused across projectsObsidian, Notion, or Lark / Feishu wikiwhen new work needs an earlier lesson

    The project side keeps local facts and conclusions current. Once a lesson proves useful beyond that project, human-confirmed graduation distills it into the knowledge-base side. Each side remains authoritative for its own scope.

    How a lesson reaches the next project

    Take the messaging-bot problem:

    1. Initialization writes the Cairn rules and configuration into the project.
    2. As the agent investigates, meaningful progress is recorded in LOG.md.
    3. Once the cause and fix are verified, the current conclusion moves into a topic note.
    4. Stable conclusions from proposals, specs, plans, reviews, meeting notes, retrospectives, or in-project experience and convention notes (written by you or organized with AI) are also distilled into topic notes. Those process documents stay where they are and need no type.
    5. The agent notices that the lesson may be reusable and proposes it as a graduation candidate.
    6. After you approve, the agent removes project-specific noise, adds context and limits, records provenance, writes the note, and updates the provider's index.
    7. A later project searches the knowledge base before solving the problem again. If a note shapes the work, Cited.md records a pointer rather than a duplicate.

    The interactive overview expands this journey into T0 through T8, including roadmap maintenance, audit, and re-graduation: explore the full flow.

    What it keeps

    Project Cairn does not stamp out a directory full of empty templates. Beyond the core initialization files, documents appear only when a real signal calls for them.

    FileResponsibility
    AGENTS.mdRules and navigation
    .cairn/config.yamlMachine-readable configuration
    cairn/LOG.mdReverse-chronological history
    cairn/ROADMAP.mdOverall goal, plan, and current progress
    cairn/<topic>.mdCurrent truth for one topic
    cairn/Reference/External source material owned by the project
    cairn/Cited.mdPointers to knowledge that influenced the work

    Schemas, configurations, and contracts consumed directly by code stay in the code tree. Cairn keeps the knowledge around them: why they look this way, what alternatives were tested, and what went wrong during implementation.

    Topic notes use Markdown and YAML frontmatter with at least a type field, following the minimal convention of Google's Open Knowledge Format. Project Cairn does not claim to implement the complete OKF bundle. New project topics use project_topic; newly graduated notes use project_insight. Initialization does not ask for a type. Existing note types remain valid and are preserved unless a separate migration is confirmed. See frontmatter.

    Graduated notes carry provenance through graduated_from, contributors, graduated_by, and authoring_mode, so readers can trace a conclusion back to the people, project, and source material that produced it.

    Automation boundaries

    • Project Cairn has no background hook and does not run after a chat ends.
    • Routine maintenance happens during normal work because the project's AGENTS.md carries the rules.
    • The agent may suggest a graduation candidate, but it cannot write to the long-term knowledge base without human confirmation.
    • Connecting Obsidian, Notion, or Lark / Feishu can be deferred until the first graduation.
    • Audit reports contradictions, stale conclusions, and omissions; it does not silently rewrite important decisions.

    Graduation writes from the project side to the knowledge-base side. Reuse works by searching first, then leaving a pointer in Cited.md when a note is actually used. It is explicit consumption, not background synchronization between two stores.

    Verified knowledge bases

    Project Cairn has verified graduation paths for:

    • Obsidian, using vault-relative files, INDEX.md, and native WikiLinks.
    • Notion, using a database as both the container and index, with structured metadata mapped to properties.
    • Lark / Feishu wiki, using nodes in a knowledge-space tree with links that can be read back.

    Every provider follows the behavioral contract in references/provider-interface.md while keeping its platform's native link and index model. Provider-specific execution paths live under references/graduation/. Before any write, the matching read-only preflight can check installation, authentication, and access:

    scripts/obsidian-preflight.sh
    scripts/notion-preflight.sh
    scripts/lark-preflight.sh
    

    Learn more

    Project Cairn complements adjacent tools instead of replacing them:

    Tool or approachMain jobRelationship to Cairn
    LLM WikiOrganize source material you have read into a wikiLLM Wiki focuses on source knowledge; Cairn focuses on knowledge learned through project work
    Open Knowledge FormatMake knowledge files exchangeable by people and machinesOKF concerns format; Cairn concerns formation, maintenance, graduation, and reuse
    Agent memoryPreserve an agent's preferences and working contextMemory supports agent continuity; Cairn supports project-knowledge continuity
    superpowersMake delivery more reliable through specs, plans, tests, and reviewsuperpowers manages the process; Cairn keeps the stable conclusions learned from it

    An agent remembering something is not the same as a project learning it.

    Docs map

    ReferenceUse it for
    references/init.mdInitializing or retrofitting Project Cairn
    references/maintenance.mdMaintaining LOG.md, ROADMAP.md, and topic notes (including distilling process documents)
    references/graduation.mdJudging, distilling, and writing reusable knowledge (including one-shot graduation without init)
    references/graduation/One execution path per provider (Lark wiki, Notion, Obsidian)
    references/provider-interface.mdThe behavioral contract for provider adapters
    references/consume.mdSearching, using, and citing external knowledge
    references/audit.mdFinding project drift, contradictions, and missing records, plus standalone knowledge-base audits
    references/upgrade.mdChecking and upgrading an initialized project
    references/frontmatter.mdFields for project notes and knowledge-base notes
    references/branch-closure.mdSalvaging knowledge before an exploration branch closes
    references/zh-glossary.mdFixed terminology for Chinese project documentation

    Contributing

    Issues and pull requests are welcome. Project Cairn is documentation-first, so most contributions belong in SKILL.md, references/*.md, assets/templates/*, or scripts/. If a change affects behavior, explain the reason and impact in the pull request.

    License

    MIT