mindforge-cc 11.5.1 → 11.7.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/.agent/mindforge/skill-tdd.md +53 -0
- package/.agent/mindforge/skills-index.md +118 -0
- package/.agent/mindforge/systematic-debug.md +60 -0
- package/.agent/mindforge/wf-catalog.md +37 -0
- package/.agent/mindforge/wf-code-audit.md +31 -0
- package/.agent/mindforge/wf-competitive-analysis.md +31 -0
- package/.agent/mindforge/wf-deep-research.md +32 -0
- package/.agent/mindforge/wf-feature-planner.md +31 -0
- package/.agent/mindforge/wf-incident-response.md +31 -0
- package/.agent/mindforge/wf-onboard-codebase.md +31 -0
- package/.agent/mindforge/wf-perf-optimize.md +31 -0
- package/.agent/mindforge/wf-pr-review.md +31 -0
- package/.agent/mindforge/wf-refactor-plan.md +31 -0
- package/.agent/mindforge/wf-release-prep.md +31 -0
- package/.agent/mindforge/wf-tdd-sprint.md +31 -0
- package/.agent/mindforge/wf-tech-evaluation.md +31 -0
- package/.agent/skills/1password-skill/SKILL.md +156 -0
- package/.agent/skills/1password-skill/references/cli-examples.md +31 -0
- package/.agent/skills/1password-skill/references/get-started.md +21 -0
- package/.agent/skills/article-illustrator/SKILL.md +199 -0
- package/.agent/skills/article-illustrator/references/prompt-construction.md +426 -0
- package/.agent/skills/article-illustrator/references/style-presets.md +80 -0
- package/.agent/skills/article-illustrator/references/styles.md +224 -0
- package/.agent/skills/article-illustrator/references/usage.md +50 -0
- package/.agent/skills/article-illustrator/references/workflow.md +332 -0
- package/.agent/skills/arxiv/SKILL.md +275 -0
- package/.agent/skills/blogwatcher/SKILL.md +130 -0
- package/.agent/skills/code-wiki/SKILL.md +438 -0
- package/.agent/skills/code-wiki/templates/README.md +31 -0
- package/.agent/skills/code-wiki/templates/architecture.md +30 -0
- package/.agent/skills/code-wiki/templates/getting-started.md +47 -0
- package/.agent/skills/code-wiki/templates/module.md +38 -0
- package/.agent/skills/codebase-inspection/SKILL.md +109 -0
- package/.agent/skills/comic-creator/SKILL.md +240 -0
- package/.agent/skills/comic-creator/references/analysis-framework.md +176 -0
- package/.agent/skills/comic-creator/references/auto-selection.md +71 -0
- package/.agent/skills/comic-creator/references/base-prompt.md +98 -0
- package/.agent/skills/comic-creator/references/character-template.md +180 -0
- package/.agent/skills/comic-creator/references/ohmsha-guide.md +85 -0
- package/.agent/skills/comic-creator/references/partial-workflows.md +106 -0
- package/.agent/skills/comic-creator/references/storyboard-template.md +143 -0
- package/.agent/skills/comic-creator/references/workflow.md +401 -0
- package/.agent/skills/concept-diagrams/SKILL.md +355 -0
- package/.agent/skills/concept-diagrams/references/dashboard-patterns.md +43 -0
- package/.agent/skills/concept-diagrams/references/infrastructure-patterns.md +144 -0
- package/.agent/skills/concept-diagrams/references/physical-shape-cookbook.md +42 -0
- package/.agent/skills/creative-ideation/SKILL.md +144 -0
- package/.agent/skills/creative-ideation/references/full-prompt-library.md +110 -0
- package/.agent/skills/devops-cli/SKILL.md +149 -0
- package/.agent/skills/devops-cli/references/app-discovery.md +112 -0
- package/.agent/skills/devops-cli/references/authentication.md +59 -0
- package/.agent/skills/devops-cli/references/cli-reference.md +104 -0
- package/.agent/skills/devops-cli/references/running-apps.md +171 -0
- package/.agent/skills/devops-watchers/SKILL.md +103 -0
- package/.agent/skills/docker-management/SKILL.md +273 -0
- package/.agent/skills/domain-intel/SKILL.md +96 -0
- package/.agent/skills/duckduckgo-search/SKILL.md +230 -0
- package/.agent/skills/github-auth/SKILL.md +240 -0
- package/.agent/skills/github-code-review/SKILL.md +474 -0
- package/.agent/skills/github-code-review/references/review-output-template.md +74 -0
- package/.agent/skills/github-issues/SKILL.md +363 -0
- package/.agent/skills/github-issues/templates/bug-report.md +35 -0
- package/.agent/skills/github-issues/templates/feature-request.md +31 -0
- package/.agent/skills/github-pr-workflow/SKILL.md +360 -0
- package/.agent/skills/github-pr-workflow/references/ci-troubleshooting.md +183 -0
- package/.agent/skills/github-pr-workflow/references/conventional-commits.md +71 -0
- package/.agent/skills/github-pr-workflow/templates/pr-body-bugfix.md +35 -0
- package/.agent/skills/github-pr-workflow/templates/pr-body-feature.md +33 -0
- package/.agent/skills/github-repo-management/SKILL.md +509 -0
- package/.agent/skills/github-repo-management/references/github-api-cheatsheet.md +161 -0
- package/.agent/skills/godmode/SKILL.md +396 -0
- package/.agent/skills/godmode/references/jailbreak-templates.md +128 -0
- package/.agent/skills/godmode/references/refusal-detection.md +142 -0
- package/.agent/skills/hyperframes/SKILL.md +182 -0
- package/.agent/skills/hyperframes/references/cli.md +185 -0
- package/.agent/skills/hyperframes/references/composition.md +129 -0
- package/.agent/skills/hyperframes/references/features.md +289 -0
- package/.agent/skills/hyperframes/references/gsap.md +136 -0
- package/.agent/skills/hyperframes/references/troubleshooting.md +137 -0
- package/.agent/skills/hyperframes/references/website-to-video.md +145 -0
- package/.agent/skills/jupyter-live-kernel/SKILL.md +160 -0
- package/.agent/skills/kanban-orchestrator/SKILL.md +209 -0
- package/.agent/skills/kanban-worker/SKILL.md +188 -0
- package/.agent/skills/llm-wiki/SKILL.md +499 -0
- package/.agent/skills/meme-generation/SKILL.md +122 -0
- package/.agent/skills/node-inspect-debugger/SKILL.md +312 -0
- package/.agent/skills/obsidian/SKILL.md +60 -0
- package/.agent/skills/osint-investigation/SKILL.md +269 -0
- package/.agent/skills/osint-investigation/templates/source-template.md +59 -0
- package/.agent/skills/oss-forensics/SKILL.md +422 -0
- package/.agent/skills/oss-forensics/references/evidence-types.md +89 -0
- package/.agent/skills/oss-forensics/references/github-archive-guide.md +184 -0
- package/.agent/skills/oss-forensics/references/investigation-templates.md +131 -0
- package/.agent/skills/oss-forensics/references/recovery-techniques.md +164 -0
- package/.agent/skills/oss-forensics/templates/forensic-report.md +151 -0
- package/.agent/skills/oss-forensics/templates/malicious-package-report.md +43 -0
- package/.agent/skills/parallel-cli/SKILL.md +384 -0
- package/.agent/skills/pinggy-tunnel/SKILL.md +302 -0
- package/.agent/skills/pixel-art/SKILL.md +209 -0
- package/.agent/skills/pixel-art/references/palettes.md +49 -0
- package/.agent/skills/plan/SKILL.md +331 -0
- package/.agent/skills/polymarket/SKILL.md +75 -0
- package/.agent/skills/polymarket/references/api-endpoints.md +220 -0
- package/.agent/skills/python-debugpy/SKILL.md +368 -0
- package/.agent/skills/requesting-code-review/SKILL.md +273 -0
- package/.agent/skills/research-paper-writing/SKILL.md +2367 -0
- package/.agent/skills/research-paper-writing/references/autoreason-methodology.md +394 -0
- package/.agent/skills/research-paper-writing/references/checklists.md +434 -0
- package/.agent/skills/research-paper-writing/references/citation-workflow.md +563 -0
- package/.agent/skills/research-paper-writing/references/experiment-patterns.md +728 -0
- package/.agent/skills/research-paper-writing/references/human-evaluation.md +476 -0
- package/.agent/skills/research-paper-writing/references/paper-types.md +481 -0
- package/.agent/skills/research-paper-writing/references/reviewer-guidelines.md +433 -0
- package/.agent/skills/research-paper-writing/references/sources.md +191 -0
- package/.agent/skills/research-paper-writing/references/writing-guide.md +474 -0
- package/.agent/skills/research-paper-writing/templates/README.md +251 -0
- package/.agent/skills/rest-graphql-debug/SKILL.md +507 -0
- package/.agent/skills/s6-container-supervision/SKILL.md +171 -0
- package/.agent/skills/scrapling/SKILL.md +328 -0
- package/.agent/skills/sherlock/SKILL.md +186 -0
- package/.agent/skills/simplify-code/SKILL.md +168 -0
- package/.agent/skills/skill-authoring/SKILL.md +158 -0
- package/.agent/skills/spike/SKILL.md +190 -0
- package/.agent/skills/subagent-driven-development/SKILL.md +345 -0
- package/.agent/skills/subagent-driven-development/references/context-budget-discipline.md +53 -0
- package/.agent/skills/subagent-driven-development/references/gates-taxonomy.md +93 -0
- package/.agent/skills/systematic-debugging/SKILL.md +360 -0
- package/.agent/skills/test-driven-development/SKILL.md +336 -0
- package/.agent/skills/video-orchestrator/SKILL.md +194 -0
- package/.agent/skills/video-orchestrator/references/examples.md +227 -0
- package/.agent/skills/video-orchestrator/references/intake.md +166 -0
- package/.agent/skills/video-orchestrator/references/kanban-setup.md +278 -0
- package/.agent/skills/video-orchestrator/references/monitoring.md +180 -0
- package/.agent/skills/video-orchestrator/references/role-archetypes.md +298 -0
- package/.agent/skills/video-orchestrator/references/tool-matrix.md +317 -0
- package/.agent/skills/web-pentest/SKILL.md +332 -0
- package/.agent/skills/web-pentest/references/bypass-techniques.md +133 -0
- package/.agent/skills/web-pentest/references/exploitation-techniques.md +204 -0
- package/.agent/skills/web-pentest/references/scope-enforcement.md +110 -0
- package/.agent/skills/web-pentest/references/vuln-taxonomy.md +81 -0
- package/.agent/skills/web-pentest/templates/authorization.md +69 -0
- package/.agent/skills/web-pentest/templates/pentest-report.md +178 -0
- package/.claude/commands/mindforge/skill-tdd.md +53 -0
- package/.claude/commands/mindforge/skills-index.md +118 -0
- package/.claude/commands/mindforge/systematic-debug.md +60 -0
- package/.claude/commands/mindforge/wf-catalog.md +37 -0
- package/.claude/commands/mindforge/wf-code-audit.md +31 -0
- package/.claude/commands/mindforge/wf-competitive-analysis.md +31 -0
- package/.claude/commands/mindforge/wf-deep-research.md +32 -0
- package/.claude/commands/mindforge/wf-feature-planner.md +31 -0
- package/.claude/commands/mindforge/wf-incident-response.md +31 -0
- package/.claude/commands/mindforge/wf-onboard-codebase.md +31 -0
- package/.claude/commands/mindforge/wf-perf-optimize.md +31 -0
- package/.claude/commands/mindforge/wf-pr-review.md +31 -0
- package/.claude/commands/mindforge/wf-refactor-plan.md +31 -0
- package/.claude/commands/mindforge/wf-release-prep.md +31 -0
- package/.claude/commands/mindforge/wf-tdd-sprint.md +31 -0
- package/.claude/commands/mindforge/wf-tech-evaluation.md +31 -0
- package/.mindforge/config.json +2 -2
- package/.mindforge/dynamic-workflows/REGISTRY.md +65 -0
- package/.mindforge/dynamic-workflows/index.json +171 -0
- package/.mindforge/dynamic-workflows/scripts/code-audit.js +103 -0
- package/.mindforge/dynamic-workflows/scripts/competitive-analysis.js +85 -0
- package/.mindforge/dynamic-workflows/scripts/deep-research.js +151 -0
- package/.mindforge/dynamic-workflows/scripts/feature-planner.js +104 -0
- package/.mindforge/dynamic-workflows/scripts/incident-response.js +106 -0
- package/.mindforge/dynamic-workflows/scripts/onboard-codebase.js +102 -0
- package/.mindforge/dynamic-workflows/scripts/perf-optimize.js +128 -0
- package/.mindforge/dynamic-workflows/scripts/pr-review.js +87 -0
- package/.mindforge/dynamic-workflows/scripts/refactor-plan.js +121 -0
- package/.mindforge/dynamic-workflows/scripts/release-prep.js +102 -0
- package/.mindforge/dynamic-workflows/scripts/tdd-sprint.js +103 -0
- package/.mindforge/dynamic-workflows/scripts/tech-evaluation.js +72 -0
- package/.mindforge/memory/sync-manifest.json +1 -1
- package/.mindforge/skills/arxiv/SKILL.md +294 -0
- package/.mindforge/skills/blogwatcher/SKILL.md +147 -0
- package/.mindforge/skills/code-wiki/SKILL.md +457 -0
- package/.mindforge/skills/codebase-inspection/SKILL.md +126 -0
- package/.mindforge/skills/concept-diagrams/SKILL.md +373 -0
- package/.mindforge/skills/creative-ideation/SKILL.md +162 -0
- package/.mindforge/skills/domain-intel/SKILL.md +116 -0
- package/.mindforge/skills/duckduckgo-search/SKILL.md +249 -0
- package/.mindforge/skills/github-code-review/SKILL.md +493 -0
- package/.mindforge/skills/github-issues/SKILL.md +382 -0
- package/.mindforge/skills/github-pr-workflow/SKILL.md +379 -0
- package/.mindforge/skills/jupyter-live-kernel/SKILL.md +179 -0
- package/.mindforge/skills/kanban-orchestrator/SKILL.md +227 -0
- package/.mindforge/skills/kanban-worker/SKILL.md +206 -0
- package/.mindforge/skills/meme-generation/SKILL.md +141 -0
- package/.mindforge/skills/obsidian/SKILL.md +80 -0
- package/.mindforge/skills/osint-investigation/SKILL.md +288 -0
- package/.mindforge/skills/oss-forensics/SKILL.md +421 -0
- package/.mindforge/skills/pixel-art/SKILL.md +228 -0
- package/.mindforge/skills/plan/SKILL.md +350 -0
- package/.mindforge/skills/requesting-code-review/SKILL.md +292 -0
- package/.mindforge/skills/research-paper-writing/SKILL.md +2384 -0
- package/.mindforge/skills/scrapling/SKILL.md +345 -0
- package/.mindforge/skills/sherlock/SKILL.md +203 -0
- package/.mindforge/skills/simplify-code/SKILL.md +187 -0
- package/.mindforge/skills/spike/SKILL.md +209 -0
- package/.mindforge/skills/subagent-driven-development/SKILL.md +364 -0
- package/.mindforge/skills/systematic-debugging/SKILL.md +379 -0
- package/.mindforge/skills/test-driven-development/SKILL.md +355 -0
- package/.mindforge/skills/web-pentest/SKILL.md +327 -0
- package/CHANGELOG.md +71 -0
- package/MINDFORGE.md +2 -2
- package/README.md +72 -3
- package/RELEASENOTES.md +109 -0
- package/bin/installer-core.js +6 -2
- package/bin/mindforge-cli.js +7 -0
- package/bin/workflows/workflow-runner.js +110 -0
- package/docs/commands-reference.md +25 -0
- package/docs/getting-started.md +42 -5
- package/package.json +2 -1
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kanban-worker
|
|
3
|
+
description: Pitfalls, examples, and edge cases for Kanban workers. The lifecycle itself is auto-injected into every worker's system prompt as KANBAN_GUIDANCE (from agent/prompt_builder.py); this skill is what you load when you want deeper detail on specific scenarios.
|
|
4
|
+
version: 2.0.0
|
|
5
|
+
environments: [kanban]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Kanban Worker — Pitfalls and Examples
|
|
9
|
+
|
|
10
|
+
> You're seeing this skill because the Kanban dispatcher spawned you as a worker with `--skills kanban-worker` — it's loaded automatically for every dispatched worker. The **lifecycle** (6 steps: orient → work → heartbeat → block/complete) also lives in the `KANBAN_GUIDANCE` block that's auto-injected into your system prompt. This skill is the deeper detail: good handoff shapes, retry diagnostics, edge cases.
|
|
11
|
+
|
|
12
|
+
## Workspace handling
|
|
13
|
+
|
|
14
|
+
Your workspace kind determines how you should behave inside `$HERMES_KANBAN_WORKSPACE`:
|
|
15
|
+
|
|
16
|
+
| Kind | What it is | How to work |
|
|
17
|
+
|---|---|---|
|
|
18
|
+
| `scratch` | Fresh tmp dir, yours alone | Read/write freely; it gets GC'd when the task is archived. |
|
|
19
|
+
| `dir:<path>` | Shared persistent directory | Other runs will read what you write. Treat it like long-lived state. Path is guaranteed absolute (the kernel rejects relative paths). |
|
|
20
|
+
| `worktree` | Git worktree at the resolved path | If `.git` doesn't exist, run `git worktree add <path> ${HERMES_KANBAN_BRANCH:-wt/$HERMES_KANBAN_TASK}` from the main repo first, then cd and work normally. Commit work here. |
|
|
21
|
+
|
|
22
|
+
## Tenant isolation
|
|
23
|
+
|
|
24
|
+
If `$HERMES_TENANT` is set, the task belongs to a tenant namespace. When reading or writing persistent memory, prefix memory entries with the tenant so context doesn't leak across tenants:
|
|
25
|
+
|
|
26
|
+
- Good: `business-a: Acme is our biggest customer`
|
|
27
|
+
- Bad (leaks): `Acme is our biggest customer`
|
|
28
|
+
|
|
29
|
+
## Good summary + metadata shapes
|
|
30
|
+
|
|
31
|
+
The `kanban_complete(summary=..., metadata=...)` handoff is how downstream workers read what you did. Patterns that work:
|
|
32
|
+
|
|
33
|
+
**Coding task:**
|
|
34
|
+
```python
|
|
35
|
+
kanban_complete(
|
|
36
|
+
summary="shipped rate limiter — token bucket, keys on user_id with IP fallback, 14 tests pass",
|
|
37
|
+
metadata={
|
|
38
|
+
"changed_files": ["rate_limiter.py", "tests/test_rate_limiter.py"],
|
|
39
|
+
"tests_run": 14,
|
|
40
|
+
"tests_passed": 14,
|
|
41
|
+
"decisions": ["user_id primary, IP fallback for unauthenticated requests"],
|
|
42
|
+
},
|
|
43
|
+
)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**Coding task that needs human review (review-required):**
|
|
47
|
+
|
|
48
|
+
For most code-changing tasks, the work isn't truly *done* until a human reviewer has eyes on it. Block instead of complete, with `reason` prefixed `review-required: ` so the dashboard surfaces the row as needing review. Drop the structured metadata (changed files, test counts, diff/PR url) into a comment first, since `kanban_block` only carries the human-readable reason — comments are the durable annotation channel. Reviewer either approves and runs `hermes kanban unblock <id>` (which re-spawns you with the comment thread for any follow-ups) or asks for changes via another comment.
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
import json
|
|
52
|
+
|
|
53
|
+
kanban_comment(
|
|
54
|
+
body="review-required handoff:\n" + json.dumps({
|
|
55
|
+
"changed_files": ["rate_limiter.py", "tests/test_rate_limiter.py"],
|
|
56
|
+
"tests_run": 14,
|
|
57
|
+
"tests_passed": 14,
|
|
58
|
+
"diff_path": "/path/to/worktree", # or PR url if pushed
|
|
59
|
+
"decisions": ["user_id primary, IP fallback for unauthenticated requests"],
|
|
60
|
+
}, indent=2),
|
|
61
|
+
)
|
|
62
|
+
kanban_block(
|
|
63
|
+
reason="review-required: rate limiter shipped, 14/14 tests pass — needs eyes on the user_id/IP fallback choice before merging",
|
|
64
|
+
)
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Use `kanban_complete` only when the task is genuinely terminal — e.g. a one-line typo fix, a docs change with no functional consequences, or a research task where the artifact IS the writeup itself.
|
|
68
|
+
|
|
69
|
+
**Research task:**
|
|
70
|
+
```python
|
|
71
|
+
kanban_complete(
|
|
72
|
+
summary="3 competing libraries reviewed; vLLM wins on throughput, SGLang on latency, Tensorrt-LLM on memory efficiency",
|
|
73
|
+
metadata={
|
|
74
|
+
"sources_read": 12,
|
|
75
|
+
"recommendation": "vLLM",
|
|
76
|
+
"benchmarks": {"vllm": 1.0, "sglang": 0.87, "trtllm": 0.72},
|
|
77
|
+
},
|
|
78
|
+
)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**Review task:**
|
|
82
|
+
```python
|
|
83
|
+
kanban_complete(
|
|
84
|
+
summary="reviewed PR #123; 2 blocking issues found (SQL injection in /search, missing CSRF on /settings)",
|
|
85
|
+
metadata={
|
|
86
|
+
"pr_number": 123,
|
|
87
|
+
"findings": [
|
|
88
|
+
{"severity": "critical", "file": "api/search.py", "line": 42, "issue": "raw SQL concat"},
|
|
89
|
+
{"severity": "high", "file": "api/settings.py", "issue": "missing CSRF middleware"},
|
|
90
|
+
],
|
|
91
|
+
"approved": False,
|
|
92
|
+
},
|
|
93
|
+
)
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Shape `metadata` so downstream parsers (reviewers, aggregators, schedulers) can use it without re-reading your prose.
|
|
97
|
+
|
|
98
|
+
## Claiming cards you actually created
|
|
99
|
+
|
|
100
|
+
If your run produced new kanban tasks (via `kanban_create`), pass the ids in `created_cards` on `kanban_complete`. The kernel verifies each id exists and was created by your profile; any phantom id blocks the completion with an error listing what went wrong, and the rejected attempt is permanently recorded on the task's event log. **Only list ids you captured from a successful `kanban_create` return value — never invent ids from prose, never paste ids from earlier runs, never claim cards another worker created.**
|
|
101
|
+
|
|
102
|
+
```python
|
|
103
|
+
# GOOD — capture return values, then claim them.
|
|
104
|
+
c1 = kanban_create(title="remediate SQL injection", assignee="security-worker")
|
|
105
|
+
c2 = kanban_create(title="fix CSRF middleware", assignee="web-worker")
|
|
106
|
+
|
|
107
|
+
kanban_complete(
|
|
108
|
+
summary="Review done; spawned remediations for both findings.",
|
|
109
|
+
metadata={"pr_number": 123, "approved": False},
|
|
110
|
+
created_cards=[c1["task_id"], c2["task_id"]],
|
|
111
|
+
)
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
```python
|
|
115
|
+
# BAD — claiming ids you don't have captured return values for.
|
|
116
|
+
kanban_complete(
|
|
117
|
+
summary="Created remediation cards t_a1b2c3d4, t_deadbeef", # hallucinated
|
|
118
|
+
created_cards=["t_a1b2c3d4", "t_deadbeef"], # → gate rejects
|
|
119
|
+
)
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
If a `kanban_create` call fails (exception, tool_error), the card was NOT created — do not include a phantom id for it. Retry the create, or omit the id and mention the failure in your summary. The prose-scan pass also catches `t_<hex>` references in your free-form summary that don't resolve; these don't block the completion but show up as advisory warnings on the task in the dashboard.
|
|
123
|
+
|
|
124
|
+
## Block reasons that get answered fast
|
|
125
|
+
|
|
126
|
+
Bad: `"stuck"` — the human has no context.
|
|
127
|
+
|
|
128
|
+
Good: one sentence naming the specific decision you need. Leave longer context as a comment instead.
|
|
129
|
+
|
|
130
|
+
```python
|
|
131
|
+
kanban_comment(
|
|
132
|
+
task_id=os.environ["HERMES_KANBAN_TASK"],
|
|
133
|
+
body="Full context: I have user IPs from Cloudflare headers but some users are behind NATs with thousands of peers. Keying on IP alone causes false positives.",
|
|
134
|
+
)
|
|
135
|
+
kanban_block(reason="Rate limit key choice: IP (simple, NAT-unsafe) or user_id (requires auth, skips anonymous endpoints)?")
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
The block message is what appears in the dashboard / gateway notifier. The comment is the deeper context a human reads when they open the task.
|
|
139
|
+
|
|
140
|
+
## Heartbeats worth sending
|
|
141
|
+
|
|
142
|
+
Good heartbeats name progress: `"epoch 12/50, loss 0.31"`, `"scanned 1.2M/2.4M rows"`, `"uploaded 47/120 videos"`.
|
|
143
|
+
|
|
144
|
+
Bad heartbeats: `"still working"`, empty notes, sub-second intervals. Every few minutes max; skip entirely for tasks under ~2 minutes.
|
|
145
|
+
|
|
146
|
+
## Retry scenarios
|
|
147
|
+
|
|
148
|
+
If you open the task and `kanban_show` returns `runs: [...]` with one or more closed runs, you're a retry. The prior runs' `outcome` / `summary` / `error` tell you what didn't work. Don't repeat that path. Typical retry diagnostics:
|
|
149
|
+
|
|
150
|
+
- `outcome: "timed_out"` — the previous attempt hit `max_runtime_seconds`. You may need to chunk the work or shorten it.
|
|
151
|
+
- `outcome: "crashed"` — OOM or segfault. Reduce memory footprint.
|
|
152
|
+
- `outcome: "spawn_failed"` + `error: "..."` — usually a profile config issue (missing credential, bad PATH). Ask the human via `kanban_block` instead of retrying blindly.
|
|
153
|
+
- `outcome: "reclaimed"` + `summary: "task archived..."` — operator archived the task out from under the previous run; you probably shouldn't be running at all, check status carefully.
|
|
154
|
+
- `outcome: "blocked"` — a previous attempt blocked; the unblock comment should be in the thread by now.
|
|
155
|
+
|
|
156
|
+
## Notification routing
|
|
157
|
+
|
|
158
|
+
You can configure the gateway to receive cross-profile Kanban task notifications by adding `notification_sources` to `~/.agent/config.yaml`.
|
|
159
|
+
- `notification_sources: ['*']` accepts subscriptions from all profiles.
|
|
160
|
+
- `notification_sources: ['default', 'zilor-ppt']` or `"default,zilor-ppt"` restricts subscriptions to specified profiles.
|
|
161
|
+
- Omitting the key keeps the default behavior (profile isolation).
|
|
162
|
+
|
|
163
|
+
## Do NOT
|
|
164
|
+
|
|
165
|
+
- Call `delegate_task` as a substitute for `kanban_create`. `delegate_task` is for short reasoning subtasks inside YOUR run; `kanban_create` is for cross-agent handoffs that outlive one API loop.
|
|
166
|
+
- Call `clarify` to ask the human a question. You are running headless — there is no live user to answer. The call will time out (default ~120s) and the task will sit silently in `running` with no signal that it needs input. Use `kanban_comment` (context) + `kanban_block(reason=...)` (decision needed) instead — the task surfaces on the board as blocked, the operator sees it, unblocks with their answer in a comment, and you respawn with the thread.
|
|
167
|
+
- Modify files outside `$HERMES_KANBAN_WORKSPACE` unless the task body says to.
|
|
168
|
+
- Create follow-up tasks assigned to yourself — assign to the right specialist.
|
|
169
|
+
- Complete a task you didn't actually finish. Block it instead.
|
|
170
|
+
|
|
171
|
+
## Pitfalls
|
|
172
|
+
|
|
173
|
+
**Task state can change between dispatch and your startup.** Between when the dispatcher claimed and when your process actually booted, the task may have been blocked, reassigned, or archived. Always `kanban_show` first. If it reports `blocked` or `archived`, stop — you shouldn't be running.
|
|
174
|
+
|
|
175
|
+
**Workspace may have stale artifacts.** Especially `dir:` and `worktree` workspaces can have files from previous runs. Read the comment thread — it usually explains why you're running again and what state the workspace is in.
|
|
176
|
+
|
|
177
|
+
**Don't rely on the CLI when the guidance is available.** The `kanban_*` tools work across all terminal backends (Docker, Modal, SSH). `hermes kanban <verb>` from your terminal tool will fail in containerized backends because the CLI isn't installed there. When in doubt, use the tool.
|
|
178
|
+
|
|
179
|
+
## CLI fallback (for scripting)
|
|
180
|
+
|
|
181
|
+
Every tool has a CLI equivalent for human operators and scripts:
|
|
182
|
+
- `kanban_show` ↔ `hermes kanban show <id> --json`
|
|
183
|
+
- `kanban_complete` ↔ `hermes kanban complete <id> --summary "..." --metadata '{...}'`
|
|
184
|
+
- `kanban_block` ↔ `hermes kanban block <id> "reason"`
|
|
185
|
+
- `kanban_create` ↔ `hermes kanban create "title" --assignee <profile> [--parent <id>]`
|
|
186
|
+
- etc.
|
|
187
|
+
|
|
188
|
+
Use the tools from inside an agent; the CLI exists for the human at the terminal.
|
|
@@ -0,0 +1,499 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: llm-wiki
|
|
3
|
+
description: "Karpathy's LLM Wiki: build/query interlinked markdown KB."
|
|
4
|
+
version: 2.1.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Karpathy's LLM Wiki
|
|
8
|
+
|
|
9
|
+
Build and maintain a persistent, compounding knowledge base as interlinked markdown files.
|
|
10
|
+
Based on [Andrej Karpathy's LLM Wiki pattern](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f).
|
|
11
|
+
|
|
12
|
+
Unlike traditional RAG (which rediscovers knowledge from scratch per query), the wiki
|
|
13
|
+
compiles knowledge once and keeps it current. Cross-references are already there.
|
|
14
|
+
Contradictions have already been flagged. Synthesis reflects everything ingested.
|
|
15
|
+
|
|
16
|
+
**Division of labor:** The human curates sources and directs analysis. The agent
|
|
17
|
+
summarizes, cross-references, files, and maintains consistency.
|
|
18
|
+
|
|
19
|
+
## When This Skill Activates
|
|
20
|
+
|
|
21
|
+
Use this skill when the user:
|
|
22
|
+
- Asks to create, build, or start a wiki or knowledge base
|
|
23
|
+
- Asks to ingest, add, or process a source into their wiki
|
|
24
|
+
- Asks a question and an existing wiki is present at the configured path
|
|
25
|
+
- Asks to lint, audit, or health-check their wiki
|
|
26
|
+
- References their wiki, knowledge base, or "notes" in a research context
|
|
27
|
+
|
|
28
|
+
## Wiki Location
|
|
29
|
+
|
|
30
|
+
**Location:** Set via `WIKI_PATH` environment variable (e.g. in `${HERMES_HOME:-~/.hermes}/.env`).
|
|
31
|
+
|
|
32
|
+
If unset, defaults to `~/wiki`.
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
WIKI="${WIKI_PATH:-$HOME/wiki}"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The wiki is just a directory of markdown files — open it in Obsidian, VS Code, or
|
|
39
|
+
any editor. No database, no special tooling required.
|
|
40
|
+
|
|
41
|
+
## Architecture: Three Layers
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
wiki/
|
|
45
|
+
├── SCHEMA.md # Conventions, structure rules, domain config
|
|
46
|
+
├── index.md # Sectioned content catalog with one-line summaries
|
|
47
|
+
├── log.md # Chronological action log (append-only, rotated yearly)
|
|
48
|
+
├── raw/ # Layer 1: Immutable source material
|
|
49
|
+
│ ├── articles/ # Web articles, clippings
|
|
50
|
+
│ ├── papers/ # PDFs, arxiv papers
|
|
51
|
+
│ ├── transcripts/ # Meeting notes, interviews
|
|
52
|
+
│ └── assets/ # Images, diagrams referenced by sources
|
|
53
|
+
├── entities/ # Layer 2: Entity pages (people, orgs, products, models)
|
|
54
|
+
├── concepts/ # Layer 2: Concept/topic pages
|
|
55
|
+
├── comparisons/ # Layer 2: Side-by-side analyses
|
|
56
|
+
└── queries/ # Layer 2: Filed query results worth keeping
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Layer 1 — Raw Sources:** Immutable. The agent reads but never modifies these.
|
|
60
|
+
**Layer 2 — The Wiki:** Agent-owned markdown files. Created, updated, and
|
|
61
|
+
cross-referenced by the agent.
|
|
62
|
+
**Layer 3 — The Schema:** `SCHEMA.md` defines structure, conventions, and tag taxonomy.
|
|
63
|
+
|
|
64
|
+
## Resuming an Existing Wiki (CRITICAL — do this every session)
|
|
65
|
+
|
|
66
|
+
When the user has an existing wiki, **always orient yourself before doing anything**:
|
|
67
|
+
|
|
68
|
+
① **Read `SCHEMA.md`** — understand the domain, conventions, and tag taxonomy.
|
|
69
|
+
② **Read `index.md`** — learn what pages exist and their summaries.
|
|
70
|
+
③ **Scan recent `log.md`** — read the last 20-30 entries to understand recent activity.
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
WIKI="${WIKI_PATH:-$HOME/wiki}"
|
|
74
|
+
# Orientation reads at session start
|
|
75
|
+
read_file "$WIKI/SCHEMA.md"
|
|
76
|
+
read_file "$WIKI/index.md"
|
|
77
|
+
read_file "$WIKI/log.md" offset=<last 30 lines>
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Only after orientation should you ingest, query, or lint. This prevents:
|
|
81
|
+
- Creating duplicate pages for entities that already exist
|
|
82
|
+
- Missing cross-references to existing content
|
|
83
|
+
- Contradicting the schema's conventions
|
|
84
|
+
- Repeating work already logged
|
|
85
|
+
|
|
86
|
+
For large wikis (100+ pages), also run a quick `search_files` for the topic
|
|
87
|
+
at hand before creating anything new.
|
|
88
|
+
|
|
89
|
+
## Initializing a New Wiki
|
|
90
|
+
|
|
91
|
+
When the user asks to create or start a wiki:
|
|
92
|
+
|
|
93
|
+
1. Determine the wiki path (from `$WIKI_PATH` env var, or ask the user; default `~/wiki`)
|
|
94
|
+
2. Create the directory structure above
|
|
95
|
+
3. Ask the user what domain the wiki covers — be specific
|
|
96
|
+
4. Write `SCHEMA.md` customized to the domain (see template below)
|
|
97
|
+
5. Write initial `index.md` with sectioned header
|
|
98
|
+
6. Write initial `log.md` with creation entry
|
|
99
|
+
7. Confirm the wiki is ready and suggest first sources to ingest
|
|
100
|
+
|
|
101
|
+
### SCHEMA.md Template
|
|
102
|
+
|
|
103
|
+
Adapt to the user's domain. The schema constrains agent behavior and ensures consistency:
|
|
104
|
+
|
|
105
|
+
```markdown
|
|
106
|
+
# Wiki Schema
|
|
107
|
+
|
|
108
|
+
## Domain
|
|
109
|
+
[What this wiki covers — e.g., "AI/ML research", "personal health", "startup intelligence"]
|
|
110
|
+
|
|
111
|
+
## Conventions
|
|
112
|
+
- File names: lowercase, hyphens, no spaces (e.g., `transformer-architecture.md`)
|
|
113
|
+
- Every wiki page starts with YAML frontmatter (see below)
|
|
114
|
+
- Use `[[wikilinks]]` to link between pages (minimum 2 outbound links per page)
|
|
115
|
+
- When updating a page, always bump the `updated` date
|
|
116
|
+
- Every new page must be added to `index.md` under the correct section
|
|
117
|
+
- Every action must be appended to `log.md`
|
|
118
|
+
- **Provenance markers:** On pages that synthesize 3+ sources, append `^[raw/articles/source-file.md]`
|
|
119
|
+
at the end of paragraphs whose claims come from a specific source. This lets a reader trace each
|
|
120
|
+
claim back without re-reading the whole raw file. Optional on single-source pages where the
|
|
121
|
+
`sources:` frontmatter is enough.
|
|
122
|
+
|
|
123
|
+
## Frontmatter
|
|
124
|
+
```yaml
|
|
125
|
+
---
|
|
126
|
+
title: Page Title
|
|
127
|
+
created: YYYY-MM-DD
|
|
128
|
+
updated: YYYY-MM-DD
|
|
129
|
+
type: entity | concept | comparison | query | summary
|
|
130
|
+
tags: [from taxonomy below]
|
|
131
|
+
sources: [raw/articles/source-name.md]
|
|
132
|
+
# Optional quality signals:
|
|
133
|
+
confidence: high | medium | low # how well-supported the claims are
|
|
134
|
+
contested: true # set when the page has unresolved contradictions
|
|
135
|
+
contradictions: [other-page-slug] # pages this one conflicts with
|
|
136
|
+
---
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
`confidence` and `contested` are optional but recommended for opinion-heavy or fast-moving
|
|
140
|
+
topics. Lint surfaces `contested: true` and `confidence: low` pages for review so weak claims
|
|
141
|
+
don't silently harden into accepted wiki fact.
|
|
142
|
+
|
|
143
|
+
### raw/ Frontmatter
|
|
144
|
+
|
|
145
|
+
Raw sources ALSO get a small frontmatter block so re-ingests can detect drift:
|
|
146
|
+
|
|
147
|
+
```yaml
|
|
148
|
+
---
|
|
149
|
+
source_url: https://example.com/article # original URL, if applicable
|
|
150
|
+
ingested: YYYY-MM-DD
|
|
151
|
+
sha256: <hex digest of the raw content below the frontmatter>
|
|
152
|
+
---
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
The `sha256:` lets a future re-ingest of the same URL skip processing when content is unchanged,
|
|
156
|
+
and flag drift when it has changed. Compute over the body only (everything after the closing
|
|
157
|
+
`---`), not the frontmatter itself.
|
|
158
|
+
|
|
159
|
+
## Tag Taxonomy
|
|
160
|
+
[Define 10-20 top-level tags for the domain. Add new tags here BEFORE using them.]
|
|
161
|
+
|
|
162
|
+
Example for AI/ML:
|
|
163
|
+
- Models: model, architecture, benchmark, training
|
|
164
|
+
- People/Orgs: person, company, lab, open-source
|
|
165
|
+
- Techniques: optimization, fine-tuning, inference, alignment, data
|
|
166
|
+
- Meta: comparison, timeline, controversy, prediction
|
|
167
|
+
|
|
168
|
+
Rule: every tag on a page must appear in this taxonomy. If a new tag is needed,
|
|
169
|
+
add it here first, then use it. This prevents tag sprawl.
|
|
170
|
+
|
|
171
|
+
## Page Thresholds
|
|
172
|
+
- **Create a page** when an entity/concept appears in 2+ sources OR is central to one source
|
|
173
|
+
- **Add to existing page** when a source mentions something already covered
|
|
174
|
+
- **DON'T create a page** for passing mentions, minor details, or things outside the domain
|
|
175
|
+
- **Split a page** when it exceeds ~200 lines — break into sub-topics with cross-links
|
|
176
|
+
- **Archive a page** when its content is fully superseded — move to `_archive/`, remove from index
|
|
177
|
+
|
|
178
|
+
## Entity Pages
|
|
179
|
+
One page per notable entity. Include:
|
|
180
|
+
- Overview / what it is
|
|
181
|
+
- Key facts and dates
|
|
182
|
+
- Relationships to other entities ([[wikilinks]])
|
|
183
|
+
- Source references
|
|
184
|
+
|
|
185
|
+
## Concept Pages
|
|
186
|
+
One page per concept or topic. Include:
|
|
187
|
+
- Definition / explanation
|
|
188
|
+
- Current state of knowledge
|
|
189
|
+
- Open questions or debates
|
|
190
|
+
- Related concepts ([[wikilinks]])
|
|
191
|
+
|
|
192
|
+
## Comparison Pages
|
|
193
|
+
Side-by-side analyses. Include:
|
|
194
|
+
- What is being compared and why
|
|
195
|
+
- Dimensions of comparison (table format preferred)
|
|
196
|
+
- Verdict or synthesis
|
|
197
|
+
- Sources
|
|
198
|
+
|
|
199
|
+
## Update Policy
|
|
200
|
+
When new information conflicts with existing content:
|
|
201
|
+
1. Check the dates — newer sources generally supersede older ones
|
|
202
|
+
2. If genuinely contradictory, note both positions with dates and sources
|
|
203
|
+
3. Mark the contradiction in frontmatter: `contradictions: [page-name]`
|
|
204
|
+
4. Flag for user review in the lint report
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### index.md Template
|
|
208
|
+
|
|
209
|
+
The index is sectioned by type. Each entry is one line: wikilink + summary.
|
|
210
|
+
|
|
211
|
+
```markdown
|
|
212
|
+
# Wiki Index
|
|
213
|
+
|
|
214
|
+
> Content catalog. Every wiki page listed under its type with a one-line summary.
|
|
215
|
+
> Read this first to find relevant pages for any query.
|
|
216
|
+
> Last updated: YYYY-MM-DD | Total pages: N
|
|
217
|
+
|
|
218
|
+
## Entities
|
|
219
|
+
<!-- Alphabetical within section -->
|
|
220
|
+
|
|
221
|
+
## Concepts
|
|
222
|
+
|
|
223
|
+
## Comparisons
|
|
224
|
+
|
|
225
|
+
## Queries
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
**Scaling rule:** When any section exceeds 50 entries, split it into sub-sections
|
|
229
|
+
by first letter or sub-domain. When the index exceeds 200 entries total, create
|
|
230
|
+
a `_meta/topic-map.md` that groups pages by theme for faster navigation.
|
|
231
|
+
|
|
232
|
+
### log.md Template
|
|
233
|
+
|
|
234
|
+
```markdown
|
|
235
|
+
# Wiki Log
|
|
236
|
+
|
|
237
|
+
> Chronological record of all wiki actions. Append-only.
|
|
238
|
+
> Format: `## [YYYY-MM-DD] action | subject`
|
|
239
|
+
> Actions: ingest, update, query, lint, create, archive, delete
|
|
240
|
+
> When this file exceeds 500 entries, rotate: rename to log-YYYY.md, start fresh.
|
|
241
|
+
|
|
242
|
+
## [YYYY-MM-DD] create | Wiki initialized
|
|
243
|
+
- Domain: [domain]
|
|
244
|
+
- Structure created with SCHEMA.md, index.md, log.md
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
## Core Operations
|
|
248
|
+
|
|
249
|
+
### 1. Ingest
|
|
250
|
+
|
|
251
|
+
When the user provides a source (URL, file, paste), integrate it into the wiki:
|
|
252
|
+
|
|
253
|
+
① **Capture the raw source:**
|
|
254
|
+
- URL → use `web_extract` to get markdown, save to `raw/articles/`
|
|
255
|
+
- PDF → use `web_extract` (handles PDFs), save to `raw/papers/`
|
|
256
|
+
- Pasted text → save to appropriate `raw/` subdirectory
|
|
257
|
+
- Name the file descriptively: `raw/articles/karpathy-llm-wiki-2026.md`
|
|
258
|
+
- **Add raw frontmatter** (`source_url`, `ingested`, `sha256` of the body).
|
|
259
|
+
On re-ingest of the same URL: recompute the sha256, compare to the stored value —
|
|
260
|
+
skip if identical, flag drift and update if different. This is cheap enough to
|
|
261
|
+
do on every re-ingest and catches silent source changes.
|
|
262
|
+
|
|
263
|
+
② **Discuss takeaways** with the user — what's interesting, what matters for
|
|
264
|
+
the domain. (Skip this in automated/cron contexts — proceed directly.)
|
|
265
|
+
|
|
266
|
+
③ **Check what already exists** — search index.md and use `search_files` to find
|
|
267
|
+
existing pages for mentioned entities/concepts. This is the difference between
|
|
268
|
+
a growing wiki and a pile of duplicates.
|
|
269
|
+
|
|
270
|
+
④ **Write or update wiki pages:**
|
|
271
|
+
- **New entities/concepts:** Create pages only if they meet the Page Thresholds
|
|
272
|
+
in SCHEMA.md (2+ source mentions, or central to one source)
|
|
273
|
+
- **Existing pages:** Add new information, update facts, bump `updated` date.
|
|
274
|
+
When new info contradicts existing content, follow the Update Policy.
|
|
275
|
+
- **Cross-reference:** Every new or updated page must link to at least 2 other
|
|
276
|
+
pages via `[[wikilinks]]`. Check that existing pages link back.
|
|
277
|
+
- **Tags:** Only use tags from the taxonomy in SCHEMA.md
|
|
278
|
+
- **Provenance:** On pages synthesizing 3+ sources, append `^[raw/articles/source.md]`
|
|
279
|
+
markers to paragraphs whose claims trace to a specific source.
|
|
280
|
+
- **Confidence:** For opinion-heavy, fast-moving, or single-source claims, set
|
|
281
|
+
`confidence: medium` or `low` in frontmatter. Don't mark `high` unless the
|
|
282
|
+
claim is well-supported across multiple sources.
|
|
283
|
+
|
|
284
|
+
⑤ **Update navigation:**
|
|
285
|
+
- Add new pages to `index.md` under the correct section, alphabetically
|
|
286
|
+
- Update the "Total pages" count and "Last updated" date in index header
|
|
287
|
+
- Append to `log.md`: `## [YYYY-MM-DD] ingest | Source Title`
|
|
288
|
+
- List every file created or updated in the log entry
|
|
289
|
+
|
|
290
|
+
⑥ **Report what changed** — list every file created or updated to the user.
|
|
291
|
+
|
|
292
|
+
A single source can trigger updates across 5-15 wiki pages. This is normal
|
|
293
|
+
and desired — it's the compounding effect.
|
|
294
|
+
|
|
295
|
+
### 2. Query
|
|
296
|
+
|
|
297
|
+
When the user asks a question about the wiki's domain:
|
|
298
|
+
|
|
299
|
+
① **Read `index.md`** to identify relevant pages.
|
|
300
|
+
② **For wikis with 100+ pages**, also `search_files` across all `.md` files
|
|
301
|
+
for key terms — the index alone may miss relevant content.
|
|
302
|
+
③ **Read the relevant pages** using `read_file`.
|
|
303
|
+
④ **Synthesize an answer** from the compiled knowledge. Cite the wiki pages
|
|
304
|
+
you drew from: "Based on [[page-a]] and [[page-b]]..."
|
|
305
|
+
⑤ **File valuable answers back** — if the answer is a substantial comparison,
|
|
306
|
+
deep dive, or novel synthesis, create a page in `queries/` or `comparisons/`.
|
|
307
|
+
Don't file trivial lookups — only answers that would be painful to re-derive.
|
|
308
|
+
⑥ **Update log.md** with the query and whether it was filed.
|
|
309
|
+
|
|
310
|
+
### 3. Lint
|
|
311
|
+
|
|
312
|
+
When the user asks to lint, health-check, or audit the wiki:
|
|
313
|
+
|
|
314
|
+
① **Orphan pages:** Find pages with no inbound `[[wikilinks]]` from other pages.
|
|
315
|
+
```python
|
|
316
|
+
# Use execute_code for this — programmatic scan across all wiki pages
|
|
317
|
+
import os, re
|
|
318
|
+
from collections import defaultdict
|
|
319
|
+
wiki = "<WIKI_PATH>"
|
|
320
|
+
# Scan all .md files in entities/, concepts/, comparisons/, queries/
|
|
321
|
+
# Extract all [[wikilinks]] — build inbound link map
|
|
322
|
+
# Pages with zero inbound links are orphans
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
② **Broken wikilinks:** Find `[[links]]` that point to pages that don't exist.
|
|
326
|
+
|
|
327
|
+
③ **Index completeness:** Every wiki page should appear in `index.md`. Compare
|
|
328
|
+
the filesystem against index entries.
|
|
329
|
+
|
|
330
|
+
④ **Frontmatter validation:** Every wiki page must have all required fields
|
|
331
|
+
(title, created, updated, type, tags, sources). Tags must be in the taxonomy.
|
|
332
|
+
|
|
333
|
+
⑤ **Stale content:** Pages whose `updated` date is >90 days older than the most
|
|
334
|
+
recent source that mentions the same entities.
|
|
335
|
+
|
|
336
|
+
⑥ **Contradictions:** Pages on the same topic with conflicting claims. Look for
|
|
337
|
+
pages that share tags/entities but state different facts. Surface all pages
|
|
338
|
+
with `contested: true` or `contradictions:` frontmatter for user review.
|
|
339
|
+
|
|
340
|
+
⑦ **Quality signals:** List pages with `confidence: low` and any page that cites
|
|
341
|
+
only a single source but has no confidence field set — these are candidates
|
|
342
|
+
for either finding corroboration or demoting to `confidence: medium`.
|
|
343
|
+
|
|
344
|
+
⑧ **Source drift:** For each file in `raw/` with a `sha256:` frontmatter, recompute
|
|
345
|
+
the hash and flag mismatches. Mismatches indicate the raw file was edited
|
|
346
|
+
(shouldn't happen — raw/ is immutable) or ingested from a URL that has since
|
|
347
|
+
changed. Not a hard error, but worth reporting.
|
|
348
|
+
|
|
349
|
+
⑨ **Page size:** Flag pages over 200 lines — candidates for splitting.
|
|
350
|
+
|
|
351
|
+
⑩ **Tag audit:** List all tags in use, flag any not in the SCHEMA.md taxonomy.
|
|
352
|
+
|
|
353
|
+
⑪ **Log rotation:** If log.md exceeds 500 entries, rotate it.
|
|
354
|
+
|
|
355
|
+
⑫ **Report findings** with specific file paths and suggested actions, grouped by
|
|
356
|
+
severity (broken links > orphans > source drift > contested pages > stale content > style issues).
|
|
357
|
+
|
|
358
|
+
⑬ **Append to log.md:** `## [YYYY-MM-DD] lint | N issues found`
|
|
359
|
+
|
|
360
|
+
## Working with the Wiki
|
|
361
|
+
|
|
362
|
+
### Searching
|
|
363
|
+
|
|
364
|
+
```bash
|
|
365
|
+
# Find pages by content
|
|
366
|
+
search_files "transformer" path="$WIKI" file_glob="*.md"
|
|
367
|
+
|
|
368
|
+
# Find pages by filename
|
|
369
|
+
search_files "*.md" target="files" path="$WIKI"
|
|
370
|
+
|
|
371
|
+
# Find pages by tag
|
|
372
|
+
search_files "tags:.*alignment" path="$WIKI" file_glob="*.md"
|
|
373
|
+
|
|
374
|
+
# Recent activity
|
|
375
|
+
read_file "$WIKI/log.md" offset=<last 20 lines>
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
### Bulk Ingest
|
|
379
|
+
|
|
380
|
+
When ingesting multiple sources at once, batch the updates:
|
|
381
|
+
1. Read all sources first
|
|
382
|
+
2. Identify all entities and concepts across all sources
|
|
383
|
+
3. Check existing pages for all of them (one search pass, not N)
|
|
384
|
+
4. Create/update pages in one pass (avoids redundant updates)
|
|
385
|
+
5. Update index.md once at the end
|
|
386
|
+
6. Write a single log entry covering the batch
|
|
387
|
+
|
|
388
|
+
### Archiving
|
|
389
|
+
|
|
390
|
+
When content is fully superseded or the domain scope changes:
|
|
391
|
+
1. Create `_archive/` directory if it doesn't exist
|
|
392
|
+
2. Move the page to `_archive/` with its original path (e.g., `_archive/entities/old-page.md`)
|
|
393
|
+
3. Remove from `index.md`
|
|
394
|
+
4. Update any pages that linked to it — replace wikilink with plain text + "(archived)"
|
|
395
|
+
5. Log the archive action
|
|
396
|
+
|
|
397
|
+
### Obsidian Integration
|
|
398
|
+
|
|
399
|
+
The wiki directory works as an Obsidian vault out of the box:
|
|
400
|
+
- `[[wikilinks]]` render as clickable links
|
|
401
|
+
- Graph View visualizes the knowledge network
|
|
402
|
+
- YAML frontmatter powers Dataview queries
|
|
403
|
+
- The `raw/assets/` folder holds images referenced via `![[image.png]]`
|
|
404
|
+
|
|
405
|
+
For best results:
|
|
406
|
+
- Set Obsidian's attachment folder to `raw/assets/`
|
|
407
|
+
- Enable "Wikilinks" in Obsidian settings (usually on by default)
|
|
408
|
+
- Install Dataview plugin for queries like `TABLE tags FROM "entities" WHERE contains(tags, "company")`
|
|
409
|
+
|
|
410
|
+
If using the Obsidian skill alongside this one, set `OBSIDIAN_VAULT_PATH` to the
|
|
411
|
+
same directory as the wiki path.
|
|
412
|
+
|
|
413
|
+
### Obsidian Headless (servers and headless machines)
|
|
414
|
+
|
|
415
|
+
On machines without a display, use `obsidian-headless` instead of the desktop app.
|
|
416
|
+
It syncs vaults via Obsidian Sync without a GUI — perfect for agents running on
|
|
417
|
+
servers that write to the wiki while Obsidian desktop reads it on another device.
|
|
418
|
+
|
|
419
|
+
**Setup:**
|
|
420
|
+
```bash
|
|
421
|
+
# Requires Node.js 22+
|
|
422
|
+
npm install -g obsidian-headless
|
|
423
|
+
|
|
424
|
+
# Login (requires Obsidian account with Sync subscription)
|
|
425
|
+
ob login --email <email> --password '<password>'
|
|
426
|
+
|
|
427
|
+
# Create a remote vault for the wiki
|
|
428
|
+
ob sync-create-remote --name "LLM Wiki"
|
|
429
|
+
|
|
430
|
+
# Connect the wiki directory to the vault
|
|
431
|
+
cd ~/wiki
|
|
432
|
+
ob sync-setup --vault "<vault-id>"
|
|
433
|
+
|
|
434
|
+
# Initial sync
|
|
435
|
+
ob sync
|
|
436
|
+
|
|
437
|
+
# Continuous sync (foreground — use systemd for background)
|
|
438
|
+
ob sync --continuous
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
**Continuous background sync via systemd:**
|
|
442
|
+
```ini
|
|
443
|
+
# ~/.config/systemd/user/obsidian-wiki-sync.service
|
|
444
|
+
[Unit]
|
|
445
|
+
Description=Obsidian LLM Wiki Sync
|
|
446
|
+
After=network-online.target
|
|
447
|
+
Wants=network-online.target
|
|
448
|
+
|
|
449
|
+
[Service]
|
|
450
|
+
ExecStart=/path/to/ob sync --continuous
|
|
451
|
+
WorkingDirectory=/home/user/wiki
|
|
452
|
+
Restart=on-failure
|
|
453
|
+
RestartSec=10
|
|
454
|
+
|
|
455
|
+
[Install]
|
|
456
|
+
WantedBy=default.target
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
```bash
|
|
460
|
+
systemctl --user daemon-reload
|
|
461
|
+
systemctl --user enable --now obsidian-wiki-sync
|
|
462
|
+
# Enable linger so sync survives logout:
|
|
463
|
+
sudo loginctl enable-linger $USER
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
This lets the agent write to `~/wiki` on a server while you browse the same
|
|
467
|
+
vault in Obsidian on your laptop/phone — changes appear within seconds.
|
|
468
|
+
|
|
469
|
+
## Pitfalls
|
|
470
|
+
|
|
471
|
+
- **Never modify files in `raw/`** — sources are immutable. Corrections go in wiki pages.
|
|
472
|
+
- **Always orient first** — read SCHEMA + index + recent log before any operation in a new session.
|
|
473
|
+
Skipping this causes duplicates and missed cross-references.
|
|
474
|
+
- **Always update index.md and log.md** — skipping this makes the wiki degrade. These are the
|
|
475
|
+
navigational backbone.
|
|
476
|
+
- **Don't create pages for passing mentions** — follow the Page Thresholds in SCHEMA.md. A name
|
|
477
|
+
appearing once in a footnote doesn't warrant an entity page.
|
|
478
|
+
- **Don't create pages without cross-references** — isolated pages are invisible. Every page must
|
|
479
|
+
link to at least 2 other pages.
|
|
480
|
+
- **Frontmatter is required** — it enables search, filtering, and staleness detection.
|
|
481
|
+
- **Tags must come from the taxonomy** — freeform tags decay into noise. Add new tags to SCHEMA.md
|
|
482
|
+
first, then use them.
|
|
483
|
+
- **Keep pages scannable** — a wiki page should be readable in 30 seconds. Split pages over
|
|
484
|
+
200 lines. Move detailed analysis to dedicated deep-dive pages.
|
|
485
|
+
- **Ask before mass-updating** — if an ingest would touch 10+ existing pages, confirm
|
|
486
|
+
the scope with the user first.
|
|
487
|
+
- **Rotate the log** — when log.md exceeds 500 entries, rename it `log-YYYY.md` and start fresh.
|
|
488
|
+
The agent should check log size during lint.
|
|
489
|
+
- **Handle contradictions explicitly** — don't silently overwrite. Note both claims with dates,
|
|
490
|
+
mark in frontmatter, flag for user review.
|
|
491
|
+
|
|
492
|
+
## Related Tools
|
|
493
|
+
|
|
494
|
+
[llm-wiki-compiler](https://github.com/atomicmemory/llm-wiki-compiler) is a Node.js CLI that
|
|
495
|
+
compiles sources into a concept wiki with the same Karpathy inspiration. It's Obsidian-compatible,
|
|
496
|
+
so users who want a scheduled/CLI-driven compile pipeline can point it at the same vault this
|
|
497
|
+
skill maintains. Trade-offs: it owns page generation (replaces the agent's judgment on page
|
|
498
|
+
creation) and is tuned for small corpora. Use this skill when you want agent-in-the-loop curation;
|
|
499
|
+
use llmwiki when you want batch compile of a source directory.
|