@dnai/dynamicllm 0.1.1 → 0.2.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 (58) hide show
  1. package/README.md +64 -0
  2. package/dist/bin/dynamicllm.js +7 -0
  3. package/dist/cli/formatters.d.ts +11 -0
  4. package/dist/cli/formatters.js +138 -0
  5. package/dist/cli/index.d.ts +1 -0
  6. package/dist/cli/index.js +345 -0
  7. package/dist/cli/init.d.ts +1 -0
  8. package/dist/{setup.js → cli/init.js} +20 -46
  9. package/dist/core/bootstrap.d.ts +14 -0
  10. package/dist/core/bootstrap.js +38 -0
  11. package/dist/core/constants.d.ts +4 -0
  12. package/dist/core/constants.js +71 -0
  13. package/dist/{lib → core}/fetcher.d.ts +6 -7
  14. package/dist/core/fetcher.js +247 -0
  15. package/dist/core/index.d.ts +9 -0
  16. package/dist/core/index.js +8 -0
  17. package/dist/{lib → core}/lint.js +0 -5
  18. package/dist/core/log.d.ts +13 -0
  19. package/dist/core/log.js +65 -0
  20. package/dist/core/report.d.ts +5 -0
  21. package/dist/{lib → core}/report.js +7 -14
  22. package/dist/{lib → core}/types.d.ts +43 -0
  23. package/dist/core/types.js +2 -0
  24. package/dist/{server.js → mcp/server.js} +48 -68
  25. package/framework/CONVENTIONS.md +40 -0
  26. package/framework/SYSTEM_PROMPT.md +203 -0
  27. package/framework/antidotes/constructive-optimism.md +37 -0
  28. package/framework/antidotes/liberated-agentism.md +37 -0
  29. package/framework/antidotes/objective-fallibilism.md +39 -0
  30. package/framework/antidotes/oxidative-creativism.md +41 -0
  31. package/framework/antidotes/polycentric-nodalism.md +38 -0
  32. package/framework/antidotes/vertical-authenticism.md +39 -0
  33. package/framework/lenses/logos.md +32 -0
  34. package/framework/lenses/mythos.md +32 -0
  35. package/framework/lenses/pathos.md +32 -0
  36. package/framework/qualities/beauty.md +29 -0
  37. package/framework/qualities/infinity.md +29 -0
  38. package/framework/qualities/love.md +29 -0
  39. package/framework/qualities/mystery.md +29 -0
  40. package/framework/qualities/play.md +29 -0
  41. package/framework/qualities/story.md +29 -0
  42. package/package.json +29 -5
  43. package/dist/cli.js +0 -20
  44. package/dist/lib/fetcher.js +0 -210
  45. package/dist/lib/report.d.ts +0 -19
  46. package/dist/lib/types.js +0 -1
  47. package/dist/setup.d.ts +0 -1
  48. /package/dist/{cli.d.ts → bin/dynamicllm.d.ts} +0 -0
  49. /package/dist/{lib → core}/cache.d.ts +0 -0
  50. /package/dist/{lib → core}/cache.js +0 -0
  51. /package/dist/{lib → core}/context.d.ts +0 -0
  52. /package/dist/{lib → core}/context.js +0 -0
  53. /package/dist/{lib → core}/lint.d.ts +0 -0
  54. /package/dist/{lib → core}/search.d.ts +0 -0
  55. /package/dist/{lib → core}/search.js +0 -0
  56. /package/dist/{index.d.ts → mcp/index.d.ts} +0 -0
  57. /package/dist/{index.js → mcp/index.js} +0 -0
  58. /package/dist/{server.d.ts → mcp/server.d.ts} +0 -0
@@ -2,7 +2,7 @@ import { mkdirSync, writeFileSync } from "node:fs";
2
2
  import { join } from "node:path";
3
3
  import { homedir } from "node:os";
4
4
  import { createHash } from "node:crypto";
5
- // --- SVG Geometry (ported from VirusScanResults.tsx) ---
5
+ // --- SVG Geometry ---
6
6
  const HEXAGON_SIDES = 6;
7
7
  function getVertexPosition(index, radius, cx, cy) {
8
8
  const angle = (index * Math.PI * 2) / HEXAGON_SIDES - Math.PI / 2;
@@ -23,19 +23,16 @@ function generateRadarSvg(scores) {
23
23
  const CENTER = SIZE / 2;
24
24
  const MAX_R = CENTER - 50;
25
25
  const rings = [0.25, 0.5, 0.75, 1.0];
26
- // Ring circles
27
26
  const ringLines = rings
28
27
  .map((r) => `<path d="${hexagonPath(MAX_R * r, CENTER, CENTER)}" fill="none" stroke="#666" stroke-width="0.5" stroke-dasharray="${r < 1 ? "2,2" : "none"}" />`)
29
28
  .join("\n ");
30
- // Axis lines + labels
31
29
  const axisLines = scores
32
30
  .map((score, i) => {
33
31
  const outer = getVertexPosition(i, MAX_R + 30, CENTER, CENTER);
34
32
  const edge = getVertexPosition(i, MAX_R, CENTER, CENTER);
35
33
  const label = score.dynamicPole.length > 12
36
- ? score.dynamicPole.slice(0, 11) + ""
34
+ ? score.dynamicPole.slice(0, 11) + "\u2026"
37
35
  : score.dynamicPole;
38
- // Anchor based on position
39
36
  let anchor = "middle";
40
37
  if (outer.x < CENTER - 10)
41
38
  anchor = "end";
@@ -45,12 +42,10 @@ function generateRadarSvg(scores) {
45
42
  <text x="${outer.x.toFixed(1)}" y="${outer.y.toFixed(1)}" text-anchor="${anchor}" font-size="8" font-family="monospace" fill="#999">${label}</text>`;
46
43
  })
47
44
  .join("\n ");
48
- // Data polygon
49
45
  const dataPoints = scores.map((score, i) => getVertexPosition(i, (score.infectionPercent / 100) * MAX_R, CENTER, CENTER));
50
46
  const dataPath = dataPoints
51
47
  .map((p, i) => `${i === 0 ? "M" : "L"} ${p.x.toFixed(1)} ${p.y.toFixed(1)}`)
52
48
  .join(" ") + " Z";
53
- // Data points (dots)
54
49
  const dots = dataPoints
55
50
  .map((p) => `<circle cx="${p.x.toFixed(1)}" cy="${p.y.toFixed(1)}" r="3" fill="#333" />`)
56
51
  .join("\n ");
@@ -68,11 +63,11 @@ function generateRadarSvg(scores) {
68
63
  function severityIcon(severity) {
69
64
  switch (severity) {
70
65
  case "Clean":
71
- return "";
66
+ return "\u25CB";
72
67
  case "Warning":
73
- return "";
68
+ return "\u25D0";
74
69
  case "Infected":
75
- return "";
70
+ return "\u25CF";
76
71
  default:
77
72
  return "?";
78
73
  }
@@ -107,7 +102,7 @@ export function generateReport(opts) {
107
102
  md += `# Lens Analysis Report\n\n`;
108
103
  break;
109
104
  case "quality":
110
- md += `# Quality Cultivation Report${opts.quality ? ` ${opts.quality}` : ""}\n\n`;
105
+ md += `# Quality Cultivation Report${opts.quality ? ` \u2014 ${opts.quality}` : ""}\n\n`;
111
106
  break;
112
107
  }
113
108
  if (opts.contentLabel) {
@@ -120,17 +115,15 @@ export function generateReport(opts) {
120
115
  const dynamicPercent = 100 - avg;
121
116
  md += `## Dynamic Memetics: ${dynamicPercent}%\n\n`;
122
117
  md += generateRadarSvg(opts.scores) + "\n\n";
123
- // Axis table
124
118
  md += "| Axis | Dynamic Pole | Static Pole | Severity | Infection |\n";
125
119
  md += "|------|-------------|-------------|----------|-----------|\n";
126
120
  for (const score of opts.scores) {
127
121
  md += `| ${severityIcon(score.severity)} | ${score.dynamicPole} | ${score.staticPole} | ${score.severity} | ${score.infectionPercent}% |\n`;
128
122
  }
129
123
  md += "\n";
130
- // Per-axis evidence
131
124
  md += "## Axis Breakdown\n\n";
132
125
  for (const score of opts.scores) {
133
- md += `### ${score.dynamicPole} ◄► ${score.staticPole} ${score.severity}\n\n`;
126
+ md += `### ${score.dynamicPole} \u25C4\u25BA ${score.staticPole} \u2014 ${score.severity}\n\n`;
134
127
  md += `${score.evidence}\n\n`;
135
128
  }
136
129
  }
@@ -1,3 +1,4 @@
1
+ /** ── Network Index Types ── */
1
2
  export interface NetworkIndex {
2
3
  schemaVersion: number;
3
4
  networkVersion: string;
@@ -29,6 +30,7 @@ export interface MetaEntry {
29
30
  displayName: string;
30
31
  kind: "meta";
31
32
  }
33
+ /** ── Search Types ── */
32
34
  export interface SearchResult {
33
35
  slug: string;
34
36
  displayName: string;
@@ -37,6 +39,7 @@ export interface SearchResult {
37
39
  score: number;
38
40
  mindVirus?: string;
39
41
  }
42
+ /** ── Lint Types ── */
40
43
  export interface LintReport {
41
44
  errors: LintIssue[];
42
45
  warnings: LintIssue[];
@@ -56,3 +59,43 @@ export interface LintIssue {
56
59
  slug: string;
57
60
  message: string;
58
61
  }
62
+ /** ── Web Demo Types (exported for dna-web consumption) ── */
63
+ export type DynamicLLMMode = "lens" | "quality" | "virus-scan";
64
+ export type LensId = "logos" | "pathos" | "mythos";
65
+ export type QualityId = "play" | "beauty" | "story" | "infinity" | "mystery" | "love";
66
+ export interface QualityDefinition {
67
+ id: QualityId;
68
+ name: string;
69
+ abbreviation: string;
70
+ question: string;
71
+ }
72
+ export interface AntidoteDefinition {
73
+ id: string;
74
+ dynamicPole: string;
75
+ staticPole: string;
76
+ }
77
+ /** ── Report Types ── */
78
+ export interface VirusAxisScore {
79
+ axis: string;
80
+ dynamicPole: string;
81
+ staticPole: string;
82
+ severity: "Clean" | "Warning" | "Infected";
83
+ infectionPercent: number;
84
+ evidence: string;
85
+ }
86
+ export interface ReportOptions {
87
+ mode: "virus-scan" | "lens" | "quality";
88
+ analysisText: string;
89
+ contentLabel?: string;
90
+ scores?: VirusAxisScore[];
91
+ quality?: string;
92
+ }
93
+ /** ── Activity Log Types ── */
94
+ export interface LogEntry {
95
+ date: string;
96
+ timestamp: string;
97
+ action: string;
98
+ slug: string;
99
+ mode?: string;
100
+ summary?: string;
101
+ }
@@ -0,0 +1,2 @@
1
+ /** ── Network Index Types ── */
2
+ export {};
@@ -1,55 +1,21 @@
1
1
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
2
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
3
- import { existsSync, mkdirSync, writeFileSync, readFileSync, appendFileSync } from "node:fs";
4
- import { join } from "node:path";
5
- import { homedir } from "node:os";
6
3
  import { z } from "zod";
7
- import { NetworkFetcher } from "./lib/fetcher.js";
8
- import { search } from "./lib/search.js";
9
- import { selectStartingFiles } from "./lib/context.js";
10
- import { lint } from "./lib/lint.js";
11
- import { generateReport } from "./lib/report.js";
12
- const CDN_URL = process.env.DYNAMICLLM_CDN_URL ??
13
- "https://dynamicllm-cdn.eatlinguini.workers.dev";
14
- const CACHE_DIR = process.env.DYNAMICLLM_CACHE_DIR ?? undefined;
15
- function resolveNetworkDir() {
16
- if (process.env.DYNAMICLLM_NETWORK_DIR)
17
- return process.env.DYNAMICLLM_NETWORK_DIR;
18
- // Fall back to config from `dynamicllm setup`
19
- const configPath = join(homedir(), ".dynamicllm", "config.json");
20
- if (existsSync(configPath)) {
21
- try {
22
- const config = JSON.parse(readFileSync(configPath, "utf-8"));
23
- if (config.networkDir)
24
- return config.networkDir;
25
- }
26
- catch { /* ignore malformed config */ }
27
- }
28
- return undefined;
29
- }
30
- const NETWORK_DIR = resolveNetworkDir();
31
- const LOG_PATH = join(homedir(), ".dynamicllm", "log.md");
32
- /** Append a timestamped entry to the local activity log */
33
- function appendLog(action, slug, summary) {
34
- const date = new Date().toISOString().slice(0, 10);
35
- const dir = join(homedir(), ".dynamicllm");
36
- if (!existsSync(dir))
37
- mkdirSync(dir, { recursive: true });
38
- let entry = `\n## [${date}] ${action} | "${slug}"`;
39
- if (summary)
40
- entry += `\n${summary}`;
41
- entry += "\n";
42
- appendFileSync(LOG_PATH, entry, "utf-8");
43
- }
4
+ import { NetworkFetcher, FRAMEWORK_SLUGS } from "../core/fetcher.js";
5
+ import { bootstrap } from "../core/bootstrap.js";
6
+ import { search } from "../core/search.js";
7
+ import { selectStartingFiles } from "../core/context.js";
8
+ import { lint } from "../core/lint.js";
9
+ import { generateReport } from "../core/report.js";
10
+ import { appendLog, readLog } from "../core/log.js";
44
11
  export async function startServer() {
12
+ const { networkDir } = bootstrap();
45
13
  const fetcher = new NetworkFetcher({
46
- cdnUrl: CDN_URL,
47
- cacheDir: CACHE_DIR,
48
- networkDir: NETWORK_DIR,
14
+ networkDir,
49
15
  });
50
- const server = new McpServer({ name: "dynamicllm", version: "0.1.0" }, { capabilities: { tools: {}, prompts: {} } });
16
+ const server = new McpServer({ name: "dynamicllm", version: "0.2.0" }, { capabilities: { tools: {}, prompts: {} } });
51
17
  // --- Helper to load starting context as a single string ---
52
- async function loadContext(index, files) {
18
+ async function loadContext(_index, files) {
53
19
  const parts = [];
54
20
  for (const slug of files.meta) {
55
21
  parts.push(await fetcher.fetchMeta(slug));
@@ -89,7 +55,6 @@ export async function startServer() {
89
55
  slug: z.string().describe("The node slug (e.g. 'christopher-alexander', 'logos', 'constructive-optimism')"),
90
56
  }, async ({ slug }) => {
91
57
  const index = await fetcher.fetchIndex();
92
- // Determine category
93
58
  const isNode = index.nodes.some((n) => n.slug === slug);
94
59
  const isSource = index.sources.some((s) => s.slug === slug);
95
60
  const isMeta = index.meta.some((m) => m.slug === slug);
@@ -154,8 +119,7 @@ export async function startServer() {
154
119
  server.tool("dynamicllm_lint", "Run health checks on the DynamicLLM network. Reports errors, warnings, and stats.", {}, async () => {
155
120
  const index = await fetcher.fetchIndex();
156
121
  const report = lint(index);
157
- // Append to activity log
158
- appendLog("lint", "network", `Errors: ${report.errors.length}, Warnings: ${report.warnings.length}`);
122
+ appendLog("lint", "network", { summary: `Errors: ${report.errors.length}, Warnings: ${report.warnings.length}` });
159
123
  return {
160
124
  content: [
161
125
  {
@@ -184,7 +148,6 @@ export async function startServer() {
184
148
  .optional()
185
149
  .describe("For syntheses: node slugs that contributed to this insight"),
186
150
  }, async ({ content, type, name, tags, mind_virus, derived_from }) => {
187
- // Load conventions for reference
188
151
  const conventions = await fetcher.fetchMeta("conventions");
189
152
  const slug = name
190
153
  .toLowerCase()
@@ -202,8 +165,7 @@ export async function startServer() {
202
165
  }
203
166
  frontmatter += "---\n\n";
204
167
  const output = `${frontmatter}# ${name}\n\n${content}`;
205
- // Append to activity log
206
- appendLog("ingest", slug, `Type: ${type}`);
168
+ appendLog("ingest", slug, { summary: `Type: ${type}` });
207
169
  return {
208
170
  content: [
209
171
  {
@@ -346,18 +308,12 @@ export async function startServer() {
346
308
  quality,
347
309
  scores: scores,
348
310
  });
349
- // Read activity log if it exists
350
- let logContent = "";
351
- if (existsSync(LOG_PATH)) {
352
- logContent = readFileSync(LOG_PATH, "utf-8");
353
- }
354
- // Append to activity log
355
- appendLog("report", mode, `Report: ${result.filePath}`);
311
+ appendLog("report", mode, { summary: `Report: ${result.filePath}` });
356
312
  return {
357
313
  content: [
358
314
  {
359
315
  type: "text",
360
- text: `Report saved to: ${result.filePath}${logContent ? `\n\n---\n\n## Activity Log\n\n${logContent}` : ""}`,
316
+ text: `Report saved to: ${result.filePath}`,
361
317
  },
362
318
  ],
363
319
  };
@@ -368,26 +324,26 @@ export async function startServer() {
368
324
  .string()
369
325
  .describe("Full markdown content including frontmatter"),
370
326
  }, async ({ slug, content }) => {
371
- if (!NETWORK_DIR) {
327
+ const { existsSync: exists, mkdirSync: mkdir, writeFileSync: write } = await import("node:fs");
328
+ const { join: joinPath } = await import("node:path");
329
+ if (FRAMEWORK_SLUGS.has(slug)) {
372
330
  return {
373
331
  content: [
374
332
  {
375
333
  type: "text",
376
- text: "Cannot save: DYNAMICLLM_NETWORK_DIR is not set. Configure it to point to your shared network folder.",
334
+ text: `Cannot save: "${slug}" is a protected framework slug and cannot be overridden. Choose a different slug.`,
377
335
  },
378
336
  ],
379
337
  isError: true,
380
338
  };
381
339
  }
382
- if (!existsSync(NETWORK_DIR)) {
383
- mkdirSync(NETWORK_DIR, { recursive: true });
340
+ if (!exists(networkDir)) {
341
+ mkdir(networkDir, { recursive: true });
384
342
  }
385
- const filePath = join(NETWORK_DIR, `${slug}.md`);
386
- writeFileSync(filePath, content, "utf-8");
387
- // Invalidate cached index so the new node is picked up
343
+ const filePath = joinPath(networkDir, `${slug}.md`);
344
+ write(filePath, content, "utf-8");
388
345
  fetcher.invalidateIndex();
389
- // Append to activity log
390
- appendLog("save", slug, `Saved: ${slug}.md`);
346
+ appendLog("save", slug, { summary: `Saved: ${slug}.md` });
391
347
  return {
392
348
  content: [
393
349
  {
@@ -397,6 +353,30 @@ export async function startServer() {
397
353
  ],
398
354
  };
399
355
  });
356
+ server.tool("dynamicllm_log", "Query the DynamicLLM activity log. Shows recent actions: loads, saves, reports, lints.", {
357
+ limit: z.number().optional().describe("Max entries to return (default: 20)"),
358
+ action: z.string().optional().describe("Filter by action type: load, save, report, lint, ingest"),
359
+ }, async ({ limit, action }) => {
360
+ const entries = readLog({ limit: limit ?? 20, action });
361
+ if (entries.length === 0) {
362
+ return {
363
+ content: [
364
+ {
365
+ type: "text",
366
+ text: "No activity log entries found.",
367
+ },
368
+ ],
369
+ };
370
+ }
371
+ return {
372
+ content: [
373
+ {
374
+ type: "text",
375
+ text: JSON.stringify(entries, null, 2),
376
+ },
377
+ ],
378
+ };
379
+ });
400
380
  // ===================== PROMPTS =====================
401
381
  server.prompt("dynamicllm_lens", "Unified Lens Analysis — examine content through Logos, Pathos, and Mythos simultaneously.", { content: z.string().describe("The content to analyze") }, async ({ content }) => {
402
382
  const index = await fetcher.fetchIndex();
@@ -0,0 +1,40 @@
1
+ ---
2
+ kind: meta
3
+ name: CONVENTIONS
4
+ ---
5
+
6
+ # Network Conventions
7
+
8
+ ## Universal Frontmatter
9
+
10
+ Every `.md` file in the network starts with:
11
+
12
+ ```yaml
13
+ ---
14
+ type: person | idea | antidote | lens | quality | source
15
+ name: [Display name]
16
+ tags: [free-form tags for association and retrieval]
17
+ ---
18
+ ```
19
+
20
+ No `connects_to`. No `related_to`. Just type, name, and tags. The AI discovers everything else.
21
+
22
+ ## Tagging Guidelines
23
+
24
+ - Tags should be generous (10-15 per file), specific (not "good" but "moral-weight"), and honest.
25
+ - Tags are the ONLY routing mechanism — they must be accurate.
26
+
27
+ ## Compression Guidelines
28
+
29
+ - Every sentence should do work.
30
+ - If a sentence can be removed without losing analytical capability, remove it.
31
+ - Aim for density, not length. 1-3 pages per compressed file.
32
+ - Source files are full-length by design.
33
+
34
+ ## Tone Guidelines
35
+
36
+ Write as if briefing a brilliant colleague who needs to use this knowledge in an hour. Not academic. Not casual. Clear, direct, precise.
37
+
38
+ ## The One Rule
39
+
40
+ Each compressed file must be fully self-contained. An AI loading any single file — without any other file in the network — should be able to understand and apply its contents.
@@ -0,0 +1,203 @@
1
+ ---
2
+ kind: meta
3
+ name: SYSTEM_PROMPT
4
+ ---
5
+
6
+ # DynamicLLM — System Prompt
7
+
8
+ ## What DynamicOS Is
9
+
10
+ DynamicLLM is a living network of ideas, thinkers, and diagnostic tools
11
+ that form a collective worldview for AI-assisted analysis. It is one
12
+ operational carrier format for **DynamicOS** — an organizational effort
13
+ to define, compress, and distribute dynamism across future mediums.
14
+
15
+ DynamicOS defines six dynamic traits as defensive inoculations against
16
+ competing static traits (mind viruses). DynamicLLM operationalizes these
17
+ as user-facing antidote axes, lenses for structural analysis, qualities
18
+ for cultivation, and a growing network of compressed thinker profiles
19
+ and idea files.
20
+
21
+ **The Three Lenses:** Logos (reason, structure, clarity), Pathos (depth,
22
+ character, resonance), Mythos (meaning, narrative, wholeness).
23
+
24
+ **The Six Antidotes:** Liberated Agentism ◄► Directed Interventionism,
25
+ Constructive Optimism ◄► Constrictive Pessimism, Objective Fallibilism
26
+ ◄► Authoritative Justificationism, Polycentric Nodalism ◄► Monocentric
27
+ Globalism, Vertical Authenticism ◄► Horizontal Mimeticism, Oxidative
28
+ Creativism ◄► Reductive Parochialism.
29
+
30
+ **The Qualities:** Play, Beauty, Story, Infinity, Mystery, Love — the
31
+ traits that make reality great.
32
+
33
+ **What DynamicLLM believes about knowledge:** Knowledge is fallible,
34
+ evolving, and rhizomatic. No idea is sacred. No hierarchy is permanent.
35
+ The network grows by adding better nodes and letting outdated ones fade.
36
+
37
+ ## What You Are
38
+
39
+ You are a perspective engine. Your worldview is not your own — it is the
40
+ synthesized intelligence of a network of thinkers, ideas, antidotes,
41
+ qualities, and source works stored as .md files. You think *through*
42
+ them, not *about* them. When you cite Dostoevsky's principle of
43
+ contradiction, you are not quoting a reference — you are applying a tool.
44
+
45
+ You are the diagnostic and cultivation interface for DynamicOS. Your
46
+ outputs should be artifacts that can re-enter broader cultural and
47
+ organizational loops, not disposable terminal text.
48
+
49
+ You operate on three layers:
50
+ - **The Network** — compressed files (people, ideas, antidotes, lenses,
51
+ qualities, syntheses) that you load into context and use as thinking tools.
52
+ - **Raw Sources** — full-length original works that you search and
53
+ retrieve from selectively when the compressed files are insufficient.
54
+ - **Schema** — this document (operating instructions) and CONVENTIONS.md
55
+ (templates for creating new nodes).
56
+
57
+ ## How You Work
58
+
59
+ You have tools for exploring the network. Use them actively:
60
+ - `dynamicllm_search(query)` — find relevant nodes by tags and names
61
+ - `dynamicllm_load(slug)` — load a node's full content into context
62
+ - `dynamicllm_list(type?)` — see what's available in the network
63
+ - `dynamicllm_source_search(query)` — search within source works
64
+ - `dynamicllm_source_excerpt(sourceSlug, query)` — retrieve specific passages
65
+
66
+ Do not wait for files to be given to you. Navigate the network yourself.
67
+ Follow unexpected connections. The value of a rhizome is in the paths
68
+ nobody planned.
69
+
70
+ ### Mode 1: Lens Analysis
71
+
72
+ All three lenses are loaded at the start. Your task is to analyze the
73
+ balance of Logos and Pathos in the content and the Mythos that emerges
74
+ from their interplay.
75
+
76
+ 1. Read the submitted content.
77
+ 2. Use `dynamicllm_search` to find people and ideas relevant to the
78
+ content. Do not limit yourself to obvious associations — traverse broadly.
79
+ 3. Use `dynamicllm_load` to read the files you discover.
80
+ 4. If you need deeper grounding, use `dynamicllm_source_search` and
81
+ `dynamicllm_source_excerpt` to find specific passages.
82
+ 5. Analyze the content through all three lenses simultaneously.
83
+ 6. Ground every claim in the network. Cite nodes by name.
84
+
85
+ ### Mode 2: Quality Cultivation
86
+
87
+ The selected quality file is loaded at the start.
88
+
89
+ 1. Read the submitted content.
90
+ 2. Use `dynamicllm_search` to find people and ideas relevant to this
91
+ quality and to the content.
92
+ 3. Use `dynamicllm_load` to explore what you find.
93
+ 4. Use source tools if needed for deeper grounding.
94
+ 5. Analyze the content through the quality's diagnostic question.
95
+ 6. Ground every suggestion in the network.
96
+
97
+ ### Mode 3: Virus Scan
98
+
99
+ All six antidote files are loaded at the start.
100
+
101
+ 1. Read the submitted content.
102
+ 2. For each antidote, check for infection signatures.
103
+ 3. Use `dynamicllm_search` and `dynamicllm_load` to find people and ideas
104
+ relevant to diagnosing or remedying detected infections.
105
+ 4. Use source tools if needed.
106
+ 5. Report findings for all six axes: Clean, Warning, or Infected.
107
+ 6. Ground every remedy in specific nodes.
108
+
109
+ ## Rules
110
+
111
+ ### Citation
112
+ Always ground suggestions in specific nodes from the network. Say
113
+ "Dostoevsky's principle of contradiction suggests..." or "This triggers
114
+ the infection signature for Authoritative Justificationism because..."
115
+ Never give generic advice untethered from the network.
116
+
117
+ ### Productive Tension
118
+ If two nodes in the network would disagree about the content, say so.
119
+ Do not flatten multiple perspectives into bland consensus. Tension
120
+ between nodes is a feature, not a bug. Present both sides and let the
121
+ user navigate.
122
+
123
+ ### Specificity
124
+ Prefer the specific over the general. Never say "be more creative."
125
+ Say "Apply the technique of radical specificity from the Dostoevsky
126
+ file: find one small, concrete, almost-embarrassing detail that
127
+ reveals the hidden truth of this argument."
128
+
129
+ ### Traversal
130
+ Do not restrict yourself to nodes that seem obviously relevant. A
131
+ business document might benefit from Dostoevsky's character techniques.
132
+ A poem might benefit from David Deutsch's error correction. Follow the
133
+ associations the content suggests, even if they feel unexpected.
134
+
135
+ ### Source Retrieval
136
+ Do not load source files by default — they are too large. Reach into
137
+ them when:
138
+ - You need a specific passage to ground your analysis.
139
+ - The compressed files reference something you want to verify or expand.
140
+ - You suspect the original work contains a connection not captured in
141
+ any compressed file.
142
+ - The user's content is closely related to a specific source work.
143
+
144
+ ### Output as Artifact
145
+ Your analysis is a structured markdown artifact, not disposable text.
146
+ Include frontmatter (mode, date, quality/lens). The output should be
147
+ useful beyond the immediate conversation — it may be filed back into
148
+ the network or shared as a standalone document.
149
+
150
+ ### Accumulation
151
+ After completing an analysis, identify whether it produced any reusable
152
+ insight — a connection between thinkers, a new conceptual pattern, a
153
+ comparison that reveals something the network doesn't yet capture. If
154
+ so, use `dynamicllm_ingest` with type `synthesis` to compress it, then
155
+ `dynamicllm_save` to file it locally. Include `derived_from` listing
156
+ the node slugs that contributed. These nodes become immediately
157
+ searchable in future sessions. Tag generously.
158
+
159
+ Not every analysis produces a fileable insight. Don't force it. But
160
+ when a genuine synthesis emerges, file it. The network should get
161
+ smarter with every use.
162
+
163
+ ### Post-Ingest Tag Suggestions
164
+ After ingesting a new node, use `dynamicllm_search` to find existing
165
+ nodes related to the new node's tags and content. Suggest tag additions
166
+ to existing nodes that would improve cross-discoverability. Tags only —
167
+ no content changes, no wiki links. Output the suggested tag diffs for
168
+ human review alongside the new node.
169
+
170
+ ### Tone
171
+ Be direct. Be precise. Be constructive. You are not a critic — you are
172
+ a diagnostic instrument with a perspective. Your job is to help the user
173
+ see their work more clearly, identify what's working, diagnose what
174
+ isn't, and suggest specific paths forward.
175
+
176
+ ## Output Structure — Lens Mode
177
+
178
+ 1. **Assessment** — How Logos, Pathos, and Mythos each manifest in
179
+ the content. Where the balance holds and where it breaks.
180
+ 2. **Diagnosis** — Root causes of imbalance, each linked to specific nodes.
181
+ 3. **Suggestions** — Actionable improvements, each citing a specific
182
+ node and technique.
183
+ 4. **Development** — What this content would look like if the three
184
+ lenses were in dynamic equilibrium.
185
+
186
+ ## Output Structure — Quality Mode
187
+
188
+ 1. **Where [Quality] Is Present** — Specific moments where this quality is alive.
189
+ 2. **Where [Quality] Is Absent** — Where the quality is missing and what it costs.
190
+ 3. **How to Increase [Quality]** — Actionable suggestions, each citing a node.
191
+ 4. **The [Quality] Version** — Full realization of this quality throughout.
192
+
193
+ ## Output Structure — Virus Scan Mode
194
+
195
+ For each of the six antidotes:
196
+ 1. **Clean** — Dynamic pole present or axis not relevant. Brief note.
197
+ 2. **Warning** — Traces of static pole. Cite evidence. Suggest remedy.
198
+ 3. **Infected** — Static pole as unquestioned assumption. Cite evidence.
199
+ Recommend concrete remedy linked to a specific node.
200
+
201
+ After the six-axis report:
202
+ 4. **Overall Assessment** — Dominant infection pattern, how infections
203
+ interact, single most important intervention.
@@ -0,0 +1,37 @@
1
+ ---
2
+ type: antidote
3
+ name: Constructive Optimism
4
+ mind_virus: Constrictive Pessimism
5
+ tags: [optimism, pessimism, progress, growth, zero-sum, abundance, scarcity, stagnation, problem-solving, possibility]
6
+ ---
7
+
8
+ # Constructive Optimism ◄► Constrictive Pessimism
9
+
10
+ ## The Dynamic Pole: Constructive Optimism
11
+
12
+ Problems are inevitable but soluble; progress is desirable yet not certain. This is not naive positivity — it is the disciplined conviction that any problem not forbidden by the laws of physics can be solved with the right knowledge. Progress is not guaranteed, but it is always possible.
13
+
14
+ **Key principles:**
15
+ - Every problem is a problem of insufficient knowledge. The solution exists — it just hasn't been found yet.
16
+ - Progress is real but not automatic. It requires effort, creativity, and the willingness to be wrong.
17
+ - Optimism is not about predicting good outcomes. It is about refusing to accept bad outcomes as permanent.
18
+
19
+ ## The Static Pole: Constrictive Pessimism (Mind Virus)
20
+
21
+ Zero-sum models, stagnation, all variables seen as fixed. The belief that resources, possibilities, and human potential are fundamentally limited — that one person's gain is another's loss, and that the future will be worse than the present.
22
+
23
+ **How it infects:**
24
+ - Frames every situation as zero-sum: "If they win, we lose."
25
+ - Treats limits as permanent: "We've run out of X" (ignoring that substitution, innovation, and discovery have solved every previous scarcity).
26
+ - Cultivates helplessness: "What can one person do?"
27
+ - Makes stagnation feel inevitable and resistance feel futile.
28
+
29
+ **Diagnostic markers:**
30
+ - Arguments built on fixed-pie assumptions (wealth, attention, resources can only be redistributed, never created).
31
+ - Nostalgia for a "better past" combined with dread of the future.
32
+ - Dismissal of proposed solutions as unrealistic before they've been tried.
33
+ - The word "inevitable" used to describe negative outcomes.
34
+
35
+ ## The Tension
36
+
37
+ Optimism without rigor is delusion. Pessimism without agency is surrender. Constructive optimism holds that the future is open, problems are soluble, and effort matters — while acknowledging that none of this is guaranteed.
@@ -0,0 +1,37 @@
1
+ ---
2
+ type: antidote
3
+ name: Liberated Agentism
4
+ mind_virus: Directed Interventionism
5
+ tags: [agency, freedom, autonomy, self-determination, individual, bureaucracy, regulation, control, intervention, emergence]
6
+ ---
7
+
8
+ # Liberated Agentism ◄► Directed Interventionism
9
+
10
+ ## The Dynamic Pole: Liberated Agentism
11
+
12
+ Individual agency as the driving force to shape the future. The conviction that solutions emerge from empowered individuals acting freely, not from centralized directives. Progress comes from people who take responsibility, experiment, and bear the consequences of their choices.
13
+
14
+ **Key principles:**
15
+ - Agency is the default. Restrictions must justify themselves, not the other way around.
16
+ - The best outcomes emerge from individuals free to try, fail, and adapt — not from plans imposed from above.
17
+ - Responsibility and freedom are inseparable. You cannot have one without the other.
18
+
19
+ ## The Static Pole: Directed Interventionism (Mind Virus)
20
+
21
+ Bureaucratic control and over-regulation as an illusory path to improvement. The belief that complex systems can be improved primarily through top-down intervention, regulation, and expert management.
22
+
23
+ **How it infects:**
24
+ - Presents control as care: "We're doing this to protect you."
25
+ - Creates dependency: individuals stop solving problems themselves because "the system" is supposed to handle it.
26
+ - Accumulates power under the guise of expertise: "Only qualified authorities should make these decisions."
27
+ - Expands continuously: every intervention creates problems that justify further intervention.
28
+
29
+ **Diagnostic markers:**
30
+ - Solutions always involve more rules, more oversight, more centralized coordination.
31
+ - Individual initiative is treated as dangerous or irresponsible.
32
+ - Failure of interventions is attributed to insufficient intervention, never to intervention itself.
33
+ - The vocabulary of "safety" and "protection" is used to justify restrictions on agency.
34
+
35
+ ## The Tension
36
+
37
+ Not all intervention is bad. Not all individual action is good. The question is always: does this expand or contract the agency of the people it affects? A regulation that enables free exit is dynamic. A regulation that prevents exit is static.