pi-ui-extend 1.0.42 → 1.0.45
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/README.md +41 -12
- package/dist/app/app.d.ts +10 -0
- package/dist/app/app.js +132 -8
- package/dist/app/cli/install.js +2 -2
- package/dist/app/commands/command-controller.d.ts +4 -0
- package/dist/app/commands/command-controller.js +11 -0
- package/dist/app/commands/command-git-actions.d.ts +25 -0
- package/dist/app/commands/command-git-actions.js +381 -0
- package/dist/app/commands/command-host.d.ts +3 -0
- package/dist/app/commands/command-host.js +5 -2
- package/dist/app/commands/command-model-actions.d.ts +1 -0
- package/dist/app/commands/command-model-actions.js +51 -34
- package/dist/app/commands/command-navigation-actions.d.ts +1 -0
- package/dist/app/commands/command-navigation-actions.js +16 -3
- package/dist/app/commands/command-registry.d.ts +2 -0
- package/dist/app/commands/command-registry.js +14 -0
- package/dist/app/commands/reload-context-inventory.js +12 -1
- package/dist/app/input/autocomplete-controller.js +61 -34
- package/dist/app/input/input-action-controller.d.ts +2 -0
- package/dist/app/input/input-action-controller.js +8 -1
- package/dist/app/input/input-controller.d.ts +2 -1
- package/dist/app/input/input-controller.js +7 -2
- package/dist/app/input/prompt-enhancer-controller.js +53 -35
- package/dist/app/input/voice-controller.d.ts +41 -45
- package/dist/app/input/voice-controller.js +351 -419
- package/dist/app/model/model-usage-controller.js +17 -7
- package/dist/app/model/model-usage-status.d.ts +4 -1
- package/dist/app/model/model-usage-status.js +270 -46
- package/dist/app/popup/menu-items-controller.d.ts +13 -3
- package/dist/app/popup/menu-items-controller.js +37 -21
- package/dist/app/popup/popup-action-controller.d.ts +12 -2
- package/dist/app/popup/popup-action-controller.js +77 -24
- package/dist/app/popup/popup-menu-controller.d.ts +36 -14
- package/dist/app/popup/popup-menu-controller.js +239 -69
- package/dist/app/rendering/dcp-stats.d.ts +9 -4
- package/dist/app/rendering/dcp-stats.js +40 -425
- package/dist/app/rendering/popup-menu-renderer.d.ts +3 -5
- package/dist/app/rendering/popup-menu-renderer.js +42 -37
- package/dist/app/rendering/render-controller.js +23 -2
- package/dist/app/rendering/status-line-renderer.d.ts +5 -0
- package/dist/app/rendering/status-line-renderer.js +41 -5
- package/dist/app/rendering/tab-line-renderer.js +26 -20
- package/dist/app/runtime.d.ts +12 -1
- package/dist/app/runtime.js +120 -12
- package/dist/app/screen/mouse-controller.d.ts +2 -0
- package/dist/app/screen/mouse-controller.js +17 -7
- package/dist/app/screen/status-controller.d.ts +4 -0
- package/dist/app/screen/status-controller.js +5 -0
- package/dist/app/session/lazy-session-manager.js +34 -0
- package/dist/app/session/session-event-controller.d.ts +1 -0
- package/dist/app/session/session-event-controller.js +10 -1
- package/dist/app/session/session-history.d.ts +1 -0
- package/dist/app/session/session-history.js +12 -1
- package/dist/app/session/session-lifecycle-controller.d.ts +6 -1
- package/dist/app/session/session-lifecycle-controller.js +10 -1
- package/dist/app/session/tabs-controller.d.ts +25 -1
- package/dist/app/session/tabs-controller.js +442 -153
- package/dist/app/subagents/subagents-widget-controller.d.ts +1 -0
- package/dist/app/subagents/subagents-widget-controller.js +6 -0
- package/dist/app/types.d.ts +11 -1
- package/dist/app/workspace/workspace-actions-controller.js +10 -2
- package/dist/app/workspace/workspace-undo.d.ts +1 -0
- package/dist/app/workspace/workspace-undo.js +1 -0
- package/dist/bundled-extensions/question/index.js +9 -1
- package/dist/bundled-extensions/question/remote.d.ts +4 -0
- package/dist/bundled-extensions/question/remote.js +33 -0
- package/dist/bundled-extensions/telegram-connector/bot.d.ts +43 -0
- package/dist/bundled-extensions/telegram-connector/bot.js +166 -0
- package/dist/bundled-extensions/telegram-connector/config.d.ts +8 -0
- package/dist/bundled-extensions/telegram-connector/config.js +87 -0
- package/dist/bundled-extensions/telegram-connector/coordinator.d.ts +66 -0
- package/dist/bundled-extensions/telegram-connector/coordinator.js +413 -0
- package/dist/bundled-extensions/telegram-connector/index.d.ts +3 -0
- package/dist/bundled-extensions/telegram-connector/index.js +195 -0
- package/dist/bundled-extensions/terminal-bell/index.d.ts +0 -8
- package/dist/bundled-extensions/terminal-bell/index.js +0 -76
- package/dist/bundled-extensions/workspace-undo/index.d.ts +26 -0
- package/dist/bundled-extensions/workspace-undo/index.js +191 -0
- package/dist/config.d.ts +21 -2
- package/dist/config.js +159 -32
- package/dist/default-pix-config.js +20 -10
- package/dist/schemas/pi-tools-suite-schema.d.ts +8 -4
- package/dist/schemas/pi-tools-suite-schema.js +11 -5
- package/dist/schemas/pix-schema.d.ts +12 -2
- package/dist/schemas/pix-schema.js +37 -9
- package/dist/schemas/tasks-schema.js +1 -1
- package/docs/concurrency.md +3 -1
- package/docs/desktop-mvp.md +10 -5
- package/docs/desktop-task-manager.md +81 -28
- package/docs/release.md +30 -6
- package/external/pi-tools-suite/README.md +165 -39
- package/external/pi-tools-suite/docs/session-recovery.md +7 -0
- package/external/pi-tools-suite/docs/subagent-model-pools.md +12 -5
- package/external/pi-tools-suite/docs/ui-qa-subagent.md +440 -0
- package/external/pi-tools-suite/package.json +6 -1
- package/external/pi-tools-suite/src/antigravity-auth/auth-store.ts +2 -1
- package/external/pi-tools-suite/src/antigravity-auth/constants.ts +9 -3
- package/external/pi-tools-suite/src/antigravity-auth/headers.ts +41 -3
- package/external/pi-tools-suite/src/antigravity-auth/models.ts +94 -21
- package/external/pi-tools-suite/src/antigravity-auth/oauth.ts +5 -17
- package/external/pi-tools-suite/src/antigravity-auth/payload.ts +72 -7
- package/external/pi-tools-suite/src/antigravity-auth/stream.ts +13 -1
- package/external/pi-tools-suite/src/async-subagents/agents/implement.md +1 -1
- package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/backends/browser.mjs +346 -0
- package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/backends/desktop.mjs +1038 -0
- package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/backends/tui.mjs +759 -0
- package/external/pi-tools-suite/src/async-subagents/agents/{browser-qa → ui-qa/browser}/scripts/browser-qa-runner.mjs +32 -23
- package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/drivers/chrome-devtools/chrome-devtools-provider.mjs +895 -0
- package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/drivers/linux/linux-atspi.py +494 -0
- package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/drivers/macos/macos-accessibility.swift +1085 -0
- package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/drivers/native-terminal/bridge-client.mjs +50 -0
- package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/drivers/native-terminal/native-terminal-host.mjs +501 -0
- package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/drivers/windows/windows-uia.ps1 +454 -0
- package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/guides/browser-auth.md +114 -0
- package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/guides/browser-chrome-devtools.md +91 -0
- package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/guides/browser-playwright.md +145 -0
- package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/guides/browser.md +82 -0
- package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/guides/desktop-linux.md +26 -0
- package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/guides/desktop-macos.md +29 -0
- package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/guides/desktop-windows.md +23 -0
- package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/guides/desktop.md +54 -0
- package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/guides/tui-native-terminal.md +59 -0
- package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/guides/tui-pty.md +37 -0
- package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/guides/tui.md +60 -0
- package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/scripts/ui-qa-runner.mjs +535 -0
- package/external/pi-tools-suite/src/async-subagents/agents/ui-qa.md +75 -0
- package/external/pi-tools-suite/src/async-subagents/commands.ts +1 -1
- package/external/pi-tools-suite/src/async-subagents/core/agent-strategy.ts +1 -1
- package/external/pi-tools-suite/src/async-subagents/core/agents-dir.ts +0 -2
- package/external/pi-tools-suite/src/async-subagents/core/browser-qa.ts +16 -2
- package/external/pi-tools-suite/src/async-subagents/core/config.ts +40 -17
- package/external/pi-tools-suite/src/async-subagents/core/model-selection.ts +2 -1
- package/external/pi-tools-suite/src/async-subagents/core/registry.ts +158 -33
- package/external/pi-tools-suite/src/async-subagents/core/routing.ts +7 -4
- package/external/pi-tools-suite/src/async-subagents/core/spawn.ts +34 -24
- package/external/pi-tools-suite/src/async-subagents/core/ultrawork-auto.ts +51 -45
- package/external/pi-tools-suite/src/async-subagents/lib.ts +9 -1
- package/external/pi-tools-suite/src/async-subagents/tools/spawn.ts +0 -1
- package/external/pi-tools-suite/src/async-subagents/tools/subagents.ts +2 -2
- package/external/pi-tools-suite/src/coding-discipline/index.ts +90 -59
- package/external/pi-tools-suite/src/config.ts +14 -0
- package/external/pi-tools-suite/src/context-gateway/accounting-log.ts +282 -0
- package/external/pi-tools-suite/src/context-gateway/config.ts +66 -1
- package/external/pi-tools-suite/src/context-gateway/efficiency.ts +414 -0
- package/external/pi-tools-suite/src/context-gateway/enforcement.ts +123 -3
- package/external/pi-tools-suite/src/context-gateway/index.ts +137 -4
- package/external/pi-tools-suite/src/context-gateway/storeless-capabilities.ts +5 -5
- package/external/pi-tools-suite/src/context-gateway/telemetry.ts +2 -2
- package/external/pi-tools-suite/src/context-gateway/types.ts +8 -1
- package/external/pi-tools-suite/src/dcp/auto-compress-budget.ts +39 -4
- package/external/pi-tools-suite/src/dcp/auto-compress.ts +41 -14
- package/external/pi-tools-suite/src/dcp/commands.ts +14 -156
- package/external/pi-tools-suite/src/dcp/compress-tool.ts +8 -2
- package/external/pi-tools-suite/src/dcp/compression-progress.ts +22 -0
- package/external/pi-tools-suite/src/dcp/config.ts +58 -4
- package/external/pi-tools-suite/src/dcp/conversation-index.ts +36 -9
- package/external/pi-tools-suite/src/dcp/diagnostics.ts +41 -0
- package/external/pi-tools-suite/src/dcp/fresh-tool-results.ts +38 -0
- package/external/pi-tools-suite/src/dcp/index.ts +338 -66
- package/external/pi-tools-suite/src/dcp/journal.ts +126 -4
- package/external/pi-tools-suite/src/dcp/progress-controller.ts +2 -1
- package/external/pi-tools-suite/src/dcp/pruner-candidates.ts +92 -2
- package/external/pi-tools-suite/src/dcp/pruner-nudge.ts +36 -33
- package/external/pi-tools-suite/src/dcp/pruner.ts +1 -0
- package/external/pi-tools-suite/src/dcp/routine-pressure.ts +86 -0
- package/external/pi-tools-suite/src/dcp/state.ts +9 -0
- package/external/pi-tools-suite/src/dcp/statistics.d.ts +8 -0
- package/external/pi-tools-suite/src/dcp/statistics.js +156 -0
- package/external/pi-tools-suite/src/default-pi-tools-suite-config.ts +68 -16
- package/external/pi-tools-suite/src/lib/project.ts +36 -1
- package/external/pi-tools-suite/src/model-tools/index.ts +10 -7
- package/external/pi-tools-suite/src/repo-discovery/index.ts +304 -4
- package/external/pi-tools-suite/src/resource-registry/index.ts +282 -21
- package/external/pi-tools-suite/src/session-recovery/index.ts +17 -0
- package/external/pi-tools-suite/src/todo/index.ts +21 -0
- package/external/pi-tools-suite/src/todo/todo.ts +19 -1
- package/external/pi-tools-suite/src/tool-descriptions.ts +44 -15
- package/package.json +7 -8
- package/schemas/pi-tools-suite.json +44 -12
- package/schemas/pix.json +109 -15
- package/schemas/tasks.json +1 -2
- package/skills/simplify/SKILL.md +33 -5
- package/external/pi-tools-suite/docs/browser-qa-subagent.md +0 -196
- package/external/pi-tools-suite/src/async-subagents/agents/browser-qa.md +0 -598
- package/skills/playwright-cli/SKILL.md +0 -420
- package/skills/playwright-cli/references/element-attributes.md +0 -23
- package/skills/playwright-cli/references/playwright-tests.md +0 -50
- package/skills/playwright-cli/references/request-mocking.md +0 -87
- package/skills/playwright-cli/references/running-code.md +0 -241
- package/skills/playwright-cli/references/session-management.md +0 -273
- package/skills/playwright-cli/references/spec-driven-testing.md +0 -311
- package/skills/playwright-cli/references/storage-state.md +0 -290
- package/skills/playwright-cli/references/test-generation.md +0 -142
- package/skills/playwright-cli/references/tracing.md +0 -154
- package/skills/playwright-cli/references/video-recording.md +0 -147
- package/skills/spec-wiki/SKILL.md +0 -55
- package/skills/spec-wiki/evals/evals.json +0 -132
- package/skills/spec-wiki/evals/files/bootstrap/architecture/rfc-007.md +0 -14
- package/skills/spec-wiki/evals/files/bootstrap/docs/how-to-pay.md +0 -4
- package/skills/spec-wiki/evals/files/bootstrap/docs/overview.md +0 -9
- package/skills/spec-wiki/evals/files/bootstrap/requirements/payment-behavior.md +0 -17
- package/skills/spec-wiki/evals/files/bootstrap/src/payments.ts +0 -12
- package/skills/spec-wiki/evals/files/bootstrap/tests/payments.test.ts +0 -11
- package/skills/spec-wiki/evals/files/focused/src/session.ts +0 -5
- package/skills/spec-wiki/evals/files/focused/tests/session.test.ts +0 -17
- package/skills/spec-wiki/evals/files/maintenance/low-signal/incoming/capture.txt +0 -2
- package/skills/spec-wiki/evals/files/maintenance/low-signal/src/capture.ts +0 -3
- package/skills/spec-wiki/evals/files/maintenance/move/docs/old-job-contract.md +0 -18
- package/skills/spec-wiki/evals/files/maintenance/move/src/job.ts +0 -5
- package/skills/spec-wiki/evals/files/maintenance/new-relation/docs/session-refresh.md +0 -24
- package/skills/spec-wiki/evals/files/maintenance/new-relation/incoming/refresh-worker.ts +0 -7
- package/skills/spec-wiki/evals/files/maintenance/new-relation/src/session.ts +0 -7
- package/skills/spec-wiki/evals/files/maintenance/no-impact/docs/auth-contract.md +0 -17
- package/skills/spec-wiki/evals/files/maintenance/no-impact/incoming/telemetry-format.ts +0 -3
- package/skills/spec-wiki/evals/files/maintenance/no-impact/src/auth.ts +0 -3
- package/skills/spec-wiki/evals/files/query/docs/how-to-run-jobs.md +0 -4
- package/skills/spec-wiki/evals/files/query/docs/spec-overview.md +0 -9
- package/skills/spec-wiki/evals/files/query/features/jobs/cancellation-contract.md +0 -15
- package/skills/spec-wiki/evals/files/query/features/jobs/retry-spec.md +0 -6
- package/skills/spec-wiki/evals/maintenance_regression.py +0 -311
- package/skills/spec-wiki/evals/retrieval-eval.md +0 -37
- package/skills/spec-wiki/evals/retrieval-evals.json +0 -37
- package/skills/spec-wiki/evals/trigger-evals.json +0 -94
- package/skills/spec-wiki/references/bootstrap.md +0 -100
- package/skills/spec-wiki/references/focused-spec.md +0 -117
- package/skills/spec-wiki/references/index-schema.md +0 -330
- package/skills/spec-wiki/references/maintenance.md +0 -134
- package/skills/spec-wiki/references/query.md +0 -74
- package/skills/spec-wiki/scripts/spec_wiki.py +0 -2076
- /package/external/pi-tools-suite/src/async-subagents/agents/{browser-qa → ui-qa/browser}/examples/qa-auth.example.jsonc +0 -0
- /package/external/pi-tools-suite/src/async-subagents/agents/{browser-qa → ui-qa/browser}/examples/qa-flow.example.jsonc +0 -0
- /package/external/pi-tools-suite/src/async-subagents/agents/{browser-qa → ui-qa/browser}/vendor/fflate.LICENSE +0 -0
- /package/external/pi-tools-suite/src/async-subagents/agents/{browser-qa → ui-qa/browser}/vendor/fflate.mjs +0 -0
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
# Test Generation
|
|
2
|
-
|
|
3
|
-
Generate Playwright test code automatically as you interact with the browser.
|
|
4
|
-
|
|
5
|
-
## How It Works
|
|
6
|
-
|
|
7
|
-
Every action you perform with `playwright-cli` generates corresponding Playwright TypeScript code.
|
|
8
|
-
This code appears in the output and can be copied directly into your test files.
|
|
9
|
-
|
|
10
|
-
## Example Workflow
|
|
11
|
-
|
|
12
|
-
```bash
|
|
13
|
-
# Choose a unique name, record it as owned by this task, and start the session.
|
|
14
|
-
SESSION="testgen-login-$(date +%s)-$$"
|
|
15
|
-
playwright-cli -s="$SESSION" open https://example.com/login
|
|
16
|
-
|
|
17
|
-
# Take a snapshot to see elements
|
|
18
|
-
playwright-cli -s="$SESSION" snapshot
|
|
19
|
-
# Output shows: e1 [textbox "Email"], e2 [textbox "Password"], e3 [button "Sign In"]
|
|
20
|
-
|
|
21
|
-
# Fill form fields - generates code automatically
|
|
22
|
-
playwright-cli -s="$SESSION" fill e1 "user@example.com"
|
|
23
|
-
# Ran Playwright code:
|
|
24
|
-
# await page.getByRole('textbox', { name: 'Email' }).fill('user@example.com');
|
|
25
|
-
|
|
26
|
-
playwright-cli -s="$SESSION" fill e2 "password123"
|
|
27
|
-
# Ran Playwright code:
|
|
28
|
-
# await page.getByRole('textbox', { name: 'Password' }).fill('password123');
|
|
29
|
-
|
|
30
|
-
playwright-cli -s="$SESSION" click e3
|
|
31
|
-
# Ran Playwright code:
|
|
32
|
-
# await page.getByRole('button', { name: 'Sign In' }).click();
|
|
33
|
-
|
|
34
|
-
# Mandatory on success and errors.
|
|
35
|
-
playwright-cli -s="$SESSION" close
|
|
36
|
-
playwright-cli list # verify $SESSION is absent
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Building a Test File
|
|
40
|
-
|
|
41
|
-
Collect the generated code into a Playwright test:
|
|
42
|
-
|
|
43
|
-
```typescript
|
|
44
|
-
import { test, expect } from '@playwright/test';
|
|
45
|
-
|
|
46
|
-
test('login flow', async ({ page }) => {
|
|
47
|
-
// Generated code from playwright-cli session:
|
|
48
|
-
await page.goto('https://example.com/login');
|
|
49
|
-
await page.getByRole('textbox', { name: 'Email' }).fill('user@example.com');
|
|
50
|
-
await page.getByRole('textbox', { name: 'Password' }).fill('password123');
|
|
51
|
-
await page.getByRole('button', { name: 'Sign In' }).click();
|
|
52
|
-
|
|
53
|
-
// Add assertions
|
|
54
|
-
await expect(page).toHaveURL(/.*dashboard/);
|
|
55
|
-
});
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
## Best Practices
|
|
59
|
-
|
|
60
|
-
### 1. Use Semantic Locators
|
|
61
|
-
|
|
62
|
-
The generated code uses role-based locators when possible, which are more resilient:
|
|
63
|
-
|
|
64
|
-
```typescript
|
|
65
|
-
// Generated (good - semantic)
|
|
66
|
-
await page.getByRole('button', { name: 'Submit' }).click();
|
|
67
|
-
|
|
68
|
-
// Avoid (fragile - CSS selectors)
|
|
69
|
-
await page.locator('#submit-btn').click();
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
### 2. Explore Before Recording
|
|
73
|
-
|
|
74
|
-
Take snapshots to understand the page structure before recording actions:
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
SESSION="testgen-explore-$(date +%s)-$$"
|
|
78
|
-
playwright-cli -s="$SESSION" open https://example.com
|
|
79
|
-
playwright-cli -s="$SESSION" snapshot
|
|
80
|
-
# Review the element structure
|
|
81
|
-
playwright-cli -s="$SESSION" click e5
|
|
82
|
-
playwright-cli -s="$SESSION" close
|
|
83
|
-
playwright-cli list # verify $SESSION is absent
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
### 3. Add Assertions Manually
|
|
87
|
-
|
|
88
|
-
Generated code captures actions but not assertions. Add expectations in your test using one of the recommended matchers:
|
|
89
|
-
|
|
90
|
-
- `toBeVisible()` — element is rendered and visible
|
|
91
|
-
- `toHaveText(text)` — element text content matches
|
|
92
|
-
- `toHaveValue(value) / toBeEmpty()` — input/select value matches
|
|
93
|
-
- `toBeChecked() / toBeUnchecked()` — checkbox state matches
|
|
94
|
-
- `toMatchAriaSnapshot(snapshot)` — page (or locator) matches a partial accessibility snapshot
|
|
95
|
-
|
|
96
|
-
Use `playwright-cli generate-locator <target>` to produce the locator expression for the assertion, and the snapshot/eval commands to capture the expected value.
|
|
97
|
-
|
|
98
|
-
When asserting text content, make sure that generated locator does not contain text from the element itself. `getByTestId()` or `getByLabel()` usually work well with asserting text. When locator is text-based, prefer `toBeVisible()` instead.
|
|
99
|
-
|
|
100
|
-
Snapshot to be matched does not have to contain all the information - only capture what's necessary for the assertion. You can use regular expressions for unstable values.
|
|
101
|
-
|
|
102
|
-
```bash
|
|
103
|
-
# Get a stable locator for an element ref to use in the assertion
|
|
104
|
-
playwright-cli --raw generate-locator e5
|
|
105
|
-
# getByRole('button', { name: 'Submit' })
|
|
106
|
-
|
|
107
|
-
# Capture expected text content for toHaveText
|
|
108
|
-
playwright-cli --raw eval "el => el.textContent" e5
|
|
109
|
-
|
|
110
|
-
# Capture expected input value for toHaveValue/toBeEmpty
|
|
111
|
-
playwright-cli --raw eval "el => el.value" e5
|
|
112
|
-
|
|
113
|
-
# Capture expected aria snapshot for toMatchAriaSnapshot/toBeChecked
|
|
114
|
-
# (whole page, or use a ref to scope to a region)
|
|
115
|
-
playwright-cli --raw snapshot
|
|
116
|
-
playwright-cli --raw snapshot e5
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
```typescript
|
|
120
|
-
// Generated action
|
|
121
|
-
await page.getByRole('button', { name: 'Submit' }).click();
|
|
122
|
-
|
|
123
|
-
// Manual assertions using the outputs above:
|
|
124
|
-
await expect(page.getByRole('alert', { name: 'Success' })).toBeVisible();
|
|
125
|
-
await expect(page.getByTestId('main-header')).toHaveText('Welcome, user');
|
|
126
|
-
await expect(page.getByRole('textbox', { name: 'Email' })).toHaveValue('user@example.com');
|
|
127
|
-
await expect(page.getByRole('checkbox', { name: 'Enable notifications' })).toBeChecked();
|
|
128
|
-
|
|
129
|
-
// toMatchAriaSnapshot on the whole page, finds a matching region
|
|
130
|
-
await expect(page).toMatchAriaSnapshot(`
|
|
131
|
-
- heading "Welcome, user"
|
|
132
|
-
- link /\\d+ new messages?/
|
|
133
|
-
- button "Sign out"
|
|
134
|
-
`);
|
|
135
|
-
|
|
136
|
-
// toMatchAriaSnapshot scoped to a region
|
|
137
|
-
await expect(page.getByRole('navigation')).toMatchAriaSnapshot(`
|
|
138
|
-
- link "Home"
|
|
139
|
-
- link /\\d+ new messages?/
|
|
140
|
-
- link "Profile"
|
|
141
|
-
`);
|
|
142
|
-
```
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
# Tracing
|
|
2
|
-
|
|
3
|
-
Capture detailed execution traces for debugging and analysis. Traces include DOM snapshots, screenshots, network activity, and console logs.
|
|
4
|
-
|
|
5
|
-
## Basic Usage
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
SESSION="trace-basic-$(date +%s)-$$" # record as owned before first command
|
|
9
|
-
# Start trace recording
|
|
10
|
-
playwright-cli -s="$SESSION" tracing-start
|
|
11
|
-
|
|
12
|
-
# Perform actions
|
|
13
|
-
playwright-cli -s="$SESSION" open https://example.com
|
|
14
|
-
playwright-cli -s="$SESSION" click e1
|
|
15
|
-
playwright-cli -s="$SESSION" fill e2 "test"
|
|
16
|
-
|
|
17
|
-
# Stop trace recording
|
|
18
|
-
playwright-cli -s="$SESSION" tracing-stop
|
|
19
|
-
playwright-cli -s="$SESSION" close
|
|
20
|
-
playwright-cli list # verify $SESSION is absent
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Trace Output Files
|
|
24
|
-
|
|
25
|
-
When you start tracing, Playwright creates a `traces/` directory with several files:
|
|
26
|
-
|
|
27
|
-
### `trace-{timestamp}.trace`
|
|
28
|
-
|
|
29
|
-
**Action log** - The main trace file containing:
|
|
30
|
-
- Every action performed (clicks, fills, navigations)
|
|
31
|
-
- DOM snapshots before and after each action
|
|
32
|
-
- Screenshots at each step
|
|
33
|
-
- Timing information
|
|
34
|
-
- Console messages
|
|
35
|
-
- Source locations
|
|
36
|
-
|
|
37
|
-
### `trace-{timestamp}.network`
|
|
38
|
-
|
|
39
|
-
**Network log** - Complete network activity:
|
|
40
|
-
- All HTTP requests and responses
|
|
41
|
-
- Request headers and bodies
|
|
42
|
-
- Response headers and bodies
|
|
43
|
-
- Timing (DNS, connect, TLS, TTFB, download)
|
|
44
|
-
- Resource sizes
|
|
45
|
-
- Failed requests and errors
|
|
46
|
-
|
|
47
|
-
### `resources/`
|
|
48
|
-
|
|
49
|
-
**Resources directory** - Cached resources:
|
|
50
|
-
- Images, fonts, stylesheets, scripts
|
|
51
|
-
- Response bodies for replay
|
|
52
|
-
- Assets needed to reconstruct page state
|
|
53
|
-
|
|
54
|
-
## What Traces Capture
|
|
55
|
-
|
|
56
|
-
| Category | Details |
|
|
57
|
-
|----------|---------|
|
|
58
|
-
| **Actions** | Clicks, fills, hovers, keyboard input, navigations |
|
|
59
|
-
| **DOM** | Full DOM snapshot before/after each action |
|
|
60
|
-
| **Screenshots** | Visual state at each step |
|
|
61
|
-
| **Network** | All requests, responses, headers, bodies, timing |
|
|
62
|
-
| **Console** | All console.log, warn, error messages |
|
|
63
|
-
| **Timing** | Precise timing for each operation |
|
|
64
|
-
|
|
65
|
-
## Use Cases
|
|
66
|
-
|
|
67
|
-
### Debugging Failed Actions
|
|
68
|
-
|
|
69
|
-
```bash
|
|
70
|
-
SESSION="trace-failure-$(date +%s)-$$"
|
|
71
|
-
playwright-cli -s="$SESSION" tracing-start
|
|
72
|
-
playwright-cli -s="$SESSION" open https://app.example.com
|
|
73
|
-
|
|
74
|
-
# This click fails - why?
|
|
75
|
-
playwright-cli -s="$SESSION" click e5
|
|
76
|
-
|
|
77
|
-
playwright-cli -s="$SESSION" tracing-stop
|
|
78
|
-
playwright-cli -s="$SESSION" close
|
|
79
|
-
playwright-cli list # verify $SESSION is absent
|
|
80
|
-
# Open trace to see DOM state when click was attempted
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
### Analyzing Performance
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
SESSION="trace-performance-$(date +%s)-$$"
|
|
87
|
-
playwright-cli -s="$SESSION" tracing-start
|
|
88
|
-
playwright-cli -s="$SESSION" open https://slow-site.com
|
|
89
|
-
playwright-cli -s="$SESSION" tracing-stop
|
|
90
|
-
playwright-cli -s="$SESSION" close
|
|
91
|
-
playwright-cli list # verify $SESSION is absent
|
|
92
|
-
|
|
93
|
-
# View network waterfall to identify slow resources
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
### Capturing Evidence
|
|
97
|
-
|
|
98
|
-
```bash
|
|
99
|
-
# Record a complete user flow for documentation
|
|
100
|
-
SESSION="trace-evidence-$(date +%s)-$$"
|
|
101
|
-
playwright-cli -s="$SESSION" tracing-start
|
|
102
|
-
|
|
103
|
-
playwright-cli -s="$SESSION" open https://app.example.com/checkout
|
|
104
|
-
playwright-cli -s="$SESSION" fill e1 "4111111111111111"
|
|
105
|
-
playwright-cli -s="$SESSION" fill e2 "12/25"
|
|
106
|
-
playwright-cli -s="$SESSION" fill e3 "123"
|
|
107
|
-
playwright-cli -s="$SESSION" click e4
|
|
108
|
-
|
|
109
|
-
playwright-cli -s="$SESSION" tracing-stop
|
|
110
|
-
playwright-cli -s="$SESSION" close
|
|
111
|
-
playwright-cli list # verify $SESSION is absent
|
|
112
|
-
# Trace shows exact sequence of events
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
## Trace vs Video vs Screenshot
|
|
116
|
-
|
|
117
|
-
| Feature | Trace | Video | Screenshot |
|
|
118
|
-
|---------|-------|-------|------------|
|
|
119
|
-
| **Format** | .trace file | .webm video | .png/.jpeg image |
|
|
120
|
-
| **DOM inspection** | Yes | No | No |
|
|
121
|
-
| **Network details** | Yes | No | No |
|
|
122
|
-
| **Step-by-step replay** | Yes | Continuous | Single frame |
|
|
123
|
-
| **File size** | Medium | Large | Small |
|
|
124
|
-
| **Best for** | Debugging | Demos | Quick capture |
|
|
125
|
-
|
|
126
|
-
## Best Practices
|
|
127
|
-
|
|
128
|
-
### 1. Start Tracing Before the Problem
|
|
129
|
-
|
|
130
|
-
```bash
|
|
131
|
-
# Trace the entire flow, not just the failing step
|
|
132
|
-
SESSION="trace-flow-$(date +%s)-$$"
|
|
133
|
-
playwright-cli -s="$SESSION" tracing-start
|
|
134
|
-
playwright-cli -s="$SESSION" open https://example.com
|
|
135
|
-
# ... all steps leading to the issue ...
|
|
136
|
-
playwright-cli -s="$SESSION" tracing-stop
|
|
137
|
-
playwright-cli -s="$SESSION" close
|
|
138
|
-
playwright-cli list # verify $SESSION is absent
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
### 2. Clean Up Old Traces
|
|
142
|
-
|
|
143
|
-
Traces can consume significant disk space:
|
|
144
|
-
|
|
145
|
-
```bash
|
|
146
|
-
# Remove traces older than 7 days
|
|
147
|
-
find .playwright-cli/traces -mtime +7 -delete
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
## Limitations
|
|
151
|
-
|
|
152
|
-
- Traces add overhead to automation
|
|
153
|
-
- Large traces can consume significant disk space
|
|
154
|
-
- Some dynamic content may not replay perfectly
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
# Video Recording
|
|
2
|
-
|
|
3
|
-
Capture browser automation sessions as video for debugging, documentation, or verification. Produces WebM (VP8/VP9 codec).
|
|
4
|
-
|
|
5
|
-
## Basic Recording
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
# Choose a unique name and record it as owned before opening.
|
|
9
|
-
SESSION="video-demo-$(date +%s)-$$"
|
|
10
|
-
# Open browser first
|
|
11
|
-
playwright-cli -s="$SESSION" open
|
|
12
|
-
|
|
13
|
-
# Start recording
|
|
14
|
-
playwright-cli -s="$SESSION" video-start demo.webm
|
|
15
|
-
|
|
16
|
-
# Add a chapter marker for section transitions
|
|
17
|
-
playwright-cli -s="$SESSION" video-chapter "Getting Started" --description="Opening the homepage" --duration=2000
|
|
18
|
-
|
|
19
|
-
# Navigate and perform actions
|
|
20
|
-
playwright-cli -s="$SESSION" goto https://example.com
|
|
21
|
-
playwright-cli -s="$SESSION" snapshot
|
|
22
|
-
playwright-cli -s="$SESSION" click e1
|
|
23
|
-
|
|
24
|
-
# Add another chapter
|
|
25
|
-
playwright-cli -s="$SESSION" video-chapter "Filling Form" --description="Entering test data" --duration=2000
|
|
26
|
-
playwright-cli -s="$SESSION" fill e2 "test input"
|
|
27
|
-
|
|
28
|
-
# Stop and save
|
|
29
|
-
playwright-cli -s="$SESSION" video-stop
|
|
30
|
-
playwright-cli -s="$SESSION" close
|
|
31
|
-
playwright-cli list # verify $SESSION is absent
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## Best Practices
|
|
35
|
-
|
|
36
|
-
### 1. Use Descriptive Filenames
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
# Include context in filename
|
|
40
|
-
playwright-cli video-start recordings/login-flow-2024-01-15.webm
|
|
41
|
-
playwright-cli video-start recordings/checkout-test-run-42.webm
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
### 2. Record entire hero scripts.
|
|
45
|
-
|
|
46
|
-
When recording a video for the user or as a proof of work, it is best to create a code snippet and execute it with run-code.
|
|
47
|
-
It allows pulling appropriate pauses between the actions and annotating the video. There are new Playwright APIs for that.
|
|
48
|
-
|
|
49
|
-
1) Perform scenario using CLI and take note of all locators and actions. You'll need those locators to request their bounding boxes for highlight.
|
|
50
|
-
2) Create a file with the intended script for video (below). Use pressSequentially w/ delay for nice typing, make reasonable pauses.
|
|
51
|
-
3) In the task-owned unique session, use `playwright-cli -s="$SESSION" run-code --filename your-script.js`, then close that exact session and verify it is absent from `playwright-cli list`, including on errors.
|
|
52
|
-
|
|
53
|
-
**Important**: Overlays are `pointer-events: none` — they do not interfere with page interactions. You can safely keep sticky overlays visible while clicking, filling, or performing any actions on the page.
|
|
54
|
-
|
|
55
|
-
```js
|
|
56
|
-
async page => {
|
|
57
|
-
await page.screencast.start({ path: 'video.webm', size: { width: 1280, height: 800 } });
|
|
58
|
-
await page.goto('https://demo.playwright.dev/todomvc');
|
|
59
|
-
|
|
60
|
-
// Show a chapter card — blurs the page and shows a dialog.
|
|
61
|
-
// Blocks until duration expires, then auto-removes.
|
|
62
|
-
// Use this for simple use cases, but always feel free to hand-craft your own beautiful
|
|
63
|
-
// overlay via await page.screencast.showOverlay().
|
|
64
|
-
await page.screencast.showChapter('Adding Todo Items', {
|
|
65
|
-
description: 'We will add several items to the todo list.',
|
|
66
|
-
duration: 2000,
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
// Perform action
|
|
70
|
-
await page.getByRole('textbox', { name: 'What needs to be done?' }).pressSequentially('Walk the dog', { delay: 60 });
|
|
71
|
-
await page.getByRole('textbox', { name: 'What needs to be done?' }).press('Enter');
|
|
72
|
-
await page.waitForTimeout(1000);
|
|
73
|
-
|
|
74
|
-
// Show next chapter
|
|
75
|
-
await page.screencast.showChapter('Verifying Results', {
|
|
76
|
-
description: 'Checking the item appeared in the list.',
|
|
77
|
-
duration: 2000,
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
// Add a sticky annotation that stays while you perform actions.
|
|
81
|
-
// Overlays are pointer-events: none, so they won't block clicks.
|
|
82
|
-
const annotation = await page.screencast.showOverlay(`
|
|
83
|
-
<div style="position: absolute; top: 8px; right: 8px;
|
|
84
|
-
padding: 6px 12px; background: rgba(0,0,0,0.7);
|
|
85
|
-
border-radius: 8px; font-size: 13px; color: white;">
|
|
86
|
-
✓ Item added successfully
|
|
87
|
-
</div>
|
|
88
|
-
`);
|
|
89
|
-
|
|
90
|
-
// Perform more actions while the annotation is visible
|
|
91
|
-
await page.getByRole('textbox', { name: 'What needs to be done?' }).pressSequentially('Buy groceries', { delay: 60 });
|
|
92
|
-
await page.getByRole('textbox', { name: 'What needs to be done?' }).press('Enter');
|
|
93
|
-
await page.waitForTimeout(1500);
|
|
94
|
-
|
|
95
|
-
// Remove the annotation when done
|
|
96
|
-
await annotation.dispose();
|
|
97
|
-
|
|
98
|
-
// You can also highlight relevant locators and provide contextual annotations.
|
|
99
|
-
const bounds = await page.getByText('Walk the dog').boundingBox();
|
|
100
|
-
await page.screencast.showOverlay(`
|
|
101
|
-
<div style="position: absolute;
|
|
102
|
-
top: ${bounds.y}px;
|
|
103
|
-
left: ${bounds.x}px;
|
|
104
|
-
width: ${bounds.width}px;
|
|
105
|
-
height: ${bounds.height}px;
|
|
106
|
-
border: 1px solid red;">
|
|
107
|
-
</div>
|
|
108
|
-
<div style="position: absolute;
|
|
109
|
-
top: ${bounds.y + bounds.height + 5}px;
|
|
110
|
-
left: ${bounds.x + bounds.width / 2}px;
|
|
111
|
-
transform: translateX(-50%);
|
|
112
|
-
padding: 6px;
|
|
113
|
-
background: #808080;
|
|
114
|
-
border-radius: 10px;
|
|
115
|
-
font-size: 14px;
|
|
116
|
-
color: white;">Check it out, it is right above this text
|
|
117
|
-
</div>
|
|
118
|
-
`, { duration: 2000 });
|
|
119
|
-
|
|
120
|
-
await page.screencast.stop();
|
|
121
|
-
}
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
Embrace creativity, overlays are powerful.
|
|
125
|
-
|
|
126
|
-
### Overlay API Summary
|
|
127
|
-
|
|
128
|
-
| Method | Use Case |
|
|
129
|
-
|--------|----------|
|
|
130
|
-
| `page.screencast.showChapter(title, { description?, duration?, styleSheet? })` | Full-screen chapter card with blurred backdrop — ideal for section transitions |
|
|
131
|
-
| `page.screencast.showOverlay(html, { duration? })` | Custom HTML overlay — use for callouts, labels, highlights |
|
|
132
|
-
| `disposable.dispose()` | Remove a sticky overlay added without duration |
|
|
133
|
-
| `page.screencast.hideOverlays()` / `page.screencast.showOverlays()` | Temporarily hide/show all overlays |
|
|
134
|
-
|
|
135
|
-
## Tracing vs Video
|
|
136
|
-
|
|
137
|
-
| Feature | Video | Tracing |
|
|
138
|
-
|---------|-------|---------|
|
|
139
|
-
| Output | WebM file | Trace file (viewable in Trace Viewer) |
|
|
140
|
-
| Shows | Visual recording | DOM snapshots, network, console, actions |
|
|
141
|
-
| Use case | Demos, documentation | Debugging, analysis |
|
|
142
|
-
| Size | Larger | Smaller |
|
|
143
|
-
|
|
144
|
-
## Limitations
|
|
145
|
-
|
|
146
|
-
- Recording adds slight overhead to automation
|
|
147
|
-
- Large recordings can consume significant disk space
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: spec-wiki
|
|
3
|
-
description: >-
|
|
4
|
-
Use this skill for behavior-changing project work or behavioral specs/contracts:
|
|
5
|
-
write/verify as-is/change behavior from code/tests, find requirements, detect
|
|
6
|
-
spec-code drift/impact, or maintain a spec wiki. Skip mechanical/refactor/
|
|
7
|
-
debug-only changes and code-only impact with no contract/doc work. Not for
|
|
8
|
-
runbooks or general docs.
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Spec Wiki
|
|
12
|
-
|
|
13
|
-
Primary specs are the source of truth. `.spec-wiki/` is only derived navigation
|
|
14
|
-
and freshness metadata. Specs may live anywhere and use any structure.
|
|
15
|
-
|
|
16
|
-
## Router
|
|
17
|
-
|
|
18
|
-
Choose one mode. Read only the referenced file unless the task expands.
|
|
19
|
-
|
|
20
|
-
- One spec: create/update/check/verify → `references/focused-spec.md`.
|
|
21
|
-
- Find/answer from specs → `references/query.md`.
|
|
22
|
-
- First discovery/index build → `references/bootstrap.md`.
|
|
23
|
-
- Refresh/audit/impact/repair → `references/maintenance.md`.
|
|
24
|
-
- Exact CLI/state/config details → `references/index-schema.md`.
|
|
25
|
-
|
|
26
|
-
Do not bootstrap or scan the whole repository for a narrow single-spec task.
|
|
27
|
-
Do not load all specs when the wiki can narrow retrieval.
|
|
28
|
-
|
|
29
|
-
## Invariants
|
|
30
|
-
|
|
31
|
-
- Never invent spec behavior; separate code/tests/docs evidence from inference.
|
|
32
|
-
- Distinguish current (`as-is`) from intended (`change`) behavior.
|
|
33
|
-
- Never treat generated indexes, overviews, catalogs, or TOCs as primary specs.
|
|
34
|
-
- Keep document lifecycle separate from spec type: active/proposed/historical/
|
|
35
|
-
superseded is not the same question as as-is/change.
|
|
36
|
-
- Never infer semantic correctness from hashes alone. Changed inputs require
|
|
37
|
-
verification, not automatic rewriting.
|
|
38
|
-
- After a material production-behavior change, run the post-change checkpoint in
|
|
39
|
-
`references/maintenance.md` before declaring the task complete.
|
|
40
|
-
- Do not force specs into a new layout or template.
|
|
41
|
-
- Do not change production code unless the user asked for implementation.
|
|
42
|
-
|
|
43
|
-
## Bundled CLI
|
|
44
|
-
|
|
45
|
-
When wiki state is involved, use:
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
python3 <SKILL_DIR>/scripts/spec_wiki.py --root <PROJECT_ROOT> <command>
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
Commands: `discover`, `record`, `verify`, `relate`, `search`, `changes`, `impact`,
|
|
52
|
-
`remove`, `status`, `audit`, `affected`, `render`, `validate`.
|
|
53
|
-
|
|
54
|
-
The CLI owns deterministic discovery, relationships, hashes, state, and
|
|
55
|
-
rendering. The agent owns semantic classification and verification.
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"skill_name": "spec-wiki",
|
|
3
|
-
"evals": [
|
|
4
|
-
{
|
|
5
|
-
"id": 1,
|
|
6
|
-
"prompt": "We are going to change the session refresh contract in the supplied fixture: a transient token-load failure should be retried exactly once, while a second failure must still propagate. Before implementation, inspect the fixture code and tests and write a compact change spec named session-refresh-spec.md in the run output directory. Do not modify production code and do not bootstrap a repository-wide spec wiki for this narrow task.",
|
|
7
|
-
"expected_output": "A focused Change spec grounded in the fixture's current code/tests, with intended retry behavior, edge cases, verification, evidence/unknowns, and no production-code or wiki-state mutation.",
|
|
8
|
-
"files": [
|
|
9
|
-
"evals/files/focused/src/session.ts",
|
|
10
|
-
"evals/files/focused/tests/session.test.ts"
|
|
11
|
-
],
|
|
12
|
-
"expectations": [
|
|
13
|
-
"The output contains a spec explicitly identified as Change/intended behavior.",
|
|
14
|
-
"The spec states that current fixture behavior performs one token-load attempt with no retry.",
|
|
15
|
-
"The intended behavior retries a transient token-load failure exactly once and propagates a second failure.",
|
|
16
|
-
"The spec contains a concrete verification path covering success, retry-success, and retry-failure behavior.",
|
|
17
|
-
"The spec explicitly distinguishes confirmed code/test evidence from inference or unknowns instead of presenting every claim at the same confidence level.",
|
|
18
|
-
"The run does not modify fixture production code and does not create .spec-wiki state for this narrow task.",
|
|
19
|
-
"The with-skill run reads focused-spec.md and does not read bootstrap.md, maintenance.md, query.md, or index-schema.md unless the task actually expands to need them."
|
|
20
|
-
]
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"id": 2,
|
|
24
|
-
"prompt": "In the supplied fixture, answer this narrowly from the project's primary specifications: what are the cancellation semantics for background jobs, and which primary spec defines them? There is also an overview and a retry document nearby. Do not build a wiki and do not treat an overview/index summary as primary evidence. Include source paths in the answer.",
|
|
25
|
-
"expected_output": "A concise answer grounded in the cancellation primary spec, distinguishing it from the overview and unrelated retry spec, without creating wiki state.",
|
|
26
|
-
"files": [
|
|
27
|
-
"evals/files/query/docs/spec-overview.md",
|
|
28
|
-
"evals/files/query/features/jobs/cancellation-contract.md",
|
|
29
|
-
"evals/files/query/features/jobs/retry-spec.md",
|
|
30
|
-
"evals/files/query/docs/how-to-run-jobs.md"
|
|
31
|
-
],
|
|
32
|
-
"expectations": [
|
|
33
|
-
"The answer identifies features/jobs/cancellation-contract.md as the primary source.",
|
|
34
|
-
"The answer states that cancellation is idempotent, running jobs become cancelled, and already terminal jobs remain terminal.",
|
|
35
|
-
"The overview is not cited as primary evidence for the behavior claim.",
|
|
36
|
-
"The run does not create .spec-wiki state or perform repository-wide bootstrap.",
|
|
37
|
-
"The with-skill run reads query.md and does not read bootstrap.md or maintenance.md unless the task actually expands to need them."
|
|
38
|
-
]
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"id": 3,
|
|
42
|
-
"prompt": "Bootstrap a Spec Wiki for the supplied standalone fixture. Its specification knowledge is intentionally scattered across different folders and formats, and docs/overview.md is only a hand-written catalog. Build the wiki under the fixture root, classify the useful documents, exclude the catalog and user guide from primary specs, and report what was indexed. Do not edit any primary source document.",
|
|
43
|
-
"expected_output": "A schema-v2 .spec-wiki index/state containing the payment requirements and RFC as primary spec knowledge, with lifecycle recorded, overview classified as meta-index, guide excluded from primary specs, and bootstrap entries left unverified until a separate semantic code/test review; primary sources remain unchanged.",
|
|
44
|
-
"files": [
|
|
45
|
-
"evals/files/bootstrap/requirements/payment-behavior.md",
|
|
46
|
-
"evals/files/bootstrap/architecture/rfc-007.md",
|
|
47
|
-
"evals/files/bootstrap/docs/overview.md",
|
|
48
|
-
"evals/files/bootstrap/docs/how-to-pay.md",
|
|
49
|
-
"evals/files/bootstrap/src/payments.ts",
|
|
50
|
-
"evals/files/bootstrap/tests/payments.test.ts"
|
|
51
|
-
],
|
|
52
|
-
"expectations": [
|
|
53
|
-
"The generated wiki indexes requirements/payment-behavior.md as primary spec knowledge.",
|
|
54
|
-
"The generated wiki indexes architecture/rfc-007.md as primary spec knowledge despite the different directory/convention.",
|
|
55
|
-
"docs/overview.md is classified as meta-index or otherwise excluded from primary specs.",
|
|
56
|
-
"docs/how-to-pay.md is classified as guide/other or otherwise excluded from primary specs.",
|
|
57
|
-
"Production source and test files are treated as evidence/relationships, not as primary specification documents themselves.",
|
|
58
|
-
"Bootstrap classification does not create a semantic verification baseline: newly indexed primary specs are unverified rather than fresh.",
|
|
59
|
-
"Primary entries record lifecycle separately from as-is/change type, so current requirements and an intended RFC are not forced into the same precedence state.",
|
|
60
|
-
"The generated state uses schemaVersion 2 and the generated index is a compact routing projection rather than the primary source of detailed claims.",
|
|
61
|
-
"The generated index is derived navigation and primary source documents are not modified.",
|
|
62
|
-
"The with-skill run reads bootstrap.md; it reads index-schema.md only if exact CLI/state details are needed and does not read focused-spec.md/query.md/maintenance.md without a concrete need."
|
|
63
|
-
]
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"id": 4,
|
|
67
|
-
"prompt": "Maintenance scenario: initialize the supplied fixture as a Git repo and commit only docs/session-refresh.md and src/session.ts as the baseline; keep incoming/refresh-worker.ts outside that baseline. Build the minimal Spec Wiki entry for the existing active as-is session refresh contract and semantically verify it. Then move incoming/refresh-worker.ts to src/refresh-worker.ts as the only post-baseline production change. Run the required post-change maintenance checkpoint. The new worker implements the same background refresh retry contract but is not yet in the spec's tracked relations. Do not change behavioral claims unless evidence shows drift. Finish with a valid rendered wiki and report the impact/repair steps.",
|
|
68
|
-
"expected_output": "The maintenance workflow notices that the new worker has no known relation, semantically associates it with the existing session refresh spec despite an initially empty direct affected result for that path, repairs the durable relation, verifies the unchanged contract against both implementation surfaces, and ends fresh.",
|
|
69
|
-
"files": [
|
|
70
|
-
"evals/files/maintenance/new-relation/docs/session-refresh.md",
|
|
71
|
-
"evals/files/maintenance/new-relation/src/session.ts",
|
|
72
|
-
"evals/files/maintenance/new-relation/incoming/refresh-worker.ts"
|
|
73
|
-
],
|
|
74
|
-
"expectations": [
|
|
75
|
-
"The post-change workflow runs impact or equivalent task-scoped coverage analysis and treats src/refresh-worker.ts as an uncovered changed path before relation repair.",
|
|
76
|
-
"The workflow performs semantic spec retrieval/inspection even though the new path has no pre-existing affected relation.",
|
|
77
|
-
"The final primary entry for docs/session-refresh.md tracks src/refresh-worker.ts as a durable implementation relation.",
|
|
78
|
-
"The behavioral retry contract is not rewritten merely because a new implementation file appeared; it remains exactly-once retry with second failure propagation.",
|
|
79
|
-
"After relation repair the old verification baseline is not trusted until verify is run again.",
|
|
80
|
-
"Final status reports the current session refresh spec fresh with no unresolved relation drift."
|
|
81
|
-
]
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
"id": 5,
|
|
85
|
-
"prompt": "Maintenance scenario: initialize the supplied fixture as Git, commit docs/old-job-contract.md and src/job.ts, record that document as an active as-is primary spec, and verify it. Then perform `git mv docs/old-job-contract.md contracts/job-cancellation.md` without changing its behavior. Run Spec Wiki maintenance for the move. Preserve the contract's lifecycle/type/summary/implementation relation, and do not leave duplicate current entries.",
|
|
86
|
-
"expected_output": "The move is recognized as an old missing tracked source plus a new document candidate; the new path is recorded and verified before the old metadata is removed, leaving one fresh active primary spec at the new path.",
|
|
87
|
-
"files": [
|
|
88
|
-
"evals/files/maintenance/move/docs/old-job-contract.md",
|
|
89
|
-
"evals/files/maintenance/move/src/job.ts"
|
|
90
|
-
],
|
|
91
|
-
"expectations": [
|
|
92
|
-
"Impact/change inspection recognizes the old tracked primary path as missing/moved and the new path as a document requiring classification.",
|
|
93
|
-
"contracts/job-cancellation.md becomes the active as-is primary entry with the src/job.ts relation preserved.",
|
|
94
|
-
"The new path is verified before or as part of completing the move workflow.",
|
|
95
|
-
"docs/old-job-contract.md metadata is removed only after the new source has been recorded.",
|
|
96
|
-
"Final state contains no duplicate current primary entry for the old path and validates cleanly."
|
|
97
|
-
]
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
"id": 6,
|
|
101
|
-
"prompt": "Maintenance scenario: initialize Git and commit only src/capture.ts as the baseline. Keep incoming/capture.txt outside the baseline, then move it to notes/capture.txt as a new document in the current task. Run the Spec Wiki post-change maintenance checkpoint. The text file intentionally has a neutral filename, no headings, and no path hints; only its contents state the current idempotency contract. Do not discard it because of a zero/below-threshold heuristic score. Inspect implementation evidence to determine the durable relation.",
|
|
102
|
-
"expected_output": "The changed-document path is inspected regardless of score, semantically classified as a current primary spec, related to src/capture.ts, verified, rendered, and validated.",
|
|
103
|
-
"files": [
|
|
104
|
-
"evals/files/maintenance/low-signal/src/capture.ts",
|
|
105
|
-
"evals/files/maintenance/low-signal/incoming/capture.txt"
|
|
106
|
-
],
|
|
107
|
-
"expectations": [
|
|
108
|
-
"The new notes/capture.txt is surfaced for classification even though its discovery score is zero or below the normal threshold.",
|
|
109
|
-
"The document is classified from its contents rather than its location/name and becomes an as-is active primary spec.",
|
|
110
|
-
"The primary entry tracks src/capture.ts and has a non-empty semantic summary/topic metadata.",
|
|
111
|
-
"The entry is verified only after inspecting the implementation evidence, then the wiki renders/validates cleanly."
|
|
112
|
-
]
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
"id": 7,
|
|
116
|
-
"prompt": "Negative maintenance control: initialize Git and commit docs/auth-contract.md plus src/auth.ts. Record/verify the active auth spec. Then move incoming/telemetry-format.ts to src/telemetry-format.ts as the only new production file. Run the post-change checkpoint. The telemetry formatting helper is unrelated to authentication. Perform the mandatory uncovered-path semantic sweep, but do not invent a spec relation or modify the auth contract just to make coverage non-empty.",
|
|
117
|
-
"expected_output": "The new telemetry path is reported as uncovered, the semantic sweep explicitly concludes it does not affect the auth contract, no false relation/spec edit is introduced, and the existing auth spec remains valid/fresh.",
|
|
118
|
-
"files": [
|
|
119
|
-
"evals/files/maintenance/no-impact/docs/auth-contract.md",
|
|
120
|
-
"evals/files/maintenance/no-impact/src/auth.ts",
|
|
121
|
-
"evals/files/maintenance/no-impact/incoming/telemetry-format.ts"
|
|
122
|
-
],
|
|
123
|
-
"expectations": [
|
|
124
|
-
"The workflow does not stop at an empty affected result; it semantically inspects the uncovered telemetry path.",
|
|
125
|
-
"No inferred relation from docs/auth-contract.md to src/telemetry-format.ts is added.",
|
|
126
|
-
"The auth spec's behavioral claims are not modified.",
|
|
127
|
-
"The final report records a semantic no-impact decision rather than pretending every changed path must belong to a spec.",
|
|
128
|
-
"The existing auth spec remains fresh and state validates cleanly."
|
|
129
|
-
]
|
|
130
|
-
}
|
|
131
|
-
]
|
|
132
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# RFC 007 — Payment timeout contract
|
|
2
|
-
|
|
3
|
-
## Goal
|
|
4
|
-
|
|
5
|
-
Define the intended timeout contract for payment capture.
|
|
6
|
-
|
|
7
|
-
## Behavior
|
|
8
|
-
|
|
9
|
-
Capture requests should time out after 10 seconds and return a retryable timeout
|
|
10
|
-
error without claiming that the payment failed at the provider.
|
|
11
|
-
|
|
12
|
-
## Non-goals
|
|
13
|
-
|
|
14
|
-
This document does not define provider reconciliation.
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# Payment docs index
|
|
2
|
-
|
|
3
|
-
This catalog links the current payment documents:
|
|
4
|
-
|
|
5
|
-
- [Requirements](../requirements/payment-behavior.md)
|
|
6
|
-
- [Timeout RFC](../architecture/rfc-007.md)
|
|
7
|
-
- [How-to](./how-to-pay.md)
|
|
8
|
-
|
|
9
|
-
Use the linked primary documents for actual behavior.
|