agent-knowledge-cli 0.2.3__tar.gz → 0.2.4__tar.gz

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.
Files changed (110) hide show
  1. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/PKG-INFO +84 -114
  2. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/README.md +83 -113
  3. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/src/agent_knowledge/__init__.py +1 -1
  4. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/.gitignore +0 -0
  5. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/LICENSE +0 -0
  6. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/claude/global.md +0 -0
  7. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/claude/project-template.md +0 -0
  8. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/claude/scripts/install.sh +0 -0
  9. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/commands/doctor.md +0 -0
  10. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/commands/global-knowledge-sync.md +0 -0
  11. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/commands/graphify-sync.md +0 -0
  12. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/commands/knowledge-sync.md +0 -0
  13. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/commands/ship.md +0 -0
  14. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/commands/system-update.md +0 -0
  15. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/rules/generate-architecture-doc.mdc +0 -0
  16. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/rules/history-backfill.mdc +0 -0
  17. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/rules/memory-bootstrap.mdc +0 -0
  18. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/rules/memory-writeback.mdc +0 -0
  19. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/rules/shared-memory.mdc +0 -0
  20. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/rules/workflow-orchestration.mdc +0 -0
  21. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/rules-global/action-first.mdc +0 -0
  22. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/rules-global/no-icons-emojis.mdc +0 -0
  23. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/rules-global/no-unsolicited-docs.mdc +0 -0
  24. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/scripts/bootstrap-memory-tree.sh +0 -0
  25. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/scripts/compact-memory.sh +0 -0
  26. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/scripts/doctor.sh +0 -0
  27. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/scripts/global-knowledge-sync.sh +0 -0
  28. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/scripts/graphify-sync.sh +0 -0
  29. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/scripts/import-agent-history.sh +0 -0
  30. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/scripts/install-project-links.sh +0 -0
  31. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/scripts/lib/knowledge-common.sh +0 -0
  32. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/scripts/measure-token-savings.py +0 -0
  33. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/scripts/ship.sh +0 -0
  34. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/scripts/update-knowledge.sh +0 -0
  35. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/scripts/validate-knowledge.sh +0 -0
  36. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/skills/SKILLS.md +0 -0
  37. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/skills/branch-note-convention/SKILL.md +0 -0
  38. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/skills/clean-web-import/SKILL.md +0 -0
  39. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/skills/decision-recording/SKILL.md +0 -0
  40. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/skills/evidence-handling/SKILL.md +0 -0
  41. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/skills/history-backfill/SKILL.md +0 -0
  42. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/skills/memory-compaction/SKILL.md +0 -0
  43. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/skills/memory-management/SKILL.md +0 -0
  44. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/skills/obsidian-compatible-writing/SKILL.md +0 -0
  45. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/skills/ontology-inference/SKILL.md +0 -0
  46. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/skills/project-memory-writing/SKILL.md +0 -0
  47. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/skills/project-ontology-bootstrap/SKILL.md +0 -0
  48. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/skills/session-management/SKILL.md +0 -0
  49. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/skills-cursor/create-rule/SKILL.md +0 -0
  50. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/skills-cursor/create-skill/SKILL.md +0 -0
  51. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/skills-cursor/create-subagent/SKILL.md +0 -0
  52. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/skills-cursor/migrate-to-skills/SKILL.md +0 -0
  53. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/skills-cursor/shell/SKILL.md +0 -0
  54. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/skills-cursor/update-cursor-settings/SKILL.md +0 -0
  55. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/dashboards/project-overview.template.md +0 -0
  56. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/dashboards/session-rollup.template.md +0 -0
  57. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/hooks/hooks.json.template +0 -0
  58. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/integrations/claude/CLAUDE.md +0 -0
  59. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/integrations/codex/AGENTS.md +0 -0
  60. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/integrations/cursor/agent-knowledge.mdc +0 -0
  61. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/integrations/cursor/commands/memory-update.md +0 -0
  62. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/integrations/cursor/commands/system-update.md +0 -0
  63. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/integrations/cursor/hooks.json +0 -0
  64. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/memory/MEMORY.root.template.md +0 -0
  65. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/memory/branch.template.md +0 -0
  66. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/memory/decision.template.md +0 -0
  67. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/memory/profile.hybrid.yaml +0 -0
  68. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/memory/profile.ml-platform.yaml +0 -0
  69. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/memory/profile.robotics.yaml +0 -0
  70. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/memory/profile.web-app.yaml +0 -0
  71. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/portfolio/.obsidian/README.md +0 -0
  72. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/portfolio/.obsidian/app.json +0 -0
  73. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/portfolio/.obsidian/core-plugins.json +0 -0
  74. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/project/.agent-project.yaml +0 -0
  75. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/project/.agentknowledgeignore +0 -0
  76. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/project/AGENTS.md +0 -0
  77. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/project/agent-knowledge/.obsidian/README.md +0 -0
  78. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/project/agent-knowledge/.obsidian/app.json +0 -0
  79. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/project/agent-knowledge/.obsidian/core-plugins.json +0 -0
  80. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/project/agent-knowledge/Evidence/README.md +0 -0
  81. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/project/agent-knowledge/Evidence/captures/README.md +0 -0
  82. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/project/agent-knowledge/Evidence/imports/README.md +0 -0
  83. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/project/agent-knowledge/Evidence/raw/README.md +0 -0
  84. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/project/agent-knowledge/Memory/MEMORY.md +0 -0
  85. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/project/agent-knowledge/Memory/decisions/decisions.md +0 -0
  86. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/project/agent-knowledge/Outputs/README.md +0 -0
  87. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/project/agent-knowledge/STATUS.md +0 -0
  88. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/project/agent-knowledge/Sessions/README.md +0 -0
  89. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/project/agent-knowledge/Templates/README.md +0 -0
  90. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/assets/templates/project/gitignore.agent-knowledge +0 -0
  91. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/pyproject.toml +0 -0
  92. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/src/agent_knowledge/__main__.py +0 -0
  93. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/src/agent_knowledge/assets/__init__.py +0 -0
  94. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/src/agent_knowledge/cli.py +0 -0
  95. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/src/agent_knowledge/runtime/__init__.py +0 -0
  96. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/src/agent_knowledge/runtime/canvas.py +0 -0
  97. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/src/agent_knowledge/runtime/capture.py +0 -0
  98. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/src/agent_knowledge/runtime/history.py +0 -0
  99. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/src/agent_knowledge/runtime/importer.py +0 -0
  100. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/src/agent_knowledge/runtime/index.py +0 -0
  101. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/src/agent_knowledge/runtime/integrations.py +0 -0
  102. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/src/agent_knowledge/runtime/paths.py +0 -0
  103. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/src/agent_knowledge/runtime/refresh.py +0 -0
  104. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/src/agent_knowledge/runtime/shell.py +0 -0
  105. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/src/agent_knowledge/runtime/site.py +0 -0
  106. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/src/agent_knowledge/runtime/sync.py +0 -0
  107. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/src/agent_knowledge/runtime/viewer.py +0 -0
  108. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/tests/__init__.py +0 -0
  109. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/tests/test_cli.py +0 -0
  110. {agent_knowledge_cli-0.2.3 → agent_knowledge_cli-0.2.4}/tests/test_packaging.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agent-knowledge-cli
3
- Version: 0.2.3
3
+ Version: 0.2.4
4
4
  Summary: Adaptive, file-based project knowledge for AI coding agents
5
5
  Author: agent-knowledge contributors
6
6
  License-Expression: MIT
@@ -32,24 +32,22 @@ just markdown files and a CLI.
32
32
 
33
33
  ## Install
34
34
 
35
- ```
35
+ ```bash
36
36
  pip install agent-knowledge-cli
37
37
  ```
38
38
 
39
- This installs the `agent-knowledge` command. PyPI package name is `agent-knowledge-cli`;
40
- the CLI command and all documentation refer to it as `agent-knowledge`.
39
+ PyPI package name: `agent-knowledge-cli`. CLI command and all docs: `agent-knowledge`.
41
40
 
42
41
  ## Quick Start
43
42
 
44
43
  ```bash
45
- pip install agent-knowledge-cli
46
44
  cd your-project
47
45
  agent-knowledge init
48
46
  ```
49
47
 
50
- Open Cursor in the repo — the agent picks up from there automatically.
48
+ Open Cursor — the agent picks up from there automatically.
51
49
 
52
- `init` installs everything needed in the project:
50
+ `init` does everything in one shot:
53
51
  - infers the project slug from the directory name
54
52
  - creates an external knowledge vault at `~/agent-os/projects/<slug>/`
55
53
  - symlinks `./agent-knowledge` into the repo as the local handle
@@ -58,46 +56,44 @@ Open Cursor in the repo — the agent picks up from there automatically.
58
56
  - installs `.cursor/commands/memory-update.md` and `system-update.md` — slash commands
59
57
  - detects Claude and Codex and installs their bridge files if present
60
58
  - bootstraps the memory tree and marks onboarding as `pending`
61
- - backfills lightweight history from git (if existing repo)
59
+ - imports repo history into `Evidence/` automatically
60
+ - backfills lightweight history from git
62
61
 
63
62
  ## How It Works
64
63
 
65
- ```
66
- your-project/
67
- .agent-project.yaml # project config
68
- AGENTS.md # instructions agents read on startup
69
- agent-knowledge/ # symlink -> ~/agent-os/projects/<slug>/
70
- STATUS.md # onboarding state + sync timestamps
71
- Memory/ # curated, durable knowledge (source of truth)
72
- MEMORY.md
73
- stack.md
74
- decisions/
75
- decisions.md
76
- Evidence/ # imported or extracted material (not canonical)
77
- raw/
78
- imports/
79
- captures/ # automatic event stream
80
- Outputs/ # generated views (never canonical)
81
- knowledge-index.json
82
- knowledge-index.md
83
- knowledge-export.html
84
- Sessions/ # ephemeral session state
85
- ```
86
-
87
- Knowledge lives **outside** the repo so it persists across branches, tools,
88
- and clones. The symlink gives every tool a stable `./agent-knowledge` path.
64
+ Knowledge lives **outside** the repo at `~/agent-os/projects/<slug>/` so it persists
65
+ across branches, tools, and clones. The symlink `./agent-knowledge` gives every tool
66
+ a stable local handle.
89
67
 
90
68
  ### Architecture boundaries
91
69
 
92
70
  | Folder | Role | Canonical? |
93
71
  |--------|------|-----------|
94
- | `Memory/` | Curated, durable facts -- source of truth | Yes |
72
+ | `Memory/` | Curated, durable facts source of truth | Yes |
73
+ | `History/` | What happened over time — lightweight diary | Yes (diary) |
95
74
  | `Evidence/` | Imported/extracted material, event stream | No |
96
75
  | `Outputs/` | Generated views, indexes, HTML export | No |
97
76
  | `Sessions/` | Ephemeral session state, prune aggressively | No |
98
77
 
99
78
  Evidence is never auto-promoted into Memory. Outputs are never treated as truth.
100
- Only agents and humans deliberately write to Memory.
79
+ Only agents and humans deliberately write to Memory or History.
80
+
81
+ ## Obsidian-ready
82
+
83
+ The knowledge vault at `~/agent-os/projects/<slug>/` is a valid Obsidian vault.
84
+ Open it directly for backlinks, graph view, and note navigation.
85
+
86
+ ![Obsidian graph view of a project knowledge vault](docs/obsidian-graph.png)
87
+
88
+ For a spatial canvas of the knowledge graph:
89
+
90
+ ```bash
91
+ agent-knowledge export-canvas
92
+ # produces: agent-knowledge/Outputs/knowledge-export.canvas
93
+ ```
94
+
95
+ The vault is designed to work well in Obsidian — good markdown, YAML frontmatter,
96
+ branch-note convention, internal links. But everything works without it too.
101
97
 
102
98
  ### Automatic capture
103
99
 
@@ -120,33 +116,65 @@ on every sync. It provides a compact catalog of all notes so agents can:
120
116
  Use `agent-knowledge search <query>` to run a quick Layer 2 shortlist query
121
117
  from the command line or a hook.
122
118
 
123
- #
119
+ ## Cursor-first runtime
120
+
121
+ Cursor is the primary supported runtime path. The project carries everything
122
+ it needs — opening the repo in Cursor is enough to get automatic behavior:
123
+
124
+ | What is installed | What it does |
125
+ |------------------|-------------|
126
+ | `.cursor/rules/agent-knowledge.mdc` | Always-on rule: loads memory context on every session |
127
+ | `.cursor/hooks.json` | Lifecycle hooks: sync on start, update on write, sync on stop and pre-compact |
128
+ | `.cursor/commands/memory-update.md` | `/memory-update` slash command |
129
+ | `.cursor/commands/system-update.md` | `/system-update` slash command |
130
+
131
+ ### Session lifecycle
132
+
133
+ When you open the project in Cursor, the hooks fire automatically:
134
+
135
+ - **session-start** — runs `agent-knowledge sync` to load fresh vault state
136
+ - **post-write** — runs `agent-knowledge update` after each file save
137
+ - **stop** — runs `agent-knowledge sync` at end of each task
138
+ - **preCompact** — runs `agent-knowledge sync` before context compaction
139
+
140
+ The rule ensures the agent reads `STATUS.md` and `Memory/MEMORY.md` at the
141
+ start of every session, with no manual prompting required.
142
+
143
+ ### Slash commands
144
+
145
+ Inside any Cursor session in this project:
146
+
147
+ - `/memory-update` — sync, review session work, write stable facts to `Memory/`, summarize
148
+ - `/system-update` — refresh integration files to the latest framework version
149
+
150
+ These are project-local. They work because `init` installed them in `.cursor/commands/`.
151
+
152
+ ### Integration health
153
+
154
+ ```bash
155
+ agent-knowledge doctor
156
+ ```
157
+
158
+ Reports whether rules, hooks, and commands are all installed and current.
159
+ If any file is stale or missing, `doctor` suggests `agent-knowledge refresh-system`.
160
+
124
161
  ## Commands
125
162
 
126
163
  | Command | What it does |
127
164
  |---------|-------------|
128
- | `init` | Set up a project (zero-arg, auto-detects everything) |
129
- | `sync` | Memory sync + session rollup + git evidence + capture + index |
130
- | `doctor` | Validate setup and report health |
131
- | `update` | Sync project changes into the knowledge tree |
132
- | `import` | Import repo history into Evidence/ |
133
- | `ship` | Validate, sync, commit, push |
134
- | `bootstrap` | Create or repair the memory tree |
135
- | `setup` | Install global Cursor rules and skills |
136
- | `global-sync` | Import safe local tooling config |
137
- | `graphify-sync` | Import graph/discovery artifacts |
138
- | `compact` | Prune stale memory and old captures |
139
- | `index` | Regenerate the knowledge index in Outputs/ |
165
+ | `init` | Set up a project — one command, no arguments needed |
166
+ | `sync` | Full sync: memory, history, git evidence, index |
167
+ | `doctor` | Validate setup, integration health, version staleness |
168
+ | `ship` | Validate + sync + commit + push |
140
169
  | `search <query>` | Search the knowledge index (Memory-first) |
141
- | `export-html` | Build polished static site in Outputs/site/ |
142
- | `view` | Build site and open it in the browser |
143
- | `clean-import <url>` | Import a URL or HTML file as cleaned evidence |
144
- | `refresh-system` | Refresh integration files to the current framework version |
145
- | `export-canvas` | Export vault as an Obsidian Canvas file (optional) |
146
- | `backfill-history` | Backfill lightweight project history from git |
147
- | `measure-tokens` | Estimate context token savings |
170
+ | `export-html` | Build a polished static site from the vault |
171
+ | `view` | Build site and open in browser |
172
+ | `clean-import <url>` | Import a URL as cleaned, non-canonical evidence |
173
+ | `refresh-system` | Refresh all integration files to the current framework version |
174
+ | `backfill-history` | Rebuild lightweight project history from git |
175
+ | `compact` | Prune stale captures and old session state |
148
176
 
149
- All write commands support `--dry-run`. Use `--json` for machine-readable output.
177
+ All write commands support `--dry-run` and `--json`. Run `agent-knowledge --help` for the full command list.
150
178
 
151
179
  ## Static site export with graph
152
180
 
@@ -227,65 +255,6 @@ Strips navigation, ads, scripts, and boilerplate. Writes clean markdown with
227
255
  YAML frontmatter marking it as non-canonical. Verify facts before promoting
228
256
  any content to Memory/.
229
257
 
230
- ## Obsidian (optional)
231
-
232
- Obsidian is an **optional** viewer/editor. agent-knowledge is not Obsidian-centric.
233
-
234
- Open `~/agent-os/projects/<slug>/` as an Obsidian vault for backlinks and graph view.
235
-
236
- ![Obsidian graph view of a project knowledge vault](docs/obsidian-graph.png)
237
-
238
- For an optional spatial canvas of the knowledge graph:
239
-
240
- ```
241
- agent-knowledge export-canvas
242
- # produces: agent-knowledge/Outputs/knowledge-export.canvas
243
- # open in Obsidian with Core plugins > Canvas
244
- ```
245
-
246
- All Obsidian-specific features are optional. The system works fully without Obsidian.
247
-
248
- ## Cursor-first runtime
249
-
250
- Cursor is the primary supported runtime path. The project carries everything
251
- it needs — opening the repo in Cursor is enough to get automatic behavior:
252
-
253
- | What is installed | What it does |
254
- |------------------|-------------|
255
- | `.cursor/rules/agent-knowledge.mdc` | Always-on rule: loads memory context on every session |
256
- | `.cursor/hooks.json` | Lifecycle hooks: sync on start, update on write, sync on stop and pre-compact |
257
- | `.cursor/commands/memory-update.md` | `/memory-update` slash command |
258
- | `.cursor/commands/system-update.md` | `/system-update` slash command |
259
-
260
- ### Session lifecycle
261
-
262
- When you open the project in Cursor, the hooks fire automatically:
263
-
264
- - **session-start** — runs `agent-knowledge sync` to load fresh vault state
265
- - **post-write** — runs `agent-knowledge update` after each file save
266
- - **stop** — runs `agent-knowledge sync` at end of each task
267
- - **preCompact** — runs `agent-knowledge sync` before context compaction
268
-
269
- The rule ensures the agent reads `STATUS.md` and `Memory/MEMORY.md` at the
270
- start of every session, with no manual prompting required.
271
-
272
- ### Slash commands
273
-
274
- Inside any Cursor session in this project:
275
-
276
- - `/memory-update` — triggers a guided memory update flow: sync, review session work, write stable facts to `Memory/`, summarize
277
- - `/system-update` — refreshes the project's integration files to the latest framework version
278
-
279
- These are project-local commands. They work because `init` installed them in `.cursor/commands/`.
280
-
281
- ### Checking integration health
282
-
283
- ```bash
284
- agent-knowledge doctor
285
- ```
286
-
287
- Reports whether rules, hooks, and commands are all installed and current. If any
288
- integration file is stale, `doctor` suggests `agent-knowledge refresh-system`.
289
258
 
290
259
  ## Multi-Tool Support
291
260
 
@@ -368,6 +337,7 @@ Common issues:
368
337
  - Onboarding still pending: paste the init prompt into your agent
369
338
  - Stale index: run `agent-knowledge index` or `agent-knowledge sync`
370
339
  - Large notes: run `agent-knowledge compact`
340
+ - **Wrong binary**: another tool (e.g. graphify) may install a Node.js `agent-knowledge` that shadows ours. Check with `which -a agent-knowledge`. Fix: add the Python bin to PATH before nvm — `export PATH="$(python3 -c 'import sysconfig; print(sysconfig.get_path("scripts"))'):$PATH"` — or invoke directly: `python3 -m agent_knowledge`
371
341
 
372
342
  ## Platform Support
373
343
 
@@ -8,24 +8,22 @@ just markdown files and a CLI.
8
8
 
9
9
  ## Install
10
10
 
11
- ```
11
+ ```bash
12
12
  pip install agent-knowledge-cli
13
13
  ```
14
14
 
15
- This installs the `agent-knowledge` command. PyPI package name is `agent-knowledge-cli`;
16
- the CLI command and all documentation refer to it as `agent-knowledge`.
15
+ PyPI package name: `agent-knowledge-cli`. CLI command and all docs: `agent-knowledge`.
17
16
 
18
17
  ## Quick Start
19
18
 
20
19
  ```bash
21
- pip install agent-knowledge-cli
22
20
  cd your-project
23
21
  agent-knowledge init
24
22
  ```
25
23
 
26
- Open Cursor in the repo — the agent picks up from there automatically.
24
+ Open Cursor — the agent picks up from there automatically.
27
25
 
28
- `init` installs everything needed in the project:
26
+ `init` does everything in one shot:
29
27
  - infers the project slug from the directory name
30
28
  - creates an external knowledge vault at `~/agent-os/projects/<slug>/`
31
29
  - symlinks `./agent-knowledge` into the repo as the local handle
@@ -34,46 +32,44 @@ Open Cursor in the repo — the agent picks up from there automatically.
34
32
  - installs `.cursor/commands/memory-update.md` and `system-update.md` — slash commands
35
33
  - detects Claude and Codex and installs their bridge files if present
36
34
  - bootstraps the memory tree and marks onboarding as `pending`
37
- - backfills lightweight history from git (if existing repo)
35
+ - imports repo history into `Evidence/` automatically
36
+ - backfills lightweight history from git
38
37
 
39
38
  ## How It Works
40
39
 
41
- ```
42
- your-project/
43
- .agent-project.yaml # project config
44
- AGENTS.md # instructions agents read on startup
45
- agent-knowledge/ # symlink -> ~/agent-os/projects/<slug>/
46
- STATUS.md # onboarding state + sync timestamps
47
- Memory/ # curated, durable knowledge (source of truth)
48
- MEMORY.md
49
- stack.md
50
- decisions/
51
- decisions.md
52
- Evidence/ # imported or extracted material (not canonical)
53
- raw/
54
- imports/
55
- captures/ # automatic event stream
56
- Outputs/ # generated views (never canonical)
57
- knowledge-index.json
58
- knowledge-index.md
59
- knowledge-export.html
60
- Sessions/ # ephemeral session state
61
- ```
62
-
63
- Knowledge lives **outside** the repo so it persists across branches, tools,
64
- and clones. The symlink gives every tool a stable `./agent-knowledge` path.
40
+ Knowledge lives **outside** the repo at `~/agent-os/projects/<slug>/` so it persists
41
+ across branches, tools, and clones. The symlink `./agent-knowledge` gives every tool
42
+ a stable local handle.
65
43
 
66
44
  ### Architecture boundaries
67
45
 
68
46
  | Folder | Role | Canonical? |
69
47
  |--------|------|-----------|
70
- | `Memory/` | Curated, durable facts -- source of truth | Yes |
48
+ | `Memory/` | Curated, durable facts source of truth | Yes |
49
+ | `History/` | What happened over time — lightweight diary | Yes (diary) |
71
50
  | `Evidence/` | Imported/extracted material, event stream | No |
72
51
  | `Outputs/` | Generated views, indexes, HTML export | No |
73
52
  | `Sessions/` | Ephemeral session state, prune aggressively | No |
74
53
 
75
54
  Evidence is never auto-promoted into Memory. Outputs are never treated as truth.
76
- Only agents and humans deliberately write to Memory.
55
+ Only agents and humans deliberately write to Memory or History.
56
+
57
+ ## Obsidian-ready
58
+
59
+ The knowledge vault at `~/agent-os/projects/<slug>/` is a valid Obsidian vault.
60
+ Open it directly for backlinks, graph view, and note navigation.
61
+
62
+ ![Obsidian graph view of a project knowledge vault](docs/obsidian-graph.png)
63
+
64
+ For a spatial canvas of the knowledge graph:
65
+
66
+ ```bash
67
+ agent-knowledge export-canvas
68
+ # produces: agent-knowledge/Outputs/knowledge-export.canvas
69
+ ```
70
+
71
+ The vault is designed to work well in Obsidian — good markdown, YAML frontmatter,
72
+ branch-note convention, internal links. But everything works without it too.
77
73
 
78
74
  ### Automatic capture
79
75
 
@@ -96,33 +92,65 @@ on every sync. It provides a compact catalog of all notes so agents can:
96
92
  Use `agent-knowledge search <query>` to run a quick Layer 2 shortlist query
97
93
  from the command line or a hook.
98
94
 
99
- #
95
+ ## Cursor-first runtime
96
+
97
+ Cursor is the primary supported runtime path. The project carries everything
98
+ it needs — opening the repo in Cursor is enough to get automatic behavior:
99
+
100
+ | What is installed | What it does |
101
+ |------------------|-------------|
102
+ | `.cursor/rules/agent-knowledge.mdc` | Always-on rule: loads memory context on every session |
103
+ | `.cursor/hooks.json` | Lifecycle hooks: sync on start, update on write, sync on stop and pre-compact |
104
+ | `.cursor/commands/memory-update.md` | `/memory-update` slash command |
105
+ | `.cursor/commands/system-update.md` | `/system-update` slash command |
106
+
107
+ ### Session lifecycle
108
+
109
+ When you open the project in Cursor, the hooks fire automatically:
110
+
111
+ - **session-start** — runs `agent-knowledge sync` to load fresh vault state
112
+ - **post-write** — runs `agent-knowledge update` after each file save
113
+ - **stop** — runs `agent-knowledge sync` at end of each task
114
+ - **preCompact** — runs `agent-knowledge sync` before context compaction
115
+
116
+ The rule ensures the agent reads `STATUS.md` and `Memory/MEMORY.md` at the
117
+ start of every session, with no manual prompting required.
118
+
119
+ ### Slash commands
120
+
121
+ Inside any Cursor session in this project:
122
+
123
+ - `/memory-update` — sync, review session work, write stable facts to `Memory/`, summarize
124
+ - `/system-update` — refresh integration files to the latest framework version
125
+
126
+ These are project-local. They work because `init` installed them in `.cursor/commands/`.
127
+
128
+ ### Integration health
129
+
130
+ ```bash
131
+ agent-knowledge doctor
132
+ ```
133
+
134
+ Reports whether rules, hooks, and commands are all installed and current.
135
+ If any file is stale or missing, `doctor` suggests `agent-knowledge refresh-system`.
136
+
100
137
  ## Commands
101
138
 
102
139
  | Command | What it does |
103
140
  |---------|-------------|
104
- | `init` | Set up a project (zero-arg, auto-detects everything) |
105
- | `sync` | Memory sync + session rollup + git evidence + capture + index |
106
- | `doctor` | Validate setup and report health |
107
- | `update` | Sync project changes into the knowledge tree |
108
- | `import` | Import repo history into Evidence/ |
109
- | `ship` | Validate, sync, commit, push |
110
- | `bootstrap` | Create or repair the memory tree |
111
- | `setup` | Install global Cursor rules and skills |
112
- | `global-sync` | Import safe local tooling config |
113
- | `graphify-sync` | Import graph/discovery artifacts |
114
- | `compact` | Prune stale memory and old captures |
115
- | `index` | Regenerate the knowledge index in Outputs/ |
141
+ | `init` | Set up a project — one command, no arguments needed |
142
+ | `sync` | Full sync: memory, history, git evidence, index |
143
+ | `doctor` | Validate setup, integration health, version staleness |
144
+ | `ship` | Validate + sync + commit + push |
116
145
  | `search <query>` | Search the knowledge index (Memory-first) |
117
- | `export-html` | Build polished static site in Outputs/site/ |
118
- | `view` | Build site and open it in the browser |
119
- | `clean-import <url>` | Import a URL or HTML file as cleaned evidence |
120
- | `refresh-system` | Refresh integration files to the current framework version |
121
- | `export-canvas` | Export vault as an Obsidian Canvas file (optional) |
122
- | `backfill-history` | Backfill lightweight project history from git |
123
- | `measure-tokens` | Estimate context token savings |
146
+ | `export-html` | Build a polished static site from the vault |
147
+ | `view` | Build site and open in browser |
148
+ | `clean-import <url>` | Import a URL as cleaned, non-canonical evidence |
149
+ | `refresh-system` | Refresh all integration files to the current framework version |
150
+ | `backfill-history` | Rebuild lightweight project history from git |
151
+ | `compact` | Prune stale captures and old session state |
124
152
 
125
- All write commands support `--dry-run`. Use `--json` for machine-readable output.
153
+ All write commands support `--dry-run` and `--json`. Run `agent-knowledge --help` for the full command list.
126
154
 
127
155
  ## Static site export with graph
128
156
 
@@ -203,65 +231,6 @@ Strips navigation, ads, scripts, and boilerplate. Writes clean markdown with
203
231
  YAML frontmatter marking it as non-canonical. Verify facts before promoting
204
232
  any content to Memory/.
205
233
 
206
- ## Obsidian (optional)
207
-
208
- Obsidian is an **optional** viewer/editor. agent-knowledge is not Obsidian-centric.
209
-
210
- Open `~/agent-os/projects/<slug>/` as an Obsidian vault for backlinks and graph view.
211
-
212
- ![Obsidian graph view of a project knowledge vault](docs/obsidian-graph.png)
213
-
214
- For an optional spatial canvas of the knowledge graph:
215
-
216
- ```
217
- agent-knowledge export-canvas
218
- # produces: agent-knowledge/Outputs/knowledge-export.canvas
219
- # open in Obsidian with Core plugins > Canvas
220
- ```
221
-
222
- All Obsidian-specific features are optional. The system works fully without Obsidian.
223
-
224
- ## Cursor-first runtime
225
-
226
- Cursor is the primary supported runtime path. The project carries everything
227
- it needs — opening the repo in Cursor is enough to get automatic behavior:
228
-
229
- | What is installed | What it does |
230
- |------------------|-------------|
231
- | `.cursor/rules/agent-knowledge.mdc` | Always-on rule: loads memory context on every session |
232
- | `.cursor/hooks.json` | Lifecycle hooks: sync on start, update on write, sync on stop and pre-compact |
233
- | `.cursor/commands/memory-update.md` | `/memory-update` slash command |
234
- | `.cursor/commands/system-update.md` | `/system-update` slash command |
235
-
236
- ### Session lifecycle
237
-
238
- When you open the project in Cursor, the hooks fire automatically:
239
-
240
- - **session-start** — runs `agent-knowledge sync` to load fresh vault state
241
- - **post-write** — runs `agent-knowledge update` after each file save
242
- - **stop** — runs `agent-knowledge sync` at end of each task
243
- - **preCompact** — runs `agent-knowledge sync` before context compaction
244
-
245
- The rule ensures the agent reads `STATUS.md` and `Memory/MEMORY.md` at the
246
- start of every session, with no manual prompting required.
247
-
248
- ### Slash commands
249
-
250
- Inside any Cursor session in this project:
251
-
252
- - `/memory-update` — triggers a guided memory update flow: sync, review session work, write stable facts to `Memory/`, summarize
253
- - `/system-update` — refreshes the project's integration files to the latest framework version
254
-
255
- These are project-local commands. They work because `init` installed them in `.cursor/commands/`.
256
-
257
- ### Checking integration health
258
-
259
- ```bash
260
- agent-knowledge doctor
261
- ```
262
-
263
- Reports whether rules, hooks, and commands are all installed and current. If any
264
- integration file is stale, `doctor` suggests `agent-knowledge refresh-system`.
265
234
 
266
235
  ## Multi-Tool Support
267
236
 
@@ -344,6 +313,7 @@ Common issues:
344
313
  - Onboarding still pending: paste the init prompt into your agent
345
314
  - Stale index: run `agent-knowledge index` or `agent-knowledge sync`
346
315
  - Large notes: run `agent-knowledge compact`
316
+ - **Wrong binary**: another tool (e.g. graphify) may install a Node.js `agent-knowledge` that shadows ours. Check with `which -a agent-knowledge`. Fix: add the Python bin to PATH before nvm — `export PATH="$(python3 -c 'import sysconfig; print(sysconfig.get_path("scripts"))'):$PATH"` — or invoke directly: `python3 -m agent_knowledge`
347
317
 
348
318
  ## Platform Support
349
319
 
@@ -1,3 +1,3 @@
1
1
  """agent-knowledge: adaptive, file-based project knowledge for AI coding agents."""
2
2
 
3
- __version__ = "0.2.3"
3
+ __version__ = "0.2.4"