@miadi/inquiry-weave 0.13.1 → 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 +22 -30
- package/dist/lineage-edge.d.ts +7 -0
- package/dist/lineage-edge.d.ts.map +1 -1
- package/dist/lineage-edge.js +30 -6
- package/dist/lineage-edge.js.map +1 -1
- package/package.json +3 -4
- package/rispecs/README.rise.md +0 -5
- package/rispecs/RISPEC.md +0 -9
- package/rispecs/foundation-weave.proposal.spec.md +0 -104
- package/rispecs/medicine-wheel-registration.spec.md +0 -69
package/README.md
CHANGED
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
# @miadi/inquiry-weave
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Keep a question, its GitHub issue and the chronicle episode that carries it related to each
|
|
4
|
+
other.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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=/
|
|
28
|
-
export MIADI_INQUIRY_DIR=/
|
|
29
|
-
export MIADI_INQUIRY_GITHUB_REPO=
|
|
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 "
|
|
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
|
|
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.
|
|
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>`.
|
|
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/dist/lineage-edge.d.ts
CHANGED
|
@@ -24,6 +24,13 @@
|
|
|
24
24
|
* for an edge that demonstrably exists in `GET /api/edges`. So the preflight
|
|
25
25
|
* must list and scan; asking for the edge by its own id always says absent,
|
|
26
26
|
* which would make every run re-POST.
|
|
27
|
+
* 3. A bare `GET /api/edges` answers the first 100 rows, and `POST /api/edges`
|
|
28
|
+
* REPLACES the edge of a pair it already holds (`replaced: true`). A scan of
|
|
29
|
+
* the first page missed every edge past row 100 and re-posted it, which
|
|
30
|
+
* rewrote whatever relation someone had set there. Measured 2026-09-24:
|
|
31
|
+
* 322 edges on the chronicle wheel. So the scan asks for `?limit=all`, an
|
|
32
|
+
* existing edge of another type for the same pair is reported and left
|
|
33
|
+
* alone, and a replace the scan did not foresee is reported (jgwill/Miadi#682).
|
|
27
34
|
*/
|
|
28
35
|
export type LineageEdgeState = "created" | "already-present" | "skipped" | "pending";
|
|
29
36
|
export interface LineageEdgeInput {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lineage-edge.d.ts","sourceRoot":"","sources":["../src/lineage-edge.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"lineage-edge.d.ts","sourceRoot":"","sources":["../src/lineage-edge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,MAAM,MAAM,gBAAgB,GACxB,SAAS,GACT,iBAAiB,GACjB,SAAS,GACT,SAAS,CAAA;AAEb,MAAM,WAAW,gBAAgB;IAC/B,iEAAiE;IACjE,UAAU,EAAE,MAAM,CAAA;IAClB,2DAA2D;IAC3D,QAAQ,EAAE,MAAM,CAAA;IAChB,kFAAkF;IAClF,gBAAgB,EAAE,MAAM,CAAA;IACxB,uEAAuE;IACvE,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,gBAAgB,CAAA;IACvB,OAAO,EAAE,MAAM,CAAA;IACf,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,yBAAyB;IACxC,SAAS,CAAC,EAAE,OAAO,KAAK,CAAA;IACxB,iDAAiD;IACjD,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAkCD,wBAAgB,aAAa,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,CAE7D;AAED;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,gBAAgB,EACvB,OAAO,GAAE,yBAA8B,GACtC,OAAO,CAAC,kBAAkB,CAAC,CA0F7B"}
|
package/dist/lineage-edge.js
CHANGED
|
@@ -24,6 +24,13 @@
|
|
|
24
24
|
* for an edge that demonstrably exists in `GET /api/edges`. So the preflight
|
|
25
25
|
* must list and scan; asking for the edge by its own id always says absent,
|
|
26
26
|
* which would make every run re-POST.
|
|
27
|
+
* 3. A bare `GET /api/edges` answers the first 100 rows, and `POST /api/edges`
|
|
28
|
+
* REPLACES the edge of a pair it already holds (`replaced: true`). A scan of
|
|
29
|
+
* the first page missed every edge past row 100 and re-posted it, which
|
|
30
|
+
* rewrote whatever relation someone had set there. Measured 2026-09-24:
|
|
31
|
+
* 322 edges on the chronicle wheel. So the scan asks for `?limit=all`, an
|
|
32
|
+
* existing edge of another type for the same pair is reported and left
|
|
33
|
+
* alone, and a replace the scan did not foresee is reported (jgwill/Miadi#682).
|
|
27
34
|
*/
|
|
28
35
|
function describeFailure(error) {
|
|
29
36
|
return error instanceof Error ? error.message : String(error);
|
|
@@ -68,7 +75,7 @@ export async function projectLineageEdge(mwUrl, input, options = {}) {
|
|
|
68
75
|
const edge_id = lineageEdgeId(input);
|
|
69
76
|
let listing;
|
|
70
77
|
try {
|
|
71
|
-
listing = await fetchImpl(`${base}/api/edges`);
|
|
78
|
+
listing = await fetchImpl(`${base}/api/edges?limit=all`);
|
|
72
79
|
}
|
|
73
80
|
catch (error) {
|
|
74
81
|
return {
|
|
@@ -96,11 +103,17 @@ export async function projectLineageEdge(mwUrl, input, options = {}) {
|
|
|
96
103
|
error: `GET ${base}/api/edges returned unreadable JSON: ${describeFailure(error)}`,
|
|
97
104
|
};
|
|
98
105
|
}
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
String(edge.relationship_type) === input.relationshipType);
|
|
102
|
-
if (present)
|
|
106
|
+
const pair = existing.find((edge) => String(edge.from_id) === input.fromNodeId && String(edge.to_id) === input.toNodeId);
|
|
107
|
+
if (pair && String(pair.relationship_type) === input.relationshipType)
|
|
103
108
|
return { state: "already-present", edge_id };
|
|
109
|
+
if (pair) {
|
|
110
|
+
// One ordered pair is one edge: posting would replace the relation already there.
|
|
111
|
+
return {
|
|
112
|
+
state: "pending",
|
|
113
|
+
edge_id,
|
|
114
|
+
error: `the wheel already holds a '${String(pair.relationship_type)}' edge ${edge_id}; one pair is one edge, so '${input.relationshipType}' was not written over it`,
|
|
115
|
+
};
|
|
116
|
+
}
|
|
104
117
|
if (options.dryRun)
|
|
105
118
|
return { state: "skipped", edge_id };
|
|
106
119
|
let response;
|
|
@@ -123,8 +136,19 @@ export async function projectLineageEdge(mwUrl, input, options = {}) {
|
|
|
123
136
|
error: `medicine-wheel unreachable at ${base}: ${describeFailure(error)}`,
|
|
124
137
|
};
|
|
125
138
|
}
|
|
126
|
-
if (response.ok)
|
|
139
|
+
if (response.ok) {
|
|
140
|
+
let replaced = false;
|
|
141
|
+
try {
|
|
142
|
+
replaced = (await response.json())?.replaced === true;
|
|
143
|
+
}
|
|
144
|
+
catch {
|
|
145
|
+
replaced = false;
|
|
146
|
+
}
|
|
147
|
+
if (replaced) {
|
|
148
|
+
return { state: "pending", edge_id, error: `the wheel replaced an edge ${edge_id} the listing did not show; check it by hand` };
|
|
149
|
+
}
|
|
127
150
|
return { state: "created", edge_id };
|
|
151
|
+
}
|
|
128
152
|
const detail = await readErrorBody(response);
|
|
129
153
|
if (response.status === 409 || /already exists/i.test(detail)) {
|
|
130
154
|
return { state: "already-present", edge_id };
|
package/dist/lineage-edge.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lineage-edge.js","sourceRoot":"","sources":["../src/lineage-edge.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"lineage-edge.js","sourceRoot":"","sources":["../src/lineage-edge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAgCH,SAAS,eAAe,CAAC,KAAc;IACrC,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AAC/D,CAAC;AAED,KAAK,UAAU,aAAa,CAAC,QAAkB;IAC7C,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,CAAC,MAAM,QA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AO,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,CAAA;IACtC,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,QAAQ,CAAC,CAAA;IAC5C,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,IAAI,iBAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9D,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,OAAO,EAAE,CAAA;IAC9C,CAAC;IACD,OAAO;QACL,KAAK,EAAE,SAAS;QAChB,OAAO;QACP,KAAK,EAAE,QAAQ,IAAI,oBAAoB,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE;KACxF,CAAA;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@miadi/inquiry-weave",
|
|
3
|
-
"version": "0.13.
|
|
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.
|
|
28
|
+
"@miadi/episodic-memory-schema": "^0.11.1",
|
|
30
29
|
"yaml": "^2.5.0"
|
|
31
30
|
},
|
|
32
31
|
"devDependencies": {
|
package/rispecs/README.rise.md
DELETED
|
@@ -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.
|