docs(confidence-engine): consolidate current context and provenance
This commit is contained in:
@@ -123,3 +123,58 @@ Stop after reporting. Do not begin the next task automatically.
|
||||
When a task is interrupted by output limits, resume with a narrowly scoped repair prompt rather than restating the entire original brief.
|
||||
|
||||
User interfaces communicate reasoning, not implementation. If a piece of information exists only because the engine tracks it internally (graph nodes, unresolved counts, edge totals, confidence scores), it should remain in Developer Details unless it directly helps the user make their next decision.
|
||||
|
||||
## Playwright MCP — canonical dev server ownership
|
||||
|
||||
- Assume `http://localhost:3000` is already running when a task names it.
|
||||
- Never start / stop / kill / restart / replace / port-probe the dev server.
|
||||
- Never reinterpret "do not start/restart/kill/probe" as "start normally" or "use npm run dev".
|
||||
- If the canonical dev server is unavailable: **BLOCKED** — do not proceed.
|
||||
|
||||
## Playwright MCP — known controls and semantic locators
|
||||
|
||||
For known UI controls, use **Run Playwright code** with exact semantic locators:
|
||||
|
||||
```js
|
||||
await page.getByRole('button', { name: 'Review current understanding' }).click();
|
||||
```
|
||||
|
||||
Do NOT first try MCP Click. Do NOT use snapshot refs (`[ref=...]`) for actions — they are observational only.
|
||||
|
||||
Semantic scoping is allowed and encouraged where names repeat, e.g.:
|
||||
|
||||
```js
|
||||
page.getByRole('dialog').getByRole('button', { name: 'Restart investigation' });
|
||||
```
|
||||
|
||||
## Playwright MCP — semantic waits
|
||||
|
||||
For known async/hydration states, use `waitFor` with a semantic state — not arbitrary sleeps:
|
||||
|
||||
```js
|
||||
await page.getByRole(...).waitFor({ state: 'visible', timeout: ... });
|
||||
```
|
||||
|
||||
Client hydration is real product behaviour. Always await before classifying localStorage-backed UI state.
|
||||
|
||||
## Playwright MCP — selector failure
|
||||
|
||||
If the prescribed semantic locator cannot find its expected control: **STOP**.
|
||||
|
||||
Do NOT fall back to snapshot refs, CSS selectors, XPath, DOM traversal, `page.evaluate`, aria-label guessing, or locator archaeology.
|
||||
|
||||
## Playwright MCP — browser state and live freeze
|
||||
|
||||
During live verification do not inspect / inject / mutate browser storage merely to manufacture expected test state (unless storage manipulation itself is the explicit experiment).
|
||||
|
||||
Once live Playwright verification begins: **NO PRODUCTION FILE EDITS**. First visible discrepancy is evidence to capture and stop on.
|
||||
|
||||
## Deterministic test rules — apparatus ownership
|
||||
|
||||
**Tests are instruments, not product truth.**
|
||||
|
||||
At the first deterministic failure classify: **PRODUCT FAILURE** or **APPARATUS FAILURE**, then stop.
|
||||
|
||||
For APPARATUS FAILURE: do not turn the product task into test-harness development. Do not enter repeated vi.mock / dynamic re-import / module-cache manipulation / duplicate render / global mutation repair loops. Route apparatus correction separately.
|
||||
|
||||
If a lower-layer function is mocked, test the value crossing the mocked seam — do NOT require the mock to reproduce its real implementation. Storage-layer tests own storage writes.
|
||||
|
||||
Reference in New Issue
Block a user