services/computer-use-mcp/mimic-baseline-training-boundary.md
This document defines the future training line for computer-use-mcp.
The current decision is deliberately conservative:
The learned component should eventually rank low-level UI candidates or actions. It must not understand user language, execute tools, bypass approval, or decide that a task is complete.
Current status: experiment boundary only.
This package does not currently contain a trained computer-use model. Any future mimic scorer is advisory data until explicit runtime integration, approval, and verification contracts are written and tested.
The intended division of responsibility is:
observation -> candidate/action ranking.Authority order:
runtime/system rules
active user instruction
approval and safety policy
verification gate
trusted current-run tool evidence
planner subgoal / plan state
observer candidate set
mimic scorer ranking
model guess
The mimic scorer can inform selection. It cannot authorize execution.
If an experiment folder is created, use:
services/computer-use-mcp/experiments/mimic-baseline/
Possible files:
trace-schema.ts
collect-trace.ts
build-dataset.ts
eval-candidate-scorer.ts
README.md
V1 scope:
Do not implement training before this substrate exists.
The first schema should be append-only friendly and deterministic.
interface MimicTraceRecordV1 {
schema: 'computer-use-mcp.mimic-trace.v1'
traceId: string
stepId: string
createdAt: string
taskGoal: string
currentSubgoal: string
observation: {
screenshotPath?: string
screenshotSha256?: string
url?: string
title?: string
app?: string
windowTitle?: string
candidates: MimicCandidateV1[]
}
previousActions: MimicActionV1[]
chosenAction: MimicActionV1
chosenCandidateId?: string
mapping: {
status: 'matched_candidate' | 'no_target' | 'ambiguous' | 'outside_observed_bounds'
candidateId?: string
distancePx?: number
reason?: string
}
expectedEffect?: string
verification?: {
status: 'passed' | 'failed' | 'unknown'
summary?: string
}
source: {
collector: 'manual' | 'deterministic_demo' | 'human_replay'
platform: 'macos'
browser?: 'chrome'
}
}
Candidate and action structures should stay low-level:
interface MimicCandidateV1 {
id: string
source: 'chrome_dom' | 'ax' | 'vision' | 'manual'
role?: string
label?: string
text?: string
bounds: { x: number, y: number, width: number, height: number }
enabled?: boolean
visible?: boolean
metadata?: Record<string, unknown>
}
type MimicActionType = 'click' | 'type_text' | 'scroll' | 'press_key' | 'wait' | 'no_target'
interface MimicActionV1 {
type: MimicActionType
candidateId?: string
point?: { x: number, y: number }
text?: string
direction?: 'up' | 'down' | 'left' | 'right'
key?: string
}
Do not put raw secrets, cookies, API keys, or full browser storage into traces.
The dataset builder should convert trace records into bounded examples:
input:
task goal
current subgoal
screenshot reference
candidate list
previous actions
label:
chosen action type
chosen candidate id when mapped
no-target / unmapped status when not mapped
The first dataset format can be JSONL. It should keep screenshots as referenced files, not inline base64, unless a later training backend requires packaging.
The first offline eval script should report:
Eval output should be deterministic and file-based. It should not call a runtime tool, mutate the desktop, or require a model provider key for the first schema contract.
Do not discuss runtime integration until all of these are true:
Even after those gates pass, a learned scorer must enter runtime as advisory ranking only. It must not execute tools directly.
Chika may own these bounded experiment tasks:
Chika should not own these in the first slice:
When this line is reopened, remind the owner of the current decision:
Do not train or deploy yet. First prove the mimic trace schema, deterministic
collector, candidate mapping, dataset builder, and offline eval.
Revisit the training decision only after the promotion gates above are met.