create-harness-vibe-coding 0.8.16 → 0.8.17
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/CHANGELOG.md +9 -0
- package/README-CN.md +98 -127
- package/README.md +61 -42
- package/package.json +1 -1
- package/src/generator.js +15 -24
- package/src/index.js +1 -1
- package/templates/common/.claude/commands/wf-auto-spark.md +16 -0
- package/templates/common/.claude/commands/wf-auto.md +16 -0
- package/templates/{optional/skills/browser-e2e/.opencode → common/.claude}/commands/wf-browser.md +1 -1
- package/templates/common/.claude/commands/wf-help.md +9 -6
- package/templates/common/.claude/commands/wf-learn.md +16 -0
- package/templates/common/.claude/commands/wf-max.md +20 -0
- package/templates/common/.claude/commands/wf-readme.md +16 -0
- package/templates/common/.claude/commands/wf-remove.md +16 -0
- package/templates/common/.claude/commands/wf-review.md +16 -0
- package/templates/common/.claude/commands/wf.md +16 -0
- package/templates/common/.claude/rules/ecc/common.md +1 -1
- package/templates/common/.claude/skills/wf-browser/SKILL.md +176 -0
- package/templates/common/.claude/skills/wf-help/SKILL.md +30 -0
- package/templates/common/.claude/skills/wf-max/SKILL.md +21 -7
- package/templates/common/.codex/config.toml +3 -5
- package/templates/common/.harness-version +69 -36
- package/templates/common/.opencode/agents/architect-manager.md +7 -1
- package/templates/common/.opencode/agents/explore-manager.md +10 -1
- package/templates/common/.opencode/agents/implement-manager.md +5 -3
- package/templates/common/.opencode/agents/review-manager.md +5 -2
- package/templates/common/.opencode/commands/wf-browser.md +16 -0
- package/templates/common/.opencode/commands/wf-help.md +9 -6
- package/templates/common/.opencode/commands/wf-max.md +12 -7
- package/templates/common/CLAUDE.md +2 -2
- package/templates/common/Harness/MEMORY.md +3 -3
- package/templates/common/Harness/README.md +12 -11
- package/templates/common/Harness/ownership.manifest.json +77 -14
- package/templates/common/Harness/scripts/archive-tasks.mjs +12 -220
- package/templates/common/Harness/scripts/scan-clean.mjs +3 -9
- package/templates/common/Harness/scripts/task-state.mjs +889 -0
- package/templates/common/Harness/scripts/validate-harness.mjs +233 -28
- package/templates/common/Harness/scripts/wf-remove.mjs +3 -3
- package/templates/common/Harness/scripts/wf-update-check.mjs +3 -0
- package/templates/common/Harness/specs/guides/SETUP.md +2 -2
- package/templates/common/Harness/specs/protocols/TASK_ARCHIVE.md +43 -23
- package/templates/common/Harness/specs/runtime/dispatch.md +2 -2
- package/templates/common/Harness/specs/runtime/subagents.md +9 -5
- package/templates/common/Harness/specs/workflows/WF-AUTO.md +6 -6
- package/templates/common/Harness/specs/workflows/WF-KERNEL.md +1 -1
- package/templates/common/Harness/specs/workflows/WF-MAX.md +30 -2
- package/templates/common/Harness/specs/workflows/WF-STATE.md +89 -36
- package/templates/common/opencode.json +1 -0
- package/templates/optional/catalog.json +2 -9
- package/templates/optional/skills/browser-e2e/.claude/skills/browser-e2e/SKILL.md +0 -42
- package/templates/optional/skills/browser-e2e/.claude/skills/wf-browser/SKILL.md +0 -201
- package/templates/optional/skills/browser-e2e/Harness/workflows/browser-e2e.md +0 -119
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
# Browser E2E Workflow
|
|
2
|
-
|
|
3
|
-
Optional workflow for browser-visible testing and automation. Installed when `browser-use` CLI is available.
|
|
4
|
-
|
|
5
|
-
## When Active
|
|
6
|
-
|
|
7
|
-
This workflow is active when:
|
|
8
|
-
1. `browser-use` CLI is installed and `browser-use doctor` passes
|
|
9
|
-
2. `Harness/workflows/browser-e2e.md` exists (this file)
|
|
10
|
-
3. A task explicitly references `/wf-browser`, `$wf-browser`, or browser E2E testing
|
|
11
|
-
|
|
12
|
-
## Contract
|
|
13
|
-
|
|
14
|
-
Browser evidence in this project follows the contract:
|
|
15
|
-
|
|
16
|
-
1. **Every browser claim needs real-browser evidence** - screenshot, state snapshot, or console output
|
|
17
|
-
2. **CLI mode is preferred for deterministic steps** - use `browser-use open/state/click/screenshot` for predictable flows
|
|
18
|
-
3. **Agent mode is for dynamic exploration** - use Browser Use Agent API when the page structure is unknown or changing
|
|
19
|
-
4. **Evidence goes to the task directory** - `Harness/tasks/<task-id>/evidence/*.png`
|
|
20
|
-
|
|
21
|
-
### Harness Bridge
|
|
22
|
-
|
|
23
|
-
For frontend-backend flows, use `Harness/specs/protocols/HARNESS_BRIDGE.md` to validate UI
|
|
24
|
-
selectors, API payloads, seeded data, runtime state probes, and CDP/network
|
|
25
|
-
traces. Browser validation must produce an AC-by-AC result matrix when the task
|
|
26
|
-
has acceptance criteria.
|
|
27
|
-
|
|
28
|
-
### Stable UI Selector Contract
|
|
29
|
-
|
|
30
|
-
All browser automation and E2E tests in this project use a stable selector contract. Selectors must be written against **public, stable attributes** that survive refactors, not against ephemeral class names or DOM indices.
|
|
31
|
-
|
|
32
|
-
**Required selector priority (most stable first):**
|
|
33
|
-
|
|
34
|
-
1. **`data-testid`** - the primary stable anchor for automated tests
|
|
35
|
-
2. **accessible labels/roles** - `getByRole`, `getByLabelText`, `getByPlaceholderText` (ARIA roles, `<label>` associations, placeholder text)
|
|
36
|
-
3. **Text content** - `getByText` for visible user-facing strings
|
|
37
|
-
|
|
38
|
-
**Required coverage targets.** Every interactive page tested by browser automation must cover: inputs, buttons, filters, rows, empty/error/loading states.
|
|
39
|
-
|
|
40
|
-
| Category | Examples |
|
|
41
|
-
|---|---|
|
|
42
|
-
| **Inputs** | text fields, textareas, selects, checkboxes, radios, file uploads |
|
|
43
|
-
| **Buttons** | submit buttons, icon-only buttons, toggle buttons, CTA buttons |
|
|
44
|
-
| **Filters** | search inputs, dropdown filters, date range pickers, filter chips/tags |
|
|
45
|
-
| **Rows** | table rows, list items, card containers - the repeating data unit |
|
|
46
|
-
| **Empty state** | "no results" message, empty illustration, zero-state CTA |
|
|
47
|
-
| **Error state** | inline validation errors, toast notifications, server error banners |
|
|
48
|
-
| **Loading state** | spinners, skeletons, progress bars, "Loading..." text |
|
|
49
|
-
|
|
50
|
-
**Selector format examples:**
|
|
51
|
-
|
|
52
|
-
```
|
|
53
|
-
data-testid="search-input"
|
|
54
|
-
data-testid="submit-btn"
|
|
55
|
-
data-testid="filter-status"
|
|
56
|
-
data-testid="result-row"
|
|
57
|
-
data-testid="empty-state"
|
|
58
|
-
data-testid="error-banner"
|
|
59
|
-
data-testid="loading-spinner"
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
**Rationale:** `data-testid` attributes are decoupled from styling and layout - they survive CSS refactors, component renames, and DOM restructuring. Accessible labels and roles are the fallback when `data-testid` is not available, and they double as a11y coverage. Class-name and XPath selectors are not accepted in test automation because they break on cosmetic changes.
|
|
63
|
-
|
|
64
|
-
## Chrome DevTools / CDP / MCP Checklist
|
|
65
|
-
|
|
66
|
-
- [ ] record the URL and port
|
|
67
|
-
- [ ] Verify available CDP, MCP, browser automation, or manual tooling
|
|
68
|
-
- [ ] Check not just HTTP 200
|
|
69
|
-
- [ ] Verify no runtime exceptions, console errors, and failed network requests
|
|
70
|
-
- [ ] Confirm stable accessible labels/roles or `data-testid` on interactive elements
|
|
71
|
-
- [ ] Test critical flow end-to-end
|
|
72
|
-
- [ ] Capture screenshot, trace, video, or result artifact paths
|
|
73
|
-
- [ ] Produce an AC-by-AC validation matrix
|
|
74
|
-
- [ ] Clean up any dev server or browser processes
|
|
75
|
-
|
|
76
|
-
## Quick Install
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
# One-time setup
|
|
80
|
-
pip install "browser-use[cli]"
|
|
81
|
-
browser-use install
|
|
82
|
-
browser-use doctor
|
|
83
|
-
|
|
84
|
-
# Windows: if you see GBK encoding errors, set:
|
|
85
|
-
set PYTHONIOENCODING=utf-8
|
|
86
|
-
|
|
87
|
-
# Verify
|
|
88
|
-
browser-use open https://example.com
|
|
89
|
-
browser-use state
|
|
90
|
-
browser-use screenshot test.png
|
|
91
|
-
browser-use close
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
## Fallback
|
|
95
|
-
|
|
96
|
-
If `browser-use` is not installed, fall back to:
|
|
97
|
-
|
|
98
|
-
1. Playwright/Puppeteer MCP server (if configured)
|
|
99
|
-
2. Chrome DevTools Protocol (CDP) manual inspection
|
|
100
|
-
3. `Harness/specs/workflows/WF.md#Browser And API Evidence` manual check contract
|
|
101
|
-
|
|
102
|
-
## Integration Points
|
|
103
|
-
|
|
104
|
-
- **WF mode**: when browser-visible changes are made, follow the evidence contract in `Harness/specs/workflows/WF.md#Browser And API Evidence`
|
|
105
|
-
- **Harness Bridge**: use `Harness/specs/protocols/HARNESS_BRIDGE.md` for UI contract, API contract, seeded test data, runtime state probes, and network trace collection.
|
|
106
|
-
- **wf-browser**: Claude Code uses `.claude/skills/wf-browser/SKILL.md`; Codex uses `.agents/skills/wf-browser/SKILL.md`. Both load this workflow.
|
|
107
|
-
- **MEMORY.md**: registered as optional workflow skill
|
|
108
|
-
- **README.md**: routing table row "Browser E2E testing or automation" -> browser-e2e
|
|
109
|
-
|
|
110
|
-
## File Locations
|
|
111
|
-
|
|
112
|
-
| File | Purpose |
|
|
113
|
-
|------|---------|
|
|
114
|
-
| `.claude/skills/wf-browser/SKILL.md` | Claude Code skill adapter |
|
|
115
|
-
| `.agents/skills/wf-browser/SKILL.md` | Codex repo skill adapter |
|
|
116
|
-
| `Harness/workflows/browser-e2e.md` | This file - workflow contract and install guide |
|
|
117
|
-
| `~/.claude/skills/browser-use/SKILL.md` | Official Browser Use skill (user-level, auto-downloaded) |
|
|
118
|
-
| `pip show browser-use \| findstr Location` | Python package install location (run to find) |
|
|
119
|
-
| `~/.browser-use/` | Daemon state and browser profiles |
|