@zhixuan92/multi-model-agent-core 5.3.0 → 5.3.1
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/dist/unified/two-phase-pipeline.d.ts +2 -0
- package/dist/unified/two-phase-pipeline.d.ts.map +1 -1
- package/dist/unified/two-phase-pipeline.js +2 -0
- package/dist/unified/two-phase-pipeline.js.map +1 -1
- package/package.json +1 -1
- package/src/skills/journal_recall/implement.md +3 -3
- package/src/skills/journal_recall/review.md +1 -0
- package/src/skills/journal_record/implement.md +20 -4
- package/src/skills/journal_record/review.md +6 -3
|
@@ -24,6 +24,8 @@ export interface PipelineInput {
|
|
|
24
24
|
implementerGoal?: string;
|
|
25
25
|
/** Goal condition for the reviewer. */
|
|
26
26
|
reviewerGoal?: string;
|
|
27
|
+
/** EnvelopeBus for provider-level event streaming (stderr + JSONL + telemetry). */
|
|
28
|
+
bus?: object;
|
|
27
29
|
}
|
|
28
30
|
export interface SessionInfo {
|
|
29
31
|
tier: AgentType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"two-phase-pipeline.d.ts","sourceRoot":"","sources":["../../src/unified/two-phase-pipeline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAW,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAuB,KAAK,cAAc,EAAE,MAAM,6BAA6B,CAAC;AACvF,OAAO,EAAmB,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE3E,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,QAAQ,CAAC;IACf,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,mBA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 @@ export async function runTwoPhasePipeline(input) {
|
|
|
42
42
|
abortSignal: ac.signal,
|
|
43
43
|
taskId: input.taskId ?? 'pipeline',
|
|
44
44
|
taskIndex: 0,
|
|
45
|
+
bus: input.bus,
|
|
45
46
|
});
|
|
46
47
|
sessions.push(implSession);
|
|
47
48
|
const implPrompt = `${input.implementerSkill}\n\n---\n\n## Task\n\n${effectivePayload}`;
|
|
@@ -73,6 +74,7 @@ export async function runTwoPhasePipeline(input) {
|
|
|
73
74
|
abortSignal: ac.signal,
|
|
74
75
|
taskId: input.taskId ?? 'pipeline',
|
|
75
76
|
taskIndex: 1,
|
|
77
|
+
bus: input.bus,
|
|
76
78
|
});
|
|
77
79
|
sessions.push(revSession);
|
|
78
80
|
const revPrompt = `${input.reviewerSkill}\n\n---\n\n## Implementer Output\n\n${implTurn.output}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"two-phase-pipeline.js","sourceRoot":"","sources":["../../src/unified/two-phase-pipeline.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAuB,MAAM,6BAA6B,CAAC;AACvF,OAAO,EAAE,eAAe,EAAqB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"two-phase-pipeline.js","sourceRoot":"","sources":["../../src/unified/two-phase-pipeline.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAuB,MAAM,6BAA6B,CAAC;AACvF,OAAO,EAAE,eAAe,EAAqB,MAAM,uBAAuB,CAAC;AAoD3E,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,KAAoB;IAC5D,MAAM,EAAE,GAAG,IAAI,eAAe,EAAE,CAAC;IACjC,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,SAAS,IAAI,SAAS,CAAC,CAAC;IAE7D,yBAAyB;IACzB,IAAI,YAAY,GAAG,KAAK,CAAC,GAAG,CAAC;IAC7B,IAAI,SAAsC,CA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ACrB,kBAAkB,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK;YACnD,QAAQ,EAAE;gBACR,WAAW,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,eAAe,EAAE,SAAS,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,KAAK,IAAI,EAAE;gBACjG,QAAQ,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,YAAY,EAAE,SAAS,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,KAAK,IAAI,EAAE;aAC1F;YACD,IAAI,EAAE,EAAE,cAAc,EAAE,QAAQ,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAAC,OAAO,EAAE;YACxE,QAAQ;SACT,CAAC;IACJ,CAAC;YAAS,CAAC;QACT,MAAM,aAAa,EAAE,CAAC;IACxB,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhixuan92/multi-model-agent-core",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Core library for multi-model-agent: provider runners (Claude, Codex, OpenAI-compatible), routing logic, config schema, and tool/sandbox primitives.",
|
|
@@ -4,7 +4,7 @@ You search a project's learnings journal at `.mmagent/journal/` to answer a conc
|
|
|
4
4
|
|
|
5
5
|
## Why This Exists
|
|
6
6
|
|
|
7
|
-
mma-journal-recall is the read side of the
|
|
7
|
+
mma-journal-recall is the read side of the team knowledge graph. The caller is about to design, attempt, or decide something and wants to know what THIS project already learned — decisions made, design rationale, user behavior patterns, process learnings, research findings, and style conventions. Your output replaces their own journal search — they will take your synthesis at face value and use it to avoid re-treading ground already explored.
|
|
8
8
|
|
|
9
9
|
**Completion test:** would the caller, reading your synthesis and the cited nodes, reach the same conclusion if they searched the journal themselves — or would they find relevant nodes you missed, or nodes you cited that do not actually say what you claimed?
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@ mma-journal-recall is the read side of the learnings graph. The caller is about
|
|
|
12
12
|
|
|
13
13
|
Apply ALL perspectives regardless of the question. Each may yield candidate answers:
|
|
14
14
|
|
|
15
|
-
1. **KEYWORD-MATCH** — Read `index.md` (or list `nodes/`), then open nodes whose title/tags/body share the query's key terms. Your candidate answers are those nodes, each cited with its id, status, and the lesson that answers the query.
|
|
15
|
+
1. **KEYWORD-MATCH** — Read `index.md` (or list `nodes/`), then open nodes whose title/tags/body/category share the query's key terms. When the query targets a specific knowledge type (e.g., "what conventions do we follow" → `style` category, "how does the user prefer to work" → `behavior` category), prioritize nodes in that category. Your candidate answers are those nodes, each cited with its id, category, status, and the lesson that answers the query.
|
|
16
16
|
|
|
17
17
|
2. **GRAPH-NEIGHBORHOOD** — From the nodes that match the query, follow `refines`/`depends-on`/`parent` edges and supersedes chains (to the current head) to gather connected context. Your candidate answers are the neighborhood nodes that explain or qualify the direct matches.
|
|
18
18
|
|
|
@@ -56,5 +56,5 @@ Before finishing, verify:
|
|
|
56
56
|
Output exactly one JSON block:
|
|
57
57
|
|
|
58
58
|
```json
|
|
59
|
-
{"results": [{"learning": "<lesson from node>", "context": "<surrounding edges and related nodes>", "relevance": "critical|high|medium|low", "nodeId": "<id>", "nodePath": "<file path>", "status": "<adopted|dropped|inconclusive|superseded>"}], "summary": "<synthesis answering the query, naming how nodes relate>"}
|
|
59
|
+
{"results": [{"learning": "<lesson from node>", "context": "<surrounding edges and related nodes>", "relevance": "critical|high|medium|low", "nodeId": "<id>", "nodePath": "<file path>", "category": "<decision|design|behavior|process|knowledge|style>", "status": "<adopted|dropped|inconclusive|superseded>"}], "summary": "<synthesis answering the query, naming how nodes relate>"}
|
|
60
60
|
```
|
|
@@ -20,6 +20,7 @@ Every cited node must be real and correctly quoted:
|
|
|
20
20
|
- Was each cited node actually read this session, or is the citation from memory/hallucination?
|
|
21
21
|
- Does the `learning` field accurately represent what the node says, or has it been paraphrased beyond recognition?
|
|
22
22
|
- Is the `status` field correct for each cited node?
|
|
23
|
+
- Is the `category` field correct for each cited node (matches the node's frontmatter)?
|
|
23
24
|
|
|
24
25
|
Remove findings that cite non-existent or unread nodes. This is the highest-priority check.
|
|
25
26
|
|
|
@@ -4,7 +4,7 @@ You maintain a project's learnings journal at `.mmagent/journal/`. Integrate one
|
|
|
4
4
|
|
|
5
5
|
## Why This Exists
|
|
6
6
|
|
|
7
|
-
The journal is a persistent graph of
|
|
7
|
+
The journal is a persistent graph of team knowledge — decisions, design rationale, user behavior patterns, process learnings, research findings, and style conventions. Each entry is a categorized node with typed edges to related nodes. The graph survives across sessions so future work can recall what this project already learned. Your job is to integrate new entries while maintaining graph integrity.
|
|
8
8
|
|
|
9
9
|
## Integration Procedure
|
|
10
10
|
|
|
@@ -20,9 +20,9 @@ Process learnings IN ORDER (learningIndex 0, 1, 2, ...). For EACH learning:
|
|
|
20
20
|
- **merge**: adds no new causal claim/constraint/consequence. Fold into the existing node.
|
|
21
21
|
- **create**: matches no existing node.
|
|
22
22
|
|
|
23
|
-
4. **Write node files** as `nodes/<id>-<kebab-title>.md` with YAML frontmatter (`id`, `title`, `status`, `tags` [lowercase-kebab], `date`, `links` [typed edges], `supersededBy`) + `## Context` and `## Consequences`. id = max(existing)+1, zero-padded 4 digits (collision-free because you integrate strictly in order).
|
|
23
|
+
4. **Write node files** as `nodes/<id>-<kebab-title>.md` with YAML frontmatter (`id`, `title`, `category`, `status`, `tags` [lowercase-kebab], `date`, `links` [typed edges], `supersededBy`) + `## Context` and `## Consequences`. id = max(existing)+1, zero-padded 4 digits (collision-free because you integrate strictly in order).
|
|
24
24
|
|
|
25
|
-
5. **Update catalog.** Append ONE `log.md` line (`<ISO-8601 date> <op> <id> <title>`), then update `index.md` (table: id | date | status | title | tags, sorted by id asc). FLUSH all writes for this learning to disk BEFORE starting the next learning.
|
|
25
|
+
5. **Update catalog.** Append ONE `log.md` line (`<ISO-8601 date> <op> <id> <title>`), then update `index.md` (table: id | date | category | status | title | tags, sorted by id asc). FLUSH all writes for this learning to disk BEFORE starting the next learning.
|
|
26
26
|
|
|
27
27
|
6. **Handle failures.** If a single learning cannot be integrated, record it in `failed` (see report format) and CONTINUE to the next learning — do not abort the batch.
|
|
28
28
|
|
|
@@ -34,8 +34,24 @@ Process learnings IN ORDER (learningIndex 0, 1, 2, ...). For EACH learning:
|
|
|
34
34
|
|
|
35
35
|
- **Edge types** (only): `supersedes`, `refines`, `relates`, `depends-on`, `contradicts`, `parent`.
|
|
36
36
|
- **Status values** (only): `adopted`, `dropped`, `inconclusive`, `superseded`.
|
|
37
|
+
- **Category values** (only): `decision`, `design`, `behavior`, `process`, `knowledge`, `style`.
|
|
37
38
|
|
|
38
|
-
Do not invent edge types
|
|
39
|
+
Do not invent edge types, status values, or categories outside these vocabularies.
|
|
40
|
+
|
|
41
|
+
## Category Classification
|
|
42
|
+
|
|
43
|
+
Every node MUST have a `category` field. Classify based on what the entry captures:
|
|
44
|
+
|
|
45
|
+
| Category | Signal words / patterns | `## Context` describes | `## Consequences` describes |
|
|
46
|
+
|----------|------------------------|------------------------|---------------------------|
|
|
47
|
+
| `decision` | tried, dropped, chose, trade-off, instead | What was tried and what happened | What to do instead, when this applies |
|
|
48
|
+
| `design` | architecture, pattern, why, rationale, layer | Why the system is structured this way | Constraints this creates, what breaks if violated |
|
|
49
|
+
| `behavior` | user, workflow, prefers, communication, style | What the user/team does and when | How to adapt, what to expect |
|
|
50
|
+
| `process` | SDLC, phase, audit, pipeline, release, gate | How the process works, what was observed | When to use this process, what to watch for |
|
|
51
|
+
| `knowledge` | found, API, library, feasibility, ecosystem | What was discovered, the evidence | How to apply it, where it's relevant |
|
|
52
|
+
| `style` | convention, naming, format, documentation | What the convention is, where it applies | When to follow it, exceptions |
|
|
53
|
+
|
|
54
|
+
When an entry spans categories (e.g., a design decision informed by user behavior), pick the **primary** category and use `relates` edges to connect to nodes in the other category.
|
|
39
55
|
|
|
40
56
|
## Trust Boundary
|
|
41
57
|
|
|
@@ -24,10 +24,12 @@ Reclassify when the existing graph contradicts the chosen operation.
|
|
|
24
24
|
|
|
25
25
|
### 3. Node Quality
|
|
26
26
|
|
|
27
|
-
- Does each node have correct YAML frontmatter (`id`, `title`, `status`, `tags`, `date`, `links`)?
|
|
27
|
+
- Does each node have correct YAML frontmatter (`id`, `title`, `category`, `status`, `tags`, `date`, `links`)?
|
|
28
|
+
- Is the `category` field one of the fixed enum values: `decision`, `design`, `behavior`, `process`, `knowledge`, `style`?
|
|
29
|
+
- Does the category match the content? A `decision` has a trade-off outcome; a `behavior` describes a user/team pattern; a `knowledge` states a factual finding; etc.
|
|
28
30
|
- Does each node have `## Context` and `## Consequences` sections?
|
|
29
31
|
- Are tags lowercase-kebab format?
|
|
30
|
-
- Is the node body
|
|
32
|
+
- Is the node body actionable (not just an observation)? Every category should state what to do with the knowledge — a `behavior` says how to adapt; a `knowledge` says how to apply it; a `decision` says what to do instead.
|
|
31
33
|
- Are secrets/credentials redacted from recorded content?
|
|
32
34
|
|
|
33
35
|
### 4. Catalog Consistency
|
|
@@ -51,8 +53,9 @@ Reclassify when the existing graph contradicts the chosen operation.
|
|
|
51
53
|
|
|
52
54
|
- Reclassify operations when the existing graph contradicts the chosen op.
|
|
53
55
|
- Fix edge types that use non-vocabulary terms.
|
|
56
|
+
- Fix missing or incorrect `category` fields.
|
|
54
57
|
- Add missing `supersededBy` links on superseded nodes.
|
|
55
|
-
- Flag
|
|
58
|
+
- Flag entries recorded as observations rather than actionable knowledge.
|
|
56
59
|
- Report any writes outside `.mmagent/journal/`.
|
|
57
60
|
- Fix catalog inconsistencies (missing index entries, out-of-order sorting).
|
|
58
61
|
|