@drafthq/draft 3.3.0 → 3.3.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.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.cursor-plugin/plugin.json +1 -1
- package/README.md +19 -1
- package/integrations/agents/AGENTS.md +5 -1
- package/integrations/copilot/.github/copilot-instructions.md +5 -1
- package/package.json +1 -1
- package/skills/init/SKILL.md +5 -1
|
@@ -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": "3.3.
|
|
15
|
+
"version": "3.3.1",
|
|
16
16
|
"author": {
|
|
17
17
|
"name": "mayurpise"
|
|
18
18
|
},
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "draft",
|
|
3
3
|
"displayName": "Draft",
|
|
4
4
|
"description": "Context-Driven Development: draft specs and plans before implementation. Structured workflows for features and fixes.",
|
|
5
|
-
"version": "3.3.
|
|
5
|
+
"version": "3.3.1",
|
|
6
6
|
"skills": "./skills/",
|
|
7
7
|
"agents": "./core/agents/",
|
|
8
8
|
"author": {
|
package/README.md
CHANGED
|
@@ -67,7 +67,7 @@ Each host installs the way that host actually loads extensions — no manual ste
|
|
|
67
67
|
| Host | `draft install …` | What it does |
|
|
68
68
|
|------|-------------------|--------------|
|
|
69
69
|
| **Claude Code** | `claude-code` | Registers the plugin via `claude plugin marketplace add` + `claude plugin install` (user scope). Restart Claude Code. |
|
|
70
|
-
| **Cursor** | `cursor` | Copies the plugin into `~/.cursor/plugins/local/draft/`, writes `.cursor-plugin/plugin.json`, registers `draft@draft-plugins` in Cursor's plugin registry, and enables it. Restart Cursor (or Developer: Reload Window). |
|
|
70
|
+
| **Cursor** | `cursor` | Copies the plugin into `~/.cursor/plugins/local/draft/`, writes `.cursor-plugin/plugin.json`, registers `draft@draft-plugins` in Cursor's plugin registry, and enables it. Restart Cursor (or Developer: Reload Window). Existing installs upgrade with `draft install cursor --force`. |
|
|
71
71
|
| **Codex** | `codex` | Writes `./AGENTS.md`, which Codex reads automatically. |
|
|
72
72
|
| **opencode** | `opencode` | Writes `./AGENTS.md` + `~/.agents/skills/draft/`, both auto-discovered. |
|
|
73
73
|
|
|
@@ -223,6 +223,24 @@ Skills also call into **shell helpers** under `scripts/tools/` for mechanical wo
|
|
|
223
223
|
files with changed hashes
|
|
224
224
|
```
|
|
225
225
|
|
|
226
|
+
### Context output modes (`/draft:init`)
|
|
227
|
+
|
|
228
|
+
`/draft:init` packages your architecture context in one of two modes, selected
|
|
229
|
+
automatically by repo size (override with `DRAFT_INIT_MODE`):
|
|
230
|
+
|
|
231
|
+
- **`monolith`** (default for small repos, tiers 1–2) — a single
|
|
232
|
+
graph-primary `architecture.md` is the source of truth; `.ai-context.md` is
|
|
233
|
+
the token-optimized AI view derived from it.
|
|
234
|
+
- **`okf`** (default for larger repos, tiers 3+) — an **OKF concept taxonomy**
|
|
235
|
+
under `draft/wiki/` is the source of truth (one concept per file, cross-links
|
|
236
|
+
form the graph), `.ai-context.md` becomes the navigable index root
|
|
237
|
+
(Synopsis + Concept Map), and `architecture.md` is demoted to a generated
|
|
238
|
+
rendered view. An optional self-contained offline HTML viewer ships under
|
|
239
|
+
`draft/wiki/web/`.
|
|
240
|
+
|
|
241
|
+
Both modes produce the same `product.md`, `tech-stack.md`, `workflow.md`,
|
|
242
|
+
`guardrails.md`, tracks, and `.state/` — only the architecture packaging differs.
|
|
243
|
+
|
|
226
244
|
[Full workflow →](core/methodology.md#core-workflow)
|
|
227
245
|
|
|
228
246
|
---
|
|
@@ -455,7 +455,11 @@ If the user runs `draft init refresh`:
|
|
|
455
455
|
|
|
456
456
|
1. **Tech Stack Refresh**: Re-scan `package.json`, `go.mod`, etc. Compare with `draft/tech-stack.md`. Propose updates.
|
|
457
457
|
|
|
458
|
-
2. **Architecture Refresh**:
|
|
458
|
+
2. **Architecture Refresh**:
|
|
459
|
+
|
|
460
|
+
**Mode detection (do this first).** If `draft/wiki/` exists, the bundle was generated in **`okf` mode** and `architecture.md` is a *generated rendered view*, not the source of truth. In that case **follow `references/okf-emitter.md` §"Incremental refresh at concept granularity (M5)"** instead of the monolith steps below: diff `hashes.json` → map changed source paths to affected concepts → regenerate only those concepts (carry the rest forward from cache) → always re-render `.ai-context.md`, `architecture.md`, and `log.md` via `okf-render-views.sh` → re-run `okf-validate.sh` so cross-links still resolve. Do **not** hand-edit `architecture.md` in this mode — it is overwritten by the renderer. Then skip to step 3.
|
|
461
|
+
|
|
462
|
+
Otherwise (**`monolith` mode** — `draft/architecture.md` is the source of truth and no `draft/wiki/` exists), use metadata-based incremental analysis. If freshness state is available from step 0b, use file-level deltas to scope the refresh more precisely than git-diff alone:
|
|
459
463
|
|
|
460
464
|
**a. Read synced commit from metadata:**
|
|
461
465
|
```bash
|
|
@@ -455,7 +455,11 @@ If the user runs `draft init refresh`:
|
|
|
455
455
|
|
|
456
456
|
1. **Tech Stack Refresh**: Re-scan `package.json`, `go.mod`, etc. Compare with `draft/tech-stack.md`. Propose updates.
|
|
457
457
|
|
|
458
|
-
2. **Architecture Refresh**:
|
|
458
|
+
2. **Architecture Refresh**:
|
|
459
|
+
|
|
460
|
+
**Mode detection (do this first).** If `draft/wiki/` exists, the bundle was generated in **`okf` mode** and `architecture.md` is a *generated rendered view*, not the source of truth. In that case **follow `references/okf-emitter.md` §"Incremental refresh at concept granularity (M5)"** instead of the monolith steps below: diff `hashes.json` → map changed source paths to affected concepts → regenerate only those concepts (carry the rest forward from cache) → always re-render `.ai-context.md`, `architecture.md`, and `log.md` via `okf-render-views.sh` → re-run `okf-validate.sh` so cross-links still resolve. Do **not** hand-edit `architecture.md` in this mode — it is overwritten by the renderer. Then skip to step 3.
|
|
461
|
+
|
|
462
|
+
Otherwise (**`monolith` mode** — `draft/architecture.md` is the source of truth and no `draft/wiki/` exists), use metadata-based incremental analysis. If freshness state is available from step 0b, use file-level deltas to scope the refresh more precisely than git-diff alone:
|
|
459
463
|
|
|
460
464
|
**a. Read synced commit from metadata:**
|
|
461
465
|
```bash
|
package/package.json
CHANGED
package/skills/init/SKILL.md
CHANGED
|
@@ -335,7 +335,11 @@ If the user runs `/draft:init refresh`:
|
|
|
335
335
|
|
|
336
336
|
1. **Tech Stack Refresh**: Re-scan `package.json`, `go.mod`, etc. Compare with `draft/tech-stack.md`. Propose updates.
|
|
337
337
|
|
|
338
|
-
2. **Architecture Refresh**:
|
|
338
|
+
2. **Architecture Refresh**:
|
|
339
|
+
|
|
340
|
+
**Mode detection (do this first).** If `draft/wiki/` exists, the bundle was generated in **`okf` mode** and `architecture.md` is a *generated rendered view*, not the source of truth. In that case **follow `references/okf-emitter.md` §"Incremental refresh at concept granularity (M5)"** instead of the monolith steps below: diff `hashes.json` → map changed source paths to affected concepts → regenerate only those concepts (carry the rest forward from cache) → always re-render `.ai-context.md`, `architecture.md`, and `log.md` via `okf-render-views.sh` → re-run `okf-validate.sh` so cross-links still resolve. Do **not** hand-edit `architecture.md` in this mode — it is overwritten by the renderer. Then skip to step 3.
|
|
341
|
+
|
|
342
|
+
Otherwise (**`monolith` mode** — `draft/architecture.md` is the source of truth and no `draft/wiki/` exists), use metadata-based incremental analysis. If freshness state is available from step 0b, use file-level deltas to scope the refresh more precisely than git-diff alone:
|
|
339
343
|
|
|
340
344
|
**a. Read synced commit from metadata:**
|
|
341
345
|
```bash
|