mimetic-cli 0.1.2 → 0.1.4
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/AGENTS.md +66 -0
- package/CONTRIBUTING.md +39 -0
- package/README.md +4 -1
- package/SECURITY.md +34 -0
- package/dist/core/git-state.d.ts +31 -0
- package/dist/core/git-state.js +142 -0
- package/dist/core/git-state.js.map +1 -0
- package/dist/core/index.d.ts +4 -0
- package/dist/core/index.js +3 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/run-primitives.d.ts +66 -0
- package/dist/core/run-primitives.js +120 -0
- package/dist/core/run-primitives.js.map +1 -0
- package/dist/observer-assets.js +1663 -2180
- package/dist/observer-assets.js.map +1 -1
- package/dist/observer-data.d.ts +1 -1
- package/dist/observer-data.js +5 -1
- package/dist/observer-data.js.map +1 -1
- package/dist/observer.js +8 -61
- package/dist/observer.js.map +1 -1
- package/dist/oss-meta-lab.d.ts +50 -0
- package/dist/oss-meta-lab.js +454 -27
- package/dist/oss-meta-lab.js.map +1 -1
- package/dist/program.d.ts +6 -0
- package/dist/program.js +75 -8
- package/dist/program.js.map +1 -1
- package/dist/run.d.ts +19 -6
- package/dist/run.js +1263 -9
- package/dist/run.js.map +1 -1
- package/docs/architecture/github-feedback-loop.md +189 -0
- package/docs/architecture/local-codex-tui-actor.md +210 -0
- package/docs/architecture/observer.md +109 -0
- package/docs/architecture/oss-lab-poc.md +170 -0
- package/docs/architecture/project-layout.md +132 -0
- package/docs/assets/mimetic-oss-lab-observer.png +0 -0
- package/docs/contracts/adapter-fixtures.md +80 -0
- package/docs/contracts/core.md +71 -0
- package/docs/contracts/feedback.md +131 -0
- package/docs/contracts/policy.md +273 -0
- package/docs/contracts/run-bundle.md +110 -0
- package/docs/contracts/schemas.md +511 -0
- package/docs/goals/current.md +163 -0
- package/docs/principles/self-driving-harness.md +129 -0
- package/docs/product/open-source-install-experience.md +138 -0
- package/docs/ramp/README.md +167 -0
- package/docs/release/open-source-readiness.md +171 -0
- package/docs/release/public-readiness-standard.md +205 -0
- package/docs/roadmap/world-class-open-source-v0.md +286 -0
- package/package.json +14 -2
- package/skills/mimetic-cli/SKILL.md +1 -1
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Observer Architecture
|
|
2
|
+
|
|
3
|
+
Date: 2026-06-01
|
|
4
|
+
|
|
5
|
+
Status: implemented for synthetic stream contracts and local `codex-exec`
|
|
6
|
+
active-run Observer snapshots; broader live actor adapters next.
|
|
7
|
+
|
|
8
|
+
## Decision
|
|
9
|
+
|
|
10
|
+
The Observer is a mission-control surface over durable run artifacts, not a
|
|
11
|
+
static report page.
|
|
12
|
+
|
|
13
|
+
Every run writes immutable local evidence under `.mimetic/runs/<run-id>/`:
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
.mimetic/runs/<run-id>/
|
|
17
|
+
run.json
|
|
18
|
+
review.json
|
|
19
|
+
review.md
|
|
20
|
+
events.ndjson
|
|
21
|
+
observer/
|
|
22
|
+
index.html
|
|
23
|
+
observer-data.json
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
`run.json` remains the source bundle. `observer/observer-data.json` is the
|
|
27
|
+
normalized view model consumed by the Observer. `events.ndjson` is the appendable
|
|
28
|
+
event stream contract that live adapters will update while a run is active.
|
|
29
|
+
|
|
30
|
+
## Stream Model
|
|
31
|
+
|
|
32
|
+
Streams are the central abstraction. A stream is one watchable persona lane,
|
|
33
|
+
regardless of substrate:
|
|
34
|
+
|
|
35
|
+
- `ui`: browser/VNC style UI simulation lane;
|
|
36
|
+
- `browser`: browser-specific lane when the app and actor are separate;
|
|
37
|
+
- `terminal`: CLI persona lane with stdout/stderr evidence;
|
|
38
|
+
- `tui`: PTY/ANSI terminal UI lane;
|
|
39
|
+
- `codex-ui`: Codex-style app-server session lane;
|
|
40
|
+
- `artifact`: artifact-only evidence lane;
|
|
41
|
+
- `summary`: run-level synthesis lane.
|
|
42
|
+
|
|
43
|
+
Each stream points back to a simulation and carries its own transport,
|
|
44
|
+
terminal tail, UI state, artifact links, event timeline, and public-safe
|
|
45
|
+
metadata.
|
|
46
|
+
|
|
47
|
+
## Live Watch
|
|
48
|
+
|
|
49
|
+
`mimetic watch` now:
|
|
50
|
+
|
|
51
|
+
1. creates a fresh four-lane synthetic run bundle;
|
|
52
|
+
2. writes `observer-data.json` and `events.ndjson`;
|
|
53
|
+
3. starts a localhost Observer server;
|
|
54
|
+
4. opens the served Observer URL;
|
|
55
|
+
5. keeps the shell attached until Ctrl-C.
|
|
56
|
+
|
|
57
|
+
The browser polls `observer-data.json` with `no-store` caching. Static
|
|
58
|
+
`file://` opening still works for immutable review, but follow mode is the
|
|
59
|
+
operator path. Agents and CI should use `mimetic watch --json --no-open` for
|
|
60
|
+
the same fresh evidence without browser open or a long-running process.
|
|
61
|
+
|
|
62
|
+
Local `codex-exec` actor runs now publish an initial running `run.json` and
|
|
63
|
+
`observer/observer-data.json` before actor completion, then refresh both after
|
|
64
|
+
sanitized transcripts, traces, and verdict events are available. This gives a
|
|
65
|
+
served Observer a truthful active state to poll while noninteractive local
|
|
66
|
+
actors are still running.
|
|
67
|
+
|
|
68
|
+
## UI Shape
|
|
69
|
+
|
|
70
|
+
The Observer shell has:
|
|
71
|
+
|
|
72
|
+
- top mission-control band with run status and metrics;
|
|
73
|
+
- stream filters for UI, CLI, TUI, and Codex UI lanes;
|
|
74
|
+
- grid mode with one tile per sim stream;
|
|
75
|
+
- focus mode with left stream rail, center stage, and right tabs;
|
|
76
|
+
- terminal/TUI transcript stage;
|
|
77
|
+
- right evidence rail for events, artifacts, and known gaps.
|
|
78
|
+
|
|
79
|
+
## Codex UI Contract
|
|
80
|
+
|
|
81
|
+
`codex-ui` streams are normalized session/event projections. Public artifacts
|
|
82
|
+
must not store raw provider payloads, raw prompts, raw private transcripts,
|
|
83
|
+
private screenshots, PHI, PII, secrets, or upstream data.
|
|
84
|
+
|
|
85
|
+
A host adapter may provide:
|
|
86
|
+
|
|
87
|
+
- session identity;
|
|
88
|
+
- redacted lifecycle/status;
|
|
89
|
+
- event source or snapshot URL;
|
|
90
|
+
- optional embed URL;
|
|
91
|
+
- normalized event timeline;
|
|
92
|
+
- approval metadata;
|
|
93
|
+
- public-safe artifact links.
|
|
94
|
+
|
|
95
|
+
If no embed URL exists, the Observer still renders the Codex-style timeline and
|
|
96
|
+
session contract instead of failing the lane.
|
|
97
|
+
|
|
98
|
+
## Current Gaps
|
|
99
|
+
|
|
100
|
+
This slice implements the Observer substrate, synthetic stream contracts, and
|
|
101
|
+
active-run Observer snapshots for local `codex-exec`. The following are
|
|
102
|
+
intentionally still adapter work:
|
|
103
|
+
|
|
104
|
+
- real Playwright/browser actor execution;
|
|
105
|
+
- E2B or local PTY capture;
|
|
106
|
+
- Codex TUI live follow after workspace trust bootstrap;
|
|
107
|
+
- native Codex app-server session adapter;
|
|
108
|
+
- screenshot and trace galleries;
|
|
109
|
+
- reviewer acceptance gates over real product behavior.
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# OSS Lab POC
|
|
2
|
+
|
|
3
|
+
Date: 2026-06-01
|
|
4
|
+
|
|
5
|
+
Status: implemented as an experimental meta-lab command plus a retained smoke
|
|
6
|
+
harness.
|
|
7
|
+
|
|
8
|
+
## Decision
|
|
9
|
+
|
|
10
|
+
`mimetic lab oss` is the public-OSS meta-simulation loop.
|
|
11
|
+
|
|
12
|
+
The command should feel like `mimetic watch`: it opens the Observer and, for
|
|
13
|
+
human output, keeps the shell attached. Its top-level Observer is an
|
|
14
|
+
Observer-of-Observers: each lane represents a headed E2B desktop that will run
|
|
15
|
+
Codex TUI against a different lightweight public GitHub repository. Inside each
|
|
16
|
+
desktop, Codex should clone the repo, get it into local dev mode where feasible,
|
|
17
|
+
install and initialize Mimetic, author plausible public-safe personas/scenarios,
|
|
18
|
+
run nested Mimetic proof commands, attempt a Codex TUI pass, and leave that
|
|
19
|
+
nested Observer visible in the E2B browser.
|
|
20
|
+
|
|
21
|
+
The previous clone/discard proof loop remains useful, but it is now explicitly
|
|
22
|
+
named `mimetic lab oss-smoke`.
|
|
23
|
+
|
|
24
|
+
## Commands
|
|
25
|
+
|
|
26
|
+
Main operator path:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
mimetic lab oss
|
|
30
|
+
mimetic lab oss --repos developit/mitt,lukeed/clsx,sindresorhus/is-plain-obj,ai/nanoid
|
|
31
|
+
mimetic lab oss --repo developit/mitt --repo lukeed/clsx --count 4
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Agent/CI contract path:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
mimetic lab oss --dry-run --json --no-open
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Disposable clone smoke path:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
mimetic lab oss-smoke
|
|
44
|
+
mimetic lab oss-smoke --limit 1 --keep
|
|
45
|
+
mimetic lab oss --smoke --limit 1 --keep
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Local dogfood shortcuts:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
pnpm mimetic:lab:oss
|
|
52
|
+
pnpm mimetic:lab:oss:ci
|
|
53
|
+
pnpm mimetic:lab:oss:smoke
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Repo Selection
|
|
57
|
+
|
|
58
|
+
The default public targets are intentionally small JavaScript packages:
|
|
59
|
+
|
|
60
|
+
- `developit/mitt`
|
|
61
|
+
- `lukeed/clsx`
|
|
62
|
+
- `sindresorhus/is-plain-obj`
|
|
63
|
+
- `ai/nanoid`
|
|
64
|
+
|
|
65
|
+
`--repos` accepts a comma-separated list. Repeated `--repo` is also supported.
|
|
66
|
+
If `--count` is larger than the repo list, assignments cycle through the repo
|
|
67
|
+
pool. Inputs must be public GitHub `owner/repo` slugs. Arbitrary URLs, local
|
|
68
|
+
paths, tokens, SSH remotes, and private GitHub references are rejected.
|
|
69
|
+
|
|
70
|
+
## Runtime Shape
|
|
71
|
+
|
|
72
|
+
The meta-lab writes ignored local Observer evidence:
|
|
73
|
+
|
|
74
|
+
```text
|
|
75
|
+
.mimetic/
|
|
76
|
+
runs/<oss-meta-run-id>/
|
|
77
|
+
run.json
|
|
78
|
+
review.json
|
|
79
|
+
review.md
|
|
80
|
+
events.ndjson
|
|
81
|
+
observer/
|
|
82
|
+
index.html
|
|
83
|
+
observer-data.json
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Each stream lane records:
|
|
87
|
+
|
|
88
|
+
- assigned repo slug;
|
|
89
|
+
- live E2B desktop stream URL when keys are present;
|
|
90
|
+
- Codex TUI bootstrap prompt;
|
|
91
|
+
- current live-readiness state;
|
|
92
|
+
- public-safe gaps and events.
|
|
93
|
+
|
|
94
|
+
The current implementation launches live E2B desktop streams when
|
|
95
|
+
`E2B_API_KEY` and `OPENAI_API_KEY` are present, embeds those streams into the
|
|
96
|
+
top-level Observer, and marks missing key or launch failures in-lane. It also
|
|
97
|
+
packs the local Mimetic package, uploads it into each sandbox, raises a visible
|
|
98
|
+
bootstrap terminal, clones the assigned public repo, runs nested Mimetic setup
|
|
99
|
+
and proof commands, attempts a Codex TUI pass, and opens the nested Observer in
|
|
100
|
+
the sandbox browser.
|
|
101
|
+
|
|
102
|
+
The live desktop substrate is an optional peer dependency. Install it in the
|
|
103
|
+
project that runs live labs:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
npm i -D @e2b/desktop
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Remaining substrate work: poll remote bootstrap completion and nested Observer
|
|
110
|
+
health back into the top-level bundle instead of leaving completion review to
|
|
111
|
+
the live desktop stream.
|
|
112
|
+
|
|
113
|
+
## Smoke Harness Runtime
|
|
114
|
+
|
|
115
|
+
`mimetic lab oss-smoke` shallow clones lightweight public GitHub repos into
|
|
116
|
+
ignored runtime state, applies Mimetic setup inside each throwaway clone, runs
|
|
117
|
+
the synthetic four-lane proof path, verifies the generated bundle, records
|
|
118
|
+
git-status evidence, writes an ignored report, and removes cloned repos by
|
|
119
|
+
default.
|
|
120
|
+
|
|
121
|
+
```text
|
|
122
|
+
.mimetic/
|
|
123
|
+
lab/oss/<run-id>/
|
|
124
|
+
report.json
|
|
125
|
+
report.md
|
|
126
|
+
tmp/oss-lab/<run-id>/
|
|
127
|
+
repos... # removed by default
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Each cloned repo receives disposable uncommitted changes:
|
|
131
|
+
|
|
132
|
+
- `mimetic/` source starter files;
|
|
133
|
+
- `.mimetic/` runtime state;
|
|
134
|
+
- `.gitignore` updates;
|
|
135
|
+
- `package.json` script updates;
|
|
136
|
+
- synthetic run/Observer evidence under the clone's ignored `.mimetic/`.
|
|
137
|
+
|
|
138
|
+
The clone is removed unless `--keep` is passed. The host report remains under
|
|
139
|
+
ignored `.mimetic/lab/oss/<run-id>/`.
|
|
140
|
+
|
|
141
|
+
## Safety Rules
|
|
142
|
+
|
|
143
|
+
- Public GitHub `owner/repo` slugs only.
|
|
144
|
+
- No credential prompts; smoke clone calls set `GIT_TERMINAL_PROMPT=0`.
|
|
145
|
+
- No commits, pushes, branches, tags, GitHub API mutation, deploys, or issue
|
|
146
|
+
filing.
|
|
147
|
+
- Do not write key values into committed `mimetic/` source.
|
|
148
|
+
- Do not emit PII, PHI, raw private transcripts, private screenshots, secrets,
|
|
149
|
+
keys, or private upstream artifacts.
|
|
150
|
+
|
|
151
|
+
## What This Proves
|
|
152
|
+
|
|
153
|
+
The meta-lab proves the operator control surface and artifact contract for
|
|
154
|
+
watching multiple Codex/E2B OSS setup attempts at once. The live path now proves
|
|
155
|
+
E2B desktop fanout, visible bootstrap terminals, local-package upload, disposable
|
|
156
|
+
public-repo setup, nested Mimetic proof generation, and nested Observer opening.
|
|
157
|
+
It does not yet prove remote completion polling or a general provider-backed
|
|
158
|
+
target-app persona runtime.
|
|
159
|
+
|
|
160
|
+
The smoke harness proves first-run Mimetic package compatibility against
|
|
161
|
+
arbitrary public JavaScript repositories:
|
|
162
|
+
|
|
163
|
+
- setup can patch real package.json files without committing;
|
|
164
|
+
- generated `mimetic/` source can coexist with external repo layout;
|
|
165
|
+
- ignored `.mimetic/` runtime proof can be generated;
|
|
166
|
+
- the Observer can render from those disposable proofs;
|
|
167
|
+
- verification passes before the clone is discarded.
|
|
168
|
+
|
|
169
|
+
Neither path may claim private product behavior proof without live, redacted,
|
|
170
|
+
public-safe evidence.
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# Project Layout Contract
|
|
2
|
+
|
|
3
|
+
Date: 2026-06-01
|
|
4
|
+
|
|
5
|
+
Status: target layout for apps that install `mimetic-cli`.
|
|
6
|
+
|
|
7
|
+
## Decision
|
|
8
|
+
|
|
9
|
+
Use two roots:
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
mimetic/ # committed source of simulation intent
|
|
13
|
+
.mimetic/ # ignored runtime state, evidence, local overlays, and secrets
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Do not gitignore all Mimetic state. Personas, scenarios, policies, adapters,
|
|
17
|
+
coverage maps, and review vocabulary are the harness. They must be versioned,
|
|
18
|
+
reviewed, and reproducible from a clean clone.
|
|
19
|
+
|
|
20
|
+
Do not commit run bundles, raw screenshots, browser traces, transcripts,
|
|
21
|
+
draft issue bodies before verification, local auth, local overrides, or secrets.
|
|
22
|
+
|
|
23
|
+
## Committed Source Plane
|
|
24
|
+
|
|
25
|
+
`mimetic/` is the project-owned simulation contract:
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
mimetic/
|
|
29
|
+
README.md
|
|
30
|
+
config.ts
|
|
31
|
+
personas/
|
|
32
|
+
synthetic-new-user.yaml
|
|
33
|
+
skeptical-power-user.yaml
|
|
34
|
+
scenarios/
|
|
35
|
+
first-run-smoke.yaml
|
|
36
|
+
onboarding-regression.yaml
|
|
37
|
+
policies/
|
|
38
|
+
redaction.yaml
|
|
39
|
+
network.yaml
|
|
40
|
+
credentials.example.yaml
|
|
41
|
+
adapters/
|
|
42
|
+
app.ts
|
|
43
|
+
review/
|
|
44
|
+
vocabulary.yaml
|
|
45
|
+
milestones.yaml
|
|
46
|
+
coverage-map.md
|
|
47
|
+
coverage-matrix.md
|
|
48
|
+
fixtures/
|
|
49
|
+
synthetic-login-state.json
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Committed files must be public-safe:
|
|
53
|
+
|
|
54
|
+
- synthetic personas only;
|
|
55
|
+
- synthetic or redacted fixtures only;
|
|
56
|
+
- env var names only, never values;
|
|
57
|
+
- no PHI, PII, keys, tokens, raw private transcripts, real screenshots, real
|
|
58
|
+
customer data, or real patient data.
|
|
59
|
+
|
|
60
|
+
Changing a scenario or persona is equivalent to changing a test. It should be
|
|
61
|
+
visible in PR review.
|
|
62
|
+
|
|
63
|
+
## Ignored Runtime Plane
|
|
64
|
+
|
|
65
|
+
`.mimetic/` is local/generated state:
|
|
66
|
+
|
|
67
|
+
```text
|
|
68
|
+
.mimetic/
|
|
69
|
+
runs/
|
|
70
|
+
<run-id>/
|
|
71
|
+
run.json
|
|
72
|
+
review.md
|
|
73
|
+
review.json
|
|
74
|
+
observer/
|
|
75
|
+
screenshots/
|
|
76
|
+
traces/
|
|
77
|
+
terminal/
|
|
78
|
+
feedback/
|
|
79
|
+
cache/
|
|
80
|
+
tmp/
|
|
81
|
+
logs/
|
|
82
|
+
local/
|
|
83
|
+
secrets/
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Default `.gitignore` entry:
|
|
87
|
+
|
|
88
|
+
```gitignore
|
|
89
|
+
.mimetic/
|
|
90
|
+
.env*
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
If a target repo already uses `.env.example`, preserve its existing exception.
|
|
94
|
+
|
|
95
|
+
## Local Overrides
|
|
96
|
+
|
|
97
|
+
When a team needs private local personas or credentials, use ignored overlays:
|
|
98
|
+
|
|
99
|
+
```text
|
|
100
|
+
.mimetic/local/personas/*.yaml
|
|
101
|
+
.mimetic/local/policies/*.yaml
|
|
102
|
+
.mimetic/secrets/*
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
The CLI should warn that local overlays cannot be used for reproducible CI or
|
|
106
|
+
public issue drafts unless redacted into committed synthetic equivalents.
|
|
107
|
+
|
|
108
|
+
## CI And Reproducibility
|
|
109
|
+
|
|
110
|
+
CI should reproduce proof from committed inputs:
|
|
111
|
+
|
|
112
|
+
- app commit;
|
|
113
|
+
- `mimetic-cli` version;
|
|
114
|
+
- `mimetic/config.ts`;
|
|
115
|
+
- scenario and persona catalog;
|
|
116
|
+
- policy files;
|
|
117
|
+
- synthetic fixtures;
|
|
118
|
+
- declared env var names.
|
|
119
|
+
|
|
120
|
+
CI should store generated run bundles as artifacts, not commit them.
|
|
121
|
+
|
|
122
|
+
## Why Not `.mimetic/` For Everything?
|
|
123
|
+
|
|
124
|
+
A fully ignored `.mimetic/` makes setup feel tidy, but it hides the product
|
|
125
|
+
contract. Future agents and contributors cannot see what the harness is meant
|
|
126
|
+
to prove, CI cannot validate it from a clean clone, and PR review cannot catch
|
|
127
|
+
weakened personas or dropped hard paths.
|
|
128
|
+
|
|
129
|
+
A partially tracked dotdir is possible but worse UX. Dotdirs read as local,
|
|
130
|
+
editors hide them, and negated gitignore rules are easy to break. A visible
|
|
131
|
+
`mimetic/` source root plus ignored `.mimetic/` runtime root is clearer.
|
|
132
|
+
|
|
Binary file
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Adapter Fixture Parity Contract
|
|
2
|
+
|
|
3
|
+
Date: 2026-06-02
|
|
4
|
+
|
|
5
|
+
Status: v0 draft contract for public-safe adapter fixture parity.
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
Adapter fixtures prove that Mimetic can carry target-specific evidence without
|
|
10
|
+
moving target truth into core schemas. A fixture is not a product claim. It is a
|
|
11
|
+
public-safe contract packet that shows the routes, personas, milestones,
|
|
12
|
+
terminal evidence, feedback drafts, and policy decisions a real adapter must
|
|
13
|
+
emit before live behavior can be trusted.
|
|
14
|
+
|
|
15
|
+
The fixture contract keeps three boundaries explicit:
|
|
16
|
+
|
|
17
|
+
- Core owns run-bundle identity, artifact layout, verification, review,
|
|
18
|
+
redaction, and feedback mechanics.
|
|
19
|
+
- Adapters own target routes, scenario language, personas, milestone names,
|
|
20
|
+
command surfaces, and acceptance proof.
|
|
21
|
+
- Public issue drafts use redacted artifact pointers only; they do not require
|
|
22
|
+
GitHub tokens, hosted product memory, private transcripts, or live mutation.
|
|
23
|
+
|
|
24
|
+
## Fixture Set
|
|
25
|
+
|
|
26
|
+
The committed fixture set lives under `adapters/fixtures/`.
|
|
27
|
+
|
|
28
|
+
| Fixture | Proves | Required artifacts |
|
|
29
|
+
| --- | --- | --- |
|
|
30
|
+
| `post-auth-return-dry-run` | A web-app adapter can keep upload, studio, and auth-return milestones adapter-owned while emitting a product-neutral dry-run bundle. | `adapter.json`, `persona.json`, `scenario.json`, `milestones.json`, `run-bundle.json` |
|
|
31
|
+
| `terminal-feedback-lifecycle` | A terminal-first adapter can emit sanitized transcript evidence, issue-draft material, cost/redaction policy, verification checks, and feedback lifecycle proof without browser-only assumptions. | `adapter.json`, `policy.json`, `run-bundle.json`, `feedback-draft.json`, `verify-result.json`, `transcripts/sanitized-terminal.txt` |
|
|
32
|
+
|
|
33
|
+
## Promotion Gates
|
|
34
|
+
|
|
35
|
+
A fixture can be promoted only when:
|
|
36
|
+
|
|
37
|
+
- every example is synthetic or redacted;
|
|
38
|
+
- artifact paths are relative and do not contain traversal segments, absolute
|
|
39
|
+
local paths, hosted stream URLs, or auth-bearing links;
|
|
40
|
+
- credential policy records env var names only, never values;
|
|
41
|
+
- adapter-owned nouns do not appear in core schema docs or core runtime code;
|
|
42
|
+
- public feedback material states that GitHub mutation was not performed;
|
|
43
|
+
- the fixture can be checked with `pnpm test tests/adapter-fixtures.test.ts`
|
|
44
|
+
and `pnpm public-surface:scan`.
|
|
45
|
+
|
|
46
|
+
## Dry-Run Web-App Fixture Shape
|
|
47
|
+
|
|
48
|
+
The web-app fixture models a local app with three adapter-owned route groups:
|
|
49
|
+
|
|
50
|
+
- `upload`: synthetic file input and validation state;
|
|
51
|
+
- `studio`: synthetic work surface and result-review state;
|
|
52
|
+
- `auth-return`: a post-authentication return path using a synthetic state id.
|
|
53
|
+
|
|
54
|
+
The dry-run bundle does not add route or milestone fields to core. Instead, it
|
|
55
|
+
references adapter-owned routes through `streams[].ui.route`, milestone events
|
|
56
|
+
through lifecycle/event records, and the milestone manifest through relative
|
|
57
|
+
artifact pointers.
|
|
58
|
+
|
|
59
|
+
## Terminal Feedback Fixture Shape
|
|
60
|
+
|
|
61
|
+
The terminal fixture models a command-driven product surface. Its bundle uses a
|
|
62
|
+
`terminal` evidence stream, a sanitized transcript pointer, a feedback
|
|
63
|
+
candidate, a separate feedback draft artifact, and a verification result that
|
|
64
|
+
checks required public-safe files without reading or requiring raw private
|
|
65
|
+
transcripts. Policy is adapter-owned and records:
|
|
66
|
+
|
|
67
|
+
- `spend_policy: no_spend`;
|
|
68
|
+
- `network_policy: no_network`;
|
|
69
|
+
- `github.mutation: not_requested`;
|
|
70
|
+
- `hosted_product_memory.required: false`;
|
|
71
|
+
- redaction status and denied material classes.
|
|
72
|
+
|
|
73
|
+
This keeps terminal and feedback parity independent from browser screenshots.
|
|
74
|
+
|
|
75
|
+
## Proof Commands
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
pnpm test tests/adapter-fixtures.test.ts
|
|
79
|
+
pnpm public-surface:scan
|
|
80
|
+
```
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Core Contract
|
|
2
|
+
|
|
3
|
+
Date: 2026-06-02
|
|
4
|
+
|
|
5
|
+
Status: v0 draft contract with tested primitive helpers in `src/core`.
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
Core is the reusable layer that makes a run bundle stable enough for agents,
|
|
10
|
+
reviewers, and maintainers to trust. It owns generic run identity, artifact
|
|
11
|
+
layout, source state summaries, lifecycle records, latest/history pointers, and
|
|
12
|
+
timing summaries.
|
|
13
|
+
|
|
14
|
+
Core does not own product routes, personas, scenarios, app topology, provider
|
|
15
|
+
setup, or repository-specific proof language.
|
|
16
|
+
|
|
17
|
+
## Public-Safe Defaults
|
|
18
|
+
|
|
19
|
+
Core records must be safe to include in public run bundles by default:
|
|
20
|
+
|
|
21
|
+
- artifact paths are relative;
|
|
22
|
+
- run ids contain only lowercase letters, numbers, and dashes;
|
|
23
|
+
- git state summarizes status without branch names, remotes, file names, file
|
|
24
|
+
paths, or absolute working directories;
|
|
25
|
+
- lifecycle and timing records are explicit inputs, not inferred prose;
|
|
26
|
+
- latest/history pointers identify local artifacts, not hosted private logs.
|
|
27
|
+
|
|
28
|
+
## Primitive Set
|
|
29
|
+
|
|
30
|
+
| Primitive | Contract |
|
|
31
|
+
| --- | --- |
|
|
32
|
+
| Run id | Deterministic from explicit prefix, timestamp, and entropy; valid ids match `^[a-z0-9][a-z0-9-]{0,127}$`. |
|
|
33
|
+
| Artifact layout | Builds stable relative pointers under `.mimetic/runs/<run-id>/` plus `.mimetic/runs/latest.json`. |
|
|
34
|
+
| Latest pointer | `{ schema, runId, path, updatedAt }` using `mimetic.latest-run.v1`. |
|
|
35
|
+
| History entry | `{ schema, runId, createdAt, mode, path }` using `mimetic.run-history-entry.v1`. |
|
|
36
|
+
| Lifecycle event | `{ at, event, message }`; event and message are required. |
|
|
37
|
+
| Timing summary | `{ startedAt, endedAt, durationMs, status }`; running records have null end and duration. |
|
|
38
|
+
| Git state | `{ schema, status, capturedAt, head, changes, note }` using `mimetic.git-state.v1`. |
|
|
39
|
+
|
|
40
|
+
## Git State Boundary
|
|
41
|
+
|
|
42
|
+
Git state is intentionally lossy. It answers:
|
|
43
|
+
|
|
44
|
+
- is this a work tree?
|
|
45
|
+
- is it clean or dirty?
|
|
46
|
+
- what short HEAD hash is available?
|
|
47
|
+
- is HEAD attached, detached, unborn, or unknown?
|
|
48
|
+
- how many staged, unstaged, and untracked entries exist?
|
|
49
|
+
|
|
50
|
+
It does not record:
|
|
51
|
+
|
|
52
|
+
- branch names;
|
|
53
|
+
- remotes;
|
|
54
|
+
- file names;
|
|
55
|
+
- file paths;
|
|
56
|
+
- absolute directories;
|
|
57
|
+
- diffs;
|
|
58
|
+
- commit messages.
|
|
59
|
+
|
|
60
|
+
That makes it useful for repeatability and review without turning run bundles
|
|
61
|
+
into a source leak.
|
|
62
|
+
|
|
63
|
+
## Stop Conditions
|
|
64
|
+
|
|
65
|
+
Core work stops if:
|
|
66
|
+
|
|
67
|
+
- a core primitive needs a product-specific noun to make sense;
|
|
68
|
+
- an artifact path can escape the run root;
|
|
69
|
+
- a public record includes a raw cwd, branch name, remote, file name, diff, or
|
|
70
|
+
credential-like value;
|
|
71
|
+
- a run id cannot be reproduced from explicit inputs.
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# Feedback Contract
|
|
2
|
+
|
|
3
|
+
Date: 2026-06-01
|
|
4
|
+
|
|
5
|
+
Status: v0 dry-run contract implemented for local issue draft generation.
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
Feedback is the bridge between simulation evidence and public issue filing.
|
|
10
|
+
|
|
11
|
+
`mimetic feedback` should let a persona simulation say:
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
this user-like run found this concrete friction
|
|
15
|
+
here is the evidence
|
|
16
|
+
here is the likely owner
|
|
17
|
+
here is the redaction proof
|
|
18
|
+
here is the next state
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
It should not be an issue spammer, infra dependency, or generic comment
|
|
22
|
+
collector.
|
|
23
|
+
|
|
24
|
+
## Privacy Rule
|
|
25
|
+
|
|
26
|
+
Feedback payloads must be public-safe by default. They may not contain PII,
|
|
27
|
+
PHI, secrets, keys, tokens, raw private transcripts, private screenshots, raw
|
|
28
|
+
customer data, raw patient data, or private product source.
|
|
29
|
+
|
|
30
|
+
Public issue drafting fails closed if redaction cannot prove the payload is
|
|
31
|
+
safe.
|
|
32
|
+
|
|
33
|
+
## Command Stages
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
mimetic feedback list --run latest
|
|
37
|
+
mimetic feedback draft --run latest --json
|
|
38
|
+
mimetic feedback verify --run latest --json
|
|
39
|
+
mimetic feedback issue --run latest --repo owner/repo --format markdown
|
|
40
|
+
mimetic feedback issue-url --run latest --repo owner/repo
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### `list`
|
|
44
|
+
|
|
45
|
+
Reads feedback candidates from the run bundle. Does not mutate.
|
|
46
|
+
|
|
47
|
+
### `draft`
|
|
48
|
+
|
|
49
|
+
Builds structured feedback from review output and raw evidence pointers. Writes
|
|
50
|
+
a draft under the run bundle, not GitHub.
|
|
51
|
+
|
|
52
|
+
### `verify`
|
|
53
|
+
|
|
54
|
+
Checks schema, evidence pointers, idempotency key, redaction result, and public
|
|
55
|
+
issue eligibility.
|
|
56
|
+
|
|
57
|
+
### `issue`
|
|
58
|
+
|
|
59
|
+
Prints or writes a public-safe GitHub issue body. It does not call the GitHub
|
|
60
|
+
API. The user files the issue in the public or eventually public repository.
|
|
61
|
+
|
|
62
|
+
### `issue-url`
|
|
63
|
+
|
|
64
|
+
Prints a prefilled GitHub issue URL when the platform supports one. It still
|
|
65
|
+
does not create the issue.
|
|
66
|
+
|
|
67
|
+
## Schema
|
|
68
|
+
|
|
69
|
+
```yaml
|
|
70
|
+
mimetic_feedback:
|
|
71
|
+
schema: mimetic.feedback.v1
|
|
72
|
+
run_id: "<run-id>"
|
|
73
|
+
adapter_id: "<adapter-id>"
|
|
74
|
+
scenario_id: "<scenario-id>"
|
|
75
|
+
persona_id: "<persona-id-or-class>"
|
|
76
|
+
actor: "<actor-runtime>"
|
|
77
|
+
substrate: "<substrate>"
|
|
78
|
+
failure_owner: "product_ux|agent_runtime|executor_substrate|payment_provider|model_provider|harness|unknown"
|
|
79
|
+
summary: "<public-safe concrete summary>"
|
|
80
|
+
expected: "<public-safe expected behavior>"
|
|
81
|
+
actual: "<public-safe observed behavior>"
|
|
82
|
+
source_bundle: "<path-or-url>"
|
|
83
|
+
evidence:
|
|
84
|
+
- path: "<relative artifact pointer>"
|
|
85
|
+
kind: "screenshot|terminal|browser|state|media|review|trace"
|
|
86
|
+
note: "<public-safe note>"
|
|
87
|
+
redaction:
|
|
88
|
+
status: "passed|failed|not_applicable"
|
|
89
|
+
notes: "<public-safe note>"
|
|
90
|
+
idempotency_key: "<stable-key>"
|
|
91
|
+
proposed_next_state: "watch|needs_spec|spec_ready|agent_ready|blocked|wontfix"
|
|
92
|
+
acceptance_proof:
|
|
93
|
+
- "<command or artifact that would close this>"
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Failure Owners
|
|
97
|
+
|
|
98
|
+
| Owner | Meaning |
|
|
99
|
+
| --- | --- |
|
|
100
|
+
| `product_ux` | The product confused, blocked, or failed the user/persona. |
|
|
101
|
+
| `agent_runtime` | The actor model/tool runtime failed independent of product UX. |
|
|
102
|
+
| `executor_substrate` | E2B, local browser, shell, filesystem, or network substrate failed. |
|
|
103
|
+
| `payment_provider` | Hosted payment/provider behavior blocked the run. |
|
|
104
|
+
| `model_provider` | Model/media provider behavior blocked the run. |
|
|
105
|
+
| `harness` | Mimetic or adapter logic produced invalid evidence or execution. |
|
|
106
|
+
| `unknown` | Evidence is useful but ownership is not yet clear. |
|
|
107
|
+
|
|
108
|
+
## Issue Draft Gates
|
|
109
|
+
|
|
110
|
+
Generating a public issue draft is blocked when:
|
|
111
|
+
|
|
112
|
+
- required schema fields are missing;
|
|
113
|
+
- source bundle is missing;
|
|
114
|
+
- evidence pointers are missing or invalid;
|
|
115
|
+
- redaction did not pass;
|
|
116
|
+
- any payload may contain PII, PHI, secrets, or private operational context;
|
|
117
|
+
- proposed next state is `agent_ready` without a readiness block;
|
|
118
|
+
- the feedback is a dry-run-only product claim;
|
|
119
|
+
- idempotency key is missing.
|
|
120
|
+
|
|
121
|
+
## GitHub Issue Semantics
|
|
122
|
+
|
|
123
|
+
GitHub issues filed from feedback should say `contributes to` unless the
|
|
124
|
+
acceptance proof closes the full product claim. The public issue should include
|
|
125
|
+
only redacted evidence pointers and reproduction instructions that a maintainer
|
|
126
|
+
can use without private local context.
|
|
127
|
+
|
|
128
|
+
The public CLI should not require GitHub tokens, hosted product memory, queues,
|
|
129
|
+
webhooks, Actions, databases, or Projects. Maintainers may later build separate
|
|
130
|
+
repo-local tooling that consumes the same issue schema, but that is outside the
|
|
131
|
+
default public feedback path.
|