@directive-run/claude-plugin 1.16.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.
Files changed (83) hide show
  1. package/.claude-plugin/plugin.json +6 -0
  2. package/LICENSE +26 -0
  3. package/README.md +113 -0
  4. package/dist/index.cjs +2 -0
  5. package/dist/index.cjs.map +1 -0
  6. package/dist/index.d.cts +66 -0
  7. package/dist/index.d.ts +66 -0
  8. package/dist/index.js +2 -0
  9. package/dist/index.js.map +1 -0
  10. package/package.json +64 -0
  11. package/skills/README.md +9 -0
  12. package/skills/building-ai-agents/SKILL.md +414 -0
  13. package/skills/building-ai-agents/ai-adapters.md +257 -0
  14. package/skills/building-ai-agents/ai-agents-streaming.md +307 -0
  15. package/skills/building-ai-agents/ai-communication.md +304 -0
  16. package/skills/building-ai-agents/api-skeleton.md +5 -0
  17. package/skills/building-ai-agents/examples.md +849 -0
  18. package/skills/building-ai-orchestrators/SKILL.md +401 -0
  19. package/skills/building-ai-orchestrators/ai-multi-agent.md +375 -0
  20. package/skills/building-ai-orchestrators/ai-orchestrator.md +466 -0
  21. package/skills/building-ai-orchestrators/ai-tasks.md +268 -0
  22. package/skills/building-ai-orchestrators/api-skeleton.md +5 -0
  23. package/skills/building-ai-orchestrators/examples.md +1609 -0
  24. package/skills/building-directive-systems/SKILL.md +499 -0
  25. package/skills/building-directive-systems/api-skeleton.md +5 -0
  26. package/skills/building-directive-systems/examples.md +4149 -0
  27. package/skills/building-directive-systems/multi-module.md +327 -0
  28. package/skills/building-directive-systems/plugins.md +361 -0
  29. package/skills/building-directive-systems/react-adapter.md +376 -0
  30. package/skills/building-directive-systems/system-api.md +463 -0
  31. package/skills/getting-started-with-directive/SKILL.md +198 -0
  32. package/skills/getting-started-with-directive/api-skeleton.md +5 -0
  33. package/skills/getting-started-with-directive/core-patterns.md +240 -0
  34. package/skills/getting-started-with-directive/examples.md +87 -0
  35. package/skills/getting-started-with-directive/sitemap.md +202 -0
  36. package/skills/hardening-ai-systems/SKILL.md +377 -0
  37. package/skills/hardening-ai-systems/ai-budget-resilience.md +408 -0
  38. package/skills/hardening-ai-systems/ai-guardrails-memory.md +370 -0
  39. package/skills/hardening-ai-systems/ai-security.md +400 -0
  40. package/skills/hardening-ai-systems/api-skeleton.md +5 -0
  41. package/skills/hardening-ai-systems/examples.md +628 -0
  42. package/skills/migrating-to-directive/SKILL.md +249 -0
  43. package/skills/migrating-to-directive/anti-patterns.md +382 -0
  44. package/skills/migrating-to-directive/api-skeleton.md +5 -0
  45. package/skills/migrating-to-directive/core-patterns.md +240 -0
  46. package/skills/migrating-to-directive/examples.md +511 -0
  47. package/skills/migrating-to-directive/schema-types.md +273 -0
  48. package/skills/reviewing-directive-code/SKILL.md +232 -0
  49. package/skills/reviewing-directive-code/anti-patterns.md +382 -0
  50. package/skills/reviewing-directive-code/api-skeleton.md +5 -0
  51. package/skills/reviewing-directive-code/core-patterns.md +240 -0
  52. package/skills/reviewing-directive-code/examples.md +463 -0
  53. package/skills/reviewing-directive-code/naming.md +321 -0
  54. package/skills/scaffolding-directive-modules/SKILL.md +218 -0
  55. package/skills/scaffolding-directive-modules/api-skeleton.md +5 -0
  56. package/skills/scaffolding-directive-modules/core-patterns.md +240 -0
  57. package/skills/scaffolding-directive-modules/examples.md +1386 -0
  58. package/skills/scaffolding-directive-modules/naming.md +321 -0
  59. package/skills/scaffolding-directive-modules/schema-types.md +273 -0
  60. package/skills/testing-ai-systems/SKILL.md +398 -0
  61. package/skills/testing-ai-systems/ai-debug-observability.md +329 -0
  62. package/skills/testing-ai-systems/ai-mcp-rag.md +293 -0
  63. package/skills/testing-ai-systems/ai-testing-evals.md +485 -0
  64. package/skills/testing-ai-systems/api-skeleton.md +5 -0
  65. package/skills/testing-ai-systems/examples.md +1261 -0
  66. package/skills/testing-directive-code/SKILL.md +479 -0
  67. package/skills/testing-directive-code/api-skeleton.md +5 -0
  68. package/skills/testing-directive-code/examples.md +156 -0
  69. package/skills/testing-directive-code/history.md +351 -0
  70. package/skills/testing-directive-code/testing.md +412 -0
  71. package/skills/writing-directive-constraints/SKILL.md +486 -0
  72. package/skills/writing-directive-constraints/api-skeleton.md +5 -0
  73. package/skills/writing-directive-constraints/constraints.md +274 -0
  74. package/skills/writing-directive-constraints/error-boundaries.md +330 -0
  75. package/skills/writing-directive-constraints/examples.md +1361 -0
  76. package/skills/writing-directive-constraints/resolvers.md +367 -0
  77. package/skills/writing-directive-modules/SKILL.md +342 -0
  78. package/skills/writing-directive-modules/anti-patterns.md +382 -0
  79. package/skills/writing-directive-modules/api-skeleton.md +5 -0
  80. package/skills/writing-directive-modules/core-patterns.md +240 -0
  81. package/skills/writing-directive-modules/examples.md +1639 -0
  82. package/skills/writing-directive-modules/naming.md +321 -0
  83. package/skills/writing-directive-modules/schema-types.md +273 -0
@@ -0,0 +1,240 @@
1
+ # Core Patterns
2
+
3
+ > Covers `@directive-run/core` — modules, facts, derivations, effects, events, and the constraint-resolver loop.
4
+
5
+ How to think about building with Directive: modules, systems, and the constraint-resolver pattern.
6
+
7
+ ## Decision Tree: "Where does this logic go?"
8
+
9
+ ```
10
+ User wants to...
11
+ ├── Store state → schema.facts + init()
12
+ ├── Compute derived values → schema.derivations + derive
13
+ ├── React to state changes → effects
14
+ ├── Trigger side effects when conditions are met → constraints + resolvers
15
+ ├── Handle user actions → schema.events + events handlers
16
+ └── Coordinate multiple modules → createSystem({ modules: {} })
17
+ ```
18
+
19
+ ## Module Shape (Canonical Object Syntax)
20
+
21
+ ```typescript
22
+ // CORRECT – full module definition
23
+ import { createModule, t } from "@directive-run/core";
24
+
25
+ const myModule = createModule("name", {
26
+ schema: {
27
+ facts: {
28
+ count: t.number(),
29
+ phase: t.string<"idle" | "loading" | "done">(),
30
+ user: t.object<{ id: string; name: string } | null>(),
31
+ },
32
+ derivations: {
33
+ isLoading: t.boolean(),
34
+ displayName: t.string(),
35
+ },
36
+ events: {
37
+ increment: {},
38
+ setUser: { user: t.object<{ id: string; name: string }>() },
39
+ },
40
+ requirements: {
41
+ FETCH_USER: { userId: t.string() },
42
+ },
43
+ },
44
+
45
+ init: (facts) => {
46
+ facts.count = 0;
47
+ facts.phase = "idle";
48
+ facts.user = null;
49
+ },
50
+
51
+ derive: {
52
+ isLoading: (facts) => facts.phase === "loading",
53
+ displayName: (facts) => {
54
+ if (!facts.user) {
55
+ return "Guest";
56
+ }
57
+
58
+ return facts.user.name;
59
+ },
60
+ },
61
+
62
+ effects: {
63
+ logPhase: {
64
+ run: (facts, prev) => {
65
+ if (prev?.phase !== facts.phase) {
66
+ console.log(`Phase: ${facts.phase}`);
67
+ }
68
+ },
69
+ },
70
+ },
71
+
72
+ constraints: {
73
+ fetchWhenReady: {
74
+ when: (facts) => facts.phase === "idle" && facts.count > 0,
75
+ require: (facts) => ({ type: "FETCH_USER", userId: "user-1" }),
76
+ },
77
+ },
78
+
79
+ resolvers: {
80
+ fetchUser: {
81
+ requirement: "FETCH_USER",
82
+ resolve: async (req, context) => {
83
+ context.facts.phase = "loading";
84
+ const res = await fetch(`/api/users/${req.userId}`);
85
+ const data = await res.json();
86
+ context.facts.user = data;
87
+ context.facts.phase = "done";
88
+ },
89
+ },
90
+ },
91
+
92
+ events: {
93
+ increment: (facts) => {
94
+ facts.count += 1;
95
+ },
96
+ setUser: (facts, payload) => {
97
+ facts.user = payload.user;
98
+ },
99
+ },
100
+ });
101
+ ```
102
+
103
+ ## System Creation
104
+
105
+ ```typescript
106
+ import { createSystem } from "@directive-run/core";
107
+ import { loggingPlugin, devtoolsPlugin } from "@directive-run/core/plugins";
108
+
109
+ // Single module – direct access: system.facts.count
110
+ const system = createSystem({
111
+ module: myModule,
112
+ plugins: [loggingPlugin(), devtoolsPlugin()],
113
+ history: { maxSnapshots: 100 },
114
+ });
115
+
116
+ // Multi-module – namespaced access: system.facts.auth.token
117
+ const system = createSystem({
118
+ modules: { auth: authModule, cart: cartModule },
119
+ plugins: [devtoolsPlugin()],
120
+ });
121
+
122
+ // Lifecycle
123
+ system.start();
124
+ await system.settle(); // Wait for all resolvers to complete
125
+ // ... use the system ...
126
+ system.stop();
127
+ system.destroy();
128
+ ```
129
+
130
+ ## Decision Tree: "User says 'fetch data when authenticated'"
131
+
132
+ WRONG thinking: "I'll put the fetch call in a resolver that checks auth."
133
+
134
+ ```typescript
135
+ // WRONG – resolver doing condition checking + data fetching
136
+ resolvers: {
137
+ fetchData: {
138
+ requirement: "FETCH_DATA",
139
+ resolve: async (req, context) => {
140
+ if (!context.facts.isAuthenticated) {
141
+ return; // Resolver should not check conditions
142
+ }
143
+ const data = await fetch("/api/data");
144
+ context.facts.data = await data.json();
145
+ },
146
+ },
147
+ },
148
+ ```
149
+
150
+ CORRECT thinking: "Constraint declares WHEN, resolver declares HOW."
151
+
152
+ ```typescript
153
+ // CORRECT – constraint declares the need, resolver fulfills it
154
+ constraints: {
155
+ fetchWhenAuthenticated: {
156
+ when: (facts) => facts.isAuthenticated && !facts.data,
157
+ require: { type: "FETCH_DATA" },
158
+ },
159
+ },
160
+
161
+ resolvers: {
162
+ fetchData: {
163
+ requirement: "FETCH_DATA",
164
+ resolve: async (req, context) => {
165
+ const data = await fetch("/api/data");
166
+ context.facts.data = await data.json();
167
+ },
168
+ },
169
+ },
170
+ ```
171
+
172
+ ## Reading System State
173
+
174
+ ```typescript
175
+ // Facts – mutable state
176
+ system.facts.count = 5;
177
+ const val = system.facts.count;
178
+
179
+ // Derivations – read-only computed values
180
+ const loading = system.derive.isLoading;
181
+
182
+ // Events – dispatch user actions
183
+ system.events.increment();
184
+ system.events.setUser({ user: { id: "1", name: "Alice" } });
185
+
186
+ // Subscribe to changes
187
+ const unsub = system.subscribe(["count", "isLoading"], () => {
188
+ console.log(system.facts.count, system.derive.isLoading);
189
+ });
190
+
191
+ // Watch individual values
192
+ system.watch("count", (newVal, oldVal) => {
193
+ console.log(`Count: ${oldVal} -> ${newVal}`);
194
+ });
195
+
196
+ // Wait for a condition
197
+ await system.when((facts) => facts.phase === "done");
198
+ await system.when((facts) => facts.phase === "done", { timeout: 5000 });
199
+ ```
200
+
201
+ ## Schema Patterns
202
+
203
+ Only `facts` is required in the schema. Other sections are optional:
204
+
205
+ ```typescript
206
+ // Minimal module – facts only
207
+ const minimal = createModule("minimal", {
208
+ schema: {
209
+ facts: { count: t.number() },
210
+ },
211
+ init: (facts) => {
212
+ facts.count = 0;
213
+ },
214
+ });
215
+
216
+ // Type assertion pattern (alternative to t.* builders)
217
+ const typed = createModule("typed", {
218
+ schema: {
219
+ facts: {} as { count: number; name: string },
220
+ derivations: {} as { doubled: number },
221
+ },
222
+ init: (facts) => {
223
+ facts.count = 0;
224
+ facts.name = "";
225
+ },
226
+ derive: {
227
+ doubled: (facts) => facts.count * 2,
228
+ },
229
+ });
230
+ ```
231
+
232
+ ## See also
233
+
234
+ - [`constraints.md`](./constraints.md) — the demand side of the constraint-resolver loop
235
+ - [`resolvers.md`](./resolvers.md) — the supply side that fulfills requirements
236
+ - [`schema-types.md`](./schema-types.md) — the `t.*()` builders that define fact and derivation types
237
+ - [`multi-module.md`](./multi-module.md) — when a single module isn't enough
238
+ - [`system-api.md`](./system-api.md) — `createSystem` and the runtime instance once your module is defined
239
+ - [`naming.md`](./naming.md) — terminology conventions every example here follows
240
+ - [`testing.md`](./testing.md) — `createTestSystem` for the modules you're learning to write
@@ -0,0 +1,87 @@
1
+ # Examples
2
+
3
+ > Auto-generated from extracted examples. Do not edit manually.
4
+
5
+ ## counter
6
+
7
+ ```typescript
8
+ // Example: counter
9
+ // Source: examples/counter/src/module.ts
10
+ // Pure module file — no DOM wiring
11
+
12
+ /**
13
+ * Counter — The simplest Directive module.
14
+ *
15
+ * Demonstrates: facts, events, derivations, one constraint, one resolver.
16
+ * Total: ~40 lines.
17
+ */
18
+
19
+ import {
20
+ type ModuleSchema,
21
+ createModule,
22
+ createSystem,
23
+ t,
24
+ } from "@directive-run/core";
25
+
26
+ const schema = {
27
+ facts: {
28
+ count: t.number(),
29
+ },
30
+ derivations: {
31
+ doubled: t.number(),
32
+ isPositive: t.boolean(),
33
+ },
34
+ events: {
35
+ increment: {},
36
+ decrement: {},
37
+ reset: {},
38
+ },
39
+ requirements: {
40
+ CLAMP_TO_ZERO: {},
41
+ },
42
+ } satisfies ModuleSchema;
43
+
44
+ export const counterModule = createModule("counter", {
45
+ schema,
46
+
47
+ init: (facts) => {
48
+ facts.count = 0;
49
+ },
50
+
51
+ derive: {
52
+ doubled: (facts) => facts.count * 2,
53
+ isPositive: (facts) => facts.count > 0,
54
+ },
55
+
56
+ events: {
57
+ increment: (facts) => {
58
+ facts.count += 1;
59
+ },
60
+ decrement: (facts) => {
61
+ facts.count -= 1;
62
+ },
63
+ reset: (facts) => {
64
+ facts.count = 0;
65
+ },
66
+ },
67
+
68
+ // When count goes negative, automatically fix it
69
+ constraints: {
70
+ noNegative: {
71
+ when: (facts) => facts.count < 0,
72
+ require: { type: "CLAMP_TO_ZERO" },
73
+ },
74
+ },
75
+
76
+ resolvers: {
77
+ clamp: {
78
+ requirement: "CLAMP_TO_ZERO",
79
+ resolve: async (_req, context) => {
80
+ context.facts.count = 0;
81
+ },
82
+ },
83
+ },
84
+ });
85
+
86
+ export const system = createSystem({ module: counterModule });
87
+ ```
@@ -0,0 +1,202 @@
1
+ # Directive Documentation Sitemap
2
+
3
+ > Auto-generated from the docs site navigation. Do not edit manually.
4
+ > Run `pnpm --filter @directive-run/knowledge generate-sitemap` to refresh.
5
+
6
+ Website: https://directive.run
7
+
8
+ ## Docs
9
+
10
+ ### Getting Started
11
+ - [Quick Start](https://directive.run/docs/quick-start)
12
+ - [Why Directive](https://directive.run/docs/why-directive)
13
+ - [Installation](https://directive.run/docs/installation)
14
+ - [Core Concepts](https://directive.run/docs/core-concepts)
15
+ - [Comparison](https://directive.run/docs/comparison)
16
+ - [Choosing Primitives](https://directive.run/docs/choosing-primitives)
17
+
18
+ ### Core API
19
+ - [Overview](https://directive.run/docs/core-api)
20
+ - [Module & System](https://directive.run/docs/module-system)
21
+ - [Facts](https://directive.run/docs/facts)
22
+ - [Derivations](https://directive.run/docs/derivations)
23
+ - [Constraints](https://directive.run/docs/constraints)
24
+ - [Resolvers](https://directive.run/docs/resolvers)
25
+ - [Effects](https://directive.run/docs/effects)
26
+ - [Events](https://directive.run/docs/events)
27
+ - [Schema & Types](https://directive.run/docs/schema-overview)
28
+ - [API Reference](https://directive.run/docs/api/core)
29
+ - [Type Reference](https://directive.run/docs/api/types)
30
+
31
+ ### Framework Adapters
32
+ - [Overview](https://directive.run/docs/adapters/overview)
33
+ - [React](https://directive.run/docs/adapters/react)
34
+ - [React API](https://directive.run/docs/api/react)
35
+ - [Vue](https://directive.run/docs/adapters/vue)
36
+ - [Vue API](https://directive.run/docs/api/vue)
37
+ - [Svelte](https://directive.run/docs/adapters/svelte)
38
+ - [Svelte API](https://directive.run/docs/api/svelte)
39
+ - [Solid](https://directive.run/docs/adapters/solid)
40
+ - [Solid API](https://directive.run/docs/api/solid)
41
+ - [Lit](https://directive.run/docs/adapters/lit)
42
+ - [Lit API](https://directive.run/docs/api/lit)
43
+ - [Vanilla](https://directive.run/docs/adapters/vanilla)
44
+ - [Vanilla API](https://directive.run/docs/api/vanilla)
45
+
46
+ ### Data Fetching
47
+ - [Overview](https://directive.run/docs/data-fetching/overview)
48
+ - [Queries](https://directive.run/docs/data-fetching/queries)
49
+ - [Mutations](https://directive.run/docs/data-fetching/mutations)
50
+ - [Subscriptions](https://directive.run/docs/data-fetching/subscriptions)
51
+ - [Infinite Queries](https://directive.run/docs/data-fetching/infinite)
52
+ - [Convenience API](https://directive.run/docs/data-fetching/convenience)
53
+ - [GraphQL](https://directive.run/docs/data-fetching/graphql)
54
+ - [Explain & Debug](https://directive.run/docs/data-fetching/explain)
55
+
56
+ ### Advanced Patterns
57
+ - [Overview](https://directive.run/docs/advanced/overview)
58
+ - [Data-form Definitions](https://directive.run/docs/data-triggers)
59
+ - [Resolver Binding (owns)](https://directive.run/docs/resolver-binding)
60
+ - [Multi-Module](https://directive.run/docs/advanced/multi-module)
61
+ - [Runtime Dynamics](https://directive.run/docs/advanced/runtime)
62
+ - [History & Snapshots](https://directive.run/docs/advanced/history)
63
+ - [SSR & Hydration](https://directive.run/docs/advanced/ssr)
64
+ - [Error Boundaries](https://directive.run/docs/advanced/errors)
65
+ - [Definition Meta](https://directive.run/docs/advanced/meta)
66
+
67
+ ### Predicate Tools
68
+ - [predicateFromIntent (LLM emit)](https://directive.run/docs/predicate-from-intent)
69
+ - [describePredicate (prose)](https://directive.run/docs/describe-predicate)
70
+ - [Predicate Codegen (SQL/Mongo/PostgREST)](https://directive.run/docs/predicate-codegen)
71
+ - [predict()](https://directive.run/docs/predict)
72
+ - [doctor.checkAgainst()](https://directive.run/docs/doctor)
73
+ - [Predicate Backtest (replay-under)](https://directive.run/docs/replay-under)
74
+ - [Parameter Sweep (tune)](https://directive.run/docs/tune)
75
+ - [Rules Diff](https://directive.run/docs/rules-diff)
76
+
77
+ ### Plugins
78
+ - [Overview](https://directive.run/docs/plugins/overview)
79
+ - [Logging](https://directive.run/docs/plugins/logging)
80
+ - [DevTools](https://directive.run/docs/plugins/devtools)
81
+ - [DevTools – whenExplain panel](https://directive.run/docs/when-explain-panel)
82
+ - [Persistence](https://directive.run/docs/plugins/persistence)
83
+ - [Performance](https://directive.run/docs/plugins/performance)
84
+ - [Circuit Breaker](https://directive.run/docs/plugins/circuit-breaker)
85
+ - [Audit Ledger](https://directive.run/docs/audit-ledger)
86
+ - [Observability](https://directive.run/docs/plugins/observability)
87
+ - [Custom Plugins](https://directive.run/docs/plugins/custom)
88
+
89
+ ### Packages
90
+ - [Timeline (test REPL)](https://directive.run/docs/packages/timeline)
91
+ - [Mutator (typed mutations)](https://directive.run/docs/packages/mutator)
92
+ - [Optimistic (auto-rollback)](https://directive.run/docs/packages/optimistic)
93
+ - [Query (data fetching)](https://directive.run/docs/packages/query)
94
+ - [Vite Dev Proxy](https://directive.run/docs/packages/vite-dev-proxy)
95
+ - [Composing all four](https://directive.run/docs/packages/composing-packages)
96
+
97
+ ### Testing
98
+ - [Overview](https://directive.run/docs/testing/overview)
99
+ - [Mock Resolvers](https://directive.run/docs/testing/mock-resolvers)
100
+ - [Fake Timers](https://directive.run/docs/testing/fake-timers)
101
+ - [Assertions](https://directive.run/docs/testing/assertions)
102
+ - [Test Async Chains](https://directive.run/docs/guides/test-async-chains)
103
+
104
+ ### Examples
105
+ - [Number Match](https://directive.run/docs/examples/counter)
106
+ - [Auth Flow](https://directive.run/docs/examples/auth-flow)
107
+ - [Shopping Cart](https://directive.run/docs/examples/shopping-cart)
108
+ - [Async Chains](https://directive.run/docs/examples/async-chains)
109
+ - [Form Wizard](https://directive.run/docs/examples/form-wizard)
110
+ - [Sudoku](https://directive.run/docs/examples/sudoku)
111
+ - [Checkers](https://directive.run/docs/examples/checkers)
112
+ - [Time Machine](https://directive.run/docs/examples/time-machine)
113
+ - [Error Boundaries](https://directive.run/docs/examples/error-boundaries)
114
+ - [Fraud Analysis](https://directive.run/docs/examples/fraud-analysis)
115
+ - [Dashboard Loader](https://directive.run/docs/examples/dashboard-loader)
116
+ - [Compliance Audit](https://directive.run/docs/examples/compliance-audit)
117
+
118
+ ### Guides
119
+ - [Overview](https://directive.run/docs/guides/overview)
120
+ - [Loading & Error States](https://directive.run/docs/guides/loading-states)
121
+ - [Authentication Flow](https://directive.run/docs/guides/auth-flow)
122
+ - [Optimistic Updates](https://directive.run/docs/guides/optimistic-updates)
123
+ - [Shopping Cart Rules](https://directive.run/docs/guides/shopping-cart)
124
+ - [Multi-Step Form Wizard](https://directive.run/docs/guides/form-wizard)
125
+
126
+ ### Async Chains Across Modules
127
+ - [Role-Based Permissions](https://directive.run/docs/guides/permissions)
128
+ - [Batch Mutations](https://directive.run/docs/guides/batch-mutations)
129
+
130
+ ### Integration Guides
131
+ - [Overview](https://directive.run/docs/works-with/overview)
132
+ - [Redux](https://directive.run/docs/works-with/redux)
133
+ - [Zustand](https://directive.run/docs/works-with/zustand)
134
+ - [XState](https://directive.run/docs/works-with/xstate)
135
+ - [React Query](https://directive.run/docs/works-with/react-query)
136
+ - [Web Worker](https://directive.run/docs/works-with/worker)
137
+
138
+ ## AI
139
+
140
+ ### Foundations
141
+ - [Overview](https://directive.run/ai/overview)
142
+ - [Running Agents](https://directive.run/ai/running-agents)
143
+ - [Resilience & Routing](https://directive.run/ai/resilience-routing)
144
+ - [Comparison](https://directive.run/ai/comparison)
145
+ - [Tutorial](https://directive.run/ai/tutorial)
146
+ - [Troubleshooting](https://directive.run/ai/troubleshooting)
147
+
148
+ ### Agent Orchestrator
149
+ - [Overview](https://directive.run/ai/orchestrator)
150
+ - [Guardrails](https://directive.run/ai/guardrails)
151
+ - [Streaming](https://directive.run/ai/streaming)
152
+ - [Memory](https://directive.run/ai/memory)
153
+
154
+ ### Multi-Agent Orchestrator
155
+ - [Overview](https://directive.run/ai/multi-agent)
156
+ - [Execution Patterns](https://directive.run/ai/patterns)
157
+ - [Communication](https://directive.run/ai/communication)
158
+ - [Cross-Agent State](https://directive.run/ai/cross-agent-state)
159
+ - [Tasks](https://directive.run/ai/tasks)
160
+ - [Self-Healing](https://directive.run/ai/self-healing)
161
+
162
+ ### Infrastructure
163
+ - [MCP Integration](https://directive.run/ai/mcp)
164
+ - [RAG Enricher](https://directive.run/ai/rag)
165
+ - [SSE Transport](https://directive.run/ai/sse-transport)
166
+ - [Semantic Cache](https://directive.run/ai/semantic-cache)
167
+
168
+ ### Observability
169
+ - [Debug Timeline](https://directive.run/ai/debug-timeline)
170
+ - [Pattern Checkpoints](https://directive.run/ai/checkpoints)
171
+ - [Breakpoints & Checkpoints](https://directive.run/ai/breakpoints)
172
+ - [DevTools](https://directive.run/ai/devtools)
173
+
174
+ ### Security & Compliance
175
+ - [Overview](https://directive.run/ai/security/overview)
176
+ - [PII Detection](https://directive.run/ai/security/pii)
177
+ - [Prompt Injection](https://directive.run/ai/security/prompt-injection)
178
+ - [Audit Trail](https://directive.run/ai/security/audit)
179
+ - [GDPR/CCPA](https://directive.run/ai/security/compliance)
180
+
181
+ ### Examples
182
+ - [Chat](https://directive.run/ai/examples/chat)
183
+ - [Research Pipeline](https://directive.run/ai/examples/research-pipeline)
184
+ - [Safety Shield](https://directive.run/ai/examples/safety-shield)
185
+ - [Checkpoint](https://directive.run/ai/examples/checkpoint)
186
+ - [Fraud Analysis](https://directive.run/ai/examples/fraud-analysis)
187
+ - [Pitch Deck](https://directive.run/ai/examples/pitch-deck)
188
+ - [Data Pipeline](https://directive.run/ai/examples/data-pipeline)
189
+ - [Code Review](https://directive.run/ai/examples/code-review)
190
+
191
+ ### Human Approval Workflows
192
+ - [Control AI Costs](https://directive.run/ai/guides/control-ai-costs)
193
+
194
+ ### Validate Structured Output
195
+ - [Handle Agent Errors](https://directive.run/ai/guides/handle-agent-errors)
196
+
197
+ ### Stream Agent Responses
198
+ - [Multi-Step Pipeline](https://directive.run/ai/guides/multi-step-pipeline)
199
+
200
+ ### Test Without LLM Calls
201
+ - [DAG Pipeline](https://directive.run/ai/guides/dag-pipeline)
202
+ - [Goal Pipeline](https://directive.run/ai/guides/goal-pipeline)