@tea-agent/loop-agent 0.13.0-alpha.0 → 0.13.0

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.
Files changed (199) hide show
  1. package/AGENTS.md +4 -0
  2. package/CHANGELOG.md +57 -53
  3. package/README.md +12 -3
  4. package/dist/application/dag/generate-task-dag.js +28 -58
  5. package/dist/application/evaluation/candidate-hash.js +75 -0
  6. package/dist/application/evaluation/candidate.js +52 -0
  7. package/dist/application/evaluation/replay.js +289 -0
  8. package/dist/application/evaluation/types.js +130 -0
  9. package/dist/cli/command-definitions.js +17 -4
  10. package/dist/cli/program.js +8 -4
  11. package/dist/commands/eval.js +235 -0
  12. package/dist/commands/init.js +131 -24
  13. package/dist/executors/pi-sdk-executor.js +38 -24
  14. package/dist/executors/shell-executor.js +226 -15
  15. package/dist/executors/shell-presets.js +20 -0
  16. package/dist/executors/shell-verification.js +7 -0
  17. package/dist/governance/manifest-types.js +1 -0
  18. package/dist/infrastructure/evaluation/candidate-store.js +439 -0
  19. package/dist/infrastructure/evaluation/store.js +40 -0
  20. package/dist/task/config-types.js +23 -0
  21. package/dist/worker/observe/routes.js +18 -3
  22. package/dist/worker/observe/spec-evidence.js +1 -1
  23. package/dist/worker/observe/static/dom.js +160 -1
  24. package/dist/worker/observe/static/state.js +14 -0
  25. package/dist/worker/observe/static/views/dag-inspector.js +35 -4
  26. package/dist/worker/observe/static/views/dag.js +9 -0
  27. package/dist/worker/observe/static/views/dashboard.js +702 -445
  28. package/dist/worker/observe/static/views/session-timeline.js +15 -1
  29. package/dist/workflows/dag/backend-test-analysis-contract.js +120 -0
  30. package/dist/workflows/dag/backend-test-case-manifest.js +503 -0
  31. package/dist/workflows/dag/backend-test-execution-contract.js +353 -0
  32. package/dist/workflows/dag/backend-test-result-contract.js +568 -0
  33. package/dist/workflows/dag/decision-envelope.js +57 -2
  34. package/dist/workflows/dag/dynamic-runtime/map.js +90 -2
  35. package/dist/workflows/dag/frontend-implementation-contract.js +240 -0
  36. package/dist/workflows/dag/frontend-project-capability.js +309 -0
  37. package/dist/workflows/dag/frontend-repair.js +341 -0
  38. package/dist/workflows/dag/frontend-risk.js +161 -0
  39. package/dist/workflows/dag/frontend-verification-trace.js +190 -0
  40. package/dist/workflows/dag/init-hybrid.js +2407 -297
  41. package/dist/workflows/dag/node-execution.js +9 -0
  42. package/dist/workflows/dag/prompt.js +9 -0
  43. package/dist/workflows/dag/repair-artifact.js +43 -3
  44. package/dist/workflows/dag/report.js +35 -1
  45. package/dist/workflows/dag/runner.js +28 -2
  46. package/dist/workflows/dag/skill-instructions.js +4 -2
  47. package/dist/workflows/dag/task-demand-routing.js +383 -0
  48. package/dist/workflows/dag/types.js +71 -13
  49. package/dist/workflows/dag/upstream-artifacts.js +1 -0
  50. package/dist/workflows/dag/validate.js +59 -1
  51. package/docs/README.md +6 -3
  52. package/docs/agent-dag-recovery-playbook.md +5 -3
  53. package/docs/agent-dag-runner.md +3 -3
  54. package/docs/architecture/README.md +3 -3
  55. package/docs/architecture/dag-execution.md +1 -1
  56. package/docs/architecture/evolution.md +13 -13
  57. package/docs/architecture/facts-and-state.md +1 -1
  58. package/docs/architecture/runtime-boundaries.md +7 -7
  59. package/docs/architecture/system-overview.md +3 -3
  60. package/docs/architecture/worker-and-feature.md +3 -3
  61. package/docs/design/README.md +124 -42
  62. package/docs/development-principles.md +4 -4
  63. package/docs/exec-plans/active/README.md +12 -11
  64. package/docs/exec-plans/completed/README.md +33 -0
  65. package/docs/feature-workflow.md +114 -39
  66. package/docs/init-surface.manifest.json +30 -3
  67. package/docs/loop-agent-harness.md +9 -8
  68. package/docs/production-readiness.md +1 -1
  69. package/docs/progress/README.md +23 -1
  70. package/docs/reports/README.md +65 -6
  71. package/docs/skills/vetted-skill-registry.md +2 -0
  72. package/docs/templates/agent-dag.schema.json +29 -1
  73. package/docs/templates/agent-dag.supervised-implementation.json +127 -8
  74. package/docs/templates/backend-test-analysis.schema.json +44 -0
  75. package/docs/templates/backend-test-case-manifest.schema.json +190 -0
  76. package/docs/templates/backend-test-dag.classify.prompt.md +75 -0
  77. package/docs/templates/backend-test-dag.generate-pytest.prompt.md +81 -16
  78. package/docs/templates/backend-test-dag.json +311 -40
  79. package/docs/templates/backend-test-dag.retrospect.prompt.md +44 -30
  80. package/docs/templates/backend-test-dag.review-cases.prompt.md +10 -8
  81. package/docs/templates/backend-test-execution.schema.json +133 -0
  82. package/docs/templates/backend-test-result.schema.json +99 -0
  83. package/docs/templates/branch-merge-report.md +93 -0
  84. package/docs/templates/frontend-design-contract.md +9 -0
  85. package/docs/templates/frontend-eval/fixtures/failures/01-type-build-error.md +17 -0
  86. package/docs/templates/frontend-eval/fixtures/failures/02-unit-component-test-fail.md +16 -0
  87. package/docs/templates/frontend-eval/fixtures/failures/03-fixture-schema-drift.md +16 -0
  88. package/docs/templates/frontend-eval/fixtures/failures/04-missing-loading-empty-error-state.md +16 -0
  89. package/docs/templates/frontend-eval/fixtures/failures/05-forbidden-write-writeset-expansion.md +16 -0
  90. package/docs/templates/frontend-eval/fixtures/failures/06-unapproved-dependency-add.md +16 -0
  91. package/docs/templates/frontend-eval/fixtures/failures/07-mock-production-on.md +21 -0
  92. package/docs/templates/frontend-eval/fixtures/functional/01-simple-component-style.md +29 -0
  93. package/docs/templates/frontend-eval/fixtures/functional/02-form-validation.md +28 -0
  94. package/docs/templates/frontend-eval/fixtures/functional/03-list-detail-page.md +28 -0
  95. package/docs/templates/frontend-eval/fixtures/functional/04-api-mock.md +29 -0
  96. package/docs/templates/frontend-eval/fixtures/functional/05-permission-auth-gated-ui.md +27 -0
  97. package/docs/templates/frontend-eval/fixtures/functional/06-ssr-server-client-boundary.md +28 -0
  98. package/docs/templates/frontend-eval/fixtures/functional/07-shared-public-component-api.md +28 -0
  99. package/docs/templates/frontend-eval/fixtures/functional/08-pure-local-no-remote.md +27 -0
  100. package/docs/templates/frontend-eval/metrics.md +138 -0
  101. package/docs/templates/frontend-eval/smoke-targets.md +53 -0
  102. package/docs/templates/frontend-implementation-contract.schema.json +27 -0
  103. package/docs/templates/frontend-task-constraints.md +10 -0
  104. package/docs/templates/frontend-task-requirement.md +9 -0
  105. package/docs/templates/frontend-test-dag.generate-cases.prompt.md +5 -0
  106. package/docs/templates/frontend-test-dag.json +23 -0
  107. package/docs/templates/frontend-test-dag.retrieve-context.prompt.md +3 -0
  108. package/docs/templates/frontend-test-dag.retrospect.prompt.md +3 -0
  109. package/docs/templates/frontend-test-dag.review-cases.prompt.md +3 -0
  110. package/docs/templates/frontend-test-dag.review-execution.prompt.md +3 -0
  111. package/docs/templates/knowledge-graph-bootstrap-dag.json +1 -1
  112. package/docs/templates/knowledge-sync-dag.json +1 -0
  113. package/docs/verification-matrix.md +4 -1
  114. package/examples/decision-gate-agent-dag.json +4 -4
  115. package/examples/hybrid-loop-agent-dag.json +1 -1
  116. package/package.json +2 -2
  117. package/scripts/kb-bootstrap-init-skeleton.sh +2 -1
  118. package/scripts/kb-graph-incremental-prepare.mjs +19 -5
  119. package/scripts/kb-graph-promote.mjs +12 -1
  120. package/skills/ai-engineering-context/SKILL.md +2 -2
  121. package/skills/analyze-product-dependencies/SKILL.md +67 -0
  122. package/skills/analyze-product-dependencies/agents/openai.yaml +4 -0
  123. package/skills/analyze-product-dependencies/references/api-documentation-schema.md +30 -0
  124. package/skills/analyze-product-dependencies/references/dependency-analysis-schema.md +28 -0
  125. package/skills/analyze-product-dependencies/references/example.md +76 -0
  126. package/skills/analyze-product-dependencies/references/forward-test-cases.md +35 -0
  127. package/skills/analyze-product-dependencies/references/input-contract.md +11 -0
  128. package/skills/analyze-product-dependencies/references/scouting-rules.md +61 -0
  129. package/skills/analyze-product-dependencies/scripts/test-validators.mjs +267 -0
  130. package/skills/analyze-product-dependencies/scripts/validate-api-documentation.mjs +101 -0
  131. package/skills/analyze-product-dependencies/scripts/validate-dependency-analysis.mjs +142 -0
  132. package/skills/analyze-product-dependencies/scripts/validate-product-requirement-input.mjs +76 -0
  133. package/skills/analyze-product-dependencies/scripts/validation-helpers.mjs +146 -0
  134. package/skills/analyze-product-requirements/SKILL.md +90 -0
  135. package/skills/analyze-product-requirements/agents/openai.yaml +4 -0
  136. package/skills/analyze-product-requirements/references/acceptance-criteria.md +91 -0
  137. package/skills/analyze-product-requirements/references/clarification-and-knowledge.md +56 -0
  138. package/skills/analyze-product-requirements/references/example.md +86 -0
  139. package/skills/analyze-product-requirements/references/forward-test-cases.md +66 -0
  140. package/skills/analyze-product-requirements/references/product-analysis-schema.md +32 -0
  141. package/skills/analyze-product-requirements/references/product-requirement-schema.md +33 -0
  142. package/skills/analyze-product-requirements/references/requirement-clarification-schema.md +35 -0
  143. package/skills/analyze-product-requirements/scripts/test-validators.mjs +193 -0
  144. package/skills/analyze-product-requirements/scripts/validate-product-analysis.mjs +69 -0
  145. package/skills/analyze-product-requirements/scripts/validate-product-requirement.mjs +97 -0
  146. package/skills/analyze-product-requirements/scripts/validate-requirement-clarification.mjs +98 -0
  147. package/skills/analyze-product-requirements/scripts/validation-helpers.mjs +156 -0
  148. package/skills/browser-tools/SKILL.md +196 -0
  149. package/skills/browser-tools/browser-content.js +103 -0
  150. package/skills/browser-tools/browser-cookies.js +35 -0
  151. package/skills/browser-tools/browser-eval.js +53 -0
  152. package/skills/browser-tools/browser-hn-scraper.js +108 -0
  153. package/skills/browser-tools/browser-nav.js +44 -0
  154. package/skills/browser-tools/browser-pick.js +162 -0
  155. package/skills/browser-tools/browser-screenshot.js +34 -0
  156. package/skills/browser-tools/browser-start.js +86 -0
  157. package/skills/browser-tools/package-lock.json +2556 -0
  158. package/skills/browser-tools/package.json +19 -0
  159. package/skills/frontend-design-review/SKILL.md +6 -1
  160. package/skills/frontend-design-review/references/review-checklist.md +25 -4
  161. package/skills/frontend-implementation/SKILL.md +25 -30
  162. package/skills/frontend-implementation/references/code-standards.md +20 -22
  163. package/skills/frontend-implementation/references/node-contracts.md +17 -53
  164. package/skills/frontend-review/SKILL.md +10 -4
  165. package/skills/frontend-review/references/review-findings.md +8 -3
  166. package/skills/frontend-verification/SKILL.md +22 -9
  167. package/skills/frontend-verification/references/verification-checklist.md +17 -5
  168. package/skills/grill-with-docs/SKILL.md +5 -5
  169. package/skills/grill-with-docs/adr-format.md +3 -3
  170. package/skills/init-capability-evolution/SKILL.md +5 -5
  171. package/skills/loop-agent/SKILL.md +5 -5
  172. package/skills/loop-agent/references/README.md +3 -3
  173. package/skills/loop-agent/references/command-reference.md +98 -24
  174. package/skills/loop-agent/references/docs-converge.md +15 -15
  175. package/skills/loop-agent/references/harness-policy.md +2 -2
  176. package/skills/loop-agent/references/hybrid-dag.md +32 -22
  177. package/skills/loop-agent/references/multi-worktree.md +1 -1
  178. package/skills/loop-agent/references/orchestrator-and-interventions.md +8 -8
  179. package/skills/loop-agent/references/task-workflow.md +1 -1
  180. package/skills/loop-agent/references/verification-and-failure-handling.md +6 -4
  181. package/skills/playwright-cli/SKILL.md +420 -0
  182. package/skills/playwright-cli/references/element-attributes.md +23 -0
  183. package/skills/playwright-cli/references/playwright-tests.md +39 -0
  184. package/skills/playwright-cli/references/request-mocking.md +87 -0
  185. package/skills/playwright-cli/references/running-code.md +241 -0
  186. package/skills/playwright-cli/references/session-management.md +225 -0
  187. package/skills/playwright-cli/references/storage-state.md +275 -0
  188. package/skills/playwright-cli/references/test-generation.md +433 -0
  189. package/skills/playwright-cli/references/tracing.md +139 -0
  190. package/skills/playwright-cli/references/video-recording.md +143 -0
  191. package/skills/playwright-cli-case-generator/SKILL.md +74 -0
  192. package/skills/requesting-code-review/SKILL.md +1 -1
  193. package/skills/systematic-debugging/CREATION-LOG.md +3 -3
  194. package/skills/systematic-debugging/SKILL.md +1 -1
  195. package/skills/systematic-debugging/test-academic.md +1 -1
  196. package/skills/systematic-debugging/test-pressure-1.md +1 -1
  197. package/skills/systematic-debugging/test-pressure-2.md +1 -1
  198. package/skills/systematic-debugging/test-pressure-3.md +1 -1
  199. package/skills/verification-before-completion/SKILL.md +1 -1
@@ -0,0 +1,139 @@
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
+ # Start trace recording
9
+ playwright-cli tracing-start
10
+
11
+ # Perform actions
12
+ playwright-cli open https://example.com
13
+ playwright-cli click e1
14
+ playwright-cli fill e2 "test"
15
+
16
+ # Stop trace recording
17
+ playwright-cli tracing-stop
18
+ ```
19
+
20
+ ## Trace Output Files
21
+
22
+ When you start tracing, Playwright creates a `traces/` directory with several files:
23
+
24
+ ### `trace-{timestamp}.trace`
25
+
26
+ **Action log** - The main trace file containing:
27
+ - Every action performed (clicks, fills, navigations)
28
+ - DOM snapshots before and after each action
29
+ - Screenshots at each step
30
+ - Timing information
31
+ - Console messages
32
+ - Source locations
33
+
34
+ ### `trace-{timestamp}.network`
35
+
36
+ **Network log** - Complete network activity:
37
+ - All HTTP requests and responses
38
+ - Request headers and bodies
39
+ - Response headers and bodies
40
+ - Timing (DNS, connect, TLS, TTFB, download)
41
+ - Resource sizes
42
+ - Failed requests and errors
43
+
44
+ ### `resources/`
45
+
46
+ **Resources directory** - Cached resources:
47
+ - Images, fonts, stylesheets, scripts
48
+ - Response bodies for replay
49
+ - Assets needed to reconstruct page state
50
+
51
+ ## What Traces Capture
52
+
53
+ | Category | Details |
54
+ |----------|---------|
55
+ | **Actions** | Clicks, fills, hovers, keyboard input, navigations |
56
+ | **DOM** | Full DOM snapshot before/after each action |
57
+ | **Screenshots** | Visual state at each step |
58
+ | **Network** | All requests, responses, headers, bodies, timing |
59
+ | **Console** | All console.log, warn, error messages |
60
+ | **Timing** | Precise timing for each operation |
61
+
62
+ ## Use Cases
63
+
64
+ ### Debugging Failed Actions
65
+
66
+ ```bash
67
+ playwright-cli tracing-start
68
+ playwright-cli open https://app.example.com
69
+
70
+ # This click fails - why?
71
+ playwright-cli click e5
72
+
73
+ playwright-cli tracing-stop
74
+ # Open trace to see DOM state when click was attempted
75
+ ```
76
+
77
+ ### Analyzing Performance
78
+
79
+ ```bash
80
+ playwright-cli tracing-start
81
+ playwright-cli open https://slow-site.com
82
+ playwright-cli tracing-stop
83
+
84
+ # View network waterfall to identify slow resources
85
+ ```
86
+
87
+ ### Capturing Evidence
88
+
89
+ ```bash
90
+ # Record a complete user flow for documentation
91
+ playwright-cli tracing-start
92
+
93
+ playwright-cli open https://app.example.com/checkout
94
+ playwright-cli fill e1 "4111111111111111"
95
+ playwright-cli fill e2 "12/25"
96
+ playwright-cli fill e3 "123"
97
+ playwright-cli click e4
98
+
99
+ playwright-cli tracing-stop
100
+ # Trace shows exact sequence of events
101
+ ```
102
+
103
+ ## Trace vs Video vs Screenshot
104
+
105
+ | Feature | Trace | Video | Screenshot |
106
+ |---------|-------|-------|------------|
107
+ | **Format** | .trace file | .webm video | .png/.jpeg image |
108
+ | **DOM inspection** | Yes | No | No |
109
+ | **Network details** | Yes | No | No |
110
+ | **Step-by-step replay** | Yes | Continuous | Single frame |
111
+ | **File size** | Medium | Large | Small |
112
+ | **Best for** | Debugging | Demos | Quick capture |
113
+
114
+ ## Best Practices
115
+
116
+ ### 1. Start Tracing Before the Problem
117
+
118
+ ```bash
119
+ # Trace the entire flow, not just the failing step
120
+ playwright-cli tracing-start
121
+ playwright-cli open https://example.com
122
+ # ... all steps leading to the issue ...
123
+ playwright-cli tracing-stop
124
+ ```
125
+
126
+ ### 2. Clean Up Old Traces
127
+
128
+ Traces can consume significant disk space:
129
+
130
+ ```bash
131
+ # Remove traces older than 7 days
132
+ find .playwright-cli/traces -mtime +7 -delete
133
+ ```
134
+
135
+ ## Limitations
136
+
137
+ - Traces add overhead to automation
138
+ - Large traces can consume significant disk space
139
+ - Some dynamic content may not replay perfectly
@@ -0,0 +1,143 @@
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
+ # Open browser first
9
+ playwright-cli open
10
+
11
+ # Start recording
12
+ playwright-cli video-start demo.webm
13
+
14
+ # Add a chapter marker for section transitions
15
+ playwright-cli video-chapter "Getting Started" --description="Opening the homepage" --duration=2000
16
+
17
+ # Navigate and perform actions
18
+ playwright-cli goto https://example.com
19
+ playwright-cli snapshot
20
+ playwright-cli click e1
21
+
22
+ # Add another chapter
23
+ playwright-cli video-chapter "Filling Form" --description="Entering test data" --duration=2000
24
+ playwright-cli fill e2 "test input"
25
+
26
+ # Stop and save
27
+ playwright-cli video-stop
28
+ ```
29
+
30
+ ## Best Practices
31
+
32
+ ### 1. Use Descriptive Filenames
33
+
34
+ ```bash
35
+ # Include context in filename
36
+ playwright-cli video-start recordings/login-flow-2024-01-15.webm
37
+ playwright-cli video-start recordings/checkout-test-run-42.webm
38
+ ```
39
+
40
+ ### 2. Record entire hero scripts.
41
+
42
+ 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.
43
+ It allows inserting appropriate pauses between the actions and annotating the video. There are new Playwright APIs for that.
44
+
45
+ 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.
46
+ 2) Create a file with the intended script for video (below). Use pressSequentially w/ delay for nice typing, make reasonable pauses.
47
+ 3) Use playwright-cli run-code --filename your-script.js
48
+
49
+ **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.
50
+
51
+ ```js
52
+ async page => {
53
+ await page.screencast.start({ path: 'video.webm', size: { width: 1280, height: 800 } });
54
+ await page.goto('https://demo.playwright.dev/todomvc');
55
+
56
+ // Show a chapter card — blurs the page and shows a dialog.
57
+ // Blocks until duration expires, then auto-removes.
58
+ // Use this for simple use cases, but always feel free to hand-craft your own beautiful
59
+ // overlay via await page.screencast.showOverlay().
60
+ await page.screencast.showChapter('Adding Todo Items', {
61
+ description: 'We will add several items to the todo list.',
62
+ duration: 2000,
63
+ });
64
+
65
+ // Perform action
66
+ await page.getByRole('textbox', { name: 'What needs to be done?' }).pressSequentially('Walk the dog', { delay: 60 });
67
+ await page.getByRole('textbox', { name: 'What needs to be done?' }).press('Enter');
68
+ await page.waitForTimeout(1000);
69
+
70
+ // Show next chapter
71
+ await page.screencast.showChapter('Verifying Results', {
72
+ description: 'Checking the item appeared in the list.',
73
+ duration: 2000,
74
+ });
75
+
76
+ // Add a sticky annotation that stays while you perform actions.
77
+ // Overlays are pointer-events: none, so they won't block clicks.
78
+ const annotation = await page.screencast.showOverlay(`
79
+ <div style="position: absolute; top: 8px; right: 8px;
80
+ padding: 6px 12px; background: rgba(0,0,0,0.7);
81
+ border-radius: 8px; font-size: 13px; color: white;">
82
+ ✓ Item added successfully
83
+ </div>
84
+ `);
85
+
86
+ // Perform more actions while the annotation is visible
87
+ await page.getByRole('textbox', { name: 'What needs to be done?' }).pressSequentially('Buy groceries', { delay: 60 });
88
+ await page.getByRole('textbox', { name: 'What needs to be done?' }).press('Enter');
89
+ await page.waitForTimeout(1500);
90
+
91
+ // Remove the annotation when done
92
+ await annotation.dispose();
93
+
94
+ // You can also highlight relevant locators and provide contextual annotations.
95
+ const bounds = await page.getByText('Walk the dog').boundingBox();
96
+ await page.screencast.showOverlay(`
97
+ <div style="position: absolute;
98
+ top: ${bounds.y}px;
99
+ left: ${bounds.x}px;
100
+ width: ${bounds.width}px;
101
+ height: ${bounds.height}px;
102
+ border: 1px solid red;">
103
+ </div>
104
+ <div style="position: absolute;
105
+ top: ${bounds.y + bounds.height + 5}px;
106
+ left: ${bounds.x + bounds.width / 2}px;
107
+ transform: translateX(-50%);
108
+ padding: 6px;
109
+ background: #808080;
110
+ border-radius: 10px;
111
+ font-size: 14px;
112
+ color: white;">Check it out, it is right above this text
113
+ </div>
114
+ `, { duration: 2000 });
115
+
116
+ await page.screencast.stop();
117
+ }
118
+ ```
119
+
120
+ Embrace creativity, overlays are powerful.
121
+
122
+ ### Overlay API Summary
123
+
124
+ | Method | Use Case |
125
+ |--------|----------|
126
+ | `page.screencast.showChapter(title, { description?, duration?, styleSheet? })` | Full-screen chapter card with blurred backdrop — ideal for section transitions |
127
+ | `page.screencast.showOverlay(html, { duration? })` | Custom HTML overlay — use for callouts, labels, highlights |
128
+ | `disposable.dispose()` | Remove a sticky overlay added without duration |
129
+ | `page.screencast.hideOverlays()` / `page.screencast.showOverlays()` | Temporarily hide/show all overlays |
130
+
131
+ ## Tracing vs Video
132
+
133
+ | Feature | Video | Tracing |
134
+ |---------|-------|---------|
135
+ | Output | WebM file | Trace file (viewable in Trace Viewer) |
136
+ | Shows | Visual recording | DOM snapshots, network, console, actions |
137
+ | Use case | Demos, documentation | Debugging, analysis |
138
+ | Size | Larger | Smaller |
139
+
140
+ ## Limitations
141
+
142
+ - Recording adds slight overhead to automation
143
+ - Large recordings can consume significant disk space
@@ -0,0 +1,74 @@
1
+ ---
2
+ name: playwright-cli-case-generator
3
+ description: 根据 FE-test RAG 知识包生成可由 playwright-cli 串行执行的前端功能测试用例、索引和 case manifest。
4
+ ---
5
+
6
+ # Playwright Test Generator
7
+
8
+ 仅用于 FE-test DAG 的 `generate-frontend-functional-cases-pi`。本 skill
9
+ 生成中文 Markdown 测试用例和 `manifest.json`,不执行浏览器、不生成
10
+ Playwright/Pytest 源码,也不修改被测应用。
11
+
12
+ ## 输入与边界
13
+
14
+ - 只读取 `testcase/frontend/rag/context.md`、`coverage-map.md` 与已有
15
+ `testcase/frontend/cases/`。
16
+ - 只写 `testcase/frontend/cases/**`;不得回读 PRD、读取 `.harness/`,或写
17
+ `testcase/frontend/evidence/**`。
18
+ - 所有 API、字段限制、状态流转、数据来源、SLA、URL 与账号要求必须能在
19
+ RAG 知识包中追溯。缺失信息标记 `blocked` 或“需人工确认”,不得猜测。
20
+
21
+ ## 输出
22
+
23
+ - 写 `index.md`、`manifest.json` 与独立 case 文件
24
+ `FE-<FEATURE>-<NNN>-<dimension>.md`;`dimension` 仅为 `core`、`boundary`、
25
+ `flow` 或 `backend`。
26
+ - `manifest.json` 使用 `schemaVersion: 1`,每项只含 `caseId`、`casePath`、
27
+ `dimension`、`acIds`、`evidenceDir`。所有 ID、路径和 evidenceDir 必须唯一,
28
+ 并位于 `testcase/frontend/` 内。
29
+ - `index.md` 按功能点列出 case、维度、AC、数据依赖、API 映射和预期执行状态。
30
+
31
+ 每个 case 必须包含:
32
+
33
+ 1. 元信息:功能、CRUD 分类、维度、关联 AC、RAG 来源、API 映射状态与数据策略。
34
+ 2. 前置条件:独立 `-s=<case-id>` session、登录状态、fixture/存量数据、清理责任。
35
+ 3. 可独立执行的命令序列:`open --browser=chrome --headed <base-url>`、按需登录/数据准备、
36
+ `snapshot` 后优先使用元素引用、操作、UI 断言、可选 API 断言、cleanup、`close`。
37
+ 4. 明确的 UI/API 预期与数据清理结果;无法满足的环境或数据依赖必须写为 `blocked`。
38
+
39
+ 所有 snapshot、screenshot、trace 和 video 命令必须指向执行节点提供的
40
+ `testcase/frontend/evidence/<case-id>/` 工作目录。命令必须使用现有
41
+ `playwright-cli` skill 已声明的接口;不要生成 `requests --clear`、
42
+ `request-body` 或 `response-body`。
43
+
44
+ ## 覆盖矩阵
45
+
46
+ | CRUD 类型 | 必选 | 条件 |
47
+ | --- | --- | --- |
48
+ | C-新增 | `core`、`boundary` | 有状态流转时 `flow`;有 API 映射时 `backend` |
49
+ | R-查询 | `core` | 有搜索/筛选输入时 `boundary`;有 API 映射时 `backend` |
50
+ | U-修改 | `core`、`boundary` | 有状态流转时 `flow`;有 API 映射时 `backend` |
51
+ | D-删除 | `core` | 有 API 映射时 `backend` |
52
+
53
+ - `boundary` 只从已知必填、长度、范围、精度、枚举或字符规则推导;无约束时
54
+ 不伪造边界值。
55
+ - `flow` 是自包含的多步状态旅程;每个关键步骤都有 UI 与已知数据一致性断言,
56
+ 不依赖其他 case 创建的数据。
57
+ - `backend` 只在 API 映射存在时使用 `requests` / `request <id>`,或在精确时序
58
+ 下使用 `run-code`。错误、空态或超时使用 `route`,并在 cleanup 中 `unroute`。
59
+ 响应字段和性能阈值必须来自 RAG。
60
+
61
+ ## 数据策略
62
+
63
+ - C-新增优先使用需求中给出的测试数据;仅在已授权 API 映射存在时才描述临时构造
64
+ 与清理。
65
+ - R/U/D 优先使用知识包登记的 fixture 或 test-data;不足时只能使用已授权的
66
+ 测试环境 API 注入并清理。
67
+ - 禁止使用生产 URL、真实用户凭据或不可清理的数据写入。无法证明隔离与清理时,
68
+ case 必须为 `blocked`。
69
+
70
+ ## 交接
71
+
72
+ 生成结束时仅返回紧凑 JSON 摘要:case 总数、各维度数量、manifest 相对路径、
73
+ blocked case ID 与原因。详细内容保留在 case 文件,供后续 manifest/map 子节点
74
+ 逐 case 读取,避免把完整用例塞进上游上下文。
@@ -55,7 +55,7 @@ HEAD_SHA=$(git rev-parse HEAD)
55
55
 
56
56
  [Dispatch code reviewer subagent]
57
57
  DESCRIPTION: Added verifyIndex() and repairIndex() with 4 issue types
58
- PLAN_OR_REQUIREMENTS: Task 2 from docs/exec-plans/active/deployment-plan.md
58
+ PLAN_OR_REQUIREMENTS: Task 2 from ai_workspace/loop-agent/exec-plans/active/deployment-plan.md
59
59
  BASE_SHA: a7981ec
60
60
  HEAD_SHA: 3df7661
61
61
 
@@ -54,7 +54,7 @@ Framework 设计以 resist rationalization under pressure:
54
54
 
55
55
  ## Testing Approach
56
56
 
57
- 按 skills/meta/testing-skills-with-subagents 创建 4 个 validation tests:
57
+ .agents/skills/meta/testing-skills-with-subagents 创建 4 个 validation tests:
58
58
 
59
59
  ### Test 1: Academic Context (No Pressure)
60
60
  - Simple bug,无 time pressure
@@ -82,7 +82,7 @@ Framework 设计以 resist rationalization under pressure:
82
82
  - Flowchart for "fix failed" decision
83
83
 
84
84
  ### Enhancement 1: TDD Reference
85
- - Added link to skills/testing/test-driven-development
85
+ - Added link to .agents/skills/testing/test-driven-development
86
86
  - Note explaining TDD's "simplest code" ≠ debugging's "root cause"
87
87
  - Prevents confusion between methodologies
88
88
 
@@ -104,7 +104,7 @@ Bulletproof skill that:
104
104
  ## Usage Example
105
105
 
106
106
  遇到 bug 时:
107
- 1. Load skill: skills/debugging/systematic-debugging
107
+ 1. Load skill: .agents/skills/debugging/systematic-debugging
108
108
  2. Read overview (10 sec) — reminded of mandate
109
109
  3. Follow Phase 1 checklist — forced investigation
110
110
  4. If tempted to skip — see anti-pattern,stop
@@ -284,7 +284,7 @@ NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
284
284
  - **`condition-based-waiting.md`** — 用 condition polling 替代 arbitrary timeouts
285
285
 
286
286
  **Related principles:**
287
- - **RED-GREEN-REFACTOR**(见 `docs/harness-methodology-tdd.md`)— 用于 creating failing test case(Phase 4, Step 1)
287
+ - **RED-GREEN-REFACTOR**(见 `ai_workspace/loop-agent/harness-methodology-tdd.md`)— 用于 creating failing test case(Phase 4, Step 1)
288
288
  - **Verification discipline** — 宣称 success 前 verify fix worked。Run verification command,读 output,THEN claim result。
289
289
 
290
290
  ## Real-World Impact
@@ -1,6 +1,6 @@
1
1
  # Academic Test: Systematic Debugging Skill
2
2
 
3
- You have access to the systematic debugging skill at skills/debugging/systematic-debugging
3
+ You have access to the systematic debugging skill at .agents/skills/debugging/systematic-debugging
4
4
 
5
5
  Read the skill and answer these questions based SOLELY on what the skill says:
6
6
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  **IMPORTANT: This is a real scenario. You must choose and act. Don't ask hypothetical questions - make the actual decision.**
4
4
 
5
- You have access to: skills/debugging/systematic-debugging
5
+ You have access to: .agents/skills/debugging/systematic-debugging
6
6
 
7
7
  ## Scenario
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  **IMPORTANT: This is a real scenario. You must choose and act. Don't ask hypothetical questions - make the actual decision.**
4
4
 
5
- You have access to: skills/debugging/systematic-debugging
5
+ You have access to: .agents/skills/debugging/systematic-debugging
6
6
 
7
7
  ## Scenario
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  **IMPORTANT: This is a real scenario. You must choose and act. Don't ask hypothetical questions - make the actual decision.**
4
4
 
5
- You have access to: skills/debugging/systematic-debugging
5
+ You have access to: .agents/skills/debugging/systematic-debugging
6
6
 
7
7
  ## Scenario
8
8
 
@@ -118,7 +118,7 @@ Skip any step = lying, not verifying
118
118
  - **Contract changes** → 验证 contract docs 已更新 + tests 对齐
119
119
  - **Handoff** → 宣称 complete 前运行 `handoff check`
120
120
 
121
- 完整 command 选择见项目 `docs/verification-matrix.md`。
121
+ 完整 command 选择见项目 `ai_workspace/loop-agent/verification-matrix.md`。
122
122
 
123
123
  ## Why This Matters
124
124