Skip to content

armgit / cogit

Public Imported from GitHub
0

Git for the intent behind agent-written code. Records what your coding agent decided and why, and links every commit to it.

feat(plugin): ship the npm package as a Claude Code plugin with a marketplace

Eren4be004a27641
diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json
new file mode 100644
index 0000000..d086203
--- /dev/null
+++ b/.claude-plugin/marketplace.json
@@ -0,0 +1,12 @@
+{
+ "name": "codelineage",
+ "description": "codelineage: the lineage of your AI coding sessions.",
+ "owner": { "name": "Eren Sertkaya" },
+ "plugins": [
+ {
+ "name": "codelineage",
+ "source": { "source": "npm", "package": "codelineage" },
+ "description": "Records what each session decided and why, and renders it as a static map."
+ }
+ ]
+}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6d8f4ad..f38b450 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
+### Added
+- Claude Code plugin skeleton: the `codelineage` npm package is also the plugin (`.claude-plugin/plugin.json`, bundled `dist/cli.js`), and the repository root carries a `codelineage` marketplace that installs it from npm.
+
+### Changed
+- `commander`, `zod` and `@inquirer/prompts` moved to `devDependencies`: they are bundled into `dist/cli.js`, so installing the package pulls in no runtime dependencies.
+
### Fixed
- Status card: goal, done, pending and next now come from the most recently updated session that recorded a status, so a newer session without one no longer blanks the card; last activity still tracks the newest session.
- `codelineage build` printed each skipped-session warning twice (once for the map, once for the panel); the panel now stays quiet about the project just built.
diff --git a/package-lock.json b/package-lock.json
index eefec94..250a32a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -736,6 +736,7 @@
"version": "2.0.9",
"resolved": "https://registry.npmjs.org/@inquirer/ansi/-/ansi-2.0.9.tgz",
"integrity": "sha512-0Ywt3S8tqM6TWUcsRlBFQ1x+X3/o8kktX0ZiKAnByYb9GFDknnOhse1PVtfiD2BXPI8ar+BWx9PV9R0lQIcygw==",
+ "dev": true,
"license": "MIT",
"engines": {
"node": ">=23.5.0 || ^22.13.0 || ^20.17.0"
@@ -745,6 +746,7 @@
"version": "5.2.7",
"resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-5.2.7.tgz",
"integrity": "sha512-/+QmGE/9bvE/EobaZDnzYe+T+QWoJrnmxwBQNtoi2OVSUR9d1znYsNyEoUrOZvFSxDYttrhzRIpXpaLkN+iIsg==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"@inquirer/ansi": "^2.0.9",
@@ -768,6 +770,7 @@
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-6.3.4.tgz",
"integrity": "sha512-ZwnaZZDa1zxsyVrN32s447ydMnKcw7e8WWNT+R+Qsu0zAn8Rs6yi9d1B80Kob1Ul2cfUi7t8JD2t4/K7uEZpqA==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"@inquirer/core": "^12.0.5",
@@ -789,6 +792,7 @@
"version": "12.0.5",
"resolved": "https://registry.npmjs.org/@inquirer/core/-/core-12.0.5.tgz",
"integrity": "sha512-c0ZSnO9oVk/IlEGoZK3u8b3IZQeu9I6jUkXJSQnQEVRXsjKvtAq3AGqFL2LgfJhlzMZne08pZHWRWasIcI3Rew==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"@inquirer/ansi": "^2.0.9",
@@ -815,6 +819,7 @@
"version": "5.3.5",
"resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-5.3.5.tgz",
"integrity": "sha512-6lU3/pPx5z3lHWejFW061MV4qZooBQYv/+EeGhNOPiP/i+hrYsHfxxBnnDGsAfg8YdLUd69YckoeOjtr3QuAUg==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"@inquirer/core": "^12.0.5",
@@ -837,6 +842,7 @@
"version": "5.1.7",
"resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-5.1.7.tgz",
"integrity": "sha512-eiJ31YFCaB6fLoJCqLIn8S6eqUyME6vwr8KcP5h8cxmA+bV9RRVPO+kywoxb7G63HduDXV6sN/SM7o2R+ahEcQ==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"@inquirer/core": "^12.0.5",
@@ -858,6 +864,7 @@
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-3.0.6.tgz",
"integrity": "sha512-rWmw6WG8JZ7LMn/srXEylYGhL6EXXJeROE7/4x4GREh6NgzqJBDbIgpNGsYoLPfobeb4VZtEYzPGnT5EFNYhiQ==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"chardet": "^2.1.1",
@@ -879,6 +886,7 @@
"version": "2.0.9",
"resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-2.0.9.tgz",
"integrity": "sha512-EAWgUTGQ/Umgga51dE3B2PUHbufuXarDfg86uVgoSgNHNNQnyFKcOrQLWVqYMghuSyHh8+2HUH0Js9cTC1WAdg==",
+ "dev": true,
"license": "MIT",
"engines": {
"node": ">=23.5.0 || ^22.13.0 || ^20.17.0"
@@ -888,6 +896,7 @@
"version": "5.1.8",
"resolved": "https://registry.npmjs.org/@inquirer/input/-/input-5.1.8.tgz",
"integrity": "sha512-psOSTgkL8y/OtgJJYbqJ0oISr2QBE0U1Ro/qQdA/EKjeJiwiUTQgQmq8o4ESNzVOWthIeh3YLD7BCUR9dKnR5g==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"@inquirer/core": "^12.0.5",
@@ -909,6 +918,7 @@
"version": "4.2.5",
"resolved": "https://registry.npmjs.org/@inquirer/number/-/number-4.2.5.tgz",
"integrity": "sha512-lEy7LWsdF5qHx5QjHZqabUqM9P7i5uTMCt8GRzqxmwXXKbapKJDA+ucVflVVPAyj4snD5DTAD4L+sct85XOlOQ==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"@inquirer/core": "^12.0.5",
@@ -930,6 +940,7 @@
"version": "5.2.4",
"resolved": "https://registry.npmjs.org/@inquirer/password/-/password-5.2.4.tgz",
"integrity": "sha512-T7ir3fflSSVCYEVqNyMBq+pIMsilQRtbZcD5gxn6Ewsin5TJWBxrGBdXveWtmeXVAeoInfhS+BhBUZaL4sFSDg==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"@inquirer/ansi": "^2.0.9",
@@ -952,6 +963,7 @@
"version": "8.7.4",
"resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-8.7.4.tgz",
"integrity": "sha512-SAJt+QhY5rOJAIgZBw9TrHWfgrp6wsb9cqRCyqax+Hl6EiFfRXmD9EsIWkST8yq/dQ8H46Is2Sr/JG7Ls/LQ+Q==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"@inquirer/checkbox": "^5.2.7",
@@ -981,6 +993,7 @@
"version": "5.3.7",
"resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-5.3.7.tgz",
"integrity": "sha512-XveEe8v3BHj9ec00n+9i8FHjWhXjS6+jCTizYvXCqKUKtgkrq9xid8S5j3mYGW96qfxG3mwNoud3m3v8GDk9Pw==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"@inquirer/core": "^12.0.5",
@@ -1002,6 +1015,7 @@
"version": "4.3.5",
"resolved": "https://registry.npmjs.org/@inquirer/search/-/search-4.3.5.tgz",
"integrity": "sha512-kIUecMugEN2YTvTmff+uYz0nAE0f9RFNDVZknfrh264vAQM9P8tnsXiUp7z8XbGuNIBEtFMJhvc9QquawpC46A==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"@inquirer/core": "^12.0.5",
@@ -1024,6 +1038,7 @@
"version": "5.2.7",
"resolved": "https://registry.npmjs.org/@inquirer/select/-/select-5.2.7.tgz",
"integrity": "sha512-pRDWO4dTqSAvFQdO8yclKMtXNDm9K9HmvWB5UZmT3clw2OlOBNXveHzhyFmO/0d0yJMqlPcNITus1Jtpm6t8VQ==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"@inquirer/ansi": "^2.0.9",
@@ -1047,6 +1062,7 @@
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/@inquirer/type/-/type-4.2.0.tgz",
"integrity": "sha512-2rnHX8RPo4glJYqnFc/v3nQeIhDcjyRRyaT7MGcfL/8xv/8K03SXYoA2tX06WVSKywWOE/ncbG3dtuzLjR5TCQ==",
+ "dev": true,
"license": "MIT",
"engines": {
"node": ">=23.5.0 || ^22.13.0 || ^20.17.0"
@@ -1876,7 +1892,7 @@
"version": "22.20.5",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.5.tgz",
"integrity": "sha512-U2+DNr+wSjpsTS/wZGYHq7GcwfuSmKiKvoPvK22zwTlRhU91yOniN4qRR5KhIjvif7ysw/dz/hKmfDH0Ris4aA==",
- "devOptional": true,
+ "dev": true,
"license": "MIT",
"dependencies": {
"undici-types": "~6.21.0"
@@ -2496,6 +2512,7 @@
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/chardet/-/chardet-2.2.0.tgz",
"integrity": "sha512-rddelWYNPRrXq6PtNEN2S3f6t9ILzvqaN5pVgi4kqt9jHQaXIial9PznB5iSPVlQSLNaaH22ItWz3EJtQ10+OA==",
+ "dev": true,
"license": "MIT"
},
"node_modules/chokidar": {
@@ -2524,6 +2541,7 @@
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz",
"integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==",
+ "dev": true,
"license": "ISC",
"engines": {
"node": ">= 12"
@@ -2761,12 +2779,14 @@
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/fast-string-truncated-width/-/fast-string-truncated-width-3.0.3.tgz",
"integrity": "sha512-0jjjIEL6+0jag3l2XWWizO64/aZVtpiGE3t0Zgqxv0DPuxiMjvB3M24fCyhZUO4KomJQPj3LTSUnDP3GpdwC0g==",
+ "dev": true,
"license": "MIT"
},
"node_modules/fast-string-width": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/fast-string-width/-/fast-string-width-3.0.2.tgz",
"integrity": "sha512-gX8LrtNEI5hq8DVUfRQMbr5lpaS4nMIWV+7XEbXk2b8kiQIizgnlr12B4dA3ZEx3308ze0O4Q1R+cHts8kyUJg==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"fast-string-truncated-width": "^3.0.2"
@@ -2776,6 +2796,7 @@
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/fast-wrap-ansi/-/fast-wrap-ansi-0.2.2.tgz",
"integrity": "sha512-7F2Fl+TjRSenLqlU3UjSH0iyqopqoZIu7eZVpEirP2g1GtWa2G/ecEmBdgz31+Mxr+ELclgg6sokpSFIQiZ02Q==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"fast-string-width": "^3.0.2"
@@ -2830,6 +2851,7 @@
"version": "0.7.3",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.3.tgz",
"integrity": "sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"safer-buffer": ">= 2.1.2 < 3.0.0"
@@ -3201,6 +3223,7 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-3.0.0.tgz",
"integrity": "sha512-dkEJPVvun4FryqBmZ5KhDo0K9iDXAwn08tMLDinNdRBNPcYEDiWYysLcc6k3mjTMlbP9KyylvRpd4wFtwrT9rw==",
+ "dev": true,
"license": "ISC",
"engines": {
"node": "^20.17.0 || >=22.9.0"
@@ -3511,6 +3534,7 @@
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
+ "dev": true,
"license": "MIT"
},
"node_modules/scheduler": {
@@ -3523,6 +3547,7 @@
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
"integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
+ "dev": true,
"license": "ISC",
"engines": {
"node": ">=14"
@@ -3761,7 +3786,7 @@
"version": "6.21.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
- "devOptional": true,
+ "dev": true,
"license": "MIT"
},
"node_modules/use-sync-external-store": {
@@ -3983,6 +4008,7 @@
"version": "4.6.7",
"resolved": "https://registry.npmjs.org/zod/-/zod-4.6.7.tgz",
"integrity": "sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==",
+ "dev": true,
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/colinhacks"
@@ -4020,16 +4046,14 @@
"name": "codelineage",
"version": "0.1.0",
"license": "MIT",
- "dependencies": {
- "@inquirer/prompts": "^8.7.4",
- "commander": "^15.0.0",
- "zod": "^4.6.7"
- },
"bin": {
"codelineage": "dist/cli.js"
},
"devDependencies": {
- "tsup": "^9.0.0"
+ "@inquirer/prompts": "^8.7.4",
+ "commander": "^15.0.0",
+ "tsup": "^9.0.0",
+ "zod": "^4.6.7"
},
"engines": {
"node": ">=22.13.0"
@@ -4039,6 +4063,7 @@
"version": "15.0.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-15.0.0.tgz",
"integrity": "sha512-z67u4ZhzCL/Tydu1lJARtEZYWbWaN7oYLHbsuzocr6y4N6WZAagG3RQ4FW61V1/0+jImpj293XfrcYnd1qxtPg==",
+ "dev": true,
"license": "MIT",
"engines": {
"node": ">=22.12.0"
diff --git a/packages/cli/.claude-plugin/plugin.json b/packages/cli/.claude-plugin/plugin.json
new file mode 100644
index 0000000..c22c22c
--- /dev/null
+++ b/packages/cli/.claude-plugin/plugin.json
@@ -0,0 +1,9 @@
+{
+ "name": "codelineage",
+ "displayName": "codelineage",
+ "version": "0.1.0",
+ "description": "The lineage of your AI coding sessions: records what each session decided and why, and renders it as a static map.",
+ "author": { "name": "Eren Sertkaya" },
+ "license": "MIT",
+ "keywords": ["lineage", "sessions", "history", "decisions"]
+}
diff --git a/packages/cli/package.json b/packages/cli/package.json
index 5870647..c884d23 100644
--- a/packages/cli/package.json
+++ b/packages/cli/package.json
@@ -8,7 +8,8 @@
"codelineage": "dist/cli.js"
},
"files": [
- "dist"
+ "dist",
+ ".claude-plugin"
],
"engines": {
"node": ">=22.13.0"
@@ -17,11 +18,9 @@
"build": "tsup"
},
"devDependencies": {
- "tsup": "^9.0.0"
- },
- "dependencies": {
"@inquirer/prompts": "^8.7.4",
"commander": "^15.0.0",
+ "tsup": "^9.0.0",
"zod": "^4.6.7"
}
}
diff --git a/packages/cli/test/plugin-manifest.test.ts b/packages/cli/test/plugin-manifest.test.ts
new file mode 100644
index 0000000..3039d98
--- /dev/null
+++ b/packages/cli/test/plugin-manifest.test.ts
@@ -0,0 +1,32 @@
+import { readFile } from "node:fs/promises";
+import { describe, expect, it } from "vitest";
+
+const read = async (path: string) =>
+ JSON.parse(await readFile(new URL(path, import.meta.url), "utf8")) as Record<string, unknown>;
+
+describe("plugin packaging", () => {
+ it("keeps the plugin manifest in step with the npm package", async () => {
+ const pkg = await read("../package.json");
+ const plugin = await read("../.claude-plugin/plugin.json");
+ // An npm-sourced plugin without a version resolves to "unknown" and never updates.
+ expect(plugin.version).toBe(pkg.version);
+ expect(plugin.name).toBe(pkg.name);
+ expect(pkg.files).toEqual(expect.arrayContaining(["dist", ".claude-plugin"]));
+ });
+
+ it("lists the plugin in the marketplace under its manifest name, from npm", async () => {
+ const marketplace = await read("../../../.claude-plugin/marketplace.json");
+ const pkg = await read("../package.json");
+ expect(marketplace.plugins).toEqual([
+ expect.objectContaining({
+ name: pkg.name,
+ source: { source: "npm", package: pkg.name },
+ }),
+ ]);
+ });
+
+ it("ships no runtime dependencies, since the CLI is bundled into one file", async () => {
+ const pkg = await read("../package.json");
+ expect(pkg.dependencies).toBeUndefined();
+ });
+});
diff --git a/specs/codelineage-mvp.md b/specs/codelineage-mvp.md
index ef965e3..a11414a 100644
--- a/specs/codelineage-mvp.md
+++ b/specs/codelineage-mvp.md
@@ -101,7 +101,11 @@ redaction pass, merges with the existing file and writes atomically, then runs
Distributed like OpenViking: a Claude Code plugin that ships `hooks/hooks.json`, a
skill, and a bundled build of the CLI (single file), so hooks run
`node ${CLAUDE_PLUGIN_ROOT}/dist/…` with no global install and no `npx` startup cost.
-The npm package is published separately for standalone use.
+The `codelineage` npm package is both the standalone CLI and the plugin: it ships
+`.claude-plugin/plugin.json` next to `dist/`, and the repository root holds a
+`codelineage` marketplace whose entry installs it with an `npm` source, so no build
+output is committed. `plugin.json` carries the package version, because an
+npm-sourced plugin without one resolves to version `unknown` and never updates.
Behavior verified against the Claude Code hooks docs (2026-10-21):