@directive-run/claude-plugin 1.21.0 → 1.23.0

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/README.md CHANGED
@@ -6,14 +6,14 @@ The package has two install paths: **Claude Code's plugin marketplace** for end
6
6
 
7
7
  ## Install for Claude Code (canonical)
8
8
 
9
- Two steps in a Claude Code session first register the marketplace, then install the plugin:
9
+ Two steps in a Claude Code session first register the marketplace, then install the plugin:
10
10
 
11
11
  ```
12
12
  /plugin marketplace add directive-run/directive
13
13
  /plugin install directive@directive-plugins
14
14
  ```
15
15
 
16
- After install, verify the plugin is active with `/plugins` you should see `directive` in the list.
16
+ After install, verify the plugin is active with `/plugins` you should see `directive` in the list.
17
17
 
18
18
  ## Install for tool authors (npm)
19
19
 
@@ -36,7 +36,7 @@ import {
36
36
  const names = listSkills();
37
37
  // → ["building-ai-agents", "building-ai-orchestrators", ...]
38
38
 
39
- // One skill manifest + supporting files
39
+ // One skill manifest + supporting files
40
40
  const skill = getSkill("building-ai-orchestrators");
41
41
  skill?.manifest; // SKILL.md (with YAML frontmatter)
42
42
  skill?.files.get("examples"); // examples.md contents
@@ -48,7 +48,7 @@ const all = getAllSkills(); // Map<string, Skill>
48
48
  const ex = getSkillFile("building-ai-orchestrators", "examples");
49
49
  ```
50
50
 
51
- The npm install path is not a replacement for the Claude Code plugin install it does not register the skills with Claude Code itself. It only exposes the same `skills/` directory as a typed module so other tools can read it.
51
+ The npm install path is not a replacement for the Claude Code plugin install it does not register the skills with Claude Code itself. It only exposes the same `skills/` directory as a typed module so other tools can read it.
52
52
 
53
53
  ## What happens after install
54
54
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@directive-run/claude-plugin",
3
- "version": "1.21.0",
3
+ "version": "1.23.0",
4
4
  "description": "Claude Code plugin for Directive — 12 skills covering modules, constraints, resolvers, derivations, AI orchestration, and adapters. Installable via Claude Code's plugin marketplace or consumable programmatically as an npm package.",
5
5
  "license": "(MIT OR Apache-2.0)",
6
6
  "author": "Jason Comes",
@@ -52,7 +52,7 @@
52
52
  "tsx": "^4.19.2",
53
53
  "typescript": "^5.7.2",
54
54
  "vitest": "^3.0.0",
55
- "@directive-run/knowledge": "1.21.0"
55
+ "@directive-run/knowledge": "1.23.0"
56
56
  },
57
57
  "scripts": {
58
58
  "build": "tsx scripts/build-skills.ts && tsup",
@@ -156,7 +156,8 @@ seven pieces of work, zero `useEffect` hooks.
156
156
  - [`sources.md`](./sources.md) — the source primitive's full lifecycle
157
157
  and recipes.
158
158
  - [`constraints.md`](./constraints.md) — `when` predicates, requirement
159
- shapes, and the `bind` / `owns` field-scoped CAS contract.
159
+ shapes, and the `abortOn` field-scoped CAS contract (v1; `bind:` is a
160
+ v2 reservation – see RFC 0003 Future Work).
160
161
  - [`resolvers.md`](./resolvers.md) — retry config, batch semantics, and
161
162
  the `ctx.set` write contract.
162
163
  - [`anti-patterns.md`](./anti-patterns.md) — the things to avoid that
@@ -12,16 +12,13 @@ Website: https://directive.run
12
12
  - [Why Directive](https://directive.run/docs/why-directive)
13
13
  - [Installation](https://directive.run/docs/installation)
14
14
  - [Core Concepts](https://directive.run/docs/core-concepts)
15
- - [Comparison](https://directive.run/docs/comparison)
16
15
  - [Choosing Primitives](https://directive.run/docs/choosing-primitives)
16
+ - [Comparison](https://directive.run/docs/comparison)
17
17
 
18
- ### AI Tooling
18
+ ### Editor Setup
19
19
  - [IDE Integration](https://directive.run/docs/ide-integration)
20
- - [Claude Code plugin](https://directive.run/docs/ide-integration#claude-code)
21
- - [CLI ai-rules](https://directive.run/docs/ide-integration#cli-ai-rules)
22
- - [Knowledge package](https://directive.run/docs/ide-integration#knowledge-package)
23
20
 
24
- ### Core API
21
+ ### Primitives
25
22
  - [Overview](https://directive.run/docs/core-api)
26
23
  - [Module & System](https://directive.run/docs/module-system)
27
24
  - [Facts](https://directive.run/docs/facts)
@@ -29,8 +26,8 @@ Website: https://directive.run
29
26
  - [Constraints](https://directive.run/docs/constraints)
30
27
  - [Resolvers](https://directive.run/docs/resolvers)
31
28
  - [Effects](https://directive.run/docs/effects)
32
- - [Sources](https://directive.run/docs/sources)
33
29
  - [Events](https://directive.run/docs/events)
30
+ - [Sources](https://directive.run/docs/sources)
34
31
  - [Schema & Types](https://directive.run/docs/schema-overview)
35
32
  - [API Reference](https://directive.run/docs/api/core)
36
33
  - [Type Reference](https://directive.run/docs/api/types)
@@ -63,7 +60,7 @@ Website: https://directive.run
63
60
  ### Advanced Patterns
64
61
  - [Overview](https://directive.run/docs/advanced/overview)
65
62
  - [Data-form Definitions](https://directive.run/docs/data-triggers)
66
- - [Resolver Binding (owns)](https://directive.run/docs/resolver-binding)
63
+ - [Sandbox](https://directive.run/docs/sandbox)
67
64
  - [Multi-Module](https://directive.run/docs/advanced/multi-module)
68
65
  - [Runtime Dynamics](https://directive.run/docs/advanced/runtime)
69
66
  - [History & Snapshots](https://directive.run/docs/advanced/history)
@@ -72,13 +69,13 @@ Website: https://directive.run
72
69
  - [Definition Meta](https://directive.run/docs/advanced/meta)
73
70
 
74
71
  ### Predicate Tools
75
- - [predicateFromIntent (LLM emit)](https://directive.run/docs/predicate-from-intent)
76
- - [describePredicate (prose)](https://directive.run/docs/describe-predicate)
77
- - [Predicate Codegen (SQL/Mongo/PostgREST)](https://directive.run/docs/predicate-codegen)
78
- - [predict()](https://directive.run/docs/predict)
79
- - [doctor.checkAgainst()](https://directive.run/docs/doctor)
80
- - [Predicate Backtest (replay-under)](https://directive.run/docs/replay-under)
81
- - [Parameter Sweep (tune)](https://directive.run/docs/tune)
72
+ - [Predicate from Intent](https://directive.run/docs/predicate-from-intent)
73
+ - [Describe Predicate](https://directive.run/docs/describe-predicate)
74
+ - [Predicate Codegen](https://directive.run/docs/predicate-codegen)
75
+ - [Predict](https://directive.run/docs/predict)
76
+ - [Doctor Check](https://directive.run/docs/doctor)
77
+ - [Predicate Backtest](https://directive.run/docs/replay-under)
78
+ - [Parameter Sweep](https://directive.run/docs/tune)
82
79
  - [Rules Diff](https://directive.run/docs/rules-diff)
83
80
 
84
81
  ### Plugins
@@ -89,17 +86,16 @@ Website: https://directive.run
89
86
  - [Persistence](https://directive.run/docs/plugins/persistence)
90
87
  - [Performance](https://directive.run/docs/plugins/performance)
91
88
  - [Circuit Breaker](https://directive.run/docs/plugins/circuit-breaker)
92
- - [Audit Ledger](https://directive.run/docs/audit-ledger)
93
89
  - [Observability](https://directive.run/docs/plugins/observability)
94
90
  - [Custom Plugins](https://directive.run/docs/plugins/custom)
95
91
 
96
- ### Packages
97
- - [Timeline (test REPL)](https://directive.run/docs/packages/timeline)
98
- - [Mutator (typed mutations)](https://directive.run/docs/packages/mutator)
99
- - [Optimistic (auto-rollback)](https://directive.run/docs/packages/optimistic)
100
- - [Query (data fetching)](https://directive.run/docs/packages/query)
92
+ ### Companion Packages
93
+ - [Timeline](https://directive.run/docs/packages/timeline)
94
+ - [Mutator](https://directive.run/docs/packages/mutator)
95
+ - [Optimistic](https://directive.run/docs/packages/optimistic)
96
+ - [Query](https://directive.run/docs/packages/query)
101
97
  - [Vite Dev Proxy](https://directive.run/docs/packages/vite-dev-proxy)
102
- - [Composing all four](https://directive.run/docs/packages/composing-packages)
98
+ - [Composing All Four](https://directive.run/docs/packages/composing-packages)
103
99
 
104
100
  ### Testing
105
101
  - [Overview](https://directive.run/docs/testing/overview)
@@ -108,6 +104,10 @@ Website: https://directive.run
108
104
  - [Assertions](https://directive.run/docs/testing/assertions)
109
105
  - [Test Async Chains](https://directive.run/docs/guides/test-async-chains)
110
106
 
107
+ ### Security & Compliance
108
+ - [Resolver Binding](https://directive.run/docs/resolver-binding)
109
+ - [Audit Ledger](https://directive.run/docs/audit-ledger)
110
+
111
111
  ### Examples
112
112
  - [Number Match](https://directive.run/docs/examples/counter)
113
113
  - [Auth Flow](https://directive.run/docs/examples/auth-flow)
@@ -134,7 +134,7 @@ Website: https://directive.run
134
134
  - [Role-Based Permissions](https://directive.run/docs/guides/permissions)
135
135
  - [Batch Mutations](https://directive.run/docs/guides/batch-mutations)
136
136
 
137
- ### Integration Guides
137
+ ### Works With
138
138
  - [Overview](https://directive.run/docs/works-with/overview)
139
139
  - [Redux](https://directive.run/docs/works-with/redux)
140
140
  - [Zustand](https://directive.run/docs/works-with/zustand)
@@ -146,17 +146,17 @@ Website: https://directive.run
146
146
 
147
147
  ### Foundations
148
148
  - [Overview](https://directive.run/ai/overview)
149
+ - [Tutorial](https://directive.run/ai/tutorial)
149
150
  - [Running Agents](https://directive.run/ai/running-agents)
150
- - [Resilience & Routing](https://directive.run/ai/resilience-routing)
151
151
  - [Comparison](https://directive.run/ai/comparison)
152
- - [Tutorial](https://directive.run/ai/tutorial)
153
152
  - [Troubleshooting](https://directive.run/ai/troubleshooting)
154
153
 
155
- ### Agent Orchestrator
154
+ ### Single-Agent Orchestrator
156
155
  - [Overview](https://directive.run/ai/orchestrator)
157
156
  - [Guardrails](https://directive.run/ai/guardrails)
158
157
  - [Streaming](https://directive.run/ai/streaming)
159
158
  - [Memory](https://directive.run/ai/memory)
159
+ - [Resilience & Routing](https://directive.run/ai/resilience-routing)
160
160
 
161
161
  ### Multi-Agent Orchestrator
162
162
  - [Overview](https://directive.run/ai/multi-agent)
@@ -168,6 +168,7 @@ Website: https://directive.run
168
168
 
169
169
  ### Infrastructure
170
170
  - [MCP Integration](https://directive.run/ai/mcp)
171
+ - [Sources × Agents](https://directive.run/ai/sources)
171
172
  - [RAG Enricher](https://directive.run/ai/rag)
172
173
  - [SSE Transport](https://directive.run/ai/sse-transport)
173
174
  - [Semantic Cache](https://directive.run/ai/semantic-cache)
@@ -176,6 +177,7 @@ Website: https://directive.run
176
177
  - [Debug Timeline](https://directive.run/ai/debug-timeline)
177
178
  - [Pattern Checkpoints](https://directive.run/ai/checkpoints)
178
179
  - [Breakpoints & Checkpoints](https://directive.run/ai/breakpoints)
180
+ - [Guardrail Events](https://directive.run/ai/guardrail-events)
179
181
  - [DevTools](https://directive.run/ai/devtools)
180
182
 
181
183
  ### Security & Compliance
@@ -195,15 +197,11 @@ Website: https://directive.run
195
197
  - [Data Pipeline](https://directive.run/ai/examples/data-pipeline)
196
198
  - [Code Review](https://directive.run/ai/examples/code-review)
197
199
 
198
- ### Human Approval Workflows
199
- - [Control AI Costs](https://directive.run/ai/guides/control-ai-costs)
200
-
201
- ### Validate Structured Output
200
+ ### Stream Agent Responses
202
201
  - [Handle Agent Errors](https://directive.run/ai/guides/handle-agent-errors)
202
+ - [Control AI Costs](https://directive.run/ai/guides/control-ai-costs)
203
203
 
204
- ### Stream Agent Responses
204
+ ### Pipelines & Apps
205
205
  - [Multi-Step Pipeline](https://directive.run/ai/guides/multi-step-pipeline)
206
-
207
- ### Test Without LLM Calls
208
206
  - [DAG Pipeline](https://directive.run/ai/guides/dag-pipeline)
209
207
  - [Goal Pipeline](https://directive.run/ai/guides/goal-pipeline)
@@ -1,6 +1,6 @@
1
1
  # Resolvers
2
2
 
3
- > Covers `@directive-run/core` — resolver definition: retry policies, batching, cancellation, custom dedup keys, `owns` binding.
3
+ > Covers `@directive-run/core` — resolver definition: retry policies, batching, cancellation, custom dedup keys, `abortOn` binding.
4
4
 
5
5
  Resolvers fulfill requirements emitted by constraints. They are the supply side of the constraint-resolver pattern. Resolvers handle async work and mutate state through `context.facts`.
6
6
 
@@ -205,6 +205,31 @@ resolvers: {
205
205
 
206
206
  Failed items from `resolveBatchWithResults` can be individually retried if a retry policy is configured.
207
207
 
208
+ ## `abortOn` binding (constraint-side)
209
+
210
+ Declared on the *constraint*, not the resolver. Lists facts whose values
211
+ must remain unchanged between dispatch and the resolver's writes; if any
212
+ of them changes mid-flight, the resolver's writes are dropped and its
213
+ signal is aborted.
214
+
215
+ ```typescript
216
+ constraints: {
217
+ finalizeKyc: {
218
+ when: (f) => f.kyc.status === "pending",
219
+ require: { type: "FINALIZE_KYC" },
220
+ abortOn: ["kyc.status"], // abort if `kyc.status` changes mid-flight
221
+ },
222
+ },
223
+ ```
224
+
225
+ `abortOn:` does **not** lock or gate other writers. It only protects this
226
+ resolver from clobbering with stale data when its tail write attempts a
227
+ value the world has since moved past. See
228
+ [`/docs/resolver-binding`](https://directive.run/docs/resolver-binding)
229
+ for the full lifecycle, ABA caveats, and the audit event
230
+ (`resolver.write.rejected { reason: "clobbered" }`) that fires on a
231
+ dropped write.
232
+
208
233
  ## Timeout
209
234
 
210
235
  ```typescript