mishkan-harness 0.2.5 → 0.2.7

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 (145) hide show
  1. package/README.md +49 -11
  2. package/bin/mishkan.js +562 -79
  3. package/docs/design/MISHKAN_decisions.md +398 -8
  4. package/docs/design/MISHKAN_observability.md +8 -8
  5. package/docs/engineer/profile-readable.md +201 -0
  6. package/docs/engineer/profile.md +754 -0
  7. package/docs/usage/01-installation.md +22 -8
  8. package/docs/usage/02-project-init.md +30 -13
  9. package/docs/usage/03-orchestration.md +46 -7
  10. package/docs/usage/04-memory-layer.md +135 -69
  11. package/docs/usage/06-llm-providers.md +2 -1
  12. package/docs/usage/07-troubleshooting.md +23 -0
  13. package/docs/usage/08-glossary.md +12 -3
  14. package/docs/usage/09-workflows.md +15 -3
  15. package/docs/usage/10-observability.md +3 -3
  16. package/docs/usage/11-graphify.md +38 -18
  17. package/docs/usage/12-cli.md +87 -0
  18. package/docs/usage/12-skill-discovery.md +11 -0
  19. package/docs/usage/README.md +35 -19
  20. package/package.json +1 -1
  21. package/payload/mishkan/AGENT_SPEC.md +3 -1
  22. package/payload/mishkan/agents/ahikam.md +3 -1
  23. package/payload/mishkan/agents/aholiab.md +3 -1
  24. package/payload/mishkan/agents/asaph.md +3 -1
  25. package/payload/mishkan/agents/baruch.md +8 -1
  26. package/payload/mishkan/agents/benaiah.md +3 -1
  27. package/payload/mishkan/agents/bezalel.md +3 -1
  28. package/payload/mishkan/agents/caleb.md +3 -1
  29. package/payload/mishkan/agents/deborah.md +3 -1
  30. package/payload/mishkan/agents/elasah.md +3 -1
  31. package/payload/mishkan/agents/eliashib.md +3 -1
  32. package/payload/mishkan/agents/ezra.md +3 -1
  33. package/payload/mishkan/agents/hanun.md +3 -1
  34. package/payload/mishkan/agents/hiram.md +3 -1
  35. package/payload/mishkan/agents/hizkiah.md +3 -1
  36. package/payload/mishkan/agents/huldah.md +3 -1
  37. package/payload/mishkan/agents/huram.md +3 -1
  38. package/payload/mishkan/agents/hushai.md +3 -1
  39. package/payload/mishkan/agents/igal.md +3 -1
  40. package/payload/mishkan/agents/ira.md +3 -1
  41. package/payload/mishkan/agents/jahaziel.md +3 -1
  42. package/payload/mishkan/agents/jakin.md +3 -1
  43. package/payload/mishkan/agents/jehonathan.md +3 -1
  44. package/payload/mishkan/agents/jehoshaphat.md +3 -1
  45. package/payload/mishkan/agents/joab.md +3 -1
  46. package/payload/mishkan/agents/joah.md +3 -1
  47. package/payload/mishkan/agents/maaseiah.md +3 -1
  48. package/payload/mishkan/agents/meremoth.md +3 -1
  49. package/payload/mishkan/agents/meshullam.md +3 -1
  50. package/payload/mishkan/agents/nathan.md +3 -1
  51. package/payload/mishkan/agents/nehemiah.md +3 -1
  52. package/payload/mishkan/agents/obed.md +3 -1
  53. package/payload/mishkan/agents/oholiab.md +3 -1
  54. package/payload/mishkan/agents/palal.md +3 -1
  55. package/payload/mishkan/agents/phinehas.md +3 -1
  56. package/payload/mishkan/agents/rehum.md +3 -1
  57. package/payload/mishkan/agents/salma.md +3 -1
  58. package/payload/mishkan/agents/seraiah.md +3 -1
  59. package/payload/mishkan/agents/shallum.md +3 -1
  60. package/payload/mishkan/agents/shaphan.md +3 -1
  61. package/payload/mishkan/agents/shemaiah.md +6 -1
  62. package/payload/mishkan/agents/shevna.md +3 -1
  63. package/payload/mishkan/agents/uriah.md +3 -1
  64. package/payload/mishkan/agents/zaccur.md +3 -1
  65. package/payload/mishkan/agents/zadok.md +3 -1
  66. package/payload/mishkan/agents/zerubbabel.md +3 -1
  67. package/payload/mishkan/cognee/.env.example +11 -0
  68. package/payload/mishkan/cognee/Dockerfile +20 -0
  69. package/payload/mishkan/cognee/README.md +34 -14
  70. package/payload/mishkan/cognee/docker-compose.curated.yml +33 -6
  71. package/payload/mishkan/cognee/docker-compose.selfhosted.yml +35 -5
  72. package/payload/mishkan/cognee/docker-compose.work.yml +191 -0
  73. package/payload/mishkan/cognee/docker-compose.yml +18 -3
  74. package/payload/mishkan/cognee/patches/cognee-mcp-core-align.py +72 -0
  75. package/payload/mishkan/cognee/patches/cognee-mcp-recall-user.py +82 -0
  76. package/payload/mishkan/cognee/promote-curated.py +77 -0
  77. package/payload/mishkan/cognee/prune-store.py +23 -0
  78. package/payload/mishkan/commands/mishkan-init.md +4 -1
  79. package/payload/mishkan/commands/mishkan-org-reference.md +2 -2
  80. package/payload/mishkan/config/curated-library.yaml +1 -0
  81. package/payload/mishkan/config/model-routing.yaml +23 -14
  82. package/payload/mishkan/evals/baruch/fixtures/invalid/bad-curated-candidate.json +22 -0
  83. package/payload/mishkan/evals/baruch/fixtures/valid/resolved-curated-candidate.json +23 -0
  84. package/payload/mishkan/hooks/model-route.py +14 -1
  85. package/payload/mishkan/hooks/post-tool-observe.sh +55 -7
  86. package/payload/mishkan/hooks/pre-tool-trace.sh +40 -6
  87. package/payload/mishkan/observability/README.md +15 -12
  88. package/payload/mishkan/observability/schema.json +18 -1
  89. package/payload/mishkan/observability/usage_parser.py +1 -0
  90. package/payload/mishkan/observability/watch/pyproject.toml +1 -1
  91. package/payload/mishkan/observability/watch/src/mishkan_watch/__init__.py +1 -1
  92. package/payload/mishkan/observability/watch/src/mishkan_watch/__main__.py +78 -21
  93. package/payload/mishkan/observability/watch/src/mishkan_watch/app.py +56 -3
  94. package/payload/mishkan/observability/watch/src/mishkan_watch/tabs/agents.py +29 -7
  95. package/payload/mishkan/observability/watch/src/mishkan_watch/tabs/knowledge.py +83 -8
  96. package/payload/mishkan/observability/watch/src/mishkan_watch/tabs/live.py +42 -13
  97. package/payload/mishkan/observability/watch/src/mishkan_watch/tabs/usage.py +10 -3
  98. package/payload/mishkan/observability/watch/src/mishkan_watch/tabs/workflows.py +47 -7
  99. package/payload/mishkan/observability/watchd/pyproject.toml +1 -1
  100. package/payload/mishkan/observability/watchd/src/mishkan_watchd/__init__.py +1 -1
  101. package/payload/mishkan/observability/watchd/src/mishkan_watchd/__main__.py +87 -11
  102. package/payload/mishkan/observability/watchd/src/mishkan_watchd/server.py +126 -9
  103. package/payload/mishkan/observability/watchd/src/mishkan_watchd/sources/cognee_poll.py +136 -49
  104. package/payload/mishkan/observability/watchd/src/mishkan_watchd/sources/graphify_tail.py +38 -64
  105. package/payload/mishkan/observability/watchd/src/mishkan_watchd/state.py +222 -34
  106. package/payload/mishkan/observability/watchd/tests/test_state.py +502 -4
  107. package/payload/mishkan/ontology.md +8 -1
  108. package/payload/mishkan/ontology.ttl +188 -0
  109. package/payload/mishkan/scripts/ensure-work-store.sh +230 -0
  110. package/payload/mishkan/scripts/mishkan-ingest.sh +53 -3
  111. package/payload/mishkan/scripts/promote-curated.sh +77 -0
  112. package/payload/mishkan/scripts/reset-knowledge-data.sh +70 -0
  113. package/payload/mishkan/scripts/validate-research-log.sh +27 -0
  114. package/payload/mishkan/skills/baruch-research-reporting-craft/SKILL.md +42 -8
  115. package/payload/mishkan/skills/cognee-promote/SKILL.md +13 -0
  116. package/payload/mishkan/skills/cognee-quickstart/SKILL.md +7 -1
  117. package/payload/mishkan/skills/ezra-research-formulation-craft/SKILL.md +9 -0
  118. package/payload/mishkan/skills/mishkan-ingest/SKILL.md +22 -0
  119. package/payload/mishkan/skills/mishkan-init/SKILL.md +31 -19
  120. package/payload/mishkan/skills/shemaiah-evaluation-craft/SKILL.md +33 -5
  121. package/payload/mishkan/skills/team-lead-craft/SKILL.md +66 -0
  122. package/payload/mishkan/templates/mcp.json +7 -2
  123. package/payload/mishkan/templates/observability-log.schema.json +1 -1
  124. package/payload/mishkan/templates/research-log.schema.json +15 -1
  125. package/payload/mishkan/workflows/README.md +19 -13
  126. package/payload/mishkan/workflows/chosheb-feature-ship.js +63 -18
  127. package/payload/mishkan/workflows/migdal-dr-drill.js +4 -0
  128. package/payload/mishkan/workflows/migdal-infra-change.js +48 -7
  129. package/payload/mishkan/workflows/mishkan-architecture-panel.js +4 -0
  130. package/payload/mishkan/workflows/mishkan-blast-radius.js +4 -0
  131. package/payload/mishkan/workflows/mishkan-codebase-audit.js +4 -0
  132. package/payload/mishkan/workflows/mishkan-deep-research.js +4 -0
  133. package/payload/mishkan/workflows/mishkan-init.js +4 -0
  134. package/payload/mishkan/workflows/mishkan-knowledge-gap-discovery.js +4 -0
  135. package/payload/mishkan/workflows/mishkan-migration-wave.js +4 -0
  136. package/payload/mishkan/workflows/mishkan-release-readiness.js +4 -0
  137. package/payload/mishkan/workflows/mishkan-sprint-close.js +4 -0
  138. package/payload/mishkan/workflows/mishkan-standards-rollout.js +4 -0
  139. package/payload/mishkan/workflows/mishmar-security-gate.js +45 -6
  140. package/payload/mishkan/workflows/panim-ds-rollout.js +4 -0
  141. package/payload/mishkan/workflows/panim-feature-ship.js +132 -0
  142. package/payload/mishkan/workflows/sefer-release-notes.js +4 -0
  143. package/payload/mishkan/workflows/yasad-data-migration-wave.js +4 -0
  144. package/payload/mishkan/workflows/yasad-feature-ship.js +130 -0
  145. package/payload/mishkan/workflows/yasad-schema-evolution.js +4 -0
@@ -24,7 +24,7 @@ Auto-installed during `npx mishkan-harness install` (phase 7) — the installer
24
24
  prompts once. Or run standalone any time:
25
25
 
26
26
  ```bash
27
- npx mishkan-harness observability
27
+ npx mishkan-harness observability install
28
28
  ```
29
29
 
30
30
  Requirements: `uv` (https://astral.sh/uv) and Python 3.11+. If `uv` is
@@ -90,7 +90,7 @@ mishkan-watchd stop # SIGTERM via the PID file
90
90
  | `1` | **Live** | "What is happening *right now*?" Active agents (with `alias · role` annotation), workflows in-flight, current worktrees, Cognee + Graphify + MCP rollup, rolling feed of every event. Default tab on launch. |
91
91
  | `2` | **Agents** | "What did each agent do?" Sessions tree (left, project paths decoded) × agent history `DataTable` (centre) × errors panel (right). Phantom sessions filtered out at the daemon `_confirmed_alive` gate. |
92
92
  | `3` | **Workflows** | "What did each dynamic workflow run, and what's *available* to run?" Recent runs (top) + static catalogue parsed from each script's `meta` block (description, when-to-use, phases). Click an entry for detail. |
93
- | `4` | **Knowledge** | "Are my stores up and growing?" Three cards (work + curated + graphify, real-time counts) × recent ops `DataTable` × MCP server status table. |
93
+ | `4` | **Knowledge** | "Are my stores up and growing?" Three cards (`cognee-memory` + `cognee-curated` + graphify, real-time counts) × recent ops `DataTable` × MCP server status table. |
94
94
  | `5` | **Activity** | Unified, filterable event stream. Regex filter + type/agent selects. Errors and blocked permissions break the visual rhythm with a separator line. |
95
95
  | `6` | **Org-Ref** | Read-only browser of the 45-agent org from `org.json`. Tree by team, click a group → mission / charter / Hebrew name; click an agent → role, source, description. |
96
96
  | `7` | **Usage** | Harness-wide tokens in/out/cached, cost, context window estimate, request counts. Per-session table sorted by token volume. Detail panel with per-agent attribution + top tools. |
@@ -126,7 +126,7 @@ Six daemon sources, each independent and fail-open:
126
126
  | `session_discover` | 10 s | active Claude Code sessions (mtime < 60 s) |
127
127
  | `worktree_poll` | 5 s | `git worktree list --porcelain` per known project |
128
128
  | `mcp_probe` | 60 s | discover MCPs from `~/.claude.json` + `.mcp.json` + `mcp-needs-auth-cache.json`; probe each by HTTP/TCP |
129
- | `cognee_poll` | 30 s | HTTP probe of cognee work + curated + cypher node count |
129
+ | `cognee_poll` | 30 s | HTTP probe of `cognee-memory` (`:7777`) + `cognee-curated` (`:7730`) + cypher node counts |
130
130
  | `session_tail` + `subagent_tail` | 3 s | inter-agent + compaction events from main session JSONL; subagent tool calls from nested `subagents/agent-*.jsonl` |
131
131
 
132
132
  ## Keybindings
@@ -1,27 +1,47 @@
1
1
  # 11 — Graphify (code-structure graph)
2
2
 
3
- > Goal: use Graphify as the **structural** layer of the MISHKAN
4
- > three-store knowledge stack (Graphify · Cognee work · Cognee curated)
5
- > so that "who calls X" / "what depends on Y" questions cost ~1.8k
6
- > tokens instead of lifting the whole repo into context.
3
+ > Goal: use Graphify as the **code-structure** surface of the MISHKAN
4
+ > four-surface knowledge model 1 code-structure (Graphify) + 3 cognee
5
+ > stores (work · memory · curated) — so that "who calls X" / "what
6
+ > depends on Y" questions cost ~1.8k tokens instead of lifting the whole
7
+ > repo into context.
7
8
 
8
9
  ## What it is
9
10
 
10
11
  [Graphify](https://github.com/safishamsi/graphify) is a tree-sitter
11
12
  based code-graph extractor with a query path that traverses the graph
12
13
  to answer structural questions. MIT, Python, `uv tool install`-able.
13
- Per D-008 of the MISHKAN decision log, Graphify is the third store of
14
- the knowledge stack:
15
14
 
16
- | Store | Question it answers | Source |
17
- |---|---|---|
18
- | **Graphify** | *How is the code structured?* | tree-sitter AST + optional LLM enrichment, deterministic, re-derivable |
19
- | **Cognee work** | *Why does this code exist and what did we decide?* | agent-ingested ADRs, runbooks, resolved research |
20
- | **Cognee curated** | *What did we learn on other projects?* | seeded, read-only from projects |
15
+ MISHKAN has **four knowledge surfaces** one code-structure surface
16
+ (Graphify) and three cognee stores — each owning one epistemic question
17
+ with no overlap of write authority:
18
+
19
+ | Surface | Question it answers | Source | D-ref |
20
+ |---|---|---|---|
21
+ | **Graphify** (per-project, `graphify-out/`) | *How is the code structured?* | tree-sitter AST + optional LLM enrichment, deterministic, re-derivable | D-008 |
22
+ | **Cognee work** (per-project Ladybug, own port) | *Why does this code exist and what did we decide?* | agent-ingested ADRs, runbooks, resolved research | D-008, D-012 |
23
+ | **cognee-memory** (`:7777`, shared) | *What does the session remember across all projects?* | `claude_code_memory` dataset; shared, not re-derivable from docs | D-012 |
24
+ | **cognee-curated** (`:7730`, shared) | *What did we learn on other projects?* | promoted cross-project reference library, read-only from projects | D-007 |
25
+
26
+ The **D-008 framing** ("three stores: Graphify · Cognee work · Cognee
27
+ curated") reflects the stack as it stood before D-012. D-012 added the
28
+ `cognee-memory` pillar (repurposing the old shared `:7777` Neo4j box
29
+ for session memory only), bringing the total to four. The two framings
30
+ are not contradictory — they count different cuts: D-008 defines the
31
+ write-discipline split; D-012 adds a fourth surface within the cognee
32
+ tier. The crisp routing test remains:
33
+ **structure → Graphify, project semantics → Cognee work.**
34
+
35
+ ```mermaid
36
+ flowchart TD
37
+ Q{"What kind of question?"}
38
+ Q -->|"structure: who calls X, what depends on Y"| GFY[("Graphify<br/>code-structure graph · per-project")]
39
+ Q -->|"why we decided X (this project)"| WORK[("cognee work<br/>per-project · isolated")]
40
+ Q -->|"what the session remembers (all projects)"| MEM[("cognee-memory :7777<br/>shared session memory")]
41
+ Q -->|"what we learned on other projects"| CUR[("cognee-curated :7730<br/>shared reference · read-only")]
42
+ ```
21
43
 
22
- These are non-overlapping by design: one writer per store, one
23
- question type per store, no semantic mixing. The crisp test:
24
- **structure → Graphify, semantics → Cognee work.**
44
+ *Four surfaces, one epistemic question each no overlap of write authority.*
25
45
 
26
46
  ## Install
27
47
 
@@ -252,13 +272,13 @@ opted out of the structural layer.
252
272
 
253
273
  ## See also
254
274
 
255
- - [D-008](../design/MISHKAN_decisions.md#d-008) — three-store knowledge
256
- epistemology.
275
+ - [D-008](../design/MISHKAN_decisions.md#d-008) — three-layer knowledge
276
+ epistemology (Graphify + Cognee work + Cognee curated; pre-D-012 framing).
257
277
  - [D-009](../design/MISHKAN_decisions.md#d-009) — graph-first PreToolUse
258
278
  advisory hook (Phase 1 telemetry-only, Phase 2 advisory injection —
259
279
  both shipped v0.2.3).
260
280
  - [POC report](../research/graphify-token-saving-poc.md) — verified
261
281
  88.1× reduction on the MISHKAN harness, 2026-06-07.
262
- - [Memory layer](./04-memory-layer.md) — the Cognee work and curated
263
- stores that complete the three-store stack.
282
+ - [Memory layer](./04-memory-layer.md) — the three cognee stores (work,
283
+ memory, curated) that complete the four-surface knowledge model.
264
284
  - Upstream — https://github.com/safishamsi/graphify.
@@ -0,0 +1,87 @@
1
+ # 12 — The `mishkan` CLI
2
+
3
+ > One control surface for the harness and its knowledge stack. ADR **D-015**.
4
+
5
+ Every command is **`mishkan <object> <verb>`** — it names *what it operates on*.
6
+ The one exception is self-management (`install` / `uninstall` / `status`), where the
7
+ object is the tool itself (so `npx mishkan-harness install`, not the doubled
8
+ `… harness install`).
9
+
10
+ > **Who runs these:** you do. The CLI executes because a *human* invokes it. Agents
11
+ > never get this bin (rule 5 / D-005), and the observability TUI only *surfaces*
12
+ > commands to copy — it never runs them.
13
+
14
+ ## Manage the harness
15
+
16
+ | Command | Does |
17
+ |---|---|
18
+ | `mishkan install` | Install / refresh into `~/.claude` (idempotent) |
19
+ | `mishkan uninstall [--purge]` | Remove it (`--purge` also drops `y4nn-standards.md`) |
20
+ | `mishkan status` | Install state **+ live knowledge-stack health** in one view |
21
+
22
+ ## Knowledge
23
+
24
+ | Command | Does |
25
+ |---|---|
26
+ | `mishkan knowledge configure` | Wizard: LLM provider + cognee secrets → writes `.env` + `ACCESS.txt` |
27
+ | `mishkan knowledge ingest [--tagged-only] [--dataset=X] [paths…]` | Add docs to **this project's** store (`add → cognify → memify`) |
28
+ | `mishkan knowledge curate` | Review + approve research-found resources into the **shared curated library** (D-016). Walks the candidate queue Baruch fills; on approval, an *additive* (no-prune, dedup) write. Stateful — you run it. |
29
+ | `mishkan knowledge reset` | **Destructive** — full reset of the knowledge layer to the stable baseline: wipes every work store (container + volume), prunes `cognee-memory`, re-seeds `cognee-curated` from the canonical YAML. Type-to-confirm. Stateful — you run it. Work stores recreate on the next `/mishkan-init`. |
30
+ | `mishkan knowledge-stack up [--build]` | Bring the shared infra up (memory `:7777` + curated `:7730` + ollama/pg). **Guided:** preflights config, names any gap, stops — never a cryptic docker error. `--build` only for the first image build. |
31
+ | `mishkan knowledge-stack down` | Stop it — containers down, volumes/data survive (confirms) |
32
+ | `mishkan knowledge-stack restart` | down + up |
33
+ | `mishkan knowledge-stack status` | Detailed per-container health |
34
+ | `mishkan project-work-store [<slug>] up` | Provision this project's own isolated store (slug → current dir) |
35
+ | `mishkan project-work-store [<slug>] down` | Stop it — data volume kept |
36
+ | `mishkan project-work-store [<slug>] reset` | Wipe it — removes container **and** data volume (confirms) |
37
+
38
+ **`knowledge-stack` vs `project-work-store`** is infra-lifecycle (`up` a shared stack)
39
+ vs data-lifecycle (`reset`/wipe a per-project store) — named differently on purpose.
40
+
41
+ ## Inspect / observe
42
+
43
+ | Command | Does |
44
+ |---|---|
45
+ | `mishkan code-graph status \| open \| scan` | The project's code graph (Graphify) |
46
+ | `mishkan observability install \| open` | The live monitor — install the daemon+TUI, or open it |
47
+ | `mishkan org show [--json]` | The 45-agent organisation reference |
48
+ | `mishkan model show \| set \| reset` | Re-tier which Claude model an agent runs on (D-017) |
49
+
50
+ ## Re-tier the agent fleet — `mishkan model`
51
+
52
+ Every MISHKAN agent runs on a Claude tier (D-002). The shipped defaults live in
53
+ `model-routing.yaml`; **your** overrides live in `model-routing.local.yaml`, an overlay
54
+ the installer never clobbers — so re-tiering survives `mishkan install`, and you never
55
+ edit 45 frontmatter files.
56
+
57
+ | Command | Does |
58
+ |---|---|
59
+ | `mishkan model show` | Effective tier per agent (default + your overrides), marking overrides and flagging any **dormant** tier |
60
+ | `mishkan model set <agent\|team\|all> <tier>` | Override a tier. `<tier>` ∈ `opus \| sonnet \| haiku \| fable`. `<team>` is an org id (`mishmar`, `migdal`, …); `all` = every agent |
61
+ | `mishkan model reset [<agent\|team\|all>]` | Drop override(s); no argument clears them all (back to shipped defaults) |
62
+
63
+ Changes take effect on the **next delegation** — the `model-route.py` hook reads the
64
+ overlay live; no reinstall needed. Use it for cost (drop a tier), availability (a tier
65
+ can be suspended — see the **fable** note below), or preference.
66
+
67
+ > **`fable` is dormant.** Claude Fable 5 was suspended for all customers on 2026-06-12
68
+ > (export-control directive). `mishkan model set … fable` warns and confirms; agents
69
+ > routed to it will fail to spawn until access is restored. The tier value is kept so
70
+ > re-enabling is one command if it returns.
71
+
72
+ The TUI binary is `mishkan-watch`; `mishkan-watchd start|stop|status` is the manual
73
+ daemon control. In the TUI, **`c`** copies the fix command for a down store to your
74
+ clipboard (it shows the command — it never runs it).
75
+
76
+ ## Project init composes the verbs
77
+
78
+ `/mishkan-init` runs `knowledge-stack up` (ensure the shared infra, confirm-if-down)
79
+ then `project-work-store up` (this project's store) — the same guided/preflight path,
80
+ so a fresh project comes up working without you knowing the topology.
81
+
82
+ ## Deprecated aliases
83
+
84
+ The pre-D-015 flat names still work (hidden, undocumented) so nothing breaks mid-
85
+ migration: `configure-knowledge` → `knowledge configure`, `ingest` → `knowledge
86
+ ingest`, `observability` → `observability install`, `watch` → `observability open`,
87
+ `org` → `org show`. Prefer the object-first forms.
@@ -94,6 +94,17 @@ Output shape (abbreviated):
94
94
  over padding `must_load` when scores are close — the cost of loading a
95
95
  wrong skill is higher than the cost of skipping a marginal one.
96
96
 
97
+ ```mermaid
98
+ flowchart LR
99
+ IDX[("skill index<br/>all installed skills")] --> R{"router<br/>score vs thresholds"}
100
+ R -->|"≥ 4.0 + strong trigger"| ML["must_load ≤ 3<br/>load into context"]
101
+ R -->|"mid-band"| SC["should_consider ≤ 5<br/>skim · load if it intersects"]
102
+ R -->|"low · same category"| AD["adjacent ≤ 5<br/>awareness only"]
103
+ ```
104
+
105
+ *Indexer → router → three buckets (hard cap 13); bias toward enriching `should_consider`
106
+ over padding `must_load`.*
107
+
97
108
  ## Trust asymmetry
98
109
 
99
110
  Every entry carries an `origin` field. Non-`mishkan` entries (origin =
@@ -6,31 +6,46 @@
6
6
 
7
7
  A single Claude Code session, turned into a 45-agent software-engineering
8
8
  organisation with deterministic constraints (hooks, rules, schemas), an
9
- asymmetric AI-vs-human delegation boundary, and a two-store knowledge graph
10
- that accumulates as you work.
9
+ asymmetric AI-vs-human delegation boundary, and four knowledge surfaces
10
+ that accumulate as you work: one code-structure surface (Graphify) plus three
11
+ cognee stores (per-project work · session memory · curated reference).
11
12
 
12
13
  ## In five minutes
13
14
 
15
+ ```mermaid
16
+ flowchart TD
17
+ You(["You — talk"]) --> MS[["MAIN SESSION — leadership<br/>Nehemiah + Bezalel (via CLAUDE.md)<br/>the ONE orchestrator — no nested delegation"]]
18
+ MS -->|Task| TL["Team Lead / Specialist"]
19
+ MS -->|Task| OPS["aiobi-ops / other project agents"]
20
+ MS -->|Task| RP["research pipeline"]
21
+ MS -. reads / writes .-> WORK[("cognee work · per-project<br/>mishkan-work-{slug} · Ladybug, own port+volume")]
22
+ MS -. reads / writes .-> MEM[("cognee-memory :7777<br/>per-client session memory · shared")]
23
+ MS -. reads / writes .-> CUR[("cognee-curated :7730<br/>reference library · shared, read-mostly")]
14
24
  ```
15
- You ──talk──▶ MAIN SESSION = leadership (Nehemiah/Bezalel via CLAUDE.md)
16
- │ ← the ONE orchestrator (no nested delegation)
17
- ├─Task→ Team Lead / Specialist ┐ siblings,
18
- ├─Task→ aiobi-ops or other project agents │ one level deep
19
- └─Task→ research pipeline ┘
20
-
21
- ┌──────────────────────────┐ ┌──────────────────────┐
22
- │ cognee WORK :7777 │ │ cognee CURATED :7730 │
23
- │ project knowledge │ │ reference library │
24
- │ + per-client memory │ │ (read-mostly, shared)│
25
- └──────────────────────────┘ └──────────────────────┘
26
- ```
25
+
26
+ *The main session is the one orchestrator it delegates one level deep (siblings) and
27
+ reads/writes three Cognee stores. (Diagrams render on GitHub.)*
27
28
 
28
29
  - **Main session is leadership.** It loads MISHKAN identity from
29
30
  `~/.claude/CLAUDE.md` and routes work one level deep.
30
31
  - **45 agents** across **6 teams** + **2 orchestrators** + a **6-stage research
31
32
  pipeline**.
32
- - **Cognee** is the memory layer: two physically-isolated stores, with
33
- `cognify memify` (extraction → enrichment) and `search` exposed via MCP.
33
+ - **Four knowledge surfaces** total 1 code-structure + 3 cognee stores:
34
+ - **Graphify** (per-project, `graphify-out/`) code structure: call graphs,
35
+ dependents, blast-radius. AST-derived, deterministic, re-derivable. D-008.
36
+ Not installed by `mishkan install`; run `uv tool install "graphifyy>=0.8.33"`.
37
+ - **Cognee work** (per-project Ladybug, own port) — project semantic memory:
38
+ decisions, runbooks, ADRs. D-012.
39
+ - **cognee-memory** (`:7777`, shared) — session memory shared across all
40
+ projects; `claude_code_memory` dataset only.
41
+ - **cognee-curated** (`:7730`, shared) — cross-project reference library;
42
+ read-mostly, promoted at `/sprint-close`. D-007.
43
+
44
+ The D-008 framing ("three stores") predates D-012 and counts Graphify + the two
45
+ cognee stores as they existed then. D-012 added the `cognee-memory` pillar,
46
+ making the total four. The `cognify → memify` (extraction → enrichment) and
47
+ `search` operations are exposed via MCP for the three cognee stores. See
48
+ D-007 + D-008 + D-012.
34
49
  - **Selective ingest**: docs enter the work graph only when tagged
35
50
  (`mishkan: ingest`) or explicitly invoked. No bulk-ingest, no PII bleed.
36
51
 
@@ -41,14 +56,15 @@ You ──talk──▶ MAIN SESSION = leadership (Nehemiah/Bezalel via CLAUDE
41
56
  | 01 | [Installation](./01-installation.md) | Prerequisites, `npx mishkan-harness install`, layout, uninstall |
42
57
  | 02 | [Project initialisation](./02-project-init.md) | `/mishkan-init` flow, scope choices, brownfield handling |
43
58
  | 03 | [Orchestration](./03-orchestration.md) | Main-session-as-orchestrator, model routing, skills on-demand |
44
- | 04 | [Memory layer (cognee)](./04-memory-layer.md) | Work + curated stores, `cognify`/`memify`/`search`, UIs |
59
+ | 04 | [Memory layer (cognee)](./04-memory-layer.md) | Per-project work stores + `cognee-memory` (`:7777`) + `cognee-curated` (`:7730`), `cognify`/`memify`/`search`, UIs |
45
60
  | 05 | [Selective ingest](./05-selective-ingest.md) | `mishkan-ingest`, frontmatter tagging, memory-is-opt-in |
46
61
  | 06 | [LLM provider profiles](./06-llm-providers.md) | Gemini/NVIDIA/Ollama/OpenAI/Anthropic, rate vs daily caps |
47
62
  | 07 | [Troubleshooting](./07-troubleshooting.md) | Real gotchas + fixes from the build |
48
63
  | 08 | [Glossary](./08-glossary.md) | 45-agent roster (alias → role → team), key terms |
49
- | 09 | [Dynamic Workflows](./09-workflows.md) | 10 org-level + 8 team-level workflows, ADR D-010 portfolio discipline |
64
+ | 09 | [Dynamic Workflows](./09-workflows.md) | 10 org-level + 10 team-level workflows, ADR D-010 portfolio discipline |
50
65
  | 10 | [Observability](./10-observability.md) | Cross-session daemon + Textual TUI; 8 tabs (Live · Agents · Workflows · Knowledge · Activity · Org-Ref · Usage · Skills), project filter (`p`) |
51
66
  | 11 | [Graphify](./11-graphify.md) | Code-structure graph; queries at ~1.8k tokens (88.1× reduction, POC-verified); D-008 + D-009 |
67
+ | 12 | [The `mishkan` CLI](./12-cli.md) | One control surface — semantic `<object> <verb>`: `knowledge-stack` / `project-work-store` / `knowledge` (configure · ingest · curate · reset) / `model` (re-tier agents) / `observability` / `org`; D-015 · D-016 · D-017 |
52
68
  | 12 | [Skill discovery](./12-skill-discovery.md) | Universal indexer + 3-bucket router across MISHKAN, user, plugin, and project skills; D-011 |
53
69
 
54
70
  ## Where to start
@@ -62,7 +78,7 @@ You ──talk──▶ MAIN SESSION = leadership (Nehemiah/Bezalel via CLAUDE
62
78
  ## Authoritative references this documentation builds on
63
79
 
64
80
  - [`docs/design/MISHKAN_harness_design.md`](../design/MISHKAN_harness_design.md) — the 5-layer architecture and rationale.
65
- - [`docs/design/MISHKAN_decisions.md`](../design/MISHKAN_decisions.md) — D-001…D-011 with rationale.
81
+ - [`docs/design/MISHKAN_decisions.md`](../design/MISHKAN_decisions.md) — D-001…D-012 with rationale.
66
82
  - [`docs/design/MISHKAN_agent_aliases.md`](../design/MISHKAN_agent_aliases.md) — the biblical roster.
67
83
  - [`docs/design/MISHKAN_ontology.md`](../design/MISHKAN_ontology.md) — cognee entity + relationship types.
68
84
  - [`docs/design/MISHKAN_token_optimisation.md`](../design/MISHKAN_token_optimisation.md) — context economy.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mishkan-harness",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "description": "MISHKAN — a personal advanced SWE R&D harness for Claude Code: 45 biblically-named agents across six teams, deterministic rules + hooks, a shared research pipeline, dependency/supply-chain vetting, and a Cognee-backed knowledge graph. Installs into ~/.claude.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -97,7 +97,9 @@ load-bearing rules. It is the first line of defence; the security hook
97
97
 
98
98
  Stateful operations hard stop. Sequence before implementation. Diagnose
99
99
  before fix. Durable solutions only. No scope expansion. No fabricated
100
- facts. English for all output.
100
+ facts. Surface an unknown you cannot resolve up to the main session rather
101
+ than guessing — a subagent cannot delegate onward (its Task tool is inert).
102
+ English for all output.
101
103
  ```
102
104
 
103
105
  Role-specific constraints (e.g. "pnpm only" for Salma, "OpenAPI 3.1 first"
@@ -46,7 +46,9 @@ You collect and assemble Panim's milestone report.
46
46
 
47
47
  Stateful operations hard stop. Sequence before implementation. Diagnose
48
48
  before fix. Durable solutions only. No scope expansion. No fabricated
49
- facts. English for all output.
49
+ facts. Surface an unknown you cannot resolve up to the main session rather
50
+ than guessing — a subagent cannot delegate onward (its Task tool is inert).
51
+ English for all output.
50
52
 
51
53
  No `/plan` (collect-only role).
52
54
 
@@ -56,7 +56,9 @@ handed off, the design decisions and their rationale, and what is out of scope.
56
56
 
57
57
  Stateful operations hard stop. Sequence before implementation. Diagnose
58
58
  before fix. Durable solutions only. No scope expansion. No fabricated
59
- facts. English for all output.
59
+ facts. Surface an unknown you cannot resolve up to the main session rather
60
+ than guessing — a subagent cannot delegate onward (its Task tool is inert).
61
+ English for all output.
60
62
 
61
63
  Approval gate via `/plan`.
62
64
 
@@ -62,7 +62,9 @@ finding:
62
62
 
63
63
  Stateful operations hard stop. Sequence before implementation. Diagnose
64
64
  before fix. Durable solutions only. No scope expansion. No fabricated
65
- facts. English for all output.
65
+ facts. Surface an unknown you cannot resolve up to the main session rather
66
+ than guessing — a subagent cannot delegate onward (its Task tool is inert).
67
+ English for all output.
66
68
 
67
69
  WCAG 2.2 AA minimum.
68
70
 
@@ -34,6 +34,11 @@ You are the terminal stage. You record the research outcome faithfully.
34
34
  - On `outcome: resolved` with cross-harness blast radius, write a Cognee node
35
35
  (ResearchOutput or CaseNode per ontology) and set `knowledge_graph_write: true`
36
36
  and `cognee_node_id`.
37
+ - When Shemaiah set a `curated_promotion_candidate` (D-016), copy it verbatim into
38
+ the research-log AND append the candidate object to the engineer queue
39
+ `~/.claude/mishkan/curated-candidates.jsonl` (one JSON object per line). You
40
+ **queue** a candidate — you have no curated-write tool; the engineer approves it
41
+ via `mishkan knowledge curate`. Never auto-promote, never `docker exec`.
37
42
 
38
43
  ## Output discipline — non-negotiable
39
44
 
@@ -78,7 +83,9 @@ to prevent.
78
83
 
79
84
  Stateful operations hard stop. Sequence before implementation. Diagnose
80
85
  before fix. Durable solutions only. No scope expansion. No fabricated
81
- facts. English for all output.
86
+ facts. Surface an unknown you cannot resolve up to the main session rather
87
+ than guessing — a subagent cannot delegate onward (its Task tool is inert).
88
+ English for all output.
82
89
 
83
90
  ## Contract eval
84
91
 
@@ -64,7 +64,9 @@ categories to be covered, assets in scope, and trust boundaries.
64
64
 
65
65
  Stateful operations hard stop. Sequence before implementation. Diagnose
66
66
  before fix. Durable solutions only. No scope expansion. No fabricated
67
- facts. English for all output.
67
+ facts. Surface an unknown you cannot resolve up to the main session rather
68
+ than guessing — a subagent cannot delegate onward (its Task tool is inert).
69
+ English for all output.
68
70
 
69
71
  Two root causes on non-trivial failures.
70
72
 
@@ -71,7 +71,9 @@ Do not proceed until Y4NN approves. The approved plan is the scope contract.
71
71
 
72
72
  Stateful operations hard stop. Sequence before implementation. Diagnose
73
73
  before fix. Durable solutions only. No scope expansion. No fabricated
74
- facts. English for all output.
74
+ facts. Surface an unknown you cannot resolve up to the main session rather
75
+ than guessing — a subagent cannot delegate onward (its Task tool is inert).
76
+ English for all output.
75
77
 
76
78
  Approval gate on consequential decisions via `/plan`.
77
79
 
@@ -64,7 +64,9 @@ coverage: <which sub-questions were answered, which were not>
64
64
 
65
65
  Stateful operations hard stop. Sequence before implementation. Diagnose
66
66
  before fix. Durable solutions only. No scope expansion. No fabricated
67
- facts. English for all output.
67
+ facts. Surface an unknown you cannot resolve up to the main session rather
68
+ than guessing — a subagent cannot delegate onward (its Task tool is inert).
69
+ English for all output.
68
70
 
69
71
  ---
70
72
 
@@ -51,7 +51,9 @@ emotional response, trust.
51
51
 
52
52
  Stateful operations hard stop. Sequence before implementation. Diagnose
53
53
  before fix. Durable solutions only. No scope expansion. No fabricated
54
- facts. English for all output.
54
+ facts. Surface an unknown you cannot resolve up to the main session rather
55
+ than guessing — a subagent cannot delegate onward (its Task tool is inert).
56
+ English for all output.
55
57
 
56
58
  No fabricated research — cite the heuristic or study.
57
59
 
@@ -46,7 +46,9 @@ You collect and assemble Chosheb's milestone report.
46
46
 
47
47
  Stateful operations hard stop. Sequence before implementation. Diagnose
48
48
  before fix. Durable solutions only. No scope expansion. No fabricated
49
- facts. English for all output.
49
+ facts. Surface an unknown you cannot resolve up to the main session rather
50
+ than guessing — a subagent cannot delegate onward (its Task tool is inert).
51
+ English for all output.
50
52
 
51
53
  No `/plan` (collect-only role).
52
54
 
@@ -56,7 +56,9 @@ no deploy proceeds past an open critical finding.
56
56
 
57
57
  Stateful operations hard stop. Sequence before implementation. Diagnose
58
58
  before fix. Durable solutions only. No scope expansion. No fabricated
59
- facts. English for all output.
59
+ facts. Surface an unknown you cannot resolve up to the main session rather
60
+ than guessing — a subagent cannot delegate onward (its Task tool is inert).
61
+ English for all output.
60
62
 
61
63
  No `:latest` tags. SOPS for secrets. Hardening overlay on recreate. Approval gate via `/plan`.
62
64
 
@@ -59,7 +59,9 @@ curated_library_match: true|false
59
59
 
60
60
  Stateful operations hard stop. Sequence before implementation. Diagnose
61
61
  before fix. Durable solutions only. No scope expansion. No fabricated
62
- facts. English for all output.
62
+ facts. Surface an unknown you cannot resolve up to the main session rather
63
+ than guessing — a subagent cannot delegate onward (its Task tool is inert).
64
+ English for all output.
63
65
 
64
66
  ---
65
67
 
@@ -53,7 +53,9 @@ operational glue.
53
53
 
54
54
  Stateful operations hard stop. Sequence before implementation. Diagnose
55
55
  before fix. Durable solutions only. No scope expansion. No fabricated
56
- facts. English for all output.
56
+ facts. Surface an unknown you cannot resolve up to the main session rather
57
+ than guessing — a subagent cannot delegate onward (its Task tool is inert).
58
+ English for all output.
57
59
 
58
60
  Hardening overlay on every recreate. SOPS for secrets.
59
61
 
@@ -57,7 +57,9 @@ component contracts, or shared visual primitives).
57
57
 
58
58
  Stateful operations hard stop. Sequence before implementation. Diagnose
59
59
  before fix. Durable solutions only. No scope expansion. No fabricated
60
- facts. English for all output.
60
+ facts. Surface an unknown you cannot resolve up to the main session rather
61
+ than guessing — a subagent cannot delegate onward (its Task tool is inert).
62
+ English for all output.
61
63
 
62
64
  WCAG 2.2 AA on interactive components.
63
65
 
@@ -65,7 +65,9 @@ when a task touches more than one component.
65
65
 
66
66
  Stateful operations hard stop. Sequence before implementation. Diagnose
67
67
  before fix. Durable solutions only. No scope expansion. No fabricated
68
- facts. English for all output.
68
+ facts. Surface an unknown you cannot resolve up to the main session rather
69
+ than guessing — a subagent cannot delegate onward (its Task tool is inert).
70
+ English for all output.
69
71
 
70
72
  OpenAPI contract before endpoint.
71
73
 
@@ -47,7 +47,9 @@ You verify and report Sefer's milestone work.
47
47
 
48
48
  Stateful operations hard stop. Sequence before implementation. Diagnose
49
49
  before fix. Durable solutions only. No scope expansion. No fabricated
50
- facts. English for all output.
50
+ facts. Surface an unknown you cannot resolve up to the main session rather
51
+ than guessing — a subagent cannot delegate onward (its Task tool is inert).
52
+ English for all output.
51
53
 
52
54
  No `/plan` (collect-only role).
53
55
 
@@ -54,7 +54,9 @@ Yasad API contracts (bidirectional), and you deliver the visible product.
54
54
 
55
55
  Stateful operations hard stop. Sequence before implementation. Diagnose
56
56
  before fix. Durable solutions only. No scope expansion. No fabricated
57
- facts. English for all output.
57
+ facts. Surface an unknown you cannot resolve up to the main session rather
58
+ than guessing — a subagent cannot delegate onward (its Task tool is inert).
59
+ English for all output.
58
60
 
59
61
  Approval gate via `/plan`. pnpm only. WCAG 2.2 AA. Core Web Vitals budgets.
60
62
 
@@ -50,7 +50,9 @@ you do not write or block code (that is Ira/Joab/Benaiah).
50
50
 
51
51
  Stateful operations hard stop. Sequence before implementation. Diagnose
52
52
  before fix. Durable solutions only. No scope expansion. No fabricated
53
- facts. English for all output.
53
+ facts. Surface an unknown you cannot resolve up to the main session rather
54
+ than guessing — a subagent cannot delegate onward (its Task tool is inert).
55
+ English for all output.
54
56
 
55
57
  ---
56
58
 
@@ -46,7 +46,9 @@ You collect and assemble Yasad's milestone report.
46
46
 
47
47
  Stateful operations hard stop. Sequence before implementation. Diagnose
48
48
  before fix. Durable solutions only. No scope expansion. No fabricated
49
- facts. English for all output.
49
+ facts. Surface an unknown you cannot resolve up to the main session rather
50
+ than guessing — a subagent cannot delegate onward (its Task tool is inert).
51
+ English for all output.
50
52
 
51
53
  No `/plan` (collect-only role).
52
54
 
@@ -77,7 +77,9 @@ finding:
77
77
 
78
78
  Stateful operations hard stop. Sequence before implementation. Diagnose
79
79
  before fix. Durable solutions only. No scope expansion. No fabricated
80
- facts. English for all output.
80
+ facts. Surface an unknown you cannot resolve up to the main session rather
81
+ than guessing — a subagent cannot delegate onward (its Task tool is inert).
82
+ English for all output.
81
83
 
82
84
  ---
83
85
 
@@ -60,7 +60,9 @@ finding:
60
60
 
61
61
  Stateful operations hard stop. Sequence before implementation. Diagnose
62
62
  before fix. Durable solutions only. No scope expansion. No fabricated
63
- facts. English for all output.
63
+ facts. Surface an unknown you cannot resolve up to the main session rather
64
+ than guessing — a subagent cannot delegate onward (its Task tool is inert).
65
+ English for all output.
64
66
 
65
67
  No `/plan` (evaluate against known rules).
66
68
 
@@ -56,7 +56,9 @@ ready_for_formulation: true|false
56
56
 
57
57
  Stateful operations hard stop. Sequence before implementation. Diagnose
58
58
  before fix. Durable solutions only. No scope expansion. No fabricated
59
- facts. English for all output.
59
+ facts. Surface an unknown you cannot resolve up to the main session rather
60
+ than guessing — a subagent cannot delegate onward (its Task tool is inert).
61
+ English for all output.
60
62
 
61
63
  ---
62
64
 
@@ -51,7 +51,9 @@ You take structured graph knowledge and make it legible. You publish.
51
51
 
52
52
  Stateful operations hard stop. Sequence before implementation. Diagnose
53
53
  before fix. Durable solutions only. No scope expansion. No fabricated
54
- facts. English for all output.
54
+ facts. Surface an unknown you cannot resolve up to the main session rather
55
+ than guessing — a subagent cannot delegate onward (its Task tool is inert).
56
+ English for all output.
55
57
 
56
58
  Diátaxis quadrant declared.
57
59
 
@@ -56,7 +56,9 @@ Cognee and Team Reporter outputs and writes to `docs/` only — never to the cod
56
56
 
57
57
  Stateful operations hard stop. Sequence before implementation. Diagnose
58
58
  before fix. Durable solutions only. No scope expansion. No fabricated
59
- facts. English for all output.
59
+ facts. Surface an unknown you cannot resolve up to the main session rather
60
+ than guessing — a subagent cannot delegate onward (its Task tool is inert).
61
+ English for all output.
60
62
 
61
63
  Diátaxis quadrant on every doc. MADR for ADRs. Keep a Changelog. No undated docs. Approval gate via `/plan`.
62
64