@drafthq/draft 2.7.1 → 2.8.1

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.
@@ -12,7 +12,7 @@
12
12
  "name": "draft",
13
13
  "source": "./",
14
14
  "description": "Context-Driven Development: draft specs and plans before implementation. Structured workflows for features and fixes.",
15
- "version": "2.7.1",
15
+ "version": "2.8.0",
16
16
  "author": {
17
17
  "name": "mayurpise"
18
18
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "draft",
3
3
  "description": "Context-Driven Development: draft specs and plans before implementation. Structured workflows for features and fixes.",
4
- "version": "2.7.1",
4
+ "version": "2.8.1",
5
5
  "author": {
6
6
  "name": "mayurpise"
7
7
  },
package/README.md CHANGED
@@ -159,7 +159,7 @@ curl -o .gemini.md https://raw.githubusercontent.com/drafthq/draft/main/integrat
159
159
 
160
160
  ## Built-in Code Intelligence
161
161
 
162
- Draft is powered by a **local knowledge graph engine** ([codebase-memory-mcp](https://github.com/DeusData/codebase-memory-mcp)) that gives every command precise structural context — module boundaries, call graphs, dependencies, hotspots. It's 100% local (no API key, no SaaS), installed on first use.
162
+ Draft is powered by a **local knowledge graph engine** ([codebase-memory-mcp](https://github.com/DeusData/codebase-memory-mcp)) that gives every command precise structural context — module boundaries, call graphs, dependencies, hotspots. It's 100% local (no API key, no SaaS), fetched during `draft install` (best-effort; `--no-graph` to skip), with first-use fetch as a fallback.
163
163
 
164
164
  ```bash
165
165
  /draft:graph # build / refresh the snapshot
@@ -2,13 +2,20 @@
2
2
 
3
3
  // Claude Code loads plugins from its own registry (via a marketplace), NOT from
4
4
  // an arbitrary project directory — so copying files into the cwd never registers
5
- // the /draft:* commands. The correct install is the `claude plugin` CLI:
6
- // claude plugin marketplace add drafthq/draft
7
- // claude plugin install draft@draft-plugins --scope <user|project>
8
- // Default scope is `user` (global, available in every project). If the `claude`
9
- // CLI isn't on PATH, we print the equivalent in-session slash commands.
5
+ // the /draft:* commands. The correct install is the `claude plugin` CLI.
6
+ //
7
+ // We run four idempotent steps so a re-run UPGRADES an existing install rather
8
+ // than no-op'ing on "already installed":
9
+ // 1. marketplace add <repo> — register the marketplace (no-op if present)
10
+ // 2. marketplace update <name> — re-fetch manifest from GitHub (the upgrade key)
11
+ // 3. plugin install <ref> — install (no-op if already installed)
12
+ // 4. plugin update <ref> — bump an existing install to the new version
13
+ // Steps 2 and 4 exit 0 when there's nothing to do, so they're safe on a fresh
14
+ // install too. Default scope is `user` (global). If the `claude` CLI isn't on
15
+ // PATH, we print the equivalent in-session slash commands.
10
16
  const MARKETPLACE_REPO = 'drafthq/draft';
11
- const PLUGIN_REF = 'draft@draft-plugins'; // name@<marketplace name from marketplace.json>
17
+ const MARKETPLACE_NAME = 'draft-plugins'; // the `name` field in .claude-plugin/marketplace.json
18
+ const PLUGIN_REF = `draft@${MARKETPLACE_NAME}`; // name@<marketplace name>
12
19
 
13
20
  module.exports = {
14
21
  id: 'claude-code',
@@ -28,19 +35,33 @@ module.exports = {
28
35
  args: ['plugin', 'marketplace', 'add', MARKETPLACE_REPO],
29
36
  label: `claude plugin marketplace add ${MARKETPLACE_REPO}`,
30
37
  },
38
+ {
39
+ kind: 'exec',
40
+ cmd: 'claude',
41
+ args: ['plugin', 'marketplace', 'update', MARKETPLACE_NAME],
42
+ label: `claude plugin marketplace update ${MARKETPLACE_NAME}`,
43
+ },
31
44
  {
32
45
  kind: 'exec',
33
46
  cmd: 'claude',
34
47
  args: ['plugin', 'install', PLUGIN_REF, '--scope', scope],
35
48
  label: `claude plugin install ${PLUGIN_REF} --scope ${scope}`,
36
49
  },
50
+ {
51
+ kind: 'exec',
52
+ cmd: 'claude',
53
+ args: ['plugin', 'update', PLUGIN_REF, '--scope', scope],
54
+ label: `claude plugin update ${PLUGIN_REF} --scope ${scope}`,
55
+ },
37
56
  ],
38
- graph: false, // /draft:init fetches the graph engine on first use
39
- done: 'Installed draft. Restart Claude Code (or start a new session), then run /draft:init.',
57
+ graph: true, // fetch the graph engine at install time (/draft:init also fetches on first use as a fallback)
58
+ done: 'Installed/updated draft. Restart Claude Code (or start a new session), then run /draft:init.',
40
59
  fallbackTitle: 'Claude Code CLI not found. Run these in Claude Code instead:',
41
60
  fallback: [
42
61
  '/plugin marketplace add drafthq/draft',
62
+ '/plugin marketplace update draft-plugins',
43
63
  '/plugin install draft',
64
+ '/plugin update draft',
44
65
  ],
45
66
  };
46
67
  },
@@ -25,7 +25,7 @@ module.exports = {
25
25
  guard: true,
26
26
  },
27
27
  ],
28
- graph: false,
28
+ graph: true,
29
29
  done: 'Wrote AGENTS.md — Codex reads it automatically from the repo root.',
30
30
  notes: ['Commit AGENTS.md so your whole team shares the Draft methodology.'],
31
31
  };
@@ -32,7 +32,7 @@ module.exports = {
32
32
  label: '~/.agents/skills/draft/',
33
33
  },
34
34
  ],
35
- graph: false,
35
+ graph: true,
36
36
  done: 'opencode reads AGENTS.md from the repo root; Draft skills bundled under ~/.agents/skills/draft/.',
37
37
  };
38
38
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drafthq/draft",
3
- "version": "2.7.1",
3
+ "version": "2.8.1",
4
4
  "description": "Context-Driven Development for AI coding agents — install Draft into Claude Code, Cursor, Codex, or opencode.",
5
5
  "bin": {
6
6
  "draft": "cli/bin/draft.js"
@@ -8,7 +8,7 @@
8
8
  # which scripts/tools/_lib.sh:find_memory_bin resolves.
9
9
  #
10
10
  # Pinned by default for reproducibility; override with CMM_VERSION (a tag, e.g.
11
- # "v0.7.0", or "latest").
11
+ # "v0.8.1", or "latest").
12
12
  #
13
13
  # Usage:
14
14
  # scripts/fetch-memory-engine.sh [--dest DIR] [--force]
@@ -21,7 +21,7 @@
21
21
  set -euo pipefail
22
22
 
23
23
  REPO="DeusData/codebase-memory-mcp"
24
- DEFAULT_VERSION="v0.7.0" # pinned; bump deliberately
24
+ DEFAULT_VERSION="v0.8.1" # pinned; bump deliberately. NOTE: tag must carry the leading "v" AND have published assets (0.7.0 had none → 404).
25
25
  VERSION="${CMM_VERSION:-$DEFAULT_VERSION}"
26
26
  DEST="$HOME/.cache/draft/bin"
27
27
  FORCE=0