@miadi/inquiry-weave 0.13.2 → 0.13.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,14 +1,22 @@
1
1
  # @miadi/inquiry-weave
2
2
 
3
- `inquiry-weave` keeps three identities in relation:
3
+ Keep a question, its GitHub issue and the chronicle episode that carries it related to each
4
+ other.
4
5
 
5
- - an inquiry artefact in the IAIP artefact shelf;
6
- - its GitHub issue;
7
- - the Chronicle episode that carries it.
6
+ In the Miadi stack, work starts from a question. An inquiry artefact is a folder holding that
7
+ question and what is being learned about it; a GitHub issue is where it is discussed; an
8
+ episode is where the work around it is filed. `inquiry-weave` creates the issue with the `gh`
9
+ CLI, records the relation on both sides, syncs the artefact into the episode, and registers the
10
+ weave with the chronicle's medicine wheel. It also reads the chronicle as a catalog, answers
11
+ attention items, writes lineage between episodes, and files reviews into episodes.
8
12
 
9
- It creates issues with the portable `gh` CLI, records both shores of the
10
- relation, syncs the artefact into the episode, and registers the weave. It does
11
- not depend on private host scripts or private cache folders.
13
+ Works with:
14
+
15
+ - `passages`: births episodes (`mkepisode`) and turns them into stories.
16
+ - `@miadi/episodic-memory-schema`: the shapes of the catalog and manifests it builds.
17
+ - `@miadi/attention-core` / `@miadi/attention-ui`: show the attention items it reads and answers.
18
+
19
+ It does not depend on private host scripts or private cache folders.
12
20
 
13
21
  ## Install
14
22
 
@@ -24,9 +32,9 @@ scaffold for combined one-command inquiry flows.
24
32
  ## Environment
25
33
 
26
34
  ```bash
27
- export MIADI_CHRONICLE_ROOT=/srv/miadi/episodes/miadi-chronicle
28
- export MIADI_INQUIRY_DIR=/a/src/IAIP/prototypes/artefacts
29
- export MIADI_INQUIRY_GITHUB_REPO=miadisabelle/Etuaptmumk-RSM
35
+ export MIADI_CHRONICLE_ROOT=/path/to/miadi-chronicle
36
+ export MIADI_INQUIRY_DIR=/path/to/inquiry-artefacts
37
+ export MIADI_INQUIRY_GITHUB_REPO=owner/repo
30
38
  export MIADI_CHRONICLE_MW_URL="${MIADI_CHRONICLE_MW_URL:-http://127.0.0.1:8040}"
31
39
  ```
32
40
 
@@ -115,7 +123,7 @@ mkepisode \
115
123
  -n 133 \
116
124
  -t "honcho eval adequate memories" \
117
125
  -g "Establish adequate memories for the honcho evaluation." \
118
- -r "jgwill/Miadi#133"
126
+ -r "owner/repo#133"
119
127
  ```
120
128
 
121
129
  ## Weave an issue that already exists
@@ -124,7 +132,7 @@ mkepisode \
124
132
  inquiry-weave relate \
125
133
  --artefact "$MIADI_INQUIRY_DIR/ep133-honcho-eval" \
126
134
  --episode 133 \
127
- --issue jgwill/Miadi#133
135
+ --issue owner/repo#133
128
136
  ```
129
137
 
130
138
  To weave the artefact and its already-recorded issue into a newly scaffolded
@@ -193,7 +201,7 @@ Set `MIADI_CHRONICLE_ROOT`. Set `MIADI_CHRONICLE_MW_URL` (the legacy
193
201
  `MW_API_URL_OVERRIDE` / `MW_API_URL` are read only if it is unset) to
194
202
  the one Chronicle wheel. With no wheel URL, an answer still lands in the
195
203
  authoritative file and the tool returns `pending`; it never falls back to a
196
- repo-local wheel. See [jgwill/Miadi#631](https://github.com/jgwill/Miadi/issues/631).
204
+ repo-local wheel.
197
205
 
198
206
  ## Episode lineage
199
207
 
@@ -219,20 +227,4 @@ the review's public JSON from `MIADI_REVIEW_BASE_URL` (default
219
227
  `review:<uuid>` node and the `chronicle:<episode>` → `review:<uuid>` edge on the wheel, and lands.
220
228
  A `hold` hook given by the app opens the talking circle about the review before landing, so its
221
229
  note lands in the same commit. `mintEpisode({ review })` births an episode from a review.
222
- `listEpisodeReviews` reads both `reviews:` and `references: miadi-review:<uuid>`. jgwill/Miadi#682.
223
-
224
- ## Development
225
-
226
- ```bash
227
- pnpm --filter @miadi/inquiry-weave build
228
- pnpm --filter @miadi/inquiry-weave test
229
- ```
230
-
231
- Tests use temporary roots and a fake `gh` executable. They make no network or
232
- real GitHub calls.
233
-
234
- ---
235
-
236
- 🌸 `passages` opens the governed episode vessel. `inquiry-weave` ties the
237
- living inquiry, its issue, and that episode together without pretending they
238
- are the same thing.
230
+ `listEpisodeReviews` reads both `reviews:` and `references: miadi-review:<uuid>`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miadi/inquiry-weave",
3
- "version": "0.13.2",
3
+ "version": "0.13.3",
4
4
  "description": "Relate and sync IAIP inquiry artefacts, their GitHub issues, and miadi-chronicle episodes. Creates vessels and relations only — never inquiry content.",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -22,11 +22,10 @@
22
22
  },
23
23
  "files": [
24
24
  "dist",
25
- "README.md",
26
- "rispecs"
25
+ "README.md"
27
26
  ],
28
27
  "dependencies": {
29
- "@miadi/episodic-memory-schema": "^0.11.0",
28
+ "@miadi/episodic-memory-schema": "^0.11.1",
30
29
  "yaml": "^2.5.0"
31
30
  },
32
31
  "devDependencies": {
@@ -1,5 +0,0 @@
1
- # RISE README: @miadi/inquiry-weave
2
-
3
- Inquiry weave for relations between IAIP inquiry artifacts, GitHub issues, and Miadi chronicle episodes.
4
-
5
- Read `./RISPEC.md`, check `../package.json`, and use the narrowest package needed. Indexed from root `llms.txt` and `llms-full.txt`.
package/rispecs/RISPEC.md DELETED
@@ -1,9 +0,0 @@
1
- # RISPEC: @miadi/inquiry-weave
2
-
3
- RISE = Reverse-engineer, Intent-extract, Specify, Export.
4
-
5
- Purpose: relations between IAIP inquiry artifacts, GitHub issues, and Miadi chronicle episodes.
6
- Install: `pnpm add @miadi/inquiry-weave` or workspace `pnpm -w add @miadi/inquiry-weave@workspace:* --filter <consumer-package>`.
7
- Contract: public exports, schemas, CLI flags, or adapter payloads owned by this package.
8
- Authority: `package.json`, source exports, tests, and release metadata remain truth.
9
- Handoff: verify exports, examples, test evidence, and publish/stub/deprecated status.
@@ -1,104 +0,0 @@
1
- # Proposal — Foundation as a fourth weave identity
2
-
3
- **Status:** proposal (not implemented) · **Date:** 2026-07-24 · **Package:** `@miadi/inquiry-weave`
4
- **Companion:** `@miadi/episodic-memory-schema`, `@miadi/foundations`
5
- **Related:** jgwill/Miadi#546 (packet), jgwill/Miadi#547 (`@miadi/foundations`), jgwill/Miadi#483, #506, #507
6
-
7
- ## Context (current reality)
8
-
9
- `inquiry-weave` weaves **three identities** of one inquiry and never generates content:
10
-
11
- ```
12
- inquiry artefact ◄──► GitHub issue ◄──► chronicle episode
13
- ```
14
-
15
- Separately, `foundations/<topic>/` packets (skill `deep-research-foundations`, now bundled by
16
- `@miadi/foundations`) carry the **academic grounding** a decision stands on. Today nothing
17
- relates a packet to the episode/issue/artefact it grounds — the grounding is discoverable only
18
- by prose cross-reference. A chronicle episode cannot answer "what fields does this stand on?"
19
-
20
- ## Desired state
21
-
22
- A **foundation** is a first-class, weavable identity — the *grounding* relation — so an
23
- episode (or issue, or artefact) can declare the packets that legitimize its decisions, and
24
- forgewright/`/chronicle` can render "grounded by …" the same way they render woven inquiries.
25
-
26
- ```
27
- inquiry artefact ◄──► GitHub issue ◄──► chronicle episode
28
- ▲
29
- │ grounds
30
- ▼
31
- foundation packet (foundations/<slug>/ or @miadi/foundations)
32
- ```
33
-
34
- ## Proposed surface (additive, non-breaking)
35
-
36
- ### 1. `weave.yaml` gains a `foundations:` block
37
-
38
- Episode side (`<episode>/inquiry/weave.yaml`) and artefact side (`.weave.yaml`):
39
-
40
- ```yaml
41
- foundations:
42
- - slug: software-supply-chain-and-release-engineering
43
- source: repo # repo | package
44
- packet_path: foundations/software-supply-chain-and-release-engineering # when source=repo
45
- package: "@miadi/foundations" # when source=package
46
- issue: jgwill/Miadi#546
47
- fields:
48
- - Software Supply-Chain Security
49
- - Release Engineering & Continuous Delivery
50
- grounded_at: 2026-07-24T00:00:00.000Z
51
- ```
52
-
53
- The package stays true to its mystery boundary: it records the **relation**, never authors the
54
- packet. Resolution is read-only (a repo path or a published `@miadi/foundations` slug).
55
-
56
- ### 2. New verb `ground` (mirrors `relate`)
57
-
58
- ```
59
- inquiry-weave ground --episode <ref> --foundation <slug>
60
- [--source repo|package] [--issue owner/repo#N] [--dry-run]
61
- ```
62
-
63
- - Validates the packet exists (repo `foundations/<slug>/` or `@miadi/foundations` manifest).
64
- - Appends to `weave.yaml`/`.weave.yaml` (append-if-missing, never overwrite) and to the
65
- artefact's `AGENTS.md` back-link (`grounded by foundation <slug>`), matching `relate`.
66
- - `--dry-run` previews with `would ground:` and writes nothing (per the global dry-run contract).
67
-
68
- ### 3. `register` projects a foundation edge into medicine-wheel
69
-
70
- `inquiry-weave register` gains a `miadi.foundation-ref.v1` record + a `grounds` edge from the
71
- foundation node to the episode node (`chronicle:<episode-dir>`), so forgewright renders the
72
- grounding on the episode card. Metadata-only, fail-open — identical guarantees to the existing
73
- inquiry-weave registration (jgwill/Miadi#490).
74
-
75
- ### 4. Schema companion (`@miadi/episodic-memory-schema`)
76
-
77
- `EpisodeManifestEntry` gains an **optional** field so both renderers read groundings identically:
78
-
79
- ```ts
80
- /** Foundation packets this episode declares as its academic grounding. */
81
- foundations?: FoundationRef[]
82
- ```
83
-
84
- `FoundationRef = { slug: string; fields?: string[]; issue?: string; source: "repo" | "package" }`.
85
- Optional and additive → backward-compatible; the enumerator (`catalog.ts`) fills it from
86
- `weave.yaml`, keeping the read-side unforked.
87
-
88
- ## Boundaries / non-goals
89
-
90
- - No packet authoring — `ground` records a relation to an existing packet only.
91
- - No IAIP absorption; no change to the three existing identities.
92
- - Whether groundings live on the episode, the issue, or the artefact primarily is settled at
93
- implementation: this proposal writes them wherever `relate` already writes, keyed by episode.
94
-
95
- ## Structural tension resolved
96
-
97
- Between grounding that is **narratively asserted** (prose says "this stands on field X") and
98
- grounding that is **structurally woven** (machine-readable, renderable, queryable). The `ground`
99
- verb + `foundations:` block turns a claim into a relation the chronicle can show and QMD can index.
100
-
101
- ## Decision requested
102
-
103
- Approve the surface (verb name `ground` vs `relate --foundation`; block shape; schema field), then
104
- implement behind the existing dry-run/register guarantees. Until then this file is proposal-only.
@@ -1,69 +0,0 @@
1
- # RISE Spec: Inquiry Weave → Medicine-Wheel Registration
2
-
3
- Companion specs (the other two lanterns of this workstream):
4
- - `medicine-wheel:rispecs/inquiry-weave-registration.spec.md` — the storage side
5
- - `forgewright:rispecs/09-inquiry-weave-visibility.spec.md` — the rendering side (branch `4-plan-episode-visibility`, kin to `08-medicine-wheel-integration.spec.md`)
6
-
7
- Status: **implemented in v0.2** — `register` targets `POST {MW_API_URL}/api/inquiry-weaves` as pinned below.
8
-
9
- ## Reverse Engineering (current reality)
10
-
11
- - Inquiry Weave relations exist only as files on disk: `<episode>/inquiry/weave.yaml`
12
- (episode side, incl. sync state) and `<artefact>/.weave.yaml` (artefact side, durable
13
- relations). Schema version key `weave: 1`.
14
- - @miadi/inquiry-weave v0 already exports the projection seam: `WeaveRecord`
15
- (`src/weave.ts`) — the three identities (artefact name+path, issue ref+url, episode
16
- number/slug/path) plus `lastSync` — and `toWeaveRecords(episodeWeave, inquiryRoot)`.
17
- - A medicine-wheel MCP server is already configured for chronicle work:
18
- `/a/src/Miadi/etc/mcp-config-mw-ilex.json`, server `medicine-wheel-miadi-chronicle`
19
- (`npx ${MWCV}`, `MW_API_URL=http://127.0.0.1:8040`). It is the candidate storage
20
- interface; nothing registers weaves into it today.
21
- - forgewright renders episode data from medicine-wheel but has no notion of an Inquiry
22
- Weave.
23
-
24
- ## Intent
25
-
26
- Inquiry Weaves become *visible relations*: once an artefact, its issue, and its episode
27
- are woven, that weave can be seen wherever episodes are seen — without anyone re-deriving
28
- it from the filesystem. The weave files on disk remain the source of truth; medicine-wheel
29
- holds a registered projection; forgewright renders it. The mystery boundary is untouched:
30
- registration moves metadata, never inquiry content.
31
-
32
- ## Specifications (desired state)
33
-
34
- - A new command `inquiry-weave register (--episode <ref> | --artefact <ref>) [--dry-run]`
35
- projects each relation as a `WeaveRecord` and submits it to medicine-wheel.
36
- - Transport: the medicine-wheel MCP tool surface (preferred) or `MW_API_URL` HTTP —
37
- decided in the medicine-wheel spec; this package only guarantees the payload shape:
38
-
39
- ```json
40
- {
41
- "weaveVersion": 1,
42
- "artefact": { "name": "ep126-mila-ai-event-…", "path": "/src/IAIP/prototypes/artefacts/…" },
43
- "issue": { "ref": "miadisabelle/Etuaptmumk-RSM#245", "url": "https://github.com/…/issues/245" },
44
- "episode": { "number": 126, "slug": "mila-ai-indigenous-gathering", "path": "2026-07-13-episode-126-…" },
45
- "lastSync": { "at": "…", "tree_sha256": "…", "file_count": 4, "bytes_total": 341001 }
46
- }
47
- ```
48
-
49
- - Registration is idempotent: re-registering the same weave upserts by
50
- (episode.path, artefact.name).
51
- - Structural tension held: current reality = weave files on disk, invisible beyond the
52
- filesystem; desired state = every woven relation queryable from medicine-wheel and
53
- rendered by forgewright. `register` is the action step that resolves this tension.
54
- - Failure to reach medicine-wheel degrades gracefully: the weave files remain
55
- authoritative; `register` reports and exits 1 without touching them.
56
-
57
- ## Exportation (implementation-ready notes)
58
-
59
- - Implement as `src/register.ts` consuming `toWeaveRecords()`; add a `register`
60
- subcommand in `cli.ts`; keep the transport injectable for tests.
61
- - Do not implement until the medicine-wheel spec lands its storage contract; then pin the
62
- agreed endpoint/tool name here.
63
- - Companion agent sessions (copilot/codex panes in the medicine-wheel and forgewright
64
- repos) own the other two specs; keep the payload above as the shared contract between
65
- all three.
66
-
67
- ---
68
- 🌸: The weave learns to be seen — first it held three threads together in the dark; now a
69
- lantern is being shaped so the whole circle can watch them shine.