@deeeed/metamask-harness 0.46.0 → 0.47.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/CHANGELOG.md +28 -0
- package/README.md +1 -1
- package/adapters/manifest.json +12 -4
- package/adapters/mobile/wait-for-bridge.cjs +550 -0
- package/adapters/mobile/wait-for-bridge.sh +11 -148
- package/bin/mm-harness +7 -2
- package/dist/adapters/mobile/prepare.js +26 -18
- package/dist/adapters/mobile/runtime-decision.js +1 -0
- package/dist/cli-commands.js +2 -0
- package/dist/command-contract.js +7 -0
- package/dist/commands/checklist.js +1 -0
- package/dist/commands/help.js +76 -0
- package/dist/commands/parse-args.js +2 -1
- package/dist/commands/recipe-quality.js +1 -1
- package/dist/commands/tutorial.js +46 -0
- package/dist/mm-harness-cli.js +45 -6
- package/docs/CONTRIBUTING.md +2 -0
- package/docs/QA.md +2 -2
- package/library/actions/mobile/perps/perps.mjs +1 -1
- package/package.json +2 -2
- package/scripts/site-contrast.mjs +6 -2
- package/site/assets/help-recipes.json +113 -0
- package/site/architecture.html +0 -497
- package/site/assets/metamask-fox.svg +0 -24
- package/site/assets/progress.mjs +0 -323
- package/site/assets/style.css +0 -1066
- package/site/cheatsheet.html +0 -307
- package/site/ecosystem.html +0 -162
- package/site/how-it-works.html +0 -692
- package/site/index.html +0 -184
- package/site/perps-advanced-orders-qa.html +0 -96
- package/site/perps.html +0 -265
- package/site/recipes.html +0 -423
- package/site/reviewers.html +0 -375
- package/site/tutorials/index.html +0 -181
- package/site/tutorials/v1.html +0 -212
- package/site/tutorials/v2.html +0 -207
- package/site/tutorials/v3.html +0 -258
- package/site/tutorials/v4.html +0 -196
- package/site/tutorials/v5.html +0 -164
- package/site/tutorials/v6.html +0 -166
- package/site/tutorials/v7.html +0 -185
|
@@ -393,13 +393,17 @@ async function checkBehavior(browserEndpoint, port, pages) {
|
|
|
393
393
|
['yarn skills', copied.setup],
|
|
394
394
|
['/mms-recipe-pr-qa-review', copied.work.join('\n')],
|
|
395
395
|
['/mms-recipe-cook', copied.work.join('\n')],
|
|
396
|
+
['/mms-recipe-performance', copied.work.join('\n')],
|
|
397
|
+
['/mms-recipe-evidence', copied.work.join('\n')],
|
|
398
|
+
['agentic/recipe-performance', copied.setup],
|
|
399
|
+
['agentic/recipe-evidence', copied.setup],
|
|
396
400
|
];
|
|
397
401
|
const missing = expected.filter(([line, text]) => !text?.includes(line)).map(([line]) => line);
|
|
398
402
|
if (missing.length) {
|
|
399
403
|
throw new Error(`copy prompt omitted ${missing.map((m) => `"${m}"`).join(', ')}`);
|
|
400
404
|
}
|
|
401
|
-
if (copied.work.length <
|
|
402
|
-
throw new Error(`expected
|
|
405
|
+
if (copied.work.length < 5) {
|
|
406
|
+
throw new Error(`expected five work prompts, copied ${copied.work.length}`);
|
|
403
407
|
}
|
|
404
408
|
|
|
405
409
|
// The landing page is the lobby: one prompt, one way onward, nothing else.
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"topic": "recipes",
|
|
4
|
+
"title": "Recipe-backed work",
|
|
5
|
+
"summary": "Build an executable proof from the closest installed recipe, adapt it to the exact product version, and leave evidence another agent can replay.",
|
|
6
|
+
"capabilities": "Recipe uses: functional QA, visual checks, analytics and log assertions, and performance measurements during development, PR review, or release testing.",
|
|
7
|
+
"scopeNotice": "Current coverage: mm-harness is heavily optimized for Perps. Other teams can use it by adding composable recipes for their key journeys; contact Arthur for help.",
|
|
8
|
+
"recipeProtocolVersion": "1",
|
|
9
|
+
"sections": [
|
|
10
|
+
{
|
|
11
|
+
"id": "target",
|
|
12
|
+
"title": "Freeze the proof target",
|
|
13
|
+
"instruction": "Work inside one isolated MetaMask checkout. Name the exact product version and acceptance criteria, repair harness-owned state, then verify or launch that checkout.",
|
|
14
|
+
"details": [
|
|
15
|
+
"The tested build and current criteria are authoritative. A prior recipe pass is not current proof.",
|
|
16
|
+
"Choose state, visual, log, or mixed evidence for each criterion before authoring the graph."
|
|
17
|
+
],
|
|
18
|
+
"commands": [
|
|
19
|
+
"mm-harness doctor --fix",
|
|
20
|
+
"mm-harness status --json"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"id": "discover",
|
|
25
|
+
"title": "Discover the strongest starting point",
|
|
26
|
+
"instruction": "Search the installed recipe and action catalogs, inspect exact schemas, and select the closest recipe before writing anything new.",
|
|
27
|
+
"details": [
|
|
28
|
+
"A bundled recipe, including a Core recipe, is strong composable vocabulary, not authority for every future product version.",
|
|
29
|
+
"Prefer an existing recipe, then existing actions, then read-only CDP or controller inspection. Add shared vocabulary only after repeated need is proven."
|
|
30
|
+
],
|
|
31
|
+
"commands": [
|
|
32
|
+
"mm-harness actions --json",
|
|
33
|
+
"mm-harness actions --action app.status --json",
|
|
34
|
+
"mm-harness run --list --json",
|
|
35
|
+
"mm-harness run runner.smoke --describe --json"
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"id": "parameters",
|
|
40
|
+
"title": "Design a parameterized contract",
|
|
41
|
+
"instruction": "Declare genuine caller choices once in paramsSchema and keep invariants required by the postcondition inside the recipe.",
|
|
42
|
+
"details": [
|
|
43
|
+
"Parameterize reusable differences such as market, account, provider, network, amount, side, or lifecycle mode.",
|
|
44
|
+
"Do not parameterize away safety, assertions, cleanup, or the meaning of success. Never depend on hidden wallet, account, provider, network, page, port, or device state."
|
|
45
|
+
],
|
|
46
|
+
"commands": []
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"id": "compose",
|
|
50
|
+
"title": "Compose a readable graph",
|
|
51
|
+
"instruction": "Use static call references for unchanged sub-journeys. Keep preparation, action, assertion, evidence, and guaranteed teardown visible as separate nodes with human-facing intent.",
|
|
52
|
+
"details": [
|
|
53
|
+
"Use idempotent ensure actions for required start state and independently assert their postconditions.",
|
|
54
|
+
"Actions translate stable UI, CDP, or controller operations. Recipes compose them. Product code owns business rules."
|
|
55
|
+
],
|
|
56
|
+
"commands": []
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"id": "author",
|
|
60
|
+
"title": "Build and prove one node at a time",
|
|
61
|
+
"instruction": "Probe each unfamiliar action with call or a tiny action-to-end recipe. Use read-only CDP inspection only when declared actions cannot reveal the needed authoring detail, then consolidate the final proof from manifest-declared actions.",
|
|
62
|
+
"details": [
|
|
63
|
+
"Plan after every structural change and preserve the first failing trace.",
|
|
64
|
+
"A CDP observation can help find the current route or selector; it is not final evidence unless the recipe records an allowed action and assertion for that signal."
|
|
65
|
+
],
|
|
66
|
+
"commands": [
|
|
67
|
+
"mm-harness call app.status --json",
|
|
68
|
+
"mm-harness run ./proof.recipe.json --plan --json"
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"id": "branch",
|
|
73
|
+
"title": "Branch without hiding decisions",
|
|
74
|
+
"instruction": "Use switch for declared parameter choices. For runtime conditions, call an action that returns a finite declared case, then route every case to explicit assertions and a terminal result.",
|
|
75
|
+
"details": [
|
|
76
|
+
"Never template a call ref. Pass only declared child parameters and keep child output scoped to the call node.",
|
|
77
|
+
"Every success path must prove its postcondition. workflow.teardown must remain reachable after main success or failure."
|
|
78
|
+
],
|
|
79
|
+
"commands": []
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"id": "quality",
|
|
83
|
+
"title": "Run the whole proof and judge its quality",
|
|
84
|
+
"instruction": "Run the complete graph once into an explicit artifact directory, then apply the built-in quality bar before assigning coverage or a verdict.",
|
|
85
|
+
"details": [
|
|
86
|
+
"Coverage: every criterion needs an executable path and assertion; manual, untestable, and environment-dependent gaps stay explicit.",
|
|
87
|
+
"Graph: no unconditional pass, generic intent, hidden start state, or opaque node that collapses preparation, action, assertion, evidence, and teardown.",
|
|
88
|
+
"Evidence: inspect the recipe resolution, summary, trace, manifest, logs, and actual visual evidence. A filename or passing node is not visual proof.",
|
|
89
|
+
"Flake risk: wait on observable state instead of sleeping, keep device and runtime identity explicit, and never overwrite a prior run's artifacts.",
|
|
90
|
+
"Mutation: require an independent state assertion, identity-bound receipt, and guaranteed cleanup."
|
|
91
|
+
],
|
|
92
|
+
"commands": [
|
|
93
|
+
"mm-harness run ./proof.recipe.json --artifacts-dir temp/recipe-proof --json",
|
|
94
|
+
"mm-harness last --json",
|
|
95
|
+
"mm-harness recipe-quality build --input recipe-quality-input.json --output recipe-quality.json --json"
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"id": "drift",
|
|
100
|
+
"title": "Repair drift and promote reusable learning",
|
|
101
|
+
"instruction": "When a shared recipe fails, reproduce once and classify product regression, recipe drift, fixture/runtime drift, harness defect, or live dependency before changing anything.",
|
|
102
|
+
"details": [
|
|
103
|
+
"The graph and evidence contract can be deterministic while the product, provider, account, or network outcome is not. Honest external rejection remains a valid result, not a reason to seek a green retry.",
|
|
104
|
+
"For product-version drift, preserve the failed trace, copy the composed recipe into the task, keep working nodes, and repair the smallest owning node against the tested build.",
|
|
105
|
+
"Prove the changed node in isolation, re-plan, then rerun the full task-local recipe and affected callers. Never weaken an assertion or change product code merely to turn stale proof green.",
|
|
106
|
+
"Record the source recipe digest, tested product identity, repair, and fresh evidence. If the defect belongs to reusable harness code or bundled vocabulary, prepare a focused experimental-metamask-harness issue and open it when authorized.",
|
|
107
|
+
"Promote a repair only after it works on the tested version and current main, or declare and enforce its compatibility boundary."
|
|
108
|
+
],
|
|
109
|
+
"commands": []
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
"safety": "Recipe parameters never bypass mutation consent or live-funds gates. Preserve valid live financial rejections exactly; never tune or retry merely to obtain a pass, and always run guaranteed cleanup."
|
|
113
|
+
}
|
package/site/architecture.html
DELETED
|
@@ -1,497 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
-
<title>Architecture — how the pieces fit</title>
|
|
7
|
-
<meta name="description" content="Skills, mm-harness, team recipe libraries, product repos: what lives where, the three workflows, and the mistakes newcomers make.">
|
|
8
|
-
<link rel="icon" href="assets/metamask-fox.svg" type="image/svg+xml">
|
|
9
|
-
<link rel="stylesheet" href="assets/style.css?v=4">
|
|
10
|
-
</head>
|
|
11
|
-
<body data-progress-page="architecture">
|
|
12
|
-
<a class="skip" href="#stack">Skip to the stack map</a>
|
|
13
|
-
|
|
14
|
-
<header class="topbar">
|
|
15
|
-
<div class="wrap topbar-inner">
|
|
16
|
-
<a class="brand" href="index.html">
|
|
17
|
-
<img class="brand-mark" src="assets/metamask-fox.svg" alt="" width="22" height="22">
|
|
18
|
-
<span class="brand-name">recipes</span>
|
|
19
|
-
</a>
|
|
20
|
-
<nav class="nav" aria-label="Main">
|
|
21
|
-
<a class="nav-cta" href="index.html#prompt">Quick start</a>
|
|
22
|
-
<a href="how-it-works.html">How it works</a>
|
|
23
|
-
<a href="perps.html">Team / Perps</a>
|
|
24
|
-
<a href="cheatsheet.html">Cheatsheet</a>
|
|
25
|
-
<a href="architecture.html" aria-current="page">Architecture</a>
|
|
26
|
-
<a href="tutorials/index.html">Tutorials</a>
|
|
27
|
-
</nav>
|
|
28
|
-
</div>
|
|
29
|
-
</header>
|
|
30
|
-
|
|
31
|
-
<main>
|
|
32
|
-
<section class="wrap hero" style="padding-bottom:1rem">
|
|
33
|
-
<span class="eyebrow">The stack behind a recipe</span>
|
|
34
|
-
<h1>How the pieces fit together</h1>
|
|
35
|
-
<p class="lede">
|
|
36
|
-
The recipe is the unit of trust; the rest of the stack runs it. Four moving parts, two of which
|
|
37
|
-
people routinely confuse. What each layer is, where it lives, which workflow you are in, and the
|
|
38
|
-
mistakes that cost newcomers their first afternoon.
|
|
39
|
-
</p>
|
|
40
|
-
</section>
|
|
41
|
-
|
|
42
|
-
<section class="wrap">
|
|
43
|
-
<h2 id="model">The one-paragraph model</h2>
|
|
44
|
-
<div class="doctrine">
|
|
45
|
-
<p>
|
|
46
|
-
<span class="k">A recipe proves a task with actions.</span> Recipes are JSON graphs of typed
|
|
47
|
-
actions; <code>mm-harness</code> executes them against a real app and produces an evidence bundle
|
|
48
|
-
a reviewer can trust. <strong>Skills</strong> teach an agent a workflow — author a recipe, review
|
|
49
|
-
a PR, validate a release — and are the layer you work through; they call the harness, which runs
|
|
50
|
-
the recipe. <strong>Recipe libraries</strong> hold each team's recipes and domain actions.
|
|
51
|
-
Compose in that order, against the product repo under test.
|
|
52
|
-
</p>
|
|
53
|
-
</div>
|
|
54
|
-
</section>
|
|
55
|
-
|
|
56
|
-
<section class="wrap">
|
|
57
|
-
<h2 id="stack">The layers</h2>
|
|
58
|
-
<p>Click a layer to see what it is responsible for and when you touch it.</p>
|
|
59
|
-
|
|
60
|
-
<div class="stack">
|
|
61
|
-
<button type="button" class="layer" aria-expanded="false" aria-controls="l-skills">
|
|
62
|
-
<span class="layer-n">1</span>
|
|
63
|
-
<span class="layer-name">Skills</span>
|
|
64
|
-
<span class="layer-sub">the workflow an agent follows</span>
|
|
65
|
-
</button>
|
|
66
|
-
<div class="layer-detail" id="l-skills" hidden>
|
|
67
|
-
<p>
|
|
68
|
-
A packaged workflow — author a recipe from a criterion, review a pull request, validate a
|
|
69
|
-
release — turning "figure it out" into a procedure with gates you can steer.
|
|
70
|
-
</p>
|
|
71
|
-
<p>
|
|
72
|
-
Skills come from the public <code>MetaMask/skills</code> repo plus the internal
|
|
73
|
-
<code>Consensys/skills</code> overlay, which needs access to that org; private skills override
|
|
74
|
-
public ones on a name collision. Clone each, point <code>METAMASK_SKILLS_DIR</code> and
|
|
75
|
-
<code>CONSENSYS_SKILLS_DIR</code> at them, then install per checkout with
|
|
76
|
-
<code>yarn skills</code>. <strong>You do not need skills to run a recipe</strong>, only to have
|
|
77
|
-
an agent follow a proven workflow instead of improvising one.
|
|
78
|
-
<a href="tutorials/v3.html">V3 walks the install.</a>
|
|
79
|
-
</p>
|
|
80
|
-
</div>
|
|
81
|
-
|
|
82
|
-
<div class="arrow" aria-hidden="true">↓</div>
|
|
83
|
-
|
|
84
|
-
<button type="button" class="layer" aria-expanded="false" aria-controls="l-harness">
|
|
85
|
-
<span class="layer-n">2</span>
|
|
86
|
-
<span class="layer-name">mm-harness</span>
|
|
87
|
-
<span class="layer-sub">execution and evidence</span>
|
|
88
|
-
</button>
|
|
89
|
-
<div class="layer-detail" id="l-harness" hidden>
|
|
90
|
-
<p>
|
|
91
|
-
The CLI: launches the app, exposes the action vocabulary, executes recipe graphs against a real
|
|
92
|
-
build, writes the evidence. The only layer everyone needs, and the only one installed globally:
|
|
93
|
-
</p>
|
|
94
|
-
<div class="cmd"><pre><code><span class="p">$ </span>npm i -g @deeeed/metamask-harness@latest</code></pre></div>
|
|
95
|
-
<p style="margin-bottom:0">
|
|
96
|
-
It owns MetaMask runtime control and the domain capabilities; the generic graph engine and the
|
|
97
|
-
evidence schemas underneath it are separate packages it depends on.
|
|
98
|
-
</p>
|
|
99
|
-
</div>
|
|
100
|
-
|
|
101
|
-
<div class="arrow" aria-hidden="true">↓</div>
|
|
102
|
-
|
|
103
|
-
<button type="button" class="layer" aria-expanded="false" aria-controls="l-libs">
|
|
104
|
-
<span class="layer-n">3</span>
|
|
105
|
-
<span class="layer-name">Team recipe libraries</span>
|
|
106
|
-
<span class="layer-sub">your team's recipes and domain actions</span>
|
|
107
|
-
</button>
|
|
108
|
-
<div class="layer-detail" id="l-libs" hidden>
|
|
109
|
-
<p>
|
|
110
|
-
A team-owned repo of reusable recipes plus the domain actions they need. The harness ships a
|
|
111
|
-
bundled library so a fresh install can prove something immediately; your team's library is where
|
|
112
|
-
the recipes that matter to your work live.
|
|
113
|
-
</p>
|
|
114
|
-
<p>Libraries must be declared, or the harness only sees the bundled set:</p>
|
|
115
|
-
<div class="cmd"><pre><code><span class="p">$ </span>export RECIPE_LIBRARY_PATH="perps=$HOME/dev/my-recipe-library"
|
|
116
|
-
<span class="p">$ </span>mm-harness run <recipe> --library perps=$HOME/dev/my-recipe-library</code></pre></div>
|
|
117
|
-
<p style="margin-bottom:0">
|
|
118
|
-
Each library carries its own setup notes — read those before running anything domain-specific.
|
|
119
|
-
</p>
|
|
120
|
-
</div>
|
|
121
|
-
|
|
122
|
-
<div class="arrow" aria-hidden="true">↓</div>
|
|
123
|
-
|
|
124
|
-
<button type="button" class="layer" aria-expanded="false" aria-controls="l-product">
|
|
125
|
-
<span class="layer-n">4</span>
|
|
126
|
-
<span class="layer-name">Product repos</span>
|
|
127
|
-
<span class="layer-sub">the thing under test</span>
|
|
128
|
-
</button>
|
|
129
|
-
<div class="layer-detail" id="l-product" hidden>
|
|
130
|
-
<p>
|
|
131
|
-
<code>metamask-extension</code>, <code>metamask-mobile</code>, and <code>core</code>. Recipes
|
|
132
|
-
execute against a real build, never a mock. Run <code>mm-harness</code> from inside the checkout
|
|
133
|
-
and it detects the product, ports, and runtime paths.
|
|
134
|
-
</p>
|
|
135
|
-
<p style="margin-bottom:0">
|
|
136
|
-
They differ, and the harness says so rather than pretending otherwise: Core is headless with
|
|
137
|
-
nothing to launch and no UI actions; Extension and iOS can record full-run video; Android
|
|
138
|
-
replay video is not implemented yet, so use screenshot evidence there.
|
|
139
|
-
</p>
|
|
140
|
-
</div>
|
|
141
|
-
</div>
|
|
142
|
-
</section>
|
|
143
|
-
|
|
144
|
-
<section class="wrap">
|
|
145
|
-
<h2 id="spec">The spec underneath</h2>
|
|
146
|
-
<p>
|
|
147
|
-
<code>mm-harness</code> implements <strong>farmslot</strong>, a versioned specification for agentic
|
|
148
|
-
proof work. The CLI is one implementation of it, not the thing itself.
|
|
149
|
-
</p>
|
|
150
|
-
|
|
151
|
-
<div class="stack">
|
|
152
|
-
<div class="layer layer-static">
|
|
153
|
-
<span class="layer-n">1</span>
|
|
154
|
-
<span class="layer-name">The specification</span>
|
|
155
|
-
<span class="layer-sub">recipes, action manifests, observations and traces, evidence, handoff</span>
|
|
156
|
-
</div>
|
|
157
|
-
<div class="arrow" aria-hidden="true">↓</div>
|
|
158
|
-
<div class="layer layer-static">
|
|
159
|
-
<span class="layer-n">2</span>
|
|
160
|
-
<span class="layer-name">mm-harness implements it</span>
|
|
161
|
-
<span class="layer-sub">for MetaMask products</span>
|
|
162
|
-
</div>
|
|
163
|
-
<div class="arrow" aria-hidden="true">↓</div>
|
|
164
|
-
<div class="layer layer-static">
|
|
165
|
-
<span class="layer-n">3</span>
|
|
166
|
-
<span class="layer-name">Skills drive it</span>
|
|
167
|
-
<span class="layer-sub">the workflows an agent follows</span>
|
|
168
|
-
</div>
|
|
169
|
-
</div>
|
|
170
|
-
|
|
171
|
-
<p>Schemas are published and versioned. Every recipe carries the URL it validates against:</p>
|
|
172
|
-
<div class="out">"$schema": <a href="https://farmslot.io/schemas/recipe-v1.schema.json">"https://farmslot.io/schemas/recipe-v1.schema.json"</a></div>
|
|
173
|
-
<p>
|
|
174
|
-
Action manifests carry <code>action-manifest-v1</code>; evidence records its own
|
|
175
|
-
<code>schemaVersion</code> and <code>runner_protocol_version</code>. Versioning is what keeps a
|
|
176
|
-
bundle readable by tooling written after it was produced.
|
|
177
|
-
</p>
|
|
178
|
-
|
|
179
|
-
<h3>Why the spec is the scaling mechanism</h3>
|
|
180
|
-
<p>
|
|
181
|
-
The recipe you run from the CLI is the same artifact a control plane dispatches to a worker,
|
|
182
|
-
monitors, and gates — dispatch, worker, self-review, human gate, publication, each step speaking
|
|
183
|
-
these contracts. Evidence returns in the same shape either way, so a fleet result is reviewable by
|
|
184
|
-
whoever wrote the recipe. Parity is structural: one spec, both sides.
|
|
185
|
-
</p>
|
|
186
|
-
<p>
|
|
187
|
-
That is what makes the trust layer scale. A proof written once becomes a permanent guard: it is
|
|
188
|
-
replayed by whoever changes that code next, it stays readable as evidence no matter who or what ran
|
|
189
|
-
it, and the bug it was written for cannot quietly return. Review does not get weaker as volume
|
|
190
|
-
grows.
|
|
191
|
-
</p>
|
|
192
|
-
<p>The seam shows in the CLI's own help — the flags a control plane supplies:</p>
|
|
193
|
-
<div class="out">managed trust boundary (not needed for normal runs; Farmslot supplies it):
|
|
194
|
-
--source-trust, --source-kind, --source-name, --source-digest,
|
|
195
|
-
<span class="hint">--approve-plan</span> (binds approval to the exact reviewed plan)</div>
|
|
196
|
-
<p>Approve a plan and only that plan runs — which is what keeps the gate a gate.</p>
|
|
197
|
-
|
|
198
|
-
<div class="note">
|
|
199
|
-
<span class="note-title">What you actually need</span>
|
|
200
|
-
<p>
|
|
201
|
-
The farmslot control plane is <strong>experimental and sole-maintained</strong>. Nothing this site
|
|
202
|
-
teaches requires it — the harness, recipes, and skills are complete on their own, and the CLI says
|
|
203
|
-
as much: those flags are "not needed for normal runs". The specification is what you adopt; the
|
|
204
|
-
control plane is one consumer of it.
|
|
205
|
-
</p>
|
|
206
|
-
</div>
|
|
207
|
-
</section>
|
|
208
|
-
|
|
209
|
-
<section class="wrap">
|
|
210
|
-
<h2 id="loop">The improvement loop</h2>
|
|
211
|
-
<p>
|
|
212
|
-
A recipe guards the regression it was written for. This is how a team catches the ones nobody has
|
|
213
|
-
written down yet — each run leaving the next one better informed.
|
|
214
|
-
</p>
|
|
215
|
-
|
|
216
|
-
<div class="doctrine">
|
|
217
|
-
<p>
|
|
218
|
-
<span class="k">Learnings are written, not collected.</span> The checklist an agent follows carries
|
|
219
|
-
a step instructing it to write what it learned as human-readable markdown, bundled beside the
|
|
220
|
-
execution plan and the evidence. A run ends with prose — what was hard, what surprised it, what
|
|
221
|
-
the next run should know — sitting next to the proof. A deliverable, not telemetry: nobody mines
|
|
222
|
-
traces for insight; the agent is asked and answers.
|
|
223
|
-
</p>
|
|
224
|
-
</div>
|
|
225
|
-
|
|
226
|
-
<h3>The chain</h3>
|
|
227
|
-
<div class="stack">
|
|
228
|
-
<div class="layer layer-static">
|
|
229
|
-
<span class="layer-n">1</span>
|
|
230
|
-
<span class="layer-name">A checklist step asks for learnings</span>
|
|
231
|
-
<span class="layer-sub">part of the execution plan</span>
|
|
232
|
-
</div>
|
|
233
|
-
<div class="arrow" aria-hidden="true">↓</div>
|
|
234
|
-
<div class="layer layer-static">
|
|
235
|
-
<span class="layer-n">2</span>
|
|
236
|
-
<span class="layer-name">The run writes learnings.md beside its evidence</span>
|
|
237
|
-
<span class="layer-sub">prose, in the run artifacts</span>
|
|
238
|
-
</div>
|
|
239
|
-
<div class="arrow" aria-hidden="true">↓</div>
|
|
240
|
-
<div class="layer layer-static">
|
|
241
|
-
<span class="layer-n">3</span>
|
|
242
|
-
<span class="layer-name">Curation promotes the durable ones</span>
|
|
243
|
-
<span class="layer-sub">a human decides what generalises</span>
|
|
244
|
-
</div>
|
|
245
|
-
<div class="arrow" aria-hidden="true">↓</div>
|
|
246
|
-
<div class="layer layer-static">
|
|
247
|
-
<span class="layer-n">4</span>
|
|
248
|
-
<span class="layer-name">They become team knowledge</span>
|
|
249
|
-
<span class="layer-sub">in the library, beside the recipes</span>
|
|
250
|
-
</div>
|
|
251
|
-
<div class="arrow" aria-hidden="true">↓</div>
|
|
252
|
-
<div class="layer layer-static">
|
|
253
|
-
<span class="layer-n">5</span>
|
|
254
|
-
<span class="layer-name">The next run loads it before acting</span>
|
|
255
|
-
<span class="layer-sub">discovery, not recall</span>
|
|
256
|
-
</div>
|
|
257
|
-
</div>
|
|
258
|
-
|
|
259
|
-
<p>
|
|
260
|
-
Step 3 is a person on purpose: a run produces plenty of true-but-local detail, and promoting all of
|
|
261
|
-
it buries what matters — the same judgement as deciding what belongs in a code comment.
|
|
262
|
-
</p>
|
|
263
|
-
|
|
264
|
-
<div class="note blue">
|
|
265
|
-
<span class="note-title">Where learnings collect</span>
|
|
266
|
-
<p>
|
|
267
|
-
Scrubbed packages from approved runs land in
|
|
268
|
-
<code>MetaMask/experimental-distributed-learnings</code>, a private append-only inbox — the same
|
|
269
|
-
repository as <code>experimental-agentic-learnings</code>, which was its earlier name and still
|
|
270
|
-
redirects. Capture records the observation, review later decides whether it warrants a proposal,
|
|
271
|
-
and proposals go to whichever repo owns the affected layer. Sharing is opt-in: without a local
|
|
272
|
-
<code>learning.config.json</code> a run stages locally and publishes nothing. Packages are
|
|
273
|
-
date-partitioned and the indexes are scaffolded, but only one day of runs has landed so far —
|
|
274
|
-
collection is beginning, so treat it as the destination rather than a corpus to read today.
|
|
275
|
-
</p>
|
|
276
|
-
</div>
|
|
277
|
-
|
|
278
|
-
<h3>What works today</h3>
|
|
279
|
-
|
|
280
|
-
<div class="table-scroll">
|
|
281
|
-
<table>
|
|
282
|
-
<thead><tr><th>Mechanism</th><th>Its part in the loop</th></tr></thead>
|
|
283
|
-
<tbody>
|
|
284
|
-
<tr>
|
|
285
|
-
<td>The evidence bundle</td>
|
|
286
|
-
<td>Produces the raw material. <code>diagnostics.json</code> in particular is where side findings land — application warnings and errors captured during the run, kept out of the verdict precisely so they survive as observations rather than being flattened into pass or fail.</td>
|
|
287
|
-
</tr>
|
|
288
|
-
<tr>
|
|
289
|
-
<td>Team recipe libraries</td>
|
|
290
|
-
<td>The place shared understanding accumulates. A recipe that encodes "get to a clean market first" <em>is</em> a piece of team knowledge, already reusable by everyone who declares the library.</td>
|
|
291
|
-
</tr>
|
|
292
|
-
<tr>
|
|
293
|
-
<td><code>mm-harness recipe-quality</code></td>
|
|
294
|
-
<td>Turns a review's verdicts into a quality artifact, so an assessment of a proof is itself a durable record rather than a comment that scrolls away.</td>
|
|
295
|
-
</tr>
|
|
296
|
-
<tr>
|
|
297
|
-
<td><code>mm-harness execution-template</code></td>
|
|
298
|
-
<td>Discovers, validates, and materialises shared agent checklists — a curated procedure written once and picked up by everyone, which is the loop working at the level of process.</td>
|
|
299
|
-
</tr>
|
|
300
|
-
<tr>
|
|
301
|
-
<td>Skills</td>
|
|
302
|
-
<td>The same idea for workflows. A skill is a procedure someone got right, packaged so nobody has to rediscover it.</td>
|
|
303
|
-
</tr>
|
|
304
|
-
</tbody>
|
|
305
|
-
</table>
|
|
306
|
-
</div>
|
|
307
|
-
|
|
308
|
-
<h3>Where this is heading</h3>
|
|
309
|
-
<p>
|
|
310
|
-
The gap is the middle of the loop: recipes and actions have a home in a team library; the sharper
|
|
311
|
-
things a run teaches you do not yet. Worth capturing:
|
|
312
|
-
</p>
|
|
313
|
-
|
|
314
|
-
<ul>
|
|
315
|
-
<li><strong>Gotchas</strong> — the non-obvious precondition that cost someone an afternoon, written down once.</li>
|
|
316
|
-
<li><strong>Screen maps</strong> — how a surface is actually reached and identified in the current build, so the next author is not re-deriving it.</li>
|
|
317
|
-
<li><strong>Flakes</strong> — the step known to be intermittent, with what is known about when and why, so an author can distinguish a real failure from a familiar one.</li>
|
|
318
|
-
</ul>
|
|
319
|
-
|
|
320
|
-
<p>
|
|
321
|
-
The intended shape is the one proven everywhere else here: <strong>discovery rather than
|
|
322
|
-
recall</strong>. Just as you ask the checkout what actions exist, you would ask what is already
|
|
323
|
-
known about a surface before authoring against it — a <code>knowledge</code> surface alongside
|
|
324
|
-
<code>actions</code> and <code>run --list</code>, resolving the way libraries already do, layered
|
|
325
|
-
most-specific-wins: yours, your team's, the workflow's, then defaults shipping with the harness
|
|
326
|
-
release so tool facts cannot drift out of date in a document nobody re-reads.
|
|
327
|
-
</p>
|
|
328
|
-
|
|
329
|
-
<p>
|
|
330
|
-
Entries stay small and curated: a short index of what exists and when to load it, topic files under
|
|
331
|
-
a size cap, each entry carrying a stable id and the same symptom → cause → what to do shape the
|
|
332
|
-
error messages use. Promotion happens through an ordinary reviewed pull request, so a human is in
|
|
333
|
-
the loop by construction.
|
|
334
|
-
</p>
|
|
335
|
-
|
|
336
|
-
<div class="note">
|
|
337
|
-
<span class="note-title">Being straight about status</span>
|
|
338
|
-
<p style="margin-bottom:0">
|
|
339
|
-
<strong>Not shipping yet.</strong> There is no <code>knowledge</code> command today, which is why
|
|
340
|
-
you will not find one in a copyable block on this page. Meanwhile the useful part is unblocked:
|
|
341
|
-
keep what your runs teach you in the library repo beside the recipes. Tooling makes it
|
|
342
|
-
discoverable later; writing it down is what makes it exist.
|
|
343
|
-
</p>
|
|
344
|
-
</div>
|
|
345
|
-
|
|
346
|
-
<div class="doctrine">
|
|
347
|
-
<p>
|
|
348
|
-
<span class="k">The skills teach the workflow; the knowledge teaches the product.</span> Runs
|
|
349
|
-
produce learnings, curation promotes them, discovery serves them to every run after.
|
|
350
|
-
</p>
|
|
351
|
-
</div>
|
|
352
|
-
</section>
|
|
353
|
-
|
|
354
|
-
<section class="wrap">
|
|
355
|
-
<h2 id="libraries">Where everything lives</h2>
|
|
356
|
-
<div class="table-scroll">
|
|
357
|
-
<table>
|
|
358
|
-
<thead><tr><th>What</th><th>Is</th><th>You need it when</th></tr></thead>
|
|
359
|
-
<tbody>
|
|
360
|
-
<tr>
|
|
361
|
-
<td><code>@deeeed/metamask-harness</code><br><span style="color:var(--text-faint);font-size:.85rem">the <code>mm-harness</code> CLI, on npm</span></td>
|
|
362
|
-
<td>The execution engine and evidence producer: <code>doctor</code>, <code>launch</code>, <code>actions</code>, <code>call</code>, <code>run</code>, <code>last</code>.</td>
|
|
363
|
-
<td><strong>Always.</strong> Install and update with <code>npm i -g @deeeed/metamask-harness@latest</code>.</td>
|
|
364
|
-
</tr>
|
|
365
|
-
<tr>
|
|
366
|
-
<td><code>Consensys/skills</code><br><span style="color:var(--text-faint);font-size:.85rem">internal repo</span></td>
|
|
367
|
-
<td>Agentic skills — recipe authoring, PR QA review, release validation. Installed into a checkout via that repo's tooling.</td>
|
|
368
|
-
<td>When you want an agent to follow a proven workflow instead of improvising one.</td>
|
|
369
|
-
</tr>
|
|
370
|
-
<tr>
|
|
371
|
-
<td>Team recipe libraries<br><span style="color:var(--text-faint);font-size:.85rem">e.g. the perps and money-movement libraries</span></td>
|
|
372
|
-
<td>Team-owned recipes, domain actions, and domain knowledge. Declared with <code>RECIPE_LIBRARY_PATH</code> or <code>--library</code>.</td>
|
|
373
|
-
<td>When running or authoring anything domain-specific. <a href="tutorials/v3.html#steps">V3 walks the setup</a> with the perps library as the worked example.</td>
|
|
374
|
-
</tr>
|
|
375
|
-
<tr>
|
|
376
|
-
<td>Product repos<br><span style="color:var(--text-faint);font-size:.85rem">extension · mobile · core</span></td>
|
|
377
|
-
<td>The thing under test. The harness runs against a real checkout and a real build.</td>
|
|
378
|
-
<td><strong>Always</strong> — there is nothing to prove without one.</td>
|
|
379
|
-
</tr>
|
|
380
|
-
</tbody>
|
|
381
|
-
</table>
|
|
382
|
-
</div>
|
|
383
|
-
</section>
|
|
384
|
-
|
|
385
|
-
<section class="wrap">
|
|
386
|
-
<h2 id="workflows">The three workflows — pick one, do not blend them</h2>
|
|
387
|
-
<p>Most confusion here is someone doing two at once. They need different setup and fail differently.</p>
|
|
388
|
-
|
|
389
|
-
<div class="grid grid-3">
|
|
390
|
-
<div class="card">
|
|
391
|
-
<h3>1 · Run an existing recipe</h3>
|
|
392
|
-
<p style="color:var(--text-dim);font-size:.92rem">No skills needed. This is the majority of daily use.</p>
|
|
393
|
-
<div class="cmd"><pre><code><span class="p">$ </span>mm-harness update
|
|
394
|
-
<span class="p">$ </span>cd <product checkout>
|
|
395
|
-
<span class="p">$ </span>export RECIPE_LIBRARY_PATH=<name=path>
|
|
396
|
-
<span class="p">$ </span>mm-harness doctor
|
|
397
|
-
<span class="p">$ </span>mm-harness launch
|
|
398
|
-
<span class="p">$ </span>mm-harness run <recipe> \
|
|
399
|
-
--artifacts-dir ./out</code></pre></div>
|
|
400
|
-
<p style="margin-bottom:0;font-size:.92rem">Evidence lands in the artifacts dir. That is the whole workflow.</p>
|
|
401
|
-
</div>
|
|
402
|
-
|
|
403
|
-
<div class="card">
|
|
404
|
-
<h3>2 · Author a recipe</h3>
|
|
405
|
-
<p style="color:var(--text-dim);font-size:.92rem">For a specific acceptance criterion. Skills earn their keep here.</p>
|
|
406
|
-
<p style="font-size:.92rem">
|
|
407
|
-
Install the recipe-authoring skill. It discovers the vocabulary with
|
|
408
|
-
<code>mm-harness actions</code> — <strong>the discovered list is law, action names are never
|
|
409
|
-
invented</strong> — composes the graph, validates it with <code>run --plan</code>, then runs it
|
|
410
|
-
for real.
|
|
411
|
-
</p>
|
|
412
|
-
<p style="margin-bottom:0;font-size:.92rem">
|
|
413
|
-
Expect one honest failure-and-fix loop. That is the error messages doing their job.
|
|
414
|
-
</p>
|
|
415
|
-
</div>
|
|
416
|
-
|
|
417
|
-
<div class="card">
|
|
418
|
-
<h3>3 · Review a PR / validate a release</h3>
|
|
419
|
-
<p style="color:var(--text-dim);font-size:.92rem">Requires the QA skills.</p>
|
|
420
|
-
<p style="font-size:.92rem">
|
|
421
|
-
Give the skill one PR URL. It extracts the acceptance criteria verbatim — missing ones become a
|
|
422
|
-
hygiene finding, never an invented criterion — waits for you to confirm or edit the table, runs
|
|
423
|
-
the proof on a real device, and produces a per-criterion verdict with evidence paths.
|
|
424
|
-
</p>
|
|
425
|
-
<p style="margin-bottom:0;font-size:.92rem">
|
|
426
|
-
A criterion the surface genuinely cannot prove is reported as needing a human, not quietly
|
|
427
|
-
passed.
|
|
428
|
-
</p>
|
|
429
|
-
</div>
|
|
430
|
-
</div>
|
|
431
|
-
|
|
432
|
-
<div class="note blue">
|
|
433
|
-
<span class="note-title">Why "do not blend them" is a real instruction</span>
|
|
434
|
-
<p>
|
|
435
|
-
Running a recipe needs no skills; reviewing a PR does. Install everything and ask an agent to
|
|
436
|
-
"just handle it" and you get an agent choosing between procedures with no basis to pick. Name the
|
|
437
|
-
workflow you are in.
|
|
438
|
-
</p>
|
|
439
|
-
</div>
|
|
440
|
-
</section>
|
|
441
|
-
|
|
442
|
-
<section class="wrap">
|
|
443
|
-
<h2 id="mistakes">The five mistakes every newcomer makes</h2>
|
|
444
|
-
|
|
445
|
-
<ol style="padding-left:1.2rem">
|
|
446
|
-
<li style="margin-bottom:1rem">
|
|
447
|
-
<strong>Asking the agent to figure it all out from one sentence.</strong> The skills <em>are</em>
|
|
448
|
-
the figured-out part. Name the workflow you want; do not make the agent guess which of the three
|
|
449
|
-
you are in.
|
|
450
|
-
</li>
|
|
451
|
-
<li style="margin-bottom:1rem">
|
|
452
|
-
<strong>A stale harness.</strong> This one costs the most afternoons. The CLI ships often and
|
|
453
|
-
recipes assume current behaviour. Run <code>mm-harness update</code> before you debug anything
|
|
454
|
-
that "used to work".
|
|
455
|
-
</li>
|
|
456
|
-
<li style="margin-bottom:1rem">
|
|
457
|
-
<strong>Not declaring the library.</strong> Without <code>RECIPE_LIBRARY_PATH</code> (or
|
|
458
|
-
<code>--library</code>) the harness only sees bundled recipes — so your team's recipe appears not
|
|
459
|
-
to exist, and the error is telling the literal truth.
|
|
460
|
-
</li>
|
|
461
|
-
<li style="margin-bottom:1rem">
|
|
462
|
-
<strong>Skipping <code>doctor</code>.</strong> It tells you exactly what is missing and the exact
|
|
463
|
-
command that fixes it. Every error in this stack carries a <code>Next:</code> action. Read them —
|
|
464
|
-
that is the whole design.
|
|
465
|
-
</li>
|
|
466
|
-
<li>
|
|
467
|
-
<strong>Blending the workflows.</strong> See above. Mixing "run a recipe" with "review a PR"
|
|
468
|
-
confuses the agent and produces work you then have to check by hand.
|
|
469
|
-
</li>
|
|
470
|
-
</ol>
|
|
471
|
-
|
|
472
|
-
<hr class="sep">
|
|
473
|
-
<h2>Which repo is which</h2>
|
|
474
|
-
<p>
|
|
475
|
-
The layers above are the design. The <a href="ecosystem.html">Ecosystem map</a> is the concrete
|
|
476
|
-
version: the six repositories and packages behind a run, each with its URL, and which way the
|
|
477
|
-
dependencies point.
|
|
478
|
-
</p>
|
|
479
|
-
|
|
480
|
-
<div class="btn-row">
|
|
481
|
-
<a class="btn btn-primary" href="ecosystem.html">See the repo map →</a>
|
|
482
|
-
<a class="btn btn-ghost" href="how-it-works.html#steps">Do the walkthrough</a>
|
|
483
|
-
<a class="btn btn-ghost" href="reviewers.html">Read an evidence bundle</a>
|
|
484
|
-
</div>
|
|
485
|
-
</section>
|
|
486
|
-
</main>
|
|
487
|
-
|
|
488
|
-
<footer class="footer">
|
|
489
|
-
<div class="wrap">
|
|
490
|
-
<p>Internal getting-started guide for proving MetaMask changes with recipes. Not official MetaMask product documentation.</p>
|
|
491
|
-
<p>Sample output moves between releases; trust your terminal over this page.</p>
|
|
492
|
-
</div>
|
|
493
|
-
</footer>
|
|
494
|
-
|
|
495
|
-
<script type="module" src="assets/progress.mjs?v=4"></script>
|
|
496
|
-
</body>
|
|
497
|
-
</html>
|